This commit was manufactured by cvs2svn to create branch 'readline_4_3
-import-branch'.

Sprout from kseitz_interps-20020528-branch 2002-06-19 16:55:29 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from kseitz_interps-20020528-branch 2002-07-22 19:56:08 UTC nobody 'This commit was manufactured by cvs2svn to create branch':
    bfd/cpu-ip2k.c
    bfd/vaxbsd.c
    gdb/config/i386/nm-x86-64linux.h
    gdb/config/i386/tm-x86-64linux.h
    gdb/config/vax/tm-vaxbsd.h
    gdb/gdb_locale.h
    gdb/i386obsd-nat.c
    include/elf/ip2k.h
    opcodes/ip2k-asm.c
    opcodes/ip2k-desc.c
    opcodes/ip2k-desc.h
    opcodes/ip2k-dis.c
    opcodes/ip2k-ibld.c
    opcodes/ip2k-opc.c
    opcodes/ip2k-opc.h
Cherrypick from kseitz_interps-20020528-branch 2002-08-09 15:39:20 UTC nobody 'This commit was manufactured by cvs2svn to create branch':
    bfd/elf32-ppcqnx.c
    bfd/elfarmqnx-nabi.c
    bfd/elfn32-mips.c
    gdb/config/powerpc/aix432.mh
    gdb/gdb_obstack.h
    gdb/mips-irix-tdep.c
    gdb/solib-irix.c
    include/gdb/sim-h8300.h
    opcodes/po/pt_BR.po
Cherrypick from kseitz_interps-20020528-branch 2002-05-28 18:43:09 UTC nobody 'This commit was manufactured by cvs2svn to create branch':
    gdb/event-loop.c
    gdb/event-top.h
    gdb/mi/mi-cmds.c
    gdb/mi/mi-cmds.h
    gdb/mi/mi-main.c
    gdb/wrapper.c
    gdb/wrapper.h
Cherrypick from master 2002-08-24 00:40:59 UTC Mark Kettenis <kettenis@gnu.org> '* valprint.c (print_longest) [CC_HAS_LONG_LONG &&':
    ChangeLog
    MAINTAINERS
    Makefile.in
    bfd/ChangeLog
    bfd/ChangeLog-0001
    bfd/Makefile.am
    bfd/Makefile.in
    bfd/aout-adobe.c
    bfd/aout-ns32k.c
    bfd/aout-target.h
    bfd/aout-tic30.c
    bfd/aoutf1.h
    bfd/aoutx.h
    bfd/archive.c
    bfd/archures.c
    bfd/armnetbsd.c
    bfd/bfd-in.h
    bfd/bfd-in2.h
    bfd/bfd.c
    bfd/binary.c
    bfd/bout.c
    bfd/cache.c
    bfd/coff-a29k.c
    bfd/coff-alpha.c
    bfd/coff-i386.c
    bfd/coff-mips.c
    bfd/coff-or32.c
    bfd/coff-rs6000.c
    bfd/coff64-rs6000.c
    bfd/coffcode.h
    bfd/coffgen.c
    bfd/cofflink.c
    bfd/config.bfd
    bfd/configure
    bfd/configure.in
    bfd/corefile.c
    bfd/cpu-h8300.c
    bfd/cpu-ns32k.c
    bfd/cpu-powerpc.c
    bfd/doc/ChangeLog
    bfd/doc/Makefile.am
    bfd/doc/Makefile.in
    bfd/doc/bfdint.texi
    bfd/doc/header.sed
    bfd/dwarf2.c
    bfd/ecoff.c
    bfd/ecofflink.c
    bfd/elf-bfd.h
    bfd/elf-eh-frame.c
    bfd/elf-hppa.h
    bfd/elf-m10200.c
    bfd/elf-m10300.c
    bfd/elf-strtab.c
    bfd/elf.c
    bfd/elf32-arc.c
    bfd/elf32-arm.h
    bfd/elf32-avr.c
    bfd/elf32-cris.c
    bfd/elf32-d10v.c
    bfd/elf32-d30v.c
    bfd/elf32-dlx.c
    bfd/elf32-fr30.c
    bfd/elf32-frv.c
    bfd/elf32-h8300.c
    bfd/elf32-hppa.c
    bfd/elf32-i370.c
    bfd/elf32-i386.c
    bfd/elf32-i386qnx.c
    bfd/elf32-i860.c
    bfd/elf32-ip2k.c
    bfd/elf32-m32r.c
    bfd/elf32-m68hc11.c
    bfd/elf32-m68hc12.c
    bfd/elf32-m68k.c
    bfd/elf32-mcore.c
    bfd/elf32-mips.c
    bfd/elf32-openrisc.c
    bfd/elf32-or32.c
    bfd/elf32-ppc.c
    bfd/elf32-qnx.h
    bfd/elf32-s390.c
    bfd/elf32-sh.c
    bfd/elf32-sh64.c
    bfd/elf32-shqnx.c
    bfd/elf32-sparc.c
    bfd/elf32-v850.c
    bfd/elf32-vax.c
    bfd/elf32-xstormy16.c
    bfd/elf64-alpha.c
    bfd/elf64-hppa.c
    bfd/elf64-mips.c
    bfd/elf64-mmix.c
    bfd/elf64-ppc.c
    bfd/elf64-ppc.h
    bfd/elf64-s390.c
    bfd/elf64-sh64.c
    bfd/elf64-sparc.c
    bfd/elf64-x86-64.c
    bfd/elfarm-nabi.c
    bfd/elfarm-oabi.c
    bfd/elfcode.h
    bfd/elfcore.h
    bfd/elflink.c
    bfd/elflink.h
    bfd/elfxx-ia64.c
    bfd/elfxx-mips.c
    bfd/elfxx-mips.h
    bfd/elfxx-target.h
    bfd/format.c
    bfd/hash.c
    bfd/i386linux.c
    bfd/i386lynx.c
    bfd/i386msdos.c
    bfd/i386os9k.c
    bfd/ieee.c
    bfd/ihex.c
    bfd/libaout.h
    bfd/libbfd-in.h
    bfd/libbfd.c
    bfd/libbfd.h
    bfd/libcoff-in.h
    bfd/libcoff.h
    bfd/libxcoff.h
    bfd/linker.c
    bfd/m68klinux.c
    bfd/merge.c
    bfd/mmo.c
    bfd/nlm-target.h
    bfd/nlm32-alpha.c
    bfd/nlm32-i386.c
    bfd/nlm32-ppc.c
    bfd/nlm32-sparc.c
    bfd/nlmcode.h
    bfd/ns32k.h
    bfd/ns32knetbsd.c
    bfd/oasys.c
    bfd/opncls.c
    bfd/pdp11.c
    bfd/pe-i386.c
    bfd/peXXigen.c
    bfd/pei-i386.c
    bfd/peicode.h
    bfd/po/SRC-POTFILES.in
    bfd/po/es.po
    bfd/po/fr.po
    bfd/po/sv.po
    bfd/po/tr.po
    bfd/ppcboot.c
    bfd/reloc.c
    bfd/reloc16.c
    bfd/section.c
    bfd/som.c
    bfd/sparclinux.c
    bfd/srec.c
    bfd/stabs.c
    bfd/sunos.c
    bfd/syms.c
    bfd/targets.c
    bfd/tekhex.c
    bfd/vaxnetbsd.c
    bfd/versados.c
    bfd/version.h
    bfd/vms-gsd.c
    bfd/vms-misc.c
    bfd/vms.c
    bfd/xcoff-target.h
    bfd/xcofflink.c
    config-ml.in
    config.guess
    config.sub
    config/ChangeLog
    configure
    configure.in
    contrib/ChangeLog
    contrib/texi2pod.pl
    etc/ChangeLog
    etc/texi2pod.pl
    gdb/ChangeLog
    gdb/MAINTAINERS
    gdb/Makefile.in
    gdb/NEWS
    gdb/PROBLEMS
    gdb/README
    gdb/abug-rom.c
    gdb/ada-exp.y
    gdb/ada-lang.c
    gdb/ada-lang.h
    gdb/ada-tasks.c
    gdb/ada-typeprint.c
    gdb/ada-valprint.c
    gdb/aix-thread.c
    gdb/alpha-osf1-tdep.c
    gdb/alpha-tdep.c
    gdb/arc-tdep.c
    gdb/arch-utils.c
    gdb/arch-utils.h
    gdb/arm-linux-tdep.c
    gdb/arm-tdep.c
    gdb/avr-tdep.c
    gdb/ax-general.c
    gdb/bcache.c
    gdb/bcache.h
    gdb/blockframe.c
    gdb/breakpoint.c
    gdb/breakpoint.h
    gdb/buildsym.c
    gdb/buildsym.h
    gdb/c-exp.y
    gdb/c-lang.c
    gdb/c-typeprint.c
    gdb/ch-exp.c
    gdb/ch-lang.c
    gdb/ch-lang.h
    gdb/ch-typeprint.c
    gdb/ch-valprint.c
    gdb/cli/cli-cmds.c
    gdb/cli/cli-decode.c
    gdb/cli/cli-decode.h
    gdb/cli/cli-dump.c
    gdb/cli/cli-script.c
    gdb/cli/cli-setshow.c
    gdb/coffread.c
    gdb/command.h
    gdb/config.in
    gdb/config/alpha/alpha.mt
    gdb/config/alpha/nm-linux.h
    gdb/config/alpha/tm-alphalinux.h
    gdb/config/arc/arc.mt
    gdb/config/arc/tm-arc.h
    gdb/config/arm/nm-linux.h
    gdb/config/arm/tm-linux.h
    gdb/config/arm/xm-nbsd.h
    gdb/config/d30v/d30v.mt
    gdb/config/d30v/tm-d30v.h
    gdb/config/djgpp/fnchange.lst
    gdb/config/fr30/fr30.mt
    gdb/config/fr30/tm-fr30.h
    gdb/config/frv/frv.mt
    gdb/config/frv/tm-frv.h
    gdb/config/h8300/tm-h8300.h
    gdb/config/h8500/tm-h8500.h
    gdb/config/i386/i386aix.mh
    gdb/config/i386/i386aix.mt
    gdb/config/i386/i386aout.mt
    gdb/config/i386/i386gnu.mh
    gdb/config/i386/i386gnu.mt
    gdb/config/i386/i386m3.mh
    gdb/config/i386/i386m3.mt
    gdb/config/i386/i386mach.mh
    gdb/config/i386/i386nw.mt
    gdb/config/i386/i386os9k.mt
    gdb/config/i386/i386sco5.mt
    gdb/config/i386/i386sol2.mh
    gdb/config/i386/i386sol2.mt
    gdb/config/i386/i386v.mt
    gdb/config/i386/nm-fbsd.h
    gdb/config/i386/nm-i386.h
    gdb/config/i386/nm-i386aix.h
    gdb/config/i386/nm-i386bsd.h
    gdb/config/i386/nm-i386gnu.h
    gdb/config/i386/nm-i386lynx.h
    gdb/config/i386/nm-i386mach.h
    gdb/config/i386/nm-i386sco.h
    gdb/config/i386/nm-i386sco5.h
    gdb/config/i386/nm-i386sol2.h
    gdb/config/i386/nm-i386v.h
    gdb/config/i386/nm-i386v4.h
    gdb/config/i386/nm-i386v42mp.h
    gdb/config/i386/nm-linux.h
    gdb/config/i386/nm-m3.h
    gdb/config/i386/nm-ptx4.h
    gdb/config/i386/obsd.mh
    gdb/config/i386/tm-cygwin.h
    gdb/config/i386/tm-fbsd.h
    gdb/config/i386/tm-go32.h
    gdb/config/i386/tm-i386.h
    gdb/config/i386/tm-i386aix.h
    gdb/config/i386/tm-i386lynx.h
    gdb/config/i386/tm-i386m3.h
    gdb/config/i386/tm-i386mk.h
    gdb/config/i386/tm-i386sol2.h
    gdb/config/i386/tm-i386v4.h
    gdb/config/i386/tm-linux.h
    gdb/config/i386/tm-nbsd.h
    gdb/config/i386/tm-nbsdaout.h
    gdb/config/i386/tm-ptx.h
    gdb/config/i386/tm-ptx4.h
    gdb/config/i386/tm-symmetry.h
    gdb/config/i386/tm-vxworks.h
    gdb/config/i386/x86-64linux.mh
    gdb/config/i386/x86-64linux.mt
    gdb/config/i386/xm-i386aix.h
    gdb/config/i386/xm-i386m3.h
    gdb/config/i386/xm-i386mach.h
    gdb/config/i386/xm-i386mk.h
    gdb/config/i386/xm-i386v4.h
    gdb/config/i386/xm-nbsd.h
    gdb/config/i386/xm-ptx.h
    gdb/config/i386/xm-ptx4.h
    gdb/config/i960/mon960.mt
    gdb/config/i960/nindy960.mt
    gdb/config/i960/tm-i960.h
    gdb/config/i960/tm-mon960.h
    gdb/config/i960/tm-nindy960.h
    gdb/config/i960/tm-vx960.h
    gdb/config/i960/vxworks960.mt
    gdb/config/ia64/ia64.mt
    gdb/config/ia64/nm-aix.h
    gdb/config/ia64/nm-linux.h
    gdb/config/ia64/tm-aix.h
    gdb/config/ia64/tm-linux.h
    gdb/config/ia64/xm-aix.h
    gdb/config/m32r/tm-m32r.h
    gdb/config/m68k/apollo68b.mh
    gdb/config/m68k/apollo68b.mt
    gdb/config/m68k/apollo68v.mh
    gdb/config/m68k/hp300bsd.mh
    gdb/config/m68k/hp300bsd.mt
    gdb/config/m68k/hp300hpux.mh
    gdb/config/m68k/hp300hpux.mt
    gdb/config/m68k/nm-linux.h
    gdb/config/m68k/nm-m68klynx.h
    gdb/config/m68k/nm-sysv4.h
    gdb/config/m68k/tm-delta68.h
    gdb/config/m68k/tm-linux.h
    gdb/config/m68k/tm-m68k.h
    gdb/config/m68k/tm-m68klynx.h
    gdb/config/m68k/tm-m68kv4.h
    gdb/config/m68k/tm-sun2os4.h
    gdb/config/m68k/tm-sun3os4.h
    gdb/config/m68k/tm-vx68.h
    gdb/config/m68k/xm-m68kv4.h
    gdb/config/m68k/xm-nbsd.h
    gdb/config/m88k/delta88.mh
    gdb/config/m88k/delta88.mt
    gdb/config/m88k/delta88v4.mh
    gdb/config/m88k/delta88v4.mt
    gdb/config/m88k/m88k.mh
    gdb/config/m88k/m88k.mt
    gdb/config/m88k/nm-delta88v4.h
    gdb/config/m88k/nm-m88k.h
    gdb/config/m88k/tm-delta88.h
    gdb/config/m88k/tm-delta88v4.h
    gdb/config/m88k/tm-m88k.h
    gdb/config/m88k/xm-delta88.h
    gdb/config/m88k/xm-delta88v4.h
    gdb/config/m88k/xm-dgux.h
    gdb/config/mcore/mcore.mt
    gdb/config/mips/irix5.mt
    gdb/config/mips/irix6.mh
    gdb/config/mips/irix6.mt
    gdb/config/mips/nm-irix5.h
    gdb/config/mips/nm-linux.h
    gdb/config/mips/tm-embed.h
    gdb/config/mips/tm-irix5.h
    gdb/config/mips/tm-irix6.h
    gdb/config/mips/tm-linux.h
    gdb/config/mips/tm-mips.h
    gdb/config/mips/tm-mips64.h
    gdb/config/mips/tm-mipsm3.h
    gdb/config/mips/tm-mipsv4.h
    gdb/config/mips/tm-nbsd.h
    gdb/config/mips/tm-vxmips.h
    gdb/config/mips/xm-irix5.h
    gdb/config/mips/xm-mipsv4.h
    gdb/config/mn10200/tm-mn10200.h
    gdb/config/ns32k/xm-nbsd.h
    gdb/config/pa/hppa.mt
    gdb/config/pa/nm-hppao.h
    gdb/config/pa/tm-hppa.h
    gdb/config/pa/tm-hppa64.h
    gdb/config/powerpc/aix.mt
    gdb/config/powerpc/linux.mh
    gdb/config/powerpc/linux.mt
    gdb/config/powerpc/nbsd.mh
    gdb/config/powerpc/nbsd.mt
    gdb/config/powerpc/nm-linux.h
    gdb/config/powerpc/ppc-eabi.mt
    gdb/config/powerpc/ppc-sim.mt
    gdb/config/powerpc/ppcle-eabi.mt
    gdb/config/powerpc/ppcle-sim.mt
    gdb/config/powerpc/tm-linux.h
    gdb/config/powerpc/tm-vxworks.h
    gdb/config/powerpc/vxworks.mt
    gdb/config/powerpc/xm-aix.h
    gdb/config/rs6000/aix4.mt
    gdb/config/rs6000/nm-rs6000ly.h
    gdb/config/rs6000/rs6000.mt
    gdb/config/rs6000/rs6000lynx.mt
    gdb/config/rs6000/tm-rs6000.h
    gdb/config/rs6000/tm-rs6000ly.h
    gdb/config/rs6000/xm-aix4.h
    gdb/config/sh/tm-linux.h
    gdb/config/sparc/nbsdaout.mh
    gdb/config/sparc/nbsdelf.mh
    gdb/config/sparc/nm-linux.h
    gdb/config/sparc/nm-nbsd.h
    gdb/config/sparc/nm-sparclynx.h
    gdb/config/sparc/nm-sun4sol2.h
    gdb/config/sparc/tm-linux.h
    gdb/config/sparc/tm-nbsd.h
    gdb/config/sparc/tm-sp64.h
    gdb/config/sparc/tm-sp64linux.h
    gdb/config/sparc/tm-sp64sim.h
    gdb/config/sparc/tm-sparc.h
    gdb/config/sparc/tm-sparclet.h
    gdb/config/sparc/tm-sparclynx.h
    gdb/config/sparc/tm-sun4os4.h
    gdb/config/sparc/tm-sun4sol2.h
    gdb/config/sparc/tm-vxsparc.h
    gdb/config/sparc/xm-sun4sol2.h
    gdb/config/tm-linux.h
    gdb/config/vax/nm-vax.h
    gdb/config/vax/tm-vax.h
    gdb/config/vax/vax.mt
    gdb/config/z8k/tm-z8k.h
    gdb/configure
    gdb/configure.host
    gdb/configure.in
    gdb/configure.tgt
    gdb/corefile.c
    gdb/cp-valprint.c
    gdb/cpu32bug-rom.c
    gdb/cris-tdep.c
    gdb/cxux-nat.c
    gdb/d10v-tdep.c
    gdb/d30v-tdep.c
    gdb/dbug-rom.c
    gdb/dbxread.c
    gdb/defs.h
    gdb/doc/ChangeLog
    gdb/doc/gdb.texinfo
    gdb/doc/gdbint.texinfo
    gdb/doc/stabs.texinfo
    gdb/doublest.c
    gdb/dst.h
    gdb/dstread.c
    gdb/dwarf2cfi.c
    gdb/dwarf2read.c
    gdb/dwarfread.c
    gdb/elfread.c
    gdb/eval.c
    gdb/event-top.c
    gdb/expprint.c
    gdb/expression.h
    gdb/f-exp.y
    gdb/f-typeprint.c
    gdb/fbsd-proc.c
    gdb/findvar.c
    gdb/fr30-tdep.c
    gdb/frame.c
    gdb/frame.h
    gdb/frv-tdep.c
    gdb/gcore.c
    gdb/gdb-events.c
    gdb/gdb-events.h
    gdb/gdb-events.sh
    gdb/gdb_indent.sh
    gdb/gdbarch.c
    gdb/gdbarch.h
    gdb/gdbarch.sh
    gdb/gdbinit.in
    gdb/gdbserver/ChangeLog
    gdb/gdbserver/Makefile.in
    gdb/gdbserver/acconfig.h
    gdb/gdbserver/aclocal.m4
    gdb/gdbserver/config.in
    gdb/gdbserver/configure
    gdb/gdbserver/configure.in
    gdb/gdbserver/configure.srv
    gdb/gdbserver/gdbreplay.c
    gdb/gdbserver/i387-fp.c
    gdb/gdbserver/i387-fp.h
    gdb/gdbserver/inferiors.c
    gdb/gdbserver/linux-arm-low.c
    gdb/gdbserver/linux-i386-low.c
    gdb/gdbserver/linux-low.c
    gdb/gdbserver/linux-low.h
    gdb/gdbserver/linux-mips-low.c
    gdb/gdbserver/linux-ppc-low.c
    gdb/gdbserver/linux-sh-low.c
    gdb/gdbserver/linux-x86-64-low.c
    gdb/gdbserver/regcache.c
    gdb/gdbserver/regcache.h
    gdb/gdbserver/remote-utils.c
    gdb/gdbserver/server.c
    gdb/gdbserver/server.h
    gdb/gdbserver/target.c
    gdb/gdbserver/target.h
    gdb/gdbtypes.c
    gdb/gdbtypes.h
    gdb/gnu-v2-abi.c
    gdb/gnu-v3-abi.c
    gdb/h8300-tdep.c
    gdb/h8500-tdep.c
    gdb/hpread.c
    gdb/i386-linux-nat.c
    gdb/i386-linux-tdep.c
    gdb/i386-nat.c
    gdb/i386-sol2-tdep.c
    gdb/i386-tdep.c
    gdb/i386-tdep.h
    gdb/i386aix-nat.c
    gdb/i386b-nat.c
    gdb/i386bsd-nat.c
    gdb/i386bsd-tdep.c
    gdb/i386fbsd-nat.c
    gdb/i386gnu-nat.c
    gdb/i386gnu-tdep.c
    gdb/i386ly-tdep.c
    gdb/i386m3-nat.c
    gdb/i386mach-nat.c
    gdb/i386nbsd-tdep.c
    gdb/i386v-nat.c
    gdb/i386v4-nat.c
    gdb/i387-tdep.c
    gdb/i387-tdep.h
    gdb/i960-tdep.c
    gdb/ia64-tdep.c
    gdb/infcmd.c
    gdb/inferior.h
    gdb/infrun.c
    gdb/irix5-nat.c
    gdb/jv-exp.y
    gdb/jv-lang.c
    gdb/language.c
    gdb/language.h
    gdb/linux-proc.c
    gdb/m2-exp.y
    gdb/m32r-tdep.c
    gdb/m68hc11-tdep.c
    gdb/m68k-tdep.c
    gdb/m68klinux-nat.c
    gdb/m88k-nat.c
    gdb/m88k-tdep.c
    gdb/macrocmd.c
    gdb/macroexp.c
    gdb/macroscope.c
    gdb/macrotab.c
    gdb/macrotab.h
    gdb/main.c
    gdb/maint.c
    gdb/mcore-tdep.c
    gdb/mdebugread.c
    gdb/memattr.c
    gdb/mi/ChangeLog
    gdb/mi/gdbmi.texinfo
    gdb/mi/mi-cmd-disas.c
    gdb/mi/mi-cmd-var.c
    gdb/minsyms.c
    gdb/mips-linux-tdep.c
    gdb/mips-tdep.c
    gdb/mn10200-tdep.c
    gdb/mn10300-tdep.c
    gdb/mon960-rom.c
    gdb/monitor.c
    gdb/monitor.h
    gdb/ns32k-tdep.c
    gdb/objfiles.c
    gdb/objfiles.h
    gdb/os9kread.c
    gdb/osabi.c
    gdb/osabi.h
    gdb/p-exp.y
    gdb/p-typeprint.c
    gdb/p-valprint.c
    gdb/pa64solib.c
    gdb/parse.c
    gdb/parser-defs.h
    gdb/ppc-linux-nat.c
    gdb/ppc-linux-tdep.c
    gdb/ppc-tdep.h
    gdb/ppcnbsd-nat.c
    gdb/ppcnbsd-tdep.c
    gdb/printcmd.c
    gdb/proc-api.c
    gdb/procfs.c
    gdb/rdi-share/devsw.c
    gdb/rdi-share/host.h
    gdb/rdi-share/hostchan.c
    gdb/rdi-share/hostchan.h
    gdb/rdi-share/serdrv.c
    gdb/rdi-share/serpardr.c
    gdb/rdi-share/unixcomm.c
    gdb/regcache.c
    gdb/regcache.h
    gdb/remote-bug.c
    gdb/remote-es.c
    gdb/remote-est.c
    gdb/remote-nindy.c
    gdb/remote-nrom.c
    gdb/remote-os9k.c
    gdb/remote-rdi.c
    gdb/remote-rdp.c
    gdb/remote-sim.c
    gdb/remote-vx960.c
    gdb/remote.c
    gdb/rom68k-rom.c
    gdb/rs6000-nat.c
    gdb/rs6000-tdep.c
    gdb/s390-nat.c
    gdb/s390-tdep.c
    gdb/ser-e7kpc.c
    gdb/sh-tdep.c
    gdb/signals/signals.c
    gdb/solib-osf.c
    gdb/solib-svr4.c
    gdb/somsolib.c
    gdb/source.c
    gdb/sparc-tdep.c
    gdb/sparcl-tdep.c
    gdb/stabsread.c
    gdb/stabsread.h
    gdb/stack.c
    gdb/std-regs.c
    gdb/symfile.c
    gdb/symmisc.c
    gdb/symtab.c
    gdb/symtab.h
    gdb/target.c
    gdb/target.h
    gdb/testsuite/ChangeLog
    gdb/testsuite/Makefile.in
    gdb/testsuite/config/gdbserver.exp
    gdb/testsuite/configure
    gdb/testsuite/configure.in
    gdb/testsuite/gdb.arch/altivec-abi.exp
    gdb/testsuite/gdb.asm/asm-source.exp
    gdb/testsuite/gdb.base/attach.exp
    gdb/testsuite/gdb.base/call-ar-st.exp
    gdb/testsuite/gdb.base/d10v.ld
    gdb/testsuite/gdb.base/ending-run.exp
    gdb/testsuite/gdb.base/interrupt.exp
    gdb/testsuite/gdb.base/long_long.exp
    gdb/testsuite/gdb.base/overlays.exp
    gdb/testsuite/gdb.base/page.exp
    gdb/testsuite/gdb.base/readline.exp
    gdb/testsuite/gdb.base/return.exp
    gdb/testsuite/gdb.base/selftest.exp
    gdb/testsuite/gdb.base/shlib-call.exp
    gdb/testsuite/gdb.chill/ChangeLog
    gdb/testsuite/gdb.chill/builtins.exp
    gdb/testsuite/gdb.chill/callch.exp
    gdb/testsuite/gdb.chill/chillvars.exp
    gdb/testsuite/gdb.chill/enum.exp
    gdb/testsuite/gdb.chill/gch1041.exp
    gdb/testsuite/gdb.chill/gch1272.exp
    gdb/testsuite/gdb.chill/gch1280.exp
    gdb/testsuite/gdb.chill/gch922.exp
    gdb/testsuite/gdb.chill/gch981.exp
    gdb/testsuite/gdb.chill/misc.exp
    gdb/testsuite/gdb.chill/powerset.exp
    gdb/testsuite/gdb.chill/pr-4975.exp
    gdb/testsuite/gdb.chill/pr-5016.exp
    gdb/testsuite/gdb.chill/pr-5020.exp
    gdb/testsuite/gdb.chill/pr-5022.exp
    gdb/testsuite/gdb.chill/pr-5646.exp
    gdb/testsuite/gdb.chill/pr-5984.exp
    gdb/testsuite/gdb.chill/pr-6292.exp
    gdb/testsuite/gdb.chill/pr-6632.exp
    gdb/testsuite/gdb.chill/pr-8134.exp
    gdb/testsuite/gdb.chill/pr-8136.exp
    gdb/testsuite/gdb.chill/pr-8405.exp
    gdb/testsuite/gdb.chill/pr-8742.exp
    gdb/testsuite/gdb.chill/pr-8894.exp
    gdb/testsuite/gdb.chill/pr-9095.exp
    gdb/testsuite/gdb.chill/pr-9946.exp
    gdb/testsuite/gdb.chill/result.exp
    gdb/testsuite/gdb.chill/string.exp
    gdb/testsuite/gdb.chill/tests1.exp
    gdb/testsuite/gdb.chill/tests2.exp
    gdb/testsuite/gdb.chill/tuples.exp
    gdb/testsuite/gdb.chill/xstruct.exp
    gdb/testsuite/gdb.fortran/exprs.exp
    gdb/testsuite/gdb.fortran/types.exp
    gdb/testsuite/gdb.hp/configure
    gdb/testsuite/gdb.hp/configure.in
    gdb/testsuite/gdb.java/jv-print.exp
    gdb/testsuite/gdb.threads/print-threads.c
    gdb/testsuite/gdb.threads/print-threads.exp
    gdb/testsuite/gdb.threads/schedlock.c
    gdb/testsuite/gdb.threads/schedlock.exp
    gdb/testsuite/lib/gdb.exp
    gdb/thread.c
    gdb/top.c
    gdb/tracepoint.c
    gdb/tui/ChangeLog
    gdb/tui/tui.c
    gdb/typeprint.c
    gdb/ui-file.c
    gdb/ui-file.h
    gdb/ui-out.c
    gdb/utils.c
    gdb/uw-thread.c
    gdb/v850-tdep.c
    gdb/valarith.c
    gdb/valops.c
    gdb/valprint.c
    gdb/value.h
    gdb/values.c
    gdb/varobj.c
    gdb/vax-tdep.c
    gdb/vax-tdep.h
    gdb/version.in
    gdb/win32-nat.c
    gdb/wince.c
    gdb/x86-64-linux-nat.c
    gdb/x86-64-tdep.c
    gdb/x86-64-tdep.h
    gdb/xcoffread.c
    gdb/xstormy16-tdep.c
    gdb/z8k-tdep.c
    include/ChangeLog
    include/bfdlink.h
    include/demangle.h
    include/dis-asm.h
    include/elf/ChangeLog
    include/elf/alpha.h
    include/elf/common.h
    include/elf/dwarf2.h
    include/elf/i370.h
    include/elf/m68hc11.h
    include/elf/sh.h
    include/elf/vax.h
    include/fibheap.h
    include/gdb/ChangeLog
    include/gdb/remote-sim.h
    include/gdb/sim-d10v.h
    include/gdb/sim-sh.h
    include/getopt.h
    include/hashtab.h
    include/libiberty.h
    include/opcode/ChangeLog
    include/opcode/a29k.h
    include/opcode/convex.h
    include/opcode/dlx.h
    include/opcode/i386.h
    include/opcode/m68hc11.h
    include/opcode/mips.h
    include/opcode/or32.h
    include/opcode/ppc.h
    include/partition.h
    include/sort.h
    include/splay-tree.h
    libiberty/ChangeLog
    libiberty/Makefile.in
    libiberty/configure
    libiberty/configure.in
    libiberty/cp-demangle.c
    libiberty/cplus-dem.c
    libiberty/hashtab.c
    libiberty/lbasename.c
    libiberty/regex.c
    libiberty/testsuite/demangle-expected
    ltcf-cxx.sh
    opcodes/ChangeLog
    opcodes/Makefile.am
    opcodes/Makefile.in
    opcodes/a29k-dis.c
    opcodes/configure
    opcodes/configure.in
    opcodes/d10v-opc.c
    opcodes/disassemble.c
    opcodes/h8300-dis.c
    opcodes/ia64-asmtab.c
    opcodes/ia64-opc-b.c
    opcodes/m68hc11-dis.c
    opcodes/m68hc11-opc.c
    opcodes/m68k-dis.c
    opcodes/mips-dis.c
    opcodes/mips-opc.c
    opcodes/or32-dis.c
    opcodes/po/POTFILES.in
    opcodes/po/es.po
    opcodes/po/fr.po
    opcodes/po/id.po
    opcodes/po/sv.po
    opcodes/po/tr.po
    opcodes/ppc-dis.c
    opcodes/ppc-opc.c
    opcodes/sparc-dis.c
    opcodes/z8k-dis.c
    opcodes/z8k-opc.h
    opcodes/z8kgen.c
    readline/ChangeLog.gdb
    readline/doc/rluserman.texinfo
    readline/examples/rlfe.c
    readline/rlprivate.h
    readline/rlshell.h
    readline/support/config.guess
    readline/support/config.sub
    readline/xmalloc.h
    sim/ChangeLog
    sim/Makefile.in
    sim/README-HACKING
    sim/arm/ChangeLog
    sim/arm/Makefile.in
    sim/arm/armcopro.c
    sim/arm/armemu.c
    sim/arm/armos.c
    sim/arm/armos.h
    sim/arm/configure
    sim/arm/wrapper.c
    sim/common/ChangeLog
    sim/common/Make-common.in
    sim/common/aclocal.m4
    sim/common/callback.c
    sim/common/gennltvals.sh
    sim/common/gentmap.c
    sim/common/hw-events.c
    sim/common/nltvals.def
    sim/common/run-sim.h
    sim/common/run.c
    sim/common/sim-basics.h
    sim/common/sim-events.c
    sim/common/sim-fpu.c
    sim/common/sim-load.c
    sim/common/sim-memopt.c
    sim/common/sim-resume.c
    sim/common/syscall.c
    sim/configure
    sim/configure.in
    sim/d10v/ChangeLog
    sim/d10v/Makefile.in
    sim/d10v/configure
    sim/d10v/d10v_sim.h
    sim/d10v/gencode.c
    sim/d10v/interp.c
    sim/d30v/ChangeLog
    sim/d30v/Makefile.in
    sim/d30v/alu.h
    sim/d30v/configure
    sim/d30v/cpu.c
    sim/d30v/cpu.h
    sim/d30v/d30v-insns
    sim/d30v/dc-short
    sim/d30v/engine.c
    sim/d30v/ic-d30v
    sim/d30v/sim-calls.c
    sim/d30v/sim-main.h
    sim/erc32/ChangeLog
    sim/erc32/interf.c
    sim/erc32/sis.h
    sim/fr30/ChangeLog
    sim/fr30/Makefile.in
    sim/fr30/README
    sim/fr30/TODO
    sim/fr30/arch.c
    sim/fr30/arch.h
    sim/fr30/configure
    sim/fr30/configure.in
    sim/fr30/cpu.c
    sim/fr30/cpu.h
    sim/fr30/cpuall.h
    sim/fr30/decode.c
    sim/fr30/decode.h
    sim/fr30/devices.c
    sim/fr30/fr30-sim.h
    sim/fr30/fr30.c
    sim/fr30/mloop.in
    sim/fr30/model.c
    sim/fr30/sem-switch.c
    sim/fr30/sem.c
    sim/fr30/sim-if.c
    sim/fr30/sim-main.h
    sim/fr30/traps.c
    sim/h8300/ChangeLog
    sim/h8300/Makefile.in
    sim/h8300/compile.c
    sim/h8500/ChangeLog
    sim/h8500/compile.c
    sim/i960/ChangeLog
    sim/igen/ChangeLog
    sim/igen/Makefile.in
    sim/igen/compare_igen_models
    sim/igen/configure
    sim/igen/gen-engine.c
    sim/igen/gen-icache.c
    sim/igen/gen.c
    sim/igen/igen.c
    sim/igen/lf.c
    sim/m32r/ChangeLog
    sim/m68hc11/ChangeLog
    sim/m68hc11/Makefile.in
    sim/m68hc11/configure
    sim/m68hc11/dv-m68hc11.c
    sim/m68hc11/dv-m68hc11eepr.c
    sim/m68hc11/gencode.c
    sim/m68hc11/interp.c
    sim/m68hc11/m68hc11_sim.c
    sim/m68hc11/sim-main.h
    sim/mcore/ChangeLog
    sim/mcore/interp.c
    sim/mips/ChangeLog
    sim/mips/Makefile.in
    sim/mips/configure
    sim/mips/configure.in
    sim/mips/cp1.c
    sim/mips/interp.c
    sim/mips/mips.igen
    sim/mips/sim-main.c
    sim/mips/sim-main.h
    sim/mn10200/ChangeLog
    sim/mn10200/Makefile.in
    sim/mn10200/mn10200_sim.h
    sim/mn10300/ChangeLog
    sim/mn10300/Makefile.in
    sim/mn10300/configure
    sim/mn10300/mn10300_sim.h
    sim/mn10300/tconfig.in
    sim/ppc/ChangeLog
    sim/ppc/Makefile.in
    sim/ppc/gen-idecode.c
    sim/ppc/gen-model.c
    sim/ppc/lf.c
    sim/ppc/main.c
    sim/ppc/psim.c
    sim/ppc/sim_calls.c
    sim/sh/ChangeLog
    sim/sh/Makefile.in
    sim/sh/interp.c
    sim/testsuite/ChangeLog
    sim/v850/ChangeLog
    sim/v850/configure
    sim/v850/simops.c
    sim/z8k/ChangeLog
    sim/z8k/Makefile.in
    sim/z8k/iface.c
    sim/z8k/support.c
    sim/z8k/writecode.c
    texinfo/texinfo.tex
Cherrypick from FSF 2002-08-23 22:02:32 UTC Elena Zannoni <ezannoni@kwikemart.cygnus.com> 'import of readline-4.3':
    readline/examples/excallback.c
Delete:
    gdb/29k-share/README
    gdb/29k-share/udi/udi2go32.c
    gdb/29k-share/udi/udiids.h
    gdb/29k-share/udi/udip2soc.c
    gdb/29k-share/udi/udiphcfg.h
    gdb/29k-share/udi/udiphunix.h
    gdb/29k-share/udi/udiproc.h
    gdb/29k-share/udi/udipt29k.h
    gdb/29k-share/udi/udiptcfg.h
    gdb/29k-share/udi/udisoc.h
    gdb/29k-share/udi/udr.c
    gdb/29k-share/udi_soc
    gdb/ada-exp.tab.c
    gdb/ada-lex.c
    gdb/cli/cli-interp.c
    gdb/config/i386/nm-gnu.h
    gdb/config/i386/nm-x86-64.h
    gdb/config/i386/obsd.mt
    gdb/config/i386/tm-i386gnu.h
    gdb/config/i386/tm-i386nw.h
    gdb/config/i386/tm-i386sco5.h
    gdb/config/i386/tm-i386v.h
    gdb/config/i386/tm-obsd.h
    gdb/config/i386/xm-i386gnu.h
    gdb/config/mcore/tm-mcore.h
    gdb/config/romp/rtbsd.mh
    gdb/config/romp/xm-rtbsd.h
    gdb/config/sparc/nbsdaout.mt
    gdb/config/sparc/nbsdelf.mt
    gdb/config/sparc/tm-nbsdaout.h
    gdb/config/sparc/xm-nbsd.h
    gdb/interps.c
    gdb/interps.h
    gdb/mi/mi-events.c
    gdb/mi/mi-interp.c
    gdb/mi/mi.h
    gdb/remote-vx29k.c
    gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
    gdb/testsuite/gdb.hp/gdb.threads-hp/configure
    gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
    include/callback.h
    include/remote-sim.h
    sim/tic80/ChangeLog
    sim/tic80/Makefile.in
    sim/tic80/acconfig.h
    sim/tic80/alu.h
    sim/tic80/config.in
    sim/tic80/configure
    sim/tic80/configure.in
    sim/tic80/cpu.h
    sim/tic80/interp.c
    sim/tic80/misc.c
    sim/tic80/sim-calls.c
    sim/tic80/sim-main.h
    sim/tic80/tic80.dc
    sim/tic80/tic80.ic
    sim/tic80/tic80.igen
    sim/w65/ChangeLog
    sim/w65/Makefile.in
    sim/w65/acconfig.h
    sim/w65/config.in
    sim/w65/configure
    sim/w65/configure.in
    sim/w65/gencode.c
    sim/w65/interp.c
    sim/w65/interp.h
    sim/w65/run.c
    sim/z8k/list.c
diff --git a/ChangeLog b/ChangeLog
index 0969e9c..3c71ac2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,164 @@
+2002-08-23  Andrew Cagney  <ac131313@redhat.com>
+
+	* texinfo/texinfo.tex: Import version 2002-06-04.06.
+
+	* config.guess: Import version 2002-08-23.
+	* config.sub: Import version 2002-08-22.
+
+2002-08-20  Alexandre Oliva  <aoliva@redhat.com>
+
+	* Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER.
+	* configure.in (CC_FOR_TARGET, GCJ_FOR_TARGET, CXX_FOR_TARGET,
+	CXX_FOR_TARGET_FOR_RECURSIVE_MAKE): Likewise.
+
+2002-08-06  Federico G. Schwindt <fgsch@olimpo.com.br>
+
+	* configure.in (hppa*-*-openbsd*): Treat like hppa*-*-*elf*.
+
+2002-08-04  H.J. Lu  (hjl@gnu.org)
+
+	* configure.in (mips*-*-linux*): Don't skip target-libffi.
+
+2002-07-31  Alan Modra  <amodra@bigpond.net.au>
+
+	* configure.in: Move generic linux case to end.	 Copy generic
+	linux noconfigdirs to mips*-*-linux* entry and new
+	powerpc64*-*-linux* entry.  Add target-libffi for the latter.
+
+2002-07-19  Chris Demetriou  <cgd@broadcom.com>
+
+	* MAINTAINERS: Clarify on config.guess and config.sub, and add
+	one instance of them which was missed to the list to update.
+
+2002-07-16  Chris Demetriou  <cgd@broadcom.com>
+
+	* config.guess: Update to 2002-07-09 version.
+	* config.sub: Update to 2002-07-03 version.
+
+2002-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+	* configure.in: Remove two redundant tests.
+
+2002-07-11  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+	* configure.in (mips*-*-irix6*o32): Enable stabs.
+
+2002-07-08  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+	* configure.in: Don't build grez.
+	* Makefile.in: Ditto.
+
+	* Makefile.in: Remove references to bsp, cygmon, libstub.
+	* configure.in: Ditto.
+
+	* configure.in: Remove leftover reference to gdbtest.
+
+2002-07-08  Phil Edwards  <pme@gcc.gnu.org>
+
+	* configure.in (gxx_include_dir):  Change to match versioned
+	C++ headers if --enable-version-specific-runtime-libs is used.
+
+2002-07-04  Steve Ellcey  <sje@cup.hp.com>
+
+	* ltcf-cxx.sh (hpux*): Modify to support ia64-*-hpux*.
+
+2002-07-03  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+	* configure.in: Make --without-x work.
+
+2002-07-03  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* contrib: New directory.  Created to contain a copy of the
+	texi2pod.pl script so that it is in the same place as the version in 
+	the FSF GCC sources.
+
+2002-07-02  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+	* configure.in: Rearrange target Makefile fragment collection.
+
+	* Makefile.in: Don't try to build gdbtest, tgas, ispell, inet, or
+	cvs[src].
+	* configure.in: Ditto.
+
+2002-07-01  Nathanael Nerode <neroden@gcc.gnu.org>
+
+	* Makefile.in: Eliminate 'apache' targets.
+	* configure.in: Eliminate 'apache' targets.
+
+	* configure.in: Eliminate redundant tests.  Reorganize.
+
+	* Makefile.in: Eliminate last reference to LIBGCC1_TEST.
+
+	* config-ml.in: Eliminate references to Cygnus configure.
+
+	* Makefile.in: Eliminate references to building emacs.
+
+2002-07-01  Denis Chertykov  <denisc@overta.ru>
+
+	* configure.in: Add support for ip2k.
+
+2002-06-24  Ben Elliston  <bje@redhat.com>
+
+	* configure.in (host_tools): Remove cgen.
+
+	* Makefile.in (all-cgen): Remove; runs from its source directory.
+	(check-cgen, install-cgen, clean-cgen): Likewise.
+	(all-opcodes): No not depend on all-cgen.
+	(all-sim): Likewise.
+
+2002-06-22  Nathanael Nerode  <neroden@twcny.rr.com>
+
+	* configure.in: Fix AIX configury bug.
+
+2002-06-19  Nathanael Nerode  <neroden@twcny.rr.com>
+
+	* configure.in: Replace ${topsrcdir} with ${srcdir}.
+
+	* configure.in: Move definition of libstdcxx_flags right above
+	usage, rather than way earlier.
+
+	* configure.in: Pull definition of is_cross_compiler earlier.
+
+	* configure.in: Rearrange a little.
+
+	* configure.in: Remove references to librx.
+	* Makefile.in: Remove references to librx.
+
+2002-06-19  Nathanael Nerode  <neroden@twcny.rr.com>
+
+	* configure.in: Eliminate ${gasdir} variable.
+
+2002-06-18  Dave Brolley  <brolley@redhat.com>
+
+	* configure.in: Add support for frv.
+	* config.sub: Add support for frv.
+
+2002-06-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
+
+2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* configure.in (vax-*-netbsd*): Re-enable gas.
+
+2002-05-31  Nathanael Nerode  <neroden@twcny.rr.com>
+
+	* Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with BUILD_PREFIX,
+	BUILD_PREFIX_1, to correct nomenclature.
+	* configure: Likewise.
+
+	* Makefile.in: Eliminate version-specific references to tcl8.1, tk8.1.
+	* configure.in: Eliminate version-specific references to tcl8.1, tk8.1.
+
+2002-05-31  Olaf Hering  <olh@suse.de>
+
+	* config-ml.in: Propogate DESTDIR also.
+
+2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* configure.in (vax-*-netbsd*): Don't build gas for this
+	platform.
+
 2002-05-28  Marek Michalkiewicz  <marekm@amelek.gda.pl>
 
 	* configure.in (noconfigdirs): Don't compile libiberty, libstdcxx
@@ -19,9 +180,6 @@
 	* configure: Likewise.
 	* configure.in: Likewise.
 
-	config:
-	* acinclude.m4: Allow for PWDCMD to override hardcoded pwd.
-
 2002-05-13  Nathanael Nerode  <neroden@twcny.rr.com>
 
 	* configure.in: Simplify makefile fragment collection.
diff --git a/MAINTAINERS b/MAINTAINERS
index 104b815..a2e155b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21,13 +21,14 @@
 	May need separate opcodes/ or sim/ approval for
 		commits of regenerated files there.
 
-config.guess; config.sub; dejagnu/config.guess;
+config.guess; config.sub; dejagnu/config.guess; dejagnu/config.sub;
 readline/support/config.sub; readline/support/config.guess
 	config: http://savannah.gnu.org/projects/config
 	Patches to config-patches@gnu.org.
 	Changes need to be done in tandem with the official CONFIG
 	sources or submitted to the master file maintainer and brought
-	in via a merge.
+	in via a merge.  When updating any of these files, please be
+	sure to update all of them.
 	Please notify the following of any committed patches:
 		binutils@sources.redhat.com
 		gdb-patches@sources.redhat.com
diff --git a/Makefile.in b/Makefile.in
index 72bd8b0..c37a505 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -90,8 +90,8 @@
 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
 # here so that they can be overridden by Makefile fragments.
 HOST_CC = $(CC_FOR_BUILD)
-HOST_PREFIX = 
-HOST_PREFIX_1 = loser-
+BUILD_PREFIX = 
+BUILD_PREFIX_1 = loser-
 
 # These flag values are normally overridden by the configure script.
 CFLAGS = -g
@@ -100,7 +100,11 @@
 LDFLAGS = 
 LIBCFLAGS = $(CFLAGS)
 CFLAGS_FOR_BUILD = $(CFLAGS)
-CFLAGS_FOR_TARGET = $(CFLAGS)
+# During gcc bootstrap, if we use some random cc for stage1 then
+# CFLAGS will be just -g.  We want to ensure that TARGET libraries
+# (which we know are built with gcc) are built with optimizations so
+# prepend -O2 when setting CFLAGS_FOR_TARGET.
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
 LDFLAGS_FOR_TARGET = 
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 PICFLAG = 
@@ -182,7 +186,7 @@
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libobjc
+TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes libf2c libobjc
 
 # Target libraries are put under this directory:
 # Changed by configure to $(target_alias) if cross.
@@ -247,7 +251,7 @@
 # variable is passed down to the gcc Makefile, where it is used to
 # build libgcc2.a.  We define it here so that it can itself be
 # overridden on the command line.
-GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
+GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
 
 AS_FOR_TARGET = ` \
   if [ -f $$r/gas/as-new ] ; then \
@@ -486,8 +490,8 @@
 	'CXX=$(CXX)' \
 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
 	'HOST_CC=$(CC_FOR_BUILD)' \
-	'HOST_PREFIX=$(HOST_PREFIX)' \
-	'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
+	'BUILD_PREFIX=$(BUILD_PREFIX)' \
+	'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
 	'NM=$(NM)' \
 	"`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \
 	'WINDRES=$$(WINDRES_FOR_TARGET)' \
@@ -496,7 +500,6 @@
 	"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
 	"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
 	"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
-	"`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
 	"`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
 	"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
 	"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
@@ -521,7 +524,6 @@
 # This is a list of the targets for all of the modules which are compiled
 # using $(FLAGS_TO_PASS).
 ALL_MODULES = \
-	all-apache \
 	all-ash \
 	all-autoconf \
 	all-automake \
@@ -531,8 +533,6 @@
 	all-bison \
 	all-byacc \
 	all-bzip2 \
-	all-cgen \
-	all-cvssrc \
 	all-db \
 	all-dejagnu \
 	all-diff \
@@ -549,13 +549,10 @@
 	all-gnuserv \
 	all-gprof \
 	all-grep \
-	all-grez \
 	all-gzip \
 	all-hello \
 	all-indent \
-	all-inet \
 	all-intl \
-	all-ispell \
 	all-itcl \
 	all-ld \
 	all-libgui \
@@ -580,10 +577,8 @@
 	all-snavigator \
 	all-tar \
 	all-tcl \
-	all-tcl8.1 \
 	all-texinfo \
 	all-textutils \
-	all-tgas \
 	all-time \
 	all-uudecode \
 	all-wdiff \
@@ -605,7 +600,6 @@
 	check-zip
 
 CROSS_CHECK_MODULES = \
-	check-apache \
 	check-ash \
 	check-autoconf \
 	check-automake \
@@ -613,8 +607,6 @@
 	check-bfd \
 	check-binutils \
 	check-bzip2 \
-	check-cgen \
-	check-cvssrc \
 	check-db \
 	check-dejagnu \
 	check-diff \
@@ -631,9 +623,7 @@
 	check-gzip \
 	check-hello \
 	check-indent \
-	check-inet \
 	check-intl \
-	check-ispell \
 	check-itcl \
 	check-ld \
 	check-libgui \
@@ -659,7 +649,6 @@
 	check-tcl \
 	check-texinfo \
 	check-textutils \
-	check-tgas \
 	check-time \
 	check-uudecode \
 	check-wdiff \
@@ -675,7 +664,6 @@
 # We put install-tcl before install-itcl because itcl wants to run a
 # program on installation which uses the Tcl libraries.
 INSTALL_MODULES = \
-	install-apache \
 	install-ash \
 	install-autoconf \
 	install-automake \
@@ -686,8 +674,6 @@
 	install-binutils \
 	install-bison \
 	install-byacc \
-	install-cgen \
-	install-cvssrc \
 	install-db \
 	install-dejagnu \
 	install-diff \
@@ -704,15 +690,11 @@
 	install-gnuserv \
 	install-gprof \
 	install-grep \
-	install-grez \
 	install-gzip \
 	install-hello \
 	install-indent \
-	install-inet \
 	install-intl \
-	install-ispell \
 	install-tcl \
-	install-tcl8.1 \
 	install-itcl \
 	install-ld \
 	install-libgui \
@@ -735,7 +717,6 @@
 	install-snavigator \
 	install-tar \
 	install-textutils \
-	install-tgas \
 	install-time \
 	install-uudecode \
 	install-wdiff \
@@ -745,20 +726,16 @@
 # This is a list of the targets for all of the modules which are compiled
 # using $(X11_FLAGS_TO_PASS).
 ALL_X11_MODULES = \
-	all-emacs \
-	all-emacs19 \
 	all-gdb \
 	all-expect \
 	all-guile \
 	all-tclX \
 	all-tk \
-	all-tk8.1 \
 	all-tix
 
 # This is a list of the check targets for all of the modules which are
 # compiled using $(X11_FLAGS_TO_PASS).
 CHECK_X11_MODULES = \
-	check-emacs \
 	check-gdb \
 	check-guile \
 	check-expect \
@@ -769,21 +746,17 @@
 # This is a list of the install targets for all the modules which are
 # compiled using $(X11_FLAGS_TO_PASS).
 INSTALL_X11_MODULES = \
-	install-emacs \
-	install-emacs19 \
 	install-gdb \
 	install-guile \
 	install-expect \
 	install-tclX \
 	install-tk \
-	install-tk8.1 \
 	install-tix
 
 # This is a list of the targets for all of the modules which are compiled
 # using $(TARGET_FLAGS_TO_PASS).
 ALL_TARGET_MODULES = \
 	all-target-libstdc++-v3 \
-	all-target-librx \
 	all-target-newlib \
 	all-target-libf2c \
 	all-target-libobjc \
@@ -793,20 +766,16 @@
 	all-target-libiberty \
 	all-target-gperf \
 	all-target-examples \
-	all-target-libstub \
 	all-target-libffi \
 	all-target-libjava \
 	all-target-zlib \
 	all-target-boehm-gc \
-	all-target-qthreads \
-	all-target-bsp \
-	all-target-cygmon
+	all-target-qthreads
 
 # This is a list of the configure targets for all of the modules which
 # are compiled using the target tools.
 CONFIGURE_TARGET_MODULES = \
 	configure-target-libstdc++-v3 \
-	configure-target-librx \
 	configure-target-newlib \
 	configure-target-libf2c \
 	configure-target-libobjc \
@@ -816,14 +785,11 @@
 	configure-target-libiberty \
 	configure-target-gperf \
 	configure-target-examples \
-	configure-target-libstub \
 	configure-target-libffi \
 	configure-target-libjava \
 	configure-target-zlib \
 	configure-target-boehm-gc \
-	configure-target-qthreads \
-	configure-target-bsp \
-	configure-target-cygmon
+	configure-target-qthreads
 
 # This is a list of the check targets for all of the modules which are
 # compiled using $(TARGET_FLAGS_TO_PASS).
@@ -852,7 +818,6 @@
 	install-target-winsup \
 	install-target-libgloss \
 	install-target-libiberty \
-	install-target-bsp \
 	install-target-libjava \
 	install-target-zlib \
 	install-target-boehm-gc \
@@ -861,7 +826,6 @@
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES = \
-	clean-apache \
 	clean-ash \
 	clean-autoconf \
 	clean-automake \
@@ -871,8 +835,6 @@
 	clean-bison \
 	clean-byacc \
 	clean-bzip2 \
-	clean-cgen \
-	clean-cvssrc \
 	clean-db \
 	clean-dejagnu \
 	clean-diff \
@@ -889,13 +851,10 @@
 	clean-gnuserv \
 	clean-gprof \
 	clean-grep \
-	clean-grez \
 	clean-gzip \
 	clean-hello \
 	clean-indent \
-	clean-inet \
 	clean-intl \
-	clean-ispell \
 	clean-itcl \
 	clean-ld \
 	clean-libgui \
@@ -922,7 +881,6 @@
 	clean-tcl \
 	clean-texinfo \
 	clean-textutils \
-	clean-tgas \
 	clean-time \
 	clean-uudecode \
 	clean-wdiff \
@@ -932,7 +890,6 @@
 # All of the target modules that can be cleaned
 CLEAN_TARGET_MODULES = \
 	clean-target-libstdc++-v3 \
-	clean-target-librx \
 	clean-target-newlib \
 	clean-target-libf2c \
 	clean-target-libobjc \
@@ -941,19 +898,14 @@
 	clean-target-libiberty \
 	clean-target-gperf \
 	clean-target-examples \
-	clean-target-libstub \
 	clean-target-libffi \
 	clean-target-libjava \
 	clean-target-zlib \
 	clean-target-boehm-gc \
-	clean-target-qthreads \
-	clean-target-bsp \
-	clean-target-cygmon
+	clean-target-qthreads
 
 # All of the x11 modules that can be cleaned
 CLEAN_X11_MODULES = \
-	clean-emacs \
-	clean-emacs19 \
 	clean-gdb \
 	clean-expect \
 	clean-guile \
@@ -1178,11 +1130,6 @@
 		true ; \
 	fi
 
-# inet-install is used because the I*Net wants DejaGNU installed but
-# not built.  Similarly, gzip is built but not installed.
-inet-install:
-	$(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
-
 # install-no-fixedincludes is used because Cygnus can not distribute
 # the fixed header files.
 .PHONY: install-no-fixedincludes
@@ -1703,7 +1650,6 @@
 ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3
 
 # This is a list of inter-dependencies among modules.
-all-apache:
 all-ash:
 all-autoconf: all-m4 all-texinfo
 all-automake: all-m4 all-texinfo
@@ -1713,19 +1659,11 @@
 all-bison: all-texinfo
 configure-target-boehm-gc: $(ALL_GCC_C) configure-target-qthreads
 all-target-boehm-gc: configure-target-boehm-gc
-configure-target-bsp: $(ALL_GCC_C)
-all-target-bsp: configure-target-bsp
 all-byacc:
 all-bzip2:
-all-cgen: all-libiberty
-all-cvssrc:
-configure-target-cygmon: $(ALL_GCC_C)
-all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libstub all-target-bsp
 all-db:
 all-dejagnu: all-tcl all-expect all-tk
 all-diff: all-libiberty
-all-emacs:
-all-emacs19: all-bison all-byacc
 all-etc:
 configure-target-examples: $(ALL_GCC_C)
 all-target-examples: configure-target-examples
@@ -1746,20 +1684,17 @@
 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3
 all-gprof: all-libiberty all-bfd all-opcodes all-intl
 all-grep: all-libiberty
-all-grez: all-libiberty all-bfd all-opcodes
-all-gui: all-gdb all-libproc all-target-librx
+all-gui: all-gdb all-libproc
 all-guile:
 all-gzip: all-libiberty
 all-hello: all-libiberty
 all-indent:
-all-inet: all-tcl all-send-pr all-perl
 all-intl:
-all-ispell: all-emacs19
-all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1
+all-itcl: all-tcl all-tk
 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
 configure-target-libgloss: $(ALL_GCC)
 all-target-libgloss: configure-target-libgloss configure-target-newlib
-all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
+all-libgui: all-tcl all-tk all-itcl
 all-libiberty:
 
 all-build-libiberty: configure-build-libiberty
@@ -1768,12 +1703,8 @@
 all-target-libffi: configure-target-libffi
 configure-target-libjava: $(ALL_GCC_C) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
 all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi
-configure-target-librx: $(ALL_GCC_C)
-all-target-librx: configure-target-librx
 configure-target-libstdc++-v3: $(ALL_GCC_C)
 all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty
-configure-target-libstub: $(ALL_GCC_C)
-all-target-libstub: configure-target-libstub
 all-libtool:
 configure-target-libf2c: $(ALL_GCC_C)
 all-target-libf2c: configure-target-libf2c all-target-libiberty
@@ -1786,7 +1717,7 @@
 all-target-newlib: configure-target-newlib
 configure-target-libtermcap: $(ALL_GCC_C)
 all-target-libtermcap: configure-target-libtermcap
-all-opcodes: all-bfd all-libiberty all-cgen
+all-opcodes: all-bfd all-libiberty
 all-patch: all-libiberty
 all-perl:
 all-prms: all-libiberty
@@ -1799,19 +1730,16 @@
 all-send-pr: all-prms
 all-shellutils:
 all-sid: all-tcl all-tk
-all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen
+all-sim: all-libiberty all-bfd all-opcodes all-readline
 all-snavigator: all-tcl all-tk all-itcl all-tix all-db all-grep all-libgui
 all-tar: all-libiberty
 all-tcl:
-all-tcl8.1:
 all-tclX: all-tcl all-tk
 all-tk: all-tcl
-all-tk8.1: all-tcl8.1
 all-texinfo: all-libiberty
 all-textutils:
-all-tgas: all-libiberty all-bfd all-opcodes
 all-time:
-all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1
+all-tix: all-tcl all-tk
 all-wdiff:
 configure-target-winsup: $(ALL_GCC_C)
 all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c4b7cc7..50e2546 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,1939 @@
+2002-08-23  Nick Clifton  <nickc@redhat.com>
+
+	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
+	previous change.  Add comment explaining why.
+
+2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
+
+	* elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
+	contents of .got.plt[2] to tr0, not address of .got.plt.
+	(sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
+	patching absolute plt entry. For shmedia plt entry, set bottom bit
+	of branch to plt0 as this is a branch to an shmedia instruction.
+	* elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
+	Copy contents of .got.plt[2] to tr0, not address of .got.plt.
+	(elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
+	branch to plt0.
+	(sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
+	patching absolute plt entry. For shmedia plt entry, branch to
+	plt0 is now ptrel, so use relative offset.  Set bottom bit of
+	branch target as it is a branch to an shmedia instruction.
+
+2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
+	    Richard Shann <richard.shann@superh.com>
+
+	* elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
+	value if .init is an SHmedia function.  Similarly for DT_FINI.
+	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
+	
+2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
+
+	* elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
+	dynamic section.
+	* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
+
+2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
+	byte read when reading the return address register column. 
+
+2002-08-22  Nick Clifton  <nickc@redhat.com>
+
+	* config.bfd: Add powepc64-*-*bsd* target.
+
+2002-08-22  Graeme Peterson  <gp@qnx.com>
+
+	* Makefile.am: Add entries for elf32-shqnx.c
+	* Makefile.in: Regenerate.
+	* config.bfd: Add support sh-*-nto* target.
+	* configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
+	* configure: Regenerate.
+	* elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
+	* elf32-sh.c: Do not include elf32-target.h if
+	ELF32_SH_C_INCLUDED is defined.
+	* elf32-shqnx.c: New file: Support for QNX.
+	* targets.c: Add bfd_elf32_sh{l}qnx_vec.
+
+2002-08-22  Nick Clifton  <nickc@redhat.com>
+
+	* po/tr.po: Updated Turkish translation.
+
+	* syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
+	symbols are not read.
+
+2002-08-22  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf32-m68hc11.c: Formatting fixes.
+	(elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
+	* elf32-m68hc12.c: Formatting fixes.
+	(elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
+
+2002-08-22  Alan Modra  <amodra@bigpond.net.au>
+
+	* coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
+	SEC_DATA.
+	(pmac_xcoff_vec): Likewise.
+	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
+	(aix5coff64_vec): Likewise.
+
+2002-08-22  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
+	param to elf_backend_copy_indirect_symbol.
+	(_bfd_elf_link_hash_copy_indirect): Likewise.
+	* elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
+	calls to copy_indirect_symbol.
+	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
+	* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
+	* elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+	* elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+	* elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+	* elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
+	test refcounts for "used" values.
+
+2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
+	argument declaration.
+
+2002-08-19  Elena Zannoni <ezannoni@redhat.com>
+ 
+        * archures.c (bfd_mach_ppc_e500): Added.
+        * bfd-in2.h: Rebuilt.
+	* cpu-powerpc.c (bfd_powerpc_archs): Added e500.
+
+2002-08-19  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf32-m68hc12.c (elf_backend_can_gc_sections): False.
+
+2002-08-17  Andrew Cagney  <ac131313@redhat.com>
+
+	* elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
+ 	`bfd_byte'.
+
+2002-08-17  Stan Cox  <scox@redhat.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
+	IRIX 6 segment layout for NEWABI.
+
+2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
+
+	* bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
+	symbols when looking for section referred to by a relocation.
+	* bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
+	
+2002-08-15  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf32-i370.c: Move reloc enum to include/elf/i370.h.
+
+2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
+
+	* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
+	missing check for whether the symbol is referenced by DSO before
+	unexporting it as an unneeded dynamic symbol.
+
+2002-08-14  H.J. Lu <hjl@gnu.org>
+
+	* libbfd.h: Regenerate.
+
+2002-08-14  H.J. Lu <hjl@gnu.org>
+
+	* config.bfd: Always add 64bit vectors to 32bit Linux/mips.
+
+2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
+	instructions.
+	(m68hc11_direct_relax): New to define table of relaxable instructions.
+	(find_relaxable_insn): New, find a relaxable insn.
+	(compare_reloc): New to compare two relocs.
+	(m68hc11_elf_relax_section): New, relax text sections.
+	(m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
+	(elf32_m68hc11_check_relocs): New function for GC support.
+	(elf32_m68hc11_relocate_section): New function for GC support.
+	(bfd_elf32_bfd_relax_section): Define to support linker relaxation.
+	(elf_backend_check_relocs): Likewise.
+	(elf_backend_relocate_section): Likewise.
+
+2002-08-13  H.J. Lu <hjl@gnu.org>
+
+	* elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
+	definitions in shared objects when checking symbol with
+	undefined version.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
+	(elf32_m68hc11_gc_sweep_hook): Likewise.
+	(elf_backend_gc_mark_hook): Define for GC section support.
+	(elf_backend_gc_sweep_hook): Likewise.
+	(elf_backend_can_gc_sections): Likewise.
+
+	* elf32-m68hc12.c: Likewise.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
+	(_bfd_m68hc11_elf_merge_private_bfd_data): New function.
+	(_bfd_m68hc11_elf_set_private_flags): New function.
+	Use them to set/check/print ELF flags specific to 68HC11.
+
+	* elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
+	(_bfd_m68hc12_elf_merge_private_bfd_data): New function.
+	(_bfd_m68hc12_elf_set_private_flags): New function.
+	Use them to set/check/print ELF flags specific to 68HC12.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
+	fix masks for PC-rel relocs.
+	(m68hc11_elf_ignore_reloc): New function.
+
+	* elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
+	68HC12 banked addressing relocs.
+	(m68hc12_phys_addr): New to compute physical address of banked memory.
+	(m68hc12_phys_page): Likewise for page.
+	(m68hc12_addr_is_banked): New to see if address is in banked area.
+	(elf_m68hc12_howto_table): Add new relocs and rename to xx12.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
+	BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
+	BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
+	* bfd-in2.h: Regenerate.
+
+2002-08-12  H.J. Lu <hjl@gnu.org>
+
+	* elflink.h (elf_add_default_symbol): Preserve section across
+	elf_merge_symbol.
+
+2002-08-09  Graeme Peterson  <gp@qnx.com>
+
+	* Makefile.am: Add entries for elf32-ppcqnx.c, and add 
+	elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
+	* Makefile.in: Regenerate.
+	* config.bfd: Add support for powerpc{le}-*-nto targets.
+	* configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
+	* configure: Regenerate.
+	* elf32-i386qnx.c: Moved backend functions into a QNX specific
+	common file "elf32-qnx.h", and now include that file.
+	* elf32-qnx.h: New file: QNX specific common elf backend.
+	* elf32-ppc.c: Do not include elf32-target.h if
+	ELF32_PPC_C_INCLUDED is defined.
+	* elf32-ppcqnx.c: New file: Support for QNX.
+	* elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
+	* targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
+
+2002-08-09  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
+	g->global_gotsym is NULL.
+
+2002-08-08  H.J. Lu <hjl@gnu.org>
+
+	* elflink.h (elf_add_default_symbol): Don't warn if a definition
+	overrides an indirect versioned symbol.
+
+2002-08-08  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
+	for R_386_TLS_TPOFF32 relocs against symndx 0.
+
+2002-08-07  H.J. Lu <hjl@gnu.org>
+
+	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
+	with undefined version if needed.
+	(elf_link_assign_sym_version): Match a default symbol with a
+	version without definition. No need to hide the default
+	definition separately.
+
+2002-08-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h (elf_link_output_extsym): Don't output symbols from
+	SEC_EXCLUDE sections.
+
+	* aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
+
+2002-08-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
+	entries.
+
+2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
+	mismatch.
+
+2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (ABI_64_P): Remove superfluous check.
+
+2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elf32-mips.c (mips_reloc_map): Fix typo.
+
+2002-08-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
+
+2002-08-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
+
+2002-08-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* libxcoff.h: Use PARAMS on function declarations.
+	* coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
+	* coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
+
+	* coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
+	addend.
+	* coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
+
+2002-08-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* coff-rs6000.c: Formatting fixes.
+	(xcoff_calculate_relocation): Use PARAMS in declaration.
+	(xcoff_complain_overflow): Likewise.
+	(xcoff_ppc_relocate_section): Use old-style function pointer call.
+	(bfd_xcoff_backend_data): Remove useless comments.
+	(rs6000coff_vec): Likewise.
+	(bfd_pmac_xcoff_backend_data): Likewise.
+	(pmac_xcoff_vec): Likewise.
+
+	* coff64-rs6000.c: Formatting fixes.
+	(xcoff64_calculate_relocation): Use PARAMS in declaration.
+	(xcoff64_ppc_relocate_section): Use old-style function pointer call.
+	(bfd_xcoff_backend_data): Remove useless comments.
+	(rs6000coff64_vec): Likewise.
+	(bfd_xcoff_aix5_backend_data): Likewise.
+	(aix5coff64_vec): Likewise.
+
+2002-08-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* coff-rs6000.c (xcoff_howto_table): Revert some of last change to
+	mask entries.  Use complain_overflow_dont for R_REF.
+	(xcoff_reloc_type_ba): Revert last change.
+	(xcoff_reloc_type_br): Likewise.
+	(xcoff_reloc_type_crel): Likewise.
+	(xcoff_ppc_relocate_section): Likewise.
+	* coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
+	(xcoff64_ppc_relocate_section): Likewise.
+	(xcoff64_howto_table): Revert some of last change to mask entries.
+	Use complain_overflow_dont for R_REF.
+
+	* coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
+	relocs with bitsize == 16 have size = 1.
+	(xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
+	(xcoff_reloc_type_br): Likewise.
+	(xcoff_reloc_type_crel): Likewise.
+	(xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+	* coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
+	dst_mask adjustment.
+	(xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+	(xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
+	bitsize == 16 have size = 1.
+
+2002-08-01  Denis Chertykov  <denisc@overta.ru>
+
+	* elf32-ip2k.c: Processor manufacturer changed to Ubicom.
+	(struct misc): New field isymbuf. All free_* fields removed.
+	(symbol_value): Pass in internal syms. No need to swap syms in.
+	(ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
+	possibly cached info.
+	(tidyup_after_error): Removed.
+	(ip2k_elf_relax_section_pass1): Don't use removed fields of struct
+	misc. Use new field.
+	(adjust_all_relocations): Use internal syms. No need to swap syms
+	in and out.
+	(add_page_insn): Don't use removed fields of struct misc.
+
+2002-08-01  Nick Clifton  <nickc@redhat.com>
+
+	* elf32-arm.h: Revert previous delta.
+
+2002-08-01  Nick Clifton  <nickc@redhat.com>
+
+	* configure.in (AM_INIT_AUTOMAKE): Bump version number.
+	* configure: Regenerate.
+
+2002-07-31  H.J. Lu <hjl@gnu.org>
+
+	* config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
+	selected.
+
+2002-07-31  H.J. Lu <hjl@gnu.org>
+
+	* config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
+	is selected.
+
+2002-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
+	if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
+
+2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
+
+	* cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
+	There is no 8 byte relocation type for this architecture.
+	(do_ns32k_reloc): Use bfd_vma instead of native types.
+	(bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
+	returns void.
+	(_bfd_ns32k_put_displacement): Don't check for overflow. We can
+	rely on generic code to do that.
+	* aout-ns32k.c (howto_table): Add appropriate overflow detection
+	to all table entries.
+	(_bfd_ns32k_relocate_contents): put_data returns void.
+	* ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
+	(_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
+	return void.
+
+2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
+
+	* aoutx.h (aout_link_check_ar_symbols): Whether to include an
+	archive object is target dependant.
+
+2002-07-31  Adam Nemet  <anemet@lnxw.com>
+
+	* elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
+	(THUMB_PLT_ENTRY_SIZE): New macro.
+	(PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
+	(elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
+	ARM_PLT_ENTRY_SIZE.
+	(elf32_arm_plt_entry): Likewise.
+	(elf_backend_plt_header_size): Likewise.
+	(elf32_thumb_plt0_entry): New global.
+	(elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
+	into .plt.thumb.
+	(elf32_thumb_plt_entry): New global.
+	(elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
+	Thumb entries.  Set the bottom bit of the corresponding GOT entry
+	for a Thumb PLT entry.
+	(struct elf32_arm_plt_entry_info): New structure.
+	(struct elf32_arm_link_hash_entry, plt_info): New member of this
+	type.
+	(elf32_arm_link_hash_newfunc): Initialize new member.
+	(elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
+	relocations against the PLT.
+	(elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
+	first_rel_type if this is the first time we encounter the symbol.
+	(elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
+	Determine if relocation needs a PLT entry.  Set first_rel_type if
+	this is the first time we encounter the symbol
+	(elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
+	functions as well.
+	(elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
+	(elf32_arm_create_dynamic_sections): New function.  Create the
+	.plt.thumb section.
+	(elf_backend_create_dynamic_sections): Call it.
+
+2002-07-31  Nick Clifton  <nickc@redhat.com>
+
+	* bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
+	'alternative' in order to avoid shadowing global symbol of the
+	same name.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* libcoff.h: Regenerate.
+
+2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* Makefile.am: Add n32 ABI support.
+	* Makefile.in: Regenerate.
+	* config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
+	bit vectors for mips*-*-linux targets as optional.
+	* configure.in: Add n32 ABI vectors.
+	* configure: Regenerate.
+	* elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
+	* elfn32-mips.c: New file, n32 ABI support.
+	* targets.c: Add n32 ABI vectors.
+
+2002-07-30  Graeme Peterson  <gp@qnx.com>
+
+	* elfarmqnx-nabi.c: New file: Support for QNX.
+	* config.bfd: Add support for arm-*-nto target.
+	* configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
+	* configure: Regenerate.
+	* Makefile.am: Add entries for elfarmqnx-nabi.c.
+	* Makefile.in: Regenerate.
+	* elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
+	Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
+	* elfarm-nabi.c: Do not include elf32-arm.h if
+	ELFARM_NABI_C_INCLUDED is defined.
+	* targets.c: Add bfd_elf32_{big|little}armqnx_vec.
+
+2002-07-30  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2002-07-30  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
+
+2002-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+	* aoutx.h (some_aout_object_p): Clean up tdata properly on error.
+	* archive.c (bfd_generic_archive_p): Likewise.
+	* coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
+	(_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
+	* coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
+	(xcoff64_archive_p): Likewise.
+	(xcoff64_openr_next_archived_file): Likewise.
+	(xcoff64_archive_p): Clean up tdata properly on error.
+	* coffgen.c (coff_real_object_p): Likewise.
+	(coff_object_p): Release filehdr and opthdr.
+	* ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
+	* ieee.c (ieee_archive_p): Likewise.
+	* ihex.c (ihex_object_p): Likewise.
+	(ihex_mkobject): Always allocate tdata.
+	* peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
+	* srec.c (srec_mkobject): Always allocate tdata.
+	(srec_object_p): Clean up tdata properly on error.
+	(symbolsrec_object_p): Likewise.
+	* versados.c (versados_object_p): Likewise.
+	* vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
+	and bfd_realloc instead of realloc.
+	(add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
+	* vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
+	place of bfd_malloc, simplifying error freeing.  Free hash table too.
+	(vms_object_p): Clean up tdata on error.
+	(vms_mkobject): Don't complain on stderr if vms_initialize fails.
+	(vms_close_and_cleanup): Adjust for bfd_alloc use.
+
+2002-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+	* elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
+
+2002-07-26  Chris Demetriou  <cgd@broadcom.com>
+
+	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
+	flags into resulting BFD.
+
+2002-07-26  Alan Modra  <amodra@bigpond.net.au>
+
+	From John Reiser <jreiser@BitWagon.com>
+	* elf32-i386.c (elf_i386_link_hash_table_create): Clear
+	tls_ldm_got.refcount.
+
+2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elf64-mips.c: Update TODO comment.
+	(mips_elf64_higher_reloc,mips_elf64_highest_reloc,
+	mips_elf64_gprel16_reloca): Remove prototypes.
+	(mips16_jump_reloc,mips16_gprel_reloc): Add functions.
+	(UNUSED_RELOC): Replace by EMPTY_RELOC.
+	(mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
+	wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
+	R_MIPS_HIGHEST.
+	(mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
+	R_MIPS_GOT16. Remove wrong comments.
+	(elf_mips16_jump_howto,elf_mips16_gprel_howto,
+	elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
+	from elf32-mips.c.
+	(mips_elf64_hi16_reloc): Fix formatting.
+	(mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
+	(mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
+	Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
+	(mips_elf64_gprel16_reloc): Make static. Add check for
+	partial_inplace.
+	(mips_elf64_gprel16_reloca): Remove.
+	(mips_elf64_literal_reloc): New function.
+	(mips_elf64_gprel32_reloc): Fix formatting.
+	(mips_elf64_shift6_reloc): Fix comment. Make static.
+	(mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
+	elf32-mips.c.
+	(elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
+	elf32-mips.c
+	(bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
+	specific relocations.
+	(mips_elf64_rtype_to_howto): Enable GNU specific relocations.
+	(mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
+	(ELF_MAXPAGESIZE): Add comment.
+
+2002-07-25  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+	* po/es.po: Updated Spanish translation.
+	* po/fr.po: Updated French translation.
+
+2002-07-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
+	as elf_link_record_local_dynamic_symbol.
+	(_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
+	(elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
+	* elflink.h (elf_link_record_local_dynamic_symbol): Move to..
+	* elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
+	attempt is made to record a symbol in a discarded section, and
+	return `2' in that case.
+
+2002-07-24  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+	* po/es.po: Updated Spanish translation.
+
+2002-07-23  Alan Modra  <amodra@bigpond.net.au>
+
+	* po/SRC-POTFILES.in: Regenerate.
+
+	* elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
+	immediately.  Remove code handling relocatable linking.
+	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
+	* elf32-cris.c (cris_elf_relocate_section): Likewise.
+	* elf32-fr30.c (elf32_frv_relocate_section): Likewise.
+	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
+	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+	* elf32-v850.c (v850_elf_relocate_section): Likewise.
+	* elf32-vax.c (elf_vax_relocate_section): Likewise.
+	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+	* elf32-avr.c (elf_backend_rela_normal): Define.
+	* elf32-cris.c: Likewise.
+	* elf32-fr30.c: Likewise.
+	* elf32-frv.c: Likewise.
+	* elf32-h8300.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-ip2k.c: Likewise.
+	* elf32-sparc.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf64-hppa.c: Likewise.
+	* elf64-sparc.c: Likewise.
+	* elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
+	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
+	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
+	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+	* elf-m10200.c (USE_RELA): Don't define.
+	* elf-m10300.c: Likewise.
+	* elfarm-oabi.c: Likewise.
+	* elf32-i370.c: Likewise.
+	* elf32-ip2k.c: Likewise.
+	* elf32-m68k.c: Likewise.
+	* elf32-mcore.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+	* elfxx-ia64.c: Likewise.
+	* elf32-avr.c (USE_REL): Don't undef.
+	* elf32-ip2k.c: Likewise.
+
+2002-07-23  Nick Clifton  <nickc@redhat.com>
+
+	* elf-bfd.h (struct elf_backend_data): Add new bitfield
+	'want_p_paddr_set_to_zero'.
+	* elfxx-target.h: Set default value for want_p_paddr_set_to_zero
+	to false;
+	* elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
+	* elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
+
+2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
+
+	* nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
+	the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
+	show the Copyright string.
+	Minor formatting tidy ups.
+
+2002-07-23  Nick Clifton  <nickc@redhat.com>
+
+	* po/fr.po: Updated French translation.
+	* po/sv.po: Updated Swedish translation.
+
+2002-07-23  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h (elf_link_input_bfd): Don't change internal symbols
+	when outputting relocs.
+
+2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
+	DT_PLTGOT into the dynamic section if there is a PLT.
+
+2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
+	elf32-mips.c.
+	(_bfd_mips_elf_write_section): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
+	(_bfd_mips_elf_write_section): Likewise.
+	* elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
+	(elf32_mips_write_section): Likewise.
+	* elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
+	(_bfd_mips_elf_write_section): Likewise.
+
+2002-07-19  Alan Modra  <amodra@bigpond.net.au>
+
+	* elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
+	PT_IA_64_UNWIND segments for a given section.
+
+2002-07-17  H.J. Lu <hjl@gnu.org>
+
+	* Makefile.am: Fix a typo.
+	* Makefile.in: Regenerate.
+
+2002-07-15  Denis Chertykov  <denisc@overta.ru>
+	    Frank Ch. Eigler  <fche@redhat.com>
+	    Ben Elliston  <bje@redhat.com>
+	    Alan Lehotsky  <alehotsky@cygnus.com>
+	    John Healy  <jhealy@redhat.com>
+	    Graham Stott  <grahams@redhat.com>
+	    Jeff Johnston  <jjohnstn@redhat.com>
+
+	* Makefile.am: Add support for ip2k.
+	* Makefile.in: Regenerate.
+	* doc/Makefile.in: Regenerate.
+	* archures.c: Add support for ip2k.
+	* config.bfd: Add support for ip2k.
+	* configure.in: Add support for ip2k.
+	* configure: Regenerate.
+	* reloc.c: Add support for ip2k.
+	* targets.c: Add support for ip2k.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* cpu-ip2k.c: New file.
+	* elf32-ip2k.c: New file.
+
+2002-07-17  Ian Rickards  <irickard@arm.com>
+
+	* dwarf2.c (concat_filename): If we can't establish the directory
+	just return the filename.
+
+2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
+
+	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
+
+2002-07-16  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h: Formatting fixes, tidy prototypes.
+	(elf_link_assign_sym_version): Move common code out of loop.
+
+2002-07-16  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
+	reloc section size is zero.  Correct reloc output location.
+
+2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
+	the final type for the e_fsel selector when generating PA2.0W code.
+	(elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
+	relocations.
+
+2002-07-14  H.J. Lu <hjl@gnu.org>
+
+	* elflink.h (elf_link_assign_sym_version): Hide the default
+	definition if there is a hidden versioned definition.
+
+2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
+
+	* elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
+	dynamic reference test in assertion when initializing GOT with
+	static contents.  Just assert that there are either no dynamic
+	sections, the symbol is defined in the regular objects or that the
+	symbol is undef weak.  Tweak comment.
+	(elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
+	only if the symbol isn't defined in the program and isn't undef
+	weak.
+	(elf_cris_adjust_dynamic_symbol): Simplify condition for getting
+	rid of PLT entry: only do it if the symbol isn't defined in a DSO.
+	When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
+	(elf_cris_discard_excess_program_dynamics): Don't consider
+	ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
+
+2002-07-11  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf32-i386.c (elf_i386_relocate_section): Don't complain about
+	unresolved debugging relocs in dynamic applications.
+	* elf32-s390.c (elf_s390_relocate_section): Likewise.
+	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+	* elf64-s390.c (elf_s390_relocate_section): Likewise.
+	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
+2002-07-10  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (ONES): Define.
+	(ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
+	missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
+	in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
+
+	* elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
+	(ppc64_elf_set_private_flags): Delete.
+	(ppc64_elf_section_from_shdr): Delete.
+	(ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
+	(ppc64_elf_fake_sections): Delete.
+	(bfd_elf64_bfd_set_private_flags): Don't define.
+	(bfd_elf64_get_symbol_info): Likewise.
+	(elf_backend_section_from_shdr): Likewise.
+	(elf_backend_fake_sections): Likewise.
+
+2002-07-10  Marco Walther  <Marco.Walther@sun.com>
+
+	* elf.c: (assign_section_numbers) Set sh_entsize for .stab only
+	when not already set.
+	* elf64-sparc.c: (sparc64_elf_fake_sections): New function.
+	(elf_backend_fake_sections): Define.
+
+2002-07-10  Alan Modra  <amodra@bigpond.net.au>
+
+	* merge.c (_bfd_merge_section): Remove redundant output_section check.
+	Formatting.
+	(_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
+
+2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
+
+	* elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
+	NULL sym_hashes to just before use.
+	<case R_CRIS_32_GOTREL>: In test for local symbol, accept also
+	symbol with non-default visibility.
+	<case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
+	<case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
+	Ditto.
+	(cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
+	symbol with non-default visibility.
+	(cris_elf_check_relocs): At tests for local symbol before
+	increasing h->plt.refcount, also check for non-default
+	visibility.  Ditto when checking for local symbol to eliminate
+	pc-relative runtime relocs.
+
+2002-07-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf.c: Formatting.
+	(IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
+	(INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
+	(copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
+	segments.
+
+2002-07-07  Mark Mitchell  <mark@codesourcery.com>
+	    Alan Modra  <amodra@bigpond.net.au>
+
+	* cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
+	account the impact of relocation count overflow when computing
+	section offsets.
+	* coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
+	or not to apply the PE COFF reloc overflow handling.  Fix a
+	fencepost error in deciding whether or not to use that technique.
+
+2002-07-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
+	change type of locsyms.
+	(bfd_elf_get_elf_syms): Declare.
+	* elf.c (bfd_elf_get_elf_syms): New function.
+	(group_signature): Use bfd_elf_get_elf_syms.
+	(bfd_section_from_r_symndx): Likewise.
+	* elfcode.h (elf_slurp_symbol_table): Likewise.
+	* elflink.h (elf_link_is_defined_archive_symbol): Likewise.
+	(elf_link_add_object_symbols): Likewise.  Reorganise to increase
+	locality of various data structures.  Properly free internal relocs.
+	(elf_bfd_final_link): Properly free internal relocs.
+	(elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
+	(elf_link_input_bfd): Likewise.
+	(elf_gc_mark): Likewise.  Properly free internal relocs.
+	(elf_gc_sweep): Properly free internal relocs.
+	(elf_reloc_symbol_deleted_p): No need to swap syms in.
+	(elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
+	internal relocs.
+	* elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
+	Properly free possibly cached info.
+	(mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
+	(mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
+	symbol swapping code.
+	(mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
+	Properly free possibly cached info.
+	* elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
+	(mn10300_elf_relax_delete_bytes): Likewise.
+	(mn10300_elf_symbol_address_p): Likewise.
+	(mn10300_elf_get_relocated_section_contents): Likewise.
+	* elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
+	(elf32_h8_relax_delete_bytes): Likewise.
+	(elf32_h8_symbol_address_p): Likewise.
+	(elf32_h8_get_relocated_section_contents): Likewise.
+	* elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
+	(m32r_elf_relax_delete_bytes): Likewise.
+	(m32r_elf_get_relocated_section_contents): Likewise.
+	* elf32-sh.c (sh_elf_reloc_loop): Free section contents using
+	elf_section_data to determine whether cached.
+	(sh_elf_relax_section): As above for elf-m10200.c.
+	(sh_elf_relax_delete_bytes): Likewise.
+	(sh_elf_get_relocated_section_contents): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
+	* elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
+	reading of local syms.
+	* elf64-mmix.c (mmix_elf_relax_section): Likewise.
+	* elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
+	* elfxx-ia64.c (elfNN_ia64_relax_section): As above.
+	* elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
+	relocs.
+	* elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
+	free internal relocs and section contents.  Don't read symbols.
+	* elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
+	(elf32_hppa_size_stubs): Don't free local syms.
+	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
+	reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
+	possibly cached info.
+	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
+	* elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
+	* elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
+	all_local_syms.
+	(get_local_syms): Delete function.
+	(edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
+	on exit.
+	(ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
+
+2002-07-05  Jim Wilson  <wilson@redhat.com>
+
+	* syms.c (decode_section_type): New.
+	(bfd_decode_symclass): Call decode_section_type.
+
+2002-07-04  Jakub Jelinek  <jakub@redhat.com>
+
+	* merge.c (_bfd_merged_section_offset): Avoid accessing byte before
+	section content start.
+	Reported by Michael Schumacher <mike@hightec-rt.com>.
+
+2002-07-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* section.c (_bfd_strip_section_from_output):  Remove unnecessary
+	link order code.  Don't actually remove the output section here;
+	Just set a flag for the linker to do so.
+	* elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
+	sections when setting up output section dynsyms.
+
+2002-07-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
+	fudge.
+	* elf.c (bfd_section_from_shdr): Work around broken hpux shared
+	libs here instead.
+
+2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+	* elf64-s390.c (create_got_section): Set .got section alignment to
+	8 bytes.
+	(elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
+
+2002-07-02  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
+
+2002-07-01  Matt Thomas  <matt@3am-software.com>
+
+	* elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
+	to EF_VAX_*.
+
+2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (ABI_64_P): Fix comment.
+	(MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
+	new section names for N64 ABI.
+	(mips_elf_output_extsym): No special _gp_disp handling for NewABI.
+	(mips_elf_calculate_relocation): Code formatting.
+	(mips_elf_create_dynamic_relocation): Likewise.
+	(_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
+	(_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
+	(_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
+	in any NewABI.
+	(_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
+	for NewABI.
+	(_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
+	(_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
+	here, too.
+
+2002-07-01  Andreas Schwab  <schwab@suse.de>
+
+	* elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
+	R_X86_64_64 to R_X86_64_RELATIVE.
+
+2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
+	* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
+	Run "make dep-am".
+	* config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
+	host_aout_vec.
+	* configure.in (vaxbsd_vec): Add.
+	* targets.c (vaxbsd_vec): Add.
+	* Makefile.in: Rebuild.
+	* configure: Rebuild.
+	* po/SRC-POTFILES.in: Rebuild.
+
+2002-07-01  Alan Modra  <amodra@bigpond.net.au>
+
+	* elflink.h (elf_gc_mark): Pass in the section whose relocs we are
+	examining to gc_mark_hook, rather than the bfd.
+	(elf_gc_sections): Adjust.
+	* elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
+	* elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
+	* elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
+	* elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
+	* elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
+	* elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
+	* elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
+	* elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
+	* elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
+	* elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
+	* elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
+	* elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
+	* elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
+	* elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
+	* elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
+	* elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
+	* elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
+	* elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
+	* elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
+	* elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
+	* elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
+	* elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
+	* elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
+	* elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
+	* elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
+	redundant local sym tests.
+	* elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
+	(link_hash_newfunc): Init is_entry.
+	(ppc64_elf_copy_indirect_symbol): Copy is_entry.
+	(ppc64_elf_link_hash_table_create): Init all_local_syms.
+	(create_linkage_sections): Use bfd_make_section_anyway rather than
+	bfd_make_section.
+	(ppc64_elf_mark_entry_syms): New function.
+	(ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
+	up opd entry to function section map.
+	(ppc64_elf_gc_mark_hook): Special case opd section relocs, and
+	relocs that reference the opd section.
+	(edit_opd): New function.
+	(ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
+	(ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
+	(get_local_syms): Do so here.  Exit if we already have local syms.
+	Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
+	read local syms on non-ELF input.
+	(ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
+	than duplicating it's function here.  Adjust free of internal
+	relocs to suit.
+	(ppc64_elf_relocate_section): Adjust local syms in opd section.
+	* elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
+	* elf32-hppa.c (elf32_hppa_size_stubs): Call
+	_bfd_elf32_link_read_relocs rather than duplicating it's function
+	here.  Adjust free of internal relocs to suit.
+
+2002-07-01  Andreas Jaeger  <aj@suse.de>
+
+	* elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
+	are not allowed in shared libs code, enforce -fPIC.
+
+2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
+
+	* mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
+	trailing zero-sequences when there's previous left-over data.
+
+2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
+	(elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
+	and opd_rel_sec in order for starting rela section.  Check _raw_size.
+	(elf_backend_reloc_type_class): Define.
+
+2002-06-27  Kevin Buettner <kevinb@redhat.com>
+
+	* dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
+	DWARF2 formats.
+
+2002-06-27  Alan Modra  <amodra@bigpond.net.au>
+
+	* cpu-powerpc.c: Comment on ordering of arch_info.
+	* elf32-ppc.c (ppc_elf_object_p): New function.
+	(elf_backend_object_p): Define.
+	* elf64-ppc.c (ppc64_elf_object_p): New function.
+	(elf_backend_object_p): Define.
+
+2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
+	* configure: Regenerate.
+
+2002-06-25  Jason Eckhardt  <jle@rice.edu>
+
+	* dwarf2.c (decode_line_info): Check unit->addr_size
+	to read in the proper number of prologue bytes.
+
+2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* config.bfd (powerpc-*-aix5*): Only create a selvecs for
+	aix5coff64_vec if 64-bit bfd support has been enabled.
+	(powerpc64-*-aix5*): Only define if 64-bit bfd support has
+	been enabled.
+
+	* targets.c (_bfd_target_vector[]): Only include
+	aix5coff64_vec if 64-bit bfd support has been enabled.
+
+2002-06-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
+	* elf32-hppa.c (hppa_add_stub): Likewise.
+	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
+	* elflink.h (elf_add_default_symbol): Fix comment typo.
+	(elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
+	(elf_link_add_object_symbols): Likewise.
+	(elf_link_assign_sym_version): Likewise.
+	* hash.c (bfd_hash_lookup): Likewise.
+	* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
+	* section.c (bfd_get_unique_section_name): Likewise.
+	* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
+	* elf.c (_bfd_elf_make_section_from_phdr): Likewise.
+	(assign_section_numbers): Likewise.
+	(_bfd_elfcore_make_pseudosection): Likewise.
+	(elfcore_grok_lwpstatus): Likewise.
+	(elfcore_grok_win32pstatus): Likewise.
+	(elfcore_write_note): Constify input params.  Use PTR instead of
+	void *.  Include terminating NUL in namesz.  Correct padding.
+	Support NULL "name" param.  Use memcpy instead of strcpy.
+	(elfcore_write_prpsinfo): Constify input params.
+	(elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
+	(elfcore_write_lwpstatus): Likewise.
+	(elfcore_write_pstatus): Likewise.
+	(elfcore_write_prfpreg): Likewise.
+	(elfcore_write_prxfpreg): Likewise.
+	* elf-bfd.h (elfcore_write_note): Update declaration.
+	(elfcore_write_prpsinfo): Likewise.
+	(elfcore_write_prstatus): Likewise.
+	(elfcore_write_pstatus): Likewise.
+	(elfcore_write_prfpreg): Likewise.
+	(elfcore_write_prxfpreg): Likewise.
+	(elfcore_write_lwpstatus): Likewise.
+
+2002-06-25  Jason Eckhardt  <jle@rice.edu>
+
+	* ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
+	symbols of type stProc and stStaticProc.
+
+2002-06-25  Nick Clifton  <nickc@redhat.com>
+
+	* ecoff.c: VArious formatting fixes.
+
+2002-06-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
+
+2002-06-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* aout-adobe.c: Don't compare against "true" or "false.
+	* aout-target.h: Likewise.
+	* aoutx.h: Likewise.
+	* archive.c: Likewise.
+	* bout.c: Likewise.
+	* cache.c: Likewise.
+	* coff-a29k.c: Likewise.
+	* coff-alpha.c: Likewise.
+	* coff-i386.c: Likewise.
+	* coff-mips.c: Likewise.
+	* coff-or32.c: Likewise.
+	* coff64-rs6000.c: Likewise.
+	* coffcode.h: Likewise.
+	* coffgen.c: Likewise.
+	* cpu-ns32k.c: Likewise.
+	* ecoff.c: Likewise.
+	* ecofflink.c: Likewise.
+	* elf.c: Likewise.
+	* elf32-arm.h: Likewise.
+	* elf32-cris.c: Likewise.
+	* elf32-d30v.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-mcore.c: Likewise.
+	* elf32-ppc.c: Likewise.
+	* elf32-sh.c: Likewise.
+	* elf32-sh64.c: Likewise.
+	* elf32-v850.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-sh64.c: Likewise.
+	* elfcode.h: Likewise.
+	* elfcore.h: Likewise.
+	* elflink.h: Likewise.
+	* elfxx-mips.c: Likewise.
+	* i386os9k.c: Likewise.
+	* ieee.c: Likewise.
+	* libbfd.c: Likewise.
+	* linker.c: Likewise.
+	* mmo.c: Likewise.
+	* nlm32-alpha.c: Likewise.
+	* nlm32-i386.c: Likewise.
+	* nlm32-ppc.c: Likewise.
+	* nlm32-sparc.c: Likewise.
+	* nlmcode.h: Likewise.
+	* oasys.c: Likewise.
+	* pdp11.c: Likewise.
+	* peicode.h: Likewise.
+	* reloc.c: Likewise.
+	* som.c: Likewise.
+	* srec.c: Likewise.
+	* tekhex.c: Likewise.
+	* vms.c: Likewise.
+	* xcofflink.c: Likewise.
+	* elf64-sparc.c: Edit comment to not use "== false".
+
+	* aoutf1.h: Don't use "? true : false".
+	* ecoff.c: Likewise.
+	* format.c: Likewise.
+	* ieee.c: Likewise.
+	* linker.c: Likewise.
+	* mmo.c: Likewise.
+	* oasys.c: Likewise.
+
+2002-06-23  H.J. Lu  <hjl@gnu.org>
+
+	* elflink.h (elf_link_add_archive_symbols): For the default
+	version, check references with only one `@' first.
+
+2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
+	function.
+	(allocate_global_data_dlt):  Don't add millicode symbols to dynamic
+	symbol table.
+	(allocate_global_data_opd, allocate_dynrel_entries): Likewise.
+	(elf64_hppa_size_dynamic_sections): Revise to use
+	elf64_hppa_mark_milli_and_exported_functions.
+	(elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
+	symbols out of dynamic symbol table.
+
+2002-06-23  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.in: Regenerate.
+	* libbfd.h: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* configure: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+	* elflink.h: Comment typo fixes.
+
+2002-06-23  H.J. Lu  <hjl@gnu.org>
+
+	* elf-bfd.h (elf_link_loaded_list): New structure.
+	(elf_link_hash_table): Add "loaded".
+	* elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
+	* elflink.h (elf_link_check_versioned_symbol): New function.
+	(elf_link_output_extsym): Call elf_link_check_versioned_symbol.
+
+2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* elflink.h (size_dynamic_sections): If the target does not
+	support an ELF style hash table, return true, indicating that
+	nothing needed to be done, rather than false, indicating that the
+	section's size could not be computed.
+
+2002-06-18  Dave Brolley  <brolley@redhat.com>
+
+	From Catherine Moore, Michael Meissner, Dave Brolley:
+	* po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
+	* targets.c: Support bfd_elf32_frv_vec.
+	* reloc.c: Add FRV relocs.
+	* configure.in: Add support for bfd-elf32-frv-vec.
+	* config.bfd (targ_cpu): Add support for frv-*-elf.
+	* archures.c: Add frv arch and machines.
+	* Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
+	(ALL_MACHINES_CFILES): Add cpu-frv.c.
+	(BFD32_BACKENDS): Add elf32-frv.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-frv.c
+	(cpu-frv.lo): New target.
+	(elf32-frv.lo): New target.
+	* cpu-frv.c: New file.
+	* elf32-frv.c: New file.
+
+2002-06-18  Jakub Jelinek  <jakub@redhat.com>
+
+	* elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
+	e_shnum == 0.
+	Only read the first section header if e_shoff is non-zero.
+	Don't consider e_shstrndx if there are no sections.
+
+2002-06-17  Tom Rix <trix@redhat.com>
+
+	* elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
+	R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
+	complain_overflow_bitfield.
+
+2002-06-17  Alan Modra  <amodra@bigpond.net.au>
+
+	* opncls.c (bfd_openr): Remove redundant bfd_set_error.
+	(bfd_fdopenr): Likewise.
+	(bfd_openstreamr): Likewise.
+	(bfd_openw): Likewise.
+
+	* targets.c: Sort target vecs.
+	(_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
+	bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
+	bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
+	bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
+	* configure.in: Sort target vecs.  Add m88kmach3_vec.
+	* configure: Regenerate.
+
+2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
+
+	* elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
+	bpo_reloc_no to break sort order ties, not address of items.
+
+2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
+	Skip excluded sections in determing __gp value.
+	(elf_hppa_final_link_relocate): Use the symbol's address in
+	R_PARISC_FPTR64 relocations that don't need an opd entry.
+	* elf64-hppa.c (allocate_dynrel_entries): Simplify code.
+	(elf64_hppa_finalize_dynreloc): Likewise.
+	(elf64_hppa_size_dynamic_sections): Move comments and fix typo.
+	(elf64_hppa_finish_dynamic_symbol): Break up assert.
+
+2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
+
+	* pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
+	alignment for .bss, .data and .text sections so that sse and sse2
+	code will work.
+	* pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
+
+	config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
+	sh[1234]*-elf*.
+
+2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+	* elflink.h (elf_bfd_final_link): Improve error handling for missing
+	dynamic sections.
+
+	* elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
+	for a symbol that has no output section.
+	(allocate_dynrel_entries): Correct comment.
+	(elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
+	unless we want one.
+	(elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
+	(elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
+	with no section.  Remove unnecessary parentheses.
+
+2002-06-11  Tom Rix  <trix@redhat.com>
+
+	* coffcode.h (coff_compute_section_file_positions): Add data
+	section to AIX loader alignment check.
+
+	* coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
+	alignment to 4 bytes.
+	(_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
+	power accessor macro.
+	(do_shared_object_padding): Remove invalid assertion.
+
+2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
+
+	* section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
+	for removed output sections.
+
+2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
+
+	* merge.c (merge_strings): Use htab_create_alloc with calloc, not
+	htab_alloc.
+	* elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
+
+2002-06-08  H.J. Lu <hjl@gnu.org>
+
+	* elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
+	work around a long long bug in gcc 2.96 on mips.
+
+2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
+	(BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
+	Regenerate dependency lists.
+	* Makefile.in: Regenerate.
+	* config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
+	vax1knetbsd_vec to targ_selvecs.
+	* configure.in: Add vax1knetbsd_vec.
+	* configure: Regenerate.
+	* targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
+	* vax1knetbsd.c: New file.
+	* vaxnetbsd.c: Update copyright years.
+	(TARGET_PAGE_SIZE): Set to 0x1000.
+	(DEFAULT_MID): Set to M_VAX4K_NETBSD.
+
+2002-06-08  Matt Thomas  <matt@3am-software.com>
+
+	* libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
+
+2002-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
+
+2002-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am: Run "make dep-am".
+	* Makefile.in: Regenerate.
+
+	* armnetbsd.c: Replace CONST with const.
+	* corefile.c: Likewise.
+	* elf32-dlx.c: Likewise.
+	* elf64-mips.c: Likewise.
+	* mmo.c: Likewise.
+	* ns32knetbsd.c: Likewise.
+
+	* elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
+	table is elf64-sparc.
+
+2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
+	Fix RELA addends to get not shifted in the result. Don't do special
+	handling of R_MIPS_64 for NewABI.
+
+2002-06-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
+	(NAME(aout,slurp_reloc_table)): Likewise.
+	* coff-mips.c (mips_relax_section): Use bfd_zalloc.
+	* coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
+	(xcoff_write_archive_contents_big): Likewise.
+	(xcoff_generate_rtinit): Likewise.
+	(xcoff_generate_rtinit): Likewise, and check error return.
+	* coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
+	* coffgen.c (coff_section_symbol): Use bfd_zalloc.
+	(coff_get_normalized_symtab): Likewise.
+	(coff_make_empty_symbol): Likewise.
+	(bfd_coff_set_symbol_class): Likewise.
+	* cofflink.c (coff_link_add_symbols): Likewise.
+	* ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
+	* ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
+	(bfd_ecoff_write_accumulated_debug): Likewise.
+	* elf64-alpha.c (get_got_entry): Use bfd_zalloc.
+	* i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
+	* i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
+	* ieee.c (do_with_relocs): Use bfd_zalloc.
+	* m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
+	* pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
+	(NAME(aout,slurp_reloc_table)): Likewise.
+	(NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
+	* reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
+	* som.c (som_build_and_write_symbol_table): Likewise.
+	(som_slurp_string_table): Likewise.
+	(som_slurp_symbol_table): Likewise.
+	(som_bfd_ar_write_symbol_stuff): Likewise.
+	* sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
+	* sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
+	* tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
+	* vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
+	* xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
+
+2002-06-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
+	"group" union.
+	(elf_group_name): Update.
+	(elf_group_id): Define.
+	(bfd_elf_set_group_contents): Declare.
+	* elf.c (elf_fake_sections): Qualify use of elf_group_name.
+	(set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
+	ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
+	that sym for the signature.
+	(_bfd_elf_compute_section_file_positions): Don't call
+	set_group_contents for "ld -r" case.
+	(swap_out_syms): Use bfd_zalloc.
+	* elflink.h (elf_link_add_archive_symbols): Likewise.
+	(NAME(bfd_elf,size_dynamic_sections)): Likewise.
+	(elf_bfd_final_link): Call bfd_elf_set_group_contents.
+
+2002-06-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
+	relocs in opd for non-shared too.
+
+2002-06-06  Jeffrey Law <law@redhat.com
+
+	* elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
+	relocations.
+
+2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* merge.c: Include libiberty.h.
+	* elf-strtab.c: Include libiberty.h.
+
+2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
+
+	* peXXigen.c (pe_print_idata): Remove unused variable.
+
+2002-06-06  David Heine <dlheine@tensilica.com>
+
+	* elf.c (assign_file_positions_for_segments): Remove unallocated
+	sections from the section to segment mapping for PT_LOAD segments.
+	Update comment about empty loadable segments.
+
+2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
+
+	* stabs.c (_bfd_link_section_stabs): Check that the symbol offset
+	is within the .stabstr section.
+
+2002-06-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
+	are "const PTR", not "const PTR *".
+	(bfd_elf32_swap_symbol_in): Likewise.
+	(bfd_elf64_swap_symbol_in): Likewise.
+	* elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
+	(elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
+	* elflink.h (elf_link_is_defined_archive_symbol): Likewise.
+	(elf_link_add_object_symbols): Likewise.
+	(elf_link_record_local_dynamic_symbol): Likewise.
+	(elf_link_input_bfd): Likewise.
+	(elf_gc_mark): Likewise.
+	(elf_reloc_symbol_deleted_p): Likewise.
+	* elf-m10200.c (mn10200_elf_relax_section): Likewise.
+	(mn10200_elf_relax_delete_bytes): Likewise.
+	(mn10200_elf_symbol_address_p): Likewise.
+	(mn10200_elf_get_relocated_section_contents): Likewise.
+	* elf-m10300.c (mn10300_elf_relax_section): Likewise.
+	(mn10300_elf_relax_section): Likewise.
+	(mn10300_elf_relax_delete_bytes): Likewise.
+	(mn10300_elf_symbol_address_p): Likewise.
+	(mn10300_elf_get_relocated_section_contents): Likewise.
+	* elf32-h8300.c (elf32_h8_relax_section): Likewise.
+	(elf32_h8_relax_delete_bytes): Likewise.
+	(elf32_h8_symbol_address_p): Likewise.
+	(elf32_h8_get_relocated_section_contents): Likewise.
+	* elf32-hppa.c (get_local_syms): Likewise.
+	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
+	* elf32-sh.c (sh_elf_relax_section): Likewise.
+	(sh_elf_relax_delete_bytes): Likewise.
+	(sh_elf_get_relocated_section_contents): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
+	* elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+	* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+	* elf64-mmix.c (mmix_elf_relax_section): Likewise.
+	* elf64-ppc.c (get_local_syms): Likewise.
+	* elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+
+2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
+
+2002-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf.c (group_signature): Swap in the whole symbol, and handle
+	extracting section symbol names.
+	(setup_group): Add comment.
+	(set_group_contents): When called from objcopy or ld, arrange for
+	section contents to be written.  Write group member output section
+	indices to allow objcopy to reorganize sections.
+	(_bfd_elf_copy_private_section_data): Copy group info.
+
+	* elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
+	(bfd_elf32_swap_symbol_in): Update prototype.
+	(bfd_elf64_swap_symbol_in): Likewise.
+	* elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
+	(elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
+	* elflink.h (elf_link_is_defined_archive_symbol): Likewise.
+	(elf_link_add_object_symbols): Likewise.
+	(elf_link_record_local_dynamic_symbol): Likewise.
+	(elf_link_input_bfd): Likewise.
+	(elf_gc_mark): Likewise.
+	(elf_reloc_symbol_deleted_p): Likewise.
+	* elf-m10200.c (mn10200_elf_relax_section): Likewise.
+	(mn10200_elf_relax_delete_bytes): Likewise.
+	(mn10200_elf_symbol_address_p): Likewise.
+	(mn10200_elf_get_relocated_section_contents): Likewise.
+	* elf-m10300.c (mn10300_elf_relax_section): Likewise.
+	(mn10300_elf_relax_section): Likewise.
+	(mn10300_elf_relax_delete_bytes): Likewise.
+	(mn10300_elf_symbol_address_p): Likewise.
+	(mn10300_elf_get_relocated_section_contents): Likewise.
+	* elf32-h8300.c (elf32_h8_relax_section): Likewise.
+	(elf32_h8_relax_delete_bytes): Likewise.
+	(elf32_h8_symbol_address_p): Likewise.
+	(elf32_h8_get_relocated_section_contents): Likewise.
+	* elf32-hppa.c (get_local_syms): Likewise.
+	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
+	* elf32-sh.c (sh_elf_relax_section): Likewise.
+	(sh_elf_relax_delete_bytes): Likewise.
+	(sh_elf_get_relocated_section_contents): Likewise.
+	* elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
+	* elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+	* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+	* elf64-mmix.c (mmix_elf_relax_section): Likewise.
+	* elf64-ppc.c (get_local_syms): Likewise.
+	* elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+	* elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
+	* elf64-alpha.c (alpha_elf_size_info): Likewise.
+	* elf64-hppa.c (hppa64_elf_size_info): Likewise.
+	* elf64-mips.c (mips_elf64_size_info): Likewise.
+	* elf64-s390.c (s390_elf64_size_info): Likewise.
+	* elf64-sparc.c (sparc64_elf_size_info): Likewise.
+
+2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
+
+	* elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
+	elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
+	elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
+	_bfd_mips_elf_ignore_discarded_relocs.
+	elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
+
+2002-06-05  H.J. Lu <hjl@gnu.org>
+
+	* elfxx-mips.c (mips_elf_calculate_relocation): Call
+	_bfd_elf_rel_local_sym for STT_SECTION relocations against
+	the SEC_MERGE section.
+
+2002-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+	* coff-alpha.c: Update copyright date.
+	* coff-mips.c: Likewise.
+	* xcoff-target.h: Likewise.
+
+	* bfd-in.h: Remove "taken from the source" comment.
+	* libbfd-in.h: Likewise.
+	* libcoff-in.h: Likewise.
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* libcoff.h: Regenerate.
+
+	* elf.c (bfd_elf_discard_group): Return true.
+	* elf-bfd.h (bfd_elf_discard_group): Declare.
+	* bfd-in.h (bfd_elf_discard_group): Don't declare here.
+	* section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
+	* bfd.c (bfd_discard_group): Define.
+	* targets.c (struct bfd_target): Add _bfd_discard_group.
+	(BFD_JUMP_TABLE_LINK): Here too.
+	* libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
+	* aout-adobe.c (aout_32_bfd_discard_group): Define.
+	* aout-target.h (MY_bfd_discard_group): Define.
+	* aout-tic30.c (MY_bfd_discard_group): Define.
+	* binary.c (binary_bfd_discard_group): Define.
+	* bout.c (b_out_bfd_discard_group): Define.
+	* coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
+	* coffcode.h (coff_bfd_discard_group): Define.
+	* coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
+	* elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
+	* i386msdos.c (msdos_bfd_discard_group): Define.
+	* i386os9k.c (os9k_bfd_discard_group): Define.
+	* ieee.c (ieee_bfd_discard_group): Define.
+	* ihex.c (ihex_bfd_discard_group): Define.
+	* mmo.c (mmo_bfd_discard_group): Define.
+	* nlm-target.h (nlm_bfd_discard_group): Define.
+	* oasys.c (oasys_bfd_discard_group): Define.
+	* ppcboot.c (ppcboot_bfd_discard_group): Define.
+	* som.c (som_bfd_discard_group): Define.
+	* srec.c (srec_bfd_discard_group): Define.
+	* tekhex.c (tekhex_bfd_discard_group): Define.
+	* versados.c (versados_bfd_discard_group): Define.
+	* vms.c (vms_bfd_discard_group): Define.
+	* xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
+	* coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
+	(aix5coff64_vec): Likewise.
+	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
+
+2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
+	(elf32-sh64-com.lo): New dependency list.
+	* Makefile.in: Regenerate.
+	* configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
+	(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
+	elf32-sh64-com.lo.
+	* configure: Regenerate.
+	* elf32-sh64.c (sh64_address_in_cranges)
+	(sh64_get_contents_type, sh64_address_is_shmedia): Move to...
+	(crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
+	(crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
+	* elf32-sh64-com.c: ...here.  New file.
+
+2002-06-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
+	ATTRIBUTE_UNUSED on used params.
+	* elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
+	before calling bfd_section_from_elf_index on local syms.
+	* elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
+
+2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
+	(BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
+	(BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
+	(elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
+	* Makefile.in: Regenerate.
+	* config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
+	(sh64-*-netbsd*): New targets.
+	* configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
+	bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
+	* configure: Regenerate.
+	* elf32-sh64-nbsd.c: New file.
+	* elf64-sh64-nbsd.c: New file.
+	* targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
+	bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
+	bfd_elf64_sh64lnbsd_vec.
+
+2002-06-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
+	(bfd_section_from_shdr): Likewise.  Set section name of group
+	sections from signature.
+	(group_signature): Split out from setup_group.  Ensure symbol table
+	is available.
+	(bfd_elf_discard_group): New function.
+	(_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
+	.gnu.linkonce* sections if they are members of a group.
+	(set_group_contents): Set GRP_COMDAT flag.
+	* section.c (bfd_discard_group): New function.
+	* bfd-in.h (bfd_elf_discard_group): Declare.
+	* bfd-in2.h: Regenerate.
+	* elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
+	(elf_linkonce_p): Define.
+
+2002-06-04  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf.c (bfd_section_from_shdr): Make "name" const.
+	* elf-bfd.h (elf_backend_section_from_shdr): Likewise.
+	* elf32-i370.c (i370_elf_section_from_shdr): Likewise.
+	* elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
+	* elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
+	* elf32-v850.c (v850_elf_section_from_shdr): Likewise.
+	* elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
+	* elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
+	* elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
+	* elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
+	* elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
+	* elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
+
+2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
+
+	* elfxx-mips.c (ABI_64_P): Use backend's data to determine the
+	ABI.
+
+2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* elf32-arc.c: Fix formatting.
+	* elf32-arm.h: Likewise.
+	* elf32-cris.c: Likewise.
+	* elf32-dlx.c: Likewise.
+	* elf32-hppa.c: Likewise.
+	* elf32-i386.c: Likewise.
+	* elf32-i386qnx.c: Likewise.
+	* elf32-or32.c: Likewise.
+	* elf32-s390.c: Likewise.
+	* elf32-sh64.c: Likewise.
+	* elf32-vax.c: Likewise.
+	* elf32-xstormy16.c: Likewise.
+	* elf64-alpha.c: Likewise.
+	* elf64-mmix.c: Likewise.
+	* elf64-ppc.c: Likewise.
+	* elf64-s390.c: Likewise.
+	* elf64-sh64.c: Likewise.
+	* elf64-x86-64.c: Likewise.
+
+2002-06-02  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
+	null when there are no got entries for a symbol.
+	(elf64_alpha_relax_find_tls_segment): Rearrange to avoid
+	uninitialized variable warning.
+
+2002-06-01  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
+	undefined symbols here.
+	(elf64_alpha_relax_section): Do it here.  Also test for not
+	defined in the current module.
+	(elf64_alpha_relocate_section_r): Split out of ...
+	(elf64_alpha_relocate_section): ... here.  Don't dereference
+	NULL when looking up local got entries.
+
+2002-06-01  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
+	symbols from JSR relaxation.
+	(elf64_alpha_size_plt_section_1): New.
+	(elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
+	(elf64_alpha_size_rela_got_1): ... here.
+	(elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
+	(elf64_alpha_size_rela_got_section): ... here.
+	(elf64_alpha_size_plt_section): New.
+	(elf64_alpha_relax_section): Call them.
+	(elf64_alpha_size_got_sections): Remove output_bfd arg.
+	(elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
+
+2002-06-01  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
+	(elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
+	in shared libraries.  Fix DTPRELHI and TPRELHI value.
+	(INSN_ADDQ, INSN_RDUNIQ): New.
+	(struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
+	(elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
+	argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
+	(elf64_alpha_relax_got_load): Rename from relax_without_lituse.
+	Handle GOTDTPREL and GOTTPREL relocations.
+	(elf64_alpha_relax_gprelhilo): New.
+	(elf64_alpha_relax_tls_get_addr): New.
+	(elf64_alpha_relax_find_tls_segment): New.
+	(elf64_alpha_relax_section): Handle TLS relocations.
+	(ALPHA_ELF_LINK_HASH_TLS_IE): New.
+	(elf64_alpha_check_relocs): Set it.
+
+2002-06-01  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
+
+	* elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
+	check; don't suppress dynamic relocs for non-allocated sections.
+
+	* elf64-alpha.c: Remove dead code.
+
+2002-05-31  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfd-in2.h: Regenerate.
+	* libbfd.h: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+	* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
+	space for bss .plt.
+
+2002-05-31  Graeme Peterson  <gp@qnx.com>
+
+	* Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
+	Run "make dep-am".
+	* Makefile.in: Regenerate.
+	* config.bfd: Add i[3456]86-*-nto-qnx* support.
+	* configure.in: Add bfd_elf32_i386qnx_vec support.
+	* configure: Regenerate.
+	* elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
+	is_contained_by_filepos, and copy_private_bfd_data_p.
+	* elf.c (assign_file_positions_for_segments): Call backend
+	set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
+	(IS_CONTAINED_BY_FILEPOS): Define.
+	(INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
+	(copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
+	Fix non-K&R call to _bfd_error_handler.
+	(_bfd_elf_copy_private_section_data): Use backend
+	copy_private_bfd_data_p.
+	* elf32-i386.c: Don't include elfxx-target.h when
+	ELF32_I386_C_INCLUDED is defined.
+	* elf32-i386qnx.c: New QNX elf backend file.
+	* elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
+	elf_backend_is_contained_by_filepos, and
+	elf_backend_do_copy_private_bfd_data.
+	* targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
+
+2002-05-31  Alan Modra  <amodra@bigpond.net.au>
+
+	* elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
+	Move other similar defines to start of file.
+
+2002-05-30  Tom Rix  <trix@redhat.com>
+
+	* coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
+	* coff64-rs6000.c (xcoff64_rtype2howto): Same.
+
+2002-05-30  Richard Henderson  <rth@redhat.com>
+
+	* elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
+	ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
+	(ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
+	(ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
+	(struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
+	(struct alpha_elf_obj_tdata): Rename total_got_entries and
+	n_local_got_entries to total_got_size and local_got_size.
+	(elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
+	(alpha_got_entry_size): New.
+	(elf64_alpha_relax_with_lituse): Use it.
+	(elf64_alpha_relax_without_lituse): Likewise.
+	(MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
+	(get_got_entry): New.
+	(elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
+	(elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
+	(elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
+	(elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
+	(elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
+	(elf64_alpha_calc_got_offsets): Likewise.
+	(alpha_dynamic_entries_for_reloc): New.
+	(elf64_alpha_calc_dynrel_sizes): Use it.
+	(elf64_alpha_size_dynamic_sections): Likewise.
+	(elf64_alpha_relocate_section): Handle TLS relocations.
+	* reloc.c: Add Alpha TLS relocations.
+	* bfd-in2.h, libbfd.h: Rebuild.
+
+2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
+
+	* peXXigen.c (pe_print_idata): Remove double printed
+	import table lines; add Bound-To comment.
+
+2002-05-29  Matt Thomas  <matt@3am-software.com>
+
+	* Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
+	(BFD32_BACKENDS_CFILES): Add elf32-vax.c.
+	(elf32-vax.lo): New rule.
+	* Makefile.in: Regenerate.
+	* configure.in (bfd_elf32_vax_vec)
+	(vaxnetbsd_vec): New vectors.
+	* configure: Regenerate.
+	* config.bfd (vax-*-netbsdelf*)
+	(vax-*-netbsdaout*)
+	(vax-*-netbsd*): New targets.
+	* elf32-vax.c: New file.
+	* reloc.c: Add VAX relocations.
+	* bfd-in2.h: Regenerate.
+	* targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
+
+2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
+	and bfd_elf32_bigarm_vec to targ_selvecs.
+
+2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
+
+	* peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
+	with auto-imported symbols.
+
+2002-05-29  Adam Nemet  <anemet@lnxw.com>
+
+	* elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
+	sections only record bfd.
+	(bfd_elf32_arm_add_glue_sections_to_bfd): New function.
+	* bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
+	* bfd-in2.h: Regenerate.
+
+2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* syms.c (_bfd_stab_section_find_nearest_line): Move
+	declaration and initialisation of saw_line and saw_func out of
+	for loop.
+
+2002-05-29  Alan Modra  <amodra@bigpond.net.au>
+
+	* elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
+	(bfd_elf64_get_symbol_info): Define.
+	* elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
+
+2002-05-29  Andrey Volkov  <avolkov@transas.com>
+
+	* cpu-h8300.c: Make default h8300 machine first in machine list.
+
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 	* config.bfd: Added DLX configuraton.
@@ -120,7 +2056,7 @@
 
 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
-	* bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
+	* bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
 	non-ELF targets.
 
 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
@@ -309,7 +2245,7 @@
 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
 
 	* elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
-	addend in 2002-05-09 commit.
+	added in 2002-05-09 commit.
 
 	* elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
 	don't look for stubs on all undefined syms.
@@ -566,7 +2502,7 @@
 
 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
 
-	* bfd/config.bfd: Add support for powerpc-*-windiss.
+	* config.bfd: Add support for powerpc-*-windiss.
 
 2002-04-30  Tom Rix  <trix@redhat.com>
 
@@ -2216,7 +4152,7 @@
 
 2002-01-25  Steve Ellcey <sje@cup.hp.com>
 
-	* bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
+	* elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
 
 2002-01-25  Philipp Thomas  <pthomas@suse.de>
 
@@ -2250,8 +4186,7 @@
 
 2002-01-23  Steve Ellcey <sje@cup.hp.com>
 
-	* bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
-	DEFAULT_VECTOR.
+	* targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
 	(bfd_elf64_ia64_hpux_big_vec): Ditto.
 	(bfd_elf32_h8300_vec): Ditto.
 
diff --git a/bfd/ChangeLog-0001 b/bfd/ChangeLog-0001
index 3000c03..b5a3475 100644
--- a/bfd/ChangeLog-0001
+++ b/bfd/ChangeLog-0001
@@ -1514,7 +1514,7 @@
 
 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
 
-	* bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
+	* config.bfd (targ_cpu): Add arm9e-*-elf.
 
 2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
 
@@ -2858,13 +2858,13 @@
 2001-08-31  Eric Christopher  <echristo@redhat.com>
 	    Jason Eckhardt  <jle@redhat.com>
 
-	* bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
+	* archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
 	mips32_4k and mips64.
-	* bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
+	* aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
 	bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
-	* bfd/cpu-mips.c: Ditto.
-	* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
-	* bfd/bfd-in2.h: Regenerate.
+	* cpu-mips.c: Ditto.
+	* elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
+	* bfd-in2.h: Regenerate.
 
 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
 
@@ -3726,7 +3726,7 @@
 
 2001-07-04  H.J. Lu  <hjl@gnu.org>
 
-	* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
+	* elf32-mips.c (_bfd_mips_elf_final_write_processing):
 	Handle bfd_mach_mips4400, bfd_mach_mips4600 and
 	bfd_mach_mips5000.
 
@@ -4529,7 +4529,7 @@
 
 	* elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
 	about overflow in R_OPENRISC_LO_16_IN_INSN and
-	R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
+	R_OPENRISC_HI_16_IN_INSN.
 
 2001-04-30  H.J. Lu  <hjl@gnu.org>
 
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index e8e0cc0..d945dc3 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -58,6 +58,7 @@
 	cpu-d30v.lo \
 	cpu-dlx.lo \
 	cpu-fr30.lo \
+	cpu-frv.lo \
 	cpu-h8300.lo \
 	cpu-h8500.lo \
 	cpu-hppa.lo \
@@ -66,6 +67,7 @@
 	cpu-i386.lo \
 	cpu-i860.lo \
 	cpu-i960.lo \
+	cpu-ip2k.lo \
 	cpu-m32r.lo \
 	cpu-m68hc11.lo \
 	cpu-m68hc12.lo \
@@ -107,6 +109,7 @@
 	cpu-d30v.c \
 	cpu-dlx.c \
 	cpu-fr30.c \
+	cpu-frv.c \
 	cpu-h8300.c \
 	cpu-h8500.c \
 	cpu-hppa.c \
@@ -115,6 +118,7 @@
 	cpu-i386.c \
 	cpu-i860.c \
 	cpu-i960.c \
+	cpu-ip2k.c \
 	cpu-m32r.c \
 	cpu-m68hc11.c \
 	cpu-m68hc12.c \
@@ -196,20 +200,24 @@
 	elf32-arc.lo \
 	elfarm-oabi.lo \
 	elfarm-nabi.lo \
+	elfarmqnx-nabi.lo \
 	elf32-avr.lo \
 	elf32-cris.lo \
 	elf32-d10v.lo \
 	elf32-d30v.lo \
 	elf32-dlx.lo \
 	elf32-fr30.lo \
+	elf32-frv.lo \
 	elf32-gen.lo \
 	elf32-h8300.lo \
 	elf32-hppa.lo \
 	elf32-i370.lo \
 	elf32-i386.lo \
+	elf32-i386qnx.lo \
 	elf32-i860.lo \
 	elf32-i960.lo \
 	elf32-ia64.lo \
+	elf32-ip2k.lo \
 	elf32-m32r.lo \
 	elf32-m68hc11.lo \
 	elf32-m68hc12.lo \
@@ -224,13 +232,18 @@
 	elf32-or32.lo \
 	elf32-pj.lo \
 	elf32-ppc.lo \
+	elf32-ppcqnx.lo \
 	elf32-s390.lo \
 	elf32-sh.lo \
 	elf32-sh-lin.lo \
 	elf32-sh64.lo \
+	elf32-sh64-com.lo \
 	elf32-sh-nbsd.lo \
+	elf32-sh64-nbsd.lo \
+	elf32-shqnx.lo \
 	elf32-sparc.lo \
 	elf32-v850.lo \
+	elf32-vax.lo \
 	elf32-xstormy16.lo \
 	elf32.lo \
 	elflink.lo \
@@ -289,6 +302,8 @@
 	sparcnetbsd.lo \
 	sunos.lo \
 	vaxnetbsd.lo \
+	vax1knetbsd.lo \
+	vaxbsd.lo \
 	versados.lo \
 	vms.lo \
 	vms-gsd.lo \
@@ -346,19 +361,23 @@
 	elf32-arc.c \
 	elfarm-oabi.c \
 	elfarm-nabi.c \
+	elfarmqnx-nabi.c \
 	elf32-avr.c \
 	elf32-cris.c \
 	elf32-d10v.c \
 	elf32-d30v.c \
 	elf32-dlx.c \
 	elf32-fr30.c \
+	elf32-frv.c \
 	elf32-gen.c \
 	elf32-h8300.c \
 	elf32-hppa.c \
 	elf32-i370.c \
 	elf32-i386.c \
+	elf32-i386qnx.c \
 	elf32-i860.c \
 	elf32-i960.c \
+	elf32-ip2k.c \
 	elf32-m32r.c \
 	elf32-m68k.c \
 	elf32-m68hc11.c \
@@ -373,13 +392,18 @@
 	elf32-or32.c \
 	elf32-pj.c \
 	elf32-ppc.c \
+	elf32-ppcqnx.c \
 	elf32-sh64.c \
+	elf32-sh64-com.c \
 	elf32-s390.c \
 	elf32-sh.c \
 	elf32-sh-lin.c \
 	elf32-sh-nbsd.c \
+	elf32-sh64-nbsd.c \
+	elf32-shqnx.c \
 	elf32-sparc.c \
 	elf32-v850.c \
+	elf32-vax.c \
 	elf32-xstormy16.c \
 	elf32.c \
 	elflink.c \
@@ -437,6 +461,8 @@
 	sparcnetbsd.c \
 	sunos.c \
 	vaxnetbsd.c \
+	vax1knetbsd.c \
+	vaxbsd.c \
 	versados.c \
 	vms.c \
 	vms-gsd.c \
@@ -460,9 +486,11 @@
 	elf64-hppa.lo \
 	elf64-ia64.lo \
 	elf64-gen.lo \
+	elfn32-mips.lo \
 	elf64-mips.lo \
 	elf64-mmix.lo \
 	elf64-sh64.lo \
+	elf64-sh64-nbsd.lo \
 	elf64-ppc.lo \
 	elf64-s390.lo \
 	elf64-sparc.lo \
@@ -483,11 +511,13 @@
 	elf64-alpha.c \
 	elf64-hppa.c \
 	elf64-gen.c \
+	elfn32-mips.c \
 	elf64-mips.c \
 	elf64-mmix.c \
 	elf64-ppc.c \
 	elf64-s390.c \
 	elf64-sh64.c \
+	elf64-sh64-nbsd.c \
 	elf64-sparc.c \
 	elf64.c \
 	mmo.c \
@@ -818,7 +848,6 @@
 config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
 	$(SHELL) ./config.status --recheck
 
-
 # What appears below is generated by a hacked mkdep using gcc -MM.
 
 # DO NOT DELETE THIS LINE -- mkdep uses it.
@@ -858,7 +887,8 @@
   $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
 stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+  $(INCDIR)/libiberty.h
 dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -871,8 +901,9 @@
 cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
 cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
 cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-d30v.c $(INCDIR)/filenames.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
 cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
 cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
 cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
 cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
@@ -882,6 +913,7 @@
 cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
 cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
 cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
+cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
 cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
 cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
 cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -1072,6 +1104,10 @@
   $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
   elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+  elf32-arm.h elf32-target.h
 elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1096,6 +1132,10 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h elf32-target.h
@@ -1114,6 +1154,10 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
+  $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1122,6 +1166,10 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1180,11 +1228,19 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
   elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
+  $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
 elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
@@ -1201,6 +1257,15 @@
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
   $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
+  $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+  $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1210,6 +1275,10 @@
   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-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.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)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
@@ -1224,7 +1293,7 @@
   $(INCDIR)/elf/external.h
 elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+  $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
 elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -1394,6 +1463,12 @@
 vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
   libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+  libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+  $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \
+  $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+  $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
 versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
 vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   vms.h
@@ -1447,6 +1522,12 @@
 elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h elf64-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
+  $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+  $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
+  $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
 elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
   $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
@@ -1470,6 +1551,10 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
   elf64-target.h
+elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
+  $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
 elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index cffcb07..6a137cd 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -184,6 +184,7 @@
 	cpu-d30v.lo \
 	cpu-dlx.lo \
 	cpu-fr30.lo \
+	cpu-frv.lo \
 	cpu-h8300.lo \
 	cpu-h8500.lo \
 	cpu-hppa.lo \
@@ -192,6 +193,7 @@
 	cpu-i386.lo \
 	cpu-i860.lo \
 	cpu-i960.lo \
+	cpu-ip2k.lo \
 	cpu-m32r.lo \
 	cpu-m68hc11.lo \
 	cpu-m68hc12.lo \
@@ -234,6 +236,7 @@
 	cpu-d30v.c \
 	cpu-dlx.c \
 	cpu-fr30.c \
+	cpu-frv.c \
 	cpu-h8300.c \
 	cpu-h8500.c \
 	cpu-hppa.c \
@@ -242,6 +245,7 @@
 	cpu-i386.c \
 	cpu-i860.c \
 	cpu-i960.c \
+	cpu-ip2k.c \
 	cpu-m32r.c \
 	cpu-m68hc11.c \
 	cpu-m68hc12.c \
@@ -324,20 +328,24 @@
 	elf32-arc.lo \
 	elfarm-oabi.lo \
 	elfarm-nabi.lo \
+	elfarmqnx-nabi.lo \
 	elf32-avr.lo \
 	elf32-cris.lo \
 	elf32-d10v.lo \
 	elf32-d30v.lo \
 	elf32-dlx.lo \
 	elf32-fr30.lo \
+	elf32-frv.lo \
 	elf32-gen.lo \
 	elf32-h8300.lo \
 	elf32-hppa.lo \
 	elf32-i370.lo \
 	elf32-i386.lo \
+	elf32-i386qnx.lo \
 	elf32-i860.lo \
 	elf32-i960.lo \
 	elf32-ia64.lo \
+	elf32-ip2k.lo \
 	elf32-m32r.lo \
 	elf32-m68hc11.lo \
 	elf32-m68hc12.lo \
@@ -352,13 +360,18 @@
 	elf32-or32.lo \
 	elf32-pj.lo \
 	elf32-ppc.lo \
+	elf32-ppcqnx.lo \
 	elf32-s390.lo \
 	elf32-sh.lo \
 	elf32-sh-lin.lo \
 	elf32-sh64.lo \
+	elf32-sh64-com.lo \
 	elf32-sh-nbsd.lo \
+	elf32-sh64-nbsd.lo \
+	elf32-shqnx.lo \
 	elf32-sparc.lo \
 	elf32-v850.lo \
+	elf32-vax.lo \
 	elf32-xstormy16.lo \
 	elf32.lo \
 	elflink.lo \
@@ -417,6 +430,8 @@
 	sparcnetbsd.lo \
 	sunos.lo \
 	vaxnetbsd.lo \
+	vax1knetbsd.lo \
+	vaxbsd.lo \
 	versados.lo \
 	vms.lo \
 	vms-gsd.lo \
@@ -475,19 +490,23 @@
 	elf32-arc.c \
 	elfarm-oabi.c \
 	elfarm-nabi.c \
+	elfarmqnx-nabi.c \
 	elf32-avr.c \
 	elf32-cris.c \
 	elf32-d10v.c \
 	elf32-d30v.c \
 	elf32-dlx.c \
 	elf32-fr30.c \
+	elf32-frv.c \
 	elf32-gen.c \
 	elf32-h8300.c \
 	elf32-hppa.c \
 	elf32-i370.c \
 	elf32-i386.c \
+	elf32-i386qnx.c \
 	elf32-i860.c \
 	elf32-i960.c \
+	elf32-ip2k.c \
 	elf32-m32r.c \
 	elf32-m68k.c \
 	elf32-m68hc11.c \
@@ -502,13 +521,18 @@
 	elf32-or32.c \
 	elf32-pj.c \
 	elf32-ppc.c \
+	elf32-ppcqnx.c \
 	elf32-sh64.c \
+	elf32-sh64-com.c \
 	elf32-s390.c \
 	elf32-sh.c \
 	elf32-sh-lin.c \
 	elf32-sh-nbsd.c \
+	elf32-sh64-nbsd.c \
+	elf32-shqnx.c \
 	elf32-sparc.c \
 	elf32-v850.c \
+	elf32-vax.c \
 	elf32-xstormy16.c \
 	elf32.c \
 	elflink.c \
@@ -566,6 +590,8 @@
 	sparcnetbsd.c \
 	sunos.c \
 	vaxnetbsd.c \
+	vax1knetbsd.c \
+	vaxbsd.c \
 	versados.c \
 	vms.c \
 	vms-gsd.c \
@@ -590,9 +616,11 @@
 	elf64-hppa.lo \
 	elf64-ia64.lo \
 	elf64-gen.lo \
+	elfn32-mips.lo \
 	elf64-mips.lo \
 	elf64-mmix.lo \
 	elf64-sh64.lo \
+	elf64-sh64-nbsd.lo \
 	elf64-ppc.lo \
 	elf64-s390.lo \
 	elf64-sparc.lo \
@@ -614,11 +642,13 @@
 	elf64-alpha.c \
 	elf64-hppa.c \
 	elf64-gen.c \
+	elfn32-mips.c \
 	elf64-mips.c \
 	elf64-mmix.c \
 	elf64-ppc.c \
 	elf64-s390.c \
 	elf64-sh64.c \
+	elf64-sh64-nbsd.c \
 	elf64-sparc.c \
 	elf64.c \
 	mmo.c \
@@ -1387,7 +1417,8 @@
   $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
 stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
   $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
-merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+  $(INCDIR)/libiberty.h
 dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -1400,8 +1431,9 @@
 cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
 cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
 cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h
-cpu-dlx.lo: cpu-d30v.c $(INCDIR)/filenames.h
+cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h
 cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h
+cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h
 cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h
 cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h
 cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h
@@ -1411,6 +1443,7 @@
 cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h
 cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h
 cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h
+cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h
 cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h
 cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h
 cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h
@@ -1601,6 +1634,10 @@
   $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
   elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+  $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+  elf32-arm.h elf32-target.h
 elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1625,6 +1662,10 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h elf32-target.h
@@ -1643,6 +1684,10 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
+  $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1651,6 +1696,10 @@
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \
@@ -1709,11 +1758,19 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
   elf32-sh.c $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
   elf32-target.h
+elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h \
+  $(INCDIR)/elf/reloc-macros.h $(srcdir)/../opcodes/sh64-opc.h
 elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
@@ -1730,6 +1787,15 @@
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
   $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \
+  $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+  $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+  elf32-target.h
 elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
   $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1739,6 +1805,10 @@
   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-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/elf/vax.h $(INCDIR)/elf/reloc-macros.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)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
@@ -1753,7 +1823,7 @@
   $(INCDIR)/elf/external.h
 elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
-  $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+  $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
 elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
@@ -1923,6 +1993,12 @@
 vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \
   libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \
+  libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+  $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h libaout.h \
+  $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
+  $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
 versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
 vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   vms.h
@@ -1976,6 +2052,12 @@
 elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h elf64-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+  genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
+  $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
+  $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+  $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
+  $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
 elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
   $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
   $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
@@ -1999,6 +2081,10 @@
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
   elf64-target.h
+elf64-sh64-nbsd.lo: elf64-sh64-nbsd.c elf64-sh64.c \
+  $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h elf-bfd.h \
+  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+  $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf64-target.h
 elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index c11c504..11f1ca3 100644
--- a/bfd/aout-adobe.c
+++ b/bfd/aout-adobe.c
@@ -416,7 +416,7 @@
   sec_ptr sect;
 
   /* Set by bfd.c handler.  */
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       /* Assign file offsets to sections.  Text sections are first, and
 	 are contiguous.  Then data sections.  Everything else at the end.  */
@@ -510,6 +510,7 @@
 #define aout_32_bfd_relax_section       bfd_generic_relax_section
 #define aout_32_bfd_gc_sections         bfd_generic_gc_sections
 #define aout_32_bfd_merge_sections	bfd_generic_merge_sections
+#define aout_32_bfd_discard_group	bfd_generic_discard_group
 #define aout_32_bfd_link_hash_table_create \
   _bfd_generic_link_hash_table_create
 #define aout_32_bfd_link_hash_table_free \
diff --git a/bfd/aout-ns32k.c b/bfd/aout-ns32k.c
index e16388b..8456e80 100644
--- a/bfd/aout-ns32k.c
+++ b/bfd/aout-ns32k.c
@@ -1,23 +1,23 @@
 /* BFD back-end for ns32k a.out-ish binaries.
-   Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000, 2001
+   Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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.  */
 
 #define BYTES_IN_WORD 4
 
@@ -49,16 +49,16 @@
 
 #define MY(OP) MYNS(OP)
 
-#define MY_swap_std_reloc_in MY(swap_std_reloc_in)
+#define MY_swap_std_reloc_in  MY(swap_std_reloc_in)
 #define MY_swap_std_reloc_out MY(swap_std_reloc_out)
 
 static void
-MY_swap_std_reloc_in PARAMS ((bfd *abfd, struct reloc_std_external *bytes,
-			      arelent *cache_ptr, asymbol **symbols,
-			      bfd_size_type symcount));
+MY_swap_std_reloc_in PARAMS ((bfd *, struct reloc_std_external *,
+			      arelent *, asymbol **,
+			      bfd_size_type));
 static void
-MY_swap_std_reloc_out PARAMS ((bfd *abfd, arelent *g,
-			       struct reloc_std_external *natptr));
+MY_swap_std_reloc_out PARAMS ((bfd *, arelent *,
+			       struct reloc_std_external *));
 reloc_howto_type *
 MY(reloc_howto) PARAMS ((bfd *, struct reloc_std_external *,
 			 int *, int *, int *));
@@ -94,47 +94,48 @@
 
    In addition, for historical reasons the encoding of the relocation types
    in the a.out format relocation entries is such that even the relocation
-   methods which are standard are not encoded the standard way. */
+   methods which are standard are not encoded the standard way.  */
 
 reloc_howto_type MY(howto_table)[] =
   {
+    /* type           rs   size bsz  pcrel bitpos ovrf                  sf name          part_inpl readmask setmask pcdone */
     /* ns32k immediate operands.  */
-    HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm, "NS32K_IMM_8",
 	   true, 0x000000ff,0x000000ff, false),
-    HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm,  "NS32K_IMM_16",
 	   true, 0x0000ffff,0x0000ffff, false),
-    HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm, "NS32K_IMM_32",
 	   true, 0xffffffff,0xffffffff, false),
-    HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8",
 	   true, 0x000000ff, 0x000000ff, false),
-    HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16",
 	   true, 0x0000ffff,0x0000ffff, false),
-    HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32",
 	   true, 0xffffffff,0xffffffff, false),
 
     /* ns32k displacements.  */
-    HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 8, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "NS32K_DISP_8",
 	   true, 0x000000ff,0x000000ff, false),
-    HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 16, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "NS32K_DISP_16",
 	   true, 0x0000ffff, 0x0000ffff, false),
-    HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 32, false, 0, true,
+    HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "NS32K_DISP_32",
 	   true, 0xffffffff, 0xffffffff, false),
-    HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 8, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8",
 	   true, 0x000000ff,0x000000ff, false),
-    HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 16, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16",
 	   true, 0x0000ffff,0x0000ffff, false),
-    HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 32, true, 0, false,
+    HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed,
 	   _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32",
 	   true, 0xffffffff,0xffffffff, false),
 
@@ -355,7 +356,7 @@
 {
   int r_ns32k_type = (howto - MY(howto_table)) / 6;
   bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
-  int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+  void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
 
   switch (r_ns32k_type)
     {
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index 15a2568..b2acc09 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -207,7 +207,7 @@
 MY(mkobject) (abfd)
      bfd *abfd;
 {
-  if (NAME(aout,mkobject) (abfd) == false)
+  if (! NAME(aout,mkobject) (abfd))
     return false;
 #if 0 /* Sizes get set in set_sizes callback, later, after we know
 	 the architecture and machine.  */
@@ -513,6 +513,9 @@
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
 #ifndef MY_bfd_reloc_type_lookup
 #define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
 #endif
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index e00c137..a39a5b1 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -965,6 +965,9 @@
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
 #ifndef MY_bfd_reloc_type_lookup
 #define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
 #endif
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index 0f773a1..80d69d9 100644
--- a/bfd/aoutf1.h
+++ b/bfd/aoutf1.h
@@ -748,7 +748,7 @@
 
   return (memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr),
 		  (char *) exec_hdr (exec_bfd),
-		  sizeof (struct internal_exec)) == 0) ? true : false;
+		  sizeof (struct internal_exec)) == 0);
 }
 
 #define MY_set_sizes sunos4_set_sizes
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 3c9cd4f..7eebb16 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -4,21 +4,21 @@
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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.  */
 
 /*
 SECTION
@@ -193,7 +193,7 @@
 
 reloc_howto_type howto_table_ext[] =
 {
-  /* type           rs   size bsz  pcrel bitpos ovrf                  sf name          part_inpl readmask setmask pcdone */
+  /* type           rs   size bsz  pcrel bitpos ovrf                  sf name          part_inpl readmask setmask pcdone.  */
   HOWTO(RELOC_8,      0,  0,  	8,  false, 0, complain_overflow_bitfield,0,"8",        false, 0,0x000000ff, false),
   HOWTO(RELOC_16,     0,  1, 	16, false, 0, complain_overflow_bitfield,0,"16",       false, 0,0x0000ffff, false),
   HOWTO(RELOC_32,     0,  2, 	32, false, 0, complain_overflow_bitfield,0,"32",       false, 0,0xffffffff, false),
@@ -227,7 +227,7 @@
 /* Convert standard reloc records to "arelent" format (incl byte swap).  */
 
 reloc_howto_type howto_table_std[] = {
-  /* type              rs size bsz  pcrel bitpos ovrf                     sf name     part_inpl readmask  setmask    pcdone */
+  /* type              rs size bsz  pcrel bitpos ovrf                     sf name     part_inpl readmask  setmask    pcdone.  */
 HOWTO ( 0,	       0,  0,  	8,  false, 0, complain_overflow_bitfield,0,"8",		true, 0x000000ff,0x000000ff, false),
 HOWTO ( 1,	       0,  1, 	16, false, 0, complain_overflow_bitfield,0,"16",	true, 0x0000ffff,0x0000ffff, false),
 HOWTO ( 2,	       0,  2, 	32, false, 0, complain_overflow_bitfield,0,"32",	true, 0xffffffff,0xffffffff, false),
@@ -281,6 +281,7 @@
 #define EXT(i, j)	case i: return &howto_table_ext[j]
 #define STD(i, j)	case i: return &howto_table_std[j]
   int ext = obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE;
+
   if (code == BFD_RELOC_CTOR)
     switch (bfd_get_arch_info (abfd)->bits_per_address)
       {
@@ -291,6 +292,7 @@
 	code = BFD_RELOC_64;
 	break;
       }
+
   if (ext)
     switch (code)
       {
@@ -313,7 +315,7 @@
       default: return (reloc_howto_type *) NULL;
       }
   else
-    /* std relocs */
+    /* std relocs.  */
     switch (code)
       {
 	STD (BFD_RELOC_16, 1);
@@ -474,14 +476,15 @@
     *abfd->tdata.aout_data = *oldrawptr;
 
   abfd->tdata.aout_data->a.hdr = &rawptr->e;
-  *(abfd->tdata.aout_data->a.hdr) = *execp;	/* Copy in the internal_exec struct */
+  /* Copy in the internal_exec struct.  */
+  *(abfd->tdata.aout_data->a.hdr) = *execp;
   execp = abfd->tdata.aout_data->a.hdr;
 
-  /* Set the file flags */
+  /* Set the file flags.  */
   abfd->flags = BFD_NO_FLAGS;
   if (execp->a_drsize || execp->a_trsize)
     abfd->flags |= HAS_RELOC;
-  /* Setting of EXEC_P has been deferred to the bottom of this function */
+  /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
   if (N_DYNAMIC (*execp))
@@ -533,7 +536,7 @@
   obj_aout_sym_hashes (abfd) = NULL;
 
   if (! NAME(aout,make_sections) (abfd))
-    return NULL;
+    goto error_ret;
 
   obj_datasec (abfd)->_raw_size = execp->a_data;
   obj_bsssec (abfd)->_raw_size = execp->a_bss;
@@ -563,18 +566,18 @@
 
   obj_textsec (abfd)->size = N_TXTSIZE (*execp);
   obj_textsec (abfd)->raw_size = N_TXTSIZE (*execp);
-  /* data and bss are already filled in since they're so standard */
+  /* Data and bss are already filled in since they're so standard.  */
 
-  /* The virtual memory addresses of the sections */
+  /* The virtual memory addresses of the sections.  */
   obj_textsec (abfd)->vma = N_TXTADDR (*execp);
   obj_datasec (abfd)->vma = N_DATADDR (*execp);
   obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
 
-  /* The file offsets of the sections */
+  /* The file offsets of the sections.  */
   obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
   obj_datasec (abfd)->filepos = N_DATOFF (*execp);
 
-  /* The file offsets of the relocation info */
+  /* The file offsets of the relocation info.  */
   obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
   obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
 
@@ -655,13 +658,13 @@
       obj_textsec (abfd)->next = obj_datasec (abfd);
       obj_datasec (abfd)->next = obj_bsssec (abfd);
 #endif
+      return result;
     }
-  else
-    {
-      free (rawptr);
-      abfd->tdata.aout_data = oldrawptr;
-    }
-  return result;
+
+ error_ret:
+  bfd_release (abfd, rawptr);
+  abfd->tdata.aout_data = oldrawptr;
+  return NULL;
 }
 
 /*
@@ -865,7 +868,7 @@
 	return false;
     }
 
-  /* Determine the size of a relocation entry */
+  /* Determine the size of a relocation entry.  */
   switch (arch)
     {
     case bfd_arch_sparc:
@@ -903,7 +906,7 @@
   /* Data.  */
   if (!obj_datasec (abfd)->user_set_vma)
     {
-#if 0	    /* ?? Does alignment in the file image really matter? */
+#if 0	    /* ?? Does alignment in the file image really matter?  */
       pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
 #endif
       obj_textsec (abfd)->_raw_size += pad;
@@ -1220,35 +1223,34 @@
      bfd *abfd;
      asection *newsect;
 {
-  /* align to double at least */
+  /* Align to double at least.  */
   newsect->alignment_power = bfd_get_arch_info (abfd)->section_align_power;
 
   if (bfd_get_format (abfd) == bfd_object)
-  {
-    if (obj_textsec (abfd) == NULL && !strcmp (newsect->name, ".text"))
-      {
-	obj_textsec (abfd)= newsect;
-	newsect->target_index = N_TEXT;
-	return true;
-      }
+    {
+      if (obj_textsec (abfd) == NULL && !strcmp (newsect->name, ".text"))
+	{
+	  obj_textsec (abfd)= newsect;
+	  newsect->target_index = N_TEXT;
+	  return true;
+	}
 
-    if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
-      {
-	obj_datasec (abfd) = newsect;
-	newsect->target_index = N_DATA;
-	return true;
-      }
+      if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+	{
+	  obj_datasec (abfd) = newsect;
+	  newsect->target_index = N_DATA;
+	  return true;
+	}
 
-    if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
-      {
-	obj_bsssec (abfd) = newsect;
-	newsect->target_index = N_BSS;
-	return true;
-      }
+      if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
+	{
+	  obj_bsssec (abfd) = newsect;
+	  newsect->target_index = N_BSS;
+	  return true;
+	}
+    }
 
-  }
-
-  /* We allow more than three sections internally */
+  /* We allow more than three sections internally.  */
   return true;
 }
 
@@ -1310,9 +1312,9 @@
       count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
 
 #ifdef USE_MMAP
-      if (bfd_get_file_window (abfd,
-			       obj_sym_filepos (abfd), exec_hdr (abfd)->a_syms,
-			       &obj_aout_sym_window (abfd), true) == false)
+      if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
+				 exec_hdr (abfd)->a_syms,
+				 &obj_aout_sym_window (abfd), true))
 	return false;
       syms = (struct external_nlist *) obj_aout_sym_window (abfd).data;
 #else
@@ -1352,8 +1354,8 @@
       stringsize = GET_WORD (abfd, string_chars);
 
 #ifdef USE_MMAP
-      if (bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize,
-			       &obj_aout_string_window (abfd), true) == false)
+      if (! bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize,
+				 &obj_aout_string_window (abfd), true))
 	return false;
       strings = (char *) obj_aout_string_window (abfd).data;
 #else
@@ -1401,7 +1403,6 @@
       asection *sec;
 
       /* This is a debugging symbol.  */
-
       cache_ptr->symbol.flags = BSF_DEBUGGING;
 
       /* Work out the symbol section.  */
@@ -1702,7 +1703,7 @@
       return false;
     }
 
-  /* Turn the symbol from section relative to absolute again */
+  /* Turn the symbol from section relative to absolute again.  */
   value += sec->vma + off;
 
   if ((cache_ptr->flags & BSF_WARNING) != 0)
@@ -1718,6 +1719,7 @@
   if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0)
     {
       int type = ((aout_symbol_type *) cache_ptr)->type;
+
       switch (type)
 	{
 	case N_ABS:	type = N_SETA; break;
@@ -1826,7 +1828,7 @@
   aout_symbol_type *cached;
   bfd_size_type cached_size;
 
-  /* If there's no work to be done, don't do any */
+  /* If there's no work to be done, don't do any.  */
   if (obj_aout_symbols (abfd) != (aout_symbol_type *) NULL)
     return true;
 
@@ -1837,11 +1839,9 @@
 
   cached_size = obj_aout_external_sym_count (abfd);
   cached_size *= sizeof (aout_symbol_type);
-  cached = (aout_symbol_type *) bfd_malloc (cached_size);
+  cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
   if (cached == NULL && cached_size != 0)
     return false;
-  if (cached_size != 0)
-    memset (cached, 0, (size_t) cached_size);
 
   /* Convert from external symbol information to internal.  */
   if (! (NAME(aout,translate_symbol_table)
@@ -2025,7 +2025,7 @@
     return bfd_get_symcount (abfd);
 }
 
-/* Standard reloc stuff */
+/* Standard reloc stuff.  */
 /* Output standard relocation information to a file in target byte order.  */
 
 extern void  NAME(aout,swap_std_reloc_out)
@@ -2047,8 +2047,8 @@
 
   PUT_WORD (abfd, g->address, natptr->r_address);
 
-  r_length = g->howto->size ;	/* Size as a power of two */
-  r_pcrel  = (int) g->howto->pc_relative; /* Relative to PC? */
+  r_length = g->howto->size ;	/* Size as a power of two.  */
+  r_pcrel  = (int) g->howto->pc_relative; /* Relative to PC?  */
   /* XXX This relies on relocs coming from a.out files.  */
   r_baserel = (g->howto->type & 8) != 0;
   r_jmptable = (g->howto->type & 16) != 0;
@@ -2059,43 +2059,41 @@
   r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
 #endif
 
-  /* name was clobbered by aout_write_syms to be symbol index */
+  /* Name was clobbered by aout_write_syms to be symbol index.  */
 
   /* If this relocation is relative to a symbol then set the
      r_index to the symbols index, and the r_extern bit.
 
      Absolute symbols can come in in two ways, either as an offset
      from the abs section, or as a symbol which has an abs value.
-     check for that here
-     */
+     check for that here.  */
 
   if (bfd_is_com_section (output_section)
       || bfd_is_abs_section (output_section)
       || bfd_is_und_section (output_section))
     {
       if (bfd_abs_section_ptr->symbol == sym)
-      {
-	/* Whoops, looked like an abs symbol, but is really an offset
-	   from the abs section */
-	r_index = N_ABS;
-	r_extern = 0;
-       }
+	{
+	  /* Whoops, looked like an abs symbol, but is
+	     really an offset from the abs section.  */
+	  r_index = N_ABS;
+	  r_extern = 0;
+	}
       else
-      {
-	/* Fill in symbol */
-	r_extern = 1;
-	r_index = (*(g->sym_ptr_ptr))->KEEPIT;
-
-      }
+	{
+	  /* Fill in symbol.  */
+	  r_extern = 1;
+	  r_index = (*(g->sym_ptr_ptr))->KEEPIT;
+	}
     }
   else
     {
-      /* Just an ordinary section */
+      /* Just an ordinary section.  */
       r_extern = 0;
       r_index  = output_section->target_index;
     }
 
-  /* now the fun stuff */
+  /* Now the fun stuff.  */
   if (bfd_header_big_endian (abfd))
     {
       natptr->r_index[0] = r_index >> 16;
@@ -2122,7 +2120,7 @@
     }
 }
 
-/* Extended stuff */
+/* Extended stuff.  */
 /* Output extended relocation information to a file in target byte order.  */
 
 extern void NAME(aout,swap_ext_reloc_out)
@@ -2155,7 +2153,6 @@
      Absolute symbols can come in in two ways, either as an offset
      from the abs section, or as a symbol which has an abs value.
      check for that here.  */
-
   if (bfd_is_abs_section (bfd_get_section (sym)))
     {
       r_extern = 0;
@@ -2172,12 +2169,12 @@
     }
   else
     {
-      /* Just an ordinary section */
+      /* Just an ordinary section.  */
       r_extern = 0;
       r_index = output_section->target_index;
     }
 
-  /* now the fun stuff */
+  /* Now the fun stuff.  */
   if (bfd_header_big_endian (abfd))
     {
       natptr->r_index[0] = r_index >> 16;
@@ -2258,7 +2255,7 @@
 
   cache_ptr->address = (GET_SWORD (abfd, bytes->r_address));
 
-  /* now the fun stuff */
+  /* Now the fun stuff.  */
   if (bfd_header_big_endian (abfd))
     {
       r_index = ((bytes->r_index[0] << 16)
@@ -2317,7 +2314,7 @@
 
   cache_ptr->address = H_GET_32 (abfd, bytes->r_address);
 
-  /* now the fun stuff */
+  /* Now the fun stuff.  */
   if (bfd_header_big_endian (abfd))
     {
       r_index = ((bytes->r_index[0] << 16)
@@ -2411,10 +2408,9 @@
   count = reloc_size / each_size;
 
   amt = count * sizeof (arelent);
-  reloc_cache = (arelent *) bfd_malloc (amt);
+  reloc_cache = (arelent *) bfd_zmalloc (amt);
   if (reloc_cache == NULL && count != 0)
     return false;
-  memset (reloc_cache, 0, (size_t) amt);
 
   relocs = bfd_malloc (reloc_size);
   if (relocs == NULL && reloc_size != 0)
@@ -2508,7 +2504,8 @@
   return true;
 }
 
-/* This is stupid.  This function should be a boolean predicate */
+/* This is stupid.  This function should be a boolean predicate.  */
+
 long
 NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
      bfd *abfd;
@@ -2561,10 +2558,9 @@
       bfd_set_error (bfd_error_invalid_operation);
       return -1;
     }
+
   if (asect->flags & SEC_CONSTRUCTOR)
-    {
-      return (sizeof (arelent *) * (asect->reloc_count+1));
-    }
+    return (sizeof (arelent *) * (asect->reloc_count+1));
 
   if (asect == obj_datasec (abfd))
     return (sizeof (arelent *)
@@ -2742,11 +2738,9 @@
   return sym;
 }
 
-/*
- provided a BFD, a section and an offset into the section, calculate
- and return the name of the source file and the line nearest to the
- wanted location.
-*/
+/* Provided a BFD, a section and an offset into the section, calculate
+   and return the name of the source file and the line nearest to the
+   wanted location.  */
 
 boolean
 NAME(aout,find_nearest_line)
@@ -2759,7 +2753,7 @@
      const char **functionname_ptr;
      unsigned int *line_ptr;
 {
-  /* Run down the file looking for the filename, function and linenumber */
+  /* Run down the file looking for the filename, function and linenumber.  */
   asymbol **p;
   const char *directory_name = NULL;
   const char *main_file_name = NULL;
@@ -2775,6 +2769,7 @@
   *filename_ptr = abfd->filename;
   *functionname_ptr = 0;
   *line_ptr = 0;
+
   if (symbols != (asymbol **)NULL)
     {
       for (p = symbols; *p; p++)
@@ -2862,12 +2857,13 @@
 	      break;
 	    case N_FUN:
 	      {
-		/* We'll keep this if it is nearer than the one we have already */
+		/* We'll keep this if it is nearer than the one we have already.  */
 		if (q->symbol.value >= low_func_vma &&
-		    q->symbol.value <= offset) {
-		  low_func_vma = q->symbol.value;
-		  func = (asymbol *)q;
-		}
+		    q->symbol.value <= offset)
+		  {
+		    low_func_vma = q->symbol.value;
+		    func = (asymbol *)q;
+		  }
 		else if (q->symbol.value > offset)
 		  goto done;
 	      }
@@ -2889,6 +2885,7 @@
     filelen = 0;
   else
     filelen = strlen (directory_name) + strlen (main_file_name);
+
   if (func == NULL)
     funclen = 0;
   else
@@ -2896,6 +2893,7 @@
 
   if (adata (abfd).line_buf != NULL)
     free (adata (abfd).line_buf);
+
   if (filelen + funclen == 0)
     adata (abfd).line_buf = buf = NULL;
   else
@@ -2933,7 +2931,7 @@
 	  buf[0] = bfd_get_symbol_leading_char (abfd);
 	  strcpy (buf + 1, function);
 	}
-      /* Have to remove : stuff */
+      /* Have to remove : stuff.  */
       colon = strchr (buf, ':');
       if (colon != NULL)
 	*colon = '\0';
@@ -3227,19 +3225,43 @@
 	{
 	  /* This object file defines this symbol.  We must link it
 	     in.  This is true regardless of whether the current
-	     definition of the symbol is undefined or common.  If the
-	     current definition is common, we have a case in which we
-	     have already seen an object file including
+	     definition of the symbol is undefined or common.
+
+             If the current definition is common, we have a case in
+	     which we have already seen an object file including:
 	         int a;
-	     and this object file from the archive includes
+	     and this object file from the archive includes:
 	         int a = 5;
-	     In such a case we must include this object file.
+	     In such a case, whether to include this object is target
+             dependant for backward compatability.
 
 	     FIXME: The SunOS 4.1.3 linker will pull in the archive
 	     element if the symbol is defined in the .data section,
 	     but not if it is defined in the .text section.  That
-	     seems a bit crazy to me, and I haven't implemented it.
-	     However, it might be correct.  */
+	     seems a bit crazy to me, and it has not been implemented
+	     yet.  However, it might be correct.  */
+	  if (h->type == bfd_link_hash_common)
+	    {
+	      int skip = 0;
+
+	      switch (info->common_skip_ar_aymbols)
+		{
+		case bfd_link_common_skip_text:
+		  skip = (type == (N_TEXT | N_EXT));
+		  break;
+		case bfd_link_common_skip_data:
+		  skip = (type == (N_DATA | N_EXT));
+		  break;
+		default:
+		case bfd_link_common_skip_all:
+		  skip = 1;
+		  break;
+		}
+
+	      if (skip)
+		continue;
+	    }
+
 	  if (! (*info->callbacks->add_archive_element) (info, abfd, name))
 	    return false;
 	  *pneeded = true;
@@ -4189,7 +4211,8 @@
 
 	  /* Use the name from the hash table, in case the symbol was
              wrapped.  */
-	  if (h != NULL)
+	  if (h != NULL
+	      && h->root.type != bfd_link_hash_warning)
 	    name = h->root.root.string;
 
 	  /* If this is an indirect or warning symbol, then change
@@ -4211,7 +4234,6 @@
 
 	  /* If the symbol has already been written out, skip it.  */
 	  if (h != (struct aout_link_hash_entry *) NULL
-	      && h->root.type != bfd_link_hash_warning
 	      && h->written)
 	    {
 	      if ((type & N_TYPE) == N_INDR
diff --git a/bfd/archive.c b/bfd/archive.c
index e9e07c5..d7ac214 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -603,8 +603,6 @@
   char armag[SARMAG + 1];
   bfd_size_type amt;
 
-  tdata_hold = abfd->tdata.aout_ar_data;
-
   if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
     {
       if (bfd_get_error () != bfd_error_system_call)
@@ -621,13 +619,15 @@
     return 0;
 #endif
 
-  /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
-     involves a cast, we can't do it as the left operand of assignment.  */
-  amt = sizeof (struct artdata);
-  abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+  tdata_hold = bfd_ardata (abfd);
 
+  amt = sizeof (struct artdata);
+  bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == NULL)
-    return NULL;
+    {
+      bfd_ardata (abfd) = tdata_hold;
+      return NULL;
+    }
 
   bfd_ardata (abfd)->first_file_filepos = SARMAG;
   bfd_ardata (abfd)->cache = NULL;
@@ -636,21 +636,13 @@
   bfd_ardata (abfd)->extended_names = NULL;
   bfd_ardata (abfd)->tdata = NULL;
 
-  if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)))
+  if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd))
+      || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
     {
-      bfd_release (abfd, bfd_ardata (abfd));
-      abfd->tdata.aout_ar_data = tdata_hold;
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
-      return NULL;
-    }
-
-  if (!BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
-    {
       bfd_release (abfd, bfd_ardata (abfd));
-      abfd->tdata.aout_ar_data = tdata_hold;
-      if (bfd_get_error () != bfd_error_system_call)
-	bfd_set_error (bfd_error_wrong_format);
+      bfd_ardata (abfd) = tdata_hold;
       return NULL;
     }
 
@@ -686,9 +678,9 @@
 		 release bfd_ardata.  FIXME.  */
 	      (void) bfd_close (first);
 	      bfd_release (abfd, bfd_ardata (abfd));
-	      abfd->tdata.aout_ar_data = tdata_hold;
 #endif
 	      bfd_set_error (bfd_error_wrong_object_format);
+	      bfd_ardata (abfd) = tdata_hold;
 	      return NULL;
 	    }
 	  /* And we ought to close `first' here too.  */
@@ -1746,7 +1738,7 @@
 
   if (makemap && hasobjects)
     {
-      if (_bfd_compute_and_write_armap (arch, (unsigned int) elength) != true)
+      if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength))
 	return false;
     }
 
@@ -1876,8 +1868,8 @@
        current != (bfd *) NULL;
        current = current->next, elt_no++)
     {
-      if ((bfd_check_format (current, bfd_object) == true)
-	  && ((bfd_get_file_flags (current) & HAS_SYMS)))
+      if (bfd_check_format (current, bfd_object)
+	  && (bfd_get_file_flags (current) & HAS_SYMS) != 0)
 	{
 	  long storage;
 	  long symcount;
diff --git a/bfd/archures.c b/bfd/archures.c
index 36fc568..dd51ec7 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -182,6 +182,7 @@
 .#define bfd_mach_ppc_rs64ii	642
 .#define bfd_mach_ppc_rs64iii	643
 .#define bfd_mach_ppc_7400	7400
+.#define bfd_mach_ppc_e500      500
 .  bfd_arch_rs6000,    {* IBM RS/6000 *}
 .#define bfd_mach_rs6k		0
 .#define bfd_mach_rs6k_rs1	6001
@@ -247,10 +248,20 @@
 .#define bfd_mach_am33		330
 .  bfd_arch_fr30,
 .#define bfd_mach_fr30		0x46523330
+.  bfd_arch_frv,
+.#define bfd_mach_frv		0
+.#define bfd_mach_frvsimple	1
+.#define bfd_mach_fr300		300
+.#define bfd_mach_fr400		400
+.#define bfd_mach_frvtomcat	499	{* fr500 prototype *}
+.#define bfd_mach_fr500		500
 .  bfd_arch_mcore,
 .  bfd_arch_ia64,      {* HP/Intel ia64 *}
 .#define bfd_mach_ia64_elf64	0
 .#define bfd_mach_ia64_elf32	1
+.  bfd_arch_ip2k,      {* Ubicom IP2K microcontrollers. *}
+.#define bfd_mach_ip2022	0
+.#define bfd_mach_ip2022ext	1
 .  bfd_arch_pj,
 .  bfd_arch_avr,       {* Atmel AVR microcontrollers.  *}
 .#define bfd_mach_avr1		1
@@ -315,6 +326,7 @@
 extern const bfd_arch_info_type bfd_d30v_arch;
 extern const bfd_arch_info_type bfd_dlx_arch;
 extern const bfd_arch_info_type bfd_fr30_arch;
+extern const bfd_arch_info_type bfd_frv_arch;
 extern const bfd_arch_info_type bfd_h8300_arch;
 extern const bfd_arch_info_type bfd_h8500_arch;
 extern const bfd_arch_info_type bfd_hppa_arch;
@@ -323,6 +335,7 @@
 extern const bfd_arch_info_type bfd_i860_arch;
 extern const bfd_arch_info_type bfd_i960_arch;
 extern const bfd_arch_info_type bfd_ia64_arch;
+extern const bfd_arch_info_type bfd_ip2k_arch;
 extern const bfd_arch_info_type bfd_m32r_arch;
 extern const bfd_arch_info_type bfd_m68hc11_arch;
 extern const bfd_arch_info_type bfd_m68hc12_arch;
@@ -369,6 +382,7 @@
     &bfd_d30v_arch,
     &bfd_dlx_arch,
     &bfd_fr30_arch,
+    &bfd_frv_arch,
     &bfd_h8300_arch,
     &bfd_h8500_arch,
     &bfd_hppa_arch,
@@ -377,6 +391,7 @@
     &bfd_i860_arch,
     &bfd_i960_arch,
     &bfd_ia64_arch,
+    &bfd_ip2k_arch,
     &bfd_m32r_arch,
     &bfd_m68hc11_arch,
     &bfd_m68hc12_arch,
diff --git a/bfd/armnetbsd.c b/bfd/armnetbsd.c
index e899adb..d82e98f 100644
--- a/bfd/armnetbsd.c
+++ b/bfd/armnetbsd.c
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/ARM a.out-ish binaries.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -44,7 +44,7 @@
 
 #include "bfd.h"		/* To ensure following declaration is OK */
 
-CONST struct reloc_howto_struct *
+const struct reloc_howto_struct *
 MY_bfd_reloc_type_lookup
   PARAMS ((bfd * abfd AND
 	  bfd_reloc_code_real_type code));
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 8c36c67..19fd107 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -4,21 +4,21 @@
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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 __BFD_H_SEEN__
 #define __BFD_H_SEEN__
@@ -803,6 +803,9 @@
 extern boolean bfd_elf32_arm_get_bfd_for_interworking
   PARAMS ((bfd *, struct bfd_link_info *));
 
+extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
+  PARAMS ((bfd *, struct bfd_link_info *));
+
 /* TI COFF load page support.  */
 extern void bfd_ticoff_set_section_load_page
   PARAMS ((struct sec *, int));
@@ -810,4 +813,3 @@
 extern int bfd_ticoff_get_section_load_page
   PARAMS ((struct sec *));
 
-/* And more from the source.  */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 1dd397a..1a869f6 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -10,21 +10,21 @@
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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 __BFD_H_SEEN__
 #define __BFD_H_SEEN__
@@ -809,6 +809,9 @@
 extern boolean bfd_elf32_arm_get_bfd_for_interworking
   PARAMS ((bfd *, struct bfd_link_info *));
 
+extern boolean bfd_elf32_arm_add_glue_sections_to_bfd
+  PARAMS ((bfd *, struct bfd_link_info *));
+
 /* TI COFF load page support.  */
 extern void bfd_ticoff_set_section_load_page
   PARAMS ((struct sec *, int));
@@ -816,10 +819,11 @@
 extern int bfd_ticoff_get_section_load_page
   PARAMS ((struct sec *));
 
-/* And more from the source.  */
+/* Extracted from init.c.  */
 void
 bfd_init PARAMS ((void));
 
+/* Extracted from opncls.c.  */
 bfd *
 bfd_openr PARAMS ((const char *filename, const char *target));
 
@@ -847,6 +851,7 @@
 boolean
 bfd_make_readable PARAMS ((bfd *abfd));
 
+/* Extracted from libbfd.c.  */
 
 /* Byte swapping macros for user section data.  */
 
@@ -987,6 +992,7 @@
 #define H_GET_S8 bfd_h_get_signed_8
 
 
+/* Extracted from section.c.  */
 /* This structure is used for a comdat section, as in PE.  A comdat
    section is associated with a particular symbol.  When the linker
    sees a comdat section, it keeps only one of the sections with a
@@ -1447,6 +1453,10 @@
 void
 _bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
 
+boolean
+bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
+
+/* Extracted from archures.c.  */
 enum bfd_architecture
 {
   bfd_arch_unknown,   /* File arch not known.  */
@@ -1562,6 +1572,7 @@
 #define bfd_mach_ppc_rs64ii    642
 #define bfd_mach_ppc_rs64iii   643
 #define bfd_mach_ppc_7400      7400
+#define bfd_mach_ppc_e500      500
   bfd_arch_rs6000,    /* IBM RS/6000 */
 #define bfd_mach_rs6k          0
 #define bfd_mach_rs6k_rs1      6001
@@ -1627,10 +1638,20 @@
 #define bfd_mach_am33          330
   bfd_arch_fr30,
 #define bfd_mach_fr30          0x46523330
+  bfd_arch_frv,
+#define bfd_mach_frv           0
+#define bfd_mach_frvsimple     1
+#define bfd_mach_fr300         300
+#define bfd_mach_fr400         400
+#define bfd_mach_frvtomcat     499     /* fr500 prototype */
+#define bfd_mach_fr500         500
   bfd_arch_mcore,
   bfd_arch_ia64,      /* HP/Intel ia64 */
 #define bfd_mach_ia64_elf64    0
 #define bfd_mach_ia64_elf32    1
+  bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
+#define bfd_mach_ip2022        0
+#define bfd_mach_ip2022ext     1
   bfd_arch_pj,
   bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
 #define bfd_mach_avr1          1
@@ -1720,6 +1741,7 @@
 bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
     unsigned long machine));
 
+/* Extracted from reloc.c.  */
 typedef enum bfd_reloc_status
 {
   /* No errors detected.  */
@@ -2145,6 +2167,21 @@
 STO_ALPHA_STD_GPLOAD.  */
   BFD_RELOC_ALPHA_BRSGP,
 
+/* Alpha thread-local storage relocations.  */
+  BFD_RELOC_ALPHA_TLSGD,
+  BFD_RELOC_ALPHA_TLSLDM,
+  BFD_RELOC_ALPHA_DTPMOD64,
+  BFD_RELOC_ALPHA_GOTDTPREL16,
+  BFD_RELOC_ALPHA_DTPREL64,
+  BFD_RELOC_ALPHA_DTPREL_HI16,
+  BFD_RELOC_ALPHA_DTPREL_LO16,
+  BFD_RELOC_ALPHA_DTPREL16,
+  BFD_RELOC_ALPHA_GOTTPREL16,
+  BFD_RELOC_ALPHA_TPREL64,
+  BFD_RELOC_ALPHA_TPREL_HI16,
+  BFD_RELOC_ALPHA_TPREL_LO16,
+  BFD_RELOC_ALPHA_TPREL16,
+
 /* Bits 27..2 of the relocation address shifted right 2 bits;
 simple reloc otherwise.  */
   BFD_RELOC_MIPS_JMP,
@@ -2199,6 +2236,17 @@
   BFD_RELOC_MIPS_RELGOT,
   BFD_RELOC_MIPS_JALR,
 
+/* Fujitsu Frv Relocations.  */
+  BFD_RELOC_FRV_LABEL16,
+  BFD_RELOC_FRV_LABEL24,
+  BFD_RELOC_FRV_LO16,
+  BFD_RELOC_FRV_HI16,
+  BFD_RELOC_FRV_GPREL12,
+  BFD_RELOC_FRV_GPRELU12,
+  BFD_RELOC_FRV_GPREL32,
+  BFD_RELOC_FRV_GPRELHI,
+  BFD_RELOC_FRV_GPRELLO,
+
 
 /* i386/elf relocations  */
   BFD_RELOC_386_GOT32,
@@ -2857,6 +2905,40 @@
 /* 32 bit rel. offset to GOT entry.  */
   BFD_RELOC_390_GOTENT,
 
+/* Scenix IP2K - 9-bit register number / data address  */
+  BFD_RELOC_IP2K_FR9,
+
+/* Scenix IP2K - 4-bit register/data bank number  */
+  BFD_RELOC_IP2K_BANK,
+
+/* Scenix IP2K - low 13 bits of instruction word address  */
+  BFD_RELOC_IP2K_ADDR16CJP,
+
+/* Scenix IP2K - high 3 bits of instruction word address  */
+  BFD_RELOC_IP2K_PAGE3,
+
+/* Scenix IP2K - ext/low/high 8 bits of data address  */
+  BFD_RELOC_IP2K_LO8DATA,
+  BFD_RELOC_IP2K_HI8DATA,
+  BFD_RELOC_IP2K_EX8DATA,
+
+/* Scenix IP2K - low/high 8 bits of instruction word address  */
+  BFD_RELOC_IP2K_LO8INSN,
+  BFD_RELOC_IP2K_HI8INSN,
+
+/* Scenix IP2K - even/odd PC modifier to modify snb pcl.0  */
+  BFD_RELOC_IP2K_PC_SKIP,
+
+/* Scenix IP2K - 16 bit word address in text section.  */
+  BFD_RELOC_IP2K_TEXT,
+
+/* Scenix IP2K - 7-bit sp or dp offset  */
+  BFD_RELOC_IP2K_FR_OFFSET,
+
+/* Scenix VPE4K coprocessor - data/insn-space addressing  */
+  BFD_RELOC_VPE4KMATH_DATA,
+  BFD_RELOC_VPE4KMATH_INSN,
+
 /* These two relocations are used by the linker to determine which of
 the entries in a C++ virtual function table are actually used.  When
 the --gc-sections option is given, the linker will zero out the entries
@@ -2959,17 +3041,48 @@
   BFD_RELOC_IA64_LTOFF_DTPREL22,
 
 /* Motorola 68HC11 reloc.
-This is the 8 bits high part of an absolute address.  */
+This is the 8 bit high part of an absolute address.  */
   BFD_RELOC_M68HC11_HI8,
 
 /* Motorola 68HC11 reloc.
-This is the 8 bits low part of an absolute address.  */
+This is the 8 bit low part of an absolute address.  */
   BFD_RELOC_M68HC11_LO8,
 
 /* Motorola 68HC11 reloc.
-This is the 3 bits of a value.  */
+This is the 3 bit of a value.  */
   BFD_RELOC_M68HC11_3B,
 
+/* Motorola 68HC11 reloc.
+This reloc marks the beginning of a jump/call instruction.
+It is used for linker relaxation to correctly identify beginning
+of instruction and change some branchs to use PC-relative
+addressing mode.  */
+  BFD_RELOC_M68HC11_RL_JUMP,
+
+/* Motorola 68HC11 reloc.
+This reloc marks a group of several instructions that gcc generates
+and for which the linker relaxation pass can modify and/or remove
+some of them.  */
+  BFD_RELOC_M68HC11_RL_GROUP,
+
+/* Motorola 68HC11 reloc.
+This is the 16-bit lower part of an address.  It is used for 'call'
+instruction to specify the symbol address without any special
+transformation (due to memory bank window).  */
+  BFD_RELOC_M68HC11_LO16,
+
+/* Motorola 68HC11 reloc.
+This is a 8-bit reloc that specifies the page number of an address.
+It is used by 'call' instruction to specify the page number of
+the symbol.  */
+  BFD_RELOC_M68HC11_PAGE,
+
+/* Motorola 68HC11 reloc.
+This is a 24-bit reloc that represents the address with a 16-bit
+value and a 8-bit page number.  The symbol address is transformed
+to follow the 16K memory bank of 68HC12 (seen as mapped in the window).  */
+  BFD_RELOC_M68HC11_24,
+
 /* These relocs are only used within the CRIS assembler.  They are not
 (at present) written to any object files.  */
   BFD_RELOC_CRIS_BDISP8,
@@ -3054,6 +3167,11 @@
   BFD_RELOC_XSTORMY16_REL_12,
   BFD_RELOC_XSTORMY16_24,
   BFD_RELOC_XSTORMY16_FPTR16,
+
+/* Relocations used by VAX ELF.  */
+  BFD_RELOC_VAX_GLOB_DAT,
+  BFD_RELOC_VAX_JMP_SLOT,
+  BFD_RELOC_VAX_RELATIVE,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -3062,6 +3180,7 @@
 const char *
 bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
 
+/* Extracted from syms.c.  */
 
 typedef struct symbol_cache_entry
 {
@@ -3234,6 +3353,7 @@
      BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                (ibfd, isymbol, obfd, osymbol))
 
+/* Extracted from bfd.c.  */
 struct _bfd
 {
   /* The filename the application opened the BFD with.  */
@@ -3533,6 +3653,9 @@
 #define bfd_merge_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 
+#define bfd_discard_group(abfd, sec) \
+       BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+
 #define bfd_link_hash_table_create(abfd) \
        BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
 
@@ -3572,8 +3695,9 @@
                  boolean, asymbol **));
 
 boolean
-bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
 
+/* Extracted from archive.c.  */
 symindex
 bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 
@@ -3583,6 +3707,7 @@
 bfd *
 bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
 
+/* Extracted from corefile.c.  */
 const char *
 bfd_core_file_failing_command PARAMS ((bfd *abfd));
 
@@ -3592,6 +3717,7 @@
 boolean
 core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
 
+/* Extracted from targets.c.  */
 #define BFD_SEND(bfd, message, arglist) \
                ((*((bfd)->xvec->message)) arglist)
 
@@ -3873,7 +3999,8 @@
 CONCAT2 (NAME,_bfd_final_link), \
 CONCAT2 (NAME,_bfd_link_split_section), \
 CONCAT2 (NAME,_bfd_gc_sections), \
-CONCAT2 (NAME,_bfd_merge_sections)
+CONCAT2 (NAME,_bfd_merge_sections), \
+CONCAT2 (NAME,_bfd_discard_group)
   int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
   bfd_byte *(*_bfd_get_relocated_section_contents)
     PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@@ -3908,6 +4035,9 @@
   /* Attempt to merge SEC_MERGE sections.  */
   boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
 
+  /* Discard members of a group.  */
+  boolean  (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+
   /* Routines to handle dynamic symbols and relocs.  */
 #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
 CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@@ -3946,6 +4076,7 @@
 const bfd_target *
 bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
 
+/* Extracted from format.c.  */
 boolean
 bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
 
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 0e72b0b..277c74a 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1185,6 +1185,9 @@
 .#define bfd_merge_sections(abfd, link_info) \
 .	BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 .
+.#define bfd_discard_group(abfd, sec) \
+.	BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+.
 .#define bfd_link_hash_table_create(abfd) \
 .	BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
 .
@@ -1331,27 +1334,27 @@
 	bfd_alt_mach_code
 
 SYNOPSIS
-	boolean bfd_alt_mach_code(bfd *abfd, int index);
+	boolean bfd_alt_mach_code(bfd *abfd, int alternative);
 
 DESCRIPTION
 
 	When more than one machine code number is available for the
 	same machine type, this function can be used to switch between
-	the preferred one (index == 0) and any others.  Currently,
+	the preferred one (alternative == 0) and any others.  Currently,
 	only ELF supports this feature, with up to two alternate
 	machine codes.
 */
 
 boolean
-bfd_alt_mach_code (abfd, index)
+bfd_alt_mach_code (abfd, alternative)
      bfd *abfd;
-     int index;
+     int alternative;
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     {
       int code;
 
-      switch (index)
+      switch (alternative)
 	{
 	case 0:
 	  code = get_elf_backend_data (abfd)->elf_machine_code;
diff --git a/bfd/binary.c b/bfd/binary.c
index 3a03901..fc972b2 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -337,6 +337,7 @@
 #define binary_bfd_relax_section bfd_generic_relax_section
 #define binary_bfd_gc_sections bfd_generic_gc_sections
 #define binary_bfd_merge_sections bfd_generic_merge_sections
+#define binary_bfd_discard_group bfd_generic_discard_group
 #define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define binary_bfd_link_just_syms _bfd_generic_link_just_syms
diff --git a/bfd/bout.c b/bfd/bout.c
index d02364e..37afbb9 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -956,7 +956,7 @@
      file_ptr offset;
      bfd_size_type count;
 {
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       /* Set by bfd.c handler.  */
       if (! aout_32_make_sections (abfd))
@@ -1456,6 +1456,7 @@
 #define b_out_bfd_link_split_section  _bfd_generic_link_split_section
 #define b_out_bfd_gc_sections  bfd_generic_gc_sections
 #define b_out_bfd_merge_sections  bfd_generic_merge_sections
+#define b_out_bfd_discard_group bfd_generic_discard_group
 
 #define aout_32_get_section_contents_in_window \
   _bfd_generic_get_section_contents_in_window
diff --git a/bfd/cache.c b/bfd/cache.c
index 4e5ef2e..df01a1f9 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -1,5 +1,5 @@
 /* BFD library -- caching of file descriptors.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001
+   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
 
@@ -277,7 +277,7 @@
       break;
     case both_direction:
     case write_direction:
-      if (abfd->opened_once == true)
+      if (abfd->opened_once)
 	{
 	  abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_RUB);
 	  if (abfd->iostream == NULL)
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index e1e193a..7c921ca 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -1,5 +1,5 @@
 /* BFD back-end for AMD 29000 COFF binaries.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by David Wood at New York University 7/8/91.
 
@@ -175,7 +175,7 @@
       insn = bfd_get_32 (abfd, hit_data);
       /* consth, part 2
 	 Now relocate the reference.  */
-      if (part1_consth_active == false)
+      if (! part1_consth_active)
 	{
 	  *error_message = (char *) _("Missing IHIHALF");
 	  return bfd_reloc_dangerous;
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 4056e2c..6d5ac17 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1,5 +1,5 @@
 /* BFD back-end for ALPHA Extended-Coff files.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
    Ian Lance Taylor <ian@cygnus.com>.
@@ -795,7 +795,7 @@
   gp = _bfd_get_gp_value (abfd);
   if (gp == 0)
     {
-      if (relocateable != false)
+      if (relocateable)
 	{
 	  asection *sec;
 	  bfd_vma lo;
@@ -2356,6 +2356,7 @@
 #define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
 #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
 #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
 
 const bfd_target ecoffalpha_little_vec =
 {
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 72c58a4..dbeaef1 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 386 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -117,7 +117,7 @@
 	     When we link PE and non-PE object files together to
 	     generate a non-PE executable, we have to compensate it
 	     here.  */
-	  if (howto->pc_relative == true && howto->pcrel_offset == true)
+	  if (howto->pc_relative && howto->pcrel_offset)
 	    diff = -(1 << howto->size);
 	  else
 	    diff = -reloc_entry->addend;
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 672b07f..69fcc69 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1,6 +1,6 @@
 /* BFD back-end for MIPS Extended-Coff files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -819,8 +819,7 @@
       output_bfd = symbol->section->output_section->owner;
     }
 
-  if (bfd_is_und_section (symbol->section)
-      && relocateable == false)
+  if (bfd_is_und_section (symbol->section) && ! relocateable)
     return bfd_reloc_undefined;
 
   /* We have to figure out the gp value, so that we can adjust the
@@ -830,10 +829,10 @@
      external symbol if we are producing relocateable output.  */
   gp = _bfd_get_gp_value (output_bfd);
   if (gp == 0
-      && (relocateable == false
+      && (! relocateable
 	  || (symbol->flags & BSF_SECTION_SYM) != 0))
     {
-      if (relocateable != false)
+      if (relocateable)
 	{
 	  /* Make up a value.  */
 	  gp = symbol->section->output_section->vma + 0x4000;
@@ -899,14 +898,14 @@
   /* Adjust val for the final section location and GP value.  If we
      are producing relocateable output, we don't want to do this for
      an external symbol.  */
-  if (relocateable == false
+  if (! relocateable
       || (symbol->flags & BSF_SECTION_SYM) != 0)
     val += relocation - gp;
 
   insn = (insn &~ (unsigned) 0xffff) | (val & 0xffff);
   bfd_put_32 (abfd, (bfd_vma) insn, (bfd_byte *) data + reloc_entry->address);
 
-  if (relocateable != false)
+  if (relocateable)
     reloc_entry->address += input_section->output_offset;
 
   /* Make sure it fit in 16 bits.  */
@@ -2116,10 +2115,9 @@
 	  bfd_size_type size;
 
 	  size = (bfd_size_type) sec->reloc_count * sizeof (long);
-	  offsets = (long *) bfd_alloc (abfd, size);
+	  offsets = (long *) bfd_zalloc (abfd, size);
 	  if (offsets == (long *) NULL)
 	    goto error_return;
-	  memset (offsets, 0, (size_t) size);
 	  section_tdata->offsets = offsets;
 	}
 
@@ -2602,6 +2600,8 @@
 /* Merging of sections is not done.  */
 #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
 
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+
 extern const bfd_target ecoff_big_vec;
 
 const bfd_target ecoff_little_vec =
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index eafd9af..c82b9af 100644
--- a/bfd/coff-or32.c
+++ b/bfd/coff-or32.c
@@ -187,7 +187,7 @@
 
       /* consth, part 2 
          Now relocate the reference.  */
-      if (part1_consth_active == false) 
+      if (! part1_consth_active) 
         {
           *error_message = (char *) "Missing IHIHALF";
           return bfd_reloc_dangerous;
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index f560c7f..ebed743 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -83,7 +83,7 @@
 #define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
 #ifdef AIX_CORE
 extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd));
-extern boolean rs6000coff_core_file_matches_executable_p 
+extern boolean rs6000coff_core_file_matches_executable_p
   PARAMS ((bfd *cbfd, bfd *ebfd));
 extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
 extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
@@ -148,16 +148,16 @@
   PARAMS ((bfd *, struct internal_ldhdr *));
 static bfd_vma xcoff_loader_reloc_offset
   PARAMS ((bfd *, struct internal_ldhdr *));
-static boolean xcoff_generate_rtinit 
-  PARAMS((bfd *, const char *, const char *, boolean));
-static boolean do_pad PARAMS((bfd *, unsigned int));
-static boolean do_copy PARAMS((bfd *, bfd *));
+static boolean xcoff_generate_rtinit
+  PARAMS ((bfd *, const char *, const char *, boolean));
+static boolean do_pad PARAMS ((bfd *, unsigned int));
+static boolean do_copy PARAMS ((bfd *, bfd *));
 static boolean do_shared_object_padding PARAMS ((bfd *, bfd *, ufile_ptr *, int));
 
 /* Relocation functions */
 static boolean xcoff_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
 
-static boolean xcoff_complain_overflow_dont_func 
+static boolean xcoff_complain_overflow_dont_func
   PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
 static boolean xcoff_complain_overflow_bitfield_func
   PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
@@ -167,40 +167,40 @@
   PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
 
 boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-     (XCOFF_RELOC_FUNCTION_ARGS) =
+  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
 {
-  xcoff_reloc_type_pos,  /* R_POS   (0x00) */
-  xcoff_reloc_type_neg,  /* R_NEG   (0x01) */
-  xcoff_reloc_type_rel,  /* R_REL   (0x02) */
-  xcoff_reloc_type_toc,  /* R_TOC   (0x03) */
+  xcoff_reloc_type_pos,	 /* R_POS   (0x00) */
+  xcoff_reloc_type_neg,	 /* R_NEG   (0x01) */
+  xcoff_reloc_type_rel,	 /* R_REL   (0x02) */
+  xcoff_reloc_type_toc,	 /* R_TOC   (0x03) */
   xcoff_reloc_type_fail, /* R_RTB   (0x04) */
-  xcoff_reloc_type_toc,  /* R_GL    (0x05) */
-  xcoff_reloc_type_toc,  /* R_TCL   (0x06) */
-  xcoff_reloc_type_fail, /*         (0x07) */
-  xcoff_reloc_type_ba,   /* R_BA    (0x08) */
-  xcoff_reloc_type_fail, /*         (0x09) */
-  xcoff_reloc_type_br,   /* R_BR    (0x0a) */
-  xcoff_reloc_type_fail, /*         (0x0b) */
-  xcoff_reloc_type_pos,  /* R_RL    (0x0c) */
-  xcoff_reloc_type_pos,  /* R_RLA   (0x0d) */
-  xcoff_reloc_type_fail, /*         (0x0e) */
+  xcoff_reloc_type_toc,	 /* R_GL    (0x05) */
+  xcoff_reloc_type_toc,	 /* R_TCL   (0x06) */
+  xcoff_reloc_type_fail, /*	    (0x07) */
+  xcoff_reloc_type_ba,	 /* R_BA    (0x08) */
+  xcoff_reloc_type_fail, /*	    (0x09) */
+  xcoff_reloc_type_br,	 /* R_BR    (0x0a) */
+  xcoff_reloc_type_fail, /*	    (0x0b) */
+  xcoff_reloc_type_pos,	 /* R_RL    (0x0c) */
+  xcoff_reloc_type_pos,	 /* R_RLA   (0x0d) */
+  xcoff_reloc_type_fail, /*	    (0x0e) */
   xcoff_reloc_type_noop, /* R_REF   (0x0f) */
-  xcoff_reloc_type_fail, /*         (0x10) */
-  xcoff_reloc_type_fail, /*         (0x11) */
-  xcoff_reloc_type_toc,  /* R_TRL   (0x12) */
-  xcoff_reloc_type_toc,  /* R_TRLA  (0x13) */
+  xcoff_reloc_type_fail, /*	    (0x10) */
+  xcoff_reloc_type_fail, /*	    (0x11) */
+  xcoff_reloc_type_toc,	 /* R_TRL   (0x12) */
+  xcoff_reloc_type_toc,	 /* R_TRLA  (0x13) */
   xcoff_reloc_type_fail, /* R_RRTBI (0x14) */
   xcoff_reloc_type_fail, /* R_RRTBA (0x15) */
-  xcoff_reloc_type_ba,   /* R_CAI   (0x16) */
+  xcoff_reloc_type_ba,	 /* R_CAI   (0x16) */
   xcoff_reloc_type_crel, /* R_CREL  (0x17) */
-  xcoff_reloc_type_ba,   /* R_RBA   (0x18) */
-  xcoff_reloc_type_ba,   /* R_RBAC  (0x19) */
-  xcoff_reloc_type_br,   /* R_RBR   (0x1a) */
-  xcoff_reloc_type_ba,   /* R_RBRC  (0x1b) */
+  xcoff_reloc_type_ba,	 /* R_RBA   (0x18) */
+  xcoff_reloc_type_ba,	 /* R_RBAC  (0x19) */
+  xcoff_reloc_type_br,	 /* R_RBR   (0x1a) */
+  xcoff_reloc_type_ba,	 /* R_RBRC  (0x1b) */
 };
 
 boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
-     (XCOFF_COMPLAIN_FUNCTION_ARGS) = 
+  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)) =
 {
   xcoff_complain_overflow_dont_func,
   xcoff_complain_overflow_bitfield_func,
@@ -237,7 +237,7 @@
   xcoff_data (abfd)->debug_indices = NULL;
 
   /* text section alignment is different than the default */
-  /* xcoff_data (abfd)->text_align_power = 5; */
+  bfd_xcoff_text_align_power (abfd) = 2;
 
   return true;
 }
@@ -278,8 +278,8 @@
       else
 	ox->snentry = sec->output_section->target_index;
     }
-  ox->text_align_power = ix->text_align_power;
-  ox->data_align_power = ix->data_align_power;
+  bfd_xcoff_text_align_power (obfd) = bfd_xcoff_text_align_power (ibfd);
+  bfd_xcoff_data_align_power (obfd) = bfd_xcoff_data_align_power (ibfd);
   ox->modtype = ix->modtype;
   ox->cputype = ix->cputype;
   ox->maxdata = ix->maxdata;
@@ -302,7 +302,7 @@
 
 void
 _bfd_xcoff_swap_sym_in (abfd, ext1, in1)
-     bfd            *abfd;
+     bfd *abfd;
      PTR ext1;
      PTR in1;
 {
@@ -311,7 +311,7 @@
 
   if (ext->e.e_name[0] != 0)
     {
-      memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
+      memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
     }
   else
     {
@@ -328,16 +328,16 @@
 
 unsigned int
 _bfd_xcoff_swap_sym_out (abfd, inp, extp)
-     bfd       *abfd;
-     PTR	inp;
-     PTR	extp;
+     bfd *abfd;
+     PTR inp;
+     PTR extp;
 {
   struct internal_syment *in = (struct internal_syment *)inp;
   SYMENT *ext =(SYMENT *)extp;
 
   if (in->_n._n_name[0] != 0)
     {
-      memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
+      memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
     }
   else
     {
@@ -355,13 +355,13 @@
 
 void
 _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
-     bfd            *abfd;
-     PTR 	      ext1;
-     int             type;
-     int             class;
-     int	      indx;
-     int	      numaux;
-     PTR 	      in1;
+     bfd *abfd;
+     PTR ext1;
+     int type;
+     int class;
+     int indx;
+     int numaux;
+     PTR in1;
 {
   AUXENT * ext = (AUXENT *)ext1;
   union internal_auxent *in = (union internal_auxent *)in1;
@@ -418,7 +418,7 @@
 	  in->x_scn.x_nreloc = H_GET_16 (abfd, ext->x_scn.x_nreloc);
 	  in->x_scn.x_nlinno = H_GET_16 (abfd, ext->x_scn.x_nlinno);
 	  /* PE defines some extra fields; we zero them out for
-             safety.  */
+	     safety.  */
 	  in->x_scn.x_checksum = 0;
 	  in->x_scn.x_associated = 0;
 	  in->x_scn.x_comdat = 0;
@@ -483,7 +483,7 @@
   union internal_auxent *in = (union internal_auxent *)inp;
   AUXENT *ext = (AUXENT *)extp;
 
-  memset((PTR)ext, 0, bfd_coff_auxesz (abfd));
+  memset ((PTR)ext, 0, bfd_coff_auxesz (abfd));
   switch (class)
     {
     case C_FILE:
@@ -578,375 +578,390 @@
 reloc_howto_type xcoff_howto_table[] =
 {
   /* Standard 32 bit relocation.  */
-  HOWTO (R_POS,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_POS,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_POS",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,            /* src_mask */
-	 0xffffffff,            /* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_POS",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* 32 bit relocation, but store negative value.  */
-  HOWTO (R_NEG,	                /* type */
-	 0,	                /* rightshift */
-	 -2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_NEG,			/* type */
+	 0,			/* rightshift */
+	 -2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_NEG",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,            /* src_mask */
-	 0xffffffff,            /* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_NEG",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* 32 bit PC relative relocation.  */
-  HOWTO (R_REL,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 true,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_REL,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 true,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_REL",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,            /* src_mask */
-	 0xffffffff,            /* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_REL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* 16 bit TOC relative relocation.  */
-  HOWTO (R_TOC,	                /* type */
-	 0,	                /* rightshift */
-	 1,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_TOC,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_TOC",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_TOC",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* I don't really know what this is.  */
-  HOWTO (R_RTB,	                /* type */
-	 1,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RTB,			/* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RTB",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,	        /* src_mask */
-	 0xffffffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RTB",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* External TOC relative symbol.  */
-  HOWTO (R_GL,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_GL,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_GL",                /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_GL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
-  /* Local TOC relative symbol.  */
-  HOWTO (R_TCL,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  /* Local TOC relative symbol.	 */
+  HOWTO (R_TCL,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_TCL",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_TCL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (7),
 
   /* Non modifiable absolute branch.  */
-  HOWTO (R_BA,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 26,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_BA,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_BA_26",             /* name */
-	 true,	                /* partial_inplace */
-	 0x3fffffc,	        /* src_mask */
-	 0x3fffffc,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_BA_26",		/* name */
+	 true,			/* partial_inplace */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (9),
 
   /* Non modifiable relative branch.  */
-  HOWTO (R_BR,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 26,	                /* bitsize */
-	 true,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_BR,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 true,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_BR",                /* name */
-	 true,	                /* partial_inplace */
-	 0x3fffffc,	        /* src_mask */
-	 0x3fffffc,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_BR",		/* name */
+	 true,			/* partial_inplace */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (0xb),
 
   /* Indirect load.  */
-  HOWTO (R_RL,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RL,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RL",                /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Load address.  */
-  HOWTO (R_RLA,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RLA,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RLA",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RLA",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (0xe),
 
   /* Non-relocating reference.  */
-  HOWTO (R_REF,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_REF",               /* name */
-	 false,	                /* partial_inplace */
-	 0,		        /* src_mask */
-	 0,     	   	/* dst_mask */
-	 false),                /* pcrel_offset */
+  HOWTO (R_REF,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "R_REF",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (0x10),
   EMPTY_HOWTO (0x11),
 
   /* TOC relative indirect load.  */
-  HOWTO (R_TRL,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_TRL,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_TRL",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_TRL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* TOC relative load address.  */
-  HOWTO (R_TRLA,                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_TRLA,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_TRLA",              /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_TRLA",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable relative branch.  */
-  HOWTO (R_RRTBI,                /* type */
-	 1,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RRTBI,		 /* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RRTBI",             /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,	        /* src_mask */
-	 0xffffffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RRTBI",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable absolute branch.  */
-  HOWTO (R_RRTBA,                /* type */
-	 1,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RRTBA,		 /* type */
+	 1,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RRTBA",             /* name */
-	 true,	                /* partial_inplace */
-	 0xffffffff,	        /* src_mask */
-	 0xffffffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RRTBA",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable call absolute indirect.  */
-  HOWTO (R_CAI,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_CAI,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_CAI",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_CAI",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable call relative.  */
-  HOWTO (R_CREL,                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_CREL,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_CREL",              /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_CREL",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable branch absolute.  */
-  HOWTO (R_RBA,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 26,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBA,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBA",               /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBA",		/* name */
+	 true,			/* partial_inplace */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable branch absolute.  */
-  HOWTO (R_RBAC,                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 32,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBAC,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBAC",              /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBAC",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable branch relative.  */
-  HOWTO (R_RBR,	                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 26,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBR,			/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBR_26",            /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBR_26",		/* name */
+	 true,			/* partial_inplace */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable branch absolute.  */
-  HOWTO (R_RBRC,                /* type */
-	 0,	                /* rightshift */
-	 2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBRC,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBRC",              /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBRC",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* 16 bit Non modifiable absolute branch.  */
-  HOWTO (R_BA,	                /* type */
-	 0,	                /* rightshift */
-	 1,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_BA,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_bitfield, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_BA_16",             /* name */
-	 true,	                /* partial_inplace */
-	 0xfffc,	        /* src_mask */
-	 0xfffc,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_BA_16",		/* name */
+	 true,			/* partial_inplace */
+	 0xfffc,		/* src_mask */
+	 0xfffc,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
   /* Modifiable branch relative.  */
-  HOWTO (R_RBR,	                /* type */
-	 0,	                /* rightshift */
-	 1,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBR,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBR_16",            /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBR_16",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Modifiable branch relative.  */
+  HOWTO (R_RBA,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "R_RBA_16",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 
 };
 
@@ -960,16 +975,18 @@
 
   /* Default howto layout works most of the time */
   relent->howto = &xcoff_howto_table[internal->r_type];
-  
+
   /* Special case some 16 bit reoloc */
   if (15 == (internal->r_size & 0x1f))
     {
-      if (R_BA == internal->r_type) 
+      if (R_BA == internal->r_type)
 	relent->howto = &xcoff_howto_table[0x1c];
-      else if (R_RBR == internal->r_type) 
+      else if (R_RBR == internal->r_type)
 	relent->howto = &xcoff_howto_table[0x1d];
+      else if (R_RBA == internal->r_type)
+	relent->howto = &xcoff_howto_table[0x1e];
     }
-  
+
   /* The r_size field of an XCOFF reloc encodes the bitsize of the
      relocation, as well as indicating whether it is signed or not.
      Doublecheck that the relocation information gathered from the
@@ -979,10 +996,6 @@
       && (relent->howto->bitsize
 	  != ((unsigned int) internal->r_size & 0x1f) + 1))
     abort ();
-
-  /* Put a meaningful value in addend */
-  relent->addend = (internal->r_size & 0x80) ? - internal->r_vaddr 
-    : internal->r_vaddr;
 }
 
 reloc_howto_type *
@@ -1226,10 +1239,11 @@
 _bfd_xcoff_archive_p (abfd)
      bfd *abfd;
 {
+  struct artdata *tdata_hold;
   char magic[SXCOFFARMAG];
-  bfd_size_type amt;
+  bfd_size_type amt = SXCOFFARMAG;
 
-  if (bfd_bread ((PTR) magic, (bfd_size_type) SXCOFFARMAG, abfd) != SXCOFFARMAG)
+  if (bfd_bread ((PTR) magic, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
@@ -1243,13 +1257,12 @@
       return NULL;
     }
 
-  /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
-     involves a cast, we can't do it as the left operand of
-     assignment.  */
+  tdata_hold = bfd_ardata (abfd);
+
   amt = sizeof (struct artdata);
-  abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+  bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == (struct artdata *) NULL)
-    return NULL;
+    goto error_ret_restore;
 
   bfd_ardata (abfd)->cache = NULL;
   bfd_ardata (abfd)->archive_head = NULL;
@@ -1266,13 +1279,12 @@
       memcpy (hdr.magic, magic, SXCOFFARMAG);
 
       /* Now read the rest of the file header.  */
-      if (bfd_bread ((PTR) &hdr.memoff,
-		    (bfd_size_type) SIZEOF_AR_FILE_HDR - SXCOFFARMAG, abfd)
-	  != SIZEOF_AR_FILE_HDR - SXCOFFARMAG)
+      amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG;
+      if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
 	{
 	  if (bfd_get_error () != bfd_error_system_call)
 	    bfd_set_error (bfd_error_wrong_format);
-	  return NULL;
+	  goto error_ret;
 	}
 
       bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
@@ -1281,7 +1293,7 @@
       amt = SIZEOF_AR_FILE_HDR;
       bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
       if (bfd_ardata (abfd)->tdata == NULL)
-	return NULL;
+	goto error_ret;
 
       memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR);
     }
@@ -1294,33 +1306,32 @@
       memcpy (hdr.magic, magic, SXCOFFARMAG);
 
       /* Now read the rest of the file header.  */
-      if (bfd_bread ((PTR) &hdr.memoff,
-		    (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG, abfd)
-	  != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
+      amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
+      if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
 	{
 	  if (bfd_get_error () != bfd_error_system_call)
 	    bfd_set_error (bfd_error_wrong_format);
-	  return NULL;
+	  goto error_ret;
 	}
 
-      /* XXX This actually has to be a call to strtoll (at least on 32-bit
-	 machines) since the field width is 20 and there numbers with more
-	 than 32 bits can be represented.  */
-      bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
-						      (char **) NULL, 10);
+      bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff,
+							    (const char **) 0,
+							    10);
 
       amt = SIZEOF_AR_FILE_HDR_BIG;
       bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
       if (bfd_ardata (abfd)->tdata == NULL)
-	return NULL;
+	goto error_ret;
 
       memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG);
     }
 
   if (! _bfd_xcoff_slurp_armap (abfd))
     {
+    error_ret:
       bfd_release (abfd, bfd_ardata (abfd));
-      abfd->tdata.aout_ar_data = (struct artdata *) NULL;
+    error_ret_restore:
+      bfd_ardata (abfd) = tdata_hold;
       return NULL;
     }
 
@@ -1633,7 +1644,7 @@
 
 #define PRINT12(d, v) \
   sprintf (buff20, FMT12, (int)(v)), \
-  memcpy ((void *) (d), buff20, 12) 
+  memcpy ((void *) (d), buff20, 12)
 
 #define PRINT12_OCTAL(d, v) \
   sprintf (buff20, FMT12_OCTAL, (unsigned int)(v)), \
@@ -1641,7 +1652,7 @@
 
 #define PRINT4(d, v) \
   sprintf (buff20, FMT4, (int)(v)), \
-  memcpy ((void *) (d), buff20, 4) 
+  memcpy ((void *) (d), buff20, 4)
 
 #define READ20(d, v) \
   buff20[20] = 0, \
@@ -1690,7 +1701,7 @@
 
   if (remaining)
     {
-      if (bfd_bread (buffer, remaining, in_bfd) != remaining 
+      if (bfd_bread (buffer, remaining, in_bfd) != remaining
 	  || bfd_bwrite (buffer, remaining, out_bfd) != remaining)
 	return false;
     }
@@ -1698,7 +1709,7 @@
   return true;
 }
 
-static boolean 
+static boolean
 do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
      bfd *out_bfd;
      bfd *in_bfd;
@@ -1713,7 +1724,6 @@
       int text_align_power;
 
       text_align_power = bfd_xcoff_text_align_power (in_bfd);
-      BFD_ASSERT (2 < text_align_power);
 
       pad = 1 << text_align_power;
       pad -= (*offset + ar_header_size) & (pad - 1);
@@ -1741,7 +1751,7 @@
   bfd *current_bfd;
   size_t string_length;
   ufile_ptr nextoff, prevoff;
-  
+
   /* First, we look through the symbols and work out which are
      from 32-bit objects and which from 64-bit ones.  */
   sym_32 = sym_64 = str_32 = str_64 = 0;
@@ -1786,51 +1796,50 @@
 
   BFD_ASSERT (nextoff == bfd_tell (abfd));
 
-  /* Write out the symbol table.  
-     Layout : 
-     
+  /* Write out the symbol table.
+     Layout :
+
      standard big archive header
-     0x0000                   ar_size   [0x14]
-     0x0014                   ar_nxtmem [0x14]
-     0x0028                   ar_prvmem [0x14]
-     0x003C                   ar_date   [0x0C]
-     0x0048                   ar_uid    [0x0C]
-     0x0054                   ar_gid    [0x0C]
-     0x0060                   ar_mod    [0x0C]
-     0x006C                   ar_namelen[0x04]
-     0x0070                   ar_fmag   [SXCOFFARFMAG]
-     
-     Symbol table 
-     0x0072                   num_syms  [0x08], binary
-     0x0078                   offsets   [0x08 * num_syms], binary
-     0x0086 + 0x08 * num_syms names     [??]
-     ??                       pad to even bytes.
+     0x0000		      ar_size	[0x14]
+     0x0014		      ar_nxtmem [0x14]
+     0x0028		      ar_prvmem [0x14]
+     0x003C		      ar_date	[0x0C]
+     0x0048		      ar_uid	[0x0C]
+     0x0054		      ar_gid	[0x0C]
+     0x0060		      ar_mod	[0x0C]
+     0x006C		      ar_namelen[0x04]
+     0x0070		      ar_fmag	[SXCOFFARFMAG]
+
+     Symbol table
+     0x0072		      num_syms	[0x08], binary
+     0x0078		      offsets	[0x08 * num_syms], binary
+     0x0086 + 0x08 * num_syms names	[??]
+     ??			      pad to even bytes.
   */
 
-  if (sym_32) 
+  if (sym_32)
     {
       struct xcoff_ar_hdr_big *hdr;
       bfd_byte *symbol_table;
       bfd_byte *st;
       file_ptr fileoff;
 
-      bfd_vma symbol_table_size = 
+      bfd_vma symbol_table_size =
 	SIZEOF_AR_HDR_BIG
 	+ SXCOFFARFMAG
-	+ 8 
-	+ 8 * sym_32 
+	+ 8
+	+ 8 * sym_32
 	+ str_32 + (str_32 & 1);
 
       symbol_table = NULL;
-      symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+      symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
       if (symbol_table == NULL)
 	return false;
-      memset (symbol_table, 0, symbol_table_size);
 
       hdr = (struct xcoff_ar_hdr_big *) symbol_table;
-	
+
       PRINT20 (hdr->size, 8 + 8 * sym_32 + str_32 + (str_32 & 1));
-	
+
       if (sym_64)
 	PRINT20 (hdr->nextoff, nextoff + symbol_table_size);
       else
@@ -1849,7 +1858,7 @@
 
       bfd_h_put_64 (abfd, sym_32, st);
       st += 8;
-      
+
       /* loop over the 32 bit offsets */
       current_bfd = abfd->archive_head;
       if (current_bfd != NULL)
@@ -1908,28 +1917,27 @@
       prevoff = nextoff;
       nextoff = nextoff + symbol_table_size;
     }
-  else 
+  else
     PRINT20 (fhdr->symoff, 0);
-  
-  if (sym_64) 
+
+  if (sym_64)
     {
       struct xcoff_ar_hdr_big *hdr;
       bfd_byte *symbol_table;
       bfd_byte *st;
       file_ptr fileoff;
 
-      bfd_vma symbol_table_size = 
+      bfd_vma symbol_table_size =
 	SIZEOF_AR_HDR_BIG
 	+ SXCOFFARFMAG
-	+ 8 
-	+ 8 * sym_64 
+	+ 8
+	+ 8 * sym_64
 	+ str_64 + (str_64 & 1);
 
       symbol_table = NULL;
-      symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+      symbol_table = (bfd_byte *) bfd_zmalloc (symbol_table_size);
       if (symbol_table == NULL)
 	return false;
-      memset (symbol_table, 0, symbol_table_size);
 
       hdr = (struct xcoff_ar_hdr_big *) symbol_table;
 
@@ -1948,7 +1956,7 @@
 
       bfd_h_put_64 (abfd, sym_64, st);
       st += 8;
-      
+
       /* loop over the 64 bit offsets */
       current_bfd = abfd->archive_head;
       if (current_bfd != NULL)
@@ -2006,9 +2014,9 @@
 
       PRINT20 (fhdr->symoff64, nextoff);
     }
-  else 
+  else
     PRINT20 (fhdr->symoff64, 0);
-  
+
   return true;
 }
 
@@ -2124,7 +2132,7 @@
       sprintf (ahdrp->namlen, "%ld", (long) namlen);
 
       /* If the length of the name is odd, we write out the null byte
-         after the name as well.  */
+	 after the name as well.  */
       namlen = (namlen + 1) &~ (bfd_size_type) 1;
 
       remaining = arelt_size (sub);
@@ -2159,7 +2167,7 @@
 
       if (! do_copy (abfd, sub))
 	return false;
-      
+
       if (! do_pad (abfd, size & 1))
 	return false;
     }
@@ -2172,9 +2180,9 @@
   sprintf (fhdr.memoff, "%ld", (long) nextoff);
 
   memset (&ahdr, 0, sizeof ahdr);
-  sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE + 
-				     count * XCOFFARMAG_ELEMENT_SIZE + 
-				     total_namlen));
+  sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE
+				     + count * XCOFFARMAG_ELEMENT_SIZE
+				     + total_namlen));
   sprintf (ahdr.prevoff, "%ld", (long) prevoff);
   sprintf (ahdr.date, "%d", 0);
   sprintf (ahdr.uid, "%d", 0);
@@ -2214,7 +2222,7 @@
   for (i = 0; i < (size_t) count; i++)
     {
       sprintf (decbuf, "%-12ld", (long) offsets[i]);
-      if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, 
+      if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
 		      abfd) != XCOFFARMAG_ELEMENT_SIZE)
 	return false;
     }
@@ -2282,12 +2290,12 @@
 
   if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0)
     return false;
-  
+
   /* Calculate count and total_namlen.  */
   makemap = bfd_has_map (abfd);
   hasobjects = false;
-  for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0; 
-       current_bfd != NULL; 
+  for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
+       current_bfd != NULL;
        current_bfd = current_bfd->next, count++)
     {
       total_namlen += strlen (normalize_filename (current_bfd)) + 1;
@@ -2308,8 +2316,8 @@
 
   prevoff = 0;
   nextoff = SIZEOF_AR_FILE_HDR_BIG;
-  for (current_bfd = abfd->archive_head, i = 0; 
-       current_bfd != NULL; 
+  for (current_bfd = abfd->archive_head, i = 0;
+       current_bfd != NULL;
        current_bfd = current_bfd->next, i++)
     {
       const char *name;
@@ -2331,7 +2339,7 @@
 
 	  ahdrp = &ahdr;
 	  /* XXX This should actually be a call to stat64 (at least on
-	     32-bit machines).  
+	     32-bit machines).
 	     XXX This call will fail if the original object is not found.  */
 	  if (stat (bfd_get_filename (current_bfd), &s) != 0)
 	    {
@@ -2360,7 +2368,7 @@
       PRINT4 (ahdrp->namlen, namlen);
 
       /* If the length of the name is odd, we write out the null byte
-         after the name as well.  */
+	 after the name as well.  */
       namlen = (namlen + 1) &~ (bfd_size_type) 1;
 
       remaining = arelt_size (current_bfd);
@@ -2375,7 +2383,7 @@
 	 Their text section needs to be aligned wrt the archive file position.
 	 This requires extra padding before the archive header.  */
       if (! do_shared_object_padding (abfd, current_bfd, & nextoff,
-				      SIZEOF_AR_HDR_BIG + namlen 
+				      SIZEOF_AR_HDR_BIG + namlen
 				      + SXCOFFARFMAG))
 	return false;
 
@@ -2389,7 +2397,7 @@
       if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
 	   != SIZEOF_AR_HDR_BIG)
 	  || bfd_bwrite ((PTR) name, (bfd_size_type) namlen, abfd) != namlen
-	  || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, 
+	  || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG,
 			  abfd) != SXCOFFARFMAG))
 	return false;
 
@@ -2397,8 +2405,8 @@
 	return false;
 
       if (! do_copy (abfd, current_bfd))
-  	return false;
-  
+	return false;
+
       if (! do_pad (abfd, size & 1))
 	return false;
     }
@@ -2409,25 +2417,25 @@
       PRINT20 (fhdr.lastmemoff, prevoff);
     }
 
-  /* Write out the member table.  
-     Layout : 
+  /* Write out the member table.
+     Layout :
 
      standard big archive header
-     0x0000                   ar_size   [0x14]
-     0x0014                   ar_nxtmem [0x14]
-     0x0028                   ar_prvmem [0x14]
-     0x003C                   ar_date   [0x0C]
-     0x0048                   ar_uid    [0x0C]
-     0x0054                   ar_gid    [0x0C]
-     0x0060                   ar_mod    [0x0C]
-     0x006C                   ar_namelen[0x04]
-     0x0070                   ar_fmag   [0x02]
+     0x0000		      ar_size	[0x14]
+     0x0014		      ar_nxtmem [0x14]
+     0x0028		      ar_prvmem [0x14]
+     0x003C		      ar_date	[0x0C]
+     0x0048		      ar_uid	[0x0C]
+     0x0054		      ar_gid	[0x0C]
+     0x0060		      ar_mod	[0x0C]
+     0x006C		      ar_namelen[0x04]
+     0x0070		      ar_fmag	[0x02]
 
-     Member table 
-     0x0072                   count     [0x14]
-     0x0086                   offsets   [0x14 * counts]
-     0x0086 + 0x14 * counts   names     [??]
-     ??                       pad to even bytes.
+     Member table
+     0x0072		      count	[0x14]
+     0x0086		      offsets	[0x14 * counts]
+     0x0086 + 0x14 * counts   names	[??]
+     ??			      pad to even bytes.
    */
 
   BFD_ASSERT (nextoff == bfd_tell (abfd));
@@ -2440,17 +2448,16 @@
 
   member_table_size += member_table_size & 1;
   member_table = NULL;
-  member_table = (bfd_byte *) bfd_malloc (member_table_size);
+  member_table = (bfd_byte *) bfd_zmalloc (member_table_size);
   if (member_table == NULL)
     return false;
-  memset (member_table, 0, member_table_size);
 
   hdr = (struct xcoff_ar_hdr_big *) member_table;
 
-  PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE + 
-		       count * XCOFFARMAGBIG_ELEMENT_SIZE + 
-		       total_namlen + (total_namlen & 1)));
-  if (makemap && hasobjects) 
+  PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE
+		       + count * XCOFFARMAGBIG_ELEMENT_SIZE
+		       + total_namlen + (total_namlen & 1)));
+  if (makemap && hasobjects)
     PRINT20 (hdr->nextoff, nextoff + member_table_size);
   else
     PRINT20 (hdr->nextoff, 0);
@@ -2460,7 +2467,7 @@
   PRINT12 (hdr->gid, 0);
   PRINT12 (hdr->mode, 0);
   PRINT4 (hdr->namlen, 0);
-  
+
   mt = member_table + SIZEOF_AR_HDR_BIG;
   memcpy (mt, XCOFFARFMAG, SXCOFFARFMAG);
   mt += SXCOFFARFMAG;
@@ -2473,23 +2480,23 @@
       mt += XCOFFARMAGBIG_ELEMENT_SIZE;
     }
 
-  if (count) 
+  if (count)
     {
       free (offsets);
       offsets = NULL;
     }
 
-  for (current_bfd = abfd->archive_head; current_bfd != NULL; 
+  for (current_bfd = abfd->archive_head; current_bfd != NULL;
        current_bfd = current_bfd->next)
     {
       const char *name;
       size_t namlen;
 
       name = normalize_filename (current_bfd);
-      namlen = sprintf(mt, "%s", name);
+      namlen = sprintf (mt, "%s", name);
       mt += namlen + 1;
     }
-  
+
   if (bfd_bwrite (member_table, member_table_size, abfd) != member_table_size)
     return false;
 
@@ -2503,7 +2510,7 @@
 
   /* Write out the armap, if appropriate.  */
 
-  if (! makemap || ! hasobjects) 
+  if (! makemap || ! hasobjects)
     PRINT20 (fhdr.symoff, 0);
   else
     {
@@ -2511,7 +2518,7 @@
 
       /* Save nextoff in fhdr.symoff so the armap routine can use it.  */
       PRINT20 (fhdr.symoff, nextoff);
-      
+
       bfd_ardata (abfd)->tdata = (PTR) &fhdr;
       if (! _bfd_compute_and_write_armap (abfd, 0))
 	return false;
@@ -2520,10 +2527,10 @@
   /* Write out the archive file header.  */
 
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
-      || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG, 
+      || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
 		      abfd) != SIZEOF_AR_FILE_HDR_BIG))
     return false;
-  
+
   return true;
 }
 
@@ -2718,8 +2725,8 @@
 }
 
 
-boolean 
-xcoff_reloc_type_noop (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_noop (input_bfd, input_section, output_bfd, rel, sym, howto,
 		       val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2735,8 +2742,8 @@
   return true;
 }
 
-boolean 
-xcoff_reloc_type_fail (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_fail (input_bfd, input_section, output_bfd, rel, sym, howto,
 		       val, addend, relocation, contents)
      bfd *input_bfd;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2756,8 +2763,8 @@
   return false;
 }
 
-boolean 
-xcoff_reloc_type_pos (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_pos (input_bfd, input_section, output_bfd, rel, sym, howto,
 		      val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2774,8 +2781,8 @@
   return true;
 }
 
-boolean 
-xcoff_reloc_type_neg (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_neg (input_bfd, input_section, output_bfd, rel, sym, howto,
 		      val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2792,8 +2799,8 @@
   return true;
 }
 
-boolean 
-xcoff_reloc_type_rel (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_rel (input_bfd, input_section, output_bfd, rel, sym, howto,
 		      val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section;
@@ -2812,13 +2819,13 @@
   addend += input_section->vma;
 
   *relocation = val + addend;
-  *relocation -= (input_section->output_section->vma + 
-		  input_section->output_offset);
+  *relocation -= (input_section->output_section->vma
+		  + input_section->output_offset);
   return true;
 }
 
-boolean 
-xcoff_reloc_type_toc (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_toc (input_bfd, input_section, output_bfd, rel, sym, howto,
 		      val, addend, relocation, contents)
      bfd *input_bfd;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2833,7 +2840,7 @@
 {
   struct xcoff_link_hash_entry *h;
 
-  if (0 > rel->r_symndx) 
+  if (0 > rel->r_symndx)
     return false;
 
   h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
@@ -2849,19 +2856,19 @@
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	}
-      
+
       BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0);
       val = (h->toc_section->output_section->vma
 	      + h->toc_section->output_offset);
     }
-  
-  *relocation = ((val - xcoff_data (output_bfd)->toc) - 
-		 (sym->n_value - xcoff_data (input_bfd)->toc));
+
+  *relocation = ((val - xcoff_data (output_bfd)->toc)
+		 - (sym->n_value - xcoff_data (input_bfd)->toc));
   return true;
 }
 
-boolean 
-xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto,
 		     val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section ATTRIBUTE_UNUSED;
@@ -2882,8 +2889,8 @@
   return true;
 }
 
-static boolean 
-xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, 
+static boolean
+xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
 		     val, addend, relocation, contents)
      bfd *input_bfd;
      asection *input_section;
@@ -2898,7 +2905,7 @@
 {
   struct xcoff_link_hash_entry *h;
 
-  if (0 > rel->r_symndx) 
+  if (0 > rel->r_symndx)
     return false;
 
   h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
@@ -2910,59 +2917,60 @@
      call is followed by a lwz r2,20(r1), but the call is not
      going to global linkage code, we can replace the load with a
      cror.  */
-  if (NULL != h 
-      && bfd_link_hash_defined == h->root.type 
-      && (rel->r_vaddr - input_section->vma + 8 <= 
-	  input_section->_cooked_size)) 
+  if (NULL != h
+      && bfd_link_hash_defined == h->root.type
+      && (rel->r_vaddr - input_section->vma + 8
+	  <= input_section->_cooked_size))
     {
       bfd_byte *pnext;
       unsigned long next;
-      
+
       pnext = contents + (rel->r_vaddr - input_section->vma) + 4;
       next = bfd_get_32 (input_bfd, pnext);
-      
+
       /* The _ptrgl function is magic.  It is used by the AIX
 	 compiler to call a function through a pointer.  */
       if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0)
 	{
-	  if (next == 0x4def7b82                        /* cror 15,15,15 */
-	      || next == 0x4ffffb82                     /* cror 31,31,31 */
-	      || next == 0x60000000)	                /* ori r0,r0,0 */
-	    bfd_put_32 (input_bfd, 0x80410014, pnext);  /* lwz r1,20(r1) */
-	  
-	} else 
-	  {
-	    if (next == 0x80410014)		         /* lwz r1,20(r1) */
-	      bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
-	  }
-    } 
-  else if (NULL != h && bfd_link_hash_undefined == h->root.type) 
+	  if (next == 0x4def7b82			/* cror 15,15,15 */
+	      || next == 0x4ffffb82			/* cror 31,31,31 */
+	      || next == 0x60000000)			/* ori r0,r0,0 */
+	    bfd_put_32 (input_bfd, 0x80410014, pnext);	/* lwz r1,20(r1) */
+
+	}
+      else
+	{
+	  if (next == 0x80410014)			/* lwz r1,20(r1) */
+	    bfd_put_32 (input_bfd, 0x60000000, pnext);	/* ori r0,r0,0 */
+	}
+    }
+  else if (NULL != h && bfd_link_hash_undefined == h->root.type)
     {
       /* Normally, this relocation is against a defined symbol.  In the
 	 case where this is a partial link and the output section offset
-	 is greater than 2^25, the linker will return an invalid error 
+	 is greater than 2^25, the linker will return an invalid error
 	 message that the relocation has been truncated.  Yes it has been
-	 truncated but no it not important.  For this case, disable the 
+	 truncated but no it not important.  For this case, disable the
 	 overflow checking. */
-      
+
       howto->complain_on_overflow = complain_overflow_dont;
     }
-  
+
   howto->pc_relative = true;
   howto->src_mask &= ~3;
   howto->dst_mask = howto->src_mask;
 
   /* A PC relative reloc includes the section address.  */
   addend += input_section->vma;
-  
+
   *relocation = val + addend;
-  *relocation -= (input_section->output_section->vma + 
-		  input_section->output_offset);
+  *relocation -= (input_section->output_section->vma
+		  + input_section->output_offset);
   return true;
 }
 
-boolean 
-xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto, 
+boolean
+xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto,
 		       val, addend, relocation, contents)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      asection *input_section;
@@ -2983,13 +2991,13 @@
   addend += input_section->vma;
 
   *relocation = val + addend;
-  *relocation -= (input_section->output_section->vma + 
-		  input_section->output_offset);
+  *relocation -= (input_section->output_section->vma
+		  + input_section->output_offset);
   return true;
 }
 
-static boolean 
-xcoff_complain_overflow_dont_func (input_bfd, val, relocation, howto) 
+static boolean
+xcoff_complain_overflow_dont_func (input_bfd, val, relocation, howto)
      bfd *input_bfd ATTRIBUTE_UNUSED;
      bfd_vma val ATTRIBUTE_UNUSED;
      bfd_vma relocation ATTRIBUTE_UNUSED;
@@ -2998,16 +3006,16 @@
   return false;
 }
 
-static boolean 
-xcoff_complain_overflow_bitfield_func (input_bfd, val, relocation, howto) 
+static boolean
+xcoff_complain_overflow_bitfield_func (input_bfd, val, relocation, howto)
      bfd *input_bfd;
      bfd_vma val;
      bfd_vma relocation;
-     struct reloc_howto_struct *howto; 
+     struct reloc_howto_struct *howto;
 {
   bfd_vma addrmask, fieldmask, signmask, ss;
   bfd_vma a, b, sum;
-  
+
   /* Get the values to be added together.  For signed and unsigned
      relocations, we assume that all values should be truncated to
      the size of an address.  For bitfields, all the bits matter.
@@ -3023,7 +3031,7 @@
      operand.  */
   a >>= howto->rightshift;
   b >>= howto->bitpos;
-  
+
   /* Bitfields are sometimes used for signed numbers; for
      example, a 13-bit field sometimes represents values in
      0..8191 and sometimes represents values in -4096..4095.
@@ -3035,7 +3043,7 @@
      assumed that it was fully sign extended, and we will keep
      that assumption.  */
   signmask = (fieldmask >> 1) + 1;
-		  
+
   if ((a & ~ fieldmask) != 0)
     {
       /* Some bits out of the field are set.  This might not
@@ -3049,9 +3057,9 @@
 	return true;
       a &= fieldmask;
     }
-  
+
   /* We just assume (b & ~ fieldmask) == 0.  */
-  
+
   /* We explicitly permit wrap around if this relocation
      covers the high bit of an address.  The Linux kernel
      relies on it, and it is the only way to write assembler
@@ -3060,7 +3068,7 @@
   if (howto->bitsize + howto->rightshift
       == bfd_arch_bits_per_address (input_bfd))
     return false;
-  
+
   sum = a + b;
   if (sum < a || (sum & ~ fieldmask) != 0)
     {
@@ -3070,12 +3078,12 @@
       if (((~ (a ^ b)) & (a ^ sum)) & signmask)
 	return true;
     }
-  
+
   return false;
 }
 
-static boolean 
-xcoff_complain_overflow_signed_func (input_bfd, val, relocation, howto) 
+static boolean
+xcoff_complain_overflow_signed_func (input_bfd, val, relocation, howto)
      bfd *input_bfd;
      bfd_vma val;
      bfd_vma relocation;
@@ -3083,7 +3091,7 @@
 {
   bfd_vma addrmask, fieldmask, signmask, ss;
   bfd_vma a, b, sum;
-  
+
   /* Get the values to be added together.  For signed and unsigned
      relocations, we assume that all values should be truncated to
      the size of an address.  For bitfields, all the bits matter.
@@ -3094,7 +3102,7 @@
   b = val & howto->src_mask;
 
   a = (a & addrmask) >> howto->rightshift;
-  
+
   /* If any sign bits are set, all sign bits must be set.
      That is, A must be a valid negative address after
      shifting.  */
@@ -3102,7 +3110,7 @@
   ss = a & signmask;
   if (ss != 0 && ss != ((addrmask >> howto->rightshift) & signmask))
     return true;
-  
+
   /* We only need this next bit of code if the sign bit of B
      is below the sign bit of A.  This would only happen if
      SRC_MASK had fewer bits than BITSIZE.  Note that if
@@ -3115,12 +3123,12 @@
       /* Set all the bits above the sign bit.  */
       b -= signmask <<= 1;
     }
-  
+
   b = (b & addrmask) >> howto->bitpos;
-  
+
   /* Now we can do the addition.  */
   sum = a + b;
-  
+
   /* See if the result has the correct sign.  Bits above the
      sign bit are junk now; ignore them.  If the sum is
      positive, make sure we did not have all negative inputs;
@@ -3132,20 +3140,20 @@
   signmask = (fieldmask >> 1) + 1;
   if (((~ (a ^ b)) & (a ^ sum)) & signmask)
     return true;
-  
+
   return false;
 }
 
-static boolean 
-xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto) 
+static boolean
+xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto)
      bfd *input_bfd;
      bfd_vma val;
      bfd_vma relocation;
-     struct reloc_howto_struct *howto; 
+     struct reloc_howto_struct *howto;
 {
   bfd_vma addrmask, fieldmask;
   bfd_vma a, b, sum;
-  
+
   /* Get the values to be added together.  For signed and unsigned
      relocations, we assume that all values should be truncated to
      the size of an address.  For bitfields, all the bits matter.
@@ -3171,31 +3179,31 @@
   sum = (a + b) & addrmask;
   if ((a | b | sum) & ~ fieldmask)
     return true;
-  
+
   return false;
 }
 
 /* This is the relocation function for the RS/6000/POWER/PowerPC.
    This is currently the only processor which uses XCOFF; I hope that
-   will never change.  
+   will never change.
 
    I took the relocation type definitions from two documents:
    the PowerPC AIX Version 4 Application Binary Interface, First
    Edition (April 1992), and the PowerOpen ABI, Big-Endian
    32-Bit Hardware Implementation (June 30, 1994).  Differences
-   between the documents are noted below. 
+   between the documents are noted below.
 
-   Unsupported r_type's 
+   Unsupported r_type's
 
    R_RTB:
    R_RRTBI:
    R_RRTBA:
-	
+
    These relocs are defined by the PowerPC ABI to be
    relative branches which use half of the difference
    between the symbol and the program counter.  I can't
    quite figure out when this is useful.  These relocs are
-   not defined by the PowerOpen ABI. 
+   not defined by the PowerOpen ABI.
 
    Supported r_type's
 
@@ -3203,7 +3211,7 @@
    Simple positive relocation.
 
    R_NEG:
-   Simple negative relocation. 
+   Simple negative relocation.
 
    R_REL:
    Simple PC relative relocation.
@@ -3221,16 +3229,16 @@
 
    R_GL:
    GL linkage relocation.  The value of this relocation
-   is the address of the entry in the TOC section. 
+   is the address of the entry in the TOC section.
 
    R_TCL:
    Local object TOC address.  I can't figure out the
-   difference between this and case R_GL. 
+   difference between this and case R_GL.
 
    R_TRL:
    TOC relative relocation.  A TOC relative load instruction
    which may be changed to a load address instruction.
-   FIXME: We don't currently implement this optimization. 
+   FIXME: We don't currently implement this optimization.
 
    R_TRLA:
    TOC relative relocation.  This is a TOC relative load
@@ -3240,52 +3248,52 @@
 
    R_BA:
    Absolute branch.  We don't want to mess with the lower
-   two bits of the instruction. 
+   two bits of the instruction.
 
    R_CAI:
    The PowerPC ABI defines this as an absolute call which
    may be modified to become a relative call.  The PowerOpen
-   ABI does not define this relocation type. 
-   
+   ABI does not define this relocation type.
+
    R_RBA:
    Absolute branch which may be modified to become a
-   relative branch. 
+   relative branch.
 
    R_RBAC:
    The PowerPC ABI defines this as an absolute branch to a
    fixed address which may be modified to an absolute branch
    to a symbol.  The PowerOpen ABI does not define this
-   relocation type. 
+   relocation type.
 
    R_RBRC:
    The PowerPC ABI defines this as an absolute branch to a
    fixed address which may be modified to a relative branch.
-   The PowerOpen ABI does not define this relocation type. 
+   The PowerOpen ABI does not define this relocation type.
 
    R_BR:
    Relative branch.  We don't want to mess with the lower
-   two bits of the instruction. 
+   two bits of the instruction.
 
    R_CREL:
    The PowerPC ABI defines this as a relative call which may
    be modified to become an absolute call.  The PowerOpen
-   ABI does not define this relocation type. 
+   ABI does not define this relocation type.
 
    R_RBR:
    A relative branch which may be modified to become an
    absolute branch.  FIXME: We don't implement this,
    although we should for symbols of storage mapping class
-   XMC_XO. 
+   XMC_XO.
 
    R_RL:
    The PowerPC AIX ABI describes this as a load which may be
    changed to a load address.  The PowerOpen ABI says this
-   is the same as case R_POS. 
+   is the same as case R_POS.
 
    R_RLA:
    The PowerPC AIX ABI describes this as a load address
    which may be changed to a load.  The PowerOpen ABI says
-   this is the same as R_POS. 
+   this is the same as R_POS.
 */
 
 boolean
@@ -3320,8 +3328,8 @@
       bfd_byte *location;
 
       /* Relocation type R_REF is a special relocation type which is
-         merely used to prevent garbage collection from occurring for
-         the csect including the symbol which it references.  */
+	 merely used to prevent garbage collection from occurring for
+	 the csect including the symbol which it references.  */
       if (rel->r_type == R_REF)
 	continue;
 
@@ -3332,12 +3340,13 @@
       howto.size = howto.bitsize > 16 ? 2 : 1;
       howto.pc_relative = false;
       howto.bitpos = 0;
-      howto.complain_on_overflow = rel->r_size & 0x80 ? 
-	complain_overflow_signed : complain_overflow_bitfield;
+      howto.complain_on_overflow = (rel->r_size & 0x80
+				    ? complain_overflow_signed
+				    : complain_overflow_bitfield);
       howto.special_function = NULL;
       howto.name = "internal";
       howto.partial_inplace = true;
-      howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+      howto.src_mask = howto.dst_mask = N_ONES (howto.bitsize);
       howto.pcrel_offset = false;
 
       /* symbol */
@@ -3345,17 +3354,17 @@
       addend = 0;
       h = NULL;
       sym = NULL;
-      symndx = rel->r_symndx;      
+      symndx = rel->r_symndx;
 
-      if (-1 != symndx)	
+      if (-1 != symndx)
 	{
 	  asection *sec;
-	  
+
 	  h = obj_xcoff_sym_hashes (input_bfd)[symndx];
 	  sym = syms + symndx;
 	  addend = - sym->n_value;
-	  
-	  if (NULL == h) 
+
+	  if (NULL == h)
 	    {
 	      sec = sections[symndx];
 	      /* Hack to make sure we use the right TOC anchor value
@@ -3368,32 +3377,32 @@
 		       + sec->output_offset
 		       + sym->n_value
 		       - sec->vma);
-	    } 
-	  else 
+	    }
+	  else
 	    {
-	      if (h->root.type == bfd_link_hash_defined 
-		  || h->root.type == bfd_link_hash_defweak) 
+	      if (h->root.type == bfd_link_hash_defined
+		  || h->root.type == bfd_link_hash_defweak)
 		{
 		  sec = h->root.u.def.section;
 		  val = (h->root.u.def.value
 			 + sec->output_section->vma
 			 + sec->output_offset);
-		} 
-	      else if (h->root.type == bfd_link_hash_common) 
+		}
+	      else if (h->root.type == bfd_link_hash_common)
 		{
 		  sec = h->root.u.c.p->section;
 		  val = (sec->output_section->vma
 			 + sec->output_offset);
-		  
-		} 
-	      else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) 
-		       && ! info->relocateable) 
+
+		}
+	      else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
+		       && ! info->relocateable)
 		{
 		  if (! ((*info->callbacks->undefined_symbol)
 			 (info, h->root.root.string, input_bfd, input_section,
 			  rel->r_vaddr - input_section->vma, true)))
 		    return false;
-		  
+
 		  /* Don't try to process the reloc.  It can't help, and
 		     it may generate another error.  */
 		  continue;
@@ -3401,74 +3410,74 @@
 	    }
 	}
 
-      if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION 
-	  || (false == xcoff_calculate_relocation[rel->r_type]
-	      (input_bfd, input_section, output_bfd, rel, sym, &howto, val, 
-	       addend, &relocation, contents))) 
+      if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
+	  || !((*xcoff_calculate_relocation[rel->r_type])
+	       (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
+		addend, &relocation, contents)))
 	return false;
-      
+
       /* address */
       address = rel->r_vaddr - input_section->vma;
       location = contents + address;
-      
+
       if (address > input_section->_raw_size)
-	abort();
+	abort ();
 
       /* Get the value we are going to relocate.  */
       if (1 == howto.size)
 	value_to_relocate = bfd_get_16 (input_bfd, location);
-      else 
+      else
 	value_to_relocate = bfd_get_32 (input_bfd, location);
-      
-      /* overflow.  
-	 
+
+      /* overflow.
+
 	 FIXME: We may drop bits during the addition
 	 which we don't check for.  We must either check at every single
 	 operation, which would be tedious, or we must do the computations
 	 in a type larger than bfd_vma, which would be inefficient.  */
-      
-      if ((unsigned int) howto.complain_on_overflow >= 
-	  XCOFF_MAX_COMPLAIN_OVERFLOW)
-	abort();
 
-      if ((true == xcoff_complain_overflow[howto.complain_on_overflow]
-	   (input_bfd, value_to_relocate, relocation, &howto))) 
+      if ((unsigned int) howto.complain_on_overflow
+	  >= XCOFF_MAX_COMPLAIN_OVERFLOW)
+	abort ();
+
+      if (((*xcoff_complain_overflow[howto.complain_on_overflow])
+	   (input_bfd, value_to_relocate, relocation, &howto)))
 	{
 	  const char *name;
 	  char buf[SYMNMLEN + 1];
 	  char reloc_type_name[10];
-	  
-	  if (symndx == -1) 
+
+	  if (symndx == -1)
 	    {
 	      name = "*ABS*";
-	    } 
-	  else if (h != NULL) 
+	    }
+	  else if (h != NULL)
 	    {
 	      name = h->root.root.string;
-	    } 
-	  else 
+	    }
+	  else
 	    {
 	      name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
 	      if (name == NULL)
 		name = "UNKNOWN";
 	    }
 	  sprintf (reloc_type_name, "0x%02x", rel->r_type);
-	  
+
 	  if (! ((*info->callbacks->reloc_overflow)
 		 (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
 		  input_section, rel->r_vaddr - input_section->vma)))
 	    return false;
 	}
-      
+
       /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE.  */
-      value_to_relocate = ((value_to_relocate & ~howto.dst_mask) | 
-			   (((value_to_relocate & howto.src_mask) + 
-			     relocation) & howto.dst_mask));
-      
+      value_to_relocate = ((value_to_relocate & ~howto.dst_mask)
+			   | (((value_to_relocate & howto.src_mask)
+			       + relocation) & howto.dst_mask));
+
       /* Put the value back in the object file.  */
       if (1 == howto.size)
 	bfd_put_16 (input_bfd, value_to_relocate, location);
-      else 
+      else
 	bfd_put_32 (input_bfd, value_to_relocate, location);
     }
 
@@ -3565,8 +3574,8 @@
     ".td", NULL, ".sv3264"
   };
 
-  if ((19 >= aux->x_csect.x_smclas) &&
-      (NULL != names[aux->x_csect.x_smclas]))
+  if ((19 >= aux->x_csect.x_smclas)
+      && (NULL != names[aux->x_csect.x_smclas]))
     {
       return_value = bfd_make_section_anyway
 	(abfd, names[aux->x_csect.x_smclas]);
@@ -3609,7 +3618,7 @@
     bfd *abfd;
     struct internal_ldhdr *ldhdr ATTRIBUTE_UNUSED;
 {
-  return bfd_xcoff_ldhdrsz(abfd);
+  return bfd_xcoff_ldhdrsz (abfd);
 }
 
 static bfd_vma
@@ -3617,11 +3626,10 @@
     bfd *abfd;
     struct internal_ldhdr *ldhdr;
 {
-  return bfd_xcoff_ldhdrsz(abfd) +
-    (ldhdr->l_nsyms * bfd_xcoff_ldsymsz(abfd));
+  return bfd_xcoff_ldhdrsz (abfd) + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (abfd);
 }
 
-static boolean 
+static boolean
 xcoff_generate_rtinit  (abfd, init, fini, rtld)
      bfd *abfd;
      const char *init;
@@ -3643,11 +3651,11 @@
   struct internal_syment syment;
   union internal_auxent auxent;
   struct internal_reloc reloc;
-  
+
   char *data_name = ".data";
   char *rtinit_name = "__rtinit";
   char *rtld_name = "__rtld";
-  
+
   if (! bfd_xcoff_rtinit_size (abfd))
     return false;
 
@@ -3658,7 +3666,7 @@
   memset (filehdr_ext, 0, FILHSZ);
   memset (&filehdr, 0, sizeof (struct internal_filehdr));
   filehdr.f_magic = bfd_xcoff_magic_number (abfd);
-  filehdr.f_nscns = 1; 
+  filehdr.f_nscns = 1;
   filehdr.f_timdat = 0;
   filehdr.f_nsyms = 0;  /* at least 6, no more than 10 */
   filehdr.f_symptr = 0; /* set below */
@@ -3679,36 +3687,34 @@
   scnhdr.s_nlnno = 0;
   scnhdr.s_flags = STYP_DATA;
 
-  /* .data 
-     0x0000           0x00000000 : rtl
-     0x0004           0x00000010 : offset to init, or 0
-     0x0008           0x00000028 : offset to fini, or 0
-     0x000C           0x0000000C : size of descriptor 
-     0x0010           0x00000000 : init, needs a reloc
-     0x0014           0x00000040 : offset to init name
-     0x0018           0x00000000 : flags, padded to a word
-     0x001C           0x00000000 : empty init
-     0x0020           0x00000000 : 
-     0x0024           0x00000000 : 
-     0x0028           0x00000000 : fini, needs a reloc
-     0x002C           0x00000??? : offset to fini name
-     0x0030           0x00000000 : flags, padded to a word
-     0x0034           0x00000000 : empty fini
-     0x0038           0x00000000 : 
-     0x003C           0x00000000 : 
-     0x0040           init name
+  /* .data
+     0x0000	      0x00000000 : rtl
+     0x0004	      0x00000010 : offset to init, or 0
+     0x0008	      0x00000028 : offset to fini, or 0
+     0x000C	      0x0000000C : size of descriptor
+     0x0010	      0x00000000 : init, needs a reloc
+     0x0014	      0x00000040 : offset to init name
+     0x0018	      0x00000000 : flags, padded to a word
+     0x001C	      0x00000000 : empty init
+     0x0020	      0x00000000 :
+     0x0024	      0x00000000 :
+     0x0028	      0x00000000 : fini, needs a reloc
+     0x002C	      0x00000??? : offset to fini name
+     0x0030	      0x00000000 : flags, padded to a word
+     0x0034	      0x00000000 : empty fini
+     0x0038	      0x00000000 :
+     0x003C	      0x00000000 :
+     0x0040	      init name
      0x0040 + initsz  fini name */
 
   data_buffer_size = 0x0040 + initsz + finisz;
-  data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+  data_buffer_size = (data_buffer_size + 7) &~ (bfd_size_type) 7;
   data_buffer = NULL;
-  data_buffer = (bfd_byte *) bfd_malloc (data_buffer_size);
+  data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
   if (data_buffer == NULL)
     return false;
-  
-  memset (data_buffer, 0, data_buffer_size);
 
-  if (initsz) 
+  if (initsz)
     {
       val = 0x10;
       bfd_h_put_32 (abfd, val, &data_buffer[0x04]);
@@ -3717,7 +3723,7 @@
       memcpy (&data_buffer[val], init, initsz);
     }
 
-  if (finisz) 
+  if (finisz)
     {
       val = 0x28;
       bfd_h_put_32 (abfd, val, &data_buffer[0x08]);
@@ -3733,25 +3739,27 @@
 
   /* string table */
   string_table_size = 0;
-  if (initsz > 9) 
+  if (initsz > 9)
     string_table_size += initsz;
   if (finisz > 9)
     string_table_size += finisz;
   if (string_table_size)
     {
       string_table_size += 4;
-      string_table = (bfd_byte *)bfd_malloc (string_table_size);
-      memset (string_table, 0, string_table_size);
+      string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
+      if (string_table == NULL)
+	return false;
+
       val = string_table_size;
       bfd_h_put_32 (abfd, val, &string_table[0]);
       st_tmp = string_table + 4;
     }
-  
-  /* symbols 
+
+  /* symbols
      0. .data csect
      2. __rtinit
-     4. init function 
-     6. fini function 
+     4. init function
+     6. fini function
      8. __rtld  */
   memset (syment_ext, 0, 10 * SYMESZ);
   memset (reloc_ext, 0, 3 * RELSZ);
@@ -3766,10 +3774,10 @@
   auxent.x_csect.x_scnlen.l = data_buffer_size;
   auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD;
   auxent.x_csect.x_smclas = XMC_RW;
-  bfd_coff_swap_sym_out (abfd, &syment, 
+  bfd_coff_swap_sym_out (abfd, &syment,
 			 &syment_ext[filehdr.f_nsyms * SYMESZ]);
-  bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, 
-			 syment.n_numaux, 
+  bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+			 syment.n_numaux,
 			 &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
   filehdr.f_nsyms += 2;
 
@@ -3782,20 +3790,20 @@
   syment.n_numaux = 1;
   auxent.x_csect.x_smtyp = XTY_LD;
   auxent.x_csect.x_smclas = XMC_RW;
-  bfd_coff_swap_sym_out (abfd, &syment, 
+  bfd_coff_swap_sym_out (abfd, &syment,
 			 &syment_ext[filehdr.f_nsyms * SYMESZ]);
-  bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, 
-			 syment.n_numaux, 
+  bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+			 syment.n_numaux,
 			 &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
   filehdr.f_nsyms += 2;
 
   /* init */
-  if (initsz) 
+  if (initsz)
     {
       memset (&syment, 0, sizeof (struct internal_syment));
       memset (&auxent, 0, sizeof (union internal_auxent));
 
-      if (initsz > 9) 
+      if (initsz > 9)
 	{
 	  syment._n._n_n._n_offset = st_tmp - string_table;
 	  memcpy (st_tmp, init, initsz);
@@ -3806,10 +3814,10 @@
 
       syment.n_sclass = C_EXT;
       syment.n_numaux = 1;
-      bfd_coff_swap_sym_out (abfd, &syment, 
+      bfd_coff_swap_sym_out (abfd, &syment,
 			     &syment_ext[filehdr.f_nsyms * SYMESZ]);
-      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, 
-			     syment.n_numaux, 
+      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+			     syment.n_numaux,
 			     &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
 
       /* reloc */
@@ -3823,14 +3831,14 @@
       filehdr.f_nsyms += 2;
       scnhdr.s_nreloc += 1;
     }
-  
+
   /* fini */
-  if (finisz) 
+  if (finisz)
     {
       memset (&syment, 0, sizeof (struct internal_syment));
       memset (&auxent, 0, sizeof (union internal_auxent));
 
-      if (finisz > 9) 
+      if (finisz > 9)
 	{
 	  syment._n._n_n._n_offset = st_tmp - string_table;
 	  memcpy (st_tmp, fini, finisz);
@@ -3841,10 +3849,10 @@
 
       syment.n_sclass = C_EXT;
       syment.n_numaux = 1;
-      bfd_coff_swap_sym_out (abfd, &syment, 
+      bfd_coff_swap_sym_out (abfd, &syment,
 			     &syment_ext[filehdr.f_nsyms * SYMESZ]);
-      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, 
-			     syment.n_numaux, 
+      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+			     syment.n_numaux,
 			     &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
 
       /* reloc */
@@ -3853,7 +3861,7 @@
       reloc.r_symndx = filehdr.f_nsyms;
       reloc.r_type = R_POS;
       reloc.r_size = 31;
-      bfd_coff_swap_reloc_out (abfd, &reloc, 
+      bfd_coff_swap_reloc_out (abfd, &reloc,
 			       &reloc_ext[scnhdr.s_nreloc * RELSZ]);
 
       filehdr.f_nsyms += 2;
@@ -3867,10 +3875,10 @@
       memcpy (syment._n._n_name, rtld_name, strlen (rtld_name));
       syment.n_sclass = C_EXT;
       syment.n_numaux = 1;
-      bfd_coff_swap_sym_out (abfd, &syment, 
+      bfd_coff_swap_sym_out (abfd, &syment,
 			     &syment_ext[filehdr.f_nsyms * SYMESZ]);
-      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0, 
-			     syment.n_numaux, 
+      bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+			     syment.n_numaux,
 			     &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
 
       /* reloc */
@@ -3879,7 +3887,7 @@
       reloc.r_symndx = filehdr.f_nsyms;
       reloc.r_type = R_POS;
       reloc.r_size = 31;
-      bfd_coff_swap_reloc_out (abfd, &reloc, 
+      bfd_coff_swap_reloc_out (abfd, &reloc,
 			       &reloc_ext[scnhdr.s_nreloc * RELSZ]);
 
       filehdr.f_nsyms += 2;
@@ -3906,19 +3914,19 @@
 
 
 static reloc_howto_type xcoff_dynamic_reloc =
-HOWTO (0,	                /* type */
-       0,	                /* rightshift */
-       2,	                /* size (0 = byte, 1 = short, 2 = long) */
-       32,	                /* bitsize */
-       false,	                /* pc_relative */
-       0,	                /* bitpos */
+HOWTO (0,			/* type */
+       0,			/* rightshift */
+       2,			/* size (0 = byte, 1 = short, 2 = long) */
+       32,			/* bitsize */
+       false,			/* pc_relative */
+       0,			/* bitpos */
        complain_overflow_bitfield, /* complain_on_overflow */
-       0,		        /* special_function */
-       "R_POS",               /* name */
-       true,	                /* partial_inplace */
-       0xffffffff,            /* src_mask */
-       0xffffffff,            /* dst_mask */
-       false);                /* pcrel_offset */
+       0,			/* special_function */
+       "R_POS",			/* name */
+       true,			/* partial_inplace */
+       0xffffffff,		/* src_mask */
+       0xffffffff,		/* dst_mask */
+       false);			/* pcrel_offset */
 
 /*  glink
 
@@ -3942,81 +3950,81 @@
 static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
   {
     { /* COFF backend, defined in libcoff.h.  */
-      _bfd_xcoff_swap_aux_in,           /* _bfd_coff_swap_aux_in */
-      _bfd_xcoff_swap_sym_in,           /* _bfd_coff_swap_sym_in */
-      coff_swap_lineno_in,              /* _bfd_coff_swap_lineno_in */
-      _bfd_xcoff_swap_aux_out,          /* _bfd_swap_aux_out */
-      _bfd_xcoff_swap_sym_out,          /* _bfd_swap_sym_out */
-      coff_swap_lineno_out,             /* _bfd_swap_lineno_out */
-      xcoff_swap_reloc_out,             /* _bfd_swap_reloc_out */
-      coff_swap_filehdr_out,            /* _bfd_swap_filehdr_out */
-      coff_swap_aouthdr_out,            /* _bfd_swap_aouthdr_out */
-      coff_swap_scnhdr_out,             /* _bfd_swap_scnhdr_out */
-      FILHSZ,                           /* _bfd_filhsz */
-      AOUTSZ,                           /* _bfd_aoutsz */
-      SCNHSZ,                           /* _bfd_scnhsz */
-      SYMESZ,                           /* _bfd_symesz */
-      AUXESZ,                           /* _bfd_auxesz */
-      RELSZ,                            /* _bfd_relsz */
-      LINESZ,                           /* _bfd_linesz */
-      FILNMLEN,                         /* _bfd_filnmlen */
-      true,                             /* _bfd_coff_long_filenames */
-      false,                            /* _bfd_coff_long_section_names */
-      (3),                              /* _bfd_coff_default_section_alignment_power */
-      false,                            /* _bfd_coff_force_symnames_in_strings */
-      2,                                /* _bfd_coff_debug_string_prefix_length */
-      coff_swap_filehdr_in,             /* _bfd_coff_swap_filehdr_in */
-      coff_swap_aouthdr_in,             /* _bfd_swap_aouthdr_in */
-      coff_swap_scnhdr_in,              /* _bfd_swap_scnhdr_in */
-      xcoff_swap_reloc_in,              /* _bfd_reloc_in */
-      coff_bad_format_hook,             /* _bfd_bad_format_hook */
-      coff_set_arch_mach_hook,          /* _bfd_set_arch_mach_hook */
-      coff_mkobject_hook,               /* _bfd_mkobject_hook */
-      styp_to_sec_flags,                /* _bfd_syp_to_sec_flags */
-      coff_set_alignment_hook,          /* _bfd_set_alignment_hook */
-      coff_slurp_symbol_table,          /* _bfd_coff_slurp_symbol_table */
-      symname_in_debug_hook,            /* _coff_symname_in_debug_hook */
-      coff_pointerize_aux_hook,         /* _bfd_coff_pointerize_aux_hook */
-      coff_print_aux,                   /* bfd_coff_print_aux */
-      dummy_reloc16_extra_cases,        /* _bfd_coff_reloc16_extra_cases */
-      dummy_reloc16_estimate,           /* _bfd_coff_reloc16_estimate */
-      NULL,                             /* bfd_coff_sym_is_global */
-      coff_compute_section_file_positions, /* _bfd_coff_compute_section_file_positions */
-      NULL,                             /* _bfd_coff_start_final_link */
-      xcoff_ppc_relocate_section,       /* _bfd_coff_relocate_section */
-      coff_rtype_to_howto,              /* _bfd_coff_rtype_to_howto */
-      NULL,                             /* _bfd_coff_addust_symndx */
-      _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
-      coff_link_output_has_begun,       /* _bfd_coff_link_output_has_begun */
-      coff_final_link_postscript        /* _bfd_coff_final_link_postscript */
+      _bfd_xcoff_swap_aux_in,
+      _bfd_xcoff_swap_sym_in,
+      coff_swap_lineno_in,
+      _bfd_xcoff_swap_aux_out,
+      _bfd_xcoff_swap_sym_out,
+      coff_swap_lineno_out,
+      xcoff_swap_reloc_out,
+      coff_swap_filehdr_out,
+      coff_swap_aouthdr_out,
+      coff_swap_scnhdr_out,
+      FILHSZ,
+      AOUTSZ,
+      SCNHSZ,
+      SYMESZ,
+      AUXESZ,
+      RELSZ,
+      LINESZ,
+      FILNMLEN,
+      true,			/* _bfd_coff_long_filenames */
+      false,			/* _bfd_coff_long_section_names */
+      3,			/* _bfd_coff_default_section_alignment_power */
+      false,			/* _bfd_coff_force_symnames_in_strings */
+      2,			/* _bfd_coff_debug_string_prefix_length */
+      coff_swap_filehdr_in,
+      coff_swap_aouthdr_in,
+      coff_swap_scnhdr_in,
+      xcoff_swap_reloc_in,
+      coff_bad_format_hook,
+      coff_set_arch_mach_hook,
+      coff_mkobject_hook,
+      styp_to_sec_flags,
+      coff_set_alignment_hook,
+      coff_slurp_symbol_table,
+      symname_in_debug_hook,
+      coff_pointerize_aux_hook,
+      coff_print_aux,
+      dummy_reloc16_extra_cases,
+      dummy_reloc16_estimate,
+      NULL,			/* bfd_coff_sym_is_global */
+      coff_compute_section_file_positions,
+      NULL,			/* _bfd_coff_start_final_link */
+      xcoff_ppc_relocate_section,
+      coff_rtype_to_howto,
+      NULL,			/* _bfd_coff_adjust_symndx */
+      _bfd_generic_link_add_one_symbol,
+      coff_link_output_has_begun,
+      coff_final_link_postscript
     },
 
-    0x01DF,                             /* magic number */
-    bfd_arch_rs6000,                    /* architecture */
-    bfd_mach_rs6k,                      /* machine */
+    0x01DF,			/* magic number */
+    bfd_arch_rs6000,
+    bfd_mach_rs6k,
 
     /* Function pointers to xcoff specific swap routines.  */
-    xcoff_swap_ldhdr_in,                /* _xcoff_swap_ldhdr_in */
-    xcoff_swap_ldhdr_out,               /* _xcoff_swap_ldhdr_out */
-    xcoff_swap_ldsym_in,                /* _xcoff_swap_ldsym_in */
-    xcoff_swap_ldsym_out,               /* _xcoff_swap_ldsym_out */
-    xcoff_swap_ldrel_in,                /* _xcoff_swap_ldrel_in */
-    xcoff_swap_ldrel_out,               /* _xcoff_swap_ldrel_out */
+    xcoff_swap_ldhdr_in,
+    xcoff_swap_ldhdr_out,
+    xcoff_swap_ldsym_in,
+    xcoff_swap_ldsym_out,
+    xcoff_swap_ldrel_in,
+    xcoff_swap_ldrel_out,
 
     /* Sizes.  */
-    LDHDRSZ,                            /* _xcoff_ldhdrsz */
-    LDSYMSZ,                            /* _xcoff_ldsymsz */
-    LDRELSZ,                            /* _xcoff_ldrelsz */
-    12,                                 /* _xcoff_function_descriptor_size */
-    SMALL_AOUTSZ,                       /* _xcoff_small_aout_header_size */
+    LDHDRSZ,
+    LDSYMSZ,
+    LDRELSZ,
+    12,				/* _xcoff_function_descriptor_size */
+    SMALL_AOUTSZ,
 
-  /* Versions. */
-    1,                                   /* _xcoff_ldhdr_version */
+    /* Versions.  */
+    1,				/* _xcoff_ldhdr_version */
 
-    _bfd_xcoff_put_symbol_name,          /* _xcoff_put_symbol_name */
-    _bfd_xcoff_put_ldsymbol_name,        /* _xcoff_put_ldsymbol_name */
-    & xcoff_dynamic_reloc,               /* dynamic reloc howto */
-    xcoff_create_csect_from_smclas,      /* _xcoff_create_csect_from_smclas */
+    _bfd_xcoff_put_symbol_name,
+    _bfd_xcoff_put_ldsymbol_name,
+    &xcoff_dynamic_reloc,
+    xcoff_create_csect_from_smclas,
 
     /* Lineno and reloc count overflow.  */
     xcoff_is_lineno_count_overflow,
@@ -4026,425 +4034,391 @@
     xcoff_loader_reloc_offset,
 
     /* glink.  */
-    & xcoff_glink_code[0],
-    (36),           /* _xcoff_glink_size */
+    &xcoff_glink_code[0],
+    36,				/* _xcoff_glink_size */
 
     /* rtinit */
-    64,           /* _xcoff_rtinit_size */
-    xcoff_generate_rtinit,  /* _xcoff_generate_rtinit */
-};
+    64,				/* _xcoff_rtinit_size */
+    xcoff_generate_rtinit,
+  };
 
 /* The transfer vector that leads the outside world to all of the above.  */
 const bfd_target rs6000coff_vec =
-{
-  "aixcoff-rs6000",
-  bfd_target_xcoff_flavour,
-  BFD_ENDIAN_BIG,		/* data byte order is big */
-  BFD_ENDIAN_BIG,		/* header byte order is big */
+  {
+    "aixcoff-rs6000",
+    bfd_target_xcoff_flavour,
+    BFD_ENDIAN_BIG,		/* data byte order is big */
+    BFD_ENDIAN_BIG,		/* header byte order is big */
 
-  (HAS_RELOC | EXEC_P |		/* object flags */
-   HAS_LINENO | HAS_DEBUG | DYNAMIC |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT),
+    (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+     | HAS_SYMS | HAS_LOCALS | WP_TEXT),
 
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-  0,				/* leading char */
-  '/',				/* ar_pad_char */
-  15,				/* ar_max_namelen??? FIXMEmgo */
+    SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA,
+    0,				/* leading char */
+    '/',			/* ar_pad_char */
+    15,				/* ar_max_namelen */
 
-                      /* data */
-  bfd_getb64,         /* bfd_getx64 */
-  bfd_getb_signed_64, /* bfd_getx_signed_64 */
-  bfd_putb64,         /* bfd_putx64 */
-  bfd_getb32,         /* bfd_getx32 */
-  bfd_getb_signed_32, /* bfd_getx_signed_32 */
-  bfd_putb32,         /* bfd_putx32 */
-  bfd_getb16,         /* bfd_getx16 */
-  bfd_getb_signed_16, /* bfd_getx_signed_16 */
-  bfd_putb16,         /* bfd_putx16 */
+    /* data */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-                      /* hdrs */
-  bfd_getb64,         /* bfd_h_getx64 */
-  bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
-  bfd_putb64,         /* bfd_h_putx64 */
-  bfd_getb32,         /* bfd_h_getx32 */
-  bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
-  bfd_putb32,         /* bfd_h_putx32 */
-  bfd_getb16,         /* bfd_h_getx16 */
-  bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
-  bfd_putb16,         /* bfd_h_putx16 */
+    /* hdrs */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  { /* bfd_check_format */
-    _bfd_dummy_target,
-    coff_object_p,
-    _bfd_xcoff_archive_p,
-    CORE_FILE_P
-  },
+    { /* bfd_check_format */
+      _bfd_dummy_target,
+      coff_object_p,
+      _bfd_xcoff_archive_p,
+      CORE_FILE_P
+    },
 
-  { /* bfd_set_format */
+    { /* bfd_set_format */
+      bfd_false,
+      coff_mkobject,
+      _bfd_generic_mkarchive,
+      bfd_false
+    },
+
+    {/* bfd_write_contents */
+      bfd_false,
+      coff_write_object_contents,
+      _bfd_xcoff_write_archive_contents,
+      bfd_false
+    },
+
+    /* Generic */
+    bfd_true,
+    bfd_true,
+    coff_new_section_hook,
+    _bfd_generic_get_section_contents,
+    _bfd_generic_get_section_contents_in_window,
+
+    /* Copy */
+    _bfd_xcoff_copy_private_bfd_data,
+    ((boolean (*) (bfd *, bfd *)) bfd_true),
+    ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+    ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+    ((boolean (*) (bfd *, flagword)) bfd_true),
+    ((boolean (*) (bfd *, void * )) bfd_true),
+
+    /* Core */
+    coff_core_file_failing_command,
+    coff_core_file_failing_signal,
+    coff_core_file_matches_executable_p,
+
+    /* Archive */
+    _bfd_xcoff_slurp_armap,
     bfd_false,
-    coff_mkobject,
-    _bfd_generic_mkarchive,
-    bfd_false
-  },
+    ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+    bfd_dont_truncate_arname,
+    _bfd_xcoff_write_armap,
+    _bfd_xcoff_read_ar_hdr,
+    _bfd_xcoff_openr_next_archived_file,
+    _bfd_generic_get_elt_at_index,
+    _bfd_xcoff_stat_arch_elt,
+    bfd_true,
 
-  {/* bfd_write_contents */
-    bfd_false,
-    coff_write_object_contents,
-    _bfd_xcoff_write_archive_contents,
-    bfd_false
-  },
+    /* Symbols */
+    coff_get_symtab_upper_bound,
+    coff_get_symtab,
+    coff_make_empty_symbol,
+    coff_print_symbol,
+    coff_get_symbol_info,
+    _bfd_xcoff_is_local_label_name,
+    coff_get_lineno,
+    coff_find_nearest_line,
+    coff_bfd_make_debug_symbol,
+    _bfd_generic_read_minisymbols,
+    _bfd_generic_minisymbol_to_symbol,
 
-  /* Generic */
-  bfd_true,                          /* _close_and_cleanup */
-  bfd_true,                          /* _bfd_free_cached_info */
-  coff_new_section_hook,             /* _new_section_hook */
-  _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
-                                     /* _bfd_get_section_contents_in_window */
-  _bfd_generic_get_section_contents_in_window,
+    /* Reloc */
+    coff_get_reloc_upper_bound,
+    coff_canonicalize_reloc,
+    _bfd_xcoff_reloc_type_lookup,
 
-  /* Copy */
-  _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
-                                    /* _bfd_merge_private_bfd_data */
-  ((boolean (*) (bfd *, bfd *)) bfd_true),
-                                    /* _bfd_copy_pivate_section_data */
-  ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
-                                    /* _bfd_copy_private_symbol_data */
-  ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
-  ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
-  ((boolean (*) (bfd *, void * )) bfd_true),  /* _bfd_print_private_bfd_data */
+    /* Write */
+    coff_set_arch_mach,
+    coff_set_section_contents,
 
-  /* Core */
-  coff_core_file_failing_command,    /* _core_file_failing_command */
-  coff_core_file_failing_signal,     /* _core_file_failing_signal */
-                                          /* _core_file_matches_executable_p */
-  coff_core_file_matches_executable_p,
+    /* Link */
+    _bfd_xcoff_sizeof_headers,
+    bfd_generic_get_relocated_section_contents,
+    bfd_generic_relax_section,
+    _bfd_xcoff_bfd_link_hash_table_create,
+    _bfd_generic_link_hash_table_free,
+    _bfd_xcoff_bfd_link_add_symbols,
+    _bfd_generic_link_just_syms,
+    _bfd_xcoff_bfd_final_link,
+    _bfd_generic_link_split_section,
+    bfd_generic_gc_sections,
+    bfd_generic_merge_sections,
+    bfd_generic_discard_group,
 
-  /* Archive */
-  _bfd_xcoff_slurp_armap,                  /* _slurp_armap */
-                                           /* XCOFF archives do not have
-					      anything which corresponds to
-					      an extended name table.  */
-  bfd_false,                               /* _slurp_extended_name_table */
-                                           /* _construct_extended_name_table */
-  ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
-  bfd_dont_truncate_arname,                /* _truncate_arname */
-  _bfd_xcoff_write_armap,                  /* _write_armap */
-  _bfd_xcoff_read_ar_hdr,                  /* _read_ar_hdr */
-  _bfd_xcoff_openr_next_archived_file,     /* _openr_next_archived_file */
-  _bfd_generic_get_elt_at_index,           /* _get_elt_at_index */
-  _bfd_xcoff_stat_arch_elt,                /* _generic_stat_arch_elt */
-                                           /* XCOFF archives do not have
-					      a timestamp.  */
-  bfd_true,                                /* _update_armap_timestamp */
+    /* Dynamic */
+    _bfd_xcoff_get_dynamic_symtab_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_symtab,
+    _bfd_xcoff_get_dynamic_reloc_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_reloc,
 
-  /* Symbols */
-  coff_get_symtab_upper_bound,             /* _get_symtab_upper_bound */
-  coff_get_symtab,                         /* _get_symtab */
-  coff_make_empty_symbol,                  /* _make_empty_symbol */
-  coff_print_symbol,                       /* _print_symbol */
-  coff_get_symbol_info,                    /* _get_symbol_info */
-  _bfd_xcoff_is_local_label_name,          /* _bfd_is_local_label_name */
-  coff_get_lineno,                         /* _get_lineno */
-  coff_find_nearest_line,                  /* _find_nearest_line */
-  coff_bfd_make_debug_symbol,              /* _bfd_make_debug_symbol */
-  _bfd_generic_read_minisymbols,           /* _read_minisymbols */
-  _bfd_generic_minisymbol_to_symbol,       /* _minsymbol_to_symbol */
+    /* Opposite endian version, none exists */
+    NULL,
 
-  /* Reloc */
-  coff_get_reloc_upper_bound,              /* _get_reloc_upper_bound */
-  coff_canonicalize_reloc,                 /* _cononicalize_reloc */
-  _bfd_xcoff_reloc_type_lookup,            /* _bfd_reloc_type_lookup */
+    (void *) &bfd_xcoff_backend_data,
+  };
 
-  /* Write */
-  coff_set_arch_mach,                      /* _set_arch_mach */
-  coff_set_section_contents,               /* _set_section_contents */
+/* xcoff-powermac target
+   Old target.
+   Only difference between this target and the rs6000 target is the
+   the default architecture and machine type used in coffcode.h
 
-  /* Link */
-  _bfd_xcoff_sizeof_headers,               /* _sizeof_headers */
-                                      /* _bfd_get_relocated_section_contents */
-  bfd_generic_get_relocated_section_contents,
-  bfd_generic_relax_section,               /* _bfd_relax_section */
-  _bfd_xcoff_bfd_link_hash_table_create,   /* _bfd_link_hash_table_create */
-  _bfd_generic_link_hash_table_free,       /* _bfd_link_hash_table_free */
-  _bfd_xcoff_bfd_link_add_symbols,         /* _bfd_link_add_symbols */
-  _bfd_generic_link_just_syms,             /* _bfd_link_just_syms */
-  _bfd_xcoff_bfd_final_link,               /* _bfd_final_link */
-  _bfd_generic_link_split_section,         /* _bfd_link_split_section */
-  bfd_generic_gc_sections,                 /* _bfd_gc_sections */
-  bfd_generic_merge_sections,              /* _bfd_merge_sections */
-
-  /* Dynamic */
-                                          /* _get_dynamic_symtab_upper_bound */
-  _bfd_xcoff_get_dynamic_symtab_upper_bound,
-  _bfd_xcoff_canonicalize_dynamic_symtab,  /* _cononicalize_dynamic_symtab */
-  _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
-  _bfd_xcoff_canonicalize_dynamic_reloc,   /* _cononicalize_dynamic_reloc */
-
-  /* Opposite endian version, none exists */
-  NULL,
-
-  /* back end data */
-  (void *) &bfd_xcoff_backend_data,
-};
-
-/*
- * xcoff-powermac target
- * Old target.
- * Only difference between this target and the rs6000 target is the
- * the default architecture and machine type used in coffcode.h
- *
- * PowerPC Macs use the same magic numbers as RS/6000
- * (because that's how they were bootstrapped originally),
- * but they are always PowerPC architecture.
- */
+   PowerPC Macs use the same magic numbers as RS/6000
+   (because that's how they were bootstrapped originally),
+   but they are always PowerPC architecture.  */
 static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data =
-{
-  { /* COFF backend, defined in libcoff.h */
-    _bfd_xcoff_swap_aux_in,           /* _bfd_coff_swap_aux_in */
-    _bfd_xcoff_swap_sym_in,           /* _bfd_coff_swap_sym_in */
-    coff_swap_lineno_in,              /* _bfd_coff_swap_lineno_in */
-    _bfd_xcoff_swap_aux_out,          /* _bfd_swap_aux_out */
-    _bfd_xcoff_swap_sym_out,          /* _bfd_swap_sym_out */
-    coff_swap_lineno_out,             /* _bfd_swap_lineno_out */
-    xcoff_swap_reloc_out,             /* _bfd_swap_reloc_out */
-    coff_swap_filehdr_out,            /* _bfd_swap_filehdr_out */
-    coff_swap_aouthdr_out,            /* _bfd_swap_aouthdr_out */
-    coff_swap_scnhdr_out,             /* _bfd_swap_scnhdr_out */
-    FILHSZ,                           /* _bfd_filhsz */
-    AOUTSZ,                           /* _bfd_aoutsz */
-    SCNHSZ,                           /* _bfd_scnhsz */
-    SYMESZ,                           /* _bfd_symesz */
-    AUXESZ,                           /* _bfd_auxesz */
-    RELSZ,                            /* _bfd_relsz */
-    LINESZ,                           /* _bfd_linesz */
-    FILNMLEN,                         /* _bfd_filnmlen */
-    true,                             /* _bfd_coff_long_filenames */
-    false,                            /* _bfd_coff_long_section_names */
-    (3),                        /* _bfd_coff_default_section_alignment_power */
-    false,                            /* _bfd_coff_force_symnames_in_strings */
-    2,                               /* _bfd_coff_debug_string_prefix_length */
-    coff_swap_filehdr_in,             /* _bfd_coff_swap_filehdr_in */
-    coff_swap_aouthdr_in,             /* _bfd_swap_aouthdr_in */
-    coff_swap_scnhdr_in,              /* _bfd_swap_scnhdr_in */
-    xcoff_swap_reloc_in,              /* _bfd_reloc_in */
-    coff_bad_format_hook,             /* _bfd_bad_format_hook */
-    coff_set_arch_mach_hook,          /* _bfd_set_arch_mach_hook */
-    coff_mkobject_hook,               /* _bfd_mkobject_hook */
-    styp_to_sec_flags,                /* _bfd_syp_to_sec_flags */
-    coff_set_alignment_hook,          /* _bfd_set_alignment_hook */
-    coff_slurp_symbol_table,          /* _bfd_coff_slurp_symbol_table */
-    symname_in_debug_hook,            /* _coff_symname_in_debug_hook */
-    coff_pointerize_aux_hook,         /* _bfd_coff_pointerize_aux_hook */
-    coff_print_aux,                   /* bfd_coff_print_aux */
-    dummy_reloc16_extra_cases,        /* _bfd_coff_reloc16_extra_cases */
-    dummy_reloc16_estimate,           /* _bfd_coff_reloc16_estimate */
-    NULL,                             /* bfd_coff_sym_is_global */
-                                 /* _bfd_coff_compute_section_file_positions */
-    coff_compute_section_file_positions,
-    NULL,                             /* _bfd_coff_start_final_link */
-    xcoff_ppc_relocate_section,       /* _bfd_coff_relocate_section */
-    coff_rtype_to_howto,              /* _bfd_coff_rtype_to_howto */
-    NULL,                             /* _bfd_coff_addust_symndx */
-    _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
-    coff_link_output_has_begun,       /* _bfd_coff_link_output_has_begun */
-    coff_final_link_postscript        /* _bfd_coff_final_link_postscript */
-  },
+  {
+    { /* COFF backend, defined in libcoff.h.  */
+      _bfd_xcoff_swap_aux_in,
+      _bfd_xcoff_swap_sym_in,
+      coff_swap_lineno_in,
+      _bfd_xcoff_swap_aux_out,
+      _bfd_xcoff_swap_sym_out,
+      coff_swap_lineno_out,
+      xcoff_swap_reloc_out,
+      coff_swap_filehdr_out,
+      coff_swap_aouthdr_out,
+      coff_swap_scnhdr_out,
+      FILHSZ,
+      AOUTSZ,
+      SCNHSZ,
+      SYMESZ,
+      AUXESZ,
+      RELSZ,
+      LINESZ,
+      FILNMLEN,
+      true,			/* _bfd_coff_long_filenames */
+      false,			/* _bfd_coff_long_section_names */
+      3,			/* _bfd_coff_default_section_alignment_power */
+      false,			/* _bfd_coff_force_symnames_in_strings */
+      2,			/* _bfd_coff_debug_string_prefix_length */
+      coff_swap_filehdr_in,
+      coff_swap_aouthdr_in,
+      coff_swap_scnhdr_in,
+      xcoff_swap_reloc_in,
+      coff_bad_format_hook,
+      coff_set_arch_mach_hook,
+      coff_mkobject_hook,
+      styp_to_sec_flags,
+      coff_set_alignment_hook,
+      coff_slurp_symbol_table,
+      symname_in_debug_hook,
+      coff_pointerize_aux_hook,
+      coff_print_aux,
+      dummy_reloc16_extra_cases,
+      dummy_reloc16_estimate,
+      NULL,			/* bfd_coff_sym_is_global */
+      coff_compute_section_file_positions,
+      NULL,			/* _bfd_coff_start_final_link */
+      xcoff_ppc_relocate_section,
+      coff_rtype_to_howto,
+      NULL,			/* _bfd_coff_adjust_symndx */
+      _bfd_generic_link_add_one_symbol,
+      coff_link_output_has_begun,
+      coff_final_link_postscript
+    },
 
-  0x01DF,                             /* magic number */
-  bfd_arch_powerpc,                   /* architecture */
-  bfd_mach_ppc,                       /* machine */
+    0x01DF,			/* magic number */
+    bfd_arch_powerpc,
+    bfd_mach_ppc,
 
-  /* function pointers to xcoff specific swap routines */
-  xcoff_swap_ldhdr_in,                /* _xcoff_swap_ldhdr_in */
-  xcoff_swap_ldhdr_out,               /* _xcoff_swap_ldhdr_out */
-  xcoff_swap_ldsym_in,                /* _xcoff_swap_ldsym_in */
-  xcoff_swap_ldsym_out,               /* _xcoff_swap_ldsym_out */
-  xcoff_swap_ldrel_in,                /* _xcoff_swap_ldrel_in */
-  xcoff_swap_ldrel_out,               /* _xcoff_swap_ldrel_out */
+    /* Function pointers to xcoff specific swap routines.  */
+    xcoff_swap_ldhdr_in,
+    xcoff_swap_ldhdr_out,
+    xcoff_swap_ldsym_in,
+    xcoff_swap_ldsym_out,
+    xcoff_swap_ldrel_in,
+    xcoff_swap_ldrel_out,
 
-  /* sizes */
-  LDHDRSZ,                            /* _xcoff_ldhdrsz */
-  LDSYMSZ,                            /* _xcoff_ldsymsz */
-  LDRELSZ,                            /* _xcoff_ldrelsz */
-  12,                                 /* _xcoff_function_descriptor_size */
-  SMALL_AOUTSZ,                       /* _xcoff_small_aout_header_size */
+    /* Sizes.  */
+    LDHDRSZ,
+    LDSYMSZ,
+    LDRELSZ,
+    12,				/* _xcoff_function_descriptor_size */
+    SMALL_AOUTSZ,
 
-  /* versions */
-  1,                                    /* _xcoff_ldhdr_version */
+    /* Versions.  */
+    1,				/* _xcoff_ldhdr_version */
 
-  /* xcoff vs xcoff64 putting symbol names */
-  _bfd_xcoff_put_symbol_name,          /* _xcoff_put_symbol_name */
-  _bfd_xcoff_put_ldsymbol_name,          /* _xcoff_put_ldsymbol_name */
+    _bfd_xcoff_put_symbol_name,
+    _bfd_xcoff_put_ldsymbol_name,
+    &xcoff_dynamic_reloc,
+    xcoff_create_csect_from_smclas,
 
-  &xcoff_dynamic_reloc,                  /* dynamic reloc howto */
+    /* Lineno and reloc count overflow.  */
+    xcoff_is_lineno_count_overflow,
+    xcoff_is_reloc_count_overflow,
 
-  xcoff_create_csect_from_smclas,      /* _xcoff_create_csect_from_smclas */
+    xcoff_loader_symbol_offset,
+    xcoff_loader_reloc_offset,
 
-  /* lineno and reloc count overflow */
-  xcoff_is_lineno_count_overflow,
-  xcoff_is_reloc_count_overflow,
+    /* glink.  */
+    &xcoff_glink_code[0],
+    36,				/* _xcoff_glink_size */
 
-  xcoff_loader_symbol_offset,
-  xcoff_loader_reloc_offset,
+    /* rtinit */
+    0,				/* _xcoff_rtinit_size */
+    xcoff_generate_rtinit,
+  };
 
-  /* glink */
-  &xcoff_glink_code[0],
-  (36),           /* _xcoff_glink_size */
-
-  /* rtinit */
-  0,           /* _xcoff_rtinit_size */
-  xcoff_generate_rtinit,  /* _xcoff_generate_rtinit */
-};
-
-/* The transfer vector that leads the outside world to all of the above. */
+/* The transfer vector that leads the outside world to all of the above.  */
 const bfd_target pmac_xcoff_vec =
-{
-  "xcoff-powermac",
-  bfd_target_xcoff_flavour,
-  BFD_ENDIAN_BIG,		/* data byte order is big */
-  BFD_ENDIAN_BIG,		/* header byte order is big */
+  {
+    "xcoff-powermac",
+    bfd_target_xcoff_flavour,
+    BFD_ENDIAN_BIG,		/* data byte order is big */
+    BFD_ENDIAN_BIG,		/* header byte order is big */
 
-  (HAS_RELOC | EXEC_P |		/* object flags */
-   HAS_LINENO | HAS_DEBUG | DYNAMIC |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT),
+    (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+     | HAS_SYMS | HAS_LOCALS | WP_TEXT),
 
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-  0,				/* leading char */
-  '/',				/* ar_pad_char */
-  15,				/* ar_max_namelen??? FIXMEmgo */
+    SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA,
+    0,				/* leading char */
+    '/',			/* ar_pad_char */
+    15,				/* ar_max_namelen */
 
-                      /* data */
-  bfd_getb64,         /* bfd_getx64 */
-  bfd_getb_signed_64, /* bfd_getx_signed_64 */
-  bfd_putb64,         /* bfd_putx64 */
-  bfd_getb32,         /* bfd_getx32 */
-  bfd_getb_signed_32, /* bfd_getx_signed_32 */
-  bfd_putb32,         /* bfd_putx32 */
-  bfd_getb16,         /* bfd_getx16 */
-  bfd_getb_signed_16, /* bfd_getx_signed_16 */
-  bfd_putb16,         /* bfd_putx16 */
+    /* data */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-                      /* hdrs */
-  bfd_getb64,         /* bfd_h_getx64 */
-  bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
-  bfd_putb64,         /* bfd_h_putx64 */
-  bfd_getb32,         /* bfd_h_getx32 */
-  bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
-  bfd_putb32,         /* bfd_h_putx32 */
-  bfd_getb16,         /* bfd_h_getx16 */
-  bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
-  bfd_putb16,         /* bfd_h_putx16 */
+    /* hdrs */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  { /* bfd_check_format */
-    _bfd_dummy_target,
-    coff_object_p,
-    _bfd_xcoff_archive_p,
-    CORE_FILE_P
-  },
+    { /* bfd_check_format */
+      _bfd_dummy_target,
+      coff_object_p,
+      _bfd_xcoff_archive_p,
+      CORE_FILE_P
+    },
 
-  { /* bfd_set_format */
+    { /* bfd_set_format */
+      bfd_false,
+      coff_mkobject,
+      _bfd_generic_mkarchive,
+      bfd_false
+    },
+
+    {/* bfd_write_contents */
+      bfd_false,
+      coff_write_object_contents,
+      _bfd_xcoff_write_archive_contents,
+      bfd_false
+    },
+
+    /* Generic */
+    bfd_true,
+    bfd_true,
+    coff_new_section_hook,
+    _bfd_generic_get_section_contents,
+    _bfd_generic_get_section_contents_in_window,
+
+    /* Copy */
+    _bfd_xcoff_copy_private_bfd_data,
+    ((boolean (*) (bfd *, bfd *)) bfd_true),
+    ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+    ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+    ((boolean (*) (bfd *, flagword)) bfd_true),
+    ((boolean (*) (bfd *, void * )) bfd_true),
+
+    /* Core */
+    coff_core_file_failing_command,
+    coff_core_file_failing_signal,
+    coff_core_file_matches_executable_p,
+
+    /* Archive */
+    _bfd_xcoff_slurp_armap,
     bfd_false,
-    coff_mkobject,
-    _bfd_generic_mkarchive,
-    bfd_false
-  },
+    ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+    bfd_dont_truncate_arname,
+    _bfd_xcoff_write_armap,
+    _bfd_xcoff_read_ar_hdr,
+    _bfd_xcoff_openr_next_archived_file,
+    _bfd_generic_get_elt_at_index,
+    _bfd_xcoff_stat_arch_elt,
+    bfd_true,
 
-  {/* bfd_write_contents */
-    bfd_false,
-    coff_write_object_contents,
-    _bfd_xcoff_write_archive_contents,
-    bfd_false
-  },
+    /* Symbols */
+    coff_get_symtab_upper_bound,
+    coff_get_symtab,
+    coff_make_empty_symbol,
+    coff_print_symbol,
+    coff_get_symbol_info,
+    _bfd_xcoff_is_local_label_name,
+    coff_get_lineno,
+    coff_find_nearest_line,
+    coff_bfd_make_debug_symbol,
+    _bfd_generic_read_minisymbols,
+    _bfd_generic_minisymbol_to_symbol,
 
-  /* Generic */
-  bfd_true,                          /* _close_and_cleanup */
-  bfd_true,                          /* _bfd_free_cached_info */
-  coff_new_section_hook,             /* _new_section_hook */
-  _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
-                                     /* _bfd_get_section_contents_in_window */
-  _bfd_generic_get_section_contents_in_window,
+    /* Reloc */
+    coff_get_reloc_upper_bound,
+    coff_canonicalize_reloc,
+    _bfd_xcoff_reloc_type_lookup,
 
-  /* Copy */
-  _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
-                                    /* _bfd_merge_private_bfd_data */
-  ((boolean (*) (bfd *, bfd *)) bfd_true),
-                                    /* _bfd_copy_pivate_section_data */
-  ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
-                                    /* _bfd_copy_private_symbol_data */
-  ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
-  ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
-  ((boolean (*) (bfd *, void * )) bfd_true),  /* _bfd_print_private_bfd_data */
+    /* Write */
+    coff_set_arch_mach,
+    coff_set_section_contents,
 
-  /* Core */
-  coff_core_file_failing_command,    /* _core_file_failing_command */
-  coff_core_file_failing_signal,     /* _core_file_failing_signal */
-                                          /* _core_file_matches_executable_p */
-  coff_core_file_matches_executable_p,
+    /* Link */
+    _bfd_xcoff_sizeof_headers,
+    bfd_generic_get_relocated_section_contents,
+    bfd_generic_relax_section,
+    _bfd_xcoff_bfd_link_hash_table_create,
+    _bfd_generic_link_hash_table_free,
+    _bfd_xcoff_bfd_link_add_symbols,
+    _bfd_generic_link_just_syms,
+    _bfd_xcoff_bfd_final_link,
+    _bfd_generic_link_split_section,
+    bfd_generic_gc_sections,
+    bfd_generic_merge_sections,
+    bfd_generic_discard_group,
 
-  /* Archive */
-  _bfd_xcoff_slurp_armap,                  /* _slurp_armap */
-                                           /* XCOFF archives do not have
-					      anything which corresponds to
-					      an extended name table.  */
-  bfd_false,                               /* _slurp_extended_name_table */
-                                           /* _construct_extended_name_table */
-  ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
-  bfd_dont_truncate_arname,                /* _truncate_arname */
-  _bfd_xcoff_write_armap,                  /* _write_armap */
-  _bfd_xcoff_read_ar_hdr,                  /* _read_ar_hdr */
-  _bfd_xcoff_openr_next_archived_file,     /* _openr_next_archived_file */
-  _bfd_generic_get_elt_at_index,           /* _get_elt_at_index */
-  _bfd_xcoff_stat_arch_elt,                /* _generic_stat_arch_elt */
-                                           /* XCOFF archives do not have
-					      a timestamp.  */
-  bfd_true,                                /* _update_armap_timestamp */
+    /* Dynamic */
+    _bfd_xcoff_get_dynamic_symtab_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_symtab,
+    _bfd_xcoff_get_dynamic_reloc_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_reloc,
 
-  /* Symbols */
-  coff_get_symtab_upper_bound,             /* _get_symtab_upper_bound */
-  coff_get_symtab,                         /* _get_symtab */
-  coff_make_empty_symbol,                  /* _make_empty_symbol */
-  coff_print_symbol,                       /* _print_symbol */
-  coff_get_symbol_info,                    /* _get_symbol_info */
-  _bfd_xcoff_is_local_label_name,          /* _bfd_is_local_label_name */
-  coff_get_lineno,                         /* _get_lineno */
-  coff_find_nearest_line,                  /* _find_nearest_line */
-  coff_bfd_make_debug_symbol,              /* _bfd_make_debug_symbol */
-  _bfd_generic_read_minisymbols,           /* _read_minisymbols */
-  _bfd_generic_minisymbol_to_symbol,       /* _minsymbol_to_symbol */
+    /* Opposite endian version, none exists */
+    NULL,
 
-  /* Reloc */
-  coff_get_reloc_upper_bound,              /* _get_reloc_upper_bound */
-  coff_canonicalize_reloc,                 /* _cononicalize_reloc */
-  _bfd_xcoff_reloc_type_lookup,            /* _bfd_reloc_type_lookup */
-
-  /* Write */
-  coff_set_arch_mach,                      /* _set_arch_mach */
-  coff_set_section_contents,               /* _set_section_contents */
-
-  /* Link */
-  _bfd_xcoff_sizeof_headers,               /* _sizeof_headers */
-                                      /* _bfd_get_relocated_section_contents */
-  bfd_generic_get_relocated_section_contents,
-  bfd_generic_relax_section,               /* _bfd_relax_section */
-  _bfd_xcoff_bfd_link_hash_table_create,   /* _bfd_link_hash_table_create */
-  _bfd_generic_link_hash_table_free,       /* _bfd_link_hash_table_free */
-  _bfd_xcoff_bfd_link_add_symbols,         /* _bfd_link_add_symbols */
-  _bfd_generic_link_just_syms,             /* _bfd_link_just_syms */
-  _bfd_xcoff_bfd_final_link,               /* _bfd_final_link */
-  _bfd_generic_link_split_section,         /* _bfd_link_split_section */
-  bfd_generic_gc_sections,                 /* _bfd_gc_sections */
-  bfd_generic_merge_sections,               /* _bfd_merge_sections */
-
-  /* Dynamic */
-                                          /* _get_dynamic_symtab_upper_bound */
-  _bfd_xcoff_get_dynamic_symtab_upper_bound,
-  _bfd_xcoff_canonicalize_dynamic_symtab,  /* _cononicalize_dynamic_symtab */
-  _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
-  _bfd_xcoff_canonicalize_dynamic_reloc,   /* _cononicalize_dynamic_reloc */
-
-  /* Opposite endian version, none exists */
-  NULL,
-
-  /* back end data */
-  (void *) &bfd_pmac_xcoff_backend_data,
-};
+    (void *) &bfd_pmac_xcoff_backend_data,
+  };
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index d13fa0f..d5cce39 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -156,36 +156,36 @@
 static boolean xcoff64_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
 
 boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-     (XCOFF_RELOC_FUNCTION_ARGS) =
+  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
 {
-  xcoff_reloc_type_pos,  /* R_POS   (0x00) */
-  xcoff_reloc_type_neg,  /* R_NEG   (0x01) */
-  xcoff_reloc_type_rel,  /* R_REL   (0x02) */
-  xcoff_reloc_type_toc,  /* R_TOC   (0x03) */
+  xcoff_reloc_type_pos,	 /* R_POS   (0x00) */
+  xcoff_reloc_type_neg,	 /* R_NEG   (0x01) */
+  xcoff_reloc_type_rel,	 /* R_REL   (0x02) */
+  xcoff_reloc_type_toc,	 /* R_TOC   (0x03) */
   xcoff_reloc_type_fail, /* R_RTB   (0x04) */
-  xcoff_reloc_type_toc,  /* R_GL    (0x05) */
-  xcoff_reloc_type_toc,  /* R_TCL   (0x06) */
-  xcoff_reloc_type_fail, /*         (0x07) */
-  xcoff_reloc_type_ba,   /* R_BA    (0x08) */
-  xcoff_reloc_type_fail, /*         (0x09) */
+  xcoff_reloc_type_toc,	 /* R_GL    (0x05) */
+  xcoff_reloc_type_toc,	 /* R_TCL   (0x06) */
+  xcoff_reloc_type_fail, /*	    (0x07) */
+  xcoff_reloc_type_ba,	 /* R_BA    (0x08) */
+  xcoff_reloc_type_fail, /*	    (0x09) */
   xcoff64_reloc_type_br, /* R_BR    (0x0a) */
-  xcoff_reloc_type_fail, /*         (0x0b) */
-  xcoff_reloc_type_pos,  /* R_RL    (0x0c) */
-  xcoff_reloc_type_pos,  /* R_RLA   (0x0d) */
-  xcoff_reloc_type_fail, /*         (0x0e) */
+  xcoff_reloc_type_fail, /*	    (0x0b) */
+  xcoff_reloc_type_pos,	 /* R_RL    (0x0c) */
+  xcoff_reloc_type_pos,	 /* R_RLA   (0x0d) */
+  xcoff_reloc_type_fail, /*	    (0x0e) */
   xcoff_reloc_type_noop, /* R_REF   (0x0f) */
-  xcoff_reloc_type_fail, /*         (0x10) */
-  xcoff_reloc_type_fail, /*         (0x11) */
-  xcoff_reloc_type_toc,  /* R_TRL   (0x12) */
-  xcoff_reloc_type_toc,  /* R_TRLA  (0x13) */
+  xcoff_reloc_type_fail, /*	    (0x10) */
+  xcoff_reloc_type_fail, /*	    (0x11) */
+  xcoff_reloc_type_toc,	 /* R_TRL   (0x12) */
+  xcoff_reloc_type_toc,	 /* R_TRLA  (0x13) */
   xcoff_reloc_type_fail, /* R_RRTBI (0x14) */
   xcoff_reloc_type_fail, /* R_RRTBA (0x15) */
-  xcoff_reloc_type_ba,   /* R_CAI   (0x16) */
+  xcoff_reloc_type_ba,	 /* R_CAI   (0x16) */
   xcoff_reloc_type_crel, /* R_CREL  (0x17) */
-  xcoff_reloc_type_ba,   /* R_RBA   (0x18) */
-  xcoff_reloc_type_ba,   /* R_RBAC  (0x19) */
+  xcoff_reloc_type_ba,	 /* R_RBA   (0x18) */
+  xcoff_reloc_type_ba,	 /* R_RBAC  (0x19) */
   xcoff64_reloc_type_br, /* R_RBR   (0x1a) */
-  xcoff_reloc_type_ba,   /* R_RBRC  (0x1b) */
+  xcoff_reloc_type_ba,	 /* R_RBRC  (0x1b) */
 };
 
 /* coffcode.h needs these to be defined.  */
@@ -214,7 +214,7 @@
 #ifdef AIX_CORE
 extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd));
 extern boolean rs6000coff_core_file_matches_executable_p
-  PARAMS((bfd *cbfd, bfd *ebfd));
+  PARAMS ((bfd *cbfd, bfd *ebfd));
 extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
 extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
 #define CORE_FILE_P rs6000coff_core_p
@@ -722,7 +722,7 @@
 
 static boolean
 xcoff64_write_object_contents (abfd)
-     bfd * abfd;
+     bfd *abfd;
 {
   asection *current;
   boolean hasrelocs = false;
@@ -742,7 +742,7 @@
 
   bfd_set_error (bfd_error_system_call);
 
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       if (! bfd_coff_compute_section_file_positions (abfd))
 	return false;
@@ -886,9 +886,11 @@
   memset (&internal_a, 0, sizeof internal_a);
 
   internal_f.f_magic = bfd_xcoff_magic_number (abfd);
-  internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
-    (abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
-    RS6K_AOUTHDR_OMAGIC;
+  internal_a.magic = (abfd->flags & D_PAGED
+		      ? RS6K_AOUTHDR_ZMAGIC
+		      : (abfd->flags & WP_TEXT
+			 ? RS6K_AOUTHDR_NMAGIC
+			 : RS6K_AOUTHDR_OMAGIC));
 
   /* FIXME: Does anybody ever set this to another value?  */
   internal_a.vstamp = 0;
@@ -1054,7 +1056,7 @@
       if (buff == NULL)
 	return false;
 
-      bfd_coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff);
+      bfd_coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) buff);
       amount = bfd_bwrite ((PTR) buff, amount, abfd);
 
       free (buff);
@@ -1066,8 +1068,8 @@
   return true;
 }
 
-static boolean 
-xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, 
+static boolean
+xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
 		       val, addend, relocation, contents)
      bfd *input_bfd;
      asection *input_section;
@@ -1082,7 +1084,7 @@
 {
   struct xcoff_link_hash_entry *h;
 
-  if (0 > rel->r_symndx) 
+  if (0 > rel->r_symndx)
     return false;
 
   h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
@@ -1094,53 +1096,53 @@
      call is followed by a ld r2,40(r1), but the call is not
      going to global linkage code, we can replace the load with a
      cror.  */
-  if (NULL != h 
-      && bfd_link_hash_defined == h->root.type 
-      && (rel->r_vaddr - input_section->vma + 8 <= 
-	  input_section->_cooked_size)) 
+  if (NULL != h
+      && bfd_link_hash_defined == h->root.type
+      && (rel->r_vaddr - input_section->vma + 8
+	  <= input_section->_cooked_size))
     {
       bfd_byte *pnext;
       unsigned long next;
-      
+
       pnext = contents + (rel->r_vaddr - input_section->vma) + 4;
       next = bfd_get_32 (input_bfd, pnext);
-      
-      /* The _ptrgl function is magic.  It is used by the AIX compiler to call 
+
+      /* The _ptrgl function is magic.  It is used by the AIX compiler to call
 	 a function through a pointer.  */
-      if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0) 
+      if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0)
 	{
-	  if (next == 0x4def7b82 		       /* cror 15,15,15  */
-	      || next == 0x4ffffb82  	               /* cror 31,31,31  */
-	      || next == 0x60000000)                   /* ori  r0,r0,0   */
-	    bfd_put_32 (input_bfd, 0xe8410028, pnext); /* ld   r2,40(r1) */
-	} 
-      else 
-	{
-	  if (next == 0xe8410028)		       /* ld r2,40(r1)   */
-	    bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0    */
+	  if (next == 0x4def7b82			/* cror 15,15,15  */
+	      || next == 0x4ffffb82			/* cror 31,31,31  */
+	      || next == 0x60000000)			/* ori	r0,r0,0	  */
+	    bfd_put_32 (input_bfd, 0xe8410028, pnext);	/* ld	r2,40(r1) */
 	}
-    } 
-  else if (NULL != h && bfd_link_hash_undefined == h->root.type) 
+      else
+	{
+	  if (next == 0xe8410028)			/* ld r2,40(r1)	  */
+	    bfd_put_32 (input_bfd, 0x60000000, pnext);	/* ori r0,r0,0	  */
+	}
+    }
+  else if (NULL != h && bfd_link_hash_undefined == h->root.type)
     {
       /* Normally, this relocation is against a defined symbol.  In the
 	 case where this is a partial link and the output section offset
-	 is greater than 2^25, the linker will return an invalid error 
+	 is greater than 2^25, the linker will return an invalid error
 	 message that the relocation has been truncated.  Yes it has been
-	 truncated but no it not important.  For this case, disable the 
+	 truncated but no it not important.  For this case, disable the
 	 overflow checking. */
       howto->complain_on_overflow = complain_overflow_dont;
     }
-  
+
   howto->pc_relative = true;
   howto->src_mask &= ~3;
   howto->dst_mask = howto->src_mask;
-  
+
   /* A PC relative reloc includes the section address.  */
   addend += input_section->vma;
-  
+
   *relocation = val + addend;
-  *relocation -= (input_section->output_section->vma + 
-		  input_section->output_offset);
+  *relocation -= (input_section->output_section->vma
+		  + input_section->output_offset);
   return true;
 }
 
@@ -1179,8 +1181,8 @@
       bfd_byte *location;
 
       /* Relocation type R_REF is a special relocation type which is
-         merely used to prevent garbage collection from occurring for
-         the csect including the symbol which it references.  */
+	 merely used to prevent garbage collection from occurring for
+	 the csect including the symbol which it references.  */
       if (rel->r_type == R_REF)
 	continue;
 
@@ -1191,12 +1193,13 @@
       howto.size = howto.bitsize > 16 ? (howto.bitsize > 32 ? 4 : 2) : 1;
       howto.pc_relative = false;
       howto.bitpos = 0;
-      howto.complain_on_overflow = rel->r_size & 0x80 ? 
-	complain_overflow_signed : complain_overflow_bitfield;
+      howto.complain_on_overflow = (rel->r_size & 0x80
+				    ? complain_overflow_signed
+				    : complain_overflow_bitfield);
       howto.special_function = NULL;
       howto.name = "internal";
       howto.partial_inplace = true;
-      howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+      howto.src_mask = howto.dst_mask = N_ONES (howto.bitsize);
       howto.pcrel_offset = false;
 
       /* symbol */
@@ -1204,17 +1207,17 @@
       addend = 0;
       h = NULL;
       sym = NULL;
-      symndx = rel->r_symndx;      
+      symndx = rel->r_symndx;
 
-      if (-1 != symndx)	
+      if (-1 != symndx)
 	{
 	  asection *sec;
-	  
+
 	  h = obj_xcoff_sym_hashes (input_bfd)[symndx];
 	  sym = syms + symndx;
 	  addend = - sym->n_value;
-	  
-	  if (NULL == h) 
+
+	  if (NULL == h)
 	    {
 	      sec = sections[symndx];
 	      /* Hack to make sure we use the right TOC anchor value
@@ -1227,93 +1230,93 @@
 		       + sec->output_offset
 		       + sym->n_value
 		       - sec->vma);
-	    } 
-	  else 
+	    }
+	  else
 	    {
-	      if (h->root.type == bfd_link_hash_defined 
-		  || h->root.type == bfd_link_hash_defweak) 
+	      if (h->root.type == bfd_link_hash_defined
+		  || h->root.type == bfd_link_hash_defweak)
 		{
 		  sec = h->root.u.def.section;
 		  val = (h->root.u.def.value
 			 + sec->output_section->vma
 			 + sec->output_offset);
-		} 
-	      else if (h->root.type == bfd_link_hash_common) 
+		}
+	      else if (h->root.type == bfd_link_hash_common)
 		{
 		  sec = h->root.u.c.p->section;
 		  val = (sec->output_section->vma
 			 + sec->output_offset);
-		} 
-	      else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) 
-		       && ! info->relocateable) 
+		}
+	      else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
+		       && ! info->relocateable)
 		{
 		  if (! ((*info->callbacks->undefined_symbol)
 			 (info, h->root.root.string, input_bfd, input_section,
 			  rel->r_vaddr - input_section->vma, true)))
 		    return false;
-		  
+
 		  /* Don't try to process the reloc.  It can't help, and
 		     it may generate another error.  */
 		  continue;
 		}
 	    }
 	}
-      
-      if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION 
-	  || (false == xcoff64_calculate_relocation[rel->r_type]
-	      (input_bfd, input_section, output_bfd, rel, sym, &howto, val, 
-	       addend, &relocation, contents))) 
+
+      if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
+	  || ((*xcoff64_calculate_relocation[rel->r_type])
+	      (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
+	       addend, &relocation, contents)))
 	return false;
-      
+
       /* address */
       address = rel->r_vaddr - input_section->vma;
       location = contents + address;
-      
+
       if (address > input_section->_raw_size)
-	abort();
-      
+	abort ();
+
       /* Get the value we are going to relocate.  */
       if (1 == howto.size)
 	value_to_relocate = bfd_get_16 (input_bfd, location);
       else if (2 == howto.size)
 	value_to_relocate = bfd_get_32 (input_bfd, location);
-      else 
+      else
 	value_to_relocate = bfd_get_64 (input_bfd, location);
-      
-      /* overflow.  
-	 
+
+      /* overflow.
+
 	 FIXME: We may drop bits during the addition
 	 which we don't check for.  We must either check at every single
 	 operation, which would be tedious, or we must do the computations
 	 in a type larger than bfd_vma, which would be inefficient.  */
-      
-      if ((unsigned int) howto.complain_on_overflow >= 
-	  XCOFF_MAX_COMPLAIN_OVERFLOW)
-	abort();
-      
-      if ((true == xcoff_complain_overflow[howto.complain_on_overflow]
-	   (input_bfd, value_to_relocate, relocation, &howto))) 
+
+      if ((unsigned int) howto.complain_on_overflow
+	  >= XCOFF_MAX_COMPLAIN_OVERFLOW)
+	abort ();
+
+      if (((*xcoff_complain_overflow[howto.complain_on_overflow])
+	   (input_bfd, value_to_relocate, relocation, &howto)))
 	{
 	  const char *name;
 	  char buf[SYMNMLEN + 1];
 	  char reloc_type_name[10];
-	  
-	  if (symndx == -1) 
+
+	  if (symndx == -1)
 	    {
 	      name = "*ABS*";
-	    } 
-	  else if (h != NULL) 
+	    }
+	  else if (h != NULL)
 	    {
 	      name = h->root.root.string;
-	    } 
-	  else 
+	    }
+	  else
 	    {
 	      name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
 	      if (name == NULL)
 		name = "UNKNOWN";
 	    }
 	  sprintf (reloc_type_name, "0x%02x", rel->r_type);
-	  
+
 	  if (! ((*info->callbacks->reloc_overflow)
 		 (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
 		  input_section, rel->r_vaddr - input_section->vma)))
@@ -1321,10 +1324,10 @@
 	}
 
       /* Add RELOCATION to the right bits of VALUE_TO_RELOCATE.  */
-      value_to_relocate = ((value_to_relocate & ~howto.dst_mask) | 
-			   (((value_to_relocate & howto.src_mask) + 
-			     relocation) & howto.dst_mask));
-      
+      value_to_relocate = ((value_to_relocate & ~howto.dst_mask)
+			   | (((value_to_relocate & howto.src_mask)
+			       + relocation) & howto.dst_mask));
+
       /* Put the value back in the object file.  */
       if (1 == howto.size)
 	bfd_put_16 (input_bfd, value_to_relocate, location);
@@ -1332,7 +1335,7 @@
 	bfd_put_32 (input_bfd, value_to_relocate, location);
       else
 	bfd_put_64 (input_bfd, value_to_relocate, location);
-      
+
     }
   return true;
 }
@@ -1406,7 +1409,7 @@
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  /* I don't really know what this is.  */
+  /* I don't really know what this is.	*/
   HOWTO (R_RTB,			/* type */
 	 1,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1424,7 +1427,7 @@
   /* External TOC relative symbol.  */
   HOWTO (R_GL,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1439,7 +1442,7 @@
   /* Local TOC relative symbol.	 */
   HOWTO (R_TCL,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1464,8 +1467,8 @@
 	 0,			/* special_function */
 	 "R_BA_26",		/* name */
 	 true,			/* partial_inplace */
-	 0x3fffffc,		/* src_mask */
-	 0x3fffffc,		/* dst_mask */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (9),
@@ -1481,8 +1484,8 @@
 	 0,			/* special_function */
 	 "R_BR",		/* name */
 	 true,			/* partial_inplace */
-	 0x3fffffc,		/* src_mask */
-	 0x3fffffc,		/* dst_mask */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   EMPTY_HOWTO (0xb),
@@ -1490,7 +1493,7 @@
   /* Indirect load.  */
   HOWTO (R_RL,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1505,7 +1508,7 @@
   /* Load address.  */
   HOWTO (R_RLA,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1519,14 +1522,14 @@
 
   EMPTY_HOWTO (0xe),
 
-  /* Non-relocating reference.  */
+  /* Non-relocating reference.	*/
   HOWTO (R_REF,			/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
 	 32,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_dont, /* complain_on_overflow */
 	 0,			/* special_function */
 	 "R_REF",		/* name */
 	 false,			/* partial_inplace */
@@ -1540,7 +1543,7 @@
   /* TOC relative indirect load.  */
   HOWTO (R_TRL,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1555,7 +1558,7 @@
   /* TOC relative load address.	 */
   HOWTO (R_TRLA,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1600,7 +1603,7 @@
   /* Modifiable call absolute indirect.	 */
   HOWTO (R_CAI,			/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1612,10 +1615,10 @@
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  /* Modifiable call relative.  */
+  /* Modifiable call relative.	*/
   HOWTO (R_CREL,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1638,8 +1641,8 @@
 	 0,			/* special_function */
 	 "R_RBA",		/* name */
 	 true,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Modifiable branch absolute.  */
@@ -1653,8 +1656,8 @@
 	 0,			/* special_function */
 	 "R_RBAC",		/* name */
 	 true,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Modifiable branch relative.  */
@@ -1668,14 +1671,14 @@
 	 0,			/* special_function */
 	 "R_RBR_26",		/* name */
 	 true,			/* partial_inplace */
-	 0xffff,		/* src_mask */
-	 0xffff,		/* dst_mask */
+	 0x03fffffc,		/* src_mask */
+	 0x03fffffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Modifiable branch absolute.  */
   HOWTO (R_RBRC,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
 	 16,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
@@ -1717,19 +1720,35 @@
 	 false),		/* pcrel_offset */
 
   /* Modifiable branch relative.  */
-  HOWTO (R_RBR,	                /* type */
-	 0,	                /* rightshift */
-	 1,	                /* size (0 = byte, 1 = short, 2 = long) */
-	 16,	                /* bitsize */
-	 false,	                /* pc_relative */
-	 0,	                /* bitpos */
+  HOWTO (R_RBR,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 0,		        /* special_function */
-	 "R_RBR_16",            /* name */
-	 true,	                /* partial_inplace */
-	 0xffff,	        /* src_mask */
-	 0xffff,        	/* dst_mask */
-	 false),                /* pcrel_offset */
+	 0,			/* special_function */
+	 "R_RBR_16",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Modifiable branch absolute.  */
+  HOWTO (R_RBA,			/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "R_RBA_16",		/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
 };
 
 void
@@ -1742,22 +1761,24 @@
 
   /* Default howto layout works most of the time */
   relent->howto = &xcoff64_howto_table[internal->r_type];
-  
+
   /* Special case some 16 bit reoloc */
   if (15 == (internal->r_size & 0x3f))
     {
-      if (R_BA == internal->r_type) 
+      if (R_BA == internal->r_type)
 	relent->howto = &xcoff64_howto_table[0x1d];
-      else if (R_RBR == internal->r_type) 
+      else if (R_RBR == internal->r_type)
 	relent->howto = &xcoff64_howto_table[0x1e];
+      else if (R_RBA == internal->r_type)
+	relent->howto = &xcoff64_howto_table[0x1f];
     }
   /* Special case 32 bit */
   else if (31 == (internal->r_size & 0x3f))
     {
-      if (R_POS == internal->r_type) 
+      if (R_POS == internal->r_type)
 	relent->howto = &xcoff64_howto_table[0x1c];
     }
-  
+
   /* The r_size field of an XCOFF reloc encodes the bitsize of the
      relocation, as well as indicating whether it is signed or not.
      Doublecheck that the relocation information gathered from the
@@ -1767,10 +1788,6 @@
       && (relent->howto->bitsize
 	  != ((unsigned int) internal->r_size & 0x3f) + 1))
     abort ();
-
-  /* Put a meaningful value in addend */
-  relent->addend = (internal->r_size & 0x80) ? - internal->r_vaddr 
-    : internal->r_vaddr;
 }
 
 reloc_howto_type *
@@ -1822,7 +1839,8 @@
       return true;
     }
 
-  off = strtol (xcoff_ardata_big (abfd)->symoff64, (char **) NULL, 10);
+  off = bfd_scan_vma (xcoff_ardata_big (abfd)->symoff64,
+		      (const char **) NULL, 10);
   if (off == 0)
     {
       bfd_has_map (abfd) = false;
@@ -1843,10 +1861,7 @@
   if (bfd_seek (abfd, pos, SEEK_CUR) != 0)
     return false;
 
-  /* XXX This actually has to be a call to strtoll (at least on 32-bit
-     machines) since the field width is 20 and there numbers with more
-     than 32 bits can be represented.  */
-  sz = strtol (hdr.size, (char **) NULL, 10);
+  sz = bfd_scan_vma (hdr.size, (const char **) NULL, 10);
 
   /* Read in the entire symbol table.  */
   contents = (bfd_byte *) bfd_alloc (abfd, sz);
@@ -1902,6 +1917,7 @@
 xcoff64_archive_p (abfd)
      bfd *abfd;
 {
+  struct artdata *tdata_hold;
   char magic[SXCOFFARMAG];
   /* This is the new format.  */
   struct xcoff_ar_file_hdr_big hdr;
@@ -1920,50 +1936,46 @@
       return NULL;
     }
 
-  /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
-     involves a cast, we can't do it as the left operand of
-     assignment.  */
-  amt = sizeof (struct artdata);
-  abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
-
-  if (bfd_ardata (abfd) == (struct artdata *) NULL)
-    return NULL;
-
-  bfd_ardata (abfd)->cache = NULL;
-  bfd_ardata (abfd)->archive_head = NULL;
-  bfd_ardata (abfd)->symdefs = NULL;
-  bfd_ardata (abfd)->extended_names = NULL;
-
   /* Copy over the magic string.  */
   memcpy (hdr.magic, magic, SXCOFFARMAG);
 
   /* Now read the rest of the file header.  */
-  if (bfd_bread ((PTR) &hdr.memoff,
-		(bfd_size_type) (SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG),
-		abfd) != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
+  amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
+  if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
       return NULL;
     }
 
-  /* XXX This actually has to be a call to strtoll (at least on 32-bit
-     machines) since the field width is 20 and there numbers with more
-     than 32 bits can be represented.  */
-  bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
-						  (char **) NULL, 10);
+  tdata_hold = bfd_ardata (abfd);
+
+  amt = sizeof (struct artdata);
+  bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
+  if (bfd_ardata (abfd) == (struct artdata *) NULL)
+    goto error_ret_restore;
+
+  bfd_ardata (abfd)->cache = NULL;
+  bfd_ardata (abfd)->archive_head = NULL;
+  bfd_ardata (abfd)->symdefs = NULL;
+  bfd_ardata (abfd)->extended_names = NULL;
+  bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff,
+							(const char **) NULL,
+							10);
 
   amt = SIZEOF_AR_FILE_HDR_BIG;
   bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd)->tdata == NULL)
-    return NULL;
+    goto error_ret;
 
   memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG);
 
   if (! xcoff64_slurp_armap (abfd))
     {
+    error_ret:
       bfd_release (abfd, bfd_ardata (abfd));
-      abfd->tdata.aout_ar_data = (struct artdata *) NULL;
+    error_ret_restore:
+      bfd_ardata (abfd) = tdata_hold;
       return NULL;
     }
 
@@ -1993,20 +2005,15 @@
     }
   else
     {
-      /* XXX These actually have to be a calls to strtoll (at least
-	 on 32-bit machines) since the fields's width is 20 and
-	 there numbers with more than 32 bits can be represented.  */
-      filestart = strtol (arch_xhdr_big (last_file)->nextoff, (char **) NULL,
-			  10);
+      filestart = bfd_scan_vma (arch_xhdr_big (last_file)->nextoff,
+				(const char **) NULL, 10);
     }
-  /* XXX These actually have to be calls to strtoll (at least on 32-bit
-     machines) since the fields's width is 20 and there numbers with more
-     than 32 bits can be represented.  */
+
   if (filestart == 0
-      || filestart == strtol (xcoff_ardata_big (archive)->memoff,
-			      (char **) NULL, 10)
-      || filestart == strtol (xcoff_ardata_big (archive)->symoff,
-			      (char **) NULL, 10))
+      || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->memoff,
+				    (const char **) NULL, 10)
+      || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->symoff,
+				    (const char **) NULL, 10))
     {
       bfd_set_error (bfd_error_no_more_archived_files);
       return NULL;
@@ -2218,40 +2225,38 @@
   bss_scnhdr.s_flags = STYP_BSS;
 
   /* .data
-     0x0000           0x00000000 : rtl
-     0x0004           0x00000000 :
-     0x0008           0x00000018 : offset to init, or 0
-     0x000C           0x00000038 : offset to fini, or 0
-     0x0010           0x00000010 : size of descriptor
-     0x0014           0x00000000 : pad
-     0x0018           0x00000000 : init, needs a reloc
-     0x001C           0x00000000 :
-     0x0020           0x00000058 : offset to init name
-     0x0024           0x00000000 : flags, padded to a word
-     0x0028           0x00000000 : empty init
-     0x002C           0x00000000 :
-     0x0030           0x00000000 :
-     0x0034           0x00000000 :
-     0x0038           0x00000000 : fini, needs a reloc
-     0x003C           0x00000000 :
-     0x0040           0x00000??? : offset to fini name
-     0x0044           0x00000000 : flags, padded to a word
-     0x0048           0x00000000 : empty fini
-     0x004C           0x00000000 :
-     0x0050           0x00000000 :
-     0x0054           0x00000000 :
-     0x0058           init name
+     0x0000	      0x00000000 : rtl
+     0x0004	      0x00000000 :
+     0x0008	      0x00000018 : offset to init, or 0
+     0x000C	      0x00000038 : offset to fini, or 0
+     0x0010	      0x00000010 : size of descriptor
+     0x0014	      0x00000000 : pad
+     0x0018	      0x00000000 : init, needs a reloc
+     0x001C	      0x00000000 :
+     0x0020	      0x00000058 : offset to init name
+     0x0024	      0x00000000 : flags, padded to a word
+     0x0028	      0x00000000 : empty init
+     0x002C	      0x00000000 :
+     0x0030	      0x00000000 :
+     0x0034	      0x00000000 :
+     0x0038	      0x00000000 : fini, needs a reloc
+     0x003C	      0x00000000 :
+     0x0040	      0x00000??? : offset to fini name
+     0x0044	      0x00000000 : flags, padded to a word
+     0x0048	      0x00000000 : empty fini
+     0x004C	      0x00000000 :
+     0x0050	      0x00000000 :
+     0x0054	      0x00000000 :
+     0x0058	      init name
      0x0058 + initsz  fini name */
 
   data_buffer_size = 0x0058 + initsz + finisz;
-  data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+  data_buffer_size = (data_buffer_size + 7) &~ (bfd_size_type) 7;
   data_buffer = NULL;
-  data_buffer = (bfd_byte *)bfd_malloc (data_buffer_size);
+  data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
   if (data_buffer == NULL)
     return false;
 
-  memset (data_buffer, 0, data_buffer_size);
-
   if (initsz)
     {
       val = 0x18;
@@ -2281,11 +2286,13 @@
   string_table_size += strlen (rtinit_name) + 1;
   string_table_size += initsz;
   string_table_size += finisz;
-  if (true == rtld)
+  if (rtld)
     string_table_size += strlen (rtld_name) + 1;
 
-  string_table = (bfd_byte *)bfd_malloc (string_table_size);
-  memset (string_table, 0, string_table_size);
+  string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
+  if (string_table == NULL)
+    return false;
+
   val = string_table_size;
   bfd_put_32 (abfd, val, &string_table[0]);
   st_tmp = string_table + 4;
@@ -2483,504 +2490,474 @@
 };
 
 static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
-{
-  { /* COFF backend, defined in libcoff.h.  */
-    _bfd_xcoff64_swap_aux_in,		/* _bfd_coff_swap_aux_in */
-    _bfd_xcoff64_swap_sym_in,		/* _bfd_coff_swap_sym_in */
-    _bfd_xcoff64_swap_lineno_in,	/* _bfd_coff_swap_lineno_in */
-    _bfd_xcoff64_swap_aux_out,		/* _bfd_swap_aux_out */
-    _bfd_xcoff64_swap_sym_out,		/* _bfd_swap_sym_out */
-    _bfd_xcoff64_swap_lineno_out,	/* _bfd_swap_lineno_out */
-    xcoff64_swap_reloc_out,		/* _bfd_swap_reloc_out */
-    coff_swap_filehdr_out,		/* _bfd_swap_filehdr_out */
-    coff_swap_aouthdr_out,		/* _bfd_swap_aouthdr_out */
-    coff_swap_scnhdr_out,		/* _bfd_swap_scnhdr_out */
-    FILHSZ,				/* _bfd_filhsz */
-    AOUTSZ,				/* _bfd_aoutsz */
-    SCNHSZ,				/* _bfd_scnhsz */
-    SYMESZ,				/* _bfd_symesz */
-    AUXESZ,				/* _bfd_auxesz */
-    RELSZ,				/* _bfd_relsz */
-    LINESZ,				/* _bfd_linesz */
-    FILNMLEN,				/* _bfd_filnmlen */
-    true,				/* _bfd_coff_long_filenames */
-    false,				/* _bfd_coff_long_section_names */
-    (3),			/* _bfd_coff_default_section_alignment_power */
-    true,			/* _bfd_coff_force_symnames_in_strings */
-    4,				/* _bfd_coff_debug_string_prefix_length */
-    coff_swap_filehdr_in,		/* _bfd_coff_swap_filehdr_in */
-    coff_swap_aouthdr_in,		/* _bfd_swap_aouthdr_in */
-    coff_swap_scnhdr_in,		/* _bfd_swap_scnhdr_in */
-    xcoff64_swap_reloc_in,		/* _bfd_reloc_in */
-    xcoff64_bad_format_hook,		/* _bfd_bad_format_hook */
-    coff_set_arch_mach_hook,		/* _bfd_set_arch_mach_hook */
-    coff_mkobject_hook,			/* _bfd_mkobject_hook */
-    styp_to_sec_flags,			/* _bfd_syp_to_sec_flags */
-    coff_set_alignment_hook,		/* _bfd_set_alignment_hook */
-    coff_slurp_symbol_table,		/* _bfd_coff_slurp_symbol_table */
-    symname_in_debug_hook,		/* _coff_symname_in_debug_hook */
-    coff_pointerize_aux_hook,		/* _bfd_coff_pointerize_aux_hook */
-    coff_print_aux,			/* bfd_coff_print_aux */
-    dummy_reloc16_extra_cases,		/* _bfd_coff_reloc16_extra_cases */
-    dummy_reloc16_estimate,		/* _bfd_coff_reloc16_estimate */
-    NULL,				/* bfd_coff_sym_is_global */
-    /* _bfd_coff_compute_section_file_positions */
-    coff_compute_section_file_positions,
-    NULL ,				/* _bfd_coff_start_final_link */
-    xcoff64_ppc_relocate_section,	/* _bfd_coff_relocate_section */
-    coff_rtype_to_howto,		/* _bfd_coff_rtype_to_howto */
-    NULL ,				/* _bfd_coff_addust_symndx */
-    _bfd_generic_link_add_one_symbol,	/* _bfd_coff_add_one_symbol */
-    coff_link_output_has_begun,		/* _bfd_coff_link_output_has_begun */
-    coff_final_link_postscript		/* _bfd_coff_final_link_postscript */
-  },
+  {
+    { /* COFF backend, defined in libcoff.h.  */
+      _bfd_xcoff64_swap_aux_in,
+      _bfd_xcoff64_swap_sym_in,
+      _bfd_xcoff64_swap_lineno_in,
+      _bfd_xcoff64_swap_aux_out,
+      _bfd_xcoff64_swap_sym_out,
+      _bfd_xcoff64_swap_lineno_out,
+      xcoff64_swap_reloc_out,
+      coff_swap_filehdr_out,
+      coff_swap_aouthdr_out,
+      coff_swap_scnhdr_out,
+      FILHSZ,
+      AOUTSZ,
+      SCNHSZ,
+      SYMESZ,
+      AUXESZ,
+      RELSZ,
+      LINESZ,
+      FILNMLEN,
+      true,			/* _bfd_coff_long_filenames */
+      false,			/* _bfd_coff_long_section_names */
+      3,			/* _bfd_coff_default_section_alignment_power */
+      true,			/* _bfd_coff_force_symnames_in_strings */
+      4,			/* _bfd_coff_debug_string_prefix_length */
+      coff_swap_filehdr_in,
+      coff_swap_aouthdr_in,
+      coff_swap_scnhdr_in,
+      xcoff64_swap_reloc_in,
+      xcoff64_bad_format_hook,
+      coff_set_arch_mach_hook,
+      coff_mkobject_hook,
+      styp_to_sec_flags,
+      coff_set_alignment_hook,
+      coff_slurp_symbol_table,
+      symname_in_debug_hook,
+      coff_pointerize_aux_hook,
+      coff_print_aux,
+      dummy_reloc16_extra_cases,
+      dummy_reloc16_estimate,
+      NULL,			/* bfd_coff_sym_is_global */
+      coff_compute_section_file_positions,
+      NULL,			/* _bfd_coff_start_final_link */
+      xcoff64_ppc_relocate_section,
+      coff_rtype_to_howto,
+      NULL,			/* _bfd_coff_adjust_symndx */
+      _bfd_generic_link_add_one_symbol,
+      coff_link_output_has_begun,
+      coff_final_link_postscript
+    },
 
-  0x01EF,				/* magic number */
-  bfd_arch_powerpc,			/* architecture */
-  bfd_mach_ppc_620,			/* machine */
+    0x01EF,			/* magic number */
+    bfd_arch_powerpc,
+    bfd_mach_ppc_620,
 
-  /* Function pointers to xcoff specific swap routines.  */
-  xcoff64_swap_ldhdr_in,		/* _xcoff_swap_ldhdr_in */
-  xcoff64_swap_ldhdr_out,		/* _xcoff_swap_ldhdr_out */
-  xcoff64_swap_ldsym_in,		/* _xcoff_swap_ldsym_in */
-  xcoff64_swap_ldsym_out,		/* _xcoff_swap_ldsym_out */
-  xcoff64_swap_ldrel_in,		/* _xcoff_swap_ldrel_in */
-  xcoff64_swap_ldrel_out,		/* _xcoff_swap_ldrel_out */
+    /* Function pointers to xcoff specific swap routines.  */
+    xcoff64_swap_ldhdr_in,
+    xcoff64_swap_ldhdr_out,
+    xcoff64_swap_ldsym_in,
+    xcoff64_swap_ldsym_out,
+    xcoff64_swap_ldrel_in,
+    xcoff64_swap_ldrel_out,
 
-  /* Sizes.  */
-  LDHDRSZ,				/* _xcoff_ldhdrsz */
-  LDSYMSZ,				/* _xcoff_ldsymsz */
-  LDRELSZ,				/* _xcoff_ldrelsz */
-  24,					/* _xcoff_function_descriptor_size */
-  0,					/* _xcoff_small_aout_header_size */
+    /* Sizes.  */
+    LDHDRSZ,
+    LDSYMSZ,
+    LDRELSZ,
+    24,				/* _xcoff_function_descriptor_size */
+    0,				/* _xcoff_small_aout_header_size */
 
-  /* Versions.  */
-  2,					/* _xcoff_ldhdr_version */
+    /* Versions.  */
+    2,				/* _xcoff_ldhdr_version */
 
-  /* xcoff vs xcoff64 putting symbol names.  */
-  _bfd_xcoff64_put_symbol_name,		/* _xcoff_put_symbol_name */
-  _bfd_xcoff64_put_ldsymbol_name,	/* _xcoff_put_ldsymbol_name */
+    _bfd_xcoff64_put_symbol_name,
+    _bfd_xcoff64_put_ldsymbol_name,
+    &xcoff64_dynamic_reloc,
+    xcoff64_create_csect_from_smclas,
 
-  /* Dynamic reloc howto.  */
-  &xcoff64_dynamic_reloc,
+    /* Lineno and reloc count overflow.  */
+    xcoff64_is_lineno_count_overflow,
+    xcoff64_is_reloc_count_overflow,
 
-  xcoff64_create_csect_from_smclas,
+    xcoff64_loader_symbol_offset,
+    xcoff64_loader_reloc_offset,
 
-  /* Lineno and reloc count overflow.  */
-  xcoff64_is_lineno_count_overflow,
-  xcoff64_is_reloc_count_overflow,
+    /* glink.  */
+    &xcoff64_glink_code[0],
+    40,				/* _xcoff_glink_size */
 
-  xcoff64_loader_symbol_offset,
-  xcoff64_loader_reloc_offset,
-
-  /* glink.  */
-  &xcoff64_glink_code[0],
-  40,					/* _xcoff_glink_size */
-
-  /* rtinit.  */
-  88,					/* _xcoff_rtinit_size */
-  xcoff64_generate_rtinit,		/* _xcoff_generate_rtinit */
-};
+    /* rtinit.  */
+    88,				/* _xcoff_rtinit_size */
+    xcoff64_generate_rtinit,
+  };
 
 /* The transfer vector that leads the outside world to all of the above.  */
 const bfd_target rs6000coff64_vec =
-{
-  "aixcoff64-rs6000",
-  bfd_target_xcoff_flavour,
-  BFD_ENDIAN_BIG,		/* data byte order is big */
-  BFD_ENDIAN_BIG,		/* header byte order is big */
+  {
+    "aixcoff64-rs6000",
+    bfd_target_xcoff_flavour,
+    BFD_ENDIAN_BIG,		/* data byte order is big */
+    BFD_ENDIAN_BIG,		/* header byte order is big */
 
-  (HAS_RELOC | EXEC_P |		/* object flags */
-   HAS_LINENO | HAS_DEBUG | DYNAMIC |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT),
+    (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+     | HAS_SYMS | HAS_LOCALS | WP_TEXT),
 
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-  0,				/* leading char */
-  '/',				/* ar_pad_char */
-  15,				/* ar_max_namelen??? FIXMEmgo */
+    SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA,
+    0,				/* leading char */
+    '/',			/* ar_pad_char */
+    15,				/* ar_max_namelen */
 
-  /* data */
-  bfd_getb64,			/* bfd_getx64 */
-  bfd_getb_signed_64,		/* bfd_getx_signed_64 */
-  bfd_putb64,			/* bfd_putx64 */
-  bfd_getb32,			/* bfd_getx32 */
-  bfd_getb_signed_32,		/* bfd_getx_signed_32 */
-  bfd_putb32,			/* bfd_putx32 */
-  bfd_getb16,			/* bfd_getx16 */
-  bfd_getb_signed_16,		/* bfd_getx_signed_16 */
-  bfd_putb16,			/* bfd_putx16 */
+    /* data */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  /* hdrs */
-  bfd_getb64,			/* bfd_h_getx64 */
-  bfd_getb_signed_64,		/* bfd_h_getx_signed_64 */
-  bfd_putb64,			/* bfd_h_putx64 */
-  bfd_getb32,			/* bfd_h_getx32 */
-  bfd_getb_signed_32,		/* bfd_h_getx_signed_32 */
-  bfd_putb32,			/* bfd_h_putx32 */
-  bfd_getb16,			/* bfd_h_getx16 */
-  bfd_getb_signed_16,		/* bfd_h_getx_signed_16 */
-  bfd_putb16,			/* bfd_h_putx16 */
+    /* hdrs */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  { /* bfd_check_format */
-    _bfd_dummy_target,
-    coff_object_p,
-    xcoff64_archive_p,
-    CORE_FILE_P
-  },
+    { /* bfd_check_format */
+      _bfd_dummy_target,
+      coff_object_p,
+      xcoff64_archive_p,
+      CORE_FILE_P
+    },
 
-  { /* bfd_set_format */
+    { /* bfd_set_format */
+      bfd_false,
+      coff_mkobject,
+      _bfd_generic_mkarchive,
+      bfd_false
+    },
+
+    {/* bfd_write_contents */
+      bfd_false,
+      xcoff64_write_object_contents,
+      _bfd_xcoff_write_archive_contents,
+      bfd_false
+    },
+
+    /* Generic */
+    bfd_true,
+    bfd_true,
+    coff_new_section_hook,
+    _bfd_generic_get_section_contents,
+    _bfd_generic_get_section_contents_in_window,
+
+    /* Copy */
+    _bfd_xcoff_copy_private_bfd_data,
+    ((boolean (*) (bfd *, bfd *)) bfd_true),
+    ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+    ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+    ((boolean (*) (bfd *, flagword)) bfd_true),
+    ((boolean (*) (bfd *, void * )) bfd_true),
+
+    /* Core */
+    coff_core_file_failing_command,
+    coff_core_file_failing_signal,
+    coff_core_file_matches_executable_p,
+
+    /* Archive */
+    xcoff64_slurp_armap,
     bfd_false,
-    coff_mkobject,
-    _bfd_generic_mkarchive,
-    bfd_false
-  },
+    ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+    bfd_dont_truncate_arname,
+    _bfd_xcoff_write_armap,
+    _bfd_xcoff_read_ar_hdr,
+    xcoff64_openr_next_archived_file,
+    _bfd_generic_get_elt_at_index,
+    _bfd_xcoff_stat_arch_elt,
+    bfd_true,
 
-  {/* bfd_write_contents */
-    bfd_false,
-    xcoff64_write_object_contents,
-    _bfd_xcoff_write_archive_contents,
-    bfd_false
-  },
+    /* Symbols */
+    coff_get_symtab_upper_bound,
+    coff_get_symtab,
+    coff_make_empty_symbol,
+    coff_print_symbol,
+    coff_get_symbol_info,
+    _bfd_xcoff_is_local_label_name,
+    coff_get_lineno,
+    coff_find_nearest_line,
+    coff_bfd_make_debug_symbol,
+    _bfd_generic_read_minisymbols,
+    _bfd_generic_minisymbol_to_symbol,
 
-  /* Generic */
-  bfd_true,				/* _close_and_cleanup */
-  bfd_true,				/* _bfd_free_cached_info */
-  coff_new_section_hook,		/* _new_section_hook */
-  _bfd_generic_get_section_contents,	/* _bfd_get_section_contents */
-  /* _bfd_get_section_contents_in_window */
-  _bfd_generic_get_section_contents_in_window,
+    /* Reloc */
+    coff_get_reloc_upper_bound,
+    coff_canonicalize_reloc,
+    xcoff64_reloc_type_lookup,
 
-  /* Copy */
-  _bfd_xcoff_copy_private_bfd_data,	/* _bfd_copy_private_bfd */
-  /* _bfd_merge_private_bfd_data */
-  ((boolean (*) (bfd *, bfd *)) bfd_true),
-  /* _bfd_copy_pivate_section_data */
-  ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
-  /* _bfd_copy_private_symbol_data */
-  ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
-  ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
-  ((boolean (*) (bfd *, void * )) bfd_true),  /* _bfd_print_private_bfd_data */
+    /* Write */
+    coff_set_arch_mach,
+    coff_set_section_contents,
 
-  /* Core */
-  coff_core_file_failing_command,	/* _core_file_failing_command */
-  coff_core_file_failing_signal,	/* _core_file_failing_signal */
-  coff_core_file_matches_executable_p,	/* _core_file_matches_executable_p */
+    /* Link */
+    xcoff64_sizeof_headers,
+    bfd_generic_get_relocated_section_contents,
+    bfd_generic_relax_section,
+    _bfd_xcoff_bfd_link_hash_table_create,
+    _bfd_generic_link_hash_table_free,
+    _bfd_xcoff_bfd_link_add_symbols,
+    _bfd_generic_link_just_syms,
+    _bfd_xcoff_bfd_final_link,
+    _bfd_generic_link_split_section,
+    bfd_generic_gc_sections,
+    bfd_generic_merge_sections,
+    bfd_generic_discard_group,
 
-  /* Archive */
-  xcoff64_slurp_armap,			/* _slurp_armap */
-  /* XCOFF archives do not have anything which corresponds to an
-     extended name table.  */
-  bfd_false,				/* _slurp_extended_name_table */
-  /* _construct_extended_name_table */
-  ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
-  bfd_dont_truncate_arname,		/* _truncate_arname */
-  _bfd_xcoff_write_armap,		/* _write_armap */
-  _bfd_xcoff_read_ar_hdr,		/* _read_ar_hdr */
-  xcoff64_openr_next_archived_file,	/* _openr_next_archived_file */
-  _bfd_generic_get_elt_at_index,	/* _get_elt_at_index */
-  _bfd_xcoff_stat_arch_elt,		/* _generic_stat_arch_elt */
-  /* XCOFF archives do not have a timestamp.  */
-  bfd_true,				/* _update_armap_timestamp */
+    /* Dynamic */
+    _bfd_xcoff_get_dynamic_symtab_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_symtab,
+    _bfd_xcoff_get_dynamic_reloc_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_reloc,
 
-  /* Symbols */
-  coff_get_symtab_upper_bound,		/* _get_symtab_upper_bound */
-  coff_get_symtab,			/* _get_symtab */
-  coff_make_empty_symbol,		/* _make_empty_symbol */
-  coff_print_symbol,			/* _print_symbol */
-  coff_get_symbol_info,			/* _get_symbol_info */
-  _bfd_xcoff_is_local_label_name,	/* _bfd_is_local_label_name */
-  coff_get_lineno,			/* _get_lineno */
-  coff_find_nearest_line,		/* _find_nearest_line */
-  coff_bfd_make_debug_symbol,		/* _bfd_make_debug_symbol */
-  _bfd_generic_read_minisymbols,	/* _read_minisymbols */
-  _bfd_generic_minisymbol_to_symbol,	/* _minsymbol_to_symbol */
+    /* Opposite endian version, none exists */
+    NULL,
 
-  /* Reloc */
-  coff_get_reloc_upper_bound,		/* _get_reloc_upper_bound */
-  coff_canonicalize_reloc,		/* _cononicalize_reloc */
-  xcoff64_reloc_type_lookup,		/* _bfd_reloc_type_lookup */
-
-  /* Write */
-  coff_set_arch_mach,			/* _set_arch_mach */
-  coff_set_section_contents,		/* _set_section_contents */
-
-  /* Link */
-  xcoff64_sizeof_headers,		/* _sizeof_headers */
-  /* _bfd_get_relocated_section_contents */
-  bfd_generic_get_relocated_section_contents,
-  bfd_generic_relax_section,		/* _bfd_relax_section */
-  _bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
-  _bfd_generic_link_hash_table_free,    /* _bfd_link_hash_table_free */
-  _bfd_xcoff_bfd_link_add_symbols,	/* _bfd_link_add_symbols */
-  _bfd_generic_link_just_syms,		/* _bfd_link_just_syms */
-  _bfd_xcoff_bfd_final_link,		/* _bfd_final_link */
-  _bfd_generic_link_split_section,	/* _bfd_link_split_section */
-  bfd_generic_gc_sections,		/* _bfd_gc_sections */
-  bfd_generic_merge_sections,		/* _bfd_merge_sections */
-
-  /* Dynamic */
-  /* _get_dynamic_symtab_upper_bound */
-  _bfd_xcoff_get_dynamic_symtab_upper_bound,
-  _bfd_xcoff_canonicalize_dynamic_symtab,  /* _cononicalize_dynamic_symtab */
-  _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
-  _bfd_xcoff_canonicalize_dynamic_reloc,   /* _cononicalize_dynamic_reloc */
-
-  /* Opposite endian version, none exists */
-  NULL,
-
-  /* back end data */
-  (void *) &bfd_xcoff_backend_data,
-};
+    (void *) &bfd_xcoff_backend_data,
+  };
 
 extern const bfd_target *xcoff64_core_p PARAMS ((bfd *));
-extern boolean xcoff64_core_file_matches_executable_p PARAMS((bfd *, bfd *));
+extern boolean xcoff64_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
 extern char *xcoff64_core_file_failing_command PARAMS ((bfd *));
 extern int xcoff64_core_file_failing_signal PARAMS ((bfd *));
 
 /* AIX 5 */
 static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data =
-{
-  { /* COFF backend, defined in libcoff.h.  */
-    _bfd_xcoff64_swap_aux_in,		/* _bfd_coff_swap_aux_in */
-    _bfd_xcoff64_swap_sym_in,		/* _bfd_coff_swap_sym_in */
-    _bfd_xcoff64_swap_lineno_in,	/* _bfd_coff_swap_lineno_in */
-    _bfd_xcoff64_swap_aux_out,		/* _bfd_swap_aux_out */
-    _bfd_xcoff64_swap_sym_out,		/* _bfd_swap_sym_out */
-    _bfd_xcoff64_swap_lineno_out,	/* _bfd_swap_lineno_out */
-    xcoff64_swap_reloc_out,		/* _bfd_swap_reloc_out */
-    coff_swap_filehdr_out,		/* _bfd_swap_filehdr_out */
-    coff_swap_aouthdr_out,		/* _bfd_swap_aouthdr_out */
-    coff_swap_scnhdr_out,		/* _bfd_swap_scnhdr_out */
-    FILHSZ,				/* _bfd_filhsz */
-    AOUTSZ,				/* _bfd_aoutsz */
-    SCNHSZ,				/* _bfd_scnhsz */
-    SYMESZ,				/* _bfd_symesz */
-    AUXESZ,				/* _bfd_auxesz */
-    RELSZ,				/* _bfd_relsz */
-    LINESZ,				/* _bfd_linesz */
-    FILNMLEN,				/* _bfd_filnmlen */
-    true,				/* _bfd_coff_long_filenames */
-    false,				/* _bfd_coff_long_section_names */
-    (3),			/* _bfd_coff_default_section_alignment_power */
-    true,			/* _bfd_coff_force_symnames_in_strings */
-    4,				/* _bfd_coff_debug_string_prefix_length */
-    coff_swap_filehdr_in,		/* _bfd_coff_swap_filehdr_in */
-    coff_swap_aouthdr_in,		/* _bfd_swap_aouthdr_in */
-    coff_swap_scnhdr_in,		/* _bfd_swap_scnhdr_in */
-    xcoff64_swap_reloc_in,		/* _bfd_reloc_in */
-    xcoff64_bad_format_hook,		/* _bfd_bad_format_hook */
-    coff_set_arch_mach_hook,		/* _bfd_set_arch_mach_hook */
-    coff_mkobject_hook,			/* _bfd_mkobject_hook */
-    styp_to_sec_flags,			/* _bfd_syp_to_sec_flags */
-    coff_set_alignment_hook,		/* _bfd_set_alignment_hook */
-    coff_slurp_symbol_table,		/* _bfd_coff_slurp_symbol_table */
-    symname_in_debug_hook,		/* _coff_symname_in_debug_hook */
-    coff_pointerize_aux_hook,		/* _bfd_coff_pointerize_aux_hook */
-    coff_print_aux,			/* bfd_coff_print_aux */
-    dummy_reloc16_extra_cases,		/* _bfd_coff_reloc16_extra_cases */
-    dummy_reloc16_estimate,		/* _bfd_coff_reloc16_estimate */
-    NULL,				/* bfd_coff_sym_is_global */
-    /* _bfd_coff_compute_section_file_positions */
-    coff_compute_section_file_positions,
-    NULL ,				/* _bfd_coff_start_final_link */
-    xcoff64_ppc_relocate_section,	/* _bfd_coff_relocate_section */
-    coff_rtype_to_howto,		/* _bfd_coff_rtype_to_howto */
-    NULL ,				/* _bfd_coff_addust_symndx */
-    _bfd_generic_link_add_one_symbol,	/* _bfd_coff_add_one_symbol */
-    coff_link_output_has_begun,		/* _bfd_coff_link_output_has_begun */
-    coff_final_link_postscript		/* _bfd_coff_final_link_postscript */
-  },
+  {
+    { /* COFF backend, defined in libcoff.h.  */
+      _bfd_xcoff64_swap_aux_in,
+      _bfd_xcoff64_swap_sym_in,
+      _bfd_xcoff64_swap_lineno_in,
+      _bfd_xcoff64_swap_aux_out,
+      _bfd_xcoff64_swap_sym_out,
+      _bfd_xcoff64_swap_lineno_out,
+      xcoff64_swap_reloc_out,
+      coff_swap_filehdr_out,
+      coff_swap_aouthdr_out,
+      coff_swap_scnhdr_out,
+      FILHSZ,
+      AOUTSZ,
+      SCNHSZ,
+      SYMESZ,
+      AUXESZ,
+      RELSZ,
+      LINESZ,
+      FILNMLEN,
+      true,			/* _bfd_coff_long_filenames */
+      false,			/* _bfd_coff_long_section_names */
+      3,			/* _bfd_coff_default_section_alignment_power */
+      true,			/* _bfd_coff_force_symnames_in_strings */
+      4,			/* _bfd_coff_debug_string_prefix_length */
+      coff_swap_filehdr_in,
+      coff_swap_aouthdr_in,
+      coff_swap_scnhdr_in,
+      xcoff64_swap_reloc_in,
+      xcoff64_bad_format_hook,
+      coff_set_arch_mach_hook,
+      coff_mkobject_hook,
+      styp_to_sec_flags,
+      coff_set_alignment_hook,
+      coff_slurp_symbol_table,
+      symname_in_debug_hook,
+      coff_pointerize_aux_hook,
+      coff_print_aux,
+      dummy_reloc16_extra_cases,
+      dummy_reloc16_estimate,
+      NULL,			/* bfd_coff_sym_is_global */
+      coff_compute_section_file_positions,
+      NULL,			/* _bfd_coff_start_final_link */
+      xcoff64_ppc_relocate_section,
+      coff_rtype_to_howto,
+      NULL,			/* _bfd_coff_adjust_symndx */
+      _bfd_generic_link_add_one_symbol,
+      coff_link_output_has_begun,
+      coff_final_link_postscript
+    },
 
-  U64_TOCMAGIC,				/* magic number */
-  bfd_arch_powerpc,			/* architecture */
-  bfd_mach_ppc_620,			/* machine */
+    U64_TOCMAGIC,		/* magic number */
+    bfd_arch_powerpc,
+    bfd_mach_ppc_620,
 
-  /* Function pointers to xcoff specific swap routines.	 */
-  xcoff64_swap_ldhdr_in,		/* _xcoff_swap_ldhdr_in */
-  xcoff64_swap_ldhdr_out,		/* _xcoff_swap_ldhdr_out */
-  xcoff64_swap_ldsym_in,		/* _xcoff_swap_ldsym_in */
-  xcoff64_swap_ldsym_out,		/* _xcoff_swap_ldsym_out */
-  xcoff64_swap_ldrel_in,		/* _xcoff_swap_ldrel_in */
-  xcoff64_swap_ldrel_out,		/* _xcoff_swap_ldrel_out */
+    /* Function pointers to xcoff specific swap routines.  */
+    xcoff64_swap_ldhdr_in,
+    xcoff64_swap_ldhdr_out,
+    xcoff64_swap_ldsym_in,
+    xcoff64_swap_ldsym_out,
+    xcoff64_swap_ldrel_in,
+    xcoff64_swap_ldrel_out,
 
-  /* Sizes.  */
-  LDHDRSZ,				/* _xcoff_ldhdrsz */
-  LDSYMSZ,				/* _xcoff_ldsymsz */
-  LDRELSZ,				/* _xcoff_ldrelsz */
-  24,					/* _xcoff_function_descriptor_size */
-  0,					/* _xcoff_small_aout_header_size */
-  /* Versions.  */
-  2,					/* _xcoff_ldhdr_version */
+    /* Sizes.  */
+    LDHDRSZ,
+    LDSYMSZ,
+    LDRELSZ,
+    24,				/* _xcoff_function_descriptor_size */
+    0,				/* _xcoff_small_aout_header_size */
+    /* Versions.  */
+    2,				/* _xcoff_ldhdr_version */
 
-  _bfd_xcoff64_put_symbol_name,		/* _xcoff_put_symbol_name */
-  _bfd_xcoff64_put_ldsymbol_name,	/* _xcoff_put_ldsymbol_name */
+    _bfd_xcoff64_put_symbol_name,
+    _bfd_xcoff64_put_ldsymbol_name,
+    &xcoff64_dynamic_reloc,
+    xcoff64_create_csect_from_smclas,
 
-  /* Dynamic reloc howto.  */
-  &xcoff64_dynamic_reloc,
-  xcoff64_create_csect_from_smclas,
+    /* Lineno and reloc count overflow.  */
+    xcoff64_is_lineno_count_overflow,
+    xcoff64_is_reloc_count_overflow,
 
-  /* Lineno and reloc count overflow.  */
-  xcoff64_is_lineno_count_overflow,
-  xcoff64_is_reloc_count_overflow,
+    xcoff64_loader_symbol_offset,
+    xcoff64_loader_reloc_offset,
 
-  xcoff64_loader_symbol_offset,
-  xcoff64_loader_reloc_offset,
+    /* glink.  */
+    &xcoff64_glink_code[0],
+    40,				/* _xcoff_glink_size */
 
-  /* glink.  */
-  &xcoff64_glink_code[0],
-  40,					/* _xcoff_glink_size */
-
-  /* rtinit.  */
-  88,					/* _xcoff_rtinit_size */
-  xcoff64_generate_rtinit,		/* _xcoff_generate_rtinit */
-};
+    /* rtinit.  */
+    88,				/* _xcoff_rtinit_size */
+    xcoff64_generate_rtinit,
+  };
 
 /* The transfer vector that leads the outside world to all of the above.  */
 const bfd_target aix5coff64_vec =
-{
-  "aix5coff64-rs6000",
-  bfd_target_xcoff_flavour,
-  BFD_ENDIAN_BIG,		/* data byte order is big */
-  BFD_ENDIAN_BIG,		/* header byte order is big */
+  {
+    "aix5coff64-rs6000",
+    bfd_target_xcoff_flavour,
+    BFD_ENDIAN_BIG,		/* data byte order is big */
+    BFD_ENDIAN_BIG,		/* header byte order is big */
 
-  (HAS_RELOC | EXEC_P |		/* object flags */
-   HAS_LINENO | HAS_DEBUG | DYNAMIC |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT),
+    (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+     | HAS_SYMS | HAS_LOCALS | WP_TEXT),
 
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-  0,				/* leading char */
-  '/',				/* ar_pad_char */
-  15,				/* ar_max_namelen??? FIXMEmgo */
+    SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA,
+    0,				/* leading char */
+    '/',			/* ar_pad_char */
+    15,				/* ar_max_namelen */
 
-  /* data */
-  bfd_getb64,			/* bfd_getx64 */
-  bfd_getb_signed_64,		/* bfd_getx_signed_64 */
-  bfd_putb64,			/* bfd_putx64 */
-  bfd_getb32,			/* bfd_getx32 */
-  bfd_getb_signed_32,		/* bfd_getx_signed_32 */
-  bfd_putb32,			/* bfd_putx32 */
-  bfd_getb16,			/* bfd_getx16 */
-  bfd_getb_signed_16,		/* bfd_getx_signed_16 */
-  bfd_putb16,			/* bfd_putx16 */
+    /* data */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  /* hdrs */
-  bfd_getb64,			/* bfd_h_getx64 */
-  bfd_getb_signed_64,		/* bfd_h_getx_signed_64 */
-  bfd_putb64,			/* bfd_h_putx64 */
-  bfd_getb32,			/* bfd_h_getx32 */
-  bfd_getb_signed_32,		/* bfd_h_getx_signed_32 */
-  bfd_putb32,			/* bfd_h_putx32 */
-  bfd_getb16,			/* bfd_h_getx16 */
-  bfd_getb_signed_16,		/* bfd_h_getx_signed_16 */
-  bfd_putb16,			/* bfd_h_putx16 */
+    /* hdrs */
+    bfd_getb64,
+    bfd_getb_signed_64,
+    bfd_putb64,
+    bfd_getb32,
+    bfd_getb_signed_32,
+    bfd_putb32,
+    bfd_getb16,
+    bfd_getb_signed_16,
+    bfd_putb16,
 
-  { /* bfd_check_format */
-    _bfd_dummy_target,
-    coff_object_p,
-    xcoff64_archive_p,
-    xcoff64_core_p
-  },
+    { /* bfd_check_format */
+      _bfd_dummy_target,
+      coff_object_p,
+      xcoff64_archive_p,
+      xcoff64_core_p
+    },
 
-  { /* bfd_set_format */
+    { /* bfd_set_format */
+      bfd_false,
+      coff_mkobject,
+      _bfd_generic_mkarchive,
+      bfd_false
+    },
+
+    {/* bfd_write_contents */
+      bfd_false,
+      xcoff64_write_object_contents,
+      _bfd_xcoff_write_archive_contents,
+      bfd_false
+    },
+
+    /* Generic */
+    bfd_true,
+    bfd_true,
+    coff_new_section_hook,
+    _bfd_generic_get_section_contents,
+    _bfd_generic_get_section_contents_in_window,
+
+    /* Copy */
+    _bfd_xcoff_copy_private_bfd_data,
+    ((boolean (*) (bfd *, bfd *)) bfd_true),
+    ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+    ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+    ((boolean (*) (bfd *, flagword)) bfd_true),
+    ((boolean (*) (bfd *, void * )) bfd_true),
+
+    /* Core */
+    xcoff64_core_file_failing_command,
+    xcoff64_core_file_failing_signal,
+    xcoff64_core_file_matches_executable_p,
+
+    /* Archive */
+    xcoff64_slurp_armap,
     bfd_false,
-    coff_mkobject,
-    _bfd_generic_mkarchive,
-    bfd_false
-  },
+    ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+    bfd_dont_truncate_arname,
+    _bfd_xcoff_write_armap,
+    _bfd_xcoff_read_ar_hdr,
+    xcoff64_openr_next_archived_file,
+    _bfd_generic_get_elt_at_index,
+    _bfd_xcoff_stat_arch_elt,
+    bfd_true,
 
-  {/* bfd_write_contents */
-    bfd_false,
-    xcoff64_write_object_contents,
-    _bfd_xcoff_write_archive_contents,
-    bfd_false
-  },
+    /* Symbols */
+    coff_get_symtab_upper_bound,
+    coff_get_symtab,
+    coff_make_empty_symbol,
+    coff_print_symbol,
+    coff_get_symbol_info,
+    _bfd_xcoff_is_local_label_name,
+    coff_get_lineno,
+    coff_find_nearest_line,
+    coff_bfd_make_debug_symbol,
+    _bfd_generic_read_minisymbols,
+    _bfd_generic_minisymbol_to_symbol,
 
-  /* Generic */
-  bfd_true,				/* _close_and_cleanup */
-  bfd_true,				/* _bfd_free_cached_info */
-  coff_new_section_hook,		/* _new_section_hook */
-  _bfd_generic_get_section_contents,	/* _bfd_get_section_contents */
-  /* _bfd_get_section_contents_in_window */
-  _bfd_generic_get_section_contents_in_window,
+    /* Reloc */
+    coff_get_reloc_upper_bound,
+    coff_canonicalize_reloc,
+    xcoff64_reloc_type_lookup,
 
-  /* Copy */
-  _bfd_xcoff_copy_private_bfd_data,	/* _bfd_copy_private_bfd */
-  /* _bfd_merge_private_bfd_data */
-  ((boolean (*) (bfd *, bfd *)) bfd_true),
-  /* _bfd_copy_pivate_section_data */
-  ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
-  /* _bfd_copy_private_symbol_data */
-  ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
-  ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
-  ((boolean (*) (bfd *, void * )) bfd_true),  /* _bfd_print_private_bfd_data */
+    /* Write */
+    coff_set_arch_mach,
+    coff_set_section_contents,
 
-  /* Core */
-  xcoff64_core_file_failing_command,	/* _core_file_failing_command */
-  xcoff64_core_file_failing_signal,	/* _core_file_failing_signal */
-  xcoff64_core_file_matches_executable_p, /* _core_file_matches_executable_p */
+    /* Link */
+    xcoff64_sizeof_headers,
+    bfd_generic_get_relocated_section_contents,
+    bfd_generic_relax_section,
+    _bfd_xcoff_bfd_link_hash_table_create,
+    _bfd_generic_link_hash_table_free,
+    _bfd_xcoff_bfd_link_add_symbols,
+    _bfd_generic_link_just_syms,
+    _bfd_xcoff_bfd_final_link,
+    _bfd_generic_link_split_section,
+    bfd_generic_gc_sections,
+    bfd_generic_merge_sections,
+    bfd_generic_discard_group,
 
-  /* Archive */
-  xcoff64_slurp_armap,			/* _slurp_armap */
-  /* XCOFF archives do not have anything which corresponds to an
-     extended name table.  */
-  bfd_false,				/* _slurp_extended_name_table */
-  /* _construct_extended_name_table */
-  ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
-  bfd_dont_truncate_arname,		/* _truncate_arname */
-  _bfd_xcoff_write_armap,		/* _write_armap */
-  _bfd_xcoff_read_ar_hdr,		/* _read_ar_hdr */
-  xcoff64_openr_next_archived_file,	/* _openr_next_archived_file */
-  _bfd_generic_get_elt_at_index,	/* _get_elt_at_index */
-  _bfd_xcoff_stat_arch_elt,		/* _generic_stat_arch_elt */
-  /* XCOFF archives do not have a timestamp.  */
-  bfd_true,				/* _update_armap_timestamp */
+    /* Dynamic */
+    _bfd_xcoff_get_dynamic_symtab_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_symtab,
+    _bfd_xcoff_get_dynamic_reloc_upper_bound,
+    _bfd_xcoff_canonicalize_dynamic_reloc,
 
-  /* Symbols */
-  coff_get_symtab_upper_bound,		/* _get_symtab_upper_bound */
-  coff_get_symtab,			/* _get_symtab */
-  coff_make_empty_symbol,		/* _make_empty_symbol */
-  coff_print_symbol,			/* _print_symbol */
-  coff_get_symbol_info,			/* _get_symbol_info */
-  _bfd_xcoff_is_local_label_name,	/* _bfd_is_local_label_name */
-  coff_get_lineno,			/* _get_lineno */
-  coff_find_nearest_line,		/* _find_nearest_line */
-  coff_bfd_make_debug_symbol,		/* _bfd_make_debug_symbol */
-  _bfd_generic_read_minisymbols,	/* _read_minisymbols */
-  _bfd_generic_minisymbol_to_symbol,	/* _minsymbol_to_symbol */
+    /* Opposite endian version, none exists.  */
+    NULL,
 
-  /* Reloc */
-  coff_get_reloc_upper_bound,		/* _get_reloc_upper_bound */
-  coff_canonicalize_reloc,		/* _cononicalize_reloc */
-  xcoff64_reloc_type_lookup,		/* _bfd_reloc_type_lookup */
-
-  /* Write */
-  coff_set_arch_mach,			/* _set_arch_mach */
-  coff_set_section_contents,		/* _set_section_contents */
-
-  /* Link */
-  xcoff64_sizeof_headers,		/* _sizeof_headers */
-  /* _bfd_get_relocated_section_contents */
-  bfd_generic_get_relocated_section_contents,
-  bfd_generic_relax_section,		/* _bfd_relax_section */
-  _bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
-  _bfd_generic_link_hash_table_free,    /* _bfd_link_hash_table_free */
-  _bfd_xcoff_bfd_link_add_symbols,	/* _bfd_link_add_symbols */
-  _bfd_generic_link_just_syms,		/* _bfd_link_just_syms */
-  _bfd_xcoff_bfd_final_link,		/* _bfd_final_link */
-  _bfd_generic_link_split_section,	/* _bfd_link_split_section */
-  bfd_generic_gc_sections,		/* _bfd_gc_sections */
-  bfd_generic_merge_sections,		/* _bfd_merge_sections */
-
-  /* Dynamic */
-  /* _get_dynamic_symtab_upper_bound */
-  _bfd_xcoff_get_dynamic_symtab_upper_bound,
-  _bfd_xcoff_canonicalize_dynamic_symtab,  /* _cononicalize_dynamic_symtab */
-  _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
-  _bfd_xcoff_canonicalize_dynamic_reloc,   /* _cononicalize_dynamic_reloc */
-
-  /* Opposite endian version, none exists.  */
-  NULL,
-
-  /* back end data */
-  (void *) & bfd_xcoff_aix5_backend_data,
-};
+    (void *) & bfd_xcoff_aix5_backend_data,
+  };
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index cea516f..bb777aa 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1739,7 +1739,7 @@
   struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
   coff_data_type *coff;
 
-  if (coff_mkobject (abfd) == false)
+  if (! coff_mkobject (abfd))
     return NULL;
 
   coff = coff_data (abfd);
@@ -1782,8 +1782,8 @@
       xcoff->toc = internal_a->o_toc;
       xcoff->sntoc = internal_a->o_sntoc;
       xcoff->snentry = internal_a->o_snentry;
-      xcoff->text_align_power = internal_a->o_algntext;
-      xcoff->data_align_power = internal_a->o_algndata;
+      bfd_xcoff_text_align_power (abfd) = internal_a->o_algntext;
+      bfd_xcoff_data_align_power (abfd) = internal_a->o_algndata;
       xcoff->modtype = internal_a->o_modtype;
       xcoff->cputype = internal_a->o_cputype;
       xcoff->maxdata = internal_a->o_maxdata;
@@ -2177,7 +2177,7 @@
      bfd * abfd ATTRIBUTE_UNUSED;
      struct internal_syment *sym;
 {
-  return SYMNAME_IN_DEBUG (sym) ? true : false;
+  return SYMNAME_IN_DEBUG (sym) != 0;
 }
 
 #else
@@ -2394,7 +2394,7 @@
 	return false;
 
 #ifdef COFF_WITH_PE
-      if (s->reloc_count > 0xffff)
+      if (obj_pe (abfd) && s->reloc_count >= 0xffff)
 	{
 	  /* encode real count here as first reloc */
 	  struct internal_reloc n;
@@ -2822,8 +2822,8 @@
   if (! bfd_default_set_arch_mach (abfd, arch, machine))
     return false;
 
-  if (arch != bfd_arch_unknown &&
-      coff_set_flags (abfd, &dummy1, &dummy2) != true)
+  if (arch != bfd_arch_unknown
+      && ! coff_set_flags (abfd, &dummy1, &dummy2))
     return false;		/* We can't represent this type */
 
   return true;			/* We're easy ...  */
@@ -3084,8 +3084,10 @@
 	     AIX executable is stripped with gnu strip because the default vma
 	     of native is 0x10000150 but default for gnu is 0x10000140.  Gnu
 	     stripped gnu excutable passes this check because the filepos is 
-	     0x0140. */
-	  if (!strcmp (current->name, _TEXT)) 
+	     0x0140.  This problem also show up with 64 bit shared objects. The
+	     data section must also be aligned.  */
+	  if (!strcmp (current->name, _TEXT) 
+	      || !strcmp (current->name, _DATA)) 
 	    {
 	      bfd_vma pad;
 	      bfd_vma align;
@@ -3403,7 +3405,7 @@
 
   lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd);
 
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       if (! coff_compute_section_file_positions (abfd))
 	return false;
@@ -3418,7 +3420,7 @@
     {
 #ifdef COFF_WITH_PE
       /* we store the actual reloc count in the first reloc's addr */
-      if (current->reloc_count > 0xffff)
+      if (obj_pe (abfd) && current->reloc_count >= 0xffff)
 	reloc_count ++;
 #endif
       reloc_count += current->reloc_count;
@@ -3449,7 +3451,7 @@
 	  reloc_base += current->reloc_count * bfd_coff_relsz (abfd);
 #ifdef COFF_WITH_PE
 	  /* extra reloc to hold real count */
-	  if (current->reloc_count > 0xffff)
+	  if (obj_pe (abfd) && current->reloc_count >= 0xffff)
 	    reloc_base += bfd_coff_relsz (abfd);
 #endif
 	}
@@ -4194,7 +4196,7 @@
      file_ptr offset;
      bfd_size_type count;
 {
-  if (abfd->output_has_begun == false)	/* set by bfd.c handler */
+  if (! abfd->output_has_begun)	/* set by bfd.c handler */
     {
       if (! coff_compute_section_file_positions (abfd))
 	return false;
@@ -5372,6 +5374,10 @@
 #define coff_bfd_merge_sections		    bfd_generic_merge_sections
 #endif
 
+#ifndef coff_bfd_discard_group
+#define coff_bfd_discard_group		    bfd_generic_discard_group
+#endif
+
 #define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE)	\
 const bfd_target VAR =							\
 {									\
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 88591f1..ee6c8fc 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1,6 +1,6 @@
 /* Support for the generic parts of COFF, for BFD.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
+   2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -178,6 +178,7 @@
   flagword oflags = abfd->flags;
   bfd_vma ostart = bfd_get_start_address (abfd);
   PTR tdata;
+  PTR tdata_save;
   bfd_size_type readsize;	/* length of file_info */
   unsigned int scnhsz;
   char *external_sections;
@@ -206,9 +207,10 @@
 
   /* Set up the tdata area.  ECOFF uses its own routine, and overrides
      abfd->flags.  */
+  tdata_save = abfd->tdata.any;
   tdata = bfd_coff_mkobject_hook (abfd, (PTR) internal_f, (PTR) internal_a);
   if (tdata == NULL)
-    return 0;
+    goto fail2;
 
   scnhsz = bfd_coff_scnhsz (abfd);
   readsize = (bfd_size_type) nscns * scnhsz;
@@ -221,7 +223,7 @@
 
   /* Set the arch/mach *before* swapping in sections; section header swapping
      may depend on arch/mach info.  */
-  if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
+  if (! bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f))
     goto fail;
 
   /* Now copy data as required; construct all asections etc */
@@ -245,6 +247,8 @@
 
  fail:
   bfd_release (abfd, tdata);
+ fail2:
+  abfd->tdata.any = tdata_save;
   abfd->flags = oflags;
   bfd_get_start_address (abfd) = ostart;
   return (const bfd_target *) NULL;
@@ -270,12 +274,13 @@
 
   filehdr = bfd_alloc (abfd, filhsz);
   if (filehdr == NULL)
-    return 0;
+    return NULL;
   if (bfd_bread (filehdr, filhsz, abfd) != filhsz)
     {
       if (bfd_get_error () != bfd_error_system_call)
 	bfd_set_error (bfd_error_wrong_format);
-      return 0;
+      bfd_release (abfd, filehdr);
+      return NULL;
     }
   bfd_coff_swap_filehdr_in (abfd, filehdr, &internal_f);
   bfd_release (abfd, filehdr);
@@ -288,11 +293,11 @@
      only read in f_opthdr bytes in the call to bfd_bread.  We should
      also attempt to catch corrupt or non-COFF binaries with a strange
      value for f_opthdr.  */
-  if (bfd_coff_bad_format_hook (abfd, &internal_f) == false
+  if (! bfd_coff_bad_format_hook (abfd, &internal_f)
       || internal_f.f_opthdr > aoutsz)
     {
       bfd_set_error (bfd_error_wrong_format);
-      return 0;
+      return NULL;
     }
   nscns = internal_f.f_nscns;
 
@@ -302,13 +307,15 @@
 
       opthdr = bfd_alloc (abfd, aoutsz);
       if (opthdr == NULL)
-	return 0;
+	return NULL;
       if (bfd_bread (opthdr, (bfd_size_type) internal_f.f_opthdr, abfd)
 	  != internal_f.f_opthdr)
 	{
-	  return 0;
+	  bfd_release (abfd, opthdr);
+	  return NULL;
 	}
       bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a);
+      bfd_release (abfd, opthdr);
     }
 
   return coff_real_object_p (abfd, nscns, &internal_f,
@@ -1438,13 +1445,13 @@
 	  combined_entry_type e[10];
 	};
       struct foo *f;
-      f = (struct foo *) bfd_alloc (abfd, (bfd_size_type) sizeof (*f));
+
+      f = (struct foo *) bfd_zalloc (abfd, (bfd_size_type) sizeof (*f));
       if (!f)
 	{
 	  bfd_set_error (bfd_error_no_error);
 	  return NULL;
 	}
-      memset ((char *) f, 0, sizeof (*f));
       coff_symbol_from (abfd, sym)->native = csym = f->e;
     }
   csym[0].u.syment.n_sclass = C_STAT;
@@ -1835,10 +1842,9 @@
 		if (internal_ptr->u.syment._n._n_name[i] == '\0')
 		  break;
 
-	      newstring = (PTR) bfd_alloc (abfd, (bfd_size_type) (i + 1));
+	      newstring = (PTR) bfd_zalloc (abfd, (bfd_size_type) (i + 1));
 	      if (newstring == NULL)
 		return (NULL);
-	      memset (newstring, 0, i + 1);
 	      strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
 	      internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
 	      internal_ptr->u.syment._n._n_n._n_zeroes = 0;
@@ -1897,10 +1903,9 @@
      bfd *abfd;
 {
   bfd_size_type amt = sizeof (coff_symbol_type);
-  coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt);
+  coff_symbol_type *new = (coff_symbol_type *) bfd_zalloc (abfd, amt);
   if (new == NULL)
     return (NULL);
-  memset (new, 0, sizeof *new);
   new->symbol.section = 0;
   new->native = 0;
   new->lineno = (alent *) NULL;
@@ -2415,7 +2420,7 @@
 {
   size_t size;
 
-  if (reloc == false)
+  if (! reloc)
     {
       size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
     }
@@ -2453,12 +2458,10 @@
       combined_entry_type * native;
       bfd_size_type amt = sizeof (* native);
 
-      native = (combined_entry_type *) bfd_alloc (abfd, amt);
+      native = (combined_entry_type *) bfd_zalloc (abfd, amt);
       if (native == NULL)
 	return false;
 
-      memset (native, 0, sizeof (* native));
-
       native->u.syment.n_type   = T_NULL;
       native->u.syment.n_sclass = class;
 
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 1eac3c5..eb9388f 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -342,12 +342,10 @@
   /* We keep a list of the linker hash table entries that correspond
      to particular symbols.  */
   amt = symcount * sizeof (struct coff_link_hash_entry *);
-  sym_hash = (struct coff_link_hash_entry **) bfd_alloc (abfd, amt);
+  sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt);
   if (sym_hash == NULL && symcount != 0)
     goto error_return;
   obj_coff_sym_hashes (abfd) = sym_hash;
-  memset (sym_hash, 0,
-	  (size_t) symcount * sizeof (struct coff_link_hash_entry *));
 
   symesz = bfd_coff_symesz (abfd);
   BFD_ASSERT (symesz == bfd_coff_auxesz (abfd));
@@ -759,6 +757,10 @@
 	  o->flags |= SEC_RELOC;
 	  o->rel_filepos = rel_filepos;
 	  rel_filepos += o->reloc_count * relsz;
+	  /* In PE COFF, if there are at least 0xffff relocations an
+	     extra relocation will be written out to encode the count.  */
+	  if (obj_pe (abfd) && o->reloc_count >= 0xffff)
+	    rel_filepos += relsz;
 	}
 
       if (bfd_coff_long_section_names (abfd)
diff --git a/bfd/config.bfd b/bfd/config.bfd
index bba8d96..0db3748 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -125,8 +125,13 @@
     ;;
   arm-*-netbsd* | arm-*-openbsd*)
     targ_defvec=armnetbsd_vec
+    targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
     targ_underscore=yes
     ;;
+  arm-*-nto* | nto*arm*)
+    targ_defvec=bfd_elf32_littlearmqnx_vec
+    targ_selvecs=bfd_elf32_bigarmqnx_vec
+    ;;
   arm-*-riscix*)
     targ_defvec=riscix_vec
     ;;
@@ -280,6 +285,10 @@
     targ_defvec=bfd_elf32_fr30_vec
     ;;
 
+  frv-*-elf)
+    targ_defvec=bfd_elf32_frv_vec
+    ;;
+
 
   h8300*-*-elf)
     targ_defvec=bfd_elf32_h8300_vec
@@ -345,6 +354,10 @@
     targ_defvec=bfd_elf32_i386_vec
     targ_selvecs=i386coff_vec
     ;;
+  i[3456]86-*-nto-qnx*)
+    targ_defvec=bfd_elf32_i386qnx_vec
+    targ_selvecs=i386coff_vec
+    ;;
   i[3456]86-*-chorus*)
     targ_defvec=bfd_elf32_i386_vec
     ;;
@@ -407,6 +420,7 @@
   i[3456]86-*-linux-gnu*)
     targ_defvec=bfd_elf32_i386_vec
     targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+    targ64_selvecs=bfd_elf64_x86_64_vec
     ;;
 #ifdef BFD64
   x86_64-*-freebsd*)
@@ -509,6 +523,10 @@
     targ_selvecs="icoff_little_vec icoff_big_vec"
     ;;
 
+  ip2k-*-elf)
+    targ_defvec=bfd_elf32_ip2k_vec
+    ;;
+
   m32r-*-*)
     targ_defvec=bfd_elf32_m32r_vec
     ;;
@@ -731,21 +749,23 @@
     ;;
 #ifdef BFD64
   mips64*el-*-linux*)
-    targ_defvec=bfd_elf32_tradlittlemips_vec
-    targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
+    targ_defvec=bfd_elf32_ntradlittlemips_vec
+    targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
     ;;
   mips64*-*-linux*)
-    targ_defvec=bfd_elf32_tradbigmips_vec
-    targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+    targ_defvec=bfd_elf32_ntradbigmips_vec
+    targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
     ;;
 #endif
   mips*el-*-linux*)
     targ_defvec=bfd_elf32_tradlittlemips_vec
-    targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+    targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
+    want64=true
     ;;
   mips*-*-linux*)
     targ_defvec=bfd_elf32_tradbigmips_vec
-    targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
+    targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
+    want64=true
     ;;
 #ifdef BFD64
   mmix-*-*)
@@ -803,11 +823,13 @@
     targ_selvecs="aix5coff64_vec"
     want64=true
     ;;
+#ifdef BFD64
   powerpc64-*-aix5*)
     targ_defvec=aix5coff64_vec
     targ_selvecs="rs6000coff_vec"
     want64=true
     ;;
+#endif
 
   powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*)
     targ_defvec=rs6000coff_vec
@@ -825,7 +847,8 @@
     targ_defvec=rs6000coff64_vec
     targ_selvecs=rs6000coff_vec
     ;;
-  powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux*)
+  powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
+  powerpc64-*-*bsd*)
     targ_defvec=bfd_elf64_powerpc_vec
     targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
     ;;
@@ -848,6 +871,14 @@
     targ_defvec=bfd_elf32_powerpc_vec
     targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
     ;;
+  powerpc-*-nto*)
+    targ_defvec=bfd_elf32_powerpcqnx_vec
+    targ_selvecs="rs6000coff_vec bfd_elf32_powerpcleqnx_vec ppcboot_vec"
+    ;;
+  powerpcle-*-nto*)
+    targ_defvec=bfd_elf32_powerpcleqnx_vec
+    targ_selvecs="rs6000coff_vec bfd_elf32_powerpcqnx_vec ppcboot_vec"
+    ;;
   powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
   powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
   powerpcle-*-rtems*)
@@ -871,6 +902,11 @@
 #endif
 
 #ifdef BFD64
+  sh64l*-*-elf*)
+    targ_defvec=bfd_elf32_sh64l_vec
+    targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
+    targ_underscore=yes
+    ;;
   sh64-*-elf*)
     targ_defvec=bfd_elf32_sh64_vec
     targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec"
@@ -900,6 +936,26 @@
     targ_defvec=bfd_elf32_shlin_vec
     ;;
 
+#ifdef BFD64
+  sh5le-*-netbsd*)
+    targ_defvec=bfd_elf32_sh64lnbsd_vec
+    targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+    ;;
+  sh5-*-netbsd*)
+    targ_defvec=bfd_elf32_sh64nbsd_vec
+    targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+    ;;
+
+  sh64le-*-netbsd*)
+    targ_defvec=bfd_elf64_sh64lnbsd_vec
+    targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+    ;;
+  sh64-*-netbsd*)
+    targ_defvec=bfd_elf64_sh64nbsd_vec
+    targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec"
+    ;;
+#endif
+
   shle-*-netbsdelf*)
     targ_defvec=bfd_elf32_shlnbsd_vec
     targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
@@ -923,7 +979,15 @@
     targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
     ;;
 
-  sh-*-elf* | sh-*-rtemself*)
+  shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf*)
+    targ_defvec=bfd_elf32_shl_vec
+    targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
+#ifdef BFD64
+    targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+#endif
+    targ_underscore=yes
+    ;;
+  sh-*-elf* | sh[1234]*-elf* | sh-*-rtemself*)
     targ_defvec=bfd_elf32_sh_vec
     targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
 #ifdef BFD64
@@ -931,6 +995,11 @@
 #endif
     targ_underscore=yes
     ;;
+  sh-*-nto*)
+    targ_defvec=bfd_elf32_shqnx_vec
+    targ_selvecs="bfd_elf32_shlqnx_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
+    targ_underscore=yes
+    ;;
   sh-*-pe)
     targ_defvec=shlpe_vec
     targ_selvecs="shlpe_vec shlpei_vec"
@@ -1053,12 +1122,22 @@
   v850ea-*-*)
     targ_defvec=bfd_elf32_v850_vec
     ;;
-#if HAVE_host_aout_vec
-  vax-*-bsd* | vax-*-ultrix*)
-    targ_defvec=host_aout_vec
+
+  vax-*-netbsdelf*)
+    targ_defvec=bfd_elf32_vax_vec
+    targ_selvecs="vaxnetbsd_vec vax1knetbsd_vec"
+    ;;
+
+  vax-*-netbsdaout* | vax-*-netbsd*)
+    targ_defvec=vaxnetbsd_vec
+    targ_selvecs="bfd_elf32_vax_vec vax1knetbsd_vec"
     targ_underscore=yes
     ;;
-#endif
+
+  vax-*-bsd* | vax-*-ultrix*)
+    targ_defvec=vaxbsd_vec
+    targ_underscore=yes
+    ;;
 
   vax*-*-*vms*)
     targ_defvec=vms_vax_vec
@@ -1118,7 +1197,7 @@
 # to be used on an arbitrary ELF file for anything other than
 # relocation information.
 case "${targ_defvec} ${targ_selvecs}" in
-  *bfd_elf64*)
+  *bfd_elf64* | *bfd_elf32_n*mips*)
     targ_selvecs="${targ_selvecs} bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec"
     ;;
   *bfd_elf32*)
diff --git a/bfd/configure b/bfd/configure
index 5345211..cd03dd3 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -1118,7 +1118,7 @@
 
 PACKAGE=bfd
 
-VERSION=2.12.90
+VERSION=2.13.90
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -5265,6 +5265,7 @@
 	COREFILE=trad-core.lo
 	TRAD_HEADER='"hosts/tahoe.h"'
 	;;
+  vax-*-netbsd*)	COREFILE=netbsd-core.lo ;;
   vax-*-ultrix2*)
 	COREFILE=trad-core.lo
 	TRAD_HEADER='"hosts/vaxult2.h"'
@@ -5300,17 +5301,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5304: checking for $ac_hdr" >&5
+echo "configure:5305: 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
-#line 5309 "configure"
+#line 5310 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5315: \"$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*
@@ -5338,12 +5339,12 @@
 
   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:5342: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5343: 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 <<EOF
-#line 5347 "configure"
+#line 5348 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5352,7 +5353,7 @@
 prstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus_t=yes
 else
@@ -5374,12 +5375,12 @@
  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:5378: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5379: 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 <<EOF
-#line 5383 "configure"
+#line 5384 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5388,7 +5389,7 @@
 prstatus32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus32_t=yes
 else
@@ -5410,12 +5411,12 @@
  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:5414: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5415: 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 <<EOF
-#line 5419 "configure"
+#line 5420 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5424,7 +5425,7 @@
 prstatus_t avar; void* aref = (void*) &avar.pr_who
 ; return 0; }
 EOF
-if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5429: \"$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
@@ -5446,12 +5447,12 @@
  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:5450: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5451: 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 <<EOF
-#line 5455 "configure"
+#line 5456 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5460,7 +5461,7 @@
 prstatus32_t avar; void* aref = (void*) &avar.pr_who
 ; return 0; }
 EOF
-if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5465: \"$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
@@ -5482,12 +5483,12 @@
  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:5486: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5487: 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 <<EOF
-#line 5491 "configure"
+#line 5492 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5496,7 +5497,7 @@
 pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
@@ -5518,12 +5519,12 @@
  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:5522: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5523: 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 <<EOF
-#line 5527 "configure"
+#line 5528 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5532,7 +5533,7 @@
 pxstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pxstatus_t=yes
 else
@@ -5554,12 +5555,12 @@
  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:5558: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5559: 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 <<EOF
-#line 5563 "configure"
+#line 5564 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5568,7 +5569,7 @@
 pstatus32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus32_t=yes
 else
@@ -5590,12 +5591,12 @@
  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:5594: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5595: 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 <<EOF
-#line 5599 "configure"
+#line 5600 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5604,7 +5605,7 @@
 prpsinfo_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
 else
@@ -5626,12 +5627,12 @@
  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:5630: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5631: 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 <<EOF
-#line 5635 "configure"
+#line 5636 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5640,7 +5641,7 @@
 prpsinfo32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
 else
@@ -5662,12 +5663,12 @@
  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:5666: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5667: 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 <<EOF
-#line 5671 "configure"
+#line 5672 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5676,7 +5677,7 @@
 psinfo_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo_t=yes
 else
@@ -5698,12 +5699,12 @@
  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:5702: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5703: 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 <<EOF
-#line 5707 "configure"
+#line 5708 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5712,7 +5713,7 @@
 psinfo32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo32_t=yes
 else
@@ -5734,12 +5735,12 @@
  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:5738: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5739: 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 <<EOF
-#line 5743 "configure"
+#line 5744 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5748,7 +5749,7 @@
 lwpstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
 else
@@ -5770,12 +5771,12 @@
  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:5774: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5775: 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 <<EOF
-#line 5779 "configure"
+#line 5780 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5784,7 +5785,7 @@
 lwpxstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
 else
@@ -5806,12 +5807,12 @@
  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:5810: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5811: 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 <<EOF
-#line 5815 "configure"
+#line 5816 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5820,7 +5821,7 @@
 lwpstatus_t avar; void* aref = (void*) &avar.pr_context
 ; return 0; }
 EOF
-if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5825: \"$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
@@ -5842,12 +5843,12 @@
  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:5846: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5847: 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 <<EOF
-#line 5851 "configure"
+#line 5852 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5856,7 +5857,7 @@
 lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
 ; return 0; }
 EOF
-if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5861: \"$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
@@ -5878,12 +5879,12 @@
  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:5882: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5883: 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 <<EOF
-#line 5887 "configure"
+#line 5888 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5892,7 +5893,7 @@
 win32_pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
 else
@@ -6035,6 +6036,7 @@
     # use one entry per line, even though this leads to long lines.
     a29kcoff_big_vec)		tb="$tb coff-a29k.lo cofflink.lo" ;;
     a_out_adobe_vec)		tb="$tb aout-adobe.lo aout32.lo" ;;
+    aix5coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
     aout0_big_vec)		tb="$tb aout0.lo aout32.lo" ;;
     aout_arm_big_vec)		tb="$tb aout-arm.lo aout32.lo" ;;
     aout_arm_little_vec)	tb="$tb aout-arm.lo aout32.lo" ;;
@@ -6061,26 +6063,31 @@
     bfd_elf32_bigarc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_bigarm_oabi_vec)	tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
     bfd_elf32_bigarm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+    bfd_elf32_bigarmqnx_vec)	tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
     bfd_elf32_bigmips_vec) 	tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_cris_vec)		tb="$tb elf32-cris.lo elf32.lo $elf" ;;
     bfd_elf32_d10v_vec)		tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
     bfd_elf32_d30v_vec)		tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
     bfd_elf32_dlx_big_vec)	tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
     bfd_elf32_fr30_vec)		tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
+    bfd_elf32_frv_vec)		tb="$tb elf32-frv.lo elf32.lo $elf" ;;
     bfd_elf32_h8300_vec)	tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_linux_vec)	tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)		tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)		tb="$tb elf32-i370.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+    bfd_elf32_i386qnx_vec)	tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec)	tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
+    bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+    bfd_elf32_littlearmqnx_vec)	tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
     bfd_elf32_littlemips_vec) 	tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_m32r_vec)		tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
     bfd_elf32_m68hc11_vec)	tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -6091,31 +6098,40 @@
     bfd_elf32_mcore_little_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
     bfd_elf32_mn10200_vec)	tb="$tb elf-m10200.lo elf32.lo $elf" ;;
     bfd_elf32_mn10300_vec)	tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+    bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)	tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)	tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
     bfd_elf32_pjl_vec)          tb="$tb elf32-pj.lo elf32.lo $elf";;
     bfd_elf32_powerpc_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+    bfd_elf32_powerpcleqnx_vec)	tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+    bfd_elf32_powerpcqnx_vec)	tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+    # FIXME: We include cofflink.lo not because it's needed for
+    # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
+    # which needs it but does not list it.  Should be fixed in right place.
+    bfd_elf32_sh64_vec)		tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+    bfd_elf32_sh64l_vec)	tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+    bfd_elf32_sh64lnbsd_vec)	tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+    bfd_elf32_sh64nbsd_vec)	tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
     bfd_elf32_sh_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shblin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
     bfd_elf32_shl_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shlin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
     bfd_elf32_shlnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+    bfd_elf32_shlqnx_vec)	tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
-    # FIXME: We include cofflink.lo not because it's needed for
-    # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
-    # which needs it but does not list it.  Should be fixed in right place.
-    bfd_elf32_sh64_vec)		tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
-    bfd_elf32_sh64l_vec)	tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
-    bfd_elf64_sh64_vec)		tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
-    bfd_elf64_sh64l_vec)	tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf32_shqnx_vec)	tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_sparc_vec)	tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
     bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-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_vax_vec)		tb="$tb elf32-vax.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 ;;
@@ -6133,6 +6149,10 @@
     bfd_elf64_powerpc_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_powerpcle_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
     bfd_elf64_s390_vec)		tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_sh64_vec)		tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64l_vec)	tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64lnbsd_vec)	tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64nbsd_vec)	tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -6142,8 +6162,6 @@
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
-    cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
-    cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
     cris_aout_vec)		tb="$tb aout-cris.lo" ;;
     demo_64_vec)		tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
     ecoff_big_vec)		tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -6185,6 +6203,7 @@
     m68knetbsd_vec)		tb="$tb m68knetbsd.lo aout32.lo" ;;
     m68ksysvcoff_vec)		tb="$tb coff-svm68k.lo cofflink.lo" ;;
     m88kbcs_vec)		tb="$tb coff-m88k.lo" ;;
+    m88kmach3_vec)		tb="$tb m88kmach3.lo aout32.lo" ;;
     mcore_pe_big_vec)		tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
     mcore_pe_little_vec)	tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
     mcore_pei_big_vec)		tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
@@ -6204,7 +6223,6 @@
     ppcboot_vec)		tb="$tb ppcboot.lo" ;;
     riscix_vec)			tb="$tb aout32.lo riscix.lo" ;;
     rs6000coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
-    aix5coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
     rs6000coff_vec)		tb="$tb coff-rs6000.lo xcofflink.lo" ;;
     shcoff_small_vec)		tb="$tb coff-sh.lo cofflink.lo" ;;
     shcoff_vec)			tb="$tb coff-sh.lo cofflink.lo" ;;
@@ -6219,10 +6237,7 @@
     sparclynx_aout_vec)		tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
     sparclynx_coff_vec)		tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
     sparcnetbsd_vec)		tb="$tb sparcnetbsd.lo aout32.lo" ;;
-    srec_vec)			tb="$tb srec.lo" ;;
     sunos_big_vec)		tb="$tb sunos.lo aout32.lo" ;;
-    symbolsrec_vec)		tb="$tb srec.lo" ;;
-    tekhex_vec)			tb="$tb tekhex.lo" ;;
     tic30_aout_vec)		tb="$tb aout-tic30.lo" ;;
     tic30_coff_vec)		tb="$tb coff-tic30.lo" ;;
     tic54x_coff0_beh_vec)	tb="$tb coff-tic54x.lo" ;;
@@ -6232,6 +6247,9 @@
     tic54x_coff2_beh_vec)	tb="$tb coff-tic54x.lo" ;;
     tic54x_coff2_vec)		tb="$tb coff-tic54x.lo" ;;
     tic80coff_vec)		tb="$tb coff-tic80.lo cofflink.lo" ;;
+    vaxnetbsd_vec)		tb="$tb vaxnetbsd.lo aout32.lo" ;;
+    vax1knetbsd_vec)		tb="$tb vax1knetbsd.lo aout32.lo" ;;
+    vaxbsd_vec)			tb="$tb vaxbsd.lo aout32.lo" ;;
     versados_vec)		tb="$tb versados.lo" ;;
     vms_alpha_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
     vms_vax_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
@@ -6239,6 +6257,13 @@
     we32kcoff_vec)		tb="$tb coff-we32k.lo" ;;
     z8kcoff_vec)		tb="$tb coff-z8k.lo reloc16.lo" ;;
 
+    # These appear out of order in targets.c
+    srec_vec)			tb="$tb srec.lo" ;;
+    symbolsrec_vec)		tb="$tb srec.lo" ;;
+    tekhex_vec)			tb="$tb tekhex.lo" ;;
+    cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
+    cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
+
     "")			;;
     *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
     esac
@@ -6307,10 +6332,10 @@
     if test -n "$GCC" ; then
        bad_64bit_gcc=no;
        echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6311: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6336: checking for gcc version with buggy 64-bit support" >&5
        # Add more tests for gcc versions with non-working 64-bit support here.
        cat > conftest.$ac_ext <<EOF
-#line 6314 "configure"
+#line 6339 "configure"
 #include "confdefs.h"
 :__GNUC__:__GNUC_MINOR__:__i386__:
 EOF
@@ -6355,17 +6380,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6359: checking for $ac_hdr" >&5
+echo "configure:6384: 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
-#line 6364 "configure"
+#line 6389 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6394: \"$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*
@@ -6394,12 +6419,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6398: checking for $ac_func" >&5
+echo "configure:6423: 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 <<EOF
-#line 6403 "configure"
+#line 6428 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6422,7 +6447,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6451: \"$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
@@ -6447,7 +6472,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6451: checking for working mmap" >&5
+echo "configure:6476: 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
@@ -6455,7 +6480,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6459 "configure"
+#line 6484 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6608,7 +6633,7 @@
 }
 
 EOF
-if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6637: \"$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
@@ -6633,12 +6658,12 @@
 for ac_func in madvise mprotect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6637: checking for $ac_func" >&5
+echo "configure:6662: 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 <<EOF
-#line 6642 "configure"
+#line 6667 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6661,7 +6686,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6690: \"$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 340da09..2f59095 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -7,7 +7,7 @@
 AC_CANONICAL_SYSTEM
 AC_ISC_POSIX
 
-AM_INIT_AUTOMAKE(bfd, 2.12.90)
+AM_INIT_AUTOMAKE(bfd, 2.13.90)
 # Uncomment the next line to remove the date from the reported bfd version
 #is_release=y
 
@@ -365,6 +365,7 @@
 	COREFILE=trad-core.lo
 	TRAD_HEADER='"hosts/tahoe.h"'
 	;;
+  vax-*-netbsd*)	COREFILE=netbsd-core.lo ;;
   vax-*-ultrix2*)
 	COREFILE=trad-core.lo
 	TRAD_HEADER='"hosts/vaxult2.h"'
@@ -536,6 +537,7 @@
     # use one entry per line, even though this leads to long lines.
     a29kcoff_big_vec)		tb="$tb coff-a29k.lo cofflink.lo" ;;
     a_out_adobe_vec)		tb="$tb aout-adobe.lo aout32.lo" ;;
+    aix5coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
     aout0_big_vec)		tb="$tb aout0.lo aout32.lo" ;;
     aout_arm_big_vec)		tb="$tb aout-arm.lo aout32.lo" ;;
     aout_arm_little_vec)	tb="$tb aout-arm.lo aout32.lo" ;;
@@ -562,26 +564,31 @@
     bfd_elf32_bigarc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_bigarm_oabi_vec)	tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
     bfd_elf32_bigarm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+    bfd_elf32_bigarmqnx_vec)	tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
     bfd_elf32_bigmips_vec) 	tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_cris_vec)		tb="$tb elf32-cris.lo elf32.lo $elf" ;;
     bfd_elf32_d10v_vec)		tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
     bfd_elf32_d30v_vec)		tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
     bfd_elf32_dlx_big_vec)	tb="$tb elf32-dlx.lo elf32.lo $elf" ;;
     bfd_elf32_fr30_vec)		tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
+    bfd_elf32_frv_vec)		tb="$tb elf32-frv.lo elf32.lo $elf" ;;
     bfd_elf32_h8300_vec)	tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_linux_vec)	tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)		tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)		tb="$tb elf32-i370.lo elf32.lo $elf" ;;
     bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+    bfd_elf32_i386qnx_vec)	tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec)	tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
     bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
+    bfd_elf32_ip2k_vec)		tb="$tb elf32-ip2k.lo elf32.lo $elf" ;;
     bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
     bfd_elf32_littlearm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+    bfd_elf32_littlearmqnx_vec)	tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
     bfd_elf32_littlemips_vec) 	tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_m32r_vec)		tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
     bfd_elf32_m68hc11_vec)	tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -592,31 +599,40 @@
     bfd_elf32_mcore_little_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
     bfd_elf32_mn10200_vec)	tb="$tb elf-m10200.lo elf32.lo $elf" ;;
     bfd_elf32_mn10300_vec)	tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+    bfd_elf32_nbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_nlittlemips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradbigmips_vec)	tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+    bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf32_openrisc_vec)	tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
     bfd_elf32_or32_big_vec)	tb="$tb elf32-or32.lo elf32.lo $elf" ;;
     bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
     bfd_elf32_pjl_vec)          tb="$tb elf32-pj.lo elf32.lo $elf";;
     bfd_elf32_powerpc_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+    bfd_elf32_powerpcleqnx_vec)	tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+    bfd_elf32_powerpcqnx_vec)	tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
     bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+    # FIXME: We include cofflink.lo not because it's needed for
+    # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
+    # which needs it but does not list it.  Should be fixed in right place.
+    bfd_elf32_sh64_vec)		tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+    bfd_elf32_sh64l_vec)	tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+    bfd_elf32_sh64lnbsd_vec)	tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
+    bfd_elf32_sh64nbsd_vec)	tb="$tb elf32-sh64-nbsd.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
     bfd_elf32_sh_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shblin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
     bfd_elf32_shl_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shlin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
     bfd_elf32_shlnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+    bfd_elf32_shlqnx_vec)	tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_shnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
-    # FIXME: We include cofflink.lo not because it's needed for
-    # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
-    # which needs it but does not list it.  Should be fixed in right place.
-    bfd_elf32_sh64_vec)		tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
-    bfd_elf32_sh64l_vec)	tb="$tb elf32-sh64.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
-    bfd_elf64_sh64_vec)		tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
-    bfd_elf64_sh64l_vec)	tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf32_shqnx_vec)	tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
     bfd_elf32_sparc_vec)	tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
     bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
     bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-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_vax_vec)		tb="$tb elf32-vax.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 ;;
@@ -634,6 +650,10 @@
     bfd_elf64_powerpc_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_powerpcle_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
     bfd_elf64_s390_vec)		tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_sh64_vec)		tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64l_vec)	tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64lnbsd_vec)	tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
+    bfd_elf64_sh64nbsd_vec)	tb="$tb elf64-sh64-nbsd.lo elf64.lo $elf" target_size=64 ;;
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
@@ -643,8 +663,6 @@
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
-    cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
-    cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
     cris_aout_vec)		tb="$tb aout-cris.lo" ;;
     demo_64_vec)		tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
     ecoff_big_vec)		tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
@@ -686,6 +704,7 @@
     m68knetbsd_vec)		tb="$tb m68knetbsd.lo aout32.lo" ;;
     m68ksysvcoff_vec)		tb="$tb coff-svm68k.lo cofflink.lo" ;;
     m88kbcs_vec)		tb="$tb coff-m88k.lo" ;;
+    m88kmach3_vec)		tb="$tb m88kmach3.lo aout32.lo" ;;
     mcore_pe_big_vec)		tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
     mcore_pe_little_vec)	tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
     mcore_pei_big_vec)		tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
@@ -705,7 +724,6 @@
     ppcboot_vec)		tb="$tb ppcboot.lo" ;;
     riscix_vec)			tb="$tb aout32.lo riscix.lo" ;;
     rs6000coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
-    aix5coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo aix5ppc-core.lo"; target_size=64 ;;
     rs6000coff_vec)		tb="$tb coff-rs6000.lo xcofflink.lo" ;;
     shcoff_small_vec)		tb="$tb coff-sh.lo cofflink.lo" ;;
     shcoff_vec)			tb="$tb coff-sh.lo cofflink.lo" ;;
@@ -720,10 +738,7 @@
     sparclynx_aout_vec)		tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
     sparclynx_coff_vec)		tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
     sparcnetbsd_vec)		tb="$tb sparcnetbsd.lo aout32.lo" ;;
-    srec_vec)			tb="$tb srec.lo" ;;
     sunos_big_vec)		tb="$tb sunos.lo aout32.lo" ;;
-    symbolsrec_vec)		tb="$tb srec.lo" ;;
-    tekhex_vec)			tb="$tb tekhex.lo" ;;
     tic30_aout_vec)		tb="$tb aout-tic30.lo" ;;
     tic30_coff_vec)		tb="$tb coff-tic30.lo" ;;
     tic54x_coff0_beh_vec)	tb="$tb coff-tic54x.lo" ;;
@@ -733,6 +748,9 @@
     tic54x_coff2_beh_vec)	tb="$tb coff-tic54x.lo" ;;
     tic54x_coff2_vec)		tb="$tb coff-tic54x.lo" ;;
     tic80coff_vec)		tb="$tb coff-tic80.lo cofflink.lo" ;;
+    vaxnetbsd_vec)		tb="$tb vaxnetbsd.lo aout32.lo" ;;
+    vax1knetbsd_vec)		tb="$tb vax1knetbsd.lo aout32.lo" ;;
+    vaxbsd_vec)			tb="$tb vaxbsd.lo aout32.lo" ;;
     versados_vec)		tb="$tb versados.lo" ;;
     vms_alpha_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
     vms_vax_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
@@ -740,6 +758,13 @@
     we32kcoff_vec)		tb="$tb coff-we32k.lo" ;;
     z8kcoff_vec)		tb="$tb coff-z8k.lo reloc16.lo" ;;
 
+    # These appear out of order in targets.c
+    srec_vec)			tb="$tb srec.lo" ;;
+    symbolsrec_vec)		tb="$tb srec.lo" ;;
+    tekhex_vec)			tb="$tb tekhex.lo" ;;
+    cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
+    cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
+
     "")			;;
     *) AC_MSG_ERROR(*** unknown target vector $vec) ;;
     esac
diff --git a/bfd/corefile.c b/bfd/corefile.c
index 609c4e6..2414225 100644
--- a/bfd/corefile.c
+++ b/bfd/corefile.c
@@ -1,5 +1,5 @@
 /* Core file generic interface routines for BFD.
-   Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001
+   Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -44,7 +44,7 @@
 
 */
 
-CONST char *
+const char *
 bfd_core_file_failing_command (abfd)
      bfd *abfd;
 {
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 07beae5..10ca3fd 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -97,23 +97,20 @@
     return in;
 }
 
-static const bfd_arch_info_type h8300_info_struct =
+static const bfd_arch_info_type h8300s_info_struct =
 {
-  16,				/* 16 bits in a word */
-  16,				/* 16 bits in an address */
+  32,				/* 32 bits in a word */
+  32,				/* 32 bits in an address */
   8,				/* 8 bits in a byte */
   bfd_arch_h8300,
-  bfd_mach_h8300,
-  "h8300",			/* arch_name  */
-  "h8300",			/* printable name */
+  bfd_mach_h8300s,
+  "h8300s",			/* arch_name  */
+  "h8300s",			/* printable name */
   1,
-  true,				/* the default machine */
+  false,			/* the default machine */
   compatible,
   h8300_scan,
-#if 0
-  local_bfd_reloc_type_lookup,
-#endif
-  0,
+  0
 };
 
 static const bfd_arch_info_type h8300h_info_struct =
@@ -129,27 +126,21 @@
   false,			/* the default machine */
   compatible,
   h8300_scan,
-#if 0
-  local_bfd_reloc_type_lookup,
-#endif
-  &h8300_info_struct,
+  &h8300s_info_struct
 };
 
 const bfd_arch_info_type bfd_h8300_arch =
 {
-  32,				/* 32 bits in a word */
-  32,				/* 32 bits in an address */
+  16,				/* 16 bits in a word */
+  16,				/* 16 bits in an address */
   8,				/* 8 bits in a byte */
   bfd_arch_h8300,
-  bfd_mach_h8300s,
-  "h8300s",			/* arch_name  */
-  "h8300s",			/* printable name */
+  bfd_mach_h8300,
+  "h8300",			/* arch_name  */
+  "h8300",			/* printable name */
   1,
-  false,			/* the default machine */
+  true,				/* the default machine */
   compatible,
   h8300_scan,
-#if 0
-  local_bfd_reloc_type_lookup,
-#endif
-  &h8300h_info_struct,
+  &h8300h_info_struct
 };
diff --git a/bfd/cpu-ip2k.c b/bfd/cpu-ip2k.c
new file mode 100644
index 0000000..6afb7fe
--- /dev/null
+++ b/bfd/cpu-ip2k.c
@@ -0,0 +1,54 @@
+/* BFD support for the Scenix IP2xxx processor.
+   Copyright (C) 2000, 2002 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_ip2k_nonext_arch =
+{
+  32,				/* Bits per word - not really true.  */
+  16,				/* Bits per address.  */
+  8,				/* Bits per byte.  */
+  bfd_arch_ip2k,		/* Architecture.  */
+  bfd_mach_ip2022,		/* Machine.  */
+  "ip2k",			/* Architecture name.  */
+  "ip2022",			/* Machine name.  */
+  1,				/* Section align power.  */
+  false,		        /* The default ?  */
+  bfd_default_compatible,	/* Architecture comparison fn.  */
+  bfd_default_scan,		/* String to architecture convert fn.  */
+  NULL				/* Next in list.  */
+};
+
+const bfd_arch_info_type bfd_ip2k_arch =
+{
+  32,				/* Bits per word - not really true.  */
+  16,				/* Bits per address.  */
+  8,				/* Bits per byte.  */
+  bfd_arch_ip2k,		/* Architecture.  */
+  bfd_mach_ip2022ext,		/* Machine.  */
+  "ip2k",			/* Architecture name.  */
+  "ip2022ext",			/* Machine name.  */
+  1,				/* Section align power.  */
+  true,				/* The default ?  */
+  bfd_default_compatible,	/* Architecture comparison fn.  */
+  bfd_default_scan,		/* String to architecture convert fn.  */
+  & bfd_ip2k_nonext_arch	/* Next in list.  */
+};
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 2cfa26f..acc081a 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -1,24 +1,24 @@
 /* BFD support for the ns32k architecture.
-   Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001
+   Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Almost totally rewritten by Ian Dall from initial work
    by Andrew Cagney.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -30,7 +30,7 @@
 
 static const bfd_arch_info_type arch_info_struct[] =
 {
-  N(32532,"ns32k:32532",true, 0), /* the word ns32k will match this too */
+  N(32532,"ns32k:32532",true, 0), /* The word ns32k will match this too.  */
 };
 
 const bfd_arch_info_type bfd_ns32k_arch =
@@ -40,7 +40,7 @@
   PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
 	   bfd *, char **,
 	   bfd_vma (*) (bfd_byte *, int),
-	   int (*) (bfd_vma, bfd_byte *, int)));
+	   void (*) (bfd_vma, bfd_byte *, int)));
 
 bfd_vma
 _bfd_ns32k_get_displacement (buffer, size)
@@ -48,6 +48,7 @@
      int size;
 {
   bfd_signed_vma value;
+
   switch (size)
     {
     case 1:
@@ -70,10 +71,11 @@
       abort ();
       return 0;
     }
+
   return value;
 }
 
-int
+void
 _bfd_ns32k_put_displacement (value, buffer, size)
      bfd_vma value;
      bfd_byte *buffer;
@@ -82,15 +84,11 @@
   switch (size)
     {
     case 1:
-      if (value + 0x40 > 0x7f)
-	return -1;
       value &= 0x7f;
       *buffer++ = value;
       break;
 
     case 2:
-      if (value + 0x2000 > 0x3fff)
-	return -1;
       value &= 0x3fff;
       value |= 0x8000;
       *buffer++ = (value >> 8);
@@ -98,19 +96,14 @@
       break;
 
     case 4:
-      /* FIXME: is this correct?  -0x1f000000 <= value < 0x2000000 */
-      if (value + 0x1f000000 > 0x3effffff)
-	return -1;
       value |= (bfd_vma) 0xc0000000;
       *buffer++ = (value >> 24);
       *buffer++ = (value >> 16);
       *buffer++ = (value >> 8);
       *buffer++ = value;
       break;
-    default:
-      return -1;
   }
-  return 0;
+  return;
 }
 
 bfd_vma
@@ -119,13 +112,9 @@
      int size;
 {
   bfd_vma value = 0;
+
   switch (size)
     {
-    case 8:
-      value = (value << 8) | (*buffer++ & 0xff);
-      value = (value << 8) | (*buffer++ & 0xff);
-      value = (value << 8) | (*buffer++ & 0xff);
-      value = (value << 8) | (*buffer++ & 0xff);
     case 4:
       value = (value << 8) | (*buffer++ & 0xff);
       value = (value << 8) | (*buffer++ & 0xff);
@@ -133,11 +122,14 @@
       value = (value << 8) | (*buffer++ & 0xff);
     case 1:
       value = (value << 8) | (*buffer++ & 0xff);
+      break;
+    default:
+      abort ();
     }
   return value;
 }
 
-int
+void
 _bfd_ns32k_put_immediate (value, buffer, size)
      bfd_vma value;
      bfd_byte *buffer;
@@ -146,11 +138,6 @@
   buffer += size - 1;
   switch (size)
     {
-    case 8:
-      *buffer-- = (value & 0xff); value >>= 8;
-      *buffer-- = (value & 0xff); value >>= 8;
-      *buffer-- = (value & 0xff); value >>= 8;
-      *buffer-- = (value & 0xff); value >>= 8;
     case 4:
       *buffer-- = (value & 0xff); value >>= 8;
       *buffer-- = (value & 0xff); value >>= 8;
@@ -159,14 +146,13 @@
     case 1:
       *buffer-- = (value & 0xff); value >>= 8;
     }
-  return 0;
 }
 
 /* This is just like the standard perform_relocation except we
- * use get_data and put_data which know about the ns32k
- * storage methods.
- * This is probably a lot more complicated than it needs to be!
- */
+   use get_data and put_data which know about the ns32k storage
+   methods.  This is probably a lot more complicated than it
+   needs to be!  */
+
 static bfd_reloc_status_type
 do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
 		error_message, get_data, put_data)
@@ -178,7 +164,7 @@
      bfd *output_bfd;
      char **error_message ATTRIBUTE_UNUSED;
      bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
-     int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+     void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
 {
   int overflow = 0;
   bfd_vma relocation;
@@ -220,7 +206,7 @@
   reloc_target_output_section = symbol->section->output_section;
 
   /* Convert input-section-relative symbol value to absolute.  */
-  if (output_bfd && howto->partial_inplace == false)
+  if (output_bfd != NULL && ! howto->partial_inplace)
     output_base = 0;
   else
     output_base = reloc_target_output_section->vma;
@@ -233,7 +219,7 @@
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == true)
+  if (howto->pc_relative)
     {
       /* This is a PC relative relocation.  We want to set RELOCATION
 	 to the distance between the address of the symbol and the
@@ -262,17 +248,16 @@
 	 producing relocateable output it is not what the code
 	 actually does.  I don't want to change it, because it seems
 	 far too likely that something will break.  */
-
       relocation -=
 	input_section->output_section->vma + input_section->output_offset;
 
-      if (howto->pcrel_offset == true)
+      if (howto->pcrel_offset)
 	relocation -= reloc_entry->address;
     }
 
   if (output_bfd != (bfd *) NULL)
     {
-      if (howto->partial_inplace == false)
+      if (! howto->partial_inplace)
 	{
 	  /* This is a partial relocation, and we want to apply the relocation
 	     to the reloc entry rather than the raw data. Modify the reloc
@@ -299,71 +284,76 @@
 		 relocation with -r.  Removing the line below this comment
 		 fixes that problem; see PR 2953.
 
-However, Ian wrote the following, regarding removing the line below,
-which explains why it is still enabled:  --djm
+		 However, Ian wrote the following, regarding removing the line
+		 below, which explains why it is still enabled:  --djm
 
-If you put a patch like that into BFD you need to check all the COFF
-linkers.  I am fairly certain that patch will break coff-i386 (e.g.,
-SCO); see coff_i386_reloc in coff-i386.c where I worked around the
-problem in a different way.  There may very well be a reason that the
-code works as it does.
+		 If you put a patch like that into BFD you need to check all
+		 the COFF linkers.  I am fairly certain that patch will break
+		 coff-i386 (e.g., SCO); see coff_i386_reloc in coff-i386.c
+		 where I worked around the problem in a different way.  There
+		 may very well be a reason that the code works as it does.
 
-Hmmm.  The first obvious point is that bfd_perform_relocation should
-not have any tests that depend upon the flavour.  It's seem like
-entirely the wrong place for such a thing.  The second obvious point
-is that the current code ignores the reloc addend when producing
-relocateable output for COFF.  That's peculiar.  In fact, I really
-have no idea what the point of the line you want to remove is.
+		 Hmmm.  The first obvious point is that bfd_perform_relocation
+		 should not have any tests that depend upon the flavour.  It's
+		 seem like entirely the wrong place for such a thing.  The
+		 second obvious point is that the current code ignores the
+		 reloc addend when producing relocateable output for COFF.
+		 That's peculiar.  In fact, I really have no idea what the
+		 point of the line you want to remove is.
 
-A typical COFF reloc subtracts the old value of the symbol and adds in
-the new value to the location in the object file (if it's a pc
-relative reloc it adds the difference between the symbol value and the
-location).  When relocating we need to preserve that property.
+		 A typical COFF reloc subtracts the old value of the symbol
+		 and adds in the new value to the location in the object file
+		 (if it's a pc relative reloc it adds the difference between
+		 the symbol value and the location).  When relocating we need
+		 to preserve that property.
 
-BFD handles this by setting the addend to the negative of the old
-value of the symbol.  Unfortunately it handles common symbols in a
-non-standard way (it doesn't subtract the old value) but that's a
-different story (we can't change it without losing backward
-compatibility with old object files) (coff-i386 does subtract the old
-value, to be compatible with existing coff-i386 targets, like SCO).
+		 BFD handles this by setting the addend to the negative of the
+		 old value of the symbol.  Unfortunately it handles common
+		 symbols in a non-standard way (it doesn't subtract the old
+		 value) but that's a different story (we can't change it
+		 without losing backward compatibility with old object files)
+		 (coff-i386 does subtract the old value, to be compatible with
+		 existing coff-i386 targets, like SCO).
 
-So everything works fine when not producing relocateable output.  When
-we are producing relocateable output, logically we should do exactly
-what we do when not producing relocateable output.  Therefore, your
-patch is correct.  In fact, it should probably always just set
-reloc_entry->addend to 0 for all cases, since it is, in fact, going to
-add the value into the object file.  This won't hurt the COFF code,
-which doesn't use the addend; I'm not sure what it will do to other
-formats (the thing to check for would be whether any formats both use
-the addend and set partial_inplace).
+		 So everything works fine when not producing relocateable
+		 output.  When we are producing relocateable output, logically
+		 we should do exactly what we do when not producing
+		 relocateable output.  Therefore, your patch is correct.  In
+		 fact, it should probably always just set reloc_entry->addend
+		 to 0 for all cases, since it is, in fact, going to add the
+		 value into the object file.  This won't hurt the COFF code,
+		 which doesn't use the addend; I'm not sure what it will do
+		 to other formats (the thing to check for would be whether
+		 any formats both use the addend and set partial_inplace).
 
-When I wanted to make coff-i386 produce relocateable output, I ran
-into the problem that you are running into: I wanted to remove that
-line.  Rather than risk it, I made the coff-i386 relocs use a special
-function; it's coff_i386_reloc in coff-i386.c.  The function
-specifically adds the addend field into the object file, knowing that
-bfd_perform_relocation is not going to.  If you remove that line, then
-coff-i386.c will wind up adding the addend field in twice.  It's
-trivial to fix; it just needs to be done.
+		 When I wanted to make coff-i386 produce relocateable output,
+		 I ran into the problem that you are running into: I wanted
+		 to remove that line.  Rather than risk it, I made the
+		 coff-i386 relocs use a special function; it's coff_i386_reloc
+		 in coff-i386.c.  The function specifically adds the addend
+		 field into the object file, knowing that bfd_perform_relocation
+		 is not going to.  If you remove that line, then coff-i386.c
+		 will wind up adding the addend field in twice.  It's trivial
+		 to fix; it just needs to be done.
 
-The problem with removing the line is just that it may break some
-working code.  With BFD it's hard to be sure of anything.  The right
-way to deal with this is simply to build and test at least all the
-supported COFF targets.  It should be straightforward if time and disk
-space consuming.  For each target:
-    1) build the linker
-    2) generate some executable, and link it using -r (I would
-       probably use paranoia.o and link against newlib/libc.a, which
-       for all the supported targets would be available in
-       /usr/cygnus/progressive/H-host/target/lib/libc.a).
-    3) make the change to reloc.c
-    4) rebuild the linker
-    5) repeat step 2
-    6) if the resulting object files are the same, you have at least
-       made it no worse
-    7) if they are different you have to figure out which version is
-       right
-*/
+		 The problem with removing the line is just that it may break
+		 some working code.  With BFD it's hard to be sure of anything.
+		 The right way to deal with this is simply to build and test at
+		 least all the supported COFF targets.  It should be
+		 straightforward if time and disk space consuming.  For each
+		 target:
+		   1) build the linker
+		   2) generate some executable, and link it using -r (I would
+		      probably use paranoia.o and link against newlib/libc.a,
+		      which for all the supported targets would be available in
+		      /usr/cygnus/progressive/H-host/target/lib/libc.a).
+		   3) make the change to reloc.c
+		   4) rebuild the linker
+		   5) repeat step 2
+		   6) if the resulting object files are the same, you have at
+		      least made it no worse
+		   7) if they are different you have to figure out which
+		      version is right.  */
 	      relocation -= reloc_entry->addend;
 #endif
 	      reloc_entry->addend = 0;
@@ -462,11 +452,9 @@
 	}
     }
 
-  /*
-    Either we are relocating all the way, or we don't want to apply
-    the relocation to the reloc entry (probably because there isn't
-    any room in the output format to describe addends to relocs)
-    */
+  /* Either we are relocating all the way, or we don't want to apply
+     the relocation to the reloc entry (probably because there isn't
+     any room in the output format to describe addends to relocs).  */
 
   /* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
      (OSF version 1.3, compiler version 3.11).  It miscompiles the
@@ -493,11 +481,10 @@
 
   relocation >>= (bfd_vma) howto->rightshift;
 
-  /* Shift everything up to where it's going to be used */
-
+  /* Shift everything up to where it's going to be used.  */
   relocation <<= (bfd_vma) howto->bitpos;
 
-  /* Wait for the day when all have the mask in them */
+  /* Wait for the day when all have the mask in them.  */
 
   /* What we do:
      i instruction to be left alone
@@ -527,8 +514,7 @@
      B B B B B
      or              A A A A A
      -----------------------
-     R R R R R R R R R R        put into bfd_put<size>
-     */
+     R R R R R R R R R R        put into bfd_put<size>.  */
 
 #define DOIT(x) \
   x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) +  relocation) & howto->dst_mask))
@@ -538,39 +524,39 @@
     {
     case 0:
       {
-	char x = get_data (location, 1);
+	bfd_vma x = get_data (location, 1);
 	DOIT (x);
-	overflow = put_data ((bfd_vma) x, location, 1);
+	put_data ((bfd_vma) x, location, 1);
       }
       break;
 
     case 1:
       if (relocation)
 	{
-	  short x = get_data (location, 2);
+	  bfd_vma x = get_data (location, 2);
 	  DOIT (x);
-	  overflow = put_data ((bfd_vma) x, location, 2);
+	  put_data ((bfd_vma) x, location, 2);
 	}
       break;
     case 2:
       if (relocation)
 	{
-	  long x = get_data (location, 4);
+	  bfd_vma x = get_data (location, 4);
 	  DOIT (x);
-	  overflow = put_data ((bfd_vma) x, location, 4);
+	  put_data ((bfd_vma) x, location, 4);
 	}
       break;
     case -2:
       {
-	long x = get_data (location, 4);
+	bfd_vma x = get_data (location, 4);
 	relocation = -relocation;
 	DOIT(x);
-	overflow = put_data ((bfd_vma) x, location, 4);
+	put_data ((bfd_vma) x, location, 4);
       }
       break;
 
     case 3:
-      /* Do nothing */
+      /* Do nothing.  */
       break;
 
     case 4:
@@ -579,7 +565,7 @@
 	{
 	  bfd_vma x = get_data (location, 8);
 	  DOIT (x);
-	  overflow = put_data (x, location, 8);
+	  put_data (x, location, 8);
 	}
 #else
       abort ();
@@ -604,7 +590,7 @@
      bfd_vma relocation;
      bfd_byte *location;
      bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
-     int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+     void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
 {
   int size;
   bfd_vma x;
diff --git a/bfd/cpu-powerpc.c b/bfd/cpu-powerpc.c
index d77b426..b282c60 100644
--- a/bfd/cpu-powerpc.c
+++ b/bfd/cpu-powerpc.c
@@ -50,7 +50,8 @@
 
 const bfd_arch_info_type bfd_powerpc_archs[] =
 {
-#if BFD_DEFAULT_TARGET_SIZE == 64 /* default arch must come first.  */
+#if BFD_DEFAULT_TARGET_SIZE == 64
+  /* Default arch must come first.  */
   {
     64,	/* 64 bits in a word */
     64,	/* 64 bits in an address */
@@ -65,6 +66,8 @@
     bfd_default_scan,
     &bfd_powerpc_archs[1]
   },
+  /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch
+     being immediately after the 64 bit default.  */
   {
     32,	/* 32 bits in a word */
     32,	/* 32 bits in an address */
@@ -80,6 +83,7 @@
     &bfd_powerpc_archs[2],
   },
 #else
+  /* Default arch must come first.  */
   {
     32,	/* 32 bits in a word */
     32,	/* 32 bits in an address */
@@ -94,6 +98,8 @@
     bfd_default_scan,
     &bfd_powerpc_archs[1],
   },
+  /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch
+     being immediately after the 32 bit default.  */
   {
     64,	/* 64 bits in a word */
     64,	/* 64 bits in an address */
@@ -264,6 +270,20 @@
     &bfd_powerpc_archs[13]
   },
   {
+    32, /* 32 bits in a word */
+    32, /* 32 bits in an address */
+    8,  /* 8 bits in a byte */
+    bfd_arch_powerpc,
+    bfd_mach_ppc_e500,
+    "powerpc",
+    "powerpc:e500",
+    3,
+    false,
+    powerpc_compatible,
+    bfd_default_scan,
+    &bfd_powerpc_archs[14]
+  },
+  {
     32,       /* 32 bits in a word */
     32,       /* 32 bits in an address */
     8,        /* 8 bits in a byte */
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index d141846..39c69c9 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -1,3 +1,28 @@
+2002-08-13  Alan Modra  <amodra@bigpond.net.au>
+
+	* header.sed: Strip tabs.
+
+2002-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am: Fix quote style in last change.
+	* Makefile.in: Regenerate.
+
+2002-06-07  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am (libbfd.h): Don't use "echo -n".
+	(libcoff.h, bfd.h): Likewise.
+	* Makefile.in: Regenerate.
+
+2002-06-06  Lars Brinkhoff  <lars@nocrew.org>
+
+	* bfdint.texi: Change registry@sco.com to registry@caldera.com.
+
+2002-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am (libbfd.h): Add "Extracted from.." comment.
+	(libcoff.h, bfd.h): Likewise.
+	* Makefile.in: Regenerate.
+
 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
 
 	* chew.c: Use #include "" instead of <> for local header files.
diff --git a/bfd/doc/Makefile.am b/bfd/doc/Makefile.am
index cbfd342..0787143 100644
--- a/bfd/doc/Makefile.am
+++ b/bfd/doc/Makefile.am
@@ -209,7 +209,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 
@@ -226,7 +228,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 
@@ -255,7 +259,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 	echo "#ifdef __cplusplus" >> $@
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 0e46ceb..66a19d1 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -606,7 +606,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 
@@ -616,7 +618,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 
@@ -626,7 +630,9 @@
 	  case $$file in \
 	    *-in.h) cat $$file >> $@ ;; \
 	    */header.sed) break ;; \
-	    *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+	    *)	echo $$file | sed -e 's,.*/,,' -e 's,^,/* Extracted from ,' \
+				-e 's,$$,.  */,' >> $@ ; \
+		./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
 	  esac; \
 	done
 	echo "#ifdef __cplusplus" >> $@
diff --git a/bfd/doc/bfdint.texi b/bfd/doc/bfdint.texi
index 76fd832..d2996dc 100644
--- a/bfd/doc/bfdint.texi
+++ b/bfd/doc/bfdint.texi
@@ -1545,9 +1545,9 @@
 @item
 Define @samp{ELF_MACHINE_CODE} to the magic number which should appear
 in the @samp{e_machine} field of the ELF header.  As of this writing,
-these magic numbers are assigned by SCO; if you want to get a magic
+these magic numbers are assigned by Caldera; if you want to get a magic
 number for a particular processor, try sending a note to
-@email{registry@@sco.com}.  In the BFD sources, the magic numbers are
+@email{registry@@caldera.com}.  In the BFD sources, the magic numbers are
 found in @file{include/elf/common.h}; they have names beginning with
 @samp{EM_}.
 @item
diff --git a/bfd/doc/header.sed b/bfd/doc/header.sed
index ed27040..c58dc60 100644
--- a/bfd/doc/header.sed
+++ b/bfd/doc/header.sed
@@ -1,3 +1,4 @@
+s|[ 	][ 	]*| |g
 s|\(.*\) [^ ]*header.sed.*|\1|
 s|[^ ]*/||g
 s|^ *|"|
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index e3b8e27..9c5e7b8 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -856,13 +856,18 @@
   filename = table->files[file - 1].name;
   if (IS_ABSOLUTE_PATH(filename))
     return filename;
-
   else
     {
       char* dirname = (table->files[file - 1].dir
 		       ? table->dirs[table->files[file - 1].dir - 1]
 		       : table->comp_dir);
-      return (char*) concat (dirname, "/", filename, NULL);
+
+      /* Not all tools set DW_AT_comp_dir, so dirname may be unknown.  The
+	 best we can do is return the filename part.  */
+      if (dirname == NULL)
+	return filename;
+      else
+	return (char*) concat (dirname, "/", filename, NULL);
     }
 }
 
@@ -990,6 +995,13 @@
       line_ptr += 8;
       offset_size = 8;
     }
+  else if (lh.total_length == 0 && unit->addr_size == 8)
+    {
+      /* Handle (non-standard) 64-bit DWARF2 formats.  */
+      lh.total_length = read_4_bytes (abfd, line_ptr);
+      line_ptr += 4;
+      offset_size = 8;
+    }
   line_end = line_ptr + lh.total_length;
   lh.version = read_2_bytes (abfd, line_ptr);
   line_ptr += 2;
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index c7230f6..82baeeb 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -4,21 +4,21 @@
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -46,29 +46,19 @@
 
 /* Prototypes for static functions.  */
 
-static int ecoff_get_magic PARAMS ((bfd *abfd));
-static long ecoff_sec_to_styp_flags PARAMS ((const char *name,
-					     flagword flags));
-static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *abfd));
-static boolean ecoff_set_symbol_info PARAMS ((bfd *abfd, SYMR *ecoff_sym,
-					   asymbol *asym, int ext, int weak));
-static void ecoff_emit_aggregate PARAMS ((bfd *abfd, FDR *fdr,
-					  char *string,
-					  RNDXR *rndx, long isym,
-					  const char *which));
-static char *ecoff_type_to_string PARAMS ((bfd *abfd, FDR *fdr,
-					   unsigned int indx));
-static boolean ecoff_slurp_reloc_table PARAMS ((bfd *abfd, asection *section,
-						asymbol **symbols));
+static int ecoff_get_magic PARAMS ((bfd *));
+static long ecoff_sec_to_styp_flags PARAMS ((const char *, flagword));
+static boolean ecoff_slurp_symbolic_header PARAMS ((bfd *));
+static boolean ecoff_set_symbol_info PARAMS ((bfd *, SYMR *, asymbol *, int, int));
+static void ecoff_emit_aggregate PARAMS ((bfd *, FDR *, char *, RNDXR *, long, const char *));
+static char *ecoff_type_to_string PARAMS ((bfd *, FDR *, unsigned int));
+static boolean ecoff_slurp_reloc_table PARAMS ((bfd *, asection *, asymbol **));
 static int ecoff_sort_hdrs PARAMS ((const PTR, const PTR));
-static boolean ecoff_compute_section_file_positions PARAMS ((bfd *abfd));
-static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *abfd));
+static boolean ecoff_compute_section_file_positions PARAMS ((bfd *));
+static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *));
 static boolean ecoff_get_extr PARAMS ((asymbol *, EXTR *));
 static void ecoff_set_index PARAMS ((asymbol *, bfd_size_type));
-static unsigned int ecoff_armap_hash PARAMS ((const char *s,
-					      unsigned int *rehash,
-					      unsigned int size,
-					      unsigned int hlog));
+static unsigned int ecoff_armap_hash PARAMS ((const char *, unsigned int *, unsigned int, unsigned int));
 
 /* This stuff is somewhat copied from coffcode.h.  */
 
@@ -105,6 +95,7 @@
      bfd *abfd;
 {
   bfd_size_type amt = sizeof (ecoff_data_type);
+
   abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
   if (abfd->tdata.ecoff_obj_data == NULL)
     return false;
@@ -125,7 +116,7 @@
   struct internal_aouthdr *internal_a = (struct internal_aouthdr *) aouthdr;
   ecoff_data_type *ecoff;
 
-  if (_bfd_ecoff_mkobject (abfd) == false)
+  if (! _bfd_ecoff_mkobject (abfd))
     return NULL;
 
   ecoff = ecoff_data (abfd);
@@ -184,10 +175,8 @@
 	   || strcmp (section->name, _SBSS) == 0)
     section->flags |= SEC_ALLOC;
   else if (strcmp (section->name, _LIB) == 0)
-    {
-      /* An Irix 4 shared libary.  */
-      section->flags |= SEC_COFF_SHARED_LIBRARY;
-    }
+    /* An Irix 4 shared libary.  */
+    section->flags |= SEC_COFF_SHARED_LIBRARY;
 
   /* Probably any other section name is SEC_NEVER_LOAD, but I'm
      uncertain about .init on some systems and I don't know how shared
@@ -221,14 +210,14 @@
 
     case MIPS_MAGIC_LITTLE2:
     case MIPS_MAGIC_BIG2:
-      /* MIPS ISA level 2: the r6000 */
+      /* MIPS ISA level 2: the r6000.  */
       arch = bfd_arch_mips;
       mach = 6000;
       break;
 
     case MIPS_MAGIC_LITTLE3:
     case MIPS_MAGIC_BIG3:
-      /* MIPS ISA level 3: the r4000 */
+      /* MIPS ISA level 3: the r4000.  */
       arch = bfd_arch_mips;
       mach = 4000;
       break;
@@ -553,7 +542,6 @@
      documented section. And the ordering of the sections varies between
      statically and dynamically linked executables.
      If bfd supports SEEK_END someday, this code could be simplified.  */
-
   raw_end = 0;
 
 #define UPDATE_RAW_END(start, count, size) \
@@ -604,6 +592,7 @@
     debug->off2 = (type) ((char *) raw \
 			  + (internal_symhdr->off1 \
 			     - raw_base))
+
   FIX (cbLineOffset, line, unsigned char *);
   FIX (cbDnOffset, external_dnr, PTR);
   FIX (cbPdOffset, external_pdr, PTR);
@@ -661,10 +650,9 @@
   ecoff_symbol_type *new;
   bfd_size_type amt = sizeof (ecoff_symbol_type);
 
-  new = (ecoff_symbol_type *) bfd_alloc (abfd, amt);
+  new = (ecoff_symbol_type *) bfd_zalloc (abfd, amt);
   if (new == (ecoff_symbol_type *) NULL)
     return (asymbol *) NULL;
-  memset ((PTR) new, 0, sizeof *new);
   new->symbol.section = (asection *) NULL;
   new->fdr = (FDR *) NULL;
   new->local = false;
@@ -727,6 +715,10 @@
 	  || ECOFF_IS_STAB (ecoff_sym))
 	asym->flags |= BSF_DEBUGGING;
     }
+
+  if (ecoff_sym->st == stProc || ecoff_sym->st == stStaticProc)
+    asym->flags |= BSF_FUNCTION;
+
   switch (ecoff_sym->sc)
     {
     case scNil:
@@ -1057,7 +1049,7 @@
   ecoff_symbol_type *symbase;
   ecoff_symbol_type **location = (ecoff_symbol_type **) alocation;
 
-  if (_bfd_ecoff_slurp_symbol_table (abfd) == false)
+  if (! _bfd_ecoff_slurp_symbol_table (abfd))
     return -1;
   if (bfd_get_symcount (abfd) == 0)
     return 0;
@@ -1187,56 +1179,54 @@
   qualifiers[5].type = u.ti.tq5;
   qualifiers[6].type = tqNil;
 
-  /*
-   * Go get the basic type.
-   */
+  /* Go get the basic type.  */
   switch (basic_type)
     {
-    case btNil:			/* undefined */
+    case btNil:			/* Undefined.  */
       strcpy (p1, "nil");
       break;
 
-    case btAdr:			/* address - integer same size as pointer */
+    case btAdr:			/* Address - integer same size as pointer.  */
       strcpy (p1, "address");
       break;
 
-    case btChar:		/* character */
+    case btChar:		/* Character.  */
       strcpy (p1, "char");
       break;
 
-    case btUChar:		/* unsigned character */
+    case btUChar:		/* Unsigned character.  */
       strcpy (p1, "unsigned char");
       break;
 
-    case btShort:		/* short */
+    case btShort:		/* Short.  */
       strcpy (p1, "short");
       break;
 
-    case btUShort:		/* unsigned short */
+    case btUShort:		/* Unsigned short.  */
       strcpy (p1, "unsigned short");
       break;
 
-    case btInt:			/* int */
+    case btInt:			/* Int.  */
       strcpy (p1, "int");
       break;
 
-    case btUInt:		/* unsigned int */
+    case btUInt:		/* Unsigned int.  */
       strcpy (p1, "unsigned int");
       break;
 
-    case btLong:		/* long */
+    case btLong:		/* Long.  */
       strcpy (p1, "long");
       break;
 
-    case btULong:		/* unsigned long */
+    case btULong:		/* Unsigned long.  */
       strcpy (p1, "unsigned long");
       break;
 
-    case btFloat:		/* float (real) */
+    case btFloat:		/* Float (real).  */
       strcpy (p1, "float");
       break;
 
-    case btDouble:		/* Double (real) */
+    case btDouble:		/* Double (real).  */
       strcpy (p1, "double");
       break;
 
@@ -1244,83 +1234,83 @@
 	 1st word is [ST_RFDESCAPE, offset] pointer to struct def;
 	 2nd word is file index if 1st word rfd is ST_RFDESCAPE.  */
 
-    case btStruct:		/* Structure (Record) */
+    case btStruct:		/* Structure (Record).  */
       _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx);
       ecoff_emit_aggregate (abfd, fdr, p1, &rndx,
 			    (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]),
 			    "struct");
-      indx++;			/* skip aux words */
+      indx++;			/* Skip aux words.  */
       break;
 
       /* Unions add 1-2 aux words:
 	 1st word is [ST_RFDESCAPE, offset] pointer to union def;
 	 2nd word is file index if 1st word rfd is ST_RFDESCAPE.  */
 
-    case btUnion:		/* Union */
+    case btUnion:		/* Union.  */
       _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx);
       ecoff_emit_aggregate (abfd, fdr, p1, &rndx,
 			    (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]),
 			    "union");
-      indx++;			/* skip aux words */
+      indx++;			/* Skip aux words.  */
       break;
 
       /* Enumerations add 1-2 aux words:
 	 1st word is [ST_RFDESCAPE, offset] pointer to enum def;
 	 2nd word is file index if 1st word rfd is ST_RFDESCAPE.  */
 
-    case btEnum:		/* Enumeration */
+    case btEnum:		/* Enumeration.  */
       _bfd_ecoff_swap_rndx_in (bigendian, &aux_ptr[indx].a_rndx, &rndx);
       ecoff_emit_aggregate (abfd, fdr, p1, &rndx,
 			    (long) AUX_GET_ISYM (bigendian, &aux_ptr[indx+1]),
 			    "enum");
-      indx++;			/* skip aux words */
+      indx++;			/* Skip aux words.  */
       break;
 
-    case btTypedef:		/* defined via a typedef, isymRef points */
+    case btTypedef:		/* Defined via a typedef, isymRef points.  */
       strcpy (p1, "typedef");
       break;
 
-    case btRange:		/* subrange of int */
+    case btRange:		/* Subrange of int.  */
       strcpy (p1, "subrange");
       break;
 
-    case btSet:			/* pascal sets */
+    case btSet:			/* Pascal sets.  */
       strcpy (p1, "set");
       break;
 
-    case btComplex:		/* fortran complex */
+    case btComplex:		/* Fortran complex.  */
       strcpy (p1, "complex");
       break;
 
-    case btDComplex:		/* fortran double complex */
+    case btDComplex:		/* Fortran double complex.  */
       strcpy (p1, "double complex");
       break;
 
-    case btIndirect:		/* forward or unnamed typedef */
+    case btIndirect:		/* Forward or unnamed typedef.  */
       strcpy (p1, "forward/unamed typedef");
       break;
 
-    case btFixedDec:		/* Fixed Decimal */
+    case btFixedDec:		/* Fixed Decimal.  */
       strcpy (p1, "fixed decimal");
       break;
 
-    case btFloatDec:		/* Float Decimal */
+    case btFloatDec:		/* Float Decimal.  */
       strcpy (p1, "float decimal");
       break;
 
-    case btString:		/* Varying Length Character String */
+    case btString:		/* Varying Length Character String.  */
       strcpy (p1, "string");
       break;
 
-    case btBit:			/* Aligned Bit String */
+    case btBit:			/* Aligned Bit String.  */
       strcpy (p1, "bit");
       break;
 
-    case btPicture:		/* Picture */
+    case btPicture:		/* Picture.  */
       strcpy (p1, "picture");
       break;
 
-    case btVoid:		/* Void */
+    case btVoid:		/* Void.  */
       strcpy (p1, "void");
       break;
 
@@ -1331,9 +1321,7 @@
 
   p1 += strlen (buffer1);
 
-  /*
-   * If this is a bitfield, get the bitsize.
-   */
+  /* If this is a bitfield, get the bitsize.  */
   if (u.ti.fBitfield)
     {
       int bitsize;
@@ -1343,20 +1331,16 @@
       p1 += strlen (buffer1);
     }
 
-  /*
-   * Deal with any qualifiers.
-   */
+  /* Deal with any qualifiers.  */
   if (qualifiers[0].type != tqNil)
     {
-      /*
-       * Snarf up any array bounds in the correct order.  Arrays
-       * store 5 successive words in the aux. table:
-       *	word 0	RNDXR to type of the bounds (ie, int)
-       *	word 1	Current file descriptor index
-       *	word 2	low bound
-       *	word 3	high bound (or -1 if [])
-       *	word 4	stride size in bits
-       */
+      /* Snarf up any array bounds in the correct order.  Arrays
+         store 5 successive words in the aux. table:
+        	word 0	RNDXR to type of the bounds (ie, int)
+        	word 1	Current file descriptor index
+        	word 2	low bound
+        	word 3	high bound (or -1 if [])
+        	word 4	stride size in bits.  */
       for (i = 0; i < 7; i++)
 	{
 	  if (qualifiers[i].type == tqArray)
@@ -1371,9 +1355,7 @@
 	    }
 	}
 
-      /*
-       * Now print out the qualifiers.
-       */
+      /* Now print out the qualifiers.  */
       for (i = 0; i < 6; i++)
 	{
 	  switch (qualifiers[i].type)
@@ -1409,7 +1391,6 @@
 
 		/* Print array bounds reversed (ie, in the order the C
 		   programmer writes them).  C is such a fun language....  */
-
 		while (i < 5 && qualifiers[i+1].type == tqArray)
 		  i++;
 
@@ -1511,7 +1492,7 @@
 	}
       break;
     case bfd_print_symbol_all:
-      /* Print out the symbols in a reasonable way */
+      /* Print out the symbols in a reasonable way.  */
       {
 	char type;
 	int pos;
@@ -1585,7 +1566,7 @@
 	       order is indicated by a bit in the fdr.  */
 	    bigendian = fdr->fBigendian;
 
-	    /* This switch is basically from gcc/mips-tdump.c  */
+	    /* This switch is basically from gcc/mips-tdump.c.  */
 	    switch (ecoff_ext.asym.st)
 	      {
 	      case stNil:
@@ -1678,7 +1659,7 @@
       || (section->flags & SEC_CONSTRUCTOR) != 0)
     return true;
 
-  if (_bfd_ecoff_slurp_symbol_table (abfd) == false)
+  if (! _bfd_ecoff_slurp_symbol_table (abfd))
     return false;
 
   amt = section->reloc_count;
@@ -1794,7 +1775,7 @@
     {
       arelent *tblptr;
 
-      if (ecoff_slurp_reloc_table (abfd, section, symbols) == false)
+      if (! ecoff_slurp_reloc_table (abfd, section, symbols))
 	return -1;
 
       tblptr = section->relocation;
@@ -2181,7 +2162,7 @@
       if ((current->flags & SEC_HAS_CONTENTS) != 0)
 	file_sofar += current->_raw_size;
 
-      /* make sure that this section is of the right size too */
+      /* Make sure that this section is of the right size too.  */
       old_sofar = sofar;
       sofar = BFD_ALIGN (sofar, 1 << alignment_power);
       if ((current->flags & SEC_HAS_CONTENTS) != 0)
@@ -2268,7 +2249,7 @@
 
   /* This must be done first, because bfd_set_section_contents is
      going to set output_has_begun to true.  */
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       if (! ecoff_compute_section_file_positions (abfd))
 	return false;
@@ -2363,7 +2344,7 @@
   tdata->fprmask = fprmask;
   if (cprmask != (unsigned long *) NULL)
     {
-      register int i;
+      int i;
 
       for (i = 0; i < 3; i++)
 	tdata->cprmask[i] = cprmask[i];
@@ -2630,13 +2611,12 @@
       else if (section.s_flags == 0
 	       || (section.s_flags & STYP_ECOFF_LIB) != 0
 	       || section.s_flags == STYP_COMMENT)
-	/* Do nothing */ ;
+	/* Do nothing.  */ ;
       else
 	abort ();
     }
 
   /* Set up the file header.  */
-
   internal_f.f_magic = ecoff_get_magic (abfd);
 
   /* We will NOT put a fucking timestamp in the header here. Every
@@ -2729,7 +2709,6 @@
     }
 
   /* Write out the file header and the optional header.  */
-
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
     goto error_return;
 
@@ -2751,11 +2730,9 @@
       symhdr->issExtMax = 0;
       debug->external_ext = debug->external_ext_end = NULL;
       debug->ssext = debug->ssext_end = NULL;
-      if (bfd_ecoff_debug_externals (abfd, debug, &backend->debug_swap,
-				     (((abfd->flags & EXEC_P) == 0)
-				      ? true : false),
-				     ecoff_get_extr, ecoff_set_index)
-	  == false)
+      if (! bfd_ecoff_debug_externals (abfd, debug, &backend->debug_swap,
+				       (abfd->flags & EXEC_P) == 0,
+				       ecoff_get_extr, ecoff_set_index))
 	goto error_return;
 
       /* Write out the relocs.  */
@@ -2859,9 +2836,8 @@
       if (bfd_get_symcount (abfd) > 0)
 	{
 	  /* Write out the debugging information.  */
-	  if (bfd_ecoff_write_debug (abfd, debug, &backend->debug_swap,
-				     ecoff_data (abfd)->sym_filepos)
-	      == false)
+	  if (! bfd_ecoff_write_debug (abfd, debug, &backend->debug_swap,
+				       ecoff_data (abfd)->sym_filepos))
 	    goto error_return;
 	}
     }
@@ -3060,7 +3036,6 @@
 
   /* This code used to overlay the symdefs over the raw archive data,
      but that doesn't work on a 64 bit host.  */
-
   stringbase = raw_armap + count * 8 + 8;
 
 #ifdef CHECK_ARMAP_HASH
@@ -3314,8 +3289,6 @@
   char armag[SARMAG + 1];
   bfd_size_type amt;
 
-  tdata_hold = abfd->tdata.aout_ar_data;
-
   if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
     {
       if (bfd_get_error () != bfd_error_system_call)
@@ -3329,15 +3302,13 @@
       return NULL;
     }
 
-  /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
-     involves a cast, we can't do it as the left operand of
-     assignment.  */
-  amt = sizeof (struct artdata);
-  abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+  tdata_hold = bfd_ardata (abfd);
 
+  amt = sizeof (struct artdata);
+  bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == (struct artdata *) NULL)
     {
-      abfd->tdata.aout_ar_data = tdata_hold;
+      bfd_ardata (abfd) = tdata_hold;
       return (const bfd_target *) NULL;
     }
 
@@ -3348,11 +3319,11 @@
   bfd_ardata (abfd)->extended_names = NULL;
   bfd_ardata (abfd)->tdata = NULL;
 
-  if (_bfd_ecoff_slurp_armap (abfd) == false
-      || _bfd_ecoff_slurp_extended_name_table (abfd) == false)
+  if (! _bfd_ecoff_slurp_armap (abfd)
+      || ! _bfd_ecoff_slurp_extended_name_table (abfd))
     {
       bfd_release (abfd, bfd_ardata (abfd));
-      abfd->tdata.aout_ar_data = tdata_hold;
+      bfd_ardata (abfd) = tdata_hold;
       return (const bfd_target *) NULL;
     }
 
@@ -3370,22 +3341,23 @@
       first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
       if (first != NULL)
 	{
-	  boolean fail;
-
 	  first->target_defaulted = false;
-	  fail = false;
 	  if (bfd_check_format (first, bfd_object)
 	      && first->xvec != abfd->xvec)
 	    {
+#if 0
+	      /* We ought to close `first' here, but we can't, because
+		 we have no way to remove it from the archive cache.
+		 It's close to impossible to figure out when we can
+		 release bfd_ardata.  FIXME.  */
 	      (void) bfd_close (first);
 	      bfd_release (abfd, bfd_ardata (abfd));
-	      abfd->tdata.aout_ar_data = tdata_hold;
-	      bfd_set_error (bfd_error_wrong_format);
+#endif
+	      bfd_set_error (bfd_error_wrong_object_format);
+	      bfd_ardata (abfd) = tdata_hold;
 	      return NULL;
 	    }
-
-	  /* We ought to close first here, but we can't, because we
-             have no way to remove it from the archive cache.  FIXME.  */
+	  /* And we ought to close `first' here too.  */
 	}
     }
 
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index 53d6544..5b854af 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -1,5 +1,5 @@
 /* Routines to link ECOFF debugging information.
-   Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001
+   Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
 
@@ -1314,12 +1314,12 @@
       sym_ptr = *sym_ptr_ptr;
 
       /* Get the external symbol information.  */
-      if ((*get_extr) (sym_ptr, &esym) == false)
+      if (! (*get_extr) (sym_ptr, &esym))
 	continue;
 
       /* If we're producing an executable, move common symbols into
 	 bss.  */
-      if (relocateable == false)
+      if (! relocateable)
 	{
 	  if (esym.asym.sc == scCommon)
 	    esym.asym.sc = scBss;
@@ -1376,20 +1376,18 @@
   if ((size_t) (debug->ssext_end - debug->ssext)
       < symhdr->issExtMax + namelen + 1)
     {
-      if (ecoff_add_bytes ((char **) &debug->ssext,
-			   (char **) &debug->ssext_end,
-			   symhdr->issExtMax + namelen + 1)
-	  == false)
+      if (! ecoff_add_bytes ((char **) &debug->ssext,
+			     (char **) &debug->ssext_end,
+			     symhdr->issExtMax + namelen + 1))
 	return false;
     }
   if ((size_t) ((char *) debug->external_ext_end
 		- (char *) debug->external_ext)
       < (symhdr->iextMax + 1) * external_ext_size)
     {
-      if (ecoff_add_bytes ((char **) &debug->external_ext,
-			   (char **) &debug->external_ext_end,
-			   (symhdr->iextMax + 1) * (size_t) external_ext_size)
-	  == false)
+      if (! ecoff_add_bytes ((char **) &debug->external_ext,
+			     (char **) &debug->external_ext_end,
+			     (symhdr->iextMax + 1) * (size_t) external_ext_size))
 	return false;
     }
 
@@ -1650,11 +1648,10 @@
       bfd_byte *s;
 
       i = swap->debug_align - (total & (swap->debug_align - 1));
-      s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+      s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
       if (s == NULL && i != 0)
 	return false;
 
-      memset ((PTR) s, 0, i);
       if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
 	{
 	  free (s);
@@ -1736,10 +1733,10 @@
 	  bfd_byte *s;
 
 	  i = swap->debug_align - (total & (swap->debug_align - 1));
-	  s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+	  s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
 	  if (s == NULL && i != 0)
 	    goto error_return;
-	  memset ((PTR) s, 0, i);
+
 	  if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
 	    {
 	      free (s);
@@ -1761,10 +1758,10 @@
 
       i = (swap->debug_align
 	   - (debug->symbolic_header.issExtMax & (swap->debug_align - 1)));
-      s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+      s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
       if (s == NULL && i != 0)
 	goto error_return;
-      memset ((PTR) s, 0, i);
+
       if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
 	{
 	  free (s);
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index f2c8075..dcccc48 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3,21 +3,21 @@
    2002 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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 _LIBELF_H_
 #define _LIBELF_H_ 1
@@ -223,6 +223,12 @@
   Elf_Internal_Sym isym;
 };
 
+struct elf_link_loaded_list
+{
+  struct elf_link_loaded_list *next;
+  bfd *abfd;
+};
+
 enum elf_link_info_type
 {
   ELF_INFO_TYPE_NONE,
@@ -297,6 +303,9 @@
 
   /* Cached start, size and alignment of PT_TLS segment.  */
   struct elf_link_tls_segment *tls_segment;
+
+  /* A linked list of BFD's loaded in the link.  */
+  struct elf_link_loaded_list *loaded;
 };
 
 /* Look up an entry in an ELF linker hash table.  */
@@ -353,6 +362,8 @@
     PARAMS ((bfd *));
   void (*write_relocs)
     PARAMS ((bfd *, asection *, PTR));
+  void (*swap_symbol_in)
+    PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
   void (*swap_symbol_out)
     PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
   boolean (*slurp_reloc_table)
@@ -406,8 +417,7 @@
 struct elf_reloc_cookie
 {
   Elf_Internal_Rela *rels, *rel, *relend;
-  PTR locsyms;
-  PTR locsym_shndx;
+  Elf_Internal_Sym *locsyms;
   bfd *abfd;
   size_t locsymcount;
   size_t extsymoff;
@@ -490,7 +500,7 @@
   /* A function to handle unusual section types when creating BFD
      sections from ELF sections.  */
   boolean (*elf_backend_section_from_shdr)
-    PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
+    PARAMS ((bfd *, Elf32_Internal_Shdr *, const char *));
 
   /* A function to convert machine dependent section header flags to
      BFD internal section header flags.  */
@@ -669,10 +679,9 @@
     PARAMS ((bfd *));
 
   /* This function is called during section gc to discover the section a
-     particular relocation refers to.  It need not be defined for hosts
-     that have no queer relocation types.  */
+     particular relocation refers to.  */
   asection * (*gc_mark_hook)
-    PARAMS ((bfd *abfd, struct bfd_link_info *, Elf_Internal_Rela *,
+    PARAMS ((asection *sec, struct bfd_link_info *, Elf_Internal_Rela *,
 	     struct elf_link_hash_entry *h, Elf_Internal_Sym *));
 
   /* This function, if defined, is called during the sweep phase of gc
@@ -702,13 +711,14 @@
     PARAMS ((bfd *, struct bfd_link_info *, PTR,
 	    boolean (*) (PTR, const char *, Elf_Internal_Sym *, asection *)));
 
-  /* Copy any information related to dynamic linking from a pre-existing 
+  /* Copy any information related to dynamic linking from a pre-existing
      symbol to a newly created symbol.  Also called to copy flags and
      other back-end info to a weakdef, in which case the symbol is not
      newly created and plt/got refcounts and dynamic indices should not
      be copied.  */
   void (*elf_backend_copy_indirect_symbol)
-    PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+    PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	     struct elf_link_hash_entry *));
 
   /* Modify any information related to dynamic linking such that the
      symbol is not exported.  */
@@ -760,6 +770,22 @@
   boolean (*elf_backend_write_section)
     PARAMS ((bfd *, asection *, bfd_byte *));
 
+  /* This function, if defined, sets  up the file positions for non PT_LOAD
+     segments, especially for segments containing non-allocated sections.  */
+  void (*set_nonloadable_filepos)
+    PARAMS ((bfd *, Elf_Internal_Phdr *));
+
+  /* This function, if defined, returns true if the section is contained
+     within the segment.  File positions are compared.  */
+  boolean (*is_contained_by_filepos)
+    PARAMS ((asection *, Elf_Internal_Phdr *));
+
+  /* This function, if defined, returns true if copy_private_bfd_data
+     should be called.  It provides a way of overriding default
+     test conditions in _bfd_elf_copy_private_section_data.  */
+  boolean (*copy_private_bfd_data_p)
+    PARAMS ((bfd *, asection *, bfd *, asection *));
+
   /* The level of IRIX compatibility we're striving for.
      MIPS ELF specific function.  */
   irix_compat_t (*elf_backend_mips_irix_compat)
@@ -834,6 +860,10 @@
   unsigned can_refcount : 1;
   unsigned want_got_sym : 1;
   unsigned want_dynbss : 1;
+    /* Targets which do not support physical addressing often require
+       that the p_paddr field in the section header to be set to zero.
+       This field indicates whether this behavior is required.  */
+  unsigned want_p_paddr_set_to_zero : 1;
 };
 
 /* Information stored for each BFD section in an ELF file.  This
@@ -898,8 +928,13 @@
   /* Type of that information.  */
   enum elf_link_info_type sec_info_type;
 
-  /* Group name, if this section is part of a group.  */
-  const char *group_name;
+  union {
+    /* Group name, if this section is a member of a group.  */
+    const char *name;
+
+    /* Group signature sym, if this is the SHT_GROUP section.  */
+    struct symbol_cache_entry *id;
+  } group;
 
   /* A linked list of sections in the group.  Circular when used by
      the linker.  */
@@ -910,11 +945,16 @@
 
   /* Nonzero if this section uses RELA relocations, rather than REL.  */
   unsigned int use_rela_p:1;
+
+  /* Nonzero when a group is COMDAT.  */
+  unsigned int linkonce_p:1;
 };
 
 #define elf_section_data(sec)  ((struct bfd_elf_section_data*)sec->used_by_bfd)
-#define elf_group_name(sec)    (elf_section_data(sec)->group_name)
+#define elf_group_name(sec)    (elf_section_data(sec)->group.name)
+#define elf_group_id(sec)      (elf_section_data(sec)->group.id)
 #define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
+#define elf_linkonce_p(sec)    (elf_section_data(sec)->linkonce_p)
 
 /* Return true if section has been discarded.  */
 #define elf_discarded_section(sec)					\
@@ -1180,6 +1220,9 @@
   PARAMS ((bfd *, unsigned, unsigned));
 extern char *bfd_elf_get_str_section
   PARAMS ((bfd *, unsigned));
+extern Elf_Internal_Sym *bfd_elf_get_elf_syms
+  PARAMS ((bfd *, Elf_Internal_Shdr *, size_t, size_t,
+	   Elf_Internal_Sym *, PTR, Elf_External_Sym_Shndx *));
 
 extern boolean _bfd_elf_copy_private_bfd_data
   PARAMS ((bfd *, bfd *));
@@ -1229,7 +1272,8 @@
 extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
   PARAMS ((bfd *));
 extern void _bfd_elf_link_hash_copy_indirect
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 extern void _bfd_elf_link_hash_hide_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
 extern boolean _bfd_elf_link_hash_table_init
@@ -1241,6 +1285,10 @@
   PARAMS ((bfd *));
 extern boolean _bfd_elf_merge_sections
   PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf_discard_group
+  PARAMS ((bfd *, struct sec *));
+extern void bfd_elf_set_group_contents
+  PARAMS ((bfd *, asection *, PTR));
 extern void _bfd_elf_link_just_syms
   PARAMS ((asection *, struct bfd_link_info *));
 extern boolean _bfd_elf_copy_private_symbol_data
@@ -1419,8 +1467,7 @@
   PARAMS ((bfd *, struct bfd_link_info *));
 
 extern void bfd_elf32_swap_symbol_in
-  PARAMS ((bfd *, const Elf32_External_Sym *, const Elf_External_Sym_Shndx *,
-	   Elf_Internal_Sym *));
+  PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
 extern void bfd_elf32_swap_symbol_out
   PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
 extern void bfd_elf32_swap_reloc_in
@@ -1472,8 +1519,7 @@
   PARAMS ((bfd *, struct bfd_link_info *));
 
 extern void bfd_elf64_swap_symbol_in
-  PARAMS ((bfd *, const Elf64_External_Sym *, const Elf_External_Sym_Shndx *,
-	   Elf_Internal_Sym *));
+  PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
 extern void bfd_elf64_swap_symbol_out
   PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
 extern void bfd_elf64_swap_reloc_in
@@ -1514,10 +1560,12 @@
 #define bfd_elf64_link_record_dynamic_symbol \
   _bfd_elf_link_record_dynamic_symbol
 
-extern boolean _bfd_elf32_link_record_local_dynamic_symbol
+extern int elf_link_record_local_dynamic_symbol
   PARAMS ((struct bfd_link_info *, bfd *, long));
-extern boolean _bfd_elf64_link_record_local_dynamic_symbol
-  PARAMS ((struct bfd_link_info *, bfd *, long));
+#define _bfd_elf32_link_record_local_dynamic_symbol \
+  elf_link_record_local_dynamic_symbol
+#define _bfd_elf64_link_record_local_dynamic_symbol \
+  elf_link_record_local_dynamic_symbol
 
 extern boolean _bfd_elf_close_and_cleanup
   PARAMS ((bfd *));
@@ -1553,20 +1601,20 @@
   PARAMS ((bfd_vma, PTR));
 
 /* Exported interface for writing elf corefile notes. */
-extern char *elfcore_write_note 
-  PARAMS ((bfd *, char *, int *, char *, int, void *, int));
-extern char *elfcore_write_prpsinfo 
-  PARAMS ((bfd *, char *, int *, char *, char *));
-extern char *elfcore_write_prstatus 
-  PARAMS ((bfd *, char *, int *, long, int, void *));
-extern char * elfcore_write_pstatus 
-  PARAMS ((bfd *, char *, int *, long, int, void *));
-extern char *elfcore_write_prfpreg 
-  PARAMS ((bfd *, char *, int *, void *, int));
-extern char *elfcore_write_prxfpreg 
-  PARAMS ((bfd *, char *, int *, void *, int));
-extern char *elfcore_write_lwpstatus 
-  PARAMS ((bfd*, char*, int*, long, int, void*));
+extern char *elfcore_write_note
+  PARAMS ((bfd *, char *, int *, const char *, int, const PTR, int));
+extern char *elfcore_write_prpsinfo
+  PARAMS ((bfd *, char *, int *, const char *, const char *));
+extern char *elfcore_write_prstatus
+  PARAMS ((bfd *, char *, int *, long, int, const PTR));
+extern char * elfcore_write_pstatus
+  PARAMS ((bfd *, char *, int *, long, int, const PTR));
+extern char *elfcore_write_prfpreg
+  PARAMS ((bfd *, char *, int *, const PTR, int));
+extern char *elfcore_write_prxfpreg
+  PARAMS ((bfd *, char *, int *, const PTR, int));
+extern char *elfcore_write_lwpstatus
+  PARAMS ((bfd *, char *, int *, long, int, const PTR));
 
 /* SH ELF specific routine.  */
 
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index 6f10cd7..eb4a69b 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -287,7 +287,7 @@
      bfd *abfd;
      struct bfd_link_info *info;
      asection *sec, *ehdrsec;
-     boolean (*reloc_symbol_deleted_p) (bfd_vma, PTR);
+     boolean (*reloc_symbol_deleted_p) PARAMS ((bfd_vma, PTR));
      struct elf_reloc_cookie *cookie;
 {
   bfd_byte *ehbuf = NULL, *buf;
@@ -506,6 +506,11 @@
 	    }
 	  read_uleb128 (cie.code_align, buf);
 	  read_sleb128 (cie.data_align, buf);
+	  /* Note - in DWARF2 the return address column is an unsigned byte.
+	     In DWARF3 it is a ULEB128.  We are following DWARF3.  For most
+	     ports this will not matter as the value will be less than 128.
+	     For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
+	     which conforms to the DWARF3 standard.  */
 	  read_uleb128 (cie.ra_column, buf);
 	  ENSURE_NO_RELOCS (buf);
 	  cie.lsda_encoding = DW_EH_PE_omit;
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 99a66f4..263e9ac 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -811,7 +811,10 @@
 	      final_type = R_PARISC_PCREL14R;
 	      break;
 	    case e_fsel:
-	      final_type = R_PARISC_PCREL14F;
+	      if (bfd_get_mach (abfd) < 25)
+		final_type = R_PARISC_PCREL14F;
+	      else
+		final_type = R_PARISC_PCREL16F;
 	      break;
 	    default:
 	      return R_PARISC_NONE;
@@ -1296,22 +1299,22 @@
 	     address of the .plt + gp_offset.
 
 	     If no .plt is found, then look for .dlt, .opd and .data (in
-	     that order) and set __gp to the base address of whichever section
-	    is found first.  */
+	     that order) and set __gp to the base address of whichever
+	     section is found first.  */
 
 	  sec = hppa_info->plt_sec;
-	  if (sec)
+	  if (sec && ! (sec->flags & SEC_EXCLUDE))
 	    gp_val = (sec->output_offset
 		      + sec->output_section->vma
 		      + hppa_info->gp_offset);
 	  else
 	    {
 	      sec = hppa_info->dlt_sec;
-	      if (!sec)
+	      if (!sec || (sec->flags & SEC_EXCLUDE))
 		sec = hppa_info->opd_sec;
-	      if (!sec)
+	      if (!sec || (sec->flags & SEC_EXCLUDE))
 		sec = bfd_get_section_by_name (abfd, ".data");
-	      if (!sec)
+	      if (!sec || (sec->flags & SEC_EXCLUDE))
 		return false;
 
 	      gp_val = sec->output_offset + sec->output_section->vma;
@@ -1373,8 +1376,12 @@
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
-  struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info);
+  struct elf64_hppa_link_hash_table *hppa_info;
 
+  if (info->relocateable)
+    return true;
+
+  hppa_info = elf64_hppa_hash_table (info);
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
 
   rel = relocs;
@@ -1402,28 +1409,8 @@
 	  return false;
 	}
 
-      r_symndx = ELF_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)
-		{
-		  sym_sec = local_sections[r_symndx];
-		  rel->r_addend += sym_sec->output_offset;
-		}
-	    }
-
-	  continue;
-	}
-
       /* This is a final link.  */
+      r_symndx = ELF_R_SYM (rel->r_info);
       h = NULL;
       sym = NULL;
       sym_sec = NULL;
@@ -1609,8 +1596,7 @@
     case R_PARISC_NONE:
       break;
 
-    /* Basic function call support.  I'm not entirely sure if PCREL14F is
-       actually needed or even handled correctly.
+    /* Basic function call support.
 
        Note for a call to a function defined in another dynamic library
        we want to redirect the call to a stub.  */
@@ -2074,11 +2060,14 @@
 			hppa_info->opd_sec->contents + dyn_h->opd_offset + 24);
 	  }
 
-	/* We want the value of the OPD offset for this symbol, not
-	   the symbol's actual address.  */
-	value = (dyn_h->opd_offset
-		 + hppa_info->opd_sec->output_offset
-		 + hppa_info->opd_sec->output_section->vma);
+	if (dyn_h->want_opd)
+	  /* We want the value of the OPD offset for this symbol.  */
+	  value = (dyn_h->opd_offset
+		   + hppa_info->opd_sec->output_offset
+		   + hppa_info->opd_sec->output_section->vma);
+	else
+	  /* We want the address of the symbol.  */
+	  value += addend;
 
 	bfd_put_64 (input_bfd, value, hit_data);
 	return bfd_reloc_ok;
@@ -2179,24 +2168,27 @@
     case R_PARISC_DLTIND14R:
     case R_PARISC_DLTIND14F:
     case R_PARISC_LTOFF_FPTR14R:
-    case R_PARISC_LTOFF_FPTR16F:
     case R_PARISC_PCREL14R:
     case R_PARISC_PCREL14F:
-    case R_PARISC_PCREL16F:
     case R_PARISC_LTOFF_TP14R:
     case R_PARISC_LTOFF_TP14F:
-    case R_PARISC_LTOFF_TP16F:
     case R_PARISC_DPREL14R:
     case R_PARISC_DPREL14F:
-    case R_PARISC_GPREL16F:
     case R_PARISC_PLTOFF14R:
     case R_PARISC_PLTOFF14F:
-    case R_PARISC_PLTOFF16F:
     case R_PARISC_DIR14R:
     case R_PARISC_DIR14F:
+      return (insn & ~0x3fff) | low_sign_unext (sym_value, 14);
+
+    /* PA2.0W LDO and integer loads/stores with 16 bit displacements.  */
+    case R_PARISC_LTOFF_FPTR16F:
+    case R_PARISC_PCREL16F:
+    case R_PARISC_LTOFF_TP16F:
+    case R_PARISC_GPREL16F:
+    case R_PARISC_PLTOFF16F:
     case R_PARISC_DIR16F:
     case R_PARISC_LTOFF16F:
-      return (insn & ~0x3fff) | low_sign_unext (sym_value, 14);
+      return (insn & ~0xffff) | re_assemble_16 (sym_value);
 
     /* Doubleword loads and stores with a 14 bit displacement.  */
     case R_PARISC_DLTREL14DR:
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 4e8de60..37b832a 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -30,7 +30,7 @@
 static boolean mn10200_elf_relax_delete_bytes
   PARAMS ((bfd *, asection *, bfd_vma, int));
 static boolean mn10200_elf_symbol_address_p
-  PARAMS ((bfd *, asection *, bfd_vma));
+  PARAMS ((bfd *, asection *, Elf_Internal_Sym *, bfd_vma));
 static bfd_reloc_status_type mn10200_elf_final_link_relocate
   PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *,
 	   bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
@@ -45,10 +45,6 @@
   PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
 	   bfd_byte *, boolean, asymbol **));
 
-/* We have to use RELA instructions since md_apply_fix3 in the assembler
-   does absolutely nothing.  */
-#define USE_RELA
-
 enum reloc_type {
   R_MN10200_NONE = 0,
   R_MN10200_32,
@@ -508,15 +504,10 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* Assume nothing changes.  */
   *again = false;
@@ -536,7 +527,6 @@
     sec->_cooked_size = sec->_raw_size;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
 
   /* Get a copy of the native relocations.  */
   internal_relocs = (_bfd_elf32_link_read_relocs
@@ -544,8 +534,6 @@
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   /* Walk through them looking for relaxing opportunities.  */
   irelend = internal_relocs + sec->reloc_count;
@@ -572,7 +560,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -580,67 +567,35 @@
 	    }
 	}
 
-      /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
+      /* Read this BFD's local symbols if we haven't done so already.  */
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
 	{
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (bfd_byte *) extsyms;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (bfd_byte *) shndx_buf;
-	    }
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
 	  /* A local symbol.  */
-	  Elf32_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  Elf_Internal_Sym *isym;
 	  asection *sym_sec;
 
-	  esym = extsyms + ELF32_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-	  if (isym.st_shndx == SHN_UNDEF)
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
 	    sym_sec = bfd_und_section_ptr;
-	  else if (isym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    sym_sec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    sym_sec = bfd_com_section_ptr;
 	  else
-	    sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-	  symval = (isym.st_value
+	    sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	  symval = (isym->st_value
 		    + sym_sec->output_section->vma
 		    + sym_sec->output_offset);
 	}
@@ -701,12 +656,8 @@
 
 	      /* Note that we've changed the relocs, section contents, etc.  */
 	      elf_section_data (sec)->relocs = internal_relocs;
-	      free_relocs = NULL;
-
 	      elf_section_data (sec)->this_hdr.contents = contents;
-	      free_contents = NULL;
-
-	      free_extsyms = NULL;
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	      /* Fix the opcode.  */
 	      if (code == 0xe0)
@@ -758,12 +709,8 @@
 
 	      /* Note that we've changed the relocs, section contents, etc.  */
 	      elf_section_data (sec)->relocs = internal_relocs;
-	      free_relocs = NULL;
-
 	      elf_section_data (sec)->this_hdr.contents = contents;
-	      free_contents = NULL;
-
-	      free_extsyms = NULL;
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	      /* Fix the opcode.  */
 	      bfd_put_8 (abfd, 0xea, contents + irel->r_offset - 1);
@@ -848,17 +795,14 @@
 
 	  /* We also have to be sure there is no symbol/label
 	     at the unconditional branch.  */
-	  if (mn10200_elf_symbol_address_p (abfd, sec, irel->r_offset + 1))
+	  if (mn10200_elf_symbol_address_p (abfd, sec, isymbuf,
+					    irel->r_offset + 1))
 	    continue;
 
 	  /* Note that we've changed the relocs, section contents, etc.  */
 	  elf_section_data (sec)->relocs = internal_relocs;
-	  free_relocs = NULL;
-
 	  elf_section_data (sec)->this_hdr.contents = contents;
-	  free_contents = NULL;
-
-	  free_extsyms = NULL;
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	  /* Reverse the condition of the first branch.  */
 	  switch (code)
@@ -976,12 +920,8 @@
 
 		  /* Note that we've changed the reldection contents, etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  /* Fix the opcode.  */
 		  bfd_put_8 (abfd, 0xf8 + (code & 0x03),
@@ -1019,12 +959,8 @@
 		case 0xc8:
 		  /* Note that we've changed the reldection contents, etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  if ((code & 0xfc) == 0x74)
 		    code = 0xdc + (code & 0x03);
@@ -1106,12 +1042,8 @@
 
 		  /* Note that we've changed the reldection contents, etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  /* Fix the opcode.  */
 		  bfd_put_8 (abfd, 0xf7, contents + irel->r_offset - 2);
@@ -1169,12 +1101,8 @@
 		case 0xc4:
 		  /* Note that we've changed the reldection contents, etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  bfd_put_8 (abfd, 0xcc + (code & 0x03),
 			     contents + irel->r_offset - 2);
@@ -1204,13 +1132,23 @@
 	}
     }
 
-  if (free_relocs != NULL)
-    free (free_relocs);
-
-  if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
@@ -1218,38 +1156,22 @@
 	}
     }
 
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-
-  if (free_extsyms != NULL)
-    {
-      if (! link_info->keep_memory)
-	{
-	  symtab_hdr->contents = NULL;
-	  free (free_extsyms);
-	}
-    }
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-  if (free_extsyms != NULL)
-    {
-      symtab_hdr->contents = NULL;
-      free (free_extsyms);
-    }
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return false;
 }
@@ -1264,22 +1186,17 @@
      int count;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
   unsigned int sec_shndx;
   bfd_byte *contents;
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Rela *irelalign;
   bfd_vma toaddr;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
   contents = elf_section_data (sec)->this_hdr.contents;
@@ -1308,24 +1225,14 @@
     }
 
   /* Adjust the local symbols defined in this section.  */
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = extsyms;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-      Elf_External_Sym_Shndx dummy;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value > addr
-	  && isym.st_value < toaddr)
-	{
-	  isym.st_value -= count;
-	  bfd_elf32_swap_symbol_out (abfd, &isym, (PTR) esym, (PTR) &dummy);
-	}
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value > addr
+	  && isym->st_value < toaddr)
+	isym->st_value -= count;
     }
 
   /* Now adjust the global symbols defined in this section.  */
@@ -1352,36 +1259,27 @@
 /* Return true if a symbol exists at the given address, else return
    false.  */
 static boolean
-mn10200_elf_symbol_address_p (abfd, sec, addr)
+mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
      bfd *abfd;
      asection *sec;
+     Elf_Internal_Sym *isym;
      bfd_vma addr;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   unsigned int sec_shndx;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
 
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
-  /* Examine all the symbols.  */
+  /* Examine all the local symbols.  */
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = (Elf32_External_Sym *) symtab_hdr->contents;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value == addr)
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value == addr)
 	return true;
     }
 
@@ -1416,15 +1314,11 @@
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   asection *input_section = link_order->u.indirect.section;
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf32_External_Sym *external_syms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
@@ -1436,7 +1330,6 @@
 						       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
 
   memcpy (data, elf_section_data (input_section)->this_hdr.contents,
 	  (size_t) input_section->_raw_size);
@@ -1444,48 +1337,27 @@
   if ((input_section->flags & SEC_RELOC) != 0
       && input_section->reloc_count > 0)
     {
-      Elf_Internal_Sym *isymp;
+      Elf_Internal_Sym *isym;
+      Elf_Internal_Sym *isymend;
       asection **secpp;
-      Elf32_External_Sym *esym, *esymend;
       bfd_size_type amt;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else if (symtab_hdr->sh_info != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  external_syms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) external_syms, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
-      if (symtab_hdr->sh_info != 0 && shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
       internal_relocs = (_bfd_elf32_link_read_relocs
 			 (input_bfd, input_section, (PTR) NULL,
 			  (Elf_Internal_Rela *) NULL, false));
       if (internal_relocs == NULL)
 	goto error_return;
 
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (internal_syms == NULL && amt != 0)
-	goto error_return;
+      if (symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
 
       amt = symtab_hdr->sh_info;
       amt *= sizeof (asection *);
@@ -1493,58 +1365,48 @@
       if (sections == NULL && amt != 0)
 	goto error_return;
 
-      for (isymp = internal_syms, secpp = sections, shndx = shndx_buf,
-	     esym = external_syms, esymend = esym + symtab_hdr->sh_info;
-	   esym < esymend;
-	   ++esym, ++isymp, ++secpp, shndx = (shndx ? shndx + 1 : NULL))
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
-
-	  if (isymp->st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
-	  else if (isymp->st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    isec = bfd_abs_section_ptr;
-	  else if (isymp->st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    isec = bfd_com_section_ptr;
 	  else
-	    isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
+	    isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 	  *secpp = isec;
 	}
 
       if (! mn10200_elf_relocate_section (output_bfd, link_info, input_bfd,
 				     input_section, data, internal_relocs,
-				     internal_syms, sections))
+				     isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      if (internal_syms != NULL)
-	free (internal_syms);
-      if (shndx_buf != NULL)
-	free (shndx_buf);
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
-      if (internal_relocs != elf_section_data (input_section)->relocs)
+      if (isymbuf != NULL
+	  && symtab_hdr->contents != (unsigned char *) isymbuf)
+	free (isymbuf);
+      if (elf_section_data (input_section)->relocs != internal_relocs)
 	free (internal_relocs);
     }
 
   return data;
 
  error_return:
-  if (internal_relocs != NULL
-      && internal_relocs != elf_section_data (input_section)->relocs)
-    free (internal_relocs);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
   if (sections != NULL)
     free (sections);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (input_section)->relocs != internal_relocs)
+    free (internal_relocs);
   return NULL;
 }
 
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 40b4ad6..374e55e 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -122,22 +122,18 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *mn10300_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *info, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *info, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean mn10300_elf_relax_delete_bytes
   PARAMS ((bfd *, asection *, bfd_vma, int));
 static boolean mn10300_elf_symbol_address_p
-  PARAMS ((bfd *, asection *, bfd_vma));
+PARAMS ((bfd *, asection *, Elf_Internal_Sym *, bfd_vma));
 static boolean elf32_mn10300_finish_hash_table_entry
   PARAMS ((struct bfd_hash_entry *, PTR));
 static void compute_function_info
   PARAMS ((bfd *, struct elf32_mn10300_link_hash_entry *,
 	   bfd_vma, unsigned char *));
 
-/* We have to use RELA instructions since md_apply_fix3 in the assembler
-   does absolutely nothing.  */
-#define USE_RELA
-
 static reloc_howto_type elf_mn10300_howto_table[] = {
   /* Dummy relocation.  Does nothing.  */
   HOWTO (R_MN10300_NONE,
@@ -397,8 +393,8 @@
    relocation.  */
 
 static asection *
-mn10300_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+mn10300_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -428,9 +424,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -785,16 +779,12 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   struct elf32_mn10300_link_hash_table *hash_table;
+  asection *section = sec;
 
   /* Assume nothing changes.  */
   *again = false;
@@ -812,42 +802,16 @@
 	   input_bfd != NULL;
 	   input_bfd = input_bfd->link_next)
 	{
-	  asection *section;
-
 	  /* We're going to need all the symbols for each bfd.  */
 	  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-	  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
+	  if (symtab_hdr->sh_info != 0)
 	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, input_bfd) != amt)
-		goto error_return;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == NULL)
 		goto error_return;
 	    }
 
@@ -877,7 +841,6 @@
 		  contents = (bfd_byte *) bfd_malloc (section->_raw_size);
 		  if (contents == NULL)
 		    goto error_return;
-		  free_contents = contents;
 
 		  if (!bfd_get_section_contents (input_bfd, section,
 						 contents, (file_ptr) 0,
@@ -885,10 +848,7 @@
 		    goto error_return;
 		}
 	      else
-		{
-		  contents = NULL;
-		  free_contents = NULL;
-		}
+		contents = NULL;
 
 	      /* If there aren't any relocs, then there's nothing to do.  */
 	      if ((section->flags & SEC_RELOC) != 0
@@ -902,8 +862,6 @@
 				      link_info->keep_memory));
 		  if (internal_relocs == NULL)
 		    goto error_return;
-		  if (! link_info->keep_memory)
-		    free_relocs = internal_relocs;
 
 		  /* Now examine each relocation.  */
 		  irel = internal_relocs;
@@ -929,38 +887,31 @@
 		      if (r_index < symtab_hdr->sh_info)
 			{
 			  /* A local symbol.  */
-			  Elf32_External_Sym *esym;
-			  Elf_External_Sym_Shndx *shndx;
-			  Elf_Internal_Sym isym;
+			  Elf_Internal_Sym *isym;
 			  struct elf_link_hash_table *elftab;
 			  bfd_size_type amt;
 
-			  esym = extsyms + r_index;
-			  shndx = shndx_buf + (shndx_buf ? r_index : 0);
-			  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx,
-						    &isym);
-
-			  if (isym.st_shndx == SHN_UNDEF)
+			  isym = isymbuf + r_index;
+			  if (isym->st_shndx == SHN_UNDEF)
 			    sym_sec = bfd_und_section_ptr;
-			  else if (isym.st_shndx == SHN_ABS)
+			  else if (isym->st_shndx == SHN_ABS)
 			    sym_sec = bfd_abs_section_ptr;
-			  else if (isym.st_shndx == SHN_COMMON)
+			  else if (isym->st_shndx == SHN_COMMON)
 			    sym_sec = bfd_com_section_ptr;
 			  else
 			    sym_sec
 			      = bfd_section_from_elf_index (input_bfd,
-							    isym.st_shndx);
+							    isym->st_shndx);
 
 			  sym_name
 			    = bfd_elf_string_from_elf_section (input_bfd,
 							       (symtab_hdr
 								->sh_link),
-							       isym.st_name);
+							       isym->st_name);
 
 			  /* If it isn't a function, then we don't care
 			     about it.  */
-			  if (r_index < symtab_hdr->sh_info
-			      && ELF_ST_TYPE (isym.st_info) != STT_FUNC)
+			  if (ELF_ST_TYPE (isym->st_info) != STT_FUNC)
 			    continue;
 
 			  /* Tack on an ID so we can uniquely identify this
@@ -995,8 +946,9 @@
 		      if (code != 0xdd && code != 0xcd)
 			hash->flags |= MN10300_CONVERT_CALL_TO_CALLS;
 
-		      /* If this is a jump/call, then bump the direct_calls
-			 counter.  Else force "call" to "calls" conversions.  */
+		      /* If this is a jump/call, then bump the
+			 direct_calls counter.  Else force "call" to
+			 "calls" conversions.  */
 		      if (r_type == R_MN10300_PCREL32
 			  || r_type == R_MN10300_PCREL16)
 			hash->direct_calls++;
@@ -1010,45 +962,40 @@
 		 (ie movm_args).  */
 	      if ((section->flags & SEC_CODE) != 0)
 		{
-
-		  Elf32_External_Sym *esym, *esymend;
-		  Elf_External_Sym_Shndx *shndx;
-		  int idx;
+		  Elf_Internal_Sym *isym, *isymend;
 		  unsigned int sec_shndx;
+		  struct elf_link_hash_entry **hashes;
+		  struct elf_link_hash_entry **end_hashes;
+		  unsigned int symcount;
 
 		  sec_shndx = _bfd_elf_section_from_bfd_section (input_bfd,
 								 section);
 
 		  /* Look at each function defined in this section and
 		     update info for that function.  */
-		  for (esym = extsyms, esymend = esym + symtab_hdr->sh_info,
-			 shndx = shndx_buf;
-		       esym < esymend;
-		       esym++, shndx = (shndx ? shndx + 1 : NULL))
+		  isymend = isymbuf + symtab_hdr->sh_info;
+		  for (isym = isymbuf; isym < isymend; isym++)
 		    {
-		      Elf_Internal_Sym isym;
-
-		      bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, &isym);
-		      if (isym.st_shndx == sec_shndx
-			  && ELF_ST_TYPE (isym.st_info) == STT_FUNC)
+		      if (isym->st_shndx == sec_shndx
+			  && ELF_ST_TYPE (isym->st_info) == STT_FUNC)
 			{
 			  struct elf_link_hash_table *elftab;
 			  bfd_size_type amt;
 
-			  if (isym.st_shndx == SHN_UNDEF)
+			  if (isym->st_shndx == SHN_UNDEF)
 			    sym_sec = bfd_und_section_ptr;
-			  else if (isym.st_shndx == SHN_ABS)
+			  else if (isym->st_shndx == SHN_ABS)
 			    sym_sec = bfd_abs_section_ptr;
-			  else if (isym.st_shndx == SHN_COMMON)
+			  else if (isym->st_shndx == SHN_COMMON)
 			    sym_sec = bfd_com_section_ptr;
 			  else
 			    sym_sec
 			      = bfd_section_from_elf_index (input_bfd,
-							    isym.st_shndx);
+							    isym->st_shndx);
 
 			  sym_name = (bfd_elf_string_from_elf_section
 				      (input_bfd, symtab_hdr->sh_link,
-				       isym.st_name));
+				       isym->st_name));
 
 			  /* Tack on an ID so we can uniquely identify this
 			     local symbol in the global hash table.  */
@@ -1067,23 +1014,21 @@
 							true, true, false));
 			  free (new_name);
 			  compute_function_info (input_bfd, hash,
-						 isym.st_value, contents);
+						 isym->st_value, contents);
 			}
 		    }
 
-		  esym = extsyms + symtab_hdr->sh_info;
-		  esymend = extsyms + (symtab_hdr->sh_size
-				       / sizeof (Elf32_External_Sym));
-		  for (idx = 0; esym < esymend; esym++, idx++)
+		  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+			      - symtab_hdr->sh_info);
+		  hashes = elf_sym_hashes (abfd);
+		  end_hashes = hashes + symcount;
+		  for (; hashes < end_hashes; hashes++)
 		    {
-		      Elf_Internal_Sym isym;
-
-		      hash = (struct elf32_mn10300_link_hash_entry *)
-			       elf_sym_hashes (input_bfd)[idx];
+		      hash = (struct elf32_mn10300_link_hash_entry *) *hashes;
 		      if ((hash->root.root.type == bfd_link_hash_defined
 			   || hash->root.root.type == bfd_link_hash_defweak)
 			  && hash->root.root.u.def.section == section
-			  && ELF_ST_TYPE (isym.st_info) == STT_FUNC)
+			  && ELF_ST_TYPE (isym->st_info) == STT_FUNC)
 			compute_function_info (input_bfd, hash,
 					       (hash)->root.root.u.def.value,
 					       contents);
@@ -1091,44 +1036,39 @@
 		}
 
 	      /* Cache or free any memory we allocated for the relocs.  */
-	      if (free_relocs != NULL)
-		{
-		  free (free_relocs);
-		  free_relocs = NULL;
-		}
+	      if (internal_relocs != NULL
+		  && elf_section_data (section)->relocs != internal_relocs)
+		free (internal_relocs);
+	      internal_relocs = NULL;
 
 	      /* Cache or free any memory we allocated for the contents.  */
-	      if (free_contents != NULL)
+	      if (contents != NULL
+		  && elf_section_data (section)->this_hdr.contents != contents)
 		{
 		  if (! link_info->keep_memory)
-		    free (free_contents);
+		    free (contents);
 		  else
 		    {
 		      /* Cache the section contents for elf_link_input_bfd.  */
 		      elf_section_data (section)->this_hdr.contents = contents;
 		    }
-		  free_contents = NULL;
 		}
-	    }
-
-	  if (shndx_buf != NULL)
-	    {
-	      free (shndx_buf);
-	      shndx_buf = NULL;
+	      contents = NULL;
 	    }
 
 	  /* Cache or free any memory we allocated for the symbols.  */
-	  if (free_extsyms != NULL)
+	  if (isymbuf != NULL
+	      && symtab_hdr->contents != (unsigned char *) isymbuf)
 	    {
 	      if (! link_info->keep_memory)
-		free (free_extsyms);
+		free (isymbuf);
 	      else
 		{
 		  /* Cache the symbols for elf_link_input_bfd.  */
-		  symtab_hdr->contents = (unsigned char *) extsyms;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 		}
-	      free_extsyms = NULL;
 	    }
+	  isymbuf = NULL;
 	}
 
       /* Now iterate on each symbol in the hash table and perform
@@ -1151,45 +1091,17 @@
 	   input_bfd != NULL;
 	   input_bfd = input_bfd->link_next)
 	{
-	  asection *section;
-
 	  /* We're going to need all the local symbols for each bfd.  */
 	  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-	  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
+	  if (symtab_hdr->sh_info != 0)
 	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == NULL)
 		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, input_bfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (bfd_byte *) extsyms;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (bfd_byte *) shndx_buf;
 	    }
 
 	  /* Walk over each section in this bfd.  */
@@ -1198,9 +1110,10 @@
 	       section = section->next)
 	    {
 	      unsigned int sec_shndx;
-	      Elf32_External_Sym *esym, *esymend;
-	      Elf_External_Sym_Shndx *shndx;
-	      unsigned int idx;
+	      Elf_Internal_Sym *isym, *isymend;
+	      struct elf_link_hash_entry **hashes;
+	      struct elf_link_hash_entry **end_hashes;
+	      unsigned int symcount;
 
 	      /* Skip non-code sections and empty sections.  */
 	      if ((section->flags & SEC_CODE) == 0 || section->_raw_size == 0)
@@ -1215,8 +1128,6 @@
 				      link_info->keep_memory));
 		  if (internal_relocs == NULL)
 		    goto error_return;
-		  if (! link_info->keep_memory)
-		    free_relocs = internal_relocs;
 		}
 
 	      /* Get cached copy of section contents if it exists.  */
@@ -1228,7 +1139,6 @@
 		  contents = (bfd_byte *) bfd_malloc (section->_raw_size);
 		  if (contents == NULL)
 		    goto error_return;
-		  free_contents = contents;
 
 		  if (!bfd_get_section_contents (input_bfd, section,
 						 contents, (file_ptr) 0,
@@ -1241,12 +1151,9 @@
 
 	      /* Now look for any function in this section which needs
 		 insns deleted from its prologue.  */
-	      for (esym = extsyms, esymend = esym + symtab_hdr->sh_info,
-		     shndx = shndx_buf;
-		   esym < esymend;
-		   esym++, shndx = (shndx ? shndx + 1 : NULL))
+	      isymend = isymbuf + symtab_hdr->sh_info;
+	      for (isym = isymbuf; isym < isymend; isym++)
 		{
-		  Elf_Internal_Sym isym;
 		  struct elf32_mn10300_link_hash_entry *sym_hash;
 		  asection *sym_sec = NULL;
 		  const char *sym_name;
@@ -1254,25 +1161,23 @@
 		  struct elf_link_hash_table *elftab;
 		  bfd_size_type amt;
 
-		  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, &isym);
-
-		  if (isym.st_shndx != sec_shndx)
+		  if (isym->st_shndx != sec_shndx)
 		    continue;
 
-		  if (isym.st_shndx == SHN_UNDEF)
+		  if (isym->st_shndx == SHN_UNDEF)
 		    sym_sec = bfd_und_section_ptr;
-		  else if (isym.st_shndx == SHN_ABS)
+		  else if (isym->st_shndx == SHN_ABS)
 		    sym_sec = bfd_abs_section_ptr;
-		  else if (isym.st_shndx == SHN_COMMON)
+		  else if (isym->st_shndx == SHN_COMMON)
 		    sym_sec = bfd_com_section_ptr;
 		  else
 		    sym_sec
-		      = bfd_section_from_elf_index (input_bfd, isym.st_shndx);
+		      = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 		  sym_name
 		    = bfd_elf_string_from_elf_section (input_bfd,
 						       symtab_hdr->sh_link,
-						       isym.st_name);
+						       isym->st_name);
 
 		  /* Tack on an ID so we can uniquely identify this
 		     local symbol in the global hash table.  */
@@ -1299,12 +1204,8 @@
 
 		      /* Note that we've changed things.  */
 		      elf_section_data (section)->relocs = internal_relocs;
-		      free_relocs = NULL;
-
 		      elf_section_data (section)->this_hdr.contents = contents;
-		      free_contents = NULL;
-
-		      free_extsyms = NULL;
+		      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		      /* Count how many bytes we're going to delete.  */
 		      if (sym_hash->movm_args)
@@ -1323,7 +1224,7 @@
 		      /* Actually delete the bytes.  */
 		      if (!mn10300_elf_relax_delete_bytes (input_bfd,
 							   section,
-							   isym.st_value,
+							   isym->st_value,
 							   bytes))
 			goto error_return;
 
@@ -1335,15 +1236,15 @@
 
 	      /* Look for any global functions in this section which
 		 need insns deleted from their prologues.  */
-	      for (idx = 0;
-		   idx < (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+	      symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
 			  - symtab_hdr->sh_info);
-		   idx++)
+	      hashes = elf_sym_hashes (abfd);
+	      end_hashes = hashes + symcount;
+	      for (; hashes < end_hashes; hashes++)
 		{
 		  struct elf32_mn10300_link_hash_entry *sym_hash;
 
-		  sym_hash = (struct elf32_mn10300_link_hash_entry *)
-			       (elf_sym_hashes (input_bfd)[idx]);
+		  sym_hash = (struct elf32_mn10300_link_hash_entry *) *hashes;
 		  if ((sym_hash->root.root.type == bfd_link_hash_defined
 		       || sym_hash->root.root.type == bfd_link_hash_defweak)
 		      && sym_hash->root.root.u.def.section == section
@@ -1355,12 +1256,8 @@
 
 		      /* Note that we've changed things.  */
 		      elf_section_data (section)->relocs = internal_relocs;
-		      free_relocs = NULL;
-
 		      elf_section_data (section)->this_hdr.contents = contents;
-		      free_contents = NULL;
-
-		      free_extsyms = NULL;
+		      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		      /* Count how many bytes we're going to delete.  */
 		      if (sym_hash->movm_args)
@@ -1391,53 +1288,48 @@
 		}
 
 	      /* Cache or free any memory we allocated for the relocs.  */
-	      if (free_relocs != NULL)
-		{
-		  free (free_relocs);
-		  free_relocs = NULL;
-		}
+	      if (internal_relocs != NULL
+		  && elf_section_data (section)->relocs != internal_relocs)
+		free (internal_relocs);
+	      internal_relocs = NULL;
 
 	      /* Cache or free any memory we allocated for the contents.  */
-	      if (free_contents != NULL)
+	      if (contents != NULL
+		  && elf_section_data (section)->this_hdr.contents != contents)
 		{
 		  if (! link_info->keep_memory)
-		    free (free_contents);
+		    free (contents);
 		  else
 		    {
 		      /* Cache the section contents for elf_link_input_bfd.  */
 		      elf_section_data (section)->this_hdr.contents = contents;
 		    }
-		  free_contents = NULL;
 		}
-	    }
-
-	  if (shndx_buf != NULL)
-	    {
-	      shndx_hdr->contents = NULL;
-	      free (shndx_buf);
-	      shndx_buf = NULL;
+	      contents = NULL;
 	    }
 
 	  /* Cache or free any memory we allocated for the symbols.  */
-	  if (free_extsyms != NULL)
+	  if (isymbuf != NULL
+	      && symtab_hdr->contents != (unsigned char *) isymbuf)
 	    {
 	      if (! link_info->keep_memory)
+		free (isymbuf);
+	      else
 		{
-		  symtab_hdr->contents = NULL;
-		  free (free_extsyms);
+		  /* Cache the symbols for elf_link_input_bfd.  */
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 		}
-	      free_extsyms = NULL;
 	    }
+	  isymbuf = NULL;
 	}
     }
 
   /* (Re)initialize for the basic instruction shortening/relaxing pass.  */
   contents = NULL;
-  extsyms = NULL;
   internal_relocs = NULL;
-  free_relocs = NULL;
-  free_contents = NULL;
-  free_extsyms = NULL;
+  isymbuf = NULL;
+  /* For error_return.  */
+  section = sec;
 
   /* We don't have to do anything for a relocateable link, if
      this section does not have relocs, or if this is not a
@@ -1454,7 +1346,6 @@
     sec->_cooked_size = sec->_raw_size;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
 
   /* Get a copy of the native relocations.  */
   internal_relocs = (_bfd_elf32_link_read_relocs
@@ -1462,8 +1353,6 @@
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   /* Walk through them looking for relaxing opportunities.  */
   irelend = internal_relocs + sec->reloc_count;
@@ -1491,7 +1380,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -1499,75 +1387,43 @@
 	    }
 	}
 
-      /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
+      /* Read this BFD's symbols if we haven't done so already.  */ 
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
 	{
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (bfd_byte *) extsyms;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (bfd_byte *) shndx_buf;
-	    }
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-	  Elf32_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  Elf_Internal_Sym *isym;
 	  asection *sym_sec = NULL;
 	  const char *sym_name;
 	  char *new_name;
 
 	  /* A local symbol.  */
-	  esym = extsyms + ELF32_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-	  if (isym.st_shndx == SHN_UNDEF)
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
 	    sym_sec = bfd_und_section_ptr;
-	  else if (isym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    sym_sec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    sym_sec = bfd_com_section_ptr;
 	  else
-	    sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	    sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 
-	  symval = (isym.st_value
+	  symval = (isym->st_value
 		    + sym_sec->output_section->vma
 		    + sym_sec->output_offset);
 	  sym_name = bfd_elf_string_from_elf_section (abfd,
 						      symtab_hdr->sh_link,
-						      isym.st_name);
+						      isym->st_name);
 
 	  /* Tack on an ID so we can uniquely identify this
 	     local symbol in the global hash table.  */
@@ -1635,12 +1491,8 @@
 		  /* Note that we've changed the relocs, section contents,
 		     etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  /* Fix the opcode.  */
 		  bfd_put_8 (abfd, 0xfc, contents + irel->r_offset - 1);
@@ -1699,12 +1551,8 @@
 
 	      /* Note that we've changed the relocs, section contents, etc.  */
 	      elf_section_data (sec)->relocs = internal_relocs;
-	      free_relocs = NULL;
-
 	      elf_section_data (sec)->this_hdr.contents = contents;
-	      free_contents = NULL;
-
-	      free_extsyms = NULL;
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	      /* Fix the opcode.  */
 	      if (code == 0xdc)
@@ -1750,12 +1598,8 @@
 		  /* Note that we've changed the relocs, section contents,
 		     etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  /* Fix the opcode.  */
 		  bfd_put_8 (abfd, 0xfa, contents + irel->r_offset - 1);
@@ -1812,12 +1656,8 @@
 
 	      /* Note that we've changed the relocs, section contents, etc.  */
 	      elf_section_data (sec)->relocs = internal_relocs;
-	      free_relocs = NULL;
-
 	      elf_section_data (sec)->this_hdr.contents = contents;
-	      free_contents = NULL;
-
-	      free_extsyms = NULL;
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	      /* Fix the opcode.  */
 	      bfd_put_8 (abfd, 0xca, contents + irel->r_offset - 1);
@@ -1901,17 +1741,14 @@
 
 	  /* We also have to be sure there is no symbol/label
 	     at the unconditional branch.  */
-	  if (mn10300_elf_symbol_address_p (abfd, sec, irel->r_offset + 1))
+	  if (mn10300_elf_symbol_address_p (abfd, sec, isymbuf,
+					    irel->r_offset + 1))
 	    continue;
 
 	  /* Note that we've changed the relocs, section contents, etc.  */
 	  elf_section_data (sec)->relocs = internal_relocs;
-	  free_relocs = NULL;
-
 	  elf_section_data (sec)->this_hdr.contents = contents;
-	  free_contents = NULL;
-
-	  free_extsyms = NULL;
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	  /* Reverse the condition of the first branch.  */
 	  switch (code)
@@ -2019,12 +1856,8 @@
 			  /* Note that we've changed the relocation contents,
 			     etc.  */
 			  elf_section_data (sec)->relocs = internal_relocs;
-			  free_relocs = NULL;
-
 			  elf_section_data (sec)->this_hdr.contents = contents;
-			  free_contents = NULL;
-
-			  free_extsyms = NULL;
+			  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 			  /* Fix the opcode.  */
 			  bfd_put_8 (abfd, 0xfb, contents + irel->r_offset - 3);
@@ -2094,12 +1927,8 @@
 			  /* Note that we've changed the relocation contents,
 			     etc.  */
 			  elf_section_data (sec)->relocs = internal_relocs;
-			  free_relocs = NULL;
-
 			  elf_section_data (sec)->this_hdr.contents = contents;
-			  free_contents = NULL;
-
-			  free_extsyms = NULL;
+			  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 			  /* Fix the opcode.  */
 			  bfd_put_8 (abfd, 0xfd, contents + irel->r_offset - 3);
@@ -2177,12 +2006,8 @@
 
 		    /* Note that we've changed the relocation contents, etc.  */
 		    elf_section_data (sec)->relocs = internal_relocs;
-		    free_relocs = NULL;
-
 		    elf_section_data (sec)->this_hdr.contents = contents;
-		    free_contents = NULL;
-
-		    free_extsyms = NULL;
+		    symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		    /* Fix the opcode.  */
 		    bfd_put_8 (abfd, 0xfa, contents + irel->r_offset - 2);
@@ -2214,12 +2039,8 @@
 		  case 0x83:
 		    /* Note that we've changed the relocation contents, etc.  */
 		    elf_section_data (sec)->relocs = internal_relocs;
-		    free_relocs = NULL;
-
 		    elf_section_data (sec)->this_hdr.contents = contents;
-		    free_contents = NULL;
-
-		    free_extsyms = NULL;
+		    symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		    if ((code & 0xf3) == 0x81)
 		      code = 0x01 + (code & 0x0c);
@@ -2268,12 +2089,8 @@
 
 		    /* Note that we've changed the relocation contents, etc.  */
 		    elf_section_data (sec)->relocs = internal_relocs;
-		    free_relocs = NULL;
-
 		    elf_section_data (sec)->this_hdr.contents = contents;
-		    free_contents = NULL;
-
-		    free_extsyms = NULL;
+		    symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		    /* Fix the opcode.  */
 		    bfd_put_8 (abfd, 0xfa, contents + irel->r_offset - 2);
@@ -2320,12 +2137,8 @@
 
 		    /* Note that we've changed the relocation contents, etc.  */
 		    elf_section_data (sec)->relocs = internal_relocs;
-		    free_relocs = NULL;
-
 		    elf_section_data (sec)->this_hdr.contents = contents;
-		    free_contents = NULL;
-
-		    free_extsyms = NULL;
+		    symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		    if ((code & 0xfc) == 0xcc)
 		      code = 0x2c + (code & 0x03);
@@ -2401,12 +2214,8 @@
 
 		    /* Note that we've changed the relocation contents, etc.  */
 		    elf_section_data (sec)->relocs = internal_relocs;
-		    free_relocs = NULL;
-
 		    elf_section_data (sec)->this_hdr.contents = contents;
-		    free_contents = NULL;
-
-		    free_extsyms = NULL;
+		    symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		    /* Fix the opcode.  */
 		    bfd_put_8 (abfd, 0xfa, contents + irel->r_offset - 2);
@@ -2432,12 +2241,8 @@
 
 		  /* Note that we've changed the relocation contents, etc.  */
 		  elf_section_data (sec)->relocs = internal_relocs;
-		  free_relocs = NULL;
-
 		  elf_section_data (sec)->this_hdr.contents = contents;
-		  free_contents = NULL;
-
-		  free_extsyms = NULL;
+		  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		  /* Fix the opcode.  */
 		  bfd_put_8 (abfd, 0xfa, contents + irel->r_offset - 2);
@@ -2461,13 +2266,23 @@
 	}
     }
 
-  if (free_relocs != NULL)
-    free (free_relocs);
-
-  if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
@@ -2475,38 +2290,22 @@
 	}
     }
 
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-
-  if (free_extsyms != NULL)
-    {
-      if (! link_info->keep_memory)
-	{
-	  symtab_hdr->contents = NULL;
-	  free (free_extsyms);
-	}
-    }
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-  if (free_extsyms != NULL)
-    {
-      symtab_hdr->contents = NULL;
-      free (free_extsyms);
-    }
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (section)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (section)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return false;
 }
@@ -2621,22 +2420,16 @@
      int count;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
   unsigned int sec_shndx;
   bfd_byte *contents;
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Rela *irelalign;
   bfd_vma toaddr;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isym, *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
   contents = elf_section_data (sec)->this_hdr.contents;
@@ -2665,24 +2458,14 @@
     }
 
   /* Adjust the local symbols defined in this section.  */
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = extsyms;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-      Elf_External_Sym_Shndx dummy;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value > addr
-	  && isym.st_value < toaddr)
-	{
-	  isym.st_value -= count;
-	  bfd_elf32_swap_symbol_out (abfd, &isym, (PTR) esym, (PTR) &dummy);
-	}
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value > addr
+	  && isym->st_value < toaddr)
+	isym->st_value -= count;
     }
 
   /* Now adjust the global symbols defined in this section.  */
@@ -2709,16 +2492,15 @@
 /* Return true if a symbol exists at the given address, else return
    false.  */
 static boolean
-mn10300_elf_symbol_address_p (abfd, sec, addr)
+mn10300_elf_symbol_address_p (abfd, sec, isym, addr)
      bfd *abfd;
      asection *sec;
+     Elf_Internal_Sym *isym;
      bfd_vma addr;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   unsigned int sec_shndx;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
@@ -2727,18 +2509,10 @@
 
   /* Examine all the symbols.  */
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = (Elf32_External_Sym *) symtab_hdr->contents;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value == addr)
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value == addr)
 	return true;
     }
 
@@ -2773,15 +2547,11 @@
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   asection *input_section = link_order->u.indirect.section;
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf32_External_Sym *external_syms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
@@ -2793,7 +2563,6 @@
 						       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
 
   memcpy (data, elf_section_data (input_section)->this_hdr.contents,
 	  (size_t) input_section->_raw_size);
@@ -2801,48 +2570,26 @@
   if ((input_section->flags & SEC_RELOC) != 0
       && input_section->reloc_count > 0)
     {
-      Elf_Internal_Sym *isymp;
       asection **secpp;
-      Elf32_External_Sym *esym, *esymend;
+      Elf_Internal_Sym *isym, *isymend;
       bfd_size_type amt;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else if (symtab_hdr->sh_info != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  external_syms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) external_syms, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
-      if (symtab_hdr->sh_info != 0 && shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
       internal_relocs = (_bfd_elf32_link_read_relocs
 			 (input_bfd, input_section, (PTR) NULL,
 			  (Elf_Internal_Rela *) NULL, false));
       if (internal_relocs == NULL)
 	goto error_return;
 
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (internal_syms == NULL && amt != 0)
-	goto error_return;
+      if (symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
 
       amt = symtab_hdr->sh_info;
       amt *= sizeof (asection *);
@@ -2850,40 +2597,32 @@
       if (sections == NULL && amt != 0)
 	goto error_return;
 
-      for (isymp = internal_syms, secpp = sections, shndx = shndx_buf,
-	     esym = external_syms, esymend = esym + symtab_hdr->sh_info;
-	   esym < esymend;
-	   ++esym, ++isymp, ++secpp, shndx = (shndx ? shndx + 1 : NULL))
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
-
-	  if (isymp->st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
-	  else if (isymp->st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    isec = bfd_abs_section_ptr;
-	  else if (isymp->st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    isec = bfd_com_section_ptr;
 	  else
-	    isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
+	    isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 	  *secpp = isec;
 	}
 
       if (! mn10300_elf_relocate_section (output_bfd, link_info, input_bfd,
 				     input_section, data, internal_relocs,
-				     internal_syms, sections))
+				     isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      if (internal_syms != NULL)
-	free (internal_syms);
-      if (shndx_buf != NULL)
-	free (shndx_buf);
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
+      if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+	free (isymbuf);
       if (internal_relocs != elf_section_data (input_section)->relocs)
 	free (internal_relocs);
     }
@@ -2891,17 +2630,13 @@
   return data;
 
  error_return:
+  if (sections != NULL)
+    free (sections);
+  if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
   if (internal_relocs != NULL
       && internal_relocs != elf_section_data (input_section)->relocs)
     free (internal_relocs);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
-  if (sections != NULL)
-    free (sections);
   return NULL;
 }
 
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index ff7d9a4..7a993c2 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -1,28 +1,29 @@
 /* ELF strtab with GC and suffix merging support.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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 "hashtab.h"
+#include "libiberty.h"
 
 /* An entry in the strtab hash table.  */
 
@@ -351,7 +352,7 @@
 
   qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
 
-  last4tab = htab_create (size * 4, NULL, last4_eq, NULL);
+  last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free);
   if (last4tab == NULL)
     goto alloc_failure;
 
diff --git a/bfd/elf.c b/bfd/elf.c
index 30814ae..71763d4 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -15,11 +15,11 @@
    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
+   along with this program; if not, write to the Free Software 
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /*  SECTION
-    
+
 	ELF backends
 
 	BFD support for ELF formats is being worked on.
@@ -50,10 +50,10 @@
 static boolean swap_out_syms PARAMS ((bfd *, struct bfd_strtab_hash **, int));
 static boolean copy_private_bfd_data PARAMS ((bfd *, bfd *));
 static char *elf_read PARAMS ((bfd *, file_ptr, bfd_size_type));
+static const char *group_signature PARAMS ((bfd *, Elf_Internal_Shdr *));
 static boolean setup_group PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
 static void merge_sections_remove_hook PARAMS ((bfd *, asection *));
 static void elf_fake_sections PARAMS ((bfd *, asection *, PTR));
-static void set_group_contents PARAMS ((bfd *, asection *, PTR));
 static boolean assign_section_numbers PARAMS ((bfd *));
 static INLINE int sym_is_global PARAMS ((bfd *, asymbol *));
 static boolean elf_map_symbols PARAMS ((bfd *));
@@ -352,6 +352,107 @@
   return ((char *) hdr->contents) + strindex;
 }
 
+/* Read and convert symbols to internal format.
+   SYMCOUNT specifies the number of symbols to read, starting from
+   symbol SYMOFFSET.  If any of INTSYM_BUF, EXTSYM_BUF or EXTSHNDX_BUF
+   are non-NULL, they are used to store the internal symbols, external
+   symbols, and symbol section index extensions, respectively.  */
+
+Elf_Internal_Sym *
+bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
+		      intsym_buf, extsym_buf, extshndx_buf)
+     bfd *ibfd;
+     Elf_Internal_Shdr *symtab_hdr;
+     size_t symcount;
+     size_t symoffset;
+     Elf_Internal_Sym *intsym_buf;
+     PTR extsym_buf;
+     Elf_External_Sym_Shndx *extshndx_buf;
+{
+  Elf_Internal_Shdr *shndx_hdr;
+  PTR alloc_ext;
+  const bfd_byte *esym;
+  Elf_External_Sym_Shndx *alloc_extshndx;
+  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
+  struct elf_backend_data *bed;
+  size_t extsym_size;
+  bfd_size_type amt;
+  file_ptr pos;
+
+  if (symcount == 0)
+    return intsym_buf;
+
+  /* Normal syms might have section extension entries.  */
+  shndx_hdr = NULL;
+  if (symtab_hdr == &elf_tdata (ibfd)->symtab_hdr)
+    shndx_hdr = &elf_tdata (ibfd)->symtab_shndx_hdr;
+
+  /* Read the symbols.  */
+  alloc_ext = NULL;
+  alloc_extshndx = NULL;
+  bed = get_elf_backend_data (ibfd);
+  extsym_size = bed->s->sizeof_sym;
+  amt = symcount * extsym_size;
+  pos = symtab_hdr->sh_offset + symoffset * extsym_size;
+  if (extsym_buf == NULL)
+    {
+      alloc_ext = bfd_malloc (amt);
+      extsym_buf = alloc_ext;
+    }
+  if (extsym_buf == NULL
+      || bfd_seek (ibfd, pos, SEEK_SET) != 0
+      || bfd_bread (extsym_buf, amt, ibfd) != amt)
+    {
+      intsym_buf = NULL;
+      goto out;
+    }
+
+  if (shndx_hdr == NULL || shndx_hdr->sh_size == 0)
+    extshndx_buf = NULL;
+  else
+    {
+      amt = symcount * sizeof (Elf_External_Sym_Shndx);
+      pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx);
+      if (extshndx_buf == NULL)
+	{
+	  alloc_extshndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+	  extshndx_buf = alloc_extshndx;
+	}
+      if (extshndx_buf == NULL
+	  || bfd_seek (ibfd, pos, SEEK_SET) != 0
+	  || bfd_bread (extshndx_buf, amt, ibfd) != amt)
+	{
+	  intsym_buf = NULL;
+	  goto out;
+	}
+    }
+
+  if (intsym_buf == NULL)
+    {
+      bfd_size_type amt = symcount * sizeof (Elf_Internal_Sym);
+      intsym_buf = (Elf_Internal_Sym *) bfd_malloc (amt);
+      if (intsym_buf == NULL)
+	goto out;
+    }
+
+  /* Convert the symbols to internal form.  */
+  isymend = intsym_buf + symcount;
+  for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf;
+       isym < isymend;
+       esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL)
+    (*bed->s->swap_symbol_in) (ibfd, esym, (const PTR) shndx, isym);
+
+ out:
+  if (alloc_ext != NULL)
+    free (alloc_ext);
+  if (alloc_extshndx != NULL)
+    free (alloc_extshndx);
+
+  return intsym_buf;
+}
+
 /* Elf_Internal_Shdr->contents is an array of these for SHT_GROUP
    sections.  The first element is the flags, the rest are section
    pointers.  */
@@ -361,6 +462,43 @@
   unsigned int flags;
 } Elf_Internal_Group;
 
+/* Return the name of the group signature symbol.  Why isn't the
+   signature just a string?  */
+
+static const char *
+group_signature (abfd, ghdr)
+     bfd *abfd;
+     Elf_Internal_Shdr *ghdr;
+{
+  Elf_Internal_Shdr *hdr;
+  unsigned char esym[sizeof (Elf64_External_Sym)];
+  Elf_External_Sym_Shndx eshndx;
+  Elf_Internal_Sym isym;
+  unsigned int iname;
+  unsigned int shindex;
+
+  /* First we need to ensure the symbol table is available.  */
+  if (! bfd_section_from_shdr (abfd, ghdr->sh_link))
+    return NULL;
+
+  /* Go read the symbol.  */
+  hdr = &elf_tdata (abfd)->symtab_hdr;
+  if (bfd_elf_get_elf_syms (abfd, hdr, 1, ghdr->sh_info,
+			    &isym, esym, &eshndx) == NULL)
+    return NULL;
+
+  /* Look up the symbol name.  */
+  iname = isym.st_name;
+  shindex = hdr->sh_link;
+  if (iname == 0 && ELF_ST_TYPE (isym.st_info) == STT_SECTION)
+    {
+      iname = elf_elfsections (abfd)[isym.st_shndx]->sh_name;
+      shindex = elf_elfheader (abfd)->e_shstrndx;
+    }
+
+  return bfd_elf_string_from_elf_section (abfd, shindex, iname);
+}
+
 /* Set next_in_group list pointer, and group name for NEWSECT.  */
 
 static boolean
@@ -440,6 +578,9 @@
 		      if (src == shdr->contents)
 			{
 			  dest->flags = idx;
+			  if (shdr->bfd_section != NULL && (idx & GRP_COMDAT))
+			    shdr->bfd_section->flags
+			      |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
 			  break;
 			}
 		      if (idx >= shnum)
@@ -492,32 +633,22 @@
 		  }
 		else
 		  {
-		    struct elf_backend_data *bed;
-		    file_ptr pos;
-		    unsigned char ename[4];
-		    unsigned long iname;
 		    const char *gname;
 
-		    /* Humbug.  Get the name from the group signature
-		       symbol.  Why isn't the signature just a string?
-		       Fortunately, the name index is at the same
-		       place in the external symbol for both 32 and 64
-		       bit ELF.  */
-		    bed = get_elf_backend_data (abfd);
-		    pos = elf_tdata (abfd)->symtab_hdr.sh_offset;
-		    pos += shdr->sh_info * bed->s->sizeof_sym;
-		    if (bfd_seek (abfd, pos, SEEK_SET) != 0
-			|| bfd_bread (ename, (bfd_size_type) 4, abfd) != 4)
+		    gname = group_signature (abfd, shdr);
+		    if (gname == NULL)
 		      return false;
-		    iname = H_GET_32 (abfd, ename);
-		    gname = elf_string_from_elf_strtab (abfd, iname);
 		    elf_group_name (newsect) = gname;
 
 		    /* Start a circular list with one element.  */
 		    elf_next_in_group (newsect) = newsect;
 		  }
+
+		/* If the group section has been created, point to the
+		   new member.  */
 		if (shdr->bfd_section != NULL)
 		  elf_next_in_group (shdr->bfd_section) = newsect;
+
 		i = num_group - 1;
 		break;
 	      }
@@ -532,6 +663,25 @@
   return true;
 }
 
+boolean
+bfd_elf_discard_group (abfd, group)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *group;
+{
+  asection *first = elf_next_in_group (group);
+  asection *s = first;
+
+  while (s != NULL)
+    {
+      s->output_section = bfd_abs_section_ptr;
+      s = elf_next_in_group (s);
+      /* These lists are circular.  */
+      if (s == first)
+	break;
+    }
+  return true;
+}
+
 /* Make a BFD section from an ELF section.  We store a pointer to the
    BFD section in the bfd_section field of the header.  */
 
@@ -620,7 +770,8 @@
      The symbols will be defined as weak, so that multiple definitions
      are permitted.  The GNU linker extension is to actually discard
      all but one of the sections.  */
-  if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+  if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0
+      && elf_next_in_group (newsect) == NULL)
     flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
 
   bed = get_elf_backend_data (abfd);
@@ -653,7 +804,7 @@
 	      /* This section is part of this segment if its file
 		 offset plus size lies within the segment's memory
 		 span and, if the section is loaded, the extent of the
-		 loaded data lies within the extent of the segment.  
+		 loaded data lies within the extent of the segment.
 
 		 Note - we used to check the p_paddr field as well, and
 		 refuse to set the LMA if it was 0.  This is wrong
@@ -796,7 +947,7 @@
      asection *sec;
 {
   struct bfd_elf_section_data *sec_data;
-    
+
   sec_data = elf_section_data (sec);
   BFD_ASSERT (sec_data->sec_info_type == ELF_INFO_TYPE_MERGE);
   sec_data->sec_info_type = ELF_INFO_TYPE_NONE;
@@ -1267,10 +1418,12 @@
    old indirect symbol.  Also used for copying flags to a weakdef.  */
 
 void
-_bfd_elf_link_hash_copy_indirect (dir, ind)
+_bfd_elf_link_hash_copy_indirect (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   bfd_signed_vma tmp;
+  bfd_signed_vma lowest_valid = bed->can_refcount;
 
   /* Copy down any references that we may have already seen to the
      symbol which just became indirect.  */
@@ -1288,22 +1441,22 @@
   /* Copy over the global and procedure linkage table refcount entries.
      These may have been already set up by a check_relocs routine.  */
   tmp = dir->got.refcount;
-  if (tmp <= 0)
+  if (tmp < lowest_valid)
     {
       dir->got.refcount = ind->got.refcount;
       ind->got.refcount = tmp;
     }
   else
-    BFD_ASSERT (ind->got.refcount <= 0);
+    BFD_ASSERT (ind->got.refcount < lowest_valid);
 
   tmp = dir->plt.refcount;
-  if (tmp <= 0)
+  if (tmp < lowest_valid)
     {
       dir->plt.refcount = ind->plt.refcount;
       ind->plt.refcount = tmp;
     }
   else
-    BFD_ASSERT (ind->plt.refcount <= 0);
+    BFD_ASSERT (ind->plt.refcount < lowest_valid);
 
   if (dir->dynindx == -1)
     {
@@ -1357,6 +1510,7 @@
   table->bucketcount = 0;
   table->needed = NULL;
   table->runpath = NULL;
+  table->loaded = NULL;
   table->hgot = NULL;
   table->stab_info = NULL;
   table->merge_info = NULL;
@@ -1576,7 +1730,7 @@
   Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[shindex];
   Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd);
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  char *name;
+  const char *name;
 
   name = elf_string_from_elf_strtab (abfd, hdr->sh_name);
 
@@ -1587,7 +1741,6 @@
       return true;
 
     case SHT_PROGBITS:	/* Normal section with contents.  */
-    case SHT_DYNAMIC:	/* Dynamic linking information.  */
     case SHT_NOBITS:	/* .bss section.  */
     case SHT_HASH:	/* .hash section.  */
     case SHT_NOTE:	/* .note section.  */
@@ -1596,6 +1749,39 @@
     case SHT_PREINIT_ARRAY:	/* .preinit_array section.  */
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
 
+    case SHT_DYNAMIC:	/* Dynamic linking information.  */
+      if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
+	return false;
+      if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB)
+	{
+	  Elf_Internal_Shdr *dynsymhdr;
+
+	  /* The shared libraries distributed with hpux11 have a bogus
+	     sh_link field for the ".dynamic" section.  Find the
+	     string table for the ".dynsym" section instead.  */
+	  if (elf_dynsymtab (abfd) != 0)
+	    {
+	      dynsymhdr = elf_elfsections (abfd)[elf_dynsymtab (abfd)];
+	      hdr->sh_link = dynsymhdr->sh_link;
+	    }
+	  else
+	    {
+	      unsigned int i, num_sec;
+
+	      num_sec = elf_numsections (abfd);
+	      for (i = 1; i < num_sec; i++)
+		{
+		  dynsymhdr = elf_elfsections (abfd)[i];
+		  if (dynsymhdr->sh_type == SHT_DYNSYM)
+		    {
+		      hdr->sh_link = dynsymhdr->sh_link;
+		      break;
+		    }
+		}
+	    }
+	}
+      break;
+
     case SHT_SYMTAB:		/* A symbol table */
       if (elf_onesymtab (abfd) == shindex)
 	return true;
@@ -1820,7 +2006,12 @@
       return true;
 
     case SHT_GROUP:
-      /* Make a section for objcopy and relocatable links.  */
+      /* We need a BFD section for objcopy and relocatable linking,
+	 and it's handy to have the signature available as the section
+	 name.  */
+      name = group_signature (abfd, hdr);
+      if (name == NULL)
+	return false;
       if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name))
 	return false;
       if (hdr->contents != NULL)
@@ -1829,6 +2020,10 @@
 	  unsigned int n_elt = hdr->sh_size / 4;
 	  asection *s;
 
+	  if (idx->flags & GRP_COMDAT)
+	    hdr->bfd_section->flags
+	      |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
+
 	  while (--n_elt != 0)
 	    if ((s = (++idx)->shdr->bfd_section) != NULL
 		&& elf_next_in_group (s) != NULL)
@@ -1861,50 +2056,19 @@
      asection *sec;
      unsigned long r_symndx;
 {
-  unsigned char esym_shndx[4];
-  unsigned int isym_shndx;
   Elf_Internal_Shdr *symtab_hdr;
-  file_ptr pos;
-  bfd_size_type amt;
+  unsigned char esym[sizeof (Elf64_External_Sym)];
+  Elf_External_Sym_Shndx eshndx;
+  Elf_Internal_Sym isym;
   unsigned int ent = r_symndx % LOCAL_SYM_CACHE_SIZE;
 
   if (cache->abfd == abfd && cache->indx[ent] == r_symndx)
     return cache->sec[ent];
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  pos = symtab_hdr->sh_offset;
-  if (get_elf_backend_data (abfd)->s->sizeof_sym
-      == sizeof (Elf64_External_Sym))
-    {
-      pos += r_symndx * sizeof (Elf64_External_Sym);
-      pos += offsetof (Elf64_External_Sym, st_shndx);
-      amt = sizeof (((Elf64_External_Sym *) 0)->st_shndx);
-    }
-  else
-    {
-      pos += r_symndx * sizeof (Elf32_External_Sym);
-      pos += offsetof (Elf32_External_Sym, st_shndx);
-      amt = sizeof (((Elf32_External_Sym *) 0)->st_shndx);
-    }
-  if (bfd_seek (abfd, pos, SEEK_SET) != 0
-      || bfd_bread ((PTR) esym_shndx, amt, abfd) != amt)
+  if (bfd_elf_get_elf_syms (abfd, symtab_hdr, 1, r_symndx,
+			    &isym, esym, &eshndx) == NULL)
     return NULL;
-  isym_shndx = H_GET_16 (abfd, esym_shndx);
-
-  if (isym_shndx == SHN_XINDEX)
-    {
-      Elf_Internal_Shdr *shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-      if (shndx_hdr->sh_size != 0)
-	{
-	  pos = shndx_hdr->sh_offset;
-	  pos += r_symndx * sizeof (Elf_External_Sym_Shndx);
-	  amt = sizeof (Elf_External_Sym_Shndx);
-	  if (bfd_seek (abfd, pos, SEEK_SET) != 0
-	      || bfd_bread ((PTR) esym_shndx, amt, abfd) != amt)
-	    return NULL;
-	  isym_shndx = H_GET_32 (abfd, esym_shndx);
-	}
-    }
 
   if (cache->abfd != abfd)
     {
@@ -1913,10 +2077,10 @@
     }
   cache->indx[ent] = r_symndx;
   cache->sec[ent] = sec;
-  if (isym_shndx < SHN_LORESERVE || isym_shndx > SHN_HIRESERVE)
+  if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE)
     {
       asection *s;
-      s = bfd_section_from_elf_index (abfd, isym_shndx);
+      s = bfd_section_from_elf_index (abfd, isym.st_shndx);
       if (s != NULL)
 	cache->sec[ent] = s;
     }
@@ -1988,16 +2152,18 @@
   asection *newsect;
   char *name;
   char namebuf[64];
+  size_t len;
   int split;
 
   split = ((hdr->p_memsz > 0)
 	    && (hdr->p_filesz > 0)
 	    && (hdr->p_memsz > hdr->p_filesz));
   sprintf (namebuf, "%s%d%s", typename, index, split ? "a" : "");
-  name = bfd_alloc (abfd, (bfd_size_type) strlen (namebuf) + 1);
+  len = strlen (namebuf) + 1;
+  name = bfd_alloc (abfd, (bfd_size_type) len);
   if (!name)
     return false;
-  strcpy (name, namebuf);
+  memcpy (name, namebuf, len);
   newsect = bfd_make_section (abfd, name);
   if (newsect == NULL)
     return false;
@@ -2025,10 +2191,11 @@
   if (split)
     {
       sprintf (namebuf, "%s%db", typename, index);
-      name = bfd_alloc (abfd, (bfd_size_type) strlen (namebuf) + 1);
+      len = strlen (namebuf) + 1;
+      name = bfd_alloc (abfd, (bfd_size_type) len);
       if (!name)
 	return false;
-      strcpy (name, namebuf);
+      memcpy (name, namebuf, len);
       newsect = bfd_make_section (abfd, name);
       if (newsect == NULL)
 	return false;
@@ -2275,10 +2442,23 @@
       if ((asect->flags & SEC_STRINGS) != 0)
 	this_hdr->sh_flags |= SHF_STRINGS;
     }
-  if (elf_group_name (asect) != NULL)
+  if ((asect->flags & SEC_GROUP) == 0 && elf_group_name (asect) != NULL)
     this_hdr->sh_flags |= SHF_GROUP;
   if ((asect->flags & SEC_THREAD_LOCAL) != 0)
-    this_hdr->sh_flags |= SHF_TLS;
+    {
+      this_hdr->sh_flags |= SHF_TLS;
+      if (asect->_raw_size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0)
+	{
+	  struct bfd_link_order *o;
+                                          
+	  this_hdr->sh_size = 0;
+	  for (o = asect->link_order_head; o != NULL; o = o->next)
+	    if (this_hdr->sh_size < o->offset + o->size)
+	      this_hdr->sh_size = o->offset + o->size;
+	  if (this_hdr->sh_size)
+	    this_hdr->sh_type = SHT_NOBITS;
+	}
+    }
 
   /* Check for processor-specific section types.  */
   if (bed->elf_backend_fake_sections
@@ -2299,35 +2479,47 @@
 
 /* Fill in the contents of a SHT_GROUP section.  */
 
-static void
-set_group_contents (abfd, sec, failedptrarg)
+void
+bfd_elf_set_group_contents (abfd, sec, failedptrarg)
      bfd *abfd;
      asection *sec;
-     PTR failedptrarg ATTRIBUTE_UNUSED;
+     PTR failedptrarg;
 {
   boolean *failedptr = (boolean *) failedptrarg;
   unsigned long symindx;
-  asection *elt;
+  asection *elt, *first;
   unsigned char *loc;
   struct bfd_link_order *l;
+  boolean gas;
 
   if (elf_section_data (sec)->this_hdr.sh_type != SHT_GROUP
       || *failedptr)
     return;
 
-  /* If called from the assembler, swap_out_syms will have set up
-     elf_section_syms;  If called for "ld -r", the symbols won't yet
-     be mapped, so emulate elf_bfd_final_link.  */
-  if (elf_section_syms (abfd) != NULL)
-    symindx = elf_section_syms (abfd)[sec->index]->udata.i;
-  else
-    symindx = elf_section_data (sec)->this_idx;
+  symindx = 0;
+  if (elf_group_id (sec) != NULL)
+    symindx = elf_group_id (sec)->udata.i;
+
+  if (symindx == 0)
+    {
+      /* If called from the assembler, swap_out_syms will have set up
+	 elf_section_syms;  If called for "ld -r", use target_index.  */
+      if (elf_section_syms (abfd) != NULL)
+	symindx = elf_section_syms (abfd)[sec->index]->udata.i;
+      else
+	symindx = sec->target_index;
+    }
   elf_section_data (sec)->this_hdr.sh_info = symindx;
 
-  /* Nor will the contents be allocated for "ld -r".  */
+  /* The contents won't be allocated for "ld -r" or objcopy.  */
+  gas = true;
   if (sec->contents == NULL)
     {
+      gas = false;
       sec->contents = bfd_alloc (abfd, sec->_raw_size);
+
+      /* Arrange for the section to be written out.  */
+      elf_section_data (sec)->this_hdr.contents = sec->contents;
       if (sec->contents == NULL)
 	{
 	  *failedptr = true;
@@ -2337,9 +2529,10 @@
 
   loc = sec->contents + sec->_raw_size;
 
-  /* Get the pointer to the first section in the group that we
-     squirreled away here.  */
-  elt = elf_next_in_group (sec);
+  /* Get the pointer to the first section in the group that gas
+     squirreled away here.  objcopy arranges for this to be set to the
+     start of the input section group.  */
+  first = elt = elf_next_in_group (sec);
 
   /* First element is a flag word.  Rest of section is elf section
      indices for all the sections of the group.  Write them backwards
@@ -2347,9 +2540,20 @@
      directives, not that it matters.  */
   while (elt != NULL)
     {
+      asection *s;
+      unsigned int idx;
+
       loc -= 4;
-      H_PUT_32 (abfd, elf_section_data (elt)->this_idx, loc);
+      s = elt;
+      if (!gas)
+	s = s->output_section;
+      idx = 0;
+      if (s != NULL)
+	idx = elf_section_data (s)->this_idx;
+      H_PUT_32 (abfd, idx, loc);
       elt = elf_next_in_group (elt);
+      if (elt == first)
+	break;
     }
 
   /* If this is a relocatable link, then the above did nothing because
@@ -2368,10 +2572,16 @@
 	}
       while (elt != elf_next_in_group (l->u.indirect.section));
 
-  loc -= 4;
-  H_PUT_32 (abfd, 0, loc);
+  /* With ld -r, merging SHT_GROUP sections results in wasted space
+     due to allowing for the flag word on each input.  We may well
+     duplicate entries too.  */
+  while ((loc -= 4) > sec->contents)
+    H_PUT_32 (abfd, 0, loc);
 
-  BFD_ASSERT (loc == sec->contents);
+  if (loc != sec->contents)
+    abort ();
+
+  H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
 }
 
 /* Assign all ELF section numbers.  The dummy first section is handled here
@@ -2553,10 +2763,10 @@
 	      char *alc;
 
 	      len = strlen (sec->name);
-	      alc = (char *) bfd_malloc ((bfd_size_type) len - 2);
+	      alc = (char *) bfd_malloc ((bfd_size_type) (len - 2));
 	      if (alc == NULL)
 		return false;
-	      strncpy (alc, sec->name, len - 3);
+	      memcpy (alc, sec->name, len - 3);
 	      alc[len - 3] = '\0';
 	      s = bfd_get_section_by_name (abfd, alc);
 	      free (alc);
@@ -2565,8 +2775,9 @@
 		  elf_section_data (s)->this_hdr.sh_link = d->this_idx;
 
 		  /* This is a .stab section.  */
-		  elf_section_data (s)->this_hdr.sh_entsize =
-		    4 + 2 * bfd_get_arch_size (abfd) / 8;
+		  if (elf_section_data (s)->this_hdr.sh_entsize == 0)
+		    elf_section_data (s)->this_hdr.sh_entsize
+		      = 4 + 2 * bfd_get_arch_size (abfd) / 8;
 		}
 	    }
 	  break;
@@ -2852,9 +3063,9 @@
 	return false;
     }
 
-  if (link_info == NULL || link_info->relocateable)
+  if (link_info == NULL)
     {
-      bfd_map_over_sections (abfd, set_group_contents, &failed);
+      bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed);
       if (failed)
 	return false;
     }
@@ -3348,6 +3559,37 @@
       if (! map_sections_to_segments (abfd))
 	return false;
     }
+  else
+    {
+      /* The placement algorithm assumes that non allocated sections are
+	 not in PT_LOAD segments.  We ensure this here by removing such
+	 sections from the segment map.  */
+      for (m = elf_tdata (abfd)->segment_map;
+	   m != NULL;
+	   m = m->next)
+	{
+	  unsigned int new_count;
+	  unsigned int i;
+
+	  if (m->p_type != PT_LOAD)
+	    continue;
+
+	  new_count = 0;
+	  for (i = 0; i < m->count; i ++)
+	    {
+	      if ((m->sections[i]->flags & SEC_ALLOC) != 0)
+		{
+		  if (i != new_count)
+		    m->sections[new_count] = m->sections[i];
+
+		  new_count ++;
+		}
+	    }
+
+	  if (new_count != m->count)
+	    m->count = new_count;
+	}
+    }
 
   if (bed->elf_backend_modify_segment_map)
     {
@@ -3403,12 +3645,12 @@
       asection **secpp;
 
       /* If elf_segment_map is not from map_sections_to_segments, the
-         sections may not be correctly ordered.  NOTE: sorting should 
+         sections may not be correctly ordered.  NOTE: sorting should
 	 not be done to the PT_NOTE section of a corefile, which may
 	 contain several pseudo-sections artificially created by bfd.
 	 Sorting these pseudo-sections breaks things badly.  */
-      if (m->count > 1 
-	  && !(elf_elfheader (abfd)->e_type == ET_CORE 
+      if (m->count > 1
+	  && !(elf_elfheader (abfd)->e_type == ET_CORE
 	       && m->p_type == PT_NOTE))
 	qsort (m->sections, (size_t) m->count, sizeof (asection *),
 	       elf_sort_sections);
@@ -3477,8 +3719,9 @@
 
 	      if (p->p_vaddr < (bfd_vma) off)
 		{
-		  _bfd_error_handler (_("%s: Not enough room for program headers, try linking with -N"),
-				      bfd_get_filename (abfd));
+		  (*_bfd_error_handler)
+		    (_("%s: Not enough room for program headers, try linking with -N"),
+		     bfd_get_filename (abfd));
 		  bfd_set_error (bfd_error_bad_value);
 		  return false;
 		}
@@ -3716,6 +3959,11 @@
 	}
     }
 
+  /* If additional nonloadable filepos adjustments are required,
+     do them now. */
+  if (bed->set_nonloadable_filepos)
+    (*bed->set_nonloadable_filepos) (abfd, phdrs);
+
   /* Clear out any program headers we allocated but did not use.  */
   for (; count < alloc; count++, p++)
     {
@@ -4274,6 +4522,7 @@
   bfd_vma                   maxpagesize;
   struct elf_segment_map *  phdr_adjust_seg = NULL;
   unsigned int              phdr_adjust_num = 0;
+  struct elf_backend_data * bed;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -4282,6 +4531,7 @@
   if (elf_tdata (ibfd)->phdr == NULL)
     return true;
 
+  bed = get_elf_backend_data (ibfd);
   iehdr = elf_elfheader (ibfd);
 
   map_first = NULL;
@@ -4291,44 +4541,53 @@
   maxpagesize = get_elf_backend_data (obfd)->maxpagesize;
 
   /* Returns the end address of the segment + 1.  */
-#define SEGMENT_END(segment, start) 			\
-  (start + (segment->p_memsz > segment->p_filesz 	\
-   ? segment->p_memsz : segment->p_filesz))
+#define SEGMENT_END(segment, start)					\
+  (start + (segment->p_memsz > segment->p_filesz			\
+	    ? segment->p_memsz : segment->p_filesz))
 
   /* Returns true if the given section is contained within
      the given segment.  VMA addresses are compared.  */
-#define IS_CONTAINED_BY_VMA(section, segment)		\
-  (section->vma >= segment->p_vaddr			\
-   && (section->vma + section->_raw_size)		\
-   <= (SEGMENT_END (segment, segment->p_vaddr)))
+#define IS_CONTAINED_BY_VMA(section, segment)				\
+  (section->vma >= segment->p_vaddr					\
+   && (section->vma + section->_raw_size				\
+       <= (SEGMENT_END (segment, segment->p_vaddr))))
 
   /* Returns true if the given section is contained within
      the given segment.  LMA addresses are compared.  */
-#define IS_CONTAINED_BY_LMA(section, segment, base)	\
-    (section->lma >= base				\
-     && (section->lma + section->_raw_size)		\
-     <= SEGMENT_END (segment, base))
+#define IS_CONTAINED_BY_LMA(section, segment, base)			\
+  (section->lma >= base							\
+   && (section->lma + section->_raw_size				\
+       <= SEGMENT_END (segment, base)))
+
+  /* Returns true if the given section is contained within the
+     given segment.  Filepos addresses are compared in an elf
+     backend function. */
+#define IS_CONTAINED_BY_FILEPOS(sec, seg, bed)				\
+  (bed->is_contained_by_filepos						\
+   && (*bed->is_contained_by_filepos) (sec, seg))
 
   /* Special case: corefile "NOTE" section containing regs, prpsinfo etc.  */
-#define IS_COREFILE_NOTE(p, s)                          \
-	    (p->p_type == PT_NOTE                       \
-	     && bfd_get_format (ibfd) == bfd_core       \
-	     && s->vma == 0 && s->lma == 0              \
-	     && (bfd_vma) s->filepos >= p->p_offset     \
-	     && (bfd_vma) s->filepos + s->_raw_size     \
-	     <= p->p_offset + p->p_filesz)
+#define IS_COREFILE_NOTE(p, s)						\
+  (p->p_type == PT_NOTE							\
+   && bfd_get_format (ibfd) == bfd_core					\
+   && s->vma == 0 && s->lma == 0					\
+   && (bfd_vma) s->filepos >= p->p_offset				\
+   && ((bfd_vma) s->filepos + s->_raw_size				\
+       <= p->p_offset + p->p_filesz))
 
   /* The complicated case when p_vaddr is 0 is to handle the Solaris
      linker, which generates a PT_INTERP section with p_vaddr and
      p_memsz set to 0.  */
-#define IS_SOLARIS_PT_INTERP(p, s)			\
-	    (   p->p_vaddr == 0				\
-	     && p->p_filesz > 0				\
-	     && (s->flags & SEC_HAS_CONTENTS) != 0	\
-	     && s->_raw_size > 0			\
-	     && (bfd_vma) s->filepos >= p->p_offset	\
-	     && ((bfd_vma) s->filepos + s->_raw_size	\
-		     <= p->p_offset + p->p_filesz))
+#define IS_SOLARIS_PT_INTERP(p, s)					\
+  (p->p_vaddr == 0							\
+   && p->p_paddr == 0							\
+   && p->p_memsz == 0							\
+   && p->p_filesz > 0							\
+   && (s->flags & SEC_HAS_CONTENTS) != 0				\
+   && s->_raw_size > 0							\
+   && (bfd_vma) s->filepos >= p->p_offset				\
+   && ((bfd_vma) s->filepos + s->_raw_size				\
+       <= p->p_offset + p->p_filesz))
 
   /* Decide if the given section should be included in the given segment.
      A section will be included if:
@@ -4337,23 +4596,25 @@
        2. It is an allocated segment,
        3. There is an output section associated with it,
        4. The section has not already been allocated to a previous segment.  */
-#define INCLUDE_SECTION_IN_SEGMENT(section, segment)			\
-  (((((segment->p_paddr							\
-       ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr)	\
-       : IS_CONTAINED_BY_VMA (section, segment))			\
-      || IS_SOLARIS_PT_INTERP (segment, section))			\
+#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed)		\
+  ((((segment->p_paddr							\
+      ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr)	\
+      : IS_CONTAINED_BY_VMA (section, segment))				\
      && (section->flags & SEC_ALLOC) != 0)				\
-    || IS_COREFILE_NOTE (segment, section))				\
+    || IS_COREFILE_NOTE (segment, section)				\
+    || (IS_CONTAINED_BY_FILEPOS (section, segment, bed)			\
+        && (section->flags & SEC_ALLOC) == 0))				\
    && section->output_section != NULL					\
-   && section->segment_mark == false)
+   && ! section->segment_mark)
 
   /* Returns true iff seg1 starts after the end of seg2.  */
-#define SEGMENT_AFTER_SEGMENT(seg1, seg2)		\
-    (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr))
+#define SEGMENT_AFTER_SEGMENT(seg1, seg2)				\
+  (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr))
 
   /* Returns true iff seg1 and seg2 overlap.  */
-#define SEGMENT_OVERLAPS(seg1, seg2)			\
-  (!(SEGMENT_AFTER_SEGMENT (seg1, seg2) || SEGMENT_AFTER_SEGMENT (seg2, seg1)))
+#define SEGMENT_OVERLAPS(seg1, seg2)					\
+  (!(SEGMENT_AFTER_SEGMENT (seg1, seg2)					\
+     || SEGMENT_AFTER_SEGMENT (seg2, seg1)))
 
   /* Initialise the segment mark field.  */
   for (section = ibfd->sections; section != NULL; section = section->next)
@@ -4362,7 +4623,7 @@
   /* Scan through the segments specified in the program header
      of the input BFD.  For this first scan we look for overlaps
      in the loadable segments.  These can be created by weird
-     parameters to objcopy.  */
+     parameters to objcopy.  Also, fix some solaris weirdness.  */
   for (i = 0, segment = elf_tdata (ibfd)->phdr;
        i < num_segments;
        i++, segment++)
@@ -4370,6 +4631,16 @@
       unsigned int j;
       Elf_Internal_Phdr *segment2;
 
+      if (segment->p_type == PT_INTERP)
+	for (section = ibfd->sections; section; section = section->next)
+	  if (IS_SOLARIS_PT_INTERP (segment, section))
+	    {
+	      /* Mininal change so that the normal section to segment
+		 assigment code will work.  */
+	      segment->p_vaddr = section->vma;
+	      break;
+	    }
+
       if (segment->p_type != PT_LOAD)
 	continue;
 
@@ -4443,7 +4714,7 @@
       /* Compute how many sections might be placed into this segment.  */
       section_count = 0;
       for (section = ibfd->sections; section != NULL; section = section->next)
-	if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
+	if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
 	  ++section_count;
 
       /* Allocate a segment map big enough to contain all of the
@@ -4486,11 +4757,12 @@
 	{
 	  /* Special segments, such as the PT_PHDR segment, may contain
 	     no sections, but ordinary, loadable segments should contain
-	     something.  */
+	     something.  They are allowed by the ELF spec however, so only
+	     a warning is produced.  */
 	  if (segment->p_type == PT_LOAD)
-	      _bfd_error_handler
-		(_("%s: warning: Empty loadable segment detected\n"),
-		 bfd_archive_filename (ibfd));
+	    (*_bfd_error_handler)
+	      (_("%s: warning: Empty loadable segment detected, is this intentional ?\n"),
+	       bfd_archive_filename (ibfd));
 
 	  map->count = 0;
 	  *pointer_to_map = map;
@@ -4527,7 +4799,9 @@
 	 pointers that we are interested in.  As these sections get assigned
 	 to a segment, they are removed from this array.  */
 
-      amt = (bfd_size_type) section_count * sizeof (asection *);
+      /* Gcc 2.96 miscompiles this code on mips. Don't do casting here
+	 to work around this long long bug.  */
+      amt = section_count * sizeof (asection *);
       sections = (asection **) bfd_malloc (amt);
       if (sections == NULL)
 	return false;
@@ -4546,7 +4820,7 @@
 	   section != NULL;
 	   section = section->next)
 	{
-	  if (INCLUDE_SECTION_IN_SEGMENT (section, segment))
+	  if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
 	    {
 	      output_section = section->output_section;
 
@@ -4554,9 +4828,11 @@
 
 	      /* The Solaris native linker always sets p_paddr to 0.
 		 We try to catch that case here, and set it to the
-		 correct value.  */
+		 correct value.  Note - some backends require that
+		 p_paddr be left as zero.  */
 	      if (segment->p_paddr == 0
 		  && segment->p_vaddr != 0
+		  && (! bed->want_p_paddr_set_to_zero)
 		  && isec == 0
 		  && output_section->lma != 0
 		  && (output_section->vma == (segment->p_vaddr
@@ -4572,7 +4848,11 @@
 	      /* Match up the physical address of the segment with the
 		 LMA address of the output section.  */
 	      if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
-		  || IS_COREFILE_NOTE (segment, section))
+		  || IS_CONTAINED_BY_FILEPOS (section, segment, bed)
+		  || IS_COREFILE_NOTE (segment, section)
+		  || (bed->want_p_paddr_set_to_zero &&
+		      IS_CONTAINED_BY_VMA (output_section, segment))
+                )
 		{
 		  if (matching_lma == 0)
 		    matching_lma = output_section->lma;
@@ -4641,7 +4921,7 @@
 	}
 
       /* Step Three: Loop over the sections again, this time assigning
-	 those that fit to the current segment and remvoing them from the
+	 those that fit to the current segment and removing them from the
 	 sections array; but making sure not to leave large gaps.  Once all
 	 possible sections have been assigned to the current segment it is
 	 added to the list of built segments and if sections still remain
@@ -4692,7 +4972,7 @@
 			 maxpagesize then we need to start a new segment.  */
 		      if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size,
 				      maxpagesize)
-			  < BFD_ALIGN (output_section->lma, maxpagesize))
+			   < BFD_ALIGN (output_section->lma, maxpagesize))
 			  || ((prev_sec->lma + prev_sec->_raw_size)
 			      > output_section->lma))
 			{
@@ -4805,6 +5085,7 @@
 #undef SEGMENT_END
 #undef IS_CONTAINED_BY_VMA
 #undef IS_CONTAINED_BY_LMA
+#undef IS_CONTAINED_BY_FILEPOS
 #undef IS_COREFILE_NOTE
 #undef IS_SOLARIS_PT_INTERP
 #undef INCLUDE_SECTION_IN_SEGMENT
@@ -4824,6 +5105,7 @@
      asection *osec;
 {
   Elf_Internal_Shdr *ihdr, *ohdr;
+  const struct elf_backend_data *bed = get_elf_backend_data (ibfd);
 
   if (ibfd->xvec->flavour != bfd_target_elf_flavour
       || obfd->xvec->flavour != bfd_target_elf_flavour)
@@ -4833,24 +5115,31 @@
      This must be done here, rather than in the copy_private_bfd_data
      entry point, because the latter is called after the section
      contents have been set, which means that the program headers have
-     already been worked out.  */
-  if (elf_tdata (obfd)->segment_map == NULL
-      && elf_tdata (ibfd)->phdr != NULL)
+     already been worked out.  The backend function provides a way to
+     override the test conditions and code path for the call to
+     copy_private_bfd_data.  */
+  if (bed->copy_private_bfd_data_p)
     {
-      asection *s;
+      if ((*bed->copy_private_bfd_data_p) (ibfd, isec, obfd, osec))
+        if (! copy_private_bfd_data (ibfd, obfd))
+          return false;
+    }
+  else if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+    {
+	asection *s;
 
-      /* Only set up the segments if there are no more SEC_ALLOC
-         sections.  FIXME: This won't do the right thing if objcopy is
-         used to remove the last SEC_ALLOC section, since objcopy
-         won't call this routine in that case.  */
-      for (s = isec->next; s != NULL; s = s->next)
-	if ((s->flags & SEC_ALLOC) != 0)
-	  break;
-      if (s == NULL)
-	{
-	  if (! copy_private_bfd_data (ibfd, obfd))
-	    return false;
-	}
+	/* Only set up the segments if there are no more SEC_ALLOC
+	   sections.  FIXME: This won't do the right thing if objcopy is
+	   used to remove the last SEC_ALLOC section, since objcopy
+	   won't call this routine in that case.  */
+	for (s = isec->next; s != NULL; s = s->next)
+	  if ((s->flags & SEC_ALLOC) != 0)
+	    break;
+	if (s == NULL)
+	  {
+	    if (! copy_private_bfd_data (ibfd, obfd))
+	      return false;
+	  }
     }
 
   ihdr = &elf_section_data (isec)->this_hdr;
@@ -4864,6 +5153,12 @@
       || ihdr->sh_type == SHT_GNU_verdef)
     ohdr->sh_info = ihdr->sh_info;
 
+  /* Set things up for objcopy.  The output SHT_GROUP section will
+     have its elf_next_in_group pointing back to the input group
+     members.  */
+  elf_next_in_group (osec) = elf_next_in_group (isec);
+  elf_group_name (osec) = elf_group_name (isec);
+
   elf_section_data (osec)->use_rela_p
     = elf_section_data (isec)->use_rela_p;
 
@@ -4972,10 +5267,9 @@
   if (symtab_shndx_hdr->sh_name != 0)
     {
       amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx);
-      outbound_shndx = bfd_alloc (abfd, amt);
+      outbound_shndx = bfd_zalloc (abfd, amt);
       if (outbound_shndx == NULL)
 	return false;
-      memset (outbound_shndx, 0, (unsigned long) amt);
       symtab_shndx_hdr->contents = outbound_shndx;
       symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
       symtab_shndx_hdr->sh_size = amt;
@@ -5786,8 +6080,8 @@
   bfd_signed_vma pos;
 
   if (! abfd->output_has_begun
-      && ! _bfd_elf_compute_section_file_positions
-      (abfd, (struct bfd_link_info *) NULL))
+      && ! (_bfd_elf_compute_section_file_positions
+	    (abfd, (struct bfd_link_info *) NULL)))
     return false;
 
   hdr = &elf_section_data (section)->this_hdr;
@@ -6010,15 +6304,17 @@
 {
   char buf[100];
   char *threaded_name;
+  size_t len;
   asection *sect;
 
   /* Build the section name.  */
 
   sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd));
-  threaded_name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+  len = strlen (buf) + 1;
+  threaded_name = bfd_alloc (abfd, (bfd_size_type) len);
   if (threaded_name == NULL)
     return false;
-  strcpy (threaded_name, buf);
+  memcpy (threaded_name, buf, len);
 
   sect = bfd_make_section (abfd, threaded_name);
   if (sect == NULL)
@@ -6303,6 +6599,7 @@
   lwpstatus_t lwpstat;
   char buf[100];
   char *name;
+  size_t len;
   asection *sect;
 
   if (note->descsz != sizeof (lwpstat)
@@ -6320,10 +6617,11 @@
   /* Make a ".reg/999" section.  */
 
   sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
-  name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+  len = strlen (buf) + 1;
+  name = bfd_alloc (abfd, (bfd_size_type) len);
   if (name == NULL)
     return false;
-  strcpy (name, buf);
+  memcpy (name, buf, len);
 
   sect = bfd_make_section (abfd, name);
   if (sect == NULL)
@@ -6349,10 +6647,11 @@
   /* Make a ".reg2/999" section */
 
   sprintf (buf, ".reg2/%d", elfcore_make_pid (abfd));
-  name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+  len = strlen (buf) + 1;
+  name = bfd_alloc (abfd, (bfd_size_type) len);
   if (name == NULL)
     return false;
-  strcpy (name, buf);
+  memcpy (name, buf, len);
 
   sect = bfd_make_section (abfd, name);
   if (sect == NULL)
@@ -6384,6 +6683,7 @@
 {
   char buf[30];
   char *name;
+  size_t len;
   asection *sect;
   win32_pstatus_t pstatus;
 
@@ -6404,11 +6704,12 @@
       /* Make a ".reg/999" section.  */
       sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid);
 
-      name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+      len = strlen (buf) + 1;
+      name = bfd_alloc (abfd, (bfd_size_type) len);
       if (name == NULL)
 	return false;
 
-      strcpy (name, buf);
+      memcpy (name, buf, len);
 
       sect = bfd_make_section (abfd, name);
       if (sect == NULL)
@@ -6430,11 +6731,12 @@
       /* Make a ".module/xxxxxxxx" section.  */
       sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address);
 
-      name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+      len = strlen (buf) + 1;
+      name = bfd_alloc (abfd, (bfd_size_type) len);
       if (name == NULL)
 	return false;
 
-      strcpy (name, buf);
+      memcpy (name, buf, len);
 
       sect = bfd_make_section (abfd, name);
 
@@ -6568,7 +6870,7 @@
          find this note before any of the others, which is fine,
          since the kernel writes this note out first when it
          creates a core file.  */
-      
+
       return elfcore_grok_netbsd_procinfo (abfd, note);
     }
 
@@ -6576,7 +6878,7 @@
      defined for NetBSD core files.  If the note type is less
      than the start of the machine-dependent note types, we don't
      understand it.  */
-  
+
   if (note->type < NT_NETBSDCORE_FIRSTMACH)
     return true;
 
@@ -6621,7 +6923,7 @@
 
 /* Function: elfcore_write_note
 
-   Inputs: 
+   Inputs:
      buffer to hold note
      name of note
      type of note
@@ -6636,16 +6938,30 @@
      bfd  *abfd;
      char *buf;
      int  *bufsiz;
-     char *name;
+     const char *name;
      int  type;
-     void *input;
+     const PTR input;
      int  size;
 {
   Elf_External_Note *xnp;
-  int namesz = strlen (name);
-  int newspace = BFD_ALIGN (sizeof (Elf_External_Note) + size + namesz - 1, 4);
+  size_t namesz;
+  size_t pad;
+  size_t newspace;
   char *p, *dest;
 
+  namesz = 0;
+  pad = 0;
+  if (name != NULL)
+    {
+      struct elf_backend_data *bed;
+
+      namesz = strlen (name) + 1;
+      bed = get_elf_backend_data (abfd);
+      pad = -namesz & (bed->s->file_align - 1);
+    }
+
+  newspace = sizeof (Elf_External_Note) - 1 + namesz + pad + size;
+
   p = realloc (buf, *bufsiz + newspace);
   dest = p + *bufsiz;
   *bufsiz += newspace;
@@ -6653,8 +6969,18 @@
   H_PUT_32 (abfd, namesz, xnp->namesz);
   H_PUT_32 (abfd, size, xnp->descsz);
   H_PUT_32 (abfd, type, xnp->type);
-  strcpy (xnp->name, name);
-  memcpy (xnp->name + BFD_ALIGN (namesz, 4), input, size);
+  dest = xnp->name;
+  if (name != NULL)
+    {
+      memcpy (dest, name, namesz);
+      dest += namesz;
+      while (pad != 0)
+	{
+	  *dest++ = '\0';
+	  --pad;
+	}
+    }
+  memcpy (dest, input, size);
   return p;
 }
 
@@ -6664,8 +6990,8 @@
      bfd  *abfd;
      char *buf;
      int  *bufsiz;
-     char *fname; 
-     char *psargs;
+     const char *fname;
+     const char *psargs;
 {
   int note_type;
   char *note_name = "CORE";
@@ -6681,7 +7007,7 @@
   memset (&data, 0, sizeof (data));
   strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
   strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
-  return elfcore_write_note (abfd, buf, bufsiz, 
+  return elfcore_write_note (abfd, buf, bufsiz,
 			     note_name, note_type, &data, sizeof (data));
 }
 #endif	/* PSINFO_T or PRPSINFO_T */
@@ -6694,7 +7020,7 @@
      int *bufsiz;
      long pid;
      int cursig;
-     void *gregs;
+     const PTR gregs;
 {
   prstatus_t prstat;
   char *note_name = "CORE";
@@ -6703,7 +7029,7 @@
   prstat.pr_pid = pid;
   prstat.pr_cursig = cursig;
   memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
-  return elfcore_write_note (abfd, buf, bufsiz, 
+  return elfcore_write_note (abfd, buf, bufsiz,
 			     note_name, NT_PRSTATUS, &prstat, sizeof (prstat));
 }
 #endif /* HAVE_PRSTATUS_T */
@@ -6716,7 +7042,7 @@
      int *bufsiz;
      long pid;
      int cursig;
-     void *gregs;
+     const PTR gregs;
 {
   lwpstatus_t lwpstat;
   char *note_name = "CORE";
@@ -6735,7 +7061,7 @@
 	  gregs, sizeof (lwpstat.pr_context.uc_mcontext.__gregs));
 #endif
 #endif
-  return elfcore_write_note (abfd, buf, bufsiz, note_name, 
+  return elfcore_write_note (abfd, buf, bufsiz, note_name,
 			     NT_LWPSTATUS, &lwpstat, sizeof (lwpstat));
 }
 #endif /* HAVE_LWPSTATUS_T */
@@ -6748,14 +7074,14 @@
      int *bufsiz;
      long pid;
      int cursig;
-     void *gregs;
+     const PTR gregs;
 {
   pstatus_t pstat;
   char *note_name = "CORE";
 
   memset (&pstat, 0, sizeof (pstat));
   pstat.pr_pid = pid & 0xffff;
-  buf = elfcore_write_note (abfd, buf, bufsiz, note_name, 
+  buf = elfcore_write_note (abfd, buf, bufsiz, note_name,
 			    NT_PSTATUS, &pstat, sizeof (pstat));
   return buf;
 }
@@ -6766,11 +7092,11 @@
      bfd  *abfd;
      char *buf;
      int  *bufsiz;
-     void *fpregs;
+     const PTR fpregs;
      int size;
 {
   char *note_name = "CORE";
-  return elfcore_write_note (abfd, buf, bufsiz, 
+  return elfcore_write_note (abfd, buf, bufsiz,
 			     note_name, NT_FPREGSET, fpregs, size);
 }
 
@@ -6779,11 +7105,11 @@
      bfd  *abfd;
      char *buf;
      int  *bufsiz;
-     void *xfpregs;
+     const PTR xfpregs;
      int size;
 {
   char *note_name = "LINUX";
-  return elfcore_write_note (abfd, buf, bufsiz, 
+  return elfcore_write_note (abfd, buf, bufsiz,
 			     note_name, NT_PRXFPREG, xfpregs, size);
 }
 
@@ -6964,7 +7290,7 @@
   return reloc_class_normal;
 }
 
-/* For RELA architectures, return what the relocation value for
+/* For RELA architectures, return the relocation value for a
    relocation against a local symbol.  */
 
 bfd_vma
@@ -7003,7 +7329,7 @@
      Elf_Internal_Sym *sym;
      asection **psec;
      bfd_vma addend;
-{     
+{
   asection *sec = *psec;
 
   if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE)
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index ad7247a..ff5c5f4 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -235,7 +235,7 @@
   return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				input_section, output_bfd, error_message);
 }
-  
+
 #define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
 #define TARGET_LITTLE_NAME "elf32-littlearc"
 #define TARGET_BIG_SYM bfd_elf32_bigarc_vec
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 8b9bf07..bfc1aa6 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -42,10 +42,6 @@
   PARAMS ((struct bfd_link_info *, const char *, bfd *));
 static struct elf_link_hash_entry *find_arm_glue
   PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static void record_arm_to_thumb_glue
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void record_thumb_to_arm_glue
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 static void elf32_arm_post_process_headers
   PARAMS ((bfd *, struct bfd_link_info *));
 static int elf32_arm_to_thumb_stub
@@ -58,7 +54,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
 	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 static asection * elf32_arm_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_arm_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -84,15 +80,22 @@
 static void arm_add_to_rel
   PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
 #endif
+static enum elf_reloc_type_class elf32_arm_reloc_type_class
+  PARAMS ((const Elf_Internal_Rela *));
 
+#ifndef ELFARM_NABI_C_INCLUDED
+static void record_arm_to_thumb_glue
+  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void record_thumb_to_arm_glue
+  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 boolean bfd_elf32_arm_allocate_interworking_sections
   PARAMS ((struct bfd_link_info *));
 boolean bfd_elf32_arm_get_bfd_for_interworking
   PARAMS ((bfd *, struct bfd_link_info *));
 boolean bfd_elf32_arm_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *, int));
-static enum elf_reloc_type_class elf32_arm_reloc_type_class
-  PARAMS ((const Elf_Internal_Rela *));
+#endif
+
 
 #define INTERWORK_FLAG(abfd)   (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
 
@@ -367,6 +370,7 @@
 static const insn32 t2a5_pop_insn = 0xe8bd4040;
 static const insn32 t2a6_bx_insn = 0xe12fff1e;
 
+#ifndef ELFARM_NABI_C_INCLUDED
 boolean
 bfd_elf32_arm_allocate_interworking_sections (info)
      struct bfd_link_info * info;
@@ -547,31 +551,22 @@
   return;
 }
 
-/* Select a BFD to be used to hold the sections used by the glue code.
-   This function is called from the linker scripts in ld/emultempl/
-   {armelf/pe}.em  */
+/* Add the glue sections to ABFD.  This function is called from the
+   linker scripts in ld/emultempl/{armelf}.em.  */
 
 boolean
-bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
+bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
      bfd *abfd;
      struct bfd_link_info *info;
 {
-  struct elf32_arm_link_hash_table *globals;
   flagword flags;
   asection *sec;
 
-  /* If we are only performing a partial link do not bother
-     getting a bfd to hold the glue.  */
+  /* If we are only performing a partial
+     link do not bother adding the glue.  */
   if (info->relocateable)
     return true;
 
-  globals = elf32_arm_hash_table (info);
-
-  BFD_ASSERT (globals != NULL);
-
-  if (globals->bfd_of_glue_owner != NULL)
-    return true;
-
   sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
 
   if (sec == NULL)
@@ -609,6 +604,32 @@
       sec->gc_mark = 1;
     }
 
+  return true;
+}
+
+/* Select a BFD to be used to hold the sections used by the glue code.
+   This function is called from the linker scripts in ld/emultempl/
+   {armelf/pe}.em  */
+
+boolean
+bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
+     bfd *abfd;
+     struct bfd_link_info *info;
+{
+  struct elf32_arm_link_hash_table *globals;
+
+  /* If we are only performing a partial link
+     do not bother getting a bfd to hold the glue.  */
+  if (info->relocateable)
+    return true;
+
+  globals = elf32_arm_hash_table (info);
+
+  BFD_ASSERT (globals != NULL);
+
+  if (globals->bfd_of_glue_owner != NULL)
+    return true;
+
   /* Save the bfd for later use.  */
   globals->bfd_of_glue_owner = abfd;
 
@@ -622,12 +643,9 @@
      int no_pipeline_knowledge;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Rela *free_relocs = NULL;
+  Elf_Internal_Rela *internal_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
 
   asection *sec;
   struct elf32_arm_link_hash_table *globals;
@@ -660,13 +678,15 @@
       symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
 
       /* Load the relocs.  */
-      irel = (_bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL,
-					   (Elf_Internal_Rela *) NULL, false));
+      internal_relocs
+	= _bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL,
+				       (Elf_Internal_Rela *) NULL, false);
 
-      BFD_ASSERT (irel != 0);
+      if (internal_relocs == NULL)
+	goto error_return;
 
-      irelend = irel + sec->reloc_count;
-      for (; irel < irelend; irel++)
+      irelend = internal_relocs + sec->reloc_count;
+      for (irel = internal_relocs; irel < irelend; irel++)
 	{
 	  long r_type;
 	  unsigned long r_index;
@@ -694,37 +714,12 @@
 		  if (contents == NULL)
 		    goto error_return;
 
-		  free_contents = contents;
-
 		  if (!bfd_get_section_contents (abfd, sec, contents,
 						 (file_ptr) 0, sec->_raw_size))
 		    goto error_return;
 		}
 	    }
 
-	  /* Read this BFD's symbols if we haven't done so already.  */
-	  if (extsyms == NULL)
-	    {
-	      /* Get cached copy if it exists.  */
-	      if (symtab_hdr->contents != NULL)
-		extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	      else
-		{
-		  /* Go get them off disk.  */
-		  extsyms = ((Elf32_External_Sym *)
-			     bfd_malloc (symtab_hdr->sh_size));
-		  if (extsyms == NULL)
-		    goto error_return;
-
-		  free_extsyms = extsyms;
-
-		  if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		      || (bfd_bread (extsyms, symtab_hdr->sh_size, abfd)
-			  != symtab_hdr->sh_size))
-		    goto error_return;
-		}
-	    }
-
 	  /* If the relocation is not against a symbol it cannot concern us.  */
 	  h = NULL;
 
@@ -764,20 +759,31 @@
 	      break;
 	    }
 	}
+
+      if (contents != NULL
+	  && elf_section_data (sec)->this_hdr.contents != contents)
+	free (contents);
+      contents = NULL;
+
+      if (internal_relocs != NULL
+	  && elf_section_data (sec)->relocs != internal_relocs)
+	free (internal_relocs);
+      internal_relocs = NULL;
     }
 
   return true;
 
 error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return false;
 }
+#endif
 
 /* The thumb form of a long branch is a bit finicky, because the offset
    encoding is split over two fields, each in it's own instruction. They
@@ -1523,7 +1529,7 @@
 	  signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
 
 	relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask));
- 
+
 	bfd_put_16 (input_bfd, relocation, hit_data);
 
 	/* Assumes two's complement.  */
@@ -1532,7 +1538,7 @@
 
 	return bfd_reloc_ok;
       }
-      
+
     case R_ARM_GNU_VTINHERIT:
     case R_ARM_GNU_VTENTRY:
       return bfd_reloc_ok;
@@ -1557,7 +1563,7 @@
       if (sgot == NULL)
         return bfd_reloc_notsupported;
 
-      /* If we are addressing a Thumb function, we need to adjust the 
+      /* If we are addressing a Thumb function, we need to adjust the
 	 address by one, so that attempts to call the function pointer will
 	 correctly interpret it as Thumb code.  */
       if (sym_flags == STT_ARM_TFUNC)
@@ -2206,7 +2212,7 @@
   asection *sec;
 
   /* Check if we have the same endianess.  */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -2357,7 +2363,7 @@
 	      _bfd_error_handler (_("\
 Warning: %s supports interworking, whereas %s does not"),
 				  bfd_archive_filename (ibfd),
-				  bfd_get_filename (obfd));    
+				  bfd_get_filename (obfd));
 	    }
 	  else
 	    {
@@ -2512,8 +2518,8 @@
 }
 
 static asection *
-elf32_arm_gc_mark_hook (abfd, info, rel, h, sym)
-       bfd *abfd;
+elf32_arm_gc_mark_hook (sec, info, rel, h, sym)
+       asection *sec;
        struct bfd_link_info *info ATTRIBUTE_UNUSED;
        Elf_Internal_Rela *rel;
        struct elf_link_hash_entry *h;
@@ -2543,9 +2549,7 @@
        }
      }
    else
-     {
-       return bfd_section_from_elf_index (abfd, sym->st_shndx);
-     }
+     return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -3610,7 +3614,9 @@
 
 #define ELF_ARCH			bfd_arch_arm
 #define ELF_MACHINE_CODE		EM_ARM
+#ifndef ELF_MAXPAGESIZE
 #define ELF_MAXPAGESIZE			0x8000
+#endif
 
 #define bfd_elf32_bfd_copy_private_bfd_data	elf32_arm_copy_private_bfd_data
 #define bfd_elf32_bfd_merge_private_bfd_data	elf32_arm_merge_private_bfd_data
@@ -3645,3 +3651,4 @@
 #define elf_backend_plt_header_size	PLT_ENTRY_SIZE
 
 #include "elf32-target.h"
+
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 61f28e6..42683682 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1,5 +1,5 @@
 /* AVR-specific support for 32-bit ELF
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -29,7 +29,7 @@
 static void avr_info_to_howto_rela
   PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
 static asection *elf32_avr_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_avr_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -46,9 +46,6 @@
 static void bfd_elf_avr_final_write_processing PARAMS ((bfd *, boolean));
 static boolean elf32_avr_object_p PARAMS ((bfd *));
 
-/* Use RELA instead of REL */
-#undef USE_REL
-
 static reloc_howto_type elf_avr_howto_table[] =
 {
   HOWTO (R_AVR_NONE,		/* type */
@@ -399,8 +396,8 @@
 }
 
 static asection *
-elf32_avr_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf32_avr_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -426,9 +423,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -724,6 +719,9 @@
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
 
+  if (info->relocateable)
+    return true;
+
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
@@ -740,30 +738,9 @@
       const char *                 name = NULL;
       int                          r_type;
 
+      /* This is a final link.  */
       r_type = ELF32_R_TYPE (rel->r_info);
       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  = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info);
       h      = NULL;
       sym    = NULL;
@@ -954,6 +931,7 @@
 #define elf_backend_gc_sweep_hook            elf32_avr_gc_sweep_hook
 #define elf_backend_check_relocs             elf32_avr_check_relocs
 #define elf_backend_can_gc_sections          1
+#define elf_backend_rela_normal		     1
 #define elf_backend_final_write_processing \
 					bfd_elf_avr_final_write_processing
 #define elf_backend_object_p		elf32_avr_object_p
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index ab72483..8eff52d 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -52,7 +52,7 @@
 	   const Elf_Internal_Rela *));
 
 static asection * cris_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 static boolean cris_elf_object_p PARAMS ((bfd *));
@@ -547,7 +547,7 @@
 static const bfd_byte elf_cris_plt0_entry[PLT_ENTRY_SIZE] =
 {
   0xfc, 0xe1,
-  0x7e, 0x7e,	/* push mof. */
+  0x7e, 0x7e,	/* push mof.  */
   0x7f, 0x0d,   /*  (dip [pc+]) */
   0, 0, 0, 0,	/*  Replaced with address of .got + 4.  */
   0x30, 0x7a,	/* move [...],mof */
@@ -799,17 +799,15 @@
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
 
+  if (info->relocateable)
+    return true;
+
   dynobj = elf_hash_table (info)->dynobj;
   local_got_offsets = elf_local_got_offsets (input_bfd);
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
 
-  /* It seems this can happen with erroneous or unsupported input (mixing
-     a.out and elf in an archive, for example.)  */
-  if (sym_hashes == NULL)
-    return false;
-
   sgot = NULL;
   splt = NULL;
   sreloc = NULL;
@@ -838,29 +836,8 @@
 	  || r_type == R_CRIS_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.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
       howto  = cris_elf_howto_table + r_type;
       h      = NULL;
       sym    = NULL;
@@ -879,6 +856,11 @@
 	}
       else
 	{
+	  /* It seems this can happen with erroneous or unsupported input
+	     (mixing a.out and elf in an archive, for example.)  */
+	  if (sym_hashes == NULL)
+	    return false;
+
 	  h = sym_hashes [r_symndx - symtab_hdr->sh_info];
 
 	  while (h->root.type == bfd_link_hash_indirect
@@ -1046,29 +1028,28 @@
 			&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
 		  {
 		    /* This wasn't checked above for ! info->shared, but
-		       must hold there if we get here; the symbol must not
-		       be used in, or defined by a DSO.  (Note that
-		       checking for ELF_LINK_HASH_DEF_REGULAR doesn't
-		       catch all cases.)  */
-		    BFD_ASSERT (info->shared
+		       must hold there if we get here; the symbol must be
+		       defined in the regular program, or be undefweak.  */
+		    BFD_ASSERT (!elf_hash_table (info)->dynamic_sections_created
+				|| info->shared
 				|| (h->elf_link_hash_flags
-				    & (ELF_LINK_HASH_REF_DYNAMIC
-				       | ELF_LINK_HASH_DEF_DYNAMIC)) == 0);
+				    & ELF_LINK_HASH_DEF_REGULAR) != 0
+				|| h->root.type == bfd_link_hash_undefweak);
 
 		    /* This is actually a static link, or it is a
-		       -Bsymbolic link and the symbol is defined
-		       locally, or the symbol was forced to be local
-		       because of a version file, or we're not creating a
-		       dynamic object and the symbol isn't referred to by
-		       a dynamic object.  We must initialize
-		       this entry in the global offset table.  Since
-		       the offset must always be a multiple of 4, we
-		       use the least significant bit to record whether
-		       we have initialized it already.
+		       -Bsymbolic link and the symbol is defined locally,
+		       or is undefweak, or the symbol was forced to be
+		       local because of a version file, or we're not
+		       creating a dynamic object.  We must initialize this
+		       entry in the global offset table.  Since the offset
+		       must always be a multiple of 4, we use the least
+		       significant bit to record whether we have
+		       initialized it already.
 
-		       When doing a dynamic link, we create a .rela.got
-		       relocation entry to initialize the value.  This
-		       is done in the finish_dynamic_symbol routine.  */
+		       If this GOT entry should be runtime-initialized, we
+		       will create a .rela.got relocation entry to
+		       initialize the value.  This is done in the
+		       finish_dynamic_symbol routine.  */
 		    if ((off & 1) != 0)
 		      off &= ~1;
 		    else
@@ -1150,7 +1131,7 @@
 
 	case R_CRIS_32_GOTREL:
 	  /* This relocation must only be performed against local symbols.  */
-	  if (h != NULL)
+	  if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
@@ -1190,7 +1171,7 @@
 
 	  /* Resolve a PLT_PCREL reloc against a local symbol directly,
 	     without using the procedure linkage table.  */
-	  if (h == NULL)
+	  if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	    break;
 
 	  if (h->plt.offset == (bfd_vma) -1
@@ -1215,7 +1196,7 @@
 
 	  /* Resolve a PLT_GOTREL reloc against a local symbol directly,
 	     without using the procedure linkage table.  */
-	  if (h == NULL)
+	  if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	    break;
 
 	  if (h->plt.offset == (bfd_vma) -1
@@ -1237,7 +1218,7 @@
 	case R_CRIS_16_PCREL:
 	case R_CRIS_32_PCREL:
 	  /* If the symbol was local, we need no shlib-specific handling.  */
-	  if (h == NULL)
+	  if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	    break;
 
 	  /* Fall through.  */
@@ -1561,9 +1542,13 @@
     }
 
   /* We don't emit .got relocs for symbols that aren't in the
-     dynamic-symbols table for an ordinary program.  */
+     dynamic-symbols table for an ordinary program and are either defined
+     by the program or are undefined weak symbols.  */
   if (h->got.offset != (bfd_vma) -1
-      && (info->shared || h->dynindx != -1))
+      && (info->shared
+	  || (h->dynindx != -1
+	      && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+	      && h->root.type != bfd_link_hash_undefweak)))
     {
       asection *sgot;
       asection *srela;
@@ -1770,8 +1755,8 @@
    relocation.  */
 
 static asection *
-cris_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *                        abfd;
+cris_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *                   sec;
      struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
@@ -1801,9 +1786,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1900,7 +1883,8 @@
 	  if (r_symndx >= symtab_hdr->sh_info)
 	    {
 	      h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-	      if (h->plt.refcount > 0)
+	      if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+		  && h->plt.refcount > 0)
 		--h->plt.refcount;
 	    }
 	  break;
@@ -2068,23 +2052,23 @@
   if (h->type == STT_FUNC
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
+      /* If we link a program (not a DSO), we'll get rid of unnecessary
+	 PLT entries; we point to the actual symbols -- even for pic
+	 relocs, because a program built with -fpic should have the same
+	 result as one built without -fpic, specifically considering weak
+	 symbols.
+	 FIXME: m68k and i386 differ here, for unclear reasons.  */
       if (! info->shared
-	  && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
-	  && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
-	  /* We must always create the plt entry if it was referenced by a
-	     PLT relocation.  In this case we already recorded it as a
-	     dynamic symbol.  */
-	  /* FIXME: m68k and i386 differ here, for unclear reasons.  */
-	  && h->dynindx == -1)
+	  && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
 	{
 	  /* This case can occur if we saw a PLT reloc in an input file,
-	     but the symbol was never referred to by a dynamic object.  In
-	     such a case, we don't actually need to build a procedure
-	     linkage table, and we can just do a PC reloc instead, or
+	     but the symbol was not defined by a dynamic object.  In such
+	     a case, we don't actually need to build a procedure linkage
+	     table, and we can just do an absolute or PC reloc instead, or
 	     change a .got.plt index to a .got index for GOTPLT relocs.  */
 	  BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+	  h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
 	  h->plt.offset = (bfd_vma) -1;
-
 	  return
 	    elf_cris_adjust_gotplt_to_got ((struct
 					    elf_cris_link_hash_entry *) h,
@@ -2122,9 +2106,7 @@
 
       /* If this symbol is not defined in a regular file, and we are
 	 not generating a shared library, then set the symbol to this
-	 location in the .plt.  This is required to make function
-	 pointers compare as equal between the normal executable and
-	 the shared library.  */
+	 location in the .plt.  */
       if (!info->shared
 	  && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
 	{
@@ -2488,7 +2470,7 @@
 
 	  /* If this is a local symbol, we resolve it directly without
 	     creating a procedure linkage table entry.  */
-	  if (h == NULL)
+	  if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 	    continue;
 
 	  h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
@@ -2527,7 +2509,8 @@
 
 	      /* Make sure a plt entry is created for this symbol if it
 		 turns out to be a function defined by a dynamic object.  */
-	      h->plt.refcount++;
+	      if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+		h->plt.refcount++;
 	    }
 
 	  /* If we are creating a shared library and this is not a local
@@ -2560,7 +2543,7 @@
 	      || r_type == R_CRIS_32_PCREL)
 	    {
 	      /* If the symbol is local, then we can eliminate the reloc.  */
-	      if (h == NULL)
+	      if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
 		break;
 
 	      /* If this is with -Bsymbolic and the symbol isn't weak, and
@@ -2907,10 +2890,9 @@
 
   /* If we're not creating a shared library and have a symbol which is
      referred to by .got references, but the symbol is defined locally,
-     (or rather, not referred to by a DSO and not defined by a DSO) then
-     lose the reloc for the .got (don't allocate room for it).  */
-  if ((h->root.elf_link_hash_flags
-       & (ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_HASH_DEF_DYNAMIC)) == 0)
+     (or rather, not not defined by a DSO) then lose the reloc for the
+     .got (don't allocate room for it).  */
+  if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
     {
       if (h->root.got.refcount > 0
 	  /* The size of this section is only valid and in sync with the
@@ -2935,7 +2917,8 @@
 	 functions; doing this for all symbols would presumably not
 	 introduce new problems.  Of course we don't do this if we're
 	 exporting all dynamic symbols.  */
-      if (! info->export_dynamic)
+      if (! info->export_dynamic
+	  && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
 	{
 	  h->root.dynindx = -1;
 	  _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
@@ -3003,7 +2986,7 @@
 {
   flagword old_flags, new_flags;
 
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -3113,6 +3096,7 @@
    take the easy route.  */
 #define elf_backend_may_use_rel_p 0
 #define elf_backend_may_use_rela_p 1
+#define elf_backend_rela_normal		1
 
 #include "elf32-target.h"
 
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index cd06244..1dec0b0 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -1,5 +1,5 @@
 /* D10V-specific support for 32-bit ELF
-   Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -29,7 +29,7 @@
 static void d10v_info_to_howto_rel
   PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
 static asection * elf32_d10v_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_d10v_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -67,10 +67,10 @@
     HOWTO (R_D10V_10_PCREL_R,	/* type */
 	   2,	                /* rightshift */
 	   2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	   8,	                /* bitsize */
+	   7,	                /* bitsize */
 	   true,	        /* pc_relative */
 	   0,	                /* bitpos */
-	   complain_overflow_signed, /* complain_on_overflow */
+	   complain_overflow_bitfield, /* complain_on_overflow */
 	   bfd_elf_generic_reloc, /* special_function */
 	   "R_D10V_10_PCREL_R",	/* name */
 	   false,	        /* partial_inplace */
@@ -83,10 +83,10 @@
     HOWTO (R_D10V_10_PCREL_L,	/* type */
 	   2,	                /* rightshift */
 	   2,	                /* size (0 = byte, 1 = short, 2 = long) */
-	   8,	                /* bitsize */
+	   7,	                /* bitsize */
 	   true,	        /* pc_relative */
 	   15,	                /* bitpos */
-	   complain_overflow_signed, /* complain_on_overflow */
+	   complain_overflow_bitfield, /* complain_on_overflow */
 	   bfd_elf_generic_reloc, /* special_function */
 	   "R_D10V_10_PCREL_L",	/* name */
 	   false,	        /* partial_inplace */
@@ -128,10 +128,10 @@
     HOWTO (R_D10V_18_PCREL,	/* type */
 	   2,			/* rightshift */
 	   2,			/* size (0 = byte, 1 = short, 2 = long) */
-	   16,			/* bitsize */
+	   15,			/* bitsize */
 	   true,		/* pc_relative */
 	   0,			/* bitpos */
-	   complain_overflow_signed, /* complain_on_overflow */
+	   complain_overflow_bitfield, /* complain_on_overflow */
 	   bfd_elf_generic_reloc, /* special_function */
 	   "R_D10V_18_PCREL",	/* name */
 	   false,		/* partial_inplace */
@@ -240,12 +240,12 @@
 }
 
 static asection *
-elf32_d10v_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;
+elf32_d10v_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *rel;
+     struct elf_link_hash_entry *h;
+     Elf_Internal_Sym *sym;
 {
   if (h != NULL)
     {
@@ -271,9 +271,8 @@
        }
      }
    else
-     {
-       return bfd_section_from_elf_index (abfd, sym->st_shndx);
-     }
+     return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
   return NULL;
 }
 
diff --git a/bfd/elf32-d30v.c b/bfd/elf32-d30v.c
index 4d26b92..f2f3946 100644
--- a/bfd/elf32-d30v.c
+++ b/bfd/elf32-d30v.c
@@ -1,5 +1,6 @@
 /* D30V-specific support for 32-bit ELF
-   Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
    Contributed by Martin Hunt (hunt@cygnus.com).
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -313,7 +314,7 @@
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == true)
+  if (howto->pc_relative)
     {
       tmp_addr = input_section->output_section->vma + input_section->output_offset
 	+ reloc_entry->address;
@@ -332,7 +333,7 @@
 
   relocation += num;
 
-  if (howto->pc_relative == true && howto->bitsize == 32)
+  if (howto->pc_relative && howto->bitsize == 32)
     {
       /* The D30V has a PC that doesn't wrap and PC-relative jumps are
 	 signed, so a PC-relative jump can't be more than +/- 2^31 bytes.
@@ -422,11 +423,11 @@
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == true)
+  if (howto->pc_relative)
     {
       relocation -= (input_section->output_section->vma
 		     + input_section->output_offset);
-      if (howto->pcrel_offset == true)
+      if (howto->pcrel_offset)
 	relocation -= reloc_entry->address;
     }
 
diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c
index d7d419c..91d75f3 100644
--- a/bfd/elf32-dlx.c
+++ b/bfd/elf32-dlx.c
@@ -488,7 +488,7 @@
 
 /* A mapping from BFD reloc types to DLX ELF reloc types.
    Stolen from elf32-mips.c.
-   
+
    More about this table - for dlx elf relocation we do not really
    need this table, if we have a rtype defined in this table will
    caused tc_gen_relocate confused and die on us, but if we remove
@@ -500,7 +500,7 @@
   enum elf_dlx_reloc_type elf_reloc_val;
 };
 
-static CONST struct elf_reloc_map dlx_reloc_map[] =
+static const struct elf_reloc_map dlx_reloc_map[] =
   {
     { BFD_RELOC_NONE,           R_DLX_NONE },
     { BFD_RELOC_16,             R_DLX_RELOC_16 },
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index e1bc741..07453cf 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -42,7 +42,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection * fr30_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean fr30_elf_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -468,9 +468,6 @@
 }
 
 /* Relocate an FR30 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.
@@ -664,8 +661,8 @@
    relocation.  */
 
 static asection *
-fr30_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *                        abfd;
+fr30_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *                   sec;
      struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
@@ -695,9 +692,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index cc26b96..c818795 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -51,7 +51,7 @@
 static boolean elf32_frv_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
 static asection * elf32_frv_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_frv_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
 static int elf32_frv_machine PARAMS ((bfd *));
@@ -621,9 +621,6 @@
 
 
 /* Relocate an FRV 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.
@@ -655,7 +652,7 @@
 
 static boolean
 elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
-			   contents, relocs, local_syms, local_sections)
+			    contents, relocs, local_syms, local_sections)
      bfd *                   output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *  info;
      bfd *                   input_bfd;
@@ -670,6 +667,9 @@
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
 
+  if (info->relocateable)
+    return true;
+
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   relend     = relocs + input_section->reloc_count;
@@ -692,29 +692,8 @@
 	  || r_type == R_FRV_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.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
       howto  = elf32_frv_howto_table + ELF32_R_TYPE (rel->r_info);
       h      = NULL;
       sym    = NULL;
@@ -838,8 +817,8 @@
    relocation.  */
 
 static asection *
-elf32_frv_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *                        abfd;
+elf32_frv_gc_mark_hook (sec, info, rel, h, sym)
+     asection *                   sec;
      struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
@@ -869,13 +848,7 @@
 	}
     }
   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 bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1395,6 +1368,7 @@
 #define elf_backend_add_symbol_hook             elf32_frv_add_symbol_hook
 
 #define elf_backend_can_gc_sections		1
+#define elf_backend_rela_normal			1
 
 #define bfd_elf32_bfd_reloc_type_lookup		frv_reloc_type_lookup
 #define bfd_elf32_bfd_set_private_flags		frv_elf_set_private_flags
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 52213ec..48e2960 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -1,5 +1,6 @@
 /* Generic support for 32-bit ELF
-   Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1995, 1998, 1999, 2001, 2002
+   Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -428,6 +429,9 @@
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
 
+  if (info->relocateable)
+    return true;
+
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
 
@@ -443,29 +447,9 @@
       bfd_vma relocation;
       bfd_reloc_status_type r;
 
+      /* This is a final link.  */
       r_symndx = ELF32_R_SYM (rel->r_info);
       r_type = ELF32_R_TYPE (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.  */
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -677,10 +661,7 @@
      mov.b:16	     ->    mov.b:8                2 bytes
      mov.b:24/32     ->    mov.b:8                4 bytes
 
-     mov.[bwl]:24/32 ->    mov.[bwl]:16           2 bytes
-
-
-*/
+     mov.[bwl]:24/32 ->    mov.[bwl]:16           2 bytes */
 
 static boolean
 elf32_h8_relax_section (abfd, sec, link_info, again)
@@ -690,15 +671,10 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   static asection *last_input_section = NULL;
   static Elf_Internal_Rela *last_reloc = NULL;
 
@@ -720,7 +696,6 @@
     sec->_cooked_size = sec->_raw_size;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
 
   /* Get a copy of the native relocations.  */
   internal_relocs = (_bfd_elf32_link_read_relocs
@@ -728,8 +703,6 @@
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   if (sec != last_input_section)
     last_reloc = NULL;
@@ -747,6 +720,13 @@
       if (irel != internal_relocs)
 	last_reloc = irel - 1;
 
+      if (ELF32_R_TYPE (irel->r_info) != R_H8_DIR24R8
+	  && ELF32_R_TYPE (irel->r_info) != R_H8_PCREL16
+	  && ELF32_R_TYPE (irel->r_info) != R_H8_DIR16A8
+	  && ELF32_R_TYPE (irel->r_info) != R_H8_DIR24A8
+	  && ELF32_R_TYPE (irel->r_info) != R_H8_DIR32A16)
+	continue;
+
       /* Get the section contents if we haven't done so already.  */
       if (contents == NULL)
 	{
@@ -759,7 +739,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -768,57 +747,27 @@
 	}
 
       /* Read this BFD's local symbols if we haven't done so already.  */
-      if (extsyms == NULL)
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
 	{
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info * sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (PTR) extsyms;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (PTR) shndx_buf;
-	    }
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-	  Elf32_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  /* A local symbol.  */
+	  Elf_Internal_Sym *isym;
 	  asection *sym_sec;
 
-	  /* A local symbol.  */
-	  esym = extsyms + ELF32_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-	  sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-	  symval = (isym.st_value
+	  isym = isymbuf + ELF64_R_SYM (irel->r_info);
+	  sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	  symval = (isym->st_value
 		    + sym_sec->output_section->vma
 		    + sym_sec->output_offset);
 	}
@@ -878,12 +827,8 @@
 		/* Note that we've changed the relocs, section contents,
 		   etc.  */
 		elf_section_data (sec)->relocs = internal_relocs;
-		free_relocs = NULL;
-
 		elf_section_data (sec)->this_hdr.contents = contents;
-		free_contents = NULL;
-
-		free_extsyms = NULL;
+		symtab_hdr->contents = (unsigned char *) isymbuf;
 
 		/* If the previous instruction conditionally jumped around
 		   this instruction, we may be able to reverse the condition
@@ -898,24 +843,17 @@
 		    && ELF32_R_TYPE (last_reloc->r_info) == R_H8_PCREL8
 		    && ELF32_R_SYM (last_reloc->r_info) < symtab_hdr->sh_info)
 		  {
-		    Elf32_External_Sym *esym;
-		    Elf_External_Sym_Shndx *shndx;
 		    bfd_vma last_value;
 		    asection *last_sym_sec;
-		    Elf_Internal_Sym last_symbol;
+		    Elf_Internal_Sym *last_sym;
 
 		    /* We will need to examine the symbol used by the
 		       previous relocation.  */
 
-		    esym = extsyms + ELF32_R_SYM (last_reloc->r_info);
-		    shndx = shndx_buf;
-		    if (shndx != NULL)
-		      shndx += ELF32_R_SYM (last_reloc->r_info);
-		    bfd_elf32_swap_symbol_in (abfd, esym, shndx, &last_symbol);
-
+		    last_sym = isymbuf + ELF32_R_SYM (last_reloc->r_info);
 		    last_sym_sec
-		      = bfd_section_from_elf_index (abfd, last_symbol.st_shndx);
-		    last_value = (last_symbol.st_value
+		      = bfd_section_from_elf_index (abfd, last_sym->st_shndx);
+		    last_value = (last_sym->st_value
 				  + last_sym_sec->output_section->vma
 				  + last_sym_sec->output_offset);
 
@@ -1007,12 +945,8 @@
 	        /* Note that we've changed the relocs, section contents,
 		   etc.  */
 	        elf_section_data (sec)->relocs = internal_relocs;
-	        free_relocs = NULL;
-
 	        elf_section_data (sec)->this_hdr.contents = contents;
-	        free_contents = NULL;
-
-	        free_extsyms = NULL;
+		symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	        /* Get the opcode.  */
 	        code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
@@ -1068,12 +1002,8 @@
 	        /* Note that we've changed the relocs, section contents,
 		   etc.  */
 	        elf_section_data (sec)->relocs = internal_relocs;
-	        free_relocs = NULL;
-
 	        elf_section_data (sec)->this_hdr.contents = contents;
-	        free_contents = NULL;
-
-	        free_extsyms = NULL;
+		symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	        /* Get the opcode.  */
 	        code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
@@ -1130,12 +1060,8 @@
 	        /* Note that we've changed the relocs, section contents,
 		   etc.  */
 	        elf_section_data (sec)->relocs = internal_relocs;
-	        free_relocs = NULL;
-
 	        elf_section_data (sec)->this_hdr.contents = contents;
-	        free_contents = NULL;
-
-	        free_extsyms = NULL;
+		symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	        /* Get the opcode.  */
 	        code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
@@ -1186,12 +1112,8 @@
 	        /* Note that we've changed the relocs, section contents,
 		   etc.  */
 	        elf_section_data (sec)->relocs = internal_relocs;
-	        free_relocs = NULL;
-
 	        elf_section_data (sec)->this_hdr.contents = contents;
-	        free_contents = NULL;
-
-	        free_extsyms = NULL;
+		symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	        /* Get the opcode.  */
 	        code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
@@ -1222,56 +1144,43 @@
 	}
     }
 
-  if (free_relocs != NULL)
-    {
-      free (free_relocs);
-      free_relocs = NULL;
-    }
-
-  if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	symtab_hdr->contents = (unsigned char *) isymbuf;
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
 	  elf_section_data (sec)->this_hdr.contents = contents;
 	}
-      free_contents = NULL;
     }
 
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-
-  if (free_extsyms != NULL)
-    {
-      if (! link_info->keep_memory)
-	{
-	  symtab_hdr->contents = NULL;
-	  free (free_extsyms);
-	}
-    }
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-  if (free_extsyms != NULL)
-    {
-      symtab_hdr->contents = NULL;
-      free (free_extsyms);
-    }
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   return false;
 }
 
@@ -1285,22 +1194,17 @@
      int count;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
   unsigned int sec_shndx;
   bfd_byte *contents;
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Rela *irelalign;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
   bfd_vma toaddr;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
   contents = elf_section_data (sec)->this_hdr.contents;
@@ -1329,24 +1233,15 @@
     }
 
   /* Adjust the local symbols defined in this section.  */
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = extsyms;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  isymend = isym + symtab_hdr->sh_info;
+  for (; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-      Elf_External_Sym_Shndx dummy;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value > addr
-	  && isym.st_value < toaddr)
-	{
-	  isym.st_value -= count;
-	  bfd_elf32_swap_symbol_out (abfd, &isym, esym, &dummy);
-	}
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value > addr
+	  && isym->st_value < toaddr)
+	isym->st_value -= count;
     }
 
   /* Now adjust the global symbols defined in this section.  */
@@ -1379,10 +1274,9 @@
      bfd_vma addr;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   unsigned int sec_shndx;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
@@ -1391,18 +1285,12 @@
 
   /* Examine all the symbols.  */
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
-  esym = (Elf32_External_Sym *) symtab_hdr->contents;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  isymend = isym + symtab_hdr->sh_info;
+  for (; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value == addr)
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value == addr)
 	return true;
     }
 
@@ -1437,15 +1325,11 @@
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   asection *input_section = link_order->u.indirect.section;
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf32_External_Sym *external_syms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
@@ -1457,7 +1341,6 @@
 						       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
 
   memcpy (data, elf_section_data (input_section)->this_hdr.contents,
 	  (size_t) input_section->_raw_size);
@@ -1465,48 +1348,26 @@
   if ((input_section->flags & SEC_RELOC) != 0
       && input_section->reloc_count > 0)
     {
-      Elf_Internal_Sym *isymp;
       asection **secpp;
-      Elf32_External_Sym *esym, *esymend;
+      Elf_Internal_Sym *isym, *isymend;
       bfd_size_type amt;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else if (symtab_hdr->sh_info != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  external_syms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) external_syms, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
-      if (symtab_hdr->sh_info != 0 && shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
       internal_relocs = (_bfd_elf32_link_read_relocs
 			 (input_bfd, input_section, (PTR) NULL,
 			  (Elf_Internal_Rela *) NULL, false));
       if (internal_relocs == NULL)
 	goto error_return;
 
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (internal_syms == NULL && amt != 0)
-	goto error_return;
+      if (symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
 
       amt = symtab_hdr->sh_info;
       amt *= sizeof (asection *);
@@ -1514,58 +1375,48 @@
       if (sections == NULL && amt != 0)
 	goto error_return;
 
-      for (isymp = internal_syms, secpp = sections, shndx = shndx_buf,
-	     esym = external_syms, esymend = esym + symtab_hdr->sh_info;
-	   esym < esymend;
-	   ++esym, ++isymp, ++secpp, shndx = (shndx ? shndx + 1 : NULL))
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
-
-	  if (isymp->st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
-	  else if (isymp->st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    isec = bfd_abs_section_ptr;
-	  else if (isymp->st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    isec = bfd_com_section_ptr;
 	  else
-	    isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
+	    isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 	  *secpp = isec;
 	}
 
       if (! elf32_h8_relocate_section (output_bfd, link_info, input_bfd,
 				       input_section, data, internal_relocs,
-				       internal_syms, sections))
+				       isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      if (internal_syms != NULL)
-	free (internal_syms);
-      if (shndx_buf != NULL)
-	free (shndx_buf);
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
-      if (internal_relocs != elf_section_data (input_section)->relocs)
+      if (isymbuf != NULL
+	  && symtab_hdr->contents != (unsigned char *) isymbuf)
+	free (isymbuf);
+      if (elf_section_data (input_section)->relocs != internal_relocs)
 	free (internal_relocs);
     }
 
   return data;
 
  error_return:
-  if (internal_relocs != NULL
-      && internal_relocs != elf_section_data (input_section)->relocs)
-    free (internal_relocs);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
   if (sections != NULL)
     free (sections);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (input_section)->relocs != internal_relocs)
+    free (internal_relocs);
   return NULL;
 }
 
@@ -1597,6 +1448,7 @@
 
 /* Use an H8 specific linker, not the ELF generic linker.  */
 #define elf_backend_relocate_section elf32_h8_relocate_section
+#define elf_backend_rela_normal		1
 
 /* And relaxing stuff.  */
 #define bfd_elf32_bfd_relax_section     elf32_h8_relax_section
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 4dc7e9b..35e6f32 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -327,14 +327,15 @@
   PARAMS ((bfd *, struct bfd_link_info *));
 
 static void elf32_hppa_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 
 static boolean elf32_hppa_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *,
 	   asection *, const Elf_Internal_Rela *));
 
 static asection *elf32_hppa_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 static boolean elf32_hppa_gc_sweep_hook
@@ -643,16 +644,18 @@
       stub_sec = htab->stub_group[link_sec->id].stub_sec;
       if (stub_sec == NULL)
 	{
+	  size_t namelen;
 	  bfd_size_type len;
 	  char *s_name;
 
-	  len = strlen (link_sec->name) + sizeof (STUB_SUFFIX);
+	  namelen = strlen (link_sec->name);
+	  len = namelen + sizeof (STUB_SUFFIX);
 	  s_name = bfd_alloc (htab->stub_bfd, len);
 	  if (s_name == NULL)
 	    return NULL;
 
-	  strcpy (s_name, link_sec->name);
-	  strcpy (s_name + len - sizeof (STUB_SUFFIX), STUB_SUFFIX);
+	  memcpy (s_name, link_sec->name, namelen);
+	  memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
 	  stub_sec = (*htab->add_stub_section) (s_name, link_sec);
 	  if (stub_sec == NULL)
 	    return NULL;
@@ -1143,7 +1146,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf32_hppa_copy_indirect_symbol (dir, ind)
+elf32_hppa_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct elf32_hppa_link_hash_entry *edir, *eind;
@@ -1187,7 +1191,7 @@
       eind->dyn_relocs = NULL;
     }
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 /* Look through the relocs for a section during the first phase, and
@@ -1630,8 +1634,8 @@
    for a given relocation.  */
 
 static asection *
-elf32_hppa_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf32_hppa_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -1661,9 +1665,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -2558,7 +2560,7 @@
 
 /* Set up various things so that we can make a list of input sections
    for each output section included in the link.  Returns -1 on error,
-   0 when no stubs will be needed, and 1 on success. */
+   0 when no stubs will be needed, and 1 on success.  */
 
 int
 elf32_hppa_setup_section_lists (output_bfd, info)
@@ -2770,68 +2772,26 @@
        input_bfd = input_bfd->link_next, bfd_indx++)
     {
       Elf_Internal_Shdr *symtab_hdr;
-      Elf_Internal_Shdr *shndx_hdr;
-      Elf_Internal_Sym *isym;
-      Elf32_External_Sym *ext_syms, *esym, *end_sy;
-      Elf_External_Sym_Shndx *shndx_buf, *shndx;
-      bfd_size_type sec_size;
 
       /* We'll need the symbol table in a second.  */
       symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
       if (symtab_hdr->sh_info == 0)
 	continue;
 
-      /* We need an array of the local symbols attached to the input bfd.
-	 Unfortunately, we're going to have to read & swap them in.  */
-      sec_size = symtab_hdr->sh_info;
-      sec_size *= sizeof (Elf_Internal_Sym);
-      local_syms = (Elf_Internal_Sym *) bfd_malloc (sec_size);
+      /* We need an array of the local symbols attached to the input bfd.  */
+      local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+      if (local_syms == NULL)
+	{
+	  local_syms = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					     symtab_hdr->sh_info, 0,
+					     NULL, NULL, NULL);
+	  /* Cache them for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) local_syms;
+	}
       if (local_syms == NULL)
 	return -1;
 
       all_local_syms[bfd_indx] = local_syms;
-      sec_size = symtab_hdr->sh_info;
-      sec_size *= sizeof (Elf32_External_Sym);
-      ext_syms = (Elf32_External_Sym *) bfd_malloc (sec_size);
-      if (ext_syms == NULL)
-	return -1;
-
-      if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread ((PTR) ext_syms, sec_size, input_bfd) != sec_size)
-	{
-	error_ret_free_ext_syms:
-	  free (ext_syms);
-	  return -1;
-	}
-
-      shndx_buf = NULL;
-      shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-      if (shndx_hdr->sh_size != 0)
-	{
-	  sec_size = symtab_hdr->sh_info;
-	  sec_size *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (sec_size);
-	  if (shndx_buf == NULL)
-	    goto error_ret_free_ext_syms;
-
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, sec_size, input_bfd) != sec_size)
-	    {
-	      free (shndx_buf);
-	      goto error_ret_free_ext_syms;
-	    }
-	}
-
-      /* Swap the local symbols in.  */
-      for (esym = ext_syms, end_sy = esym + symtab_hdr->sh_info,
-	     isym = local_syms, shndx = shndx_buf;
-	   esym < end_sy;
-	   esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
-	bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isym);
-
-      /* Now we can free the external symbols.  */
-      free (shndx_buf);
-      free (ext_syms);
 
       if (info->shared && htab->multi_subspace)
 	{
@@ -2926,7 +2886,6 @@
   bfd_size_type stub_group_size;
   boolean stubs_always_before_branch;
   boolean stub_changed;
-  boolean ret = 0;
   struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
 
   /* Stash our params away.  */
@@ -2993,10 +2952,7 @@
 	       section != NULL;
 	       section = section->next)
 	    {
-	      Elf_Internal_Shdr *input_rel_hdr;
-	      Elf32_External_Rela *external_relocs, *erelaend, *erela;
 	      Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
-	      bfd_size_type amt;
 
 	      /* If there aren't any relocs, then there's nothing more
 		 to do.  */
@@ -3010,47 +2966,13 @@
 		  || section->output_section->owner != output_bfd)
 		continue;
 
-	      /* Allocate space for the external relocations.  */
-	      amt = section->reloc_count;
-	      amt *= sizeof (Elf32_External_Rela);
-	      external_relocs = (Elf32_External_Rela *) bfd_malloc (amt);
-	      if (external_relocs == NULL)
-		{
-		  goto error_ret_free_local;
-		}
-
-	      /* Likewise for the internal relocations.  */
-	      amt = section->reloc_count;
-	      amt *= sizeof (Elf_Internal_Rela);
-	      internal_relocs = (Elf_Internal_Rela *) bfd_malloc (amt);
+	      /* Get the relocs.  */
+	      internal_relocs
+		= _bfd_elf32_link_read_relocs (input_bfd, section, NULL,
+					       (Elf_Internal_Rela *) NULL,
+					       info->keep_memory);
 	      if (internal_relocs == NULL)
-		{
-		  free (external_relocs);
-		  goto error_ret_free_local;
-		}
-
-	      /* Read in the external relocs.  */
-	      input_rel_hdr = &elf_section_data (section)->rel_hdr;
-	      if (bfd_seek (input_bfd, input_rel_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) external_relocs,
-				input_rel_hdr->sh_size,
-				input_bfd) != input_rel_hdr->sh_size)
-		{
-		  free (external_relocs);
-		error_ret_free_internal:
-		  free (internal_relocs);
-		  goto error_ret_free_local;
-		}
-
-	      /* Swap in the relocs.  */
-	      erela = external_relocs;
-	      erelaend = erela + section->reloc_count;
-	      irela = internal_relocs;
-	      for (; erela < erelaend; erela++, irela++)
-		bfd_elf32_swap_reloca_in (input_bfd, erela, irela);
-
-	      /* We're done with the external relocs, free them.  */
-	      free (external_relocs);
+		goto error_ret_free_local;
 
 	      /* Now examine each relocation.  */
 	      irela = internal_relocs;
@@ -3073,7 +2995,10 @@
 		  if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED)
 		    {
 		      bfd_set_error (bfd_error_bad_value);
-		      goto error_ret_free_internal;
+		    error_ret_free_internal:
+		      if (elf_section_data (section)->relocs == NULL)
+			free (internal_relocs);
+		      goto error_ret_free_local;
 		    }
 
 		  /* Only look for stubs on call instructions.  */
@@ -3176,7 +3101,7 @@
 		  if (stub_entry == NULL)
 		    {
 		      free (stub_name);
-		      goto error_ret_free_local;
+		      goto error_ret_free_internal;
 		    }
 
 		  stub_entry->target_value = sym_value;
@@ -3194,7 +3119,8 @@
 		}
 
 	      /* We're done with the internal relocs, free them.  */
-	      free (internal_relocs);
+	      if (elf_section_data (section)->relocs == NULL)
+		free (internal_relocs);
 	    }
 	}
 
@@ -3218,15 +3144,12 @@
       stub_changed = false;
     }
 
-  ret = true;
+  free (htab->all_local_syms);
+  return true;
 
  error_ret_free_local:
-  while (htab->bfd_count-- > 0)
-    if (htab->all_local_syms[htab->bfd_count])
-      free (htab->all_local_syms[htab->bfd_count]);
   free (htab->all_local_syms);
-
-  return ret;
+  return false;
 }
 
 /* For a final link, this function is called after we have sized the
@@ -3689,6 +3612,9 @@
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
+  if (info->relocateable)
+    return true;
+
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
 
   htab = hppa_link_hash_table (info);
@@ -3720,27 +3646,8 @@
 	  || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT)
 	continue;
 
-      r_symndx = ELF32_R_SYM (rel->r_info);
-
-      if (info->relocateable)
-	{
-	  /* This is a relocatable 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)
-		{
-		  sym_sec = local_sections[r_symndx];
-		  rel->r_addend += sym_sec->output_offset;
-		}
-	    }
-	  continue;
-	}
-
       /* This is a final link.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
       h = NULL;
       sym = NULL;
       sym_sec = NULL;
@@ -4548,6 +4455,7 @@
 #define elf_backend_plt_readonly	     0
 #define elf_backend_want_plt_sym	     0
 #define elf_backend_got_header_size	     8
+#define elf_backend_rela_normal		     1
 
 #define TARGET_BIG_SYM		bfd_elf32_hppa_vec
 #define TARGET_BIG_NAME		"elf32-hppa"
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index fc82b47..d047f01 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -34,32 +34,6 @@
 #include "elf-bfd.h"
 #include "elf/i370.h"
 
-#define USE_RELA		/* we want RELA relocations, not REL */
-
-/* i370 relocations */
-/* Note that there is really just one relocation that we currently
- * support (and only one that we seem to need, at the moment), and
- * that is the 31-bit address relocation.  Note that the 370/390
- * only supports a 31-bit (2GB) address space.
- */
-enum i370_reloc_type
-{
-  R_I370_NONE		=   0,
-  R_I370_ADDR31		=   1,
-  R_I370_ADDR32		=   2,
-  R_I370_ADDR16		=   3,
-  R_I370_REL31		=   4,
-  R_I370_REL32		=   5,
-  R_I370_ADDR12		=   6,
-  R_I370_REL12		=   7,
-  R_I370_ADDR8		=   8,
-  R_I370_REL8		=   9,
-  R_I370_COPY		=  10,
-  R_I370_RELATIVE	=  11,
-
-  R_I370_max
-};
-
 static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ];
 
 static reloc_howto_type i370_elf_howto_raw[] =
@@ -319,7 +293,7 @@
 
 static boolean i370_elf_section_from_shdr PARAMS ((bfd *,
 						   Elf32_Internal_Shdr *,
-						   char *));
+						   const char *));
 static boolean i370_elf_fake_sections PARAMS ((bfd *,
 					       Elf32_Internal_Shdr *,
 					       asection *));
@@ -429,7 +403,7 @@
 i370_elf_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf32_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   asection *newsect;
   flagword flags;
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 01e1f21..edf06de 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -45,7 +45,8 @@
 static boolean elf_i386_create_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
 static void elf_i386_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static int elf_i386_tls_transition
   PARAMS ((struct bfd_link_info *, int, int));
 
@@ -57,7 +58,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *elf_i386_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf_i386_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -594,7 +595,7 @@
     return false;
   return true;
 }
-                 
+
 static boolean
 elf_i386_object_p (abfd)
   bfd *abfd;
@@ -697,6 +698,7 @@
   ret->srelplt = NULL;
   ret->sdynbss = NULL;
   ret->srelbss = NULL;
+  ret->tls_ldm_got.refcount = 0;
   ret->sym_sec.abfd = NULL;
 
   return &ret->elf.root;
@@ -766,7 +768,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf_i386_copy_indirect_symbol (dir, ind)
+elf_i386_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct elf_i386_link_hash_entry *edir, *eind;
@@ -808,7 +811,13 @@
       eind->dyn_relocs = NULL;
     }
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  if (ind->root.type == bfd_link_hash_indirect
+      && dir->got.refcount <= 0)
+    {
+      edir->tls_type = eind->tls_type;
+      eind->tls_type = GOT_UNKNOWN;
+    }
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 static int
@@ -1174,8 +1183,8 @@
    relocation.  */
 
 static asection *
-elf_i386_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf_i386_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -1205,9 +1214,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1400,7 +1407,7 @@
     }
 
   /* If we didn't find any dynamic relocs in read-only sections, then
-     we'll be keeping the dynamic relocs and avoiding the copy reloc.  */ 
+     we'll be keeping the dynamic relocs and avoiding the copy reloc.  */
   if (p == NULL)
     {
       h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
@@ -1552,7 +1559,7 @@
       && !info->shared
       && h->dynindx == -1
       && elf_i386_hash_entry(h)->tls_type == GOT_TLS_IE)
-    h->got.offset = (bfd_vma) -1;    
+    h->got.offset = (bfd_vma) -1;
   else if (h->got.refcount > 0)
     {
       asection *s;
@@ -2428,7 +2435,7 @@
 
 	  if (r_type == R_386_TLS_LE_32)
 	    {
-	      BFD_ASSERT (unresolved_reloc == false);
+	      BFD_ASSERT (! unresolved_reloc);
 	      if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD)
 		{
 		  unsigned int val, type;
@@ -2562,13 +2569,17 @@
 	      outrel.r_offset = (htab->sgot->output_section->vma
 				 + htab->sgot->output_offset + off);
 
-	      bfd_put_32 (output_bfd, 0,
-			  htab->sgot->contents + off);
 	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
 	      if (r_type == R_386_TLS_GD)
 		dr_type = R_386_TLS_DTPMOD32;
 	      else
 		dr_type = R_386_TLS_TPOFF32;
+	      if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
+		bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
+			    htab->sgot->contents + off);
+	      else
+		bfd_put_32 (output_bfd, 0,
+			    htab->sgot->contents + off);
 	      outrel.r_info = ELF32_R_INFO (indx, dr_type);
 	      loc = (Elf32_External_Rel *) htab->srelgot->contents;
 	      loc += htab->srelgot->reloc_count++;
@@ -2578,7 +2589,7 @@
 		{
 		  if (indx == 0)
 		    {
-	    	      BFD_ASSERT (unresolved_reloc == false);
+	    	      BFD_ASSERT (! unresolved_reloc);
 		      bfd_put_32 (output_bfd,
 				  relocation - dtpoff_base (info),
 				  htab->sgot->contents + off + 4);
@@ -2739,14 +2750,11 @@
 	  break;
 	}
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-	 More importantly, why do we not emit dynamic relocs for
-	 R_386_32 above in debugging sections (which are ! SEC_ALLOC)?
-	 If we had emitted the dynamic reloc, we could remove the
-	 fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
@@ -2885,7 +2893,7 @@
 	     the .plt section.  Leave the value alone.  This is a clue
 	     for the dynamic linker, to make function pointer
 	     comparisons work between an application and shared
-	     library.  */  
+	     library.  */
 	  sym->st_shndx = SHN_UNDEF;
 	}
     }
@@ -3146,4 +3154,6 @@
 #define elf_backend_relocate_section	      elf_i386_relocate_section
 #define elf_backend_size_dynamic_sections     elf_i386_size_dynamic_sections
 
+#ifndef ELF32_I386_C_INCLUDED
 #include "elf32-target.h"
+#endif
diff --git a/bfd/elf32-i386qnx.c b/bfd/elf32-i386qnx.c
index 5f2e111..523eecb 100644
--- a/bfd/elf32-i386qnx.c
+++ b/bfd/elf32-i386qnx.c
@@ -2,110 +2,29 @@
    Copyright 2002
    Free Software Foundation, Inc.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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.
 
-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.  */
+   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.  */
 
 #define ELF32_I386_C_INCLUDED
 #include "elf32-i386.c"
 
-  /* Returns the end address of the segment + 1.  */
-#define SEGMENT_END(segment, start)                     \
-  (start + (segment->p_memsz > segment->p_filesz        \
-   ? segment->p_memsz : segment->p_filesz))
-
-static boolean elf_i386qnx_copy_private_bfd_data_p
-  PARAMS ((bfd *, asection *, bfd *, asection *));
-static boolean elf_i386qnx_is_contained_by_filepos
-  PARAMS ((asection *, Elf_Internal_Phdr *));
-static void elf_i386qnx_set_nonloadable_filepos
-  PARAMS ((bfd *, Elf_Internal_Phdr *));
-
-static boolean
-elf_i386qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
-     bfd *ibfd;
-     asection *isec;
-     bfd *obfd;
-     asection *osec;
-{
-  /* We don't use these parameters, but another target might.  */
-  ibfd = ibfd;
-  obfd = obfd;
-  osec = osec;
-  return isec->next == NULL;
-}
-
-static boolean
-elf_i386qnx_is_contained_by_filepos (section, segment)
-     asection *section;
-     Elf_Internal_Phdr *segment;
-{
-  return ((bfd_vma) section->filepos >= segment->p_offset
-          && ((bfd_vma) section->filepos + section->_raw_size
-	      <= SEGMENT_END (segment, segment->p_offset)));
-}
-
-static void
-elf_i386qnx_set_nonloadable_filepos (abfd, phdrs)
-     bfd *abfd;
-     Elf_Internal_Phdr *phdrs;
-{
-  struct elf_segment_map *m;
-  Elf_Internal_Phdr *p;
-  file_ptr off = 0;
-
-  for (m = elf_tdata (abfd)->segment_map, p = phdrs;
-       m != NULL;
-       m = m->next, p++)
-    {
-      unsigned int i;
-      asection **secpp;
-
-      for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
-        {
-          asection *sec;
-
-          sec = *secpp;
-
-          if (p->p_type == PT_LOAD)
-	    off = sec->filepos;
-          else
-            {
-              if (i == 0)
-                {
-                  if (sec->filepos)
-                    p->p_offset = sec->filepos;
-                  else
-                    p->p_offset = off;
-                }
-              if (!sec->filepos)
-                {
-                  off += sec->_raw_size;
-                  p->p_filesz += sec->_raw_size;
-                }
-            }
-        }
-    }
-  return;
-}
+#include "elf32-qnx.h"
 
 #undef  TARGET_LITTLE_SYM
 #define TARGET_LITTLE_SYM		    bfd_elf32_i386qnx_vec
 
-#define elf_backend_set_nonloadable_filepos elf_i386qnx_set_nonloadable_filepos
-#define elf_backend_is_contained_by_filepos elf_i386qnx_is_contained_by_filepos
-#define elf_backend_copy_private_bfd_data_p elf_i386qnx_copy_private_bfd_data_p
-
 #include "elf32-target.h"
+
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index 82c7190..f8ab971 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -831,9 +831,6 @@
 /* Relocate an i860 ELF section.
 
    This is boiler-plate code copied from fr30.
-   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.
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
new file mode 100644
index 0000000..0194646
--- /dev/null
+++ b/bfd/elf32-ip2k.c
@@ -0,0 +1,1692 @@
+/* Ubicom IP2xxx specific support for 32-bit ELF
+   Copyright 2000, 2001, 2002 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/ip2k.h"
+
+/* Struct used to pass miscellaneous paramaters which
+   helps to avoid overly long parameter lists.  */
+struct misc
+{
+  Elf_Internal_Shdr *  symtab_hdr;
+  Elf_Internal_Rela *  irelbase;
+  bfd_byte *           contents;
+  Elf_Internal_Sym *   isymbuf;
+};
+
+/* Prototypes.  */
+static reloc_howto_type *    ip2k_reloc_type_lookup               PARAMS ((bfd *, bfd_reloc_code_real_type));
+static void                  ip2k_info_to_howto_rela              PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
+static asection *            ip2k_elf_gc_mark_hook                PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static boolean               ip2k_elf_gc_sweep_hook               PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
+static bfd_vma               symbol_value                         PARAMS ((bfd *, Elf_Internal_Shdr *, Elf32_Internal_Sym *, Elf_Internal_Rela *));
+static void                  adjust_all_relocations               PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, int, int));
+static boolean               ip2k_elf_relax_delete_bytes          PARAMS ((bfd *, asection *, bfd_vma, int));
+static boolean               ip2k_elf_relax_add_bytes             PARAMS ((bfd *, asection *, bfd_vma, const bfd_byte *, int, int));
+static boolean               add_page_insn                        PARAMS ((bfd *, asection *, Elf_Internal_Rela *, struct misc *));
+static boolean               ip2k_elf_relax_section               PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
+static boolean               relax_switch_dispatch_tables_pass1   PARAMS ((bfd *, asection *, bfd_vma, struct misc *));
+static boolean               unrelax_dispatch_table_entries       PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, boolean *, struct misc *));
+static boolean               unrelax_switch_dispatch_tables_passN PARAMS ((bfd *, asection *, bfd_vma, boolean *, struct misc *));
+static boolean               is_switch_128_dispatch_table_p       PARAMS ((bfd *, bfd_vma, boolean, struct misc *));
+static boolean               is_switch_256_dispatch_table_p       PARAMS ((bfd *, bfd_vma, boolean, struct misc *));
+static boolean               ip2k_elf_relax_section_pass1         PARAMS ((bfd *, asection *, boolean *, struct misc *));
+static boolean               ip2k_elf_relax_section_passN         PARAMS ((bfd *, asection *, boolean *, boolean *, struct misc *));
+static bfd_reloc_status_type ip2k_final_link_relocate             PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma));
+static boolean               ip2k_elf_relocate_section            PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+
+#define IS_OPCODE(CODE0,CODE1,OPCODE) \
+  ((CODE0) == (OPCODE)[0] && (CODE1) == (OPCODE)[1])
+
+#define PAGE_INSN_0		0x00
+#define PAGE_INSN_1		0x10
+
+static const bfd_byte page_opcode[] =
+{
+   PAGE_INSN_0, PAGE_INSN_1
+};
+
+#define IS_PAGE_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, page_opcode)
+
+#define JMP_INSN_0		0xE0
+#define JMP_INSN_1		0x00
+
+static const bfd_byte jmp_opcode[] =
+{
+   JMP_INSN_0, JMP_INSN_1
+};
+
+#define IS_JMP_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, jmp_opcode)
+
+#define CALL_INSN_0		0xC0
+#define CALL_INSN_1		0x00
+
+static const bfd_byte call_opcode[] =
+{
+  CALL_INSN_0, CALL_INSN_1
+};
+
+#define IS_CALL_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, call_opcode)
+
+#define ADD_PCL_W_INSN_0	0x1E
+#define ADD_PCL_W_INSN_1	0x09
+
+static const bfd_byte add_pcl_w_opcode[] =
+{
+  ADD_PCL_W_INSN_0, ADD_PCL_W_INSN_1
+};
+
+#define IS_ADD_PCL_W_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_pcl_w_opcode)
+
+#define ADD_W_WREG_INSN_0	0x1C
+#define ADD_W_WREG_INSN_1	0x0A
+
+static const bfd_byte add_w_wreg_opcode[] =
+{
+  ADD_W_WREG_INSN_0, ADD_W_WREG_INSN_1
+};
+
+#define IS_ADD_W_WREG_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_w_wreg_opcode)
+
+#define SNC_INSN_0		0xA0
+#define SNC_INSN_1		0x0B
+
+static const bfd_byte snc_opcode[] =
+{
+   SNC_INSN_0, SNC_INSN_1
+};
+
+#define IS_SNC_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, snc_opcode)
+
+#define INC_1_SP_INSN_0		0x2B
+#define INC_1_SP_INSN_1		0x81
+
+static const bfd_byte inc_1_sp_opcode[] =
+{
+   INC_1_SP_INSN_0, INC_1_SP_INSN_1
+};
+
+#define IS_INC_1_SP_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, inc_1_sp_opcode)
+
+#define ADD_2_SP_W_INSN_0	0x1F
+#define ADD_2_SP_W_INSN_1	0x82
+
+static const bfd_byte add_2_sp_w_opcode[] =
+{
+   ADD_2_SP_W_INSN_0, ADD_2_SP_W_INSN_1
+};
+
+#define IS_ADD_2_SP_W_OPCODE(CODE0,CODE1) \
+  IS_OPCODE (CODE0, CODE1, add_2_sp_w_opcode)
+
+/* Relocation tables. */
+static reloc_howto_type ip2k_elf_howto_table [] =
+{
+#define IP2K_HOWTO(t,rs,s,bs,pr,bp,name,sm,dm) \
+    HOWTO(t,                    /* type */ \
+          rs,                   /* rightshift */ \
+          s,                    /* size (0 = byte, 1 = short, 2 = long) */ \
+          bs,                   /* bitsize */ \
+          pr,                   /* pc_relative */ \
+          bp,                   /* bitpos */ \
+          complain_overflow_dont,/* complain_on_overflow */ \
+          bfd_elf_generic_reloc,/* special_function */ \
+          name,                 /* name */ \
+          false,                /* partial_inplace */ \
+          sm,                   /* src_mask */ \
+          dm,                   /* dst_mask */ \
+          pr)                   /* pcrel_offset */
+
+  /* This reloc does nothing. */
+  IP2K_HOWTO (R_IP2K_NONE, 0,2,32, false, 0, "R_IP2K_NONE", 0, 0), 
+  /* A 16 bit absolute relocation.  */
+  IP2K_HOWTO (R_IP2K_16, 0,1,16, false, 0, "R_IP2K_16", 0, 0xffff),
+  /* A 32 bit absolute relocation.  */
+  IP2K_HOWTO (R_IP2K_32, 0,2,32, false, 0, "R_IP2K_32", 0, 0xffffffff),
+  /* A 8-bit data relocation for the FR9 field.  Ninth bit is computed specially.  */
+  IP2K_HOWTO (R_IP2K_FR9, 0,1,9, false, 0, "R_IP2K_FR9", 0, 0x00ff),
+  /* A 4-bit data relocation.  */
+  IP2K_HOWTO (R_IP2K_BANK, 8,1,4, false, 0, "R_IP2K_BANK", 0, 0x000f),
+  /* A 13-bit insn relocation - word address => right-shift 1 bit extra.  */
+  IP2K_HOWTO (R_IP2K_ADDR16CJP, 1,1,13, false, 0, "R_IP2K_ADDR16CJP", 0, 0x1fff),
+  /* A 3-bit insn relocation - word address => right-shift 1 bit extra.  */
+  IP2K_HOWTO (R_IP2K_PAGE3, 14,1,3, false, 0, "R_IP2K_PAGE3", 0, 0x0007),
+  /* Two 8-bit data relocations.  */
+  IP2K_HOWTO (R_IP2K_LO8DATA, 0,1,8, false, 0, "R_IP2K_LO8DATA", 0, 0x00ff),
+  IP2K_HOWTO (R_IP2K_HI8DATA, 8,1,8, false, 0, "R_IP2K_HI8DATA", 0, 0x00ff),
+  /* Two 8-bit insn relocations.  word address => right-shift 1 bit extra.  */
+  IP2K_HOWTO (R_IP2K_LO8INSN, 1,1,8, false, 0, "R_IP2K_LO8INSN", 0, 0x00ff),
+  IP2K_HOWTO (R_IP2K_HI8INSN, 9,1,8, false, 0, "R_IP2K_HI8INSN", 0, 0x00ff),
+
+  /* Special 1 bit relocation for SKIP instructions.  */
+  IP2K_HOWTO (R_IP2K_PC_SKIP, 1,1,1, false, 12, "R_IP2K_PC_SKIP", 0xfffe, 0x1000),
+  /* 16 bit word address.  */
+  IP2K_HOWTO (R_IP2K_TEXT, 1,1,16, false, 0, "R_IP2K_TEXT", 0, 0xffff),
+  /* A 7-bit offset relocation for the FR9 field.  Eigth and ninth bit comes from insn.  */
+  IP2K_HOWTO (R_IP2K_FR_OFFSET, 0,1,9, false, 0, "R_IP2K_FR_OFFSET", 0x180, 0x007f),
+  /* Bits 23:16 of an address.  */
+  IP2K_HOWTO (R_IP2K_EX8DATA, 16,1,8, false, 0, "R_IP2K_EX8DATA", 0, 0x00ff),
+};
+
+
+/* Map BFD reloc types to IP2K ELF reloc types. */
+static reloc_howto_type *
+ip2k_reloc_type_lookup (abfd, code)
+     bfd * abfd ATTRIBUTE_UNUSED;
+     bfd_reloc_code_real_type code;
+{
+  /* Note that the ip2k_elf_howto_table is indxed by the R_
+     constants.  Thus, the order that the howto records appear in the
+     table *must* match the order of the relocation types defined in
+     include/elf/ip2k.h. */
+
+  switch (code)
+    {
+    case BFD_RELOC_NONE:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_NONE];
+    case BFD_RELOC_16:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_16];
+    case BFD_RELOC_32:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_32];
+    case BFD_RELOC_IP2K_FR9:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_FR9];
+    case BFD_RELOC_IP2K_BANK:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_BANK];
+    case BFD_RELOC_IP2K_ADDR16CJP:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_ADDR16CJP];
+    case BFD_RELOC_IP2K_PAGE3:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_PAGE3];
+    case BFD_RELOC_IP2K_LO8DATA:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_LO8DATA];
+    case BFD_RELOC_IP2K_HI8DATA:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_HI8DATA];
+    case BFD_RELOC_IP2K_LO8INSN:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_LO8INSN];
+    case BFD_RELOC_IP2K_HI8INSN:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_HI8INSN];
+    case BFD_RELOC_IP2K_PC_SKIP:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_PC_SKIP];
+    case BFD_RELOC_IP2K_TEXT:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_TEXT];
+    case BFD_RELOC_IP2K_FR_OFFSET:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_FR_OFFSET];
+    case BFD_RELOC_IP2K_EX8DATA:
+      return &ip2k_elf_howto_table[ (int) R_IP2K_EX8DATA];
+    default:
+      /* Pacify gcc -Wall. */
+      return NULL;
+    }
+  return NULL;
+}
+
+#define PAGENO(ABSADDR) ((ABSADDR) & 0x1C000)
+#define BASEADDR(SEC)	((SEC)->output_section->vma + (SEC)->output_offset)
+
+#define UNDEFINED_SYMBOL (~(bfd_vma)0)
+
+/* Return the value of the symbol associated with the relocation IREL.  */
+
+static bfd_vma
+symbol_value (abfd, symtab_hdr, isymbuf, irel)
+     bfd *abfd;
+     Elf_Internal_Shdr *symtab_hdr;
+     Elf32_Internal_Sym *isymbuf;
+     Elf_Internal_Rela *irel;   
+{
+  if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+    {
+      Elf_Internal_Sym *isym;
+      asection *sym_sec;
+
+      isym = isymbuf + ELF32_R_SYM (irel->r_info);
+      if (isym->st_shndx == SHN_UNDEF)
+	sym_sec = bfd_und_section_ptr;
+      else if (isym->st_shndx == SHN_ABS)
+	sym_sec = bfd_abs_section_ptr;
+      else if (isym->st_shndx == SHN_COMMON)
+	sym_sec = bfd_com_section_ptr;
+      else
+	sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+
+      return isym->st_value + BASEADDR (sym_sec);
+    }
+  else
+    {
+      unsigned long indx;
+      struct elf_link_hash_entry *h;
+
+      indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+      h = elf_sym_hashes (abfd)[indx];
+      BFD_ASSERT (h != NULL);
+
+      if (h->root.type != bfd_link_hash_defined
+	  && h->root.type != bfd_link_hash_defweak)
+	return UNDEFINED_SYMBOL;
+
+      return (h->root.u.def.value + BASEADDR (h->root.u.def.section));
+    }
+}
+
+/* Determine if the instruction sequence matches that for
+   the prologue of a switch dispatch table with fewer than
+   128 entries.
+ 
+          sc
+          page    $nnn0
+          jmp     $nnn0
+          add     w,wreg
+          add     pcl,w
+  addr=>
+          page    $nnn1
+          jmp     $nnn1
+ 	   page    $nnn2
+ 	   jmp     $nnn2
+ 	   ...
+ 	   page    $nnnN
+ 	   jmp     $nnnN
+ 
+  After relaxation.
+  	   sc
+ 	   page    $nnn0
+  	   jmp     $nnn0
+ 	   add     pcl,w
+  addr=>
+  	   jmp     $nnn1
+ 	   jmp     $nnn2
+ 	   ...
+          jmp     $nnnN  */
+
+static boolean 
+is_switch_128_dispatch_table_p (abfd, addr, relaxed, misc)
+     bfd *abfd ATTRIBUTE_UNUSED;                
+     bfd_vma addr;
+     boolean relaxed;
+     struct misc *misc;
+{
+  bfd_byte code0, code1;
+
+  if (addr < (3 * 2))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+
+  /* Is it ADD PCL,W */
+  if (! IS_ADD_PCL_W_OPCODE (code0, code1))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
+
+  if (relaxed)
+    /* Is it ADD W,WREG  */
+    return ! IS_ADD_W_WREG_OPCODE (code0, code1);
+
+  else
+    {
+      /* Is it ADD W,WREG  */
+      if (! IS_ADD_W_WREG_OPCODE (code0, code1))
+	return false;
+
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
+
+      /* Is it JMP $nnnn  */
+      if (! IS_JMP_OPCODE (code0, code1))
+        return false;
+    }
+
+  /* It looks like we've found the prologue for
+     a 1-127 entry switch dispatch table.  */
+  return true;
+}
+
+/* Determine if the instruction sequence matches that for
+   the prologue switch dispatch table with fewer than
+   256 entries but more than 127.
+ 
+   Before relaxation.
+          push    %lo8insn(label) ; Push address of table
+          push    %hi8insn(label)
+          add     w,wreg          ; index*2 => offset
+          snc                     ; CARRY SET?
+          inc     1(sp)           ; Propagate MSB into table address
+          add     2(sp),w         ; Add low bits of offset to table address
+          snc                     ; and handle any carry-out
+          inc     1(sp)
+   addr=>
+          page    __indjmp        ; Do an indirect jump to that location
+          jmp     __indjmp
+   label:                         ; case dispatch table starts here
+ 	   page    $nnn1
+ 	   jmp	   $nnn1
+ 	   page	   $nnn2
+ 	   jmp     $nnn2
+ 	   ...
+ 	   page    $nnnN
+ 	   jmp	   $nnnN
+ 
+  After relaxation.
+          push    %lo8insn(label) ; Push address of table
+          push    %hi8insn(label)
+          add     2(sp),w         ; Add low bits of offset to table address
+          snc                     ; and handle any carry-out
+          inc     1(sp)
+  addr=>
+          page    __indjmp        ; Do an indirect jump to that location
+          jmp     __indjmp
+   label:                         ; case dispatch table starts here
+          jmp     $nnn1
+          jmp     $nnn2
+          ...
+          jmp     $nnnN  */
+
+static boolean 
+is_switch_256_dispatch_table_p (abfd, addr, relaxed,  misc)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     bfd_vma addr;
+     boolean relaxed;
+     struct misc *misc;
+{
+  bfd_byte code0, code1;
+
+  if (addr < (8 * 2))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+
+  /* Is it INC 1(SP).  */
+  if (! IS_INC_1_SP_OPCODE (code0, code1))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 4);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 3);
+
+  /* Is it SNC.  */
+  if (! IS_SNC_OPCODE (code0, code1))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 6);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 5);
+
+  /* Is it ADD 2(SP),W.  */
+  if (! IS_ADD_2_SP_W_OPCODE (code0, code1))
+    return false;
+
+  code0 = bfd_get_8 (abfd, misc->contents + addr - 8);
+  code1 = bfd_get_8 (abfd, misc->contents + addr - 7);
+
+  if (relaxed)
+    /* Is it INC 1(SP).  */
+    return ! IS_INC_1_SP_OPCODE (code0, code1);
+
+  else
+    {
+      /* Is it INC 1(SP).  */
+      if (! IS_INC_1_SP_OPCODE (code0, code1))
+	return false;
+
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 10);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 9);
+ 
+      /* Is it SNC.  */
+      if (! IS_SNC_OPCODE (code0, code1))
+        return false;
+
+      code0 = bfd_get_8 (abfd, misc->contents + addr - 12);
+      code1 = bfd_get_8 (abfd, misc->contents + addr - 11);
+
+      /* Is it ADD W,WREG.  */
+      if (! IS_ADD_W_WREG_OPCODE (code0, code1))
+	return false;
+    }
+
+  /* It looks like we've found the prologue for
+     a 128-255 entry switch dispatch table.  */
+  return true;
+}
+
+static boolean
+relax_switch_dispatch_tables_pass1 (abfd, sec, addr, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     struct misc *misc;
+{
+  if (addr + 3 < sec->_cooked_size)
+    {
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
+
+      if (IS_JMP_OPCODE (code0, code1)
+	  && is_switch_128_dispatch_table_p (abfd, addr, false, misc))
+	{
+	  /* Delete ADD W,WREG from prologue.  */
+	  ip2k_elf_relax_delete_bytes (abfd, sec, addr - (2 * 2), (1 * 2));
+	  return true;
+	}
+
+      if (IS_JMP_OPCODE (code0, code1)
+	  && is_switch_256_dispatch_table_p (abfd, addr, false, misc))
+	{
+	  /* Delete ADD W,WREG; SNC ; INC 1(SP) from prologue.  */
+	  ip2k_elf_relax_delete_bytes (abfd, sec, addr - 6 * 2, 3 * 2);
+	  return true;
+	}
+    }
+ 
+  return true;
+}
+
+static boolean
+unrelax_dispatch_table_entries (abfd, sec, first, last, changed, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma first;
+     bfd_vma last;
+     boolean *changed;
+     struct misc *misc;
+{
+  bfd_vma addr = first;
+
+  while (addr < last)
+    {
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
+
+      /* We are only expecting to find PAGE or JMP insns
+         in the dispatch table. If we find anything else
+         something has gone wrong failed the relaxation
+         which will cause the link to be aborted.  */
+
+      if (IS_PAGE_OPCODE (code0, code1))
+	/* Skip the PAGE and JMP insns.  */
+        addr += 4;
+      else if (IS_JMP_OPCODE (code0, code1))
+         {
+            Elf_Internal_Rela * irelend = misc->irelbase
+					  + sec->reloc_count;
+            Elf_Internal_Rela * irel;
+
+            /* Find the relocation entry.  */
+            for (irel = misc->irelbase; irel < irelend; irel++)
+               {
+                  if (irel->r_offset == addr
+                      && ELF32_R_TYPE (irel->r_info) == R_IP2K_ADDR16CJP)
+                    {
+                      if (! add_page_insn (abfd, sec, irel, misc))
+			/* Something has gone wrong.  */
+                        return false;
+
+		      *changed = true;
+		      break;
+                    }
+               }
+
+	    /* If we fell off the end something has gone wrong.  */
+	    if (irel >= irelend)
+	      /* Something has gone wrong.  */
+	      return false;
+
+	    /* Skip the PAGE and JMP isns.  */
+	    addr += 4;
+	    /* Acount for the new PAGE insn.  */
+            last += 2;
+          }
+       else
+	 /* Something has gone wrong.  */
+	 return false;
+    }
+
+  return true;
+}
+
+static boolean 
+unrelax_switch_dispatch_tables_passN (abfd, sec, addr, changed, misc)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     boolean *changed;
+     struct misc *misc;
+{
+  if (2 <= addr && (addr + 3) < sec->_cooked_size)
+    {
+      bfd_byte code0 = bfd_get_8 (abfd, misc->contents + addr - 2);
+      bfd_byte code1 = bfd_get_8 (abfd, misc->contents + addr - 1);
+
+      if (IS_PAGE_OPCODE (code0, code1))
+	{
+	  addr -= 2;
+	  code0 = bfd_get_8 (abfd, misc->contents + addr + 2);
+          code1 = bfd_get_8 (abfd, misc->contents + addr + 3);
+	}
+      else
+	{
+	  code0 = bfd_get_8 (abfd, misc->contents + addr);
+	  code1 = bfd_get_8 (abfd, misc->contents + addr + 1);
+	}
+
+      if (IS_JMP_OPCODE (code0, code1)
+          && is_switch_128_dispatch_table_p (abfd, addr, true, misc))
+        {
+	  bfd_vma first = addr;
+	  bfd_vma last  = first;
+	  boolean relaxed = true;
+
+	  /* On the final pass we must check if *all* entries in the
+	     dispatch table are relaxed. If *any* are not relaxed
+	     then we must unrelax *all* the entries in the dispach
+	     table and also unrelax the dispatch table prologue.  */
+
+	  /* Find the last entry in the dispach table.  */
+	  while (last < sec->_cooked_size)
+	     {
+	        code0 = bfd_get_8 (abfd, misc->contents + last);
+	        code1 = bfd_get_8 (abfd, misc->contents + last + 1);
+
+		if (IS_PAGE_OPCODE (code0, code1))
+		  relaxed = false;
+		else if (! IS_JMP_OPCODE (code0, code1))
+		    break;
+
+	        last += 2;
+	     }
+
+	  /* We should have found the end of the dispatch table
+	     before reaching the end of the section. If we've have
+	     reached the end then fail the relaxation which will
+	     cause the link to be aborted.  */
+	  if (last >= sec->_cooked_size)
+	    /* Something has gone wrong.  */
+	    return false;
+
+	  /* If we found an unrelaxed entry then
+	     unlrelax all the switch table entries.  */
+	  if (! relaxed )
+	    {
+	      if (! unrelax_dispatch_table_entries (abfd, sec, first,
+						    last, changed, misc))
+		/* Something has gone wrong.  */
+	        return false;
+
+	      if (! is_switch_128_dispatch_table_p (abfd, addr, true, misc))
+		/* Something has gone wrong.  */
+		return false;
+		
+              /* Unrelax the prologue.  */
+
+              /* Insert an ADD W,WREG insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					      addr - 2,
+					      add_w_wreg_opcode,
+					      sizeof (add_w_wreg_opcode),
+					      0))
+		/* Something has gone wrong.  */
+                return false;
+	    }
+
+          return true;
+        }
+
+      if (IS_JMP_OPCODE (code0, code1)
+          && is_switch_256_dispatch_table_p (abfd, addr, true, misc))
+        {
+          bfd_vma first = addr;
+          bfd_vma last;
+          boolean relaxed = true;
+
+          /* On the final pass we must check if *all* entries in the
+             dispatch table are relaxed. If *any* are not relaxed
+             then we must unrelax *all* the entries in the dispach
+             table and also unrelax the dispatch table prologue.  */
+
+	  /* Note the 1st PAGE/JMP instructions are part of the
+	     prologue and can safely be relaxed.  */
+
+          code0 = bfd_get_8 (abfd, misc->contents + first);
+          code1 = bfd_get_8 (abfd, misc->contents + first + 1);
+
+	  if (IS_PAGE_OPCODE (code0, code1))
+	    {
+	      first += 2;
+              code0 = bfd_get_8 (abfd, misc->contents + first);
+              code1 = bfd_get_8 (abfd, misc->contents + first + 1);
+	    }
+
+          if (! IS_JMP_OPCODE (code0, code1))
+	    /* Something has gone wrong.  */
+	    return false;
+
+          first += 2;
+	  last = first; 
+
+          /* Find the last entry in the dispach table.  */
+          while (last < sec->_cooked_size)
+             {
+                code0 = bfd_get_8 (abfd, misc->contents + last);
+                code1 = bfd_get_8 (abfd, misc->contents + last + 1);
+
+                if (IS_PAGE_OPCODE (code0, code1))
+                  relaxed = false;
+                else if (! IS_JMP_OPCODE (code0, code1))
+                    break;
+
+                last += 2;
+             }
+
+          /* We should have found the end of the dispatch table
+             before reaching the end of the section. If we have
+             reached the end of the section then fail the
+	     relaxation.  */
+          if (last >= sec->_cooked_size)
+            return false;
+
+          /* If we found an unrelaxed entry then
+              unrelax all the switch table entries.  */
+          if (! relaxed)
+	    {
+	      if (! unrelax_dispatch_table_entries (abfd, sec, first,
+						    last, changed, misc))
+		return false;
+
+              if (! is_switch_256_dispatch_table_p (abfd, addr, true, misc))
+		return false;
+
+              /* Unrelax the prologue.  */
+
+              /* Insert an INC 1(SP) insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+                                              addr - 6,
+                                              inc_1_sp_opcode,
+                                              sizeof (inc_1_sp_opcode),
+					      0))
+		return false;
+
+              /* Insert an SNC insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					      addr - 6,
+					      snc_opcode,
+					      sizeof (snc_opcode),
+					      0))
+		return false;
+
+	      /* Insert an ADD W,WREG insnstruction.  */
+              if (! ip2k_elf_relax_add_bytes (abfd, sec,
+					     addr - 6,
+				 	     add_w_wreg_opcode,
+					     sizeof (add_w_wreg_opcode),
+					     0))
+		return false;
+	    }
+
+          return true;
+        }
+    }
+
+  return true;
+}
+
+/* This function handles relaxing for the ip2k.  */
+
+static boolean
+ip2k_elf_relax_section (abfd, sec, link_info, again)
+     bfd *abfd;
+     asection *sec;
+     struct bfd_link_info *link_info;
+     boolean *again;
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  Elf_Internal_Rela *internal_relocs;
+  bfd_byte *contents = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
+  static asection * first_section = NULL;
+  static asection * last_section = NULL;
+  static boolean changed = false;
+  static boolean final_pass = false;
+  static unsigned int pass = 0;
+  struct misc misc;
+  asection *stab;
+
+  /* Assume nothing changes.  */
+  *again = false;
+
+  if (first_section == NULL)
+    first_section = sec;
+
+  if (first_section == sec)
+    {
+      changed = false;
+      pass++;
+    }
+
+  /* If we make too many passes then it's a sign that
+     something is wrong and we fail the relaxation.
+     Note if everything is working correctly then the
+     relaxation should converge reasonably quickly.  */
+  if (pass == 4096)
+    return false;
+
+  /* We don't have to do anything for a relocatable link,
+     if this section does not have relocs, or if this is
+     not a code section.  */
+  if (link_info->relocateable
+      || (sec->flags & SEC_RELOC) == 0
+      || sec->reloc_count == 0
+      || (sec->flags & SEC_CODE) == 0)
+    return true;
+
+  if (pass == 1)
+    last_section = sec;
+
+  /* If this is the first time we have been called
+      for this section, initialise the cooked size.  */
+  if (sec->_cooked_size == 0)
+    sec->_cooked_size = sec->_raw_size;
+
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+  internal_relocs = _bfd_elf32_link_read_relocs (abfd, sec, NULL,
+						 (Elf_Internal_Rela *)NULL,
+						 link_info->keep_memory);
+  if (internal_relocs == NULL)
+    goto error_return;
+
+  /* Make sure the stac.rela stuff gets read in.  */
+  stab = bfd_get_section_by_name (abfd, ".stab");
+
+  if (stab)
+    {
+      /* So stab does exits.  */
+      Elf_Internal_Rela * irelbase;
+
+      irelbase = _bfd_elf32_link_read_relocs (abfd, stab, NULL,
+					      (Elf_Internal_Rela *)NULL,
+					      link_info->keep_memory);
+    }
+
+  /* Get section contents cached copy if it exists.  */
+  if (contents == NULL)
+    {
+      /* Get cached copy if it exists.  */
+      if (elf_section_data (sec)->this_hdr.contents != NULL)
+	contents = elf_section_data (sec)->this_hdr.contents;
+      else
+	{
+	  /* Go get them off disk.  */
+	  contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+	  if (contents == NULL)
+	    goto error_return;
+
+	  if (! bfd_get_section_contents (abfd, sec, contents,
+					  (file_ptr) 0, sec->_raw_size))
+	    goto error_return;
+	}
+    }
+      
+  /* Read this BFD's symbols cached copy if it exists.  */
+  if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+    {
+      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+      if (isymbuf == NULL)
+	isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					symtab_hdr->sh_info, 0,
+					NULL, NULL, NULL);
+      if (isymbuf == NULL)
+	goto error_return;
+    }
+
+  misc.symtab_hdr = symtab_hdr;
+  misc.isymbuf = isymbuf;
+  misc.irelbase = internal_relocs;
+  misc.contents = contents;
+  
+  /* This is where all the relaxation actually get done.  */
+
+  if (pass == 1)
+    {
+      /* On the first pass we remove *all* page instructions and
+         relax the prolog for switch dispatch tables. This gets
+	 us to the starting point for subsequent passes where
+	 we add page instructions back in as needed.  */
+
+      if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, &misc))
+	goto error_return;
+
+      changed |= *again;
+    }
+  else
+    {
+      /* Add page instructions back in as needed but we ignore 
+	 the issue with sections (functions) crossing a page
+	 boundary until we have converged to an approximate
+	 solution (i.e. nothing has changed on this relaxation
+	 pass) and we then know roughly where the page boundaries
+	 will end up.
+
+	 After we have have converged to an approximate solution
+	 we set the final pass flag and continue relaxing. On these
+	 final passes if a section (function) cross page boundary
+	 we will add *all* the page instructions back into such
+	 sections.
+
+	 After adding *all* page instructions back into a section
+	 which crosses a page bounbdary we reset the final pass flag
+	 so the we will again interate until we find a new approximate
+	 solution which is closer to the final solution.  */
+
+      if (! ip2k_elf_relax_section_passN (abfd, sec, again, &final_pass,
+					  &misc))
+	goto error_return;
+
+      changed |= *again;
+
+      /* If nothing has changed on this relaxation
+	  pass restart the final relaxaton pass.  */
+      if (! changed && last_section == sec)
+	{
+	  /* If this was the final pass and we didn't reset 
+	     the final pass flag then we are done, otherwise
+	     do another final pass.  */
+	  if (! final_pass)
+	    {
+	      final_pass = true;
+	      *again = true;
+	    }
+	}
+    }
+
+  /* Perform some house keeping after relaxing the section.  */  
+
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    {
+      if (! link_info->keep_memory)
+	free (isymbuf);
+      else
+	symtab_hdr->contents = (unsigned char *) isymbuf;
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
+      else
+	{
+	  /* Cache the section contents for elf_link_input_bfd.  */
+	  elf_section_data (sec)->this_hdr.contents = contents;
+	}
+    }
+
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+
+  return true;
+
+ error_return:
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+  return false;
+}
+
+/* This function handles relaxation during the first pass.  */
+
+static boolean
+ip2k_elf_relax_section_pass1 (abfd, sec, again, misc)
+     bfd *abfd;
+     asection *sec;
+     boolean *again;
+     struct misc * misc;
+{
+  Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
+  Elf_Internal_Rela *irel;
+
+  /* Walk thru the section looking for relaxation opertunities.  */
+  for (irel = misc->irelbase; irel < irelend; irel++)
+    {
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_PAGE3)
+      {
+	bfd_byte code0 = bfd_get_8 (abfd,
+				    misc->contents + irel->r_offset);
+	bfd_byte code1 = bfd_get_8 (abfd,
+				    misc->contents + irel->r_offset + 1);
+
+        /* Verify that this is the PAGE opcode.  */
+        if (IS_PAGE_OPCODE (code0, code1))
+	  {
+	    /* Note that we've changed the relocs, section contents, etc.  */
+	    elf_section_data (sec)->relocs = misc->irelbase;
+	    elf_section_data (sec)->this_hdr.contents = misc->contents;
+	    misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
+
+	    /* Handle switch dispatch tables/prologues.  */
+	    if (!  relax_switch_dispatch_tables_pass1 (abfd, sec,
+						       irel->r_offset, misc))
+	      return false;
+	    
+	    /* Fix the relocation's type.  */
+	    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+				         R_IP2K_NONE);
+
+	    /* Delete the PAGE insn.  */
+	    if (! ip2k_elf_relax_delete_bytes (abfd, sec,
+					       irel->r_offset,
+					       sizeof (page_opcode)))
+	      return false;
+
+	    /* That will change things, so, we should relax again.
+	       Note that this is not required, and it may be slow.  */
+	    *again = true;
+	  }
+      }
+    }
+
+  return true;
+}
+
+/* This function handles relaxation for 2nd and subsequent passes.  */
+
+static boolean
+ip2k_elf_relax_section_passN (abfd, sec, again, final_pass, misc)
+     bfd *abfd;
+     asection *sec;
+     boolean *again;
+     boolean *final_pass;
+     struct misc * misc;
+{
+  Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count;
+  Elf_Internal_Rela *irel;
+  boolean add_all;
+
+  /* If we are on the final relaxation pass and the section crosses
+     then set a flag to indicate that *all* page instructions need
+     to be added back into this section.  */
+  if (*final_pass)
+    {
+      add_all = (PAGENO (BASEADDR (sec))
+	         != PAGENO (BASEADDR (sec) + sec->_cooked_size));
+
+      /* If this section crosses a page boundary set the crossed
+	 page boundary flag.  */
+      if (add_all)
+	sec->userdata = sec;
+      else
+	{
+	  /* If the section had previously crossed a page boundary
+	     but on this pass does not then reset crossed page
+	     boundary flag and rerun the 1st relaxation pass on
+	     this section.  */
+	  if (sec->userdata)
+	    {
+	      sec->userdata = NULL;
+	      if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, misc))
+		return false;
+	    }
+	}
+    }
+  else
+    add_all = false;
+
+  /* Walk thru the section looking for call/jmp
+      instructions which need a page instruction.  */
+  for (irel = misc->irelbase; irel < irelend; irel++)
+    {
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_ADDR16CJP)
+      {
+        /* Get the value of the symbol referred to by the reloc.  */
+        bfd_vma symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf,
+				       irel);
+	bfd_byte code0, code1;
+
+        if (symval == UNDEFINED_SYMBOL)
+	  {
+	    /* This appears to be a reference to an undefined
+	       symbol.  Just ignore it--it will be caught by the
+	       regular reloc processing.  */
+	    continue;
+	  }
+
+        /* For simplicity of coding, we are going to modify the section
+	   contents, the section relocs, and the BFD symbol table.  We
+	   must tell the rest of the code not to free up this
+	   information.  It would be possible to instead create a table
+	   of changes which have to be made, as is done in coff-mips.c;
+	   that would be more work, but would require less memory when
+	   the linker is run.  */
+
+	/* Get the opcode.  */
+	code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
+	code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
+
+	if (IS_JMP_OPCODE (code0, code1) || IS_CALL_OPCODE (code0, code1))
+	  {
+	    if (*final_pass)
+	      {
+		if (! unrelax_switch_dispatch_tables_passN (abfd, sec,
+						            irel->r_offset,
+                                                            again, misc))
+		  return false;
+
+                if (*again)
+		  add_all = false;
+	      }
+
+	    code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 2);
+	    code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset - 1);
+
+	    if (! IS_PAGE_OPCODE (code0, code1))
+	      {
+		bfd_vma value = symval + irel->r_addend;
+		bfd_vma addr  = BASEADDR (sec) + irel->r_offset;
+
+		if (add_all || PAGENO (addr) != PAGENO (value))
+		  {
+		    if (! add_page_insn (abfd, sec, irel, misc))
+		      return false;
+
+		    /* That will have changed things, so,  we must relax again.  */
+		    *again = true;
+		  }
+	       }
+	   }
+        }
+    }
+      
+  /* If anything changed reset the final pass flag.  */
+  if (*again)
+    *final_pass = false;
+
+  return true;
+}
+
+/* Parts of a Stabs entry.  */
+
+#define STRDXOFF  (0)
+#define TYPEOFF   (4)
+#define OTHEROFF  (5)
+#define DESCOFF   (6)
+#define VALOFF    (8)
+#define STABSIZE  (12)
+
+/* Adjust all the relocations entries after adding or inserting instructions.  */
+
+static void
+adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     bfd_vma endaddr;
+     int count;
+     int noadj;
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  Elf_Internal_Sym *isymbuf, *isym, *isymend;
+  unsigned int shndx;
+  bfd_byte *contents;
+  Elf_Internal_Rela *irel, *irelend, *irelbase;
+  struct elf_link_hash_entry **sym_hashes;
+  struct elf_link_hash_entry **end_hashes;
+  unsigned int symcount;
+    
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  isymbuf = (Elf32_Internal_Sym *) symtab_hdr->contents;
+
+  shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+  contents = elf_section_data (sec)->this_hdr.contents;
+
+  irelbase = elf_section_data (sec)->relocs;
+  irelend = irelbase + sec->reloc_count;
+
+  for (irel = irelbase; irel < irelend; irel++)
+    {
+      if (ELF32_R_TYPE (irel->r_info) != R_IP2K_NONE)
+        {
+          /* Get the value of the symbol referred to by the reloc.  */
+          if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+            {
+              asection *sym_sec;
+
+              /* A local symbol.  */
+	      isym = isymbuf + ELF32_R_SYM (irel->r_info);
+              sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+
+              if (isym->st_shndx == shndx)
+                {
+                  bfd_vma baseaddr = BASEADDR (sec);
+                  bfd_vma symval = BASEADDR (sym_sec) + isym->st_value
+                                   + irel->r_addend;
+
+                  if ((baseaddr + addr + noadj) <= symval
+                      && symval < (baseaddr + endaddr))
+                    irel->r_addend += count;
+                }
+            }
+        }
+
+      /* Do this only for PC space relocations.  */
+      if (addr <= irel->r_offset && irel->r_offset < endaddr)
+        irel->r_offset += count;
+    }
+
+  /* When adding an instruction back it is sometimes necessary to move any
+     global or local symbol that was referencing the first instruction of
+     the moved block to refer to the first instruction of the inserted block.
+
+     For example adding a PAGE instruction before a CALL or JMP requires
+     that any label on the CALL or JMP is moved to the PAGE insn.  */
+  addr += noadj;
+
+  /* Adjust the local symbols defined in this section.  */
+  isymend = isymbuf + symtab_hdr->sh_info;
+  for (isym = isymbuf; isym < isymend; isym++)
+    {
+      if (isym->st_shndx == shndx
+	  && addr <= isym->st_value
+	  && isym->st_value < endaddr)
+	isym->st_value += count;
+    }
+
+    /* Now adjust the global symbols defined in this section.  */
+  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+	      - symtab_hdr->sh_info);
+  sym_hashes = elf_sym_hashes (abfd);
+  end_hashes = sym_hashes + symcount;
+  for (; sym_hashes < end_hashes; sym_hashes++)
+    {
+      struct elf_link_hash_entry *sym_hash = *sym_hashes;
+      if ((sym_hash->root.type == bfd_link_hash_defined
+	   || sym_hash->root.type == bfd_link_hash_defweak)
+	  && sym_hash->root.u.def.section == sec)
+	{
+          if (addr <= sym_hash->root.u.def.value
+              && sym_hash->root.u.def.value < endaddr)
+            {
+	      sym_hash->root.u.def.value += count;
+            }
+	}
+    }
+
+  return;
+}
+
+static boolean
+add_page_insn (abfd, sec, irel, misc)
+      bfd *abfd;
+      asection *sec;
+      Elf_Internal_Rela *irel;
+      struct misc *misc;
+{
+  /* Note that we've changed the relocs, section contents, etc.  */
+  elf_section_data (sec)->relocs = misc->irelbase;
+  elf_section_data (sec)->this_hdr.contents = misc->contents;
+  misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
+
+  /* Add the PAGE insn.  */
+  if (! ip2k_elf_relax_add_bytes (abfd, sec, irel->r_offset,
+                                  page_opcode,
+                                  sizeof (page_opcode),
+				  sizeof (page_opcode)))
+    return false;
+  else
+    {
+       Elf32_Internal_Rela * jrel = irel - 1;
+
+       /* Add relocation for PAGE insn added.  */
+       if (ELF32_R_TYPE (jrel->r_info) != R_IP2K_NONE)
+	 {
+	   bfd_byte code0, code1;
+	   char *msg = NULL;
+	   
+	   /* Get the opcode.  */
+	   code0 = bfd_get_8 (abfd, misc->contents + irel->r_offset);
+	   code1 = bfd_get_8 (abfd, misc->contents + irel->r_offset + 1);
+
+	   if (IS_JMP_OPCODE (code0, code1))
+	     msg = "\tJMP instruction missing a preceeding PAGE instruction in %s\n\n";
+
+	   else if (IS_CALL_OPCODE (code0, code1))
+	     msg = "\tCALL instruction missing a preceeding PAGE instruction in %s\n\n";
+
+	   if (msg)
+	     {
+	       fprintf (stderr, "\n\t *** LINKER RELAXATION failure ***\n");
+	       fprintf (stderr, msg, sec->owner->filename);
+	     }
+
+	   return false;
+	 }
+
+       jrel->r_addend = irel->r_addend;
+       jrel->r_offset = irel->r_offset - sizeof (page_opcode);
+       jrel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                    R_IP2K_PAGE3);
+     }
+
+   return true;
+}
+
+/* Insert bytes into a section while relaxing.  */
+
+static boolean
+ip2k_elf_relax_add_bytes (abfd, sec, addr, bytes, count, noadj)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     const bfd_byte *bytes;
+     int count;
+     int noadj;
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_vma endaddr = sec->_cooked_size;
+
+  /* Make room to insert the bytes.  */
+  memmove (contents + addr + count, contents + addr, endaddr - addr);
+
+  /* Insert the bytes into the section.  */
+  memcpy  (contents + addr, bytes, count);
+  
+  sec->_cooked_size += count;
+
+  adjust_all_relocations (abfd, sec, addr, endaddr, count, noadj);
+  return true;
+}
+
+/* Delete some bytes from a section while relaxing.  */
+
+static boolean
+ip2k_elf_relax_delete_bytes (abfd, sec, addr, count)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     int count;
+{
+  bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
+  bfd_vma endaddr = sec->_cooked_size;
+
+  /* Actually delete the bytes.  */
+  memmove (contents + addr, contents + addr + count,
+	   endaddr - addr - count);
+
+  sec->_cooked_size -= count;
+
+  adjust_all_relocations (abfd, sec, addr + count, endaddr, -count, 0);
+  return true;
+}
+
+/* -------------------------------------------------------------------- */
+
+/* XXX: The following code is the result of a cut&paste.  This unfortunate
+   practice is very widespread in the various target back-end files.  */
+
+/* Set the howto pointer for a IP2K ELF reloc.  */
+
+static void
+ip2k_info_to_howto_rela (abfd, cache_ptr, dst)
+     bfd * abfd ATTRIBUTE_UNUSED;
+     arelent * cache_ptr;
+     Elf32_Internal_Rela * dst;
+{
+  unsigned int r_type;
+
+  r_type = ELF32_R_TYPE (dst->r_info);
+  switch (r_type)
+    {
+    default:
+      cache_ptr->howto = & ip2k_elf_howto_table [r_type];
+      break;
+    }
+}
+
+/* Perform a single relocation.
+   By default we use the standard BFD routines.  */
+
+static bfd_reloc_status_type
+ip2k_final_link_relocate (howto, input_bfd, input_section, contents, rel,
+			  relocation)
+     reloc_howto_type *  howto;
+     bfd *               input_bfd;
+     asection *          input_section;
+     bfd_byte *          contents;
+     Elf_Internal_Rela * rel;
+     bfd_vma             relocation;
+{
+  bfd_reloc_status_type r = bfd_reloc_ok;
+
+  switch (howto->type)
+    {
+      /* Handle data space relocations.  */
+    case R_IP2K_FR9:
+    case R_IP2K_BANK:
+      if ((relocation & IP2K_DATA_MASK) == IP2K_DATA_VALUE)
+	relocation &= ~IP2K_DATA_MASK;
+      else
+	r = bfd_reloc_notsupported;
+      break;
+
+    case R_IP2K_LO8DATA:
+    case R_IP2K_HI8DATA:
+    case R_IP2K_EX8DATA:
+      break;
+
+      /* Handle insn space relocations.  */
+    case R_IP2K_ADDR16CJP:
+    case R_IP2K_PAGE3:
+    case R_IP2K_LO8INSN:
+    case R_IP2K_HI8INSN:
+    case R_IP2K_PC_SKIP:
+      if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
+	relocation &= ~IP2K_INSN_MASK;
+      else
+	r = bfd_reloc_notsupported;
+      break;
+
+    case R_IP2K_16:
+      /* If this is a relocation involving a TEXT
+	 symbol, reduce it to a word address.  */
+      if ((relocation & IP2K_INSN_MASK) == IP2K_INSN_VALUE)
+	howto = &ip2k_elf_howto_table[ (int) R_IP2K_TEXT];
+      break;
+
+      /* Pass others through.  */
+    default:
+      break;
+    }
+
+  /* Only install relocation if above tests did not disqualify it.  */
+  if (r == bfd_reloc_ok)
+    r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+				  contents, rel->r_offset,
+				  relocation, rel->r_addend);
+
+  return r;
+}
+
+/* Relocate a IP2K ELF section.
+
+   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
+ip2k_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;
+
+  if (info->relocateable)
+    return true;
+
+  symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (input_bfd);
+  relend     = relocs + input_section->reloc_count;
+
+  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;
+      
+      /* This is a final link.  */
+      r_type = ELF32_R_TYPE (rel->r_info);
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      howto  = ip2k_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 = BASEADDR (sec) + 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 + BASEADDR (sec);
+	    }
+	  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,
+		     (! info->shared || info->no_undefined))))
+		return false;
+	      relocation = 0;
+	    }
+	}
+
+      /* Finally, the sole IP2K-specific part.  */
+      r = ip2k_final_link_relocate (howto, input_bfd, input_section,
+				     contents, rel, relocation);
+
+      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;
+
+	      /* This is how ip2k_final_link_relocate tells us of a non-kosher
+                 reference between insn & data address spaces.  */
+	    case bfd_reloc_notsupported:
+              if (sym != NULL) /* Only if it's not an unresolved symbol.  */
+	         msg = _("unsupported relocation between data/insn address spaces");
+	      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;
+}
+
+static asection *
+ip2k_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     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))
+      {
+#if 0 
+      case R_IP2K_GNU_VTINHERIT:
+      case R_IP2K_GNU_VTENTRY:
+        break;
+#endif
+
+      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 (sec->owner)
+	     && 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 (sec->owner, sym->st_shndx);
+          }
+      }
+  return NULL;
+}
+
+static boolean
+ip2k_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;
+{
+  /* we don't use got and plt entries for ip2k */
+  return true;
+}
+
+
+/* -------------------------------------------------------------------- */
+
+
+#define TARGET_BIG_SYM	 bfd_elf32_ip2k_vec
+#define TARGET_BIG_NAME  "elf32-ip2k"
+
+#define ELF_ARCH	 bfd_arch_ip2k
+#define ELF_MACHINE_CODE EM_IP2K
+#define ELF_MAXPAGESIZE  1 /* No pages on the IP2K */
+
+#define elf_info_to_howto_rel			NULL
+#define elf_info_to_howto			ip2k_info_to_howto_rela
+
+#define elf_backend_can_gc_sections     	1
+#define elf_backend_rela_normal			1
+#define elf_backend_gc_mark_hook                ip2k_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook               ip2k_elf_gc_sweep_hook
+
+#define elf_backend_relocate_section		ip2k_elf_relocate_section
+
+#define elf_symbol_leading_char			'_'
+#define bfd_elf32_bfd_reloc_type_lookup		ip2k_reloc_type_lookup
+#define bfd_elf32_bfd_relax_section		ip2k_elf_relax_section
+
+
+#include "elf32-target.h"
+
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index e8015a9..a2e9e0b 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1,5 +1,5 @@
 /* M32R-specific support for 32-bit ELF.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -78,7 +78,7 @@
 	   const Elf_Internal_Rela *));
 
 asection * m32r_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 #define NOP_INSN		0x7000
@@ -931,8 +931,7 @@
 
 /* Relocate an M32R/D 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.
+   both for RELA and REL type relocs, 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.
@@ -1337,13 +1336,10 @@
   /* The Rela structures are used here because that's what
      _bfd_elf32_link_read_relocs uses [for convenience - it sets the addend
      field to 0].  */
-  Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
+  Elf_Internal_Rela *internal_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* Assume nothing changes.  */
   *again = false;
@@ -1371,8 +1367,6 @@
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   /* Walk through them looking for relaxing opportunities.  */
   irelend = internal_relocs + sec->reloc_count;
@@ -1397,7 +1391,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -1405,39 +1398,28 @@
 	    }
 	}
 
-      /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
+      /* Read this BFD's local symbols if we haven't done so already.  */
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
 	{
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      bfd_size_type amt = symtab_hdr->sh_size;
-	      /* Go get them off disk.  */
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread (extsyms, amt, abfd) != amt)
-		goto error_return;
-	    }
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-	  Elf_Internal_Sym isym;
+	  /* A local symbol.  */
+	  Elf_Internal_Sym *isym;
 	  asection *sym_sec;
 
-	  /* A local symbol.  */
-	  bfd_elf32_swap_symbol_in (abfd,
-				    extsyms + ELF32_R_SYM (irel->r_info),
-				    &isym);
-
-	  sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-	  symval = (isym.st_value
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info),
+	  sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	  symval = (isym->st_value
 		    + sym_sec->output_section->vma
 		    + sym_sec->output_offset);
 	}
@@ -1599,13 +1581,8 @@
 
 	  /* Note that we've changed the relocs, section contents, etc.  */
 	  elf_section_data (sec)->relocs = internal_relocs;
-	  free_relocs = NULL;
-
 	  elf_section_data (sec)->this_hdr.contents = contents;
-	  free_contents = NULL;
-
-	  symtab_hdr->contents = (bfd_byte *) extsyms;
-	  free_extsyms = NULL;
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
 
 	  /* Delete TO_DELETE bytes of data.  */
 	  if (!m32r_elf_relax_delete_bytes (abfd, sec,
@@ -1633,45 +1610,47 @@
       /* loop to try the next reloc */
     }
 
-  if (free_relocs != NULL)
-    {
-      free (free_relocs);
-      free_relocs = NULL;
-    }
-
-  if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
 	  elf_section_data (sec)->this_hdr.contents = contents;
 	}
-      free_contents = NULL;
     }
 
-  if (free_extsyms != NULL)
-    {
-      if (! link_info->keep_memory)
-	free (free_extsyms);
-      else
-	{
-	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
-	}
-      free_extsyms = NULL;
-    }
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+
   return false;
 }
 
@@ -1685,17 +1664,15 @@
      int count;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf32_External_Sym *extsyms;
-  int shndx, index;
+  int shndx;
   bfd_byte *contents;
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Rela *irelalign;
   bfd_vma toaddr;
-  Elf32_External_Sym *esym, *esymend;
-  struct elf_link_hash_entry *sym_hash;
-
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+  Elf_Internal_Sym *isym, *isymend;
+  struct elf_link_hash_entry **sym_hashes;
+  struct elf_link_hash_entry **end_hashes;
+  unsigned int symcount;
 
   shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
@@ -1724,40 +1701,32 @@
     }
 
   /* Adjust the local symbols defined in this section.  */
-  esym = extsyms;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++)
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+  for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, &isym);
-
-      if (isym.st_shndx == shndx
-	  && isym.st_value > addr
-	  && isym.st_value < toaddr)
-	{
-	  isym.st_value -= count;
-	  bfd_elf32_swap_symbol_out (abfd, &isym, esym);
-	}
+      if (isym->st_shndx == shndx
+	  && isym->st_value > addr
+	  && isym->st_value < toaddr)
+	isym->st_value -= count;
     }
 
   /* Now adjust the global symbols defined in this section.  */
-  esym = extsyms + symtab_hdr->sh_info;
-  esymend = extsyms + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
-  for (index = 0; esym < esymend; esym++, index++)
+  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+	      - symtab_hdr->sh_info);
+  sym_hashes = elf_sym_hashes (abfd);
+  end_hashes = sym_hashes + symcount;
+  for (; sym_hashes < end_hashes; sym_hashes++)
     {
-      Elf_Internal_Sym isym;
+      struct elf_link_hash_entry *sym_hash = *sym_hashes;
 
-      bfd_elf32_swap_symbol_in (abfd, esym, &isym);
-      sym_hash = elf_sym_hashes (abfd)[index];
-      if (isym.st_shndx == shndx
-	  && ((sym_hash)->root.type == bfd_link_hash_defined
-	      || (sym_hash)->root.type == bfd_link_hash_defweak)
-	  && (sym_hash)->root.u.def.section == sec
-	  && (sym_hash)->root.u.def.value > addr
-	  && (sym_hash)->root.u.def.value < toaddr)
+      if ((sym_hash->root.type == bfd_link_hash_defined
+	   || sym_hash->root.type == bfd_link_hash_defweak)
+	  && sym_hash->root.u.def.section == sec
+	  && sym_hash->root.u.def.value > addr
+	  && sym_hash->root.u.def.value < toaddr)
 	{
-	  (sym_hash)->root.u.def.value -= count;
+	  sym_hash->root.u.def.value -= count;
 	}
     }
 
@@ -1782,8 +1751,7 @@
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf32_External_Sym *external_syms = NULL;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   bfd_size_type amt;
 
   /* We only need to handle the case of relaxing, or of having a
@@ -1807,31 +1775,22 @@
       asection **secpp;
       Elf32_External_Sym *esym, *esymend;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  external_syms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL && symtab_hdr->sh_info > 0)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (external_syms, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
       internal_relocs = (_bfd_elf32_link_read_relocs
 			 (input_bfd, input_section, (PTR) NULL,
 			  (Elf_Internal_Rela *) NULL, false));
       if (internal_relocs == NULL)
 	goto error_return;
 
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (internal_syms == NULL && symtab_hdr->sh_info > 0)
-	goto error_return;
+      if (symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
 
       amt = symtab_hdr->sh_info;
       amt *= sizeof (asection *);
@@ -1839,61 +1798,50 @@
       if (sections == NULL && symtab_hdr->sh_info > 0)
 	goto error_return;
 
-      isymp = internal_syms;
-      secpp = sections;
-      esym = external_syms;
-      esymend = esym + symtab_hdr->sh_info;
-      for (; esym < esymend; ++esym, ++isymp, ++secpp)
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf32_swap_symbol_in (input_bfd, esym, isymp);
-
-	  if (isymp->st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
-	  else if (isymp->st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    isec = bfd_abs_section_ptr;
-	  else if (isymp->st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    isec = bfd_com_section_ptr;
-	  else if (isymp->st_shndx == SHN_M32R_SCOMMON)
+	  else if (isym->st_shndx == SHN_M32R_SCOMMON)
 	    isec = &m32r_elf_scom_section;
 	  else
-	    isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
+	    isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 	  *secpp = isec;
 	}
 
       if (! m32r_elf_relocate_section (output_bfd, link_info, input_bfd,
 				       input_section, data, internal_relocs,
-				       internal_syms, sections))
+				       isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      sections = NULL;
-      if (internal_syms != NULL)
-	free (internal_syms);
-      internal_syms = NULL;
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
-      external_syms = NULL;
-      if (internal_relocs != elf_section_data (input_section)->relocs)
+      if (isymbuf != NULL
+	  && symtab_hdr->contents != (unsigned char *) isymbuf)
+	free (isymbuf);
+      if (elf_section_data (input_section)->relocs != internal_relocs)
 	free (internal_relocs);
-      internal_relocs = NULL;
     }
 
   return data;
 
  error_return:
-  if (internal_relocs != NULL
-      && internal_relocs != elf_section_data (input_section)->relocs)
-    free (internal_relocs);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
   if (sections != NULL)
     free (sections);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (input_section)->relocs != internal_relocs)
+    free (internal_relocs);
   return NULL;
 }
 
@@ -2033,12 +1981,12 @@
 }
 
 asection *
-m32r_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;
+m32r_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *rel;
+     struct elf_link_hash_entry *h;
+     Elf_Internal_Sym *sym;
 {
   if (h != NULL)
     {
@@ -2064,9 +2012,8 @@
        }
      }
    else
-     {
-       return bfd_section_from_elf_index (abfd, sym->st_shndx);
-     }
+     return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
   return NULL;
 }
 
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index ae69ae2..f189be8 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1,6 +1,6 @@
 /* Motorola 68HC11-specific support for 32-bit ELF
-   Copyright 1999, 2000 Free Software Foundation, Inc.
-   Contributed by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Contributed by Stephane Carrez (stcarrez@nerim.fr)
    (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -21,14 +21,45 @@
 
 #include "bfd.h"
 #include "sysdep.h"
+#include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/m68hc11.h"
 
 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
-PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+  PARAMS ((bfd *, bfd_reloc_code_real_type));
 static void m68hc11_info_to_howto_rel
-PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+
+static bfd_reloc_status_type m68hc11_elf_ignore_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+
+/* GC mark and sweep.  */
+static asection *elf32_m68hc11_gc_mark_hook
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static boolean elf32_m68hc11_gc_sweep_hook
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+	   const Elf_Internal_Rela *));
+static boolean elf32_m68hc11_check_relocs
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+	   const Elf_Internal_Rela *));
+static boolean elf32_m68hc11_relocate_section
+  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static boolean m68hc11_elf_relax_section
+  PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
+static void m68hc11_elf_relax_delete_bytes
+  PARAMS ((bfd *, asection *, bfd_vma, int));
+static void m68hc11_relax_group
+  PARAMS ((bfd *, asection *, bfd_byte *, unsigned,
+	   unsigned long, unsigned long));
+static int compare_reloc PARAMS ((const void *, const void *));
+
+
+boolean _bfd_m68hc11_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd *, flagword));
+boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 /* Use REL instead of RELA to save space */
 #define USE_REL
@@ -46,7 +77,7 @@
 	 32,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield,	/* complain_on_overflow */
+	 complain_overflow_dont,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_M68HC11_NONE",	/* name */
 	 false,			/* partial_inplace */
@@ -110,7 +141,7 @@
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_M68HC11_PCREL_8",	/* name */
 	 false,			/* partial_inplace */
-	 0x0,			/* src_mask */
+	 0x00ff,		/* src_mask */
 	 0x00ff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -171,7 +202,7 @@
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_M68HC11_PCREL_16",	/* name */
 	 false,			/* partial_inplace */
-	 0x0,			/* src_mask */
+	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -204,6 +235,88 @@
 	 0,			/* src_mask */
 	 0,			/* dst_mask */
 	 false),		/* pcrel_offset */
+
+  /* A 24 bit relocation */
+  HOWTO (R_M68HC11_24,	        /* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 24,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_M68HC11_24",	/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+  
+  /* A 16-bit low relocation */
+  HOWTO (R_M68HC11_LO16,        /* 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_M68HC11_LO16",	/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A page relocation */
+  HOWTO (R_M68HC11_PAGE,        /* 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_M68HC11_PAGE",	/* name */
+	 false,			/* partial_inplace */
+	 0x00ff,		/* src_mask */
+	 0x00ff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
+  EMPTY_HOWTO (16),
+  EMPTY_HOWTO (17),
+  EMPTY_HOWTO (18),
+  EMPTY_HOWTO (19),
+  
+  /* Mark beginning of a jump instruction (any form).  */
+  HOWTO (R_M68HC11_RL_JUMP,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc11_elf_ignore_reloc,	/* special_function */
+	 "R_M68HC11_RL_JUMP",	/* name */
+	 true,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 true),                 /* pcrel_offset */
+
+  /* Mark beginning of Gcc relaxation group instruction.  */
+  HOWTO (R_M68HC11_RL_GROUP,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc11_elf_ignore_reloc,	/* special_function */
+	 "R_M68HC11_RL_GROUP",	/* name */
+	 true,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 true),                 /* pcrel_offset */
 };
 
 /* Map BFD reloc types to M68HC11 ELF reloc types.  */
@@ -225,9 +338,15 @@
   {BFD_RELOC_32, R_M68HC11_32},
   {BFD_RELOC_M68HC11_3B, R_M68HC11_3B},
 
-  /* The following relocs are defined but they probably don't work yet.  */
   {BFD_RELOC_VTABLE_INHERIT, R_M68HC11_GNU_VTINHERIT},
   {BFD_RELOC_VTABLE_ENTRY, R_M68HC11_GNU_VTENTRY},
+
+  {BFD_RELOC_M68HC11_LO16, R_M68HC11_LO16},
+  {BFD_RELOC_M68HC11_PAGE, R_M68HC11_PAGE},
+  {BFD_RELOC_M68HC11_24, R_M68HC11_24},
+
+  {BFD_RELOC_M68HC11_RL_JUMP, R_M68HC11_RL_JUMP},
+  {BFD_RELOC_M68HC11_RL_GROUP, R_M68HC11_RL_GROUP},
 };
 
 static reloc_howto_type *
@@ -248,6 +367,25 @@
   return NULL;
 }
 
+/* This function is used for relocs which are only used for relaxing,
+   which the linker should otherwise ignore.  */
+
+static bfd_reloc_status_type
+m68hc11_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
+                          output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  if (output_bfd != NULL)
+    reloc_entry->address += input_section->output_offset;
+  return bfd_reloc_ok;
+}
+
 /* Set the howto pointer for an M68HC11 ELF reloc.  */
 
 static void
@@ -263,6 +401,1213 @@
   cache_ptr->howto = &elf_m68hc11_howto_table[r_type];
 }
 
+static asection *
+elf32_m68hc11_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     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))
+	{
+	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
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+  return NULL;
+}
+
+static boolean
+elf32_m68hc11_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;
+{
+  /* We don't use got and plt entries for 68hc11/68hc12.  */
+  return true;
+}
+
+struct m68hc11_direct_relax 
+{
+  const char *name;
+  unsigned char code;
+  unsigned char direct_code;
+} m68hc11_direct_relax_table[] = {
+  { "adca", 0xB9, 0x99 },
+  { "adcb", 0xF9, 0xD9 },
+  { "adda", 0xBB, 0x9B },
+  { "addb", 0xFB, 0xDB },
+  { "addd", 0xF3, 0xD3 },
+  { "anda", 0xB4, 0x94 },
+  { "andb", 0xF4, 0xD4 },
+  { "cmpa", 0xB1, 0x91 },
+  { "cmpb", 0xF1, 0xD1 },
+  { "cpd",  0xB3, 0x93 },
+  { "cpxy", 0xBC, 0x9C },
+/* { "cpy",  0xBC, 0x9C }, */
+  { "eora", 0xB8, 0x98 },
+  { "eorb", 0xF8, 0xD8 },
+  { "jsr",  0xBD, 0x9D },
+  { "ldaa", 0xB6, 0x96 },
+  { "ldab", 0xF6, 0xD6 },
+  { "ldd",  0xFC, 0xDC },
+  { "lds",  0xBE, 0x9E },
+  { "ldxy", 0xFE, 0xDE },
+  /*  { "ldy",  0xFE, 0xDE },*/
+  { "oraa", 0xBA, 0x9A },
+  { "orab", 0xFA, 0xDA },
+  { "sbca", 0xB2, 0x92 },
+  { "sbcb", 0xF2, 0xD2 },
+  { "staa", 0xB7, 0x97 },
+  { "stab", 0xF7, 0xD7 },
+  { "std",  0xFD, 0xDD },
+  { "sts",  0xBF, 0x9F },
+  { "stxy", 0xFF, 0xDF },
+  /*  { "sty",  0xFF, 0xDF },*/
+  { "suba", 0xB0, 0x90 },
+  { "subb", 0xF0, 0xD0 },
+  { "subd", 0xB3, 0x93 },
+  { 0, 0, 0 }
+};
+
+static struct m68hc11_direct_relax *
+find_relaxable_insn (unsigned char code)
+{
+  int i;
+
+  for (i = 0; m68hc11_direct_relax_table[i].name; i++)
+    if (m68hc11_direct_relax_table[i].code == code)
+      return &m68hc11_direct_relax_table[i];
+
+  return 0;
+}
+
+static int
+compare_reloc (e1, e2)
+     const void *e1;
+     const void *e2;
+{
+  const Elf_Internal_Rela *i1 = (const Elf_Internal_Rela *) e1;
+  const Elf_Internal_Rela *i2 = (const Elf_Internal_Rela *) e2;
+
+  if (i1->r_offset == i2->r_offset)
+    return 0;
+  else
+    return i1->r_offset < i2->r_offset ? -1 : 1;
+}
+
+#define M6811_OP_LDX_IMMEDIATE (0xCE)
+
+static void
+m68hc11_relax_group (abfd, sec, contents, value, offset, end_group)
+     bfd *abfd;
+     asection *sec;
+     bfd_byte *contents;
+     unsigned value;
+     unsigned long offset;
+     unsigned long end_group;
+{
+  unsigned char code;
+  unsigned long start_offset;
+  unsigned long ldx_offset = offset;
+  unsigned long ldx_size;
+  int can_delete_ldx;
+  int relax_ldy = 0;
+
+  /* First instruction of the relax group must be a
+     LDX #value or LDY #value.  If this is not the case,
+     ignore the relax group.  */
+  code = bfd_get_8 (abfd, contents + offset);
+  if (code == 0x18)
+    {
+      relax_ldy++;
+      offset++;
+      code = bfd_get_8 (abfd, contents + offset);
+    }
+  ldx_size = offset - ldx_offset + 3;
+  offset += 3;
+  if (code != M6811_OP_LDX_IMMEDIATE || offset >= end_group)
+    return;
+
+
+  /* We can remove the LDX/LDY only when all bset/brclr instructions
+     of the relax group have been converted to use direct addressing
+     mode.  */
+  can_delete_ldx = 1;
+  while (offset < end_group)
+    {
+      unsigned isize;
+      unsigned new_value;
+      int bset_use_y;
+
+      bset_use_y = 0;
+      start_offset = offset;
+      code = bfd_get_8 (abfd, contents + offset);
+      if (code == 0x18)
+        {
+          bset_use_y++;
+          offset++;
+          code = bfd_get_8 (abfd, contents + offset);
+        }
+
+      /* Check the instruction and translate to use direct addressing mode.  */
+      switch (code)
+        {
+          /* bset */
+        case 0x1C:
+          code = 0x14;
+          isize = 3;
+          break;
+
+          /* brclr */
+        case 0x1F:
+          code = 0x13;
+          isize = 4;
+          break;
+
+          /* brset */
+        case 0x1E:
+          code = 0x12;
+          isize = 4;
+          break;
+
+          /* bclr */
+        case 0x1D:
+          code = 0x15;
+          isize = 3;
+          break;
+
+          /* This instruction is not recognized and we are not
+             at end of the relax group.  Ignore and don't remove
+             the first LDX (we don't know what it is used for...).  */
+        default:
+          return;
+        }
+      new_value = (unsigned) bfd_get_8 (abfd, contents + offset + 1);
+      new_value += value;
+      if ((new_value & 0xff00) == 0 && bset_use_y == relax_ldy)
+        {
+          bfd_put_8 (abfd, code, contents + offset);
+          bfd_put_8 (abfd, new_value, contents + offset + 1);
+          if (start_offset != offset)
+            {
+              m68hc11_elf_relax_delete_bytes (abfd, sec, start_offset,
+                                              offset - start_offset);
+              end_group--;
+            }
+        }
+      else
+        {
+          can_delete_ldx = 0;
+        }
+      offset = start_offset + isize;
+    }
+  if (can_delete_ldx)
+    {
+      /* Remove the move instruction (3 or 4 bytes win).  */
+      m68hc11_elf_relax_delete_bytes (abfd, sec, ldx_offset, ldx_size);
+    }
+}
+
+/* This function handles relaxing for the 68HC11.
+
+   
+	and somewhat more difficult to support.  */
+
+static boolean
+m68hc11_elf_relax_section (abfd, sec, link_info, again)
+     bfd *abfd;
+     asection *sec;
+     struct bfd_link_info *link_info;
+     boolean *again;
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  Elf_Internal_Shdr *shndx_hdr;
+  Elf_Internal_Rela *internal_relocs;
+  Elf_Internal_Rela *free_relocs = NULL;
+  Elf_Internal_Rela *irel, *irelend;
+  bfd_byte *contents = NULL;
+  bfd_byte *free_contents = NULL;
+  Elf32_External_Sym *extsyms = NULL;
+  Elf32_External_Sym *free_extsyms = NULL;
+  Elf_Internal_Rela *prev_insn_branch = NULL;
+  Elf_Internal_Rela *prev_insn_group = NULL;
+  unsigned insn_group_value = 0;
+  Elf_External_Sym_Shndx *shndx_buf = NULL;
+
+  /* Assume nothing changes.  */
+  *again = false;
+
+  /* We don't have to do anything for a relocateable link, if
+     this section does not have relocs, or if this is not a
+     code section.  */
+  if (link_info->relocateable
+      || (sec->flags & SEC_RELOC) == 0
+      || sec->reloc_count == 0
+      || (sec->flags & SEC_CODE) == 0)
+    return true;
+
+  /* If this is the first time we have been called for this section,
+     initialize the cooked size.  */
+  if (sec->_cooked_size == 0)
+    sec->_cooked_size = sec->_raw_size;
+
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+
+  /* Get a copy of the native relocations.  */
+  internal_relocs = (_bfd_elf32_link_read_relocs
+		     (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+		      link_info->keep_memory));
+  if (internal_relocs == NULL)
+    goto error_return;
+  if (! link_info->keep_memory)
+    free_relocs = internal_relocs;
+
+  /* Checking for branch relaxation relies on the relocations to
+     be sorted on 'r_offset'.  This is not guaranteed so we must sort.  */
+  qsort (internal_relocs, sec->reloc_count, sizeof (Elf_Internal_Rela),
+         compare_reloc);
+
+  /* Walk through them looking for relaxing opportunities.  */
+  irelend = internal_relocs + sec->reloc_count;
+  for (irel = internal_relocs; irel < irelend; irel++)
+    {
+      bfd_vma symval;
+      bfd_vma value;
+      Elf_Internal_Sym isym;
+
+      /* If this isn't something that can be relaxed, then ignore
+	 this reloc.  */
+      if (ELF32_R_TYPE (irel->r_info) != (int) R_M68HC11_16
+          && ELF32_R_TYPE (irel->r_info) != (int) R_M68HC11_RL_JUMP
+          && ELF32_R_TYPE (irel->r_info) != (int) R_M68HC11_RL_GROUP)
+        {
+          prev_insn_branch = 0;
+          prev_insn_group = 0;
+          continue;
+        }
+
+      /* Get the section contents if we haven't done so already.  */
+      if (contents == NULL)
+	{
+	  /* Get cached copy if it exists.  */
+	  if (elf_section_data (sec)->this_hdr.contents != NULL)
+	    contents = elf_section_data (sec)->this_hdr.contents;
+	  else
+	    {
+	      /* Go get them off disk.  */
+	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+	      if (contents == NULL)
+		goto error_return;
+	      free_contents = contents;
+
+	      if (! bfd_get_section_contents (abfd, sec, contents,
+					      (file_ptr) 0, sec->_raw_size))
+		goto error_return;
+	    }
+	}
+
+      /* Try to eliminate an unconditional 8 bit pc-relative branch
+	 which immediately follows a conditional 8 bit pc-relative
+	 branch around the unconditional branch.
+
+	    original:		new:
+	    bCC lab1		bCC' lab2
+	    bra lab2
+	   lab1:	       lab1:
+
+	 This happens when the bCC can't reach lab2 at assembly time,
+	 but due to other relaxations it can reach at link time.  */
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_RL_JUMP)
+	{
+	  Elf_Internal_Rela *nrel;
+	  unsigned char code;
+          unsigned char roffset;
+
+          prev_insn_branch = 0;
+          prev_insn_group = 0;
+          
+	  /* Do nothing if this reloc is the last byte in the section.  */
+	  if (irel->r_offset == sec->_cooked_size)
+	    continue;
+
+	  /* See if the next instruction is an unconditional pc-relative
+	     branch, more often than not this test will fail, so we
+	     test it first to speed things up.  */
+	  code = bfd_get_8 (abfd, contents + irel->r_offset + 2);
+	  if (code != 0x7e)
+	    continue;
+
+	  /* Also make sure the next relocation applies to the next
+	     instruction and that it's a pc-relative 8 bit branch.  */
+	  nrel = irel + 1;
+	  if (nrel == irelend
+	      || irel->r_offset + 3 != nrel->r_offset
+	      || ELF32_R_TYPE (nrel->r_info) != (int) R_M68HC11_16)
+	    continue;
+
+	  /* Make sure our destination immediately follows the
+	     unconditional branch.  */
+          roffset = bfd_get_8 (abfd, contents + irel->r_offset + 1);
+          if (roffset != 3)
+            continue;
+
+          prev_insn_branch = irel;
+          prev_insn_group = 0;
+          continue;
+        }
+
+      /* Read this BFD's symbols if we haven't done so already.  */
+      if (extsyms == NULL)
+	{
+	  /* Get cached copy if it exists.  */
+	  if (symtab_hdr->contents != NULL)
+	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+	  else
+	    {
+	      /* Go get them off disk.  */
+	      bfd_size_type amt = symtab_hdr->sh_size;
+	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
+	      if (extsyms == NULL)
+		goto error_return;
+	      free_extsyms = extsyms;
+	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
+		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
+		goto error_return;
+	    }
+
+	  if (shndx_hdr->sh_size != 0)
+	    {
+	      bfd_size_type amt;
+
+	      amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
+	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+	      if (shndx_buf == NULL)
+		goto error_return;
+	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
+		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
+		goto error_return;
+	      shndx_hdr->contents = (PTR) shndx_buf;
+	    }
+	}
+
+      /* Get the value of the symbol referred to by the reloc.  */
+      if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+	{
+	  Elf32_External_Sym *esym;
+	  Elf_External_Sym_Shndx *shndx;
+	  asection *sym_sec;
+
+	  /* A local symbol.  */
+	  esym = extsyms + ELF32_R_SYM (irel->r_info);
+	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
+	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+
+	  sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	  symval = (isym.st_value
+		    + sym_sec->output_section->vma
+		    + sym_sec->output_offset);
+	}
+      else
+	{
+	  unsigned long indx;
+	  struct elf_link_hash_entry *h;
+
+	  /* An external symbol.  */
+	  indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+	  h = elf_sym_hashes (abfd)[indx];
+	  BFD_ASSERT (h != NULL);
+	  if (h->root.type != bfd_link_hash_defined
+	      && h->root.type != bfd_link_hash_defweak)
+	    {
+	      /* This appears to be a reference to an undefined
+                 symbol.  Just ignore it--it will be caught by the
+                 regular reloc processing.  */
+              prev_insn_branch = 0;
+              prev_insn_group = 0;
+	      continue;
+	    }
+
+	  symval = (h->root.u.def.value
+		    + h->root.u.def.section->output_section->vma
+		    + h->root.u.def.section->output_offset);
+	}
+
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_RL_GROUP)
+	{
+          prev_insn_branch = 0;
+          prev_insn_group = 0;
+          
+	  /* Do nothing if this reloc is the last byte in the section.  */
+	  if (irel->r_offset == sec->_cooked_size)
+	    continue;
+
+          prev_insn_group = irel;
+          insn_group_value = isym.st_value;
+          continue;
+        }
+
+      value = symval;
+      /* Try to turn a far branch to a near branch.  */
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_16
+          && prev_insn_branch)
+        {
+          bfd_vma offset;
+          unsigned char code;
+
+          offset = value - (prev_insn_branch->r_offset
+                            + sec->output_section->vma
+                            + sec->output_offset + 2);
+
+          /* If the offset is still out of -128..+127 range,
+             leave that far branch unchanged.  */
+          if ((offset & 0xff80) != 0 && (offset & 0xff80) != 0xff80)
+            {
+              prev_insn_branch = 0;
+              continue;
+            }
+
+          /* Shrink the branch.  */
+          code = bfd_get_8 (abfd, contents + prev_insn_branch->r_offset);
+          if (code == 0x7e)
+            {
+              code = 0x20;
+              bfd_put_8 (abfd, code, contents + prev_insn_branch->r_offset);
+              bfd_put_8 (abfd, offset,
+                         contents + prev_insn_branch->r_offset + 1);
+              irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                           R_M68HC11_NONE);
+              m68hc11_elf_relax_delete_bytes (abfd, sec,
+                                              irel->r_offset, 1);
+            }
+          else
+            {
+              code ^= 0x1;
+              bfd_put_8 (abfd, code, contents + prev_insn_branch->r_offset);
+              bfd_put_8 (abfd, offset,
+                         contents + prev_insn_branch->r_offset + 1);
+              irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                           R_M68HC11_NONE);
+              m68hc11_elf_relax_delete_bytes (abfd, sec,
+                                              irel->r_offset - 1, 3);
+            }
+          prev_insn_branch = 0;
+        }
+
+      /* Try to turn a 16 bit address into a 8 bit page0 address.  */
+      else if (ELF32_R_TYPE (irel->r_info) == (int) R_M68HC11_16
+               && (value & 0xff00) == 0)
+	{
+          unsigned char code;
+          unsigned short offset;
+          struct m68hc11_direct_relax *rinfo;
+
+          prev_insn_branch = 0;
+          offset = bfd_get_16 (abfd, contents + irel->r_offset);
+          offset += value;
+          if ((offset & 0xff00) != 0)
+            {
+              prev_insn_group = 0;
+              continue;
+            }
+
+          if (prev_insn_group)
+            {
+              /* Note that we've changed the reldection contents, etc.  */
+              elf_section_data (sec)->relocs = internal_relocs;
+              free_relocs = NULL;
+
+              elf_section_data (sec)->this_hdr.contents = contents;
+              free_contents = NULL;
+
+              symtab_hdr->contents = (bfd_byte *) extsyms;
+              free_extsyms = NULL;
+
+              m68hc11_relax_group (abfd, sec, contents, offset,
+                                   prev_insn_group->r_offset,
+                                   insn_group_value);
+              irel = prev_insn_group;
+              prev_insn_group = 0;
+              irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                           R_M68HC11_NONE);
+              continue;
+            }
+          
+          /* Get the opcode.  */
+          code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+          rinfo = find_relaxable_insn (code);
+          if (rinfo == 0)
+            {
+              prev_insn_group = 0;
+              continue;
+            }
+
+          /* Note that we've changed the reldection contents, etc.  */
+          elf_section_data (sec)->relocs = internal_relocs;
+          free_relocs = NULL;
+
+          elf_section_data (sec)->this_hdr.contents = contents;
+          free_contents = NULL;
+
+          symtab_hdr->contents = (bfd_byte *) extsyms;
+          free_extsyms = NULL;
+
+          /* Fix the opcode.  */
+          /* printf ("A relaxable case : 0x%02x (%s)\n",
+             code, rinfo->name); */
+          bfd_put_8 (abfd, rinfo->direct_code,
+                     contents + irel->r_offset - 1);
+
+          /* Delete one byte of data (upper byte of address).  */
+          m68hc11_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 1);
+
+          /* Fix the relocation's type.  */
+          irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                       R_M68HC11_8);
+
+          /* That will change things, so, we should relax again.
+             Note that this is not required, and it may be slow.  */
+          *again = true;
+        }
+      else if (ELF32_R_TYPE (irel->r_info) == R_M68HC11_16)
+        {
+          unsigned char code;
+          bfd_vma offset;
+
+          prev_insn_branch = 0;
+          code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+          if (code == 0x7e)
+            {
+              offset = value - (irel->r_offset
+                                + sec->output_section->vma
+                                + sec->output_offset + 1);
+              offset += bfd_get_16 (abfd, contents + irel->r_offset);
+
+              /* If the offset is still out of -128..+127 range,
+                 leave that far branch unchanged.  */
+              if ((offset & 0xff80) == 0 || (offset & 0xff80) == 0xff80)
+                {
+
+                  /* Note that we've changed the reldection contents, etc.  */
+                  elf_section_data (sec)->relocs = internal_relocs;
+                  free_relocs = NULL;
+                  
+                  elf_section_data (sec)->this_hdr.contents = contents;
+                  free_contents = NULL;
+                  
+                  symtab_hdr->contents = (bfd_byte *) extsyms;
+                  free_extsyms = NULL;
+
+                  /* Shrink the branch.  */
+                  code = 0x20;
+                  bfd_put_8 (abfd, code,
+                             contents + irel->r_offset - 1);
+                  bfd_put_8 (abfd, offset,
+                             contents + irel->r_offset);
+                  irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                               R_M68HC11_NONE);
+                  m68hc11_elf_relax_delete_bytes (abfd, sec,
+                                                  irel->r_offset + 1, 1);
+                }
+            }
+        }
+      prev_insn_branch = 0;
+    }
+
+  if (free_relocs != NULL)
+    {
+      free (free_relocs);
+      free_relocs = NULL;
+    }
+
+  if (free_contents != NULL)
+    {
+      if (! link_info->keep_memory)
+	free (free_contents);
+      else
+	{
+	  /* Cache the section contents for elf_link_input_bfd.  */
+	  elf_section_data (sec)->this_hdr.contents = contents;
+	}
+      free_contents = NULL;
+    }
+
+  if (free_extsyms != NULL)
+    {
+      if (! link_info->keep_memory)
+	free (free_extsyms);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) extsyms;
+	}
+      free_extsyms = NULL;
+    }
+
+  return true;
+
+ error_return:
+  if (free_relocs != NULL)
+    free (free_relocs);
+  if (free_contents != NULL)
+    free (free_contents);
+  if (free_extsyms != NULL)
+    free (free_extsyms);
+  return false;
+}
+
+/* Delete some bytes from a section while relaxing.  */
+
+static void
+m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
+     bfd *abfd;
+     asection *sec;
+     bfd_vma addr;
+     int count;
+{
+  Elf_Internal_Shdr *symtab_hdr;
+  Elf_Internal_Shdr *shndx_hdr;
+  Elf32_External_Sym *extsyms;
+  unsigned int sec_shndx;
+  Elf_External_Sym_Shndx *shndx;
+  bfd_byte *contents;
+  Elf_Internal_Rela *irel, *irelend;
+  bfd_vma toaddr;
+  Elf32_External_Sym *esym, *esymend;
+  struct elf_link_hash_entry **sym_hashes;
+  struct elf_link_hash_entry **end_hashes;
+  unsigned int symcount;
+
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+
+  sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+  contents = elf_section_data (sec)->this_hdr.contents;
+
+  toaddr = sec->_cooked_size;
+
+  irel = elf_section_data (sec)->relocs;
+  irelend = irel + sec->reloc_count;
+
+  /* Actually delete the bytes.  */
+  memmove (contents + addr, contents + addr + count,
+	   (size_t) (toaddr - addr - count));
+  sec->_cooked_size -= count;
+
+  /* Adjust all the relocs.  */
+  for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+    {
+      unsigned char code;
+      unsigned char offset;
+      unsigned short raddr;
+      unsigned long old_offset;
+      int branch_pos;
+
+      old_offset = irel->r_offset;
+
+      /* See if this reloc was for the bytes we have deleted, in which
+	 case we no longer care about it.  Don't delete relocs which
+	 represent addresses, though.  */
+      if (ELF32_R_TYPE (irel->r_info) != R_M68HC11_RL_JUMP
+          && irel->r_offset >= addr && irel->r_offset < addr + count)
+        irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                     R_M68HC11_NONE);
+
+      if (ELF32_R_TYPE (irel->r_info) == R_M68HC11_NONE)
+        continue;
+
+      /* Get the new reloc address.  */
+      if ((irel->r_offset > addr
+	   && irel->r_offset < toaddr))
+	irel->r_offset -= count;
+
+      /* If this is a PC relative reloc, see if the range it covers
+         includes the bytes we have deleted.  */
+      switch (ELF32_R_TYPE (irel->r_info))
+	{
+	default:
+	  break;
+
+	case R_M68HC11_RL_JUMP:
+          code = bfd_get_8 (abfd, contents + irel->r_offset);
+          switch (code)
+            {
+              /* jsr and jmp instruction are also marked with RL_JUMP
+                 relocs but no adjustment must be made.  */
+            case 0x7e:
+            case 0x9d:
+            case 0xbd:
+              continue;
+
+            case 0x12:
+            case 0x13:
+              branch_pos = 3;
+              raddr = 4;
+
+              /* Special case when we translate a brclr N,y into brclr *<addr>
+                 In this case, the 0x18 page2 prefix is removed.
+                 The reloc offset is not modified but the instruction
+                 size is reduced by 1.  */
+              if (old_offset == addr)
+                raddr++;
+              break;
+
+            case 0x1e:
+            case 0x1f:
+              branch_pos = 3;
+              raddr = 4;
+              break;
+
+            case 0x18:
+              branch_pos = 4;
+              raddr = 5;
+              break;
+
+            default:
+              branch_pos = 1;
+              raddr = 2;
+              break;
+            }
+          offset = bfd_get_8 (abfd, contents + irel->r_offset + branch_pos);
+          raddr += old_offset;
+          raddr += ((unsigned short) offset | ((offset & 0x80) ? 0xff00 : 0));
+          if (irel->r_offset < addr && raddr >= addr)
+            {
+              offset -= count;
+              bfd_put_8 (abfd, offset, contents + irel->r_offset + branch_pos);
+            }
+          else if (irel->r_offset >= addr && raddr <= addr)
+            {
+              offset += count;
+              bfd_put_8 (abfd, offset, contents + irel->r_offset + branch_pos);
+            }
+          else
+            {
+              /*printf ("Not adjusted 0x%04x [0x%4x 0x%4x]\n", raddr,
+                irel->r_offset, addr);*/
+            }
+          
+          break;
+	}
+    }
+
+  /* Adjust the local symbols defined in this section.  */
+  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+  shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+  esym = extsyms;
+  esymend = esym + symtab_hdr->sh_info;
+  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+    {
+      Elf_Internal_Sym isym;
+      Elf_External_Sym_Shndx dummy;
+
+      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+
+      if (isym.st_shndx == sec_shndx
+	  && isym.st_value > addr
+	  && isym.st_value < toaddr)
+	{
+	  isym.st_value -= count;
+	  bfd_elf32_swap_symbol_out (abfd, &isym, esym, &dummy);
+	}
+    }
+
+  /* Now adjust the global symbols defined in this section.  */
+  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+	      - symtab_hdr->sh_info);
+  sym_hashes = elf_sym_hashes (abfd);
+  end_hashes = sym_hashes + symcount;
+  for (; sym_hashes < end_hashes; sym_hashes++)
+    {
+      struct elf_link_hash_entry *sym_hash = *sym_hashes;
+      if ((sym_hash->root.type == bfd_link_hash_defined
+	   || sym_hash->root.type == bfd_link_hash_defweak)
+	  && sym_hash->root.u.def.section == sec
+	  && sym_hash->root.u.def.value > addr
+	  && sym_hash->root.u.def.value < toaddr)
+	{
+	  sym_hash->root.u.def.value -= count;
+	}
+    }
+}
+
+/* Look through the relocs for a section during the first phase.
+   Since we don't do .gots or .plts, we just need to consider the
+   virtual table relocs for gc.  */
+
+static boolean
+elf32_m68hc11_check_relocs (abfd, info, sec, relocs)
+     bfd * abfd;
+     struct bfd_link_info * info;
+     asection * sec;
+     const Elf_Internal_Rela * relocs;
+{
+  Elf_Internal_Shdr *           symtab_hdr;
+  struct elf_link_hash_entry ** sym_hashes;
+  struct elf_link_hash_entry ** sym_hashes_end;
+  const Elf_Internal_Rela *     rel;
+  const Elf_Internal_Rela *     rel_end;
+
+  if (info->relocateable)
+    return true;
+
+  symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (abfd);
+  sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
+  if (!elf_bad_symtab (abfd))
+    sym_hashes_end -= symtab_hdr->sh_info;
+
+  rel_end = relocs + sec->reloc_count;
+
+  for (rel = relocs; rel < rel_end; rel++)
+    {
+      struct elf_link_hash_entry * h;
+      unsigned long r_symndx;
+
+      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];
+
+      switch (ELF32_R_TYPE (rel->r_info))
+        {
+        /* This relocation describes the C++ object vtable hierarchy.
+           Reconstruct it for later use during GC.  */
+        case R_M68HC11_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_M68HC11_GNU_VTENTRY:
+          if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+            return false;
+          break;
+        }
+    }
+
+  return true;
+}
+
+/* Relocate a 68hc11/68hc12 ELF section.  */
+static boolean
+elf32_m68hc11_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, *relend;
+  const char *name;
+
+  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+  sym_hashes = elf_sym_hashes (input_bfd);
+
+  rel = relocs;
+  relend = relocs + input_section->reloc_count;
+  for (; rel < relend; rel++)
+    {
+      int r_type;
+      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;
+
+      r_symndx = ELF32_R_SYM (rel->r_info);
+      r_type = ELF32_R_TYPE (rel->r_info);
+
+      if (r_type == R_M68HC11_GNU_VTENTRY
+          || r_type == R_M68HC11_GNU_VTINHERIT )
+        continue;
+
+      howto = elf_m68hc11_howto_table + r_type;
+
+      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.  */
+      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);
+	}
+      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;
+	  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;
+	    }
+	}
+
+      if (h != NULL)
+	name = h->root.root.string;
+      else
+	{
+	  name = (bfd_elf_string_from_elf_section
+		  (input_bfd, symtab_hdr->sh_link, sym->st_name));
+	  if (name == NULL || *name == '\0')
+	    name = bfd_section_name (input_bfd, sec);
+	}
+
+      r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                    contents, rel->r_offset,
+                                    relocation, rel->r_addend);
+
+      if (r != bfd_reloc_ok)
+	{
+	  const char * msg = (const char *) 0;
+
+	  switch (r)
+	    {
+	    case bfd_reloc_overflow:
+	      if (!((*info->callbacks->reloc_overflow)
+		    (info, name, howto->name, (bfd_vma) 0,
+		     input_bfd, input_section, rel->r_offset)))
+		return false;
+	      break;
+
+	    case bfd_reloc_undefined:
+	      if (!((*info->callbacks->undefined_symbol)
+		    (info, name, input_bfd, input_section,
+		     rel->r_offset, true)))
+		return false;
+	      break;
+
+	    case bfd_reloc_outofrange:
+	      msg = _ ("internal error: out of range error");
+	      goto common_error;
+
+	    case bfd_reloc_notsupported:
+	      msg = _ ("internal error: unsupported relocation error");
+	      goto common_error;
+
+	    case bfd_reloc_dangerous:
+	      msg = _ ("internal error: dangerous error");
+	      goto common_error;
+
+	    default:
+	      msg = _ ("internal error: unknown error");
+	      /* fall through */
+
+	    common_error:
+	      if (!((*info->callbacks->warning)
+		    (info, msg, name, input_bfd, input_section,
+		     rel->r_offset)))
+		return false;
+	      break;
+	    }
+	}
+    }
+
+  return true;
+}
+
+
+
+/* Set and control ELF flags in ELF header.  */
+
+boolean
+_bfd_m68hc11_elf_set_private_flags (abfd, flags)
+     bfd *abfd;
+     flagword flags;
+{
+  BFD_ASSERT (!elf_flags_init (abfd)
+	      || elf_elfheader (abfd)->e_flags == flags);
+
+  elf_elfheader (abfd)->e_flags = flags;
+  elf_flags_init (abfd) = true;
+  return true;
+}
+
+/* Merge backend specific data from an object file to the output
+   object file when linking.  */
+
+boolean
+_bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd)
+     bfd *ibfd;
+     bfd *obfd;
+{
+  flagword old_flags;
+  flagword new_flags;
+  boolean ok = true;
+
+  /* Check if we have the same endianess */
+  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+    return false;
+
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return true;
+
+  new_flags = elf_elfheader (ibfd)->e_flags;
+  elf_elfheader (obfd)->e_flags |= new_flags & EF_M68HC11_ABI;
+  old_flags = elf_elfheader (obfd)->e_flags;
+
+  if (! elf_flags_init (obfd))
+    {
+      elf_flags_init (obfd) = true;
+      elf_elfheader (obfd)->e_flags = new_flags;
+      elf_elfheader (obfd)->e_ident[EI_CLASS]
+	= elf_elfheader (ibfd)->e_ident[EI_CLASS];
+
+      if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+	  && bfd_get_arch_info (obfd)->the_default)
+	{
+	  if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
+				   bfd_get_mach (ibfd)))
+	    return false;
+	}
+
+      return true;
+    }
+
+  /* Check ABI compatibility.  */
+  if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
+    {
+      (*_bfd_error_handler)
+	(_("%s: linking files compiled for 16-bit integers (-mshort) "
+           "and others for 32-bit integers"),
+	 bfd_archive_filename (ibfd));
+      ok = false;
+    }
+  if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
+    {
+      (*_bfd_error_handler)
+	(_("%s: linking files compiled for 32-bit double (-fshort-double) "
+           "and others for 64-bit double"),
+	 bfd_archive_filename (ibfd));
+      ok = false;
+    }
+  new_flags &= ~EF_M68HC11_ABI;
+  old_flags &= ~EF_M68HC11_ABI;
+
+  /* Warn about any other mismatches */
+  if (new_flags != old_flags)
+    {
+      (*_bfd_error_handler)
+	(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+	 bfd_archive_filename (ibfd), (unsigned long) new_flags,
+	 (unsigned long) old_flags);
+      ok = false;
+    }
+
+  if (! ok)
+    {
+      bfd_set_error (bfd_error_bad_value);
+      return false;
+    }
+
+  return true;
+}
+
+boolean
+_bfd_m68hc11_elf_print_private_bfd_data (abfd, ptr)
+     bfd *abfd;
+     PTR ptr;
+{
+  FILE *file = (FILE *) ptr;
+
+  BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+  /* Print normal ELF private data.  */
+  _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+  /* xgettext:c-format */
+  fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+
+  if (elf_elfheader (abfd)->e_flags & E_M68HC11_I32)
+    fprintf (file, _("[abi=32-bit int,"));
+  else
+    fprintf (file, _("[abi=16-bit int,"));
+
+  if (elf_elfheader (abfd)->e_flags & E_M68HC11_F64)
+    fprintf (file, _(" 64-bit double]"));
+  else
+    fprintf (file, _(" 32-bit double]"));
+
+  if (elf_elfheader (abfd)->e_flags & E_M68HC12_BANKS)
+    fprintf (file, _(" [memory=bank-model]"));
+  else
+    fprintf (file, _(" [memory=flat]"));
+
+  fputc ('\n', file);
+
+  return true;
+}
+
 /* Below is the only difference between elf32-m68hc12.c and elf32-m68hc11.c.
    The Motorola spec says to use a different Elf machine code.  */
 #define ELF_ARCH		bfd_arch_m68hc11
@@ -274,7 +1619,18 @@
 
 #define elf_info_to_howto	0
 #define elf_info_to_howto_rel	m68hc11_info_to_howto_rel
+#define bfd_elf32_bfd_relax_section  m68hc11_elf_relax_section
+#define elf_backend_gc_mark_hook     elf32_m68hc11_gc_mark_hook
+#define elf_backend_gc_sweep_hook    elf32_m68hc11_gc_sweep_hook
+#define elf_backend_check_relocs     elf32_m68hc11_check_relocs
+#define elf_backend_relocate_section elf32_m68hc11_relocate_section
 #define elf_backend_object_p	0
 #define elf_backend_final_write_processing	0
+#define elf_backend_can_gc_sections		1
+#define bfd_elf32_bfd_merge_private_bfd_data \
+					_bfd_m68hc11_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_set_private_flags	_bfd_m68hc11_elf_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data \
+					_bfd_m68hc11_elf_print_private_bfd_data
 
 #include "elf32-target.h"
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 8f6ca49..9ab8780 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -1,6 +1,6 @@
 /* Motorola 68HC12-specific support for 32-bit ELF
-   Copyright 1999, 2000 Free Software Foundation, Inc.
-   Contributed by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+   Contributed by Stephane Carrez (stcarrez@nerim.fr)
    (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -24,11 +24,34 @@
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/m68hc11.h"
+#include "opcode/m68hc11.h"
 
 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
-PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+  PARAMS ((bfd *, bfd_reloc_code_real_type));
 static void m68hc11_info_to_howto_rel
-PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+
+static bfd_reloc_status_type m68hc11_elf_ignore_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type m68hc12_elf_special_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static int m68hc12_addr_is_banked PARAMS ((bfd_vma));
+static bfd_vma m68hc12_phys_addr PARAMS ((bfd_vma));
+static bfd_vma m68hc12_phys_page PARAMS ((bfd_vma));
+
+/* GC mark and sweep.  */
+static asection *elf32_m68hc11_gc_mark_hook
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static boolean elf32_m68hc11_gc_sweep_hook
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+	   const Elf_Internal_Rela *));
+
+boolean _bfd_m68hc12_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+boolean _bfd_m68hc12_elf_set_private_flags PARAMS ((bfd *, flagword));
+boolean _bfd_m68hc12_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
+
+
 
 /* Use REL instead of RELA to save space */
 #define USE_REL
@@ -37,6 +60,68 @@
    We must handle 8 and 16-bit relocations.  The 32-bit relocation
    is defined but not used except by gas when -gstabs is used (which
    is wrong).
+
+   The 68HC12 microcontroler has a memory bank switching system
+   with a 16Kb window in the 64Kb address space.  The extended memory
+   is mapped in the 16Kb window (at 0x8000).  The page register controls
+   which 16Kb bank is mapped.  The call/rtc instructions take care of
+   bank switching in function calls/returns.
+
+   For GNU Binutils to work, we consider there is a physical memory
+   at 0..0x0ffff and a kind of virtual memory above that.  Symbols
+   in virtual memory have their addresses treated in a special way
+   when disassembling and when linking.
+
+   For the linker to work properly, we must always relocate the virtual
+   memory as if it is mapped at 0x8000.  When a 16-bit relocation is
+   made in the virtual memory, we check that it does not cross the
+   memory bank where it is used.  This would involve a page change
+   which would be wrong.  The 24-bit relocation is for that and it
+   treats the address as a physical address + page number.
+
+
+					Banked
+					Address Space
+                                        |               |       Page n
+					+---------------+ 0x1010000
+                                        |               |
+                                        | jsr _foo      |
+                                        | ..            |       Page 3
+                                        | _foo:         |
+					+---------------+ 0x100C000
+					|	        |
+                                        | call _bar     |
+					| ..	        |	Page 2
+					| _bar:	        |
+					+---------------+ 0x1008000
+				/------>|	        |
+				|	| call _foo     |	Page 1
+				|	|       	|
+				|	+---------------+ 0x1004000
+      Physical			|	|	        |
+      Address Space		|	|	        |	Page 0
+				|	|	        |
+    +-----------+ 0x00FFFF	|	+---------------+ 0x1000000
+    |		|		|
+    | call _foo	|		|
+    |		|		|
+    +-----------+ 0x00BFFF -+---/
+    |		|           |
+    |		|	    |
+    |		| 16K	    |
+    |		|	    |
+    +-----------+ 0x008000 -+
+    |		|
+    |		|
+    =		=
+    |		|
+    |		|
+    +-----------+ 0000
+
+
+   The 'call _foo' must be relocated with page 3 and 16-bit address
+   mapped at 0x8000.  
+
    The 3-bit and 16-bit PC rel relocation is only used by 68HC12.  */
 static reloc_howto_type elf_m68hc11_howto_table[] = {
   /* This reloc does nothing.  */
@@ -46,9 +131,9 @@
 	 32,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield,	/* complain_on_overflow */
+	 complain_overflow_dont,/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_NONE",	/* name */
+	 "R_M68HC12_NONE",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
 	 0,			/* dst_mask */
@@ -63,7 +148,7 @@
 	 0,			/* bitpos */
 	 complain_overflow_bitfield,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_8",		/* name */
+	 "R_M68HC12_8",		/* name */
 	 false,			/* partial_inplace */
 	 0x00ff,		/* src_mask */
 	 0x00ff,		/* dst_mask */
@@ -78,7 +163,7 @@
 	 0,			/* bitpos */
 	 complain_overflow_bitfield,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_HI8",	/* name */
+	 "R_M68HC12_HI8",	/* name */
 	 false,			/* partial_inplace */
 	 0x00ff,		/* src_mask */
 	 0x00ff,		/* dst_mask */
@@ -93,7 +178,7 @@
 	 0,			/* bitpos */
 	 complain_overflow_dont,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_LO8",	/* name */
+	 "R_M68HC12_LO8",	/* name */
 	 false,			/* partial_inplace */
 	 0x00ff,		/* src_mask */
 	 0x00ff,		/* dst_mask */
@@ -108,9 +193,9 @@
 	 0,			/* bitpos */
 	 complain_overflow_bitfield,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_PCREL_8",	/* name */
+	 "R_M68HC12_PCREL_8",	/* name */
 	 false,			/* partial_inplace */
-	 0x0,			/* src_mask */
+	 0x00ff,		/* src_mask */
 	 0x00ff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -122,8 +207,8 @@
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont /*bitfield */ ,	/* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_16",	/* name */
+	 m68hc12_elf_special_reloc,	/* special_function */
+	 "R_M68HC12_16",	/* name */
 	 false,			/* partial_inplace */
 	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
@@ -139,7 +224,7 @@
 	 0,			/* bitpos */
 	 complain_overflow_bitfield,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_32",	/* name */
+	 "R_M68HC12_32",	/* name */
 	 false,			/* partial_inplace */
 	 0xffffffff,		/* src_mask */
 	 0xffffffff,		/* dst_mask */
@@ -154,7 +239,7 @@
 	 0,			/* bitpos */
 	 complain_overflow_bitfield,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_4B",	/* name */
+	 "R_M68HC12_4B",	/* name */
 	 false,			/* partial_inplace */
 	 0x003,			/* src_mask */
 	 0x003,			/* dst_mask */
@@ -169,9 +254,9 @@
 	 0,			/* bitpos */
 	 complain_overflow_dont,	/* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
-	 "R_M68HC11_PCREL_16",	/* name */
+	 "R_M68HC12_PCREL_16",	/* name */
 	 false,			/* partial_inplace */
-	 0x0,			/* src_mask */
+	 0xffff,		/* src_mask */
 	 0xffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
@@ -204,6 +289,88 @@
 	 0,			/* src_mask */
 	 0,			/* dst_mask */
 	 false),		/* pcrel_offset */
+
+  /* A 24 bit relocation */
+  HOWTO (R_M68HC11_24,	        /* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 24,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc12_elf_special_reloc,	/* special_function */
+	 "R_M68HC12_24",	/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+  
+  /* A 16-bit low relocation */
+  HOWTO (R_M68HC11_LO16,        /* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc12_elf_special_reloc,/* special_function */
+	 "R_M68HC12_LO16",	/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A page relocation */
+  HOWTO (R_M68HC11_PAGE,        /* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 8,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc12_elf_special_reloc,/* special_function */
+	 "R_M68HC12_PAGE",	/* name */
+	 false,			/* partial_inplace */
+	 0x00ff,		/* src_mask */
+	 0x00ff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
+  EMPTY_HOWTO (16),
+  EMPTY_HOWTO (17),
+  EMPTY_HOWTO (18),
+  EMPTY_HOWTO (19),
+  
+  /* Mark beginning of a jump instruction (any form).  */
+  HOWTO (R_M68HC11_RL_JUMP,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc11_elf_ignore_reloc,	/* special_function */
+	 "R_M68HC12_RL_JUMP",	/* name */
+	 true,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 true),                 /* pcrel_offset */
+
+  /* Mark beginning of Gcc relaxation group instruction.  */
+  HOWTO (R_M68HC11_RL_GROUP,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 m68hc11_elf_ignore_reloc,	/* special_function */
+	 "R_M68HC12_RL_GROUP",	/* name */
+	 true,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 true),                 /* pcrel_offset */
 };
 
 /* Map BFD reloc types to M68HC11 ELF reloc types.  */
@@ -225,9 +392,15 @@
   {BFD_RELOC_32, R_M68HC11_32},
   {BFD_RELOC_M68HC11_3B, R_M68HC11_3B},
 
-  /* The following relocs are defined but they probably don't work yet.  */
   {BFD_RELOC_VTABLE_INHERIT, R_M68HC11_GNU_VTINHERIT},
   {BFD_RELOC_VTABLE_ENTRY, R_M68HC11_GNU_VTENTRY},
+
+  {BFD_RELOC_M68HC11_LO16, R_M68HC11_LO16},
+  {BFD_RELOC_M68HC11_PAGE, R_M68HC11_PAGE},
+  {BFD_RELOC_M68HC11_24, R_M68HC11_24},
+
+  {BFD_RELOC_M68HC11_RL_JUMP, R_M68HC11_RL_JUMP},
+  {BFD_RELOC_M68HC11_RL_GROUP, R_M68HC11_RL_GROUP},
 };
 
 static reloc_howto_type *
@@ -248,6 +421,158 @@
   return NULL;
 }
 
+/* This function is used for relocs which are only used for relaxing,
+   which the linker should otherwise ignore.  */
+
+static bfd_reloc_status_type
+m68hc11_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
+                          output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  if (output_bfd != NULL)
+    reloc_entry->address += input_section->output_offset;
+  return bfd_reloc_ok;
+}
+
+static int
+m68hc12_addr_is_banked (addr)
+     bfd_vma addr;
+{
+   return (addr >= M68HC12_BANK_VIRT) ? 1 : 0;
+}
+
+/* Return the physical address seen by the processor, taking
+   into account banked memory.  */
+static bfd_vma
+m68hc12_phys_addr (addr)
+     bfd_vma addr;
+{
+  if (addr < M68HC12_BANK_VIRT)
+    return addr;
+
+  /* Map the address to the memory bank.  */
+  addr -= M68HC12_BANK_VIRT;
+  addr &= M68HC12_BANK_MASK;
+  addr += M68HC12_BANK_BASE;
+  return addr;
+}
+
+/* Return the page number corresponding to an address in banked memory.  */
+static bfd_vma
+m68hc12_phys_page (addr)
+     bfd_vma addr;
+{
+  if (addr < M68HC12_BANK_VIRT)
+    return 0;
+
+  /* Map the address to the memory bank.  */
+  addr -= M68HC12_BANK_VIRT;
+  addr >>= M68HC12_BANK_SHIFT;
+  addr &= M68HC12_BANK_PAGE_MASK;
+  return addr;
+}
+
+static bfd_reloc_status_type
+m68hc12_elf_special_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;
+{
+  reloc_howto_type *howto;
+  bfd_vma relocation;
+  bfd_vma phys_addr;
+  bfd_vma phys_page;
+  bfd_vma insn_page;
+  bfd_vma insn_addr;
+  
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && (! reloc_entry->howto->partial_inplace
+	  || reloc_entry->addend == 0))
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+
+  if (output_bfd != NULL)
+    return bfd_reloc_continue;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  /* Compute relocation.  */
+  relocation = (symbol->value
+		+ symbol->section->output_section->vma
+		+ symbol->section->output_offset);
+  relocation += reloc_entry->addend;
+  relocation += bfd_get_16 (abfd, (bfd_byte*) data + reloc_entry->address);
+
+  /* Do the memory bank mapping.  */
+  phys_addr = m68hc12_phys_addr (relocation);
+  phys_page = m68hc12_phys_page (relocation);
+
+  howto = reloc_entry->howto;
+  if (howto->complain_on_overflow != complain_overflow_dont
+      && (phys_addr & (((bfd_vma) -1) << 16)))
+     return bfd_reloc_overflow;
+
+  switch (howto->type)
+    {
+    case R_M68HC11_16:
+          /* Get virtual address of instruction having the relocation.  */
+       insn_addr = input_section->output_section->vma
+          + input_section->output_offset
+          + reloc_entry->address;
+
+      insn_page = m68hc12_phys_page (insn_addr);
+
+      if (m68hc12_addr_is_banked (relocation)
+          && m68hc12_addr_is_banked (insn_addr)
+          && phys_page != insn_page)
+         {
+            *error_message = _("address is not in the same bank");
+            return bfd_reloc_dangerous;
+         }
+      if (m68hc12_addr_is_banked (relocation)
+          && !m68hc12_addr_is_banked (insn_addr))
+         {
+            *error_message = _("reference to a banked address in "
+                               "the normal address space");
+            return bfd_reloc_dangerous;
+         }
+      
+    case R_M68HC11_LO16:
+      bfd_put_16 (abfd, phys_addr, (bfd_byte*) data + reloc_entry->address);
+      break;
+
+    case R_M68HC11_24:
+      bfd_put_16 (abfd, phys_addr, (bfd_byte*) data + reloc_entry->address);
+      bfd_put_8 (abfd, phys_page, (bfd_byte*) data + reloc_entry->address + 2);
+      break;
+
+    case R_M68HC11_PAGE:
+      bfd_put_8 (abfd, phys_page, (bfd_byte*) data + reloc_entry->address);
+      break;
+
+    default:
+       abort ();
+       break;
+    }
+  
+  return bfd_reloc_ok;
+}
+
 /* Set the howto pointer for an M68HC11 ELF reloc.  */
 
 static void
@@ -263,6 +588,177 @@
   cache_ptr->howto = &elf_m68hc11_howto_table[r_type];
 }
 
+static asection *
+elf32_m68hc11_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     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))
+	{
+	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
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+  return NULL;
+}
+
+static boolean
+elf32_m68hc11_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;
+{
+  /* We don't use got and plt entries for 68hc11/68hc12.  */
+  return true;
+}
+
+
+/* Set and control ELF flags in ELF header.  */
+
+boolean
+_bfd_m68hc12_elf_set_private_flags (abfd, flags)
+     bfd *abfd;
+     flagword flags;
+{
+  BFD_ASSERT (!elf_flags_init (abfd)
+	      || elf_elfheader (abfd)->e_flags == flags);
+
+  elf_elfheader (abfd)->e_flags = flags;
+  elf_flags_init (abfd) = true;
+  return true;
+}
+
+/* Merge backend specific data from an object file to the output
+   object file when linking.  */
+
+boolean
+_bfd_m68hc12_elf_merge_private_bfd_data (ibfd, obfd)
+     bfd *ibfd;
+     bfd *obfd;
+{
+  flagword old_flags;
+  flagword new_flags;
+  boolean ok = true;
+
+  /* Check if we have the same endianess */
+  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+    return false;
+
+  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+    return true;
+
+  new_flags = elf_elfheader (ibfd)->e_flags;
+  elf_elfheader (obfd)->e_flags |= new_flags & EF_M68HC11_ABI;
+  old_flags = elf_elfheader (obfd)->e_flags;
+
+  if (! elf_flags_init (obfd))
+    {
+      elf_flags_init (obfd) = true;
+      elf_elfheader (obfd)->e_flags = new_flags;
+      elf_elfheader (obfd)->e_ident[EI_CLASS]
+	= elf_elfheader (ibfd)->e_ident[EI_CLASS];
+
+      if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+	  && bfd_get_arch_info (obfd)->the_default)
+	{
+	  if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
+				   bfd_get_mach (ibfd)))
+	    return false;
+	}
+
+      return true;
+    }
+
+  /* Check ABI compatibility.  */
+  if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
+    {
+      (*_bfd_error_handler)
+	(_("%s: linking files compiled for 16-bit integers (-mshort) "
+           "and others for 32-bit integers"),
+	 bfd_archive_filename (ibfd));
+      ok = false;
+    }
+  if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
+    {
+      (*_bfd_error_handler)
+	(_("%s: linking files compiled for 32-bit double (-fshort-double) "
+           "and others for 64-bit double"),
+	 bfd_archive_filename (ibfd));
+      ok = false;
+    }
+  new_flags &= ~EF_M68HC11_ABI;
+  old_flags &= ~EF_M68HC11_ABI;
+
+  /* Warn about any other mismatches */
+  if (new_flags != old_flags)
+    {
+      (*_bfd_error_handler)
+	(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+	 bfd_archive_filename (ibfd), (unsigned long) new_flags,
+	 (unsigned long) old_flags);
+      ok = false;
+    }
+
+  if (! ok)
+    {
+      bfd_set_error (bfd_error_bad_value);
+      return false;
+    }
+
+  return true;
+}
+
+boolean
+_bfd_m68hc12_elf_print_private_bfd_data (abfd, ptr)
+     bfd *abfd;
+     PTR ptr;
+{
+  FILE *file = (FILE *) ptr;
+
+  BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+  /* Print normal ELF private data.  */
+  _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+  /* xgettext:c-format */
+  fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+
+  if (elf_elfheader (abfd)->e_flags & E_M68HC11_I32)
+    fprintf (file, _("[abi=32-bit int,"));
+  else
+    fprintf (file, _("[abi=16-bit int,"));
+
+  if (elf_elfheader (abfd)->e_flags & E_M68HC11_F64)
+    fprintf (file, _(" 64-bit double]"));
+  else
+    fprintf (file, _(" 32-bit double]"));
+
+  fputc ('\n', file);
+
+  return true;
+}
+
 /* Below is the only difference between elf32-m68hc12.c and elf32-m68hc11.c.
    The Motorola spec says to use a different Elf machine code.  */
 #define ELF_ARCH		bfd_arch_m68hc12
@@ -274,7 +770,17 @@
 
 #define elf_info_to_howto	0
 #define elf_info_to_howto_rel	m68hc11_info_to_howto_rel
+#define elf_backend_gc_mark_hook     elf32_m68hc11_gc_mark_hook
+#define elf_backend_gc_sweep_hook    elf32_m68hc11_gc_sweep_hook
 #define elf_backend_object_p	0
 #define elf_backend_final_write_processing	0
+/* Disabled as this backend uses the generic linker.  */
+#define elf_backend_can_gc_sections		0
+
+#define bfd_elf32_bfd_merge_private_bfd_data \
+					_bfd_m68hc12_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_set_private_flags	_bfd_m68hc12_elf_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data \
+					_bfd_m68hc12_elf_print_private_bfd_data
 
 #include "elf32-target.h"
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index b507fba..2c50ed08 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -37,7 +37,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *elf_m68k_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf_m68k_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -180,8 +180,6 @@
 #define bfd_elf32_bfd_reloc_type_lookup reloc_type_lookup
 #define ELF_ARCH bfd_arch_m68k
 /* end code generated by elf.el */
-
-#define USE_RELA
 
 /* Functions for the m68k ELF linker.  */
 
@@ -754,8 +752,8 @@
    relocation.  */
 
 static asection *
-elf_m68k_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf_m68k_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -785,9 +783,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -2113,12 +2109,8 @@
      char **errmsg;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
+  Elf_Internal_Rela *internal_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *p;
   bfd_size_type amt;
@@ -2131,40 +2123,6 @@
     return true;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  /* Read this BFD's symbols if we haven't done so already, or get the cached
-     copy if it exists.  */
-  if (symtab_hdr->contents != NULL)
-    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-  else
-    {
-      /* Go get them off disk.  */
-      amt = symtab_hdr->sh_info * sizeof (Elf32_External_Sym);
-      if (info->keep_memory)
-	extsyms = (Elf32_External_Sym *) bfd_alloc (abfd, amt);
-      else
-	extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-      if (extsyms == NULL)
-	goto error_return;
-      if (! info->keep_memory)
-	free_extsyms = extsyms;
-      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread (extsyms, amt, abfd) != amt)
-	goto error_return;
-      if (info->keep_memory)
-	symtab_hdr->contents = (unsigned char *) extsyms;
-    }
-
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  if (shndx_hdr->sh_size != 0)
-    {
-      amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-      if (shndx_buf == NULL)
-	goto error_return;
-      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-	goto error_return;
-    }
 
   /* Get a copy of the native relocations.  */
   internal_relocs = (_bfd_elf32_link_read_relocs
@@ -2172,8 +2130,6 @@
 		      info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! info->keep_memory)
-    free_relocs = internal_relocs;
 
   amt = (bfd_size_type) datasec->reloc_count * 12;
   relsec->contents = (bfd_byte *) bfd_alloc (abfd, amt);
@@ -2204,16 +2160,23 @@
       /* Get the target section referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-	  Elf32_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
-
 	  /* A local symbol.  */
-	  esym = extsyms + ELF32_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
+	  Elf_Internal_Sym *isym;
 
-	  targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	  /* Read this BFD's local symbols if we haven't done so already.  */
+	  if (isymbuf == NULL)
+	    {
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == NULL)
+		goto error_return;
+	    }
+
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	  targetsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 	}
       else
 	{
@@ -2237,21 +2200,19 @@
 	strncpy (p + 4, targetsec->output_section->name, 8);
     }
 
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
-  if (free_relocs != NULL)
-    free (free_relocs);
+  if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (datasec)->relocs != internal_relocs)
+    free (internal_relocs);
   return true;
 
 error_return:
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
-  if (free_relocs != NULL)
-    free (free_relocs);
+  if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (datasec)->relocs != internal_relocs)
+    free (internal_relocs);
   return false;
 }
 
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 38e9c13..789f725 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -29,8 +29,7 @@
 #include "elf/mcore.h"
 #include <assert.h>
 
-#define	USE_RELA	/* Only USE_REL is actually significant, but this is
-			   here are a reminder...  */
+/* RELA relocs are used here...  */
 
 static void mcore_elf_howto_init
   PARAMS ((void));
@@ -48,7 +47,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
 	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 static asection * mcore_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean mcore_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -311,7 +310,7 @@
   flagword new_flags;
 
   /* Check if we have the same endianess */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -573,8 +572,8 @@
    relocation.  */
 
 static asection *
-mcore_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *                        abfd;
+mcore_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *                   sec;
      struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
@@ -604,9 +603,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 5c201b3..f166732 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -80,12 +80,6 @@
   PARAMS ((bfd *, Elf_Internal_Note *));
 static boolean elf32_mips_grok_psinfo
   PARAMS ((bfd *, Elf_Internal_Note *));
-static boolean elf32_mips_discard_info
-  PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
-static boolean elf32_mips_ignore_discarded_relocs
-  PARAMS ((asection *));
-static boolean elf32_mips_write_section
-  PARAMS ((bfd *, asection *, bfd_byte *));
 static irix_compat_t elf32_mips_irix_compat
   PARAMS ((bfd *));
 
@@ -1393,7 +1387,7 @@
 
 static const struct elf_reloc_map mips_reloc_map[] =
 {
-  { BFD_RELOC_NONE, R_MIPS_NONE, },
+  { BFD_RELOC_NONE, R_MIPS_NONE },
   { BFD_RELOC_16, R_MIPS_16 },
   { BFD_RELOC_32, R_MIPS_32 },
   /* There is no BFD reloc for R_MIPS_REL32.  */
@@ -1576,6 +1570,9 @@
   if (SGI_COMPAT (abfd))
     elf_bad_symtab (abfd) = true;
 
+  if (ABI_N32_P (abfd))
+    return false;
+
   mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags);
   bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
 
@@ -1662,112 +1659,6 @@
   return true;
 }
 
-#define PDR_SIZE 32
-
-static boolean
-elf32_mips_discard_info (abfd, cookie, info)
-     bfd *abfd;
-     struct elf_reloc_cookie *cookie;
-     struct bfd_link_info *info;
-{
-  asection *o;
-  boolean ret = false;
-  unsigned char *tdata;
-  size_t i, skip;
-
-  o = bfd_get_section_by_name (abfd, ".pdr");
-  if (! o)
-    return false;
-  if (o->_raw_size == 0)
-    return false;
-  if (o->_raw_size % PDR_SIZE != 0)
-    return false;
-  if (o->output_section != NULL
-      && bfd_is_abs_section (o->output_section))
-    return false;
-
-  tdata = bfd_zmalloc (o->_raw_size / PDR_SIZE);
-  if (! tdata)
-    return false;
-
-  cookie->rels = _bfd_elf32_link_read_relocs (abfd, o, (PTR) NULL,
-					     (Elf_Internal_Rela *) NULL,
-					      info->keep_memory);
-  if (!cookie->rels)
-    {
-      free (tdata);
-      return false;
-    }
-
-  cookie->rel = cookie->rels;
-  cookie->relend = cookie->rels + o->reloc_count;
-
-  for (i = 0, skip = 0; i < o->_raw_size; i ++)
-    {
-      if (_bfd_elf32_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
-	{
-	  tdata[i] = 1;
-	  skip ++;
-	}
-    }
-
-  if (skip != 0)
-    {
-      elf_section_data (o)->tdata = tdata;
-      o->_cooked_size = o->_raw_size - skip * PDR_SIZE;
-      ret = true;
-    }
-  else
-    free (tdata);
-
-  if (! info->keep_memory)
-    free (cookie->rels);
-
-  return ret;
-}
-
-static boolean
-elf32_mips_ignore_discarded_relocs (sec)
-     asection *sec;
-{
-  if (strcmp (sec->name, ".pdr") == 0)
-    return true;
-  return false;
-}
-
-static boolean
-elf32_mips_write_section (output_bfd, sec, contents)
-     bfd *output_bfd;
-     asection *sec;
-     bfd_byte *contents;
-{
-  bfd_byte *to, *from, *end;
-  int i;
-
-  if (strcmp (sec->name, ".pdr") != 0)
-    return false;
-
-  if (elf_section_data (sec)->tdata == NULL)
-    return false;
-
-  to = contents;
-  end = contents + sec->_raw_size;
-  for (from = contents, i = 0;
-       from < end;
-       from += PDR_SIZE, i++)
-    {
-      if (((unsigned char *)elf_section_data (sec)->tdata)[i] == 1)
-	continue;
-      if (to != from)
-	memcpy (to, from, PDR_SIZE);
-      to += PDR_SIZE;
-    }
-  bfd_set_section_contents (output_bfd, sec->output_section, contents,
-			    (file_ptr) sec->output_offset,
-			    sec->_cooked_size);
-  return true;
-}
-
 /* Depending on the target vector we generate some version of Irix
    executables or "normal" MIPS ELF ABI executables.  */
 static irix_compat_t
@@ -1797,15 +1688,10 @@
      char **errmsg;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
+  Elf_Internal_Rela *internal_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *p;
-  bfd_size_type amt;
 
   BFD_ASSERT (! info->relocateable);
 
@@ -1814,41 +1700,17 @@
   if (datasec->reloc_count == 0)
     return true;
 
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
   /* Read this BFD's symbols if we haven't done so already, or get the cached
      copy if it exists.  */
-  if (symtab_hdr->contents != NULL)
-    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-  else
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+  if (symtab_hdr->sh_info != 0)
     {
-      /* Go get them off disk.  */
-      if (info->keep_memory)
-	extsyms = ((Elf32_External_Sym *)
-		   bfd_alloc (abfd, symtab_hdr->sh_size));
-      else
-	extsyms = ((Elf32_External_Sym *)
-		   bfd_malloc (symtab_hdr->sh_size));
-      if (extsyms == NULL)
-	goto error_return;
-      if (! info->keep_memory)
-	free_extsyms = extsyms;
-      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || (bfd_bread (extsyms, symtab_hdr->sh_size, abfd)
-	      != symtab_hdr->sh_size))
-	goto error_return;
-      if (info->keep_memory)
-	symtab_hdr->contents = (unsigned char *) extsyms;
-    }
-
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  if (shndx_hdr->sh_size != 0)
-    {
-      amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-      if (shndx_buf == NULL)
-	goto error_return;
-      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
+      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+      if (isymbuf == NULL)
+	isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					symtab_hdr->sh_info, 0,
+					NULL, NULL, NULL);
+      if (isymbuf == NULL)
 	goto error_return;
     }
 
@@ -1858,8 +1720,6 @@
 		      info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! info->keep_memory)
-    free_relocs = internal_relocs;
 
   relsec->contents = (bfd_byte *) bfd_alloc (abfd, datasec->reloc_count * 12);
   if (relsec->contents == NULL)
@@ -1890,16 +1750,11 @@
       /* Get the target section referred to by the reloc.  */
       if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-          Elf32_External_Sym *esym;
-          Elf_External_Sym_Shndx *shndx;
-          Elf_Internal_Sym isym;
+          Elf_Internal_Sym *isym;
 
           /* A local symbol.  */
-          esym = extsyms + ELF32_R_SYM (irel->r_info);
-          shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-	  targetsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	  isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	  targetsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 	}
       else
 	{
@@ -1936,21 +1791,21 @@
 	strncpy (p + 4, targetsec->output_section->name, 8);
     }
 
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
-  if (free_relocs != NULL)
-    free (free_relocs);
+  if (internal_relocs != NULL
+      && elf_section_data (datasec)->relocs != internal_relocs)
+    free (internal_relocs);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
   return true;
 
  error_return:
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
-  if (free_relocs != NULL)
-    free (free_relocs);
+  if (internal_relocs != NULL
+      && elf_section_data (datasec)->relocs != internal_relocs)
+    free (internal_relocs);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
   return false;
 }
 
@@ -2054,10 +1909,9 @@
 #define elf_backend_default_use_rela_p	0
 #define elf_backend_sign_extend_vma	true
 
-#define elf_backend_discard_info	elf32_mips_discard_info
+#define elf_backend_discard_info	_bfd_mips_elf_discard_info
 #define elf_backend_ignore_discarded_relocs \
-					elf32_mips_ignore_discarded_relocs
-#define elf_backend_write_section	elf32_mips_write_section
+					_bfd_mips_elf_ignore_discarded_relocs
 #define elf_backend_mips_irix_compat	elf32_mips_irix_compat
 #define elf_backend_mips_rtype_to_howto	mips_elf32_rtype_to_howto
 #define bfd_elf32_bfd_is_local_label_name \
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index 34d4d9f..7092110 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -41,7 +41,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
            const Elf_Internal_Rela *));
 static asection * openrisc_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean openrisc_elf_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -289,9 +289,6 @@
 }
 
 /* Relocate an OpenRISC 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.
@@ -468,12 +465,12 @@
    relocation.  */
 
 static asection *
-openrisc_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd ATTRIBUTE_UNUSED;
+openrisc_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel ATTRIBUTE_UNUSED;
-     struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
-     Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *rel;
+     struct elf_link_hash_entry *h;
+     Elf_Internal_Sym *sym;
 {
   if (h != NULL)
     {
@@ -499,9 +496,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
diff --git a/bfd/elf32-or32.c b/bfd/elf32-or32.c
index eed0b99..a61b09d 100644
--- a/bfd/elf32-or32.c
+++ b/bfd/elf32-or32.c
@@ -277,19 +277,19 @@
      asection *input_section;
      bfd *output_bfd;
      char **error_message ATTRIBUTE_UNUSED;
-{ 
+{
   if (output_bfd != (bfd *) NULL)
     {
       unsigned long insn;
       bfd_size_type addr = reloc_entry->address;
 
       reloc_entry->address += input_section->output_offset;
-      
+
       insn = bfd_get_32 (abfd, (bfd_byte *) data + addr);
       insn += symbol->section->output_section->vma;
       insn += symbol->section->output_offset;
       insn += symbol->value;
-      bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); 
+      bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
 
       return bfd_reloc_ok;
     }
@@ -307,7 +307,7 @@
      asection *input_section;
      bfd *output_bfd;
      char **error_message ATTRIBUTE_UNUSED;
-{ 
+{
   if (output_bfd != (bfd *) NULL)
     {
       unsigned short insn;
@@ -319,7 +319,7 @@
       insn += symbol->section->output_section->vma;
       insn += symbol->section->output_offset;
       insn += symbol->value;
-      bfd_put_16 (abfd, insn, (bfd_byte *) data + addr); 
+      bfd_put_16 (abfd, insn, (bfd_byte *) data + addr);
 
       return bfd_reloc_ok;
     }
@@ -337,7 +337,7 @@
      asection *input_section;
      bfd *output_bfd;
      char **error_message ATTRIBUTE_UNUSED;
-{ 
+{
   if (output_bfd != (bfd *) NULL)
     {
       unsigned char insn;
@@ -349,7 +349,7 @@
       insn += symbol->section->output_section->vma;
       insn += symbol->section->output_offset;
       insn += symbol->value;
-      bfd_put_8 (abfd, insn, (bfd_byte *) data + addr); 
+      bfd_put_8 (abfd, insn, (bfd_byte *) data + addr);
 
       return bfd_reloc_ok;
     }
@@ -391,7 +391,7 @@
   bfd_reloc_status_type ret;
   bfd_vma relocation;
   struct or32_consth *n;
-  
+
   ret = bfd_reloc_ok;
 
   if (bfd_is_und_section (symbol->section)
@@ -505,7 +505,7 @@
      asection *input_section;
      bfd *output_bfd;
      char **error_message ATTRIBUTE_UNUSED;
-{ 
+{
   if (output_bfd != (bfd *) NULL)
     {
       unsigned long insn, tmp;
@@ -517,7 +517,7 @@
       tmp = insn | 0xfc000000;
       tmp -= (input_section->output_offset >> 2);
       insn = (insn & 0xfc000000) | (tmp & 0x03ffffff);
-      bfd_put_32 (abfd, insn, (bfd_byte *) data + addr); 
+      bfd_put_32 (abfd, insn, (bfd_byte *) data + addr);
 
       return bfd_reloc_ok;
     }
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 31d9e0c..d5ed0c4 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -31,7 +31,7 @@
 #include "elf-bfd.h"
 #include "elf/ppc.h"
 
-#define USE_RELA		/* we want RELA relocations, not REL */
+/* RELA relocations are used here.  */
 
 static reloc_howto_type *ppc_elf_reloc_type_lookup
   PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
@@ -43,6 +43,7 @@
   PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
 static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean ppc_elf_object_p PARAMS ((bfd *));
 static boolean ppc_elf_set_private_flags PARAMS ((bfd *, flagword));
 static boolean ppc_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
 
@@ -56,7 +57,7 @@
 
 static boolean ppc_elf_section_from_shdr PARAMS ((bfd *,
 						  Elf32_Internal_Shdr *,
-						  char *));
+						  const char *));
 static boolean ppc_elf_fake_sections
   PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
 
@@ -70,7 +71,7 @@
 					     asection *,
 					     const Elf_Internal_Rela *));
 
-static asection * ppc_elf_gc_mark_hook PARAMS ((bfd *abfd,
+static asection * ppc_elf_gc_mark_hook PARAMS ((asection *sec,
 						struct bfd_link_info *info,
 						Elf_Internal_Rela *rel,
 						struct elf_link_hash_entry *h,
@@ -1380,6 +1381,27 @@
   return bfd_reloc_continue;
 }
 
+/* Fix bad default arch selected for a 32 bit input bfd when the
+   default is 64 bit.  */
+
+static boolean
+ppc_elf_object_p (abfd)
+     bfd *abfd;
+{
+  if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64)
+    {
+      Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
+
+      if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS32)
+	{
+	  /* Relies on arch after 64 bit default being 32 bit default.  */
+	  abfd->arch_info = abfd->arch_info->next;
+	  BFD_ASSERT (abfd->arch_info->bits_per_word == 32);
+	}
+    }
+  return true;
+}
+
 /* Function to set whether a module needs the -mrelocatable bit set.  */
 
 static boolean
@@ -1407,7 +1429,7 @@
   boolean error;
 
   /* Check if we have the same endianess */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -1490,7 +1512,7 @@
 ppc_elf_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf32_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   asection *newsect;
   flagword flags;
@@ -2459,8 +2481,8 @@
    relocation.  */
 
 static asection *
-ppc_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+ppc_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -2490,9 +2512,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -3797,6 +3817,7 @@
 #define bfd_elf32_bfd_set_private_flags		ppc_elf_set_private_flags
 #define bfd_elf32_bfd_final_link		_bfd_elf32_gc_common_final_link
 
+#define elf_backend_object_p			ppc_elf_object_p
 #define elf_backend_gc_mark_hook		ppc_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook		ppc_elf_gc_sweep_hook
 #define elf_backend_section_from_shdr		ppc_elf_section_from_shdr
@@ -3815,4 +3836,7 @@
 #define elf_backend_grok_psinfo			ppc_elf_grok_psinfo
 #define elf_backend_reloc_type_class		ppc_elf_reloc_type_class
 
+#ifndef ELF32_PPC_C_INCLUDED
 #include "elf32-target.h"
+#endif
+
diff --git a/gdb/29k-share/udi/udiptcfg.h b/bfd/elf32-ppcqnx.c
similarity index 61%
copy from gdb/29k-share/udi/udiptcfg.h
copy to bfd/elf32-ppcqnx.c
index 1641a53..35fbe37 100644
--- a/gdb/29k-share/udi/udiptcfg.h
+++ b/bfd/elf32-ppcqnx.c
@@ -1,6 +1,8 @@
-/* Copyright 1993 Free Software Foundation, Inc.
+/* PowerPC QNX specific support for 32-bit ELF
+   Copyright 2002 
+   Free Software Foundation, Inc.
 
-   This file is part of GDB.
+   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
@@ -11,9 +13,20 @@
    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 "udipt29k.h"
+#define ELF32_PPC_C_INCLUDED
+#include "elf32-ppc.c"
+
+#include "elf32-qnx.h"
+
+#undef  TARGET_LITTLE_SYM 
+#define TARGET_LITTLE_SYM       bfd_elf32_powerpcleqnx_vec
+#undef  TARGET_BIG_SYM
+#define TARGET_BIG_SYM          bfd_elf32_powerpcqnx_vec
+
+#include "elf32-target.h"
+
diff --git a/bfd/elf32-qnx.h b/bfd/elf32-qnx.h
new file mode 100644
index 0000000..d4eefb8
--- /dev/null
+++ b/bfd/elf32-qnx.h
@@ -0,0 +1,111 @@
+/* QNX specific support for 32-bit ELF
+   Copyright 2002  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.  */
+
+  /* Returns the end address of the segment + 1.  */
+#define SEGMENT_END(segment, start)                     \
+  (start + (segment->p_memsz > segment->p_filesz        \
+   ? segment->p_memsz : segment->p_filesz))
+
+static boolean elf_qnx_copy_private_bfd_data_p
+  PARAMS ((bfd *, asection *, bfd *, asection *));
+static boolean elf_qnx_is_contained_by_filepos
+  PARAMS ((asection *, Elf_Internal_Phdr *));
+static void elf_qnx_set_nonloadable_filepos
+  PARAMS ((bfd *, Elf_Internal_Phdr *));
+
+static boolean
+elf_qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
+     bfd *ibfd;
+     asection *isec;
+     bfd *obfd;
+     asection *osec;
+{
+  /* We don't use these parameters, but another target might.  */
+  ibfd = ibfd;
+  obfd = obfd;
+  osec = osec;
+
+  return isec->next == NULL;
+}
+
+static boolean
+elf_qnx_is_contained_by_filepos (section, segment)
+     asection *section;
+     Elf_Internal_Phdr *segment;
+{
+  return ((bfd_vma) section->filepos >= segment->p_offset
+          && ((bfd_vma) section->filepos + section->_raw_size
+	      <= SEGMENT_END (segment, segment->p_offset)));
+}
+
+static void
+elf_qnx_set_nonloadable_filepos (abfd, phdrs)
+     bfd *abfd;
+     Elf_Internal_Phdr *phdrs;
+{
+  struct elf_segment_map *m;
+  Elf_Internal_Phdr *p;
+  file_ptr off = 0;
+
+  for (m = elf_tdata (abfd)->segment_map, p = phdrs;
+       m != NULL;
+       m = m->next, p++)
+    {
+      unsigned int i;
+      asection **secpp;
+
+      for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+        {
+          asection *sec;
+
+          sec = *secpp;
+
+          if (p->p_type == PT_LOAD)
+	    off = sec->filepos;
+          else
+            {
+              if (i == 0)
+                {
+                  if (sec->filepos)
+                    p->p_offset = sec->filepos;
+                  else
+                    p->p_offset = off;
+                }
+              if (!sec->filepos)
+                {
+                  off += sec->_raw_size;
+                  p->p_filesz += sec->_raw_size;
+                }
+            }
+        }
+    }
+  return;
+}
+
+#ifndef elf_backend_set_nonloadable_filepos
+#define elf_backend_set_nonloadable_filepos elf_qnx_set_nonloadable_filepos
+#endif
+
+#ifndef elf_backend_is_contained_by_filepos
+#define elf_backend_is_contained_by_filepos elf_qnx_is_contained_by_filepos
+#endif
+
+#ifndef elf_backend_copy_private_bfd_data_p
+#define elf_backend_copy_private_bfd_data_p elf_qnx_copy_private_bfd_data_p
+#endif
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 5032a5c..bbc2ead 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -40,12 +40,13 @@
 static boolean elf_s390_create_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
 static void elf_s390_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static boolean elf_s390_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *elf_s390_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf_s390_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -71,8 +72,6 @@
 static boolean elf_s390_object_p PARAMS ((bfd *));
 static boolean elf_s390_grok_prstatus PARAMS ((bfd *, Elf_Internal_Note *));
 
-#define USE_RELA 1		/* We want RELA relocations, not REL.  */
-
 #include "elf/s390.h"
 
 /* The relocation "howto" table.  */
@@ -564,7 +563,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf_s390_copy_indirect_symbol (dir, ind)
+elf_s390_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct elf_s390_link_hash_entry *edir, *eind;
@@ -606,7 +606,7 @@
       eind->dyn_relocs = NULL;
     }
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 /* Look through the relocs for a section during the first phase, and
@@ -903,8 +903,8 @@
    relocation.  */
 
 static asection *
-elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf_s390_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -934,9 +934,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1064,7 +1062,7 @@
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later
-     (although we could actually do it here). */
+     (although we could actually do it here).  */
   if (h->type == STT_FUNC
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
@@ -1973,9 +1971,11 @@
 	  break;
 	}
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index ef737b5..c8f179b 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -78,7 +78,7 @@
 static boolean sh_elf_create_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 static asection * sh_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean sh_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -1546,7 +1546,6 @@
 {
   static bfd_vma last_addr;
   static asection *last_symbol_section;
-  bfd_byte *free_contents = NULL;
   bfd_byte *start_ptr, *ptr, *last_ptr;
   int diff, cum_diff;
   bfd_signed_vma x;
@@ -1581,7 +1580,6 @@
 	  contents = (bfd_byte *) bfd_malloc (symbol_section->_raw_size);
 	  if (contents == NULL)
 	    return bfd_reloc_outofrange;
-	  free_contents = contents;
 	  if (! bfd_get_section_contents (input_bfd, symbol_section, contents,
 					  (file_ptr) 0,
 					  symbol_section->_raw_size))
@@ -1621,8 +1619,9 @@
       end = start0;
     }
 
-  if (free_contents)
-    free (free_contents);
+  if (contents != NULL
+      && elf_section_data (symbol_section)->this_hdr.contents != contents)
+    free (contents);
 
   insn = bfd_get_16 (input_bfd, contents + addr);
 
@@ -1888,16 +1887,11 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   boolean have_code;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
-  Elf32_External_Sym *extsyms = NULL;
-  Elf32_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   *again = false;
 
@@ -1920,15 +1914,12 @@
     sec->_cooked_size = sec->_raw_size;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
 
   internal_relocs = (_bfd_elf32_link_read_relocs
 		     (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   have_code = false;
 
@@ -1956,7 +1947,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -2021,55 +2011,25 @@
 	}
 
       /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
+      if (isymbuf == NULL && symtab_hdr->sh_info != 0)
 	{
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf32_External_Sym);
-	      extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (bfd_byte *) extsyms;
-	    }
-
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (bfd_byte *) shndx_buf;
-	    }
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF32_R_SYM (irelfn->r_info) < symtab_hdr->sh_info)
 	{
 	  /* A local symbol.  */
-	  Elf32_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  Elf_Internal_Sym *isym;
 
-	  esym = extsyms + ELF32_R_SYM (irelfn->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelfn->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-	  if (isym.st_shndx
+	  isym = isymbuf + ELF32_R_SYM (irelfn->r_info);
+	  if (isym->st_shndx
 	      != (unsigned int) _bfd_elf_section_from_bfd_section (abfd, sec))
 	    {
 	      ((*_bfd_error_handler)
@@ -2078,7 +2038,7 @@
 	      continue;
 	    }
 
-	  symval = (isym.st_value
+	  symval = (isym->st_value
 		    + sec->output_section->vma
 		    + sec->output_offset);
 	}
@@ -2129,12 +2089,8 @@
 	 the linker is run.  */
 
       elf_section_data (sec)->relocs = internal_relocs;
-      free_relocs = NULL;
-
       elf_section_data (sec)->this_hdr.contents = contents;
-      free_contents = NULL;
-
-      free_extsyms = NULL;
+      symtab_hdr->contents = (unsigned char *) isymbuf;
 
       /* Replace the jsr with a bsr.  */
 
@@ -2239,7 +2195,6 @@
 	      contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
 	      if (contents == NULL)
 		goto error_return;
-	      free_contents = contents;
 
 	      if (! bfd_get_section_contents (abfd, sec, contents,
 					      (file_ptr) 0, sec->_raw_size))
@@ -2254,22 +2209,28 @@
       if (swapped)
 	{
 	  elf_section_data (sec)->relocs = internal_relocs;
-	  free_relocs = NULL;
-
 	  elf_section_data (sec)->this_hdr.contents = contents;
-	  free_contents = NULL;
-
-	  free_extsyms = NULL;
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
 	}
     }
 
-  if (free_relocs != NULL)
-    free (free_relocs);
-
-  if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (! link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
@@ -2277,38 +2238,22 @@
 	}
     }
 
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-
-  if (free_extsyms != NULL)
-    {
-      if (! link_info->keep_memory)
-	{
-	  symtab_hdr->contents = NULL;
-	  free (free_extsyms);
-	}
-    }
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-  if (free_extsyms != NULL)
-    {
-      symtab_hdr->contents = NULL;
-      free (free_extsyms);
-    }
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
 
   return false;
 }
@@ -2325,25 +2270,19 @@
      int count;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf32_External_Sym *extsyms;
   unsigned int sec_shndx;
   bfd_byte *contents;
   Elf_Internal_Rela *irel, *irelend;
   Elf_Internal_Rela *irelalign;
   bfd_vma toaddr;
-  Elf32_External_Sym *esym, *esymend;
-  Elf_External_Sym_Shndx *shndx_buf, *shndx;
+  Elf_Internal_Sym *isymbuf, *isym, *isymend;
   struct elf_link_hash_entry **sym_hashes;
   struct elf_link_hash_entry **end_hashes;
   unsigned int symcount;
   asection *o;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  shndx_buf = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
+  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
 
   sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
 
@@ -2391,7 +2330,6 @@
       bfd_vma nraddr, stop;
       bfd_vma start = 0;
       int insn = 0;
-      Elf_Internal_Sym sym;
       int off, adjust, oinsn;
       bfd_signed_vma voff = 0;
       boolean overflow;
@@ -2445,18 +2383,15 @@
              range to be adjusted, and hence must be changed.  */
 	  if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	    {
-	      esym = extsyms + ELF32_R_SYM (irel->r_info);
-	      shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irel->r_info) : 0);
-	      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &sym);
-
-	      if (sym.st_shndx == sec_shndx
-		  && (sym.st_value <= addr
-		      || sym.st_value >= toaddr))
+	      isym = isymbuf + ELF32_R_SYM (irel->r_info);
+	      if (isym->st_shndx == sec_shndx
+		  && (isym->st_value <= addr
+		      || isym->st_value >= toaddr))
 		{
 		  bfd_vma val;
 
 		  val = bfd_get_32 (abfd, contents + nraddr);
-		  val += sym.st_value;
+		  val += isym->st_value;
 		  if (val > addr && val < toaddr)
 		    bfd_put_32 (abfd, val - count, contents + nraddr);
 		}
@@ -2649,8 +2584,6 @@
       irelscanend = internal_relocs + o->reloc_count;
       for (irelscan = internal_relocs; irelscan < irelscanend; irelscan++)
 	{
-	  Elf_Internal_Sym sym;
-
 	  /* Dwarf line numbers use R_SH_SWITCH32 relocs.  */
 	  if (ELF32_R_TYPE (irelscan->r_info) == (int) R_SH_SWITCH32)
 	    {
@@ -2708,13 +2641,10 @@
 	    continue;
 
 
-	  esym = extsyms + ELF32_R_SYM (irelscan->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (irelscan->r_info) : 0);
-	  bfd_elf32_swap_symbol_in (abfd, esym, shndx, &sym);
-
-	  if (sym.st_shndx == sec_shndx
-	      && (sym.st_value <= addr
-		  || sym.st_value >= toaddr))
+	  isym = isymbuf + ELF32_R_SYM (irelscan->r_info);
+	  if (isym->st_shndx == sec_shndx
+	      && (isym->st_value <= addr
+		  || isym->st_value >= toaddr))
 	    {
 	      bfd_vma val;
 
@@ -2740,7 +2670,7 @@
 		}
 
 	      val = bfd_get_32 (abfd, ocontents + irelscan->r_offset);
-	      val += sym.st_value;
+	      val += isym->st_value;
 	      if (val > addr && val < toaddr)
 		bfd_put_32 (abfd, val - count,
 			    ocontents + irelscan->r_offset);
@@ -2749,23 +2679,13 @@
     }
 
   /* Adjust the local symbols defined in this section.  */
-  shndx = shndx_buf;
-  esym = extsyms;
-  esymend = esym + symtab_hdr->sh_info;
-  for (; esym < esymend; esym++, shndx = (shndx ? shndx + 1 : NULL))
+  isymend = isymbuf + symtab_hdr->sh_info;
+  for (isym = isymbuf; isym < isymend; isym++)
     {
-      Elf_Internal_Sym isym;
-      Elf_External_Sym_Shndx dummy;
-
-      bfd_elf32_swap_symbol_in (abfd, esym, shndx, &isym);
-
-      if (isym.st_shndx == sec_shndx
-	  && isym.st_value > addr
-	  && isym.st_value < toaddr)
-	{
-	  isym.st_value -= count;
-	  bfd_elf32_swap_symbol_out (abfd, &isym, (PTR) esym, (PTR) &dummy);
-	}
+      if (isym->st_shndx == sec_shndx
+	  && isym->st_value > addr
+	  && isym->st_value < toaddr)
+	isym->st_value -= count;
     }
 
   /* Now adjust the global symbols defined in this section.  */
@@ -3027,7 +2947,7 @@
   0xcc, 0x00, 0x01, 0x10, /* movi  .got.plt >> 16, r17 */
   0xc8, 0x00, 0x01, 0x10, /* shori .got.plt & 65535, r17 */
   0x89, 0x10, 0x09, 0x90, /* ld.l  r17, 8, r25 */
-  0x6b, 0xf1, 0x46, 0x00, /* ptabs r17, tr0 */
+  0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
   0x89, 0x10, 0x05, 0x10, /* ld.l  r17, 4, r17 */
   0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
   0x6f, 0xf0, 0xff, 0xf0, /* nop */
@@ -3047,7 +2967,7 @@
   0x10, 0x01, 0x00, 0xcc, /* movi  .got.plt >> 16, r17 */
   0x10, 0x01, 0x00, 0xc8, /* shori .got.plt & 65535, r17 */
   0x90, 0x09, 0x10, 0x89, /* ld.l  r17, 8, r25 */
-  0x00, 0x46, 0xf1, 0x6b, /* ptabs r17, tr0 */
+  0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
   0x10, 0x05, 0x10, 0x89, /* ld.l  r17, 4, r17 */
   0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
   0xf0, 0xff, 0xf0, 0x6f, /* nop */
@@ -3975,7 +3895,7 @@
 	}
 
       /* Allocate memory for the section contents.  */
-      s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
       if (s->contents == NULL && s->_raw_size != 0)
 	return false;
     }
@@ -4840,15 +4760,11 @@
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   asection *input_section = link_order->u.indirect.section;
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf32_External_Sym *external_syms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
@@ -4860,7 +4776,6 @@
 						       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
 
   memcpy (data, elf_section_data (input_section)->this_hdr.contents,
 	  (size_t) input_section->_raw_size);
@@ -4868,48 +4783,26 @@
   if ((input_section->flags & SEC_RELOC) != 0
       && input_section->reloc_count > 0)
     {
-      Elf_Internal_Sym *isymp;
       asection **secpp;
-      Elf32_External_Sym *esym, *esymend;
+      Elf_Internal_Sym *isym, *isymend;
       bfd_size_type amt;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else if (symtab_hdr->sh_info != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  external_syms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) external_syms, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
-      if (symtab_hdr->sh_info != 0 && shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_return;
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
-	    goto error_return;
-	}
-
       internal_relocs = (_bfd_elf32_link_read_relocs
 			 (input_bfd, input_section, (PTR) NULL,
 			  (Elf_Internal_Rela *) NULL, false));
       if (internal_relocs == NULL)
 	goto error_return;
 
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (internal_syms == NULL && amt != 0)
-	goto error_return;
+      if (symtab_hdr->sh_info != 0)
+	{
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
+	    goto error_return;
+	}
 
       amt = symtab_hdr->sh_info;
       amt *= sizeof (asection *);
@@ -4917,64 +4810,54 @@
       if (sections == NULL && amt != 0)
 	goto error_return;
 
-      for (isymp = internal_syms, secpp = sections, shndx = shndx_buf,
-	     esym = external_syms, esymend = esym + symtab_hdr->sh_info;
-	   esym < esymend;
-	   ++esym, ++isymp, ++secpp, shndx = (shndx ? shndx + 1 : NULL))
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isymp);
-
-	  if (isymp->st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
-	  else if (isymp->st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    isec = bfd_abs_section_ptr;
-	  else if (isymp->st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    isec = bfd_com_section_ptr;
 	  else
-	    isec = bfd_section_from_elf_index (input_bfd, isymp->st_shndx);
+	    isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
 
 	  *secpp = isec;
 	}
 
       if (! sh_elf_relocate_section (output_bfd, link_info, input_bfd,
 				     input_section, data, internal_relocs,
-				     internal_syms, sections))
+				     isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      if (internal_syms != NULL)
-	free (internal_syms);
-      if (shndx_buf != NULL)
-	free (shndx_buf);
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
-      if (internal_relocs != elf_section_data (input_section)->relocs)
+      if (isymbuf != NULL
+	  && symtab_hdr->contents != (unsigned char *) isymbuf)
+	free (isymbuf);
+      if (elf_section_data (input_section)->relocs != internal_relocs)
 	free (internal_relocs);
     }
 
   return data;
 
  error_return:
-  if (internal_relocs != NULL
-      && internal_relocs != elf_section_data (input_section)->relocs)
-    free (internal_relocs);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
   if (sections != NULL)
     free (sections);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (input_section)->relocs != internal_relocs)
+    free (internal_relocs);
   return NULL;
 }
 
 static asection *
-sh_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+sh_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -4989,6 +4872,11 @@
 	  break;
 
 	default:
+#ifdef INCLUDE_SHMEDIA
+	  while (h->root.type == bfd_link_hash_indirect
+		 && h->root.u.i.link)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+#endif
 	  switch (h->root.type)
 	    {
 	    case bfd_link_hash_defined:
@@ -5004,9 +4892,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -5520,7 +5406,7 @@
 {
   flagword old_flags, new_flags;
 
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -5598,7 +5484,8 @@
       got_offset = (plt_index + 3) * 4;
 
 #ifdef GOT_BIAS
-      got_offset -= GOT_BIAS;
+      if (info->shared)
+	got_offset -= GOT_BIAS;
 #endif
 
       /* Fill in the entry in the procedure linkage table.  */
@@ -5619,8 +5506,10 @@
 			     (splt->contents + h->plt.offset
 			      + elf_sh_plt_symbol_offset (info)));
 
+	  /* Set bottom bit because its for a branch to SHmedia */
 	  movi_shori_putval (output_bfd,
-			     (splt->output_section->vma + splt->output_offset),
+			     (splt->output_section->vma + splt->output_offset)
+			     | 1,
 			     (splt->contents + h->plt.offset
 			      + elf_sh_plt_plt0_offset (info)));
 #else
@@ -5659,7 +5548,8 @@
 	}
 
 #ifdef GOT_BIAS
-      got_offset += GOT_BIAS;
+      if (info->shared)
+	got_offset += GOT_BIAS;
 #endif
 
 #ifdef INCLUDE_SHMEDIA
@@ -5811,6 +5701,7 @@
 	  Elf_Internal_Dyn dyn;
 	  const char *name;
 	  asection *s;
+	  struct elf_link_hash_entry *h;
 
 	  bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
 
@@ -5819,6 +5710,27 @@
 	    default:
 	      break;
 
+#ifdef INCLUDE_SHMEDIA
+	    case DT_INIT:
+	      name = info->init_function;
+	      goto get_sym;
+
+	    case DT_FINI:
+	      name = info->fini_function;
+	    get_sym:
+	      if (dyn.d_un.d_val != 0)
+		{
+		  h = elf_link_hash_lookup (elf_hash_table (info), name,
+					    false, false, true);
+		  if (h != NULL && (h->other & STO_SH5_ISA32))
+		    {
+		      dyn.d_un.d_val |= 1;
+		      bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+		    }
+		}
+	      break;
+#endif
+
 	    case DT_PLTGOT:
 	      name = ".got";
 	      goto get_vma;
@@ -5996,4 +5908,8 @@
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	12
 #define elf_backend_plt_header_size	PLT_ENTRY_SIZE
+
+#ifndef ELF32_SH_C_INCLUDED
 #include "elf32-target.h"
+#endif
+
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 5e7ccdd..7a38fb22 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -54,7 +54,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
 	   asection *));
 static boolean sh64_backend_section_from_shdr
-  PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+  PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
 static void sh64_elf_final_write_processing PARAMS ((bfd *, boolean));
 static boolean sh64_bfd_elf_copy_private_section_data
   PARAMS ((bfd *, asection *, bfd *, asection *));
@@ -105,15 +105,6 @@
 #define INCLUDE_SHMEDIA
 #include "elf32-sh.c"
 
-/* The type sh64_elf_crange is defined in elf/sh.h which is included in
-   elf32-sh.c, hence these prototypes located after including it.  */
-static int crange_qsort_cmpb PARAMS ((const void *, const void *));
-static int crange_qsort_cmpl PARAMS ((const void *, const void *));
-static int crange_bsearch_cmpb PARAMS ((const void *, const void *));
-static int crange_bsearch_cmpl PARAMS ((const void *, const void *));
-static boolean sh64_address_in_cranges
-  PARAMS ((asection *cranges, bfd_vma, sh64_elf_crange *));
-
 /* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections, and pass
    through SHT_SH5_CR_SORTED on a sorted .cranges section.  */
 
@@ -196,7 +187,7 @@
 {
   flagword old_flags, new_flags;
 
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -255,7 +246,7 @@
 sh64_backend_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   flagword flags = 0;
 
@@ -731,7 +722,8 @@
 	      qsort (cranges->contents, cranges_size / SH64_CRANGE_SIZE,
 		     SH64_CRANGE_SIZE,
 		     bfd_big_endian (cranges->owner)
-		     ? crange_qsort_cmpb : crange_qsort_cmpl);
+		     ? _bfd_sh64_crange_qsort_cmpb
+		     : _bfd_sh64_crange_qsort_cmpl);
 	      elf_section_data (cranges)->this_hdr.sh_type
 		= SHT_SH5_CR_SORTED;
 	    }
@@ -750,236 +742,3 @@
 	}
     }
 }
-
-/* Ordering functions of a crange, for the qsort and bsearch calls and for
-   different endianness.  */
-
-static int
-crange_qsort_cmpb (p1, p2)
-     const PTR p1;
-     const PTR p2;
-{
-  bfd_vma a1 = bfd_getb32 (p1);
-  bfd_vma a2 = bfd_getb32 (p2);
-
-  /* Preserve order if there's ambiguous contents.  */
-  if (a1 == a2)
-    return (char *) p1 - (char *) p2;
-
-  return a1 - a2;
-}
-
-static int
-crange_qsort_cmpl (p1, p2)
-     const PTR p1;
-     const PTR p2;
-{
-  bfd_vma a1 = (bfd_vma) bfd_getl32 (p1);
-  bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
-
-  /* Preserve order if there's ambiguous contents.  */
-  if (a1 == a2)
-    return (char *) p1 - (char *) p2;
-
-  return a1 - a2;
-}
-
-static int
-crange_bsearch_cmpb (p1, p2)
-     const PTR p1;
-     const PTR p2;
-{
-  bfd_vma a1 = *(bfd_vma *) p1;
-  bfd_vma a2 = (bfd_vma) bfd_getb32 (p2);
-  bfd_size_type size
-    = (bfd_size_type) bfd_getb32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
-  if (a1 >= a2 + size)
-    return 1;
-  if (a1 < a2)
-    return -1;
-  return 0;
-}
-
-static int
-crange_bsearch_cmpl (p1, p2)
-     const PTR p1;
-     const PTR p2;
-{
-  bfd_vma a1 = *(bfd_vma *) p1;
-  bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
-  bfd_size_type size
-    = (bfd_size_type) bfd_getl32 (SH64_CRANGE_CR_SIZE_OFFSET + (char *) p2);
-
-  if (a1 >= a2 + size)
-    return 1;
-  if (a1 < a2)
-    return -1;
-  return 0;
-}
-
-/* Check whether a specific address is specified within a .cranges
-   section.  Return FALSE if not found, and TRUE if found, and the region
-   filled into RANGEP if non-NULL.  */
-
-static boolean
-sh64_address_in_cranges (cranges, addr, rangep)
-     asection *cranges;
-     bfd_vma addr;
-     sh64_elf_crange *rangep;
-{
-  bfd_byte *cranges_contents;
-  bfd_byte *found_rangep;
-  bfd_size_type cranges_size = bfd_section_size (cranges->owner, cranges);
-
-  /* If the size is not a multiple of the cranges entry size, then
-     something is badly wrong.  */
-  if ((cranges_size % SH64_CRANGE_SIZE) != 0)
-    return false;
-
-  /* If this section has relocations, then we can't do anything sane.  */
-  if (bfd_get_section_flags (cranges->owner, cranges) & SEC_RELOC)
-    return false;
-
-  /* Has some kind soul (or previous call) left processed, sorted contents
-     for us?  */
-  if ((bfd_get_section_flags (cranges->owner, cranges) & SEC_IN_MEMORY)
-      && elf_section_data (cranges)->this_hdr.sh_type == SHT_SH5_CR_SORTED)
-    cranges_contents = cranges->contents;
-  else
-    {
-      cranges_contents
-	= bfd_malloc (cranges->_cooked_size == 0
-		      ? cranges->_cooked_size : cranges->_raw_size);
-      if (cranges_contents == NULL)
-	return false;
-
-      if (! bfd_get_section_contents (cranges->owner, cranges,
-				      cranges_contents, (file_ptr) 0,
-				      cranges_size))
-	goto error_return;
-
-      /* Is it sorted?  */
-      if (elf_section_data (cranges)->this_hdr.sh_type
-	  != SHT_SH5_CR_SORTED)
-	/* Nope.  Lets sort it.  */
-	qsort (cranges_contents, cranges_size / SH64_CRANGE_SIZE,
-	       SH64_CRANGE_SIZE,
-	       bfd_big_endian (cranges->owner)
-	       ? crange_qsort_cmpb : crange_qsort_cmpl);
-
-      /* Let's keep it around.  */
-      cranges->contents = cranges_contents;
-      bfd_set_section_flags (cranges->owner, cranges,
-			     bfd_get_section_flags (cranges->owner, cranges)
-			     | SEC_IN_MEMORY);
-
-      /* It's sorted now.  */
-      elf_section_data (cranges)->this_hdr.sh_type = SHT_SH5_CR_SORTED;
-    }
-
-  /* Try and find a matching range.  */
-  found_rangep
-    = bsearch (&addr, cranges_contents, cranges_size / SH64_CRANGE_SIZE, 
-	       SH64_CRANGE_SIZE,
-	       bfd_big_endian (cranges->owner)
-	       ? crange_bsearch_cmpb : crange_bsearch_cmpl);
-
-  /* Fill in a few return values if we found a matching range.  */
-  if (found_rangep)
-    {
-      enum sh64_elf_cr_type cr_type
-	= bfd_get_16 (cranges->owner,
-		      SH64_CRANGE_CR_TYPE_OFFSET + found_rangep);
-      bfd_vma cr_addr
-	= bfd_get_32 (cranges->owner,
-		      SH64_CRANGE_CR_ADDR_OFFSET
-		      + (char *) found_rangep);
-      bfd_size_type cr_size
-	= bfd_get_32 (cranges->owner,
-		      SH64_CRANGE_CR_SIZE_OFFSET
-		      + (char *) found_rangep);
-
-      rangep->cr_addr = cr_addr;
-      rangep->cr_size = cr_size;
-      rangep->cr_type = cr_type;
-
-      return true;
-    }
-
-  /* There is a .cranges section, but it does not have a descriptor
-     matching this address.  */
-  return false;
-
-error_return:
-  free (cranges_contents);
-  return false;
-}
-
-/* Determine what ADDR points to in SEC, and fill in a range descriptor in
-   *RANGEP if it's non-NULL.  */
-
-enum sh64_elf_cr_type
-sh64_get_contents_type (sec, addr, rangep)
-     asection *sec;
-     bfd_vma addr;
-     sh64_elf_crange *rangep;
-{
-  asection *cranges;
-
-  /* Fill in the range with the boundaries of the section as a default.  */
-  if (bfd_get_flavour (sec->owner) == bfd_target_elf_flavour
-      && elf_elfheader (sec->owner)->e_type == ET_EXEC)
-    {
-      rangep->cr_addr = bfd_get_section_vma (sec->owner, sec);
-      rangep->cr_size = bfd_section_size (sec->owner, sec);
-      rangep->cr_type = CRT_NONE;
-    }
-  else
-    return false;
-
-  /* If none of the pertinent bits are set, then it's a SHcompact (or at
-     least not SHmedia).  */
-  if ((elf_section_data (sec)->this_hdr.sh_flags
-       & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == 0)
-    {
-      enum sh64_elf_cr_type cr_type
-	= ((bfd_get_section_flags (sec->owner, sec) & SEC_CODE) != 0
-	   ? CRT_SH5_ISA16 : CRT_DATA);
-      rangep->cr_type = cr_type;
-      return cr_type;
-    }
-
-  /* If only the SHF_SH5_ISA32 bit is set, then we have SHmedia.  */
-  if ((elf_section_data (sec)->this_hdr.sh_flags
-       & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED)) == SHF_SH5_ISA32)
-    {
-      rangep->cr_type = CRT_SH5_ISA32;
-      return CRT_SH5_ISA32;
-    }
-
-  /* Otherwise, we have to look up the .cranges section.  */
-  cranges = bfd_get_section_by_name (sec->owner, SH64_CRANGES_SECTION_NAME);
-
-  if (cranges == NULL)
-    /* A mixed section but there's no .cranges section.  This is probably
-       bad input; it does not comply to specs.  */
-    return CRT_NONE;
-
-  /* If this call fails, we will still have CRT_NONE in rangep->cr_type
-     and that will be suitable to return.  */
-  sh64_address_in_cranges (cranges, addr, rangep);
-
-  return rangep->cr_type;
-}
-
-/* This is a simpler exported interface for the benefit of gdb et al.  */
-
-boolean
-sh64_address_is_shmedia (sec, addr)
-     asection *sec;
-     bfd_vma addr;
-{
-  sh64_elf_crange dummy;
-  return sh64_get_contents_type (sec, addr, &dummy) == CRT_SH5_ISA32;
-}
diff --git a/gdb/29k-share/udi/udiptcfg.h b/bfd/elf32-shqnx.c
similarity index 62%
rename from gdb/29k-share/udi/udiptcfg.h
rename to bfd/elf32-shqnx.c
index 1641a53..a27c0f2 100644
--- a/gdb/29k-share/udi/udiptcfg.h
+++ b/bfd/elf32-shqnx.c
@@ -1,6 +1,7 @@
-/* Copyright 1993 Free Software Foundation, Inc.
+/* Hitachi SH QNX specific support for 32-bit ELF
+   Copyright 2002   Free Software Foundation, Inc.
 
-   This file is part of GDB.
+   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
@@ -11,9 +12,20 @@
    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 "udipt29k.h"
+#define ELF32_SH_C_INCLUDED
+#include "elf32-sh.c"
+
+#include "elf32-qnx.h"
+
+#undef  TARGET_LITTLE_SYM 
+#define TARGET_LITTLE_SYM       bfd_elf32_shlqnx_vec
+#undef  TARGET_BIG_SYM
+#define TARGET_BIG_SYM          bfd_elf32_shqnx_vec
+
+#include "elf32-target.h"
+
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index a11db81..4c9b3d4 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1,5 +1,5 @@
 /* SPARC-specific support for 32-bit ELF
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -55,7 +55,7 @@
 static enum elf_reloc_type_class elf32_sparc_reloc_type_class
   PARAMS ((const Elf_Internal_Rela *));
 static asection * elf32_sparc_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_sparc_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -637,14 +637,13 @@
 }
 
 static asection *
-elf32_sparc_gc_mark_hook (abfd, info, rel, h, sym)
-       bfd *abfd;
+elf32_sparc_gc_mark_hook (sec, info, rel, h, sym)
+       asection *sec;
        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))
@@ -669,9 +668,7 @@
        }
      }
    else
-     {
-       return bfd_section_from_elf_index (abfd, sym->st_shndx);
-     }
+     return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1120,6 +1117,9 @@
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
+  if (info->relocateable)
+    return true;
+
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -1162,28 +1162,8 @@
 	}
       howto = _bfd_sparc_elf_howto_table + r_type;
 
-      r_symndx = ELF32_R_SYM (rel->r_info);
-
-      if (info->relocateable)
-	{
-	  /* This is a relocateable link.  We don't have to change
-	     anything, unless the reloc is against a section symbol,
-	     in which case we have to adjust according to where the
-	     section symbol winds up in the output section.  */
-	  if (r_symndx < symtab_hdr->sh_info)
-	    {
-	      sym = local_syms + r_symndx;
-	      if (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.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -1564,10 +1544,11 @@
 	  break;
 	}
 
-      /* ??? Copied from elf32-i386.c, debugging section check and all.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
@@ -2149,5 +2130,6 @@
 #define elf_backend_want_plt_sym 1
 #define elf_backend_got_header_size 4
 #define elf_backend_plt_header_size (4*PLT_ENTRY_SIZE)
+#define elf_backend_rela_normal 1
 
 #include "elf32-target.h"
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index ae0a0c4..07890c6 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1,5 +1,5 @@
 /* V850-specific support for 32-bit ELF
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -79,12 +79,12 @@
   PARAMS ((bfd *, struct bfd_link_info *, const char *,
 	   Elf_Internal_Sym *, asection *));
 static boolean v850_elf_section_from_shdr
-  PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+  PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
 static boolean v850_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection * v850_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *,
+  PARAMS ((asection *, struct bfd_link_info *,
 	   Elf_Internal_Rela *, struct elf_link_hash_entry *,
 	   Elf_Internal_Sym *));
 
@@ -1322,7 +1322,7 @@
 		nop
 	foo:
         	nop      */
-  if (reloc->howto->pc_relative == true)
+  if (reloc->howto->pc_relative)
     {
       /* Here the variable relocation holds the final address of the
 	 symbol we are relocating against, plus any addend.  */
@@ -1529,6 +1529,9 @@
   Elf_Internal_Rela *           rel;
   Elf_Internal_Rela *           relend;
 
+  if (info->relocateable)
+    return true;
+
   symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
 
@@ -1566,28 +1569,8 @@
           || r_type == R_V850_GNU_VTINHERIT)
         continue;
 
-      howto = v850_elf_howto_table + r_type;
-
-      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 = v850_elf_howto_table + r_type;
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -1740,8 +1723,8 @@
 }
 
 static asection *
-v850_elf_gc_mark_hook (abfd, info, rel, h, sym)
-       bfd *abfd;
+v850_elf_gc_mark_hook (sec, info, rel, h, sym)
+       asection *sec;
        struct bfd_link_info *info ATTRIBUTE_UNUSED;
        Elf_Internal_Rela *rel;
        struct elf_link_hash_entry *h;
@@ -1771,9 +1754,7 @@
        }
      }
    else
-     {
-       return bfd_section_from_elf_index (abfd, sym->st_shndx);
-     }
+     return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -2135,7 +2116,7 @@
 v850_elf_section_from_shdr (abfd, hdr, name)
      bfd *               abfd;
      Elf_Internal_Shdr * hdr;
-     char *              name;
+     const char *        name;
 {
   /* There ought to be a place to keep ELF backend specific flags, but
      at the moment there isn't one.  We just keep track of the
@@ -2210,6 +2191,7 @@
 #define elf_backend_gc_sweep_hook               v850_elf_gc_sweep_hook
 
 #define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
 
 #define bfd_elf32_bfd_is_local_label_name	v850_elf_is_local_label_name
 #define bfd_elf32_bfd_reloc_type_lookup		v850_elf_reloc_type_lookup
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 8901188..068578b 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -38,7 +38,7 @@
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *elf_vax_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf_vax_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -341,8 +341,6 @@
 #define bfd_elf32_bfd_reloc_type_lookup reloc_type_lookup
 #define ELF_ARCH bfd_arch_vax
 /* end code generated by elf.el */
-
-#define USE_RELA
 
 /* Functions for the VAX ELF linker.  */
 
@@ -542,13 +540,13 @@
   /* xgettext:c-format */
   fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
 
-  if (elf_elfheader (abfd)->e_flags & EF_NONPIC)
+  if (elf_elfheader (abfd)->e_flags & EF_VAX_NONPIC)
     fprintf (file, _(" [nonpic]"));
 
-  if (elf_elfheader (abfd)->e_flags & EF_DFLOAT)
+  if (elf_elfheader (abfd)->e_flags & EF_VAX_DFLOAT)
     fprintf (file, _(" [d-float]"));
 
-  if (elf_elfheader (abfd)->e_flags & EF_GFLOAT)
+  if (elf_elfheader (abfd)->e_flags & EF_VAX_GFLOAT)
     fprintf (file, _(" [g-float]"));
 
   fputc ('\n', file);
@@ -855,8 +853,8 @@
    relocation.  */
 
 static asection *
-elf_vax_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf_vax_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -886,9 +884,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1421,6 +1417,9 @@
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
+  if (info->relocateable)
+    return true;
+
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -1452,28 +1451,8 @@
 	}
       howto = howto_table + r_type;
 
-      r_symndx = ELF32_R_SYM (rel->r_info);
-
-      if (info->relocateable)
-	{
-	  /* This is a relocateable link.  We don't have to change
-	     anything, unless the reloc is against a section symbol,
-	     in which case we have to adjust according to where the
-	     section symbol winds up in the output section.  */
-	  if (r_symndx < symtab_hdr->sh_info)
-	    {
-	      sym = local_syms + r_symndx;
-	      if (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.  */
+      r_symndx = ELF32_R_SYM (rel->r_info);
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -2210,5 +2189,6 @@
 #define elf_backend_plt_readonly	1
 #define elf_backend_want_plt_sym	0
 #define elf_backend_got_header_size	16
+#define elf_backend_rela_normal		1
 
 #include "elf32-target.h"
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index d6b8dd3..b845bc4 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -27,9 +27,9 @@
 /* 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 
+static void xstormy16_info_to_howto_rela
   PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
-static bfd_reloc_status_type xstormy16_elf_24_reloc 
+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));
@@ -45,7 +45,7 @@
 	   boolean *again));
 static boolean xstormy16_elf_always_size_sections
   PARAMS ((bfd *, struct bfd_link_info *));
-static boolean xstormy16_elf_relocate_section 
+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
@@ -54,7 +54,7 @@
   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 *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 static reloc_howto_type xstormy16_elf_howto_table [] =
@@ -88,7 +88,7 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
- 
+
   /* A 16 bit absolute relocation.  */
   HOWTO (R_XSTORMY16_16,	/* type */
 	 0,			/* rightshift */
@@ -103,7 +103,7 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
- 
+
   /* An 8 bit absolute relocation.  */
   HOWTO (R_XSTORMY16_8,	/* type */
 	 0,			/* rightshift */
@@ -118,7 +118,7 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
- 
+
   /* A 32 bit pc-relative relocation.  */
   HOWTO (R_XSTORMY16_PC32,	/* type */
 	 0,			/* rightshift */
@@ -133,7 +133,7 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 true),		/* pcrel_offset */
- 
+
   /* A 16 bit pc-relative relocation.  */
   HOWTO (R_XSTORMY16_PC16,	/* type */
 	 0,			/* rightshift */
@@ -148,7 +148,7 @@
 	 0,			/* src_mask */
 	 0xffffffff,		/* dst_mask */
 	 true),		/* pcrel_offset */
- 
+
   /* An 8 bit pc-relative relocation.  */
   HOWTO (R_XSTORMY16_PC8,	/* type */
 	 0,			/* rightshift */
@@ -163,7 +163,7 @@
 	 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 */
@@ -178,7 +178,7 @@
 	 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 */
@@ -193,7 +193,7 @@
 	 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 */
@@ -209,7 +209,7 @@
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 };
- 
+
 static reloc_howto_type xstormy16_elf_howto_table2 [] =
 {
   /* GNU extension to record C++ vtable hierarchy */
@@ -241,7 +241,7 @@
          0,                     /* src_mask */
          0,                     /* dst_mask */
          false),                /* pcrel_offset */
- 
+
 };
 
 /* Map BFD reloc types to XSTORMY16 ELF reloc types.  */
@@ -286,7 +286,7 @@
 	return entry->table + (entry->xstormy16_reloc_val
 			       - entry->table[0].type);
     }
-  
+
   return NULL;
 }
 
@@ -451,7 +451,7 @@
 		  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;
 		}
@@ -471,7 +471,7 @@
           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:
@@ -578,7 +578,7 @@
   if (splt->_cooked_size == 0)
     splt->_cooked_size = splt->_raw_size;
 
-  /* Map across all global symbols; see which ones happen to 
+  /* 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;
@@ -586,87 +586,51 @@
 			  &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.  */
+     as we have to 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;
-      Elf_Internal_Shdr *shndx_hdr;
-      Elf32_External_Sym *extsyms;
-      Elf_External_Sym_Shndx *shndx_buf;
+      Elf_Internal_Sym *isymbuf = NULL;
       unsigned int idx;
 
       if (! local_plt_offsets)
 	continue;
 
       symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
-      shndx_hdr = &elf_tdata (ibfd)->symtab_shndx_hdr;
-
-      if (symtab_hdr->contents != NULL)
-	extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
-      else
+      if (symtab_hdr->sh_info != 0)
 	{
-	  bfd_size_type amt;
-
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf32_External_Sym);
-	  extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
-	  if (extsyms == NULL)
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (ibfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
 	    return false;
-	  if (bfd_seek (ibfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) extsyms, amt, ibfd) != amt)
-	    {
-	    error_ret_free_extsyms:
-	      free (extsyms);
-	      return false;
-	    }
-	}
-
-      shndx_buf = NULL;
-      if (shndx_hdr->sh_size != 0)
-	{
-	  bfd_size_type amt;
-
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_ret_free_extsyms;
-	  if (bfd_seek (ibfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, ibfd) != amt)
-	    {
-	      free (shndx_buf);
-	      goto error_ret_free_extsyms;
-	    }
-	  shndx_hdr->contents = (bfd_byte *) shndx_buf;
 	}
 
       for (idx = 0; idx < symtab_hdr->sh_info; ++idx)
 	{
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  Elf_Internal_Sym *isym;
 	  asection *tsec;
 	  bfd_vma address;
 
 	  if (local_plt_offsets[idx] == (bfd_vma) -1)
 	    continue;
 
-	  shndx = shndx_buf;
-	  if (shndx != NULL)
-	    shndx += idx;
-	  bfd_elf32_swap_symbol_in (ibfd, extsyms + idx, shndx, &isym);
-	  if (isym.st_shndx == SHN_UNDEF)
+	  isym = &isymbuf[idx];
+	  if (isym->st_shndx == SHN_UNDEF)
 	    continue;
-	  else if (isym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    tsec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    tsec = bfd_com_section_ptr;
 	  else
-	    tsec = bfd_section_from_elf_index (ibfd, isym.st_shndx);
+	    tsec = bfd_section_from_elf_index (ibfd, isym->st_shndx);
 
 	  address = (tsec->output_section->vma
 		     + tsec->output_offset
-		     + isym.st_value);
+		     + isym->st_value);
 	  if (address <= 0xffff)
 	    {
 	      local_plt_offsets[idx] = -1;
@@ -675,11 +639,17 @@
 	    }
 	}
 
-      if (shndx_buf != NULL)
-	free (shndx_buf);
-
-      if ((Elf32_External_Sym *) symtab_hdr->contents != extsyms)
-        free (extsyms);
+      if (isymbuf != NULL
+	  && symtab_hdr->contents != (unsigned char *) isymbuf)
+	{
+	  if (! info->keep_memory)
+	    free (isymbuf);
+	  else
+	    {
+	      /* Cache the symbols for elf_link_input_bfd.  */
+	      symtab_hdr->contents = (unsigned char *) isymbuf;
+	    }
+	}
     }
 
   /* If we changed anything, walk the symbols again to reallocate
@@ -739,9 +709,6 @@
 }
 
 /* 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.
@@ -813,19 +780,19 @@
       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);
       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;
@@ -833,7 +800,7 @@
 	  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;
@@ -841,13 +808,13 @@
       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)
 	    {
@@ -869,14 +836,14 @@
 	      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;
@@ -952,13 +919,13 @@
 		(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;
@@ -1020,8 +987,8 @@
    relocation.  */
 
 static asection *
-xstormy16_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *                        abfd;
+xstormy16_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *                   sec;
      struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
@@ -1051,9 +1018,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 94b4ebe..4aeb32d 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -73,7 +73,7 @@
 static boolean elf64_alpha_object_p
   PARAMS((bfd *));
 static boolean elf64_alpha_section_from_shdr
-  PARAMS((bfd *, Elf64_Internal_Shdr *, char *));
+  PARAMS((bfd *, Elf64_Internal_Shdr *, const char *));
 static boolean elf64_alpha_section_flags
   PARAMS((flagword *, Elf64_Internal_Shdr *));
 static boolean elf64_alpha_fake_sections
@@ -106,14 +106,27 @@
   PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
 static void elf64_alpha_calc_got_offsets PARAMS ((struct bfd_link_info *));
 static boolean elf64_alpha_size_got_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_plt_section
+  PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_plt_section_1
+  PARAMS ((struct alpha_elf_link_hash_entry *, PTR));
 static boolean elf64_alpha_always_size_sections
   PARAMS ((bfd *, struct bfd_link_info *));
+static int alpha_dynamic_entries_for_reloc
+  PARAMS ((int, int, int));
 static boolean elf64_alpha_calc_dynrel_sizes
   PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
+static boolean elf64_alpha_size_rela_got_section
+  PARAMS ((struct bfd_link_info *));
+static boolean elf64_alpha_size_rela_got_1
+  PARAMS ((struct alpha_elf_link_hash_entry *, struct bfd_link_info *));
 static boolean elf64_alpha_add_symbol_hook
   PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
 	   const char **, flagword *, asection **, bfd_vma *));
+static struct alpha_elf_got_entry *get_got_entry
+  PARAMS ((bfd *, struct alpha_elf_link_hash_entry *, unsigned long,
+	   unsigned long, bfd_vma));
 static boolean elf64_alpha_check_relocs
   PARAMS((bfd *, struct bfd_link_info *, asection *sec,
 	  const Elf_Internal_Rela *));
@@ -121,6 +134,9 @@
   PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
 static boolean elf64_alpha_size_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
+static boolean elf64_alpha_relocate_section_r
+  PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+	  Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 static boolean elf64_alpha_relocate_section
   PARAMS((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
 	  Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
@@ -148,11 +164,15 @@
   /* Cumulative flags for all the .got entries.  */
   int flags;
 
-  /* Contexts (LITUSE) in which a literal was referenced.  */
-#define ALPHA_ELF_LINK_HASH_LU_ADDR 0x01
-#define ALPHA_ELF_LINK_HASH_LU_MEM  0x02
-#define ALPHA_ELF_LINK_HASH_LU_BYTE 0x04
-#define ALPHA_ELF_LINK_HASH_LU_FUNC 0x08
+  /* Contexts in which a literal was referenced.  */
+#define ALPHA_ELF_LINK_HASH_LU_ADDR	0x01
+#define ALPHA_ELF_LINK_HASH_LU_MEM	0x02
+#define ALPHA_ELF_LINK_HASH_LU_BYTE	0x04
+#define ALPHA_ELF_LINK_HASH_LU_JSR	0x08
+#define ALPHA_ELF_LINK_HASH_LU_TLSGD	0x10
+#define ALPHA_ELF_LINK_HASH_LU_TLSLDM	0x20
+#define ALPHA_ELF_LINK_HASH_LU_FUNC	0x38
+#define ALPHA_ELF_LINK_HASH_TLS_IE	0x40
 
   /* Used to implement multiple .got subsections.  */
   struct alpha_elf_got_entry
@@ -168,13 +188,20 @@
     /* the .got offset for this entry.  */
     int got_offset;
 
-    int flags;
-
-    /* Additional flags.  */
-#define ALPHA_ELF_GOT_ENTRY_RELOCS_DONE 0x10
-#define ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED 0x20
-
+    /* How many references to this entry?  */
     int use_count;
+
+    /* The relocation type of this entry.  */
+    unsigned char reloc_type;
+
+    /* How a LITERAL is used.  */
+    unsigned char flags;
+
+    /* Have we initialized the dynamic relocation for this entry?  */
+    unsigned char reloc_done;
+
+    /* Have we adjusted this entry for SEC_MERGE?  */
+    unsigned char reloc_xlated;
   } *got_entries;
 
   /* used to count non-got, non-plt relocations for delayed sizing
@@ -361,12 +388,12 @@
   /* For every got, this is the section.  */
   asection *got;
 
-  /* For every got, this is it's total number of *entries*.  */
-  int total_got_entries;
+  /* For every got, this is it's total number of words.  */
+  int total_got_size;
 
-  /* For every got, this is the sum of the number of *entries* required
+  /* For every got, this is the sum of the number of words required
      to hold all of the member object's local got.  */
-  int n_local_got_entries;
+  int local_got_size;
 };
 
 #define alpha_elf_tdata(abfd) \
@@ -748,6 +775,203 @@
 	 0x1fffff,		/* src_mask */
 	 0x1fffff,		/* dst_mask */
 	 true),			/* pcrel_offset */
+
+  /* Creates a tls_index for the symbol in the got.  */
+  HOWTO (R_ALPHA_TLSGD,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TLSGD",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Creates a tls_index for the (current) module in the got.  */
+  HOWTO (R_ALPHA_TLSLDM,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TLSLDM",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A dynamic relocation for a DTP module entry.  */
+  HOWTO (R_ALPHA_DTPMOD64,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "DTPMOD64",		/* name */
+	 false,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Creates a 64-bit offset in the got for the displacement
+     from DTP to the target.  */
+  HOWTO (R_ALPHA_GOTDTPREL,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "GOTDTPREL",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A dynamic relocation for a displacement from DTP to the target.  */
+  HOWTO (R_ALPHA_DTPREL64,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "DTPREL64",		/* name */
+	 false,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The high 16 bits of the displacement from DTP to the target.  */
+  HOWTO (R_ALPHA_DTPRELHI,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "DTPRELHI",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The low 16 bits of the displacement from DTP to the target.  */
+  HOWTO (R_ALPHA_DTPRELLO,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "DTPRELLO",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A 16-bit displacement from DTP to the target.  */
+  HOWTO (R_ALPHA_DTPREL16,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "DTPREL16",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Creates a 64-bit offset in the got for the displacement
+     from TP to the target.  */
+  HOWTO (R_ALPHA_GOTTPREL,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "GOTTPREL",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A dynamic relocation for a displacement from TP to the target.  */
+  HOWTO (R_ALPHA_TPREL64,	/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TPREL64",		/* name */
+	 false,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The high 16 bits of the displacement from TP to the target.  */
+  HOWTO (R_ALPHA_TPRELHI,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TPRELHI",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The low 16 bits of the displacement from TP to the target.  */
+  HOWTO (R_ALPHA_TPRELLO,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TPRELLO",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A 16-bit displacement from TP to the target.  */
+  HOWTO (R_ALPHA_TPREL16,	/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 0,			/* special_function */
+	 "TPREL16",		/* name */
+	 false,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
 };
 
 /* A relocation function which doesn't do anything.  */
@@ -902,6 +1126,19 @@
   {BFD_RELOC_ALPHA_GPREL_LO16,		R_ALPHA_GPRELLOW},
   {BFD_RELOC_GPREL16,			R_ALPHA_GPREL16},
   {BFD_RELOC_ALPHA_BRSGP,		R_ALPHA_BRSGP},
+  {BFD_RELOC_ALPHA_TLSGD,		R_ALPHA_TLSGD},
+  {BFD_RELOC_ALPHA_TLSLDM,		R_ALPHA_TLSLDM},
+  {BFD_RELOC_ALPHA_DTPMOD64,		R_ALPHA_DTPMOD64},
+  {BFD_RELOC_ALPHA_GOTDTPREL16,		R_ALPHA_GOTDTPREL},
+  {BFD_RELOC_ALPHA_DTPREL64,		R_ALPHA_DTPREL64},
+  {BFD_RELOC_ALPHA_DTPREL_HI16,		R_ALPHA_DTPRELHI},
+  {BFD_RELOC_ALPHA_DTPREL_LO16,		R_ALPHA_DTPRELLO},
+  {BFD_RELOC_ALPHA_DTPREL16,		R_ALPHA_DTPREL16},
+  {BFD_RELOC_ALPHA_GOTTPREL16,		R_ALPHA_GOTTPREL},
+  {BFD_RELOC_ALPHA_TPREL64,		R_ALPHA_TPREL64},
+  {BFD_RELOC_ALPHA_TPREL_HI16,		R_ALPHA_TPRELHI},
+  {BFD_RELOC_ALPHA_TPREL_LO16,		R_ALPHA_TPRELLO},
+  {BFD_RELOC_ALPHA_TPREL16,		R_ALPHA_TPREL16},
 };
 
 /* Given a BFD reloc type, return a HOWTO structure.  */
@@ -936,6 +1173,19 @@
   BFD_ASSERT (r_type < (unsigned int) R_ALPHA_max);
   cache_ptr->howto = &elf64_alpha_howto_table[r_type];
 }
+
+/* These two relocations create a two-word entry in the got.  */
+#define alpha_got_entry_size(r_type) \
+  (r_type == R_ALPHA_TLSGD || r_type == R_ALPHA_TLSLDM ? 16 : 8)
+
+/* This is PT_TLS segment p_vaddr.  */
+#define alpha_get_dtprel_base(tlss) \
+  ((tlss)->start)
+
+/* Main program TLS (whose template starts at PT_TLS p_vaddr)
+   is assigned offset round(16, PT_TLS p_align).  */
+#define alpha_get_tprel_base(tlss) \
+  ((tlss)->start - align_power ((bfd_vma) 16, (tlss)->align))
 
 /* These functions do relaxation for Alpha ELF.
 
@@ -958,35 +1208,45 @@
 #define OP_BR		0x30
 #define OP_BSR		0x34
 #define INSN_UNOP	0x2ffe0000
+#define INSN_ADDQ	0x40000400
+#define INSN_RDUNIQ	0x0000009e
 
 struct alpha_relax_info
 {
   bfd *abfd;
   asection *sec;
   bfd_byte *contents;
+  Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *relocs, *relend;
   struct bfd_link_info *link_info;
-  boolean changed_contents;
-  boolean changed_relocs;
+  struct elf_link_tls_segment *tls_segment;
   bfd_vma gp;
   bfd *gotobj;
   asection *tsec;
   struct alpha_elf_link_hash_entry *h;
+  struct alpha_elf_got_entry **first_gotent;
   struct alpha_elf_got_entry *gotent;
+  boolean changed_contents;
+  boolean changed_relocs;
   unsigned char other;
 };
 
-static Elf_Internal_Rela * elf64_alpha_relax_with_lituse
-  PARAMS((struct alpha_relax_info *info, bfd_vma symval,
-          Elf_Internal_Rela *irel, Elf_Internal_Rela *irelend));
-
-static boolean elf64_alpha_relax_without_lituse
+static boolean elf64_alpha_relax_with_lituse
   PARAMS((struct alpha_relax_info *info, bfd_vma symval,
           Elf_Internal_Rela *irel));
-
 static bfd_vma elf64_alpha_relax_opt_call
   PARAMS((struct alpha_relax_info *info, bfd_vma symval));
-
+static boolean elf64_alpha_relax_got_load
+  PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+          Elf_Internal_Rela *irel, unsigned long));
+static boolean elf64_alpha_relax_gprelhilo
+  PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+          Elf_Internal_Rela *irel, boolean));
+static boolean elf64_alpha_relax_tls_get_addr
+  PARAMS((struct alpha_relax_info *info, bfd_vma symval,
+          Elf_Internal_Rela *irel, boolean));
+static struct elf_link_tls_segment *elf64_alpha_relax_find_tls_segment
+  PARAMS((struct alpha_relax_info *, struct elf_link_tls_segment *));
 static boolean elf64_alpha_relax_section
   PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
 	  boolean *again));
@@ -1007,13 +1267,13 @@
   return NULL;
 }
 
-static Elf_Internal_Rela *
-elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
+static boolean
+elf64_alpha_relax_with_lituse (info, symval, irel)
      struct alpha_relax_info *info;
      bfd_vma symval;
-     Elf_Internal_Rela *irel, *irelend;
+     Elf_Internal_Rela *irel;
 {
-  Elf_Internal_Rela *urel;
+  Elf_Internal_Rela *urel, *irelend = info->relend;
   int flags, count, i;
   bfd_signed_vma disp;
   boolean fits16;
@@ -1029,9 +1289,13 @@
        ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
 	bfd_archive_filename (info->abfd), info->sec->name,
 	(unsigned long) irel->r_offset));
-      return irel;
+      return true;
     }
 
+  /* Can't relax dynamic symbols.  */
+  if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+    return true;
+
   /* Summarize how this particular LITERAL is used.  */
   for (urel = irel+1, flags = count = 0; urel < irelend; ++urel, ++count)
     {
@@ -1054,25 +1318,27 @@
 
       switch (urel->r_addend)
 	{
-	default: /* 0 = ADDRESS FORMAT */
+	case LITUSE_ALPHA_ADDR:
+	default:
 	  /* This type is really just a placeholder to note that all
 	     uses cannot be optimized, but to still allow some.  */
 	  all_optimized = false;
 	  break;
 
-	case 1: /* MEM FORMAT */
+	case LITUSE_ALPHA_BASE:
 	  /* We can always optimize 16-bit displacements.  */
 
 	  /* Extract the displacement from the instruction, sign-extending
 	     it if necessary, then test whether it is within 16 or 32 bits
 	     displacement from GP.  */
 	  insn_disp = insn & 0x0000ffff;
-	  if (insn_disp & 0x00008000)
-	    insn_disp |= 0xffff0000;  /* Negative: sign-extend.  */
+	  if (insn_disp & 0x8000)
+	    insn_disp |= ~0xffff;  /* Negative: sign-extend.  */
 
 	  xdisp = disp + insn_disp;
-	  fits16 = (xdisp >= - (bfd_signed_vma) 0x00008000 && xdisp < 0x00008000);
-	  fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 && xdisp < 0x7fff8000);
+	  fits16 = (xdisp >= - (bfd_signed_vma) 0x8000 && xdisp < 0x8000);
+	  fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000
+		    && xdisp < 0x7fff8000);
 
 	  if (fits16)
 	    {
@@ -1111,7 +1377,7 @@
 	    all_optimized = false;
 	  break;
 
-	case 2: /* BYTE OFFSET FORMAT */
+	case LITUSE_ALPHA_BYTOFF:
 	  /* We can always optimize byte instructions.  */
 
 	  /* FIXME: sanity check the insn for byte op.  Check that the
@@ -1129,16 +1395,20 @@
 	  info->changed_contents = true;
 	  break;
 
-	case 3: /* CALL FORMAT */
+	case LITUSE_ALPHA_JSR:
+	case LITUSE_ALPHA_TLSGD:
+	case LITUSE_ALPHA_TLSLDM:
 	  {
-	    /* If not zero, place to jump without needing pv.  */
-	    bfd_vma optdest = elf64_alpha_relax_opt_call (info, symval);
-	    bfd_vma org = (info->sec->output_section->vma
-			   + info->sec->output_offset
-			   + urel->r_offset + 4);
+	    bfd_vma optdest, org;
 	    bfd_signed_vma odisp;
 
+	    /* If not zero, place to jump without needing pv.  */
+	    optdest = elf64_alpha_relax_opt_call (info, symval);
+	    org = (info->sec->output_section->vma
+		   + info->sec->output_offset
+		   + urel->r_offset + 4);
 	    odisp = (optdest ? optdest : symval) - org;
+
 	    if (odisp >= -0x400000 && odisp < 0x400000)
 	      {
 		Elf_Internal_Rela *xrel;
@@ -1180,10 +1450,11 @@
 	      {
 		Elf_Internal_Rela *gpdisp
 		  = (elf64_alpha_find_reloc_at_ofs
-		     (irel, irelend, urel->r_offset + 4, R_ALPHA_GPDISP));
+		     (info->relocs, irelend, urel->r_offset + 4,
+		      R_ALPHA_GPDISP));
 		if (gpdisp)
 		  {
-		    bfd_byte *p_ldah = info->contents + gpdisp->r_offset; 
+		    bfd_byte *p_ldah = info->contents + gpdisp->r_offset;
 		    bfd_byte *p_lda = p_ldah + gpdisp->r_addend;
 		    unsigned int ldah = bfd_get_32 (info->abfd, p_ldah);
 		    unsigned int lda = bfd_get_32 (info->abfd, p_lda);
@@ -1213,14 +1484,17 @@
      got entry by one, possibly eliminating it.  */
   if (all_optimized)
     {
-      info->gotent->use_count -= 1;
-      alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
-      if (!info->h)
-	alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+      if (--info->gotent->use_count == 0)
+	{
+	  int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+	  alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+	  if (!info->h)
+	    alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+	}
 
       /* If the literal instruction is no longer needed (it may have been
-	 reused.  We can eliminate it.
-	 ??? For now, I don't want to deal with compacting the section,
+	 reused.  We can eliminate it.  */
+      /* ??? For now, I don't want to deal with compacting the section,
 	 so just nop it out.  */
       if (!lit_reused)
 	{
@@ -1233,7 +1507,7 @@
 	}
     }
 
-  return irel + count;
+  return true;
 }
 
 static bfd_vma
@@ -1309,10 +1583,11 @@
 }
 
 static boolean
-elf64_alpha_relax_without_lituse (info, symval, irel)
+elf64_alpha_relax_got_load (info, symval, irel, r_type)
      struct alpha_relax_info *info;
      bfd_vma symval;
      Elf_Internal_Rela *irel;
+     unsigned long r_type;
 {
   unsigned int insn;
   bfd_signed_vma disp;
@@ -1322,37 +1597,74 @@
 
   if (insn >> 26 != OP_LDQ)
     {
+      reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
       ((*_bfd_error_handler)
-       ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
+       ("%s: %s+0x%lx: warning: %s relocation against unexpected insn",
 	bfd_archive_filename (info->abfd), info->sec->name,
-	(unsigned long) irel->r_offset));
+	(unsigned long) irel->r_offset, howto->name));
       return true;
     }
 
-  /* So we aren't told much.  Do what we can with the address load and
-     fake the rest.  All of the optimizations here require that the
-     offset from the GP fit in 16 bits.  */
+  /* Can't relax dynamic symbols.  */
+  if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
+    return true;
 
-  disp = symval - info->gp;
+  /* Can't use local-exec relocations in shared libraries.  */
+  if (r_type == R_ALPHA_GOTTPREL && info->link_info->shared)
+    return true;
+
+  if (r_type == R_ALPHA_LITERAL)
+    disp = symval - info->gp;
+  else
+    {
+      bfd_vma dtp_base, tp_base;
+
+      BFD_ASSERT (info->tls_segment != NULL);
+      dtp_base = alpha_get_dtprel_base (info->tls_segment);
+      tp_base = alpha_get_tprel_base (info->tls_segment);
+      disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+    }
+
   if (disp < -0x8000 || disp >= 0x8000)
     return true;
 
-  /* On the LITERAL instruction itself, consider exchanging
-     `ldq R,X(gp)' for `lda R,Y(gp)'.  */
-
-  insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+  /* Exchange LDQ for LDA.  In the case of the TLS relocs, we're loading
+     a constant, so force the base register to be $31.  */
+  if (r_type == R_ALPHA_LITERAL)
+    insn = (OP_LDA << 26) | (insn & 0x03ff0000);
+  else
+    insn = (OP_LDA << 26) | (insn & (31 << 21)) | (31 << 16);
   bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset);
   info->changed_contents = true;
 
-  irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPREL16);
+  switch (r_type)
+    {
+    case R_ALPHA_LITERAL:
+      r_type = R_ALPHA_GPREL16;
+      break;
+    case R_ALPHA_GOTDTPREL:
+      r_type = R_ALPHA_DTPREL16;
+      break;
+    case R_ALPHA_GOTTPREL:
+      r_type = R_ALPHA_TPREL16;
+      break;
+    default:
+      BFD_ASSERT (0);
+      return false;
+    }
+
+  irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type);
   info->changed_relocs = true;
 
   /* Reduce the use count on this got entry by one, possibly
      eliminating it.  */
-  info->gotent->use_count -= 1;
-  alpha_elf_tdata (info->gotent->gotobj)->total_got_entries -= 1;
-  if (!info->h)
-    alpha_elf_tdata (info->gotent->gotobj)->n_local_got_entries -= 1;
+  if (--info->gotent->use_count == 0)
+    {
+      int sz = alpha_got_entry_size (r_type);
+      alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+      if (!info->h)
+	alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+    }
 
   /* ??? Search forward through this basic block looking for insns
      that use the target register.  Stop after an insn modifying the
@@ -1371,6 +1683,353 @@
 }
 
 static boolean
+elf64_alpha_relax_gprelhilo (info, symval, irel, hi)
+     struct alpha_relax_info *info;
+     bfd_vma symval;
+     Elf_Internal_Rela *irel;
+     boolean hi;
+{
+  unsigned int insn;
+  bfd_signed_vma disp;
+  bfd_byte *pos = info->contents + irel->r_offset;
+
+  /* ??? This assumes that the compiler doesn't render
+
+	array[i]
+     as
+	ldah	t, array(gp)	!gprelhigh
+	s8addl	i, t, t
+	ldq	r, array(t)	!gprellow
+
+     which would indeed be the most efficient way to implement this.  */
+
+  return true;
+
+  disp = symval - info->gp;
+  if (disp < -0x8000 || disp >= 0x8000)
+    return true;
+
+  if (hi)
+    {
+      /* Nop out the high instruction.  */
+
+      bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos);
+      info->changed_contents = true;
+
+      irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+      irel->r_addend = 0;
+      info->changed_relocs = true;
+    }
+  else
+    {
+      /* Adjust the low instruction to reference GP directly.  */
+
+      insn = bfd_get_32 (info->abfd, pos);
+      insn = (insn & 0xffe00000) | (29 << 16);
+      bfd_put_32 (info->abfd, (bfd_vma) insn, pos);
+      info->changed_contents = true;
+
+      irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+				   R_ALPHA_GPREL16);
+      info->changed_relocs = true;
+    }
+
+  return true;
+}
+
+static boolean
+elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
+     struct alpha_relax_info *info;
+     bfd_vma symval;
+     Elf_Internal_Rela *irel;
+     boolean is_gd;
+{
+  bfd_byte *pos[5];
+  unsigned int insn;
+  Elf_Internal_Rela *gpdisp, *hint;
+  boolean dynamic, use_gottprel;
+
+  dynamic = alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info);
+
+  /* ??? For LD relaxation, we need a symbol referencing the beginning
+     of the TLS segment.  */
+  if (!is_gd)
+    return true;
+
+  /* If a TLS symbol is accessed using IE at least once, there is no point
+     to use dynamic model for it.  */
+  if (is_gd && info->h && (info->h->flags & ALPHA_ELF_LINK_HASH_TLS_IE))
+    ;
+
+  /* If the symbol is local, and we've already committed to DF_STATIC_TLS,
+     then we might as well relax to IE.  */
+  else if (info->link_info->shared && !dynamic
+	   && (info->link_info->flags & DF_STATIC_TLS))
+    ;
+
+  /* Otherwise we must be building an executable to do anything.  */
+  else if (info->link_info->shared)
+    return true;
+
+  /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and
+     the matching LITUSE_TLS relocations.  */
+  if (irel + 2 >= info->relend)
+    return true;
+  if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL
+      || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE
+      || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM))
+    return true;
+
+  /* There must be a GPDISP relocation positioned immediately after the
+     LITUSE relocation.  */
+  gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+					  irel[2].r_offset + 4, R_ALPHA_GPDISP);
+  if (!gpdisp)
+    return true;
+
+  pos[0] = info->contents + irel[0].r_offset;
+  pos[1] = info->contents + irel[1].r_offset;
+  pos[2] = info->contents + irel[2].r_offset;
+  pos[3] = info->contents + gpdisp->r_offset;
+  pos[4] = pos[3] + gpdisp->r_addend;
+
+  /* Only positions 0 and 1 are allowed to be out of order.  */
+  if (pos[1] < pos[0])
+    {
+      bfd_byte *tmp = pos[0];
+      pos[0] = pos[1];
+      pos[1] = tmp;
+    }
+  if (pos[1] >= pos[2] || pos[2] >= pos[3] || pos[3] >= pos[4])
+    return true;
+
+  /* Reduce the use count on the LITERAL relocation.  Do this before we
+     smash the symndx when we adjust the relocations below.  */
+  {
+    struct alpha_elf_got_entry *lit_gotent;
+    struct alpha_elf_link_hash_entry *lit_h;
+    unsigned long indx;
+
+    BFD_ASSERT (ELF64_R_SYM (irel[1].r_info) >= info->symtab_hdr->sh_info);
+    indx = ELF64_R_SYM (irel[1].r_info) - info->symtab_hdr->sh_info;
+    lit_h = alpha_elf_sym_hashes (info->abfd)[indx];
+
+    while (lit_h->root.root.type == bfd_link_hash_indirect
+	   || lit_h->root.root.type == bfd_link_hash_warning)
+      lit_h = (struct alpha_elf_link_hash_entry *) lit_h->root.root.u.i.link;
+
+    for (lit_gotent = lit_h->got_entries; lit_gotent ;
+	 lit_gotent = lit_gotent->next)
+      if (lit_gotent->gotobj == info->gotobj
+	  && lit_gotent->reloc_type == R_ALPHA_LITERAL
+	  && lit_gotent->addend == irel[1].r_addend)
+	break;
+    BFD_ASSERT (lit_gotent);
+
+    if (--lit_gotent->use_count == 0)
+      {
+	int sz = alpha_got_entry_size (R_ALPHA_LITERAL);
+	alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+      }
+  }
+
+  /* Change
+
+	lda	$16,x($gp)		!tlsgd!1
+	ldq	$27,__tls_get_addr($gp)	!literal!1
+	jsr	$26,($27)__tls_get_addr	!lituse_tlsgd!1
+	ldah	$29,0($26)		!gpdisp!2
+	lda	$29,0($29)		!gpdisp!2
+     to
+	ldq	$16,x($gp)		!gottprel
+	unop
+	call_pal rduniq
+	addq	$16,$0,$0
+	unop
+     or the first pair to
+	lda	$16,x($gp)		!tprel
+	unop
+     or
+	ldah	$16,x($gp)		!tprelhi
+	lda	$16,x($16)		!tprello
+
+     as appropriate.  */
+
+  use_gottprel = false;
+  switch (!dynamic && !info->link_info->shared)
+    {
+    case 1:
+      {
+	bfd_vma tp_base;
+	bfd_signed_vma disp;
+
+	BFD_ASSERT (info->tls_segment != NULL);
+	tp_base = alpha_get_tprel_base (info->tls_segment);
+	disp = symval - tp_base;
+
+	if (disp >= -0x8000 && disp < 0x8000)
+	  {
+	    insn = (OP_LDA << 26) | (16 << 21) | (31 << 16);
+	    bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+	    bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+	    irel[0].r_offset = pos[0] - info->contents;
+	    irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+					   R_ALPHA_TPREL16);
+	    irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+	    break;
+	  }
+	else if (disp >= -(bfd_signed_vma) 0x80000000
+		 && disp < (bfd_signed_vma) 0x7fff8000)
+	  {
+	    insn = (OP_LDAH << 26) | (16 << 21) | (31 << 16);
+	    bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+	    insn = (OP_LDA << 26) | (16 << 21) | (16 << 16);
+	    bfd_put_32 (info->abfd, (bfd_vma) insn, pos[1]);
+
+	    irel[0].r_offset = pos[0] - info->contents;
+	    irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+					   R_ALPHA_TPRELHI);
+	    irel[1].r_offset = pos[1] - info->contents;
+	    irel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+					   R_ALPHA_TPRELLO);
+	    break;
+	  }
+      }
+      /* FALLTHRU */
+
+    default:
+      use_gottprel = true;
+
+      insn = (OP_LDQ << 26) | (16 << 21) | (29 << 16);
+      bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]);
+      bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[1]);
+
+      irel[0].r_offset = pos[0] - info->contents;
+      irel[0].r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info),
+				     R_ALPHA_GOTTPREL);
+      irel[1].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+      break;
+    }
+
+  bfd_put_32 (info->abfd, (bfd_vma) INSN_RDUNIQ, pos[2]);
+
+  insn = INSN_ADDQ | (16 << 21) | (0 << 16) | (0 << 0);
+  bfd_put_32 (info->abfd, (bfd_vma) insn, pos[3]);
+
+  bfd_put_32 (info->abfd, (bfd_vma) INSN_UNOP, pos[4]);
+
+  irel[2].r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+  gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+  hint = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend,
+					irel[2].r_offset, R_ALPHA_HINT);
+  if (hint)
+    hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE);
+
+  info->changed_contents = true;
+  info->changed_relocs = true;
+
+  /* Reduce the use count on the TLSGD/TLSLDM relocation.  */
+  if (--info->gotent->use_count == 0)
+    {
+      int sz = alpha_got_entry_size (info->gotent->reloc_type);
+      alpha_elf_tdata (info->gotobj)->total_got_size -= sz;
+      if (!info->h)
+	alpha_elf_tdata (info->gotobj)->local_got_size -= sz;
+    }
+
+  /* If we've switched to a GOTTPREL relocation, increment the reference
+     count on that got entry.  */
+  if (use_gottprel)
+    {
+      struct alpha_elf_got_entry *tprel_gotent;
+
+      for (tprel_gotent = *info->first_gotent; tprel_gotent ;
+	   tprel_gotent = tprel_gotent->next)
+	if (tprel_gotent->gotobj == info->gotobj
+	    && tprel_gotent->reloc_type == R_ALPHA_GOTTPREL
+	    && tprel_gotent->addend == irel->r_addend)
+	  break;
+      if (tprel_gotent)
+	tprel_gotent->use_count++;
+      else
+	{
+	  if (info->gotent->use_count == 0)
+	    tprel_gotent = info->gotent;
+	  else
+	    {
+	      tprel_gotent = (struct alpha_elf_got_entry *)
+		bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry));
+	      if (!tprel_gotent)
+		return false;
+
+	      tprel_gotent->next = *info->first_gotent;
+	      *info->first_gotent = tprel_gotent;
+
+	      tprel_gotent->gotobj = info->gotobj;
+	      tprel_gotent->addend = irel->r_addend;
+	      tprel_gotent->got_offset = -1;
+	      tprel_gotent->reloc_done = 0;
+	      tprel_gotent->reloc_xlated = 0;
+	    }
+
+	  tprel_gotent->use_count = 1;
+	  tprel_gotent->reloc_type = R_ALPHA_GOTTPREL;
+	}
+    }
+
+  return true;
+}
+
+static struct elf_link_tls_segment *
+elf64_alpha_relax_find_tls_segment (info, seg)
+     struct alpha_relax_info *info;
+     struct elf_link_tls_segment *seg;
+{
+  bfd *output_bfd = info->sec->output_section->owner;
+  asection *o;
+  unsigned int align;
+  bfd_vma base, end;
+
+  for (o = output_bfd->sections; o ; o = o->next)
+    if ((o->flags & SEC_THREAD_LOCAL) != 0
+        && (o->flags & SEC_LOAD) != 0)
+      break;
+  if (!o)
+    return NULL;
+
+  base = o->vma;
+  align = 0;
+
+  do
+    {
+      bfd_vma size;
+
+      if (bfd_get_section_alignment (output_bfd, o) > align)
+	align = bfd_get_section_alignment (output_bfd, o);
+
+      size = o->_raw_size;
+      if (size == 0 && (o->flags & SEC_HAS_CONTENTS) == 0)
+	{
+	  struct bfd_link_order *lo;
+	  for (lo = o->link_order_head; lo ; lo = lo->next)
+	    if (size < lo->offset + lo->size)
+	      size = lo->offset + lo->size;
+	}
+      end = o->vma + size;
+      o = o->next;
+    }
+  while (o && (o->flags & SEC_THREAD_LOCAL));
+
+  seg->start = base;
+  seg->size = end - base;
+  seg->align = align;
+
+  return seg;
+}
+
+static boolean
 elf64_alpha_relax_section (abfd, sec, link_info, again)
      bfd *abfd;
      asection *sec;
@@ -1378,16 +2037,12 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
-  bfd_byte *free_contents = NULL;
-  Elf64_External_Sym *extsyms = NULL;
-  Elf64_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   struct alpha_elf_got_entry **local_got_entries;
   struct alpha_relax_info info;
+  struct elf_link_tls_segment tls_segment;
 
   /* We are not currently changing any sizes, so only one pass.  */
   *again = false;
@@ -1410,116 +2065,99 @@
 		     (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
-    goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
+    return false;
 
   memset(&info, 0, sizeof (info));
   info.abfd = abfd;
   info.sec = sec;
   info.link_info = link_info;
+  info.symtab_hdr = symtab_hdr;
   info.relocs = internal_relocs;
   info.relend = irelend = internal_relocs + sec->reloc_count;
 
-  /* Find the GP for this object.  */
+  /* Find the GP for this object.  Do not store the result back via
+     _bfd_set_gp_value, since this could change again before final.  */
   info.gotobj = alpha_elf_tdata (abfd)->gotobj;
   if (info.gotobj)
     {
       asection *sgot = alpha_elf_tdata (info.gotobj)->got;
-      info.gp = _bfd_get_gp_value (info.gotobj);
-      if (info.gp == 0)
-	{
-	  info.gp = (sgot->output_section->vma
-		     + sgot->output_offset
-		     + 0x8000);
-	  _bfd_set_gp_value (info.gotobj, info.gp);
-	}
+      info.gp = (sgot->output_section->vma
+		 + sgot->output_offset
+		 + 0x8000);
     }
 
+  /* Get the section contents.  */
+  if (elf_section_data (sec)->this_hdr.contents != NULL)
+    info.contents = elf_section_data (sec)->this_hdr.contents;
+  else
+    {
+      info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+      if (info.contents == NULL)
+	goto error_return;
+
+      if (! bfd_get_section_contents (abfd, sec, info.contents,
+				      (file_ptr) 0, sec->_raw_size))
+	goto error_return;
+    }
+
+  /* Compute the TLS segment information.  The version normally found in
+     elf_hash_table (link_info)->tls_segment isn't built until final_link.
+     ??? Probably should look into extracting this into a common function.  */
+  info.tls_segment = elf64_alpha_relax_find_tls_segment (&info, &tls_segment);
+
   for (irel = internal_relocs; irel < irelend; irel++)
     {
       bfd_vma symval;
-      Elf_Internal_Sym isym;
       struct alpha_elf_got_entry *gotent;
+      unsigned long r_type = ELF64_R_TYPE (irel->r_info);
 
-      if (ELF64_R_TYPE (irel->r_info) != (int) R_ALPHA_LITERAL)
-	continue;
-
-      /* Get the section contents.  */
-      if (info.contents == NULL)
+      /* Early exit for unhandled or unrelaxable relocations.  */
+      switch (r_type)
 	{
-	  if (elf_section_data (sec)->this_hdr.contents != NULL)
-	    info.contents = elf_section_data (sec)->this_hdr.contents;
-	  else
-	    {
-	      info.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
-	      if (info.contents == NULL)
-		goto error_return;
-	      free_contents = info.contents;
-
-	      if (! bfd_get_section_contents (abfd, sec, info.contents,
-					      (file_ptr) 0, sec->_raw_size))
-		goto error_return;
-	    }
-	}
-
-      /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
-	{
-	  bfd_size_type amt;
-
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf64_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf64_External_Sym);
-	      extsyms = (Elf64_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	    }
-
-	  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	    }
+	case R_ALPHA_LITERAL:
+	case R_ALPHA_GPRELHIGH:
+	case R_ALPHA_GPRELLOW:
+	case R_ALPHA_GOTDTPREL:
+	case R_ALPHA_GOTTPREL:
+	case R_ALPHA_TLSGD:
+	case R_ALPHA_TLSLDM:
+	  break;
+	default:
+	  continue;
 	}
 
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
 	  /* A local symbol.  */
-	  Elf64_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
+	  Elf_Internal_Sym *isym;
 
-	  esym = extsyms + ELF64_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELF64_R_SYM (irel->r_info) : 0);
-	  bfd_elf64_swap_symbol_in (abfd, esym, shndx, &isym);
-	  if (isym.st_shndx == SHN_UNDEF)
-	    info.tsec = bfd_und_section_ptr;
-	  else if (isym.st_shndx == SHN_ABS)
+	  /* Read this BFD's local symbols.  */
+	  if (isymbuf == NULL)
+	    {
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == NULL)
+		goto error_return;
+	    }
+
+	  isym = isymbuf + ELF64_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
+	    continue;
+	  else if (isym->st_shndx == SHN_ABS)
 	    info.tsec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    info.tsec = bfd_com_section_ptr;
 	  else
-	    info.tsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	    info.tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 
 	  info.h = NULL;
-	  info.other = isym.st_other;
-	  gotent = local_got_entries[ELF64_R_SYM(irel->r_info)];
-	  symval = isym.st_value;
+	  info.other = isym->st_other;
+	  info.first_gotent = &local_got_entries[ELF64_R_SYM(irel->r_info)];
+	  symval = isym->st_value;
 	}
       else
 	{
@@ -1534,66 +2172,103 @@
 		 || h->root.root.type == bfd_link_hash_warning)
 	    h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
 
-	  /* We can't do anthing with undefined or dynamic symbols.  */
-	  if (h->root.root.type == bfd_link_hash_undefined
-	      || h->root.root.type == bfd_link_hash_undefweak
-	      || alpha_elf_dynamic_symbol_p (&h->root, link_info))
+	  /* If the symbol is undefined, we can't do anything with it.  */
+	  if (h->root.root.type == bfd_link_hash_undefweak
+	      || h->root.root.type == bfd_link_hash_undefined)
+	    continue;
+
+	  /* If the symbol isn't defined in the current module, again
+	     we can't do anything.  */
+	  if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
 	    continue;
 
 	  info.h = h;
 	  info.tsec = h->root.root.u.def.section;
 	  info.other = h->root.other;
-	  gotent = h->got_entries;
+	  info.first_gotent = &h->got_entries;
 	  symval = h->root.root.u.def.value;
 	}
 
       /* Search for the got entry to be used by this relocation.  */
-      while (gotent->gotobj != info.gotobj || gotent->addend != irel->r_addend)
-	gotent = gotent->next;
+      for (gotent = *info.first_gotent; gotent ; gotent = gotent->next)
+	if (gotent->gotobj == info.gotobj
+	    && gotent->reloc_type == r_type
+	    && gotent->addend == irel->r_addend)
+	  break;
       info.gotent = gotent;
 
       symval += info.tsec->output_section->vma + info.tsec->output_offset;
       symval += irel->r_addend;
 
-      BFD_ASSERT(info.gotent != NULL);
-
-      /* If there exist LITUSE relocations immediately following, this
-	 opens up all sorts of interesting optimizations, because we
-	 now know every location that this address load is used.  */
-
-      if (irel+1 < irelend && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
+      switch (r_type)
 	{
-	  irel = elf64_alpha_relax_with_lituse (&info, symval, irel, irelend);
-	  if (irel == NULL)
+	case R_ALPHA_LITERAL:
+	  BFD_ASSERT(info.gotent != NULL);
+
+	  /* If there exist LITUSE relocations immediately following, this
+	     opens up all sorts of interesting optimizations, because we
+	     now know every location that this address load is used.  */
+	  if (irel+1 < irelend
+	      && ELF64_R_TYPE (irel[1].r_info) == R_ALPHA_LITUSE)
+	    {
+	      if (!elf64_alpha_relax_with_lituse (&info, symval, irel))
+		goto error_return;
+	    }
+	  else
+	    {
+	      if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
+		goto error_return;
+	    }
+	  break;
+
+	case R_ALPHA_GPRELHIGH:
+	case R_ALPHA_GPRELLOW:
+	  if (!elf64_alpha_relax_gprelhilo (&info, symval, irel,
+					    r_type == R_ALPHA_GPRELHIGH))
 	    goto error_return;
-	}
-      else
-	{
-	  if (!elf64_alpha_relax_without_lituse (&info, symval, irel))
+	  break;
+
+	case R_ALPHA_GOTDTPREL:
+	case R_ALPHA_GOTTPREL:
+	  BFD_ASSERT(info.gotent != NULL);
+	  if (!elf64_alpha_relax_got_load (&info, symval, irel, r_type))
 	    goto error_return;
+	  break;
+
+	case R_ALPHA_TLSGD:
+	case R_ALPHA_TLSLDM:
+	  BFD_ASSERT(info.gotent != NULL);
+	  if (!elf64_alpha_relax_tls_get_addr (&info, symval, irel,
+					       r_type == R_ALPHA_TLSGD))
+	    goto error_return;
+	  break;
 	}
     }
 
-  if (!elf64_alpha_size_got_sections (abfd, link_info))
+  if (!elf64_alpha_size_plt_section (link_info))
+    return false;
+  if (!elf64_alpha_size_got_sections (link_info))
+    return false;
+  if (!elf64_alpha_size_rela_got_section (link_info))
     return false;
 
-  if (info.changed_relocs)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
-      elf_section_data (sec)->relocs = internal_relocs;
-    }
-  else if (free_relocs != NULL)
-    {
-      free (free_relocs);
+      if (!link_info->keep_memory)
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
     }
 
-  if (info.changed_contents)
+  if (info.contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != info.contents)
     {
-      elf_section_data (sec)->this_hdr.contents = info.contents;
-    }
-  else if (free_contents != NULL)
-    {
-      if (! link_info->keep_memory)
-	free (free_contents);
+      if (!info.changed_contents && !link_info->keep_memory)
+	free (info.contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
@@ -1601,18 +2276,12 @@
 	}
     }
 
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-
-  if (free_extsyms != NULL)
+  if (elf_section_data (sec)->relocs != internal_relocs)
     {
-      if (! link_info->keep_memory)
-	free (free_extsyms);
+      if (!info.changed_relocs)
+	free (internal_relocs);
       else
-	{
-	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = (unsigned char *) extsyms;
-	}
+	elf_section_data (sec)->relocs = internal_relocs;
     }
 
   *again = info.changed_contents || info.changed_relocs;
@@ -1620,14 +2289,15 @@
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
+  if (info.contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != info.contents)
+    free (info.contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   return false;
 }
 
@@ -1643,7 +2313,7 @@
 #define PLT_ENTRY_WORD2		0
 #define PLT_ENTRY_WORD3		0
 
-#define MAX_GOT_ENTRIES		(64*1024 / 8)
+#define MAX_GOT_SIZE		(64*1024)
 
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
 
@@ -1656,7 +2326,7 @@
 elf64_alpha_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf64_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   asection *newsect;
 
@@ -1908,9 +2578,8 @@
   if (ext_hdr == NULL && swap->external_hdr_size != 0)
     goto error_return;
 
-  if (bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0,
-				swap->external_hdr_size)
-      == false)
+  if (! bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0,
+				  swap->external_hdr_size))
     goto error_return;
 
   symhdr = &debug->symbolic_header;
@@ -2244,18 +2913,86 @@
 
   return true;
 }
-
-/* FIXME:  Create a runtime procedure table from the .mdebug section.
-
-static boolean
-mips_elf_create_procedure_table (handle, abfd, info, s, debug)
-     PTR handle;
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *s;
-     struct ecoff_debug_info *debug;
-*/
 
+/* Search for and possibly create a got entry.  */
+
+static struct alpha_elf_got_entry *
+get_got_entry (abfd, h, r_type, r_symndx, r_addend)
+     bfd *abfd;
+     struct alpha_elf_link_hash_entry *h;
+     unsigned long r_type, r_symndx;
+     bfd_vma r_addend;
+{
+  struct alpha_elf_got_entry *gotent;
+  struct alpha_elf_got_entry **slot;
+
+  if (h)
+    slot = &h->got_entries;
+  else
+    {
+      /* This is a local .got entry -- record for merge.  */
+
+      struct alpha_elf_got_entry **local_got_entries;
+
+      local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
+      if (!local_got_entries)
+	{
+	  bfd_size_type size;
+	  Elf_Internal_Shdr *symtab_hdr;
+
+	  symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
+	  size = symtab_hdr->sh_info;
+	  size *= sizeof (struct alpha_elf_got_entry *);
+
+	  local_got_entries
+	    = (struct alpha_elf_got_entry **) bfd_zalloc (abfd, size);
+	  if (!local_got_entries)
+	    return NULL;
+
+	  alpha_elf_tdata (abfd)->local_got_entries = local_got_entries;
+	}
+
+      slot = &local_got_entries[r_symndx];
+    }
+
+  for (gotent = *slot; gotent ; gotent = gotent->next)
+    if (gotent->gotobj == abfd
+	&& gotent->reloc_type == r_type
+	&& gotent->addend == r_addend)
+      break;
+
+  if (!gotent)
+    {
+      int entry_size;
+      bfd_size_type amt;
+
+      amt = sizeof (struct alpha_elf_got_entry);
+      gotent = (struct alpha_elf_got_entry *) bfd_alloc (abfd, amt);
+      if (!gotent)
+	return NULL;
+
+      gotent->gotobj = abfd;
+      gotent->addend = r_addend;
+      gotent->got_offset = -1;
+      gotent->use_count = 1;
+      gotent->reloc_type = r_type;
+      gotent->reloc_done = 0;
+      gotent->reloc_xlated = 0;
+
+      gotent->next = *slot;
+      *slot = gotent;
+
+      entry_size = alpha_got_entry_size (r_type);
+      alpha_elf_tdata (abfd)->total_got_size += entry_size;
+      if (!h)
+	alpha_elf_tdata(abfd)->local_got_size += entry_size;
+    }
+  else
+    gotent->use_count += 1;
+
+  return gotent;
+}
+
 /* Handle dynamic relocations when doing an Alpha ELF link.  */
 
 static boolean
@@ -2270,9 +3007,8 @@
   const char *rel_sec_name;
   Elf_Internal_Shdr *symtab_hdr;
   struct alpha_elf_link_hash_entry **sym_hashes;
-  struct alpha_elf_got_entry **local_got_entries;
   const Elf_Internal_Rela *rel, *relend;
-  int got_created;
+  boolean got_created;
   bfd_size_type amt;
 
   if (info->relocateable)
@@ -2286,14 +3022,23 @@
   rel_sec_name = NULL;
   symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
   sym_hashes = alpha_elf_sym_hashes(abfd);
-  local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
-  got_created = 0;
+  got_created = false;
 
   relend = relocs + sec->reloc_count;
   for (rel = relocs; rel < relend; ++rel)
     {
+      enum {
+	NEED_GOT = 1,
+	NEED_GOT_ENTRY = 2,
+	NEED_DYNREL = 4
+      };
+
       unsigned long r_symndx, r_type;
       struct alpha_elf_link_hash_entry *h;
+      unsigned int gotent_flags;
+      boolean maybe_dynamic;
+      unsigned int need;
+      bfd_vma addend;
 
       r_symndx = ELF64_R_SYM (rel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
@@ -2308,125 +3053,40 @@
 
 	  h->root.elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
 	}
+
+      /* We can only get preliminary data on whether a symbol is
+         locally or externally defined, as not all of the input files
+         have yet been processed.  Do something with what we know, as
+         this may help reduce memory usage and processing time later.  */
+      maybe_dynamic = false;
+      if (h && ((info->shared
+		 && (!info->symbolic || info->allow_shlib_undefined))
+		|| ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+		|| h->root.root.type == bfd_link_hash_defweak))
+        maybe_dynamic = true;
+
+      need = 0;
+      gotent_flags = 0;
       r_type = ELF64_R_TYPE (rel->r_info);
+      addend = rel->r_addend;
 
       switch (r_type)
 	{
 	case R_ALPHA_LITERAL:
-	  {
-	    struct alpha_elf_got_entry *gotent;
-	    int flags = 0;
+	  need = NEED_GOT | NEED_GOT_ENTRY;
 
-	    if (h)
-	      {
-		/* Search for and possibly create a got entry.  */
-		for (gotent = h->got_entries; gotent ; gotent = gotent->next)
-		  if (gotent->gotobj == abfd &&
-		      gotent->addend == rel->r_addend)
-		    break;
+	  /* Remember how this literal is used from its LITUSEs.
+	     This will be important when it comes to decide if we can
+	     create a .plt entry for a function symbol.  */
+	  while (++rel < relend && ELF64_R_TYPE (rel->r_info) == R_ALPHA_LITUSE)
+	    if (rel->r_addend >= 1 && rel->r_addend <= 5)
+	      gotent_flags |= 1 << rel->r_addend;
+	  --rel;
 
-		if (!gotent)
-		  {
-		    amt = sizeof (struct alpha_elf_got_entry);
-		    gotent = ((struct alpha_elf_got_entry *)
-			      bfd_alloc (abfd, amt));
-		    if (!gotent)
-		      return false;
-
-		    gotent->gotobj = abfd;
-		    gotent->addend = rel->r_addend;
-		    gotent->got_offset = -1;
-		    gotent->flags = 0;
-		    gotent->use_count = 1;
-
-		    gotent->next = h->got_entries;
-		    h->got_entries = gotent;
-
-		    alpha_elf_tdata (abfd)->total_got_entries++;
-		  }
-		else
-		  gotent->use_count += 1;
-	      }
-	    else
-	      {
-		/* This is a local .got entry -- record for merge.  */
-		if (!local_got_entries)
-		  {
-		    bfd_size_type size;
-		    size = symtab_hdr->sh_info;
-		    size *= sizeof (struct alpha_elf_got_entry *);
-
-		    local_got_entries = ((struct alpha_elf_got_entry **)
-					 bfd_alloc (abfd, size));
-		    if (!local_got_entries)
-		      return false;
-
-		    memset (local_got_entries, 0, (size_t) size);
-		    alpha_elf_tdata (abfd)->local_got_entries =
-		      local_got_entries;
-		  }
-
-		for (gotent = local_got_entries[ELF64_R_SYM(rel->r_info)];
-		     gotent != NULL && gotent->addend != rel->r_addend;
-		     gotent = gotent->next)
-		  continue;
-		if (!gotent)
-		  {
-		    amt = sizeof (struct alpha_elf_got_entry);
-		    gotent = ((struct alpha_elf_got_entry *)
-			      bfd_alloc (abfd, amt));
-		    if (!gotent)
-		      return false;
-
-		    gotent->gotobj = abfd;
-		    gotent->addend = rel->r_addend;
-		    gotent->got_offset = -1;
-		    gotent->flags = 0;
-		    gotent->use_count = 1;
-
-		    gotent->next = local_got_entries[ELF64_R_SYM(rel->r_info)];
-		    local_got_entries[ELF64_R_SYM(rel->r_info)] = gotent;
-
-		    alpha_elf_tdata(abfd)->total_got_entries++;
-		    alpha_elf_tdata(abfd)->n_local_got_entries++;
-		  }
-		else
-		  gotent->use_count += 1;
-	      }
-
-	    /* Remember how this literal is used from its LITUSEs.
-	       This will be important when it comes to decide if we can
-	       create a .plt entry for a function symbol.  */
-	    if (rel+1 < relend
-		&& ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE)
-	      {
-		do
-		  {
-		    ++rel;
-		    if (rel->r_addend >= 1 && rel->r_addend <= 3)
-		      flags |= 1 << rel->r_addend;
-		  }
-		while (rel+1 < relend &&
-		       ELF64_R_TYPE (rel[1].r_info) == R_ALPHA_LITUSE);
-	      }
-	    else
-	      {
-		/* No LITUSEs -- presumably the address is not being
-		   loaded for nothing.  */
-		flags = ALPHA_ELF_LINK_HASH_LU_ADDR;
-	      }
-
-	    gotent->flags |= flags;
-	    if (h)
-	      {
-		/* Make a guess as to whether a .plt entry will be needed.  */
-		if ((h->flags |= flags) == ALPHA_ELF_LINK_HASH_LU_FUNC)
-		  h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
-		else
-		  h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
-	      }
-	  }
-	  /* FALLTHRU */
+	  /* No LITUSEs -- presumably the address is used somehow.  */
+	  if (gotent_flags == 0)
+	    gotent_flags = ALPHA_ELF_LINK_HASH_LU_ADDR;
+	  break;
 
 	case R_ALPHA_GPDISP:
 	case R_ALPHA_GPREL16:
@@ -2434,9 +3094,38 @@
 	case R_ALPHA_GPRELHIGH:
 	case R_ALPHA_GPRELLOW:
 	case R_ALPHA_BRSGP:
-	  /* We don't actually use the .got here, but the sections must
-	     be created before the linker maps input sections to output
-	     sections.  */
+	  need = NEED_GOT;
+	  break;
+
+	case R_ALPHA_REFLONG:
+	case R_ALPHA_REFQUAD:
+	  if (info->shared || maybe_dynamic)
+	    need = NEED_DYNREL;
+	  break;
+
+	case R_ALPHA_TLSGD:
+	case R_ALPHA_TLSLDM:
+	case R_ALPHA_GOTDTPREL:
+	  need = NEED_GOT | NEED_GOT_ENTRY;
+	  break;
+
+	case R_ALPHA_GOTTPREL:
+	  need = NEED_GOT | NEED_GOT_ENTRY;
+	  gotent_flags = ALPHA_ELF_LINK_HASH_TLS_IE;
+	  if (info->shared)
+	    info->flags |= DF_STATIC_TLS;
+	  break;
+
+	case R_ALPHA_TPREL64:
+	  if (info->shared || maybe_dynamic)
+	    need = NEED_DYNREL;
+	  if (info->shared)
+	    info->flags |= DF_STATIC_TLS;
+	  break;
+	}
+
+      if (need & NEED_GOT)
+	{
 	  if (!got_created)
 	    {
 	      if (!elf64_alpha_create_got_section (abfd, info))
@@ -2450,17 +3139,36 @@
 
 	      got_created = 1;
 	    }
-	  break;
+	}
 
-	case R_ALPHA_SREL16:
-	case R_ALPHA_SREL32:
-	case R_ALPHA_SREL64:
-	  if (h == NULL)
-	    break;
-	  /* FALLTHRU */
+      if (need & NEED_GOT_ENTRY)
+	{
+	  struct alpha_elf_got_entry *gotent;
 
-	case R_ALPHA_REFLONG:
-	case R_ALPHA_REFQUAD:
+	  gotent = get_got_entry (abfd, h, r_type, r_symndx, addend);
+	  if (!gotent)
+	    return false;
+
+	  if (gotent_flags)
+	    {
+	      gotent->flags |= gotent_flags;
+	      if (h)
+		{
+		  gotent_flags |= h->flags;
+		  h->flags = gotent_flags;
+
+		  /* Make a guess as to whether a .plt entry is needed.  */
+		  if ((gotent_flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
+		      && !(gotent_flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC))
+		    h->root.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+		  else
+		    h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+	        }
+	    }
+	}
+
+      if (need & NEED_DYNREL)
+	{
 	  if (rel_sec_name == NULL)
 	    {
 	      rel_sec_name = (bfd_elf_string_from_elf_section
@@ -2530,15 +3238,15 @@
 	      else
 		rent->count++;
 	    }
-	  else if (info->shared && (sec->flags & SEC_ALLOC))
+	  else if (info->shared)
 	    {
 	      /* If this is a shared library, and the section is to be
 		 loaded into memory, we need a RELATIVE reloc.  */
 	      sreloc->_raw_size += sizeof (Elf64_External_Rela);
-	      if (sec->flags & SEC_READONLY)
+	      if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
+		  == (SEC_READONLY | SEC_ALLOC))
 		info->flags |= DF_TEXTREL;
 	    }
-	  break;
 	}
     }
 
@@ -2570,7 +3278,8 @@
       && ((h->type == STT_FUNC
 	   && !(ah->flags & ALPHA_ELF_LINK_HASH_LU_ADDR))
 	  || (h->type == STT_NOTYPE
-	      && ah->flags == ALPHA_ELF_LINK_HASH_LU_FUNC))
+	      && (ah->flags & ALPHA_ELF_LINK_HASH_LU_FUNC)
+	      && !(ah->flags & ~ALPHA_ELF_LINK_HASH_LU_FUNC)))
       /* Don't prevent otherwise valid programs from linking by attempting
 	 to create a new .got entry somewhere.  A Correct Solution would be
 	 to add a new .got section to a new object file and let it be merged
@@ -2667,8 +3376,13 @@
 	{
 	  gin = gi->next;
 	  for (gs = gsh; gs ; gs = gs->next)
-	    if (gi->gotobj == gs->gotobj && gi->addend == gs->addend)
-	      goto got_found;
+	    if (gi->gotobj == gs->gotobj
+		&& gi->reloc_type == gs->reloc_type
+		&& gi->addend == gs->addend)
+	      {
+		gi->use_count += gs->use_count;
+	        goto got_found;
+	      }
 	  gi->next = hs->got_entries;
 	  hs->got_entries = gi;
 	got_found:;
@@ -2710,15 +3424,15 @@
 elf64_alpha_can_merge_gots (a, b)
      bfd *a, *b;
 {
-  int total = alpha_elf_tdata (a)->total_got_entries;
+  int total = alpha_elf_tdata (a)->total_got_size;
   bfd *bsub;
 
   /* Trivial quick fallout test.  */
-  if (total + alpha_elf_tdata (b)->total_got_entries <= MAX_GOT_ENTRIES)
+  if (total + alpha_elf_tdata (b)->total_got_size <= MAX_GOT_SIZE)
     return true;
 
   /* By their nature, local .got entries cannot be merged.  */
-  if ((total += alpha_elf_tdata (b)->n_local_got_entries) > MAX_GOT_ENTRIES)
+  if ((total += alpha_elf_tdata (b)->local_got_size) > MAX_GOT_SIZE)
     return false;
 
   /* Failing the common trivial comparison, we must effectively
@@ -2749,10 +3463,13 @@
 	        continue;
 
 	      for (ae = h->got_entries; ae ; ae = ae->next)
-	        if (ae->gotobj == a && ae->addend == be->addend)
+	        if (ae->gotobj == a
+		    && ae->reloc_type == be->reloc_type
+		    && ae->addend == be->addend)
 		  goto global_found;
 
-	      if (++total > MAX_GOT_ENTRIES)
+	      total += alpha_got_entry_size (be->reloc_type);
+	      if (total > MAX_GOT_SIZE)
 	        return false;
 	    global_found:;
 	    }
@@ -2768,14 +3485,14 @@
 elf64_alpha_merge_gots (a, b)
      bfd *a, *b;
 {
-  int total = alpha_elf_tdata (a)->total_got_entries;
+  int total = alpha_elf_tdata (a)->total_got_size;
   bfd *bsub;
 
   /* Remember local expansion.  */
   {
-    int e = alpha_elf_tdata (b)->n_local_got_entries;
+    int e = alpha_elf_tdata (b)->local_got_size;
     total += e;
-    alpha_elf_tdata (a)->n_local_got_entries += e;
+    alpha_elf_tdata (a)->local_got_size += e;
   }
 
   for (bsub = b; bsub ; bsub = alpha_elf_tdata (bsub)->in_got_link_next)
@@ -2825,7 +3542,9 @@
 	        continue;
 
 	      for (ae = *start; ae ; ae = ae->next)
-	        if (ae->gotobj == a && ae->addend == be->addend)
+	        if (ae->gotobj == a
+		    && ae->reloc_type == be->reloc_type
+		    && ae->addend == be->addend)
 		  {
 		    ae->flags |= be->flags;
 		    ae->use_count += be->use_count;
@@ -2833,7 +3552,7 @@
 		    goto global_found;
 		  }
 	      be->gotobj = a;
-	      total += 1;
+	      total += alpha_got_entry_size (be->reloc_type);
 
 	    global_found:;
 	    }
@@ -2841,7 +3560,7 @@
 
       alpha_elf_tdata (bsub)->gotobj = a;
     }
-  alpha_elf_tdata (a)->total_got_entries = total;
+  alpha_elf_tdata (a)->total_got_size = total;
 
   /* Merge the two in_got chains.  */
   {
@@ -2874,7 +3593,7 @@
 	  = &alpha_elf_tdata (gotent->gotobj)->got->_raw_size;
 
 	gotent->got_offset = *plge;
-	*plge += 8;
+	*plge += alpha_got_entry_size (gotent->reloc_type);
       }
 
   return true;
@@ -2916,7 +3635,7 @@
 	      if (gotent->use_count > 0)
 	        {
 		  gotent->got_offset = got_offset;
-		  got_offset += 8;
+		  got_offset += alpha_got_entry_size (gotent->reloc_type);
 	        }
 	}
 
@@ -2928,8 +3647,7 @@
 /* Constructs the gots.  */
 
 static boolean
-elf64_alpha_size_got_sections (output_bfd, info)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
+elf64_alpha_size_got_sections (info)
      struct bfd_link_info *info;
 {
   bfd *i, *got_list, *cur_got_obj = NULL;
@@ -2950,13 +3668,13 @@
 	  /* We are assuming no merging has yet ocurred.  */
 	  BFD_ASSERT (this_got == i);
 
-          if (alpha_elf_tdata (this_got)->total_got_entries > MAX_GOT_ENTRIES)
+          if (alpha_elf_tdata (this_got)->total_got_size > MAX_GOT_SIZE)
 	    {
 	      /* Yikes! A single object file has too many entries.  */
 	      (*_bfd_error_handler)
 	        (_("%s: .got subsegment exceeds 64K (size %d)"),
 	         bfd_archive_filename (i),
-	         alpha_elf_tdata (this_got)->total_got_entries * 8);
+	         alpha_elf_tdata (this_got)->total_got_size);
 	      return false;
 	    }
 
@@ -3003,9 +3721,80 @@
   return true;
 }
 
+/* Called from relax_section to rebuild the PLT in light of
+   potential changes in the function's status.  */
+
+static boolean
+elf64_alpha_size_plt_section (info)
+     struct bfd_link_info *info;
+{
+  asection *splt, *spltrel;
+  unsigned long entries;
+  bfd *dynobj;
+
+  dynobj = elf_hash_table(info)->dynobj;
+  splt = bfd_get_section_by_name(dynobj, ".plt");
+  if (splt == NULL)
+    return true;
+
+  splt->_raw_size = 0;
+
+  alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+				elf64_alpha_size_plt_section_1, splt);
+
+  splt->_cooked_size = splt->_raw_size;
+
+  /* Every plt entry requires a JMP_SLOT relocation.  */
+  spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
+  if (splt->_raw_size)
+    entries = (splt->_raw_size - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE;
+  else
+    entries = 0;
+  spltrel->_raw_size = entries * sizeof (Elf64_External_Rela);
+  spltrel->_cooked_size = spltrel->_raw_size;
+
+  return true;
+}
+
+static boolean
+elf64_alpha_size_plt_section_1 (h, data)
+     struct alpha_elf_link_hash_entry *h;
+     PTR data;
+{
+  asection *splt = (asection *) data;
+  struct alpha_elf_got_entry *gotent;
+
+  /* If we didn't need an entry before, we still don't.  */
+  if (!(h->root.elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT))
+    return true;
+
+  /* There must still be a LITERAL got entry for the function.  */
+  for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+    if (gotent->reloc_type == R_ALPHA_LITERAL
+	&& gotent->use_count > 0)
+      break;
+
+  /* If there is, reset the PLT offset.  If not, there's no longer
+     a need for the PLT entry.  */
+  if (gotent)
+    {
+      if (splt->_raw_size == 0)
+	splt->_raw_size = PLT_HEADER_SIZE;
+      h->root.plt.offset = splt->_raw_size;
+      splt->_raw_size += PLT_ENTRY_SIZE;
+    }
+  else
+    {
+      h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+      h->root.plt.offset = -1;
+    }
+
+  return true;
+}
+
 static boolean
 elf64_alpha_always_size_sections (output_bfd, info)
-     bfd *output_bfd;
+     bfd *output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
 {
   bfd *i;
@@ -3018,7 +3807,7 @@
 				elf64_alpha_merge_ind_symbols,
 				NULL);
 
-  if (!elf64_alpha_size_got_sections (output_bfd, info))
+  if (!elf64_alpha_size_got_sections (info))
     return false;
 
   /* Allocate space for all of the .got subsections.  */
@@ -3037,6 +3826,40 @@
   return true;
 }
 
+/* The number of dynamic relocations required by a static relocation.  */
+
+static int
+alpha_dynamic_entries_for_reloc (r_type, dynamic, shared)
+     int r_type, dynamic, shared;
+{
+  switch (r_type)
+    {
+    /* May appear in GOT entries.  */
+    case R_ALPHA_TLSGD:
+      return (dynamic ? 2 : shared ? 1 : 0);
+    case R_ALPHA_TLSLDM:
+      return shared;
+    case R_ALPHA_LITERAL:
+      return dynamic || shared;
+    case R_ALPHA_GOTDTPREL:
+    case R_ALPHA_GOTTPREL:
+      return dynamic;
+
+    /* May appear in data sections.  */
+    case R_ALPHA_REFLONG:
+    case R_ALPHA_REFQUAD:
+      return dynamic || shared;
+    case R_ALPHA_SREL64:
+    case R_ALPHA_TPREL64:
+      return dynamic;
+
+    /* Everything else is illegal.  We'll issue an error during
+       relocate_section.  */
+    default:
+      return 0;
+    }
+}
+
 /* Work out the sizes of the dynamic relocation entries.  */
 
 static boolean
@@ -3044,6 +3867,10 @@
      struct alpha_elf_link_hash_entry *h;
      struct bfd_link_info *info;
 {
+  boolean dynamic;
+  struct alpha_elf_reloc_entry *relent;
+  unsigned long entries;
+
   if (h->root.root.type == bfd_link_hash_warning)
     h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
 
@@ -3062,54 +3889,128 @@
       && (h->root.root.type == bfd_link_hash_defined
 	  || h->root.root.type == bfd_link_hash_defweak)
       && !(h->root.root.u.def.section->owner->flags & DYNAMIC))
-    {
-      h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
-    }
+    h->root.elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
 
   /* If the symbol is dynamic, we'll need all the relocations in their
      natural form.  If this is a shared object, and it has been forced
      local, we'll need the same number of RELATIVE relocations.  */
 
-  if (alpha_elf_dynamic_symbol_p (&h->root, info) || info->shared)
+  dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+
+  for (relent = h->reloc_entries; relent; relent = relent->next)
     {
-      struct alpha_elf_reloc_entry *relent;
-      bfd *dynobj;
-      struct alpha_elf_got_entry *gotent;
-      bfd_size_type count;
-      asection *srel;
-
-      for (relent = h->reloc_entries; relent; relent = relent->next)
-	if (relent->rtype == R_ALPHA_REFLONG
-	    || relent->rtype == R_ALPHA_REFQUAD)
-	  {
-	    relent->srel->_raw_size +=
-	      sizeof (Elf64_External_Rela) * relent->count;
-	    if (relent->reltext)
-	      info->flags |= DT_TEXTREL;
-	  }
-
-      dynobj = elf_hash_table(info)->dynobj;
-      count = 0;
-
-      for (gotent = h->got_entries; gotent ; gotent = gotent->next)
-	count++;
-
-      /* If we are using a .plt entry, subtract one, as the first
-	 reference uses a .rela.plt entry instead.  */
-      if (h->root.plt.offset != MINUS_ONE)
-	count--;
-
-      if (count > 0)
+      entries = alpha_dynamic_entries_for_reloc (relent->rtype, dynamic,
+						 info->shared);
+      if (entries)
 	{
-	  srel = bfd_get_section_by_name (dynobj, ".rela.got");
-	  BFD_ASSERT (srel != NULL);
-	  srel->_raw_size += sizeof (Elf64_External_Rela) * count;
+	  relent->srel->_raw_size +=
+	    entries * sizeof (Elf64_External_Rela) * relent->count;
+	  if (relent->reltext)
+	    info->flags |= DT_TEXTREL;
 	}
     }
 
   return true;
 }
 
+/* Set the sizes of the dynamic relocation sections.  */
+
+static boolean
+elf64_alpha_size_rela_got_section (info)
+     struct bfd_link_info *info;
+{
+  unsigned long entries;
+  bfd *i, *dynobj;
+  asection *srel;
+
+  /* Shared libraries often require RELATIVE relocs, and some relocs
+     require attention for the main application as well.  */
+
+  entries = 0;
+  for (i = alpha_elf_hash_table(info)->got_list;
+       i ; i = alpha_elf_tdata(i)->got_link_next)
+    {
+      bfd *j;
+
+      for (j = i; j ; j = alpha_elf_tdata(j)->in_got_link_next)
+	{
+	  struct alpha_elf_got_entry **local_got_entries, *gotent;
+	  int k, n;
+
+	  local_got_entries = alpha_elf_tdata(j)->local_got_entries;
+	  if (!local_got_entries)
+	    continue;
+
+	  for (k = 0, n = elf_tdata(j)->symtab_hdr.sh_info; k < n; ++k)
+	    for (gotent = local_got_entries[k];
+		 gotent ; gotent = gotent->next)
+	      if (gotent->use_count > 0)
+		entries += (alpha_dynamic_entries_for_reloc
+			    (gotent->reloc_type, 0, info->shared));
+	}
+    }
+
+  dynobj = elf_hash_table(info)->dynobj;
+  srel = bfd_get_section_by_name (dynobj, ".rela.got");
+  if (!srel)
+    {
+      BFD_ASSERT (entries == 0);
+      return true;
+    }
+  srel->_raw_size = sizeof (Elf64_External_Rela) * entries;
+
+  /* Now do the non-local symbols.  */
+  alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
+				elf64_alpha_size_rela_got_1, info);
+
+  srel->_cooked_size = srel->_raw_size;
+
+  return true;
+}
+
+/* Subroutine of elf64_alpha_size_rela_got_section for doing the
+   global symbols.  */
+
+static boolean
+elf64_alpha_size_rela_got_1 (h, info)
+     struct alpha_elf_link_hash_entry *h;
+     struct bfd_link_info *info;
+{
+  boolean dynamic;
+  struct alpha_elf_got_entry *gotent;
+  unsigned long entries;
+
+  if (h->root.root.type == bfd_link_hash_warning)
+    h = (struct alpha_elf_link_hash_entry *) h->root.root.u.i.link;
+
+  /* If the symbol is dynamic, we'll need all the relocations in their
+     natural form.  If this is a shared object, and it has been forced
+     local, we'll need the same number of RELATIVE relocations.  */
+
+  dynamic = alpha_elf_dynamic_symbol_p (&h->root, info);
+
+  entries = 0;
+  for (gotent = h->got_entries; gotent ; gotent = gotent->next)
+    if (gotent->use_count > 0)
+      entries += alpha_dynamic_entries_for_reloc (gotent->reloc_type,
+						  dynamic, info->shared);
+
+  /* If we are using a .plt entry, subtract one, as the first
+     reference uses a .rela.plt entry instead.  */
+  if (h->root.plt.offset != MINUS_ONE)
+    entries--;
+
+  if (entries > 0)
+    {
+      bfd *dynobj = elf_hash_table(info)->dynobj;
+      asection *srel = bfd_get_section_by_name (dynobj, ".rela.got");
+      BFD_ASSERT (srel != NULL);
+      srel->_raw_size += sizeof (Elf64_External_Rela) * entries;
+    }
+
+  return true;
+}
+
 /* Set the sizes of the dynamic sections.  */
 
 static boolean
@@ -3140,27 +4041,9 @@
 	 collected information in check_relocs that we can now apply to
 	 size the dynamic relocation sections.  */
       alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
-				    elf64_alpha_calc_dynrel_sizes,
-				    info);
+				    elf64_alpha_calc_dynrel_sizes, info);
 
-      /* When building shared libraries, each local .got entry needs a
-	 RELATIVE reloc.  */
-      if (info->shared)
-	{
-	  bfd *i;
-	  asection *srel;
-	  bfd_size_type count;
-
-	  srel = bfd_get_section_by_name (dynobj, ".rela.got");
-	  BFD_ASSERT (srel != NULL);
-
-	  for (i = alpha_elf_hash_table(info)->got_list, count = 0;
-	       i != NULL;
-	       i = alpha_elf_tdata(i)->got_link_next)
-	    count += alpha_elf_tdata(i)->n_local_got_entries;
-
-	  srel->_raw_size += count * sizeof (Elf64_External_Rela);
-	}
+      elf64_alpha_size_rela_got_section (info);
     }
   /* else we're not dynamic and by definition we don't need such things.  */
 
@@ -3237,12 +4120,10 @@
 	    return false;
 	}
 
-      if (!add_dynamic_entry (DT_PLTGOT, 0))
-	return false;
-
       if (relplt)
 	{
-	  if (!add_dynamic_entry (DT_PLTRELSZ, 0)
+	  if (!add_dynamic_entry (DT_PLTGOT, 0)
+	      || !add_dynamic_entry (DT_PLTRELSZ, 0)
 	      || !add_dynamic_entry (DT_PLTREL, DT_RELA)
 	      || !add_dynamic_entry (DT_JMPREL, 0))
 	    return false;
@@ -3264,6 +4145,71 @@
   return true;
 }
 
+/* Relocate an Alpha ELF section for a relocatable 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.  */
+
+static boolean
+elf64_alpha_relocate_section_r (output_bfd, info, input_bfd, input_section,
+			        contents, relocs, local_syms, local_sections)
+     bfd *output_bfd ATTRIBUTE_UNUSED;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     bfd *input_bfd;
+     asection *input_section;
+     bfd_byte *contents ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *relocs;
+     Elf_Internal_Sym *local_syms;
+     asection **local_sections;
+{
+  unsigned long symtab_hdr_sh_info;
+  Elf_Internal_Rela *rel;
+  Elf_Internal_Rela *relend;
+  boolean ret_val = true;
+
+  symtab_hdr_sh_info = elf_tdata (input_bfd)->symtab_hdr.sh_info;
+
+  relend = relocs + input_section->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      unsigned long r_symndx;
+      Elf_Internal_Sym *sym;
+      asection *sec;
+      unsigned long r_type;
+
+      r_type = ELF64_R_TYPE(rel->r_info);
+      if (r_type >= R_ALPHA_max)
+	{
+	  (*_bfd_error_handler)
+	    (_("%s: unknown relocation type %d"),
+	     bfd_archive_filename (input_bfd), (int)r_type);
+	  bfd_set_error (bfd_error_bad_value);
+	  ret_val = false;
+	  continue;
+	}
+
+      r_symndx = ELF64_R_SYM(rel->r_info);
+
+      /* The symbol associated with GPDISP and LITUSE is
+	 immaterial.  Only the addend is significant.  */
+      if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
+	continue;
+
+      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;
+	    }
+	}
+    }
+
+  return ret_val;
+}
+
 /* Relocate an Alpha ELF section.  */
 
 static boolean
@@ -3281,22 +4227,39 @@
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
-  asection *sec, *sgot, *srel, *srelgot;
+  struct elf_link_tls_segment *tls_segment;
+  asection *sgot, *srel, *srelgot;
   bfd *dynobj, *gotobj;
-  bfd_vma gp;
-  boolean ret_val = true;
+  bfd_vma gp, tp_base, dtp_base;
+  struct alpha_elf_got_entry **local_got_entries;
+  boolean ret_val;
+  const char *section_name;
 
-  srelgot = srel = NULL;
+  /* Handle relocatable links with a smaller loop.  */
+  if (info->relocateable)
+    return elf64_alpha_relocate_section_r (output_bfd, info, input_bfd,
+					   input_section, contents, relocs,
+					   local_syms, local_sections);
+
+  /* This is a final link.  */
+
+  ret_val = true;
+
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+
   dynobj = elf_hash_table (info)->dynobj;
   if (dynobj)
-    {
-      srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
-    }
+    srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+  else
+    srelgot = NULL;
+
+  section_name = (bfd_elf_string_from_elf_section
+		  (input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
+		   elf_section_data(input_section)->rel_hdr.sh_name));
+  BFD_ASSERT(section_name != NULL);
+  srel = bfd_get_section_by_name (dynobj, section_name);
 
   /* Find the gp value for this input bfd.  */
-  sgot = NULL;
-  gp = 0;
   gotobj = alpha_elf_tdata (input_bfd)->gotobj;
   if (gotobj)
     {
@@ -3310,66 +4273,97 @@
 	  _bfd_set_gp_value (gotobj, gp);
 	}
     }
-
-  rel = relocs;
-  relend = relocs + input_section->reloc_count;
-  for (; rel < relend; rel++)
+  else
     {
-      int r_type;
+      sgot = NULL;
+      gp = 0;
+    }
+
+  local_got_entries = alpha_elf_tdata(input_bfd)->local_got_entries;
+
+  tls_segment = elf_hash_table (info)->tls_segment;
+  if (tls_segment)
+    {
+      dtp_base = alpha_get_dtprel_base (tls_segment);
+      tp_base = alpha_get_tprel_base (tls_segment);
+    }
+  else
+    dtp_base = tp_base = 0;
+
+  relend = relocs + input_section->reloc_count;
+  for (rel = relocs; rel < relend; rel++)
+    {
+      struct alpha_elf_link_hash_entry *h = NULL;
+      struct alpha_elf_got_entry *gotent;
+      bfd_reloc_status_type r;
       reloc_howto_type *howto;
       unsigned long r_symndx;
-      struct alpha_elf_link_hash_entry *h;
-      Elf_Internal_Sym *sym;
-      bfd_vma relocation;
+      Elf_Internal_Sym *sym = NULL;
+      asection *sec = NULL;
+      bfd_vma value;
       bfd_vma addend;
-      bfd_reloc_status_type r;
+      boolean dynamic_symbol_p;
+      boolean undef_weak_ref = false;
+      unsigned long r_type;
 
       r_type = ELF64_R_TYPE(rel->r_info);
-      if (r_type < 0 || r_type >= (int) R_ALPHA_max)
+      if (r_type >= R_ALPHA_max)
 	{
+	  (*_bfd_error_handler)
+	    (_("%s: unknown relocation type %d"),
+	     bfd_archive_filename (input_bfd), (int)r_type);
 	  bfd_set_error (bfd_error_bad_value);
-	  return false;
-	}
-      howto = elf64_alpha_howto_table + r_type;
-
-      r_symndx = ELF64_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.  */
-
-	  /* The symbol associated with GPDISP and LITUSE is
-	     immaterial.  Only the addend is significant.  */
-	  if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
-	    continue;
-
-	  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;
-		}
-	    }
-
+	  ret_val = false;
 	  continue;
 	}
 
-      /* This is a final link.  */
-
-      h = NULL;
-      sym = NULL;
-      sec = NULL;
+      howto = elf64_alpha_howto_table + r_type;
+      r_symndx = ELF64_R_SYM(rel->r_info);
 
       if (r_symndx < symtab_hdr->sh_info)
 	{
 	  sym = local_syms + r_symndx;
 	  sec = local_sections[r_symndx];
-	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+	  value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+
+	  if (local_got_entries)
+	    gotent = local_got_entries[r_symndx];
+	  else
+	    gotent = NULL;
+
+	  /* Need to adjust local GOT entries' addends for SEC_MERGE
+	     unless it has been done already.  */
+	  if ((sec->flags & SEC_MERGE)
+	      && ELF_ST_TYPE (sym->st_info) == STT_SECTION
+	      && (elf_section_data (sec)->sec_info_type
+		  == ELF_INFO_TYPE_MERGE)
+	      && gotent
+	      && !gotent->reloc_xlated)
+	    {
+	      struct alpha_elf_got_entry *ent;
+	      asection *msec;
+
+	      for (ent = gotent; ent; ent = ent->next)
+		{
+		  ent->reloc_xlated = 1;
+		  if (ent->use_count == 0)
+		    continue;
+		  msec = sec;
+		  ent->addend =
+		    _bfd_merged_section_offset (output_bfd, &msec,
+						elf_section_data (sec)->
+						  sec_info,
+						sym->st_value + ent->addend,
+						(bfd_vma) 0);
+		  ent->addend -= sym->st_value;
+		  ent->addend += msec->output_section->vma
+				 + msec->output_offset
+				 - sec->output_section->vma
+				 - sec->output_offset;
+		}
+	    }
+
+	  dynamic_symbol_p = false;
 	}
       else
 	{
@@ -3379,27 +4373,32 @@
 		 || h->root.root.type == bfd_link_hash_warning)
 	    h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
 
+	  value = 0;
 	  if (h->root.root.type == bfd_link_hash_defined
 	      || h->root.root.type == bfd_link_hash_defweak)
 	    {
 	      sec = h->root.root.u.def.section;
 
-	      if (sec->output_section == NULL)
-		relocation = 0;
-	      else
-		{
-		  relocation = (h->root.root.u.def.value
-				+ sec->output_section->vma
-				+ sec->output_offset);
-		}
+	      /* Detect the cases that sym_sec->output_section is
+		 expected to be NULL -- all cases in which the symbol
+		 is defined in another shared module.  This includes
+		 PLT relocs for which we've created a PLT entry and
+		 other relocs for which we're prepared to create
+		 dynamic relocations.  */
+	      /* ??? Just accept it NULL and continue.  */
+
+	      if (sec->output_section != NULL)
+		value = (h->root.root.u.def.value
+			 + sec->output_section->vma
+			      + sec->output_offset);
 	    }
 	  else if (h->root.root.type == bfd_link_hash_undefweak)
-	    relocation = 0;
+	    undef_weak_ref = true;
 	  else if (info->shared
 		   && (!info->symbolic || info->allow_shlib_undefined)
 		   && !info->no_undefined
 		   && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
-	    relocation = 0;
+	    ;
 	  else
 	    {
 	      if (!((*info->callbacks->undefined_symbol)
@@ -3407,11 +4406,24 @@
 		     input_section, rel->r_offset,
 		     (!info->shared || info->no_undefined
 		      || ELF_ST_VISIBILITY (h->root.other)))))
-		ret_val = false;
-	      relocation = 0;
+		return false;
+	      ret_val = false;
+	      continue;
 	    }
+
+          dynamic_symbol_p = alpha_elf_dynamic_symbol_p (&h->root, info);
+	  gotent = h->got_entries;
 	}
+
       addend = rel->r_addend;
+      value += addend;
+
+      /* Search for the proper got entry.  */
+      for (; gotent ; gotent = gotent->next)
+	if (gotent->gotobj == gotobj
+	    && gotent->reloc_type == r_type
+	    && gotent->addend == addend)
+	  break;
 
       switch (r_type)
 	{
@@ -3421,124 +4433,66 @@
 
 	    BFD_ASSERT(gp != 0);
 
-	    relocation = (input_section->output_section->vma
-			  + input_section->output_offset
-			  + rel->r_offset);
+	    value = (input_section->output_section->vma
+		     + input_section->output_offset
+		     + rel->r_offset);
 
-	    p_ldah = contents + rel->r_offset - input_section->vma;
+	    p_ldah = contents + rel->r_offset;
 	    p_lda = p_ldah + rel->r_addend;
 
-	    r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - relocation,
+	    r = elf64_alpha_do_reloc_gpdisp (input_bfd, gp - value,
 					     p_ldah, p_lda);
 	  }
 	  break;
 
 	case R_ALPHA_LITERAL:
-	  {
-	    struct alpha_elf_got_entry *gotent;
-	    boolean dynamic_symbol;
+	  BFD_ASSERT(sgot != NULL);
+	  BFD_ASSERT(gp != 0);
+	  BFD_ASSERT(gotent != NULL);
+	  BFD_ASSERT(gotent->use_count >= 1);
 
-	    BFD_ASSERT(sgot != NULL);
-	    BFD_ASSERT(gp != 0);
+	  if (!gotent->reloc_done)
+	    {
+	      gotent->reloc_done = 1;
 
-	    if (h != NULL)
-	      {
-		gotent = h->got_entries;
-		dynamic_symbol = alpha_elf_dynamic_symbol_p (&h->root, info);
-	      }
-	    else
-	      {
-		gotent = (alpha_elf_tdata(input_bfd)->
-			  local_got_entries[r_symndx]);
-		dynamic_symbol = false;
+	      bfd_put_64 (output_bfd, value,
+			  sgot->contents + gotent->got_offset);
 
-		/* Need to adjust local GOT entries' addends for SEC_MERGE
-		   unless it has been done already.  */
-		if ((sec->flags & SEC_MERGE)
-		    && ELF_ST_TYPE (sym->st_info) == STT_SECTION
-		    && (elf_section_data (sec)->sec_info_type
-			== ELF_INFO_TYPE_MERGE)
-		    && (gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED) == 0)
-		  {
-		    struct alpha_elf_got_entry *ent;
-		    asection *msec;
+	      /* If the symbol has been forced local, output a
+		 RELATIVE reloc, otherwise it will be handled in
+		 finish_dynamic_symbol.  */
+	      if (info->shared && !dynamic_symbol_p)
+		{
+		  Elf_Internal_Rela outrel;
 
-		    for (ent = gotent; ent; ent = ent->next)
-		      {
-			ent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED;
-			if (ent->use_count == 0)
-			  continue;
-			msec = sec;
-			ent->addend =
-			  _bfd_merged_section_offset (output_bfd, &msec,
-						      elf_section_data (sec)->
-						      sec_info,
-						      sym->st_value
-						      + ent->addend,
-						      (bfd_vma) 0);
-			ent->addend -= sym->st_value;
-			ent->addend += msec->output_section->vma
-				       + msec->output_offset
-				       - sec->output_section->vma
-				       - sec->output_offset;
-		      }
-		  }
-	      }
+		  BFD_ASSERT(srelgot != NULL);
 
-	    BFD_ASSERT(gotent != NULL);
+		  outrel.r_offset = (sgot->output_section->vma
+				     + sgot->output_offset
+				     + gotent->got_offset);
+		  outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
+		  outrel.r_addend = value;
 
-	    while (gotent->gotobj != gotobj || gotent->addend != addend)
-	      gotent = gotent->next;
+		  bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+					     ((Elf64_External_Rela *)
+					      srelgot->contents)
+					     + srelgot->reloc_count++);
+		  BFD_ASSERT (sizeof (Elf64_External_Rela)
+			      * srelgot->reloc_count
+			      <= srelgot->_cooked_size);
+		}
+	    }
 
-	    BFD_ASSERT(gotent->use_count >= 1);
-
-	    /* Initialize the .got entry's value.  */
-	    if (!(gotent->flags & ALPHA_ELF_GOT_ENTRY_RELOCS_DONE))
-	      {
-		bfd_put_64 (output_bfd, relocation + addend,
-			    sgot->contents + gotent->got_offset);
-
-		/* If the symbol has been forced local, output a
-		   RELATIVE reloc, otherwise it will be handled in
-		   finish_dynamic_symbol.  */
-		if (info->shared && !dynamic_symbol)
-		  {
-		    Elf_Internal_Rela outrel;
-
-		    BFD_ASSERT(srelgot != NULL);
-
-		    outrel.r_offset = (sgot->output_section->vma
-				       + sgot->output_offset
-				       + gotent->got_offset);
-		    outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
-		    outrel.r_addend = relocation + addend;
-
-		    bfd_elf64_swap_reloca_out (output_bfd, &outrel,
-					       ((Elf64_External_Rela *)
-					        srelgot->contents)
-					       + srelgot->reloc_count++);
-		    BFD_ASSERT (sizeof (Elf64_External_Rela)
-				* srelgot->reloc_count
-				<= srelgot->_cooked_size);
-		  }
-
-		gotent->flags |= ALPHA_ELF_GOT_ENTRY_RELOCS_DONE;
-	      }
-
-	    /* Figure the gprel relocation.  */
-	    addend = 0;
-	    relocation = (sgot->output_section->vma
-			  + sgot->output_offset
-			  + gotent->got_offset);
-	    relocation -= gp;
-	  }
-	  /* overflow handled by _bfd_final_link_relocate */
+	  value = (sgot->output_section->vma
+		   + sgot->output_offset
+		   + gotent->got_offset);
+	  value -= gp;
 	  goto default_reloc;
 
 	case R_ALPHA_GPREL16:
 	case R_ALPHA_GPREL32:
 	case R_ALPHA_GPRELLOW:
-	  if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+	  if (dynamic_symbol_p)
             {
               (*_bfd_error_handler)
                 (_("%s: gp-relative relocation against dynamic symbol %s"),
@@ -3546,11 +4500,11 @@
               ret_val = false;
             }
 	  BFD_ASSERT(gp != 0);
-	  relocation -= gp;
+	  value -= gp;
 	  goto default_reloc;
 
 	case R_ALPHA_GPRELHIGH:
-	  if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+	  if (dynamic_symbol_p)
             {
               (*_bfd_error_handler)
                 (_("%s: gp-relative relocation against dynamic symbol %s"),
@@ -3558,27 +4512,34 @@
               ret_val = false;
             }
 	  BFD_ASSERT(gp != 0);
-	  relocation -= gp;
-	  relocation += addend;
-	  addend = 0;
-	  relocation = (((bfd_signed_vma) relocation >> 16)
-			+ ((relocation >> 15) & 1));
+	  value -= gp;
+	  value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
 	  goto default_reloc;
 
 	case R_ALPHA_HINT:
 	  /* A call to a dynamic symbol is definitely out of range of
 	     the 16-bit displacement.  Don't bother writing anything.  */
-	  if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+	  if (dynamic_symbol_p)
 	    {
 	      r = bfd_reloc_ok;
 	      break;
 	    }
-	  /* FALLTHRU */
-
-	case R_ALPHA_BRADDR:
 	  /* The regular PC-relative stuff measures from the start of
 	     the instruction rather than the end.  */
-	  addend -= 4;
+	  value -= 4;
+	  goto default_reloc;
+
+	case R_ALPHA_BRADDR:
+	  if (dynamic_symbol_p)
+            {
+              (*_bfd_error_handler)
+                (_("%s: pc-relative relocation against dynamic symbol %s"),
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
+              ret_val = false;
+            }
+	  /* The regular PC-relative stuff measures from the start of
+	     the instruction rather than the end.  */
+	  value -= 4;
 	  goto default_reloc;
 
 	case R_ALPHA_BRSGP:
@@ -3588,12 +4549,12 @@
 
 	    /* The regular PC-relative stuff measures from the start of
 	       the instruction rather than the end.  */
-	    addend -= 4;
+	    value -= 4;
 
 	    /* The source and destination gp must be the same.  Note that
 	       the source will always have an assigned gp, since we forced
 	       one in check_relocs, but that the destination may not, as
-	       it might not have had any relocations at all.  Also take 
+	       it might not have had any relocations at all.  Also take
 	       care not to crash if H is an undefined symbol.  */
 	    if (h != NULL && sec != NULL
 		&& alpha_elf_tdata (sec->owner)->gotobj
@@ -3641,41 +4602,52 @@
 
 	case R_ALPHA_REFLONG:
 	case R_ALPHA_REFQUAD:
+	case R_ALPHA_DTPREL64:
+	case R_ALPHA_TPREL64:
 	  {
 	    Elf_Internal_Rela outrel;
 
 	    /* Careful here to remember RELATIVE relocations for global
 	       variables for symbolic shared objects.  */
 
-	    if (h && alpha_elf_dynamic_symbol_p (&h->root, info))
+	    if (dynamic_symbol_p)
 	      {
 		BFD_ASSERT(h->root.dynindx != -1);
-		outrel.r_info = ELF64_R_INFO(h->root.dynindx, r_type);
+		outrel.r_info = ELF64_R_INFO (h->root.dynindx, r_type);
 		outrel.r_addend = addend;
-		addend = 0, relocation = 0;
+		addend = 0, value = 0;
+	      }
+	    else if (r_type == R_ALPHA_DTPREL64)
+	      {
+		BFD_ASSERT(tls_segment != NULL);
+		value -= dtp_base;
+		goto default_reloc;
+	      }
+	    else if (r_type == R_ALPHA_TPREL64)
+	      {
+		BFD_ASSERT(tls_segment != NULL);
+		value -= dtp_base;
+		goto default_reloc;
 	      }
 	    else if (info->shared
 		     && r_symndx != 0
 		     && (input_section->flags & SEC_ALLOC))
 	      {
-		outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
-		outrel.r_addend = relocation + addend;
+		if (r_type == R_ALPHA_REFLONG)
+		  {
+		    (*_bfd_error_handler)
+		      (_("%s: unhandled dynamic relocation against %s"),
+		       bfd_archive_filename (input_bfd),
+		       h->root.root.root.string);
+		    ret_val = false;
+		  }
+		outrel.r_info = ELF64_R_INFO (0, R_ALPHA_RELATIVE);
+		outrel.r_addend = value;
 	      }
 	    else
 	      goto default_reloc;
 
-	    if (!srel)
-	      {
-		const char *name;
-
-		name = (bfd_elf_string_from_elf_section
-			(input_bfd, elf_elfheader(input_bfd)->e_shstrndx,
-			 elf_section_data(input_section)->rel_hdr.sh_name));
-		BFD_ASSERT(name != NULL);
-
-		srel = bfd_get_section_by_name (dynobj, name);
-		BFD_ASSERT(srel != NULL);
-	      }
+	    BFD_ASSERT(srel != NULL);
 
 	    outrel.r_offset =
 	      _bfd_elf_section_offset (output_bfd, info, input_section,
@@ -3695,8 +4667,17 @@
 	  }
 	  goto default_reloc;
 
+	case R_ALPHA_SREL16:
 	case R_ALPHA_SREL32:
 	case R_ALPHA_SREL64:
+	  if (dynamic_symbol_p)
+            {
+              (*_bfd_error_handler)
+                (_("%s: pc-relative relocation against dynamic symbol %s"),
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
+              ret_val = false;
+            }
+
 	  /* ??? .eh_frame references to discarded sections will be smashed
 	     to relocations against SHN_UNDEF.  The .eh_frame format allows
 	     NULL to be encoded as 0 in any format, so this works here.  */
@@ -3705,11 +4686,134 @@
 		     + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG));
 	  goto default_reloc;
 
+	case R_ALPHA_TLSLDM:
+	  /* Ignore the symbol for the relocation.  The result is always
+	     the current module.  */
+	  dynamic_symbol_p = 0;
+	  /* FALLTHRU */
+
+	case R_ALPHA_TLSGD:
+	  if (!gotent->reloc_done)
+	    {
+	      gotent->reloc_done = 1;
+
+	      /* Note that the module index for the main program is 1.  */
+	      bfd_put_64 (output_bfd, !info->shared && !dynamic_symbol_p,
+			  sgot->contents + gotent->got_offset);
+
+	      /* If the symbol has been forced local, output a
+		 DTPMOD64 reloc, otherwise it will be handled in
+		 finish_dynamic_symbol.  */
+	      if (info->shared && !dynamic_symbol_p)
+		{
+		  Elf_Internal_Rela outrel;
+
+		  BFD_ASSERT(srelgot != NULL);
+
+		  outrel.r_offset = (sgot->output_section->vma
+				     + sgot->output_offset
+				     + gotent->got_offset);
+		  /* ??? Proper dynindx here.  */
+		  outrel.r_info = ELF64_R_INFO (0, R_ALPHA_DTPMOD64);
+		  outrel.r_addend = 0;
+
+		  bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+					     ((Elf64_External_Rela *)
+					      srelgot->contents)
+					     + srelgot->reloc_count++);
+		  BFD_ASSERT (sizeof (Elf64_External_Rela)
+			      * srelgot->reloc_count
+			      <= srelgot->_cooked_size);
+		}
+
+	      if (dynamic_symbol_p || r_type == R_ALPHA_TLSLDM)
+		value = 0;
+	      else
+		{
+		  BFD_ASSERT(tls_segment != NULL);
+	          value -= dtp_base;
+		}
+	      bfd_put_64 (output_bfd, value,
+			  sgot->contents + gotent->got_offset + 8);
+	    }
+
+	  value = (sgot->output_section->vma
+		   + sgot->output_offset
+		   + gotent->got_offset);
+	  value -= gp;
+	  goto default_reloc;
+
+	case R_ALPHA_DTPRELHI:
+	case R_ALPHA_DTPRELLO:
+	case R_ALPHA_DTPREL16:
+	  if (dynamic_symbol_p)
+            {
+              (*_bfd_error_handler)
+                (_("%s: dtp-relative relocation against dynamic symbol %s"),
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
+              ret_val = false;
+            }
+	  BFD_ASSERT(tls_segment != NULL);
+	  value -= dtp_base;
+	  if (r_type == R_ALPHA_DTPRELHI)
+	    value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
+	  goto default_reloc;
+
+	case R_ALPHA_TPRELHI:
+	case R_ALPHA_TPRELLO:
+	case R_ALPHA_TPREL16:
+	  if (info->shared)
+	    {
+	      (*_bfd_error_handler)
+		(_("%s: TLS local exec code cannot be linked into shared objects"),
+		bfd_archive_filename (input_bfd));
+              ret_val = false;
+	    }
+	  else if (dynamic_symbol_p)
+            {
+              (*_bfd_error_handler)
+                (_("%s: tp-relative relocation against dynamic symbol %s"),
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
+              ret_val = false;
+            }
+	  BFD_ASSERT(tls_segment != NULL);
+	  value -= tp_base;
+	  if (r_type == R_ALPHA_TPRELHI)
+	    value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
+	  goto default_reloc;
+
+	case R_ALPHA_GOTDTPREL:
+	case R_ALPHA_GOTTPREL:
+	  BFD_ASSERT(sgot != NULL);
+	  BFD_ASSERT(gp != 0);
+	  BFD_ASSERT(gotent != NULL);
+	  BFD_ASSERT(gotent->use_count >= 1);
+
+	  if (!gotent->reloc_done)
+	    {
+	      gotent->reloc_done = 1;
+
+	      if (dynamic_symbol_p)
+		value = 0;
+	      else
+		{
+		  BFD_ASSERT(tls_segment != NULL);
+		  value -= (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
+		}
+	      bfd_put_64 (output_bfd, value,
+			  sgot->contents + gotent->got_offset);
+	    }
+
+	  value = (sgot->output_section->vma
+		   + sgot->output_offset
+		   + gotent->got_offset);
+	  value -= gp;
+	  goto default_reloc;
+
 	default:
 	default_reloc:
 	  r = _bfd_final_link_relocate (howto, input_bfd, input_section,
-					contents, rel->r_offset, relocation,
-					addend);
+					contents, rel->r_offset, value, 0);
 	  break;
 	}
 
@@ -3881,20 +4985,58 @@
       srel = bfd_get_section_by_name (dynobj, ".rela.got");
       BFD_ASSERT (srel != NULL);
 
-      outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_GLOB_DAT);
       for (gotent = ((struct alpha_elf_link_hash_entry *) h)->got_entries;
 	   gotent != NULL;
 	   gotent = gotent->next)
 	{
-	  asection *sgot = alpha_elf_tdata (gotent->gotobj)->got;
+	  asection *sgot;
+	  int r_type;
+
+	  if (gotent->use_count == 0)
+	    continue;
+
+	  sgot = alpha_elf_tdata (gotent->gotobj)->got;
 	  outrel.r_offset = (sgot->output_section->vma
 			     + sgot->output_offset
 			     + gotent->got_offset);
+
+	  r_type = gotent->reloc_type;
+	  switch (r_type)
+	    {
+	    case R_ALPHA_LITERAL:
+	      r_type = R_ALPHA_GLOB_DAT;
+	      break;
+	    case R_ALPHA_TLSGD:
+	      r_type = R_ALPHA_DTPMOD64;
+	      break;
+	    case R_ALPHA_GOTDTPREL:
+	      r_type = R_ALPHA_DTPREL64;
+	      break;
+	    case R_ALPHA_GOTTPREL:
+	      r_type = R_ALPHA_TPREL64;
+	      break;
+	    case R_ALPHA_TLSLDM:
+	    default:
+	      abort ();
+	    }
+
+	  outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
 	  outrel.r_addend = gotent->addend;
 
 	  bfd_elf64_swap_reloca_out (output_bfd, &outrel,
 				     ((Elf64_External_Rela *)srel->contents
 				      + srel->reloc_count++));
+
+	  if (gotent->reloc_type == R_ALPHA_TLSGD)
+	    {
+	      outrel.r_offset += 8;
+	      outrel.r_info = ELF64_R_INFO (h->dynindx, R_ALPHA_DTPREL64);
+
+	      bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+				         ((Elf64_External_Rela *)srel->contents
+				          + srel->reloc_count++));
+	    }
+
 	  BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
 		      <= srel->_cooked_size);
 	}
@@ -4355,6 +5497,7 @@
   bfd_elf64_write_out_phdrs,
   bfd_elf64_write_shdrs_and_ehdr,
   bfd_elf64_write_relocs,
+  bfd_elf64_swap_symbol_in,
   bfd_elf64_swap_symbol_out,
   bfd_elf64_slurp_reloc_table,
   bfd_elf64_slurp_symbol_table,
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index c6ea4f4..aef822a 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -184,7 +184,7 @@
   PARAMS ((bfd *));
 
 static boolean elf64_hppa_section_from_shdr
-  PARAMS ((bfd *, Elf64_Internal_Shdr *, char *));
+  PARAMS ((bfd *, Elf64_Internal_Shdr *, const char *));
 
 static void elf64_hppa_post_process_headers
   PARAMS ((bfd *, struct bfd_link_info *));
@@ -195,6 +195,9 @@
 static boolean elf64_hppa_adjust_dynamic_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 
+static boolean elf64_hppa_mark_milli_and_exported_functions
+  PARAMS ((struct elf_link_hash_entry *, PTR));
+
 static boolean elf64_hppa_size_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 
@@ -210,6 +213,9 @@
 
 static boolean elf64_hppa_modify_segment_map PARAMS ((bfd *));
 
+static enum elf_reloc_type_class elf64_hppa_reloc_type_class
+  PARAMS ((const Elf_Internal_Rela *));
+
 static boolean elf64_hppa_finish_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 
@@ -403,7 +409,7 @@
 elf64_hppa_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf64_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   asection *newsect;
 
@@ -585,7 +591,6 @@
   struct elf64_hppa_link_hash_table *hppa_info;
   const Elf_Internal_Rela *relend;
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   const Elf_Internal_Rela *rel;
   asection *dlt, *plt, *stubs;
   char *buf;
@@ -607,15 +612,14 @@
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
 
   /* If necessary, build a new table holding section symbols indices
-     for this BFD.  This is disgusting.  */
+     for this BFD.  */
 
   if (info->shared && hppa_info->section_syms_bfd != abfd)
     {
       unsigned long i;
       unsigned int highest_shndx;
-      Elf_Internal_Sym *local_syms, *isym;
-      Elf64_External_Sym *ext_syms, *esym;
-      Elf_External_Sym_Shndx *shndx_buf, *shndx;
+      Elf_Internal_Sym *local_syms = NULL;
+      Elf_Internal_Sym *isym, *isymend;
       bfd_size_type amt;
 
       /* We're done with the old cache of section index to section symbol
@@ -626,71 +630,27 @@
       if (hppa_info->section_syms)
 	free (hppa_info->section_syms);
 
-      /* Allocate memory for the internal and external symbols.  */
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf_Internal_Sym);
-      local_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
-      if (local_syms == NULL)
-	return false;
-
-      amt = symtab_hdr->sh_info;
-      amt *= sizeof (Elf64_External_Sym);
-      ext_syms = (Elf64_External_Sym *) bfd_malloc (amt);
-      if (ext_syms == NULL)
+      /* Read this BFD's local symbols.  */
+      if (symtab_hdr->sh_info != 0)
 	{
-	  free (local_syms);
-	  return false;
+	  local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (local_syms == NULL)
+	    local_syms = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+					       symtab_hdr->sh_info, 0,
+					       NULL, NULL, NULL);
+	  if (local_syms == NULL)
+	    return false;
 	}
 
-      /* Read in the local symbols.  */
-      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-          || bfd_bread (ext_syms, amt, abfd) != amt)
-        {
-	  free (ext_syms);
-	  free (local_syms);
-	  return false;
-        }
-
-      shndx_buf = NULL;
-      shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-      if (shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    {
-	      free (ext_syms);
-	      free (local_syms);
-	      return false;
-	    }
-
-	  if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (shndx_buf, amt, abfd) != amt)
-	    {
-	      free (shndx_buf);
-	      free (ext_syms);
-	      free (local_syms);
-	      return false;
-	    }
-	}
-
-      /* Swap in the local symbols, also record the highest section index
-	 referenced by the local symbols.  */
+      /* Record the highest section index referenced by the local symbols.  */
       highest_shndx = 0;
-      for (i = 0, isym = local_syms, esym = ext_syms, shndx = shndx_buf;
-	   i < symtab_hdr->sh_info;
-	   i++, esym++, isym++, shndx = (shndx != NULL ? shndx + 1 : NULL))
+      isymend = local_syms + symtab_hdr->sh_info;
+      for (isym = local_syms; isym < isymend; isym++)
 	{
-	  bfd_elf64_swap_symbol_in (abfd, esym, shndx, isym);
 	  if (isym->st_shndx > highest_shndx)
 	    highest_shndx = isym->st_shndx;
 	}
 
-      /* Now we can free the external symbols.  */
-      free (shndx_buf);
-      free (ext_syms);
-
       /* Allocate an array to hold the section index to section symbol index
 	 mapping.  Bump by one since we start counting at zero.  */
       highest_shndx++;
@@ -700,14 +660,24 @@
 
       /* Now walk the local symbols again.  If we find a section symbol,
 	 record the index of the symbol into the section_syms array.  */
-      for (isym = local_syms, i = 0; i < symtab_hdr->sh_info; i++, isym++)
+      for (i = 0, isym = local_syms; isym < isymend; i++, isym++)
 	{
 	  if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
 	    hppa_info->section_syms[isym->st_shndx] = i;
 	}
 
-      /* We are finished with the local symbols.  Get rid of them.  */
-      free (local_syms);
+      /* We are finished with the local symbols.  */
+      if (local_syms != NULL
+	  && symtab_hdr->contents != (unsigned char *) local_syms)
+	{
+	  if (! info->keep_memory)
+	    free (local_syms);
+	  else
+	    {
+	      /* Cache the symbols for elf_link_input_bfd.  */
+	      symtab_hdr->contents = (unsigned char *) local_syms;
+	    }
+	}
 
       /* Record which BFD we built the section_syms mapping for.  */
       hppa_info->section_syms_bfd = abfd;
@@ -1072,7 +1042,7 @@
 	     table since we might need to create a dynamic relocation
 	     against it.  */
 	  if (! h
-	      || (h && h->dynindx == -1))
+	      || (h->dynindx == -1 && h->type != STT_PARISC_MILLI))
 	    {
 	      bfd *owner;
 	      owner = (h ? h->root.u.def.section->owner : dyn_h->owner);
@@ -1158,7 +1128,8 @@
 
       /* We never need an opd entry for a symbol which is not
 	 defined by this output file.  */
-      if (h && h->root.type == bfd_link_hash_undefined)
+      if (h && (h->root.type == bfd_link_hash_undefined
+		|| h->root.u.def.section->output_section == NULL))
 	dyn_h->want_opd = 0;
 
       /* If we are creating a shared library, took the address of a local
@@ -1166,10 +1137,9 @@
 	 we have to create an opd descriptor.  */
       else if (x->info->shared
 	       || h == NULL
-	       || h->dynindx == -1
-	       || ((h->root.type == bfd_link_hash_defined
-		    || h->root.type == bfd_link_hash_defweak)
-		   && h->root.u.def.section->output_section != NULL))
+	       || (h->dynindx == -1 && h->type != STT_PARISC_MILLI)
+	       || (h->root.type == bfd_link_hash_defined
+		   || h->root.type == bfd_link_hash_defweak))
 	{
 	  /* If we are creating a shared library, then we will have to
 	     create a runtime relocation for the symbol to properly
@@ -1531,22 +1501,18 @@
 
   for (rent = dyn_h->reloc_entries; rent; rent = rent->next)
     {
-      switch (rent->type)
-	{
-	case R_PARISC_FPTR64:
-	  /* Allocate one iff we are not building a shared library and
-	     !want_opd, which by this point will be true only if we're
-	     actually allocating one statically in the main executable.  */
-	  if (!x->info->shared && dyn_h->want_opd)
-	    continue;
-	  break;
-	}
+      /* Allocate one iff we are building a shared library, the relocation
+	 isn't a R_PARISC_FPTR64, or we don't want an opd entry.  */
+      if (!shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
+	continue;
+
       hppa_info->other_rel_sec->_raw_size += sizeof (Elf64_External_Rela);
 
       /* Make sure this symbol gets into the dynamic symbol table if it is
 	 not already recorded.  ?!? This should not be in the loop since
 	 the symbol need only be added once.  */
-      if (dyn_h->h == 0 || dyn_h->h->dynindx == -1)
+      if (dyn_h->h == 0
+	  || (dyn_h->h->dynindx == -1 && dyn_h->h->type != STT_PARISC_MILLI))
 	if (!_bfd_elf64_link_record_local_dynamic_symbol
 	    (x->info, rent->sec->owner, dyn_h->sym_indx))
 	  return false;
@@ -1614,6 +1580,36 @@
   return true;
 }
 
+/* This function is called via elf_link_hash_traverse to mark millicode
+   symbols with a dynindx of -1 and to remove the string table reference
+   from the dynamic symbol table.  If the symbol is not a millicode symbol,
+   elf64_hppa_mark_exported_functions is called.  */
+
+static boolean
+elf64_hppa_mark_milli_and_exported_functions (h, data)
+     struct elf_link_hash_entry *h;
+     PTR data;
+{
+  struct bfd_link_info *info = (struct bfd_link_info *)data;
+  struct elf_link_hash_entry *elf = h;
+
+  if (elf->root.type == bfd_link_hash_warning)
+    elf = (struct elf_link_hash_entry *) elf->root.u.i.link;
+
+  if (elf->type == STT_PARISC_MILLI)
+    {
+      if (elf->dynindx != -1)
+	{
+	  elf->dynindx = -1;
+	  _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+				  elf->dynstr_index);
+	}
+      return true;
+    }
+
+  return elf64_hppa_mark_exported_functions (h, data);
+}
+
 /* Set the final sizes of the dynamic sections and allocate memory for
    the contents of our special sections.  */
 
@@ -1635,6 +1631,19 @@
   dynobj = elf_hash_table (info)->dynobj;
   BFD_ASSERT (dynobj != NULL);
 
+  /* Mark each function this program exports so that we will allocate
+     space in the .opd section for each function's FPTR.  If we are
+     creating dynamic sections, change the dynamic index of millicode
+     symbols to -1 and remove them from the string table for .dynstr.
+
+     We have to traverse the main linker hash table since we have to
+     find functions which may not have been mentioned in any relocs.  */
+  elf_link_hash_traverse (elf_hash_table (info),
+			  (elf_hash_table (info)->dynamic_sections_created
+			   ? elf64_hppa_mark_milli_and_exported_functions
+			   : elf64_hppa_mark_exported_functions),
+			  info);
+
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
@@ -1679,15 +1688,6 @@
       hppa_info->stub_sec->_raw_size = data.ofs;
     }
 
-  /* Mark each function this program exports so that we will allocate
-     space in the .opd section for each function's FPTR.
-
-     We have to traverse the main linker hash table since we have to
-     find functions which may not have been mentioned in any relocs.  */
-  elf_link_hash_traverse (elf_hash_table (info),
-			  elf64_hppa_mark_exported_functions,
-			  info);
-
   /* Allocate space for entries in the .opd section.  */
   if (elf64_hppa_hash_table (info)->opd_sec)
     {
@@ -1722,10 +1722,9 @@
 
       if (strcmp (name, ".plt") == 0)
 	{
+	  /* Strip this section if we don't need it; see the comment below.  */
 	  if (s->_raw_size == 0)
 	    {
-	      /* Strip this section if we don't need it; see the
-		 comment below.  */
 	      strip = true;
 	    }
 	  else
@@ -1736,24 +1735,29 @@
 	}
       else if (strcmp (name, ".dlt") == 0)
 	{
+	  /* Strip this section if we don't need it; see the comment below.  */
 	  if (s->_raw_size == 0)
 	    {
-	      /* Strip this section if we don't need it; see the
-		 comment below.  */
 	      strip = true;
 	    }
 	}
       else if (strcmp (name, ".opd") == 0)
 	{
+	  /* Strip this section if we don't need it; see the comment below.  */
 	  if (s->_raw_size == 0)
 	    {
-	      /* Strip this section if we don't need it; see the
-		 comment below.  */
 	      strip = true;
 	    }
 	}
-      else if (strncmp (name, ".rela", 4) == 0)
+      else if (strncmp (name, ".rela", 5) == 0)
 	{
+	  /* If we don't need this section, strip it from the output file.
+	     This is mostly to handle .rela.bss and .rela.plt.  We must
+	     create both sections in create_dynamic_sections, because they
+	     must be created before the linker maps input sections to output
+	     sections.  The linker does that before adjust_dynamic_symbol
+	     is called, and it is that function which decides whether
+	     anything needs to go into these sections.  */
 	  if (s->_raw_size == 0)
 	    {
 	      /* If we don't need this section, strip it from the
@@ -1951,9 +1955,6 @@
   spltrel = hppa_info->plt_rel_sec;
   sdltrel = hppa_info->dlt_rel_sec;
 
-  BFD_ASSERT (stub != NULL && splt != NULL
-	      && sopd != NULL && sdlt != NULL)
-
   /* Incredible.  It is actually necessary to NOT use the symbol's real
      value when building the dynamic symbol table for a shared library.
      At least for symbols that refer to functions.
@@ -1963,6 +1964,8 @@
      the original values (in elf64_hppa_link_output_symbol_hook).  */
   if (dyn_h && dyn_h->want_opd)
     {
+      BFD_ASSERT (sopd != NULL)
+
       /* Save away the original value and section index so that we
 	 can restore them later.  */
       dyn_h->st_value = sym->st_value;
@@ -1984,6 +1987,8 @@
       bfd_vma value;
       Elf_Internal_Rela rel;
 
+      BFD_ASSERT (splt != NULL && spltrel != NULL)
+
       /* We do not actually care about the value in the PLT entry
 	 if we are creating a shared library and the symbol is
 	 still undefined, we create a dynamic relocation to fill
@@ -2034,6 +2039,8 @@
       int insn;
       unsigned int max_offset;
 
+      BFD_ASSERT (stub != NULL)
+
       /* Install the generic stub template.
 
 	 We are modifying the contents of the stub section, so we do not
@@ -2096,11 +2103,6 @@
 		  stub->contents + dyn_h->stub_offset + 8);
     }
 
-  /* Millicode symbols should not be put in the dynamic
-     symbol table under any circumstances.  */
-  if (ELF_ST_TYPE (sym->st_info) == STT_PARISC_MILLI)
-    h->dynindx = -1;
-
   return true;
 }
 
@@ -2114,7 +2116,7 @@
 {
   struct bfd_link_info *info = (struct bfd_link_info *)data;
   struct elf64_hppa_link_hash_table *hppa_info;
-  struct elf_link_hash_entry *h = dyn_h->h;
+  struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL;
   asection *sopd;
   asection *sopdrel;
 
@@ -2122,7 +2124,7 @@
   sopd = hppa_info->opd_sec;
   sopdrel = hppa_info->opd_rel_sec;
 
-  if (h && dyn_h && dyn_h->want_opd)
+  if (h && dyn_h->want_opd)
     {
       bfd_vma value;
 
@@ -2235,7 +2237,7 @@
   struct bfd_link_info *info = (struct bfd_link_info *)data;
   struct elf64_hppa_link_hash_table *hppa_info;
   asection *sdlt, *sdltrel;
-  struct elf_link_hash_entry *h = dyn_h->h;
+  struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL;
 
   hppa_info = elf64_hppa_hash_table (info);
 
@@ -2246,7 +2248,7 @@
      address, so there is no need to create a relocation.  Just install
      the proper value into the DLT, note this shortcut can not be
      skipped when building a shared library.  */
-  if (! info->shared && h && dyn_h && dyn_h->want_dlt)
+  if (! info->shared && h && dyn_h->want_dlt)
     {
       bfd_vma value;
 
@@ -2262,16 +2264,17 @@
 		   + hppa_info->opd_sec->output_offset
 		   + hppa_info->opd_sec->output_section->vma);
 	}
-      else
+      else if (h->root.u.def.section)
 	{
-	  value = (h->root.u.def.value
-		   + h->root.u.def.section->output_offset);
-
+	  value = h->root.u.def.value + h->root.u.def.section->output_offset;
 	  if (h->root.u.def.section->output_section)
 	    value += h->root.u.def.section->output_section->vma;
 	  else
 	    value += h->root.u.def.section->vma;
 	}
+      else
+	/* We have an undefined function reference.  */
+	value = 0;
 
       /* We do not need to include the output offset of the DLT section
 	 here because we are modifying the in-memory contents.  */
@@ -2356,16 +2359,10 @@
 	{
 	  Elf64_Internal_Rela rel;
 
-	  switch (rent->type)
-	    {
-	      case R_PARISC_FPTR64:
-	      /* Allocate one iff we are not building a shared library and
-		 !want_opd, which by this point will be true only if we're
-		 actually allocating one statically in the main executable.  */
-	      if (!info->shared && dyn_h->want_opd)
-		continue;
-	      break;
-	    }
+	  /* Allocate one iff we are building a shared library, the relocation
+	     isn't a R_PARISC_FPTR64, or we don't want an opd entry.  */
+	  if (!info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
+	    continue;
 
 	  /* Create a dynamic relocation for this entry.
 
@@ -2394,7 +2391,7 @@
 	     We use a section symbol recorded by check_relocs as the
 	     base symbol for the relocation.  The addend is the difference
 	     between the section symbol and the address of the .opd entry.  */
-	  if (info->shared && rent->type == R_PARISC_FPTR64)
+	  if (info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd)
 	    {
 	      bfd_vma value, value2;
 
@@ -2439,6 +2436,27 @@
   return true;
 }
 
+/* Used to decide how to sort relocs in an optimal manner for the
+   dynamic linker, before writing them out.  */
+
+static enum elf_reloc_type_class
+elf64_hppa_reloc_type_class (rela)
+     const Elf_Internal_Rela *rela;
+{
+  if (ELF64_R_SYM (rela->r_info) == 0)
+    return reloc_class_relative;
+
+  switch ((int) ELF64_R_TYPE (rela->r_info))
+    {
+    case R_PARISC_IPLT:
+      return reloc_class_plt;
+    case R_PARISC_COPY:
+      return reloc_class_copy;
+    default:
+      return reloc_class_normal;
+    }
+}
+
 /* Finish up the dynamic sections.  */
 
 static boolean
@@ -2522,8 +2540,10 @@
 
 	    case DT_RELA:
 	      s = hppa_info->other_rel_sec;
-	      if (! s)
+	      if (! s || ! s->_raw_size)
 		s = hppa_info->dlt_rel_sec;
+	      if (! s || ! s->_raw_size)
+		s = hppa_info->opd_rel_sec;
 	      dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
 	      bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
 	      break;
@@ -2673,6 +2693,7 @@
   bfd_elf64_write_out_phdrs,
   bfd_elf64_write_shdrs_and_ehdr,
   bfd_elf64_write_relocs,
+  bfd_elf64_swap_symbol_in,
   bfd_elf64_swap_symbol_out,
   bfd_elf64_slurp_reloc_table,
   bfd_elf64_slurp_symbol_table,
@@ -2703,7 +2724,7 @@
 #define elf_backend_fake_sections	elf_hppa_fake_sections
 #define elf_backend_add_symbol_hook	elf_hppa_add_symbol_hook
 
-#define elf_backend_relocate_section	    elf_hppa_relocate_section
+#define elf_backend_relocate_section	elf_hppa_relocate_section
 
 #define bfd_elf64_bfd_final_link	elf_hppa_final_link
 
@@ -2748,6 +2769,8 @@
 #define elf_backend_plt_header_size     0
 #define elf_backend_type_change_ok true
 #define elf_backend_get_symbol_type	     elf64_hppa_elf_get_symbol_type
+#define elf_backend_reloc_type_class	     elf64_hppa_reloc_type_class
+#define elf_backend_rela_normal		     1
 
 #include "elf64-target.h"
 
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 508c0ee..00c312c 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -34,8 +34,7 @@
  .     generally untested.
  .   - Relocation handling for RELA relocs related to GOT support are
  .     also likely to be wrong.
- .   - Support for MIPS16 is only partially implemented.
- .   - Embedded PIC  is only partially implemented (is it needed?).
+ .   - Support for MIPS16 is untested.
  .   - Combined relocs with RSS_* entries are unsupported.
  .   - The whole GOT handling for NewABI is missing, some parts of
  .     the OldABI version is still lying around and should be removed.
@@ -102,14 +101,8 @@
   PARAMS((bfd *, asection *, Elf_Internal_Shdr *, int *, PTR));
 static bfd_reloc_status_type mips_elf64_hi16_reloc
   PARAMS ((bfd *, arelent *, asymbol *,	PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_higher_reloc
-  PARAMS ((bfd *, arelent *, asymbol *,	PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_highest_reloc
-  PARAMS ((bfd *, arelent *, asymbol *,	PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type mips_elf64_gprel16_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_gprel16_reloca
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type mips_elf64_literal_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type mips_elf64_gprel32_reloc
@@ -118,22 +111,18 @@
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type mips_elf64_got16_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_jump_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_gprel_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static boolean mips_elf64_assign_gp PARAMS ((bfd *, bfd_vma *));
 static bfd_reloc_status_type mips_elf64_final_gp
   PARAMS ((bfd *, asymbol *, boolean, char **, bfd_vma *));
 static boolean mips_elf64_object_p PARAMS ((bfd *));
 static irix_compat_t elf64_mips_irix_compat PARAMS ((bfd *));
 
-extern const bfd_target bfd_elf64_tradbigmips_vec;
-extern const bfd_target bfd_elf64_tradlittlemips_vec;
-
-static bfd_vma prev_reloc_addend = 0;
-static bfd_size_type prev_reloc_address = 0;
-
-/* Whether we are trying to be compatible with IRIX6 (or little endianers
-   which are otherwise IRIX-ABI compliant).  */
-#define SGI_COMPAT(abfd) \
-  (elf64_mips_irix_compat (abfd) != ict_none)
+extern const bfd_target bfd_elf64_bigmips_vec;
+extern const bfd_target bfd_elf64_littlemips_vec;
 
 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value
    from smaller values.  Start with zero, widen, *then* decrement.  */
@@ -144,8 +133,6 @@
 
 /* The relocation table used for SHT_REL sections.  */
 
-#define UNUSED_RELOC(num) { num, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-
 static reloc_howto_type mips_elf64_howto_table_rel[] =
 {
   /* No relocation.  */
@@ -226,6 +213,9 @@
 	 0x03ffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
+  /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL.
+     However, the native IRIX6 tools use them, so we try our best. */
+
   /* High 16 bits of symbol value.  */
   HOWTO (R_MIPS_HI16,		/* type */
 	 0,			/* rightshift */
@@ -234,7 +224,7 @@
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_dont, /* complain_on_overflow */
-	 bfd_elf_generic_reloc,	/* special_function */
+	 mips_elf64_hi16_reloc,	/* special_function */
 	 "R_MIPS_HI16",		/* name */
 	 true,			/* partial_inplace */
 	 0x0000ffff,		/* src_mask */
@@ -317,7 +307,6 @@
 	 true),			/* pcrel_offset */
 
   /* 16 bit call through global offset table.  */
-  /* FIXME: This is not handled correctly.  */
   HOWTO (R_MIPS_CALL16,		/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -347,9 +336,9 @@
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  UNUSED_RELOC (13),
-  UNUSED_RELOC (14),
-  UNUSED_RELOC (15),
+  EMPTY_HOWTO (13),
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
 
   /* A 5 bit shift field.  */
   HOWTO (R_MIPS_SHIFT5,		/* type */
@@ -397,7 +386,6 @@
 	 false),		/* pcrel_offset */
 
   /* Displacement in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_DISP,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -413,7 +401,6 @@
 	 false),		/* pcrel_offset */
 
   /* Displacement to page pointer in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_PAGE,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -429,7 +416,6 @@
 	 false),		/* pcrel_offset */
 
   /* Offset from page pointer in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_OFST,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -445,7 +431,6 @@
 	 false),		/* pcrel_offset */
 
   /* High 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_HI16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -461,7 +446,6 @@
 	 false),		/* pcrel_offset */
 
   /* Low 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_LO16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -477,7 +461,6 @@
 	 false),		/* pcrel_offset */
 
   /* 64 bit substraction.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_SUB,		/* type */
 	 0,			/* rightshift */
 	 4,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -541,38 +524,16 @@
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  /* Get the higher value of a 64 bit addend.  */
-  HOWTO (R_MIPS_HIGHER,		/* type */
-	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 false,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 mips_elf64_higher_reloc, /* special_function */
-	 "R_MIPS_HIGHER",	/* name */
-	 true,			/* partial_inplace */
-	 0x0000ffff,		/* src_mask */
-	 0x0000ffff,		/* dst_mask */
-	 false),		/* pcrel_offset */
-
-  /* Get the highest value of a 64 bit addend.  */
-  HOWTO (R_MIPS_HIGHEST,	/* type */
-	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 16,			/* bitsize */
-	 false,			/* pc_relative */
-	 0,			/* bitpos */
-	 complain_overflow_dont, /* complain_on_overflow */
-	 mips_elf64_highest_reloc, /* special_function */
-	 "R_MIPS_HIGHEST",	/* name */
-	 true,			/* partial_inplace */
-	 0x0000ffff,		/* src_mask */
-	 0x0000ffff,		/* dst_mask */
-	 false),		/* pcrel_offset */
+  /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations.
+     We don't, because
+       a) It means building the addend from a R_MIPS_HIGHEST/R_MIPS_HIGHER/
+	  R_MIPS_HI16/R_MIPS_LO16 sequence with varying ordering, using
+	  fallable heuristics.
+       b) No other NewABI toolchain actually emits such relocations.  */
+  EMPTY_HOWTO (R_MIPS_HIGHER),
+  EMPTY_HOWTO (R_MIPS_HIGHEST),
 
   /* High 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_CALL_HI16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -588,7 +549,6 @@
 	 false),		/* pcrel_offset */
 
   /* Low 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_CALL_LO16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -604,7 +564,6 @@
 	 false),		/* pcrel_offset */
 
   /* Section displacement, used by an associated event location section.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_SCN_DISP,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -752,7 +711,6 @@
 	 0x03ffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for 64 bit REL.  */
   /* High 16 bits of symbol value.  */
   HOWTO (R_MIPS_HI16,		/* type */
 	 0,			/* rightshift */
@@ -791,7 +749,7 @@
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 mips_elf64_gprel16_reloca, /* special_function */
+	 mips_elf64_gprel16_reloc, /* special_function */
 	 "R_MIPS_GPREL16",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -814,7 +772,6 @@
 	 false),		/* pcrel_offset */
 
   /* Reference to global offset table.  */
-  /* FIXME: This is not handled correctly.  */
   HOWTO (R_MIPS_GOT16,		/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -822,7 +779,7 @@
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
 	 complain_overflow_signed, /* complain_on_overflow */
-	 bfd_elf_generic_reloc, /* special_function */
+	 mips_elf64_got16_reloc, /* special_function */
 	 "R_MIPS_GOT16",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -845,7 +802,6 @@
 	 true),			/* pcrel_offset */
 
   /* 16 bit call through global offset table.  */
-  /* FIXME: This is not handled correctly.  */
   HOWTO (R_MIPS_CALL16,		/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -875,9 +831,9 @@
 	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
-  UNUSED_RELOC (13),
-  UNUSED_RELOC (14),
-  UNUSED_RELOC (15),
+  EMPTY_HOWTO (13),
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
 
   /* A 5 bit shift field.  */
   HOWTO (R_MIPS_SHIFT5,		/* type */
@@ -925,7 +881,6 @@
 	 false),		/* pcrel_offset */
 
   /* Displacement in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_DISP,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -941,7 +896,6 @@
 	 false),		/* pcrel_offset */
 
   /* Displacement to page pointer in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_PAGE,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -957,7 +911,6 @@
 	 false),		/* pcrel_offset */
 
   /* Offset from page pointer in the global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_OFST,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -973,7 +926,6 @@
 	 false),		/* pcrel_offset */
 
   /* High 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_HI16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -989,7 +941,6 @@
 	 false),		/* pcrel_offset */
 
   /* Low 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_GOT_LO16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1005,7 +956,6 @@
 	 false),		/* pcrel_offset */
 
   /* 64 bit substraction.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_SUB,		/* type */
 	 0,			/* rightshift */
 	 4,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1100,7 +1050,6 @@
 	 false),		/* pcrel_offset */
 
   /* High 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_CALL_HI16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1116,7 +1065,6 @@
 	 false),		/* pcrel_offset */
 
   /* Low 16 bits of displacement in global offset table.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_CALL_LO16,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1132,7 +1080,6 @@
 	 false),		/* pcrel_offset */
 
   /* Section displacement, used by an associated event location section.  */
-  /* FIXME: Not handled correctly.  */
   HOWTO (R_MIPS_SCN_DISP,	/* type */
 	 0,			/* rightshift */
 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
@@ -1197,6 +1144,73 @@
 	 0x00000000,		/* dst_mask */
 	 false),		/* pcrel_offset */
 };
+
+/* The reloc used for the mips16 jump instruction.  */
+static reloc_howto_type elf_mips16_jump_howto =
+  HOWTO (R_MIPS16_26,		/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC.  */
+	 mips16_jump_reloc,	/* special_function */
+	 "R_MIPS16_26",		/* name */
+	 true,			/* partial_inplace */
+	 0x3ffffff,		/* src_mask */
+	 0x3ffffff,		/* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* The reloc used for the mips16 gprel instruction.  */
+static reloc_howto_type elf_mips16_gprel_howto =
+  HOWTO (R_MIPS16_GPREL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips16_gprel_reloc,	/* special_function */
+	 "R_MIPS16_GPREL",	/* name */
+	 true,			/* partial_inplace */
+	 0x07ff001f,		/* src_mask */
+	 0x07ff001f,	        /* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* GNU extension to record C++ vtable hierarchy */
+static reloc_howto_type elf_mips_gnu_vtinherit_howto =
+  HOWTO (R_MIPS_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_MIPS_GNU_VTINHERIT", /* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* GNU extension to record C++ vtable member usage */
+static reloc_howto_type elf_mips_gnu_vtentry_howto =
+  HOWTO (R_MIPS_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_MIPS_GNU_VTENTRY",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false);		/* pcrel_offset */
 
 /* Swap in a MIPS 64-bit Rel reloc.  */
 
@@ -1365,14 +1379,9 @@
 
 /* Do a R_MIPS_HI16 relocation.  */
 
-bfd_reloc_status_type
-mips_elf64_hi16_reloc (abfd,
-		     reloc_entry,
-		     symbol,
-		     data,
-		     input_section,
-		     output_bfd,
-		     error_message)
+static bfd_reloc_status_type
+mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
+		       output_bfd, error_message)
      bfd *abfd ATTRIBUTE_UNUSED;
      arelent *reloc_entry;
      asymbol *symbol;
@@ -1398,78 +1407,6 @@
   return bfd_reloc_continue;
 }
 
-/* Do a R_MIPS_HIGHER relocation.  */
-
-bfd_reloc_status_type
-mips_elf64_higher_reloc (abfd,
-			 reloc_entry,
-			 symbol,
-			 data,
-			 input_section,
-			 output_bfd,
-			 error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
-{
-  /* If we're relocating, and this is an external symbol, we don't
-     want to change anything.  */
-  if (output_bfd != (bfd *) NULL
-      && (symbol->flags & BSF_SECTION_SYM) == 0
-      && (! reloc_entry->howto->partial_inplace
-	  || reloc_entry->addend == 0))
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
-  if (((reloc_entry->addend & 0xffffffff) + 0x80008000)
-      & ~0xffffffff)
-    reloc_entry->addend += 0x80008000;
-
-  return bfd_reloc_continue;
-}
-
-/* Do a R_MIPS_HIGHEST relocation.  */
-
-bfd_reloc_status_type
-mips_elf64_highest_reloc (abfd,
-			  reloc_entry,
-			  symbol,
-			  data,
-			  input_section,
-			  output_bfd,
-			  error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
-{
-  /* If we're relocating, and this is an external symbol, we don't
-     want to change anything.  */
-  if (output_bfd != (bfd *) NULL
-      && (symbol->flags & BSF_SECTION_SYM) == 0
-      && (! reloc_entry->howto->partial_inplace
-	  || reloc_entry->addend == 0))
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
-  if (((reloc_entry->addend & 0xffffffffffff) + 0x800080008000)
-      & ~0xffffffffffff)
-    reloc_entry->addend += 0x800080008000;
-
-  return bfd_reloc_continue;
-}
-
 /* Do a R_MIPS_GOT16 reloc.  This is a reloc against the global offset
    table used for PIC code.  If the symbol is an external symbol, the
    instruction is modified to contain the offset of the appropriate
@@ -1484,14 +1421,9 @@
    This implementation suffices for the assembler, but the linker does
    not yet know how to create global offset tables.  */
 
-bfd_reloc_status_type
-mips_elf64_got16_reloc (abfd,
-		      reloc_entry,
-		      symbol,
-		      data,
-		      input_section,
-		      output_bfd,
-		      error_message)
+static bfd_reloc_status_type
+mips_elf64_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
+			output_bfd, error_message)
      bfd *abfd;
      arelent *reloc_entry;
      asymbol *symbol;
@@ -1500,24 +1432,17 @@
      bfd *output_bfd;
      char **error_message;
 {
-  /* If we're relocating, and this an external symbol, we don't want
-     to change anything.  */
-  if (output_bfd != (bfd *) NULL
-      && (symbol->flags & BSF_SECTION_SYM) == 0
-      && reloc_entry->addend == 0)
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
   /* If we're relocating, and this is a local symbol, we can handle it
-     just like HI16.  */
+     just like an R_MIPS_HI16.  */
   if (output_bfd != (bfd *) NULL
       && (symbol->flags & BSF_SECTION_SYM) != 0)
     return mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
-  abort ();
+
+  /* Otherwise we try to handle it as R_MIPS_GOT_DISP.  */
+  return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				input_section, output_bfd, error_message);
 }
 
 /* Set the GP value for OUTPUT_BFD.  Returns false if this is a
@@ -1548,7 +1473,7 @@
     {
       for (i = 0; i < count; i++, sym++)
 	{
-	  register CONST char *name;
+	  register const char *name;
 
 	  name = bfd_asymbol_name (*sym);
 	  if (*name == '_' && strcmp (name, "_gp") == 0)
@@ -1617,7 +1542,7 @@
 /* Do a R_MIPS_GPREL16 relocation.  This is a 16 bit value which must
    become the offset from the gp register.  */
 
-bfd_reloc_status_type
+static bfd_reloc_status_type
 mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
 			  output_bfd, error_message)
      bfd *abfd;
@@ -1638,7 +1563,8 @@
      file.  */
   if (output_bfd != (bfd *) NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
-      && reloc_entry->addend == 0)
+      && (! reloc_entry->howto->partial_inplace
+	  || reloc_entry->addend == 0))
     {
       reloc_entry->address += input_section->output_offset;
       return bfd_reloc_ok;
@@ -1662,63 +1588,9 @@
 					data, gp);
 }
 
-/* Do a R_MIPS_GPREL16 RELA relocation.  */
-
-bfd_reloc_status_type
-mips_elf64_gprel16_reloca (abfd, reloc_entry, symbol, data, input_section,
-			   output_bfd, error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message;
-{
-  boolean relocateable;
-  bfd_vma gp;
-
-  /* This works only for NewABI.  */
-  BFD_ASSERT (reloc_entry->howto->src_mask == 0);
-
-  /* If we're relocating, and this is an external symbol with no
-     addend, we don't want to change anything.  We will only have an
-     addend if this is a newly created reloc, not read from an ELF
-     file.  */
-  if (output_bfd != (bfd *) NULL
-      && (symbol->flags & BSF_SECTION_SYM) == 0
-      && reloc_entry->addend == 0)
-    {
-      reloc_entry->address += input_section->output_offset;
-      return bfd_reloc_ok;
-    }
-
-  if (output_bfd != (bfd *) NULL)
-    relocateable = true;
-  else
-    {
-      relocateable = false;
-      output_bfd = symbol->section->output_section->owner;
-    }
-
-  if (prev_reloc_address != reloc_entry->address)
-    prev_reloc_address = reloc_entry->address;
-  else
-    {
-      mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
-			   &gp);
-      prev_reloc_addend = reloc_entry->addend + reloc_entry->address - gp;
-      if (symbol->flags & BSF_LOCAL)
-	prev_reloc_addend += _bfd_get_gp_value (abfd);
-/*fprintf(stderr, "Addend: %lx, Next Addend: %lx\n", reloc_entry->addend, prev_reloc_addend);*/
-    }
-
-  return bfd_reloc_ok;
-}
-
 /* Do a R_MIPS_LITERAL relocation.  */
 
-bfd_reloc_status_type
+static bfd_reloc_status_type
 mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
 			  output_bfd, error_message)
      bfd *abfd;
@@ -1729,6 +1601,10 @@
      bfd *output_bfd;
      char **error_message;
 {
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+
   /* If we're relocating, and this is an external symbol, we don't
      want to change anything.  */
   if (output_bfd != (bfd *) NULL
@@ -1740,23 +1616,31 @@
       return bfd_reloc_ok;
     }
 
-  /* FIXME: The entries in the .lit8 and .lit4 sections should be merged.
-     Currently we simply call mips_elf64_gprel16_reloc.  */
-  return mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data,
-				   input_section, output_bfd, error_message);
+  /* FIXME: The entries in the .lit8 and .lit4 sections should be merged.  */
+  if (output_bfd != (bfd *) NULL)
+    relocateable = true;
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+    }
+
+  ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+			     &gp);
+  if (ret != bfd_reloc_ok)
+    return ret;
+
+  return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+					input_section, relocateable,
+					data, gp);
 }
 
-/* Do a R_MIPS_GPREL32 relocation.  Is this 32 bit value the offset
-   from the gp register? XXX */
+/* Do a R_MIPS_GPREL32 relocation.  This is a 32 bit value which must
+   become the offset from the gp register.  */
 
-bfd_reloc_status_type
-mips_elf64_gprel32_reloc (abfd,
-			reloc_entry,
-			symbol,
-			data,
-			input_section,
-			output_bfd,
-			error_message)
+static bfd_reloc_status_type
+mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
+			  output_bfd, error_message)
      bfd *abfd;
      arelent *reloc_entry;
      asymbol *symbol;
@@ -1838,9 +1722,9 @@
 }
 
 /* Do a R_MIPS_SHIFT6 relocation. The MSB of the shift is stored at bit 2,
-   the rest is at bits 6-10. The bitpos alredy got right by the howto.   */
+   the rest is at bits 6-10. The bitpos already got right by the howto.  */
 
-bfd_reloc_status_type
+static bfd_reloc_status_type
 mips_elf64_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
 			 output_bfd, error_message)
      bfd *abfd ATTRIBUTE_UNUSED;
@@ -1868,6 +1752,164 @@
   return bfd_reloc_continue;
 }
 
+/* Handle a mips16 jump.  */
+
+static bfd_reloc_status_type
+mips16_jump_reloc (abfd, reloc_entry, symbol, data, input_section,
+		   output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && (! reloc_entry->howto->partial_inplace
+	  || reloc_entry->addend == 0))
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+
+  /* FIXME.  */
+  {
+    static boolean warned;
+
+    if (! warned)
+      (*_bfd_error_handler)
+	(_("Linking mips16 objects into %s format is not supported"),
+	 bfd_get_target (input_section->output_section->owner));
+    warned = true;
+  }
+
+  return bfd_reloc_undefined;
+}
+
+/* Handle a mips16 GP relative reloc.  */
+
+static bfd_reloc_status_type
+mips16_gprel_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;
+{
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+  unsigned short extend, insn;
+  unsigned long final;
+
+  /* If we're relocating, and this is an external symbol with no
+     addend, we don't want to change anything.  We will only have an
+     addend if this is a newly created reloc, not read from an ELF
+     file.  */
+  if (output_bfd != NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && reloc_entry->addend == 0)
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+
+  if (output_bfd != NULL)
+    relocateable = true;
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+    }
+
+  ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+			     &gp);
+  if (ret != bfd_reloc_ok)
+    return ret;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  /* Pick up the mips16 extend instruction and the real instruction.  */
+  extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+  insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+
+  /* Stuff the current addend back as a 32 bit value, do the usual
+     relocation, and then clean up.  */
+  bfd_put_32 (abfd,
+	      (bfd_vma) (((extend & 0x1f) << 11)
+			 | (extend & 0x7e0)
+			 | (insn & 0x1f)),
+	      (bfd_byte *) data + reloc_entry->address);
+
+  ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+				       input_section, relocateable, data, gp);
+
+  final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+  bfd_put_16 (abfd,
+	      (bfd_vma) ((extend & 0xf800)
+			 | ((final >> 11) & 0x1f)
+			 | (final & 0x7e0)),
+	      (bfd_byte *) data + reloc_entry->address);
+  bfd_put_16 (abfd,
+	      (bfd_vma) ((insn & 0xffe0)
+			 | (final & 0x1f)),
+	      (bfd_byte *) data + reloc_entry->address + 2);
+
+  return ret;
+}
+
+/* A mapping from BFD reloc types to MIPS ELF reloc types.  */
+
+struct elf_reloc_map {
+  bfd_reloc_code_real_type bfd_val;
+  enum elf_mips_reloc_type elf_val;
+};
+
+static const struct elf_reloc_map mips_reloc_map[] =
+{
+  { BFD_RELOC_NONE, R_MIPS_NONE },
+  { BFD_RELOC_16, R_MIPS_16 },
+  { BFD_RELOC_32, R_MIPS_32 },
+  /* There is no BFD reloc for R_MIPS_REL32.  */
+  { BFD_RELOC_64, R_MIPS_64 },
+  { BFD_RELOC_CTOR, R_MIPS_64 },
+  { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+  { BFD_RELOC_HI16_S, R_MIPS_HI16 },
+  { BFD_RELOC_LO16, R_MIPS_LO16 },
+  { BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
+  { BFD_RELOC_GPREL32, R_MIPS_GPREL32 },
+  { BFD_RELOC_MIPS_JMP, R_MIPS_26 },
+  { BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL },
+  { BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 },
+  { BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 },
+  { BFD_RELOC_MIPS_SHIFT5, R_MIPS_SHIFT5 },
+  { BFD_RELOC_MIPS_SHIFT6, R_MIPS_SHIFT6 },
+  { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP },
+  { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
+  { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
+  { BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
+  { BFD_RELOC_MIPS_GOT_LO16, R_MIPS_GOT_LO16 },
+  { BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
+  { BFD_RELOC_MIPS_INSERT_A, R_MIPS_INSERT_A },
+  { BFD_RELOC_MIPS_INSERT_B, R_MIPS_INSERT_B },
+  { BFD_RELOC_MIPS_DELETE, R_MIPS_DELETE },
+  { BFD_RELOC_MIPS_HIGHEST, R_MIPS_HIGHEST },
+  { BFD_RELOC_MIPS_HIGHER, R_MIPS_HIGHER },
+  { BFD_RELOC_MIPS_CALL_HI16, R_MIPS_CALL_HI16 },
+  { BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 },
+  { BFD_RELOC_MIPS_SCN_DISP, R_MIPS_SCN_DISP },
+  { BFD_RELOC_MIPS_REL16, R_MIPS_REL16 },
+  /* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated.  */
+  { BFD_RELOC_MIPS_RELGOT, R_MIPS_RELGOT },
+  { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }
+};
+
 /* Given a BFD reloc type, return a howto structure.  */
 
 static reloc_howto_type *
@@ -1875,79 +1917,20 @@
      bfd *abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
 {
+  unsigned int i;
   /* FIXME: We default to RELA here instead of choosing the right
      relocation variant.  */
   reloc_howto_type *howto_table = mips_elf64_howto_table_rela;
 
+  for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
+       i++)
+    {
+      if (mips_reloc_map[i].bfd_val == code)
+	return &howto_table[(int) mips_reloc_map[i].elf_val];
+    }
+
   switch (code)
     {
-    case BFD_RELOC_NONE:
-      return &howto_table[R_MIPS_NONE];
-    case BFD_RELOC_16:
-      return &howto_table[R_MIPS_16];
-    case BFD_RELOC_32:
-      return &howto_table[R_MIPS_32];
-    case BFD_RELOC_64:
-    case BFD_RELOC_CTOR:
-      return &howto_table[R_MIPS_64];
-    case BFD_RELOC_16_PCREL:
-      return &howto_table[R_MIPS_PC16];
-    case BFD_RELOC_HI16_S:
-      return &howto_table[R_MIPS_HI16];
-    case BFD_RELOC_LO16:
-      return &howto_table[R_MIPS_LO16];
-    case BFD_RELOC_GPREL16:
-      return &howto_table[R_MIPS_GPREL16];
-    case BFD_RELOC_GPREL32:
-      return &howto_table[R_MIPS_GPREL32];
-    case BFD_RELOC_MIPS_JMP:
-      return &howto_table[R_MIPS_26];
-    case BFD_RELOC_MIPS_LITERAL:
-      return &howto_table[R_MIPS_LITERAL];
-    case BFD_RELOC_MIPS_GOT16:
-      return &howto_table[R_MIPS_GOT16];
-    case BFD_RELOC_MIPS_CALL16:
-      return &howto_table[R_MIPS_CALL16];
-    case BFD_RELOC_MIPS_SHIFT5:
-      return &howto_table[R_MIPS_SHIFT5];
-    case BFD_RELOC_MIPS_SHIFT6:
-      return &howto_table[R_MIPS_SHIFT6];
-    case BFD_RELOC_MIPS_GOT_DISP:
-      return &howto_table[R_MIPS_GOT_DISP];
-    case BFD_RELOC_MIPS_GOT_PAGE:
-      return &howto_table[R_MIPS_GOT_PAGE];
-    case BFD_RELOC_MIPS_GOT_OFST:
-      return &howto_table[R_MIPS_GOT_OFST];
-    case BFD_RELOC_MIPS_GOT_HI16:
-      return &howto_table[R_MIPS_GOT_HI16];
-    case BFD_RELOC_MIPS_GOT_LO16:
-      return &howto_table[R_MIPS_GOT_LO16];
-    case BFD_RELOC_MIPS_SUB:
-      return &howto_table[R_MIPS_SUB];
-    case BFD_RELOC_MIPS_INSERT_A:
-      return &howto_table[R_MIPS_INSERT_A];
-    case BFD_RELOC_MIPS_INSERT_B:
-      return &howto_table[R_MIPS_INSERT_B];
-    case BFD_RELOC_MIPS_DELETE:
-      return &howto_table[R_MIPS_DELETE];
-    case BFD_RELOC_MIPS_HIGHEST:
-      return &howto_table[R_MIPS_HIGHEST];
-    case BFD_RELOC_MIPS_HIGHER:
-      return &howto_table[R_MIPS_HIGHER];
-    case BFD_RELOC_MIPS_CALL_HI16:
-      return &howto_table[R_MIPS_CALL_HI16];
-    case BFD_RELOC_MIPS_CALL_LO16:
-      return &howto_table[R_MIPS_CALL_LO16];
-    case BFD_RELOC_MIPS_SCN_DISP:
-      return &howto_table[R_MIPS_SCN_DISP];
-    case BFD_RELOC_MIPS_REL16:
-      return &howto_table[R_MIPS_REL16];
-    /* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated.  */
-    case BFD_RELOC_MIPS_RELGOT:
-      return &howto_table[R_MIPS_RELGOT];
-    case BFD_RELOC_MIPS_JALR:
-      return &howto_table[R_MIPS_JALR];
-/*
     case BFD_RELOC_MIPS16_JMP:
       return &elf_mips16_jump_howto;
     case BFD_RELOC_MIPS16_GPREL:
@@ -1956,17 +1939,6 @@
       return &elf_mips_gnu_vtinherit_howto;
     case BFD_RELOC_VTABLE_ENTRY:
       return &elf_mips_gnu_vtentry_howto;
-    case BFD_RELOC_PCREL_HI16_S:
-      return &elf_mips_gnu_rel_hi16;
-    case BFD_RELOC_PCREL_LO16:
-      return &elf_mips_gnu_rel_lo16;
-    case BFD_RELOC_16_PCREL_S2:
-      return &elf_mips_gnu_rel16_s2;
-    case BFD_RELOC_64_PCREL:
-      return &elf_mips_gnu_pcrel64;
-    case BFD_RELOC_32_PCREL:
-      return &elf_mips_gnu_pcrel32;
-*/
     default:
       bfd_set_error (bfd_error_bad_value);
       return NULL;
@@ -1982,36 +1954,14 @@
 {
   switch (r_type)
     {
-/*
     case R_MIPS16_26:
       return &elf_mips16_jump_howto;
-      break;
     case R_MIPS16_GPREL:
       return &elf_mips16_gprel_howto;
-      break;
     case R_MIPS_GNU_VTINHERIT:
       return &elf_mips_gnu_vtinherit_howto;
-      break;
     case R_MIPS_GNU_VTENTRY:
       return &elf_mips_gnu_vtentry_howto;
-      break;
-    case R_MIPS_GNU_REL_HI16:
-      return &elf_mips_gnu_rel_hi16;
-      break;
-    case R_MIPS_GNU_REL_LO16:
-      return &elf_mips_gnu_rel_lo16;
-      break;
-    case R_MIPS_GNU_REL16_S2:
-      return &elf_mips_gnu_rel16_s2;
-      break;
-    case R_MIPS_PC64:
-      return &elf_mips_gnu_pcrel64;
-      break;
-    case R_MIPS_PC32:
-      return &elf_mips_gnu_pcrel32;
-      break;
-*/
-
     default:
       BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
       if (rela_p)
@@ -2579,7 +2529,7 @@
   /* Irix 6 is broken.  Object file symbol tables are not always
      sorted correctly such that local symbols precede global symbols,
      and the sh_info field in the symbol table is not always right.  */
-  if (SGI_COMPAT(abfd))
+  if (elf64_mips_irix_compat (abfd) != ict_none)
     elf_bad_symtab (abfd) = true;
 
   mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags);
@@ -2593,11 +2543,11 @@
 elf64_mips_irix_compat (abfd)
      bfd *abfd;
 {
-  if ((abfd->xvec == &bfd_elf64_tradbigmips_vec)
-      || (abfd->xvec == &bfd_elf64_tradlittlemips_vec))
-    return ict_none;
-  else
+  if ((abfd->xvec == &bfd_elf64_bigmips_vec)
+      || (abfd->xvec == &bfd_elf64_littlemips_vec))
     return ict_irix6;
+  else
+    return ict_none;
 }
 
 /* ECOFF swapping routines.  These are used when dealing with the
@@ -2666,6 +2616,7 @@
   bfd_elf64_write_out_phdrs,
   bfd_elf64_write_shdrs_and_ehdr,
   mips_elf64_write_relocs,
+  bfd_elf64_swap_symbol_in,
   bfd_elf64_swap_symbol_out,
   mips_elf64_slurp_reloc_table,
   bfd_elf64_slurp_symbol_table,
@@ -2680,6 +2631,9 @@
 #define ELF_ARCH			bfd_arch_mips
 #define ELF_MACHINE_CODE		EM_MIPS
 
+/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
+   a value of 0x1000, and we are compatible.
+   FIXME: How does this affect NewABI?  */
 #define ELF_MAXPAGESIZE			0x1000
 
 #define elf_backend_collect		true
@@ -2719,6 +2673,8 @@
 #define elf_backend_gc_mark_hook	_bfd_mips_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook	_bfd_mips_elf_gc_sweep_hook
 #define elf_backend_hide_symbol		_bfd_mips_elf_hide_symbol
+#define elf_backend_ignore_discarded_relocs \
+					_bfd_mips_elf_ignore_discarded_relocs
 #define elf_backend_mips_irix_compat	elf64_mips_irix_compat
 #define elf_backend_mips_rtype_to_howto	mips_elf64_rtype_to_howto
 #define elf_backend_ecoff_debug_swap	&mips_elf64_ecoff_debug_swap
@@ -2733,6 +2689,10 @@
 #define elf_backend_may_use_rela_p	1
 #define elf_backend_default_use_rela_p	1
 
+#define elf_backend_ignore_discarded_relocs \
+					_bfd_mips_elf_ignore_discarded_relocs
+#define elf_backend_write_section	_bfd_mips_elf_write_section
+
 /* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
    MIPS-specific function only applies to IRIX5, which had no 64-bit
    ABI.  */
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 96146ed..8b76f34 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -148,7 +148,7 @@
 	   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 
 static asection * mmix_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 static boolean mmix_elf_gc_sweep_hook
@@ -943,7 +943,7 @@
 	  value += addr;
 	  break;
 	}
-      /* FALLTHROUGH. */
+      /* FALLTHROUGH.  */
     case R_MMIX_ADDR19:
     case R_MMIX_ADDR27:
       /* These must be in range, or else we emit an error.  */
@@ -1524,8 +1524,8 @@
    relocation.  */
 
 static asection *
-mmix_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+mmix_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -1555,9 +1555,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -2226,8 +2224,12 @@
   if (r1->value != r2->value)
     return r1->value > r2->value ? 1 : -1;
 
-  /* As a last re-sort, use the address so we get a stable sort.  */
-  return r1 > r2 ? 1 : (r1 < r2 ? -1 : 0);
+  /* As a last re-sort, use the relocation number, so we get a stable
+     sort.  The *addresses* aren't stable since items are swapped during
+     sorting.  It depends on the qsort implementation if this actually
+     happens.  */
+  return r1->bpo_reloc_no > r2->bpo_reloc_no
+    ? 1 : (r1->bpo_reloc_no < r2->bpo_reloc_no ? -1 : 0);
 }
 
 /* For debug use only.  Dumps the global register allocations resulting
@@ -2303,9 +2305,7 @@
      boolean *again;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   asection *bpo_gregs_section = NULL;
   struct bpo_greg_section_info *gregdata;
@@ -2314,9 +2314,7 @@
     elf_section_data (sec)->tdata;
   size_t bpono;
   bfd *bpo_greg_owner;
-  Elf64_External_Sym *extsyms = NULL;
-  Elf64_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* Assume nothing changes.  */
   *again = false;
@@ -2339,7 +2337,6 @@
     return true;
 
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
 
   bpo_greg_owner = (bfd *) link_info->base_file;
   bpo_gregs_section = bpodata->bpo_greg_section;
@@ -2355,8 +2352,6 @@
 				   link_info->keep_memory);
   if (internal_relocs == NULL)
     goto error_return;
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
 
   /* Walk through them looking for relaxing opportunities.  */
   irelend = internal_relocs + sec->reloc_count;
@@ -2367,69 +2362,35 @@
       if (ELF64_R_TYPE (irel->r_info) != (int) R_MMIX_BASE_PLUS_OFFSET)
 	continue;
 
-      /* Read this BFD's symbols if we haven't done so already.  */
-      if (extsyms == NULL)
-	{
-	  /* Get cached copy if it exists.  */
-	  if (symtab_hdr->contents != NULL)
-	    extsyms = (Elf64_External_Sym *) symtab_hdr->contents;
-	  else
-	    {
-	      /* Go get them off disk.  */
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf64_External_Sym);
-	      extsyms = (Elf64_External_Sym *) bfd_malloc (amt);
-	      if (extsyms == NULL)
-		goto error_return;
-	      free_extsyms = extsyms;
-	      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) extsyms, amt, abfd) != amt)
-		goto error_return;
-	      symtab_hdr->contents = (bfd_byte *) extsyms;
-	    }
-
-	  /* If >64k sections, this presumable happens.  No test-case.  */
-	  if (shndx_hdr->sh_size != 0)
-	    {
-	      bfd_size_type amt;
-
-	      amt = symtab_hdr->sh_info;
-	      amt *= sizeof (Elf_External_Sym_Shndx);
-	      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	      if (shndx_buf == NULL)
-		goto error_return;
-	      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-		goto error_return;
-	      shndx_hdr->contents = (bfd_byte *) shndx_buf;
-	    }
-	}
-
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
 	  /* A local symbol.  */
-	  Elf64_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-	  Elf_Internal_Sym isym;
+	  Elf_Internal_Sym *isym;
 	  asection *sym_sec;
 
-	  esym = extsyms + ELF64_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf
-			       ? ELF64_R_SYM (irel->r_info) : 0);
-	  bfd_elf64_swap_symbol_in (abfd, esym, shndx, &isym);
+	  /* Read this BFD's local symbols if we haven't already.  */
+	  if (isymbuf == NULL)
+	    {
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == 0)
+		goto error_return;
+	    }
 
-	  if (isym.st_shndx == SHN_UNDEF)
+	  isym = isymbuf + ELF64_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
 	    sym_sec = bfd_und_section_ptr;
-	  else if (isym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    sym_sec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    sym_sec = bfd_com_section_ptr;
 	  else
-	    sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-	  symval = (isym.st_value
+	    sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+	  symval = (isym->st_value
 		    + sym_sec->output_section->vma
 		    + sym_sec->output_offset);
 	}
@@ -2526,40 +2487,29 @@
       bpo_gregs_section->_cooked_size = (regindex + 1) * 8;
     }
 
-  if (free_relocs != NULL)
-    free (free_relocs);
-
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-
-  if (free_extsyms != NULL)
+  if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
     {
       if (! link_info->keep_memory)
+	free (isymbuf);
+      else
 	{
-	  symtab_hdr->contents = NULL;
-	  free (free_extsyms);
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
 	}
     }
 
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
+
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (shndx_buf != NULL)
-    {
-      shndx_hdr->contents = NULL;
-      free (shndx_buf);
-    }
-  if (free_extsyms != NULL)
-    {
-      symtab_hdr->contents = NULL;
-      free (free_extsyms);
-    }
-
+  if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
+    free (isymbuf);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   return false;
 }
 
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index b703ab6..d9f8626 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -30,9 +30,6 @@
 #include "elf/ppc.h"
 #include "elf64-ppc.h"
 
-#define USE_RELA		/* we want RELA relocations, not REL.  */
-
-
 static void ppc_howto_init
   PARAMS ((void));
 static reloc_howto_type *ppc64_elf_reloc_type_lookup
@@ -55,12 +52,10 @@
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type ppc64_elf_unhandled_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static boolean ppc64_elf_set_private_flags
-  PARAMS ((bfd *, flagword));
+static boolean ppc64_elf_object_p
+  PARAMS ((bfd *));
 static boolean ppc64_elf_merge_private_bfd_data
   PARAMS ((bfd *, bfd *));
-static boolean ppc64_elf_section_from_shdr
-  PARAMS ((bfd *, Elf64_Internal_Shdr *, char *));
 
 
 /* The name of the dynamic interpreter.  This is put in the .interp
@@ -106,7 +101,7 @@
 #define CROR_151515	0x4def7b82
 #define CROR_313131	0x4ffffb82
 
-/* .glink entries for the first 32k functions are two instructions. */
+/* .glink entries for the first 32k functions are two instructions.  */
 #define LI_R0_0		0x38000000	/* li    %r0,0		*/
 #define B_DOT		0x48000000	/* b     .		*/
 
@@ -123,12 +118,13 @@
 /* Since .opd is an array of descriptors and each entry will end up
    with identical R_PPC64_RELATIVE relocs, there is really no need to
    propagate .opd relocs;  The dynamic linker should be taught to
-   relocate .opd without reloc entries.  FIXME: .opd should be trimmed
-   of unused values.  */
+   relocate .opd without reloc entries.  */
 #ifndef NO_OPD_RELOCS
 #define NO_OPD_RELOCS 0
 #endif
 
+#define ONES(n) (((bfd_vma) 1 << ((n) - 1) << 1) - 1)
+ 
 /* Relocation HOWTO's.  */
 static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC_max];
 
@@ -136,11 +132,11 @@
   /* This reloc does nothing.  */
   HOWTO (R_PPC64_NONE,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 32,			/* bitsize */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 8,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
+	 complain_overflow_dont, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_PPC64_NONE",	/* name */
 	 false,			/* partial_inplace */
@@ -176,7 +172,7 @@
 	 "R_PPC64_ADDR24",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x3fffffc,		/* dst_mask */
+	 0x03fffffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* A standard 16 bit relocation.  */
@@ -253,7 +249,7 @@
 	 "R_PPC64_ADDR14",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* An absolute 16 bit branch, for which bit 10 should be set to
@@ -270,7 +266,7 @@
 	 "R_PPC64_ADDR14_BRTAKEN",/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* An absolute 16 bit branch, for which bit 10 should be set to
@@ -287,7 +283,7 @@
 	 "R_PPC64_ADDR14_BRNTAKEN",/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* A relative 26 bit branch; the lower two bits must be zero.  */
@@ -302,7 +298,7 @@
 	 "R_PPC64_REL24",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0x3fffffc,		/* dst_mask */
+	 0x03fffffc,		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* A relative 16 bit branch; the lower two bits must be zero.  */
@@ -317,7 +313,7 @@
 	 "R_PPC64_REL14",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* A relative 16 bit branch.  Bit 10 should be set to indicate that
@@ -334,7 +330,7 @@
 	 "R_PPC64_REL14_BRTAKEN", /* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* A relative 16 bit branch.  Bit 10 should be set to indicate that
@@ -351,7 +347,7 @@
 	 "R_PPC64_REL14_BRNTAKEN",/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xfffc,		/* dst_mask */
+	 0x0000fffc,		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* Like R_PPC64_ADDR16, but referring to the GOT table entry for the
@@ -425,12 +421,12 @@
      run has to have the data at some particular address.  */
   HOWTO (R_PPC64_COPY,		/* type */
 	 0,			/* rightshift */
-	 2,			/* size (0 = byte, 1 = short, 2 = long) */
-	 32,			/* bitsize */
+	 0,			/* this one is variable size */
+	 0,			/* bitsize */
 	 false,			/* pc_relative */
 	 0,			/* bitpos */
-	 complain_overflow_bitfield, /* complain_on_overflow */
-	 ppc64_elf_unhandled_reloc,  /* special_function */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 ppc64_elf_unhandled_reloc, /* special_function */
 	 "R_PPC64_COPY",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
@@ -450,7 +446,7 @@
 	 "R_PPC64_GLOB_DAT",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Created by the link editor.  Marks a procedure linkage table
@@ -483,7 +479,7 @@
 	 "R_PPC64_RELATIVE",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Like R_PPC64_ADDR32, but may be unaligned.  */
@@ -523,7 +519,7 @@
 	 32,			/* bitsize */
 	 true,			/* pc_relative */
 	 0,			/* bitpos */
-	 /* FIXME: Verify.  Was complain_overflow_bitfield. */
+	 /* FIXME: Verify.  Was complain_overflow_bitfield.  */
 	 complain_overflow_signed, /* complain_on_overflow */
 	 bfd_elf_generic_reloc,	/* special_function */
 	 "R_PPC64_REL32",	/* name */
@@ -544,7 +540,7 @@
 	 "R_PPC64_PLT32",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0,			/* dst_mask */
+	 0xffffffff,		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* 32-bit PC relative relocation to the symbol's procedure linkage table.
@@ -560,7 +556,7 @@
 	 "R_PPC64_PLTREL32",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0,			/* dst_mask */
+	 0xffffffff,		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* Like R_PPC64_ADDR16_LO, but referring to the PLT table entry for
@@ -701,7 +697,7 @@
 	 "R_PPC64_ADDR64",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* The bits 32-47 of an address.  */
@@ -778,7 +774,7 @@
 	 "R_PPC64_UADDR64",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* 64-bit relative relocation.  */
@@ -793,10 +789,10 @@
 	 "R_PPC64_REL64",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 true),			/* pcrel_offset */
 
-  /* 64-bit relocation to the symbol's procedure linkage table. */
+  /* 64-bit relocation to the symbol's procedure linkage table.  */
   HOWTO (R_PPC64_PLT64,		/* type */
 	 0,			/* rightshift */
 	 4,			/* size (0=byte, 1=short, 2=long, 4=64 bits) */
@@ -808,7 +804,7 @@
 	 "R_PPC64_PLT64",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0,			/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* 64-bit PC relative relocation to the symbol's procedure linkage
@@ -825,7 +821,7 @@
 	 "R_PPC64_PLTREL64",	/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0,			/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 true),			/* pcrel_offset */
 
   /* 16 bit TOC-relative relocation.  */
@@ -912,7 +908,7 @@
 	 "R_PPC64_TOC",		/* name */
 	 false,			/* partial_inplace */
 	 0,			/* src_mask */
-	 0xffffffffffffffff,	/* dst_mask */
+	 ONES (64),		/* dst_mask */
 	 false),		/* pcrel_offset */
 
   /* Like R_PPC64_GOT16, but also informs the link editor that the
@@ -1386,7 +1382,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   /* Adjust the addend for sign extension of the low 16 bits.
@@ -1417,7 +1413,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   octets = reloc_entry->address * bfd_octets_per_byte (abfd);
@@ -1426,7 +1422,7 @@
   r_type = (enum elf_ppc_reloc_type) reloc_entry->howto->type;
   if (r_type == R_PPC64_ADDR14_BRTAKEN
       || r_type == R_PPC64_REL14_BRTAKEN)
-    insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
+    insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field.  */
 
   if (is_power4)
     {
@@ -1478,7 +1474,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   /* Subtract the symbol section base address.  */
@@ -1501,7 +1497,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   /* Subtract the symbol section base address.  */
@@ -1529,7 +1525,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
@@ -1558,7 +1554,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
@@ -1591,7 +1587,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   TOCstart = _bfd_get_gp_value (input_section->output_section->owner);
@@ -1618,7 +1614,7 @@
      call the generic function.  Any adjustment will be done at final
      link time.  */
   if (output_bfd != NULL)
-    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,	
+    return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
 				  input_section, output_bfd, error_message);
 
   if (error_message != NULL)
@@ -1631,32 +1627,35 @@
   return bfd_reloc_dangerous;
 }
 
-/* Function to set whether a module needs the -mrelocatable bit set.  */
+/* Fix bad default arch selected for a 64 bit input bfd when the
+   default is 32 bit.  */
 
 static boolean
-ppc64_elf_set_private_flags (abfd, flags)
+ppc64_elf_object_p (abfd)
      bfd *abfd;
-     flagword flags;
 {
-  BFD_ASSERT (!elf_flags_init (abfd)
-	      || elf_elfheader (abfd)->e_flags == flags);
+  if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 32)
+    {
+      Elf_Internal_Ehdr *i_ehdr = elf_elfheader (abfd);
 
-  elf_elfheader (abfd)->e_flags = flags;
-  elf_flags_init (abfd) = true;
+      if (i_ehdr->e_ident[EI_CLASS] == ELFCLASS64)
+	{
+	  /* Relies on arch after 32 bit default being 64 bit default.  */
+	  abfd->arch_info = abfd->arch_info->next;
+	  BFD_ASSERT (abfd->arch_info->bits_per_word == 64);
+	}
+    }
   return true;
 }
 
 /* Merge backend specific data from an object file to the output
    object file when linking.  */
+
 static boolean
 ppc64_elf_merge_private_bfd_data (ibfd, obfd)
      bfd *ibfd;
      bfd *obfd;
 {
-  flagword old_flags;
-  flagword new_flags;
-  boolean error;
-
   /* Check if we have the same endianess.  */
   if (ibfd->xvec->byteorder != obfd->xvec->byteorder
       && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
@@ -1674,106 +1673,6 @@
       return false;
     }
 
-  if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
-      || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
-    return true;
-
-  new_flags = elf_elfheader (ibfd)->e_flags;
-  old_flags = elf_elfheader (obfd)->e_flags;
-  if (!elf_flags_init (obfd))
-    {
-      /* First call, no flags set.  */
-      elf_flags_init (obfd) = true;
-      elf_elfheader (obfd)->e_flags = new_flags;
-    }
-
-  else if (new_flags == old_flags)
-    /* Compatible flags are ok.  */
-    ;
-
-  else
-    {
-      /* Incompatible flags.  Warn about -mrelocatable mismatch.
-	 Allow -mrelocatable-lib to be linked with either.  */
-      error = false;
-      if ((new_flags & EF_PPC_RELOCATABLE) != 0
-	  && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0)
-	{
-	  error = true;
-	  (*_bfd_error_handler)
-	    (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
-	     bfd_archive_filename (ibfd));
-	}
-      else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
-	       && (old_flags & EF_PPC_RELOCATABLE) != 0)
-	{
-	  error = true;
-	  (*_bfd_error_handler)
-	    (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
-	     bfd_archive_filename (ibfd));
-	}
-
-      /* The output is -mrelocatable-lib iff both the input files are.  */
-      if (! (new_flags & EF_PPC_RELOCATABLE_LIB))
-	elf_elfheader (obfd)->e_flags &= ~EF_PPC_RELOCATABLE_LIB;
-
-      /* The output is -mrelocatable iff it can't be -mrelocatable-lib,
-         but each input file is either -mrelocatable or -mrelocatable-lib.  */
-      if (! (elf_elfheader (obfd)->e_flags & EF_PPC_RELOCATABLE_LIB)
-	  && (new_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE))
-	  && (old_flags & (EF_PPC_RELOCATABLE_LIB | EF_PPC_RELOCATABLE)))
-	elf_elfheader (obfd)->e_flags |= EF_PPC_RELOCATABLE;
-
-      /* Do not warn about eabi vs. V.4 mismatch, just or in the bit
-	 if any module uses it.  */
-      elf_elfheader (obfd)->e_flags |= (new_flags & EF_PPC_EMB);
-
-      new_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
-      old_flags &= ~(EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB | EF_PPC_EMB);
-
-      /* Warn about any other mismatches.  */
-      if (new_flags != old_flags)
-	{
-	  error = true;
-	  (*_bfd_error_handler)
-	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	     bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
-	}
-
-      if (error)
-	{
-	  bfd_set_error (bfd_error_bad_value);
-	  return false;
-	}
-    }
-
-  return true;
-}
-
-/* Handle a PowerPC specific section when reading an object file.  This
-   is called when elfcode.h finds a section with an unknown type.  */
-
-static boolean
-ppc64_elf_section_from_shdr (abfd, hdr, name)
-     bfd *abfd;
-     Elf64_Internal_Shdr *hdr;
-     char *name;
-{
-  asection *newsect;
-  flagword flags;
-
-  if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
-    return false;
-
-  newsect = hdr->bfd_section;
-  flags = bfd_get_section_flags (abfd, newsect);
-  if (hdr->sh_flags & SHF_EXCLUDE)
-    flags |= SEC_EXCLUDE;
-
-  if (hdr->sh_type == SHT_ORDERED)
-    flags |= SEC_SORT_ENTRIES;
-
-  bfd_set_section_flags (abfd, newsect, flags);
   return true;
 }
 
@@ -1964,6 +1863,7 @@
   /* Flag function code and descriptor symbols.  */
   unsigned int is_func:1;
   unsigned int is_func_descriptor:1;
+  unsigned int is_entry:1;
 };
 
 /* ppc64 ELF linker hash table.  */
@@ -1995,10 +1895,8 @@
   } *stub_group;
 
   /* Assorted information used by ppc64_elf_size_stubs.  */
-  unsigned int bfd_count;
   int top_index;
   asection **input_list;
-  Elf_Internal_Sym **all_local_syms;
 
   /* Short-cuts to get to dynamic linker sections.  */
   asection *sgot;
@@ -2054,16 +1952,17 @@
 static boolean ppc64_elf_create_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 static void ppc64_elf_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static boolean ppc64_elf_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection * ppc64_elf_gc_mark_hook
-  PARAMS ((bfd *abfd, struct bfd_link_info *info, Elf_Internal_Rela *rel,
-	   struct elf_link_hash_entry *h, Elf_Internal_Sym *sym));
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean ppc64_elf_gc_sweep_hook
-  PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec,
-	   const Elf_Internal_Rela *relocs));
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+	   const Elf_Internal_Rela *));
 static boolean func_desc_adjust
   PARAMS ((struct elf_link_hash_entry *, PTR));
 static boolean ppc64_elf_func_desc_adjust
@@ -2072,6 +1971,8 @@
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 static void ppc64_elf_hide_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+static boolean edit_opd
+  PARAMS ((bfd *, struct bfd_link_info *));
 static boolean allocate_dynrelocs
   PARAMS ((struct elf_link_hash_entry *, PTR));
 static boolean readonly_dynrelocs
@@ -2091,10 +1992,6 @@
   PARAMS ((struct bfd_hash_entry *, PTR));
 static void group_sections
   PARAMS ((struct ppc_link_hash_table *, bfd_size_type, boolean));
-static boolean get_local_syms
-  PARAMS ((bfd *, struct ppc_link_hash_table *));
-static boolean ppc64_elf_fake_sections
-  PARAMS ((bfd *, Elf64_Internal_Shdr *, asection *));
 static boolean ppc64_elf_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *info, bfd *, asection *, bfd_byte *,
 	   Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms,
@@ -2215,6 +2112,7 @@
       eh->oh = NULL;
       eh->is_func = 0;
       eh->is_func_descriptor = 0;
+      eh->is_entry = 0;
     }
 
   return entry;
@@ -2395,16 +2293,18 @@
       stub_sec = htab->stub_group[link_sec->id].stub_sec;
       if (stub_sec == NULL)
 	{
+	  size_t namelen;
 	  bfd_size_type len;
 	  char *s_name;
 
-	  len = strlen (link_sec->name) + sizeof (STUB_SUFFIX);
+	  namelen = strlen (link_sec->name);
+	  len = namelen + sizeof (STUB_SUFFIX);
 	  s_name = bfd_alloc (htab->stub_bfd, len);
 	  if (s_name == NULL)
 	    return NULL;
 
-	  strcpy (s_name, link_sec->name);
-	  strcpy (s_name + len - sizeof (STUB_SUFFIX), STUB_SUFFIX);
+	  memcpy (s_name, link_sec->name, namelen);
+	  memcpy (s_name + namelen, STUB_SUFFIX, sizeof (STUB_SUFFIX));
 	  stub_sec = (*htab->add_stub_section) (s_name, link_sec);
 	  if (stub_sec == NULL)
 	    return NULL;
@@ -2471,7 +2371,7 @@
     {
       flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
 	       | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
-      htab->srelbrlt = bfd_make_section (dynobj, ".rela.branch_lt");
+      htab->srelbrlt = bfd_make_section_anyway (dynobj, ".rela.branch_lt");
       if (!htab->srelbrlt
 	  || ! bfd_set_section_flags (dynobj, htab->srelbrlt, flags)
 	  || ! bfd_set_section_alignment (dynobj, htab->srelbrlt, 3))
@@ -2541,7 +2441,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-ppc64_elf_copy_indirect_symbol (dir, ind)
+ppc64_elf_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct ppc_link_hash_entry *edir, *eind;
@@ -2585,8 +2486,31 @@
 
   edir->is_func |= eind->is_func;
   edir->is_func_descriptor |= eind->is_func_descriptor;
+  edir->is_entry |= eind->is_entry;
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+}
+
+/* Set a flag, used by ppc64_elf_gc_mark_hook, on the entry symbol and
+   symbols undefined on the command-line.  */
+
+boolean
+ppc64_elf_mark_entry_syms (info)
+     struct bfd_link_info *info;
+{
+  struct ppc_link_hash_table *htab;
+  struct bfd_sym_chain *sym;
+
+  htab = ppc_hash_table (info);
+  for (sym = info->gc_sym_list; sym; sym = sym->next)
+    {
+      struct elf_link_hash_entry *h;
+
+      h = elf_link_hash_lookup (&htab->elf, sym->name, false, false, false);
+      if (h != NULL)
+	((struct ppc_link_hash_entry *) h)->is_entry = 1;
+    }
+  return true;
 }
 
 /* Look through the relocs for a section during the first phase, and
@@ -2606,7 +2530,7 @@
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
   asection *sreloc;
-  boolean is_opd;
+  asection **opd_sym_map;
 
   if (info->relocateable)
     return true;
@@ -2616,12 +2540,34 @@
 
   sym_hashes = elf_sym_hashes (abfd);
   sym_hashes_end = (sym_hashes
-		    + symtab_hdr->sh_size / sizeof (Elf64_External_Sym));
-  if (!elf_bad_symtab (abfd))
-    sym_hashes_end -= symtab_hdr->sh_info;
+		    + symtab_hdr->sh_size / sizeof (Elf64_External_Sym)
+		    - symtab_hdr->sh_info);
 
   sreloc = NULL;
-  is_opd = strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0;
+  opd_sym_map = NULL;
+  if (strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0)
+    {
+      /* Garbage collection needs some extra help with .opd sections.
+	 We don't want to necessarily keep everything referenced by
+	 relocs in .opd, as that would keep all functions.  Instead,
+	 if we reference an .opd symbol (a function descriptor), we
+	 want to keep the function code symbol's section.  This is
+	 easy for global symbols, but for local syms we need to keep
+	 information about the associated function section.  Later, if
+	 edit_opd deletes entries, we'll use this array to adjust
+	 local syms in .opd.  */
+      union opd_info {
+	asection *func_section;
+	long entry_adjust;
+      };
+      bfd_size_type amt;
+
+      amt = sec->_raw_size * sizeof (union opd_info) / 24;
+      opd_sym_map = (asection **) bfd_zalloc (abfd, amt);
+      if (opd_sym_map == NULL)
+	return false;
+      elf_section_data (sec)->tdata = opd_sym_map;
+    }
 
   if (htab->elf.dynobj == NULL)
     htab->elf.dynobj = abfd;
@@ -2690,14 +2636,14 @@
 	case R_PPC64_PLT32:
 	case R_PPC64_PLT64:
 	  /* This symbol requires a procedure linkage table entry.  We
-             actually build the entry in adjust_dynamic_symbol,
-             because this might be a case of linking PIC code without
-             linking in any dynamic objects, in which case we don't
-             need to generate a procedure linkage table after all.  */
+	     actually build the entry in adjust_dynamic_symbol,
+	     because this might be a case of linking PIC code without
+	     linking in any dynamic objects, in which case we don't
+	     need to generate a procedure linkage table after all.  */
 	  if (h == NULL)
 	    {
 	      /* It does not make sense to have a procedure linkage
-                 table entry for a local symbol.  */
+		 table entry for a local symbol.  */
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -2758,7 +2704,7 @@
 	  break;
 
 	case R_PPC64_ADDR64:
-	  if (is_opd
+	  if (opd_sym_map != NULL
 	      && h != NULL
 	      && h->root.root.string[0] == '.'
 	      && h->root.root.string[1] != 0)
@@ -2775,6 +2721,21 @@
 		  ((struct ppc_link_hash_entry *) h)->oh = fdh;
 		}
 	    }
+	  if (opd_sym_map != NULL
+	      && h == NULL
+	      && rel + 1 < rel_end
+	      && ((enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info)
+		  == R_PPC64_TOC))
+	    {
+	      asection *s;
+
+	      s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
+					     r_symndx);
+	      if (s == NULL)
+		return false;
+	      else if (s != sec)
+		opd_sym_map[rel->r_offset / 24] = s;
+	    }
 	  /* Fall through.  */
 
 	case R_PPC64_REL64:
@@ -2800,7 +2761,7 @@
 	case R_PPC64_UADDR64:
 	case R_PPC64_TOC:
 	  /* Don't propagate .opd relocs.  */
-	  if (NO_OPD_RELOCS && is_opd)
+	  if (NO_OPD_RELOCS && opd_sym_map != NULL)
 	    break;
 
 	  /* If we are creating a shared library, and this is a reloc
@@ -2941,16 +2902,19 @@
    relocation.  */
 
 static asection *
-ppc64_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
      Elf_Internal_Sym *sym;
 {
+  asection *rsec = NULL;
+
   if (h != NULL)
     {
       enum elf_ppc_reloc_type r_type;
+      struct ppc_link_hash_entry *fdh;
 
       r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
       switch (r_type)
@@ -2964,10 +2928,26 @@
 	    {
 	    case bfd_link_hash_defined:
 	    case bfd_link_hash_defweak:
-	      return h->root.u.def.section;
+	      fdh = (struct ppc_link_hash_entry *) h;
+
+	      /* Function descriptor syms cause the associated
+		 function code sym section to be marked.  */
+	      if (fdh->is_func_descriptor)
+		rsec = fdh->oh->root.u.def.section;
+
+	      /* Function entry syms return NULL if they are in .opd
+		 and are not ._start (or others undefined on the ld
+		 command line).  Thus we avoid marking all function
+		 sections, as all functions are referenced in .opd.  */ 
+	      else if ((fdh->oh != NULL
+			&& ((struct ppc_link_hash_entry *) fdh->oh)->is_entry)
+		       || elf_section_data (sec)->tdata == NULL)
+		rsec = h->root.u.def.section;
+	      break;
 
 	    case bfd_link_hash_common:
-	      return h->root.u.c.p->section;
+	      rsec = h->root.u.c.p->section;
+	      break;
 
 	    default:
 	      break;
@@ -2976,10 +2956,17 @@
     }
   else
     {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
+      asection **opd_sym_section;
+
+      rsec = bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+      opd_sym_section = (asection **) elf_section_data (rsec)->tdata;
+      if (opd_sym_section != NULL)
+	rsec = opd_sym_section[sym->st_value / 24];
+      else if (elf_section_data (sec)->tdata != NULL)
+	rsec = NULL;
     }
 
-  return NULL;
+  return rsec;
 }
 
 /* Update the .got, .plt. and dynamic reloc reference counts for the
@@ -3549,6 +3536,310 @@
     }
 }
 
+static boolean
+edit_opd (obfd, info)
+     bfd *obfd;
+     struct bfd_link_info *info;
+{
+  bfd *ibfd;
+  unsigned int bfd_indx;
+
+  for (bfd_indx = 0, ibfd = info->input_bfds;
+       ibfd != NULL;
+       ibfd = ibfd->link_next, bfd_indx++)
+    {
+      asection *sec;
+      Elf_Internal_Rela *relstart, *rel, *relend;
+      Elf_Internal_Shdr *symtab_hdr;
+      Elf_Internal_Sym *local_syms;
+      struct elf_link_hash_entry **sym_hashes;
+      bfd_vma offset;
+      long *adjust;
+      boolean need_edit;
+
+      sec = bfd_get_section_by_name (ibfd, ".opd");
+      if (sec == NULL)
+	continue;
+
+      adjust = (long *) elf_section_data (sec)->tdata;
+      BFD_ASSERT (adjust != NULL);
+      memset (adjust, 0, (size_t) sec->_raw_size * sizeof (long) / 24);
+
+      if (sec->output_section == bfd_abs_section_ptr)
+	continue;
+
+      /* Look through the section relocs.  */
+      if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0)
+	continue;
+
+      local_syms = NULL;
+      symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+      sym_hashes = elf_sym_hashes (ibfd);
+
+      /* Read the relocations.  */
+      relstart = _bfd_elf64_link_read_relocs (obfd, sec, (PTR) NULL,
+					      (Elf_Internal_Rela *) NULL,
+					      info->keep_memory);
+      if (relstart == NULL)
+	return false;
+
+      /* First run through the relocs to check they are sane, and to
+	 determine whether we need to edit this opd section.  */
+      need_edit = false;
+      offset = 0;
+      relend = relstart + sec->reloc_count;
+      for (rel = relstart; rel < relend; rel++)
+	{
+	  enum elf_ppc_reloc_type r_type;
+	  unsigned long r_symndx;
+	  asection *sym_sec;
+	  struct elf_link_hash_entry *h;
+	  Elf_Internal_Sym *sym;
+
+	  /* .opd contains a regular array of 24 byte entries.  We're
+	     only interested in the reloc pointing to a function entry
+	     point.  */
+	  r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+	  if (r_type == R_PPC64_TOC)
+	    continue;
+
+	  if (r_type != R_PPC64_ADDR64)
+	    {
+	      (*_bfd_error_handler)
+		(_("%s: unexpected reloc type %u in .opd section"),
+		 bfd_archive_filename (ibfd), r_type);
+	      need_edit = false;
+	      break;
+	    }
+
+	  if (rel + 1 >= relend)
+	    continue;
+	  r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info);
+	  if (r_type != R_PPC64_TOC)
+	    continue;
+
+	  if (rel->r_offset != offset)
+	    {
+	      /* If someone messes with .opd alignment then after a
+		 "ld -r" we might have padding in the middle of .opd.
+		 Also, there's nothing to prevent someone putting
+		 something silly in .opd with the assembler.  No .opd
+		 optimization for them!  */ 
+	      (*_bfd_error_handler)
+		(_("%s: .opd is not a regular array of opd entries"),
+		 bfd_archive_filename (ibfd));
+	      need_edit = false;
+	      break;
+	    }
+
+	  r_symndx = ELF64_R_SYM (rel->r_info);
+	  sym_sec = NULL;
+	  h = NULL;
+	  sym = NULL;
+	  if (r_symndx >= symtab_hdr->sh_info)
+	    {
+	      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;
+	      if (h->root.type == bfd_link_hash_defined
+		  || h->root.type == bfd_link_hash_defweak)
+		sym_sec = h->root.u.def.section;
+	    }
+	  else
+	    {
+	      if (local_syms == NULL)
+		{
+		  local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+		  if (local_syms == NULL)
+		    local_syms = bfd_elf_get_elf_syms (ibfd, symtab_hdr,
+						       symtab_hdr->sh_info, 0,
+						       NULL, NULL, NULL);
+		  if (local_syms == NULL)
+		    goto error_free_rel;
+		}
+	      sym = local_syms + r_symndx;
+	      if ((sym->st_shndx != SHN_UNDEF
+		   && sym->st_shndx < SHN_LORESERVE)
+		  || sym->st_shndx > SHN_HIRESERVE)
+		sym_sec = bfd_section_from_elf_index (ibfd, sym->st_shndx);
+	    }
+
+	  if (sym_sec == NULL || sym_sec->owner == NULL)
+	    {
+	      (*_bfd_error_handler)
+		(_("%s: undefined sym `%s' in .opd section"),
+		 bfd_archive_filename (ibfd),
+		 h != NULL ? h->root.root.string : "<local symbol>");
+	      need_edit = false;
+	      break;
+	    }
+
+	  if (sym_sec->output_section == bfd_abs_section_ptr)
+	    {
+	      /* OK, we've found a function that's excluded from the
+		 link.  */
+	      need_edit = true;
+	    }
+
+	  offset += 24;
+	}
+
+      if (need_edit)
+	{
+	  Elf_Internal_Rela *write_rel;
+	  bfd_byte *rptr, *wptr;
+	  boolean skip;
+
+	  /* This seems a waste of time as input .opd sections are all
+	     zeros as generated by gcc, but I suppose there's no reason
+	     this will always be so.  We might start putting something in
+	     the third word of .opd entries.  */
+	  if ((sec->flags & SEC_IN_MEMORY) == 0)
+	    {
+	      bfd_byte *loc = bfd_alloc (ibfd, sec->_raw_size);
+	      if (loc == NULL
+		  || !bfd_get_section_contents (ibfd, sec, loc, (bfd_vma) 0,
+						sec->_raw_size))
+		{
+		  if (local_syms != NULL
+		      && symtab_hdr->contents != (unsigned char *) local_syms)
+		    free (local_syms);
+		error_free_rel:
+		  if (elf_section_data (sec)->relocs != relstart)
+		    free (relstart);
+		  return false;
+		}
+	      sec->contents = loc;
+	      sec->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS);
+	    }
+
+	  elf_section_data (sec)->relocs = relstart;
+
+	  wptr = sec->contents;
+	  rptr = sec->contents;
+	  write_rel = relstart;
+	  skip = false;
+	  offset = 0;
+	  for (rel = relstart; rel < relend; rel++)
+	    {
+	      if (rel->r_offset == offset)
+		{
+		  unsigned long r_symndx;
+		  asection *sym_sec;
+		  struct elf_link_hash_entry *h;
+		  Elf_Internal_Sym *sym;
+
+		  r_symndx = ELF64_R_SYM (rel->r_info);
+		  sym_sec = NULL;
+		  h = NULL;
+		  sym = NULL;
+		  if (r_symndx >= symtab_hdr->sh_info)
+		    {
+		      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;
+		      if (h->root.type == bfd_link_hash_defined
+			  || h->root.type == bfd_link_hash_defweak)
+			sym_sec = h->root.u.def.section;
+		    }
+		  else
+		    {
+		      sym = local_syms + r_symndx;
+		      if ((sym->st_shndx != SHN_UNDEF
+			   && sym->st_shndx < SHN_LORESERVE)
+			  || sym->st_shndx > SHN_HIRESERVE)
+			sym_sec = bfd_section_from_elf_index (ibfd,
+							      sym->st_shndx);
+		    }
+
+		  skip = sym_sec->output_section == bfd_abs_section_ptr;
+		  if (skip)
+		    {
+		      if (h != NULL)
+			{
+			  /* Arrange for the function descriptor sym
+			     to be dropped.  */
+			  struct elf_link_hash_entry *fdh;
+			  struct ppc_link_hash_entry *fh;
+
+			  fh = (struct ppc_link_hash_entry *) h;
+			  BFD_ASSERT (fh->is_func);
+			  fdh = fh->oh;
+			  fdh->root.u.def.value = 0;
+			  fdh->root.u.def.section = sym_sec;
+			}
+		    }
+		  else
+		    {
+		      /* We'll be keeping this opd entry.  */
+
+		      if (h != NULL)
+			{
+			  /* Redefine the function descriptor symbol
+			     to this location in the opd section.
+			     We've checked above that opd relocs are
+			     ordered.  */
+			  struct elf_link_hash_entry *fdh;
+			  struct ppc_link_hash_entry *fh;
+
+			  fh = (struct ppc_link_hash_entry *) h;
+			  BFD_ASSERT (fh->is_func);
+			  fdh = fh->oh;
+			  fdh->root.u.def.value = wptr - sec->contents;
+			}
+		      else
+			{
+			  /* Local syms are a bit tricky.  We could
+			     tweak them as they can be cached, but
+			     we'd need to look through the local syms
+			     for the function descriptor sym which we
+			     don't have at the moment.  So keep an
+			     array of adjustments.  */ 
+			  adjust[(rel->r_offset + wptr - rptr) / 24]
+			    = wptr - rptr;
+			}
+
+		      if (wptr != rptr)
+			memcpy (wptr, rptr, 24);
+		      wptr += 24;
+		    }
+		  rptr += 24;
+		  offset += 24;
+		}
+
+	      /* We need to adjust any reloc offsets to point to the
+		 new opd entries.  While we're at it, we may as well
+		 remove redundant relocs.  */
+	      if (!skip)
+		{
+		  rel->r_offset += wptr - rptr;
+		  if (write_rel != rel)
+		    memcpy (write_rel, rel, sizeof (*rel));
+		  ++write_rel;
+		}
+	    }
+
+	  sec->_cooked_size = wptr - sec->contents;
+	  sec->reloc_count = write_rel - relstart;
+	}
+      else if (elf_section_data (sec)->relocs != relstart)
+	free (relstart);
+
+      if (local_syms != NULL
+	  && symtab_hdr->contents != (unsigned char *) local_syms)
+	{
+	  if (!info->keep_memory)
+	    free (local_syms);
+	  else
+	    symtab_hdr->contents = (unsigned char *) local_syms;
+	}
+    }
+
+  return true;
+}
+     
 /* This is the condition under which ppc64_elf_finish_dynamic_symbol
    will be called from elflink.h.  If elflink.h doesn't call our
    finish_dynamic_symbol routine, we'll need to do something about
@@ -3847,6 +4138,9 @@
 	}
     }
 
+  if (!edit_opd (output_bfd, info))
+    return false;
+
   /* Allocate global sym .plt and .got entries, and space for global
      sym dynamic relocs.  */
   elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
@@ -3905,6 +4199,10 @@
 	  continue;
 	}
 
+      /* .plt is in the bss section.  We don't initialise it.  */
+      if ((s->flags & SEC_LOAD) == 0)
+	continue;
+
       /* Allocate memory for the section contents.  We use bfd_zalloc
 	 here in case unused entries are not reclaimed before the
 	 section's contents are written out.  This should not happen,
@@ -4310,7 +4608,7 @@
 
 /* Set up various things so that we can make a list of input sections
    for each output section included in the link.  Returns -1 on error,
-   0 when no stubs will be needed, and 1 on success. */
+   0 when no stubs will be needed, and 1 on success.  */
 
 int
 ppc64_elf_setup_section_lists (output_bfd, info)
@@ -4318,7 +4616,6 @@
      struct bfd_link_info *info;
 {
   bfd *input_bfd;
-  unsigned int bfd_count;
   int top_id, top_index;
   asection *section;
   asection **input_list, **list;
@@ -4329,12 +4626,11 @@
       || htab->sbrlt == NULL)
     return 0;
 
-  /* Count the number of input BFDs and find the top input section id.  */
-  for (input_bfd = info->input_bfds, bfd_count = 0, top_id = 0;
+  /* Find the top input section id.  */
+  for (input_bfd = info->input_bfds, top_id = 0;
        input_bfd != NULL;
        input_bfd = input_bfd->link_next)
     {
-      bfd_count += 1;
       for (section = input_bfd->sections;
 	   section != NULL;
 	   section = section->next)
@@ -4343,7 +4639,6 @@
 	    top_id = section->id;
 	}
     }
-  htab->bfd_count = bfd_count;
 
   amt = sizeof (struct map_stub) * (top_id + 1);
   htab->stub_group = (struct map_stub *) bfd_zmalloc (amt);
@@ -4488,100 +4783,6 @@
 #undef PREV_SEC
 }
 
-/* Read in all local syms for all input bfds.  */
-
-static boolean
-get_local_syms (input_bfd, htab)
-     bfd *input_bfd;
-     struct ppc_link_hash_table *htab;
-{
-  unsigned int bfd_indx;
-  Elf_Internal_Sym *local_syms, **all_local_syms;
-
-  /* We want to read in symbol extension records only once.  To do this
-     we need to read in the local symbols in parallel and save them for
-     later use; so hold pointers to the local symbols in an array.  */
-  bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
-  all_local_syms = (Elf_Internal_Sym **) bfd_zmalloc (amt);
-  htab->all_local_syms = all_local_syms;
-  if (all_local_syms == NULL)
-    return false;
-
-  /* Walk over all the input BFDs, swapping in local symbols.
-     If we are creating a shared library, create hash entries for the
-     export stubs.  */
-  for (bfd_indx = 0;
-       input_bfd != NULL;
-       input_bfd = input_bfd->link_next, bfd_indx++)
-    {
-      Elf_Internal_Shdr *symtab_hdr;
-      Elf_Internal_Shdr *shndx_hdr;
-      Elf_Internal_Sym *isym;
-      Elf64_External_Sym *ext_syms, *esym, *end_sy;
-      Elf_External_Sym_Shndx *shndx_buf, *shndx;
-      bfd_size_type sec_size;
-
-      /* We'll need the symbol table in a second.  */
-      symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-      if (symtab_hdr->sh_info == 0)
-	continue;
-
-      /* We need an array of the local symbols attached to the input bfd.
-	 Unfortunately, we're going to have to read & swap them in.  */
-      sec_size = symtab_hdr->sh_info;
-      sec_size *= sizeof (Elf_Internal_Sym);
-      local_syms = (Elf_Internal_Sym *) bfd_malloc (sec_size);
-      if (local_syms == NULL)
-	return false;
-
-      all_local_syms[bfd_indx] = local_syms;
-      sec_size = symtab_hdr->sh_info;
-      sec_size *= sizeof (Elf64_External_Sym);
-      ext_syms = (Elf64_External_Sym *) bfd_malloc (sec_size);
-      if (ext_syms == NULL)
-	return false;
-
-      if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread ((PTR) ext_syms, sec_size, input_bfd) != sec_size)
-	{
-	error_ret_free_ext_syms:
-	  free (ext_syms);
-	  return false;
-	}
-
-      shndx_buf = NULL;
-      shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-      if (shndx_hdr->sh_size != 0)
-	{
-	  sec_size = symtab_hdr->sh_info;
-	  sec_size *= sizeof (Elf_External_Sym_Shndx);
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (sec_size);
-	  if (shndx_buf == NULL)
-	    goto error_ret_free_ext_syms;
-
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, sec_size, input_bfd) != sec_size)
-	    {
-	      free (shndx_buf);
-	      goto error_ret_free_ext_syms;
-	    }
-	}
-
-      /* Swap the local symbols in.  */
-      for (esym = ext_syms, end_sy = esym + symtab_hdr->sh_info,
-	     isym = local_syms, shndx = shndx_buf;
-	   esym < end_sy;
-	   esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
-	bfd_elf64_swap_symbol_in (input_bfd, esym, shndx, isym);
-
-      /* Now we can free the external symbols.  */
-      free (shndx_buf);
-      free (ext_syms);
-    }
-
-  return true;
-}
-
 /* Determine and set the size of the stub section for a final link.
 
    The basic idea here is to examine all the relocations looking for
@@ -4600,7 +4801,6 @@
 {
   bfd_size_type stub_group_size;
   boolean stubs_always_before_branch;
-  boolean ret = false;
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
   /* Stash our params away.  */
@@ -4622,13 +4822,6 @@
 
   group_sections (htab, stub_group_size, stubs_always_before_branch);
 
-  if (! get_local_syms (info->input_bfds, htab))
-    {
-      if (htab->all_local_syms)
-	goto error_ret_free_local;
-      return false;
-    }
-
   while (1)
     {
       bfd *input_bfd;
@@ -4645,24 +4838,19 @@
 	{
 	  Elf_Internal_Shdr *symtab_hdr;
 	  asection *section;
-	  Elf_Internal_Sym *local_syms;
+	  Elf_Internal_Sym *local_syms = NULL;
 
 	  /* We'll need the symbol table in a second.  */
 	  symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
 	  if (symtab_hdr->sh_info == 0)
 	    continue;
 
-	  local_syms = htab->all_local_syms[bfd_indx];
-
 	  /* Walk over each section attached to the input bfd.  */
 	  for (section = input_bfd->sections;
 	       section != NULL;
 	       section = section->next)
 	    {
-	      Elf_Internal_Shdr *input_rel_hdr;
-	      Elf64_External_Rela *external_relocs, *erelaend, *erela;
 	      Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
-	      bfd_size_type amt;
 
 	      /* If there aren't any relocs, then there's nothing more
 		 to do.  */
@@ -4676,47 +4864,13 @@
 		  || section->output_section->owner != output_bfd)
 		continue;
 
-	      /* Allocate space for the external relocations.  */
-	      amt = section->reloc_count;
-	      amt *= sizeof (Elf64_External_Rela);
-	      external_relocs = (Elf64_External_Rela *) bfd_malloc (amt);
-	      if (external_relocs == NULL)
-		{
-		  goto error_ret_free_local;
-		}
-
-	      /* Likewise for the internal relocations.  */
-	      amt = section->reloc_count;
-	      amt *= sizeof (Elf_Internal_Rela);
-	      internal_relocs = (Elf_Internal_Rela *) bfd_malloc (amt);
+	      /* Get the relocs.  */
+	      internal_relocs
+		= _bfd_elf64_link_read_relocs (input_bfd, section, NULL,
+					       (Elf_Internal_Rela *) NULL,
+					       info->keep_memory);
 	      if (internal_relocs == NULL)
-		{
-		  free (external_relocs);
-		  goto error_ret_free_local;
-		}
-
-	      /* Read in the external relocs.  */
-	      input_rel_hdr = &elf_section_data (section)->rel_hdr;
-	      if (bfd_seek (input_bfd, input_rel_hdr->sh_offset, SEEK_SET) != 0
-		  || bfd_bread ((PTR) external_relocs,
-				input_rel_hdr->sh_size,
-				input_bfd) != input_rel_hdr->sh_size)
-		{
-		  free (external_relocs);
-		error_ret_free_internal:
-		  free (internal_relocs);
-		  goto error_ret_free_local;
-		}
-
-	      /* Swap in the relocs.  */
-	      erela = external_relocs;
-	      erelaend = erela + section->reloc_count;
-	      irela = internal_relocs;
-	      for (; erela < erelaend; erela++, irela++)
-		bfd_elf64_swap_reloca_in (input_bfd, erela, irela);
-
-	      /* We're done with the external relocs, free them.  */
-	      free (external_relocs);
+		goto error_ret_free_local;
 
 	      /* Now examine each relocation.  */
 	      irela = internal_relocs;
@@ -4761,6 +4915,18 @@
 		      Elf_Internal_Sym *sym;
 		      Elf_Internal_Shdr *hdr;
 
+		      if (local_syms == NULL)
+			{
+			  local_syms
+			    = (Elf_Internal_Sym *) symtab_hdr->contents;
+			  if (local_syms == NULL)
+			    local_syms
+			      = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+						      symtab_hdr->sh_info, 0,
+						      NULL, NULL, NULL);
+			  if (local_syms == NULL)
+			    goto error_ret_free_internal;
+			}
 		      sym = local_syms + r_indx;
 		      hdr = elf_elfsections (input_bfd)[sym->st_shndx];
 		      sym_sec = hdr->bfd_section;
@@ -4832,7 +4998,15 @@
 		  if (stub_entry == NULL)
 		    {
 		      free (stub_name);
-		      goto error_ret_free_local;
+		    error_ret_free_internal:
+		      if (elf_section_data (section)->relocs == NULL)
+			free (internal_relocs);
+		    error_ret_free_local:
+		      if (local_syms != NULL
+			  && (symtab_hdr->contents
+			      != (unsigned char *) local_syms))
+			free (local_syms);
+		      return false;
 		    }
 
 		  stub_entry->target_value = sym_value;
@@ -4843,7 +5017,17 @@
 		}
 
 	      /* We're done with the internal relocs, free them.  */
-	      free (internal_relocs);
+	      if (elf_section_data (section)->relocs != internal_relocs)
+		free (internal_relocs);
+	    }
+
+	  if (local_syms != NULL
+	      && symtab_hdr->contents != (unsigned char *) local_syms)
+	    {
+	      if (!info->keep_memory)
+		free (local_syms);
+	      else
+		symtab_hdr->contents = (unsigned char *) local_syms;
 	    }
 	}
 
@@ -4873,15 +5057,7 @@
      the dynamic symbol table is corrupted since the section symbol
      for the stripped section isn't written.  */
 
-  ret = true;
-
- error_ret_free_local:
-  while (htab->bfd_count-- > 0)
-    if (htab->all_local_syms[htab->bfd_count])
-      free (htab->all_local_syms[htab->bfd_count]);
-  free (htab->all_local_syms);
-
-  return ret;
+  return true;
 }
 
 /* Called after we have determined section placement.  If sections
@@ -5021,23 +5197,6 @@
   return !htab->stub_error;
 }
 
-/* Set up any other section flags and such that may be necessary.  */
-
-static boolean
-ppc64_elf_fake_sections (abfd, shdr, asect)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     Elf64_Internal_Shdr *shdr;
-     asection *asect;
-{
-  if ((asect->flags & SEC_EXCLUDE) != 0)
-    shdr->sh_flags |= SHF_EXCLUDE;
-
-  if ((asect->flags & SEC_SORT_ENTRIES) != 0)
-    shdr->sh_type = SHT_ORDERED;
-
-  return true;
-}
-
 /* The RELOCATE_SECTION function is called by the ELF backend linker
    to handle the relocations for a section.
 
@@ -5103,7 +5262,7 @@
   TOCstart = elf_gp (output_bfd);
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
-  is_opd = strcmp (bfd_get_section_name (abfd, input_section), ".opd") == 0;
+  is_opd = elf_section_data (input_section)->tdata != NULL;
 
   rel = relocs;
   relend = relocs + input_section->reloc_count;
@@ -5154,6 +5313,15 @@
 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
 	  /* rel may have changed, update our copy of addend.  */
 	  addend = rel->r_addend;
+
+	  if (elf_section_data (sec) != NULL)
+	    {
+	      long *opd_sym_adjust;
+
+	      opd_sym_adjust = (long *) elf_section_data (sec)->tdata;
+	      if (opd_sym_adjust != NULL && sym->st_value % 24 == 0)
+		relocation += opd_sym_adjust[sym->st_value / 24];
+	    }
 	}
       else
 	{
@@ -5208,8 +5376,8 @@
 	  /* Branch taken prediction relocations.  */
 	case R_PPC64_ADDR14_BRTAKEN:
 	case R_PPC64_REL14_BRTAKEN:
-	  insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
-	  /* Fall thru. */
+	  insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field.  */
+	  /* Fall thru.  */
 
 	  /* Branch not taken prediction relocations.  */
 	case R_PPC64_ADDR14_BRNTAKEN:
@@ -5591,14 +5759,18 @@
 		  relocate = true;
 		  if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
 		    {
-		      if (is_opd && h != NULL && info->shared)
+		      if (is_opd && h != NULL)
 			{
 			  /* Lie about opd entries.  This case occurs
 			     when building shared libraries and we
 			     reference a function in another shared
-			     lib.  In that case we won't use the opd
-			     entry in this lib;  We ought to edit the
-			     opd section to remove unused entries.  */
+			     lib.  The same thing happens for a weak
+			     definition in an application that's
+			     overridden by a strong definition in a
+			     shared lib.  (I believe this is a generic
+			     bug in binutils handling of weak syms.)
+			     In these cases we won't use the opd
+			     entry in this lib.  */
 			  unresolved_reloc = false;
 			}
 		      outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
@@ -5750,13 +5922,11 @@
 	  break;
 	}
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-	 More importantly, why do we not emit dynamic relocs above in
-	 debugging sections (which are ! SEC_ALLOC)?  If we had
-	 emitted the dynamic reloc, we could remove the fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	{
 	  (*_bfd_error_handler)
@@ -5854,7 +6024,7 @@
       Elf64_External_Rela *loc;
 
       /* This symbol has an entry in the procedure linkage table.  Set
-         it up.  */
+	 it up.  */
 
       if (htab->splt == NULL
 	  || htab->srelplt == NULL
@@ -5881,7 +6051,7 @@
       Elf64_External_Rela *loc;
 
       /* This symbol has an entry in the global offset table.  Set it
-         up.  */
+	 up.  */
 
       if (htab->sgot == NULL || htab->srelgot == NULL)
 	abort ();
@@ -6104,12 +6274,11 @@
 #define elf_backend_rela_normal 1
 
 #define bfd_elf64_bfd_reloc_type_lookup	      ppc64_elf_reloc_type_lookup
-#define bfd_elf64_bfd_set_private_flags	      ppc64_elf_set_private_flags
 #define bfd_elf64_bfd_merge_private_bfd_data  ppc64_elf_merge_private_bfd_data
 #define bfd_elf64_bfd_link_hash_table_create  ppc64_elf_link_hash_table_create
 #define bfd_elf64_bfd_link_hash_table_free    ppc64_elf_link_hash_table_free
 
-#define elf_backend_section_from_shdr	      ppc64_elf_section_from_shdr
+#define elf_backend_object_p		      ppc64_elf_object_p
 #define elf_backend_create_dynamic_sections   ppc64_elf_create_dynamic_sections
 #define elf_backend_copy_indirect_symbol      ppc64_elf_copy_indirect_symbol
 #define elf_backend_check_relocs	      ppc64_elf_check_relocs
@@ -6119,7 +6288,6 @@
 #define elf_backend_hide_symbol		      ppc64_elf_hide_symbol
 #define elf_backend_always_size_sections      ppc64_elf_func_desc_adjust
 #define elf_backend_size_dynamic_sections     ppc64_elf_size_dynamic_sections
-#define elf_backend_fake_sections	      ppc64_elf_fake_sections
 #define elf_backend_relocate_section	      ppc64_elf_relocate_section
 #define elf_backend_finish_dynamic_symbol     ppc64_elf_finish_dynamic_symbol
 #define elf_backend_reloc_type_class	      ppc64_elf_reloc_type_class
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 86f687e..cabc388 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -17,6 +17,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+boolean ppc64_elf_mark_entry_syms
+  PARAMS ((struct bfd_link_info *));
 bfd_vma ppc64_elf_toc
   PARAMS ((bfd *));
 int ppc64_elf_setup_section_lists
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index ceb5efa..296e349 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -40,12 +40,13 @@
 static boolean elf_s390_create_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
 static void elf_s390_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static boolean elf_s390_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 static asection *elf_s390_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf_s390_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -70,8 +71,6 @@
   PARAMS ((bfd *, struct bfd_link_info *));
 static boolean elf_s390_object_p PARAMS ((bfd *));
 
-#define USE_RELA 1		/* We want RELA relocations, not REL.  */
-
 #include "elf/s390.h"
 
 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value
@@ -471,7 +470,7 @@
 				  (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
 				   | SEC_IN_MEMORY | SEC_LINKER_CREATED
 				   | SEC_READONLY))
-      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
+      || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
     return false;
   return true;
 }
@@ -510,7 +509,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf_s390_copy_indirect_symbol (dir, ind)
+elf_s390_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct elf_s390_link_hash_entry *edir, *eind;
@@ -552,7 +552,7 @@
       eind->dyn_relocs = NULL;
     }
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 /* Look through the relocs for a section during the first phase, and
@@ -776,7 +776,7 @@
 			flags |= SEC_ALLOC | SEC_LOAD;
 		      if (sreloc == NULL
 			  || ! bfd_set_section_flags (dynobj, sreloc, flags)
-			  || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+			  || ! bfd_set_section_alignment (dynobj, sreloc, 3))
 			return false;
 		    }
 		  elf_section_data (sec)->sreloc = sreloc;
@@ -855,8 +855,8 @@
    relocation.  */
 
 static asection *
-elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf_s390_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -886,9 +886,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1019,7 +1017,7 @@
 
   /* If this is a function, put it in the procedure linkage table.  We
      will fill in the contents of the procedure linkage table later
-     (although we could actually do it here). */
+     (although we could actually do it here).  */
   if (h->type == STT_FUNC
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
@@ -1937,9 +1935,11 @@
           break;
         }
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
@@ -2339,6 +2339,7 @@
   bfd_elf64_write_out_phdrs,
   bfd_elf64_write_shdrs_and_ehdr,
   bfd_elf64_write_relocs,
+  bfd_elf64_swap_symbol_in,
   bfd_elf64_swap_symbol_out,
   bfd_elf64_slurp_reloc_table,
   bfd_elf64_slurp_symbol_table,
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index b168934..4fb695f 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -127,7 +127,7 @@
 static boolean sh_elf64_set_mach_from_flags PARAMS ((bfd *));
 static boolean sh_elf64_set_private_flags PARAMS ((bfd *, flagword));
 static asection *sh_elf64_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean sh_elf64_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -139,7 +139,7 @@
 static boolean sh64_elf64_add_symbol_hook
   PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
 	   const char **, flagword *, asection **, bfd_vma *));
-extern boolean sh64_elf64_link_output_symbol_hook
+static boolean sh64_elf64_link_output_symbol_hook
   PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
 	   asection *));
 static boolean sh64_elf64_fake_sections
@@ -1342,8 +1342,8 @@
     return bfd_reloc_undefined;
 
   if (bfd_is_com_section (symbol_in->section))
-    sym_value = 0;                           
-  else 
+    sym_value = 0;
+  else
     sym_value = (symbol_in->value +
 		 symbol_in->section->output_section->vma +
 		 symbol_in->section->output_offset);
@@ -1614,7 +1614,7 @@
 	      sec = h->root.u.def.section;
 	      /* In these cases, we don't need the relocation value.
 		 We check specially because in some obscure cases
-		 sec->output_section will be NULL. */
+		 sec->output_section will be NULL.  */
 	      if (r_type == R_SH_GOTPC_LOW16
 		  || r_type == R_SH_GOTPC_MEDLOW16
 		  || r_type == R_SH_GOTPC_MEDHI16
@@ -1756,7 +1756,7 @@
 		skip = true;
 	      else if (outrel.r_offset == (bfd_vma) -2)
 		skip = true, relocate = true;
-	      
+
 	      outrel.r_offset += (input_section->output_section->vma
 				  + input_section->output_offset);
 
@@ -2144,15 +2144,11 @@
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   asection *input_section = link_order->u.indirect.section;
   bfd *input_bfd = input_section->owner;
   asection **sections = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf64_External_Sym *external_syms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
-  Elf_Internal_Sym *internal_syms = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
@@ -2164,7 +2160,6 @@
 						       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
-  shndx_hdr  = &elf_tdata (input_bfd)->symtab_shndx_hdr;
 
   memcpy (data, elf_section_data (input_section)->this_hdr.contents,
 	  input_section->_raw_size);
@@ -2173,37 +2168,18 @@
       && input_section->reloc_count > 0)
     {
       Elf_Internal_Sym *isymp;
+      Elf_Internal_Sym *isymend;
       asection **secpp;
-      Elf64_External_Sym *esym, *esymend;
-      bfd_size_type amt;
 
-      if (symtab_hdr->contents != NULL)
-	external_syms = (Elf64_External_Sym *) symtab_hdr->contents;
-      else
+      /* Read this BFD's local symbols.  */
+      if (symtab_hdr->sh_info != 0)
 	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf64_External_Sym);
-
-	  external_syms = (Elf64_External_Sym *) bfd_malloc (amt);
-	  if (external_syms == NULL && symtab_hdr->sh_info > 0)
-	    goto error_return;
-
-	  if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || (bfd_bread ((PTR) external_syms, amt, input_bfd) != amt))
-	    goto error_return;
-	}
-
-      if (symtab_hdr->sh_info != 0 && shndx_hdr->sh_size != 0)
-	{
-	  amt = symtab_hdr->sh_info;
-	  amt *= sizeof (Elf_External_Sym_Shndx);
-
-	  shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (shndx_buf == NULL)
-	    goto error_return;
-
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
+	  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	  if (isymbuf == NULL)
+	    isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+					    symtab_hdr->sh_info, 0,
+					    NULL, NULL, NULL);
+	  if (isymbuf == NULL)
 	    goto error_return;
 	}
 
@@ -2213,29 +2189,17 @@
       if (internal_relocs == NULL)
 	goto error_return;
 
-      internal_syms = ((Elf_Internal_Sym *)
-		       bfd_malloc (symtab_hdr->sh_info
-				   * sizeof (Elf_Internal_Sym)));
-      if (internal_syms == NULL && symtab_hdr->sh_info > 0)
-	goto error_return;
-
       sections = (asection **) bfd_malloc (symtab_hdr->sh_info
 					   * sizeof (asection *));
       if (sections == NULL && symtab_hdr->sh_info > 0)
 	goto error_return;
 
-      isymp = internal_syms;
       secpp = sections;
-      esym = external_syms;
-      esymend = esym + symtab_hdr->sh_info;
-      shndx = shndx_buf;
-      for (; esym < esymend;
-	   ++esym, ++isymp, ++secpp, shndx = (shndx ? shndx + 1 : NULL))
+      isymend = isymbuf + symtab_hdr->sh_info;
+      for (isymp = isymbuf; isymp < isymend; ++isymp, ++secpp)
 	{
 	  asection *isec;
 
-	  bfd_elf64_swap_symbol_in (input_bfd, esym, shndx, isymp);
-
 	  if (isymp->st_shndx == SHN_UNDEF)
 	    isec = bfd_und_section_ptr;
 	  else if (isymp->st_shndx > 0 && isymp->st_shndx < SHN_LORESERVE)
@@ -2255,35 +2219,29 @@
 
       if (! sh_elf64_relocate_section (output_bfd, link_info, input_bfd,
 				       input_section, data, internal_relocs,
-				       internal_syms, sections))
+				       isymbuf, sections))
 	goto error_return;
 
       if (sections != NULL)
 	free (sections);
-      sections = NULL;
-      if (internal_syms != NULL)
-	free (internal_syms);
-      internal_syms = NULL;
-      if (external_syms != NULL && symtab_hdr->contents == NULL)
-	free (external_syms);
-      external_syms = NULL;
       if (internal_relocs != elf_section_data (input_section)->relocs)
 	free (internal_relocs);
-      internal_relocs = NULL;
+      if (isymbuf != NULL
+	  && (unsigned char *) isymbuf != symtab_hdr->contents)
+	free (isymbuf);
     }
 
   return data;
 
  error_return:
+  if (sections != NULL)
+    free (sections);
   if (internal_relocs != NULL
       && internal_relocs != elf_section_data (input_section)->relocs)
     free (internal_relocs);
-  if (external_syms != NULL && symtab_hdr->contents == NULL)
-    free (external_syms);
-  if (internal_syms != NULL)
-    free (internal_syms);
-  if (sections != NULL)
-    free (sections);
+  if (isymbuf != NULL
+      && (unsigned char *) isymbuf != symtab_hdr->contents)
+    free (isymbuf);
   return NULL;
 }
 
@@ -2390,7 +2348,7 @@
 {
   flagword old_flags, new_flags;
 
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -2449,12 +2407,12 @@
    relocation.  */
 
 static asection *
-sh_elf64_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;
+sh_elf64_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
+     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *rel;
+     struct elf_link_hash_entry *h;
+     Elf_Internal_Sym *sym;
 {
   if (h != NULL)
     {
@@ -2465,6 +2423,9 @@
 	  break;
 
 	default:
+	  while (h->root.type == bfd_link_hash_indirect
+		 && h->root.u.i.link)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
 	  switch (h->root.type)
 	    {
 	    case bfd_link_hash_defined:
@@ -2480,13 +2441,7 @@
 	}
     }
   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 bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -2507,7 +2462,7 @@
 /* Look through the relocs for a section during the first phase.
    Since we don't do .gots or .plts, we just need to consider the
    virtual table relocs for gc.  */
- 
+
 static boolean
 sh_elf64_check_relocs (abfd, info, sec, relocs)
      bfd *abfd;
@@ -2537,7 +2492,7 @@
   sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym);
   if (!elf_bad_symtab (abfd))
     sym_hashes_end -= symtab_hdr->sh_info;
- 
+
   dynobj = elf_hash_table (info)->dynobj;
   local_got_offsets = elf_local_got_offsets (abfd);
 
@@ -2546,13 +2501,13 @@
     {
       struct elf_link_hash_entry *h;
       unsigned long r_symndx;
- 
+
       r_symndx = ELF64_R_SYM (rel->r_info);
       if (r_symndx < symtab_hdr->sh_info)
         h = NULL;
       else
         h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- 
+
       /* Some relocs require a global offset table.  */
       if (dynobj == NULL)
 	{
@@ -2596,7 +2551,7 @@
           if (!_bfd_elf64_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_SH_GNU_VTENTRY:
@@ -2881,7 +2836,7 @@
 	  break;
         }
     }
- 
+
   return true;
 }
 
@@ -3016,7 +2971,7 @@
    we don't need to look up and make sure to emit the main symbol for each
    DataLabel symbol.  */
 
-boolean
+static boolean
 sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
      bfd *abfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
@@ -3064,7 +3019,7 @@
   0xc8, 0x00, 0x01, 0x10, /* shori (.got.plt >> 16) & 65535, r17 */
   0xc8, 0x00, 0x01, 0x10, /* shori .got.plt & 65535, r17 */
   0x8d, 0x10, 0x09, 0x90, /* ld.q  r17, 16, r25 */
-  0x6b, 0xf1, 0x46, 0x00, /* ptabs r17, tr0 */
+  0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
   0x8d, 0x10, 0x05, 0x10, /* ld.q  r17, 8, r17 */
   0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
   0x6f, 0xf0, 0xff, 0xf0, /* nop */
@@ -3084,7 +3039,7 @@
   0x10, 0x01, 0x00, 0xc8, /* shori (.got.plt >> 16) & 65535, r17 */
   0x10, 0x01, 0x00, 0xc8, /* shori .got.plt & 65535, r17 */
   0x90, 0x09, 0x10, 0x8d, /* ld.q  r17, 16, r25 */
-  0x00, 0x46, 0xf1, 0x6b, /* ptabs r17, tr0 */
+  0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
   0x10, 0x05, 0x10, 0x8d, /* ld.q  r17, 8, r17 */
   0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
   0xf0, 0xff, 0xf0, 0x6f, /* nop */
@@ -3110,9 +3065,9 @@
   0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
   0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
   0x6f, 0xf0, 0xff, 0xf0, /* nop */
-  0xcc, 0x00, 0x01, 0x90, /* movi  .PLT0 >> 16, r25 */
-  0xc8, 0x00, 0x01, 0x90, /* shori .PLT0 & 65535, r25 */
-  0x6b, 0xf1, 0x66, 0x00, /* ptabs r25, tr0 */
+  0xcc, 0x00, 0x01, 0x90, /* movi  (.+8-.PLT0) >> 16, r25 */
+  0xc8, 0x00, 0x01, 0x90, /* shori (.+4-.PLT0) & 65535, r25 */
+  0x6b, 0xf5, 0x66, 0x00, /* ptrel r25, tr0 */
   0xcc, 0x00, 0x01, 0x50, /* movi  reloc-offset >> 16, r21 */
   0xc8, 0x00, 0x01, 0x50, /* shori reloc-offset & 65535, r21 */
   0x44, 0x01, 0xff, 0xf0, /* blink tr0, r63 */
@@ -3130,9 +3085,9 @@
   0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
   0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
   0xf0, 0xff, 0xf0, 0x6f, /* nop */
-  0x90, 0x01, 0x00, 0xcc, /* movi  .PLT0 >> 16, r25 */
-  0x90, 0x01, 0x00, 0xc8, /* shori .PLT0 & 65535, r25 */
-  0x00, 0x66, 0xf1, 0x6b, /* ptabs r25, tr0 */
+  0x90, 0x01, 0x00, 0xcc, /* movi  (.+8-.PLT0) >> 16, r25 */
+  0x90, 0x01, 0x00, 0xc8, /* shori (.+4-.PLT0) & 65535, r25 */
+  0x00, 0x66, 0xf5, 0x6b, /* ptrel r25, tr0 */
   0x50, 0x01, 0x00, 0xcc, /* movi  reloc-offset >> 16, r21 */
   0x50, 0x01, 0x00, 0xc8, /* shori reloc-offset & 65535, r21 */
   0xf0, 0xff, 0x01, 0x44, /* blink tr0, r63 */
@@ -3762,7 +3717,7 @@
 	}
 
       /* Allocate memory for the section contents.  */
-      s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
       if (s->contents == NULL && s->_raw_size != 0)
 	return false;
     }
@@ -3853,7 +3808,8 @@
 	 The first three are reserved.  */
       got_offset = (plt_index + 3) * 8;
 
-      got_offset -= GOT_BIAS;
+      if (info->shared)
+	got_offset -= GOT_BIAS;
 
       /* Fill in the entry in the procedure linkage table.  */
       if (! info->shared)
@@ -3872,8 +3828,11 @@
 			      (splt->contents + h->plt.offset
 			       + elf_sh64_plt_symbol_offset (info)));
 
+	  /* Set bottom bit because its for a branch to SHmedia */
 	  movi_shori_putval (output_bfd,
-			     (splt->output_section->vma + splt->output_offset),
+			     -(h->plt.offset
+			      + elf_sh64_plt_plt0_offset (info) + 8)
+			     | 1,
 			     (splt->contents + h->plt.offset
 			      + elf_sh64_plt_plt0_offset (info)));
 	}
@@ -3892,7 +3851,8 @@
 			      + elf_sh64_plt_symbol_offset (info)));
 	}
 
-      got_offset += GOT_BIAS;
+      if (info->shared)
+	got_offset += GOT_BIAS;
 
       movi_shori_putval (output_bfd,
 			 plt_index * sizeof (Elf64_External_Rela),
@@ -4035,6 +3995,7 @@
 	  Elf_Internal_Dyn dyn;
 	  const char *name;
 	  asection *s;
+	  struct elf_link_hash_entry *h;
 
 	  bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
 
@@ -4043,6 +4004,25 @@
 	    default:
 	      break;
 
+	    case DT_INIT:
+	      name = info->init_function;
+	      goto get_sym;
+
+	    case DT_FINI:
+	      name = info->fini_function;
+	    get_sym:
+	      if (dyn.d_un.d_val != 0)
+		{
+		  h = elf_link_hash_lookup (elf_hash_table (info), name,
+					    false, false, true);
+		  if (h != NULL && (h->other & STO_SH5_ISA32))
+		    {
+		      dyn.d_un.d_val |= 1;
+		      bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+		    }
+		}
+	      break;
+
 	    case DT_PLTGOT:
 	      name = ".got";
 	      goto get_vma;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 4933f8d..764b0d7 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -72,6 +72,9 @@
 static boolean sparc64_elf_merge_private_bfd_data
   PARAMS ((bfd *, bfd *));
 
+static boolean sparc64_elf_fake_sections
+  PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
+
 static const char *sparc64_elf_print_symbol_all
   PARAMS ((bfd *, PTR, asymbol *));
 static boolean sparc64_elf_relax_section
@@ -711,7 +714,7 @@
       return bfd_reloc_ok;
     }
 
-  /* This works because partial_inplace == false.  */
+  /* This works because partial_inplace is false.  */
   if (output_bfd != NULL)
     return bfd_reloc_continue;
 
@@ -1386,7 +1389,7 @@
       return true;
     }
   else if (*namep && **namep
-	   && info->hash->creator->flavour == bfd_target_elf_flavour)
+	   && info->hash->creator == abfd->xvec)
     {
       int i;
       struct sparc64_elf_app_reg *p;
@@ -1916,6 +1919,9 @@
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
 
+  if (info->relocateable)
+    return true;
+
   dynobj = elf_hash_table (info)->dynobj;
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
@@ -1951,28 +1957,8 @@
 	}
       howto = sparc64_elf_howto_table + r_type;
 
-      r_symndx = ELF64_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.  */
+      r_symndx = ELF64_R_SYM (rel->r_info);
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -2565,9 +2551,11 @@
 	  break;
 	}
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
@@ -2995,6 +2983,27 @@
     }
   return true;
 }
+
+/* MARCO: Set the correct entry size for the .stab section.  */
+
+static boolean
+sparc64_elf_fake_sections (abfd, hdr, sec)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
+     asection *sec;
+{
+  const char *name;
+
+  name = bfd_get_section_name (abfd, sec);
+
+  if (strcmp (name, ".stab") == 0)
+    {
+      /* Even in the 64bit case the stab entries are only 12 bytes long.  */
+      elf_section_data (sec)->this_hdr.sh_entsize = 12;
+    }
+  
+  return true;
+}
 
 /* Print a STT_REGISTER symbol to file FILE.  */
 
@@ -3067,6 +3076,7 @@
   bfd_elf64_write_out_phdrs,
   bfd_elf64_write_shdrs_and_ehdr,
   sparc64_elf_write_relocs,
+  bfd_elf64_swap_symbol_in,
   bfd_elf64_swap_symbol_out,
   sparc64_elf_slurp_reloc_table,
   bfd_elf64_slurp_symbol_table,
@@ -3131,6 +3141,8 @@
   sparc64_elf_output_arch_syms
 #define bfd_elf64_bfd_merge_private_bfd_data \
   sparc64_elf_merge_private_bfd_data
+#define elf_backend_fake_sections \
+  sparc64_elf_fake_sections
 
 #define elf_backend_size_info \
   sparc64_elf_size_info
@@ -3142,6 +3154,7 @@
 #define elf_backend_want_got_plt 0
 #define elf_backend_plt_readonly 0
 #define elf_backend_want_plt_sym 1
+#define elf_backend_rela_normal 1
 
 /* Section 5.2.4 of the ABI specifies a 256-byte boundary for the table.  */
 #define elf_backend_plt_alignment 8
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 66a27db..9c4a9d4 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -26,9 +26,6 @@
 
 #include "elf/x86-64.h"
 
-/* We use only the RELA entries.  */
-#define USE_RELA 1
-
 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value.  */
 #define MINUS_ONE (~ (bfd_vma) 0)
 
@@ -125,9 +122,9 @@
   PARAMS ((bfd *, bfd_reloc_code_real_type));
 static void elf64_x86_64_info_to_howto
   PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *));
-static boolean elf64_x86_64_grok_prstatus 
+static boolean elf64_x86_64_grok_prstatus
   PARAMS ((bfd *, Elf_Internal_Note *));
-static boolean elf64_x86_64_grok_psinfo 
+static boolean elf64_x86_64_grok_psinfo
   PARAMS ((bfd *, Elf_Internal_Note *));
 static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create
   PARAMS ((bfd *));
@@ -137,12 +134,13 @@
 static boolean elf64_x86_64_create_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
 static void elf64_x86_64_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static boolean elf64_x86_64_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
 	   const Elf_Internal_Rela *));
 static asection *elf64_x86_64_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 
 static boolean elf64_x86_64_gc_sweep_hook
@@ -228,11 +226,11 @@
 
       case 336:		/* sizeof(istruct elf_prstatus) on Linux/x86_64 */
 	/* pr_cursig */
-	elf_tdata (abfd)->core_signal 
+	elf_tdata (abfd)->core_signal
 	  = bfd_get_16 (abfd, note->descdata + 12);
 
 	/* pr_pid */
-	elf_tdata (abfd)->core_pid 
+	elf_tdata (abfd)->core_pid
 	  = bfd_get_32 (abfd, note->descdata + 32);
 
 	/* pr_reg */
@@ -497,7 +495,8 @@
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf64_x86_64_copy_indirect_symbol (dir, ind)
+elf64_x86_64_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct elf64_x86_64_link_hash_entry *edir, *eind;
@@ -539,7 +538,7 @@
       eind->dyn_relocs = NULL;
     }
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
 
 static boolean
@@ -660,11 +659,28 @@
 	case R_X86_64_8:
 	case R_X86_64_16:
 	case R_X86_64_32:
-	case R_X86_64_64:
 	case R_X86_64_32S:
+	  /* Let's help debug shared library creation.  These relocs
+	     cannot be used in shared libs.  Don't error out for
+	     sections we don't care about, such as debug sections or
+	     non-constant sections.  */
+	  if (info->shared
+	      && (sec->flags & SEC_ALLOC) != 0
+	      && (sec->flags & SEC_READONLY) != 0)
+	    {
+	      (*_bfd_error_handler)
+		(_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
+		 bfd_archive_filename (abfd),
+		 x86_64_elf_howto_table[ELF64_R_TYPE (rel->r_info)].name);
+	      bfd_set_error (bfd_error_bad_value);
+	      return false;
+	    }
+	  /* Fall through.  */
+
 	case R_X86_64_PC8:
 	case R_X86_64_PC16:
 	case R_X86_64_PC32:
+	case R_X86_64_64:
 	  if (h != NULL && !info->shared)
 	    {
 	      /* If this reloc is in a read-only section, we might
@@ -839,8 +855,8 @@
    relocation.	*/
 
 static asection *
-elf64_x86_64_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf64_x86_64_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -870,9 +886,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -1087,7 +1101,7 @@
 
   /* We must generate a R_X86_64_COPY reloc to tell the dynamic linker
      to copy the initial value out of the dynamic object and into the
-     runtime process image. */
+     runtime process image.  */
   if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
     {
       htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
@@ -1861,9 +1875,44 @@
 	      else
 		{
 		  /* This symbol is local, or marked to become local.  */
-		  relocate = true;
-		  outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
-		  outrel.r_addend = relocation + rel->r_addend;
+		  if (r_type == R_X86_64_64)
+		    {
+		      relocate = true;
+		      outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
+		      outrel.r_addend = relocation + rel->r_addend;
+		    }
+		  else
+		    {
+		      long sindx;
+
+		      if (h == NULL)
+			sec = local_sections[r_symndx];
+		      else
+			{
+			  BFD_ASSERT (h->root.type == bfd_link_hash_defined
+				      || (h->root.type
+					  == bfd_link_hash_defweak));
+			  sec = h->root.u.def.section;
+			}
+		      if (sec != NULL && bfd_is_abs_section (sec))
+			sindx = 0;
+		      else if (sec == NULL || sec->owner == NULL)
+			{
+			  bfd_set_error (bfd_error_bad_value);
+			  return false;
+			}
+		      else
+			{
+			  asection *osec;
+
+			  osec = sec->output_section;
+			  sindx = elf_section_data (osec)->dynindx;
+			  BFD_ASSERT (sindx > 0);
+			}
+
+		      outrel.r_info = ELF64_R_INFO (sindx, r_type);
+		      outrel.r_addend = relocation + rel->r_addend;
+		    }
 		}
 
 	      sreloc = elf_section_data (input_section)->sreloc;
@@ -1888,14 +1937,11 @@
 	  break;
 	}
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-	 More importantly, why do we not emit dynamic relocs for
-	 R_386_32 above in debugging sections (which are ! SEC_ALLOC)?
-	 If we had emitted the dynamic reloc, we could remove the
-	 fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+	 because such sections are not SEC_ALLOC and thus ld.so will
+	 not process them.  */
       if (unresolved_reloc
-	  && !(info->shared
-	       && (input_section->flags & SEC_DEBUGGING) != 0
+	  && !((input_section->flags & SEC_DEBUGGING) != 0
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c
index 2d791de..1c07dc8 100644
--- a/bfd/elfarm-nabi.c
+++ b/bfd/elfarm-nabi.c
@@ -749,4 +749,6 @@
 #define elf_backend_grok_prstatus	elf32_arm_nabi_grok_prstatus
 #define elf_backend_grok_psinfo		elf32_arm_nabi_grok_psinfo
 
+#ifndef ELFARM_NABI_C_INCLUDED
 #include "elf32-arm.h"
+#endif
diff --git a/bfd/elfarm-oabi.c b/bfd/elfarm-oabi.c
index 25c4d89..fb92046 100644
--- a/bfd/elfarm-oabi.c
+++ b/bfd/elfarm-oabi.c
@@ -1,5 +1,5 @@
 /* 32-bit ELF support for ARM old abi option.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -18,6 +18,14 @@
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #define OLD_ARM_ABI
+#define bfd_elf32_arm_allocate_interworking_sections \
+	bfd_elf32_arm_oabi_allocate_interworking_sections
+#define bfd_elf32_arm_get_bfd_for_interworking \
+	bfd_elf32_arm_oabi_get_bfd_for_interworking
+#define bfd_elf32_arm_process_before_allocation \
+	bfd_elf32_arm_oabi_process_before_allocation
+#define bfd_elf32_arm_add_glue_sections_to_bfd \
+	bfd_elf32_arm_oabi_add_glue_sections_to_bfd
 
 #include "elf/arm.h"
 #include "bfd.h"
@@ -29,8 +37,6 @@
 #define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
 #endif
 
-#define USE_RELA
-
 #define TARGET_LITTLE_SYM               bfd_elf32_littlearm_oabi_vec
 #define TARGET_LITTLE_NAME              "elf32-littlearm-oabi"
 #define TARGET_BIG_SYM                  bfd_elf32_bigarm_oabi_vec
@@ -417,11 +423,4 @@
   return NULL;
 }
 
-#define bfd_elf32_arm_allocate_interworking_sections \
-	bfd_elf32_arm_oabi_allocate_interworking_sections
-#define bfd_elf32_arm_get_bfd_for_interworking \
-	bfd_elf32_arm_oabi_get_bfd_for_interworking
-#define bfd_elf32_arm_process_before_allocation \
-	bfd_elf32_arm_oabi_process_before_allocation
-
 #include "elf32-arm.h"
diff --git a/bfd/elfarmqnx-nabi.c b/bfd/elfarmqnx-nabi.c
new file mode 100644
index 0000000..7647b3d
--- /dev/null
+++ b/bfd/elfarmqnx-nabi.c
@@ -0,0 +1,34 @@
+/* ARM new abi QNX specific support for 32-bit ELF
+   Copyright 2002   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.  */
+
+#define ELFARM_NABI_C_INCLUDED
+#include "elfarm-nabi.c"
+
+#include "elf32-qnx.h"
+
+#undef  TARGET_LITTLE_SYM 
+#define TARGET_LITTLE_SYM       bfd_elf32_littlearmqnx_vec
+#undef  TARGET_BIG_SYM
+#define TARGET_BIG_SYM          bfd_elf32_bigarmqnx_vec
+
+/* QNX Neutrino for ARM has a max pagesize of 0x1000.  */
+#undef  ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 	0x1000
+
+#include "elf32-arm.h"
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 203323c..eb667eb 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1,6 +1,6 @@
 /* ELF executable support for BFD.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001 Free Software Foundation, Inc.
+   2001, 2002 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -203,12 +203,14 @@
    format.  */
 
 void
-elf_swap_symbol_in (abfd, src, shndx, dst)
+elf_swap_symbol_in (abfd, psrc, pshn, dst)
      bfd *abfd;
-     const Elf_External_Sym *src;
-     const Elf_External_Sym_Shndx *shndx;
+     const PTR psrc;
+     const PTR pshn;
      Elf_Internal_Sym *dst;
 {
+  const Elf_External_Sym *src = (const Elf_External_Sym *) psrc;
+  const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn;
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
 
   dst->st_name = H_GET_32 (abfd, src->st_name);
@@ -557,9 +559,9 @@
      section header table (FIXME: See comments re sections at top of this
      file).  */
 
-  if ((elf_file_p (&x_ehdr) == false) ||
-      (x_ehdr.e_ident[EI_VERSION] != EV_CURRENT) ||
-      (x_ehdr.e_ident[EI_CLASS] != ELFCLASS))
+  if (! elf_file_p (&x_ehdr)
+      || x_ehdr.e_ident[EI_VERSION] != EV_CURRENT
+      || x_ehdr.e_ident[EI_CLASS] != ELFCLASS)
     goto got_wrong_format_error;
 
   /* Check that file's byte order matches xvec's */
@@ -622,6 +624,10 @@
   if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
     goto got_wrong_format_error;
 
+  /* Further sanity check.  */
+  if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
+    goto got_wrong_format_error;
+
   ebd = get_elf_backend_data (abfd);
 
   /* Check that the ELF e_machine field matches what this particular
@@ -675,25 +681,28 @@
   /* Remember the entry point specified in the ELF file header.  */
   bfd_set_start_address (abfd, i_ehdrp->e_entry);
 
-  /* Seek to the section header table in the file.  */
-  if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
-    goto got_no_match;
+  if (i_ehdrp->e_shoff != 0)
+    {
+      /* Seek to the section header table in the file.  */
+      if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
+	goto got_no_match;
 
-  /* Read the first section header at index 0, and convert to internal
-     form.  */
-  if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
-      != sizeof (x_shdr))
-    goto got_no_match;
-  elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
+      /* Read the first section header at index 0, and convert to internal
+	 form.  */
+      if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
+	  != sizeof (x_shdr))
+	goto got_no_match;
+      elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
 
-  /* If the section count is zero, the actual count is in the first
-     section header.  */
-  if (i_ehdrp->e_shnum == SHN_UNDEF)
-    i_ehdrp->e_shnum = i_shdr.sh_size;
+      /* If the section count is zero, the actual count is in the first
+	 section header.  */
+      if (i_ehdrp->e_shnum == SHN_UNDEF)
+	i_ehdrp->e_shnum = i_shdr.sh_size;
 
-  /* And similarly for the string table index.  */
-  if (i_ehdrp->e_shstrndx == SHN_XINDEX)
-    i_ehdrp->e_shstrndx = i_shdr.sh_link;
+      /* And similarly for the string table index.  */
+      if (i_ehdrp->e_shstrndx == SHN_XINDEX)
+	i_ehdrp->e_shstrndx = i_shdr.sh_link;
+    }
 
   /* Allocate space for a copy of the section header table in
      internal form.  */
@@ -749,7 +758,7 @@
 	}
     }
 
-  if (i_ehdrp->e_shstrndx)
+  if (i_ehdrp->e_shstrndx && i_ehdrp->e_shoff)
     {
       if (! bfd_section_from_shdr (abfd, i_ehdrp->e_shstrndx))
 	goto got_no_match;
@@ -787,7 +796,7 @@
      bfd_section_from_shdr with it (since this particular strtab is
      used to find all of the ELF section names.) */
 
-  if (i_ehdrp->e_shstrndx != 0)
+  if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff)
     {
       unsigned int num_sec;
 
@@ -812,7 +821,7 @@
      information.  */
   if (ebd->elf_backend_object_p)
     {
-      if ((*ebd->elf_backend_object_p) (abfd) == false)
+      if (! (*ebd->elf_backend_object_p) (abfd))
 	goto got_wrong_format_error;
     }
 
@@ -1124,10 +1133,12 @@
   unsigned long symcount;	/* Number of external ELF symbols */
   elf_symbol_type *sym;		/* Pointer to current bfd symbol */
   elf_symbol_type *symbase;	/* Buffer for generated bfd symbols */
-  Elf_Internal_Sym i_sym;
-  Elf_External_Sym *x_symp = NULL;
-  Elf_External_Sym_Shndx *x_shndx = NULL;
-  Elf_External_Versym *x_versymp = NULL;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
+  Elf_Internal_Sym *isymbuf = NULL;
+  Elf_External_Versym *xver;
+  Elf_External_Versym *xverbuf = NULL;
+  struct elf_backend_data *ebd;
   bfd_size_type amt;
 
   /* Read each raw ELF symbol, converting from external ELF form to
@@ -1142,24 +1153,8 @@
 
   if (! dynamic)
     {
-      Elf_Internal_Shdr *shndx_hdr;
-
       hdr = &elf_tdata (abfd)->symtab_hdr;
-      shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
       verhdr = NULL;
-
-      /* If we have a SHT_SYMTAB_SHNDX section for the symbol table,
-	 read the raw contents.  */
-      if (elf_elfsections (abfd) != NULL
-	  && elf_elfsections (abfd)[shndx_hdr->sh_link] == hdr)
-	{
-	  amt = shndx_hdr->sh_size;
-	  x_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (x_shndx == NULL
-	      || bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) x_shndx, amt, abfd) != amt)
-	    goto error_return;
-	}
     }
   else
     {
@@ -1178,39 +1173,24 @@
 	}
     }
 
-  if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0)
-    goto error_return;
-
+  ebd = get_elf_backend_data (abfd);
   symcount = hdr->sh_size / sizeof (Elf_External_Sym);
-
   if (symcount == 0)
     sym = symbase = NULL;
   else
     {
-      unsigned long i;
-
-      if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0)
-	goto error_return;
+      isymbuf = bfd_elf_get_elf_syms (abfd, hdr, symcount, 0,
+				      NULL, NULL, NULL);
+      if (isymbuf == NULL)
+	return -1;
 
       amt = symcount;
       amt *= sizeof (elf_symbol_type);
       symbase = (elf_symbol_type *) bfd_zalloc (abfd, amt);
       if (symbase == (elf_symbol_type *) NULL)
 	goto error_return;
-      sym = symbase;
-
-      /* Temporarily allocate room for the raw ELF symbols.  */
-      amt = symcount;
-      amt *= sizeof (Elf_External_Sym);
-      x_symp = (Elf_External_Sym *) bfd_malloc (amt);
-      if (x_symp == NULL)
-	goto error_return;
-
-      if (bfd_bread ((PTR) x_symp, amt, abfd) != amt)
-	goto error_return;
 
       /* Read the raw ELF version symbol information.  */
-
       if (verhdr != NULL
 	  && verhdr->sh_size / sizeof (Elf_External_Versym) != symcount)
 	{
@@ -1230,41 +1210,40 @@
 	  if (bfd_seek (abfd, verhdr->sh_offset, SEEK_SET) != 0)
 	    goto error_return;
 
-	  x_versymp = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size);
-	  if (x_versymp == NULL && verhdr->sh_size != 0)
+	  xverbuf = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size);
+	  if (xverbuf == NULL && verhdr->sh_size != 0)
 	    goto error_return;
 
-	  if (bfd_bread ((PTR) x_versymp, verhdr->sh_size, abfd)
+	  if (bfd_bread ((PTR) xverbuf, verhdr->sh_size, abfd)
 	      != verhdr->sh_size)
 	    goto error_return;
 	}
 
       /* Skip first symbol, which is a null dummy.  */
-      for (i = 1; i < symcount; i++)
+      xver = xverbuf;
+      if (xver != NULL)
+	++xver;
+      isymend = isymbuf + symcount;
+      for (isym = isymbuf + 1, sym = symbase; isym < isymend; isym++, sym++)
 	{
-	  elf_swap_symbol_in (abfd, x_symp + i,
-			      x_shndx + (x_shndx != NULL ? i : 0), &i_sym);
-	  memcpy (&sym->internal_elf_sym, &i_sym, sizeof (Elf_Internal_Sym));
-#ifdef ELF_KEEP_EXTSYM
-	  memcpy (&sym->native_elf_sym, x_symp + i, sizeof (Elf_External_Sym));
-#endif
+	  memcpy (&sym->internal_elf_sym, isym, sizeof (Elf_Internal_Sym));
 	  sym->symbol.the_bfd = abfd;
 
 	  sym->symbol.name = bfd_elf_string_from_elf_section (abfd,
 							      hdr->sh_link,
-							      i_sym.st_name);
+							      isym->st_name);
 
-	  sym->symbol.value = i_sym.st_value;
+	  sym->symbol.value = isym->st_value;
 
-	  if (i_sym.st_shndx == SHN_UNDEF)
+	  if (isym->st_shndx == SHN_UNDEF)
 	    {
 	      sym->symbol.section = bfd_und_section_ptr;
 	    }
-	  else if (i_sym.st_shndx < SHN_LORESERVE
-		   || i_sym.st_shndx > SHN_HIRESERVE)
+	  else if (isym->st_shndx < SHN_LORESERVE
+		   || isym->st_shndx > SHN_HIRESERVE)
 	    {
 	      sym->symbol.section = section_from_elf_index (abfd,
-							    i_sym.st_shndx);
+							    isym->st_shndx);
 	      if (sym->symbol.section == NULL)
 		{
 		  /* This symbol is in a section for which we did not
@@ -1273,18 +1252,18 @@
 		  sym->symbol.section = bfd_abs_section_ptr;
 		}
 	    }
-	  else if (i_sym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    {
 	      sym->symbol.section = bfd_abs_section_ptr;
 	    }
-	  else if (i_sym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    {
 	      sym->symbol.section = bfd_com_section_ptr;
 	      /* Elf puts the alignment into the `value' field, and
 		 the size into the `size' field.  BFD wants to see the
 		 size in the value field, and doesn't care (at the
 		 moment) about the alignment.  */
-	      sym->symbol.value = i_sym.st_size;
+	      sym->symbol.value = isym->st_size;
 	    }
 	  else
 	    sym->symbol.section = bfd_abs_section_ptr;
@@ -1294,14 +1273,13 @@
 	  if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
 	    sym->symbol.value -= sym->symbol.section->vma;
 
-	  switch (ELF_ST_BIND (i_sym.st_info))
+	  switch (ELF_ST_BIND (isym->st_info))
 	    {
 	    case STB_LOCAL:
 	      sym->symbol.flags |= BSF_LOCAL;
 	      break;
 	    case STB_GLOBAL:
-	      if (i_sym.st_shndx != SHN_UNDEF
-		  && i_sym.st_shndx != SHN_COMMON)
+	      if (isym->st_shndx != SHN_UNDEF && isym->st_shndx != SHN_COMMON)
 		sym->symbol.flags |= BSF_GLOBAL;
 	      break;
 	    case STB_WEAK:
@@ -1309,7 +1287,7 @@
 	      break;
 	    }
 
-	  switch (ELF_ST_TYPE (i_sym.st_info))
+	  switch (ELF_ST_TYPE (isym->st_info))
 	    {
 	    case STT_SECTION:
 	      sym->symbol.flags |= BSF_SECTION_SYM | BSF_DEBUGGING;
@@ -1328,31 +1306,24 @@
 	  if (dynamic)
 	    sym->symbol.flags |= BSF_DYNAMIC;
 
-	  if (x_versymp != NULL)
+	  if (xver != NULL)
 	    {
 	      Elf_Internal_Versym iversym;
 
-	      _bfd_elf_swap_versym_in (abfd, x_versymp + i, &iversym);
+	      _bfd_elf_swap_versym_in (abfd, xver, &iversym);
 	      sym->version = iversym.vs_vers;
+	      xver++;
 	    }
 
 	  /* Do some backend-specific processing on this symbol.  */
-	  {
-	    struct elf_backend_data *ebd = get_elf_backend_data (abfd);
-	    if (ebd->elf_backend_symbol_processing)
-	      (*ebd->elf_backend_symbol_processing) (abfd, &sym->symbol);
-	  }
-
-	  sym++;
+	  if (ebd->elf_backend_symbol_processing)
+	    (*ebd->elf_backend_symbol_processing) (abfd, &sym->symbol);
 	}
     }
 
   /* Do some backend-specific processing on this symbol table.  */
-  {
-    struct elf_backend_data *ebd = get_elf_backend_data (abfd);
-    if (ebd->elf_backend_symbol_table_processing)
-      (*ebd->elf_backend_symbol_table_processing) (abfd, symbase, symcount);
-  }
+  if (ebd->elf_backend_symbol_table_processing)
+    (*ebd->elf_backend_symbol_table_processing) (abfd, symbase, symcount);
 
   /* We rely on the zalloc to clear out the final symbol entry.  */
 
@@ -1372,21 +1343,17 @@
       *symptrs = 0;		/* Final null pointer */
     }
 
-  if (x_shndx != NULL)
-    free (x_shndx);
-  if (x_versymp != NULL)
-    free (x_versymp);
-  if (x_symp != NULL)
-    free (x_symp);
+  if (xverbuf != NULL)
+    free (xverbuf);
+  if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
   return symcount;
 
 error_return:
-  if (x_shndx != NULL)
-    free (x_shndx);
-  if (x_versymp != NULL)
-    free (x_versymp);
-  if (x_symp != NULL)
-    free (x_symp);
+  if (xverbuf != NULL)
+    free (xverbuf);
+  if (isymbuf != NULL && hdr->contents != (unsigned char *) isymbuf)
+    free (isymbuf);
   return -1;
 }
 
@@ -1695,6 +1662,7 @@
   elf_write_out_phdrs,
   elf_write_shdrs_and_ehdr,
   elf_write_relocs,
+  elf_swap_symbol_in,
   elf_swap_symbol_out,
   elf_slurp_reloc_table,
   elf_slurp_symbol_table,
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index c206af5..7db5f72 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -1,5 +1,5 @@
 /* ELF core file support for BFD.
-   Copyright 1995, 1996, 1997, 1998, 2000, 2001
+   Copyright 1995, 1996, 1997, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -100,7 +100,7 @@
     }
 
   /* Check the magic number.  */
-  if (elf_file_p (&x_ehdr) == false)
+  if (! elf_file_p (&x_ehdr))
     goto wrong;
 
   /* FIXME: Check EI_VERSION here ! */
@@ -244,7 +244,7 @@
      information.  */
   if (ebd->elf_backend_object_p)
     {
-      if ((*ebd->elf_backend_object_p) (abfd) == false)
+      if (! (*ebd->elf_backend_object_p) (abfd))
 	goto wrong;
     }
 
diff --git a/bfd/elflink.c b/bfd/elflink.c
index e74fae9..f8cc645 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -278,11 +278,13 @@
 	}
       else
 	{
-	  alc = bfd_malloc ((bfd_size_type) (p - name + 1));
+	  size_t len = p - name + 1;
+
+	  alc = bfd_malloc ((bfd_size_type) len);
 	  if (alc == NULL)
 	    return false;
-	  strncpy (alc, name, (size_t) (p - name));
-	  alc[p - name] = '\0';
+	  memcpy (alc, name, len - 1);
+	  alc[len - 1] = '\0';
 	  name = alc;
 	  copy = true;
 	}
@@ -300,6 +302,98 @@
   return true;
 }
 
+/* Record a new local dynamic symbol.  Returns 0 on failure, 1 on
+   success, and 2 on a failure caused by attempting to record a symbol
+   in a discarded section, eg. a discarded link-once section symbol.  */
+
+int
+elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
+     struct bfd_link_info *info;
+     bfd *input_bfd;
+     long input_indx;
+{
+  bfd_size_type amt;
+  struct elf_link_local_dynamic_entry *entry;
+  struct elf_link_hash_table *eht;
+  struct elf_strtab_hash *dynstr;
+  unsigned long dynstr_index;
+  char *name;
+  Elf_External_Sym_Shndx eshndx;
+  char esym[sizeof (Elf64_External_Sym)];
+
+  if (! is_elf_hash_table (info))
+    return 0;
+
+  /* See if the entry exists already.  */
+  for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
+    if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
+      return 1;
+
+  amt = sizeof (*entry);
+  entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt);
+  if (entry == NULL)
+    return 0;
+
+  /* Go find the symbol, so that we can find it's name.  */
+  if (!bfd_elf_get_elf_syms (input_bfd, &elf_tdata (input_bfd)->symtab_hdr,
+			     (size_t) 1, (size_t) input_indx,
+			     &entry->isym, esym, &eshndx))
+    {
+      bfd_release (input_bfd, entry);
+      return 0;
+    }
+
+  if (entry->isym.st_shndx != SHN_UNDEF
+      && (entry->isym.st_shndx < SHN_LORESERVE
+	  || entry->isym.st_shndx > SHN_HIRESERVE))
+    {
+      asection *s;
+
+      s = bfd_section_from_elf_index (input_bfd, entry->isym.st_shndx);
+      if (s == NULL || bfd_is_abs_section (s->output_section))
+	{
+	  /* We can still bfd_release here as nothing has done another
+	     bfd_alloc.  We can't do this later in this function.  */
+	  bfd_release (input_bfd, entry);
+	  return 2;
+	}
+    }
+
+  name = (bfd_elf_string_from_elf_section
+	  (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
+	   entry->isym.st_name));
+
+  dynstr = elf_hash_table (info)->dynstr;
+  if (dynstr == NULL)
+    {
+      /* Create a strtab to hold the dynamic symbol names.  */
+      elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
+      if (dynstr == NULL)
+	return 0;
+    }
+
+  dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
+  if (dynstr_index == (unsigned long) -1)
+    return 0;
+  entry->isym.st_name = dynstr_index;
+
+  eht = elf_hash_table (info);
+
+  entry->next = eht->dynlocal;
+  eht->dynlocal = entry;
+  entry->input_bfd = input_bfd;
+  entry->input_indx = input_indx;
+  eht->dynsymcount++;
+
+  /* Whatever binding the symbol had before, it's now local.  */
+  entry->isym.st_info
+    = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
+
+  /* The dynindx will be set at the end of size_dynamic_sections.  */
+
+  return 1;
+}
+
 /* Return the dynindex of a local dynamic symbol.  */
 
 long
@@ -355,7 +449,8 @@
     {
       asection *p;
       for (p = output_bfd->sections; p ; p = p->next)
-	elf_section_data (p)->dynindx = ++dynsymcount;
+	if ((p->flags & SEC_EXCLUDE) == 0)
+	  elf_section_data (p)->dynindx = ++dynsymcount;
     }
 
   if (elf_hash_table (info)->dynlocal)
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 5046416..638f80a 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -149,18 +149,13 @@
      carsym * symdef;
 {
   Elf_Internal_Shdr * hdr;
-  Elf_Internal_Shdr * shndx_hdr;
-  Elf_External_Sym *  esym;
-  Elf_External_Sym *  esymend;
-  Elf_External_Sym *  buf = NULL;
-  Elf_External_Sym_Shndx * shndx_buf = NULL;
-  Elf_External_Sym_Shndx * shndx;
   bfd_size_type symcount;
   bfd_size_type extsymcount;
   bfd_size_type extsymoff;
-  boolean result = false;
-  file_ptr pos;
-  bfd_size_type amt;
+  Elf_Internal_Sym *isymbuf;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
+  boolean result;
 
   abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset);
   if (abfd == (bfd *) NULL)
@@ -178,15 +173,9 @@
 
   /* Select the appropriate symbol table.  */
   if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0)
-    {
-      hdr = &elf_tdata (abfd)->symtab_hdr;
-      shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-    }
+    hdr = &elf_tdata (abfd)->symtab_hdr;
   else
-    {
-      hdr = &elf_tdata (abfd)->dynsymtab_hdr;
-      shndx_hdr = NULL;
-    }
+    hdr = &elf_tdata (abfd)->dynsymtab_hdr;
 
   symcount = hdr->sh_size / sizeof (Elf_External_Sym);
 
@@ -203,58 +192,34 @@
       extsymoff = hdr->sh_info;
     }
 
-  amt = extsymcount * sizeof (Elf_External_Sym);
-  buf = (Elf_External_Sym *) bfd_malloc (amt);
-  if (buf == NULL && extsymcount != 0)
+  if (extsymcount == 0)
     return false;
 
-  /* Read in the symbol table.
-     FIXME:  This ought to be cached somewhere.  */
-  pos = hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym);
-  if (bfd_seek (abfd, pos, SEEK_SET) != 0
-      || bfd_bread ((PTR) buf, amt, abfd) != amt)
-    goto error_exit;
-
-  if (shndx_hdr != NULL && shndx_hdr->sh_size != 0)
-    {
-      amt = extsymcount * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-      if (shndx_buf == NULL && extsymcount != 0)
-	goto error_exit;
-
-      pos = shndx_hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym_Shndx);
-      if (bfd_seek (abfd, pos, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
-	goto error_exit;
-    }
+  /* Read in the symbol table.  */
+  isymbuf = bfd_elf_get_elf_syms (abfd, hdr, extsymcount, extsymoff,
+				  NULL, NULL, NULL);
+  if (isymbuf == NULL)
+    return false;
 
   /* Scan the symbol table looking for SYMDEF.  */
-  esymend = buf + extsymcount;
-  for (esym = buf, shndx = shndx_buf;
-       esym < esymend;
-       esym++, shndx = (shndx != NULL ? shndx + 1 : NULL))
+  result = false;
+  for (isym = isymbuf, isymend = isymbuf + extsymcount; isym < isymend; isym++)
     {
-      Elf_Internal_Sym sym;
-      const char * name;
+      const char *name;
 
-      elf_swap_symbol_in (abfd, esym, shndx, &sym);
-
-      name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name);
+      name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
+					      isym->st_name);
       if (name == (const char *) NULL)
 	break;
 
       if (strcmp (name, symdef->name) == 0)
 	{
-	  result = is_global_data_symbol_definition (abfd, & sym);
+	  result = is_global_data_symbol_definition (abfd, isym);
 	  break;
 	}
     }
 
- error_exit:
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (buf != NULL)
-    free (buf);
+  free (isymbuf);
 
   return result;
 }
@@ -313,12 +278,10 @@
     return true;
   amt = c;
   amt *= sizeof (boolean);
-  defined = (boolean *) bfd_malloc (amt);
-  included = (boolean *) bfd_malloc (amt);
+  defined = (boolean *) bfd_zmalloc (amt);
+  included = (boolean *) bfd_zmalloc (amt);
   if (defined == (boolean *) NULL || included == (boolean *) NULL)
     goto error_return;
-  memset (defined, 0, (size_t) amt);
-  memset (included, 0, (size_t) amt);
 
   symdefs = bfd_ardata (abfd)->symdefs;
 
@@ -355,26 +318,40 @@
 	  if (h == NULL)
 	    {
 	      char *p, *copy;
+	      size_t len, first;
 
 	      /* If this is a default version (the name contains @@),
-		 look up the symbol again without the version.  The
-		 effect is that references to the symbol without the
-		 version will be matched by the default symbol in the
-		 archive.  */
+		 look up the symbol again with only one `@' as well
+		 as without the version.  The effect is that references
+		 to the symbol with and without the version will be
+		 matched by the default symbol in the archive.  */
 
 	      p = strchr (symdef->name, ELF_VER_CHR);
 	      if (p == NULL || p[1] != ELF_VER_CHR)
 		continue;
 
-	      copy = bfd_alloc (abfd, (bfd_size_type) (p - symdef->name + 1));
+	      /* First check with only one `@'.  */
+	      len = strlen (symdef->name);
+	      copy = bfd_alloc (abfd, (bfd_size_type) len);
 	      if (copy == NULL)
 		goto error_return;
-	      memcpy (copy, symdef->name, (size_t) (p - symdef->name));
-	      copy[p - symdef->name] = '\0';
+	      first = p - symdef->name + 1;
+	      memcpy (copy, symdef->name, first);
+	      memcpy (copy + first, symdef->name + first + 1, len - first);
 
 	      h = elf_link_hash_lookup (elf_hash_table (info), copy,
 					false, false, false);
 
+	      if (h == NULL)
+		{
+		  /* We also need to check references to the symbol
+		     without the version.  */
+
+		  copy[first - 1] = '\0';
+		  h = elf_link_hash_lookup (elf_hash_table (info),
+					    copy, false, false, false);
+		}
+
 	      bfd_release (abfd, copy);
 	    }
 
@@ -922,19 +899,19 @@
 
 /* This function is called to create an indirect symbol from the
    default for the symbol with the default version if needed. The
-   symbol is described by H, NAME, SYM, SEC, VALUE, and OVERRIDE.  We
+   symbol is described by H, NAME, SYM, PSEC, VALUE, and OVERRIDE.  We
    set DYNSYM if the new indirect symbol is dynamic. DT_NEEDED
    indicates if it comes from a DT_NEEDED entry of a shared object.  */
 
 static boolean
-elf_add_default_symbol (abfd, info, h, name, sym, sec, value,
+elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
 			dynsym, override, dt_needed)
      bfd *abfd;
      struct bfd_link_info *info;
      struct elf_link_hash_entry *h;
      const char *name;
      Elf_Internal_Sym *sym;
-     asection **sec;
+     asection **psec;
      bfd_vma *value;
      boolean *dynsym;
      boolean override;
@@ -948,6 +925,8 @@
   boolean collect;
   boolean dynamic;
   char *p;
+  size_t len, shortlen;
+  asection *sec;
 
   /* If this symbol has a version, and it is the default version, we
      create an indirect symbol from the default name to the fully
@@ -960,7 +939,7 @@
   if (override)
     {
       /* We are overridden by an old defition. We need to check if we
-	 need to crreate the indirect symbol from the default name.  */
+	 need to create the indirect symbol from the default name.  */
       hi = elf_link_hash_lookup (elf_hash_table (info), name, true,
 				 false, false);
       BFD_ASSERT (hi != NULL);
@@ -979,12 +958,12 @@
   collect = bed->collect;
   dynamic = (abfd->flags & DYNAMIC) != 0;
 
-  shortname = bfd_hash_allocate (&info->hash->table,
-				 (size_t) (p - name + 1));
+  shortlen = p - name;
+  shortname = bfd_hash_allocate (&info->hash->table, shortlen + 1);
   if (shortname == NULL)
     return false;
-  strncpy (shortname, name, (size_t) (p - name));
-  shortname [p - name] = '\0';
+  memcpy (shortname, name, shortlen);
+  shortname[shortlen] = '\0';
 
   /* We are going to create a new symbol.  Merge it with any existing
      symbol with this name.  For the purposes of the merge, act as
@@ -992,7 +971,8 @@
      actually going to define an indirect symbol.  */
   type_change_ok = false;
   size_change_ok = false;
-  if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value,
+  sec = *psec;
+  if (! elf_merge_symbol (abfd, info, shortname, sym, &sec, value,
 			  &hi, &override, &type_change_ok,
 			  &size_change_ok, dt_needed))
     return false;
@@ -1064,7 +1044,7 @@
 		      | ELF_LINK_HASH_DEF_REGULAR)) == 0);
 
       ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
-      (*bed->elf_backend_copy_indirect_symbol) (ht, hi);
+      (*bed->elf_backend_copy_indirect_symbol) (bed, ht, hi);
 
       /* See if the new flags lead us to realize that the symbol must
 	 be dynamic.  */
@@ -1089,16 +1069,18 @@
   /* We also need to define an indirection from the nondefault version
      of the symbol.  */
 
-  shortname = bfd_hash_allocate (&info->hash->table, strlen (name));
+  len = strlen (name);
+  shortname = bfd_hash_allocate (&info->hash->table, len);
   if (shortname == NULL)
     return false;
-  strncpy (shortname, name, (size_t) (p - name));
-  strcpy (shortname + (p - name), p + 1);
+  memcpy (shortname, name, shortlen);
+  memcpy (shortname + shortlen, p + 1, len - shortlen);
 
   /* Once again, merge with any existing symbol.  */
   type_change_ok = false;
   size_change_ok = false;
-  if (! elf_merge_symbol (abfd, info, shortname, sym, sec, value,
+  sec = *psec;
+  if (! elf_merge_symbol (abfd, info, shortname, sym, &sec, value,
 			  &hi, &override, &type_change_ok,
 			  &size_change_ok, dt_needed))
     return false;
@@ -1106,10 +1088,13 @@
   if (override)
     {
       /* Here SHORTNAME is a versioned name, so we don't expect to see
-	 the type of override we do in the case above.  */
-      (*_bfd_error_handler)
-	(_("%s: warning: unexpected redefinition of `%s'"),
-	 bfd_archive_filename (abfd), shortname);
+	 the type of override we do in the case above unless it is
+	 overridden by a versioned definiton.  */
+      if (hi->root.type != bfd_link_hash_defined
+	  && hi->root.type != bfd_link_hash_defweak)
+	(*_bfd_error_handler)
+	  (_("%s: warning: unexpected redefinition of indirect versioned symbol `%s'"),
+	   bfd_archive_filename (abfd), shortname);
     }
   else
     {
@@ -1131,7 +1116,7 @@
 		       & (ELF_LINK_HASH_DEF_DYNAMIC
 			  | ELF_LINK_HASH_DEF_REGULAR)) == 0);
 
-	  (*bed->elf_backend_copy_indirect_symbol) (h, hi);
+	  (*bed->elf_backend_copy_indirect_symbol) (bed, h, hi);
 
 	  /* See if the new flags lead us to realize that the symbol
 	     must be dynamic.  */
@@ -1172,25 +1157,20 @@
 				   asection *, const Elf_Internal_Rela *));
   boolean collect;
   Elf_Internal_Shdr *hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   bfd_size_type symcount;
   bfd_size_type extsymcount;
   bfd_size_type extsymoff;
-  Elf_External_Sym *buf = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
-  Elf_External_Sym_Shndx *shndx;
   struct elf_link_hash_entry **sym_hash;
   boolean dynamic;
   Elf_External_Versym *extversym = NULL;
   Elf_External_Versym *ever;
-  Elf_External_Dyn *dynbuf = NULL;
   struct elf_link_hash_entry *weaks;
-  Elf_External_Sym *esym;
-  Elf_External_Sym *esymend;
+  Elf_Internal_Sym *isymbuf = NULL;
+  Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
   struct elf_backend_data *bed;
   boolean dt_needed;
   struct elf_link_hash_table * hash_table;
-  file_ptr pos;
   bfd_size_type amt;
 
   hash_table = elf_hash_table (info);
@@ -1289,85 +1269,7 @@
 	}
     }
 
-  /* If this is a dynamic object, we always link against the .dynsym
-     symbol table, not the .symtab symbol table.  The dynamic linker
-     will only see the .dynsym symbol table, so there is no reason to
-     look at .symtab for a dynamic object.  */
-
-  if (! dynamic || elf_dynsymtab (abfd) == 0)
-    {
-      hdr = &elf_tdata (abfd)->symtab_hdr;
-      shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-    }
-  else
-    {
-      hdr = &elf_tdata (abfd)->dynsymtab_hdr;
-      shndx_hdr = NULL;
-    }
-
-  if (dynamic)
-    {
-      /* Read in any version definitions.  */
-
-      if (! _bfd_elf_slurp_version_tables (abfd))
-	goto error_return;
-
-      /* Read in the symbol versions, but don't bother to convert them
-	 to internal format.  */
-      if (elf_dynversym (abfd) != 0)
-	{
-	  Elf_Internal_Shdr *versymhdr;
-
-	  versymhdr = &elf_tdata (abfd)->dynversym_hdr;
-	  extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
-	  if (extversym == NULL)
-	    goto error_return;
-	  amt = versymhdr->sh_size;
-	  if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread ((PTR) extversym, amt, abfd) != amt)
-	    goto error_return;
-	}
-    }
-
-  symcount = hdr->sh_size / sizeof (Elf_External_Sym);
-
-  /* The sh_info field of the symtab header tells us where the
-     external symbols start.  We don't care about the local symbols at
-     this point.  */
-  if (elf_bad_symtab (abfd))
-    {
-      extsymcount = symcount;
-      extsymoff = 0;
-    }
-  else
-    {
-      extsymcount = symcount - hdr->sh_info;
-      extsymoff = hdr->sh_info;
-    }
-
-  amt = extsymcount * sizeof (Elf_External_Sym);
-  buf = (Elf_External_Sym *) bfd_malloc (amt);
-  if (buf == NULL && extsymcount != 0)
-    goto error_return;
-
-  if (shndx_hdr != NULL && shndx_hdr->sh_size != 0)
-    {
-      amt = extsymcount * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-      if (shndx_buf == NULL && extsymcount != 0)
-	goto error_return;
-    }
-
-  /* We store a pointer to the hash table entry for each external
-     symbol.  */
-  amt = extsymcount * sizeof (struct elf_link_hash_entry *);
-  sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt);
-  if (sym_hash == NULL)
-    goto error_return;
-  elf_sym_hashes (abfd) = sym_hash;
-
   dt_needed = false;
-
   if (! dynamic)
     {
       /* If we are creating a shared library, create all the dynamic
@@ -1417,6 +1319,7 @@
       s = bfd_get_section_by_name (abfd, ".dynamic");
       if (s != NULL)
 	{
+	  Elf_External_Dyn *dynbuf = NULL;
 	  Elf_External_Dyn *extdyn;
 	  Elf_External_Dyn *extdynend;
 	  int elfsec;
@@ -1430,30 +1333,13 @@
 
 	  if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf,
 					  (file_ptr) 0, s->_raw_size))
-	    goto error_return;
+	    goto error_free_dyn;
 
 	  elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
 	  if (elfsec == -1)
-	    goto error_return;
+	    goto error_free_dyn;
 	  shlink = elf_elfsections (abfd)[elfsec]->sh_link;
 
-	  {
-	    /* The shared libraries distributed with hpux11 have a bogus
-	       sh_link field for the ".dynamic" section.  This code detects
-	       when SHLINK refers to a section that is not a string table
-	       and tries to find the string table for the ".dynsym" section
-	       instead.  */
-	    Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[shlink];
-	    if (shdr->sh_type != SHT_STRTAB)
-	      {
-		asection *ds = bfd_get_section_by_name (abfd, ".dynsym");
-		int elfdsec = _bfd_elf_section_from_bfd_section (abfd, ds);
-		if (elfdsec == -1)
-		  goto error_return;
-		shlink = elf_elfsections (abfd)[elfdsec]->sh_link;
-	      }
-	  }
-
 	  extdyn = dynbuf;
 	  extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn);
 	  rpath = 0;
@@ -1468,7 +1354,7 @@
 		  unsigned int tagv = dyn.d_un.d_val;
 		  name = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
 		  if (name == NULL)
-		    goto error_return;
+		    goto error_free_dyn;
 		}
 	      if (dyn.d_tag == DT_NEEDED)
 		{
@@ -1480,11 +1366,12 @@
 		  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
 		  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
 		  if (n == NULL || fnm == NULL)
-		    goto error_return;
-		  anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1);
+		    goto error_free_dyn;
+		  amt = strlen (fnm) + 1;
+		  anm = bfd_alloc (abfd, amt);
 		  if (anm == NULL)
-		    goto error_return;
-		  strcpy (anm, fnm);
+		    goto error_free_dyn;
+		  memcpy (anm, fnm, (size_t) amt);
 		  n->name = anm;
 		  n->by = abfd;
 		  n->next = NULL;
@@ -1511,11 +1398,12 @@
 		  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
 		  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
 		  if (n == NULL || fnm == NULL)
-		    goto error_return;
-		  anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1);
+		    goto error_free_dyn;
+		  amt = strlen (fnm) + 1;
+		  anm = bfd_alloc (abfd, amt);
 		  if (anm == NULL)
-		    goto error_return;
-		  strcpy (anm, fnm);
+		    goto error_free_dyn;
+		  memcpy (anm, fnm, (size_t) amt);
 		  n->name = anm;
 		  n->by = abfd;
 		  n->next = NULL;
@@ -1538,11 +1426,16 @@
 		  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
 		  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
 		  if (n == NULL || fnm == NULL)
-		    goto error_return;
-		  anm = bfd_alloc (abfd, (bfd_size_type) strlen (fnm) + 1);
+		    goto error_free_dyn;
+		  amt = strlen (fnm) + 1;
+		  anm = bfd_alloc (abfd, amt);
 		  if (anm == NULL)
-		    goto error_return;
-		  strcpy (anm, fnm);
+		    {
+		    error_free_dyn:
+		      free (dynbuf);
+		      goto error_return;
+		    }
+		  memcpy (anm, fnm, (size_t) amt);
 		  n->name = anm;
 		  n->by = abfd;
 		  n->next = NULL;
@@ -1556,7 +1449,6 @@
 	    }
 
 	  free (dynbuf);
-	  dynbuf = NULL;
 	}
 
       /* We do not want to include any of the sections in a dynamic
@@ -1606,10 +1498,6 @@
 		  if (dyn.d_tag == DT_NEEDED
 		      && dyn.d_un.d_val == strindex)
 		    {
-		      if (buf != NULL)
-			free (buf);
-		      if (extversym != NULL)
-			free (extversym);
 		      _bfd_elf_strtab_delref (hash_table->dynstr, strindex);
 		      return true;
 		    }
@@ -1627,31 +1515,79 @@
       elf_dt_name (abfd) = name;
     }
 
-  pos = hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym);
-  amt = extsymcount * sizeof (Elf_External_Sym);
-  if (bfd_seek (abfd, pos, SEEK_SET) != 0
-      || bfd_bread ((PTR) buf, amt, abfd) != amt)
-    goto error_return;
+  /* If this is a dynamic object, we always link against the .dynsym
+     symbol table, not the .symtab symbol table.  The dynamic linker
+     will only see the .dynsym symbol table, so there is no reason to
+     look at .symtab for a dynamic object.  */
 
-  if (shndx_hdr != NULL && shndx_hdr->sh_size != 0)
+  if (! dynamic || elf_dynsymtab (abfd) == 0)
+    hdr = &elf_tdata (abfd)->symtab_hdr;
+  else
+    hdr = &elf_tdata (abfd)->dynsymtab_hdr;
+
+  symcount = hdr->sh_size / sizeof (Elf_External_Sym);
+
+  /* The sh_info field of the symtab header tells us where the
+     external symbols start.  We don't care about the local symbols at
+     this point.  */
+  if (elf_bad_symtab (abfd))
     {
-      amt = extsymcount * sizeof (Elf_External_Sym_Shndx);
-      pos = shndx_hdr->sh_offset + extsymoff * sizeof (Elf_External_Sym_Shndx);
-      if (bfd_seek (abfd, pos, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
+      extsymcount = symcount;
+      extsymoff = 0;
+    }
+  else
+    {
+      extsymcount = symcount - hdr->sh_info;
+      extsymoff = hdr->sh_info;
+    }
+
+  sym_hash = NULL;
+  if (extsymcount != 0)
+    {
+      isymbuf = bfd_elf_get_elf_syms (abfd, hdr, extsymcount, extsymoff,
+				      NULL, NULL, NULL);
+      if (isymbuf == NULL)
 	goto error_return;
+
+      /* We store a pointer to the hash table entry for each external
+	 symbol.  */
+      amt = extsymcount * sizeof (struct elf_link_hash_entry *);
+      sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt);
+      if (sym_hash == NULL)
+	goto error_free_sym;
+      elf_sym_hashes (abfd) = sym_hash;
+    }
+
+  if (dynamic)
+    {
+      /* Read in any version definitions.  */
+      if (! _bfd_elf_slurp_version_tables (abfd))
+	goto error_free_sym;
+
+      /* Read in the symbol versions, but don't bother to convert them
+	 to internal format.  */
+      if (elf_dynversym (abfd) != 0)
+	{
+	  Elf_Internal_Shdr *versymhdr;
+
+	  versymhdr = &elf_tdata (abfd)->dynversym_hdr;
+	  extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
+	  if (extversym == NULL)
+	    goto error_free_sym;
+	  amt = versymhdr->sh_size;
+	  if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
+	      || bfd_bread ((PTR) extversym, amt, abfd) != amt)
+	    goto error_free_vers;
+	}
     }
 
   weaks = NULL;
 
   ever = extversym != NULL ? extversym + extsymoff : NULL;
-  esymend = buf + extsymcount;
-  for (esym = buf, shndx = shndx_buf;
-       esym < esymend;
-       esym++, sym_hash++, ever = (ever != NULL ? ever + 1 : NULL),
-	 shndx = (shndx != NULL ? shndx + 1 : NULL))
+  for (isym = isymbuf, isymend = isymbuf + extsymcount;
+       isym < isymend;
+       isym++, sym_hash++, ever = (ever != NULL ? ever + 1 : NULL))
     {
-      Elf_Internal_Sym sym;
       int bind;
       bfd_vma value;
       asection *sec;
@@ -1666,14 +1602,12 @@
 
       override = false;
 
-      elf_swap_symbol_in (abfd, esym, shndx, &sym);
-
       flags = BSF_NO_FLAGS;
       sec = NULL;
-      value = sym.st_value;
+      value = isym->st_value;
       *sym_hash = NULL;
 
-      bind = ELF_ST_BIND (sym.st_info);
+      bind = ELF_ST_BIND (isym->st_info);
       if (bind == STB_LOCAL)
 	{
 	  /* This should be impossible, since ELF requires that all
@@ -1684,8 +1618,8 @@
 	}
       else if (bind == STB_GLOBAL)
 	{
-	  if (sym.st_shndx != SHN_UNDEF
-	      && sym.st_shndx != SHN_COMMON)
+	  if (isym->st_shndx != SHN_UNDEF
+	      && isym->st_shndx != SHN_COMMON)
 	    flags = BSF_GLOBAL;
 	}
       else if (bind == STB_WEAK)
@@ -1695,35 +1629,37 @@
 	  /* Leave it up to the processor backend.  */
 	}
 
-      if (sym.st_shndx == SHN_UNDEF)
+      if (isym->st_shndx == SHN_UNDEF)
 	sec = bfd_und_section_ptr;
-      else if (sym.st_shndx < SHN_LORESERVE || sym.st_shndx > SHN_HIRESERVE)
+      else if (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
 	{
-	  sec = section_from_elf_index (abfd, sym.st_shndx);
+	  sec = section_from_elf_index (abfd, isym->st_shndx);
 	  if (sec == NULL)
 	    sec = bfd_abs_section_ptr;
 	  else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
 	    value -= sec->vma;
 	}
-      else if (sym.st_shndx == SHN_ABS)
+      else if (isym->st_shndx == SHN_ABS)
 	sec = bfd_abs_section_ptr;
-      else if (sym.st_shndx == SHN_COMMON)
+      else if (isym->st_shndx == SHN_COMMON)
 	{
 	  sec = bfd_com_section_ptr;
 	  /* What ELF calls the size we call the value.  What ELF
 	     calls the value we call the alignment.  */
-	  value = sym.st_size;
+	  value = isym->st_size;
 	}
       else
 	{
 	  /* Leave it up to the processor backend.  */
 	}
 
-      name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link, sym.st_name);
+      name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
+					      isym->st_name);
       if (name == (const char *) NULL)
-	goto error_return;
+	goto error_free_vers;
 
-      if (sym.st_shndx == SHN_COMMON && ELF_ST_TYPE (sym.st_info) == STT_TLS)
+      if (isym->st_shndx == SHN_COMMON
+	  && ELF_ST_TYPE (isym->st_info) == STT_TLS)
 	{
 	  asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon");
 
@@ -1735,15 +1671,15 @@
 							   | SEC_IS_COMMON
 							   | SEC_LINKER_CREATED
 							   | SEC_THREAD_LOCAL)))
-		goto error_return;
+		goto error_free_vers;
 	    }
 	  sec = tcomm;
 	}
       else if (add_symbol_hook)
 	{
-	  if (! (*add_symbol_hook) (abfd, info, &sym, &name, &flags, &sec,
+	  if (! (*add_symbol_hook) (abfd, info, isym, &name, &flags, &sec,
 				    &value))
-	    goto error_return;
+	    goto error_free_vers;
 
 	  /* The hook function sets the name to NULL if this symbol
 	     should be skipped for some reason.  */
@@ -1755,7 +1691,7 @@
       if (sec == (asection *) NULL)
 	{
 	  bfd_set_error (bfd_error_bad_value);
-	  goto error_return;
+	  goto error_free_vers;
 	}
 
       if (bfd_is_und_section (sec)
@@ -1786,11 +1722,10 @@
 		  || (vernum > 1 && ! bfd_is_abs_section (sec)))
 		{
 		  const char *verstr;
-		  unsigned int namelen;
-		  bfd_size_type newlen;
+		  size_t namelen, verlen, newlen;
 		  char *newname, *p;
 
-		  if (sym.st_shndx != SHN_UNDEF)
+		  if (isym->st_shndx != SHN_UNDEF)
 		    {
 		      if (vernum > elf_tdata (abfd)->dynverdef_hdr.sh_info)
 			{
@@ -1799,7 +1734,7 @@
 			     bfd_archive_filename (abfd), name, vernum,
 			     elf_tdata (abfd)->dynverdef_hdr.sh_info);
 			  bfd_set_error (bfd_error_bad_value);
-			  goto error_return;
+			  goto error_free_vers;
 			}
 		      else if (vernum > 1)
 			verstr =
@@ -1839,37 +1774,39 @@
 			    (_("%s: %s: invalid needed version %d"),
 			     bfd_archive_filename (abfd), name, vernum);
 			  bfd_set_error (bfd_error_bad_value);
-			  goto error_return;
+			  goto error_free_vers;
 			}
 		    }
 
 		  namelen = strlen (name);
-		  newlen = namelen + strlen (verstr) + 2;
-		  if ((iver.vs_vers & VERSYM_HIDDEN) == 0)
+		  verlen = strlen (verstr);
+		  newlen = namelen + verlen + 2;
+		  if ((iver.vs_vers & VERSYM_HIDDEN) == 0
+		      && isym->st_shndx != SHN_UNDEF)
 		    ++newlen;
 
-		  newname = (char *) bfd_alloc (abfd, newlen);
+		  newname = (char *) bfd_alloc (abfd, (bfd_size_type) newlen);
 		  if (newname == NULL)
-		    goto error_return;
-		  strcpy (newname, name);
+		    goto error_free_vers;
+		  memcpy (newname, name, namelen);
 		  p = newname + namelen;
 		  *p++ = ELF_VER_CHR;
 		  /* If this is a defined non-hidden version symbol,
 		     we add another @ to the name.  This indicates the
 		     default version of the symbol.  */
 		  if ((iver.vs_vers & VERSYM_HIDDEN) == 0
-		      && sym.st_shndx != SHN_UNDEF)
+		      && isym->st_shndx != SHN_UNDEF)
 		    *p++ = ELF_VER_CHR;
-		  strcpy (p, verstr);
+		  memcpy (p, verstr, verlen + 1);
 
 		  name = newname;
 		}
 	    }
 
-	  if (! elf_merge_symbol (abfd, info, name, &sym, &sec, &value,
+	  if (! elf_merge_symbol (abfd, info, name, isym, &sec, &value,
 				  sym_hash, &override, &type_change_ok,
 				  &size_change_ok, dt_needed))
-	    goto error_return;
+	    goto error_free_vers;
 
 	  if (override)
 	    definition = false;
@@ -1897,7 +1834,7 @@
       if (! (_bfd_generic_link_add_one_symbol
 	     (info, abfd, name, flags, sec, value, (const char *) NULL,
 	      false, collect, (struct bfd_link_hash_entry **) sym_hash)))
-	goto error_return;
+	goto error_free_vers;
 
       h = *sym_hash;
       while (h->root.type == bfd_link_hash_indirect
@@ -1909,7 +1846,7 @@
       if (dynamic
 	  && definition
 	  && (flags & BSF_WEAK) != 0
-	  && ELF_ST_TYPE (sym.st_info) != STT_FUNC
+	  && ELF_ST_TYPE (isym->st_info) != STT_FUNC
 	  && info->hash->creator->flavour == bfd_target_elf_flavour
 	  && h->weakdef == NULL)
 	{
@@ -1931,16 +1868,16 @@
 	}
 
       /* Set the alignment of a common symbol.  */
-      if (sym.st_shndx == SHN_COMMON
+      if (isym->st_shndx == SHN_COMMON
 	  && h->root.type == bfd_link_hash_common)
 	{
 	  unsigned int align;
 
-	  align = bfd_log2 (sym.st_value);
+	  align = bfd_log2 (isym->st_value);
 	  if (align > old_alignment
 	      /* Permit an alignment power of zero if an alignment of one
 		 is specified and no other alignments have been specified.  */
-	      || (sym.st_value == 1 && old_alignment == 0))
+	      || (isym->st_value == 1 && old_alignment == 0))
 	    h->root.u.c.p->alignment_power = align;
 	}
 
@@ -1951,16 +1888,16 @@
 	  int new_flag;
 
 	  /* Remember the symbol size and type.  */
-	  if (sym.st_size != 0
+	  if (isym->st_size != 0
 	      && (definition || h->size == 0))
 	    {
-	      if (h->size != 0 && h->size != sym.st_size && ! size_change_ok)
+	      if (h->size != 0 && h->size != isym->st_size && ! size_change_ok)
 		(*_bfd_error_handler)
 		  (_("Warning: size of symbol `%s' changed from %lu to %lu in %s"),
-		   name, (unsigned long) h->size, (unsigned long) sym.st_size,
-		   bfd_archive_filename (abfd));
+		   name, (unsigned long) h->size,
+		   (unsigned long) isym->st_size, bfd_archive_filename (abfd));
 
-	      h->size = sym.st_size;
+	      h->size = isym->st_size;
 	    }
 
 	  /* If this is a common symbol, then we always want H->SIZE
@@ -1971,37 +1908,37 @@
 	  if (h->root.type == bfd_link_hash_common)
 	    h->size = h->root.u.c.size;
 
-	  if (ELF_ST_TYPE (sym.st_info) != STT_NOTYPE
+	  if (ELF_ST_TYPE (isym->st_info) != STT_NOTYPE
 	      && (definition || h->type == STT_NOTYPE))
 	    {
 	      if (h->type != STT_NOTYPE
-		  && h->type != ELF_ST_TYPE (sym.st_info)
+		  && h->type != ELF_ST_TYPE (isym->st_info)
 		  && ! type_change_ok)
 		(*_bfd_error_handler)
 		  (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
-		   name, h->type, ELF_ST_TYPE (sym.st_info),
+		   name, h->type, ELF_ST_TYPE (isym->st_info),
 		   bfd_archive_filename (abfd));
 
-	      h->type = ELF_ST_TYPE (sym.st_info);
+	      h->type = ELF_ST_TYPE (isym->st_info);
 	    }
 
 	  /* If st_other has a processor-specific meaning, specific code
 	     might be needed here.  */
-	  if (sym.st_other != 0)
+	  if (isym->st_other != 0)
 	    {
 	      /* Combine visibilities, using the most constraining one.  */
 	      unsigned char hvis   = ELF_ST_VISIBILITY (h->other);
-	      unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other);
+	      unsigned char symvis = ELF_ST_VISIBILITY (isym->st_other);
 
 	      if (symvis && (hvis > symvis || hvis == 0))
-		h->other = sym.st_other;
+		h->other = isym->st_other;
 
 	      /* If neither has visibility, use the st_other of the
 		 definition.  This is an arbitrary choice, since the
 		 other bits have no general meaning.  */
 	      if (!symvis && !hvis
 		  && (definition || h->other == 0))
-		h->other = sym.st_other;
+		h->other = isym->st_other;
 	    }
 
 	  /* Set a flag in the hash table entry indicating the type of
@@ -2045,21 +1982,21 @@
 	  /* Check to see if we need to add an indirect symbol for
 	     the default name.  */
 	  if (definition || h->root.type == bfd_link_hash_common)
-	    if (! elf_add_default_symbol (abfd, info, h, name, &sym,
+	    if (! elf_add_default_symbol (abfd, info, h, name, isym,
 					  &sec, &value, &dynsym,
 					  override, dt_needed))
-	      goto error_return;
+	      goto error_free_vers;
 
 	  if (dynsym && h->dynindx == -1)
 	    {
 	      if (! _bfd_elf_link_record_dynamic_symbol (info, h))
-		goto error_return;
+		goto error_free_vers;
 	      if (h->weakdef != NULL
 		  && ! new_weakdef
 		  && h->weakdef->dynindx == -1)
 		{
 		  if (! _bfd_elf_link_record_dynamic_symbol (info, h->weakdef))
-		    goto error_return;
+		    goto error_free_vers;
 		}
 	    }
 	  else if (dynsym && h->dynindx != -1)
@@ -2082,7 +2019,7 @@
 	      bfd_size_type strindex;
 
 	      if (! is_elf_hash_table (info))
-		goto error_return;
+		goto error_free_vers;
 
 	      /* The symbol from a DT_NEEDED object is referenced from
 		 the regular object to create a dynamic executable. We
@@ -2093,7 +2030,7 @@
 	      strindex = _bfd_elf_strtab_add (hash_table->dynstr,
 					      elf_dt_soname (abfd), false);
 	      if (strindex == (bfd_size_type) -1)
-		goto error_return;
+		goto error_free_vers;
 
 	      if (oldsize == _bfd_elf_strtab_size (hash_table->dynstr))
 		{
@@ -2119,11 +2056,21 @@
 		}
 
 	      if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NEEDED, strindex))
-		goto error_return;
+		goto error_free_vers;
 	    }
 	}
     }
 
+  if (extversym != NULL)
+    {
+      free (extversym);
+      extversym = NULL;
+    }
+
+  if (isymbuf != NULL)
+    free (isymbuf);
+  isymbuf = NULL;
+
   /* Now set the weakdefs field correctly for all the weak defined
      symbols we found.  The only way to do this is to search all the
      symbols.  Since we only need the information for non functions in
@@ -2191,24 +2138,11 @@
 		  if (! _bfd_elf_link_record_dynamic_symbol (info, hlook))
 		    goto error_return;
 		}
-
 	      break;
 	    }
 	}
     }
 
-  if (buf != NULL)
-    {
-      free (buf);
-      buf = NULL;
-    }
-
-  if (extversym != NULL)
-    {
-      free (extversym);
-      extversym = NULL;
-    }
-
   /* If this object is the same format as the output object, and it is
      not a shared library, then let the backend look through the
      relocs.
@@ -2254,7 +2188,7 @@
 
 	  ok = (*check_relocs) (abfd, info, o, internal_relocs);
 
-	  if (! info->keep_memory)
+	  if (elf_section_data (o)->relocs != internal_relocs)
 	    free (internal_relocs);
 
 	  if (! ok)
@@ -2317,15 +2251,29 @@
 	  }
     }
 
+  if (is_elf_hash_table (info))
+    {
+      /* Add this bfd to the loaded list.  */
+      struct elf_link_loaded_list *n;
+
+      n = ((struct elf_link_loaded_list *)
+	   bfd_alloc (abfd, sizeof (struct elf_link_loaded_list)));
+      if (n == NULL)
+	goto error_return;
+      n->abfd = abfd;
+      n->next = hash_table->loaded;
+      hash_table->loaded = n;
+    }
+
   return true;
 
- error_return:
-  if (buf != NULL)
-    free (buf);
-  if (dynbuf != NULL)
-    free (dynbuf);
+ error_free_vers:
   if (extversym != NULL)
     free (extversym);
+ error_free_sym:
+  if (isymbuf != NULL)
+    free (isymbuf);
+ error_return:
   return false;
 }
 
@@ -2506,92 +2454,6 @@
 
   return true;
 }
-
-/* Record a new local dynamic symbol.  */
-
-boolean
-elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     long input_indx;
-{
-  struct elf_link_local_dynamic_entry *entry;
-  struct elf_link_hash_table *eht;
-  struct elf_strtab_hash *dynstr;
-  Elf_External_Sym esym;
-  Elf_External_Sym_Shndx eshndx;
-  Elf_External_Sym_Shndx *shndx;
-  unsigned long dynstr_index;
-  char *name;
-  file_ptr pos;
-  bfd_size_type amt;
-
-  if (! is_elf_hash_table (info))
-    return false;
-
-  /* See if the entry exists already.  */
-  for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
-    if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
-      return true;
-
-  entry = (struct elf_link_local_dynamic_entry *)
-    bfd_alloc (input_bfd, (bfd_size_type) sizeof (*entry));
-  if (entry == NULL)
-    return false;
-
-  /* Go find the symbol, so that we can find it's name.  */
-  amt = sizeof (Elf_External_Sym);
-  pos = elf_tdata (input_bfd)->symtab_hdr.sh_offset + input_indx * amt;
-  if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
-      || bfd_bread ((PTR) &esym, amt, input_bfd) != amt)
-    return false;
-  shndx = NULL;
-  if (elf_tdata (input_bfd)->symtab_shndx_hdr.sh_size != 0)
-    {
-      amt = sizeof (Elf_External_Sym_Shndx);
-      pos = elf_tdata (input_bfd)->symtab_shndx_hdr.sh_offset;
-      pos += input_indx * amt;
-      shndx = &eshndx;
-      if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
-	return false;
-    }
-  elf_swap_symbol_in (input_bfd, &esym, shndx, &entry->isym);
-
-  name = (bfd_elf_string_from_elf_section
-	  (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
-	   entry->isym.st_name));
-
-  dynstr = elf_hash_table (info)->dynstr;
-  if (dynstr == NULL)
-    {
-      /* Create a strtab to hold the dynamic symbol names.  */
-      elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
-      if (dynstr == NULL)
-	return false;
-    }
-
-  dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
-  if (dynstr_index == (unsigned long) -1)
-    return false;
-  entry->isym.st_name = dynstr_index;
-
-  eht = elf_hash_table (info);
-
-  entry->next = eht->dynlocal;
-  eht->dynlocal = entry;
-  entry->input_bfd = input_bfd;
-  entry->input_indx = input_indx;
-  eht->dynsymcount++;
-
-  /* Whatever binding the symbol had before, it's now local.  */
-  entry->isym.st_info
-    = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
-
-  /* The dynindx will be set at the end of size_dynamic_sections.  */
-
-  return true;
-}
 
 /* Read and swap the relocs from the section indicated by SHDR.  This
    may be either a REL or a RELA section.  The relocations are
@@ -2909,11 +2771,11 @@
   elf_link_hash_traverse (elf_hash_table (info),
 			  elf_collect_hash_codes, &hashcodesp);
 
-/* We have a problem here.  The following code to optimize the table
-   size requires an integer type with more the 32 bits.  If
-   BFD_HOST_U_64_BIT is set we know about such a type.  */
+  /* We have a problem here.  The following code to optimize the table
+     size requires an integer type with more the 32 bits.  If
+     BFD_HOST_U_64_BIT is set we know about such a type.  */
 #ifdef BFD_HOST_U_64_BIT
-  if (info->optimize == true)
+  if (info->optimize)
     {
       unsigned long int nsyms = hashcodesp - hashcodes;
       size_t minsize;
@@ -3054,7 +2916,7 @@
     return true;
 
   if (! is_elf_hash_table (info))
-    return false;
+    return true;
 
   /* Any syms created from now on start with -1 in
      got.refcount/offset and plt.refcount/offset.  */
@@ -3082,6 +2944,9 @@
       struct elf_info_failed eif;
       struct elf_link_hash_entry *h;
       asection *dynstr;
+      struct bfd_elf_version_tree *t;
+      struct bfd_elf_version_expr *d;
+      boolean all_defined;
 
       *sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
       BFD_ASSERT (*sinterpptr != NULL || info->shared);
@@ -3162,6 +3027,57 @@
 	    return false;
 	}
 
+      /* Make all global versions with definiton.  */
+      for (t = verdefs; t != NULL; t = t->next)
+	for (d = t->globals; d != NULL; d = d->next)
+	  if (!d->symver && strchr (d->pattern, '*') == NULL)
+	    {
+	      const char *verstr, *name;
+	      size_t namelen, verlen, newlen;
+	      char *newname, *p;
+	      struct elf_link_hash_entry *newh;
+
+	      name = d->pattern;
+	      namelen = strlen (name);
+	      verstr = t->name;
+	      verlen = strlen (verstr);
+	      newlen = namelen + verlen + 3; 
+
+	      newname = (char *) bfd_malloc ((bfd_size_type) newlen);
+	      if (newname == NULL)
+		return false;
+	      memcpy (newname, name, namelen);
+
+	      /* Check the hidden versioned definition.  */
+	      p = newname + namelen;
+	      *p++ = ELF_VER_CHR;
+	      memcpy (p, verstr, verlen + 1);
+	      newh = elf_link_hash_lookup (elf_hash_table (info),
+					   newname, false, false,
+					   false);
+	      if (newh == NULL
+		  || (newh->root.type != bfd_link_hash_defined
+		      && newh->root.type != bfd_link_hash_defweak))
+		{
+		  /* Check the default versioned definition.  */
+		  *p++ = ELF_VER_CHR;
+		  memcpy (p, verstr, verlen + 1);
+		  newh = elf_link_hash_lookup (elf_hash_table (info),
+					       newname, false, false,
+					       false);
+		}
+	      free (newname);
+
+	      /* Mark this version if there is a definition and it is
+		 not defined in a shared object.  */
+	      if (newh != NULL
+		  && ((newh->elf_link_hash_flags
+		       & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
+		  && (newh->root.type == bfd_link_hash_defined
+		      || newh->root.type == bfd_link_hash_defweak))
+		d->symver = 1;
+	    }
+
       /* Attach all the symbols to their version information.  */
       asvinfo.output_bfd = output_bfd;
       asvinfo.info = info;
@@ -3174,6 +3090,28 @@
       if (asvinfo.failed)
 	return false;
 
+      if (!info->allow_undefined_version)
+	{
+	  /* Check if all global versions have a definiton.  */
+	  all_defined = true;
+	  for (t = verdefs; t != NULL; t = t->next)
+	    for (d = t->globals; d != NULL; d = d->next)
+	      if (!d->symver && !d->script
+		  && strchr (d->pattern, '*') == NULL)
+		{
+		  (*_bfd_error_handler)
+		    (_("%s: undefined version: %s"),
+		     d->pattern, t->name);
+		  all_defined = false;
+		}
+
+	  if (!all_defined)
+	    {
+	      bfd_set_error (bfd_error_bad_value);
+	      return false;
+	    }
+	}
+
       /* Find all symbols which were defined in a dynamic object and make
 	 the backend pick a reasonable value for them.  */
       elf_link_hash_traverse (elf_hash_table (info),
@@ -3229,7 +3167,7 @@
 		    {
 		      (*_bfd_error_handler)
 			(_("%s: .preinit_array section is not allowed in DSO"),
-			  bfd_archive_filename (sub));
+			 bfd_archive_filename (sub));
 		      break;
 		    }
 
@@ -3664,10 +3602,9 @@
       BFD_ASSERT (s != NULL);
       hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
       s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
-      s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
       if (s->contents == NULL)
 	return false;
-      memset (s->contents, 0, (size_t) s->_raw_size);
 
       bfd_put (8 * hash_entry_size, output_bfd, (bfd_vma) bucketcount,
 	       s->contents);
@@ -3966,7 +3903,7 @@
 	  struct elf_backend_data *bed;
 
 	  bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
-	  (*bed->elf_backend_copy_indirect_symbol) (weakdef, h);
+	  (*bed->elf_backend_copy_indirect_symbol) (bed, weakdef, h);
 	}
     }
 
@@ -4086,7 +4023,7 @@
       && (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) == 0)
     (*_bfd_error_handler)
       (_("warning: type and size of dynamic symbol `%s' are not defined"),
-	 h->root.root.string);
+       h->root.root.string);
 
   dynobj = elf_hash_table (eif->info)->dynobj;
   bed = get_elf_backend_data (dynobj);
@@ -4146,7 +4083,7 @@
 
       if (!eif->verdefs)
 	{
-doit:
+	doit:
 	  if (! _bfd_elf_link_record_dynamic_symbol (eif->info, h))
 	    {
 	      eif->failed = true;
@@ -4313,7 +4250,7 @@
 	      alc = bfd_malloc ((bfd_size_type) len);
 	      if (alc == NULL)
 		return false;
-	      strncpy (alc, h->root.root.string, len - 1);
+	      memcpy (alc, h->root.root.string, len - 1);
 	      alc[len - 1] = '\0';
 	      if (alc[len - 2] == ELF_VER_CHR)
 		alc[len - 2] = '\0';
@@ -4416,45 +4353,58 @@
   if (h->verinfo.vertree == NULL && sinfo->verdefs != NULL)
     {
       struct bfd_elf_version_tree *t;
-      struct bfd_elf_version_tree *deflt;
+      struct bfd_elf_version_tree *local_ver;
       struct bfd_elf_version_expr *d;
 
       /* See if can find what version this symbol is in.  If the
 	 symbol is supposed to be local, then don't actually register
 	 it.  */
-      deflt = NULL;
+      local_ver = NULL;
       for (t = sinfo->verdefs; t != NULL; t = t->next)
 	{
 	  if (t->globals != NULL)
 	    {
+	      boolean matched;
+
+	      matched = false;
 	      for (d = t->globals; d != NULL; d = d->next)
 		{
 		  if ((*d->match) (d, h->root.root.string))
 		    {
-		      h->verinfo.vertree = t;
-		      break;
+		      if (d->symver)
+			matched = true;
+		      else
+			{
+			  /* There is a version without definition.  Make
+			     the symbol the default definition for this
+			     version.  */
+			  h->verinfo.vertree = t;
+			  local_ver = NULL;
+			  d->script = 1;
+			  break;
+			}
 		    }
 		}
 
 	      if (d != NULL)
 		break;
+	      else if (matched)
+		/* There is no undefined version for this symbol. Hide the
+		   default one.  */
+		(*bed->elf_backend_hide_symbol) (info, h, true);
 	    }
 
 	  if (t->locals != NULL)
 	    {
 	      for (d = t->locals; d != NULL; d = d->next)
 		{
+		  /* If the match is "*", keep looking for a more
+		     explicit, perhaps even global, match.  */
 		  if (d->pattern[0] == '*' && d->pattern[1] == '\0')
-		    deflt = t;
+		    local_ver = t;
 		  else if ((*d->match) (d, h->root.root.string))
 		    {
-		      h->verinfo.vertree = t;
-		      if (h->dynindx != -1
-			  && info->shared
-			  && ! info->export_dynamic)
-			{
-			  (*bed->elf_backend_hide_symbol) (info, h, true);
-			}
+		      local_ver = t;
 		      break;
 		    }
 		}
@@ -4464,9 +4414,9 @@
 	    }
 	}
 
-      if (deflt != NULL && h->verinfo.vertree == NULL)
+      if (local_ver != NULL)
 	{
-	  h->verinfo.vertree = deflt;
+	  h->verinfo.vertree = local_ver;
 	  if (h->dynindx != -1
 	      && info->shared
 	      && ! info->export_dynamic)
@@ -4538,6 +4488,8 @@
   PARAMS ((struct elf_link_hash_entry *, PTR));
 static boolean elf_link_sec_merge_syms
   PARAMS ((struct elf_link_hash_entry *, PTR));
+static boolean elf_link_check_versioned_symbol
+  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 static boolean elf_link_input_bfd
   PARAMS ((struct elf_final_link_info *, bfd *));
 static boolean elf_reloc_link_order
@@ -4681,7 +4633,7 @@
 
 	  for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
 	    irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx,
-				       ELF_R_TYPE (irela[j].r_info));
+					  ELF_R_TYPE (irela[j].r_info));
 
 	  if (bed->s->swap_reloca_out)
 	    (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela);
@@ -4694,10 +4646,12 @@
   free (irela);
 }
 
-struct elf_link_sort_rela {
+struct elf_link_sort_rela
+{
   bfd_vma offset;
   enum elf_reloc_type_class type;
-  union {
+  union
+  {
     Elf_Internal_Rel rel;
     Elf_Internal_Rela rela;
   } u;
@@ -5033,7 +4987,7 @@
 		  o->reloc_count
 		    += (*bed->elf_backend_count_relocs) (sec, relocs);
 
-		  if (!info->keep_memory)
+		  if (elf_section_data (o)->relocs != relocs)
 		    free (relocs);
 		}
 
@@ -5371,7 +5325,7 @@
 	      size = 0;
 	      for (o = sec->link_order_head; o != NULL; o = o->next)
 		if (size < o->offset + o->size)
-	      size = o->offset + o->size;
+		  size = o->offset + o->size;
 	    }
 	  end = sec->vma + size;
 	}
@@ -5510,8 +5464,8 @@
 	      sym = e->isym;
 
 	      if (e->isym.st_shndx != SHN_UNDEF
-		   && (e->isym.st_shndx < SHN_LORESERVE
-		       || e->isym.st_shndx > SHN_HIRESERVE))
+		  && (e->isym.st_shndx < SHN_LORESERVE
+		      || e->isym.st_shndx > SHN_HIRESERVE))
 		{
 		  s = bfd_section_from_elf_index (e->input_bfd,
 						  e->isym.st_shndx);
@@ -5694,7 +5648,13 @@
 	      name = ".fini_array";
 	    get_size:
 	      o = bfd_get_section_by_name (abfd, name);
-	      BFD_ASSERT (o != NULL);
+	      if (o == NULL)
+		{
+		  (*_bfd_error_handler)
+		    (_("%s: could not find output section %s"),
+		     bfd_get_filename (abfd), name);
+		  goto error_return;
+		}
 	      if (o->_raw_size == 0)
 		(*_bfd_error_handler)
 		  (_("warning: %s section has zero size"), name);
@@ -5731,7 +5691,13 @@
 	      name = ".gnu.version";
 	    get_vma:
 	      o = bfd_get_section_by_name (abfd, name);
-	      BFD_ASSERT (o != NULL);
+	      if (o == NULL)
+		{
+		  (*_bfd_error_handler)
+		    (_("%s: could not find output section %s"),
+		     bfd_get_filename (abfd), name);
+		  goto error_return;
+		}
 	      dyn.d_un.d_ptr = o->vma;
 	      elf_swap_dyn_out (dynobj, &dyn, dyncon);
 	      break;
@@ -5810,6 +5776,15 @@
 	}
     }
 
+  if (info->relocateable)
+    {
+      boolean failed = false;
+
+      bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed);
+      if (failed)
+	goto error_return;
+    }
+
   /* If we have optimized stabs strings, output them.  */
   if (elf_hash_table (info)->stab_info != NULL)
     {
@@ -6023,6 +5998,127 @@
   return true;
 }
 
+/* For DSOs loaded in via a DT_NEEDED entry, emulate ld.so in
+   allowing an unsatisfied unversioned symbol in the DSO to match a
+   versioned symbol that would normally require an explicit version.  */
+
+static boolean
+elf_link_check_versioned_symbol (info, h)
+     struct bfd_link_info *info;
+     struct elf_link_hash_entry *h;
+{
+  bfd *undef_bfd = h->root.u.undef.abfd;
+  struct elf_link_loaded_list *loaded;
+
+  if ((undef_bfd->flags & DYNAMIC) == 0
+      || info->hash->creator->flavour != bfd_target_elf_flavour
+      || elf_dt_soname (h->root.u.undef.abfd) == NULL)
+    return false;
+
+  for (loaded = elf_hash_table (info)->loaded;
+       loaded != NULL;
+       loaded = loaded->next)
+    {
+      bfd *input;
+      Elf_Internal_Shdr *hdr;
+      bfd_size_type symcount;
+      bfd_size_type extsymcount;
+      bfd_size_type extsymoff;
+      Elf_Internal_Shdr *versymhdr;
+      Elf_Internal_Sym *isym;
+      Elf_Internal_Sym *isymend;
+      Elf_Internal_Sym *isymbuf;
+      Elf_External_Versym *ever;
+      Elf_External_Versym *extversym;
+
+      input = loaded->abfd;
+
+      /* We check each DSO for a possible hidden versioned definition.  */
+      if (input == undef_bfd
+	  || (input->flags & DYNAMIC) == 0
+	  || elf_dynversym (input) == 0)
+	continue;
+
+      hdr = &elf_tdata (input)->dynsymtab_hdr;
+
+      symcount = hdr->sh_size / sizeof (Elf_External_Sym);
+      if (elf_bad_symtab (input))
+	{
+	  extsymcount = symcount;
+	  extsymoff = 0;
+	}
+      else
+	{
+	  extsymcount = symcount - hdr->sh_info;
+	  extsymoff = hdr->sh_info;
+	}
+
+      if (extsymcount == 0)
+	continue;
+
+      isymbuf = bfd_elf_get_elf_syms (input, hdr, extsymcount, extsymoff,
+				      NULL, NULL, NULL);
+      if (isymbuf == NULL)
+	return false;
+
+      /* Read in any version definitions.  */
+      versymhdr = &elf_tdata (input)->dynversym_hdr;
+      extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
+      if (extversym == NULL)
+	goto error_ret;
+
+      if (bfd_seek (input, versymhdr->sh_offset, SEEK_SET) != 0
+	  || (bfd_bread ((PTR) extversym, versymhdr->sh_size, input)
+	      != versymhdr->sh_size))
+	{
+	  free (extversym);
+	error_ret:
+	  free (isymbuf);
+	  return false;
+	}
+
+      ever = extversym + extsymoff;
+      isymend = isymbuf + extsymcount;
+      for (isym = isymbuf; isym < isymend; isym++, ever++)
+	{
+	  const char *name;
+	  Elf_Internal_Versym iver;
+
+	  if (ELF_ST_BIND (isym->st_info) == STB_LOCAL
+	      || isym->st_shndx == SHN_UNDEF)
+	    continue;
+
+	  name = bfd_elf_string_from_elf_section (input,
+						  hdr->sh_link,
+						  isym->st_name);
+	  if (strcmp (name, h->root.root.string) != 0)
+	    continue;
+
+	  _bfd_elf_swap_versym_in (input, ever, &iver);
+
+	  if ((iver.vs_vers & VERSYM_HIDDEN) == 0)
+	    {
+	      /* If we have a non-hidden versioned sym, then it should
+		 have provided a definition for the undefined sym.  */
+	      abort ();
+	    }
+
+	  if ((iver.vs_vers & VERSYM_VERSION) == 2)
+	    {
+	      /* This is the oldest (default) sym.  We can use it.  */
+	      free (extversym);
+	      free (isymbuf);
+	      return true;
+	    }
+	}
+
+      free (extversym);
+      free (isymbuf);
+    }
+
+  return false;
+}
+
 /* Add an external symbol to the symbol table.  This is called from
    the hash table traversal routine.  When generating a shared object,
    we go through the symbol table twice.  The first time we output
@@ -6072,7 +6168,8 @@
       && ! finfo->info->shared
       && h->root.type == bfd_link_hash_undefined
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
-      && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
+      && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
+      && ! elf_link_check_versioned_symbol (finfo->info, h))
     {
       if (! ((*finfo->info->callbacks->undefined_symbol)
 	     (finfo->info, h->root.root.string, h->root.u.undef.abfd,
@@ -6245,8 +6342,8 @@
     sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
 
   /* If this symbol should be put in the .dynsym section, then put it
-     there now.  We have already know the symbol index.  We also fill
-     in the entry in the .hash section.  */
+     there now.  We already know the symbol index.  We also fill in
+     the entry in the .hash section.  */
   if (h->dynindx != -1
       && elf_hash_table (finfo->info)->dynamic_sections_created)
     {
@@ -6305,7 +6402,7 @@
 
   /* If we're stripping it, then it was just a dynamic symbol, and
      there's nothing else to do.  */
-  if (strip)
+  if (strip || (input_sec->flags & SEC_EXCLUDE) != 0)
     return true;
 
   h->indx = bfd_get_symcount (finfo->output_bfd);
@@ -6357,19 +6454,19 @@
     }
   else
     {
-      (*_bfd_error_handler) (
-        _("%s: relocation size mismatch in %s section %s"),
-        bfd_get_filename (output_bfd),
-        bfd_archive_filename (input_section->owner),
-        input_section->name);
+      (*_bfd_error_handler)
+	(_("%s: relocation size mismatch in %s section %s"),
+	 bfd_get_filename (output_bfd),
+	 bfd_archive_filename (input_section->owner),
+	 input_section->name);
       bfd_set_error (bfd_error_wrong_object_format);
       return false;
     }
 
   bed = get_elf_backend_data (output_bfd);
   irela = internal_relocs;
-  irelaend = irela + NUM_SHDR_ENTRIES (input_rel_hdr)
-		     * bed->s->int_rels_per_ext_rel;
+  irelaend = irela + (NUM_SHDR_ENTRIES (input_rel_hdr)
+		      * bed->s->int_rels_per_ext_rel);
 
   if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
     {
@@ -6441,15 +6538,11 @@
 				       Elf_Internal_Sym *, asection **));
   bfd *output_bfd;
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   size_t locsymcount;
   size_t extsymoff;
-  Elf_External_Sym *external_syms;
-  Elf_External_Sym *esym;
-  Elf_External_Sym *esymend;
-  Elf_External_Sym_Shndx *shndx_buf;
-  Elf_External_Sym_Shndx *shndx;
+  Elf_Internal_Sym *isymbuf;
   Elf_Internal_Sym *isym;
+  Elf_Internal_Sym *isymend;
   long *pindex;
   asection **ppsection;
   asection *o;
@@ -6484,44 +6577,29 @@
     }
 
   /* Read the local symbols.  */
-  if (symtab_hdr->contents != NULL)
-    external_syms = (Elf_External_Sym *) symtab_hdr->contents;
-  else if (locsymcount == 0)
-    external_syms = NULL;
-  else
+  isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+  if (isymbuf == NULL && locsymcount != 0)
     {
-      bfd_size_type amt = locsymcount * sizeof (Elf_External_Sym);
-      external_syms = finfo->external_syms;
-      if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread (external_syms, amt, input_bfd) != amt)
+      isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0,
+				      finfo->internal_syms,
+				      finfo->external_syms,
+				      finfo->locsym_shndx);
+      if (isymbuf == NULL)
 	return false;
     }
 
-  shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-  shndx_buf = NULL;
-  if (shndx_hdr->sh_size != 0 && locsymcount != 0)
-    {
-      bfd_size_type amt = locsymcount * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = finfo->locsym_shndx;
-      if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread (shndx_buf, amt, input_bfd) != amt)
-	return false;
-    }
-
-  /* Swap in the local symbols and write out the ones which we know
-     are going into the output file.  */
-  for (esym = external_syms, esymend = esym + locsymcount,
-	 isym = finfo->internal_syms, pindex = finfo->indices,
-	 ppsection = finfo->sections, shndx = shndx_buf;
-       esym < esymend;
-       esym++, isym++, pindex++, ppsection++,
-	 shndx = (shndx != NULL ? shndx + 1 : NULL))
+  /* Find local symbol sections and adjust values of symbols in
+     SEC_MERGE sections.  Write out those local symbols we know are
+     going into the output file.  */
+  isymend = isymbuf + locsymcount;
+  for (isym = isymbuf, pindex = finfo->indices, ppsection = finfo->sections;
+       isym < isymend;
+       isym++, pindex++, ppsection++)
     {
       asection *isec;
       const char *name;
       Elf_Internal_Sym osym;
 
-      elf_swap_symbol_in (input_bfd, esym, shndx, isym);
       *pindex = -1;
 
       if (elf_bad_symtab (input_bfd))
@@ -6560,7 +6638,7 @@
       *ppsection = isec;
 
       /* Don't output the first, undefined, symbol.  */
-      if (esym == external_syms)
+      if (ppsection == finfo->sections)
 	continue;
 
       if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
@@ -6830,7 +6908,7 @@
 	  if (! (*relocate_section) (output_bfd, finfo->info,
 				     input_bfd, o, contents,
 				     internal_relocs,
-				     finfo->internal_syms,
+				     isymbuf,
 				     finfo->sections))
 	    return false;
 
@@ -6839,7 +6917,7 @@
 	      Elf_Internal_Rela *irela;
 	      Elf_Internal_Rela *irelaend;
 	      struct elf_link_hash_entry **rel_hash;
-	      Elf_Internal_Shdr *input_rel_hdr;
+	      Elf_Internal_Shdr *input_rel_hdr, *input_rel_hdr2;
 	      unsigned int next_erel;
 	      boolean (*reloc_emitter) PARAMS ((bfd *, asection *,
 						Elf_Internal_Shdr *,
@@ -6862,6 +6940,7 @@
 		{
 		  unsigned long r_symndx;
 		  asection *sec;
+		  Elf_Internal_Sym sym;
 
 		  if (next_erel == bed->s->int_rels_per_ext_rel)
 		    {
@@ -6914,9 +6993,9 @@
 		  /* This is a reloc against a local symbol.  */
 
 		  *rel_hash = NULL;
-		  isym = finfo->internal_syms + r_symndx;
+		  sym = isymbuf[r_symndx];
 		  sec = finfo->sections[r_symndx];
-		  if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
+		  if (ELF_ST_TYPE (sym.st_info) == STT_SECTION)
 		    {
 		      /* I suppose the backend ought to fill in the
 			 section of any STT_SECTION symbol against a
@@ -6939,7 +7018,7 @@
 			}
 
 		      /* Adjust the addend according to where the
-			 section winds up in the output section.  */ 
+			 section winds up in the output section.  */
 		      if (rela_normal)
 			irela->r_addend += sec->output_offset;
 		    }
@@ -6963,34 +7042,34 @@
 			     must output it now.  */
 			  shlink = symtab_hdr->sh_link;
 			  name = (bfd_elf_string_from_elf_section
-				  (input_bfd, shlink, isym->st_name));
+				  (input_bfd, shlink, sym.st_name));
 			  if (name == NULL)
 			    return false;
 
 			  osec = sec->output_section;
-			  isym->st_shndx =
+			  sym.st_shndx =
 			    _bfd_elf_section_from_bfd_section (output_bfd,
 							       osec);
-			  if (isym->st_shndx == SHN_BAD)
+			  if (sym.st_shndx == SHN_BAD)
 			    return false;
 
-			  isym->st_value += sec->output_offset;
+			  sym.st_value += sec->output_offset;
 			  if (! finfo->info->relocateable)
 			    {
-			      isym->st_value += osec->vma;
-			      if (ELF_ST_TYPE (isym->st_info) == STT_TLS)
+			      sym.st_value += osec->vma;
+			      if (ELF_ST_TYPE (sym.st_info) == STT_TLS)
 				{
 				  /* STT_TLS symbols are relative to PT_TLS
 				     segment base.  */
 				  BFD_ASSERT (finfo->first_tls_sec != NULL);
-				  isym->st_value -= finfo->first_tls_sec->vma;
+				  sym.st_value -= finfo->first_tls_sec->vma;
 				}
 			    }
 
 			  finfo->indices[r_symndx]
 			    = bfd_get_symcount (output_bfd);
 
-			  if (! elf_link_output_sym (finfo, name, isym, sec))
+			  if (! elf_link_output_sym (finfo, name, &sym, sec))
 			    return false;
 			}
 
@@ -7009,20 +7088,20 @@
 	      else
 		reloc_emitter = elf_link_output_relocs;
 
-	      if (! (*reloc_emitter) (output_bfd, o, input_rel_hdr,
-				      internal_relocs))
+	      if (input_rel_hdr->sh_size != 0
+		  && ! (*reloc_emitter) (output_bfd, o, input_rel_hdr,
+					 internal_relocs))
 		return false;
 
-	      input_rel_hdr = elf_section_data (o)->rel_hdr2;
-	      if (input_rel_hdr)
+	      input_rel_hdr2 = elf_section_data (o)->rel_hdr2;
+	      if (input_rel_hdr2 && input_rel_hdr2->sh_size != 0)
 		{
 		  internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr)
 				      * bed->s->int_rels_per_ext_rel);
-		  if (! (*reloc_emitter) (output_bfd, o, input_rel_hdr,
+		  if (! (*reloc_emitter) (output_bfd, o, input_rel_hdr2,
 					  internal_relocs))
 		    return false;
 		}
-
 	    }
 	}
 
@@ -7539,28 +7618,27 @@
 /* Garbage collect unused sections.  */
 
 static boolean elf_gc_mark
-  PARAMS ((struct bfd_link_info *info, asection *sec,
-	   asection * (*gc_mark_hook)
-	     PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
-		      struct elf_link_hash_entry *, Elf_Internal_Sym *))));
+  PARAMS ((struct bfd_link_info *, asection *,
+	   asection * (*) (asection *, struct bfd_link_info *,
+			   Elf_Internal_Rela *, struct elf_link_hash_entry *,
+			   Elf_Internal_Sym *)));
 
 static boolean elf_gc_sweep
-  PARAMS ((struct bfd_link_info *info,
-	   boolean (*gc_sweep_hook)
-	     PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
-		      const Elf_Internal_Rela *relocs))));
+  PARAMS ((struct bfd_link_info *,
+	   boolean (*) (bfd *, struct bfd_link_info *, asection *,
+			const Elf_Internal_Rela *)));
 
 static boolean elf_gc_sweep_symbol
-  PARAMS ((struct elf_link_hash_entry *h, PTR idxptr));
+  PARAMS ((struct elf_link_hash_entry *, PTR));
 
 static boolean elf_gc_allocate_got_offsets
-  PARAMS ((struct elf_link_hash_entry *h, PTR offarg));
+  PARAMS ((struct elf_link_hash_entry *, PTR));
 
 static boolean elf_gc_propagate_vtable_entries_used
-  PARAMS ((struct elf_link_hash_entry *h, PTR dummy));
+  PARAMS ((struct elf_link_hash_entry *, PTR));
 
 static boolean elf_gc_smash_unused_vtentry_relocs
-  PARAMS ((struct elf_link_hash_entry *h, PTR dummy));
+  PARAMS ((struct elf_link_hash_entry *, PTR));
 
 /* The mark phase of garbage collection.  For a given section, mark
    it and any sections in this section's group, and all the sections
@@ -7570,9 +7648,10 @@
 elf_gc_mark (info, sec, gc_mark_hook)
      struct bfd_link_info *info;
      asection *sec;
-     asection * (*gc_mark_hook)
-       PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
-		struct elf_link_hash_entry *, Elf_Internal_Sym *));
+     asection * (*gc_mark_hook) PARAMS ((asection *, struct bfd_link_info *,
+					 Elf_Internal_Rela *,
+					 struct elf_link_hash_entry *,
+					 Elf_Internal_Sym *));
 {
   boolean ret;
   asection *group_sec;
@@ -7591,17 +7670,12 @@
     {
       Elf_Internal_Rela *relstart, *rel, *relend;
       Elf_Internal_Shdr *symtab_hdr;
-      Elf_Internal_Shdr *shndx_hdr;
       struct elf_link_hash_entry **sym_hashes;
       size_t nlocsyms;
       size_t extsymoff;
-      Elf_External_Sym *locsyms, *freesyms = NULL;
-      Elf_External_Sym_Shndx *locsym_shndx;
       bfd *input_bfd = sec->owner;
       struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
-
-      /* GCFIXME: how to arrange so that relocs and symbols are not
-	 reread continually?  */
+      Elf_Internal_Sym *isym = NULL;
 
       symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
       sym_hashes = elf_sym_hashes (input_bfd);
@@ -7615,37 +7689,18 @@
       else
 	extsymoff = nlocsyms = symtab_hdr->sh_info;
 
-      if (symtab_hdr->contents)
-	locsyms = (Elf_External_Sym *) symtab_hdr->contents;
-      else if (nlocsyms == 0)
-	locsyms = NULL;
-      else
+      isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+      if (isym == NULL && nlocsyms != 0)
 	{
-	  bfd_size_type amt = nlocsyms * sizeof (Elf_External_Sym);
-	  locsyms = freesyms = bfd_malloc (amt);
-	  if (freesyms == NULL
-	      || bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (locsyms, amt, input_bfd) != amt)
-	    {
-	      ret = false;
-	      goto out1;
-	    }
-	}
-
-      shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
-      locsym_shndx = NULL;
-      if (shndx_hdr->sh_size != 0 && nlocsyms != 0)
-	{
-	  bfd_size_type amt = nlocsyms * sizeof (Elf_External_Sym_Shndx);
-	  locsym_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-	  if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (locsym_shndx, amt, input_bfd) != amt)
+	  isym = bfd_elf_get_elf_syms (input_bfd, symtab_hdr, nlocsyms, 0,
+				       NULL, NULL, NULL);
+	  if (isym == NULL)
 	    return false;
 	}
 
       /* Read the relocations.  */
       relstart = (NAME(_bfd_elf,link_read_relocs)
-		  (sec->owner, sec, NULL, (Elf_Internal_Rela *) NULL,
+		  (input_bfd, sec, NULL, (Elf_Internal_Rela *) NULL,
 		   info->keep_memory));
       if (relstart == NULL)
 	{
@@ -7659,38 +7714,20 @@
 	  unsigned long r_symndx;
 	  asection *rsec;
 	  struct elf_link_hash_entry *h;
-	  Elf_Internal_Sym s;
 
 	  r_symndx = ELF_R_SYM (rel->r_info);
 	  if (r_symndx == 0)
 	    continue;
 
-	  if (elf_bad_symtab (sec->owner))
-	    {
-	      elf_swap_symbol_in (input_bfd,
-				  locsyms + r_symndx,
-				  locsym_shndx + (locsym_shndx ? r_symndx : 0),
-				  &s);
-	      if (ELF_ST_BIND (s.st_info) == STB_LOCAL)
-		rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
-	      else
-		{
-		  h = sym_hashes[r_symndx - extsymoff];
-		  rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL);
-		}
-	    }
-	  else if (r_symndx >= nlocsyms)
+	  if (r_symndx >= nlocsyms
+	      || ELF_ST_BIND (isym[r_symndx].st_info) != STB_LOCAL)
 	    {
 	      h = sym_hashes[r_symndx - extsymoff];
-	      rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL);
+	      rsec = (*gc_mark_hook) (sec, info, rel, h, NULL);
 	    }
 	  else
 	    {
-	      elf_swap_symbol_in (input_bfd,
-				  locsyms + r_symndx,
-				  locsym_shndx + (locsym_shndx ? r_symndx : 0),
-				  &s);
-	      rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s);
+	      rsec = (*gc_mark_hook) (sec, info, rel, NULL, &isym[r_symndx]);
 	    }
 
 	  if (rsec && !rsec->gc_mark)
@@ -7706,11 +7743,16 @@
 	}
 
     out2:
-      if (!info->keep_memory)
+      if (elf_section_data (sec)->relocs != relstart)
 	free (relstart);
     out1:
-      if (freesyms)
-	free (freesyms);
+      if (isym != NULL && symtab_hdr->contents != (unsigned char *) isym)
+	{
+	  if (! info->keep_memory)
+	    free (isym);
+	  else
+	    symtab_hdr->contents = (unsigned char *) isym;
+	}
     }
 
   return ret;
@@ -7721,9 +7763,8 @@
 static boolean
 elf_gc_sweep (info, gc_sweep_hook)
      struct bfd_link_info *info;
-     boolean (*gc_sweep_hook)
-       PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
-		const Elf_Internal_Rela *relocs));
+     boolean (*gc_sweep_hook) PARAMS ((bfd *, struct bfd_link_info *,
+				       asection *, const Elf_Internal_Rela *));
 {
   bfd *sub;
 
@@ -7767,7 +7808,7 @@
 
 	      r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs);
 
-	      if (!info->keep_memory)
+	      if (elf_section_data (o)->relocs != internal_relocs)
 		free (internal_relocs);
 
 	      if (!r)
@@ -7938,7 +7979,7 @@
   boolean ok = true;
   bfd *sub;
   asection * (*gc_mark_hook)
-    PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+    PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	     struct elf_link_hash_entry *h, Elf_Internal_Sym *));
 
   if (!get_elf_backend_data (abfd)->can_gc_sections
@@ -8265,7 +8306,6 @@
   for (; rcookie->rel < rcookie->relend; rcookie->rel++)
     {
       unsigned long r_symndx = ELF_R_SYM (rcookie->rel->r_info);
-      Elf_Internal_Sym isym;
 
       if (! rcookie->bad_symtab)
 	if (rcookie->rel->r_offset > offset)
@@ -8273,21 +8313,8 @@
       if (rcookie->rel->r_offset != offset)
 	continue;
 
-      if (rcookie->locsyms && r_symndx < rcookie->locsymcount)
-	{
-	  Elf_External_Sym *lsym;
-	  Elf_External_Sym_Shndx *lshndx;
-
-	  lsym = (Elf_External_Sym *) rcookie->locsyms + r_symndx;
-	  lshndx = (Elf_External_Sym_Shndx *) rcookie->locsym_shndx;
-	  if (lshndx != NULL)
-	    lshndx += r_symndx;
-	  elf_swap_symbol_in (rcookie->abfd, lsym, lshndx, &isym);
-	}
-
       if (r_symndx >= rcookie->locsymcount
-	  || (rcookie->locsyms
-	      && ELF_ST_BIND (isym.st_info) != STB_LOCAL))
+	  || ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL)
 	{
 	  struct elf_link_hash_entry *h;
 
@@ -8304,17 +8331,19 @@
 	  else
 	    return false;
 	}
-      else if (rcookie->locsyms)
+      else
 	{
 	  /* It's not a relocation against a global symbol,
 	     but it could be a relocation against a local
 	     symbol for a discarded section.  */
 	  asection *isec;
+	  Elf_Internal_Sym *isym;
 
 	  /* Need to: get the symbol; get the section.  */
-	  if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE)
+	  isym = &rcookie->locsyms[r_symndx];
+	  if (isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
 	    {
-	      isec = section_from_elf_index (rcookie->abfd, isym.st_shndx);
+	      isec = section_from_elf_index (rcookie->abfd, isym->st_shndx);
 	      if (isec != NULL && elf_discarded_section (isec))
 		return true;
 	    }
@@ -8337,8 +8366,6 @@
   struct elf_reloc_cookie cookie;
   asection *stab, *eh, *ehdr;
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
-  Elf_External_Sym *freesyms;
   struct elf_backend_data *bed;
   bfd *abfd;
   boolean ret = false;
@@ -8389,8 +8416,6 @@
 	continue;
 
       symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-      shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-
       cookie.abfd = abfd;
       cookie.sym_hashes = elf_sym_hashes (abfd);
       cookie.bad_symtab = elf_bad_symtab (abfd);
@@ -8406,48 +8431,20 @@
 	  cookie.extsymoff = symtab_hdr->sh_info;
 	}
 
-      freesyms = NULL;
-      if (symtab_hdr->contents)
-	cookie.locsyms = (void *) symtab_hdr->contents;
-      else if (cookie.locsymcount == 0)
-	cookie.locsyms = NULL;
-      else
+      cookie.locsyms = (Elf_Internal_Sym *) symtab_hdr->contents;
+      if (cookie.locsyms == NULL && cookie.locsymcount != 0)
 	{
-	  bfd_size_type amt = cookie.locsymcount * sizeof (Elf_External_Sym);
-	  cookie.locsyms = bfd_malloc (amt);
+	  cookie.locsyms = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						 cookie.locsymcount, 0,
+						 NULL, NULL, NULL);
 	  if (cookie.locsyms == NULL)
 	    return false;
-	  freesyms = cookie.locsyms;
-	  if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (cookie.locsyms, amt, abfd) != amt)
-	    {
-	    error_ret_free_loc:
-	      free (cookie.locsyms);
-	      return false;
-	    }
-	}
-
-      cookie.locsym_shndx = NULL;
-      if (shndx_hdr->sh_size != 0 && cookie.locsymcount != 0)
-	{
-	  bfd_size_type amt;
-	  amt = cookie.locsymcount * sizeof (Elf_External_Sym_Shndx);
-	  cookie.locsym_shndx = bfd_malloc (amt);
-	  if (cookie.locsym_shndx == NULL)
-	    goto error_ret_free_loc;
-	  if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	      || bfd_bread (cookie.locsym_shndx, amt, abfd) != amt)
-	    {
-	      free (cookie.locsym_shndx);
-	      goto error_ret_free_loc;
-	    }
 	}
 
       if (stab)
 	{
 	  cookie.rels = (NAME(_bfd_elf,link_read_relocs)
-			 (abfd, stab, (PTR) NULL,
-			  (Elf_Internal_Rela *) NULL,
+			 (abfd, stab, (PTR) NULL, (Elf_Internal_Rela *) NULL,
 			  info->keep_memory));
 	  if (cookie.rels)
 	    {
@@ -8459,7 +8456,7 @@
 					      elf_reloc_symbol_deleted_p,
 					      &cookie))
 		ret = true;
-	      if (! info->keep_memory)
+	      if (elf_section_data (stab)->relocs != cookie.rels)
 		free (cookie.rels);
 	    }
 	}
@@ -8483,7 +8480,7 @@
 						 elf_reloc_symbol_deleted_p,
 						 &cookie))
 	    ret = true;
-	  if (! info->keep_memory)
+	  if (cookie.rels && elf_section_data (eh)->relocs != cookie.rels)
 	    free (cookie.rels);
 	}
 
@@ -8493,11 +8490,14 @@
 	    ret = true;
 	}
 
-      if (cookie.locsym_shndx != NULL)
-	free (cookie.locsym_shndx);
-
-      if (freesyms != NULL)
-	free (freesyms);
+      if (cookie.locsyms != NULL
+	  && symtab_hdr->contents != (unsigned char *) cookie.locsyms)
+	{
+	  if (! info->keep_memory)
+	    free (cookie.locsyms);
+	  else
+	    symtab_hdr->contents = (unsigned char *) cookie.locsyms;
+	}
     }
 
   if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr))
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
new file mode 100644
index 0000000..040fddf
--- /dev/null
+++ b/bfd/elfn32-mips.c
@@ -0,0 +1,2230 @@
+/* MIPS-specific support for 32-bit ELF
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
+
+   Most of the information added by Ian Lance Taylor, Cygnus Support,
+   <ian@cygnus.com>.
+   N32/64 ABI support added by Mark Mitchell, CodeSourcery, LLC.
+   <mark@codesourcery.com>
+   Traditional MIPS targets support added by Koundinya.K, Dansk Data
+   Elektronik & Operations Research Group. <kk@ddeorg.soft.net>
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+/* This file handles MIPS ELF targets.  SGI Irix 5 uses a slightly
+   different MIPS ELF from other targets.  This matters when linking.
+   This file supports both, switching at runtime.  */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "bfdlink.h"
+#include "genlink.h"
+#include "elf-bfd.h"
+#include "elfxx-mips.h"
+#include "elf/mips.h"
+
+/* Get the ECOFF swapping routines.  */
+#include "coff/sym.h"
+#include "coff/symconst.h"
+#include "coff/internal.h"
+#include "coff/ecoff.h"
+#include "coff/mips.h"
+#define ECOFF_SIGNED_32
+#include "ecoffswap.h"
+
+static bfd_reloc_status_type mips_elf_generic_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips_elf_hi16_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips_elf_lo16_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips_elf_got16_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean mips_elf_assign_gp PARAMS ((bfd *, bfd_vma *));
+static bfd_reloc_status_type mips_elf_final_gp
+  PARAMS ((bfd *, asymbol *, boolean, char **, bfd_vma *));
+static bfd_reloc_status_type mips_elf_gprel16_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips_elf_literal_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips_elf_gprel32_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type gprel32_with_gp
+  PARAMS ((bfd *, asymbol *, arelent *, asection *, boolean, PTR, bfd_vma));
+static bfd_reloc_status_type mips_elf_shift6_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_jump_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_gprel_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
+  PARAMS ((bfd *, bfd_reloc_code_real_type));
+static reloc_howto_type *mips_elf_n32_rtype_to_howto
+  PARAMS ((unsigned int, boolean));
+static void mips_info_to_howto_rel
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static void mips_info_to_howto_rela
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
+static boolean mips_elf_sym_is_global PARAMS ((bfd *, asymbol *));
+static boolean mips_elf_n32_object_p PARAMS ((bfd *));
+static boolean elf32_mips_grok_prstatus
+  PARAMS ((bfd *, Elf_Internal_Note *));
+static boolean elf32_mips_grok_psinfo
+  PARAMS ((bfd *, Elf_Internal_Note *));
+static irix_compat_t elf_n32_mips_irix_compat
+  PARAMS ((bfd *));
+
+extern const bfd_target bfd_elf32_nbigmips_vec;
+extern const bfd_target bfd_elf32_nlittlemips_vec;
+
+static bfd_vma prev_reloc_address = -1;
+static bfd_vma prev_reloc_addend = 0;
+
+/* Nonzero if ABFD is using the N32 ABI.  */
+#define ABI_N32_P(abfd) \
+  ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
+
+/* Whether we are trying to be compatible with IRIX at all.  */
+#define SGI_COMPAT(abfd) \
+  (elf_n32_mips_irix_compat (abfd) != ict_none)
+
+/* The number of local .got entries we reserve.  */
+#define MIPS_RESERVED_GOTNO (2)
+
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
+   from smaller values.  Start with zero, widen, *then* decrement.  */
+#define MINUS_ONE	(((bfd_vma)0) - 1)
+
+/* The relocation table used for SHT_REL sections.  */
+
+static reloc_howto_type elf_mips_howto_table_rel[] =
+{
+  /* No relocation.  */
+  HOWTO (R_MIPS_NONE,		/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_NONE",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 16 bit relocation.  */
+  HOWTO (R_MIPS_16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_16",		/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit relocation.  */
+  HOWTO (R_MIPS_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 */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_32",		/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit symbol relative relocation.  */
+  HOWTO (R_MIPS_REL32,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_REL32",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 26 bit jump address.  */
+  HOWTO (R_MIPS_26,		/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC + 4.  */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_26",		/* name */
+	 true,			/* partial_inplace */
+	 0x03ffffff,		/* src_mask */
+	 0x03ffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL.
+     However, the native IRIX6 tools use them, so we try our best. */
+
+  /* High 16 bits of symbol value.  */
+  HOWTO (R_MIPS_HI16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_hi16_reloc,	/* special_function */
+	 "R_MIPS_HI16",		/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  */
+  HOWTO (R_MIPS_LO16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_lo16_reloc,	/* special_function */
+	 "R_MIPS_LO16",		/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* GP relative reference.  */
+  HOWTO (R_MIPS_GPREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_gprel16_reloc, /* special_function */
+	 "R_MIPS_GPREL16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Reference to literal section.  */
+  HOWTO (R_MIPS_LITERAL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_literal_reloc, /* special_function */
+	 "R_MIPS_LITERAL",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Reference to global offset table.  */
+  HOWTO (R_MIPS_GOT16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_got16_reloc,	/* special_function */
+	 "R_MIPS_GOT16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 16 bit PC relative reference.  */
+  HOWTO (R_MIPS_PC16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 true,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_PC16",		/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 true),			/* pcrel_offset */
+
+  /* 16 bit call through global offset table.  */
+  HOWTO (R_MIPS_CALL16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit GP relative reference.  */
+  HOWTO (R_MIPS_GPREL32,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_gprel32_reloc, /* special_function */
+	 "R_MIPS_GPREL32",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The remaining relocs are defined on Irix 5, although they are
+     not defined by the ABI.  */
+  EMPTY_HOWTO (13),
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
+
+  /* A 5 bit shift field.  */
+  HOWTO (R_MIPS_SHIFT5,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 5,			/* bitsize */
+	 false,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SHIFT5",	/* name */
+	 true,			/* partial_inplace */
+	 0x000007c0,		/* src_mask */
+	 0x000007c0,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A 6 bit shift field.  */
+  HOWTO (R_MIPS_SHIFT6,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 6,			/* bitsize */
+	 false,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 mips_elf_shift6_reloc,	/* special_function */
+	 "R_MIPS_SHIFT6",	/* name */
+	 true,			/* partial_inplace */
+	 0x000007c4,		/* src_mask */
+	 0x000007c4,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A 64 bit relocation.  */
+  HOWTO (R_MIPS_64,		/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_64",		/* name */
+	 true,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Displacement in the global offset table.  */
+  HOWTO (R_MIPS_GOT_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_DISP",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Displacement to page pointer in the global offset table.  */
+  HOWTO (R_MIPS_GOT_PAGE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_PAGE",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Offset from page pointer in the global offset table.  */
+  HOWTO (R_MIPS_GOT_OFST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_OFST",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_GOT_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_HI16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_GOT_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_LO16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 64 bit subtraction.  */
+  HOWTO (R_MIPS_SUB,		/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SUB",		/* name */
+	 true,			/* partial_inplace */
+	 MINUS_ONE,		/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Insert the addend as an instruction.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_INSERT_A,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_INSERT_A",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Insert the addend as an instruction, and change all relocations
+     to refer to the old instruction at the address.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_INSERT_B,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_INSERT_B",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Delete a 32 bit instruction.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_DELETE,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_DELETE",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations.
+     We don't, because
+       a) It means building the addend from a R_MIPS_HIGHEST/R_MIPS_HIGHER/
+	  R_MIPS_HI16/R_MIPS_LO16 sequence with varying ordering, using
+	  fallable heuristics.
+       b) No other NEwABI toolchain actually emits such relocations.  */
+  EMPTY_HOWTO (R_MIPS_HIGHER),
+  EMPTY_HOWTO (R_MIPS_HIGHEST),
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_CALL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL_HI16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_CALL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL_LO16",	/* name */
+	 true,			/* partial_inplace */
+	 0x0000ffff,		/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Section displacement.  */
+  HOWTO (R_MIPS_SCN_DISP,       /* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SCN_DISP",     /* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  HOWTO (R_MIPS_REL16,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_REL16",	/* name */
+	 true,			/* partial_inplace */
+	 0xffff,		/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* These two are obsolete.  */
+  EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE),
+  EMPTY_HOWTO (R_MIPS_PJUMP),
+
+  /* Similiar to R_MIPS_REL32, but used for relocations in a GOT section.
+     It must be used for multigot GOT's (and only there).  */
+  HOWTO (R_MIPS_RELGOT,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_RELGOT",	/* name */
+	 true,			/* partial_inplace */
+	 0xffffffff,		/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Protected jump conversion.  This is an optimization hint.  No
+     relocation is required for correctness.  */
+  HOWTO (R_MIPS_JALR,	        /* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_JALR",	        /* name */
+	 false,			/* partial_inplace */
+	 0x00000000,		/* src_mask */
+	 0x00000000,		/* dst_mask */
+	 false),		/* pcrel_offset */
+};
+
+/* The relocation table used for SHT_RELA sections.  */
+
+static reloc_howto_type elf_mips_howto_table_rela[] =
+{
+  /* No relocation.  */
+  HOWTO (R_MIPS_NONE,		/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_NONE",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 16 bit relocation.  */
+  HOWTO (R_MIPS_16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_16",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit relocation.  */
+  HOWTO (R_MIPS_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 */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_32",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit symbol relative relocation.  */
+  HOWTO (R_MIPS_REL32,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_REL32",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 26 bit jump address.  */
+  HOWTO (R_MIPS_26,		/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+				/* This needs complex overflow
+				   detection, because the upper 36
+				   bits must match the PC + 4.  */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_26",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x03ffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* High 16 bits of symbol value.  */
+  HOWTO (R_MIPS_HI16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_HI16",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of symbol value.  */
+  HOWTO (R_MIPS_LO16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_LO16",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* GP relative reference.  */
+  HOWTO (R_MIPS_GPREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_gprel16_reloc, /* special_function */
+	 "R_MIPS_GPREL16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Reference to literal section.  */
+  HOWTO (R_MIPS_LITERAL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_literal_reloc, /* special_function */
+	 "R_MIPS_LITERAL",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Reference to global offset table.  */
+  HOWTO (R_MIPS_GOT16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_got16_reloc,	/* special_function */
+	 "R_MIPS_GOT16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 16 bit PC relative reference.  */
+  HOWTO (R_MIPS_PC16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 true,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_PC16",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 true),			/* pcrel_offset */
+
+  /* 16 bit call through global offset table.  */
+  HOWTO (R_MIPS_CALL16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 32 bit GP relative reference.  */
+  HOWTO (R_MIPS_GPREL32,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_gprel32_reloc, /* special_function */
+	 "R_MIPS_GPREL32",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  EMPTY_HOWTO (13),
+  EMPTY_HOWTO (14),
+  EMPTY_HOWTO (15),
+
+  /* A 5 bit shift field.  */
+  HOWTO (R_MIPS_SHIFT5,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 5,			/* bitsize */
+	 false,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SHIFT5",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x000007c0,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* A 6 bit shift field.  */
+  HOWTO (R_MIPS_SHIFT6,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 6,			/* bitsize */
+	 false,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_bitfield, /* complain_on_overflow */
+	 mips_elf_shift6_reloc,	/* special_function */
+	 "R_MIPS_SHIFT6",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x000007c4,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 64 bit relocation.  */
+  HOWTO (R_MIPS_64,		/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_64",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Displacement in the global offset table.  */
+  HOWTO (R_MIPS_GOT_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_DISP",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Displacement to page pointer in the global offset table.  */
+  HOWTO (R_MIPS_GOT_PAGE,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_PAGE",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Offset from page pointer in the global offset table.  */
+  HOWTO (R_MIPS_GOT_OFST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_OFST",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_GOT_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_HI16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_GOT_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_GOT_LO16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 64 bit substraction.  */
+  HOWTO (R_MIPS_SUB,		/* type */
+	 0,			/* rightshift */
+	 4,			/* size (0 = byte, 1 = short, 2 = long) */
+	 64,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SUB",		/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 MINUS_ONE,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Insert the addend as an instruction.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_INSERT_A,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_INSERT_A",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Insert the addend as an instruction, and change all relocations
+     to refer to the old instruction at the address.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_INSERT_B,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_INSERT_B",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Delete a 32 bit instruction.  */
+  /* FIXME: Not handled correctly.  */
+  HOWTO (R_MIPS_DELETE,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_DELETE",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Get the higher value of a 64 bit addend.  */
+  HOWTO (R_MIPS_HIGHER,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_HIGHER",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Get the highest value of a 64 bit addend.  */
+  HOWTO (R_MIPS_HIGHEST,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_HIGHEST",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* High 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_CALL_HI16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL_HI16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Low 16 bits of displacement in global offset table.  */
+  HOWTO (R_MIPS_CALL_LO16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_CALL_LO16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0x0000ffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Section displacement, used by an associated event location section.  */
+  HOWTO (R_MIPS_SCN_DISP,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_SCN_DISP",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* 16 bit relocation.  */
+  HOWTO (R_MIPS_REL16,		/* type */
+	 0,			/* rightshift */
+	 1,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_REL16",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* These two are obsolete.  */
+  EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE),
+  EMPTY_HOWTO (R_MIPS_PJUMP),
+
+  /* Similiar to R_MIPS_REL32, but used for relocations in a GOT section.
+     It must be used for multigot GOT's (and only there).  */
+  HOWTO (R_MIPS_RELGOT,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_RELGOT",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+
+  /* Protected jump conversion.  This is an optimization hint.  No
+     relocation is required for correctness.  */
+  HOWTO (R_MIPS_JALR,	        /* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 32,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 mips_elf_generic_reloc, /* special_function */
+	 "R_MIPS_JALR",	        /* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0xffffffff,		/* dst_mask */
+	 false),		/* pcrel_offset */
+};
+
+/* The reloc used for the mips16 jump instruction.  */
+static reloc_howto_type elf_mips16_jump_howto =
+  HOWTO (R_MIPS16_26,		/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont, /* complain_on_overflow */
+	 			/* This needs complex overflow
+				   detection, because the upper four
+				   bits must match the PC.  */
+	 mips16_jump_reloc,	/* special_function */
+	 "R_MIPS16_26",		/* name */
+	 true,			/* partial_inplace */
+	 0x3ffffff,		/* src_mask */
+	 0x3ffffff,		/* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* The reloc used for the mips16 gprel instruction.  */
+static reloc_howto_type elf_mips16_gprel_howto =
+  HOWTO (R_MIPS16_GPREL,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 false,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_signed, /* complain_on_overflow */
+	 mips16_gprel_reloc,	/* special_function */
+	 "R_MIPS16_GPREL",	/* name */
+	 true,			/* partial_inplace */
+	 0x07ff001f,		/* src_mask */
+	 0x07ff001f,	        /* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* GNU extension to record C++ vtable hierarchy */
+static reloc_howto_type elf_mips_gnu_vtinherit_howto =
+  HOWTO (R_MIPS_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_MIPS_GNU_VTINHERIT", /* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* GNU extension to record C++ vtable member usage */
+static reloc_howto_type elf_mips_gnu_vtentry_howto =
+  HOWTO (R_MIPS_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_MIPS_GNU_VTENTRY",	/* name */
+	 false,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 false);		/* pcrel_offset */
+
+/* This is derived from bfd_elf_generic_reloc.  NewABI allows us to have
+   several relocations against the same address.  The addend is derived
+   from the addends of preceding relocations.  If we don't need to
+   do something special,  we simply keep track of the addend.  */
+
+#define GET_RELOC_ADDEND(obfd, sym, entry, sec)				\
+{									\
+  /* If we're relocating, and this is an external symbol, we don't	\
+     want to change anything.  */					\
+    if (obfd != (bfd *) NULL						\
+	&& (sym->flags & BSF_SECTION_SYM) == 0				\
+	&& (! entry->howto->partial_inplace				\
+	    || entry->addend == 0))					\
+      {									\
+        entry->address += sec->output_offset;				\
+        return bfd_reloc_ok;						\
+      }									\
+									\
+    /* The addend of combined relocs is remembered and left for		\
+       subsequent relocs.  */						\
+    if (prev_reloc_address != reloc_entry->address)			\
+      {									\
+        prev_reloc_address = reloc_entry->address;			\
+        prev_reloc_addend = reloc_entry->addend;			\
+      }									\
+    else								\
+      reloc_entry->addend = prev_reloc_addend;				\
+}
+
+#define SET_RELOC_ADDEND(entry)						\
+{									\
+  prev_reloc_addend = entry->addend;					\
+}
+
+static bfd_reloc_status_type
+mips_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
+			output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  return bfd_reloc_continue;
+}
+
+/* Do a R_MIPS_HI16 relocation.  This has to be done in combination
+   with a R_MIPS_LO16 reloc, because there is a carry from the LO16 to
+   the HI16.  Here we just save the information we need; we do the
+   actual relocation when we see the LO16.
+
+   MIPS ELF requires that the LO16 immediately follow the HI16.  As a
+   GNU extension, for non-pc-relative relocations, we permit an
+   arbitrary number of HI16 relocs to be associated with a single LO16
+   reloc.  This extension permits gcc to output the HI and LO relocs
+   itself.
+
+   This cannot be done for PC-relative relocations because both the HI16
+   and LO16 parts of the relocations must be done relative to the LO16
+   part, and there can be carry to or borrow from the HI16 part.  */
+
+struct mips_hi16
+{
+  struct mips_hi16 *next;
+  bfd_byte *addr;
+  bfd_vma addend;
+};
+
+/* FIXME: This should not be a static variable.  */
+
+static struct mips_hi16 *mips_hi16_list;
+
+static bfd_reloc_status_type
+mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
+		     output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  bfd_reloc_status_type ret;
+  bfd_vma relocation;
+  struct mips_hi16 *n;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  ret = bfd_reloc_ok;
+
+  if (bfd_is_und_section (symbol->section) && output_bfd == (bfd *) NULL)
+    ret = bfd_reloc_undefined;
+
+  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;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  /* Save the information, and let LO16 do the actual relocation.  */
+  n = (struct mips_hi16 *) bfd_malloc ((bfd_size_type) sizeof *n);
+  if (n == NULL)
+    return bfd_reloc_outofrange;
+  n->addr = (bfd_byte *) data + reloc_entry->address;
+  n->addend = relocation;
+  n->next = mips_hi16_list;
+  mips_hi16_list = n;
+
+  if (output_bfd != (bfd *) NULL)
+    reloc_entry->address += input_section->output_offset;
+
+  return ret;
+}
+
+/* Do a R_MIPS_LO16 relocation.  This is a straightforward 16 bit
+   inplace relocation; this function exists in order to do the
+   R_MIPS_HI16 relocation described above.  */
+
+static bfd_reloc_status_type
+mips_elf_lo16_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;
+{
+  if (mips_hi16_list != NULL)
+    {
+      struct mips_hi16 *l;
+
+      l = mips_hi16_list;
+      while (l != NULL)
+	{
+	  unsigned long insn;
+	  unsigned long val;
+	  unsigned long vallo;
+	  struct mips_hi16 *next;
+
+	  /* Do the HI16 relocation.  Note that we actually don't need
+	     to know anything about the LO16 itself, except where to
+	     find the low 16 bits of the addend needed by the LO16.  */
+	  insn = bfd_get_32 (abfd, l->addr);
+	  vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+
+	  /* The low order 16 bits are always treated as a signed
+	     value.  */
+	  vallo = ((vallo & 0xffff) ^ 0x8000) - 0x8000;
+	  val = ((insn & 0xffff) << 16) + vallo;
+	  val += l->addend;
+
+	  /* If PC-relative, we need to subtract out the address of the LO
+	     half of the HI/LO.  (The actual relocation is relative
+	     to that instruction.)  */
+	  if (reloc_entry->howto->pc_relative)
+	    val -= reloc_entry->address;
+
+	  /* At this point, "val" has the value of the combined HI/LO
+	     pair.  If the low order 16 bits (which will be used for
+	     the LO16 insn) are negative, then we will need an
+	     adjustment for the high order 16 bits.  */
+	  val += 0x8000;
+	  val = (val >> 16) & 0xffff;
+
+	  insn &= ~ (bfd_vma) 0xffff;
+	  insn |= val;
+	  bfd_put_32 (abfd, (bfd_vma) insn, l->addr);
+
+	  next = l->next;
+	  free (l);
+	  l = next;
+	}
+
+      mips_hi16_list = NULL;
+    }
+
+  /* Now do the LO16 reloc in the usual way.  */
+  return mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				 input_section, output_bfd, error_message);
+}
+
+/* Do a R_MIPS_GOT16 reloc.  This is a reloc against the global offset
+   table used for PIC code.  If the symbol is an external symbol, the
+   instruction is modified to contain the offset of the appropriate
+   entry in the global offset table.  If the symbol is a section
+   symbol, the next reloc is a R_MIPS_LO16 reloc.  The two 16 bit
+   addends are combined to form the real addend against the section
+   symbol; the GOT16 is modified to contain the offset of an entry in
+   the global offset table, and the LO16 is modified to offset it
+   appropriately.  Thus an offset larger than 16 bits requires a
+   modified value in the global offset table.
+
+   This implementation suffices for the assembler, but the linker does
+   not yet know how to create global offset tables.  */
+
+static bfd_reloc_status_type
+mips_elf_got16_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;
+{
+  /* If we're relocating, and this is a local symbol, we can handle it
+     just like HI16.  */
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) != 0)
+    return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
+				input_section, output_bfd, error_message);
+
+  /* Otherwise we try to handle it as R_MIPS_GOT_DISP.  */
+  return mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+				 input_section, output_bfd, error_message);
+}
+
+/* Set the GP value for OUTPUT_BFD.  Returns false if this is a
+   dangerous relocation.  */
+
+static boolean
+mips_elf_assign_gp (output_bfd, pgp)
+     bfd *output_bfd;
+     bfd_vma *pgp;
+{
+  unsigned int count;
+  asymbol **sym;
+  unsigned int i;
+
+  /* If we've already figured out what GP will be, just return it.  */
+  *pgp = _bfd_get_gp_value (output_bfd);
+  if (*pgp)
+    return true;
+
+  count = bfd_get_symcount (output_bfd);
+  sym = bfd_get_outsymbols (output_bfd);
+
+  /* The linker script will have created a symbol named `_gp' with the
+     appropriate value.  */
+  if (sym == (asymbol **) NULL)
+    i = count;
+  else
+    {
+      for (i = 0; i < count; i++, sym++)
+	{
+	  register const char *name;
+
+	  name = bfd_asymbol_name (*sym);
+	  if (*name == '_' && strcmp (name, "_gp") == 0)
+	    {
+	      *pgp = bfd_asymbol_value (*sym);
+	      _bfd_set_gp_value (output_bfd, *pgp);
+	      break;
+	    }
+	}
+    }
+
+  if (i >= count)
+    {
+      /* Only get the error once.  */
+      *pgp = 4;
+      _bfd_set_gp_value (output_bfd, *pgp);
+      return false;
+    }
+
+  return true;
+}
+
+/* We have to figure out the gp value, so that we can adjust the
+   symbol value correctly.  We look up the symbol _gp in the output
+   BFD.  If we can't find it, we're stuck.  We cache it in the ELF
+   target data.  We don't need to adjust the symbol value for an
+   external symbol if we are producing relocateable output.  */
+
+static bfd_reloc_status_type
+mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
+     bfd *output_bfd;
+     asymbol *symbol;
+     boolean relocateable;
+     char **error_message;
+     bfd_vma *pgp;
+{
+  if (bfd_is_und_section (symbol->section)
+      && ! relocateable)
+    {
+      *pgp = 0;
+      return bfd_reloc_undefined;
+    }
+
+  *pgp = _bfd_get_gp_value (output_bfd);
+  if (*pgp == 0
+      && (! relocateable
+	  || (symbol->flags & BSF_SECTION_SYM) != 0))
+    {
+      if (relocateable)
+	{
+	  /* Make up a value.  */
+	  *pgp = symbol->section->output_section->vma + 0x4000;
+	  _bfd_set_gp_value (output_bfd, *pgp);
+	}
+      else if (!mips_elf_assign_gp (output_bfd, pgp))
+	{
+	  *error_message =
+	    (char *) _("GP relative relocation when _gp not defined");
+	  return bfd_reloc_dangerous;
+	}
+    }
+
+  return bfd_reloc_ok;
+}
+
+/* Do a R_MIPS_GPREL16 relocation.  This is a 16 bit value which must
+   become the offset from the gp register.  */
+
+static bfd_reloc_status_type
+mips_elf_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
+			output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  if (output_bfd != (bfd *) NULL)
+    relocateable = true;
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+    }
+
+  ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+			   &gp);
+  if (ret != bfd_reloc_ok)
+    return ret;
+
+  return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+					input_section, relocateable,
+					data, gp);
+}
+
+/* Do a R_MIPS_LITERAL relocation.  */
+
+static bfd_reloc_status_type
+mips_elf_literal_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;
+{
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  /* FIXME: The entries in the .lit8 and .lit4 sections should be merged.  */
+  if (output_bfd != (bfd *) NULL)
+    relocateable = true;
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+    }
+
+  ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+			   &gp);
+  if (ret != bfd_reloc_ok)
+    return ret;
+
+  return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+					input_section, relocateable,
+					data, gp);
+}
+
+/* Do a R_MIPS_GPREL32 relocation.  This is a 32 bit value which must
+   become the offset from the gp register.  */
+
+static bfd_reloc_status_type
+mips_elf_gprel32_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;
+{
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  /* R_MIPS_GPREL32 relocations are defined for local symbols only.
+     We will only have an addend if this is a newly created reloc,
+     not read from an ELF file.  */
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && reloc_entry->addend == 0)
+    {
+      *error_message = (char *)
+	_("32bits gp relative relocation occurs for an external symbol");
+      return bfd_reloc_outofrange;
+    }
+
+  if (output_bfd != (bfd *) NULL)
+    {
+      relocateable = true;
+      gp = _bfd_get_gp_value (output_bfd);
+    }
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+
+      ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
+			       error_message, &gp);
+      if (ret != bfd_reloc_ok)
+	return ret;
+    }
+
+  return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
+			  relocateable, data, gp);
+}
+
+static bfd_reloc_status_type
+gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
+		 gp)
+     bfd *abfd;
+     asymbol *symbol;
+     arelent *reloc_entry;
+     asection *input_section;
+     boolean relocateable;
+     PTR data;
+     bfd_vma gp;
+{
+  bfd_vma relocation;
+  unsigned long val;
+
+  if (bfd_is_com_section (symbol->section))
+    relocation = 0;
+  else
+    relocation = symbol->value;
+
+  relocation += symbol->section->output_section->vma;
+  relocation += symbol->section->output_offset;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  if (reloc_entry->howto->src_mask == 0)
+    val = 0;
+  else
+    val = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+
+  /* Set val to the offset into the section or symbol.  */
+  val += reloc_entry->addend;
+
+  /* Adjust val for the final section location and GP value.  If we
+     are producing relocateable output, we don't want to do this for
+     an external symbol.  */
+  if (! relocateable
+      || (symbol->flags & BSF_SECTION_SYM) != 0)
+    val += relocation - gp;
+
+  bfd_put_32 (abfd, (bfd_vma) val, (bfd_byte *) data + reloc_entry->address);
+
+  if (relocateable)
+    reloc_entry->address += input_section->output_offset;
+
+  return bfd_reloc_ok;
+}
+
+/* Do a R_MIPS_SHIFT6 relocation. The MSB of the shift is stored at bit 2,
+   the rest is at bits 6-10. The bitpos already got right by the howto.  */
+
+static bfd_reloc_status_type
+mips_elf_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
+		       output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  reloc_entry->addend = (reloc_entry->addend & 0x00007c0)
+			| (reloc_entry->addend & 0x00000800) >> 9;
+
+  SET_RELOC_ADDEND (reloc_entry)
+
+  return bfd_reloc_continue;
+}
+
+/* Handle a mips16 jump.  */
+
+static bfd_reloc_status_type
+mips16_jump_reloc (abfd, reloc_entry, symbol, data, input_section,
+		   output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  static boolean warned = false;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  /* FIXME.  */
+  if (! warned)
+    (*_bfd_error_handler)
+      (_("Linking mips16 objects into %s format is not supported"),
+       bfd_get_target (input_section->output_section->owner));
+  warned = true;
+
+  return bfd_reloc_undefined;
+}
+
+/* Handle a mips16 GP relative reloc.  */
+
+static bfd_reloc_status_type
+mips16_gprel_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;
+{
+  boolean relocateable;
+  bfd_reloc_status_type ret;
+  bfd_vma gp;
+  unsigned short extend, insn;
+  unsigned long final;
+
+  GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
+
+  if (output_bfd != NULL)
+    relocateable = true;
+  else
+    {
+      relocateable = false;
+      output_bfd = symbol->section->output_section->owner;
+    }
+
+  ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+			   &gp);
+  if (ret != bfd_reloc_ok)
+    return ret;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  /* Pick up the mips16 extend instruction and the real instruction.  */
+  extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+  insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+
+  /* Stuff the current addend back as a 32 bit value, do the usual
+     relocation, and then clean up.  */
+  bfd_put_32 (abfd,
+	      (bfd_vma) (((extend & 0x1f) << 11)
+			 | (extend & 0x7e0)
+			 | (insn & 0x1f)),
+	      (bfd_byte *) data + reloc_entry->address);
+
+  ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+				       input_section, relocateable, data, gp);
+
+  final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+  bfd_put_16 (abfd,
+	      (bfd_vma) ((extend & 0xf800)
+			 | ((final >> 11) & 0x1f)
+			 | (final & 0x7e0)),
+	      (bfd_byte *) data + reloc_entry->address);
+  bfd_put_16 (abfd,
+	      (bfd_vma) ((insn & 0xffe0)
+			 | (final & 0x1f)),
+	      (bfd_byte *) data + reloc_entry->address + 2);
+
+  return ret;
+}
+
+#undef GET_RELOC_ADDEND
+#undef SET_RELOC_ADDEND
+
+/* A mapping from BFD reloc types to MIPS ELF reloc types.  */
+
+struct elf_reloc_map {
+  bfd_reloc_code_real_type bfd_val;
+  enum elf_mips_reloc_type elf_val;
+};
+
+static const struct elf_reloc_map mips_reloc_map[] =
+{
+  { BFD_RELOC_NONE, R_MIPS_NONE },
+  { BFD_RELOC_16, R_MIPS_16 },
+  { BFD_RELOC_32, R_MIPS_32 },
+  /* There is no BFD reloc for R_MIPS_REL32.  */
+  { BFD_RELOC_CTOR, R_MIPS_32 },
+  { BFD_RELOC_64, R_MIPS_64 },
+  { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+  { BFD_RELOC_HI16_S, R_MIPS_HI16 },
+  { BFD_RELOC_LO16, R_MIPS_LO16 },
+  { BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
+  { BFD_RELOC_GPREL32, R_MIPS_GPREL32 },
+  { BFD_RELOC_MIPS_JMP, R_MIPS_26 },
+  { BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL },
+  { BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 },
+  { BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 },
+  { BFD_RELOC_MIPS_SHIFT5, R_MIPS_SHIFT5 },
+  { BFD_RELOC_MIPS_SHIFT6, R_MIPS_SHIFT6 },
+  { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP },
+  { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
+  { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
+  { BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
+  { BFD_RELOC_MIPS_GOT_LO16, R_MIPS_GOT_LO16 },
+  { BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
+  { BFD_RELOC_MIPS_INSERT_A, R_MIPS_INSERT_A },
+  { BFD_RELOC_MIPS_INSERT_B, R_MIPS_INSERT_B },
+  { BFD_RELOC_MIPS_DELETE, R_MIPS_DELETE },
+  { BFD_RELOC_MIPS_HIGHEST, R_MIPS_HIGHEST },
+  { BFD_RELOC_MIPS_HIGHER, R_MIPS_HIGHER },
+  { BFD_RELOC_MIPS_CALL_HI16, R_MIPS_CALL_HI16 },
+  { BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 },
+  { BFD_RELOC_MIPS_SCN_DISP, R_MIPS_SCN_DISP },
+  { BFD_RELOC_MIPS_REL16, R_MIPS_REL16 },
+  /* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated.  */
+  { BFD_RELOC_MIPS_RELGOT, R_MIPS_RELGOT },
+  { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }
+};
+
+/* Given a BFD reloc type, return a howto structure.  */
+
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_type_lookup (abfd, code)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     bfd_reloc_code_real_type code;
+{
+  unsigned int i;
+  /* FIXME: We default to RELA here instead of choosing the right
+     relocation variant.  */
+  reloc_howto_type *howto_table = elf_mips_howto_table_rela;
+
+  for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
+       i++)
+    {
+      if (mips_reloc_map[i].bfd_val == code)
+	return &howto_table[(int) mips_reloc_map[i].elf_val];
+    }
+
+  switch (code)
+    {
+    case BFD_RELOC_MIPS16_JMP:
+      return &elf_mips16_jump_howto;
+    case BFD_RELOC_MIPS16_GPREL:
+      return &elf_mips16_gprel_howto;
+    case BFD_RELOC_VTABLE_INHERIT:
+      return &elf_mips_gnu_vtinherit_howto;
+    case BFD_RELOC_VTABLE_ENTRY:
+      return &elf_mips_gnu_vtentry_howto;
+    default:
+      bfd_set_error (bfd_error_bad_value);
+      return NULL;
+    }
+}
+
+/* Given a MIPS Elf32_Internal_Rel, fill in an arelent structure.  */
+
+static reloc_howto_type *
+mips_elf_n32_rtype_to_howto (r_type, rela_p)
+     unsigned int r_type;
+     boolean rela_p;
+{
+  switch (r_type)
+    {
+    case R_MIPS16_26:
+      return &elf_mips16_jump_howto;
+    case R_MIPS16_GPREL:
+      return &elf_mips16_gprel_howto;
+    case R_MIPS_GNU_VTINHERIT:
+      return &elf_mips_gnu_vtinherit_howto;
+    case R_MIPS_GNU_VTENTRY:
+      return &elf_mips_gnu_vtentry_howto;
+    default:
+      BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
+      if (rela_p)
+	return &elf_mips_howto_table_rela[r_type];
+      else
+	return &elf_mips_howto_table_rel[r_type];
+      break;
+    }
+}
+
+/* Given a MIPS Elf32_Internal_Rel, fill in an arelent structure.  */
+
+static void
+mips_info_to_howto_rel (abfd, cache_ptr, dst)
+     bfd *abfd;
+     arelent *cache_ptr;
+     Elf32_Internal_Rel *dst;
+{
+  unsigned int r_type;
+
+  r_type = ELF32_R_TYPE (dst->r_info);
+  cache_ptr->howto = mips_elf_n32_rtype_to_howto (r_type, false);
+
+  /* The addend for a GPREL16 or LITERAL relocation comes from the GP
+     value for the object file.  We get the addend now, rather than
+     when we do the relocation, because the symbol manipulations done
+     by the linker may cause us to lose track of the input BFD.  */
+  if (((*cache_ptr->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
+      && (r_type == (unsigned int) R_MIPS_GPREL16
+	  || r_type == (unsigned int) R_MIPS_LITERAL))
+    cache_ptr->addend = elf_gp (abfd);
+}
+
+/* Given a MIPS Elf32_Internal_Rela, fill in an arelent structure.  */
+
+static void
+mips_info_to_howto_rela (abfd, cache_ptr, dst)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *cache_ptr;
+     Elf32_Internal_Rela *dst;
+{
+  unsigned int r_type;
+
+  r_type = ELF32_R_TYPE (dst->r_info);
+  cache_ptr->howto = mips_elf_n32_rtype_to_howto (r_type, true);
+  cache_ptr->addend = dst->r_addend;
+}
+
+/* Determine whether a symbol is global for the purposes of splitting
+   the symbol table into global symbols and local symbols.  At least
+   on Irix 5, this split must be between section symbols and all other
+   symbols.  On most ELF targets the split is between static symbols
+   and externally visible symbols.  */
+
+static boolean
+mips_elf_sym_is_global (abfd, sym)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asymbol *sym;
+{
+  if (SGI_COMPAT (abfd))
+    return (sym->flags & BSF_SECTION_SYM) == 0;
+  else
+    return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+	    || bfd_is_und_section (bfd_get_section (sym))
+	    || bfd_is_com_section (bfd_get_section (sym)));
+}
+
+/* Set the right machine number for a MIPS ELF file.  */
+
+static boolean
+mips_elf_n32_object_p (abfd)
+     bfd *abfd;
+{
+  unsigned long mach;
+
+  /* Irix 5 and 6 are broken.  Object file symbol tables are not always
+     sorted correctly such that local symbols precede global symbols,
+     and the sh_info field in the symbol table is not always right.  */
+  if (SGI_COMPAT (abfd))
+    elf_bad_symtab (abfd) = true;
+
+  mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags);
+  bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
+
+  if (! ABI_N32_P(abfd))
+    return false;
+
+  return true;
+}
+
+/* Support for core dump NOTE sections.  */
+static boolean
+elf32_mips_grok_prstatus (abfd, note)
+     bfd *abfd;
+     Elf_Internal_Note *note;
+{
+  int offset;
+  unsigned int raw_size;
+
+  switch (note->descsz)
+    {
+      default:
+	return false;
+
+      case 256:		/* Linux/MIPS */
+	/* pr_cursig */
+	elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+	/* pr_pid */
+	elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+	/* pr_reg */
+	offset = 72;
+	raw_size = 180;
+
+	break;
+    }
+
+  /* Make a ".reg/999" section.  */
+  return _bfd_elfcore_make_pseudosection (abfd, ".reg", raw_size,
+					  note->descpos + offset);
+}
+
+static boolean
+elf32_mips_grok_psinfo (abfd, note)
+     bfd *abfd;
+     Elf_Internal_Note *note;
+{
+  switch (note->descsz)
+    {
+      default:
+	return false;
+
+      case 128:		/* Linux/MIPS elf_prpsinfo */
+	elf_tdata (abfd)->core_program
+	 = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
+	elf_tdata (abfd)->core_command
+	 = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
+    }
+
+  /* Note that for some reason, a spurious space is tacked
+     onto the end of the args in some (at least one anyway)
+     implementations, so strip it off if it exists.  */
+
+  {
+    char *command = elf_tdata (abfd)->core_command;
+    int n = strlen (command);
+
+    if (0 < n && command[n - 1] == ' ')
+      command[n - 1] = '\0';
+  }
+
+  return true;
+}
+
+/* Depending on the target vector we generate some version of Irix
+   executables or "normal" MIPS ELF ABI executables.  */
+static irix_compat_t
+elf_n32_mips_irix_compat (abfd)
+     bfd *abfd;
+{
+  if ((abfd->xvec == &bfd_elf32_nbigmips_vec)
+      || (abfd->xvec == &bfd_elf32_nlittlemips_vec))
+    return ict_irix6;
+  else
+    return ict_none;
+}
+
+/* ECOFF swapping routines.  These are used when dealing with the
+   .mdebug section, which is in the ECOFF debugging format.  */
+static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
+  /* Symbol table magic number.  */
+  magicSym,
+  /* Alignment of debugging information.  E.g., 4.  */
+  4,
+  /* Sizes of external symbolic information.  */
+  sizeof (struct hdr_ext),
+  sizeof (struct dnr_ext),
+  sizeof (struct pdr_ext),
+  sizeof (struct sym_ext),
+  sizeof (struct opt_ext),
+  sizeof (struct fdr_ext),
+  sizeof (struct rfd_ext),
+  sizeof (struct ext_ext),
+  /* Functions to swap in external symbolic data.  */
+  ecoff_swap_hdr_in,
+  ecoff_swap_dnr_in,
+  ecoff_swap_pdr_in,
+  ecoff_swap_sym_in,
+  ecoff_swap_opt_in,
+  ecoff_swap_fdr_in,
+  ecoff_swap_rfd_in,
+  ecoff_swap_ext_in,
+  _bfd_ecoff_swap_tir_in,
+  _bfd_ecoff_swap_rndx_in,
+  /* Functions to swap out external symbolic data.  */
+  ecoff_swap_hdr_out,
+  ecoff_swap_dnr_out,
+  ecoff_swap_pdr_out,
+  ecoff_swap_sym_out,
+  ecoff_swap_opt_out,
+  ecoff_swap_fdr_out,
+  ecoff_swap_rfd_out,
+  ecoff_swap_ext_out,
+  _bfd_ecoff_swap_tir_out,
+  _bfd_ecoff_swap_rndx_out,
+  /* Function to read in symbolic data.  */
+  _bfd_mips_elf_read_ecoff_info
+};
+
+#define ELF_ARCH			bfd_arch_mips
+#define ELF_MACHINE_CODE		EM_MIPS
+
+/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
+   a value of 0x1000, and we are compatible.
+   FIXME: How does this affect NewABI?  */
+#define ELF_MAXPAGESIZE			0x1000
+
+#define elf_backend_collect		true
+#define elf_backend_type_change_ok	true
+#define elf_backend_can_gc_sections	true
+#define elf_info_to_howto		mips_info_to_howto_rela
+#define elf_info_to_howto_rel		mips_info_to_howto_rel
+#define elf_backend_sym_is_global	mips_elf_sym_is_global
+#define elf_backend_object_p		mips_elf_n32_object_p
+#define elf_backend_symbol_processing	_bfd_mips_elf_symbol_processing
+#define elf_backend_section_processing	_bfd_mips_elf_section_processing
+#define elf_backend_section_from_shdr	_bfd_mips_elf_section_from_shdr
+#define elf_backend_fake_sections	_bfd_mips_elf_fake_sections
+#define elf_backend_section_from_bfd_section \
+					_bfd_mips_elf_section_from_bfd_section
+#define elf_backend_add_symbol_hook	_bfd_mips_elf_add_symbol_hook
+#define elf_backend_link_output_symbol_hook \
+					_bfd_mips_elf_link_output_symbol_hook
+#define elf_backend_create_dynamic_sections \
+					_bfd_mips_elf_create_dynamic_sections
+#define elf_backend_check_relocs	_bfd_mips_elf_check_relocs
+#define elf_backend_adjust_dynamic_symbol \
+					_bfd_mips_elf_adjust_dynamic_symbol
+#define elf_backend_always_size_sections \
+					_bfd_mips_elf_always_size_sections
+#define elf_backend_size_dynamic_sections \
+					_bfd_mips_elf_size_dynamic_sections
+#define elf_backend_relocate_section	_bfd_mips_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol \
+					_bfd_mips_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections \
+					_bfd_mips_elf_finish_dynamic_sections
+#define elf_backend_final_write_processing \
+					_bfd_mips_elf_final_write_processing
+#define elf_backend_additional_program_headers \
+					_bfd_mips_elf_additional_program_headers
+#define elf_backend_modify_segment_map	_bfd_mips_elf_modify_segment_map
+#define elf_backend_gc_mark_hook	_bfd_mips_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook	_bfd_mips_elf_gc_sweep_hook
+#define elf_backend_copy_indirect_symbol \
+					_bfd_mips_elf_copy_indirect_symbol
+#define elf_backend_hide_symbol		_bfd_mips_elf_hide_symbol
+#define elf_backend_grok_prstatus	elf32_mips_grok_prstatus
+#define elf_backend_grok_psinfo		elf32_mips_grok_psinfo
+#define elf_backend_ecoff_debug_swap	&mips_elf32_ecoff_debug_swap
+
+#define elf_backend_got_header_size	(4 * MIPS_RESERVED_GOTNO)
+#define elf_backend_plt_header_size	0
+
+/* MIPS n32 ELF can use a mixture of REL and RELA, but some Relocations
+   work better/work only in RELA, so we default to this.  */
+#define elf_backend_may_use_rel_p	1
+#define elf_backend_may_use_rela_p	1
+#define elf_backend_default_use_rela_p	1
+#define elf_backend_sign_extend_vma	true
+
+#define elf_backend_discard_info	_bfd_mips_elf_discard_info
+#define elf_backend_ignore_discarded_relocs \
+					_bfd_mips_elf_ignore_discarded_relocs
+#define elf_backend_write_section	_bfd_mips_elf_write_section
+#define elf_backend_mips_irix_compat	elf_n32_mips_irix_compat
+#define elf_backend_mips_rtype_to_howto	mips_elf_n32_rtype_to_howto
+#define bfd_elf32_find_nearest_line	_bfd_mips_elf_find_nearest_line
+#define bfd_elf32_set_section_contents	_bfd_mips_elf_set_section_contents
+#define bfd_elf32_bfd_get_relocated_section_contents \
+				_bfd_elf_mips_get_relocated_section_contents
+#define bfd_elf32_bfd_link_hash_table_create \
+					_bfd_mips_elf_link_hash_table_create
+#define bfd_elf32_bfd_final_link	_bfd_mips_elf_final_link
+#define bfd_elf32_bfd_merge_private_bfd_data \
+					_bfd_mips_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_set_private_flags	_bfd_mips_elf_set_private_flags
+#define bfd_elf32_bfd_print_private_bfd_data \
+					_bfd_mips_elf_print_private_bfd_data
+
+/* Support for SGI-ish mips targets using n32 ABI.  */
+
+#define TARGET_LITTLE_SYM               bfd_elf32_nlittlemips_vec
+#define TARGET_LITTLE_NAME              "elf32-nlittlemips"
+#define TARGET_BIG_SYM                  bfd_elf32_nbigmips_vec
+#define TARGET_BIG_NAME                 "elf32-nbigmips"
+
+#include "elf32-target.h"
+
+/* Support for traditional mips targets using n32 ABI.  */
+#define INCLUDED_TARGET_FILE            /* More a type of flag.  */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define TARGET_LITTLE_SYM               bfd_elf32_ntradlittlemips_vec
+#define TARGET_LITTLE_NAME              "elf32-ntradlittlemips"
+#define TARGET_BIG_SYM                  bfd_elf32_ntradbigmips_vec
+#define TARGET_BIG_NAME                 "elf32-ntradbigmips"
+
+/* Include the target file again for this target.  */
+#include "elf32-target.h"
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 943159b..dca8b45 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -2,21 +2,21 @@
    Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -25,37 +25,33 @@
 #include "opcode/ia64.h"
 #include "elf/ia64.h"
 
-/*
- * THE RULES for all the stuff the linker creates --
- *
- * GOT		Entries created in response to LTOFF or LTOFF_FPTR
- *		relocations.  Dynamic relocs created for dynamic
- *		symbols in an application; REL relocs for locals
- *		in a shared library.
- *
- * FPTR		The canonical function descriptor.  Created for local
- *		symbols in applications.  Descriptors for dynamic symbols
- *		and local symbols in shared libraries are created by
- *		ld.so.  Thus there are no dynamic relocs against these
- *		objects.  The FPTR relocs for such _are_ passed through
- *		to the dynamic relocation tables.
- *
- * FULL_PLT	Created for a PCREL21B relocation against a dynamic symbol.
- *		Requires the creation of a PLTOFF entry.  This does not
- *		require any dynamic relocations.
- *
- * PLTOFF	Created by PLTOFF relocations.  For local symbols, this
- *		is an alternate function descriptor, and in shared libraries
- *		requires two REL relocations.  Note that this cannot be
- *		transformed into an FPTR relocation, since it must be in
- *		range of the GP.  For dynamic symbols, this is a function
- *		descriptor for a MIN_PLT entry, and requires one IPLT reloc.
- *
- * MIN_PLT	Created by PLTOFF entries against dynamic symbols.  This
- *		does not reqire dynamic relocations.
- */
-
-#define USE_RELA		/* we want RELA relocs, not REL */
+/* THE RULES for all the stuff the linker creates --
+ 
+  GOT		Entries created in response to LTOFF or LTOFF_FPTR
+ 		relocations.  Dynamic relocs created for dynamic
+ 		symbols in an application; REL relocs for locals
+ 		in a shared library.
+ 
+  FPTR		The canonical function descriptor.  Created for local
+ 		symbols in applications.  Descriptors for dynamic symbols
+ 		and local symbols in shared libraries are created by
+ 		ld.so.  Thus there are no dynamic relocs against these
+ 		objects.  The FPTR relocs for such _are_ passed through
+ 		to the dynamic relocation tables.
+ 
+  FULL_PLT	Created for a PCREL21B relocation against a dynamic symbol.
+ 		Requires the creation of a PLTOFF entry.  This does not
+ 		require any dynamic relocations.
+ 
+  PLTOFF	Created by PLTOFF relocations.  For local symbols, this
+ 		is an alternate function descriptor, and in shared libraries
+ 		requires two REL relocations.  Note that this cannot be
+ 		transformed into an FPTR relocation, since it must be in
+ 		range of the GP.  For dynamic symbols, this is a function
+ 		descriptor for a MIN_PLT entry, and requires one IPLT reloc.
+ 
+  MIN_PLT	Created by PLTOFF entries against dynamic symbols.  This
+ 		does not reqire dynamic relocations.  */
 
 #define NELEMS(a)	((int) (sizeof (a) / sizeof ((a)[0])))
 
@@ -140,7 +136,7 @@
 
 struct elfNN_ia64_link_hash_table
 {
-  /* The main hash table */
+  /* The main hash table.  */
   struct elf_link_hash_table root;
 
   asection *got_sec;		/* the linkage table section (or NULL) */
@@ -174,7 +170,7 @@
 static boolean is_unwind_section_name
   PARAMS ((bfd *abfd, const char *));
 static boolean elfNN_ia64_section_from_shdr
-  PARAMS ((bfd *, ElfNN_Internal_Shdr *, char *));
+  PARAMS ((bfd *, ElfNN_Internal_Shdr *, const char *));
 static boolean elfNN_ia64_section_flags
   PARAMS ((flagword *, ElfNN_Internal_Shdr *));
 static boolean elfNN_ia64_fake_sections
@@ -211,7 +207,8 @@
   PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
 	   const char *string));
 static void elfNN_ia64_hash_copy_indirect
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 static void elfNN_ia64_hash_hide_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
 static struct bfd_link_hash_table *elfNN_ia64_hash_table_create
@@ -327,7 +324,7 @@
 boolean elfNN_hpux_backend_section_from_bfd_section
   PARAMS ((bfd *abfd, asection *sec, int *retval));
 
-/* ia64-specific relocation */
+/* ia64-specific relocation.  */
 
 /* Perform a relocation.  Not much to do here as all the hard work is
    done in elfNN_ia64_final_link_relocate.  */
@@ -461,7 +458,7 @@
 
 /* Given a BFD reloc type, return the matching HOWTO structure.  */
 
-static reloc_howto_type*
+static reloc_howto_type *
 lookup_howto (rtype)
      unsigned int rtype;
 {
@@ -691,15 +688,10 @@
     };
 
   Elf_Internal_Shdr *symtab_hdr;
-  Elf_Internal_Shdr *shndx_hdr;
   Elf_Internal_Rela *internal_relocs;
-  Elf_Internal_Rela *free_relocs = NULL;
   Elf_Internal_Rela *irel, *irelend;
   bfd_byte *contents;
-  bfd_byte *free_contents = NULL;
-  ElfNN_External_Sym *extsyms;
-  ElfNN_External_Sym *free_extsyms = NULL;
-  Elf_External_Sym_Shndx *shndx_buf = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   struct elfNN_ia64_link_hash_table *ia64_info;
   struct one_fixup *fixups = NULL;
   boolean changed_contents = false;
@@ -726,10 +718,7 @@
 		     (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
 		      link_info->keep_memory));
   if (internal_relocs == NULL)
-    goto error_return;
-
-  if (! link_info->keep_memory)
-    free_relocs = internal_relocs;
+    return false;
 
   ia64_info = elfNN_ia64_hash_table (link_info);
   irelend = internal_relocs + sec->reloc_count;
@@ -741,8 +730,8 @@
   /* No branch-type relocations.  */
   if (irel == irelend)
     {
-      if (free_relocs != NULL)
-	free (free_relocs);
+      if (elf_section_data (sec)->relocs != internal_relocs)
+	free (internal_relocs);
       return true;
     }
 
@@ -754,48 +743,15 @@
       contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
       if (contents == NULL)
 	goto error_return;
-      free_contents = contents;
 
       if (! bfd_get_section_contents (abfd, sec, contents,
 				      (file_ptr) 0, sec->_raw_size))
 	goto error_return;
     }
 
-  /* Read this BFD's local symbols.  */
-  if (symtab_hdr->contents != NULL)
-    extsyms = (ElfNN_External_Sym *) symtab_hdr->contents;
-  else
-    {
-      bfd_size_type amt;
-
-      amt = symtab_hdr->sh_info * sizeof (ElfNN_External_Sym);
-      extsyms = (ElfNN_External_Sym *) bfd_malloc (amt);
-      if (extsyms == NULL)
-	goto error_return;
-      free_extsyms = extsyms;
-      if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread (extsyms, amt, abfd) != amt)
-	goto error_return;
-    }
-
-  shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-  if (shndx_hdr->sh_size != 0)
-    {
-      bfd_size_type amt;
-
-      amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
-      shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
-      if (shndx_buf == NULL)
-	goto error_return;
-      if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
-	  || bfd_bread (shndx_buf, amt, abfd) != amt)
-	goto error_return;
-    }
-
   for (; irel < irelend; irel++)
     {
       bfd_vma symaddr, reladdr, trampoff, toff, roff;
-      Elf_Internal_Sym isym;
       asection *tsec;
       struct one_fixup *f;
       bfd_size_type amt;
@@ -806,25 +762,34 @@
       /* Get the value of the symbol referred to by the reloc.  */
       if (ELFNN_R_SYM (irel->r_info) < symtab_hdr->sh_info)
 	{
-	  ElfNN_External_Sym *esym;
-	  Elf_External_Sym_Shndx *shndx;
-
 	  /* A local symbol.  */
-	  esym = extsyms + ELFNN_R_SYM (irel->r_info);
-	  shndx = shndx_buf + (shndx_buf ? ELFNN_R_SYM (irel->r_info) : 0);
-	  bfd_elfNN_swap_symbol_in (abfd, esym, shndx, &isym);
-	  if (isym.st_shndx == SHN_UNDEF)
+	  Elf_Internal_Sym *isym;
+
+	  /* Read this BFD's local symbols.  */
+	  if (isymbuf == NULL)
+	    {
+	      isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+	      if (isymbuf == NULL)
+		isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+						symtab_hdr->sh_info, 0,
+						NULL, NULL, NULL);
+	      if (isymbuf == 0)
+		goto error_return;
+	    }
+
+	  isym = isymbuf + ELF64_R_SYM (irel->r_info);
+	  if (isym->st_shndx == SHN_UNDEF)
 	    continue;	/* We can't do anthing with undefined symbols.  */
-	  else if (isym.st_shndx == SHN_ABS)
+	  else if (isym->st_shndx == SHN_ABS)
 	    tsec = bfd_abs_section_ptr;
-	  else if (isym.st_shndx == SHN_COMMON)
+	  else if (isym->st_shndx == SHN_COMMON)
 	    tsec = bfd_com_section_ptr;
-	  else if (isym.st_shndx == SHN_IA_64_ANSI_COMMON)
+	  else if (isym->st_shndx == SHN_IA_64_ANSI_COMMON)
 	    tsec = bfd_com_section_ptr;
 	  else
-	    tsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+	    tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 
-	  toff = isym.st_value;
+	  toff = isym->st_value;
 	}
       else
 	{
@@ -972,17 +937,23 @@
       free (f);
     }
 
-  if (changed_relocs)
-    elf_section_data (sec)->relocs = internal_relocs;
-  else if (free_relocs != NULL)
-    free (free_relocs);
-
-  if (changed_contents)
-    elf_section_data (sec)->this_hdr.contents = contents;
-  else if (free_contents != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
       if (! link_info->keep_memory)
-	free (free_contents);
+	free (isymbuf);
+      else
+	{
+	  /* Cache the symbols for elf_link_input_bfd.  */
+	  symtab_hdr->contents = (unsigned char *) isymbuf;
+	}
+    }
+
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    {
+      if (!changed_contents && !link_info->keep_memory)
+	free (contents);
       else
 	{
 	  /* Cache the section contents for elf_link_input_bfd.  */
@@ -990,32 +961,26 @@
 	}
     }
 
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-
-  if (free_extsyms != NULL)
+  if (elf_section_data (sec)->relocs != internal_relocs)
     {
-      if (! link_info->keep_memory)
-	free (free_extsyms);
+      if (!changed_relocs)
+	free (internal_relocs);
       else
-	{
-	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = (unsigned char *) extsyms;
-	}
+	elf_section_data (sec)->relocs = internal_relocs;
     }
 
   *again = changed_contents || changed_relocs;
   return true;
 
  error_return:
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
-  if (shndx_buf != NULL)
-    free (shndx_buf);
-  if (free_extsyms != NULL)
-    free (free_extsyms);
+  if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (sec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (sec)->relocs != internal_relocs)
+    free (internal_relocs);
   return false;
 }
 
@@ -1047,7 +1012,7 @@
 elfNN_ia64_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      ElfNN_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   asection *newsect;
 
@@ -1119,24 +1084,22 @@
   else if (strcmp (name, ".HP.opt_annot") == 0)
     hdr->sh_type = SHT_IA_64_HP_OPT_ANOT;
   else if (strcmp (name, ".reloc") == 0)
-    /*
-     * This is an ugly, but unfortunately necessary hack that is
-     * needed when producing EFI binaries on IA-64. It tells
-     * elf.c:elf_fake_sections() not to consider ".reloc" as a section
-     * containing ELF relocation info.  We need this hack in order to
-     * be able to generate ELF binaries that can be translated into
-     * EFI applications (which are essentially COFF objects).  Those
-     * files contain a COFF ".reloc" section inside an ELFNN object,
-     * which would normally cause BFD to segfault because it would
-     * attempt to interpret this section as containing relocation
-     * entries for section "oc".  With this hack enabled, ".reloc"
-     * will be treated as a normal data section, which will avoid the
-     * segfault.  However, you won't be able to create an ELFNN binary
-     * with a section named "oc" that needs relocations, but that's
-     * the kind of ugly side-effects you get when detecting section
-     * types based on their names...  In practice, this limitation is
-     * unlikely to bite.
-     */
+    /* This is an ugly, but unfortunately necessary hack that is
+       needed when producing EFI binaries on IA-64. It tells
+       elf.c:elf_fake_sections() not to consider ".reloc" as a section
+       containing ELF relocation info.  We need this hack in order to
+       be able to generate ELF binaries that can be translated into
+       EFI applications (which are essentially COFF objects).  Those
+       files contain a COFF ".reloc" section inside an ELFNN object,
+       which would normally cause BFD to segfault because it would
+       attempt to interpret this section as containing relocation
+       entries for section "oc".  With this hack enabled, ".reloc"
+       will be treated as a normal data section, which will avoid the
+       segfault.  However, you won't be able to create an ELFNN binary
+       with a section named "oc" that needs relocations, but that's
+       the kind of ugly side-effects you get when detecting section
+       types based on their names...  In practice, this limitation is
+       unlikely to bite.  */
     hdr->sh_type = SHT_PROGBITS;
 
   if (sec->flags & SEC_SMALL_DATA)
@@ -1225,6 +1188,19 @@
 	  break;
 	}
     }
+
+  if (! elf_flags_init (abfd))
+    {
+      unsigned long flags = 0;
+
+      if (abfd->xvec->byteorder == BFD_ENDIAN_BIG)
+	flags |= EF_IA_64_BE;
+      if (bfd_get_mach (abfd) == bfd_mach_ia64_elf64)
+	flags |= EF_IA_64_ABI64;
+
+      elf_elfheader(abfd)->e_flags = flags;
+      elf_flags_init (abfd) = true;
+    }
 }
 
 /* Hook called by the linker routine which adds symbols from an object
@@ -1401,8 +1377,6 @@
   struct elf_segment_map *m, **pm;
   Elf_Internal_Shdr *hdr;
   asection *s;
-  boolean unwind_found;
-  asection *unwind_sec;
 
   /* If we need a PT_IA_64_ARCHEXT segment, it must come before
      all PT_LOAD segments.  */
@@ -1447,20 +1421,16 @@
 	  for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
 	    if (m->p_type == PT_IA_64_UNWIND)
 	      {
+		int i;
+
 		/* Look through all sections in the unwind segment
 		   for a match since there may be multiple sections
 		   to a segment.  */
+		for (i = m->count - 1; i >= 0; --i)
+		  if (m->sections[i] == s)
+		    break;
 
-		unwind_sec = m->sections[0];
-		unwind_found = false;
-		while (unwind_sec != NULL && !unwind_found)
-		  {
-		    if (unwind_sec == s)
-		      unwind_found = true;
-		    else
-		      unwind_sec = unwind_sec -> next;
-		  }
-		if (unwind_found)
+		if (i >= 0)
 		  break;
 	      }
 
@@ -1548,6 +1518,8 @@
     case STV_INTERNAL:
     case STV_HIDDEN:
       return false;
+    default:
+      break;
     }
 
   if (h->root.type == bfd_link_hash_undefweak
@@ -1631,7 +1603,8 @@
 }
 
 static void
-elfNN_ia64_hash_copy_indirect (xdir, xind)
+elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
+     struct elf_backend_data *bed ATTRIBUTE_UNUSED;
      struct elf_link_hash_entry *xdir, *xind;
 {
   struct elfNN_ia64_link_hash_entry *dir, *ind;
@@ -4834,6 +4807,9 @@
 #undef  elf_backend_section_from_bfd_section
 #define elf_backend_section_from_bfd_section elfNN_hpux_backend_section_from_bfd_section
 
+#undef  elf_backend_want_p_paddr_set_to_zero
+#define elf_backend_want_p_paddr_set_to_zero 1
+
 #undef  ELF_MAXPAGESIZE
 #define ELF_MAXPAGESIZE                 0x1000  /* 1K */
 
@@ -4841,3 +4817,5 @@
 #define elfNN_bed elfNN_ia64_hpux_bed
 
 #include "elfNN-target.h"
+
+#undef  elf_backend_want_p_paddr_set_to_zero
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 0a92e5d..5132693 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -373,26 +373,28 @@
 #define ABI_N32_P(abfd) \
   ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
 
-/* Nonzero if ABFD is using the 64-bit ABI. */
+/* Nonzero if ABFD is using the N64 ABI.  */
 #define ABI_64_P(abfd) \
-  ((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
+  (get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64)
 
+/* Nonzero if ABFD is using NewABI conventions.  */
+#define NEWABI_P(abfd) (ABI_N32_P (abfd) || ABI_64_P (abfd))
+
+/* The IRIX compatibility level we are striving for.  */
 #define IRIX_COMPAT(abfd) \
   (get_elf_backend_data (abfd)->elf_backend_mips_irix_compat (abfd))
 
-#define NEWABI_P(abfd) (ABI_N32_P(abfd) || ABI_64_P(abfd))
-
 /* Whether we are trying to be compatible with IRIX at all.  */
 #define SGI_COMPAT(abfd) \
   (IRIX_COMPAT (abfd) != ict_none)
 
 /* The name of the options section.  */
 #define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
-  (IRIX_COMPAT (abfd) == ict_irix6 ? ".MIPS.options" : ".options")
+  (ABI_64_P (abfd) ? ".MIPS.options" : ".options")
 
 /* The name of the stub section.  */
 #define MIPS_ELF_STUB_SECTION_NAME(abfd) \
-  (IRIX_COMPAT (abfd) == ict_irix6 ? ".MIPS.stubs" : ".stub")
+  (ABI_64_P (abfd) ? ".MIPS.stubs" : ".stub")
 
 /* The size of an external REL relocation.  */
 #define MIPS_ELF_REL_SIZE(abfd) \
@@ -610,9 +612,8 @@
   if (ext_hdr == NULL && swap->external_hdr_size != 0)
     goto error_return;
 
-  if (bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0,
-				swap->external_hdr_size)
-      == false)
+  if (! bfd_get_section_contents (abfd, section, ext_hdr, (file_ptr) 0,
+				  swap->external_hdr_size))
     goto error_return;
 
   symhdr = &debug->symbolic_header;
@@ -1243,7 +1244,7 @@
 	      h->esym.asym.value =
 		mips_elf_hash_table (einfo->info)->procedure_count;
 	    }
-	  else if (strcmp (name, "_gp_disp") == 0)
+	  else if (strcmp (name, "_gp_disp") == 0 && ! NEWABI_P (einfo->abfd))
 	    {
 	      h->esym.asym.sc = scAbs;
 	      h->esym.asym.st = stLabel;
@@ -1445,15 +1446,18 @@
   bfd_vma index;
   asection *sgot;
   struct mips_got_info *g;
+  long global_got_dynindx = 0;
 
   g = mips_elf_got_info (abfd, &sgot);
+  if (g->global_gotsym != NULL)
+    global_got_dynindx = g->global_gotsym->dynindx;
 
   /* Once we determine the global GOT entry with the lowest dynamic
      symbol table index, we must put all dynamic symbols with greater
      indices into the GOT.  That makes it easy to calculate the GOT
      offset.  */
-  BFD_ASSERT (h->dynindx >= g->global_gotsym->dynindx);
-  index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
+  BFD_ASSERT (h->dynindx >= global_got_dynindx);
+  index = ((h->dynindx - global_got_dynindx + g->local_gotno)
 	   * MIPS_ELF_GOT_SIZE (abfd));
   BFD_ASSERT (index < sgot->_raw_size);
 
@@ -1482,7 +1486,7 @@
 
   g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
 
-  /* Look to see if we aleady have an appropriate entry.  */
+  /* Look to see if we already have an appropriate entry.  */
   last_entry = sgot->contents + MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno;
   for (entry = (sgot->contents
 		+ MIPS_ELF_GOT_SIZE (abfd) * MIPS_RESERVED_GOTNO);
@@ -1635,7 +1639,7 @@
 			       &hsd);
 
   /* There should have been enough room in the symbol table to
-     accomodate both the GOT and non-GOT symbols.  */
+     accommodate both the GOT and non-GOT symbols.  */
   BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
 
   /* Now we know which dynamic symbol has the lowest dynamic symbol
@@ -2082,8 +2086,16 @@
       sec = local_sections[r_symndx];
 
       symbol = sec->output_section->vma + sec->output_offset;
-      if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+      if (ELF_ST_TYPE (sym->st_info) != STT_SECTION
+	  || (sec->flags & SEC_MERGE))
 	symbol += sym->st_value;
+      if ((sec->flags & SEC_MERGE)
+	  && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+	{
+	  addend = _bfd_elf_rel_local_sym (abfd, sym, &sec, addend);
+	  addend -= symbol;
+	  addend += sec->output_section->vma + sec->output_offset;
+	}
 
       /* MIPS16 text labels should be treated as odd.  */
       if (sym->st_other == STO_MIPS16)
@@ -2466,8 +2478,7 @@
 	    return bfd_reloc_outofrange;
 	  value
 	    = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
-					      abfd,
-					      value);
+					      abfd, value);
 	  overflowed_p = mips_elf_overflow_p (value, 16);
 	  break;
 	}
@@ -2509,8 +2520,7 @@
       if (value == MINUS_ONE)
 	return bfd_reloc_outofrange;
       value = mips_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
-					      abfd,
-					      value);
+					      abfd, value);
       overflowed_p = mips_elf_overflow_p (value, 16);
       break;
 
@@ -2823,8 +2833,7 @@
 
   r_type = ELF_R_TYPE (output_bfd, rel->r_info);
   dynobj = elf_hash_table (info)->dynobj;
-  sreloc
-    = bfd_get_section_by_name (dynobj, ".rel.dyn");
+  sreloc = bfd_get_section_by_name (dynobj, ".rel.dyn");
   BFD_ASSERT (sreloc != NULL);
   BFD_ASSERT (sreloc->contents != NULL);
   BFD_ASSERT (sreloc->reloc_count * MIPS_ELF_REL_SIZE (output_bfd)
@@ -2926,7 +2935,8 @@
 
       /* The relocation is always an REL32 relocation because we don't
 	 know where the shared library will wind up at load-time.  */
-      outrel[0].r_info = ELF_R_INFO (output_bfd, indx, R_MIPS_REL32);
+      outrel[0].r_info = ELF_R_INFO (output_bfd, (unsigned long) indx,
+				     R_MIPS_REL32);
 
       /* Adjust the output offset of the relocation to reference the
 	 correct location in the output file.  */
@@ -3351,7 +3361,7 @@
 _bfd_mips_elf_section_from_shdr (abfd, hdr, name)
      bfd *abfd;
      Elf_Internal_Shdr *hdr;
-     char *name;
+     const char *name;
 {
   flagword flags = 0;
 
@@ -3634,7 +3644,8 @@
      sh_offset == object size, and ld doesn't allow that.  While the check
      is arguably bogus for empty or SHT_NOBITS sections, it can easily be
      avoided by not emitting those useless sections in the first place.  */
-  if (IRIX_COMPAT (abfd) != ict_irix5 && (sec->flags & SEC_RELOC) != 0)
+  if ((IRIX_COMPAT (abfd) != ict_irix5 && (IRIX_COMPAT (abfd) != ict_irix6))
+      && (sec->flags & SEC_RELOC) != 0)
     {
       struct bfd_elf_section_data *esd;
       bfd_size_type amt = sizeof (Elf_Internal_Shdr);
@@ -3948,7 +3959,7 @@
 	    return false;
 	}
 
-      /* Change aligments of some sections.  */
+      /* Change alignments of some sections.  */
       s = bfd_get_section_by_name (abfd, ".hash");
       if (s != NULL)
 	bfd_set_section_alignment (abfd, s, 4);
@@ -4115,7 +4126,7 @@
 		    && ELF_R_TYPE (abfd, r->r_info) != R_MIPS16_26)
 		  break;
 
-	      if (! info->keep_memory)
+	      if (elf_section_data (o)->relocs != sec_relocs)
 		free (sec_relocs);
 
 	      if (r < rend)
@@ -4762,7 +4773,7 @@
 	  /* Assume there are two loadable segments consisting of
 	     contiguous sections.  Is 5 enough?  */
 	  local_gotno = (loadable_size >> 16) + 5;
-	  if (IRIX_COMPAT (output_bfd) == ict_irix6)
+	  if (NEWABI_P (output_bfd))
 	    /* It's possible we will need GOT_PAGE entries as well as
 	       GOT16 entries.  Often, these will be able to share GOT
 	       entries, but not always.  */
@@ -4997,7 +5008,7 @@
       const char * msg = (const char *) NULL;
 
       /* Find the relocation howto for this relocation.  */
-      if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+      if (r_type == R_MIPS_64 && ! NEWABI_P (input_bfd))
 	{
 	  /* Some 32-bit code uses R_MIPS_64.  In particular, people use
 	     64-bit code, but make sure all their addresses are in the
@@ -5005,8 +5016,7 @@
 	     space.  Thus, when they use an R_MIPS_64 they mean what is
 	     usually meant by R_MIPS_32, with the exception that the
 	     stored value is sign-extended to 64 bits.  */
-	  howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32,
-					   NEWABI_P (input_bfd));
+	  howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32, false);
 
 	  /* On big-endian systems, we need to lie about the position
 	     of the reloc.  */
@@ -5041,6 +5051,7 @@
 	      addend = mips_elf_obtain_contents (howto, rel, input_bfd,
 						 contents);
 	      addend &= howto->src_mask;
+	      addend <<= howto->rightshift;
 
 	      /* For some kinds of relocations, the ADDEND is a
 		 combination of the addend stored in two different
@@ -5073,11 +5084,11 @@
 		    return false;
 
 		  /* Obtain the addend kept there.  */
-		  lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, lo,
-							rela_relocation_p);
+		  lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, lo, false);
 		  l = mips_elf_obtain_contents (lo16_howto, lo16_relocation,
 						input_bfd, contents);
 		  l &= lo16_howto->src_mask;
+		  l <<= lo16_howto->rightshift;
 		  l = mips_elf_sign_extend (l, 16);
 
 		  addend <<= 16;
@@ -5114,7 +5125,7 @@
 	  Elf_Internal_Sym *sym;
 	  unsigned long r_symndx;
 
-	  if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd)
+	  if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd)
 	      && bfd_big_endian (input_bfd))
 	    rel->r_offset -= 4;
 
@@ -5136,13 +5147,6 @@
 	      || r_type == R_MIPS_LITERAL)
 	    addend -= (_bfd_get_gp_value (output_bfd)
 		       - _bfd_get_gp_value (input_bfd));
-	  else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
-		   || r_type == R_MIPS_GNU_REL16_S2)
-	    /* The addend is stored without its two least
-	       significant bits (which are always zero.)  In a
-	       non-relocateable link, calculate_relocation will do
-	       this shift; here, we must do it ourselves.  */
-	    addend <<= 2;
 
 	  r_symndx = ELF_R_SYM (output_bfd, rel->r_info);
 	  sym = local_syms + r_symndx;
@@ -5150,23 +5154,20 @@
 	    /* Adjust the addend appropriately.  */
 	    addend += local_sections[r_symndx]->output_offset;
 
-	  /* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
-	     then we only want to write out the high-order 16 bits.
-	     The subsequent R_MIPS_LO16 will handle the low-order bits.  */
-	  if (r_type == R_MIPS_HI16 || r_type == R_MIPS_GOT16
-	      || r_type == R_MIPS_GNU_REL_HI16)
-	    addend = mips_elf_high (addend);
-	  else if (r_type == R_MIPS_HIGHER)
-	    addend = mips_elf_higher (addend);
-	  else if (r_type == R_MIPS_HIGHEST)
-	    addend = mips_elf_highest (addend);
-
-	  /* If the relocation is for an R_MIPS_26 relocation, then
-	     the two low-order bits are not stored in the object file;
-	     they are implicitly zero.  */
-	  else if (r_type == R_MIPS_26 || r_type == R_MIPS16_26
-		   || r_type == R_MIPS_GNU_REL16_S2)
-	    addend >>= 2;
+	  if (howto->partial_inplace)
+	    {
+	      /* If the relocation is for a R_MIPS_HI16 or R_MIPS_GOT16,
+		 then we only want to write out the high-order 16 bits.
+		 The subsequent R_MIPS_LO16 will handle the low-order bits.
+	       */
+	      if (r_type == R_MIPS_HI16 || r_type == R_MIPS_GOT16
+		  || r_type == R_MIPS_GNU_REL_HI16)
+		addend = mips_elf_high (addend);
+	      else if (r_type == R_MIPS_HIGHER)
+		addend = mips_elf_higher (addend);
+	      else if (r_type == R_MIPS_HIGHEST)
+		addend = mips_elf_highest (addend);
+	    }
 
 	  if (rela_relocation_p)
 	    /* If this is a RELA relocation, just update the addend.
@@ -5179,9 +5180,10 @@
 		 destination mask because the place to which we are
 		 writing will be source of the addend in the final
 		 link.  */
+	      addend >>= howto->rightshift;
 	      addend &= howto->src_mask;
 
-	      if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+	      if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd))
 		/* See the comment above about using R_MIPS_64 in the 32-bit
 		   ABI.  Here, we need to update the addend.  It would be
 		   possible to get away with just using the R_MIPS_32 reloc
@@ -5242,6 +5244,8 @@
       else
 	use_saved_addend_p = false;
 
+      addend >>= howto->rightshift;
+
       /* Figure out what value we are supposed to relocate.  */
       switch (mips_elf_calculate_relocation (output_bfd, input_bfd,
 					     input_section, info, rel,
@@ -5297,7 +5301,7 @@
 	  continue;
 	}
 
-      if (r_type == R_MIPS_64 && !ABI_64_P (output_bfd))
+      if (r_type == R_MIPS_64 && ! NEWABI_P (output_bfd))
 	/* See the comment above about using R_MIPS_64 in the 32-bit
 	   ABI.  Until now, we've been using the HOWTO for R_MIPS_32;
 	   that calculated the right value.  Now, however, we
@@ -5525,7 +5529,7 @@
       sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
       sym->st_value = 1;
     }
-  else if (strcmp (name, "_gp_disp") == 0)
+  else if (strcmp (name, "_gp_disp") == 0 && ! NEWABI_P (output_bfd))
     {
       sym->st_shndx = SHN_ABS;
       sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
@@ -6103,9 +6107,9 @@
 
   /* For IRIX 6, we don't have .mdebug sections, nor does anything but
      .dynamic end up in PT_DYNAMIC.  However, we do have to insert a
-     PT_OPTIONS segement immediately following the program header
+     PT_OPTIONS segment immediately following the program header
      table.  */
-  if (IRIX_COMPAT (abfd) == ict_irix6)
+  if (NEWABI_P (abfd))
     {
       for (s = abfd->sections; s; s = s->next)
 	if (elf_section_data (s)->this_hdr.sh_type == SHT_MIPS_OPTIONS)
@@ -6118,7 +6122,7 @@
 	  /* Usually, there's a program header table.  But, sometimes
 	     there's not (like when running the `ld' testsuite).  So,
 	     if there's no program header table, we just put the
-	     options segement at the end.  */
+	     options segment at the end.  */
 	  for (pm = &elf_tdata (abfd)->segment_map;
 	       *pm != NULL;
 	       pm = &(*pm)->next)
@@ -6274,8 +6278,8 @@
    relocation.  */
 
 asection *
-_bfd_mips_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+_bfd_mips_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -6285,7 +6289,7 @@
 
   if (h != NULL)
     {
-      switch (ELF_R_TYPE (abfd, rel->r_info))
+      switch (ELF_R_TYPE (sec->owner, rel->r_info))
 	{
 	case R_MIPS_GNU_VTINHERIT:
 	case R_MIPS_GNU_VTENTRY:
@@ -6307,9 +6311,7 @@
 	}
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
@@ -6345,6 +6347,9 @@
       case R_MIPS_CALL_LO16:
       case R_MIPS_GOT_HI16:
       case R_MIPS_GOT_LO16:
+      case R_MIPS_GOT_DISP:
+      case R_MIPS_GOT_PAGE:
+      case R_MIPS_GOT_OFST:
 	/* ??? It would seem that the existing MIPS code does no sort
 	   of reference counting or whatnot on its GOT and PLT entries,
 	   so it is not possible to garbage collect them at this time.  */
@@ -6364,12 +6369,13 @@
    _bfd_elf_link_hash_copy_indirect copy the flags for us.  */
 
 void
-_bfd_mips_elf_copy_indirect_symbol (dir, ind)
+_bfd_mips_elf_copy_indirect_symbol (bed, dir, ind)
+     struct elf_backend_data *bed;
      struct elf_link_hash_entry *dir, *ind;
 {
   struct mips_elf_link_hash_entry *dirmips, *indmips;
 
-  _bfd_elf_link_hash_copy_indirect (dir, ind);
+  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 
   if (ind->root.type != bfd_link_hash_indirect)
     return;
@@ -6414,6 +6420,112 @@
   got->_raw_size += MIPS_ELF_GOT_SIZE (dynobj);
 }
 
+#define PDR_SIZE 32
+
+boolean
+_bfd_mips_elf_discard_info (abfd, cookie, info)
+     bfd *abfd;
+     struct elf_reloc_cookie *cookie;
+     struct bfd_link_info *info;
+{
+  asection *o;
+  boolean ret = false;
+  unsigned char *tdata;
+  size_t i, skip;
+
+  o = bfd_get_section_by_name (abfd, ".pdr");
+  if (! o)
+    return false;
+  if (o->_raw_size == 0)
+    return false;
+  if (o->_raw_size % PDR_SIZE != 0)
+    return false;
+  if (o->output_section != NULL
+      && bfd_is_abs_section (o->output_section))
+    return false;
+
+  tdata = bfd_zmalloc (o->_raw_size / PDR_SIZE);
+  if (! tdata)
+    return false;
+
+  cookie->rels = _bfd_elf32_link_read_relocs (abfd, o, (PTR) NULL,
+					      (Elf_Internal_Rela *) NULL,
+					      info->keep_memory);
+  if (!cookie->rels)
+    {
+      free (tdata);
+      return false;
+    }
+
+  cookie->rel = cookie->rels;
+  cookie->relend = cookie->rels + o->reloc_count;
+
+  for (i = 0, skip = 0; i < o->_raw_size; i ++)
+    {
+      if (_bfd_elf32_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
+	{
+	  tdata[i] = 1;
+	  skip ++;
+	}
+    }
+
+  if (skip != 0)
+    {
+      elf_section_data (o)->tdata = tdata;
+      o->_cooked_size = o->_raw_size - skip * PDR_SIZE;
+      ret = true;
+    }
+  else
+    free (tdata);
+
+  if (! info->keep_memory)
+    free (cookie->rels);
+
+  return ret;
+}
+
+boolean
+_bfd_mips_elf_ignore_discarded_relocs (sec)
+     asection *sec;
+{
+  if (strcmp (sec->name, ".pdr") == 0)
+    return true;
+  return false;
+}
+
+boolean
+_bfd_mips_elf_write_section (output_bfd, sec, contents)
+     bfd *output_bfd;
+     asection *sec;
+     bfd_byte *contents;
+{
+  bfd_byte *to, *from, *end;
+  int i;
+
+  if (strcmp (sec->name, ".pdr") != 0)
+    return false;
+
+  if (elf_section_data (sec)->tdata == NULL)
+    return false;
+
+  to = contents;
+  end = contents + sec->_raw_size;
+  for (from = contents, i = 0;
+       from < end;
+       from += PDR_SIZE, i++)
+    {
+      if (((unsigned char *) elf_section_data (sec)->tdata)[i] == 1)
+	continue;
+      if (to != from)
+	memcpy (to, from, PDR_SIZE);
+      to += PDR_SIZE;
+    }
+  bfd_set_section_contents (output_bfd, sec->output_section, contents,
+			    (file_ptr) sec->output_offset,
+			    sec->_cooked_size);
+  return true;
+}
+
 /* MIPS ELF uses a special find_nearest_line routine in order the
    handle the ECOFF debugging information.  */
 
@@ -6680,7 +6792,7 @@
 	  asymbol *sym = *(*parent)->sym_ptr_ptr;
 	  if (bfd_is_abs_section (sym->section) && abfd)
 	    {
-	      /* The special_function wouldn't get called anyways.  */
+	      /* The special_function wouldn't get called anyway.  */
 	    }
 	  else if (!gp_found)
 	    {
@@ -7537,7 +7649,7 @@
   asection *sec;
 
   /* Check if we have the same endianess */
-  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
     return false;
 
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
@@ -7696,6 +7808,15 @@
       old_flags &= ~EF_MIPS_ABI;
     }
 
+  /* For now, allow arbitrary mixing of ASEs (retain the union).  */
+  if ((new_flags & EF_MIPS_ARCH_ASE) != (old_flags & EF_MIPS_ARCH_ASE))
+    {
+      elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ARCH_ASE;
+
+      new_flags &= ~ EF_MIPS_ARCH_ASE;
+      old_flags &= ~ EF_MIPS_ARCH_ASE;
+    }
+
   /* Warn about any other mismatches */
   if (new_flags != old_flags)
     {
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 959bfa6..2c8ac2f 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -25,7 +25,7 @@
 extern boolean _bfd_mips_elf_section_processing
   PARAMS ((bfd *, Elf_Internal_Shdr *));
 extern boolean _bfd_mips_elf_section_from_shdr
-  PARAMS ((bfd *, Elf_Internal_Shdr *, char *));
+  PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
 extern boolean _bfd_mips_elf_fake_sections
   PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
 extern boolean _bfd_mips_elf_section_from_bfd_section
@@ -62,15 +62,18 @@
 extern boolean _bfd_mips_elf_modify_segment_map
   PARAMS ((bfd *));
 extern asection * _bfd_mips_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
 	   struct elf_link_hash_entry *, Elf_Internal_Sym *));
 extern boolean _bfd_mips_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
 	   const Elf_Internal_Rela *));
 extern void _bfd_mips_elf_copy_indirect_symbol
-  PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+	   struct elf_link_hash_entry *));
 extern void _bfd_mips_elf_hide_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+extern boolean _bfd_mips_elf_ignore_discarded_relocs
+  PARAMS ((asection *));
 extern boolean _bfd_mips_elf_find_nearest_line
   PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
 	   const char **, unsigned int *));
@@ -89,6 +92,10 @@
   PARAMS ((bfd *, flagword));
 extern boolean _bfd_mips_elf_print_private_bfd_data
   PARAMS ((bfd *, PTR));
+extern boolean _bfd_mips_elf_discard_info
+  PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
+extern boolean _bfd_mips_elf_write_section
+  PARAMS ((bfd *, asection *, bfd_byte *));
 
 extern boolean _bfd_mips_elf_read_ecoff_info
   PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 08b680a..8da7256 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -2,21 +2,21 @@
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* This structure contains everything that BFD knows about a target.
    It includes things like its byte order, name, what routines to call
@@ -44,7 +44,9 @@
 #ifndef bfd_elfNN_get_reloc_upper_bound
 #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
 #endif
+#ifndef bfd_elfNN_get_symbol_info
 #define bfd_elfNN_get_symbol_info	_bfd_elf_get_symbol_info
+#endif
 #define bfd_elfNN_get_symtab		_bfd_elf_get_symtab
 #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
 #if 0 /* done in elf-bfd.h */
@@ -87,6 +89,9 @@
 #ifndef elf_backend_want_dynbss
 #define elf_backend_want_dynbss 1
 #endif
+#ifndef elf_backend_want_p_paddr_set_to_zero
+#define elf_backend_want_p_paddr_set_to_zero 0
+#endif
 
 #define bfd_elfNN_bfd_debug_info_start	bfd_void
 #define bfd_elfNN_bfd_debug_info_end	bfd_void
@@ -126,6 +131,10 @@
   _bfd_elf_merge_sections
 #endif
 
+#ifndef bfd_elfNN_bfd_discard_group
+#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
+#endif
+
 #ifndef bfd_elfNN_bfd_make_debug_symbol
 #define bfd_elfNN_bfd_make_debug_symbol \
   ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
@@ -376,6 +385,15 @@
 #ifndef elf_backend_write_section
 #define elf_backend_write_section		NULL
 #endif
+#ifndef elf_backend_set_nonloadable_filepos
+#define elf_backend_set_nonloadable_filepos	NULL
+#endif
+#ifndef elf_backend_is_contained_by_filepos
+#define elf_backend_is_contained_by_filepos	NULL
+#endif
+#ifndef elf_backend_copy_private_bfd_data_p
+#define elf_backend_copy_private_bfd_data_p	NULL
+#endif
 #ifndef elf_backend_mips_irix_compat
 #define elf_backend_mips_irix_compat		NULL
 #endif
@@ -477,6 +495,9 @@
   elf_backend_discard_info,
   elf_backend_ignore_discarded_relocs,
   elf_backend_write_section,
+  elf_backend_set_nonloadable_filepos,
+  elf_backend_is_contained_by_filepos,
+  elf_backend_copy_private_bfd_data_p,
   elf_backend_mips_irix_compat,
   elf_backend_mips_rtype_to_howto,
   elf_backend_ecoff_debug_swap,
@@ -501,7 +522,8 @@
   elf_backend_can_gc_sections,
   elf_backend_can_refcount,
   elf_backend_want_got_sym,
-  elf_backend_want_dynbss
+  elf_backend_want_dynbss,
+  elf_backend_want_p_paddr_set_to_zero
 };
 #endif
 
diff --git a/bfd/format.c b/bfd/format.c
index f60f0ca..1efa9e2 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -1,5 +1,5 @@
 /* Generic BFD support for file formats.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -355,7 +355,7 @@
     }
 
   if (abfd->format != bfd_unknown)
-    return (abfd->format == format) ? true : false;
+    return abfd->format == format;
 
   /* Presume the answer is yes.  */
   abfd->format = format;
diff --git a/bfd/hash.c b/bfd/hash.c
index a498cce..e7c77fe 100644
--- a/bfd/hash.c
+++ b/bfd/hash.c
@@ -1,5 +1,5 @@
 /* hash.c -- hash table routines for BFD
-   Copyright 1993, 1994, 1995, 1997, 1999, 2001
+   Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002
    Free Software Foundation, Inc.
    Written by Steve Chamberlain <sac@cygnus.com>
 
@@ -407,7 +407,7 @@
 	  bfd_set_error (bfd_error_no_memory);
 	  return (struct bfd_hash_entry *) NULL;
 	}
-      strcpy (new, string);
+      memcpy (new, string, len + 1);
       string = new;
     }
   hashp->string = string;
diff --git a/bfd/i386linux.c b/bfd/i386linux.c
index 755b456..c144822 100644
--- a/bfd/i386linux.c
+++ b/bfd/i386linux.c
@@ -597,10 +597,9 @@
     {
       s->_raw_size = linux_hash_table (info)->fixup_count + 1;
       s->_raw_size *= 8;
-      s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
       if (s->contents == NULL)
 	return false;
-      memset (s->contents, 0, (size_t) s->_raw_size);
     }
 
   return true;
diff --git a/bfd/i386lynx.c b/bfd/i386lynx.c
index f748543..fc58767 100644
--- a/bfd/i386lynx.c
+++ b/bfd/i386lynx.c
@@ -1,5 +1,5 @@
 /* BFD back-end for i386 a.out binaries under LynxOS.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2001
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -429,10 +429,9 @@
   count = reloc_size / each_size;
 
 
-  reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
+  reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent));
   if (!reloc_cache && count != 0)
     return false;
-  memset (reloc_cache, 0, (size_t) count * sizeof (arelent));
 
   relocs = (PTR) bfd_alloc (abfd, reloc_size);
   if (!relocs && reloc_size != 0)
diff --git a/bfd/i386msdos.c b/bfd/i386msdos.c
index 0edb90e..5c060ecf 100644
--- a/bfd/i386msdos.c
+++ b/bfd/i386msdos.c
@@ -173,6 +173,7 @@
 #define msdos_bfd_relax_section bfd_generic_relax_section
 #define msdos_bfd_gc_sections bfd_generic_gc_sections
 #define msdos_bfd_merge_sections bfd_generic_merge_sections
+#define msdos_bfd_discard_group bfd_generic_discard_group
 #define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/i386os9k.c b/bfd/i386os9k.c
index 47f9ef3..cafad3e 100644
--- a/bfd/i386os9k.c
+++ b/bfd/i386os9k.c
@@ -284,7 +284,7 @@
      int count;
 {
 
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {				/* set by bfd.c handler */
       if (! aout_32_make_sections (abfd))
 	return false;
@@ -329,6 +329,7 @@
 #define os9k_bfd_relax_section bfd_generic_relax_section
 #define os9k_bfd_gc_sections bfd_generic_gc_sections
 #define os9k_bfd_merge_sections bfd_generic_merge_sections
+#define os9k_bfd_discard_group bfd_generic_discard_group
 #define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 8439f6d..d1c5eb1 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -471,7 +471,7 @@
      common_header_type *ieee;
 {
   bfd_vma result;
-  BFD_ASSERT (parse_int (ieee, &result) == true);
+  BFD_ASSERT (parse_int (ieee, &result));
   return result;
 }
 
@@ -983,7 +983,7 @@
 	    /* Fetch the default size if not resolved */
 	    size = must_parse_int (&(ieee->h));
 	    /* Fetch the defautlt value if available */
-	    if (parse_int (&(ieee->h), &value) == false)
+	    if (! parse_int (&(ieee->h), &value))
 	      {
 		value = 0;
 	      }
@@ -1058,7 +1058,7 @@
 ieee_slurp_symbol_table (abfd)
      bfd *abfd;
 {
-  if (IEEE_DATA (abfd)->read_symbols == false)
+  if (! IEEE_DATA (abfd)->read_symbols)
     {
       if (! ieee_slurp_external_symbols (abfd))
 	return false;
@@ -1112,7 +1112,7 @@
       if (! ieee_slurp_symbol_table (abfd))
 	return -1;
 
-      if (ieee->symbol_table_full == false)
+      if (! ieee->symbol_table_full)
 	{
 	  /* Arrgh - there are gaps in the table, run through and fill them */
 	  /* up with pointers to a null place */
@@ -1414,7 +1414,7 @@
 
   abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt);
   if (!abfd->tdata.ieee_ar_data)
-    goto error_return;
+    goto error_ret_restore;
   ieee = IEEE_AR_DATA (abfd);
 
   /* Ignore the return value here.  It doesn't matter if we don't read
@@ -1530,13 +1530,13 @@
   return abfd->xvec;
 
  got_wrong_format_error:
-  bfd_release (abfd, ieee);
-  abfd->tdata.ieee_ar_data = save;
   bfd_set_error (bfd_error_wrong_format);
-
  error_return:
   if (elts != NULL)
     free (elts);
+  bfd_release (abfd, ieee);
+ error_ret_restore:
+  abfd->tdata.ieee_ar_data = save;
 
   return NULL;
 }
@@ -1663,11 +1663,11 @@
     }
   next_byte (&(ieee->h));
 
-  if (parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau) == false)
+  if (! parse_int (&(ieee->h), &ieee->ad.number_of_bits_mau))
     {
       goto fail;
     }
-  if (parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address) == false)
+  if (! parse_int (&(ieee->h), &ieee->ad.number_of_maus_in_address))
     {
       goto fail;
     }
@@ -1690,7 +1690,7 @@
 	}
 
       ieee->w.offset[part] = parse_i (&(ieee->h), &ok);
-      if (ok == false)
+      if (! ok)
 	{
 	  goto fail;
 	}
@@ -1732,7 +1732,7 @@
 got_wrong_format:
   bfd_set_error (bfd_error_wrong_format);
 fail:
-  (void) bfd_release (abfd, ieee);
+  bfd_release (abfd, ieee);
   abfd->tdata.ieee_data = save;
   return (const bfd_target *) NULL;
 }
@@ -1895,7 +1895,7 @@
 		    case 0:
 		    case 4:
 
-		      if (pcrel == true)
+		      if (pcrel)
 			{
 #if KEEPMINUSPCININST
 			  bfd_put_32 (ieee->h.abfd, -current_map->pc,
@@ -1917,7 +1917,7 @@
 		      current_map->pc += 4;
 		      break;
 		    case 2:
-		      if (pcrel == true)
+		      if (pcrel)
 			{
 #if KEEPMINUSPCININST
 			  bfd_put_16 (ieee->h.abfd, (bfd_vma) -current_map->pc,
@@ -1941,7 +1941,7 @@
 		      current_map->pc += 2;
 		      break;
 		    case 1:
-		      if (pcrel == true)
+		      if (pcrel)
 			{
 #if KEEPMINUSPCININST
 			  bfd_put_8 (ieee->h.abfd, (int) (-current_map->pc), location_ptr + current_map->pc);
@@ -1969,7 +1969,7 @@
 	      default:
 		{
 		  bfd_vma this_size;
-		  if (parse_int (&(ieee->h), &this_size) == true)
+		  if (parse_int (&(ieee->h), &this_size))
 		    {
 		      unsigned int i;
 		      for (i = 0; i < this_size; i++)
@@ -2007,7 +2007,7 @@
   ieee_per_section_type *current_map = (ieee_per_section_type *) NULL;
   asection *s;
   /* Seek to the start of the data area */
-  if (ieee->read_data == true)
+  if (ieee->read_data)
     return true;
   ieee->read_data = true;
   ieee_seek (ieee, ieee->w.r.data_part);
@@ -2398,10 +2398,9 @@
       if ((PTR) stream == (PTR) NULL)
 	{
 	  /* Outputting a section without data, fill it up */
-	  stream = (unsigned char *) (bfd_alloc (abfd, s->_raw_size));
+	  stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
 	  if (!stream)
 	    return false;
-	  memset ((PTR) stream, 0, (size_t) s->_raw_size);
 	}
       while (current_byte_index < s->_raw_size)
 	{
@@ -2626,7 +2625,7 @@
   output_buffer = 0;
   amt = sizeof (ieee_data_type);
   abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, amt);
-  return abfd->tdata.ieee_data ? true : false;
+  return abfd->tdata.ieee_data != NULL;
 }
 
 static void
@@ -3943,7 +3942,7 @@
   if (section->owner->xvec != abfd->xvec)
     return;
   /* Only bother once per bfd */
-  if (ieee->done_debug == true)
+  if (ieee->done_debug)
     return;
   ieee->done_debug = true;
 
@@ -4010,6 +4009,7 @@
 #define ieee_bfd_relax_section bfd_generic_relax_section
 #define ieee_bfd_gc_sections bfd_generic_gc_sections
 #define ieee_bfd_merge_sections bfd_generic_merge_sections
+#define ieee_bfd_discard_group bfd_generic_discard_group
 #define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/ihex.c b/bfd/ihex.c
index cee736a..8188c01 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -193,19 +193,16 @@
 ihex_mkobject (abfd)
      bfd *abfd;
 {
-  if (abfd->tdata.ihex_data == NULL)
-    {
-      struct ihex_data_struct *tdata;
-      bfd_size_type amt = sizeof (struct ihex_data_struct);
+  struct ihex_data_struct *tdata;
+  bfd_size_type amt = sizeof (struct ihex_data_struct);
 
-      tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
-      if (tdata == NULL)
-	return false;
-      abfd->tdata.ihex_data = tdata;
-      tdata->head = NULL;
-      tdata->tail = NULL;
-    }
+  tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
+  if (tdata == NULL)
+    return false;
 
+  abfd->tdata.ihex_data = tdata;
+  tdata->head = NULL;
+  tdata->tail = NULL;
   return true;
 }
 
@@ -513,6 +510,7 @@
 ihex_object_p (abfd)
      bfd *abfd;
 {
+  PTR tdata_save;
   bfd_byte b[9];
   unsigned int i;
   unsigned int type;
@@ -551,9 +549,14 @@
     }
 
   /* OK, it looks like it really is an Intel Hex file.  */
-  if (! ihex_mkobject (abfd)
-      || ! ihex_scan (abfd))
-    return NULL;
+  tdata_save = abfd->tdata.any;
+  if (! ihex_mkobject (abfd) || ! ihex_scan (abfd))
+    {
+      if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+	bfd_release (abfd, abfd->tdata.any);
+      abfd->tdata.any = tdata_save;
+      return NULL;
+    }
 
   return abfd->xvec;
 }
@@ -977,6 +980,7 @@
 #define ihex_bfd_relax_section bfd_generic_relax_section
 #define ihex_bfd_gc_sections bfd_generic_gc_sections
 #define ihex_bfd_merge_sections bfd_generic_merge_sections
+#define ihex_bfd_discard_group bfd_generic_discard_group
 #define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/libaout.h b/bfd/libaout.h
index d7e5c71..a76b935 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -302,6 +302,7 @@
   M_ALPHA_NETBSD = 141,	/* NetBSD/alpha binary */
   M_ARM6_NETBSD = 143,	/* NetBSD/arm32 binary */
   M_SPARCLET_1 = 147,	/* 0x93, reserved */
+  M_VAX4K_NETBSD = 150,	/* NetBSD/vax 4K pages binary */
   M_MIPS1 = 151,        /* MIPS R2000/R3000 binary */
   M_MIPS2 = 152,        /* MIPS R4000/R6000 binary */
   M_SPARCLET_2 = 163,	/* 0xa3, reserved */
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 106ba8d..776dcd6 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -322,6 +322,10 @@
   ((boolean (*) \
     PARAMS ((bfd *, struct bfd_link_info *))) \
    bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+  ((boolean (*) \
+    PARAMS ((bfd *, struct sec *))) \
+   bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
   ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
@@ -589,5 +593,3 @@
 	   boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
 	   PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
 
-/* And more follows */
-
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index a397d82..29170a0 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -1353,8 +1353,8 @@
       return bfd_get_section_contents (abfd, section, w->data, offset, count);
     }
   if (offset + count > section->_raw_size
-      || (bfd_get_file_window (abfd, section->filepos + offset, count, w, true)
-	  == false))
+      || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
+				true))
     return false;
   return true;
 #else
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index cbb6390..88beae8 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -327,6 +327,10 @@
   ((boolean (*) \
     PARAMS ((bfd *, struct bfd_link_info *))) \
    bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+  ((boolean (*) \
+    PARAMS ((bfd *, struct sec *))) \
+   bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
   ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
@@ -594,14 +598,15 @@
 	   boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
 	   PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
 
-/* And more follows */
-
+/* Extracted from init.c.  */
+/* Extracted from libbfd.c.  */
 boolean
 bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
 
 unsigned int
 bfd_log2 PARAMS ((bfd_vma x));
 
+/* Extracted from cache.c.  */
 #define BFD_CACHE_MAX_OPEN 10
 extern bfd *bfd_last_cache;
 
@@ -621,6 +626,7 @@
 FILE *
 bfd_cache_lookup_worker PARAMS ((bfd *abfd));
 
+/* Extracted from reloc.c.  */
 #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
 
 static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
@@ -732,6 +738,19 @@
   "BFD_RELOC_ALPHA_GPREL_HI16",
   "BFD_RELOC_ALPHA_GPREL_LO16",
   "BFD_RELOC_ALPHA_BRSGP",
+  "BFD_RELOC_ALPHA_TLSGD",
+  "BFD_RELOC_ALPHA_TLSLDM",
+  "BFD_RELOC_ALPHA_DTPMOD64",
+  "BFD_RELOC_ALPHA_GOTDTPREL16",
+  "BFD_RELOC_ALPHA_DTPREL64",
+  "BFD_RELOC_ALPHA_DTPREL_HI16",
+  "BFD_RELOC_ALPHA_DTPREL_LO16",
+  "BFD_RELOC_ALPHA_DTPREL16",
+  "BFD_RELOC_ALPHA_GOTTPREL16",
+  "BFD_RELOC_ALPHA_TPREL64",
+  "BFD_RELOC_ALPHA_TPREL_HI16",
+  "BFD_RELOC_ALPHA_TPREL_LO16",
+  "BFD_RELOC_ALPHA_TPREL16",
   "BFD_RELOC_MIPS_JMP",
   "BFD_RELOC_MIPS16_JMP",
   "BFD_RELOC_MIPS16_GPREL",
@@ -762,6 +781,15 @@
   "BFD_RELOC_MIPS_REL16",
   "BFD_RELOC_MIPS_RELGOT",
   "BFD_RELOC_MIPS_JALR",
+  "BFD_RELOC_FRV_LABEL16",
+  "BFD_RELOC_FRV_LABEL24",
+  "BFD_RELOC_FRV_LO16",
+  "BFD_RELOC_FRV_HI16",
+  "BFD_RELOC_FRV_GPREL12",
+  "BFD_RELOC_FRV_GPRELU12",
+  "BFD_RELOC_FRV_GPREL32",
+  "BFD_RELOC_FRV_GPRELHI",
+  "BFD_RELOC_FRV_GPRELLO",
 
   "BFD_RELOC_386_GOT32",
   "BFD_RELOC_386_PLT32",
@@ -1092,6 +1120,20 @@
   "BFD_RELOC_390_GOT64",
   "BFD_RELOC_390_PLT64",
   "BFD_RELOC_390_GOTENT",
+  "BFD_RELOC_IP2K_FR9",
+  "BFD_RELOC_IP2K_BANK",
+  "BFD_RELOC_IP2K_ADDR16CJP",
+  "BFD_RELOC_IP2K_PAGE3",
+  "BFD_RELOC_IP2K_LO8DATA",
+  "BFD_RELOC_IP2K_HI8DATA",
+  "BFD_RELOC_IP2K_EX8DATA",
+  "BFD_RELOC_IP2K_LO8INSN",
+  "BFD_RELOC_IP2K_HI8INSN",
+  "BFD_RELOC_IP2K_PC_SKIP",
+  "BFD_RELOC_IP2K_TEXT",
+  "BFD_RELOC_IP2K_FR_OFFSET",
+  "BFD_RELOC_VPE4KMATH_DATA",
+  "BFD_RELOC_VPE4KMATH_INSN",
   "BFD_RELOC_VTABLE_INHERIT",
   "BFD_RELOC_VTABLE_ENTRY",
   "BFD_RELOC_IA64_IMM14",
@@ -1176,6 +1218,11 @@
   "BFD_RELOC_M68HC11_HI8",
   "BFD_RELOC_M68HC11_LO8",
   "BFD_RELOC_M68HC11_3B",
+  "BFD_RELOC_M68HC11_RL_JUMP",
+  "BFD_RELOC_M68HC11_RL_GROUP",
+  "BFD_RELOC_M68HC11_LO16",
+  "BFD_RELOC_M68HC11_PAGE",
+  "BFD_RELOC_M68HC11_24",
   "BFD_RELOC_CRIS_BDISP8",
   "BFD_RELOC_CRIS_UNSIGNED_5",
   "BFD_RELOC_CRIS_SIGNED_6",
@@ -1234,6 +1281,9 @@
   "BFD_RELOC_XSTORMY16_REL_12",
   "BFD_RELOC_XSTORMY16_24",
   "BFD_RELOC_XSTORMY16_FPTR16",
+  "BFD_RELOC_VAX_GLOB_DAT",
+  "BFD_RELOC_VAX_JMP_SLOT",
+  "BFD_RELOC_VAX_RELATIVE",
  "@@overflow: BFD_RELOC_UNUSED@@",
 };
 #endif
@@ -1261,6 +1311,7 @@
     boolean relocateable,
     asymbol **symbols));
 
+/* Extracted from archures.c.  */
 extern const bfd_arch_info_type bfd_default_arch_struct;
 boolean
 bfd_default_set_arch_mach PARAMS ((bfd *abfd,
@@ -1274,6 +1325,7 @@
 boolean
 bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
 
+/* Extracted from elf.c.  */
 struct elf_internal_shdr *
 bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
 
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index 618ddda..efc2fee 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -598,5 +598,3 @@
 extern boolean ppc_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *));
 
-/* And more taken from the source .. */
-
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 2e9a7d8..88b0909 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -602,8 +602,7 @@
 extern boolean ppc_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *));
 
-/* And more taken from the source .. */
-
+/* Extracted from coffcode.h.  */
 typedef struct coff_ptr_struct
 {
   /* Remembers the offset from the first symbol in the file for
diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h
index 7463eef..819b51f 100644
--- a/bfd/libxcoff.h
+++ b/bfd/libxcoff.h
@@ -39,12 +39,18 @@
   long _xcoff_machine;
 
   /* Function pointers to xcoff specific swap routines.  */
-  void (* _xcoff_swap_ldhdr_in)(bfd *, const PTR, struct internal_ldhdr *);
-  void (* _xcoff_swap_ldhdr_out)(bfd *, const struct internal_ldhdr *, PTR);
-  void (* _xcoff_swap_ldsym_in)(bfd *, const PTR, struct internal_ldsym *);
-  void (* _xcoff_swap_ldsym_out)(bfd *, const struct internal_ldsym *, PTR);
-  void (* _xcoff_swap_ldrel_in)(bfd *, const PTR, struct internal_ldrel *);
-  void (* _xcoff_swap_ldrel_out)(bfd *, const struct internal_ldrel *, PTR);
+  void (* _xcoff_swap_ldhdr_in)
+    PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
+  void (* _xcoff_swap_ldhdr_out)
+    PARAMS ((bfd *, const struct internal_ldhdr *, PTR));
+  void (* _xcoff_swap_ldsym_in)
+    PARAMS ((bfd *, const PTR, struct internal_ldsym *));
+  void (* _xcoff_swap_ldsym_out)
+    PARAMS ((bfd *, const struct internal_ldsym *, PTR));
+  void (* _xcoff_swap_ldrel_in)
+    PARAMS ((bfd *, const PTR, struct internal_ldrel *));
+  void (* _xcoff_swap_ldrel_out)
+    PARAMS ((bfd *, const struct internal_ldrel *, PTR));
 
   /* Size of the external struct.  */
   unsigned int _xcoff_ldhdrsz;
@@ -63,29 +69,33 @@
   unsigned long _xcoff_ldhdr_version;
 
   boolean (* _xcoff_put_symbol_name)
-       PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
-		const char *));
+    PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
+	     const char *));
 
   boolean (* _xcoff_put_ldsymbol_name)
-       PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
-		const char *));
+    PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
+	     const char *));
 
   reloc_howto_type *_xcoff_dynamic_reloc;
 
   asection * (* _xcoff_create_csect_from_smclas)
-       PARAMS ((bfd *, union internal_auxent *, const char *));
+    PARAMS ((bfd *, union internal_auxent *, const char *));
 
   /* Line number and relocation overflow.
      XCOFF32 overflows to another section when the line number or the 
      relocation count exceeds 0xffff.  XCOFF64 does not overflow.  */
-  boolean (*_xcoff_is_lineno_count_overflow)(bfd *, bfd_vma);
-  boolean (*_xcoff_is_reloc_count_overflow)(bfd *, bfd_vma);
+  boolean (*_xcoff_is_lineno_count_overflow)
+    PARAMS ((bfd *, bfd_vma));
+  boolean (*_xcoff_is_reloc_count_overflow)
+    PARAMS ((bfd *, bfd_vma));
 
   /* Loader section symbol and relocation table offset
      XCOFF32 is after the .loader header
      XCOFF64 is offset in .loader header.  */
-  bfd_vma (*_xcoff_loader_symbol_offset)(bfd *, struct internal_ldhdr *);
-  bfd_vma (*_xcoff_loader_reloc_offset)(bfd *, struct internal_ldhdr *);
+  bfd_vma (*_xcoff_loader_symbol_offset)
+    PARAMS ((bfd *, struct internal_ldhdr *));
+  bfd_vma (*_xcoff_loader_reloc_offset)
+    PARAMS ((bfd *, struct internal_ldhdr *));
   
   /* Global linkage.  The first word of global linkage code must be be 
      modified by filling in the correct TOC offset.  */
@@ -96,8 +106,8 @@
 
   /* rtinit.  */
   unsigned int _xcoff_rtinit_size;
-  boolean (*_xcoff_generate_rtinit)(bfd *, const char *, const char *, 
-				    boolean);
+  boolean (*_xcoff_generate_rtinit)
+    PARAMS ((bfd *, const char *, const char *, boolean));
 };
 
 /* Look up an entry in an XCOFF link hash table.  */
@@ -218,9 +228,9 @@
   bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *howto
 
 extern boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
-     (XCOFF_RELOC_FUNCTION_ARGS);
+  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
 extern boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
-     (XCOFF_COMPLAIN_FUNCTION_ARGS);
+  PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
 
 /* Relocation functions */
 boolean xcoff_reloc_type_noop PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
diff --git a/bfd/linker.c b/bfd/linker.c
index 228f088..242f8bd 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1674,8 +1674,7 @@
 			  abort ();
 
 			if (! ((*info->callbacks->constructor)
-			       (info,
-				c == 'I' ? true : false,
+			       (info, c == 'I',
 				h->root.string, abfd, section, value)))
 			  return false;
 		      }
@@ -1975,12 +1974,12 @@
 	    else
 	      {
 		char *w;
+		size_t len = strlen (string) + 1;
 
-		w = bfd_hash_allocate (&info->hash->table,
-				       strlen (string) + 1);
+		w = bfd_hash_allocate (&info->hash->table, len);
 		if (w == NULL)
 		  return false;
-		strcpy (w, string);
+		memcpy (w, string, len);
 		sub->u.i.warning = w;
 	      }
 
@@ -2391,7 +2390,7 @@
 	 Gross.  .bss and similar sections won't have the linker_mark
 	 field set.  */
       if ((sym->section->flags & SEC_HAS_CONTENTS) != 0
-	  && sym->section->linker_mark == false)
+	  && ! sym->section->linker_mark)
 	output = false;
 
       if (output)
diff --git a/bfd/m68klinux.c b/bfd/m68klinux.c
index 7dd0428..863a61d 100644
--- a/bfd/m68klinux.c
+++ b/bfd/m68klinux.c
@@ -601,13 +601,12 @@
     {
       s->_raw_size = linux_hash_table (info)->fixup_count + 1;
       s->_raw_size *= 8;
-      s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
       if (s->contents == NULL)
 	{
 	  bfd_set_error (bfd_error_no_memory);
 	  return false;
 	}
-      memset (s->contents, 0, (size_t) s->_raw_size);
     }
 
   return true;
diff --git a/bfd/merge.c b/bfd/merge.c
index e175efd..ce61207 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -1,22 +1,22 @@
 /* SEC_MERGE support.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* This file contains support for merging duplicate entities within sections,
    as used in ELF SHF_MERGE.  */
@@ -25,6 +25,7 @@
 #include "sysdep.h"
 #include "libbfd.h"
 #include "hashtab.h"
+#include "libiberty.h"
 
 struct sec_merge_sec_info;
 
@@ -38,7 +39,8 @@
   /* Start of this string needs to be aligned to
      alignment octets (not 1 << align).  */
   unsigned int alignment;
-  union {
+  union
+  {
     /* Index within the merged section.  */
     bfd_size_type index;
     /* Entity size (if present in suffix hash tables).  */
@@ -144,7 +146,7 @@
       ret->next = NULL;
     }
 
-  return (struct bfd_hash_entry *)ret;
+  return (struct bfd_hash_entry *) ret;
 }
 
 /* Look up an entry in a section merge hash table.  */
@@ -381,14 +383,6 @@
       return true;
     }
 
-  if (sec->output_section != NULL
-      && bfd_is_abs_section (sec->output_section))
-    {
-      /* The section is being discarded from the link, so we should
-	 just ignore it.  */
-      return true;
-    }
-
   align = bfd_get_section_alignment (sec->owner, sec);
   if ((sec->entsize < (unsigned int)(1 << align)
        && ((sec->entsize & (sec->entsize - 1))
@@ -415,15 +409,14 @@
   if (sinfo == NULL)
     {
       /* Initialize the information we need to keep track of.  */
-      sinfo = (struct sec_merge_info *)
-	      bfd_alloc (abfd, (bfd_size_type) sizeof (struct sec_merge_info));
+      amt = sizeof (struct sec_merge_info);
+      sinfo = (struct sec_merge_info *) bfd_alloc (abfd, amt);
       if (sinfo == NULL)
 	goto error_return;
       sinfo->next = (struct sec_merge_info *) *psinfo;
       sinfo->chain = NULL;
       *psinfo = (PTR) sinfo;
-      sinfo->htab =
-	sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS));
+      sinfo->htab = sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS));
       if (sinfo->htab == NULL)
 	goto error_return;
     }
@@ -650,8 +643,10 @@
   qsort (array, (size_t) sinfo->htab->size,
 	 sizeof (struct sec_merge_hash_entry *), cmplengthentry);
 
-  last4tab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last4_eq, NULL);
-  lasttab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last_eq, NULL);
+  last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4, 
+				NULL, last4_eq, NULL, calloc, free);
+  lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4, 
+			       NULL, last_eq, NULL, calloc, free);
   if (lasttab == NULL || last4tab == NULL)
     goto alloc_failure;
 
@@ -839,10 +834,7 @@
 	   the hash table at all.  */
 	for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
   	  if (secinfo->first == NULL)
-	    {
-	      secinfo->sec->_cooked_size = 0;
-	      secinfo->sec->flags |= SEC_EXCLUDE;
-	    }
+	    secinfo->sec->_cooked_size = 0;
     }
 
   return true;
@@ -908,7 +900,7 @@
       if (sec->entsize == 1)
 	{
 	  p = secinfo->contents + offset + addend - 1;
-	  while (*p && p >= secinfo->contents)
+	  while (p >= secinfo->contents && *p)
 	    --p;
 	  ++p;
 	}
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 9459383..96c654e 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -260,7 +260,7 @@
 struct mmo_symbol
   {
     struct mmo_symbol *next;
-    CONST char *name;
+    const char *name;
     bfd_vma value;
     enum mmo_sym_type sym_type;
     unsigned int serno;
@@ -357,7 +357,7 @@
  PARAMS ((bfd *, asection *, PTR));
 static void mmo_find_sec_w_addr PARAMS ((bfd *, asection *, PTR));
 static void mmo_find_sec_w_addr_grow PARAMS ((bfd *, asection *, PTR));
-static asection *mmo_make_section PARAMS ((bfd *, CONST char *));
+static asection *mmo_make_section PARAMS ((bfd *, const char *));
 static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
 static void mmo_print_symbol
  PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
@@ -371,10 +371,10 @@
 static void mmo_xore_64 PARAMS ((asection *, bfd_vma vma, bfd_vma value));
 static void mmo_xore_32 PARAMS ((asection *, bfd_vma vma, unsigned int));
 static void mmo_xore_16 PARAMS ((asection *, bfd_vma vma, unsigned int));
-static CONST bfd_target *mmo_object_p PARAMS ((bfd *));
+static const bfd_target *mmo_object_p PARAMS ((bfd *));
 static void mmo_map_set_sizes PARAMS ((bfd *, asection *, PTR));
 static boolean mmo_get_symbols PARAMS ((bfd *));
-static boolean mmo_create_symbol PARAMS ((bfd *, CONST char *, bfd_vma,
+static boolean mmo_create_symbol PARAMS ((bfd *, const char *, bfd_vma,
 					  enum mmo_sym_type, unsigned int));
 static boolean mmo_get_section_contents
   PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
@@ -391,7 +391,7 @@
 static boolean mmo_internal_write_header PARAMS ((bfd *));
 static boolean mmo_internal_write_post PARAMS ((bfd *, int, asection *));
 static boolean mmo_internal_add_3_sym
- PARAMS ((bfd *, struct mmo_symbol_trie *, CONST struct mmo_symbol *));
+ PARAMS ((bfd *, struct mmo_symbol_trie *, const struct mmo_symbol *));
 static unsigned int mmo_internal_3_length
  PARAMS ((bfd *, struct mmo_symbol_trie *));
 static void mmo_internal_3_dump
@@ -404,10 +404,10 @@
 static void mmo_write_octa PARAMS ((bfd *, bfd_vma));
 static void mmo_write_octa_raw PARAMS ((bfd *, bfd_vma));
 static boolean mmo_write_chunk
-  PARAMS ((bfd *, CONST bfd_byte *, unsigned int));
+  PARAMS ((bfd *, const bfd_byte *, unsigned int));
 static boolean mmo_flush_chunk PARAMS ((bfd *));
 static boolean mmo_write_loc_chunk
-  PARAMS ((bfd *, bfd_vma, CONST bfd_byte *, unsigned int, bfd_vma *));
+  PARAMS ((bfd *, bfd_vma, const bfd_byte *, unsigned int, bfd_vma *));
 static boolean mmo_write_chunk_list PARAMS ((bfd *, mmo_data_list_type *));
 static boolean mmo_write_loc_chunk_list
   PARAMS ((bfd *, mmo_data_list_type *));
@@ -417,7 +417,7 @@
 static bfd_byte mmo_get_byte PARAMS ((bfd *));
 static void mmo_write_byte PARAMS ((bfd *, bfd_byte));
 static boolean mmo_new_section_hook PARAMS ((bfd *, asection *));
-static int mmo_sort_mmo_symbols PARAMS ((CONST PTR, CONST PTR));
+static int mmo_sort_mmo_symbols PARAMS ((const PTR, const PTR));
 static boolean mmo_write_object_contents PARAMS ((bfd *));
 static long mmo_canonicalize_reloc
   PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
@@ -446,7 +446,7 @@
 static asection *
 mmo_make_section (abfd, secname)
      bfd *abfd;
-     CONST char *secname;
+     const char *secname;
 {
   asection *sec = bfd_get_section_by_name (abfd, secname);
 
@@ -481,7 +481,7 @@
   static const char letters[]
     = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_";
 
-  if (inited == true)
+  if (inited)
     return;
   inited = true;
 
@@ -495,7 +495,7 @@
 
 /* Check whether an existing file is an mmo file.  */
 
-static CONST bfd_target *
+static const bfd_target *
 mmo_object_p (abfd)
      bfd *abfd;
 {
@@ -819,7 +819,7 @@
 static INLINE boolean
 mmo_write_chunk (abfd, loc, len)
      bfd *abfd;
-     CONST bfd_byte *loc;
+     const bfd_byte *loc;
      unsigned int len;
 {
   boolean retval = true;
@@ -846,10 +846,9 @@
       if (loc[0] == LOP)
 	mmo_write_tetra_raw (abfd, LOP_QUOTE_NEXT);
 
-      retval
-	= (retval == true
-	   && abfd->tdata.mmo_data->have_error == false
-	   && 4 == bfd_bwrite ((PTR) loc, 4, abfd));
+      retval = (retval
+		&& ! abfd->tdata.mmo_data->have_error
+		&& 4 == bfd_bwrite ((PTR) loc, 4, abfd));
 
       loc += 4;
       len -= 4;
@@ -861,7 +860,7 @@
       abfd->tdata.mmo_data->byte_no = len;
     }
 
-  if (retval == false)
+  if (! retval)
     abfd->tdata.mmo_data->have_error = true;
   return retval;
 }
@@ -882,7 +881,7 @@
       abfd->tdata.mmo_data->byte_no = 0;
     }
 
-  return abfd->tdata.mmo_data->have_error == false;
+  return ! abfd->tdata.mmo_data->have_error;
 }
 
 /* Same, but from a list.  */
@@ -907,23 +906,30 @@
 mmo_write_loc_chunk (abfd, vma, loc, len, last_vmap)
      bfd *abfd;
      bfd_vma vma;
-     CONST bfd_byte *loc;
+     const bfd_byte *loc;
      unsigned int len;
      bfd_vma *last_vmap;
 {
   /* Find an initial and trailing section of zero tetras; we don't need to
      write out zeros.  FIXME: When we do this, we should emit section size
      and address specifiers, else objcopy can't always perform an identity
-     translation.  */
-  while (len >= 4 && bfd_get_32 (abfd, loc) == 0)
-    {
-      vma += 4;
-      len -= 4;
-      loc += 4;
-    }
+     translation.  Only do this if we *don't* have left-over data from a
+     previous write or the vma of this chunk is *not* the next address,
+     because then data isn't tetrabyte-aligned and we're concatenating to
+     that left-over data.  */
 
-  while (len >= 4 && bfd_get_32 (abfd, loc + len - 4) == 0)
-    len -= 4;
+  if (abfd->tdata.mmo_data->byte_no == 0 || vma != *last_vmap)
+    {
+      while (len >= 4 && bfd_get_32 (abfd, loc) == 0)
+	{
+	  vma += 4;
+	  len -= 4;
+	  loc += 4;
+	}
+
+      while (len >= 4 && bfd_get_32 (abfd, loc + len - 4) == 0)
+	len -= 4;
+    }
 
   /* Only write out the location if it's different than the one the caller
      (supposedly) previously handled, accounting for omitted leading zeros.  */
@@ -941,9 +947,8 @@
   /* Update to reflect end of this chunk, with trailing zeros omitted.  */
   *last_vmap = vma + len;
 
-  return
-    abfd->tdata.mmo_data->have_error == false
-    && mmo_write_chunk (abfd, loc, len);
+  return (! abfd->tdata.mmo_data->have_error
+	  && mmo_write_chunk (abfd, loc, len));
 }
 
 /* Same, but from a list.  */
@@ -1161,7 +1166,7 @@
 
   if (abfd->tdata.mmo_data->byte_no == 0)
     {
-      if (abfd->tdata.mmo_data->have_error == false
+      if (! abfd->tdata.mmo_data->have_error
 	  && bfd_bread (abfd->tdata.mmo_data->buf, 4, abfd) != 4)
 	{
 	  abfd->tdata.mmo_data->have_error = true;
@@ -1188,7 +1193,7 @@
   abfd->tdata.mmo_data->buf[(abfd->tdata.mmo_data->byte_no++ % 4)] = value;
   if ((abfd->tdata.mmo_data->byte_no % 4) == 0)
     {
-      if (abfd->tdata.mmo_data->have_error == false
+      if (! abfd->tdata.mmo_data->have_error
 	  && bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4)
 	abfd->tdata.mmo_data->have_error = true;
     }
@@ -1199,7 +1204,7 @@
 static boolean
 mmo_create_symbol (abfd, symname, addr, sym_type, serno)
      bfd *abfd;
-     CONST char *symname;
+     const char *symname;
      bfd_vma addr;
      enum mmo_sym_type sym_type;
      unsigned int serno;
@@ -1354,7 +1359,7 @@
   bfd_byte m = mmo_get_byte (abfd);
 
   /* Check first if we have a bad hair day.  */
-  if (abfd->tdata.mmo_data->have_error == true)
+  if (abfd->tdata.mmo_data->have_error)
     return false;
 
   if (m & MMO3_LEFT)
@@ -1438,7 +1443,7 @@
 	  serno -= 128;
 
 	  /* Got it.  Now enter it.  Skip a leading ":".  */
-	  if (abfd->tdata.mmo_data->have_error == false
+	  if (! abfd->tdata.mmo_data->have_error
 	      && ! mmo_create_symbol (abfd,
 				      abfd->tdata.mmo_data->lop_stab_symbol
 				      + 1,
@@ -1457,7 +1462,7 @@
     /* Traverse right trie.  */
     mmo_get_symbols (abfd);
 
-  return abfd->tdata.mmo_data->have_error == false;
+  return ! abfd->tdata.mmo_data->have_error;
 }
 
 /* Get the location of memory area [VMA..VMA + SIZE - 1], which we think
@@ -2060,7 +2065,7 @@
   for (i = 0; i < sizeof (file_names) / sizeof (file_names[0]); i++)
     if (file_names[i])
       free (file_names[i]);
-  return error ? false : true;
+  return ! error;
 }
 
 /* A hook to set up object file dependent section information.  For mmo,
@@ -2135,11 +2140,11 @@
 
 static int
 mmo_sort_mmo_symbols (arg1, arg2)
-     CONST PTR arg1;
-     CONST PTR arg2;
+     const PTR arg1;
+     const PTR arg2;
 {
-  CONST struct mmo_symbol *sym1 = *(CONST struct mmo_symbol **) arg1;
-  CONST struct mmo_symbol *sym2 = *(CONST struct mmo_symbol **) arg2;
+  const struct mmo_symbol *sym1 = *(const struct mmo_symbol **) arg1;
+  const struct mmo_symbol *sym2 = *(const struct mmo_symbol **) arg2;
 
   /* Sort by serial number first.  */
   if (sym1->serno < sym2->serno)
@@ -2148,7 +2153,7 @@
     return 1;
 
   /* Then sort by address of the table entries.  */
-  return ((CONST char *) arg1 - (CONST char *) arg2);
+  return ((const char *) arg1 - (const char *) arg2);
 }
 
 /* Translate the symbol table.  */
@@ -2295,7 +2300,7 @@
 mmo_internal_write_header (abfd)
      bfd *abfd;
 {
-  CONST char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1};
+  const char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1};
 
   if (bfd_bwrite (lop_pre_bfd, 4, abfd) != 4)
     return false;
@@ -2335,9 +2340,7 @@
      Z == 255, don't assume DATA is valid.  */
   bfd_put_64 (abfd, bfd_get_start_address (abfd), buf);
 
-  return
-    abfd->tdata.mmo_data->have_error == false
-    && bfd_bwrite (buf, 8, abfd) == 8;
+  return ! abfd->tdata.mmo_data->have_error && bfd_bwrite (buf, 8, abfd) == 8;
 }
 
 /* Translate to and from BFD flags.  This is to make sure that we don't
@@ -2442,11 +2445,10 @@
     {
       int n = atoi (sec->name + strlen (MMIX_OTHER_SPEC_SECTION_PREFIX));
       mmo_write_tetra_raw (abfd, (LOP << 24) | (LOP_SPEC << 16) | n);
-      return
-	abfd->tdata.mmo_data->have_error == false
-	&& mmo_write_chunk_list (abfd,
-				 ((struct mmo_section_data_struct *)
-				  (sec->used_by_bfd))->head);
+      return (! abfd->tdata.mmo_data->have_error
+	      && mmo_write_chunk_list (abfd,
+				       ((struct mmo_section_data_struct *)
+					(sec->used_by_bfd))->head));
     }
   /* Ignore sections that are just allocated or empty; we write out
      _contents_ here.  */
@@ -2563,13 +2565,13 @@
       /* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually
 	 loaded.  */
       if (bfd_get_section_flags (abfd, sec) & SEC_LOAD)
-	  return
-	    abfd->tdata.mmo_data->have_error == false
+	  return 
+	    ! abfd->tdata.mmo_data->have_error
 	    && mmo_write_loc_chunk_list (abfd,
 					 ((struct mmo_section_data_struct *)
 					  (sec->used_by_bfd))->head);
       return
-	abfd->tdata.mmo_data->have_error == false
+	! abfd->tdata.mmo_data->have_error
 	&& mmo_write_chunk_list (abfd,
 				 ((struct mmo_section_data_struct *)
 				  (sec->used_by_bfd))->head);
@@ -2619,9 +2621,9 @@
 mmo_internal_add_3_sym (abfd, rootp, symp)
      bfd *abfd;
      struct mmo_symbol_trie *rootp;
-     CONST struct mmo_symbol *symp;
+     const struct mmo_symbol *symp;
 {
-  CONST char *name = symp->name;
+  const char *name = symp->name;
   struct mmo_symbol_trie *trie = rootp;
   struct mmo_symbol_trie **triep = NULL;
 
@@ -3088,7 +3090,7 @@
 {
   struct mmo_write_sec_info *infop = (struct mmo_write_sec_info *) p;
 
-  if (infop->retval == false)
+  if (! infop->retval)
     return;
 
   if (strcmp (sec->name, MMIX_REG_CONTENTS_SECTION_NAME) == 0)
@@ -3139,7 +3141,7 @@
   bfd_map_over_sections (abfd, mmo_write_section_unless_reg_contents,
 			 (PTR) &wsecinfo);
 
-  if (wsecinfo.retval == false)
+  if (! wsecinfo.retval)
     return false;
 
   if (wsecinfo.reg_section != NULL)
@@ -3256,6 +3258,7 @@
 #define mmo_set_arch_mach bfd_default_set_arch_mach
 #define mmo_bfd_relax_section bfd_generic_relax_section
 #define mmo_bfd_merge_sections bfd_generic_merge_sections
+#define mmo_bfd_discard_group bfd_generic_discard_group
 
 /* objcopy will be upset if we return -1 from bfd_get_reloc_upper_bound by
    using BFD_JUMP_TABLE_RELOCS (_bfd_norelocs) rather than 0.  FIXME: Most
@@ -3277,7 +3280,7 @@
 #define mmo_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
 #define mmo_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
 
-CONST bfd_target bfd_mmo_vec =
+const bfd_target bfd_mmo_vec =
 {
   "mmo",			/* name */
   bfd_target_mmo_flavour,
diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h
index e8f4626..e0a8304 100644
--- a/bfd/nlm-target.h
+++ b/bfd/nlm-target.h
@@ -44,6 +44,7 @@
 #define nlm_bfd_relax_section bfd_generic_relax_section
 #define nlm_bfd_gc_sections bfd_generic_gc_sections
 #define nlm_bfd_merge_sections bfd_generic_merge_sections
+#define nlm_bfd_discard_group bfd_generic_discard_group
 #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/nlm32-alpha.c b/bfd/nlm32-alpha.c
index 0d3919e..6099c2b 100644
--- a/bfd/nlm32-alpha.c
+++ b/bfd/nlm32-alpha.c
@@ -1,5 +1,5 @@
 /* Support for 32-bit Alpha NLM (NetWare Loadable Module)
-   Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -654,9 +654,7 @@
     {
       asection *section;
 
-      if (nlm_alpha_read_reloc (abfd, sym, &section,
-				&nlm_relocs -> reloc)
-	  == false)
+      if (! nlm_alpha_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
 	return false;
       nlm_relocs -> section = section;
       nlm_relocs++;
@@ -846,18 +844,17 @@
 
   r.address = nlm_alpha_backend_data (abfd)->lita_address;
   r.addend = nlm_alpha_backend_data (abfd)->lita_size + 1;
-  if (nlm_alpha_write_import (abfd, (asection *) NULL, &r) == false)
+  if (! nlm_alpha_write_import (abfd, (asection *) NULL, &r))
     return false;
 
   r.address = nlm_alpha_backend_data (abfd)->gp;
   r.addend = 0;
-  if (nlm_alpha_write_import (abfd, (asection *) NULL, &r) == false)
+  if (! nlm_alpha_write_import (abfd, (asection *) NULL, &r))
     return false;
 
   for (i = 0; i < count; i++)
     {
-      if (nlm_alpha_write_import (abfd, relocs[i].sec,
-				  relocs[i].rel) == false)
+      if (! nlm_alpha_write_import (abfd, relocs[i].sec, relocs[i].rel))
 	return false;
     }
 
diff --git a/bfd/nlm32-i386.c b/bfd/nlm32-i386.c
index 32b05b4..095ab63 100644
--- a/bfd/nlm32-i386.c
+++ b/bfd/nlm32-i386.c
@@ -1,5 +1,5 @@
 /* Support for 32-bit i386 NLM (NetWare Loadable Module)
-   Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -378,9 +378,7 @@
     {
       asection *section;
 
-      if (nlm_i386_read_reloc (abfd, sym, &section,
-			       &nlm_relocs -> reloc)
-	  == false)
+      if (! nlm_i386_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
 	return false;
       nlm_relocs -> section = section;
       nlm_relocs++;
@@ -414,8 +412,7 @@
 
   for (i = 0; i < count; i++)
     {
-      if (nlm_i386_write_import (abfd, relocs[i].sec,
-				 relocs[i].rel) == false)
+      if (! nlm_i386_write_import (abfd, relocs[i].sec, relocs[i].rel))
 	return false;
     }
 
diff --git a/bfd/nlm32-ppc.c b/bfd/nlm32-ppc.c
index 98410a8..884b85a 100644
--- a/bfd/nlm32-ppc.c
+++ b/bfd/nlm32-ppc.c
@@ -1,5 +1,5 @@
 /* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
-   Copyright 1994, 1995, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -689,9 +689,7 @@
     {
       asection *section;
 
-      if (nlm_powerpc_read_reloc (abfd, sym, &section,
-				  &nlm_relocs -> reloc)
-	  == false)
+      if (! nlm_powerpc_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
 	return false;
       nlm_relocs -> section = section;
       nlm_relocs++;
diff --git a/bfd/nlm32-sparc.c b/bfd/nlm32-sparc.c
index 0246dd2..76b7328 100644
--- a/bfd/nlm32-sparc.c
+++ b/bfd/nlm32-sparc.c
@@ -1,5 +1,5 @@
 /* Support for 32-bit SPARC NLM (NetWare Loadable Module)
-   Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -296,9 +296,7 @@
     {
       asection *section;
 
-      if (nlm_sparc_read_reloc (abfd, sym, &section,
-			      &nlm_relocs -> reloc)
-	  == false)
+      if (! nlm_sparc_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
 	return false;
       nlm_relocs -> section = section;
       nlm_relocs++;
@@ -342,7 +340,7 @@
   bfd_put_32 (abfd, (bfd_vma) 1, temp);
   if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
     return false;
-  if (nlm_sparc_write_reloc (abfd, sec, rel) == false)
+  if (! nlm_sparc_write_reloc (abfd, sec, rel))
     return false;
   return true;
 }
@@ -372,8 +370,7 @@
 
   for (i = 0; i < count; i++)
     {
-      if (nlm_sparc_write_reloc (abfd, relocs[i].sec,
-				 relocs[i].rel) == false)
+      if (! nlm_sparc_write_reloc (abfd, relocs[i].sec, relocs[i].rel))
 	return false;
     }
 
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index d4501d0..0e089b3 100644
--- a/bfd/nlmcode.h
+++ b/bfd/nlmcode.h
@@ -1,25 +1,25 @@
 /* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright 1993, 1994, 1995, 1998, 2000, 2001
+   Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, using ELF support as the
    template.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -57,7 +57,7 @@
 #define nlm_swap_fixed_header_out(abfd,src,dst) \
   (nlm_swap_fixed_header_out_func(abfd)) (abfd,src,dst)
 
-/* Forward declarations of static functions */
+/* Forward declarations of static functions.  */
 
 static boolean add_bfd_section
   PARAMS ((bfd *, char *, file_ptr, bfd_size_type, flagword));
@@ -114,7 +114,6 @@
     }
 
   /* Read in the fixed length portion of the NLM header in external format.  */
-
   amt = nlm_fixed_header_size (abfd);
   x_fxdhdr = (PTR) bfd_malloc (amt);
   if (x_fxdhdr == NULL)
@@ -130,7 +129,6 @@
 
   /* Allocate an instance of the nlm_obj_tdata structure and hook it up to
      the tdata pointer in the bfd.  */
-
   amt = sizeof (struct nlm_obj_tdata);
   new_tdata = (struct nlm_obj_tdata *) bfd_zalloc (abfd, amt);
   if (new_tdata == NULL)
@@ -145,7 +143,6 @@
 
   /* Check to see if we have an NLM file for this backend by matching
      the NLM signature.  */
-
   signature = nlm_signature (abfd);
   if (signature != NULL
       && *signature != '\0'
@@ -155,14 +152,12 @@
 
   /* There's no supported way to discover the endianess of an NLM, so test for
      a sane version number after doing byte swapping appropriate for this
-     XVEC.  (Hack alert!) */
-
+     XVEC.  (Hack alert!)  */
   if (i_fxdhdrp->version > 0xFFFF)
     goto got_wrong_format_error;
 
   /* There's no supported way to check for 32 bit versus 64 bit addresses,
      so ignore this distinction for now.  (FIXME) */
-
   /* Swap in the rest of the required header.  */
   if (!nlm_swap_variable_header_in (abfd))
     {
@@ -177,7 +172,6 @@
      additional sections described in the cygnus_ext header.
      From this point on we assume that we have an NLM, and do not
      treat errors as indicating the wrong format.  */
-
   if (!add_bfd_section (abfd, NLM_CODE_NAME,
 			i_fxdhdrp->codeImageOffset,
 			i_fxdhdrp->codeImageSize,
@@ -239,14 +233,14 @@
 
   newsect = bfd_make_section (abfd, name);
   if (newsect == NULL)
-    {
-      return false;
-    }
+    return false;
+
   newsect->vma = 0;		/* NLM's are relocatable.  */
   newsect->_raw_size = size;
   newsect->filepos = offset;
   newsect->flags = flags;
   newsect->alignment_power = bfd_log2 ((bfd_vma) 0);	/* FIXME */
+
   return true;
 }
 
@@ -327,7 +321,6 @@
   bfd_size_type amt;
 
   /* Write the description length and text members.  */
-
   amt = sizeof (nlm_variable_header (abfd)->descriptionLength);
   if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->descriptionLength, amt,
 		 abfd) != amt)
@@ -338,7 +331,6 @@
     return false;
 
   /* Convert and write the stackSize field.  */
-
   put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->stackSize,
 	    (bfd_byte *) temp);
   amt = sizeof (temp);
@@ -346,7 +338,6 @@
     return false;
 
   /* Convert and write the reserved field.  */
-
   put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->reserved,
 	    (bfd_byte *) temp);
   amt = sizeof (temp);
@@ -354,14 +345,12 @@
     return false;
 
   /* Write the oldThreadName field.  This field is a fixed length string.  */
-
   amt = sizeof (nlm_variable_header (abfd)->oldThreadName);
   if (bfd_bwrite ((PTR) nlm_variable_header (abfd)->oldThreadName, amt,
 		 abfd) != amt)
     return false;
 
   /* Write the screen name length and text members.  */
-
   amt = sizeof (nlm_variable_header (abfd)->screenNameLength);
   if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->screenNameLength, amt,
 		 abfd) != amt)
@@ -372,7 +361,6 @@
     return false;
 
   /* Write the thread name length and text members.  */
-
   amt = sizeof (nlm_variable_header (abfd)->threadNameLength);
   if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->threadNameLength, amt,
 		 abfd) != amt)
@@ -663,9 +651,7 @@
 	    }
 	}
       else
-	{
-	  break;
-	}
+	break;
     }
   return true;
 }
@@ -719,6 +705,31 @@
 	return false;
     }
 
+  /* Note - the CoPyRiGhT tag is emitted before the MeSsAgEs
+     tag in order to make the NW4.x and NW5.x loaders happy.  */
+
+  /* Write out the copyright header if there is one.  */
+  if (find_nonzero ((PTR) nlm_copyright_header (abfd),
+		    sizeof (Nlm_Internal_Copyright_Header)))
+    {
+      Nlm_External_Copyright_Header thdr;
+
+      memcpy (thdr.stamp, "CoPyRiGhT=", 10);
+      amt = sizeof (thdr.stamp);
+      if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
+	return false;
+      thdr.copyrightMessageLength[0] =
+	nlm_copyright_header (abfd)->copyrightMessageLength;
+      amt = 1;
+      if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
+	return false;
+      /* The copyright message is a variable length string.  */
+      amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
+      if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
+		     amt, abfd) != amt)
+	return false;
+    }
+
   /* Write out the extended header if there is one.  */
   if (find_nonzero ((PTR) nlm_extended_header (abfd),
 		    sizeof (Nlm_Internal_Extended_Header)))
@@ -818,28 +829,6 @@
 	return false;
     }
 
-  /* Write out the copyright header if there is one.  */
-  if (find_nonzero ((PTR) nlm_copyright_header (abfd),
-		    sizeof (Nlm_Internal_Copyright_Header)))
-    {
-      Nlm_External_Copyright_Header thdr;
-
-      memcpy (thdr.stamp, "CoPyRiGhT=", 10);
-      amt = sizeof (thdr.stamp);
-      if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
-	return false;
-      thdr.copyrightMessageLength[0] =
-	nlm_copyright_header (abfd)->copyrightMessageLength;
-      amt = 1;
-      if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
-	return false;
-      /* The copyright message is a variable length string.  */
-      amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
-      if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
-		     amt, abfd) != amt)
-	return false;
-    }
-
   /* Write out the custom header if there is one.   */
   if (find_nonzero ((PTR) nlm_custom_header (abfd),
 		    sizeof (Nlm_Internal_Custom_Header)))
@@ -913,7 +902,7 @@
 nlm_get_symtab_upper_bound (abfd)
      bfd *abfd;
 {
-  Nlm_Internal_Fixed_Header *i_fxdhdrp;	/* Nlm file header, internal form */
+  Nlm_Internal_Fixed_Header *i_fxdhdrp;	/* Nlm file header, internal form.  */
   long symcount;
   long symtab_size = 0;
 
@@ -936,7 +925,7 @@
   nlm_symbol_type *symbase;
   bfd_size_type counter = 0;
 
-  if (nlm_slurp_symbol_table (abfd) == false)
+  if (! nlm_slurp_symbol_table (abfd))
     return -1;
   symbase = nlm_get_symbols (abfd);
   while (counter < bfd_get_symcount (abfd))
@@ -1018,20 +1007,19 @@
    The bfd symbols are copied to SYMPTRS.
 
    When we return, the bfd symcount is either zero or contains the correct
-   number of symbols.
-*/
+   number of symbols.  */
 
 static boolean
 nlm_slurp_symbol_table (abfd)
      bfd *abfd;
 {
-  Nlm_Internal_Fixed_Header *i_fxdhdrp;	/* Nlm file header, internal form */
-  bfd_size_type totsymcount;	/* Number of NLM symbols */
-  bfd_size_type symcount;	/* Counter of NLM symbols */
-  nlm_symbol_type *sym;		/* Pointer to current bfd symbol */
-  unsigned char symlength;	/* Symbol length read into here */
-  unsigned char symtype;	/* Type of debugging symbol */
-  bfd_byte temp[NLM_TARGET_LONG_SIZE];	/* Symbol offsets read into here */
+  Nlm_Internal_Fixed_Header *i_fxdhdrp;	/* Nlm file header, internal form.  */
+  bfd_size_type totsymcount;	/* Number of NLM symbols.  */
+  bfd_size_type symcount;	/* Counter of NLM symbols.  */
+  nlm_symbol_type *sym;		/* Pointer to current bfd symbol.  */
+  unsigned char symlength;	/* Symbol length read into here.  */
+  unsigned char symtype;	/* Type of debugging symbol.  */
+  bfd_byte temp[NLM_TARGET_LONG_SIZE];	/* Symbol offsets read into here.  */
   boolean (*read_import_func) PARAMS ((bfd *, nlm_symbol_type *));
   boolean (*set_public_section_func) PARAMS ((bfd *, nlm_symbol_type *));
   bfd_size_type amt;
@@ -1053,9 +1041,7 @@
 		 + i_fxdhdrp->numberOfDebugRecords
 		 + i_fxdhdrp->numberOfExternalReferences);
   if (totsymcount == 0)
-    {
-      return true;
-    }
+    return true;
 
   if (bfd_seek (abfd, i_fxdhdrp->publicsOffset, SEEK_SET) != 0)
     return false;
@@ -1095,7 +1081,7 @@
 	{
 	  /* Most backends can use the code below, but unfortunately
 	     some use a different scheme.  */
-	  if ((*set_public_section_func) (abfd, sym) == false)
+	  if (! (*set_public_section_func) (abfd, sym))
 	    return false;
 	}
       else
@@ -1171,7 +1157,6 @@
 
   /* Read in the import records.  We can only do this if we know how
      to read relocs for this target.  */
-
   read_import_func = nlm_read_import_func (abfd);
   if (read_import_func != NULL)
     {
@@ -1181,7 +1166,7 @@
       symcount += i_fxdhdrp->numberOfExternalReferences;
       while (abfd->symcount < symcount)
 	{
-	  if ((*read_import_func) (abfd, sym) == false)
+	  if (! (*read_import_func) (abfd, sym))
 	    return false;
 	  sym++;
 	  abfd->symcount++;
@@ -1238,7 +1223,7 @@
      the machine specific reloc information is.  */
   while (count-- != 0)
     {
-      if ((*read_func) (abfd, (nlm_symbol_type *) NULL, secs, rels) == false)
+      if (! (*read_func) (abfd, (nlm_symbol_type *) NULL, secs, rels))
 	{
 	  nlm_relocation_fixups (abfd) = NULL;
 	  nlm_relocation_fixup_secs (abfd) = NULL;
@@ -1274,7 +1259,7 @@
   syms = nlm_get_symbols (abfd);
   if (syms == NULL)
     {
-      if (nlm_slurp_symbol_table (abfd) == false)
+      if (! nlm_slurp_symbol_table (abfd))
 	return -1;
       syms = nlm_get_symbols (abfd);
     }
@@ -1309,7 +1294,7 @@
   rels = nlm_relocation_fixups (abfd);
   if (rels == NULL)
     {
-      if (nlm_slurp_reloc_fixups (abfd) == false)
+      if (! nlm_slurp_reloc_fixups (abfd))
 	return -1;
       rels = nlm_relocation_fixups (abfd);
     }
@@ -1386,7 +1371,7 @@
   asection *bss_sec;
   asymbol **sym_ptr_ptr;
 
-  if (abfd->output_has_begun == true)
+  if (abfd->output_has_begun)
     return true;
 
   /* Make sure we have a section to hold uninitialized data.  */
@@ -1587,8 +1572,8 @@
      file_ptr offset;
      bfd_size_type count;
 {
-  if (abfd->output_has_begun == false
-      && nlm_compute_section_file_positions (abfd) == false)
+  if (! abfd->output_has_begun
+      && ! nlm_compute_section_file_positions (abfd))
     return false;
 
   if (count == 0)
@@ -1690,16 +1675,16 @@
   if (fixed_header == NULL)
     goto error_return;
 
-  if (abfd->output_has_begun == false
-      && nlm_compute_section_file_positions (abfd) == false)
+  if (! abfd->output_has_begun
+      && ! nlm_compute_section_file_positions (abfd))
     goto error_return;
 
   /* Write out the variable length headers.  */
   pos = nlm_optional_prefix_size (abfd) + nlm_fixed_header_size (abfd);
   if (bfd_seek (abfd, pos, SEEK_SET) != 0)
     goto error_return;
-  if (nlm_swap_variable_header_out (abfd) == false
-      || nlm_swap_auxiliary_headers_out (abfd) == false)
+  if (! nlm_swap_variable_header_out (abfd)
+      || ! nlm_swap_auxiliary_headers_out (abfd))
     {
       bfd_set_error (bfd_error_system_call);
       goto error_return;
@@ -1760,7 +1745,7 @@
 	  if (! bfd_is_und_section (bfd_get_section (sym)))
 	    {
 	      ++internal_reloc_count;
-	      if ((*write_import_func) (abfd, sec, rel) == false)
+	      if (! (*write_import_func) (abfd, sec, rel))
 		goto error_return;
 	    }
 	  else
@@ -1832,9 +1817,8 @@
 	   j++)
 	++cnt;
 
-      if ((*nlm_write_external_func (abfd)) (abfd, cnt, sym,
-					     &external_relocs[i])
-	  == false)
+      if (! (*nlm_write_external_func (abfd)) (abfd, cnt, sym,
+					       &external_relocs[i]))
 	goto error_return;
 
       i += cnt;
@@ -1902,7 +1886,7 @@
 
 	  if (write_export_func)
 	    {
-	      if ((*write_export_func) (abfd, sym, offset) == false)
+	      if (! (*write_export_func) (abfd, sym, offset))
 		goto error_return;
 	    }
 	  else
@@ -2036,7 +2020,7 @@
   write_prefix_func = nlm_write_prefix_func (abfd);
   if (write_prefix_func)
     {
-      if ((*write_prefix_func) (abfd) == false)
+      if (! (*write_prefix_func) (abfd))
 	goto error_return;
     }
 
diff --git a/bfd/ns32k.h b/bfd/ns32k.h
index 818ae0b..a97a9ae 100644
--- a/bfd/ns32k.h
+++ b/bfd/ns32k.h
@@ -1,22 +1,22 @@
 /* Header file for ns32k routines.
-   Copyright 1996, 2001 Free Software Foundation, Inc.
+   Copyright 1996, 2001, 2002 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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.  */
 
 extern bfd_reloc_status_type _bfd_ns32k_relocate_contents
   PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
@@ -24,7 +24,7 @@
 extern bfd_reloc_status_type _bfd_do_ns32k_reloc_contents
   PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *,
 	   bfd_vma (*) (bfd_byte *, int),
-	   int (*) (bfd_vma, bfd_byte *, int)));
+	   void (*) (bfd_vma, bfd_byte *, int)));
 
 extern bfd_reloc_status_type _bfd_ns32k_final_link_relocate
   PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, bfd_vma,
@@ -32,8 +32,8 @@
 
 extern bfd_vma _bfd_ns32k_get_displacement PARAMS ((bfd_byte *, int));
 extern bfd_vma _bfd_ns32k_get_immediate PARAMS ((bfd_byte *, int));
-extern int _bfd_ns32k_put_displacement PARAMS ((bfd_vma, bfd_byte *, int));
-extern int _bfd_ns32k_put_immediate PARAMS ((bfd_vma, bfd_byte *, int));
+extern void _bfd_ns32k_put_displacement PARAMS ((bfd_vma, bfd_byte *, int));
+extern void _bfd_ns32k_put_immediate PARAMS ((bfd_vma, bfd_byte *, int));
 
 extern bfd_reloc_status_type _bfd_ns32k_reloc_disp
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
diff --git a/bfd/ns32knetbsd.c b/bfd/ns32knetbsd.c
index 032a96d..3c3b5a2 100644
--- a/bfd/ns32knetbsd.c
+++ b/bfd/ns32knetbsd.c
@@ -1,5 +1,5 @@
 /* BFD back-end for NetBSD/ns32k a.out-ish binaries.
-   Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000, 2001
+   Copyright 1990, 1991, 1992, 1994, 1995, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -48,7 +48,7 @@
 
 #include "bfd.h"		/* To ensure following declaration is OK */
 
-CONST struct reloc_howto_struct *
+const struct reloc_howto_struct *
 MY_bfd_reloc_type_lookup
   PARAMS((bfd *abfd AND
 	  bfd_reloc_code_real_type code));
diff --git a/bfd/oasys.c b/bfd/oasys.c
index 5c2bf5e..9035a4f 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -254,7 +254,7 @@
 {
   asymbol *symbase;
   unsigned int counter;
-  if (oasys_slurp_symbol_table (abfd) == false)
+  if (! oasys_slurp_symbol_table (abfd))
     {
       return -1;
     }
@@ -411,7 +411,7 @@
 {
   bfd_size_type amt = sizeof (oasys_data_type);
   abfd->tdata.oasys_obj_data = (oasys_data_type *) bfd_alloc (abfd, amt);
-  return abfd->tdata.oasys_obj_data ? true : false;
+  return abfd->tdata.oasys_obj_data != NULL;
 }
 
 #define MAX_SECS 16
@@ -496,7 +496,7 @@
 	case oasys_record_is_module_enum:
 	case oasys_record_is_named_section_enum:
 	case oasys_record_is_end_enum:
-	  if (had_usefull == false)
+	  if (! had_usefull)
 	    goto fail;
 	  loop = false;
 	  break;
@@ -600,7 +600,7 @@
   for (s = abfd->sections; s != (asection *) NULL; s = s->next)
     {
       per = oasys_per_section (s);
-      if (per->initialized == true)
+      if (per->initialized)
 	return true;
     }
 
@@ -632,7 +632,7 @@
 
 	    per = oasys_per_section (section);
 
-	    if (per->initialized == false)
+	    if (! per->initialized)
 	      {
 		per->data = (bfd_byte *) bfd_zalloc (abfd, section->_raw_size);
 		if (!per->data)
@@ -646,7 +646,7 @@
 	      }
 
 	    dst_offset = H_GET_32 (abfd, record.data.addr);
-	    if (per->had_vma == false)
+	    if (! per->had_vma)
 	      {
 		/* Take the first vma we see as the base */
 		section->vma = dst_offset;
@@ -728,16 +728,13 @@
 				  r->relent.sym_ptr_ptr = (asymbol **) NULL;
 				  section->reloc_count++;
 
-				  /* Fake up the data to look like it's got the -ve pc in it, this makes
-				       it much easier to convert into other formats. This is done by
-				       hitting the addend.
-				       */
-				  if (r->relent.howto->pc_relative == true)
-				    {
-				      r->relent.addend -= dst_ptr - dst_base_ptr;
-				    }
-
-
+				  /* Fake up the data to look like
+				     it's got the -ve pc in it, this
+				     makes it much easier to convert
+				     into other formats.  This is done
+				     by hitting the addend.  */
+				  if (r->relent.howto->pc_relative)
+				    r->relent.addend -= dst_ptr - dst_base_ptr;
 				}
 				break;
 
@@ -772,17 +769,13 @@
 				  section->reloc_count++;
 
 				  src += 2;
-				  /* Fake up the data to look like it's got the -ve pc in it, this makes
-				       it much easier to convert into other formats. This is done by
-				       hitting the addend.
-				       */
-				  if (r->relent.howto->pc_relative == true)
-				    {
-				      r->relent.addend -= dst_ptr - dst_base_ptr;
-				    }
-
-
-
+				  /* Fake up the data to look like
+				     it's got the -ve pc in it, this
+				     makes it much easier to convert
+				     into other formats.  This is done
+				     by hitting the addend.  */
+				  if (r->relent.howto->pc_relative)
+				    r->relent.addend -= dst_ptr - dst_base_ptr;
 				}
 				break;
 			      case RELOCATION_TYPE_COM:
@@ -850,7 +843,7 @@
 {
   oasys_per_section_type *p = (oasys_per_section_type *) section->used_by_bfd;
   oasys_slurp_section_data (abfd);
-  if (p->initialized == false)
+  if (! p->initialized)
     {
       (void) memset (location, 0, (size_t) count);
     }
@@ -1490,6 +1483,7 @@
 #define oasys_bfd_relax_section bfd_generic_relax_section
 #define oasys_bfd_gc_sections bfd_generic_gc_sections
 #define oasys_bfd_merge_sections bfd_generic_merge_sections
+#define oasys_bfd_discard_group bfd_generic_discard_group
 #define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/opncls.c b/bfd/opncls.c
index f110259..cdf08df 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -152,7 +152,6 @@
   target_vec = bfd_find_target (target, nbfd);
   if (target_vec == NULL)
     {
-      bfd_set_error (bfd_error_invalid_target);
       _bfd_delete_bfd (nbfd);
       return NULL;
     }
@@ -220,7 +219,8 @@
 #else
   fdflags = fcntl (fd, F_GETFL, NULL);
 #endif
-  if (fdflags == -1) return NULL;
+  if (fdflags == -1)
+    return NULL;
 
   nbfd = _bfd_new_bfd ();
   if (nbfd == NULL)
@@ -229,7 +229,6 @@
   target_vec = bfd_find_target (target, nbfd);
   if (target_vec == NULL)
     {
-      bfd_set_error (bfd_error_invalid_target);
       _bfd_delete_bfd (nbfd);
       return NULL;
     }
@@ -308,7 +307,6 @@
   target_vec = bfd_find_target (target, nbfd);
   if (target_vec == NULL)
     {
-      bfd_set_error (bfd_error_invalid_target);
       _bfd_delete_bfd (nbfd);
       return NULL;
     }
@@ -354,8 +352,6 @@
   bfd *nbfd;
   const bfd_target *target_vec;
 
-  bfd_set_error (bfd_error_system_call);
-
   /* nbfd has to point to head of malloc'ed block so that bfd_close may
      reclaim it correctly.  */
   nbfd = _bfd_new_bfd ();
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index d4fe79e..cb47f78 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1479,9 +1479,9 @@
       count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
 
 #ifdef USE_MMAP
-      if (bfd_get_file_window (abfd,
-			       obj_sym_filepos (abfd), exec_hdr (abfd)->a_syms,
-			       &obj_aout_sym_window (abfd), true) == false)
+      if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
+				 exec_hdr (abfd)->a_syms,
+				 &obj_aout_sym_window (abfd), true))
 	return false;
       syms = (struct external_nlist *) obj_aout_sym_window (abfd).data;
 #else
@@ -1520,8 +1520,8 @@
       stringsize = H_GET_32 (abfd, string_chars);
 
 #ifdef USE_MMAP
-      if (bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize,
-			       &obj_aout_string_window (abfd), true) == false)
+      if (! bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize,
+				 &obj_aout_string_window (abfd), true))
 	return false;
       strings = (char *) obj_aout_string_window (abfd).data;
 #else
@@ -1841,11 +1841,9 @@
 
   cached_size = obj_aout_external_sym_count (abfd);
   cached_size *= sizeof (aout_symbol_type);
-  cached = (aout_symbol_type *) bfd_malloc (cached_size);
+  cached = (aout_symbol_type *) bfd_zmalloc (cached_size);
   if (cached == NULL && cached_size != 0)
     return false;
-  if (cached_size != 0)
-    memset (cached, 0, (size_t) cached_size);
 
   /* Convert from external symbol information to internal.  */
   if (! (NAME(aout,translate_symbol_table)
@@ -2255,10 +2253,9 @@
     count = real_count;
   }
 
-  reloc_cache = (arelent *) bfd_malloc (count * sizeof (arelent));
+  reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent));
   if (reloc_cache == NULL && count != 0)
     return false;
-  memset (reloc_cache, 0, (size_t) count * sizeof (arelent));
 
   cache_ptr = reloc_cache;
 
@@ -2319,8 +2316,6 @@
   if (!native)
     return false;
 
-  memset ((PTR)native, 0, (size_t) natsize);
-
   generic = section->orelocation;
   if (generic != NULL)
     {
diff --git a/bfd/pe-i386.c b/bfd/pe-i386.c
index 7ced147..9c75f95 100644
--- a/bfd/pe-i386.c
+++ b/bfd/pe-i386.c
@@ -1,21 +1,21 @@
 /* BFD back-end for Intel 386 PECOFF files.
-   Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1999, 2001, 2002 Free Software Foundation, Inc.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -29,6 +29,12 @@
 #define COFF_LONG_FILENAMES
 
 #define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
 { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 22f2e3f..b643f3c 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -3,21 +3,21 @@
    Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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.  */
 
 /* Most of this hacked by Steve Chamberlain <sac@cygnus.com>.
 
@@ -620,7 +620,7 @@
   extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES;
 
   /* first null out all data directory entries ..  */
-  memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0);
+  memset (extra->DataDirectory, 0, sizeof (extra->DataDirectory));
 
   add_data_entry (abfd, extra, 0, ".edata", ib);
 
@@ -1142,6 +1142,7 @@
 
   adj = section->vma - extra->ImageBase;
 
+  /* Print all image import descriptors.  */
   for (i = 0; i < datasize; i += onaline)
     {
       bfd_vma hint_addr;
@@ -1153,7 +1154,7 @@
       bfd_size_type j;
       char *dll;
 
-      /* print (i + extra->DataDirectory[1].VirtualAddress)  */
+      /* Print (i + extra->DataDirectory[1].VirtualAddress).  */
       fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
 #if 0
       if (i + 20 > datasize)
@@ -1181,19 +1182,83 @@
 
       if (hint_addr != 0)
 	{
-	  fprintf (file, _("\tvma:  Hint/Ord Member-Name\n"));
+	  bfd_byte *ft_data;
+	  asection *ft_section;
+	  bfd_vma ft_addr;
+	  bfd_size_type ft_datasize;
+	  int ft_idx;
+	  int ft_allocated = 0;
+
+	  fprintf (file, _("\tvma:  Hint/Ord Member-Name Bound-To\n"));
 
 	  idx = hint_addr - adj;
+	  
+	  ft_addr = first_thunk + extra->ImageBase;
+	  ft_data = data;
+	  ft_idx = first_thunk - adj;
+	  ft_allocated = 0; 
+      
+	  if (first_thunk != hint_addr) 
+	    {
+	      /* Find the section which contains the first thunk.  */
+	      for (ft_section = abfd->sections;
+		   ft_section != NULL;
+		   ft_section = ft_section->next)
+		{
+		  ft_datasize = bfd_section_size (abfd, ft_section);
+		  if (ft_addr >= ft_section->vma
+		      && ft_addr < ft_section->vma + ft_datasize)
+		    break;
+		}
 
+	      if (ft_section == NULL)
+		{
+		  fprintf (file,
+		       _("\nThere is a first thunk, but the section containing it could not be found\n"));
+		  continue;
+		}
+
+	      /* Now check to see if this section is the same as our current
+		 section.  If it is not then we will have to load its data in.  */
+	      if (ft_section == section)
+		{
+		  ft_data = data;
+		  ft_idx = first_thunk - adj;
+		}
+	      else
+		{
+		  ft_idx = first_thunk - (ft_section->vma - extra->ImageBase);
+		  ft_data = (bfd_byte *) bfd_malloc (datasize);
+		  if (ft_data == NULL)
+		    continue;
+
+		  /* Read datasize bfd_bytes starting at offset ft_idx.  */
+		  if (! bfd_get_section_contents (abfd, ft_section,
+						  (PTR) ft_data,
+						  (bfd_vma) ft_idx,
+						  datasize))
+		    {
+		      free (ft_data);
+		      continue;
+		    }
+
+		  ft_idx = 0;
+		  ft_allocated = 1;
+		}
+	    }
+
+	  /* Print HintName vector entries.  */
 	  for (j = 0; j < datasize; j += 4)
 	    {
 	      unsigned long member = bfd_get_32 (abfd, data + idx + j);
 
+	      /* Print single IMAGE_IMPORT_BY_NAME vector.  */ 
 	      if (member == 0)
 		break;
+
 	      if (member & 0x80000000)
-		fprintf (file, "\t%04lx\t %4lu", member,
-			 member & 0x7fffffff);
+		fprintf (file, "\t%04lx\t %4lu  <none>",
+			 member, member & 0x7fffffff);
 	      else
 		{
 		  int ordinal;
@@ -1206,117 +1271,15 @@
 		}
 
 	      /* If the time stamp is not zero, the import address
-                 table holds actual addresses.  */
+		 table holds actual addresses.  */
 	      if (time_stamp != 0
 		  && first_thunk != 0
 		  && first_thunk != hint_addr)
 		fprintf (file, "\t%04lx",
-			 (long) bfd_get_32 (abfd, data + first_thunk - adj + j));
+			 (long) bfd_get_32 (abfd, ft_data + ft_idx + j));
 
 	      fprintf (file, "\n");
 	    }
-	}
-
-      if (hint_addr != first_thunk && time_stamp == 0)
-	{
-          bfd_byte *ft_data;
-	  asection *ft_section;
-	  bfd_vma ft_addr;
-	  bfd_size_type ft_datasize;
-	  int ft_idx;
-	  int differ = 0;
-	  int ft_allocated = 0;
-
-          ft_addr = first_thunk + extra->ImageBase;
-
-	  /* Find the section which contains the first thunk.  */
-	  for (ft_section = abfd->sections;
-	       ft_section != NULL;
-	       ft_section = ft_section->next)
-	    {
-	      ft_datasize = bfd_section_size (abfd, ft_section);
-	      if (ft_addr >= ft_section->vma
-		  && ft_addr < ft_section->vma + ft_datasize)
-		break;
-	    }
-
-	  if (ft_section == NULL)
-	    {
-	      fprintf (file,
-		   _("\nThere is a first thunk, but the section containing it could not be found\n"));
-	      continue;
-	    }
-
-	  /* Now check to see if this section is the same as our current
-	     section.  If it is not then we will have to load its data in.  */
-	  if (ft_section == section)
-	    {
-	      ft_data = data;
-              ft_idx = first_thunk - adj;
-	    }
-	  else
-	    {
-              ft_idx = first_thunk - (ft_section->vma - extra->ImageBase);
-	      ft_data = (bfd_byte *) bfd_malloc (datasize);
-	      if (ft_data == NULL)
-		continue;
-
-	      /* Read datasize bfd_bytes starting at offset ft_idx.  */
-	      if (! bfd_get_section_contents (abfd, ft_section, (PTR) ft_data, (bfd_vma) ft_idx, datasize))
-		{
-		  free (ft_data);
-		  continue;
-		}
-
-	      ft_idx = 0;
-	      ft_allocated = 1;
-	    }
-
-	  for (j = 0; j < datasize; j += 4)
-	    {
-	      int ordinal;
-	      char *member_name;
-	      bfd_vma hint_member = 0;
-	      bfd_vma iat_member;
-
-	      if (hint_addr != 0)
-		hint_member = bfd_get_32 (abfd, data + idx + j);
-	      iat_member = bfd_get_32 (abfd, ft_data + ft_idx + j);
-
-	      if (hint_addr == 0 && iat_member == 0)
-		break;
-
-	      if (hint_addr == 0 || hint_member != iat_member)
-		{
-		  if (differ == 0)
-		    {
-		      fprintf (file,
-			       _("\tThe Import Address Table (difference found)\n"));
-		      fprintf (file, _("\tvma:  Hint/Ord Member-Name\n"));
-		      differ = 1;
-		    }
-
-		  if (iat_member == 0)
-		    fprintf (file,
-			     _("\t>>> Ran out of IAT members!\n"));
-		  else
-		    {
-		      ordinal = bfd_get_16 (abfd, data + iat_member - adj);
-		      member_name = (char *) data + iat_member - adj + 2;
-		      fprintf (file, "\t%04lx\t %4d  %s\n",
-			      (unsigned long) iat_member,
-			      ordinal,
-			      member_name);
-		    }
-		}
-
-	      if (hint_addr != 0 && hint_member == 0)
-		break;
-	    }
-
-	  if (differ == 0)
-	    fprintf (file,
-		     _("\tThe Import Address Table is identical\n"));
 
 	  if (ft_allocated)
 	    free (ft_data);
diff --git a/bfd/pei-i386.c b/bfd/pei-i386.c
index 8f0f77a..9f577e6 100644
--- a/bfd/pei-i386.c
+++ b/bfd/pei-i386.c
@@ -1,21 +1,21 @@
 /* BFD back-end for Intel 386 PE IMAGE COFF files.
-   Copyright 1995, 1996, 1999 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1999, 2002 Free Software Foundation, Inc.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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"
@@ -30,6 +30,12 @@
 #define COFF_LONG_FILENAMES
 
 #define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+  COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
 { COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
   COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
 { COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 323b30d..a621acc 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1,5 +1,5 @@
 /* Support for the generic parts of PE/PEI, for BFD.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
@@ -312,7 +312,7 @@
   struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
   pe_data_type *pe;
 
-  if (pe_mkobject (abfd) == false)
+  if (! pe_mkobject (abfd))
     return NULL;
 
   pe = pe_data (abfd);
@@ -1207,7 +1207,10 @@
     return NULL;
 
   if (bfd_bread (ptr, size, abfd) != size)
-    return NULL;
+    {
+      bfd_release (abfd, ptr);
+      return NULL;
+    }
 
   symbol_name = ptr;
   source_dll  = ptr + strlen (ptr) + 1;
@@ -1219,14 +1222,17 @@
 	(_("%s: string not null terminated in ILF object file."),
 	 bfd_archive_filename (abfd));
       bfd_set_error (bfd_error_malformed_archive);
-
+      bfd_release (abfd, ptr);
       return NULL;
     }
 
   /* Now construct the bfd.  */
   if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name,
 			    source_dll, ordinal, types))
-    return NULL;
+    {
+      bfd_release (abfd, ptr);
+      return NULL;
+    }
 
   return abfd->xvec;
 }
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 8f0199d..4c32ca0 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -65,7 +65,9 @@
 cpu-cris.c
 cpu-d10v.c
 cpu-d30v.c
+cpu-dlx.c
 cpu-fr30.c
+cpu-frv.c
 cpu-h8300.c
 cpu-h8500.c
 cpu-hppa.c
@@ -74,6 +76,7 @@
 cpu-i860.c
 cpu-i960.c
 cpu-ia64.c
+cpu-ip2k.c
 cpu-m10200.c
 cpu-m10300.c
 cpu-m32r.c
@@ -124,15 +127,19 @@
 elf32-cris.c
 elf32-d10v.c
 elf32-d30v.c
+elf32-dlx.c
 elf32-fr30.c
+elf32-frv.c
 elf32-gen.c
 elf32-h8300.c
 elf32-hppa.c
 elf32-hppa.h
 elf32-i370.c
 elf32-i386.c
+elf32-i386qnx.c
 elf32-i860.c
 elf32-i960.c
+elf32-ip2k.c
 elf32-m32r.c
 elf32-m68hc11.c
 elf32-m68hc12.c
@@ -148,9 +155,12 @@
 elf32-sh-lin.c
 elf32-sh-nbsd.c
 elf32-sh.c
+elf32-sh64-com.c
+elf32-sh64-nbsd.c
 elf32-sh64.c
 elf32-sparc.c
 elf32-v850.c
+elf32-vax.c
 elf32-xstormy16.c
 elf32.c
 elf64-alpha.c
@@ -161,6 +171,7 @@
 elf64-mmix.c
 elf64-ppc.c
 elf64-s390.c
+elf64-sh64-nbsd.c
 elf64-sh64.c
 elf64-sparc.c
 elf64-x86-64.c
@@ -268,6 +279,8 @@
 targets.c
 tekhex.c
 trad-core.c
+vax1knetbsd.c
+vaxbsd.c
 vaxnetbsd.c
 versados.c
 version.h
diff --git a/bfd/po/es.po b/bfd/po/es.po
index db6b76a..ab8b837 100644
--- a/bfd/po/es.po
+++ b/bfd/po/es.po
@@ -1,19 +1,19 @@
-# Mensajes en español para bfd 2.12-pre020121.
+# Mensajes en español para bfd 2.12.91.
 # Copyright (C) 2002 Free Software Foundation, Inc.
 # Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-31 17:07+0000\n"
-"PO-Revision-Date: 2002-01-24 10:04-0600\n"
+"Project-Id-Version: bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 02:29-0500\n"
 "Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
 "Language-Team: Spanish <es@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aout-adobe.c:196
+#: aout-adobe.c:197
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: Tipo de sección desconocido en el fichero a.out.adobe: %x\n"
@@ -36,31 +36,25 @@
 #: aoutx.h:1282 aoutx.h:1699
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr ""
-"%s: no se puede representar la sección `%s' en el fichero objeto de formato "
-"a.out"
+msgstr "%s: no se puede representar la sección `%s' en el fichero objeto de formato a.out"
 
 #: aoutx.h:1669
 #, c-format
-msgid ""
-"%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr ""
-"%s: no se puede representar la sección para el símbolo `%s' en el fichero "
-"objeto de formato a.out"
+msgid "%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr "%s: no se puede representar la sección para el símbolo `%s' en el fichero objeto de formato a.out"
 
 #: aoutx.h:1671
 msgid "*unknown*"
 msgstr "*desconocido*"
 
-#: aoutx.h:3735
+#: aoutx.h:3732
 #, c-format
 msgid "%s: relocateable link from %s to %s not supported"
 msgstr "%s: enlace reubicable desde %s a %s sin soporte"
 
 #: archive.c:1826
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
-msgstr ""
-"Aviso: la escritura del fichero fue lenta: reescribiendo la marca de tiempo\n"
+msgstr "Aviso: la escritura del fichero fue lenta: reescribiendo la marca de tiempo\n"
 
 # ¡Uff! Si utilizáramos file=archivo, esta traducción sería imposible. cfuga
 #: archive.c:2093
@@ -163,7 +157,7 @@
 msgstr "error interno de BFD %s, abortando en %s línea %d en %s\n"
 
 #: bfd.c:723
-#, fuzzy, c-format
+#, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "error interno de BFD %s, abortando en %s línea %d\n"
 
@@ -174,9 +168,7 @@
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr ""
-"Aviso: Escribiendo la sección `%s' a un desplazamiento de fichero grande (pe "
-"negativo) 0x%lx."
+msgstr "Aviso: Escribiendo la sección `%s' a un desplazamiento de fichero grande (pe negativo) 0x%lx."
 
 #: coff-a29k.c:119
 msgid "Missing IHCONST"
@@ -186,7 +178,7 @@
 msgid "Missing IHIHALF"
 msgstr "IHIHALF faltante"
 
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:229
 msgid "Unrecognized reloc"
 msgstr "Reubicación no reconocida"
 
@@ -198,7 +190,7 @@
 msgid "missing IHIHALF reloc"
 msgstr "reubicación IHIHALF faltante"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
 msgid "GP relative relocation used when GP not defined"
 msgstr "se usó una reubicación GP relativa cuando GP no estaba definido"
 
@@ -206,182 +198,156 @@
 msgid "using multiple gp values"
 msgstr "usando valores múltiples de gp"
 
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: no se puede encontrar el pegamento THUMB '%s' para `%s'"
 
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: no se puede encontrar el pegamento ARM '%s' para `%s'"
 
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): aviso: interoperabilidad no activada."
 
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  primera ocurrencia: %s: llamada arm a thumb"
 
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  primera ocurrencia: %s: llamada thumb a arm"
 
-#: coff-arm.c:1477
+#: coff-arm.c:1493
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  considere el reenlace con --support-old-code activado"
 
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: dirección de reubicación 0x%lx errónea en la sección `%s'"
 
-#: coff-arm.c:2107
+#: coff-arm.c:2127
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: índice de símbolos ilegal en la reubicación: %d"
 
-#: coff-arm.c:2235
+#: coff-arm.c:2255
 #, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr ""
-"%s: ERROR: compilado para APCS-%d mientras que el objetivo %s usa APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "ERROR: %s está compilado para APCS-%d, mientras que %s está compilado para APCS-%d"
 
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
 #, c-format
-msgid ""
-"%s: ERROR: passes floats in float registers whereas target %s uses integer "
-"registers"
-msgstr ""
-"%s: ERROR: pasan números de coma flotante en registros de coma flotante "
-"mientras que el objetivo %s usa registros enteros"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "ERROR: %s pasa números de coma flotante en registros de coma flotante, mientras que %s los pasa en registros enteros"
 
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
 #, c-format
-msgid ""
-"%s: ERROR: passes floats in integer registers whereas target %s uses float "
-"registers"
-msgstr ""
-"%s: ERROR: pasan números de coma flotante en registros enteros mientras que "
-"el objetivo %s usa registros de coma flotante"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "ERROR: %s pasa números de coma flotante en registros enteros, mientras que %s los pasa en registros de coma flotante"
 
-#: coff-arm.c:2268
+#: coff-arm.c:2288
 #, c-format
-msgid ""
-"%s: ERROR: compiled as position independent code, whereas target %s is "
-"absolute position"
-msgstr ""
-"%s: ERROR: compilado como código independiente de posición, mientras que el "
-"objetivo %s es de posición absoluta"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "ERROR: %s está compilado como código independiente de posición, mientras que el objetivo %s es de posición absoluta"
 
-#: coff-arm.c:2271
+#: coff-arm.c:2291
 #, c-format
-msgid ""
-"%s: ERROR: compiled as absolute position code, whereas target %s is position "
-"independent"
-msgstr ""
-"%s: ERROR: compilado como código de posición absoluta, mientras que el "
-"objetivo %s es independiente de posición"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "ERROR: %s está compilado como código de posición absoluta, mientras que el objetivo %s es independiente de posición"
 
-#: coff-arm.c:2300
-#, fuzzy, c-format
-msgid "Warning: %s supports interworking, whereas %s does not."
-msgstr ""
-"Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
+#: coff-arm.c:2320 elf32-arm.h:2358
+#, c-format
+msgid "Warning: %s supports interworking, whereas %s does not"
+msgstr "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
 
-#: coff-arm.c:2303
-#, fuzzy, c-format
-msgid "Warning: %s does not support interworking, whereas %s does."
-msgstr ""
-"Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %"
-"s sí"
+#: coff-arm.c:2323 elf32-arm.h:2365
+#, c-format
+msgid "Warning: %s does not support interworking, whereas %s does"
+msgstr "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %s sí"
 
-#: coff-arm.c:2330
+#: coff-arm.c:2350
 #, c-format
 msgid "private flags = %x:"
 msgstr "opciones privadas = %x:"
 
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
 msgid " [floats passed in float registers]"
 msgstr "[números de coma flotante pasados en registros de coma flotante]"
 
-#: coff-arm.c:2340
+#: coff-arm.c:2360
 msgid " [floats passed in integer registers]"
 msgstr "[números de coma flotante pasados en registros enteros]"
 
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
 msgid " [position independent]"
 msgstr "[independiente de posición]"
 
-#: coff-arm.c:2345
+#: coff-arm.c:2365
 msgid " [absolute position]"
 msgstr "[posición absoluta]"
 
-#: coff-arm.c:2349
+#: coff-arm.c:2369
 msgid " [interworking flag not initialised]"
 msgstr "[opción de interoperabilidad no iniciada]"
 
-#: coff-arm.c:2351
+#: coff-arm.c:2371
 msgid " [interworking supported]"
 msgstr "[soporte para interoperabilidad]"
 
-#: coff-arm.c:2353
+#: coff-arm.c:2373
 msgid " [interworking not supported]"
 msgstr "[sin soporte para interoperabilidad]"
 
-#: coff-arm.c:2401 elf32-arm.h:2114
-#, fuzzy, c-format
-msgid ""
-"Warning: Not setting interworking flag of %s since it has already been "
-"specified as non-interworking"
-msgstr ""
-"Aviso: No se establece la opción de interoperabilidad de %s, ya que ya había "
-"sido especificado como no interoperable"
+#: coff-arm.c:2421 elf32-arm.h:2124
+#, c-format
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "Aviso: No se establece la opción de interoperabilidad de %s ya que se había especificado con anterioridad como no interoperable"
 
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2425 elf32-arm.h:2128
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr ""
-"Aviso: Limpiando la opción de interoperabilidad de %s debido a una petición "
-"externa"
+msgstr "Aviso: Limpiando la opción de interoperabilidad de %s debido a una petición externa"
 
 #: coff-i960.c:136 coff-i960.c:485
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "convención de llamada incierta para un símbolo que no es COFF"
 
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9954
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
 msgid "unsupported reloc type"
 msgstr "tipo de reubicación sin soporte"
 
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
 msgid "GP relative relocation when _gp not defined"
 msgstr "reubicación GP relativa cuando _gp no está definido"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
 msgid "reloc against unsupported section"
 msgstr "reubicación contra una sección sin soporte"
 
-#: coff-mips.c:2476
+#: coff-mips.c:2474
 msgid "reloc not properly aligned"
 msgstr "reubicación no alineada adecuadamente"
 
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: tipo de reubicación 0x%02x sin soporte"
 
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: reubicación de TOC en 0x%x al símbolo `%s' sin entrada TOC"
 
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: el símbolo `%s' tiene smclas %d no reconocido"
@@ -391,7 +357,7 @@
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Tipo de reubicación 0x%x no reconocida"
 
-#: coff-tic54x.c:390 coffcode.h:4868
+#: coff-tic54x.c:390 coffcode.h:4974
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: aviso: íncide de símbolos %ld ilegal en reubicaciones"
@@ -401,37 +367,37 @@
 msgid "ignoring reloc %s\n"
 msgstr "ignorando la reubicación %s\n"
 
-#: coffcode.h:1081
+#: coffcode.h:1086
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): Se ignora la opción de sección %s (0x%x)"
 
-#: coffcode.h:2132
+#: coffcode.h:2143
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Id de objetivo TI COFF '0x%x' no reconocido"
 
-#: coffcode.h:4257
+#: coffcode.h:4365
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: aviso: índice de símbolos %ld ilegal en los números de línea"
 
-#: coffcode.h:4271
+#: coffcode.h:4379
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: aviso: información duplicada de números de línea para `%s'"
 
-#: coffcode.h:4630
+#: coffcode.h:4736
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: Clase de almacenamiento %d no reconocida para %s símbolo `%s'"
 
-#: coffcode.h:4761
+#: coffcode.h:4867
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "aviso: %s: el símbolo local `%s' no tiene sección"
 
-#: coffcode.h:4906
+#: coffcode.h:5012
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: tipo de reubicación %d ilegal en la dirección 0x%lx"
@@ -441,113 +407,92 @@
 msgid "%s: bad string table size %lu"
 msgstr "%s: tamaño de tabla de cadenas %lu erróneo"
 
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "Aviso: el tipo del símbolo `%s' cambió de %d a %d en %s"
 
-#: cofflink.c:2317
+#: cofflink.c:2321
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: reubicaciones en la sección `%s', pero no tiene contenidos"
 
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: desbordamiento de reubicación: 0x%lx > 0xffff"
 
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: aviso: %s: desbordamiento de número de línea: 0x%lx > 0xffff"
 
-#: dwarf2.c:381
+#: dwarf2.c:382
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Error de Dwarf: No se puede encontrar la sección .debug_str."
 
-#: dwarf2.c:398
+#: dwarf2.c:399
 #, c-format
-msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento DW_FROM_strp (%u) es más grande que el "
-"tamaño de .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento DW_FROM_strp (%lu) es más grande o igual que el tamaño de .debug_str (%lu)."
 
-#: dwarf2.c:542
+#: dwarf2.c:543
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Error de Dwarf: No se puede encontrar la sección .debug_abbrev."
 
-#: dwarf2.c:559
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento de abreviatura (%u) es más grande que el "
-"tamaño de abreviatura (%u)."
-
-#: dwarf2.c:756
+#: dwarf2.c:560
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %d."
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento de abreviatura (%lu) es más grande o igual que el tamaño de .debug_abbrev (%lu)."
 
-#: dwarf2.c:843
+#: dwarf2.c:757
+#, c-format
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %u."
+
+#: dwarf2.c:852
 msgid "Dwarf Error: mangled line number section (bad file number)."
-msgstr ""
-"Error de Dwarf: sección de números de línea revuelta (número erróneo de "
-"fichero)."
+msgstr "Error de Dwarf: sección de números de línea revuelta (número erróneo de fichero)."
 
-#: dwarf2.c:929
+#: dwarf2.c:938
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_line."
 
-#: dwarf2.c:952
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento de línea (%u) es más grande que el tamaño "
-"de línea (%u)."
+#: dwarf2.c:961
+#, c-format
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento de línea (%lu) es más grande o igual que el tamaño de .debug_line (%lu)."
 
-#: dwarf2.c:1143
+#: dwarf2.c:1159
 msgid "Dwarf Error: mangled line number section."
 msgstr "Error de Dwarf: sección de números de línea revuelta."
 
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1355 dwarf2.c:1566
 #, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %u."
 
-#: dwarf2.c:1490
+#: dwarf2.c:1527
 #, c-format
-msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
-"information."
-msgstr ""
-"Error de Dwarf: se encontró la versión de dwarf '%hu', este lector solamente "
-"maneja información de la versión 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Error de Dwarf: se encontró la versión de dwarf '%u', este lector solamente maneja información de la versión 2."
 
-#: dwarf2.c:1497
+#: dwarf2.c:1534
 #, c-format
-msgid ""
-"Dwarf Error: found address size '%u', this reader can not handle sizes "
-"greater than '%u'."
-msgstr ""
-"Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no "
-"puede manejar tamaños más grandes que '%u'."
+msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
+msgstr "Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no puede manejar tamaños más grandes que '%u'."
 
-#: dwarf2.c:1520
+#: dwarf2.c:1557
 #, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Error de Dwarf: Número de abreviación erróneo: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Error de Dwarf: Número de abreviación erróneo: %u."
 
-#: ecoff.c:1328
+#: ecoff.c:1318
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Tipo básico %d desconocido"
 
-#: ecoff.c:1597
+#: ecoff.c:1578
 #, c-format
 msgid ""
 "\n"
@@ -556,7 +501,7 @@
 "\n"
 "      Símbolo final+1: %ld"
 
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
 #, c-format
 msgid ""
 "\n"
@@ -565,7 +510,7 @@
 "\n"
 "      Primer símbolo: %ld"
 
-#: ecoff.c:1619
+#: ecoff.c:1600
 #, c-format
 msgid ""
 "\n"
@@ -574,7 +519,7 @@
 "\n"
 "      Símbolo final+1: %-7ld Tipo: %s"
 
-#: ecoff.c:1626
+#: ecoff.c:1607
 #, c-format
 msgid ""
 "\n"
@@ -583,7 +528,7 @@
 "\n"
 "      Símbolo local: %ld"
 
-#: ecoff.c:1634
+#: ecoff.c:1615
 #, c-format
 msgid ""
 "\n"
@@ -592,7 +537,7 @@
 "\n"
 "      struct; símbolo final+1: %ld"
 
-#: ecoff.c:1639
+#: ecoff.c:1620
 #, c-format
 msgid ""
 "\n"
@@ -601,7 +546,7 @@
 "\n"
 "      union; símbolo final+1: %ld"
 
-#: ecoff.c:1644
+#: ecoff.c:1625
 #, c-format
 msgid ""
 "\n"
@@ -610,7 +555,7 @@
 "\n"
 "      enum; símbolo final+1: %ld"
 
-#: ecoff.c:1650
+#: ecoff.c:1631
 #, c-format
 msgid ""
 "\n"
@@ -619,37 +564,35 @@
 "\n"
 "      Tipo: %s"
 
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
-#: elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
 #, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-"%s: aviso: reubicación sin resolución contra el símbolo `%s' de la sección %s"
+msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación sin resolución contra el símbolo `%s' de la sección %s"
 
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
 msgid "internal error: out of range error"
 msgstr "error interno: error fuera de rango"
 
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7587 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
 msgid "internal error: unsupported relocation error"
 msgstr "error interno: error de reubicación sin soporte"
 
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
 msgid "internal error: dangerous error"
 msgstr "error interno: error peligroso"
 
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
 msgid "internal error: unknown error"
 msgstr "error interno: error desconocido"
 
@@ -658,17 +601,17 @@
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: desplazamiento de cadena inválido %u >= %lu para la sección `%s'"
 
-#: elf.c:448
+#: elf.c:589
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: entrada SHT_GROUP inválida"
 
-#: elf.c:529
+#: elf.c:660
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: no hay información de grupo para la sección %s"
 
-#: elf.c:840
+#: elf.c:1023
 msgid ""
 "\n"
 "Program Header:\n"
@@ -676,7 +619,7 @@
 "\n"
 "Encabezado del Programa:\n"
 
-#: elf.c:889
+#: elf.c:1073
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -684,7 +627,7 @@
 "\n"
 "Sección Dinámica:\n"
 
-#: elf.c:1018
+#: elf.c:1202
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -692,7 +635,7 @@
 "\n"
 "Definiciones de versión:\n"
 
-#: elf.c:1041
+#: elf.c:1225
 msgid ""
 "\n"
 "Version References:\n"
@@ -700,442 +643,383 @@
 "\n"
 "Referencias de Versión:\n"
 
-#: elf.c:1046
+#: elf.c:1230
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  requerido desde %s:\n"
 
-#: elf.c:1682
+#: elf.c:1902
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: enlace %lu inválido para la sección de reubicación %s (índice %u)"
 
-#: elf.c:3296
+#: elf.c:3603
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr ""
-"%s: No hay suficiente espacio para los encabezados del programa (%u "
-"asignados, %u necesarios)"
+msgstr "%s: No hay suficiente espacio para los encabezados del programa (%u asignados, %u necesarios)"
 
-#: elf.c:3400
+#: elf.c:3708
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr ""
-"%s: No hay suficiente espacio para los encabezados del programa, pruebe "
-"enlazar con -N"
+msgstr "%s: No hay suficiente espacio para los encabezados del programa, pruebe enlazar con -N"
 
-#: elf.c:3525
+#: elf.c:3833
 #, c-format
-msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-"Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el "
-"segmento inicia en 0x%x"
+msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
+msgstr "Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el segmento inicia en 0x%x"
 
-#: elf.c:3811
+#: elf.c:4148
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: aviso: la sección asignada `%s' no está en el segmento"
 
-#: elf.c:4142
+#: elf.c:4472
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: se requiere el símbolo `%s' pero no está presente"
 
-#: elf.c:4395
+#: elf.c:4749
 #, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: aviso: Se detectó un segmento cargable vacío\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: aviso: Se detectó un segmento cargable vacío, ¿ es intencional ?\n"
 
-#: elf.c:5808
+#: elf.c:6193
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: tipo de reubicación %s sin soporte"
 
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: Aviso: La instrucción Arm BLX apunta a la función Arm '%s'."
 
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: Aviso: La instrucción Thumb BLX apunta a la función thumb '%s'."
 
-#: elf32-arm.h:1904 elf32-i386.c:1778 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): reubicación %s contra la sección SEC_MERGE"
 
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
 #, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr ""
-"%s: aviso: reubicación %d sin resolución contra el símbolo `%s' de la "
-"sección %s"
+msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación %d sin resolución contra el símbolo `%s' de la sección %s"
 
-#: elf32-arm.h:2166
-#, fuzzy, c-format
-msgid ""
-"Warning: Clearing the interworking flag of %s because non-interworking code "
-"in %s has been linked with it"
-msgstr ""
-"Aviso: Limpiando la opción de interoperación en %s porque se ha enlazado "
-"código no interoperable en %s"
-
-#: elf32-arm.h:2261
+#: elf32-arm.h:2176
 #, c-format
-msgid ""
-"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr ""
-"Error: %s compilado para EABI versión %d, mientras que %s está compilado "
-"para la versión %d"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "Aviso: Limpiando la opción de interoperación en %s porque se ha enlazado con él código no interoperable en %s"
 
-#: elf32-arm.h:2275
+#: elf32-arm.h:2271
 #, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr ""
-"Error: %s compilado para APCS-%d, mientras que %s está compilado para APCS-%d"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "ERROR: %s está compilado para EABI versión %d, mientras que %s está compilado para la versión %d"
 
-#: elf32-arm.h:2287
+#: elf32-arm.h:2285
 #, c-format
-msgid ""
-"Error: %s passes floats in FP registers, whereas %s passes them in integer "
-"registers"
-msgstr ""
-"Error: %s pasa números de coma flotante en registros FP, mientras que %s los "
-"pasa en registros enteros"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "ERROR: %s está compilado para APCS-%d mientras que el objetivo %s usa APCS-%d"
 
-#: elf32-arm.h:2292
+#: elf32-arm.h:2313
 #, c-format
-msgid ""
-"Error: %s passes floats in integer registers, whereas %s passes them in FP "
-"registers"
-msgstr ""
-"Error: %s pasa números de coma flotante en registros enteros, mientras que %"
-"s los pasa en registros FP"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "ERROR: %s utiliza instrucciones VFP, mientras que %s utiliza instrucciones FPA"
 
-#: elf32-arm.h:2303
-#, fuzzy, c-format
-msgid "Error: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr ""
-"Error: %s utiliza instrucciones VFP, mientras que %s utiliza instrucciones "
-"FPA"
-
-#: elf32-arm.h:2308
-#, fuzzy, c-format
-msgid "Error: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr ""
-"Error: %s utiliza instrucciones FPA, mientras que %s utiliza instrucciones "
-"VFP"
-
-#: elf32-arm.h:2328
+#: elf32-arm.h:2318
 #, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr ""
-"Error: %s utiliza FP de software, mientras que %s utiliza FP de hardware"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "ERROR: %s utiliza instrucciones FPA, mientras que %s utiliza instrucciones VFP"
 
-#: elf32-arm.h:2333
+#: elf32-arm.h:2338
 #, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr ""
-"Error: %s utiliza FP de hardware, mientras que %s utiliza FP de software"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "ERROR: %s utiliza FP de software, mientras que %s utiliza FP de hardware"
 
-#: elf32-arm.h:2348
+#: elf32-arm.h:2343
 #, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr ""
-"Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr ""
-"Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %"
-"s sí"
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "ERROR: %s utiliza FP de hardware, mientras que %s utiliza FP de software"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3242
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
 #, c-format
 msgid "private flags = %lx:"
 msgstr "opciones privadas = %lx:"
 
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
 msgid " [interworking enabled]"
 msgstr " [interoperabilidad activada]"
 
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
 msgid " [VFP float format]"
 msgstr " [formato de coma flotante VFP]"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
 msgid " [FPA float format]"
 msgstr " [formato de coma flotante FPA]"
 
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
 msgid " [new ABI]"
 msgstr " [ABI nuevo]"
 
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
 msgid " [old ABI]"
 msgstr " [ABI antiguo]"
 
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
 msgid " [software FP]"
 msgstr " [FP por software]"
 
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
 msgid " [Version1 EABI]"
 msgstr " [EABI Version1]"
 
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
 msgid " [sorted symbol table]"
 msgstr " [tabla de símbolos ordenados]"
 
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
 msgid " [unsorted symbol table]"
 msgstr " [tabla de símbolos sin ordenar]"
 
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
 msgid " [Version2 EABI]"
 msgstr " [EABI Version2]"
 
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
 msgid " [dynamic symbols use segment index]"
 msgstr " [los símbolos dinámicos utilizan índices de segmento]"
 
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
 msgid " [mapping symbols precede others]"
 msgstr " [el mapeo de símbolos precede a otros]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
 msgid " <EABI version unrecognised>"
 msgstr " <versión de EABI no reconocida>"
 
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
 msgid " [relocatable executable]"
 msgstr " [ejecutable reubicable]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
 msgid " [has entry point]"
 msgstr " [tiene punto de entrada]"
 
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
 msgid "<Unrecognised flag bits set>"
 msgstr "<Conjunto de bits de opción no reconocidos>"
 
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
 msgid "internal error: dangerous relocation"
 msgstr "error interno: reubicación peligrosa"
 
 #: elf32-cris.c:949
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: reubicación %s sin resolución contra el símbolo `%s' de la sección %s"
+msgstr "%s: reubicación %s sin resolución contra el símbolo `%s' de la sección %s"
 
 #: elf32-cris.c:1012
 #, c-format
-msgid ""
-"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s' de la "
-"sección %s"
+msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+msgstr "%s: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s' de la sección %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
 msgid "[whose name is lost]"
 msgstr "[cuyo nombre se pierde]"
 
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
 #, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against local symbol from %s "
-"section"
-msgstr ""
-"%s: reubicación %s con adición %d que no es cero contra un símbolo local de "
-"la sección %s"
+msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
+msgstr "%s: reubicación %s con adición %d que no es cero contra un símbolo local de la sección %s"
 
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
 #, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr ""
-"%s: reubicación %s con adición %d que no es cero contra el símbolo `%s' de "
-"la sección %s"
+msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+msgstr "%s: reubicación %s con adición %d que no es cero contra el símbolo `%s' de la sección %s"
 
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
 #, c-format
-msgid ""
-"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr ""
-"%s: no se permite la reubicación %s para el símbolo global: `%s' de la "
-"sección %s"
+msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+msgstr "%s: no se permite la reubicación %s para el símbolo global: `%s' de la sección %s"
 
-#: elf32-cris.c:1171
-#, fuzzy, c-format
+#: elf32-cris.c:1170
+#, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: reubicaciones en la sección `%s', pero no tiene contenidos"
+msgstr "%s: la reubicación %s en la sección %s sin GOT creado"
 
-#: elf32-cris.c:1289
+#: elf32-cris.c:1288
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr ""
-"%s: Inconsistencia interna; no se encuentra la sección de reubicación %s"
+msgstr "%s: Inconsistencia interna; no se encuentra la sección de reubicación %s"
 
-#: elf32-cris.c:2523
+#: elf32-cris.c:2514
 #, c-format
 msgid ""
 "%s, section %s:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 "%s, sección %s:\n"
-"  no se debe usar la reubicación %s en un objeto compartido; recompile con -"
-"fPIC"
+"  no se debe usar la reubicación %s en un objeto compartido; recompile con -fPIC"
 
-#: elf32-cris.c:2994
+#: elf32-cris.c:2991
 msgid " [symbols have a _ prefix]"
 msgstr " [los símbolos tiene un prefijo _]"
 
-#: elf32-cris.c:3033
+#: elf32-cris.c:3030
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr ""
-"%s: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin "
-"prefijo"
+msgstr "%s: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin prefijo"
 
-#: elf32-cris.c:3034
+#: elf32-cris.c:3031
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr ""
-"%s: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con "
-"prefijo _"
+msgstr "%s: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con prefijo _"
+
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: compilado con %s y enlazado con módulos que usan reubicaciones que no son pic"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: compilado con %s y enlazado con módulos compilados con %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: usa campos e_flags desconocidos (0x%lx) diferentes a aquéllos de los módulos previos (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "opciones privadas = 0x%lx:"
 
 #: elf32-gen.c:82 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: Reubicaciones en ELF genérico (EM: %d)"
 
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: no se puede crear la entrada de cabo %s"
 
-#: elf32-hppa.c:937 elf32-hppa.c:3545
+#: elf32-hppa.c:956 elf32-hppa.c:3555
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
-msgstr ""
-"%s(%s+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections"
+msgstr "%s(%s+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections"
 
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
 #, c-format
-msgid ""
-"%s: relocation %s can not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: no se puede usar la reubicación %s cuando se hace un objeto compartido; "
-"recompile con -fPIC"
+msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
 
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
 #, c-format
-msgid ""
-"%s: relocation %s should not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: no se debe usar la reubicación %s cuando se hace un objeto compartido; "
-"recompile con -fPIC"
+msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: no se debe usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
 
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "No se puede encontrar la sección de reubicación para %s"
 
-#: elf32-hppa.c:2867
+#: elf32-hppa.c:2855
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: cabo de exportación %s duplicado"
 
-#: elf32-hppa.c:3429
+#: elf32-hppa.c:3433
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): componiendo %s"
 
-#: elf32-hppa.c:4069
+#: elf32-hppa.c:4080
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): no se puede manejar %s para %s"
 
-#: elf32-hppa.c:4408
+#: elf32-hppa.c:4393
 msgid ".got section not immediately after .plt section"
 msgstr "la sección .got no está inmediatamente después de la sección .plt"
 
-#: elf32-i386.c:298
+#: elf32-i386.c:379
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: tipo de reubicación %d inválido"
 
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: índice de símbolos erróneo: %d"
 
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: se accesó `%s' como un símbolo normal y un símbolo local de hilo"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: nombre de sección de reubicación `%s' erróneo"
 
-#: elf32-i386.c:2069 elf32-s390.c:1951 elf64-ppc.c:4124 elf64-s390.c:1955
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: el código de ejecución local TLS no se puede enlazar en objetos compartidos"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): reubicación sin resolución contra el símbolo `%s'"
 
-#: elf32-i386.c:2107 elf32-s390.c:1989 elf64-s390.c:1993
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): reubicación contra `%s': error %d"
 
-#: elf32-m32r.c:923
+#: elf32-m32r.c:924
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "reubicación SDA cuando _SDA_BASE_ no está definido"
 
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: tipo de reubicación %d desconocido"
 
-#: elf32-m32r.c:1223
+#: elf32-m32r.c:1221
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr ""
-"%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)"
+msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)"
 
-#: elf32-m32r.c:2000
+#: elf32-m32r.c:1947
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: Conjunto de instrucciones no coincidente con módulos previos"
 
-#: elf32-m32r.c:2023
+#: elf32-m32r.c:1970
 #, c-format
 msgid "private flags = %lx"
 msgstr "opciones privadas = %lx"
 
-#: elf32-m32r.c:2028
+#: elf32-m32r.c:1975
 msgid ": m32r instructions"
 msgstr ": instrucciones m32r"
 
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1976
 msgid ": m32rx instructions"
 msgstr ": instrucciones m32rx"
 
@@ -1143,261 +1027,177 @@
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: La reubicación %s (%d) actualmente no tiene soporte.\n"
 
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: Tipo de reubicación %d desconocido\n"
 
-#: elf32-mips.c:2156 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "la reubicación gp relativa de 32bits sucede para un símbolo externo"
 
-#: elf32-mips.c:2305
+#: elf32-mips.c:1301
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Enlazar objetos mips16 en el formato %s no tiene soporte"
 
-#: elf32-mips.c:3129
+#: elf32-ppc.c:1460
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: enlazando ficheros PIC con ficheros que no son PIC"
+msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%s: compilado con -mrelocatable y enlazado con módulos compilados de forma normal"
 
-#: elf32-mips.c:3139
+#: elf32-ppc.c:1468
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr ""
-"%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas "
-"abi"
+msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%s: compilado de forma normal y enlazado con módulos compilados con -mrelocatable"
 
-#: elf32-mips.c:3168
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
-
-#: elf32-mips.c:3177
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
-
-#: elf32-mips.c:3200
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: no coincide el ABI: enlazando el módulo %s con módulos %s previos"
-
-#: elf32-mips.c:3214 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
 #, c-format
 msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr ""
-"%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
+msgstr "%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
 
-#: elf32-mips.c:3245
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3249
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3251
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3253
-msgid " [abi unknown]"
-msgstr " [abi desconocido]"
-
-#: elf32-mips.c:3255
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3257
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3259
-msgid " [no abi set]"
-msgstr " [no hay conjunto abi]"
-
-#: elf32-mips.c:3262
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3264
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3266
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3268
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3270
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3272
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3274
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3276
-msgid " [unknown ISA]"
-msgstr " [ISA desconocido]"
-
-#: elf32-mips.c:3279
-msgid " [32bitmode]"
-msgstr " [modo 32bit]"
-
-#: elf32-mips.c:3281
-msgid " [not 32bitmode]"
-msgstr " [no es modo 32bit]"
-
-#: elf32-mips.c:4954
-msgid "static procedure (no name)"
-msgstr "procedimiento estático (sin nombre)"
-
-#: elf32-mips.c:5572 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: nombre de sección `%s' ilegal"
-
-#: elf32-mips.c:6139 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "no hay suficiente espacio GOT para entradas GOT locales"
-
-#: elf32-mips.c:7250 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: salto a una rutina cabo la cual no es jal"
-
-#: elf32-mips.c:8259 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Se detectó una reubicación malformada para la sección %s"
-
-#: elf32-mips.c:8337 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: la reubicación CALL16 en 0x%lx no es contra un símbolo global"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
-#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr ""
-"%s: compilado con -mrelocatable y enlazado con módulos compilados de forma "
-"normal"
-
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
-#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr ""
-"%s: compilado de forma normal y enlazado con módulos compilados con -"
-"mrelocatable"
-
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1592
 #, c-format
 msgid "%s: Unknown special linker type %d"
 msgstr "%s: Tipo de enlazador especial %d desconocido"
 
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr ""
-"%s: no se puede usar la reubicación %s cuando se hace un objeto compartido"
+msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido"
 
-#: elf32-ppc.c:3097 elf64-ppc.c:3716
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: tipo de reubicación %d desconocido para el símbolo %s"
 
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
 #, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr ""
-"%s: El objetivo (%s) de una reubicación %s está en la sección de salida "
-"errónea (%s)"
+msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección de salida errónea (%s)"
 
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
 #, c-format
 msgid "%s: Relocation %s is not yet supported for symbol %s."
 msgstr "%s: La reubicación %s aún no tiene soporte para el símbolo %s."
 
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: aviso: desplazamiento R_SH_USES erróneo"
 
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: aviso: R_SH_USES señala al insn 0x%x no reconocido"
 
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: aviso: desplazamiento de carga R_SH_USES erróneo"
 
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación esperada"
 
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: aviso: símbolo en una sección inesperada"
 
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación COUNT esperada"
 
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: aviso: cuenta errónea"
 
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: fatal: desbordamiento de reubicación durante la relajación"
 
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "No se maneja un STO_SH5_ISA32 inesperado en un símbolo local"
+
+#: elf32-sh.c:4284
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr ""
-"%s: 0x%lx: fatal: objetivo de ramificación sin alineación para la "
-"reubicación de soporte de relajamiento"
+msgstr "%s: 0x%lx: fatal: objetivo de ramificación sin alineación para la reubicación de soporte de relajamiento"
 
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: compilado como un objeto de 32-bit y %s es de 64-bit"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: compilado como un objeto de 64-bit y %s es de 32-bit"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: el tamaño del objeto no coincide con el tamaño del objetivo %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: se encontró un símbolo datalabel en la entrada"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "No coincide PTB: una dirección SHmedia (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "No coincide PTA: una dirección SHcompact (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: error de GAS: instrucción PTB inesperada con R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: error: tipo de reubicación %d sin alinear en %08x reubicación %08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: no se pueden escribir las entradas .cranges agregadas"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: no se pueden escribir las entradas .cranges ordenadas"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: ¿Compilado probablemente sin -fPIC?"
 
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: compilado para un sistema de 64 bit y el objetivo es de 32 bit"
 
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr "%s: enlazando ficheros little endian con ficheros big endian"
@@ -1409,35 +1209,23 @@
 
 #: elf32-v850.c:685
 #, c-format
-msgid ""
-"Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr ""
-"La variable `%s' solamente puede estar en una de las regiones de datos "
-"small, cero, y tiny"
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "La variable `%s' solamente puede estar en una de las regiones de datos small, cero, y tiny"
 
 #: elf32-v850.c:688
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"small y cero"
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y cero"
 
 #: elf32-v850.c:691
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"small y tiny"
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y tiny"
 
 #: elf32-v850.c:694
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"cero y tiny"
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos cero y tiny"
 
 #: elf32-v850.c:1072
 msgid "FAILED to find previous HI16 reloc\n"
@@ -1455,244 +1243,494 @@
 msgid "could not locate special linker symbol __ctbp"
 msgstr "no se puede localizar el símbolo especial del enlazador __ctbp"
 
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: No coincide la arquitectura con los módulos previos"
 
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
 #, c-format
 msgid "private flags = %lx: "
 msgstr "opciones privadas = %lx: "
 
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
 msgid "v850 architecture"
 msgstr "arquitectura v850"
 
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
 msgid "v850e architecture"
 msgstr "arquitectura v850e"
 
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
 msgid "v850ea architecture"
 msgstr "arquitectura v850ea"
 
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [no pic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [flotante-d]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [flotante-g]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: aviso: la adición GOT de %ld a `%s' no coincide con la adición previa GOT de %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: aviso: se ignora la adición PLT de %d a `%s' de la sección %s"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación %s contra el símbolo `%s' de la sección %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: aviso: reubicación %s a 0x%x de la sección %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
 msgid "non-zero addend in @fptr reloc"
 msgstr "adición que no es cero en la reubicación @fptr"
 
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1097
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "la reubicación GPDISP no encontró las instrucciones ldah y lda"
 
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: el subsegmento .got excede los 64K (tamaño %d)"
 
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: reubicación gp relativa contra el símbolo dinámico %s"
 
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa al pc contra el símbolo dinámico %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: cambio en gp: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<desconocido>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: reubicación !samegp contra un símbolo sin .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: reubicación dinámica sin manejar contra %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa a dtp contra el símbolo dinámico %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa a tp contra el símbolo dinámico %s"
+
+#: elf64-hppa.c:2080
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
-msgstr ""
-"la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld"
+msgstr "la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld"
 
-#: elf64-mmix.c:1271
-#, fuzzy, c-format
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: Error de inconsistencia interna para el valor para\n"
+" un registro global colocado por el enlazador: enlazado: 0x%lx%08lx != relajado: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: (desconocido) en %s"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: %s en %s"
+
+#: elf64-mmix.c:1435
+#, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr ""
-"%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
+msgstr "%s: reubicación de registro contra un símbolo que no es registro: (desconocido) en %s"
 
-#: elf64-mmix.c:1276
+#: elf64-mmix.c:1440
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
-msgstr ""
-"%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
+msgstr "%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
 
-#: elf64-mmix.c:1312
+#: elf64-mmix.c:1477
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr ""
-"%s: la directiva LOCAL sólo es válida con un registro o un valor absoluto"
+msgstr "%s: la directiva LOCAL sólo es válida con un registro o un valor absoluto"
 
-#: elf64-mmix.c:1340
+#: elf64-mmix.c:1505
 #, c-format
-msgid ""
-"%s: LOCAL directive: Register $%ld is not a local register.  First global "
-"register is $%ld."
-msgstr ""
-"%s: directiva LOCAL: El registro $%ld no es un registro local.  El primer "
-"registro global es $%ld."
+msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
+msgstr "%s: directiva LOCAL: El registro $%ld no es un registro local.  El primer registro global es $%ld."
 
-#: elf64-mmix.c:1615
+#: elf64-mmix.c:1965
 #, c-format
-msgid ""
-"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
-"linked file\n"
-msgstr ""
-"%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un "
-"fichero enlazado con anterioridad\n"
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un fichero enlazado con anterioridad\n"
 
-#: elf64-mmix.c:1674
+#: elf64-mmix.c:2024
 msgid "Register section has contents\n"
 msgstr "La sección de registros no tiene contenido\n"
 
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Inconsistencia interna: %u restante != %u máximo.\n"
+"  Por favor reporte este bicho."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
-msgstr ""
-"%s: compilado para un sistema big endian y el objetivo es little endian"
+msgstr "%s: compilado para un sistema big endian y el objetivo es little endian"
 
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
-msgstr ""
-"%s: compilado para un sistema little endian y el objetivo es big endian"
+msgstr "%s: compilado para un sistema little endian y el objetivo es big endian"
 
-#: elf64-ppc.c:3350
-#, fuzzy, c-format
+#: elf64-ppc.c:3610
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: tipo de reubicación %u inesperado en la sección .opd"
+
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd no es una matriz regular de entradas opd"
+
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: símbolo `%s' indefinido en la sección .opd"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "no se puede encontrar la ramificación de cabo `%s'"
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
 msgid "linkage table error against `%s'"
-msgstr "desbordamiento de la tabla de enlazado contra `%s'"
+msgstr "error de la tabla de enlazado contra `%s'"
 
-#: elf64-ppc.c:3432
-msgid "stub section size doesn't match calculated size"
-msgstr "el tamaño de la sección de cabos no coincide con el tamaño calculado"
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "no se puede construir la ramificación de cabos `%s'"
 
-#: elf64-ppc.c:4061
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "los cabos no coinciden con el tamaño calculado"
+
+#: elf64-ppc.c:5828
 #, c-format
 msgid "%s: Relocation %s is not supported for symbol %s."
 msgstr "%s: La reubicación %s no tiene soporte para el símbolo %s."
 
-#: elf64-ppc.c:4105
+#: elf64-ppc.c:5872
 #, c-format
 msgid "%s: error: relocation %s not a multiple of 4"
 msgstr "%s: error: la reubicación %s no es un múltiplo de 4"
 
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: tipo de reubicación %d sin manejar"
 
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr ""
-"%s: Solamente los registros %%g[2367] pueden ser declarados utilizando "
-"STT_REGISTER"
+msgstr "%s: Solamente los registros %%g[2367] pueden ser declarados utilizando STT_REGISTER"
 
-#: elf64-sparc.c:1334
-#, fuzzy, c-format
+#: elf64-sparc.c:1337
+#, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "El registro %%g%d se usó de forma incompatible: %s en %s"
+msgstr "El registro %%g%d se usó de forma incompatible: %s en %s, previamente %s en %s"
 
-#: elf64-sparc.c:1357
-#, fuzzy, c-format
+#: elf64-sparc.c:1360
+#, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr ""
-"El símbolo `%s' tiene tipos divergentes: previamente %s, REGISTER en %s"
+msgstr "El símbolo `%s' tiene tipos divergentes: REGISTER en %s, previamente %s en %s"
 
-#: elf64-sparc.c:1404
-#, fuzzy, c-format
+#: elf64-sparc.c:1406
+#, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
-msgstr ""
-"El símbolo `%s' tiene tipos divergentes: previamente %s, REGISTER en %s"
+msgstr "El símbolo `%s' tiene tipos divergentes: %s en %s, previamente REGISTER en %s"
 
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:2970
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
-msgstr ""
-"%s: enlazando código específico de UltraSPARC con código específico de HAL"
+msgstr "%s: enlazando código específico de UltraSPARC con código específico de HAL"
 
-#: elfcode.h:1218
+#: elfcode.h:1198
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
-msgstr ""
-"%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)"
+msgstr "%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)"
 
-#: elflink.c:434
+#: elflink.c:440
 #, c-format
 msgid "%s: Section %s is too large to add hole of %ld bytes"
 msgstr "%s: La sección %s es muy grande para agregar un agujero de %ld bytes"
 
-#: elflink.h:1113
+#: elflink.h:1090
 #, c-format
 msgid "%s: warning: unexpected redefinition of `%s'"
 msgstr "%s: aviso: redefinición inesperada de `%s'"
 
-#: elflink.h:1784
+#: elflink.h:1727
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: versión %u inválida (máximo %d)"
 
-#: elflink.h:1825
+#: elflink.h:1768
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: versión requerida %d inválida"
 
-#: elflink.h:1945
+#: elflink.h:1890
 #, c-format
 msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
 msgstr "Aviso: el tamaño del símbolo `%s' cambió de %lu a %lu en %s"
 
-#: elflink.h:4014
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: no se permite la sección .preinit_array en DSO"
+
+#: elflink.h:4030
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
 msgstr "aviso: el tipo y tamaño del símbolo dinámico `%s' no están definidos"
 
-#: elflink.h:4320
+#: elflink.h:4345
 #, c-format
 msgid "%s: undefined versioned symbol name %s"
 msgstr "%s: nombre de símbolo con versión %s sin definir"
 
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
 msgid "Error: out of memory"
 msgstr "Error: memoria agotada"
 
-#: elflink.h:4714
+#: elflink.h:4781
 msgid "Not enough memory to sort relocations"
 msgstr "No hay suficiente memoria para ordenar las reubicaciones"
 
-#: elflink.h:5980
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: no se puede encontrar la sección de salida %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "aviso: la sección %s es de tamaño cero"
+
+#: elflink.h:6275
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
-msgstr ""
-"%s: no se puede encontrar la sección de salida %s para la sección de entrada "
-"%s"
+msgstr "%s: no se puede encontrar la sección de salida %s para la sección de entrada %s"
 
-#: elflink.h:6553
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: tamaño de reubicación no coincidente en %s sección %s"
+
+#: elflink.h:6849
 msgid "warning: relocation against removed section; zeroing"
 msgstr "aviso: reubicación contra una sección eliminada; cambiando a ceros"
 
-#: elflink.h:6583
+#: elflink.h:6879
 msgid "warning: relocation against removed section"
 msgstr "aviso: reubicación contra una sección eliminada"
 
-#: elflink.h:6596
+#: elflink.h:6892
 #, c-format
 msgid "local symbols in discarded section %s"
 msgstr "símbolos locales en la sección descartada %s"
 
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "procedimiento estático (sin nombre)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "no hay suficiente espacio GOT para entradas GOT locales"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: salto a una rutina cabo la cual no es jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: Se detectó una reubicación malformada para la sección %s"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: la reubicación CALL16 en 0x%lx no es contra un símbolo global"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: nombre de sección `%s' ilegal"
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: enlazando ficheros PIC con ficheros que no son PIC"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas abi"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: no coincide el ABI: enlazando el módulo %s con módulos %s previos"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [abi desconocido]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [no hay conjunto abi]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [ISA desconocido]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [modo 32bit]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [no es modo 32bit]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "El fichero de salida requiere la biblioteca compartida `%s'\n"
 
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "El fichero de salida requiere la biblioteca compartida `%s.so.%s'\n"
 
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "El símbolo %s no está definido para composturas\n"
 
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
 msgid "Warning: fixup count mismatch\n"
 msgstr "Aviso: no coincide la cuenta de composturas\n"
 
@@ -1707,7 +1745,7 @@
 msgstr "%s: símbolo `%s' no reconocido opciones 0x%x"
 
 #: ieee.c:877
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: grabación ATI %u sin implementar para el símbolo %u"
 
@@ -1726,61 +1764,50 @@
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: carácter `%s' inesperado en el fichero Hexadecimal de Intel\n"
 
-#: ihex.c:368
+#: ihex.c:366
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr ""
-"%s:%u: suma de comprobación errónea en el fichero Hexadecimal de Intel (se "
-"esperaba %u, se obtuvo %u)"
+msgstr "%s:%u: suma de comprobación errónea en el fichero Hexadecimal de Intel (se esperaba %u, se obtuvo %u)"
 
-#: ihex.c:422
+#: ihex.c:420
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de registro de dirección extendida errónea en el fichero "
-"Hexadecimal de Intel"
+msgstr "%s:%u: longitud de registro de dirección extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:439
+#: ihex.c:437
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de dirección de inicio extendida errónea en el fichero "
-"Hexadecimal de Intel"
+msgstr "%s:%u: longitud de dirección de inicio extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:456
+#: ihex.c:454
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de registro de dirección lineal extendida errónea en el "
-"fichero Hexadecimal de Intel"
+msgstr "%s:%u: longitud de registro de dirección lineal extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:473
+#: ihex.c:471
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de dirección de inicio lineal extendida errónea en el "
-"fichero Hexadecimal de Intel"
+msgstr "%s:%u: longitud de dirección de inicio lineal extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:490
+#: ihex.c:488
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: tipo ihex %u no reconocido en el fichero Hexadecimal de Intel\n"
 
-#: ihex.c:610
+#: ihex.c:607
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: error interno en ihex_read_section"
 
-#: ihex.c:645
+#: ihex.c:642
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: longitud de sección errónea en ihex_read_section"
 
-#: ihex.c:863
-#, fuzzy, c-format
+#: ihex.c:860
+#, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
-msgstr ""
-"%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel"
+msgstr "%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel"
 
 #: libbfd.c:492
 #, c-format
@@ -1791,27 +1818,27 @@
 msgid "not mapping: env var not set\n"
 msgstr "no se mapea: no se estableció la variable de ambiente\n"
 
-#: libbfd.c:1467
-#, fuzzy, c-format
+#: libbfd.c:1466
+#, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
-msgstr " en %s línea %d en %s\n"
+msgstr "Se llamó a %s que está deprecado en %s línea %d en %s\n"
 
-#: libbfd.c:1470
-#, fuzzy, c-format
+#: libbfd.c:1469
+#, c-format
 msgid "Deprecated %s called\n"
-msgstr "Se llamó a %s que está deprecado"
+msgstr "Se llamó a %s que está deprecado\n"
 
-#: linker.c:1849
+#: linker.c:1873
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: el símbolo indirecto `%s' para `%s' es un ciclo"
 
-#: linker.c:2745
+#: linker.c:2776
 #, c-format
 msgid "Attempt to do relocateable link with %s input and %s output"
 msgstr "Se intentó hacer un enlace reubicable con entrada %s y salida %s"
 
-#: merge.c:897
+#: merge.c:892
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: acceso más allá del final de la sección mezclada (%ld + %ld)"
@@ -1821,178 +1848,127 @@
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: No hay core para asignar el nombre de sección %s\n"
 
-#: mmo.c:537
+#: mmo.c:536
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: No hay core para asignar un símbolo de %d bytes de longitud\n"
 
-#: mmo.c:1190
+#: mmo.c:1245
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
-msgstr ""
-"%s: fichero mmo inválido: el valor de iniciación para $255 no es `Main'\n"
+msgstr "%s: fichero mmo inválido: el valor de iniciación para $255 no es `Main'\n"
 
-#: mmo.c:1336
+#: mmo.c:1391
 #, c-format
-msgid ""
-"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
-"starting with `%s'\n"
-msgstr ""
-"%s: secuencia de caracteres anchos 0x%02X 0x%02X sin soporte después del "
-"nombre de símbolo que inicia con `%s'\n"
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: secuencia de caracteres anchos 0x%02X 0x%02X sin soporte después del nombre de símbolo que inicia con `%s'\n"
 
-#: mmo.c:1571
+#: mmo.c:1633
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: fichero mmo inválido: código de operación-l `%d' sin soporte\n"
 
-#: mmo.c:1581
+#: mmo.c:1643
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba YZ = 1 se obtuvo YZ = %d para "
-"lop_quote\n"
+msgstr "%s: fichero mmo inválido: se esperaba YZ = 1 se obtuvo YZ = %d para lop_quote\n"
 
-#: mmo.c:1617
+#: mmo.c:1679
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para "
-"lop_loc\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_loc\n"
 
-#: mmo.c:1663
+#: mmo.c:1725
 #, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para "
-"lop_fixo\n"
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_fixo\n"
 
-#: mmo.c:1702
+#: mmo.c:1764
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba y = 0, se obtuvo y = %d para "
-"lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: se esperaba y = 0, se obtuvo y = %d para lop_fixrx\n"
 
-#: mmo.c:1711
+#: mmo.c:1773
 #, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 16 ó z = 24, se obtuvo z = %d para "
-"lop_fixrx\n"
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 16 ó z = 24, se obtuvo z = %d para lop_fixrx\n"
 
-#: mmo.c:1734
+#: mmo.c:1796
 #, c-format
-msgid ""
-"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
-"for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 "
-"ó 1, se obtuvo %d para lop_fixrx\n"
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 ó 1, se obtuvo %d para lop_fixrx\n"
 
-#: mmo.c:1757
+#: mmo.c:1819
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
-msgstr ""
-"%s: no se puede asignar el nombre de fichero para el número de fichero %d, %"
-"d bytes\n"
+msgstr "%s: no se puede asignar el nombre de fichero para el número de fichero %d, %d bytes\n"
 
-#: mmo.c:1777
+#: mmo.c:1839
 #, c-format
-msgid ""
-"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr ""
-"%s: fichero mmo inválido: el número de fichero %d `%s' ya se había "
-"introducido como `%s'\n"
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: fichero mmo inválido: el número de fichero %d `%s' ya se había introducido como `%s'\n"
 
-#: mmo.c:1790
+#: mmo.c:1852
 #, c-format
-msgid ""
-"%s: invalid mmo file: file name for number %d was not specified before use\n"
-msgstr ""
-"%s: fichero mmo inválido: no se especificó un nombre de fichero para el "
-"número %d antes de utilizarse\n"
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: fichero mmo inválido: no se especificó un nombre de fichero para el número %d antes de utilizarse\n"
 
-#: mmo.c:1896
+#: mmo.c:1958
 #, c-format
-msgid ""
-"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
-msgstr ""
-"%s: fichero mmo inválido: los campos y y z de lop_stab no son cero, y: %d, "
-"z: %d\n"
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: fichero mmo inválido: los campos y y z de lop_stab no son cero, y: %d, z: %d\n"
 
-#: mmo.c:1932
+#: mmo.c:1994
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
-msgstr ""
-"%s: fichero mmo inválido: lop_end no es el último elemento en el fichero\n"
+msgstr "%s: fichero mmo inválido: lop_end no es el último elemento en el fichero\n"
 
-#: mmo.c:1945
+#: mmo.c:2007
 #, c-format
-msgid ""
-"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
-"to the preceding lop_stab (%ld)\n"
-msgstr ""
-"%s: fichero mmo inválido: YZ de lop_end (%ld) no es igual al número de "
-"tetras del lop_stab precedente (%ld)\n"
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: fichero mmo inválido: YZ de lop_end (%ld) no es igual al número de tetras del lop_stab precedente (%ld)\n"
 
-#: mmo.c:2610
+#: mmo.c:2670
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: tabla de símbolos inválida: símbolo `%s' duplicado\n"
 
-#: mmo.c:2898
+#: mmo.c:2921
 #, c-format
-msgid ""
-"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
-"s\n"
-msgstr ""
-"%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de "
-"la dirección de inicio %s\n"
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de la dirección de inicio %s\n"
 
-#: mmo.c:2932
+#: mmo.c:3011
 #, c-format
-msgid ""
-"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
-"%d.  Only `Main' will be emitted.\n"
-msgstr ""
-"%s: aviso: la tabla de símbolos es demasiado grande para mmo, es más grande "
-"que 65535 words de 32-bit: %d. Sólo se emitirá `Main'.\n"
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgstr "%s: aviso: la tabla de símbolos es demasiado grande para mmo, es más grande que 65535 words de 32-bit: %d. Sólo se emitirá `Main'.\n"
 
-#: mmo.c:2977
+#: mmo.c:3056
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
-msgstr ""
-"%s: error interno, la tabla de símbolos cambió de tamaño de %d a %d words\n"
+msgstr "%s: error interno, la tabla de símbolos cambió de tamaño de %d a %d words\n"
 
-#: mmo.c:3032
+#: mmo.c:3111
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
-msgstr ""
-"%s: error interno, la sección interna de registros %s tiene contenido\n"
+msgstr "%s: error interno, la sección interna de registros %s tiene contenido\n"
 
-#: mmo.c:3084
+#: mmo.c:3163
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: no hay registros iniciados; longitud de sección 0\n"
 
-#: mmo.c:3090
+#: mmo.c:3169
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: demasiados registros iniciados: longitud de sección %ld\n"
 
-#: mmo.c:3095
+#: mmo.c:3174
 #, c-format
-msgid ""
-"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
-"08lx\n"
-msgstr ""
-"%s: dirección de inicio inválida para los registros iniciados de longitud %"
-"ld: 0x%lx%08lx\n"
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: dirección de inicio inválida para los registros iniciados de longitud %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1036
+#: oasys.c:1029
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: no se puede representar la sección `%s' en oasys"
@@ -2046,25 +2022,17 @@
 #: peicode.h:1162
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
-msgstr ""
-"%s: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de "
-"Importación de Bibliotecas"
+msgstr "%s: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de Importación de Bibliotecas"
 
 #: peicode.h:1174
 #, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
-msgstr ""
-"%s: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de "
-"Formato de Importación de Bibliotecas"
+msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+msgstr "%s: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de Formato de Importación de Bibliotecas"
 
 #: peicode.h:1191
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
-msgstr ""
-"%s: el tamaño del campo es cero en el encabezado del Formato de Importación "
-"de Bibliotecas"
+msgstr "%s: el tamaño del campo es cero en el encabezado del Formato de Importación de Bibliotecas"
 
 #: peicode.h:1219
 #, c-format
@@ -2123,7 +2091,7 @@
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Partición[%d] longitud = 0x%.8lx (%ld)\n"
 
-#: som.c:5402
+#: som.c:5398
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers sin implementar"
 
@@ -2132,7 +2100,12 @@
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: Caractér `%s' inesperado en el fichero S-record\n"
 
-#: syms.c:998
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): La entrada de cabos tiene una cadena índice inválida."
+
+#: syms.c:1044
 msgid "Unsupported .stab relocation"
 msgstr "Reubicación .stab sin soporte"
 
@@ -2151,7 +2124,7 @@
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "No coincide el tamaño de la sección %s=%lx, %s=%lx"
 
-#: vms-gsd.c:704
+#: vms-gsd.c:702
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "subtipo de gsd/egsd %d desconocido"
@@ -2192,24 +2165,24 @@
 msgstr "¡ No hay Memoria !"
 
 #: vms-tir.c:362
-#, fuzzy, c-format
+#, c-format
 msgid "bad section index in %s"
-msgstr "Índice de sección erróneo en ETIR_S_C_STA_PQ"
+msgstr "Índice de sección erróneo en %s"
 
 #: vms-tir.c:375
-#, fuzzy, c-format
+#, c-format
 msgid "unsupported STA cmd %s"
-msgstr "Orden STA %d sin soporte"
+msgstr "orden STA %s sin soporte"
 
 #: vms-tir.c:380 vms-tir.c:1240
-#, fuzzy, c-format
+#, c-format
 msgid "reserved STA cmd %d"
-msgstr "Orden STA %d reservada"
+msgstr "orden STA %d reservada"
 
 #: vms-tir.c:491 vms-tir.c:514
-#, fuzzy, c-format
+#, c-format
 msgid "%s: no symbol \"%s\""
-msgstr "%s: no hay tal símbolo"
+msgstr "%s: no existe el símbolo \"%s\""
 
 #. unsigned shift
 #. rotate
@@ -2217,41 +2190,39 @@
 #. Define a literal.
 #: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
 #: vms-tir.c:838 vms-tir.c:1563
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not supported"
-msgstr "no tiene soporte para"
+msgstr "%s: no tiene soporte"
 
 #: vms-tir.c:586 vms-tir.c:1418
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not implemented"
-msgstr "%s: %s sin implementar\n"
+msgstr "%s: sin implementar"
 
 #: vms-tir.c:590 vms-tir.c:1422
-#, fuzzy, c-format
+#, c-format
 msgid "reserved STO cmd %d"
-msgstr "Orden STO %d reservada"
+msgstr "orden STO %d reservada"
 
 #: vms-tir.c:708 vms-tir.c:1568
-#, fuzzy, c-format
+#, c-format
 msgid "reserved OPR cmd %d"
-msgstr "Orden OPR %d reservada"
+msgstr "orden OPR %d reservada"
 
 #: vms-tir.c:776 vms-tir.c:1632
-#, fuzzy, c-format
+#, c-format
 msgid "reserved CTL cmd %d"
-msgstr "Orden CTL %d reservada"
+msgstr "orden CTL %d reservada"
 
 #. stack byte from image
 #. arg: none.
 #: vms-tir.c:1148
-#, fuzzy
 msgid "stack-from-image not implemented"
-msgstr "Pila-desde-imagen sin implementar"
+msgstr "pila-desde-imagen sin implementar"
 
 #: vms-tir.c:1166
-#, fuzzy
 msgid "stack-entry-mask not fully implemented"
-msgstr "Pila-máscara-entrada no está completamente implementado"
+msgstr "pila-máscara-entrada no está completamente implementado"
 
 #. compare procedure argument
 #. arg: cs	symbol name
@@ -2265,31 +2236,27 @@
 msgstr "PASSMECH no está completamente implementado"
 
 #: vms-tir.c:1199
-#, fuzzy
 msgid "stack-local-symbol not fully implemented"
-msgstr "Pila-símbolo-local no está completamente implementado"
+msgstr "pila-símbolo-local no está completamente implementado"
 
 #: vms-tir.c:1212
-#, fuzzy
 msgid "stack-literal not fully implemented"
-msgstr "Pila-literal no está completamente implementado"
+msgstr "pila-literal no está completamente implementado"
 
 #: vms-tir.c:1233
-#, fuzzy
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr ""
-"Pila-símbolo-local-máscara-punto-entrada no está completamente implementado"
+msgstr "pila-símbolo-local-máscara-punto-entrada no está completamente implementado"
 
 #: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
 #: vms-tir.c:1619 vms-tir.c:1627
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not fully implemented"
-msgstr "PASSMECH no está completamente implementado"
+msgstr "%s: no está completamente implementado"
 
 #: vms-tir.c:1684
-#, fuzzy, c-format
+#, c-format
 msgid "obj code %d not found"
-msgstr "No se encontró el código objeto %d"
+msgstr "no se encontró el código objeto %d"
 
 #: vms-tir.c:2019
 #, c-format
@@ -2301,157 +2268,152 @@
 msgid "Unhandled relocation %s"
 msgstr "Reubicación %s sin manejar"
 
-#: xcofflink.c:1241
+#: xcofflink.c:1243
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: `%s' tiene números de línea pero no una sección contenedora"
 
-#: xcofflink.c:1294
+#: xcofflink.c:1296
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: clase %d símbolo `%s' no tiene entradas auxiliares"
 
-#: xcofflink.c:1317
+#: xcofflink.c:1319
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: el símbolo `%s' tiene un tipo csect %d no reconocido"
 
-#: xcofflink.c:1329
+#: xcofflink.c:1331
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: símbolo XTY_ER `%s' erróneo: clase %d scnum %d scnlen %d"
 
-#: xcofflink.c:1365
+#: xcofflink.c:1367
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: símbolo XMC_TCO `%s' es clase %d scnlen %d"
 
-#: xcofflink.c:1517
+#: xcofflink.c:1519
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect `%s' no está contenido en una sección"
 
-#: xcofflink.c:1624
+#: xcofflink.c:1626
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: XTY_LD `%s' mal ubicado"
 
-#: xcofflink.c:1948
+#: xcofflink.c:1957
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: la reubicación %s:%d no está en csect"
 
-#: xcofflink.c:2083
+#: xcofflink.c:2092
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: objeto compartido XCOFF cuando no se produce salida XCOFF"
 
-#: xcofflink.c:2104
+#: xcofflink.c:2113
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: objeto dinámico sin sección .loader"
 
-#: xcofflink.c:2749
+#: xcofflink.c:2758
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: no hay tal símbolo"
 
-#: xcofflink.c:2890
+#: xcofflink.c:2891
 msgid "error: undefined symbol __rtinit"
 msgstr "error: símbolo __rtinit indefinido"
 
-#: xcofflink.c:3458
+#: xcofflink.c:3453
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "aviso: intento de exportar el símbolo sin definir `%s'"
 
-#: xcofflink.c:4452
+#: xcofflink.c:4447
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr ""
-"Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar"
+msgstr "Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar"
 
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: reubicación del cargador en la sección `%s' no reconocida"
 
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
-msgstr ""
-"%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador"
+msgstr "%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador"
 
-#: xcofflink.c:5329
+#: xcofflink.c:5324
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: reubicación del cargador en la sección de sólo lectura %s"
 
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
 msgid "@pltoff reloc against local symbol"
 msgstr "reubicación @pltoff contra un símbolo local"
 
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: segmento de datos short desbordado (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp no cubre el segmento de datos short"
 
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: enlazando código que no es pic en una biblioteca compartida"
 
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: reubicación @gprel contra el símbolo dinámico %s"
 
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
 #, c-format
 msgid "%s: dynamic relocation against speculation fixup"
 msgstr "%s: reubicación dinámica contra una compostura de especulación"
 
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
 #, c-format
 msgid "%s: speculation fixup against undefined weak symbol"
 msgstr "%s: compostura de especulación contra un símbolo débil indefinido"
 
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
 msgid "unsupported reloc"
 msgstr "reubicación sin soporte"
 
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr ""
-"%s: enlazando deferencias-captura-en-NULL con ficheros que no son de captura"
+msgstr "%s: enlazando deferencias-captura-en-NULL con ficheros que no son de captura"
 
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr "%s: enlazando ficheros big endian con ficheros little endian"
 
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: enlazando ficheros de 64-bit con ficheros de 32-bit"
 
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
-msgstr ""
-"%s: enlazando ficheros de gp constante con ficheros con gp no constante"
+msgstr "%s: enlazando ficheros de gp constante con ficheros con gp no constante"
 
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
-msgstr ""
-"%s: enlazando ficheros de pic automático con ficheros sin pic automático"
+msgstr "%s: enlazando ficheros de pic automático con ficheros sin pic automático"
 
 #: peigen.c:962 pepigen.c:962
 #, c-format
@@ -2529,8 +2491,7 @@
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Hay una tabla de importación, pero la sección que la contiene no se puede "
-"encontrar\n"
+"Hay una tabla de importación, pero la sección que la contiene no se puede encontrar\n"
 
 #: peigen.c:1076 pepigen.c:1076
 #, c-format
@@ -2553,8 +2514,7 @@
 #: peigen.c:1116 pepigen.c:1116
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
-msgstr ""
-"\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n"
+msgstr "\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n"
 
 #: peigen.c:1122 pepigen.c:1122
 msgid ""
@@ -2571,17 +2531,17 @@
 "The Import Tables (interpreted %s section contents)\n"
 msgstr ""
 "\n"
-"Las Tablas de Importación (se interpretaron los contenidos de la sección %"
-"s)\n"
+"Las Tablas de Importación (se interpretaron los contenidos de la sección %s)\n"
 
 #: peigen.c:1130 pepigen.c:1130
-#, fuzzy
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
-msgstr "                 Tabla   Estampa   Cadena   Nombre    Thunk\n"
+msgstr ""
+" vma:            Pista   Fecha     Adelante DLL       Primero\n"
+"                 Tabla   Estampa   Cadena   Nombre    Thunk\n"
 
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1181 pepigen.c:1181
 #, c-format
 msgid ""
 "\n"
@@ -2590,33 +2550,27 @@
 "\n"
 "\tNombre de la DLL: %s\n"
 
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma:  Hint/Ord Member-Name\n"
-msgstr "\tvma:  Nombre de Miembro de Pista/Ord\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma:  Pista/Ord Nombre-Miembro Unido-A\n"
 
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
 msgstr ""
-"\tLa Tabla de Importación de Direcciones (se encontró una diferencia)\n"
+"\n"
+"Hay un thunk inicial, pero la sección que lo contiene no se puede encontrar\n"
 
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> ¡Se terminaron los miembros IAT!\n"
-
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tLa Tabla de Importación de Direcciones es idéntica\n"
-
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1357 pepigen.c:1357
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Hay una tabla de exportación, pero la sección que la contiene no se puede "
-"encontrar\n"
+"Hay una tabla de exportación, pero la sección que la contiene no se puede encontrar\n"
 
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1362 pepigen.c:1362
 #, c-format
 msgid ""
 "\n"
@@ -2625,7 +2579,7 @@
 "\n"
 "Hay una tabla de exportación en %s en 0x%lx\n"
 
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1393 pepigen.c:1393
 #, c-format
 msgid ""
 "\n"
@@ -2633,66 +2587,65 @@
 "\n"
 msgstr ""
 "\n"
-"Las Tablas de Exportación (se interpretaron los contenidos de la sección %"
-"s)\n"
+"Las Tablas de Exportación (se interpretaron los contenidos de la sección %s)\n"
 "\n"
 
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1397 pepigen.c:1397
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Opciones de Exportación \t\t\t%lx\n"
 
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1400 pepigen.c:1400
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "marca de Hora/Fecha \t\t%lx\n"
 
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1403 pepigen.c:1403
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Mayor/Menor \t\t\t%d/%d\n"
 
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1406 pepigen.c:1406
 msgid "Name \t\t\t\t"
 msgstr "Nombre \t\t\t\t"
 
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1412 pepigen.c:1412
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Base Ordinal \t\t\t%ld\n"
 
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1415 pepigen.c:1415
 msgid "Number in:\n"
 msgstr "Número en:\n"
 
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1418 pepigen.c:1418
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tTabla de Exportación de Direcciones \t\t%08lx\n"
 
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1422 pepigen.c:1422
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\tTabla [Nombre Apuntador/Ordinal]\t%08lx\n"
 
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1425 pepigen.c:1425
 msgid "Table Addresses\n"
 msgstr "Direcciones de la Tabla\n"
 
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1428 pepigen.c:1428
 msgid "\tExport Address Table \t\t"
 msgstr "\tTabla de Exportación de Direcciones \t\t"
 
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1433 pepigen.c:1433
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNombre de la Tabla de Apuntadores \t\t"
 
 # continuar aqui
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1438 pepigen.c:1438
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tTabla Ordinal \t\t\t"
 
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1453 pepigen.c:1453
 #, c-format
 msgid ""
 "\n"
@@ -2701,15 +2654,15 @@
 "\n"
 "Tabla de Exportación de Direcciones -- Base Ordinal %ld\n"
 
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1472 pepigen.c:1472
 msgid "Forwarder RVA"
 msgstr "RVA Adelantador"
 
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1483 pepigen.c:1483
 msgid "Export RVA"
 msgstr "RVA Exportador"
 
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1490 pepigen.c:1490
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2717,44 +2670,44 @@
 "\n"
 "Tabla [Apuntador a Ordinal/Nombre]\n"
 
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1545 pepigen.c:1545
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "Aviso, el tamaño de la sección .pdata (%ld) no es un múltiplo de %d\n"
 
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1549 pepigen.c:1549
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
 msgstr ""
 "\n"
-"La Tabla de Funciones (se interpretaron los contenidos de la sección ."
-"pdata)\n"
+"La Tabla de Funciones (se interpretaron los contenidos de la sección .pdata)\n"
 
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1552 pepigen.c:1552
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tDirección Inicio Dirección Fin    Información Desenvuelta\n"
 
-#: peigen.c:1540 pepigen.c:1540
-#, fuzzy
+#: peigen.c:1554 pepigen.c:1554
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
-msgstr " vma:\t\tInicio   Fin      EH       EH       FinPrólogo Excepción\n"
+msgstr ""
+" vma:\t\tInicio   Fin      EH       EH       FinPrólogo Excepción\n"
+"     \t\tDirecc   Direcc   Asa      Datos    Dirección  Máscara\n"
 
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1624 pepigen.c:1624
 msgid " Register save millicode"
 msgstr " Registro para guardar milicódigo"
 
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1627 pepigen.c:1627
 msgid " Register restore millicode"
 msgstr " Registro para restaurar milicódigo"
 
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1630 pepigen.c:1630
 msgid " Glue code sequence"
 msgstr " Secuencia de código pegamento"
 
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1682 pepigen.c:1682
 msgid ""
 "\n"
 "\n"
@@ -2762,20 +2715,18 @@
 msgstr ""
 "\n"
 "\n"
-"Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la "
-"sección .reloc)\n"
+"Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la sección .reloc)\n"
 
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1712 pepigen.c:1712
 #, c-format
 msgid ""
 "\n"
 "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
 msgstr ""
 "\n"
-"Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %"
-"ld\n"
+"Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %ld\n"
 
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1725 pepigen.c:1725
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\treubicación %4d desplazamiento %4x [%4lx] %s"
@@ -2783,7 +2734,7 @@
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1765 pepigen.c:1765
 #, c-format
 msgid ""
 "\n"
@@ -2792,43 +2743,49 @@
 "\n"
 "Características 0x%x\n"
 
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tLa Tabla de Importación de Direcciones (se encontró una diferencia)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> ¡Se terminaron los miembros IAT!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tLa Tabla de Importación de Direcciones es idéntica\n"
+
 #~ msgid "GP relative relocation when GP not defined"
 #~ msgstr "reubicación GP relativa cuando GP no estaba definido"
 
-#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
-#~ msgstr ""
-#~ "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %"
-#~ "s no."
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: ERROR: pasan números de coma flotante en registros de coma flotante mientras que el objetivo %s usa registros enteros"
 
-#~ msgid ""
-#~ "Warning: input file %s does not support interworking, whereas %s does."
-#~ msgstr ""
-#~ "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras "
-#~ "que %s sí."
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: ERROR: pasan números de coma flotante en registros enteros mientras que el objetivo %s usa registros de coma flotante"
+
+#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
+#~ msgstr "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no."
+
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %s sí."
 
 # FIXME: Revisar en el código si son abreviaturas comunes, o corresponden a
 # partes fijas dentro del programa. cfuga
 #~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
 #~ msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
 
-#~ msgid ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x"
-#~ "%.8lx%s\n"
-#~ msgstr ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, nombre = %s, núm sim = %d, opciones = "
-#~ "0x%.8lx%s\n"
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nombre = %s, núm sim = %d, opciones = 0x%.8lx%s\n"
 
-#~ msgid ""
-#~ "Warning: Not setting interwork flag of %s since it has already been "
-#~ "specified as non-interworking"
-#~ msgstr ""
-#~ "Aviso: No se activa la opción de interoperación de %s ya que ya había "
-#~ "sido especificada como no interoperable"
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "Aviso: No se activa la opción de interoperación de %s ya que ya había sido especificada como no interoperable"
 
 #~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
-#~ msgstr ""
-#~ "Aviso: Limpiando la opción de interoperación de %s debido a una petición "
-#~ "externa"
+#~ msgstr "Aviso: Limpiando la opción de interoperación de %s debido a una petición externa"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
 
 #~ msgid "(unknown)"
 #~ msgstr "(desconocido)"
@@ -2917,9 +2874,6 @@
 #~ msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
 #~ msgstr "      \t\tDirección Dirección Manejador Datos Dirección Máscara\n"
 
-#~ msgid "float"
-#~ msgstr "coma flotante"
-
 #~ msgid "integer"
 #~ msgstr "entero"
 
@@ -2946,15 +2900,10 @@
 #~ msgstr "%s(%s+0x%lx): no se puede encontrar la entrada de cabo %s"
 
 #~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
-#~ msgstr ""
-#~ "%s(%s+0x%lx): no se puede reubicar %s, recompile con -ffuncion-sections"
+#~ msgstr "%s(%s+0x%lx): no se puede reubicar %s, recompile con -ffuncion-sections"
 
-#~ msgid ""
-#~ "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section "
-#~ "= 0x%.8lx\n"
-#~ msgstr ""
-#~ "creando el símbolo de sección, nombre = %s, valor = 0x%.8lx, índice = %d, "
-#~ "sección 0x%.8lx\n"
+#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
+#~ msgstr "creando el símbolo de sección, nombre = %s, valor = 0x%.8lx, índice = %d, sección 0x%.8lx\n"
 
 #~ msgid "       whereas segment starts at 0x%x"
 #~ msgstr "       mientras que el segmento inicia en 0x%x"
diff --git a/bfd/po/fr.po b/bfd/po/fr.po
index 8662d31..4c0defd 100644
--- a/bfd/po/fr.po
+++ b/bfd/po/fr.po
@@ -1,19 +1,19 @@
 # Messages français pour GNU concernant bfd.
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Michel Robitaille <robitail@IRO.UMontreal.CA>, 1996.
+# Copyright © 1996 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 12:55+0000\n"
-"PO-Revision-Date: 2002-03-17 20:00-0500\n"
+"Project-Id-Version: GNU bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 08:00-0500\n"
 "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8-bit\n"
 
-#: aout-adobe.c:196
+#: aout-adobe.c:197
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: type de section inconnu dans le fichier a.out.adobe: %x\n"
@@ -47,7 +47,7 @@
 msgid "*unknown*"
 msgstr "*inconnu*"
 
-#: aoutx.h:3735
+#: aoutx.h:3732
 #, c-format
 msgid "%s: relocateable link from %s to %s not supported"
 msgstr "%s: relocalisation de liens de %s vers %s n'est pas supporté"
@@ -65,102 +65,102 @@
 msgid "Writing updated armap timestamp"
 msgstr "Écriture du cachet date-heure armap mise à jour"
 
-#: bfd.c:281
+#: bfd.c:274
 msgid "No error"
 msgstr "Pas d'erreur"
 
-#: bfd.c:282
+#: bfd.c:275
 msgid "System call error"
 msgstr "Erreur d'appel système"
 
-#: bfd.c:283
+#: bfd.c:276
 msgid "Invalid bfd target"
 msgstr "cible bfd invalide"
 
-#: bfd.c:284
+#: bfd.c:277
 msgid "File in wrong format"
 msgstr "Fichier dans un mauvais format"
 
-#: bfd.c:285
+#: bfd.c:278
 msgid "Archive object file in wrong format"
 msgstr "Fichier objet d'archive dans un mauvais format"
 
-#: bfd.c:286
+#: bfd.c:279
 msgid "Invalid operation"
 msgstr "Opération invalide"
 
-#: bfd.c:287
+#: bfd.c:280
 msgid "Memory exhausted"
 msgstr "Mémoire épuisée"
 
-#: bfd.c:288
+#: bfd.c:281
 msgid "No symbols"
 msgstr "Aucun symbole"
 
-#: bfd.c:289
+#: bfd.c:282
 msgid "Archive has no index; run ranlib to add one"
 msgstr "L'archive n'a pas d'index; exécuter ranlib pour en ajouter un"
 
-#: bfd.c:290
+#: bfd.c:283
 msgid "No more archived files"
 msgstr "Aucun autre fichier d'archive"
 
-#: bfd.c:291
+#: bfd.c:284
 msgid "Malformed archive"
 msgstr "Archive mal formé"
 
-#: bfd.c:292
+#: bfd.c:285
 msgid "File format not recognized"
 msgstr "Format de fichier non reconnu"
 
-#: bfd.c:293
+#: bfd.c:286
 msgid "File format is ambiguous"
 msgstr "Format de fichier ambiguë"
 
-#: bfd.c:294
+#: bfd.c:287
 msgid "Section has no contents"
 msgstr "Section sans contenu"
 
-#: bfd.c:295
+#: bfd.c:288
 msgid "Nonrepresentable section on output"
 msgstr "Section non-représentable pour la sortie"
 
-#: bfd.c:296
+#: bfd.c:289
 msgid "Symbol needs debug section which does not exist"
 msgstr "Symboles ont besoin de la section de débug qui est inexistente"
 
-#: bfd.c:297
+#: bfd.c:290
 msgid "Bad value"
 msgstr "Mauvaise valeur"
 
-#: bfd.c:298
+#: bfd.c:291
 msgid "File truncated"
 msgstr "Fichier tronqué"
 
-#: bfd.c:299
+#: bfd.c:292
 msgid "File too big"
 msgstr "Fichier trop gros"
 
-#: bfd.c:300
+#: bfd.c:293
 msgid "#<Invalid error code>"
 msgstr "#<Code d'erreur invalide>"
 
-#: bfd.c:707
+#: bfd.c:700
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "BFD assertion %s a échoué %s:%d"
 
-#: bfd.c:726
+#: bfd.c:719
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "BFD erreur interne %s, abandon à %s, ligne %d dans %s\n"
 
-#: bfd.c:730
+#: bfd.c:723
 #, c-format
-msgid "BFD %sinternal error, aborting at %s line %d\n"
+msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "BFD erreur interne %s, abandon à %s, ligne %d\n"
 
-#: bfd.c:732
+#: bfd.c:725
 msgid "Please report this bug.\n"
 msgstr "SVP rapporter cette anomalie.\n"
 
@@ -177,7 +177,7 @@
 msgid "Missing IHIHALF"
 msgstr "IHIHALF manquant"
 
-#: coff-a29k.c:212
+#: coff-a29k.c:212 coff-or32.c:229
 msgid "Unrecognized reloc"
 msgstr "Relocalisation non reconnue"
 
@@ -189,7 +189,7 @@
 msgid "missing IHIHALF reloc"
 msgstr "IHIHALF de relocalisation manquant"
 
-#: coff-alpha.c:881 coff-alpha.c:918
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
 msgid "GP relative relocation used when GP not defined"
 msgstr "Relocalisation relative GP utilisé alors que GP n'est pas défini"
 
@@ -197,123 +197,119 @@
 msgid "using multiple gp values"
 msgstr "utilisation de valeurs multiples gp"
 
-#: coff-alpha.c:1989 coff-mips.c:1433
-msgid "GP relative relocation when GP not defined"
-msgstr "GP relocalisation relative alors que GP n'est pas défini"
-
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: incapable de repérer le REPÈRE de liant « %s » pour « %s »"
 
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: incapable de repérer le liant ARM « %s » pour « %s »"
 
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): AVERTISSEMENT: l'inter-réseautage n'est pas permis."
 
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  première occurrence: %s: appel arm de repérage"
 
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  première occurrence: %s: appel de repérage à ARM"
 
-#: coff-arm.c:1477
+#: coff-arm.c:1493
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  considérer de rafaire les liens avec --support-old-code enabled"
 
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: mauvaise adresse de relocalisation 0x%lx dans la section « %s »"
 
-#: coff-arm.c:2107
+#: coff-arm.c:2127
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: symbole index illégal dans la relocalisation: %d"
 
-#: coff-arm.c:2235
+#: coff-arm.c:2255
 #, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr "%s: ERREUR: compilé pour APCS-%d alors que la cible %s utilise APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "Erreur: %s compilé pour APCS-%d alors que %s a été compilé pour APCS-%d"
 
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
 #, c-format
-msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
-msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen virgule flottance alors que la cible %s utilise des registres de valeursentières"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres FP alors que %s les passe dans les registres entiers"
 
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
 #, c-format
-msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
-msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen valeur entière alors que la cible %s utilise des registres de valeursen virgule flottante"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres entiers alors que %s les passe dans les registres FP"
 
-#: coff-arm.c:2268
+#: coff-arm.c:2288
 #, c-format
-msgid "%s: ERROR: compiled as position independent code, whereas target %s is absolute position"
-msgstr "%s: ERREUR: compilé en code indépendant de la position, alors que la cible %s esten position absolue"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "ERREUR: %s compilé avec du code à position indépendante alors que la cible %s est à position absolue"
 
-#: coff-arm.c:2271
+#: coff-arm.c:2291
 #, c-format
-msgid "%s: ERROR: compiled as absolute position code, whereas target %s is position independent"
-msgstr "%s: ERREUR: compilé en code à position abolsu, alors que la cible %s estindépendant de la position"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "ERREUR: %s compilé avec du code à position absolu alors que la cible %s est à position indépendante"
 
-#: coff-arm.c:2300
+#: coff-arm.c:2320 elf32-arm.h:2358
 #, c-format
-msgid "Warning: input file %s supports interworking, whereas %s does not."
-msgstr "AVERTISSEMENT: file d'entrée %s supporte l'inter-réseautage, contrairement à %s."
+msgid "Warning: %s supports interworking, whereas %s does not"
+msgstr "AVERTISSEMENT: %s supporte l'inter-réseautage, contrairement à %s."
 
-#: coff-arm.c:2303
+#: coff-arm.c:2323 elf32-arm.h:2365
 #, c-format
-msgid "Warning: input file %s does not support interworking, whereas %s does."
-msgstr "AVERTISSEMENT: fichier d'entrée %s ne supporte pas l'inter-réseautage, contrairement à %s."
+msgid "Warning: %s does not support interworking, whereas %s does"
+msgstr "AVERTISSEMENT: %s ne supporte pas l'inter-réseautage, contrairement à %s."
 
-#: coff-arm.c:2330
+#: coff-arm.c:2350
 #, c-format
 msgid "private flags = %x:"
 msgstr "fanions privés = %x"
 
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
 msgid " [floats passed in float registers]"
 msgstr " [valeurs en virgule flottante passées dans des registres de valeurs en virgule flottante]"
 
-#: coff-arm.c:2340
+#: coff-arm.c:2360
 msgid " [floats passed in integer registers]"
 msgstr " [valeurs en virgule flottante passées dans des registres de valeurs entières]"
 
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
 msgid " [position independent]"
 msgstr " [position indépendante]"
 
-#: coff-arm.c:2345
+#: coff-arm.c:2365
 msgid " [absolute position]"
 msgstr " [position absolue]"
 
-#: coff-arm.c:2349
+#: coff-arm.c:2369
 msgid " [interworking flag not initialised]"
 msgstr " [fanion d'inter-réseautage n'a pas été initialisé]"
 
-#: coff-arm.c:2351
+#: coff-arm.c:2371
 msgid " [interworking supported]"
 msgstr " [inter-réseautage supporté]"
 
-#: coff-arm.c:2353
+#: coff-arm.c:2373
 msgid " [interworking not supported]"
 msgstr " [inter-réseautage non supporté]"
 
-#: coff-arm.c:2401
+#: coff-arm.c:2421 elf32-arm.h:2124
 #, c-format
-msgid "Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"
-msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s, puisqu'il a déjà été spécifié comme sans inter-réseautage"
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s puisqu'il a déjà été spécifié sans inter-réseautage"
 
-#: coff-arm.c:2405
+#: coff-arm.c:2425 elf32-arm.h:2128
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
@@ -322,35 +318,35 @@
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "convention d'appel incertaine pour un symbole non COFF"
 
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
 msgid "unsupported reloc type"
 msgstr "type de relocalisation non supporté"
 
-#: coff-mips.c:875 elf32-mips.c:1987 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
 msgid "GP relative relocation when _gp not defined"
 msgstr "relocalisation relative GP sans que _gp ne soit défini"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
 msgid "reloc against unsupported section"
 msgstr "relocalisation vers une section non supportée"
 
-#: coff-mips.c:2476
+#: coff-mips.c:2474
 msgid "reloc not properly aligned"
 msgstr "relocalisation n'est pas alignée correctement"
 
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: type de relocalisation non supporté 0x%02x"
 
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: table des matières des relocalisation à 0x%x pour les symboles « %s » sans aucune entrée"
 
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: symbole « %s » a une classe smclas non reconnue %d"
@@ -360,7 +356,7 @@
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Type de relocalisation non reconnu 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4847
+#: coff-tic54x.c:390 coffcode.h:4974
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: AVERTISSEMENT: symbole index illégal %ld dans les relocalisations"
@@ -370,37 +366,37 @@
 msgid "ignoring reloc %s\n"
 msgstr "relocalisation de %s ignorée\n"
 
-#: coffcode.h:1081
+#: coffcode.h:1086
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): fanion de section %s (0x%x) ignoré"
 
-#: coffcode.h:2125
+#: coffcode.h:2143
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "cible TI COFF non reconnue identificateur '0x%x'"
 
-#: coffcode.h:4236
+#: coffcode.h:4365
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: AVERTISSEMENT: symbole d'index illégal %ld dans le numéro de ligne"
 
-#: coffcode.h:4250
+#: coffcode.h:4379
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: AVERTISSEMENT: information de numéro de ligne dédoublée pour « %s »"
 
-#: coffcode.h:4609
+#: coffcode.h:4736
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: classe de stockage non reconnue %d pour %s symbole « %s »"
 
-#: coffcode.h:4740
+#: coffcode.h:4867
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "AVERTISSEMENT: %s: symbole local « %s » n'a pas de section"
 
-#: coffcode.h:4885
+#: coffcode.h:5012
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: type de relocalisation illégal %d à l'adresse 0x%lx"
@@ -410,97 +406,92 @@
 msgid "%s: bad string table size %lu"
 msgstr "%s: chaîne erronée de la taille de table %lu"
 
-#: coffgen.c:2138
-#, c-format
-msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
-msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld prochain %ld"
-
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "AVERTISSEMENT: type de symbole « %s » a changé de %d à %d dans %s"
 
-#: cofflink.c:2317
+#: cofflink.c:2321
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: relocalisations dans la section « %s », mais n'a aucun contenu"
 
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: débordement de relocalisation: 0x%lx > 0xffff"
 
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: AVERTISSEMENT: %s: débordement du compteur de numéro de ligne: 0x%lx > 0xffff"
 
-#: dwarf2.c:381
+#: dwarf2.c:382
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_str"
 
-#: dwarf2.c:398
+#: dwarf2.c:399
 #, c-format
-msgid "Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."
-msgstr "Erreur DWARF: décalage DW_FORM_strp (%u) est > ou = à la taille de .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Erreur DWARF: décalage DW_FORM_strp (%lu) est >= à la taille de .debug_str (%lu)."
 
-#: dwarf2.c:542
+#: dwarf2.c:543
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_abbrev"
 
-#: dwarf2.c:559
+#: dwarf2.c:560
 #, c-format
-msgid "Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."
-msgstr "Erreur DWARF: décalage Abbrev (%u) est > ou = à la taille abbrev (%u)."
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Erreur DWARF: décalage Abbrev (%lu) est >= à la taille .debug_abbrev (%lu)."
 
-#: dwarf2.c:756
+#: dwarf2.c:757
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %d"
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %u"
 
-#: dwarf2.c:843
+#: dwarf2.c:852
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Erreur DWARF: numéro mutilé de ligne de section (mauvais no. de fichier)"
 
-#: dwarf2.c:929
+#: dwarf2.c:938
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_line"
 
-#: dwarf2.c:952
+#: dwarf2.c:961
 #, c-format
-msgid "Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."
-msgstr "Erreur DWARF: décalage de ligne (%u) est > ou = à la taille de ligne (%u)"
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Erreur DWARF: décalage de ligne (%lu) est >= à la taille de .debug_line (%lu)"
 
-#: dwarf2.c:1143
+#: dwarf2.c:1159
 msgid "Dwarf Error: mangled line number section."
 msgstr "Erreur DWARF: numéro mutilé de ligne de section"
 
-#: dwarf2.c:1318 dwarf2.c:1532
+#: dwarf2.c:1355 dwarf2.c:1566
 #, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %d"
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %u"
 
-#: dwarf2.c:1493
+#: dwarf2.c:1527
 #, c-format
-msgid "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."
-msgstr "Erreur DWARF: version DWARF retrouvée « %hu », ce lecteur ne supporte que les informations de la version 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Erreur DWARF: version DWARF retrouvée « %u », ce lecteur ne supporte que les informations de la version 2."
 
-#: dwarf2.c:1500
+#: dwarf2.c:1534
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Erreur DWARF: taille d'adresse obtenue « %u », ce lecteur ne peut traiter des tailles plus grandes que « %u »."
 
-#: dwarf2.c:1523
+#: dwarf2.c:1557
 #, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Erreur DWARF: mauvais numéro abrégé: %d"
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Erreur DWARF: mauvais numéro abrégé: %u"
 
-#: ecoff.c:1328
+#: ecoff.c:1318
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "type de base inconnu %d"
 
-#: ecoff.c:1597
+#: ecoff.c:1578
 #, c-format
 msgid ""
 "\n"
@@ -509,7 +500,7 @@
 "\n"
 "      Dernier+1 symbole: %ld"
 
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
 #, c-format
 msgid ""
 "\n"
@@ -518,7 +509,7 @@
 "\n"
 "      Premier symbole: %ld"
 
-#: ecoff.c:1619
+#: ecoff.c:1600
 #, c-format
 msgid ""
 "\n"
@@ -527,7 +518,7 @@
 "\n"
 "      Dernier+1 symbole: %-7ld   Type:  %s"
 
-#: ecoff.c:1626
+#: ecoff.c:1607
 #, c-format
 msgid ""
 "\n"
@@ -536,7 +527,7 @@
 "\n"
 "      Symbole local: %ld"
 
-#: ecoff.c:1634
+#: ecoff.c:1615
 #, c-format
 msgid ""
 "\n"
@@ -545,7 +536,7 @@
 "\n"
 "      struct; Symbole Fin+1: %ld"
 
-#: ecoff.c:1639
+#: ecoff.c:1620
 #, c-format
 msgid ""
 "\n"
@@ -554,7 +545,7 @@
 "\n"
 "      union; Dernier+1 symbole: %ld"
 
-#: ecoff.c:1644
+#: ecoff.c:1625
 #, c-format
 msgid ""
 "\n"
@@ -563,7 +554,7 @@
 "\n"
 "      enum; Dernier+1 symbol: %ld"
 
-#: ecoff.c:1650
+#: ecoff.c:1631
 #, c-format
 msgid ""
 "\n"
@@ -572,43 +563,54 @@
 "\n"
 "      Type: %s"
 
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201 elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation sans solution vers le symbole « %s » de la section %s"
 
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835 elf32-cris.c:1392 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547 elf32-i860.c:1048 elf32-m32r.c:1281 elf32-openrisc.c:455 elf32-v850.c:1691 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
 msgid "internal error: out of range error"
 msgstr "erreur interne: hors gamme"
 
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839 elf32-cris.c:1396 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551 elf32-i860.c:1052 elf32-m32r.c:1285 elf32-mips.c:7565 elf32-openrisc.c:459 elf32-v850.c:1695 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
 msgid "internal error: unsupported relocation error"
 msgstr "erreur interne: erreur de relocalisation non supportée"
 
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490 elf32-h8300.c:555 elf32-m32r.c:1289
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
 msgid "internal error: dangerous error"
 msgstr "erreur interne: erreur dangereuse"
 
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847 elf32-cris.c:1404 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559 elf32-i860.c:1060 elf32-m32r.c:1293 elf32-openrisc.c:467 elf32-v850.c:1715 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
 msgid "internal error: unknown error"
 msgstr "erreur interne: erreur inconnue"
 
-#: elf.c:345
+#: elf.c:343
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: chaîne de décalage invalide %u >= %lu pour la section « %s »"
 
-#: elf.c:450
+#: elf.c:589
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: entrée SHT_GROUP invalide"
 
-#: elf.c:531
+#: elf.c:660
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: aucune info de groupe pour la section %s"
 
-#: elf.c:842
+#: elf.c:1023
 msgid ""
 "\n"
 "Program Header:\n"
@@ -616,7 +618,7 @@
 "\n"
 "En-tête de programme:\n"
 
-#: elf.c:891
+#: elf.c:1073
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -624,7 +626,7 @@
 "\n"
 "Section dynamique:\n"
 
-#: elf.c:1020
+#: elf.c:1202
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -632,7 +634,7 @@
 "\n"
 "Définitions des versions:\n"
 
-#: elf.c:1043
+#: elf.c:1225
 msgid ""
 "\n"
 "Version References:\n"
@@ -640,221 +642,181 @@
 "\n"
 "Références de version:\n"
 
-#: elf.c:1048
+#: elf.c:1230
 #, c-format
 msgid "  required from %s:\n"
 msgstr " requis par %s:\n"
 
-#: elf.c:1675
+#: elf.c:1902
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: lien invalide %lu pour la section de relocalisation %s (index %u)"
 
-#: elf.c:3289
+#: elf.c:3603
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme (alloué %u, besoin de %u)"
 
-#: elf.c:3393
+#: elf.c:3708
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme, essayer l'option -N"
 
-#: elf.c:3518
+#: elf.c:3833
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
 msgstr "Erreur: première section dans le segment (%s) débute à 0x%x alors que le segment débute à 0x%x"
 
-#: elf.c:3804
+#: elf.c:4148
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: AVERTISSEMENT: section allouée « %s » n'est pas dans le segment"
 
-#: elf.c:4138
+#: elf.c:4472
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: symbole « %s » requis mais absent"
 
-#: elf.c:4147
+#: elf.c:4749
 #, c-format
-msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
-msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nom = %s, no. de symbole = %d, fanions = 0x%.8lx%s\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté, est-ce intentionnel ?\n"
 
-#: elf.c:4391
-#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté\n"
-
-#: elf.c:5804
+#: elf.c:6193
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: type de relocalisation non supporté %s"
 
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: AVERTISSEMENT: instruction Arm BLX vise la fonction Arm « %s »."
 
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: AVERTISSEMENT: instruction de repérage BLX vise la function de repérage « %s »."
 
-#: elf32-arm.h:1904 elf32-i386.c:1776 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): %s relocation vers une section SEC_MERGE"
 
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation sans solution %d vers le symbole « %s » de la section %s"
 
-#: elf32-arm.h:2114
+#: elf32-arm.h:2176
 #, c-format
-msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
-msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s alors qu'il a déjè été spécifié sans inter-réseautage"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s lié avec lui"
 
-#: elf32-arm.h:2118
+#: elf32-arm.h:2271
 #, c-format
-msgid "Warning: Clearing the interwork flag of %s due to outside request"
-msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "ERREUR: %s compilé pour une version EABI %d alors que %s a été compilé pour la version %d"
 
-#: elf32-arm.h:2166
+#: elf32-arm.h:2285
 #, c-format
-msgid "Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"
-msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s qui a été lié avec lui"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "ERREUR: %s compilé pour APCS-%d alors que la cible %s utilise APCS-%d"
 
-#: elf32-arm.h:2261
+#: elf32-arm.h:2313
 #, c-format
-msgid "Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "Erreur: %s compilé pour une version EABI %d, alors que %s a été compilé pour la version %d"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "ERREUR: %s utilise les instructions VFP alors que %s utilise les instructions FPA"
 
-#: elf32-arm.h:2275
+#: elf32-arm.h:2318
 #, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "Erreur: %s compilé pour APCS-%d, alors que %s a été compilé pour APCS-%d"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "ERREUR: %s utilise les instructions FPA alors que %s utilise les instructions VFP"
 
-#: elf32-arm.h:2287
+#: elf32-arm.h:2338
 #, c-format
-msgid "Error: %s passes floats in FP registers, whereas %s passes them in integer registers"
-msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres FP, alors que %s les passe dans les registres entiers"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "ERREUR: %s utilise le logiciel pour virgule flottante alors que %s utilise le matériel pour virgule flottante"
 
-#: elf32-arm.h:2292
+#: elf32-arm.h:2343
 #, c-format
-msgid "Error: %s passes floats in integer registers, whereas %s passes them in FP registers"
-msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres entiers, alors que %s les passe dans les registres FP"
-
-#: elf32-arm.h:2303
-#, c-format
-msgid "Error: %s uses VFP instructions, whereas %s FPA instructions"
-msgstr "Erreur: %s utilise les instructions VFP, alors que %s utilise les instructions FPA"
-
-#: elf32-arm.h:2308
-#, c-format
-msgid "Error: %s uses FPA instructions, whereas %s VFP instructions"
-msgstr "Erreur: %s utilise les instructions FPA, alors que %s utilise les instructions VFP"
-
-#: elf32-arm.h:2328
-#, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr "Erreur: %s utilise le logiciel pour virgule flottante, alors que %s utilise le matériel pour virgule flottante"
-
-#: elf32-arm.h:2333
-#, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr "Erreur: %s utilise le matériel pour virgule flottante, alors que %s utilise le logiciel pour virgule flottante"
-
-#: elf32-arm.h:2348
-#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "AVERTISSEMENT: %s supporte l'inter-réseautage, contrairement à %s."
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "AVERTISSEMENT: %s ne supporte pas l'inter-réseautage, contrairement à %s."
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "ERREUR: %s utilise le matériel pour virgule flottante alors que %s utilise le logiciel pour virgule flottante"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2970 elf32-m68k.c:410 elf32-mips.c:3232
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
 #, c-format
 msgid "private flags = %lx:"
 msgstr "fanions privés = %lx"
 
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
 msgid " [interworking enabled]"
 msgstr " [inter-réseautage autorisé]"
 
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
 msgid " [VFP float format]"
 msgstr " [format flottant VFP]"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
 msgid " [FPA float format]"
 msgstr " [format flottant FPA]"
 
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
 msgid " [new ABI]"
 msgstr " [nouvel ABI]"
 
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
 msgid " [old ABI]"
 msgstr " [ancien ABI]"
 
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
 msgid " [software FP]"
 msgstr " [virgule flottante logiciel]"
 
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
 msgid " [Version1 EABI]"
 msgstr " [Version 1 EABI]"
 
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
 msgid " [sorted symbol table]"
 msgstr " [table des symboles triés]"
 
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
 msgid " [unsorted symbol table]"
 msgstr " [table des symboles non triés]"
 
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
 msgid " [dynamic symbols use segment index]"
 msgstr " [symboles dynamiques utilisent un index de segment]"
 
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
 msgid " [mapping symbols precede others]"
 msgstr " [mapping de symboles précèdes les autres]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
 msgid " <EABI version unrecognised>"
 msgstr " <Version EABI non reconnue>"
 
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
 msgid " [relocatable executable]"
 msgstr " [exécutables relocalisés]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
 msgid " [has entry point]"
 msgstr " [a des points d'entrées]"
 
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
 msgid "<Unrecognised flag bits set>"
 msgstr "<Bits de fanions non reconnus>"
 
-#: elf32-avr.c:843 elf32-cris.c:1400 elf32-fr30.c:661 elf32-i860.c:1056 elf32-openrisc.c:463 elf32-v850.c:1699 elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
 msgid "internal error: dangerous relocation"
 msgstr "erreur interne: relocalisation dangereuse"
 
@@ -868,31 +830,36 @@
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
 msgstr "%s: pas de relocalisation %s PLT ni GOT vers le symbole « %s » à partir de la section %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
 msgid "[whose name is lost]"
 msgstr "[où le nom est perdu]"
 
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole local à partir de la section %s"
 
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
 msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole « %s » à partir de la section %s"
 
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr "%s: relocalisation %s n'est pas permise pour le symbole global: « %s » de la section %s."
 
-#: elf32-cris.c:1275
+#: elf32-cris.c:1170
+#, c-format
+msgid "%s: relocation %s in section %s with no GOT created"
+msgstr "%s: relocalisation %s dans la section %s mais aucun GOT créé"
+
+#: elf32-cris.c:1288
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: inconsistence interne; pas de section de relocalisation %s"
 
-#: elf32-cris.c:2508
+#: elf32-cris.c:2514
 #, c-format
 msgid ""
 "%s, section %s:\n"
@@ -901,90 +868,123 @@
 "%s, section %s:\n"
 " relocalisation %s devrait être utilisée dans un objet partagé; recompiler avec -fPIC"
 
-#: elf32-cris.c:2973
+#: elf32-cris.c:2991
 msgid " [symbols have a _ prefix]"
 msgstr " [symboles sont préfixés par « _ »]"
 
-#: elf32-cris.c:3012
+#: elf32-cris.c:3030
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%s: utilise  _-prefixed symbols, mais avec écriture au fichier avec des symboles sans préfixes"
 
-#: elf32-cris.c:3013
+#: elf32-cris.c:3031
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%s: utilise des symboles sans préfixes, mais avec écriture au fichier avec des symboles ayant des préfixes_-prefixed"
 
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: compilé avec %s et lié avec les modules qui utilisent de la relocalisation non PIC"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: compilé avec %s et lié avec les modules compilés avec %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: utilise différents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "fanions privés = 0x%lx:"
+
 #: elf32-gen.c:82 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: relocalisation en format ELF générique (EM: %d)"
 
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: ne peut créer l'entrée du talon %s"
 
-#: elf32-hppa.c:937 elf32-hppa.c:3540
+#: elf32-hppa.c:956 elf32-hppa.c:3555
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): ne peut atteindre %s, recompiler avec -ffunction-sections"
 
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: relocalisation de %s ne peut être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
 
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: relocalisation %s ne doit pas être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
 
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "Ne peut repérer la section de relocalisation pour %s"
 
-#: elf32-hppa.c:2862
+#: elf32-hppa.c:2855
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: talon d'exportation en double %s"
 
-#: elf32-hppa.c:3424
+#: elf32-hppa.c:3433
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): corrigeant %s"
 
-#: elf32-hppa.c:4064
+#: elf32-hppa.c:4080
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): ne traiter %s pour %s"
 
-#: elf32-hppa.c:4403
+#: elf32-hppa.c:4393
 msgid ".got section not immediately after .plt section"
 msgstr "section .got pas immédiatement après la section .plt"
 
-#: elf32-i386.c:298
+#: elf32-i386.c:379
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: type de relocalisation invalide %d"
 
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: symbole index erroné: %d"
 
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2085 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: « %s » symbole local accéder à la fois comme normal et avec thread"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: nom de section de relocalisation erroné « %s »"
 
-#: elf32-i386.c:2067 elf32-s390.c:1949 elf64-ppc.c:3908 elf64-s390.c:1953
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: code exécutable local TLS ne peut être lié en objets partagés"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): relocalisation sans solution vers le symbole « %s »"
 
-#: elf32-i386.c:2105 elf32-s390.c:1987 elf64-s390.c:1991
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): relocalisation vers « %s »: erreur %d"
@@ -993,31 +993,32 @@
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "relocalisation SDA alors que _SDA_BASE_ n'est pas définie"
 
-#: elf32-ia64.c:3538 elf32-m32r.c:1008 elf32-ppc.c:2930 elf64-ia64.c:3538
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: type de relocalisation inconnu %d"
 
-#: elf32-m32r.c:1224
+#: elf32-m32r.c:1221
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%s: la cible (%s) de la relocalisation %s est dans la mauvaise section (%s)"
 
-#: elf32-m32r.c:2001
+#: elf32-m32r.c:1947
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: jeu d'instructions ne concorde par avec les modules précédents"
 
-#: elf32-m32r.c:2024
+#: elf32-m32r.c:1970
 #, c-format
 msgid "private flags = %lx"
 msgstr "fanions privés = %lx"
 
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1975
 msgid ": m32r instructions"
 msgstr ": instructions m32r"
 
-#: elf32-m32r.c:2030
+#: elf32-m32r.c:1976
 msgid ": m32rx instructions"
 msgstr ": instruction m32rx"
 
@@ -1025,246 +1026,177 @@
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: relocalisation %s (%d) n'est pas couramment supportée.\n"
 
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: type de relocalisation inconnue %d\n"
 
-#: elf32-mips.c:2146 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "relocalisation relative gp 32bits est survenue pour un symbole externe"
 
-#: elf32-mips.c:2295
+#: elf32-mips.c:1301
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Édition de liens d'objets mips16 dans le format %s n'est pas supporté"
 
-#: elf32-mips.c:3119
-#, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC"
-
-#: elf32-mips.c:3129
-#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
-
-#: elf32-mips.c:3158
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
-
-#: elf32-mips.c:3167
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
-
-#: elf32-mips.c:3190
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s"
-
-#: elf32-mips.c:3204 elf32-ppc.c:1470 elf64-ppc.c:1538 elf64-sparc.c:3033
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
-
-#: elf32-mips.c:3235
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3237
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3239
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3241
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3243
-msgid " [abi unknown]"
-msgstr " [abi inconnu]"
-
-#: elf32-mips.c:3245
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3249
-msgid " [no abi set]"
-msgstr " [aucun jeu abi]"
-
-#: elf32-mips.c:3252
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3254
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3256
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3258
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3260
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3262
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3264
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3266
-msgid " [unknown ISA]"
-msgstr " [ISA inconnu]"
-
-#: elf32-mips.c:3269
-msgid " [32bitmode]"
-msgstr " [mode 32 bits]"
-
-#: elf32-mips.c:3271
-msgid " [not 32bitmode]"
-msgstr " [aucun mode 32 bits]"
-
-#: elf32-mips.c:4947
-msgid "static procedure (no name)"
-msgstr "procédure statique (sans name)"
-
-#: elf32-mips.c:5565 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: nom illégal de section « %s »"
-
-#: elf32-mips.c:6132 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT"
-
-#: elf32-mips.c:7238 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal"
-
-#: elf32-mips.c:8237 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: relocalisation mal composée détectée dans la section %s"
-
-#: elf32-mips.c:8315 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1503
+#: elf32-ppc.c:1460
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr "%s: compilé avec -mrelocatable et fait l'édition de lien avec les modules compilés normalement"
 
-#: elf32-ppc.c:1444 elf64-ppc.c:1511
+#: elf32-ppc.c:1468
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr "%s: compilé normalement et fait l'édition de lien avec les modules compilés avec -mrelocatable"
 
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
+
+#: elf32-ppc.c:1592
 #, c-format
 msgid "%s: Unknown special linker type %d"
 msgstr "%s: type d'édition spécial de lien inconnu %d"
 
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: relocalisation %s ne peut être utilisée lors de la création d'un objet partagé"
 
-#: elf32-ppc.c:3097 elf64-ppc.c:3500
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: type de relocalisation inconnue %d pour le symbole %s"
 
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
 #, c-format
 msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr "%s: la cible (%s) d'une relocalisation %s est dans la mauvaise section de sortie (%s)"
 
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
 #, c-format
 msgid "%s: Relocation %s is not yet supported for symbol %s."
 msgstr "%s: relocalisation %s n'est pas encore supporté pour le symbole %s."
 
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage pour R_SH_USES"
 
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: AVERTISSEMENT: R_SH_USES pointe vers un insn inconnu 0x%x "
 
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage de chargement R_SH_USES"
 
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer la relocalisation attendue"
 
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: AVERTISSEMENT: symbole dans une section inattendue"
 
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer le compteur de relocalisation attendu"
 
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décompte"
 
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: erreur fatale: débordement de relocalisation lors de relâches"
 
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "STO_SH5_ISA32 inattendu sur le symbole local n'est pas traité"
+
+#: elf32-sh.c:4284
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr "%s: 0x%lx: fatal: cible de branchement non aligné pour une relocalisatin de type relax-support"
 
-#: elf32-sparc.c:1554 elf64-sparc.c:2286
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: compilé comme un objet de 32 bits et %s est de 64 bits"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: compilé comme un objet de 64 bits et %s est de 32 bits"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: taille de l'objet ne concorde pas avec la taille de la cible %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: rencontre du symbole d'une étiquette de donnée dans l'entrée"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "Non concordance PTB: adresse SHmedia (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "Non concordance PTA: adresse SHcompact (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: ERREUR GAS: insn PTB inattendue avec R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: ERREUR: relocalisation non alignée type %d à %08x relocalisé`%08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: ne peut écrire en sortie des entrées .cranges"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: ne peut écrire en sortie des entrées .cranges"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: probablement compilé sans -fPIC?"
 
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: compilé pour un système à 64 bits et la cible est de 32 bits"
 
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr ""
@@ -1312,220 +1244,498 @@
 msgid "could not locate special linker symbol __ctbp"
 msgstr "ne peut repérer le symbole spécial d'édition de lien __ctbp"
 
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: l'architecture ne concorde pas avec les modules précédents"
 
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
 #, c-format
 msgid "private flags = %lx: "
 msgstr "fanions privés = %lx"
 
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
 msgid "v850 architecture"
 msgstr "architecture v850"
 
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
 msgid "v850e architecture"
 msgstr "architecture v850e"
 
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
 msgid "v850ea architecture"
 msgstr "architecture v850ea"
 
-#: elf64-alpha.c:858
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [nonpic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [d-float]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [g-float]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: AVERTISSEMENT: GOT ajouté de %ld vers « %s » ne concorde par avec le GOT ajouté de %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: AVERTISSEMENT: PLT ajouté de %d vers « %s » de la section %s ignoré"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: AVERTISSEMENT: relocalisation %s vers le symbole « %s » de la section %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: AVERTISSEMENT: relocalisation %s vers 0x%x de la section %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+msgid "non-zero addend in @fptr reloc"
+msgstr "ajout non null dans la relocalisation @fptr"
+
+#: elf64-alpha.c:1097
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "la relocalisation GPDISP n'a pas repéré les instructions ldah et lda"
 
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: le sous-segment .got excède 64K (taille %d)"
 
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: relocalisation relative gp vers le symbole dynamique %s"
 
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative au PC vers le symbole dynamique %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: changé dans le GP: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<inconnu>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: relocalisation !samegp vers le symbole sans .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: relocalisation dynamique non traitée vers %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative dtp vers le symbole dynamique %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative tp vers le symbole dynamique %s"
+
+#: elf64-hppa.c:2080
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "entrée du talon pour %s ne peut charger .plt, décalage dp = %ld"
 
-#: elf64-mmix.c:1268
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: erreur d'inconsistence interne pour la valeur du registre global\n"
+" alloué à l'édition de lien: lié: 0x%lx%08lx != relâché: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: relocalisation base plus décalage vers le symbole registre: (inconnu) dans %s"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: relocalisation base plus décalage vers le symbole registre: %s dans %s"
+
+#: elf64-mmix.c:1435
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: relocalisation de registre vers le symbole non-registre: (inconnu) dans %s"
+
+#: elf64-mmix.c:1440
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: relocalisation de registre vers le symbole non-registre: %s dans %s"
 
-#: elf64-mmix.c:1270
-msgid "(unknown)"
-msgstr "(inconnu)"
-
-#: elf64-mmix.c:1305
+#: elf64-mmix.c:1477
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: directive LOCAL valide seulement avec un registre ou une valeur absolue"
 
-#: elf64-mmix.c:1333
+#: elf64-mmix.c:1505
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr "%s: directive LOCAL: registre $%ld n'est pas un registre local.  Premier registre global est $%ld."
 
-#: elf64-mmix.c:1609
+#: elf64-mmix.c:1965
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr "%s: erreur: multiple définitions de « %s »; début de %s est initialisé dans un précédent fichier lié\n"
 
-#: elf64-mmix.c:1668
+#: elf64-mmix.c:2024
 msgid "Register section has contents\n"
 msgstr "Registre de section contient\n"
 
-#: elf64-ppc.c:1466 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Inconsistence interne: reste %u != max %u.\n"
+"  SVP rapporter cette anomalie."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr ""
 "%s: compilé pour un système à octets de poids fort alors que la cible\n"
 "est un système à octets de poids faible"
 
-#: elf64-ppc.c:1468 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr ""
 "%s: compilé pour un système à octets de poids faible alors que la cible\n"
 "est un système à octets de poids fort"
 
-#: elf64-ppc.c:3166
+#: elf64-ppc.c:3610
 #, c-format
-msgid "linkage table overflow against `%s'"
-msgstr "débordement de la table de liaison vers « %s »"
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: type inattendu de relocalisation %u dans la section .opd"
 
-#: elf64-ppc.c:3244
-msgid "stub section size doesn't match calculated size"
-msgstr "taille de la section du talon ne concorde pas avec la taille calculée"
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd n'est pas un tableau régulier d'entrées opd"
 
-#: elf64-ppc.c:3845
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: symbole « %s » indéfini dans la section .opd"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "ne peut repérer le talon de branchement « %s »"
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
+msgid "linkage table error against `%s'"
+msgstr "erreur de liaison de la table de liaison vers « %s »"
+
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "ne peut construire un talon de branchement « %s »"
+
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "taille des talons ne concorde pas avec la taille calculée"
+
+#: elf64-ppc.c:5828
 #, c-format
 msgid "%s: Relocation %s is not supported for symbol %s."
 msgstr "%s: relocalisation %s n'est pas supportée pour le symbole %s."
 
-#: elf64-ppc.c:3889
+#: elf64-ppc.c:5872
 #, c-format
 msgid "%s: error: relocation %s not a multiple of 4"
 msgstr "%s: erreur: relocalisation %s n'est pas un multiple de 4"
 
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: type de relocalisation non traitée %d"
 
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: seuls les registres %%g[2367] peuvent être déclarés en utilisant les registres STT_REGISTER"
 
-#: elf64-sparc.c:1334
+#: elf64-sparc.c:1337
 #, c-format
-msgid "Register %%g%d used incompatibly: %s in %s"
-msgstr "Registre %%g%d utilisé de manière incompatible: %s dans %s"
+msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
+msgstr "Registre %%g%d utilisé de manière incompatible: %s dans %s précédemment %s dans %s"
 
-#: elf64-sparc.c:1338 elf64-sparc.c:1362 elf64-sparc.c:1411
+#: elf64-sparc.c:1360
 #, c-format
-msgid "  previously %s in %s"
-msgstr " précédemment %s dans %s"
+msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
+msgstr "Symbole « %s » a des types qui diffèrent: REGISTRE dans %s, précédemment %s dans %s"
 
-#: elf64-sparc.c:1359 elf64-sparc.c:1408
+#: elf64-sparc.c:1406
 #, c-format
-msgid "Symbol `%s' has differing types: %s in %s"
-msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s"
+msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
+msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s, précédemment REGISTRE dans %s"
 
-#: elf64-sparc.c:3014
+#: elf64-sparc.c:2970
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: édition de liens spécifiques pour UltraSPARC avec du code spécifique HAL"
 
-#: elfcode.h:1218
+#: elfcode.h:1198
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: compteur de version (%ld) ne concorde pas avec le symbole du compteur (%ld)"
 
-#: elflink.c:434
+#: elflink.c:440
 #, c-format
 msgid "%s: Section %s is too large to add hole of %ld bytes"
 msgstr "%s: section %s est trop grande pour ajouter un trou de %ld octets"
 
-#: elflink.h:1113
+#: elflink.h:1090
 #, c-format
 msgid "%s: warning: unexpected redefinition of `%s'"
 msgstr "%s: AVERTISSEMENT: redéfinition inattendue de « %s »"
 
-#: elflink.h:1784
+#: elflink.h:1727
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: version invalide %u (max %d)"
 
-#: elflink.h:1825
+#: elflink.h:1768
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: version requise invalide %d"
 
-#: elflink.h:1945
+#: elflink.h:1890
 #, c-format
 msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
 msgstr "AVERTISSEMENT: taille du symbole « %s » a changé de %lu à %lu dans %s"
 
-#: elflink.h:4020
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: section .preinit_array n'est pas permise dans DSO"
+
+#: elflink.h:4030
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
 msgstr "AVERTISSEMENT: type et taille du symbole dynamique « %s » ne sont pas définis"
 
-#: elflink.h:4329
+#: elflink.h:4345
 #, c-format
 msgid "%s: undefined versioned symbol name %s"
 msgstr "%s: nom symbole avec version indéfinie %s"
 
-#: elflink.h:4559 elflink.h:4567 elflink.h:6218 elflink.h:7295
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
 msgid "Error: out of memory"
 msgstr "Erreur: mémoire épuisée"
 
-#: elflink.h:4729
+#: elflink.h:4781
 msgid "Not enough memory to sort relocations"
 msgstr "Pas assez de mémoire pour effectuer le trie des relocalisations"
 
-#: elflink.h:5995
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: ne peut repérer la section de sortie %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "AVERTISSEMENT: section %s a une taille nulle"
+
+#: elflink.h:6275
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr "%s: ne peut repérer la section de sortie %s pour la section d'entrée %s"
 
-#: elflink.h:6568
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: taille de la relocalisation ne concorde pas dans %s section %s"
+
+#: elflink.h:6849
 msgid "warning: relocation against removed section; zeroing"
 msgstr "AVERTISSEMENT: relocalisation vers une section qui a été enlevée; mise à zéro"
 
-#: elflink.h:6598
+#: elflink.h:6879
 msgid "warning: relocation against removed section"
 msgstr "AVERTISSEMENT: relocalisation vers une section enlevée"
 
-#: elflink.h:6611
+#: elflink.h:6892
 #, c-format
 msgid "local symbols in discarded section %s"
 msgstr "symboles locaux de la section mise à l'écart %s"
 
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "procédure statique (sans name)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: relocalisation mal composée détectée dans la section %s"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: nom illégal de section « %s »"
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [abi inconnu]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [aucun jeu abi]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [ISA inconnu]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [mode 32 bits]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [aucun mode 32 bits]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "La sortie requiert une ilbrairie partagée « %s »\n"
 
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Le fichier de sortie requiert une librairie partagée « %s.so.%s »\n"
 
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708 sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "Symbole %s n'est pas défini pour les corrections\n"
 
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
 msgid "Warning: fixup count mismatch\n"
 msgstr "AVERTISSEMENT: correction du compteur qui ne concordait pas\n"
 
@@ -1541,7 +1751,7 @@
 
 #: ieee.c:877
 #, c-format
-msgid "%s: unimplemented ATI record  %u for symbol %u"
+msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: enregistrement ATI non implanté %u pour le symbole %u"
 
 #: ieee.c:902
@@ -1559,49 +1769,49 @@
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: caractères inattendue « %s » dans le fichier Intel hexadécimal\n"
 
-#: ihex.c:368
+#: ihex.c:366
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr "%s:%u: somme de contrôle erronée dans le fichier Intel hexadécimal (attendu %u, obtenu %u)"
 
-#: ihex.c:422
+#: ihex.c:420
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
 msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue dans le fichier Intel hexadécimal"
 
-#: ihex.c:439
+#: ihex.c:437
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: longueur erronée d'adresse étendue de début dans le fichier Intel hexadécimal"
 
-#: ihex.c:456
+#: ihex.c:454
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
 msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue linéaire dans le fichier Intel hexadécimal"
 
-#: ihex.c:473
+#: ihex.c:471
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
 msgstr "%s:%u: longueur erronée d'adresse étendue linéraire de début dans le fichier Intel hexadécimal"
 
-#: ihex.c:490
+#: ihex.c:488
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: type ihex non reconnu %u dans le fichier Intel hexadécimal\n"
 
-#: ihex.c:610
+#: ihex.c:607
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: erreur interne dans ihex_read_section"
 
-#: ihex.c:645
+#: ihex.c:642
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: longuer erronée de section dans ihex_read_section"
 
-#: ihex.c:863
+#: ihex.c:860
 #, c-format
-msgid "%s: address 0x%s out of range for Intex Hex file"
+msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: adresse 0x%s hors gamme pour le fichier Intel hexadécimal"
 
 #: libbfd.c:492
@@ -1613,27 +1823,27 @@
 msgid "not mapping: env var not set\n"
 msgstr "pas de table de projection: variable d'environnement pas initialisée\n"
 
-#: libbfd.c:1463
+#: libbfd.c:1466
 #, c-format
-msgid "Deprecated %s called"
-msgstr "%s appel déprécié"
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "%s déprécié appelé à %s dans la ligne %d dans %s\n"
 
-#: libbfd.c:1465
+#: libbfd.c:1469
 #, c-format
-msgid " at %s line %d in %s\n"
-msgstr " à %s ligne %d dans %s\n"
+msgid "Deprecated %s called\n"
+msgstr "%s appel déprécié\n"
 
-#: linker.c:1849
+#: linker.c:1873
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: symbole indirect « %s » vers « %s » est une boucle"
 
-#: linker.c:2745
+#: linker.c:2776
 #, c-format
 msgid "Attempt to do relocateable link with %s input and %s output"
 msgstr "Tentative de relocalisation d'un lien avec %s à l'entrée et %s à la sortie"
 
-#: merge.c:897
+#: merge.c:892
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: accès au-delà de la fin de la section fusionnée (%ld + %ld)"
@@ -1643,127 +1853,127 @@
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: pas de corps pour allouer un nom de section %s\n"
 
-#: mmo.c:537
+#: mmo.c:536
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: pas de corps pour allouer un symbole %d octets de longueur\n"
 
-#: mmo.c:1190
+#: mmo.c:1245
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: fichier mmo invalide: valeur d'initialisation pour $255 n'est pas « Main »\n"
 
-#: mmo.c:1336
+#: mmo.c:1391
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr "%s: séquence de caractères large 0x%02X 0x%02X non supportée après le nom de symbole débutant avec « %s »\n"
 
-#: mmo.c:1571
+#: mmo.c:1633
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: fichier mmo invalide: lopcode non supporté « %d »\n"
 
-#: mmo.c:1581
+#: mmo.c:1643
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: fichier mmo invalide: attendu YZ = 1 obtenu YZ = %d pour lop_quote\n"
 
-#: mmo.c:1617
+#: mmo.c:1679
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_loc\n"
 
-#: mmo.c:1663
+#: mmo.c:1725
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_fixo\n"
 
-#: mmo.c:1702
+#: mmo.c:1764
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: attendu y = 0, obtenu y = %d pour lop_fixrx\n"
 
-#: mmo.c:1711
+#: mmo.c:1773
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: attendu z = 16 ou z = 24, obtenu z = %d pour lop_fixrx\n"
 
-#: mmo.c:1734
+#: mmo.c:1796
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: octet de tête du mot de l'opérande doit être 0 ou 1, obtenu %d pour lop_fixrx\n"
 
-#: mmo.c:1757
+#: mmo.c:1819
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: ne allouer un nom de ficheir pour le no. de fichier %d, %d octets\n"
 
-#: mmo.c:1777
+#: mmo.c:1839
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: fichier mmo invalide: no. de fichier %d « %s », a déjà été entré comme « %s »\n"
 
-#: mmo.c:1790
+#: mmo.c:1852
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr "%s: fichier mmo invalide: nom de fichier %d n'a pas été spécifié avant son utilisation\n"
 
-#: mmo.c:1896
+#: mmo.c:1958
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr "%s: fichier mmo invalide: champs y et z de lop_stab non null, y: %d, z: %d\n"
 
-#: mmo.c:1932
+#: mmo.c:1994
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: fichier mmo invalide: lop_end N,est pas le dernier item dans le fichier\n"
 
-#: mmo.c:1945
+#: mmo.c:2007
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr "%s: fichier mmo invalide: YZ de lop_end (%ld) n'est pas égal au nombre de teras du lop_stab précédent (%ld)\n"
 
-#: mmo.c:2610
+#: mmo.c:2670
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: table de symboles invalides: duplication du symbole « %s »\n"
 
-#: mmo.c:2898
+#: mmo.c:2921
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr "%s: définition de symbole erronée: « Main » initialisé à %s au lieu de l'adresse de départ %s\n"
 
-#: mmo.c:2932
+#: mmo.c:3011
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr "%s: avertissement: table de symboles trop grande pour mmo, plus grande que 65535 mots de 32 bits: %d. Seul « Main » sera produit.\n"
 
-#: mmo.c:2977
+#: mmo.c:3056
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: erreur interne, table de symbole a changé de taille de %d à %d mots\n"
 
-#: mmo.c:3032
+#: mmo.c:3111
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: erreur interne, registre interne de section %s a du contenu\n"
 
-#: mmo.c:3084
+#: mmo.c:3163
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: pas de registres initialisés; section de longeur 0\n"
 
-#: mmo.c:3090
+#: mmo.c:3169
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: trop de resigstres initialisés; longueur de section %ld\n"
 
-#: mmo.c:3095
+#: mmo.c:3174
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: adresse de départ invalide pour des registres initialisés de longueur %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1036
+#: oasys.c:1029
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: ne peut représenter la section « %s » dans oasis"
@@ -1886,7 +2096,7 @@
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Longueur de la partition[%d] = 0x%.8lx (%ld)\n"
 
-#: som.c:5402
+#: som.c:5398
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers non implanté"
 
@@ -1895,7 +2105,12 @@
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: caractère inattendue « %s » dans le fichier S-record\n"
 
-#: syms.c:996
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): entrée des talons a une chaîne index invalide"
+
+#: syms.c:1044
 msgid "Unsupported .stab relocation"
 msgstr "Relocalisation du .stab non supporté"
 
@@ -1914,7 +2129,7 @@
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "Taille de section ne concorde pas %s=%lx, %s=%lx"
 
-#: vms-gsd.c:704
+#: vms-gsd.c:702
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "sous type gsd/egsd inconnu %d"
@@ -1950,421 +2165,334 @@
 msgid "failed to enter %s"
 msgstr "échec d'insertion de %s"
 
-#: vms-tir.c:78
+#: vms-tir.c:81
 msgid "No Mem !"
 msgstr "Mémoire épuisée!"
 
-#: vms-tir.c:313
-msgid "Bad section index in ETIR_S_C_STA_PQ"
-msgstr "Index de section erronée dans ETIR_S_C_STA_PQ"
-
-#: vms-tir.c:328
+#: vms-tir.c:362
 #, c-format
-msgid "Unsupported STA cmd %d"
-msgstr "Commande STA non supportée %d"
+msgid "bad section index in %s"
+msgstr "index de section erronée dans %s"
 
-#: vms-tir.c:333 vms-tir.c:1301
+#: vms-tir.c:375
 #, c-format
-msgid "Reserved STA cmd %d"
-msgstr "Commande STA réservée %d"
+msgid "unsupported STA cmd %s"
+msgstr "commande STA non supportée %s"
 
-#: vms-tir.c:443
+#: vms-tir.c:380 vms-tir.c:1240
 #, c-format
-msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_GBL: pas de symbole « %s »"
+msgid "reserved STA cmd %d"
+msgstr "commande STA réservée %d"
 
-#: vms-tir.c:465
+#: vms-tir.c:491 vms-tir.c:514
 #, c-format
-msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_CA: pas de symbole « %s »"
+msgid "%s: no symbol \"%s\""
+msgstr "%s: pas de symbole \"%s\""
 
-#: vms-tir.c:478
-msgid "ETIR_S_C_STO_RB/AB: Not supported"
-msgstr "ETIR_S_C_STO_RB/AB: non supporté"
-
-#: vms-tir.c:538
-msgid "ETIR_S_C_STO_LP_PSB: Not supported"
-msgstr "ETIR_S_C_STO_LP_PSB: non supporté"
-
-#: vms-tir.c:544
-msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
-msgstr "ETIR_S_C_STO_HINT_GBL: pas implanté"
-
-#: vms-tir.c:550
-msgid "ETIR_S_C_STO_HINT_PS: not implemented"
-msgstr "ETIR_S_C_STO_HINT_PS: pas implanté"
-
-#: vms-tir.c:554 vms-tir.c:1473
+#. unsigned shift
+#. rotate
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
+#: vms-tir.c:838 vms-tir.c:1563
 #, c-format
-msgid "Reserved STO cmd %d"
-msgstr "Commande STO réservée %d"
+msgid "%s: not supported"
+msgstr "%s: pas supporté"
 
-#: vms-tir.c:667
-msgid "ETIR_S_C_OPR_INSV: Not supported"
-msgstr "ETIR_S_C_OPR_INSV: non supporté"
-
-#: vms-tir.c:685
-msgid "ETIR_S_C_OPR_USH: Not supported"
-msgstr "ETIR_S_C_OPR_USH: non supporté"
-
-#: vms-tir.c:691
-msgid "ETIR_S_C_OPR_ROT: Not supported"
-msgstr "ETIR_S_C_OPR_ROT: non supporté"
-
-#: vms-tir.c:710
-msgid "ETIR_S_C_OPR_REDEF: Not supported"
-msgstr "ETIR_S_C_OPR_REDEF: non supporté"
-
-#: vms-tir.c:716
-msgid "ETIR_S_C_OPR_DFLIT: Not supported"
-msgstr "ETIR_S_C_OPR_DFLIT: non supporté"
-
-#: vms-tir.c:720 vms-tir.c:1668
+#: vms-tir.c:586 vms-tir.c:1418
 #, c-format
-msgid "Reserved OPR cmd %d"
-msgstr "Commande OPR réservée %d"
+msgid "%s: not implemented"
+msgstr "%s: non implanté"
 
-#: vms-tir.c:788 vms-tir.c:1737
+#: vms-tir.c:590 vms-tir.c:1422
 #, c-format
-msgid "Reserved CTL cmd %d"
-msgstr "Commande CTL réservée %d"
+msgid "reserved STO cmd %d"
+msgstr "commande STO réservée %d"
 
-#: vms-tir.c:816
-msgid "ETIR_S_C_STC_LP: not supported"
-msgstr "ETIR_S_C_STC_LP: non supporté"
+#: vms-tir.c:708 vms-tir.c:1568
+#, c-format
+msgid "reserved OPR cmd %d"
+msgstr "commande OPR réservée %d"
 
-#: vms-tir.c:834
-msgid "ETIR_S_C_STC_GBL: not supported"
-msgstr "ETIR_S_C_STC_GBL: non supporté"
+#: vms-tir.c:776 vms-tir.c:1632
+#, c-format
+msgid "reserved CTL cmd %d"
+msgstr "commande CTL réservée %d"
 
-#: vms-tir.c:842
-msgid "ETIR_S_C_STC_GCA: not supported"
-msgstr "ETIR_S_C_STC_GCA: non supporté"
+#. stack byte from image
+#. arg: none.
+#: vms-tir.c:1148
+msgid "stack-from-image not implemented"
+msgstr "pile depuis l'image non implanté"
 
-#: vms-tir.c:851
-msgid "ETIR_S_C_STC_PS: not supported"
-msgstr "ETIR_S_C_STC_PS: non supporté"
+#: vms-tir.c:1166
+msgid "stack-entry-mask not fully implemented"
+msgstr "masque de pile d'entrée pas complètement implanté"
 
+#. compare procedure argument
+#. arg: cs	symbol name
+#. by	argument index
+#. da	argument descriptor
 #.
-#. * stack byte from image
-#. * arg: -
-#. *
-#.
-#: vms-tir.c:1199
-msgid "Stack-from-image not implemented"
-msgstr "Stack-from-image non implanté"
-
-#: vms-tir.c:1219
-msgid "Stack-entry-mask not fully implemented"
-msgstr "Stack-entry-mask pas complètement implanté"
-
-#.
-#. * compare procedure argument
-#. * arg: cs	symbol name
-#. *	by	argument index
-#. *	da	argument descriptor
-#. *
-#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH)
-#. * and stack TRUE (args match) or FALSE (args dont match) value
-#.
-#: vms-tir.c:1235
+#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
+#. and stack TRUE (args match) or FALSE (args dont match) value.
+#: vms-tir.c:1180
 msgid "PASSMECH not fully implemented"
 msgstr "PASSMECH pas complètement implanté"
 
-#: vms-tir.c:1256
-msgid "Stack-local-symbol not fully implemented"
-msgstr "Stack-local-symbol pas complètement implanté"
+#: vms-tir.c:1199
+msgid "stack-local-symbol not fully implemented"
+msgstr "symbole local de pile pas complètement implanté"
 
-#: vms-tir.c:1271
-msgid "Stack-literal not fully implemented"
-msgstr "Stack-literal pas complètement implanté"
+#: vms-tir.c:1212
+msgid "stack-literal not fully implemented"
+msgstr "litéral de pile pas complètement implanté"
 
-#: vms-tir.c:1294
-msgid "Stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "Stack-local-symbol-entry-point-mask pas complètement implanté"
+#: vms-tir.c:1233
+msgid "stack-local-symbol-entry-point-mask not fully implemented"
+msgstr "masque du symbole local de point d'entrée de pile pas complètement implanté"
 
-#: vms-tir.c:1469
+#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
+#: vms-tir.c:1619 vms-tir.c:1627
 #, c-format
-msgid "Unimplemented STO cmd %d"
-msgstr "Commande STO non implantée %d"
+msgid "%s: not fully implemented"
+msgstr "%s: pas complètement implanté"
 
-#: vms-tir.c:1608
-msgid "TIR_S_C_OPR_ASH incomplete"
-msgstr "TIR_S_C_OPR_ASH incomplète"
-
-#: vms-tir.c:1622
-msgid "TIR_S_C_OPR_USH incomplete"
-msgstr "TIR_S_C_OPR_USH incomplète"
-
-#: vms-tir.c:1636
-msgid "TIR_S_C_OPR_ROT incomplete"
-msgstr "TIR_S_C_OPR_ROT incomplète"
-
-#.
-#. * redefine symbol to current location
-#.
-#: vms-tir.c:1657
-msgid "TIR_S_C_OPR_REDEF not supported"
-msgstr "TIR_S_C_OPR_REDEF non supporté"
-
-#.
-#. * define a literal
-#.
-#: vms-tir.c:1664
-msgid "TIR_S_C_OPR_DFLIT not supported"
-msgstr "TIR_S_C_OPR_DFLIT non supporté"
-
-#: vms-tir.c:1718
-msgid "TIR_S_C_CTL_DFLOC not fully implemented"
-msgstr "TIR_S_C_CTL_DFLOC pas complètement implanté"
-
-#: vms-tir.c:1726
-msgid "TIR_S_C_CTL_STLOC not fully implemented"
-msgstr "TIR_S_C_CTL_STLOC pas complètement implanté"
-
-#: vms-tir.c:1734
-msgid "TIR_S_C_CTL_STKDL not fully implemented"
-msgstr "TIR_S_C_CTL_STKDL n'est pas complètement implanté"
-
-#: vms-tir.c:1791
+#: vms-tir.c:1684
 #, c-format
-msgid "Obj code %d not found"
-msgstr "Code objet %d non repéré"
+msgid "obj code %d not found"
+msgstr "code objet %d non repéré"
 
-#: vms-tir.c:2137
+#: vms-tir.c:2019
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr "SEC_RELOC sans relocalisation dans la section %s"
 
-#: vms-tir.c:2424
+#: vms-tir.c:2307
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "Relocalisation non traitée: %s"
 
-#: xcofflink.c:1241
+#: xcofflink.c:1243
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: « %s » contient des numéros de lignes mais de section de fermeture"
 
-#: xcofflink.c:1294
+#: xcofflink.c:1296
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: classe %d symbole « %s » n'a pas d'entrée auxiliaire"
 
-#: xcofflink.c:1317
+#: xcofflink.c:1319
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: symbole « %s » a un type csect non reconnu %d"
 
-#: xcofflink.c:1329
+#: xcofflink.c:1331
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: symbole XTY_ER erroné « %s »: classe %d scnum %d scnlen %d"
 
-#: xcofflink.c:1365
+#: xcofflink.c:1367
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: XMC_TC0 symbol « %s » est la classe %d scnlen %d"
 
-#: xcofflink.c:1517
+#: xcofflink.c:1519
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect « %s » n'est pas dans un section fermée"
 
-#: xcofflink.c:1624
+#: xcofflink.c:1626
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: XTY_LD mal placé « %s »"
 
-#: xcofflink.c:1948
+#: xcofflink.c:1957
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: relocalisation %s:%d n'est pas dans csect"
 
-#: xcofflink.c:2083
+#: xcofflink.c:2092
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: objet XCOFF partagé sans être en production de sortie XCOFF"
 
-#: xcofflink.c:2104
+#: xcofflink.c:2113
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: objet dynamique sans section .loader"
 
-#: xcofflink.c:2749
+#: xcofflink.c:2758
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: pas de tel symbole"
 
-#: xcofflink.c:2890
+#: xcofflink.c:2891
 msgid "error: undefined symbol __rtinit"
 msgstr "erreur: symbole __rtinit indéfini"
 
-#: xcofflink.c:3458
+#: xcofflink.c:3453
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "AVERTISSEMENT: tentative d'exportation d'un symbole indéfini « %s »"
 
-#: xcofflink.c:4452
+#: xcofflink.c:4447
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "Débordement de la table des entrées: 0x%lx > 0x10000; essayer l'option -mminimal-toc"
 
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: chargeur de relocalisation dans une section non reconnnue « %s »"
 
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: « %s » est dans le chargeur de relocalisation mais pas dans celui des symboles"
 
-#: xcofflink.c:5329
+#: xcofflink.c:5324
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: chargeur de relocalisation dans un section en lecture seulement %s"
 
-#: elf32-ia64.c:2190 elf64-ia64.c:2190
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
 msgid "@pltoff reloc against local symbol"
 msgstr "relocalisation @pltoff vers un symbole local"
 
-#: elf32-ia64.c:2248 elf64-ia64.c:2248
-msgid "non-zero addend in @fptr reloc"
-msgstr "ajout non null dans la relocalisation @fptr"
-
-#: elf32-ia64.c:3414 elf64-ia64.c:3414
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: débordement du segment de données court (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3425 elf64-ia64.c:3425
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp ne couvre pas ce segment de données court"
 
-#: elf32-ia64.c:3729 elf64-ia64.c:3729
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: liaison de code non-pic dans une librairie partagée"
 
-#: elf32-ia64.c:3762 elf64-ia64.c:3762
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: relocalisation @gprel vers le symbole dynamique %s"
 
-#: elf32-ia64.c:3901 elf64-ia64.c:3901
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
 #, c-format
 msgid "%s: dynamic relocation against speculation fixup"
 msgstr "%s: relocalisation dynamique vers un correctif spéculé"
 
-#: elf32-ia64.c:3909 elf64-ia64.c:3909
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
 #, c-format
 msgid "%s: speculation fixup against undefined weak symbol"
 msgstr "%s: correctif spéculé vers un symbole faible indéfini"
 
-#: elf32-ia64.c:4093 elf64-ia64.c:4093
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
 msgid "unsupported reloc"
 msgstr "relocalisation non supporté"
 
-#: elf32-ia64.c:4373 elf64-ia64.c:4373
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: édition de liens trap-on-NULL-dereference avec des fichiers non-trapping"
 
-#: elf32-ia64.c:4382 elf64-ia64.c:4382
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr ""
 "%s: édition de liens pour des fichiers en système à octets de poids fort\n"
 "avec des fichiers pour des systèmes à octets de poids faible"
 
-#: elf32-ia64.c:4391 elf64-ia64.c:4391
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: édition de liens de fichiers de 64 bits avec des fichiers de 32 bits"
 
-#: elf32-ia64.c:4400 elf64-ia64.c:4400
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: édition de liens de fichiers constant-gp avec des fichier non-constant-gp"
 
-#: elf32-ia64.c:4410 elf64-ia64.c:4410
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: édition de liens de fichiers auto-pic avec des fichiers non-auto-pic"
 
-#: peigen.c:964 pepigen.c:964
+#: peigen.c:962 pepigen.c:962
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: débordement du nombre de lignes: 0x%lx > 0xffff"
 
-#: peigen.c:981 pepigen.c:981
+#: peigen.c:979 pepigen.c:979
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
 msgstr "%s: débordement de la relocalisation 1: 0x%lx > 0xffff"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:993 pepigen.c:993
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "Répertoire d'exportation [.edata (ou là où il a été repéré)]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:994 pepigen.c:994
 msgid "Import Directory [parts of .idata]"
 msgstr "Répertoire d'importation [faisant partie de .idata]"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:995 pepigen.c:995
 msgid "Resource Directory [.rsrc]"
 msgstr "Répertoire des resources [.rsrc]"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:996 pepigen.c:996
 msgid "Exception Directory [.pdata]"
 msgstr "Répertoire des exceptions [.pdata]"
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:997 pepigen.c:997
 msgid "Security Directory"
 msgstr "Répertoire de la sécurité"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:998 pepigen.c:998
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Répertoire de base de relocalisation [.reloc]"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:999 pepigen.c:999
 msgid "Debug Directory"
 msgstr "Répertoire de débug"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1000 pepigen.c:1000
 msgid "Description Directory"
 msgstr "Répertoire de description"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1001 pepigen.c:1001
 msgid "Special Directory"
 msgstr "Répertoire spécial"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1002 pepigen.c:1002
 msgid "Thread Storage Directory [.tls]"
 msgstr "Répertoire des files de stockage [.tls]"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1003 pepigen.c:1003
 msgid "Load Configuration Directory"
 msgstr "Répertoire de chargement de configuration"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1004 pepigen.c:1004
 msgid "Bound Import Directory"
 msgstr "Répertoire des importations limitées"
 
-#: peigen.c:1007 pepigen.c:1007
+#: peigen.c:1005 pepigen.c:1005
 msgid "Import Address Table Directory"
 msgstr "Répertoire de la table d'adresse d'importation"
 
-#: peigen.c:1008 pepigen.c:1008
+#: peigen.c:1006 pepigen.c:1006
 msgid "Delay Import Directory"
 msgstr "Répertoire des délais d'importation"
 
-#: peigen.c:1009 peigen.c:1010 pepigen.c:1009 pepigen.c:1010
+#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
 msgid "Reserved"
 msgstr "Réservé"
 
-#: peigen.c:1073 pepigen.c:1073
+#: peigen.c:1071 pepigen.c:1071
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
@@ -2372,7 +2500,7 @@
 "\n"
 "Il y a une table d'importation, mais la section la contenant ne peut être repérée\n"
 
-#: peigen.c:1078 pepigen.c:1078
+#: peigen.c:1076 pepigen.c:1076
 #, c-format
 msgid ""
 "\n"
@@ -2381,7 +2509,7 @@
 "\n"
 "Il y a une table d'importation dans %s à 0x%lx\n"
 
-#: peigen.c:1115 pepigen.c:1115
+#: peigen.c:1113 pepigen.c:1113
 #, c-format
 msgid ""
 "\n"
@@ -2390,12 +2518,12 @@
 "\n"
 "Descripteur de fonction localisé à l'adresse de départ: %04lx\n"
 
-#: peigen.c:1118 pepigen.c:1118
+#: peigen.c:1116 pepigen.c:1116
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tcode-base %08lx tab. des entrées (chargeable/actuel) %08lx/%08lx\n"
 
-#: peigen.c:1124 pepigen.c:1124
+#: peigen.c:1122 pepigen.c:1122
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2403,7 +2531,7 @@
 "\n"
 "Pas de section reldata! Descripteur de fonction n'a pas été décodé.\n"
 
-#: peigen.c:1129 pepigen.c:1129
+#: peigen.c:1127 pepigen.c:1127
 #, c-format
 msgid ""
 "\n"
@@ -2412,15 +2540,15 @@
 "\n"
 "Les tables d'importation (contenus interprétés de la section %s)\n"
 
-#: peigen.c:1132 pepigen.c:1132
-msgid " vma:            Hint    Time      Forward  DLL       First\n"
-msgstr " vma:            Hint    Heure     Forward  DLL       Premier\n"
+#: peigen.c:1130 pepigen.c:1130
+msgid ""
+" vma:            Hint    Time      Forward  DLL       First\n"
+"                 Table   Stamp     Chain    Name      Thunk\n"
+msgstr ""
+" vma:            Hint    Temps     Avant    DLL       Premier\n"
+"                 Table   Estampil. Chaîne   Nom       Thunk\n"
 
-#: peigen.c:1134 pepigen.c:1134
-msgid "                 Table   Stamp     Chain    Name      Thunk\n"
-msgstr "                 Table   Tampon    Chaîne   Nom       Thunk\n"
-
-#: peigen.c:1182 pepigen.c:1182
+#: peigen.c:1181 pepigen.c:1181
 #, c-format
 msgid ""
 "\n"
@@ -2429,23 +2557,19 @@
 "\n"
 "\tNom DLL: %s\n"
 
-#: peigen.c:1186 peigen.c:1249 pepigen.c:1186 pepigen.c:1249
-msgid "\tvma:  Hint/Ord Member-Name\n"
-msgstr "\tvma:  Hint/Nom-de-membre nombre ordinal\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma:  Hint/Ord Membre      Lien\n"
 
-#: peigen.c:1248 pepigen.c:1248
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr "\tL'adresse de la table d'importation (différence détectée)\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Il y a un premier « thunk », mais la section le contenant ne peut être repérée\n"
 
-#: peigen.c:1255 pepigen.c:1255
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> membres IAT tous utilisés!\n"
-
-#: peigen.c:1273 pepigen.c:1273
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tL'adresse de la table d'importation est identique\n"
-
-#: peigen.c:1345 pepigen.c:1345
+#: peigen.c:1357 pepigen.c:1357
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
@@ -2453,7 +2577,7 @@
 "\n"
 "Il y a une table d'exportation, mais la section la contenant n'a pu être repérée\n"
 
-#: peigen.c:1350 pepigen.c:1350
+#: peigen.c:1362 pepigen.c:1362
 #, c-format
 msgid ""
 "\n"
@@ -2462,7 +2586,7 @@
 "\n"
 "Il y a une table d'exportation dans %s à 0x%lx\n"
 
-#: peigen.c:1381 pepigen.c:1381
+#: peigen.c:1393 pepigen.c:1393
 #, c-format
 msgid ""
 "\n"
@@ -2473,61 +2597,61 @@
 "Les tables d'exportation (contenus interprétés de la section %s)\n"
 "\n"
 
-#: peigen.c:1385 pepigen.c:1385
+#: peigen.c:1397 pepigen.c:1397
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Fanion d'exportation \t\t\t%lx\n"
 
-#: peigen.c:1388 pepigen.c:1388
+#: peigen.c:1400 pepigen.c:1400
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Tampon Heure/Date \t\t%lx\n"
 
-#: peigen.c:1391 pepigen.c:1391
+#: peigen.c:1403 pepigen.c:1403
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Majeur/Mineur \t\t\t%d/%d\n"
 
-#: peigen.c:1394 pepigen.c:1394
+#: peigen.c:1406 pepigen.c:1406
 msgid "Name \t\t\t\t"
 msgstr "Nom \t\t\t\t"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1412 pepigen.c:1412
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "base de nombre ordinal \t\t\t%ld\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1415 pepigen.c:1415
 msgid "Number in:\n"
 msgstr "Numéro dans:\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1418 pepigen.c:1418
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tTable d'adresses d'exportation \t\t%08lx\n"
 
-#: peigen.c:1410 pepigen.c:1410
+#: peigen.c:1422 pepigen.c:1422
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\tTable de noms [Pointeur/Nombre ordinal]\t%08lx\n"
 
-#: peigen.c:1413 pepigen.c:1413
+#: peigen.c:1425 pepigen.c:1425
 msgid "Table Addresses\n"
 msgstr "Table d'adresses\n"
 
-#: peigen.c:1416 pepigen.c:1416
+#: peigen.c:1428 pepigen.c:1428
 msgid "\tExport Address Table \t\t"
 msgstr "\tTable d'adresse d'exportation \t\t"
 
-#: peigen.c:1421 pepigen.c:1421
+#: peigen.c:1433 pepigen.c:1433
 msgid "\tName Pointer Table \t\t"
 msgstr "\tTable des noms de pointeurs \t\t"
 
-#: peigen.c:1426 pepigen.c:1426
+#: peigen.c:1438 pepigen.c:1438
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tTable des ordinals \t\t\t"
 
-#: peigen.c:1441 pepigen.c:1441
+#: peigen.c:1453 pepigen.c:1453
 #, c-format
 msgid ""
 "\n"
@@ -2536,15 +2660,15 @@
 "\n"
 "Table d'adresses d'exportation -- base de nombre ordinal %ld\n"
 
-#: peigen.c:1460 pepigen.c:1460
+#: peigen.c:1472 pepigen.c:1472
 msgid "Forwarder RVA"
 msgstr "Adresseur RVA"
 
-#: peigen.c:1471 pepigen.c:1471
+#: peigen.c:1483 pepigen.c:1483
 msgid "Export RVA"
 msgstr "Exportation RVA"
 
-#: peigen.c:1478 pepigen.c:1478
+#: peigen.c:1490 pepigen.c:1490
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2552,12 +2676,12 @@
 "\n"
 "Table [Ordinal/Nom de pointeurs]\n"
 
-#: peigen.c:1533 pepigen.c:1533
+#: peigen.c:1545 pepigen.c:1545
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "AVERTISSEMENT, taille de la section .pdata (%ld) n'est pas un multiple de %d\n"
 
-#: peigen.c:1537 pepigen.c:1537
+#: peigen.c:1549 pepigen.c:1549
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2565,31 +2689,31 @@
 "\n"
 "La table de fonctions (interprétation du contenu de la section .pdata)\n"
 
-#: peigen.c:1540 pepigen.c:1540
+#: peigen.c:1552 pepigen.c:1552
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tDébut Adresse    Fin Adresse      Unwind Info\n"
 
-#: peigen.c:1543 pepigen.c:1543
-msgid " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
-msgstr " vma:\t\tDébut    Fin      EH       EH       FinProlog  Exception\n"
+#: peigen.c:1554 pepigen.c:1554
+msgid ""
+" vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
+"     \t\tAddress  Address  Handler  Data     Address    Mask\n"
+msgstr ""
+" vma:\t\tDébut    Fin      EH       EH       FinProlog  Exception\n"
+"     \t\tAdresse  Adresse  Handler  Données  Adresse    Masque\n"
 
-#: peigen.c:1545 pepigen.c:1545
-msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
-msgstr "     \t\tAdresse  Adresse  Routine  Données  Adresse    Masque\n"
-
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1624 pepigen.c:1624
 msgid " Register save millicode"
 msgstr " Registre a préservé le millicode"
 
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1627 pepigen.c:1627
 msgid " Register restore millicode"
 msgstr " Registre a restauré le millicode"
 
-#: peigen.c:1619 pepigen.c:1619
+#: peigen.c:1630 pepigen.c:1630
 msgid " Glue code sequence"
 msgstr " Séquence du code de liants"
 
-#: peigen.c:1671 pepigen.c:1671
+#: peigen.c:1682 pepigen.c:1682
 msgid ""
 "\n"
 "\n"
@@ -2599,7 +2723,7 @@
 "\n"
 "Fichier de base des relocalisation PE (contenus interprétés de la section .reloc)\n"
 
-#: peigen.c:1701 pepigen.c:1701
+#: peigen.c:1712 pepigen.c:1712
 #, c-format
 msgid ""
 "\n"
@@ -2608,7 +2732,7 @@
 "\n"
 "Adresse virtuelle: %08lx taille des morceaux %ld (0x%lx) nombre de correctifs %ld\n"
 
-#: peigen.c:1714 pepigen.c:1714
+#: peigen.c:1725 pepigen.c:1725
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\trelocalisation %4d décalage %4x [%4lx] %s"
@@ -2616,7 +2740,7 @@
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1754 pepigen.c:1754
+#: peigen.c:1765 pepigen.c:1765
 #, c-format
 msgid ""
 "\n"
@@ -2625,8 +2749,134 @@
 "\n"
 "Caractéristiques 0x%x\n"
 
-#~ msgid "float"
-#~ msgstr "flottant"
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tL'adresse de la table d'importation (différence détectée)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> membres IAT tous utilisés!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tL'adresse de la table d'importation est identique\n"
+
+#~ msgid "GP relative relocation when GP not defined"
+#~ msgstr "GP relocalisation relative alors que GP n'est pas défini"
+
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen virgule flottance alors que la cible %s utilise des registres de valeursentières"
+
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen valeur entière alors que la cible %s utilise des registres de valeursen virgule flottante"
+
+#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
+#~ msgstr "AVERTISSEMENT: file d'entrée %s supporte l'inter-réseautage, contrairement à %s."
+
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "AVERTISSEMENT: fichier d'entrée %s ne supporte pas l'inter-réseautage, contrairement à %s."
+
+#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
+#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld prochain %ld"
+
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nom = %s, no. de symbole = %d, fanions = 0x%.8lx%s\n"
+
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s alors qu'il a déjè été spécifié sans inter-réseautage"
+
+#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
+#~ msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
+
+#~ msgid "(unknown)"
+#~ msgstr "(inconnu)"
+
+#~ msgid "  previously %s in %s"
+#~ msgstr " précédemment %s dans %s"
+
+#~ msgid "Symbol `%s' has differing types: %s in %s"
+#~ msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s"
+
+#~ msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_GBL: pas de symbole « %s »"
+
+#~ msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_CA: pas de symbole « %s »"
+
+#~ msgid "ETIR_S_C_STO_RB/AB: Not supported"
+#~ msgstr "ETIR_S_C_STO_RB/AB: non supporté"
+
+#~ msgid "ETIR_S_C_STO_LP_PSB: Not supported"
+#~ msgstr "ETIR_S_C_STO_LP_PSB: non supporté"
+
+#~ msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_GBL: pas implanté"
+
+#~ msgid "ETIR_S_C_STO_HINT_PS: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_PS: pas implanté"
+
+#~ msgid "ETIR_S_C_OPR_INSV: Not supported"
+#~ msgstr "ETIR_S_C_OPR_INSV: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_USH: Not supported"
+#~ msgstr "ETIR_S_C_OPR_USH: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_ROT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_ROT: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_REDEF: Not supported"
+#~ msgstr "ETIR_S_C_OPR_REDEF: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_DFLIT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_DFLIT: non supporté"
+
+#~ msgid "ETIR_S_C_STC_LP: not supported"
+#~ msgstr "ETIR_S_C_STC_LP: non supporté"
+
+#~ msgid "ETIR_S_C_STC_GBL: not supported"
+#~ msgstr "ETIR_S_C_STC_GBL: non supporté"
+
+#~ msgid "ETIR_S_C_STC_GCA: not supported"
+#~ msgstr "ETIR_S_C_STC_GCA: non supporté"
+
+#~ msgid "ETIR_S_C_STC_PS: not supported"
+#~ msgstr "ETIR_S_C_STC_PS: non supporté"
+
+#~ msgid "Unimplemented STO cmd %d"
+#~ msgstr "Commande STO non implantée %d"
+
+#~ msgid "TIR_S_C_OPR_ASH incomplete"
+#~ msgstr "TIR_S_C_OPR_ASH incomplète"
+
+#~ msgid "TIR_S_C_OPR_USH incomplete"
+#~ msgstr "TIR_S_C_OPR_USH incomplète"
+
+#~ msgid "TIR_S_C_OPR_ROT incomplete"
+#~ msgstr "TIR_S_C_OPR_ROT incomplète"
+
+#~ msgid "TIR_S_C_OPR_REDEF not supported"
+#~ msgstr "TIR_S_C_OPR_REDEF non supporté"
+
+#~ msgid "TIR_S_C_OPR_DFLIT not supported"
+#~ msgstr "TIR_S_C_OPR_DFLIT non supporté"
+
+#~ msgid "TIR_S_C_CTL_DFLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_DFLOC pas complètement implanté"
+
+#~ msgid "TIR_S_C_CTL_STLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STLOC pas complètement implanté"
+
+#~ msgid "TIR_S_C_CTL_STKDL not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STKDL n'est pas complètement implanté"
+
+#~ msgid " vma:            Hint    Time      Forward  DLL       First\n"
+#~ msgstr " vma:            Hint    Heure     Forward  DLL       Premier\n"
+
+#~ msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
+#~ msgstr "     \t\tAdresse  Adresse  Routine  Données  Adresse    Masque\n"
 
 #~ msgid "integer"
 #~ msgstr "entier"
@@ -2643,9 +2893,6 @@
 #~ msgid "supports"
 #~ msgstr "supporte"
 
-#~ msgid "does not support"
-#~ msgstr "n'est pas supportée"
-
 #~ msgid "does not"
 #~ msgstr "n'est pas"
 
@@ -2658,9 +2905,6 @@
 #~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
 #~ msgstr "%s(%s+0x%lx): ne peut relocaliser %s, recompiler avec -ffunction-sections"
 
-#~ msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s"
-#~ msgstr "Symbole `%s' a des types qui diffèrent: précédemment %s, ENREGISTRÉ dans %s"
-
 #~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
 #~ msgstr "création de la section des symboles, nom = %s, valeur = 0x%.8lx, index = %d, section = 0x%.8lx\n"
 
diff --git a/bfd/po/sv.po b/bfd/po/sv.po
index ca8ecd9..e73f09b 100644
--- a/bfd/po/sv.po
+++ b/bfd/po/sv.po
@@ -4,16 +4,16 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-31 17:07+0000\n"
-"PO-Revision-Date: 2002-01-30 02:35+0100\n"
+"Project-Id-Version: bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-30 21:55+0200\n"
 "Last-Translator: Christian Rose <menthos@menthos.com>\n"
 "Language-Team: Swedish <sv@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=iso-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aout-adobe.c:196
+#: aout-adobe.c:197
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: Okänd sektionstyp i a.out.adobe-fil: %x\n"
@@ -40,16 +40,14 @@
 
 #: aoutx.h:1669
 #, c-format
-msgid ""
-"%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr ""
-"%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
+msgid "%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr "%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
 
 #: aoutx.h:1671
 msgid "*unknown*"
 msgstr "*okänd*"
 
-#: aoutx.h:3735
+#: aoutx.h:3732
 #, c-format
 msgid "%s: relocateable link from %s to %s not supported"
 msgstr "%s: omlokaliseringsbar länk från %s till %s stöds inte"
@@ -169,9 +167,7 @@
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr ""
-"Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen "
-"byte 0x%lx."
+msgstr "Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen byte 0x%lx."
 
 # src/menus.c:341
 #: coff-a29k.c:119
@@ -183,7 +179,7 @@
 msgid "Missing IHIHALF"
 msgstr "IHIHALF saknas"
 
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:229
 msgid "Unrecognized reloc"
 msgstr "Okänd omlokalisering"
 
@@ -195,7 +191,7 @@
 msgid "missing IHIHALF reloc"
 msgstr "IHIHALF-omlokalisering saknas"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
 msgid "GP relative relocation used when GP not defined"
 msgstr "GP-relativ omlokalisering användes då GP inte är definierad"
 
@@ -203,178 +199,156 @@
 msgid "using multiple gp values"
 msgstr "använder flera gp-värden"
 
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: kunde inte hitta THUMB-klistret \"%s\" till \"%s\""
 
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: kunde inte hitta ARM-klistret \"%s\" till \"%s\""
 
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): varning: samverkande är inte aktiverat."
 
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  första förekomst: %s: arm-anrop till thumb"
 
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  första förekomst: %s: thumb-anrop till arm"
 
-#: coff-arm.c:1477
+#: coff-arm.c:1493
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  överväg omlänkning med --support-old-code aktiverat"
 
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: felaktig omlokaliseringsadress 0x%lx i sektionen \"%s\""
 
-#: coff-arm.c:2107
+#: coff-arm.c:2127
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: otillåtet symbolindex i omlokalisering: %d"
 
-#: coff-arm.c:2235
+#: coff-arm.c:2255
 #, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr "%s: FEL: kompilerad för APCS-%d där målet %s använder APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "FEL: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
 
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
 #, c-format
-msgid ""
-"%s: ERROR: passes floats in float registers whereas target %s uses integer "
-"registers"
-msgstr ""
-"%s: FEL: skickar flyttal i flyttalsregister där målet %s istället använder "
-"heltalsregister"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "FEL: %s skickar flyttal i flyttalsregister, medan %s skickar dem i heltalsregister"
 
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
 #, c-format
-msgid ""
-"%s: ERROR: passes floats in integer registers whereas target %s uses float "
-"registers"
-msgstr ""
-"%s: FEL: skickar flyttal i heltalsregister där målet %s istället använder "
-"flyttalsregister"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "FEL: %s skickar flyttal i heltalsregister, medan %s skickar dem i flyttalsregister"
 
-#: coff-arm.c:2268
+#: coff-arm.c:2288
 #, c-format
-msgid ""
-"%s: ERROR: compiled as position independent code, whereas target %s is "
-"absolute position"
-msgstr ""
-"%s: FEL: kompilerad som positionsoberoende kod, där målet %s istället har "
-"absolut position"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "FEL: %s är kompilerad som positionsoberoende kod, medan målet %s har absolut position"
 
-#: coff-arm.c:2271
+#: coff-arm.c:2291
 #, c-format
-msgid ""
-"%s: ERROR: compiled as absolute position code, whereas target %s is position "
-"independent"
-msgstr ""
-"%s: FEL: kompilerad som kod med absolut position, där målet %s istället är "
-"positionsoberoende"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "FEL: %s är kompilerad som kod med absolut position, medan målet %s är positionsoberoende"
 
-#: coff-arm.c:2300
-#, fuzzy, c-format
-msgid "Warning: %s supports interworking, whereas %s does not."
+#: coff-arm.c:2320 elf32-arm.h:2358
+#, c-format
+msgid "Warning: %s supports interworking, whereas %s does not"
 msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
 
-#: coff-arm.c:2303
-#, fuzzy, c-format
-msgid "Warning: %s does not support interworking, whereas %s does."
+#: coff-arm.c:2323 elf32-arm.h:2365
+#, c-format
+msgid "Warning: %s does not support interworking, whereas %s does"
 msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
 
-#: coff-arm.c:2330
+#: coff-arm.c:2350
 #, c-format
 msgid "private flags = %x:"
 msgstr "privata flaggor = %x:"
 
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
 msgid " [floats passed in float registers]"
 msgstr " [flyttal skickade i flyttalsregister]"
 
-#: coff-arm.c:2340
+#: coff-arm.c:2360
 msgid " [floats passed in integer registers]"
 msgstr " [flyttal skickade i heltalsregister]"
 
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
 msgid " [position independent]"
 msgstr " [positionsoberoende]"
 
-#: coff-arm.c:2345
+#: coff-arm.c:2365
 msgid " [absolute position]"
 msgstr " [absolut position]"
 
-#: coff-arm.c:2349
+#: coff-arm.c:2369
 msgid " [interworking flag not initialised]"
 msgstr " [samverkandeflagga är inte initierad]"
 
-#: coff-arm.c:2351
+#: coff-arm.c:2371
 msgid " [interworking supported]"
 msgstr " [samverkan stöds]"
 
-#: coff-arm.c:2353
+#: coff-arm.c:2373
 msgid " [interworking not supported]"
 msgstr " [samverkan stöds inte]"
 
-#: coff-arm.c:2401 elf32-arm.h:2114
-#, fuzzy, c-format
-msgid ""
-"Warning: Not setting interworking flag of %s since it has already been "
-"specified as non-interworking"
-msgstr ""
-"Varning: Ställer inte in samverkansflaggan för %s, eftersom den redan har "
-"angivits som inte samverkande"
+#: coff-arm.c:2421 elf32-arm.h:2124
+#, c-format
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "Varning: Ställer inte in samverkansflaggan för %s eftersom den redan har angivits som inte samverkande"
 
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2425 elf32-arm.h:2128
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr ""
-"Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
+msgstr "Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
 
 #: coff-i960.c:136 coff-i960.c:485
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "osäker anropskonvention för icke-COFF-symbol"
 
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9954
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
 msgid "unsupported reloc type"
 msgstr "omlokaliseringstypen stöds inte"
 
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
 msgid "GP relative relocation when _gp not defined"
 msgstr "GP-relativ omlokalisering då _gp inte var definierat"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
 msgid "reloc against unsupported section"
 msgstr "omlokalisering mot sektion som inte stöds"
 
-#: coff-mips.c:2476
+#: coff-mips.c:2474
 msgid "reloc not properly aligned"
 msgstr "omlokalisering inte på jämn gräns"
 
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: omlokaliseringstypen 0x%02x stöds inte"
 
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
-msgstr ""
-"%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
+msgstr "%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
 
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: symbolen \"%s\" har okänd smclas %d"
@@ -384,7 +358,7 @@
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Okänd omlokaliseringstyp 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4868
+#: coff-tic54x.c:390 coffcode.h:4974
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: varning: otillåtet symbolindex %ld i omlokaliseringarna"
@@ -394,37 +368,37 @@
 msgid "ignoring reloc %s\n"
 msgstr "ignorerar omlokalisering %s\n"
 
-#: coffcode.h:1081
+#: coffcode.h:1086
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): Sektionsflaggan %s (0x%x) ignorerades"
 
-#: coffcode.h:2132
+#: coffcode.h:2143
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Okänt TI COFF-målid \"0x%x\""
 
-#: coffcode.h:4257
+#: coffcode.h:4365
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: varning: otillåtet symbolindex %ld i radnummer"
 
-#: coffcode.h:4271
+#: coffcode.h:4379
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: varning: dubbel radnummersinformation för \"%s\""
 
-#: coffcode.h:4630
+#: coffcode.h:4736
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: Okänd lagringsklass %d för %s-symbolen \"%s\""
 
-#: coffcode.h:4761
+#: coffcode.h:4867
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "varning: %s: lokala symbolen \"%s\" har ingen sektion"
 
-#: coffcode.h:4906
+#: coffcode.h:5012
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: otillåten omlokaliseringstyp %d på adress 0x%lx"
@@ -434,110 +408,92 @@
 msgid "%s: bad string table size %lu"
 msgstr "%s: felaktig strängtabellstorlek %lu"
 
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "Varning: typen på symbolen \"%s\" ändrades från %d till %d i %s"
 
-#: cofflink.c:2317
+#: cofflink.c:2321
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
 
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: omlokalisering ger överspill: 0x%lx > 0xffff"
 
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: varning: %s: radnummer ger överspill: 0x%lx > 0xffff"
 
-#: dwarf2.c:381
+#: dwarf2.c:382
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_str."
 
-#: dwarf2.c:398
+#: dwarf2.c:399
 #, c-format
-msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
-msgstr ""
-"Dwarf-fel: DW_FORM_strp-avståndet (%u) större än eller lika med storleken "
-"på .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Dwarf-fel: DW_FORM_strp-avståndet (%lu) större än eller lika med storleken på .debug_str (%lu)."
 
-#: dwarf2.c:542
+#: dwarf2.c:543
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_abbrev."
 
-#: dwarf2.c:559
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
-msgstr ""
-"Dwarf-fel: Förkortningsavståndet (%u) större än eller lika med "
-"förkortningsstorleken (%u)."
-
-#: dwarf2.c:756
+#: dwarf2.c:560
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %d."
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Dwarf-fel: Förkortningsavståndet (%lu) större än eller lika med storleken .debug_abbrev (%lu)."
 
-#: dwarf2.c:843
+#: dwarf2.c:757
+#, c-format
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %u."
+
+#: dwarf2.c:852
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Dwarf-fel: trasig radnummerssektion (felaktigt filnummer)."
 
-#: dwarf2.c:929
+#: dwarf2.c:938
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_line."
 
-#: dwarf2.c:952
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
-msgstr ""
-"Dwarf-fel: Radavståndet (%u) större än eller lika med radstorleken (%u)."
+#: dwarf2.c:961
+#, c-format
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Dwarf-fel: Radavståndet (%lu) större än eller lika med storleken .debug_line (%lu)."
 
-#: dwarf2.c:1143
+#: dwarf2.c:1159
 msgid "Dwarf Error: mangled line number section."
 msgstr "Dwarf-fel: trasig radnummerssektion."
 
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1355 dwarf2.c:1566
 #, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %u."
 
-#: dwarf2.c:1490
+#: dwarf2.c:1527
 #, c-format
-msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
-"information."
-msgstr ""
-"Dwarf-fel: hittade dwarf version \"%hu\", denna läsare hanterar endast "
-"information från version 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Dwarf-fel: hittade dwarf version \"%u\", denna läsare hanterar endast information från version 2."
 
-#: dwarf2.c:1497
+#: dwarf2.c:1534
 #, c-format
-msgid ""
-"Dwarf Error: found address size '%u', this reader can not handle sizes "
-"greater than '%u'."
-msgstr ""
-"Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera "
-"storlekar större än \"%u\"."
+msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
+msgstr "Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera storlekar större än \"%u\"."
 
-#: dwarf2.c:1520
+#: dwarf2.c:1557
 #, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %u."
 
-#: ecoff.c:1328
+#: ecoff.c:1318
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Okänd grundtyp %d"
 
-#: ecoff.c:1597
+#: ecoff.c:1578
 #, c-format
 msgid ""
 "\n"
@@ -546,7 +502,7 @@
 "\n"
 "      Symbol slut+1: %ld"
 
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
 #, c-format
 msgid ""
 "\n"
@@ -555,7 +511,7 @@
 "\n"
 "      Första symbolen: %ld"
 
-#: ecoff.c:1619
+#: ecoff.c:1600
 #, c-format
 msgid ""
 "\n"
@@ -564,7 +520,7 @@
 "\n"
 "      Symbol slut+1: %-7ld  Typ:  %s"
 
-#: ecoff.c:1626
+#: ecoff.c:1607
 #, c-format
 msgid ""
 "\n"
@@ -573,7 +529,7 @@
 "\n"
 "      Lokal symbol: %ld"
 
-#: ecoff.c:1634
+#: ecoff.c:1615
 #, c-format
 msgid ""
 "\n"
@@ -582,7 +538,7 @@
 "\n"
 "      struct; symbol slut+1: %ld"
 
-#: ecoff.c:1639
+#: ecoff.c:1620
 #, c-format
 msgid ""
 "\n"
@@ -591,7 +547,7 @@
 "\n"
 "      union; symbol slut+1: %ld"
 
-#: ecoff.c:1644
+#: ecoff.c:1625
 #, c-format
 msgid ""
 "\n"
@@ -600,7 +556,7 @@
 "\n"
 "      enum; symbol slut+1: %ld"
 
-#: ecoff.c:1650
+#: ecoff.c:1631
 #, c-format
 msgid ""
 "\n"
@@ -609,37 +565,35 @@
 "\n"
 "      Typ: %s"
 
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
-#: elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
 #, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-"%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
+msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
 
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
 msgid "internal error: out of range error"
 msgstr "internt fel: utanför intervallet"
 
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7587 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
 msgid "internal error: unsupported relocation error"
 msgstr "internt fel: omlokaliseringen stöds inte"
 
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
 msgid "internal error: dangerous error"
 msgstr "internt fel: farligt fel"
 
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
 msgid "internal error: unknown error"
 msgstr "internt fel: okänt fel"
 
@@ -648,17 +602,17 @@
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: ogiltigt strängavstånd %u >= %lu för sektionen \"%s\""
 
-#: elf.c:448
+#: elf.c:589
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: ogiltig SHT_GROUP-post"
 
-#: elf.c:529
+#: elf.c:660
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: ingen gruppinformation för sektionen %s"
 
-#: elf.c:840
+#: elf.c:1023
 msgid ""
 "\n"
 "Program Header:\n"
@@ -666,7 +620,7 @@
 "\n"
 "Programhuvud:\n"
 
-#: elf.c:889
+#: elf.c:1073
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -674,7 +628,7 @@
 "\n"
 "Dynamisk sektion:\n"
 
-#: elf.c:1018
+#: elf.c:1202
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -682,7 +636,7 @@
 "\n"
 "Versionsdefinitioner:\n"
 
-#: elf.c:1041
+#: elf.c:1225
 msgid ""
 "\n"
 "Version References:\n"
@@ -690,239 +644,181 @@
 "\n"
 "Versionsreferenser:\n"
 
-#: elf.c:1046
+#: elf.c:1230
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  krävs från %s:\n"
 
-#: elf.c:1682
+#: elf.c:1902
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: ogiltig länk %lu för omlokaliseringssektion %s (index %u)"
 
-#: elf.c:3296
+#: elf.c:3603
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr ""
-"%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver "
-"%u)"
+msgstr "%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver %u)"
 
-#: elf.c:3400
+#: elf.c:3708
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr ""
-"%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
+msgstr "%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
 
-#: elf.c:3525
+#: elf.c:3833
 #, c-format
-msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-"Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet "
-"börjar med 0x%x"
+msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
+msgstr "Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet börjar med 0x%x"
 
-#: elf.c:3811
+#: elf.c:4148
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: varning: allokerad sektion \"%s\" inte i segment"
 
-#: elf.c:4142
+#: elf.c:4472
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: symbolen \"%s\" krävs men finns inte med"
 
-#: elf.c:4395
+#: elf.c:4749
 #, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: varning: Tomt inläsningsbart segment upptäckt\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: varning: Tomt inläsningsbart segment upptäckt, är detta meningen?\n"
 
-#: elf.c:5808
+#: elf.c:6193
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: omlokaliseringstypen %s stöds inte"
 
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
-msgstr ""
-"%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
+msgstr "%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
 
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
-msgstr ""
-"%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som "
-"mål."
+msgstr "%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som mål."
 
-#: elf32-arm.h:1904 elf32-i386.c:1778 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): %s omlokalisering mot SEC_MERGE-sektion"
 
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
 #, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr ""
-"%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
+msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+msgstr "%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-arm.h:2166
-#, fuzzy, c-format
-msgid ""
-"Warning: Clearing the interworking flag of %s because non-interworking code "
-"in %s has been linked with it"
-msgstr ""
-"Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %"
-"s har länkats med det"
-
-#: elf32-arm.h:2261
+#: elf32-arm.h:2176
 #, c-format
-msgid ""
-"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr ""
-"Fel: %s kompilerades för EABI version %d, medan %s kompilerades för version %"
-"d"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %s har länkats med det"
 
-#: elf32-arm.h:2275
+#: elf32-arm.h:2271
 #, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "Fel: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "FEL: %s är kompilerad för EABI version %d, medan %s är kompilerad för version %d"
 
-#: elf32-arm.h:2287
+#: elf32-arm.h:2285
 #, c-format
-msgid ""
-"Error: %s passes floats in FP registers, whereas %s passes them in integer "
-"registers"
-msgstr ""
-"Fel: %s skickar flyttal i flyttalsregister, medan %s skickar dem i "
-"heltalsregister"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "FEL: %s är kompilerad för APCS-%d, medan målet %s använder APCS-%d"
 
-#: elf32-arm.h:2292
+#: elf32-arm.h:2313
 #, c-format
-msgid ""
-"Error: %s passes floats in integer registers, whereas %s passes them in FP "
-"registers"
-msgstr ""
-"Fel: %s skickar flyttal i heltalsregister, medan %s skickar dem i "
-"flyttalsregister"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "FEL: %s använder VFP-instruktioner, medan %s använder FPA-instruktioner"
 
-# Tror det saknas "uses" här
-#: elf32-arm.h:2303
-#, fuzzy, c-format
-msgid "Error: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr ""
-"Fel: %s använder VFP-instruktioner, medan %s använder FPA-instruktioner"
-
-# Tror det saknas "uses" här
-#: elf32-arm.h:2308
-#, fuzzy, c-format
-msgid "Error: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr ""
-"Fel: %s använder FPA-instruktioner, medan %s använder VFP-instruktioner"
-
-#: elf32-arm.h:2328
+#: elf32-arm.h:2318
 #, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr "Fel: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "FEL: %s använder FPA-instruktioner, medan %s använder VFP-instruktioner"
 
-#: elf32-arm.h:2333
+#: elf32-arm.h:2338
 #, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr "Fel: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "FEL: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
 
-#: elf32-arm.h:2348
+#: elf32-arm.h:2343
 #, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "FEL: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3242
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
 #, c-format
 msgid "private flags = %lx:"
 msgstr "privata flaggor = %lx:"
 
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
 msgid " [interworking enabled]"
 msgstr " [samverkande är aktiverat]"
 
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
 msgid " [VFP float format]"
 msgstr " [VFP-flyttalsformat]"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
 msgid " [FPA float format]"
 msgstr " [FPA-flyttalsformat]"
 
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
 msgid " [new ABI]"
 msgstr " [nytt ABI]"
 
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
 msgid " [old ABI]"
 msgstr " [gammalt ABI]"
 
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
 msgid " [software FP]"
 msgstr " [programvaru-FP]"
 
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
 msgid " [Version1 EABI]"
 msgstr " [Version1 EABI]"
 
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
 msgid " [sorted symbol table]"
 msgstr " [sorterad symboltabell]"
 
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
 msgid " [unsorted symbol table]"
 msgstr " [osorterad symboltabell]"
 
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
 msgid " [dynamic symbols use segment index]"
 msgstr " [dynamiska symboler använder segmentindex]"
 
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
 msgid " [mapping symbols precede others]"
 msgstr " [mappsymboler har företräde före andra]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
 msgid " <EABI version unrecognised>"
 msgstr " <EABI-version känns inte igen>"
 
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
 msgid " [relocatable executable]"
 msgstr " [omlokaliseringsbar körbar fil]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
 msgid " [has entry point]"
 msgstr " [har startpunkt]"
 
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
 msgid "<Unrecognised flag bits set>"
 msgstr "<Okända flaggbitar satta>"
 
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
 msgid "internal error: dangerous relocation"
 msgstr "internt fel: farlig omlokalisering"
 
@@ -933,188 +829,198 @@
 
 #: elf32-cris.c:1012
 #, c-format
-msgid ""
-"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: Varken någon PLT eller GOT för omlokalisering %s  mot symbolen \"%s\" "
-"från sektionen %s"
+msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+msgstr "%s: Varken någon PLT eller GOT för omlokalisering %s  mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
 msgid "[whose name is lost]"
 msgstr "[vars namn tappats bort]"
 
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
 #, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against local symbol from %s "
-"section"
-msgstr ""
-"%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från "
-"sektionen %s"
+msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
+msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från sektionen %s"
 
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
 #, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr ""
-"%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från "
-"sektionen %s"
+msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
 #, c-format
-msgid ""
-"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr ""
-"%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från "
-"sektionen %s"
+msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+msgstr "%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1171
-#, fuzzy, c-format
+#: elf32-cris.c:1170
+#, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
+msgstr "%s: omlokalisering %s i sektionen %s utan GOT skapad"
 
-#: elf32-cris.c:1289
+#: elf32-cris.c:1288
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: Intern inkonsistens; ingen omlokaliseringssektion %s"
 
-#: elf32-cris.c:2523
+#: elf32-cris.c:2514
 #, c-format
 msgid ""
 "%s, section %s:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 "%s, sektion %s:\n"
-"  omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med "
-"-fPIC"
+"  omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med -fPIC"
 
-#: elf32-cris.c:2994
+#: elf32-cris.c:2991
 msgid " [symbols have a _ prefix]"
 msgstr " [symboler har ett _-prefix]"
 
-#: elf32-cris.c:3033
+#: elf32-cris.c:3030
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr ""
-"%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
+msgstr "%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
 
-#: elf32-cris.c:3034
+#: elf32-cris.c:3031
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr ""
-"%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
+msgstr "%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
+
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: kompilerad med %s och länkad med moduler som använder icke-pic-omlokalisering"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: kompilerad med %s och länkad med moduler som kompilerats med %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: använder andra okända e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "privata flaggor = 0x%lx:"
 
 #: elf32-gen.c:82 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: Omlokalisering i allmän ELF (EM: %d)"
 
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: kan inte skapa stubbstarten %s"
 
-#: elf32-hppa.c:937 elf32-hppa.c:3545
+#: elf32-hppa.c:956 elf32-hppa.c:3555
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): kan inte nå %s, kompilera om med -ffunction-sections"
 
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
 #, c-format
-msgid ""
-"%s: relocation %s can not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; "
-"kompilera om med -fPIC"
+msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; kompilera om med -fPIC"
 
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
 #, c-format
-msgid ""
-"%s: relocation %s should not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; "
-"kompilera om med -fPIC"
+msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; kompilera om med -fPIC"
 
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "Kunde inte hitta omlokaliseringssektion för %s"
 
-#: elf32-hppa.c:2867
+#: elf32-hppa.c:2855
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: dubbel exportstubb %s"
 
-#: elf32-hppa.c:3429
+#: elf32-hppa.c:3433
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): fixar %s"
 
-#: elf32-hppa.c:4069
+#: elf32-hppa.c:4080
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): kan inte hantera %s för %s"
 
-#: elf32-hppa.c:4408
+#: elf32-hppa.c:4393
 msgid ".got section not immediately after .plt section"
 msgstr ".got-sektionen följer inte omedelbart efter .plt-sektion"
 
-#: elf32-i386.c:298
+#: elf32-i386.c:379
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: ogiltig omlokaliseringstyp %d"
 
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: felaktigt symbolindex: %d"
 
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: felaktig omlokaliseringssektionsnamn \"%s\""
 
-#: elf32-i386.c:2069 elf32-s390.c:1951 elf64-ppc.c:4124 elf64-s390.c:1955
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): olöslig omlokalisering mot symbolen \"%s\""
 
-#: elf32-i386.c:2107 elf32-s390.c:1989 elf64-s390.c:1993
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): omlokalisering mot \"%s\": fel %d"
 
-#: elf32-m32r.c:923
+#: elf32-m32r.c:924
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "SDA-omlokalisering då _SDA_BASE_ inte är definierat"
 
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: okänd omlokaliseringstyp %d"
 
-#: elf32-m32r.c:1223
+#: elf32-m32r.c:1221
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel sektion (%s)"
 
-#: elf32-m32r.c:2000
+#: elf32-m32r.c:1947
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: Instruktionsuppsättning passar inte med tidigare moduler"
 
-#: elf32-m32r.c:2023
+#: elf32-m32r.c:1970
 #, c-format
 msgid "private flags = %lx"
 msgstr "privata flaggor = %lx"
 
-#: elf32-m32r.c:2028
+#: elf32-m32r.c:1975
 msgid ": m32r instructions"
 msgstr ": m32r-instruktioner"
 
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1976
 msgid ": m32rx instructions"
 msgstr ": m32rx-instruktioner"
 
@@ -1122,255 +1028,177 @@
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: Omlokalisering %s (%d) stöds för närvarande inte.\n"
 
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: Okänd omlokaliseringstyp %d\n"
 
-#: elf32-mips.c:2156 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "32-bitars gp-relativ omlokalisering förekom för en extern symbol"
 
-#: elf32-mips.c:2305
+#: elf32-mips.c:1301
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Länkning av mips16-objekt till %s-format stöds inte"
 
-#: elf32-mips.c:3129
+#: elf32-ppc.c:1460
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: länkar PIC-filer med icke-PIC-filer"
+msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats normalt"
 
-#: elf32-mips.c:3139
+#: elf32-ppc.c:1468
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%s: kompilerad normalt och länkad med moduler som kompilerats med -mrelocatable"
 
-#: elf32-mips.c:3168
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
-
-#: elf32-mips.c:3177
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
-
-#: elf32-mips.c:3200
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
-
-#: elf32-mips.c:3214 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
 #, c-format
 msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
 
-#: elf32-mips.c:3245
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3249
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3251
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3253
-msgid " [abi unknown]"
-msgstr " [okänt abi]"
-
-#: elf32-mips.c:3255
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3257
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3259
-msgid " [no abi set]"
-msgstr " [inget abi inställt]"
-
-#: elf32-mips.c:3262
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3264
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3266
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3268
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3270
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3272
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3274
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3276
-msgid " [unknown ISA]"
-msgstr " [okänd ISA]"
-
-#: elf32-mips.c:3279
-msgid " [32bitmode]"
-msgstr " [32-bitarsläge]"
-
-#: elf32-mips.c:3281
-msgid " [not 32bitmode]"
-msgstr " [inte 32-bitarsläge]"
-
-#: elf32-mips.c:4954
-msgid "static procedure (no name)"
-msgstr "statisk procedur (inget namn)"
-
-#: elf32-mips.c:5572 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: ogiltigt sektionsnamn \"%s\""
-
-#: elf32-mips.c:6139 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
-
-#: elf32-mips.c:7250 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
-
-#: elf32-mips.c:8259 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
-
-#: elf32-mips.c:8337 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
-#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr ""
-"%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats "
-"normalt"
-
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
-#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr ""
-"%s: kompilerad normalt och länkad med moduler som kompilerats med -"
-"mrelocatable"
-
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1592
 #, c-format
 msgid "%s: Unknown special linker type %d"
 msgstr "%s: Okänd speciallänkartyp %d"
 
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas"
 
-#: elf32-ppc.c:3097 elf64-ppc.c:3716
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: okänd omlokaliseringstyp %d för symbolen %s"
 
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
 #, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)"
 
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
 #, c-format
 msgid "%s: Relocation %s is not yet supported for symbol %s."
 msgstr "%s: Omlokaliseringen %s stöds inte än för symbolen %s."
 
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-avstånd"
 
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: varning: R_SH_USES pekar till okänd instruktion 0x%x"
 
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-inläsningsavstånd"
 
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad omlokalisering"
 
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: varning: symbol i oväntad sektion"
 
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad COUNT-omlokalisering"
 
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: varning: felaktigt antal"
 
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: ödesdigert: omlokalisering ger överspill vid förenklingen"
 
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "Oväntat STO_SH5_ISA32 på lokal symbol hanteras inte"
+
+#: elf32-sh.c:4284
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr ""
-"%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för "
-"förenklingsstöd"
+msgstr "%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för förenklingsstöd"
 
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: kompilerat som 32-bitarsobjekt och %s är 64-bitars"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: kompilerat som 64-bitarsobjekt och %s är 32-bitars"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: objektstorleken stämmer inte överens med den hos målet %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: påträffade dataetikettssymbol i indata"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "PTB passar inte: en SHmedia-adress (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "PTA passar inte: en SHcompact-adress (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: GAS-fel: oväntad PTB-instruktion med R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: fel: ojusterad omlokaliseringstyp %d på %08x omlokalisering %08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: kunde inte skriva ut tillagda .cranges-poster"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: kunde inte skriva ut sorterade cranges-poster"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: troligen kompilerad utan -fPIC?"
 
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: kompilerat för ett 64-bitarssystem och målet är 32-bitars"
 
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr "%s: länkar little endian-filer med big endian-filer"
@@ -1382,32 +1210,23 @@
 
 #: elf32-v850.c:685
 #, c-format
-msgid ""
-"Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr ""
-"Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå "
-"dataområdena"
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå dataområdena"
 
 #: elf32-v850.c:688
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
 
 #: elf32-v850.c:691
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
 
 #: elf32-v850.c:694
 #, c-format
-msgid ""
-"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
 
 #: elf32-v850.c:1072
 msgid "FAILED to find previous HI16 reloc\n"
@@ -1425,246 +1244,494 @@
 msgid "could not locate special linker symbol __ctbp"
 msgstr "kunde inte lokalisera speciell länkarsymbol __ctbp"
 
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: Arkitekturen passar inte ihop med tidigare moduler"
 
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
 #, c-format
 msgid "private flags = %lx: "
 msgstr "privata flaggor = %lx: "
 
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
 msgid "v850 architecture"
 msgstr "v850-arkitektur"
 
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
 msgid "v850e architecture"
 msgstr "v850e-arkitektur"
 
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
 msgid "v850ea architecture"
 msgstr "v850ea-arkitektur"
 
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [icke-pic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [d-flyttal]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [g-flyttal]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: varning: GOT-addendum %ld till \"%s\" stämmer inte överens med tidigare GOT-addendum %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: varning: PLT-addendum %d till \"%s\" från sektionen %s ignorerades"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: varning: %s-omlokalisering mot symbolen \"%s\" från sektionen %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: varning: %s-omlokalisering till 0x%x från sektionen %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
 msgid "non-zero addend in @fptr reloc"
 msgstr "icke-tomt addendum i @fptr-omlokalisering"
 
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1097
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "GPDISP-omlokalisering hittade inga ldah- och lda-instruktioner"
 
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: .got-subsegment överskrider 64 kB (storlek %d)"
 
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: gp-relativ omlokalisering mot dynamiska symbolen %s"
 
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: pc-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: ändring i gp: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<okänd>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: !samegp-omlokalisering mot symbol utan .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: ohanterad dynamisk omlokalisering mot %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: dtp-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: tp-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-hppa.c:2080
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "stubbpost för %s kan inte läsa in .plt, dp-avstånd = %ld"
 
-# Bör rapportera detta
-#
-#  (_("%s: register relocation against non-register symbol: %s in %s"),
-# 	bfd_get_filename (input_section->owner),
-# 	symname == NULL || *symname == 0 ? _("(unknown)") : symname,
-# 	bfd_get_section_name (symsec->owner, symsec));
-#
-#: elf64-mmix.c:1271
-#, fuzzy, c-format
-msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: Intern inkkonsistensfel för värdet för\n"
+" länkarallokerat globalt register: länkat: 0x%lx%08lx != avslappnat: 0x%lx%08lx\n"
 
-# Bör rapportera detta
-#
-#  (_("%s: register relocation against non-register symbol: %s in %s"),
-# 	bfd_get_filename (input_section->owner),
-# 	symname == NULL || *symname == 0 ? _("(unknown)") : symname,
-# 	bfd_get_section_name (symsec->owner, symsec));
-#
-#: elf64-mmix.c:1276
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: (okänd) i %s"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: %s i %s"
+
+#: elf64-mmix.c:1435
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: registeromlokalisering mot icke-registersymbol: (okänd) i %s"
+
+#: elf64-mmix.c:1440
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
 
-#: elf64-mmix.c:1312
+#: elf64-mmix.c:1477
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr ""
-"%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
+msgstr "%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
 
-#: elf64-mmix.c:1340
+#: elf64-mmix.c:1505
 #, c-format
-msgid ""
-"%s: LOCAL directive: Register $%ld is not a local register.  First global "
-"register is $%ld."
-msgstr ""
-"%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första "
-"globala registret är $%ld."
+msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
+msgstr "%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första globala registret är $%ld."
 
-#: elf64-mmix.c:1615
+#: elf64-mmix.c:1965
 #, c-format
-msgid ""
-"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
-"linked file\n"
-msgstr ""
-"%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en "
-"tidigare länkad fil\n"
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en tidigare länkad fil\n"
 
-#: elf64-mmix.c:1674
+#: elf64-mmix.c:2024
 msgid "Register section has contents\n"
 msgstr "Registersektion har innehåll\n"
 
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Intern inkonsekvens: återstående %u != max %u.\n"
+"  Rapportera gärna detta fel."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr "%s: kompilerad för big endian-system och målet är little endian"
 
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr "%s: kompilerad för ett little endian-system och målet är big endian"
 
-#: elf64-ppc.c:3350
-#, fuzzy, c-format
+#: elf64-ppc.c:3610
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: oväntad omlokaliseringstyp %u i .opd-sektion"
+
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd är inte en vanlig vektor med opd-poster"
+
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: odefinierad symbol \"%s\" i .opd-sektion"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "kan inte hitta grenstubb \"%s\""
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
 msgid "linkage table error against `%s'"
-msgstr "länktabell spiller över mot \"%s\""
+msgstr "länktabellsfel mot \"%s\""
 
-#: elf64-ppc.c:3432
-msgid "stub section size doesn't match calculated size"
-msgstr "stubbsektionsstorleken stämmer inte överens med beräknad storlek"
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "kan inte bygga grenstubb \"%s\""
 
-#: elf64-ppc.c:4061
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "stubbar stämmer inte överens med beräknad storlek"
+
+#: elf64-ppc.c:5828
 #, c-format
 msgid "%s: Relocation %s is not supported for symbol %s."
 msgstr "%s: Omlokaliseringen %s stöds inte för symbolen %s."
 
-#: elf64-ppc.c:4105
+#: elf64-ppc.c:5872
 #, c-format
 msgid "%s: error: relocation %s not a multiple of 4"
 msgstr "%s: fel: omlokaliseringen %s är inte en multipel av 4"
 
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: ohanterad omlokaliseringstyp %d"
 
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: Endast register %%g[2367] kan deklareras med STT_REGISTER"
 
-#: elf64-sparc.c:1334
-#, fuzzy, c-format
+#: elf64-sparc.c:1337
+#, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "Register %%g%d används inkompatibelt: %s i %s"
+msgstr "Register %%g%d används inkompatibelt: %s i %s, tidigare %s i %s"
 
-#: elf64-sparc.c:1357
-#, fuzzy, c-format
+#: elf64-sparc.c:1360
+#, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr "Symbolen \"%s\" har olika typer: tidigare %s, REGISTER i %s"
+msgstr "Symbolen \"%s\" har olika typer: REGISTER i %s, tidigare %s i %s"
 
-#: elf64-sparc.c:1404
-#, fuzzy, c-format
+#: elf64-sparc.c:1406
+#, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
-msgstr "Symbolen \"%s\" har olika typer: tidigare %s, REGISTER i %s"
+msgstr "Symbolen \"%s\" har olika typer: %s i %s, tidigare REGISTER i %s"
 
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:2970
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: länkar UltraSPARC-specifik med HAL-specifik kod"
 
-#: elfcode.h:1218
+#: elfcode.h:1198
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: versionsantal (%ld) stämmer inte med symbolantal (%ld)"
 
-#: elflink.c:434
+#: elflink.c:440
 #, c-format
 msgid "%s: Section %s is too large to add hole of %ld bytes"
 msgstr "%s: Sektionen %s är för stor för att stoppa hål med %ld byte i"
 
-#: elflink.h:1113
+#: elflink.h:1090
 #, c-format
 msgid "%s: warning: unexpected redefinition of `%s'"
 msgstr "%s: varning: oväntad omdefinition av \"%s\""
 
-#: elflink.h:1784
+#: elflink.h:1727
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: ogiltig version %u (max %d)"
 
-#: elflink.h:1825
+#: elflink.h:1768
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: ogiltig krävd version %d"
 
-#: elflink.h:1945
+#: elflink.h:1890
 #, c-format
 msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
 msgstr "Varning: storleken på symbolen \"%s\" ändrades från %lu till %lu i %s"
 
-#: elflink.h:4014
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: .preinit_array-sektionen är inte tillåten i DSO"
+
+#: elflink.h:4030
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr ""
-"varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
+msgstr "varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
 
-#: elflink.h:4320
+#: elflink.h:4345
 #, c-format
 msgid "%s: undefined versioned symbol name %s"
 msgstr "%s: odefinierat symbolnamn med version %s"
 
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
 msgid "Error: out of memory"
 msgstr "Fel: slut på minne"
 
-#: elflink.h:4714
+#: elflink.h:4781
 msgid "Not enough memory to sort relocations"
 msgstr "Inte tillräckligt med minne för att sortera omlokaliseringar"
 
-#: elflink.h:5980
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: kunde inte hitta utdatasektionen %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "varning: %s-sektionen har nollstorlek"
+
+#: elflink.h:6275
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
-msgstr "%s: kunde inte hitta utdatasektion %s för indatasektionen %s"
+msgstr "%s: kunde inte hitta utdatasektionen %s för indatasektionen %s"
 
-#: elflink.h:6553
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: omlokaliseringsstorleken stämmer inte överens i %s-sektionen %s"
+
+#: elflink.h:6849
 msgid "warning: relocation against removed section; zeroing"
 msgstr "varning: omlokalisering mot borttagen sektion; nollställer"
 
-#: elflink.h:6583
+#: elflink.h:6879
 msgid "warning: relocation against removed section"
 msgstr "varning: omlokalisering mot borttagen sektion"
 
-#: elflink.h:6596
+#: elflink.h:6892
 #, c-format
 msgid "local symbols in discarded section %s"
 msgstr "lokala symboler i bortkastade sektionen %s"
 
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "statisk procedur (inget namn)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: ogiltigt sektionsnamn \"%s\""
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: länkar PIC-filer med icke-PIC-filer"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [okänt abi]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [inget abi inställt]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [okänd ISA]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [32-bitarsläge]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [inte 32-bitarsläge]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "Utdatafilen kräver delade biblioteket \"%s\"\n"
 
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Utdatafilen kräver delade biblioteket \"%s.so.%s\"\n"
 
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "Symbolen %s är inte definierad för fixar\n"
 
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
 msgid "Warning: fixup count mismatch\n"
 msgstr "Varning: antalet fixar stämmer inte\n"
 
@@ -1678,9 +1745,8 @@
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: okänd symbol \"%s\" flaggor 0x%x"
 
-# Ett extra blanksteg i originalet här
 #: ieee.c:877
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: inte implementerad ATI-post %u för symbolen %u"
 
@@ -1699,56 +1765,48 @@
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: oväntat tecken \"%s\" i hexadecimal Intel-fil\n"
 
-#: ihex.c:368
+#: ihex.c:366
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr ""
-"%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, "
-"hittade %u)"
+msgstr "%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, hittade %u)"
 
-#: ihex.c:422
+#: ihex.c:420
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
+msgstr "%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
 
-#: ihex.c:439
+#: ihex.c:437
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: felaktig längd på utökad startadress i hexadecimal Intel-fil"
 
-#: ihex.c:456
+#: ihex.c:454
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-"
-"fil"
+msgstr "%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-fil"
 
-#: ihex.c:473
+#: ihex.c:471
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal "
-"Intel-fil"
+msgstr "%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal Intel-fil"
 
-#: ihex.c:490
+#: ihex.c:488
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: okänd ihex-typ %u i hexadecimal Intel-fil\n"
 
-#: ihex.c:610
+#: ihex.c:607
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: internt fel i ihex_read_section"
 
-#: ihex.c:645
+#: ihex.c:642
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: felaktig sektionslängd i ihex_read_sektion"
 
-# Verkar vara stavfel i originalet här
-#: ihex.c:863
-#, fuzzy, c-format
+#: ihex.c:860
+#, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: adressen 0x%s är utanför intervallet för hexadecimal Intel-fil"
 
@@ -1761,28 +1819,27 @@
 msgid "not mapping: env var not set\n"
 msgstr "mappar inte: miljövariabel är inte satt\n"
 
-#: libbfd.c:1467
-#, fuzzy, c-format
+#: libbfd.c:1466
+#, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
-msgstr " vid %s rad %d i %s\n"
+msgstr "Föråldrad %s anropad vid %s rad %d i %s\n"
 
-# Skumt!
-#: libbfd.c:1470
-#, fuzzy, c-format
+#: libbfd.c:1469
+#, c-format
 msgid "Deprecated %s called\n"
-msgstr "Föråldrad %s anropad"
+msgstr "Föråldrad %s anropad\n"
 
-#: linker.c:1849
+#: linker.c:1873
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: indirekt symbol \"%s\" till \"%s\" är en slinga"
 
-#: linker.c:2745
+#: linker.c:2776
 #, c-format
 msgid "Attempt to do relocateable link with %s input and %s output"
 msgstr "Försök att göra en omlokaliseringsbar länk med %s-indata och %s-utdata"
 
-#: merge.c:897
+#: merge.c:892
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: åtkomst bortom slut på sammanslagen sektion (%ld + %ld)"
@@ -1792,162 +1849,127 @@
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: Ingen kärna för att allokera sektionsnamn %s\n"
 
-#: mmo.c:537
+#: mmo.c:536
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: Ingen kärna för att allokera en %d byte lång symbol\n"
 
-#: mmo.c:1190
+#: mmo.c:1245
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: ogiltig mmo-fil: initieringsvärde för $255 är inte \"Main\"\n"
 
-#: mmo.c:1336
+#: mmo.c:1391
 #, c-format
-msgid ""
-"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
-"starting with `%s'\n"
-msgstr ""
-"%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som "
-"börjar med \"%s\"\n"
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som börjar med \"%s\"\n"
 
-#: mmo.c:1571
+#: mmo.c:1633
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: ogiltig mmo-fil: lopkod \"%d\" stöds inte\n"
 
-#: mmo.c:1581
+#: mmo.c:1643
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: ogiltig mmo-fil: förväntade YZ = 1 fick YZ = %d för lop_quote\n"
 
-#: mmo.c:1617
+#: mmo.c:1679
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
 
-#: mmo.c:1663
+#: mmo.c:1725
 #, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
 
-#: mmo.c:1702
+#: mmo.c:1764
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: ogiltig mmo-fil: förväntade y = 0, fick y = %d för lop_fixrx\n"
 
-#: mmo.c:1711
+#: mmo.c:1773
 #, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för "
-"lop_fixr\n"
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för lop_fixr\n"
 
-#: mmo.c:1734
+#: mmo.c:1796
 #, c-format
-msgid ""
-"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
-"for lop_fixrx\n"
-msgstr ""
-"%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %"
-"d för lop_fixrx\n"
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %d för lop_fixrx\n"
 
-#: mmo.c:1757
+#: mmo.c:1819
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: kan inte allokera filnamn för fil nummer %d, %d byte\n"
 
-#: mmo.c:1777
+#: mmo.c:1839
 #, c-format
-msgid ""
-"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr ""
-"%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
 
-#: mmo.c:1790
+#: mmo.c:1852
 #, c-format
-msgid ""
-"%s: invalid mmo file: file name for number %d was not specified before use\n"
-msgstr ""
-"%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
 
-#: mmo.c:1896
+#: mmo.c:1958
 #, c-format
-msgid ""
-"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
-msgstr ""
-"%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
 
-#: mmo.c:1932
+#: mmo.c:1994
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: ogiltig mmo-fil: lop_end är inte sista objektet i fil\n"
 
-#: mmo.c:1945
+#: mmo.c:2007
 #, c-format
-msgid ""
-"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
-"to the preceding lop_stab (%ld)\n"
-msgstr ""
-"%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till "
-"den föregående lop_stab (%ld)\n"
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till den föregående lop_stab (%ld)\n"
 
-#: mmo.c:2610
+#: mmo.c:2670
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: ogiltig symboltabell: dublettsymbol \"%s\"\n"
 
-#: mmo.c:2898
+#: mmo.c:2921
 #, c-format
-msgid ""
-"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
-"s\n"
-msgstr ""
-"%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för "
-"startadressen %s\n"
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för startadressen %s\n"
 
-#: mmo.c:2932
+#: mmo.c:3011
 #, c-format
-msgid ""
-"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
-"%d.  Only `Main' will be emitted.\n"
-msgstr ""
-"%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars "
-"ord: %d. Endast \"Main\" kommer att skickas.\n"
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
+msgstr "%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars ord: %d. Endast \"Main\" kommer att skickas.\n"
 
-#: mmo.c:2977
+#: mmo.c:3056
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: internt fel, symboltabellen ändrade storlek från %d till %d ord\n"
 
-#: mmo.c:3032
+#: mmo.c:3111
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: internt fel, interna registersektionen %s hade innehåll\n"
 
-#: mmo.c:3084
+#: mmo.c:3163
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: inga initierade register; sektionslängd 0\n"
 
-#: mmo.c:3090
+#: mmo.c:3169
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: för många initierade register; sektionslängd %ld\n"
 
-#: mmo.c:3095
+#: mmo.c:3174
 #, c-format
-msgid ""
-"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
-"08lx\n"
-msgstr ""
-"%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1036
+#: oasys.c:1029
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: kan inte representera sektionen \"%s\" i oasys"
@@ -2005,9 +2027,7 @@
 
 #: peicode.h:1174
 #, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
+msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%s: Känd men ohanterad maskintyp (0x%x) i Import Library Format-arkiv"
 
 #: peicode.h:1191
@@ -2072,7 +2092,7 @@
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Längd på partition[%d] = 0x%.8lx (%ld)\n"
 
-#: som.c:5402
+#: som.c:5398
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers är inte implementerat"
 
@@ -2081,7 +2101,13 @@
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: Oväntat tecken \"%s\" i S-postfil\n"
 
-#: syms.c:998
+# Vad är stabs?
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): Stabbpost har ogiltigt strängindex."
+
+#: syms.c:1044
 msgid "Unsupported .stab relocation"
 msgstr ".stab-omlokalisering som inte stöds"
 
@@ -2100,7 +2126,7 @@
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "Storleken passar inte på sektion %s=%lx, %s=%lx"
 
-#: vms-gsd.c:704
+#: vms-gsd.c:702
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "okänd gsd/egsd-undertyp %d"
@@ -2141,24 +2167,24 @@
 msgstr "Inget minne!"
 
 #: vms-tir.c:362
-#, fuzzy, c-format
+#, c-format
 msgid "bad section index in %s"
-msgstr "Felaktigt sektionsindex i ETIR_S_C_STA_PQ"
+msgstr "felaktigt sektionsindex i %s"
 
 #: vms-tir.c:375
-#, fuzzy, c-format
+#, c-format
 msgid "unsupported STA cmd %s"
-msgstr "STA-kommando %d stöds inte"
+msgstr "STA-kommando %s stöds inte"
 
 #: vms-tir.c:380 vms-tir.c:1240
-#, fuzzy, c-format
+#, c-format
 msgid "reserved STA cmd %d"
-msgstr "Reserverat STA-kommando %d"
+msgstr "reserverat STA-kommando %d"
 
 #: vms-tir.c:491 vms-tir.c:514
-#, fuzzy, c-format
+#, c-format
 msgid "%s: no symbol \"%s\""
-msgstr "%s: ingen sådan symbol"
+msgstr "%s: ingen symbol \"%s\""
 
 #. unsigned shift
 #. rotate
@@ -2166,41 +2192,39 @@
 #. Define a literal.
 #: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
 #: vms-tir.c:838 vms-tir.c:1563
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not supported"
-msgstr "stöder inte"
+msgstr "%s: stöds inte"
 
 #: vms-tir.c:586 vms-tir.c:1418
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not implemented"
-msgstr "%s: oimplementerat %s\n"
+msgstr "%s: inte implementerad"
 
 #: vms-tir.c:590 vms-tir.c:1422
-#, fuzzy, c-format
+#, c-format
 msgid "reserved STO cmd %d"
-msgstr "Reserverat STO-kommando %d"
+msgstr "reserverat STO-kommando %d"
 
 #: vms-tir.c:708 vms-tir.c:1568
-#, fuzzy, c-format
+#, c-format
 msgid "reserved OPR cmd %d"
-msgstr "Reserverat OPR-kommando %d"
+msgstr "reserverat OPR-kommando %d"
 
 #: vms-tir.c:776 vms-tir.c:1632
-#, fuzzy, c-format
+#, c-format
 msgid "reserved CTL cmd %d"
-msgstr "Reserverat CTL-kommando %d"
+msgstr "reserverat CTL-kommando %d"
 
 #. stack byte from image
 #. arg: none.
 #: vms-tir.c:1148
-#, fuzzy
 msgid "stack-from-image not implemented"
-msgstr "Stac-from-image är inte implementerat"
+msgstr "stack-from-image är inte implementerat"
 
 #: vms-tir.c:1166
-#, fuzzy
 msgid "stack-entry-mask not fully implemented"
-msgstr "Stack-entry-mask är inte helt implementerat"
+msgstr "stack-entry-mask är inte helt implementerat"
 
 #. compare procedure argument
 #. arg: cs	symbol name
@@ -2214,30 +2238,27 @@
 msgstr "PASSMECH är inte helt implementerat"
 
 #: vms-tir.c:1199
-#, fuzzy
 msgid "stack-local-symbol not fully implemented"
-msgstr "Stack-local-symbol är inte helt implementerat"
+msgstr "stack-local-symbol är inte helt implementerat"
 
 #: vms-tir.c:1212
-#, fuzzy
 msgid "stack-literal not fully implemented"
-msgstr "Stack-literal är inte helt implementerat"
+msgstr "stack-literal är inte helt implementerat"
 
 #: vms-tir.c:1233
-#, fuzzy
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "Stack-local-symbol-entry-point-mask är inte helt implementerat"
+msgstr "stack-local-symbol-entry-point-mask är inte helt implementerat"
 
 #: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
 #: vms-tir.c:1619 vms-tir.c:1627
-#, fuzzy, c-format
+#, c-format
 msgid "%s: not fully implemented"
-msgstr "PASSMECH är inte helt implementerat"
+msgstr "%s: inte helt implementerat"
 
 #: vms-tir.c:1684
-#, fuzzy, c-format
+#, c-format
 msgid "obj code %d not found"
-msgstr "Objektkod %d kunde inte hittas"
+msgstr "objektkod %d kunde inte hittas"
 
 #: vms-tir.c:2019
 #, c-format
@@ -2249,150 +2270,149 @@
 msgid "Unhandled relocation %s"
 msgstr "Ohanterad omlokalisering %s"
 
-#: xcofflink.c:1241
+#: xcofflink.c:1243
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: \"%s\" har radnummer men ingen inneslutande sektion"
 
-#: xcofflink.c:1294
+#: xcofflink.c:1296
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: klass %d-symbolen \"%s\" har inga yttre poster"
 
-#: xcofflink.c:1317
+#: xcofflink.c:1319
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: symbolen \"%s\" har okänd csect-typ %d"
 
-#: xcofflink.c:1329
+#: xcofflink.c:1331
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: felaktig XTY_ER-symbol \"%s\": klass %d scnum %d scnlen %d"
 
-#: xcofflink.c:1365
+#: xcofflink.c:1367
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: XMC_TC0-symbolen \"%s\" är klass %d scnlen %d"
 
-#: xcofflink.c:1517
+#: xcofflink.c:1519
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect \"%s\" är inte i inneslutande sektion"
 
-#: xcofflink.c:1624
+#: xcofflink.c:1626
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: felaktigt placerat XTY_LD \"%s\""
 
-#: xcofflink.c:1948
+#: xcofflink.c:1957
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: omlokaliseringen %s:%d är inte i csect"
 
-#: xcofflink.c:2083
+#: xcofflink.c:2092
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: XCOFF delade objekt när inte XCOFF-utdata produceras"
 
-#: xcofflink.c:2104
+#: xcofflink.c:2113
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: dynamiskt objekt utan någon .loader-sektion"
 
-#: xcofflink.c:2749
+#: xcofflink.c:2758
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: ingen sådan symbol"
 
-#: xcofflink.c:2890
+#: xcofflink.c:2891
 msgid "error: undefined symbol __rtinit"
 msgstr "fel: odefinierad symbol __rtinit"
 
-#: xcofflink.c:3458
+#: xcofflink.c:3453
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "varning: försök att exportera odefinierade symbolen \"%s\""
 
-#: xcofflink.c:4452
+#: xcofflink.c:4447
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr ""
-"TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
+msgstr "TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
 
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: inläsaromlokalisering i okända sektionen \"%s\""
 
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: \"%s\" i inläsaromlokalisering men inte inläsarsym"
 
-#: xcofflink.c:5329
+#: xcofflink.c:5324
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: inläsaromlokalisering i skrivskyddade sektionen %s"
 
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
 msgid "@pltoff reloc against local symbol"
 msgstr "@pltoff-omlokalisering mot lokal symbol"
 
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: kort datasegment spillde över (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp täcker inte kort datasegment"
 
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: länkar icke-pic-kod i delat bibliotek"
 
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: @gprel-omlokalisering mot dynamiska symbolen %s"
 
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
 #, c-format
 msgid "%s: dynamic relocation against speculation fixup"
 msgstr "%s: dynamisk omlokalisering utan spekulationsfixar"
 
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
 #, c-format
 msgid "%s: speculation fixup against undefined weak symbol"
 msgstr "%s: spekulationsfix mot odefinierad svag symbol"
 
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
 msgid "unsupported reloc"
 msgstr "omlokaliseringen stöds inte"
 
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: länkar fånga-vid-NULL-dereferens med ickefångande filer"
 
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr "%s: länkar big endian-filer med little endian-filer"
 
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: länkar 64-bitarsfiler med 32-bitarsfiler"
 
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: länkar konstant-gp-filer med icke-konstant-gp-filer"
 
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: länkar auto-pic-filer med icke-auto-pic-filer"
@@ -2473,8 +2493,7 @@
 "There is an import table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Det finns en importtabell, men sektionen som innehåller den kunde inte "
-"hittas\n"
+"Det finns en importtabell, men sektionen som innehåller den kunde inte hittas\n"
 
 #: peigen.c:1076 pepigen.c:1076
 #, c-format
@@ -2518,13 +2537,14 @@
 
 # Vad är thunk?
 #: peigen.c:1130 pepigen.c:1130
-#, fuzzy
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
-msgstr "                 tabell  stämpel   kedja    namn      thunk\n"
+msgstr ""
+" vma:            Tips-   Tids-     Framåt-  DLL-      Första\n"
+"                 tabell  stämpel   kedja    namn      thunk\n"
 
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1181 pepigen.c:1181
 #, c-format
 msgid ""
 "\n"
@@ -2533,32 +2553,27 @@
 "\n"
 "\tDLL-namn: %s\n"
 
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma:  Hint/Ord Member-Name\n"
-msgstr "\tvma:  Tips/Vanligt medlemsnamn\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma: Tips/Ordn Medlemsnamn Bundet till\n"
 
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr "\tImportadresstabellen (skillnad hittad)\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Det finns en första thunk, men sektionen som innehåller den kunde inte hittas\n"
 
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> Slut på IAT-medlemmar!\n"
-
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tImportadresstabellen är identisk\n"
-
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1357 pepigen.c:1357
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
 msgstr ""
 "\n"
-"Det finns en exporttabell, men sektionen som innehåller den kunde inte "
-"hittas\n"
+"Det finns en exporttabell, men sektionen som innehåller den kunde inte hittas\n"
 
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1362 pepigen.c:1362
 #, c-format
 msgid ""
 "\n"
@@ -2567,7 +2582,7 @@
 "\n"
 "Det finns en exporttabell i %s vid 0x%lx\n"
 
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1393 pepigen.c:1393
 #, c-format
 msgid ""
 "\n"
@@ -2577,61 +2592,61 @@
 "\n"
 "Exporttabellerna (tolkade innehåll i %s-sektion)\n"
 
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1397 pepigen.c:1397
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Exportflaggor \t\t\t%lx\n"
 
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1400 pepigen.c:1400
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Tid-/Datumstämpel \t\t%lx\n"
 
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1403 pepigen.c:1403
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Övre/Undre \t\t\t%d/%d\n"
 
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1406 pepigen.c:1406
 msgid "Name \t\t\t\t"
 msgstr "Namn \t\t\t\t"
 
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1412 pepigen.c:1412
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Ordningsbas \t\t\t%ld\n"
 
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1415 pepigen.c:1415
 msgid "Number in:\n"
 msgstr "Tal i:\n"
 
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1418 pepigen.c:1418
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tExportadresstabell \t\t%08lx\n"
 
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1422 pepigen.c:1422
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\t[Namnpekare/Ordningstal]-tabell\t%08lx\n"
 
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1425 pepigen.c:1425
 msgid "Table Addresses\n"
 msgstr "Tabelladresser\n"
 
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1428 pepigen.c:1428
 msgid "\tExport Address Table \t\t"
 msgstr "\tExportadresstabell \t\t"
 
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1433 pepigen.c:1433
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNamnpekartabell \t\t"
 
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1438 pepigen.c:1438
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tOrdningstalstabell \t\t\t"
 
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1453 pepigen.c:1453
 #, c-format
 msgid ""
 "\n"
@@ -2640,15 +2655,15 @@
 "\n"
 "Exportadresstabell -- Orningsbas %ld\n"
 
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1472 pepigen.c:1472
 msgid "Forwarder RVA"
 msgstr "Vidarebefordrar-RVA"
 
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1483 pepigen.c:1483
 msgid "Export RVA"
 msgstr "Export-RVA"
 
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1490 pepigen.c:1490
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2656,13 +2671,12 @@
 "\n"
 "[Ordningstals-/Namnpekar-]tabell\n"
 
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1545 pepigen.c:1545
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
-msgstr ""
-"Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
+msgstr "Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
 
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1549 pepigen.c:1549
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2670,41 +2684,31 @@
 "\n"
 "Funktionstabellen (tolkade innehåll från .pdata-sektionen)\n"
 
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1552 pepigen.c:1552
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tStartadress      Slutadress       Ospola information\n"
 
-# This is broken
-#
-# #ifdef COFF_WITH_pep
-#  fprintf (file,
-# 	   _(" vma:\t\t\tBegin Address    End Address      Unwind Info\n"));
-# #else
-#  fprintf (file,
-# 	   _(" vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"));
-#  fprintf (file,
-# 	   _("     \t\tAddress  Address  Handler  Data     Address    Mask\n"));
-#
-#: peigen.c:1540 pepigen.c:1540
-#, fuzzy
+#: peigen.c:1554 pepigen.c:1554
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
-msgstr " vma:\t\tStart-   Slut-    EH-      EH-     Prologslut- Undantags-\n"
+msgstr ""
+" vma:\t\tStart-   Slut-    EH-       EH-    Prologsluts- Undantags-\n"
+"     \t\tadress   adress   hanterare data   adress       mask\n"
 
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1624 pepigen.c:1624
 msgid " Register save millicode"
 msgstr " Registerspara millikod"
 
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1627 pepigen.c:1627
 msgid " Register restore millicode"
 msgstr " Registeråterställ millikod"
 
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1630 pepigen.c:1630
 msgid " Glue code sequence"
 msgstr " Klisterkodsekvens"
 
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1682 pepigen.c:1682
 msgid ""
 "\n"
 "\n"
@@ -2714,7 +2718,7 @@
 "\n"
 "PE-filbasomlokaliseringar (tolkat innehåll i .reloc-sektionen)\n"
 
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1712 pepigen.c:1712
 #, c-format
 msgid ""
 "\n"
@@ -2723,7 +2727,7 @@
 "\n"
 "Virtuell adress: %08lx Områdesstorlek %ld (0x%lx) Antal fixar %ld\n"
 
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1725 pepigen.c:1725
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\tomlokalisering %4d avstånd %4x [%4lx] %s"
@@ -2731,7 +2735,7 @@
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1765 pepigen.c:1765
 #, c-format
 msgid ""
 "\n"
@@ -2740,6 +2744,15 @@
 "\n"
 "Karakteristik 0x%x\n"
 
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tImportadresstabellen (skillnad hittad)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> Slut på IAT-medlemmar!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tImportadresstabellen är identisk\n"
+
 # Ska vara blanksteg här tror jag
 #~ msgid "BFD %sinternal error, aborting at %s line %d\n"
 #~ msgstr "Internt BFD %s-fel, avbryter vid %s rad %d\n"
@@ -2747,36 +2760,35 @@
 #~ msgid "GP relative relocation when GP not defined"
 #~ msgstr "GP-relativ omlokalisering då GP inte är definierad"
 
-#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
-#~ msgstr ""
-#~ "Varning: indatafilen %s stöder samverkande, medan %s däremot inte gör det."
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: FEL: skickar flyttal i flyttalsregister där målet %s istället använder heltalsregister"
 
-#~ msgid ""
-#~ "Warning: input file %s does not support interworking, whereas %s does."
-#~ msgstr ""
-#~ "Varning: indatafilen %s stöder inte samverkande, medan %s däremot gör det."
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: FEL: skickar flyttal i heltalsregister där målet %s istället använder flyttalsregister"
+
+#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
+#~ msgstr "Varning: indatafilen %s stöder samverkande, medan %s däremot inte gör det."
+
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "Varning: indatafilen %s stöder inte samverkande, medan %s däremot gör det."
 
 #~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
 #~ msgstr "AUX tagndx %ld ttlsiz 0x%lx radnummer %ld nästa %ld"
 
-#~ msgid ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x"
-#~ "%.8lx%s\n"
-#~ msgstr ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, namn = %s, symbolnr = %d, flaggor = 0x"
-#~ "%.8lx%s\n"
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, namn = %s, symbolnr = %d, flaggor = 0x%.8lx%s\n"
 
-#~ msgid ""
-#~ "Warning: Not setting interwork flag of %s since it has already been "
-#~ "specified as non-interworking"
-#~ msgstr ""
-#~ "Varning: Ställer inte in samverkandeflaggan för %s eftersom den redan har "
-#~ "angivits som inte samverkande"
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "Varning: Ställer inte in samverkandeflaggan för %s eftersom den redan har angivits som inte samverkande"
 
 #~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
-#~ msgstr ""
-#~ "Varning: Stänger av samverkandeflaggan för %s på grund av utomstående "
-#~ "begäran"
+#~ msgstr "Varning: Stänger av samverkandeflaggan för %s på grund av utomstående begäran"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
 
 #~ msgid "(unknown)"
 #~ msgstr "(okänd)"
@@ -2877,12 +2889,12 @@
 #~ msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
 #~ msgstr "     \t\tadress   adress   hanterare data    adress     mask\n"
 
-#~ msgid "float"
-#~ msgstr "flyttal"
-
 #~ msgid "integer"
 #~ msgstr "heltal"
 
+#~ msgid "float"
+#~ msgstr "flyttal"
+
 #~ msgid "soft"
 #~ msgstr "mjuk"
 
@@ -2915,16 +2927,10 @@
 #~ msgstr "%s(%s+0x%lx): kan inte hitta stubbstarten %s"
 
 #~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
-#~ msgstr ""
-#~ "%s(%s+0x%lx): kan inte omlokalisera %s, kompilera om med -ffunction-"
-#~ "sections"
+#~ msgstr "%s(%s+0x%lx): kan inte omlokalisera %s, kompilera om med -ffunction-sections"
 
-#~ msgid ""
-#~ "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section "
-#~ "= 0x%.8lx\n"
-#~ msgstr ""
-#~ "skapar sektionssymbol, namn = %s, värde = 0x%.8lx, index = %d, sektion = "
-#~ "0x%.8lx\n"
+#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
+#~ msgstr "skapar sektionssymbol, namn = %s, värde = 0x%.8lx, index = %d, sektion = 0x%.8lx\n"
 
 # Hmm
 #~ msgid "       whereas segment starts at 0x%x"
diff --git a/bfd/po/tr.po b/bfd/po/tr.po
index 80dc9e1..092c0ac 100644
--- a/bfd/po/tr.po
+++ b/bfd/po/tr.po
@@ -4,171 +4,171 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 12:55+0000\n"
-"PO-Revision-Date: 2002-01-24 13:11EET\n"
+"Project-Id-Version: bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-08-10 13:11EET\n"
 "Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-9\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: KBabel 0.9.5\n"
 
-#: aout-adobe.c:196
+#: aout-adobe.c:197
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
-msgstr "%s: a.out.adobe dosyasýnda bilinmeyen bölüm türü: %x\n"
+msgstr "%s: a.out.adobe dosyasında bilinmeyen bölüm türü: %x\n"
 
 #: aout-cris.c:208
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
-msgstr "%s: Geçersiz yer deðiþtirme türü ihraç edilmiþ: %d"
+msgstr "%s: Geçersiz yer deÄŸiÅŸtirme türü ihraç edilmiÅŸ: %d"
 
 #: aout-cris.c:252
 #, c-format
 msgid "%s: Invalid relocation type imported: %d"
-msgstr "%s: Geçersiz yer deðiþtirme türü ithal edilmiþ: %d"
+msgstr "%s: Geçersiz yer deÄŸiÅŸtirme türü ithal edilmiÅŸ: %d"
 
 #: aout-cris.c:263
 #, c-format
 msgid "%s: Bad relocation record imported: %d"
-msgstr "%s: Geçersiz yer deðiþtirme kaydý ithal edilmiþ: %d"
+msgstr "%s: Geçersiz yer deÄŸiÅŸtirme kaydı ithal edilmiÅŸ: %d"
 
 #: aoutx.h:1282 aoutx.h:1699
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr "%s: `%s' bölümü a.out nesne dosya biçeminde gösterilemez"
+msgstr "%s: `%s' bölümü a.out nesne dosya biçeminde gösterilemez"
 
 #: aoutx.h:1669
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr "%s: `%s' sembol bölümü a.out nesne dosyasýnda gösterilemez"
+msgstr "%s: `%s' sembol bölümü a.out nesne dosyasında gösterilemez"
 
 #: aoutx.h:1671
 msgid "*unknown*"
 msgstr "*bilinmeyen*"
 
-#: aoutx.h:3735
+#: aoutx.h:3732
 #, c-format
 msgid "%s: relocateable link from %s to %s not supported"
-msgstr "%s: %s'dan %s'ya yeri deðiþtirilebilen bað desteklenmiyor"
+msgstr "%s: %s'dan %s'ya yeri deÄŸiÅŸtirilebilen baÄŸ desteklenmiyor"
 
 #: archive.c:1826
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
-msgstr "Uyarý: arþiv yazma iþlemi yavaþ: zaman damgasý yeniden yazýlýyor\n"
+msgstr "Uyarı: arşiv yazma işlemi yavaş: zaman damgası yeniden yazılıyor\n"
 
 #: archive.c:2093
 msgid "Reading archive file mod timestamp"
-msgstr "Arþiv dosyasý deðiþim zaman damgasý okunuyor"
+msgstr "Arşiv dosyası değişim zaman damgası okunuyor"
 
 #. FIXME: bfd can't call perror.
 #: archive.c:2120
 msgid "Writing updated armap timestamp"
-msgstr "Güncellenmiþ armap zaman damgasý yazýlýyor"
+msgstr "GüncellenmiÅŸ armap zaman damgası yazılıyor"
 
-#: bfd.c:281
+#: bfd.c:274
 msgid "No error"
 msgstr "Hata yok"
 
-#: bfd.c:282
+#: bfd.c:275
 msgid "System call error"
-msgstr "Sistem çaðrý hatasý"
+msgstr "Sistem çaÄŸrı hatası"
 
-#: bfd.c:283
+#: bfd.c:276
 msgid "Invalid bfd target"
-msgstr "Geçersiz bfd hedefi"
+msgstr "Geçersiz bfd hedefi"
 
-#: bfd.c:284
+#: bfd.c:277
 msgid "File in wrong format"
-msgstr "Dosya yanlýþ biçemde"
+msgstr "Dosya yanlış biçemde"
 
-#: bfd.c:285
+#: bfd.c:278
 msgid "Archive object file in wrong format"
-msgstr "Arþiv nesne dosyasý yanlýþ biçemde"
+msgstr "ArÅŸiv nesne dosyası yanlış biçemde"
 
-#: bfd.c:286
+#: bfd.c:279
 msgid "Invalid operation"
-msgstr "Geçersiz iþlem"
+msgstr "Geçersiz iÅŸlem"
 
-#: bfd.c:287
+#: bfd.c:280
 msgid "Memory exhausted"
-msgstr "Bellek tükendi"
+msgstr "Bellek tükendi"
 
-#: bfd.c:288
+#: bfd.c:281
 msgid "No symbols"
 msgstr "Sembol yok"
 
-#: bfd.c:289
+#: bfd.c:282
 msgid "Archive has no index; run ranlib to add one"
-msgstr "Arþivin indeksi yok; ranlib çalýþtýrarak indeks ekleyin"
+msgstr "ArÅŸivin indeksi yok; ranlib çalıştırarak indeks ekleyin"
+
+#: bfd.c:283
+msgid "No more archived files"
+msgstr "BaÅŸka arÅŸivlenmiÅŸ dosya yok"
+
+#: bfd.c:284
+msgid "Malformed archive"
+msgstr "Bozuk arÅŸiv"
+
+#: bfd.c:285
+msgid "File format not recognized"
+msgstr "Dosya biçemi tanınmıyor"
+
+#: bfd.c:286
+msgid "File format is ambiguous"
+msgstr "Dosya biçemi belirsiz"
+
+#: bfd.c:287
+msgid "Section has no contents"
+msgstr "Bölümde içerik yok"
+
+#: bfd.c:288
+msgid "Nonrepresentable section on output"
+msgstr "Çıktıda gösterilemeyen bölüm"
+
+#: bfd.c:289
+msgid "Symbol needs debug section which does not exist"
+msgstr "Sembol, olmayan hata ayıklama bölümünü istiyor"
 
 #: bfd.c:290
-msgid "No more archived files"
-msgstr "Baþka arþivlenmiþ dosya yok"
+msgid "Bad value"
+msgstr "Geçersiz deÄŸer"
 
 #: bfd.c:291
-msgid "Malformed archive"
-msgstr "Bozuk arþiv"
+msgid "File truncated"
+msgstr "Dosya budandı"
 
 #: bfd.c:292
-msgid "File format not recognized"
-msgstr "Dosya biçemi tanýnmýyor"
+msgid "File too big"
+msgstr "Dosya fazla büyük"
 
 #: bfd.c:293
-msgid "File format is ambiguous"
-msgstr "Dosya biçemi belirsiz"
-
-#: bfd.c:294
-msgid "Section has no contents"
-msgstr "Bölümde içerik yok"
-
-#: bfd.c:295
-msgid "Nonrepresentable section on output"
-msgstr "Çýktýda gösterilemeyen bölüm"
-
-#: bfd.c:296
-msgid "Symbol needs debug section which does not exist"
-msgstr "Sembol, olmayan hata ayýklama bölümünü istiyor"
-
-#: bfd.c:297
-msgid "Bad value"
-msgstr "Geçersiz deðer"
-
-#: bfd.c:298
-msgid "File truncated"
-msgstr "Dosya budandý"
-
-#: bfd.c:299
-msgid "File too big"
-msgstr "Dosya fazla büyük"
-
-#: bfd.c:300
 msgid "#<Invalid error code>"
-msgstr "#<Geçersiz hata kodu>"
+msgstr "#<Geçersiz hata kodu>"
 
-#: bfd.c:707
+#: bfd.c:700
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
-msgstr "BFD %s, olumlama baþarýsýz %s:%d"
+msgstr "BFD %s, olumlama başarısız %s:%d"
 
-#: bfd.c:726
+#: bfd.c:719
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
-msgstr "BFD %s iç hatasý, %s'da, %d satýrý, %s içerisinde iþlem durduruldu\n"
+msgstr "BFD %s iç hatası, %s'da, %d satırı, %s içerisinde iÅŸlem durduruldu\n"
 
-#: bfd.c:730
+#: bfd.c:723
 #, c-format
-msgid "BFD %sinternal error, aborting at %s line %d\n"
-msgstr "BFD %s iç hatasý, %s, %d satýrýnda iþlem durduruldu\n"
+msgid "BFD %s internal error, aborting at %s line %d\n"
+msgstr "BFD %s iç hatası, %s, %d satırında iÅŸlem durduruldu\n"
 
-#: bfd.c:732
+#: bfd.c:725
 msgid "Please report this bug.\n"
-msgstr "Lütfen bu hatayý bildirin.\n"
+msgstr "Lütfen bu hatayı bildirin.\n"
 
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr "Uyarý: `%s' bölümü çok büyük (negatif) dosya göreli konumu 0x%lx'e yazýlýyor."
+msgstr "Uyarı: `%s' bölümü çok büyük (negatif) dosya göreli konumu 0x%lx'e yazılıyor."
 
 #: coff-a29k.c:119
 msgid "Missing IHCONST"
@@ -178,1337 +178,1584 @@
 msgid "Missing IHIHALF"
 msgstr "IHIHALF yok"
 
-#: coff-a29k.c:212
+#: coff-a29k.c:212 coff-or32.c:229
 msgid "Unrecognized reloc"
-msgstr "Tanýnmayan yer deðiþtirme"
+msgstr "Tanınmayan yer değiştirme"
 
 #: coff-a29k.c:408
 msgid "missing IHCONST reloc"
-msgstr "eksik IHCONST yer deðiþtirmesi"
+msgstr "eksik IHCONST yer deÄŸiÅŸtirmesi"
 
 #: coff-a29k.c:498
 msgid "missing IHIHALF reloc"
-msgstr "eksik IHIHALF yer deðiþtirmesi"
+msgstr "eksik IHIHALF yer deÄŸiÅŸtirmesi"
 
-#: coff-alpha.c:881 coff-alpha.c:918
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
 msgid "GP relative relocation used when GP not defined"
-msgstr "GP tanýmlanmamýþken GP göreli yer deðiþtirmesi kullanýlmýþ"
+msgstr "GP tanımlanmamışken GP göreli yer deÄŸiÅŸtirmesi kullanılmış"
 
 #: coff-alpha.c:1485
 msgid "using multiple gp values"
-msgstr "birden fazla gp deðeri kullanýlýyor"
+msgstr "birden fazla gp değeri kullanılıyor"
 
-#: coff-alpha.c:1989 coff-mips.c:1433
-msgid "GP relative relocation when GP not defined"
-msgstr "GP tanýmlanmamýþken GP göreli yer deðiþtirmesi"
-
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
-msgstr "%1$s: `%3$s' için THUMB birleþtiricisi '%2$s' bulunamadý "
+msgstr "%1$s: `%3$s' için THUMB birleÅŸtiricisi '%2$s' bulunamadı "
 
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
-msgstr "%1$s: `%3$s' için ARM birleþtiricisi '%2$s' bulunamadý"
+msgstr "%1$s: `%3$s' için ARM birleÅŸtiricisi '%2$s' bulunamadı"
 
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
-msgstr "%s(%s): uyarý: beraber çalýþma kipi etkin deðil."
+msgstr "%s(%s): uyarı: beraber çalışma kipi etkin deÄŸil."
 
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
-msgstr "  ilk ortaya çýkýþ: %s: thumb'a arm'dan çaðrý"
+msgstr "  ilk ortaya çıkış: %s: thumb'a arm'dan çaÄŸrı"
 
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
-msgstr "  ilk ortaya çýkýþ: %s: arm'a thumb'dan çaðrý"
+msgstr "  ilk ortaya çıkış: %s: arm'a thumb'dan çaÄŸrı"
 
-#: coff-arm.c:1477
+#: coff-arm.c:1493
 msgid "  consider relinking with --support-old-code enabled"
-msgstr "  --support-old-code seçeneði ile yeniden baðlamayý deneyin"
+msgstr "  --support-old-code seçeneÄŸi ile yeniden baÄŸlamayı deneyin"
 
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
-msgstr "%1$s:  `%3$s' bölümünde geçersiz yer deðiþtirme adresi 0x%2$lx"
+msgstr "%1$s:  `%3$s' bölümünde geçersiz yer deÄŸiÅŸtirme adresi 0x%2$lx"
 
-#: coff-arm.c:2107
+#: coff-arm.c:2127
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
-msgstr "%s: yer deðiþtirmede geçersiz sembol indeksi: %d"
+msgstr "%s: yer deÄŸiÅŸtirmede geçersiz sembol indeksi: %d"
 
-#: coff-arm.c:2235
+#: coff-arm.c:2255
 #, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr "%s: HATA: APCS-%d için derlenmiþ fakat hedef %s APCS-%d kullanýyor"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "Hata: %s APCS-%d için derlenmiÅŸ, fakat %s APCS-%d için derlenmiÅŸ"
 
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
 #, c-format
-msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
-msgstr "%s: HATA: kayan sayýlarý kayan yazmaçlarda geçiriyor fakat hedef %s tamsayý yazmaç kullanýyor"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr ""
+"Hata: %s kayan sayıları kayan sayı yazmaçlarında geçiriyor, \n"
+"      fakat %s tamsayı yazmaçlarında geçiriyor"
 
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
 #, c-format
-msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
-msgstr "%s: HATA: kayan sayýlarý tamsayý yazmaçlarda geçiriyor fakat hedef %s kayan yazmaç kullanýyor"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr ""
+"Hata: %s kayan sayıları tamsayı yazmaçlarında geçiriyor, \n"
+"      fakat %s kayan sayı yazmaçlarında geçiriyor"
 
-#: coff-arm.c:2268
+#: coff-arm.c:2288
 #, c-format
-msgid "%s: ERROR: compiled as position independent code, whereas target %s is absolute position"
-msgstr "%s: HATA: yerden baðýmsýz kod olarak derlendi, fakat hedef %s yere baðýmlý"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "HATA: %s yerden bağımsız kod olarak derlendi, fakat hedef %s yere bağımlı"
 
-#: coff-arm.c:2271
+#: coff-arm.c:2291
 #, c-format
-msgid "%s: ERROR: compiled as absolute position code, whereas target %s is position independent"
-msgstr "%s: HATA: yere baðýmlý kod olarak derlendi, fakat hedef %s yerden baðýmsýz"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "HATA: %s yere bağımlı kod olarak derlendi, fakat hedef %s yerden bağımsız"
 
-#: coff-arm.c:2300
+#: coff-arm.c:2320 elf32-arm.h:2358
 #, c-format
-msgid "Warning: input file %s supports interworking, whereas %s does not."
-msgstr "Uyarý: %s girdi dosyasý beraber çalýþmayý destekliyor, fakat %s desteklemiyor."
+msgid "Warning: %s supports interworking, whereas %s does not"
+msgstr "Uyarı: %s girdi dosyası beraber çalışmayı destekliyor, fakat %s desteklemiyor."
 
-#: coff-arm.c:2303
+#: coff-arm.c:2323 elf32-arm.h:2365
 #, c-format
-msgid "Warning: input file %s does not support interworking, whereas %s does."
-msgstr "Uyarý: %s girdi dosyasý beraber çalýþmayý desteklemiyor, fakat %s destekliyor."
+msgid "Warning: %s does not support interworking, whereas %s does"
+msgstr "Uyarı: %s girdi dosyası beraber çalışmayı desteklemiyor, fakat %s destekliyor."
 
-#: coff-arm.c:2330
+#: coff-arm.c:2350
 #, c-format
 msgid "private flags = %x:"
-msgstr "özel bayraklar = %x:"
+msgstr "özel bayraklar = %x:"
 
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
 msgid " [floats passed in float registers]"
-msgstr " [kayan sayýlar kayan yazmaçlarda geçirildi]"
+msgstr " [kayan sayılar kayan yazmaçlarda geçirildi]"
 
-#: coff-arm.c:2340
+#: coff-arm.c:2360
 msgid " [floats passed in integer registers]"
-msgstr " [kayan sayýlar tamsayý yazmaçlarda geçirildi]"
+msgstr " [kayan sayılar tamsayı yazmaçlarda geçirildi]"
 
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
 msgid " [position independent]"
-msgstr " [yerden baðýmsýz]"
+msgstr " [yerden bağımsız]"
 
-#: coff-arm.c:2345
+#: coff-arm.c:2365
 msgid " [absolute position]"
-msgstr " [yere baðýmlý]"
+msgstr " [yere bağımlı]"
 
-#: coff-arm.c:2349
+#: coff-arm.c:2369
 msgid " [interworking flag not initialised]"
-msgstr " [beraber çalýþma bayraðýna öndeðer atanmamýþ]"
+msgstr " [beraber çalışma bayrağına öndeÄŸer atanmamış]"
 
-#: coff-arm.c:2351
+#: coff-arm.c:2371
 msgid " [interworking supported]"
-msgstr " [beraber çalýþma destekleniyor]"
+msgstr " [beraber çalışma destekleniyor]"
 
-#: coff-arm.c:2353
+#: coff-arm.c:2373
 msgid " [interworking not supported]"
-msgstr " [beraber çalýþma desteklenmiyor]"
+msgstr " [beraber çalışma desteklenmiyor]"
 
-#: coff-arm.c:2401
+#: coff-arm.c:2421 elf32-arm.h:2124
 #, c-format
-msgid "Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"
-msgstr "Uyarý: %s beraber çalýþma bayraðý atanmadý, çünkü beraber çalýþma olmayacaðý önceden belirtilmiþ"
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "Uyarı: %s beraber çalışma bayrağı atanmadı, çünkü beraber çalışma olmayacağı önceden belirtilmiÅŸ"
 
-#: coff-arm.c:2405
+#: coff-arm.c:2425 elf32-arm.h:2128
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr "Uyarý: %s beraber çalýþma bayraðý dýþ istek üzerine temizlendi"
+msgstr "Uyarı: %s beraber çalışma bayrağı dış istek üzerine temizlendi"
 
 #: coff-i960.c:136 coff-i960.c:485
 msgid "uncertain calling convention for non-COFF symbol"
-msgstr "COFF olmayan sembol için belirsiz çaðrý davranýþý"
+msgstr "COFF olmayan sembol için belirsiz çaÄŸrı davranışı"
 
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
 msgid "unsupported reloc type"
-msgstr "desteklenmeyen yer deðiþtirme türü"
+msgstr "desteklenmeyen yer deÄŸiÅŸtirme türü"
 
-#: coff-mips.c:875 elf32-mips.c:1987 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
 msgid "GP relative relocation when _gp not defined"
-msgstr "_gp tanýmsýz iken GP göreli yer deðiþtirmesi"
+msgstr "_gp tanımsız iken GP göreli yer deÄŸiÅŸtirmesi"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
 msgid "reloc against unsupported section"
-msgstr "desteklenmeyen bölümde yer deðiþtirme"
+msgstr "desteklenmeyen bölümde yer deÄŸiÅŸtirme"
 
-#: coff-mips.c:2476
+#: coff-mips.c:2474
 msgid "reloc not properly aligned"
-msgstr "yer deðiþtirme doðru hizalanmamýþ"
+msgstr "yer değiştirme doğru hizalanmamış"
 
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
-msgstr "%s: desteklenmeyen yükleyici yerdeðiþimi 0x%02x"
+msgstr "%s: desteklenmeyen yükleyici yerdeÄŸiÅŸimi 0x%02x"
 
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
-msgstr "%s: 0x%x'da TOC girdisi olmayan `%s' sembolüne TOC yerdeðiþimi"
+msgstr "%s: 0x%x'da TOC girdisi olmayan `%s' sembolüne TOC yerdeÄŸiÅŸimi"
 
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
-msgstr "%s: `%s' sembolünde bilinmeyen %d var"
+msgstr "%s: `%s' sembolünde bilinmeyen %d var"
 
 #: coff-tic54x.c:279 coff-tic80.c:449
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
-msgstr "Bilinmeyen yer deðiþtirme türü 0x%x"
+msgstr "Bilinmeyen yer deÄŸiÅŸtirme türü 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4847
+#: coff-tic54x.c:390 coffcode.h:4974
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
-msgstr "%s: uyarý: yer deðiþtirmelerde geçersiz sembol indeksi %ld"
+msgstr "%s: uyarı: yer deÄŸiÅŸtirmelerde geçersiz sembol indeksi %ld"
 
 #: coff-w65.c:363
 #, c-format
 msgid "ignoring reloc %s\n"
-msgstr "yer deðiþtirme %s yoksayýldý\n"
+msgstr "yer değiştirme %s yoksayıldı\n"
 
-#: coffcode.h:1081
+#: coffcode.h:1086
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
-msgstr "%s (%s): Bölüm bayraðý %s (0x%x) yoksayýldý"
+msgstr "%s (%s): Bölüm bayrağı %s (0x%x) yoksayıldı"
 
-#: coffcode.h:2125
+#: coffcode.h:2143
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
-msgstr "Tanýnmayan TI COFF hedef kimliði '0x%x'"
+msgstr "Tanınmayan TI COFF hedef kimliği '0x%x'"
 
-#: coffcode.h:4236
+#: coffcode.h:4365
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
-msgstr "%s: uyarý: satýr numaralarýnda geçersiz sembol indeksi %ld"
+msgstr "%s: uyarı: satır numaralarında geçersiz sembol indeksi %ld"
 
-#: coffcode.h:4250
+#: coffcode.h:4379
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
-msgstr "%s: uyarý: `%s' için tekrarlanmýþ satýr numarasý bilgisi"
+msgstr "%s: uyarı: `%s' için tekrarlanmış satır numarası bilgisi"
 
-#: coffcode.h:4609
+#: coffcode.h:4736
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
-msgstr "%1$s: %3$s sembolü `%4$s' için bilinmeyen saklama sýnýfý %2$d"
+msgstr "%1$s: %3$s sembolü `%4$s' için bilinmeyen saklama sınıfı %2$d"
 
-#: coffcode.h:4740
+#: coffcode.h:4867
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
-msgstr "uyarý: %s: `%s' yerel sembolünün bölümü yok"
+msgstr "uyarı: %s: `%s' yerel sembolünün bölümü yok"
 
-#: coffcode.h:4885
+#: coffcode.h:5012
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
-msgstr "%1$s: 0x%3$lx adresinde geçersiz yer deðiþtirme türü %2$d"
+msgstr "%1$s: 0x%3$lx adresinde geçersiz yer deÄŸiÅŸtirme türü %2$d"
 
 #: coffgen.c:1661
 #, c-format
 msgid "%s: bad string table size %lu"
-msgstr "%s: geçersiz dizge tablo boyu %lu"
+msgstr "%s: geçersiz dizge tablo boyu %lu"
 
-#: coffgen.c:2138
-#, c-format
-msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
-msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld sonraki %ld"
-
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
-msgstr "Uyarý: %4$s içerisinde `%1$s' sembolünün türü %2$d'den %3$d'e deðiþtirildi"
+msgstr "Uyarı: %4$s içerisinde `%1$s' sembolünün türü %2$d'den %3$d'e deÄŸiÅŸtirildi"
 
-#: cofflink.c:2317
+#: cofflink.c:2321
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
-msgstr "%s: `%s' bölümünde yer deðiþtirmeler mevcut, fakat içi boþ"
+msgstr "%s: `%s' bölümünde yer deÄŸiÅŸtirmeler mevcut, fakat içi boÅŸ"
 
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
-msgstr "%s: %s: yer deðiþtirme taþmasý: 0x%lx > 0xffff"
+msgstr "%s: %s: yer değiştirme taşması: 0x%lx > 0xffff"
 
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s: uyarý: %s: satýr numarasý taþmasý: 0x%lx > 0xffff"
+msgstr "%s: uyarı: %s: satır numarası taşması: 0x%lx > 0xffff"
 
-#: dwarf2.c:381
+#: dwarf2.c:382
 msgid "Dwarf Error: Can't find .debug_str section."
-msgstr "Dwarf Hatasý: .debug_str bölümü bulunamadý."
+msgstr "Dwarf Hatası: .debug_str bölümü bulunamadı."
 
-#: dwarf2.c:398
+#: dwarf2.c:399
 #, c-format
-msgid "Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
 msgstr ""
-"Dwarf Hatasý: DW_FORM_strp göreli konumu (%u) .debug_str boyutundan (%u) \n"
-"              daha büyük veya eþit."
+"Dwarf Hatası: DW_FORM_strp göreli konumu (%lu) .debug_str boyutundan (%lu) \n"
+"              daha büyük veya eÅŸit."
 
-#: dwarf2.c:542
+#: dwarf2.c:543
 msgid "Dwarf Error: Can't find .debug_abbrev section."
-msgstr "Dwarf Hatasý: .debug_abbrev bölümü bulunamadý."
+msgstr "Dwarf Hatası: .debug_abbrev bölümü bulunamadı."
 
-#: dwarf2.c:559
+#: dwarf2.c:560
 #, c-format
-msgid "Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
 msgstr ""
-"Dwarf Hatasý: Kýsaltma göreli konumu (%u) kýsaltma boyutundan (%u) \n"
-"              daha büyük veya eþit."
+"Dwarf Hatası: Kısaltma göreli konumu (%lu) kısaltma boyutundan (%lu) \n"
+"              daha büyük veya eÅŸit."
 
-#: dwarf2.c:756
+#: dwarf2.c:757
 #, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Dwarf Hatasý: Geçersiz veya desteklenmeyen FORM deðeri: %d."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Dwarf Hatası: Geçersiz veya desteklenmeyen FORM deÄŸeri: %u."
 
-#: dwarf2.c:843
+#: dwarf2.c:852
 msgid "Dwarf Error: mangled line number section (bad file number)."
-msgstr "Dwarf Hatasý: bozulmuþ satýr numarasý bölümü (geçersiz dosya numarasý)."
+msgstr "Dwarf Hatası: bozulmuÅŸ satır numarası bölümü (geçersiz dosya numarası)."
 
-#: dwarf2.c:929
+#: dwarf2.c:938
 msgid "Dwarf Error: Can't find .debug_line section."
-msgstr "Dwarf Hatasý: .debug_line bölümü bulunamadý."
+msgstr "Dwarf Hatası: .debug_line bölümü bulunamadı."
 
-#: dwarf2.c:952
+#: dwarf2.c:961
 #, c-format
-msgid "Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
 msgstr ""
-"Dwarf Hatasý: Satýr göreli konumu (%u) satýr boyutundan (%u)\n"
-"              daha büyük veya eþit."
+"Dwarf Hatası: Satır göreli konumu (%lu) satır boyutundan (%lu)\n"
+"              daha büyük veya eÅŸit."
 
-#: dwarf2.c:1143
+#: dwarf2.c:1159
 msgid "Dwarf Error: mangled line number section."
-msgstr "Dwarf Hatasý: bozuk satýr numarasý bölümü."
+msgstr "Dwarf Hatası: bozuk satır numarası bölümü."
 
-#: dwarf2.c:1318 dwarf2.c:1532
+#: dwarf2.c:1355 dwarf2.c:1566
 #, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Dwarf Hatasý: Kýsaltma numarasý %d bulunamadý."
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Dwarf Hatası: Kısaltma numarası %u bulunamadı."
 
-#: dwarf2.c:1493
+#: dwarf2.c:1527
 #, c-format
-msgid "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."
-msgstr "Dwarf Hatasý: dwarf sürümü '%hu' bulundu, bu okuyucu yalnýzca sürüm 2 bilgisini anlayabiliyor."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Dwarf Hatası: dwarf sürümü '%u' bulundu, bu okuyucu yalnızca sürüm 2 bilgisini anlayabiliyor."
 
-#: dwarf2.c:1500
+#: dwarf2.c:1534
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
-msgstr "Dwarf Hatasý: adres boyu '%u' bulundu, bu okuyucu '%u'dan daha büyük boylarý okuyamýyor."
+msgstr "Dwarf Hatası: adres boyu '%u' bulundu, bu okuyucu '%u'dan daha büyük boyları okuyamıyor."
 
-#: dwarf2.c:1523
+#: dwarf2.c:1557
 #, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Dwarf Hatasý: Geçersiz kýsaltma numarasý: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Dwarf Hatası: Geçersiz kısaltma numarası: %u."
 
-#: ecoff.c:1328
+#: ecoff.c:1318
 #, c-format
 msgid "Unknown basic type %d"
-msgstr "Bilinmeyen temel tür %d"
+msgstr "Bilinmeyen temel tür %d"
 
-#: ecoff.c:1597
+#: ecoff.c:1578
 #, c-format
-msgid "\n      End+1 symbol: %ld"
-msgstr "\n      Son+1 sembolü: %ld"
+msgid ""
+"\n"
+"      End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      Son+1 sembolü: %ld"
 
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
 #, c-format
-msgid "\n      First symbol: %ld"
-msgstr "\n      Ýlk sembol: %ld"
+msgid ""
+"\n"
+"      First symbol: %ld"
+msgstr ""
+"\n"
+"      Ä°lk sembol: %ld"
 
-#: ecoff.c:1619
+#: ecoff.c:1600
 #, c-format
-msgid "\n      End+1 symbol: %-7ld   Type:  %s"
-msgstr "\n      Son+1 sembolü: %-7ld   Tür:  %s"
+msgid ""
+"\n"
+"      End+1 symbol: %-7ld   Type:  %s"
+msgstr ""
+"\n"
+"      Son+1 sembolü: %-7ld   Tür:  %s"
 
-#: ecoff.c:1626
+#: ecoff.c:1607
 #, c-format
-msgid "\n      Local symbol: %ld"
-msgstr "\n      Yerel sembol: %ld"
+msgid ""
+"\n"
+"      Local symbol: %ld"
+msgstr ""
+"\n"
+"      Yerel sembol: %ld"
 
-#: ecoff.c:1634
+#: ecoff.c:1615
 #, c-format
-msgid "\n      struct; End+1 symbol: %ld"
-msgstr "\n      yapý; Son+1 sembolü: %ld"
+msgid ""
+"\n"
+"      struct; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      yapı; Son+1 sembolü: %ld"
 
-#: ecoff.c:1639
+#: ecoff.c:1620
 #, c-format
-msgid "\n      union; End+1 symbol: %ld"
-msgstr "\n      birleþim; Son+1 sembolü: %ld"
+msgid ""
+"\n"
+"      union; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      birleÅŸim; Son+1 sembolü: %ld"
 
-#: ecoff.c:1644
+#: ecoff.c:1625
 #, c-format
-msgid "\n      enum; End+1 symbol: %ld"
-msgstr "\n      enum; Son+1 sembolü: %ld"
+msgid ""
+"\n"
+"      enum; End+1 symbol: %ld"
+msgstr ""
+"\n"
+"      enum; Son+1 sembolü: %ld"
 
-#: ecoff.c:1650
+#: ecoff.c:1631
 #, c-format
-msgid "\n      Type: %s"
-msgstr "\n      Tür: %s"
+msgid ""
+"\n"
+"      Type: %s"
+msgstr ""
+"\n"
+"      Tür: %s"
 
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
-#: elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr "%1$s: uyarý: %3$s bölümünden `%2$s' sembolüne çözümlenemeyen yer deðiþimi"
+msgstr "%1$s: uyarı: %3$s bölümünden `%2$s' sembolüne çözümlenemeyen yer deÄŸiÅŸimi"
 
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1392 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1281 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
 msgid "internal error: out of range error"
-msgstr "iç hata: kapsam dýþý hatasý"
+msgstr "iç hata: kapsam dışı hatası"
 
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1396 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1285 elf32-mips.c:7565 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
 msgid "internal error: unsupported relocation error"
-msgstr "iç hata: desteklenmeyen yer deðiþim hatasý"
+msgstr "iç hata: desteklenmeyen yer deÄŸiÅŸim hatası"
 
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1289
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
 msgid "internal error: dangerous error"
-msgstr "iç hata: ölümcül hata"
+msgstr "iç hata: ölümcül hata"
 
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1404 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1293 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
 msgid "internal error: unknown error"
-msgstr "iç hata: bilinmeyen hata"
+msgstr "iç hata: bilinmeyen hata"
 
-#: elf.c:345
+#: elf.c:343
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
-msgstr "%1$s: `%4$s' bölümünde geçersiz dizge göreli konumu  %2$u >= %3$lu"
+msgstr "%1$s: `%4$s' bölümünde geçersiz dizge göreli konumu  %2$u >= %3$lu"
 
-#: elf.c:450
+#: elf.c:589
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
-msgstr "%s: geçersiz SHT_GROUP girdisi"
+msgstr "%s: geçersiz SHT_GROUP girdisi"
 
-#: elf.c:531
+#: elf.c:660
 #, c-format
 msgid "%s: no group info for section %s"
-msgstr "%s: %s bölümünde grup bilgisi yok"
+msgstr "%s: %s bölümünde grup bilgisi yok"
 
-#: elf.c:842
-msgid "\nProgram Header:\n"
-msgstr "\nYazýlým Baþlýðý:\n"
+#: elf.c:1023
+msgid ""
+"\n"
+"Program Header:\n"
+msgstr ""
+"\n"
+"Yazılım Başlığı:\n"
 
-#: elf.c:891
-msgid "\nDynamic Section:\n"
-msgstr "\nDinamik Bölüm:\n"
+#: elf.c:1073
+msgid ""
+"\n"
+"Dynamic Section:\n"
+msgstr ""
+"\n"
+"Dinamik Bölüm:\n"
 
-#: elf.c:1020
-msgid "\nVersion definitions:\n"
-msgstr "\nSürüm tanýmlarý:\n"
+#: elf.c:1202
+msgid ""
+"\n"
+"Version definitions:\n"
+msgstr ""
+"\n"
+"Sürüm tanımları:\n"
 
-#: elf.c:1043
-msgid "\nVersion References:\n"
-msgstr "\nSürüm Referanslarý:\n"
+#: elf.c:1225
+msgid ""
+"\n"
+"Version References:\n"
+msgstr ""
+"\n"
+"Sürüm Referansları:\n"
 
-#: elf.c:1048
+#: elf.c:1230
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  %s'den isteniyor:\n"
 
-#: elf.c:1675
+#: elf.c:1902
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
-msgstr "%1$s: yerdeðiþim bölümü %3$s (indeks %4$u) için geçersiz bað %2$lu"
+msgstr "%1$s: yerdeÄŸiÅŸim bölümü %3$s (indeks %4$u) için geçersiz baÄŸ %2$lu"
 
-#: elf.c:3289
+#: elf.c:3603
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr "%s: Yazýlým baþlýklarý için yeterli yer yok (%u ayrýldý, %u gerekli)"
+msgstr "%s: Yazılım baÅŸlıkları için yeterli yer yok (%u ayrıldı, %u gerekli)"
 
-#: elf.c:3393
+#: elf.c:3708
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr "%s: yazýlým baþlýklarý için gerekli yer yok, -N ile baðlamayý deneyin"
+msgstr "%s: yazılım baÅŸlıkları için gerekli yer yok, -N ile baÄŸlamayı deneyin"
 
-#: elf.c:3518
+#: elf.c:3833
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
-msgstr "Hata: Parçadaki (%s) ilk bölüm 0x%x'de, parça ise 0x%x'de baþlýyor"
+msgstr "Hata: Parçadaki (%s) ilk bölüm 0x%x'de, parça ise 0x%x'de baÅŸlıyor"
 
-#: elf.c:3804
+#: elf.c:4148
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
-msgstr "%s: uyarý: ayrýlmýþ `%s' bölümü parça içinde deðil"
+msgstr "%s: uyarı: ayrılmış `%s' bölümü parça içinde deÄŸil"
 
-#: elf.c:4138
+#: elf.c:4472
 #, c-format
 msgid "%s: symbol `%s' required but not present"
-msgstr "%s: `%s' sembolü gerekli fakat mevcut deðil"
+msgstr "%s: `%s' sembolü gerekli fakat mevcut deÄŸil"
 
-#: elf.c:4147
+#: elf.c:4749
 #, c-format
-msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
-msgstr "bfd sembolünden elf sembolü:0x%.8lx, isim= %s, sem num = %d, bayrak = 0x%.8lx%s\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: uyarı: BoÅŸ yüklenebilir parça bulundu, bu isteyerek mi yapılıyor?\n"
 
-#: elf.c:4391
-#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: uyarý: Boþ yüklenebilir parça bulundu\n"
-
-#: elf.c:5804
+#: elf.c:6193
 #, c-format
 msgid "%s: unsupported relocation type %s"
-msgstr "%s: desteklenmeyen yerdeðiþim türü %s"
+msgstr "%s: desteklenmeyen yerdeÄŸiÅŸim türü %s"
 
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
-msgstr "%s: Uyarý: Arm BLX iþlemi Arm iþlevi '%s' hedefliyor."
+msgstr "%s: Uyarı: Arm BLX işlemi Arm işlevi '%s' hedefliyor."
 
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
-msgstr "%s: Uyarý: Thumb BLX iþlemi thumb iþlevi '%s'ý hedefliyor."
+msgstr "%s: Uyarı: Thumb BLX işlemi thumb işlevi '%s'ı hedefliyor."
 
-#: elf32-arm.h:1904 elf32-i386.c:1776 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
-msgstr "%s(%s+0x%lx): SEC_MERGE bölümüne %s yerdeðiþimi"
+msgstr "%s(%s+0x%lx): SEC_MERGE bölümüne %s yerdeÄŸiÅŸimi"
 
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr "%1$s: uyarý: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$d yer deðiþimi"
+msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$d yer deÄŸiÅŸimi"
 
-#: elf32-arm.h:2114
+#: elf32-arm.h:2176
 #, c-format
-msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
-msgstr "Uyarý: beraber çalýþmaz diye önceden belirtilmiþ olduðundan %s'nin beraber çalýþma bayraðý atanmadý"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "Uyarı: %2$s'deki beraber çalışmaz kod ona baÄŸlandığı için %1$s'nin beraber çalışma bayrağı temizlendi"
 
-#: elf32-arm.h:2118
+#: elf32-arm.h:2271
 #, c-format
-msgid "Warning: Clearing the interwork flag of %s due to outside request"
-msgstr "Uyarý: Dýþ isteðe uyularak %s'nin beraber çalýþma bayraðý temizlendi"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "Hata: %s EABI sürüm %d için derlenmiÅŸ, fakat %s %d sürümü için derlenmiÅŸ"
 
-#: elf32-arm.h:2166
+#: elf32-arm.h:2285
 #, c-format
-msgid "Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"
-msgstr "Uyarý: %2$s'deki beraber çalýþmaz kod ona baðlandýðý için %1$s'nin beraber çalýþma bayraðý temizlendi"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "HATA: %s, APCS-%d için derlenmiÅŸ fakat hedef %s APCS-%d kullanıyor"
 
-#: elf32-arm.h:2261
+#: elf32-arm.h:2313
 #, c-format
-msgid "Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "Hata: %s EABI sürüm %d için derlenmiþ, fakat %s %d sürümü için derlenmiþ"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "Hata: %s VFP işlemi kullanıyor, fakat %s FPA işlemi kullanıyor"
 
-#: elf32-arm.h:2275
+#: elf32-arm.h:2318
 #, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "Hata: %s APCS-%d için derlenmiþ, fakat %s APCS-%d için derlenmiþ"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "Hata: %s FPA işlemi kullanıyor, fakat %s VFP işlemi kullanıyor"
 
-#: elf32-arm.h:2287
+#: elf32-arm.h:2338
 #, c-format
-msgid "Error: %s passes floats in FP registers, whereas %s passes them in integer registers"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
 msgstr ""
-"Hata: %s kayan sayýlarý kayan sayý yazmaçlarýnda geçiriyor, \n"
-"      fakat %s tamsayý yazmaçlarýnda geçiriyor"
+"Hata: %s yazılımda kayan sayı kullanıyor,\n"
+"      fakat %s donanımda kayan sayı kullanıyor"
 
-#: elf32-arm.h:2292
+#: elf32-arm.h:2343
 #, c-format
-msgid "Error: %s passes floats in integer registers, whereas %s passes them in FP registers"
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
 msgstr ""
-"Hata: %s kayan sayýlarý tamsayý yazmaçlarýnda geçiriyor, \n"
-"      fakat %s kayan sayý yazmaçlarýnda geçiriyor"
-
-#: elf32-arm.h:2303
-#, c-format
-msgid "Error: %s uses VFP instructions, whereas %s FPA instructions"
-msgstr "Hata: %s VFP iþlemi kullanýyor, fakat %s FPA iþlemi kullanýyor"
-
-#: elf32-arm.h:2308
-#, c-format
-msgid "Error: %s uses FPA instructions, whereas %s VFP instructions"
-msgstr "Hata: %s FPA iþlemi kullanýyor, fakat %s VFP iþlemi kullanýyor"
-
-#: elf32-arm.h:2328
-#, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr ""
-"Hata: %s yazýlýmda kayan sayý kullanýyor,\n"
-"      fakat %s donanýmda kayan sayý kullanýyor"
-
-#: elf32-arm.h:2333
-#, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr ""
-"Hata: %s donanýmda kayan sayý kullanýyor,\n"
-"      fakat %s yazýlýmda kayan sayý kullanýyor"
-
-#: elf32-arm.h:2348
-#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "Uyarý: %s girdi dosyasý beraber çalýþmayý destekliyor, fakat %s desteklemiyor."
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "Uyarý: %s girdi dosyasý beraber çalýþmayý desteklemiyor, fakat %s destekliyor."
+"Hata: %s donanımda kayan sayı kullanıyor,\n"
+"      fakat %s yazılımda kayan sayı kullanıyor"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2970 elf32-m68k.c:410 elf32-mips.c:3232
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
 #, c-format
 msgid "private flags = %lx:"
-msgstr "özel bayraklar = %lx:"
-
-#: elf32-arm.h:2395
-msgid " [interworking enabled]"
-msgstr " [beraber çalýþma etkinleþtirilmiþ]"
-
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
-msgid " [VFP float format]"
-msgstr " [VFP kayan nokta biçemi]"
+msgstr "özel bayraklar = %lx:"
 
 #: elf32-arm.h:2405
-msgid " [FPA float format]"
-msgstr " [FPA kayan nokta biçemi]"
+msgid " [interworking enabled]"
+msgstr " [beraber çalışma etkinleÅŸtirilmiÅŸ]"
 
-#: elf32-arm.h:2414
+#: elf32-arm.h:2413
+msgid " [VFP float format]"
+msgstr " [VFP kayan nokta biçemi]"
+
+#: elf32-arm.h:2415
+msgid " [FPA float format]"
+msgstr " [FPA kayan nokta biçemi]"
+
+#: elf32-arm.h:2424
 msgid " [new ABI]"
 msgstr " [yeni ABI]"
 
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
 msgid " [old ABI]"
 msgstr " [eski ABI]"
 
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
 msgid " [software FP]"
-msgstr " [yazýlým FP]"
+msgstr " [yazılım FP]"
 
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
 msgid " [Version1 EABI]"
-msgstr " [Sürüm1 EABI]"
+msgstr " [Sürüm1 EABI]"
 
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
 msgid " [sorted symbol table]"
-msgstr " [sýralanmýþ sembol tablosu]"
+msgstr " [sıralanmış sembol tablosu]"
 
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
 msgid " [unsorted symbol table]"
-msgstr " [sýralanmamýþ sembol tablosu]"
+msgstr " [sıralanmamış sembol tablosu]"
 
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
 msgid " [Version2 EABI]"
-msgstr " [Sürüm2 EABI]"
-
-#: elf32-arm.h:2447
-msgid " [dynamic symbols use segment index]"
-msgstr " [dinamik semboller bölüm indeksini kullanýyor]"
-
-#: elf32-arm.h:2450
-msgid " [mapping symbols precede others]"
-msgstr " [eþleþme sembolleri diðerlerinden önceliklidir]"
+msgstr " [Sürüm2 EABI]"
 
 #: elf32-arm.h:2457
-msgid " <EABI version unrecognised>"
-msgstr " <EABI sürümü bilinmiyor>"
+msgid " [dynamic symbols use segment index]"
+msgstr " [dinamik semboller bölüm indeksini kullanıyor]"
 
-#: elf32-arm.h:2464
-msgid " [relocatable executable]"
-msgstr " [yer deðiþtirebilir uygulama]"
+#: elf32-arm.h:2460
+msgid " [mapping symbols precede others]"
+msgstr " [eÅŸleÅŸme sembolleri diÄŸerlerinden önceliklidir]"
 
 #: elf32-arm.h:2467
+msgid " <EABI version unrecognised>"
+msgstr " <EABI sürümü bilinmiyor>"
+
+#: elf32-arm.h:2474
+msgid " [relocatable executable]"
+msgstr " [yer deÄŸiÅŸtirebilir uygulama]"
+
+#: elf32-arm.h:2477
 msgid " [has entry point]"
-msgstr " [girdi noktasý var]"
+msgstr " [girdi noktası var]"
 
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
 msgid "<Unrecognised flag bits set>"
-msgstr "<Bilinmeyen bayrak bitleri atanmýþ>"
+msgstr "<Bilinmeyen bayrak bitleri atanmış>"
 
-#: elf32-avr.c:843 elf32-cris.c:1400 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
 msgid "internal error: dangerous relocation"
-msgstr "iç hata: tehlikeli yer deðiþim"
+msgstr "iç hata: tehlikeli yer deÄŸiÅŸim"
 
 #: elf32-cris.c:949
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr "%1$s: uyarý: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$s yer deðiþimi"
+msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$s yer deÄŸiÅŸimi"
 
 #: elf32-cris.c:1012
 #, c-format
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr "%1$s: %4$s bölümünden `%3$s' sembolüne %2$s yer deðiþimi için PLT veya GOT yok"
+msgstr "%1$s: %4$s bölümünden `%3$s' sembolüne %2$s yer deÄŸiÅŸimi için PLT veya GOT yok"
 
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
 msgid "[whose name is lost]"
-msgstr "[adý kaybolmuþ]"
+msgstr "[adı kaybolmuş]"
 
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr ""
-"%1$s: %4$s bölümünden yerel sembol sýfýr olmayan %3$d eklemesi ile\n"
-"      %2$s yerdeðiþimi"
+"%1$s: %4$s bölümünden yerel sembol sıfır olmayan %3$d eklemesi ile\n"
+"      %2$s yerdeÄŸiÅŸimi"
 
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr "%1$s: %5$s bölümünden `%4$s' sembolüne sýfýr olmayan %3$d eklemesi ile       %2$s yerdeðiþimi"
+msgstr "%1$s: %5$s bölümünden `%4$s' sembolüne sıfır olmayan %3$d eklemesi ile       %2$s yerdeÄŸiÅŸimi"
 
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr "%1$s: %4$s bölümünden %3$s evrensel sembolü için %2$s yerdeðiþimi yapýlamaz"
+msgstr "%1$s: %4$s bölümünden %3$s evrensel sembolü için %2$s yerdeÄŸiÅŸimi yapılamaz"
 
-#: elf32-cris.c:1275
+#: elf32-cris.c:1170
+#, c-format
+msgid "%s: relocation %s in section %s with no GOT created"
+msgstr "%1$s: `%3$s' bölümünde %2$s yer deÄŸiÅŸtirmesi mevcut, fakat GOT oluÅŸturulmamış"
+
+#: elf32-cris.c:1288
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr "%s: Ýç tutarsýzlýk; %s yerdeðiþim bölümü yok"
+msgstr "%s: Ä°ç tutarsızlık; %s yerdeÄŸiÅŸim bölümü yok"
 
-#: elf32-cris.c:2508
+#: elf32-cris.c:2514
 #, c-format
 msgid ""
 "%s, section %s:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
-"%s, %s bölümü:\n"
-"  %s yer deðiþimi paylaþýmlý nesne oluþtururken kullanýlamaz;\n"
+"%s, %s bölümü:\n"
+"  %s yer değişimi paylaşımlı nesne oluştururken kullanılamaz;\n"
 "  -fPIC ile yeniden derleyin"
 
-#: elf32-cris.c:2973
+#: elf32-cris.c:2991
 msgid " [symbols have a _ prefix]"
-msgstr " [semboller _ önekine sahip]"
+msgstr " [semboller _ önekine sahip]"
 
-#: elf32-cris.c:3012
+#: elf32-cris.c:3030
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr "%s: _-önekli sembolleri kullanýyor, fakat dosyaya öneksiz sembolleri yazýyor"
+msgstr "%s: _-önekli sembolleri kullanıyor, fakat dosyaya öneksiz sembolleri yazıyor"
 
-#: elf32-cris.c:3013
+#: elf32-cris.c:3031
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr "%s: öneksiz sembolleri kullanýyor, fakat dosyaya _-önekli sembolleri yazýyor"
+msgstr "%s: öneksiz sembolleri kullanıyor, fakat dosyaya _-önekli sembolleri yazıyor"
+
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: %s ile derlendi ve normal derlenmiÅŸ modüllerle baÄŸlandı"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: %s ile derlendi ve %s ile derlenmiÅŸ modüllerle baÄŸlandı"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: önceki modüllerden farklı bilinmeyen e_flags (0x%lx)  alanları kullanılıyor (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "özel bayraklar = 0x%lx:"
 
 #: elf32-gen.c:82 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
-msgstr "%s: Normal ELF'de yerdeðiþimler (EM: %d)"
+msgstr "%s: Normal ELF'de yerdeÄŸiÅŸimler (EM: %d)"
 
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
 #, c-format
 msgid "%s: cannot create stub entry %s"
-msgstr "%s: koçan giriþi %s oluþturulamadý"
+msgstr "%s: koçan giriÅŸi %s oluÅŸturulamadı"
 
-#: elf32-hppa.c:937 elf32-hppa.c:3540
+#: elf32-hppa.c:956 elf32-hppa.c:3555
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
-msgstr "%s(%s+0x%lx): %s'e ulaþýlamadý, -ffunction-sections ile derleyin"
+msgstr "%s(%s+0x%lx): %s'e ulaşılamadı, -ffunction-sections ile derleyin"
 
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: %s yer deðiþimi paylaþýmlý nesne oluþturulurken kullanýlamaz; -fPIC ile yeniden derleyin"
+msgstr "%s: %s yer değişimi paylaşımlı nesne oluşturulurken kullanılamaz; -fPIC ile yeniden derleyin"
 
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: %s yer deðiþimi paylaþýmlý nesne oluþtururken kullanýlamaz; -fPIC ile yeniden derleyin"
+msgstr "%s: %s yer değişimi paylaşımlı nesne oluştururken kullanılamaz; -fPIC ile yeniden derleyin"
 
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
 #, c-format
 msgid "Could not find relocation section for %s"
-msgstr "%s için yer deðiþtirme bölümü bulunamadý"
+msgstr "%s için yer deÄŸiÅŸtirme bölümü bulunamadı"
 
-#: elf32-hppa.c:2862
+#: elf32-hppa.c:2855
 #, c-format
 msgid "%s: duplicate export stub %s"
-msgstr "%s: birden fazla ihraç koçaný %s"
+msgstr "%s: birden fazla ihraç koçanı %s"
 
-#: elf32-hppa.c:3424
+#: elf32-hppa.c:3433
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
-msgstr "%s(%s+0x%lx): %s düzeltiliyor"
+msgstr "%s(%s+0x%lx): %s düzeltiliyor"
 
-#: elf32-hppa.c:4064
+#: elf32-hppa.c:4080
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
-msgstr "%1$s(%2$s+0x%3$lx): %5$s için %4$s iþlenemedi"
+msgstr "%1$s(%2$s+0x%3$lx): %5$s için %4$s iÅŸlenemedi"
 
-#: elf32-hppa.c:4403
+#: elf32-hppa.c:4393
 msgid ".got section not immediately after .plt section"
-msgstr ".got bölümü .plt bölümünün hemen arkasýnda deðil"
+msgstr ".got bölümü .plt bölümünün hemen arkasında deÄŸil"
 
-#: elf32-i386.c:298
+#: elf32-i386.c:379
 #, c-format
 msgid "%s: invalid relocation type %d"
-msgstr "%s: geçersiz yer deðiþim türü %d"
+msgstr "%s: geçersiz yer deÄŸiÅŸim türü %d"
 
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
 #, c-format
 msgid "%s: bad symbol index: %d"
-msgstr "%s: geçersiz sembol indeksi: %d"
+msgstr "%s: geçersiz sembol indeksi: %d"
 
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2085 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: `%s'a hem normal, hem de dal yerel sembolü olarak eriÅŸildi"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
 #, c-format
 msgid "%s: bad relocation section name `%s'"
-msgstr "%s: geçersiz yerdeðiþim bölümü adý `%s'"
+msgstr "%s: geçersiz yerdeÄŸiÅŸim bölümü adı `%s'"
 
-#: elf32-i386.c:2067 elf32-s390.c:1949 elf64-ppc.c:3908 elf64-s390.c:1953
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: TLS yerel çalıştırma kodu paylaşımlı nesnelere baÄŸlanamaz"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
-msgstr "%s(%s+0x%lx): `%s' sembolüne çözümlenemeyen yer deðiþimi"
+msgstr "%s(%s+0x%lx): `%s' sembolüne çözümlenemeyen yer deÄŸiÅŸimi"
 
-#: elf32-i386.c:2105 elf32-s390.c:1987 elf64-s390.c:1991
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
-msgstr "%s(%s+0x%lx): %s'e yer deðiþimi: %d hatasý"
+msgstr "%s(%s+0x%lx): %s'e yer değişimi: %d hatası"
 
 #: elf32-m32r.c:924
 msgid "SDA relocation when _SDA_BASE_ not defined"
-msgstr "_SDA_BASE_ tanýmlanmamýþ iken SDA yer deðiþimi"
+msgstr "_SDA_BASE_ tanımlanmamış iken SDA yer değişimi"
 
-#: elf32-ia64.c:3538 elf32-m32r.c:1008 elf32-ppc.c:2930 elf64-ia64.c:3538
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
 #, c-format
 msgid "%s: unknown relocation type %d"
-msgstr "%s: bilinmeyen yer deðiþim türü %d"
+msgstr "%s: bilinmeyen yer deÄŸiÅŸim türü %d"
 
-#: elf32-m32r.c:1224
+#: elf32-m32r.c:1221
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr "%1$s: Bir %3$s yer deðiþiminin hedefi (%2$s) yanlýþ bölümde (%4$s)"
+msgstr "%1$s: Bir %3$s yer deÄŸiÅŸiminin hedefi (%2$s) yanlış bölümde (%4$s)"
 
-#: elf32-m32r.c:2001
+#: elf32-m32r.c:1947
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
-msgstr "%s: Önceki modüllerle iþlem uyuþmazlýðý"
+msgstr "%s: Önceki modüllerle iÅŸlem uyuÅŸmazlığı"
 
-#: elf32-m32r.c:2024
+#: elf32-m32r.c:1970
 #, c-format
 msgid "private flags = %lx"
-msgstr "özel bayraklar = %lx"
+msgstr "özel bayraklar = %lx"
 
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1975
 msgid ": m32r instructions"
-msgstr ": m32r iþlemleri"
+msgstr ": m32r iÅŸlemleri"
 
-#: elf32-m32r.c:2030
+#: elf32-m32r.c:1976
 msgid ": m32rx instructions"
-msgstr ": m32rx iþlemleri"
+msgstr ": m32rx iÅŸlemleri"
 
 #: elf32-m68k.c:413
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
-msgstr "%s: %s (%d) yer deðiþimi henüz desteklenmiyor.\n"
+msgstr "%s: %s (%d) yer deÄŸiÅŸimi henüz desteklenmiyor.\n"
 
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
-msgstr "%s: Bilinmeyen yer deðiþim türü %d\n"
+msgstr "%s: Bilinmeyen yer deÄŸiÅŸim türü %d\n"
 
-#: elf32-mips.c:2146 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
 msgid "32bits gp relative relocation occurs for an external symbol"
-msgstr "32 bitlik gp göreceli yer deðiþim bir dýþ sembol için yapýlýyor"
+msgstr "32 bitlik gp göreceli yer deÄŸiÅŸim bir dış sembol için yapılıyor"
 
-#: elf32-mips.c:2295
+#: elf32-mips.c:1301
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
-msgstr "mips16 nesnelerini %s biçemine baðlamak desteklenmiyor"
+msgstr "mips16 nesnelerini %s biçemine baÄŸlamak desteklenmiyor"
 
-#: elf32-mips.c:3119
-#, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: PIC dosyalarý PIC olmayan dosyalarla baðlanýyor"
-
-#: elf32-mips.c:3129
-#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: abicalls dosyalarý abicalls olmayan dosyalarla baðlanýyor"
-
-#: elf32-mips.c:3158
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%1$s: Önceki modüllerle (-mips%3$d) ile ISA uyumsuzluðu (-mips%2$d)"
-
-#: elf32-mips.c:3167
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%1$s: Önceki modüllerle (%3$d) ile ISA uyumsuzluðu (%2$d)"
-
-#: elf32-mips.c:3190
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI uyumsuzluðu: %s modülü önceki %s modülle baðlanýyor"
-
-#: elf32-mips.c:3204 elf32-ppc.c:1470 elf64-ppc.c:1538 elf64-sparc.c:3033
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%1$s: önceki modüllerden (0x%3$lx) farklý e_flags (0x%2$lx) alanlarý kullanýlýyor"
-
-#: elf32-mips.c:3235
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3237
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3239
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3241
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3243
-msgid " [abi unknown]"
-msgstr " [abi bilinmiyor]"
-
-#: elf32-mips.c:3245
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3249
-msgid " [no abi set]"
-msgstr " [abi atanmamýþ]"
-
-#: elf32-mips.c:3252
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3254
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3256
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3258
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3260
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3262
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3264
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3266
-msgid " [unknown ISA]"
-msgstr " [bilinmeyen ISA]"
-
-#: elf32-mips.c:3269
-msgid " [32bitmode]"
-msgstr " [32bitkipi]"
-
-#: elf32-mips.c:3271
-msgid " [not 32bitmode]"
-msgstr " [32bitkipi deðil]"
-
-#: elf32-mips.c:4947
-msgid "static procedure (no name)"
-msgstr "statik altyordam (isimsiz)"
-
-#: elf32-mips.c:5565 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: geçersiz bölüm adý `%s'"
-
-#: elf32-mips.c:6132 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "yerel GOT girdileri için yeterli GOT yeri yok"
-
-#: elf32-mips.c:7238 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: jal olmayan koçan yordamýna sýçrama"
-
-#: elf32-mips.c:8237 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: %s bölümü için geçersiz yer deðiþim bulundu"
-
-#: elf32-mips.c:8315 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: 0x%lx'deki CALL16 yerdeðiþimi evrensel sembole göre deðil"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1503
+#: elf32-ppc.c:1460
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr "%s: -mrelocatable ile derlendi ve normal derlenmiþ modüllerle baðlandý"
+msgstr "%s: -mrelocatable ile derlendi ve normal derlenmiÅŸ modüllerle baÄŸlandı"
 
-#: elf32-ppc.c:1444 elf64-ppc.c:1511
+#: elf32-ppc.c:1468
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr "%s: normal derlendi ve -mrelocatable ile derlenmiþ modüllere baðlandý"
+msgstr "%s: normal derlendi ve -mrelocatable ile derlenmiÅŸ modüllere baÄŸlandı"
 
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%1$s: önceki modüllerden (0x%3$lx) farklı e_flags (0x%2$lx) alanları kullanılıyor"
+
+#: elf32-ppc.c:1592
 #, c-format
 msgid "%s: Unknown special linker type %d"
-msgstr "%s: Bilinmeyen özel baðlayýcý türü %d"
+msgstr "%s: Bilinmeyen özel baÄŸlayıcı türü %d"
 
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr "%s: %s yerdeðiþimi paylaþýmlý nesne oluþturulurken kullanýlamaz"
+msgstr "%s: %s yerdeğişimi paylaşımlı nesne oluşturulurken kullanılamaz"
 
-#: elf32-ppc.c:3097 elf64-ppc.c:3500
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
-msgstr "%1$s: %3$s sembolü için bilinmeyen %2$d türünde yerdeðiþimi"
+msgstr "%1$s: %3$s sembolü için bilinmeyen %2$d türünde yerdeÄŸiÅŸimi"
 
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
 #, c-format
 msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%1$s: %3$s yerdeðiþiminin hedefi (%2$s) yanlýþ çýktý bölümünde (%4$s)"
+msgstr "%1$s: %3$s yerdeÄŸiÅŸiminin hedefi (%2$s) yanlış çıktı bölümünde (%4$s)"
 
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
 #, c-format
 msgid "%s: Relocation %s is not yet supported for symbol %s."
-msgstr "%s: %s yerdeðiþimi %s sembolü için henüz desteklenmiyor."
+msgstr "%s: %s yerdeÄŸiÅŸimi %s sembolü için henüz desteklenmiyor."
 
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
-msgstr "%s: 0x%lx: uyarý: hatalý R_SH_USES göreli konumu"
+msgstr "%s: 0x%lx: uyarı: hatalı R_SH_USES göreli konumu"
 
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
-msgstr "%s: 0x%lx: uyarý: R_SH_USES bilinmeyen insn 0x%x'ý imliyor"
+msgstr "%s: 0x%lx: uyarı: R_SH_USES bilinmeyen insn 0x%x'ı imliyor"
 
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
-msgstr "%s: 0x%lx: uyarý: hatalý R_SH_USES yükleme göreli konumu"
+msgstr "%s: 0x%lx: uyarı: hatalı R_SH_USES yükleme göreli konumu"
 
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
-msgstr "%s: 0x%lx: uyarý: beklenen yerdeðiþim bulunamadý"
+msgstr "%s: 0x%lx: uyarı: beklenen yerdeğişim bulunamadı"
 
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
-msgstr "%s: 0x%lx: uyarý: beklenmeyen bölümde sembol"
+msgstr "%s: 0x%lx: uyarı: beklenmeyen bölümde sembol"
 
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
-msgstr "%s: 0x%lx: uyarý: beklenen COUNT yerdeðiþimi bulunamadý"
+msgstr "%s: 0x%lx: uyarı: beklenen COUNT yerdeğişimi bulunamadı"
 
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
-msgstr "%s: 0x%lx: uyarý: hatalý sayým"
+msgstr "%s: 0x%lx: uyarı: hatalı sayım"
 
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
-msgstr "%s: 0x%lx: ölümcül: gevþetilirken yerdeðiþim taþmasý"
+msgstr "%s: 0x%lx: ölümcül: gevÅŸetilirken yerdeÄŸiÅŸim taÅŸması"
 
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "Yerel sembolde STO_SH5_ISA32 desteklenmiyor"
+
+#: elf32-sh.c:4284
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr "%s: 0x%lx: ölümcül: gevþetme destek yerdeðiþimi için hizalanmamýþ dal"
+msgstr "%s: 0x%lx: ölümcül: gevÅŸetme destek yerdeÄŸiÅŸimi için hizalanmamış dal"
 
-#: elf32-sparc.c:1554 elf64-sparc.c:2286
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: 32 bitlik sistem için derlenmiÅŸ ve %s 64 bit"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: 64 bitlik sistem için derlenmiÅŸ ve %s 32 bit"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: nesne boyu hedef %s'nin boyuyla eÅŸleÅŸmiyor"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: girdide veri etiketi sembolüne rastlandı"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "PTB uyumsuzluÄŸu: SHmedia adresi (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "PTA uyumsuzluÄŸu: SHcompact adresi (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: GAS hatası: R_SH_PT_16 içeren PTB yönergesi beklenmiyordu"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%1$s: %3$08x ve %4$08x yerdeÄŸiÅŸtirmesinde hizalanmamış yer deÄŸiÅŸtirme türü %2$d\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: eklenen .cranges girdileri yazılamadı"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: sıralanmış .cranges girdileri yazılamadı"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
-msgstr "%s: acaba -fPIC olmaksýzýn mý derlenmiþ?"
+msgstr "%s: acaba -fPIC olmaksızın mı derlenmiş?"
 
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
-msgstr "%s: 64 bitlik sistem için derlenmiþ ve hedef 32 bit"
+msgstr "%s: 64 bitlik sistem için derlenmiÅŸ ve hedef 32 bit"
 
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
 #, c-format
 msgid "%s: linking little endian files with big endian files"
-msgstr "%s: küçük sonlu dosyalar büyük sonlu dosyalarla baðlanýyor"
+msgstr "%s: küçük sonlu dosyalar büyük sonlu dosyalarla baÄŸlanıyor"
 
 #: elf32-v850.c:682
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
-msgstr "`%s' deðiþkeni birden fazla küçük veri sahasýný kapsayamaz"
+msgstr "`%s' deÄŸiÅŸkeni birden fazla küçük veri sahasını kapsayamaz"
 
 #: elf32-v850.c:685
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr "`%s' deðiþkeni küçük, sýfýr ve ufak veri sahalarýndan yalnýz birinde olabilir"
+msgstr "`%s' deÄŸiÅŸkeni küçük, sıfır ve ufak veri sahalarından yalnız birinde olabilir"
 
 #: elf32-v850.c:688
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr "`%s' deðiþkeni ayný anda hem küçük hem sýfýr veri sahalarýnda bulunamaz"
+msgstr "`%s' deÄŸiÅŸkeni aynı anda hem küçük hem sıfır veri sahalarında bulunamaz"
 
 #: elf32-v850.c:691
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr "`%s' deðiþkeni ayný anda hem küçük hem ufak veri sahalarýnda bulunamaz"
+msgstr "`%s' deÄŸiÅŸkeni aynı anda hem küçük hem ufak veri sahalarında bulunamaz"
 
 #: elf32-v850.c:694
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr "`%s' deðiþkeni ayný anda hem sýfýr hem ufak veri sahalarýnda bulunamaz"
+msgstr "`%s' değişkeni aynı anda hem sıfır hem ufak veri sahalarında bulunamaz"
 
 #: elf32-v850.c:1072
 msgid "FAILED to find previous HI16 reloc\n"
-msgstr "önceki HI16 yerdeðiþimi BULUNAMADI\n"
+msgstr "önceki HI16 yerdeÄŸiÅŸimi BULUNAMADI\n"
 
 #: elf32-v850.c:1703
 msgid "could not locate special linker symbol __gp"
-msgstr "özel baðlayýcý sembolü __gp bulunamadý"
+msgstr "özel baÄŸlayıcı sembolü __gp bulunamadı"
 
 #: elf32-v850.c:1707
 msgid "could not locate special linker symbol __ep"
-msgstr "özel baðlayýcý sembolü __ep bulunamadý"
+msgstr "özel baÄŸlayıcı sembolü __ep bulunamadı"
 
 #: elf32-v850.c:1711
 msgid "could not locate special linker symbol __ctbp"
-msgstr "özel baðlayýcý sembolü __ctbp bulunamadý"
+msgstr "özel baÄŸlayıcı sembolü __ctbp bulunamadı"
 
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
-msgstr "%s: Önceki modüllerle platform uyumsuzluðu"
+msgstr "%s: Önceki modüllerle platform uyumsuzluÄŸu"
 
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
 #, c-format
 msgid "private flags = %lx: "
-msgstr "özel bayraklar = %lx:"
+msgstr "özel bayraklar = %lx:"
 
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
 msgid "v850 architecture"
 msgstr "v850 platformu"
 
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
 msgid "v850e architecture"
 msgstr "v850e platformu"
 
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
 msgid "v850ea architecture"
 msgstr "v850ea platformu"
 
-#: elf64-alpha.c:858
-msgid "GPDISP relocation did not find ldah and lda instructions"
-msgstr "GPDISP yerdeðiþimi ldah ve lda iþlemlerini bulamadý"
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [nonpic]"
 
-#: elf64-alpha.c:2934
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [d-float]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [g-float]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%1$s: uyarı: `%3$s'ye GOT %2$ld eklentisi bir önceki %4$ld GOT eklentisiyle eÅŸleÅŸmiyor"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne PLT eklentisi %2$d yok sayıldı"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne %2$s yer deÄŸiÅŸimi"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%1$s: uyarı: %4$s bölümünden 0x%3$x'e %2$s yer deÄŸiÅŸimi"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+msgid "non-zero addend in @fptr reloc"
+msgstr "@fptr yerdeğişiminde sıfır olmayan eklenti"
+
+#: elf64-alpha.c:1097
+msgid "GPDISP relocation did not find ldah and lda instructions"
+msgstr "GPDISP yerdeğişimi ldah ve lda işlemlerini bulamadı"
+
+#: elf64-alpha.c:3675
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
-msgstr "%s: .got alt parçasý 64K'yý aþýyor (boy %d)"
+msgstr "%s: .got alt parçası 64K'yı aşıyor (boy %d)"
 
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
-msgstr "%s: %s dinamik sembolüne gp göreceli yer deðiþimi"
+msgstr "%s: %s dinamik sembolüne gp göreceli yer deÄŸiÅŸimi"
 
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne pc göreceli yer deÄŸiÅŸimi"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: gp içinde deÄŸiÅŸiklik: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<bilinmeyen>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: .prologue olmaksızın sembole !samegp yerdeğişimi: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: %s'e desteklenmeyen dinamik yerdeÄŸiÅŸim"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne dtp göreceli yer deÄŸiÅŸimi"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne tp göreceli yer deÄŸiÅŸimi"
+
+#: elf64-hppa.c:2080
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
-msgstr "%s için koçan girdisi .plt'yi yükleyemedi, dp görecesi = %ld"
+msgstr "%s için koçan girdisi .plt'yi yükleyemedi, dp görecesi = %ld"
 
-#: elf64-mmix.c:1268
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: baÄŸlayıcı tarafından ayrılmış global yazmaç deÄŸeri için iç tutarsızlık hatası:\n"
+" 0x%lx%08lx != gevÅŸetilmiÅŸ: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: yazmaç sembolüne temel artı görece yerdeÄŸiÅŸimi: %s içinde (bilinmeyen)"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%1$s: yazmaç sembolüne temel artı görece yerdeÄŸiÅŸimi: %3$s içinde %2$s"
+
+#: elf64-mmix.c:1435
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: yazmaç olmayan sembole yazmaç yerdeÄŸiÅŸimi: %s içinde (bilinmeyen)"
+
+#: elf64-mmix.c:1440
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
-msgstr "%1$s: yazmaç olmayan sembole yazmaç yerdeðiþimi: %3$s içinde %2$s"
+msgstr "%1$s: yazmaç olmayan sembole yazmaç yerdeÄŸiÅŸimi: %3$s içinde %2$s"
 
-#: elf64-mmix.c:1270
-msgid "(unknown)"
-msgstr "(bilinmeyen)"
-
-#: elf64-mmix.c:1305
+#: elf64-mmix.c:1477
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr "%s: YEREL (LOCAL) yönergesi yalnýz bir yazmaç veya kesin deðerle geçerlidir"
+msgstr "%s: YEREL (LOCAL) yönergesi yalnız bir yazmaç veya kesin deÄŸerle geçerlidir"
 
-#: elf64-mmix.c:1333
+#: elf64-mmix.c:1505
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr ""
-"%s: YEREL (LOCAL) yönergesi: $%ld yazmacý yerel yazmaç deðil.\n"
-"    Ýlk evrensel yazmaç: $%ld."
+"%s: YEREL (LOCAL) yönergesi: $%ld yazmacı yerel yazmaç deÄŸil.\n"
+"    Ä°lk evrensel yazmaç: $%ld."
 
-#: elf64-mmix.c:1609
+#: elf64-mmix.c:1965
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr ""
-"%s: Hata: `%s' birden fazla defa tanýmlanmýþ; %s'nin baþlangýcý daha önce\n"
-"    baðlanan bir dosyada.\n"
+"%s: Hata: `%s' birden fazla defa tanımlanmış; %s'nin baÅŸlangıcı daha önce\n"
+"    baÄŸlanan bir dosyada.\n"
 
-#: elf64-mmix.c:1668
+#: elf64-mmix.c:2024
 msgid "Register section has contents\n"
-msgstr "Yazmaç bölümünde içerik yok\n"
+msgstr "Yazmaç bölümünde içerik yok\n"
 
-#: elf64-ppc.c:1466 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+"  Please report this bug."
+msgstr ""
+"Ä°ç uyumsuzluk: kalan %u != maksimum %u. \n"
+"  Lütfen bu hatayı bildirin."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
-msgstr "%s: büyük sonlu sistem için derlenmiþ ve hedef küçük sonlu"
+msgstr "%s: büyük sonlu sistem için derlenmiÅŸ ve hedef küçük sonlu"
 
-#: elf64-ppc.c:1468 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
-msgstr "%s: küçük sonlu sistem için derlenmiþ ve hedef büyük sonlu"
+msgstr "%s: küçük sonlu sistem için derlenmiÅŸ ve hedef büyük sonlu"
 
-#: elf64-ppc.c:3166
+#: elf64-ppc.c:3610
 #, c-format
-msgid "linkage table overflow against `%s'"
-msgstr "`%s'ye baðlama tablosu taþmasý"
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: opd bölümünde beklenmeyen yerdeÄŸiÅŸim türü %u"
 
-#: elf64-ppc.c:3244
-msgid "stub section size doesn't match calculated size"
-msgstr "koçan bölümü boyu hesaplanan boyla eþleþmiyor"
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: opd, opd girdilerinin düzenli dizisi deÄŸil"
 
-#: elf64-ppc.c:3845
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: opd bölümünde tanımlanmamış `%s' sembolü"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "`%s' dal koçanı bulunamadı"
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
+msgid "linkage table error against `%s'"
+msgstr "`%s'ye bağlama tablosu hatası"
+
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "`%s' dal koçanı derlenemedi"
+
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "koçanlar hesaplanan boyla eÅŸleÅŸmiyor"
+
+#: elf64-ppc.c:5828
 #, c-format
 msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s: %s yerdeðiþimi %s sembolü için henüz desteklenmiyor."
+msgstr "%s: %s yerdeÄŸiÅŸimi %s sembolü için henüz desteklenmiyor."
 
-#: elf64-ppc.c:3889
+#: elf64-ppc.c:5872
 #, c-format
 msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: hata: %s yerdeðiþimi 4'ün katý deðil"
+msgstr "%s: hata: %s yerdeÄŸiÅŸimi 4'ün katı deÄŸil"
 
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
-msgstr "%s: check_relocs: desteklenmeyen yerdeðiþim türü %d"
+msgstr "%s: check_relocs: desteklenmeyen yerdeÄŸiÅŸim türü %d"
 
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr "%s: Yalnýz %%g[2367] yazmaçlarý STT_REGISTER ile bildirilebilir"
+msgstr "%s: Yalnız %%g[2367] yazmaçları STT_REGISTER ile bildirilebilir"
 
-#: elf64-sparc.c:1334
+#: elf64-sparc.c:1337
 #, c-format
-msgid "Register %%g%d used incompatibly: %s in %s"
-msgstr "%%g%1$d yazmacý uyumsuz kullanýlmýþ: %3$s içinde %2$s"
+msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
+msgstr "%%g%1$d yazmacı uyumsuz kullanılmış: %3$s içinde %2$s, daha önce %5$s içinde %4$s idi"
 
-#: elf64-sparc.c:1338 elf64-sparc.c:1362 elf64-sparc.c:1411
+#: elf64-sparc.c:1360
 #, c-format
-msgid "  previously %s in %s"
-msgstr "  daha önce %2$s içinde %1$s"
+msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
+msgstr "`%1$s' sembolünün farklı türleri var: %2$s içinde REGISTER (yazmaç), daha önce %4$s içinde %3$s"
 
-#: elf64-sparc.c:1359 elf64-sparc.c:1408
+#: elf64-sparc.c:1406
 #, c-format
-msgid "Symbol `%s' has differing types: %s in %s"
-msgstr "`%1$s' sembolünün farklý türleri var: %3$s içinde %2$s"
+msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
+msgstr ""
+"`%1$s' sembolünün farklı türleri var: %3$s içinde %2$s, \n"
+"  daha önce %4$s içinde REGISTER (yazmaç)"
 
-#: elf64-sparc.c:3014
+#: elf64-sparc.c:2970
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
-msgstr "%s: UltraSPARC'a özel kod HAL'e özel kod ile baðlanýyor"
+msgstr "%s: UltraSPARC'a özel kod HAL'e özel kod ile baÄŸlanıyor"
 
-#: elfcode.h:1218
+#: elfcode.h:1198
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
-msgstr "%s: sürüm sayýsý (%ld) sembol sayýsý (%ld) ile eþleþmiyor"
+msgstr "%s: sürüm sayısı (%ld) sembol sayısı (%ld) ile eÅŸleÅŸmiyor"
 
-#: elflink.c:434
+#: elflink.c:440
 #, c-format
 msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: %s bölümü içine %ld baytlýk bir delik koymak için fazla büyük"
+msgstr "%s: %s bölümü içine %ld baytlık bir delik koymak için fazla büyük"
 
-#: elflink.h:1113
+#: elflink.h:1090
 #, c-format
 msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s: uyarý: `%s' için beklenmeyen yeniden tanýmlama"
+msgstr "%s: uyarı: `%s' için beklenmeyen yeniden tanımlama"
 
-#: elflink.h:1784
+#: elflink.h:1727
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
-msgstr "%s: %s: geçersiz sürüm %u (maksimum %d)"
+msgstr "%s: %s: geçersiz sürüm %u (maksimum %d)"
 
-#: elflink.h:1825
+#: elflink.h:1768
 #, c-format
 msgid "%s: %s: invalid needed version %d"
-msgstr "%s: %s: geçersiz gerekli sürüm %d"
+msgstr "%s: %s: geçersiz gerekli sürüm %d"
 
-#: elflink.h:1945
+#: elflink.h:1890
 #, c-format
 msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "Uyarý: `%s' sembolünün boyu %lu'dan %lu'ya %s içerisinde deðiþti"
+msgstr "Uyarı: `%s' sembolünün boyu %lu'dan %lu'ya %s içerisinde deÄŸiÅŸti"
 
-#: elflink.h:4020
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: DSO içinde preinit_array'e izin verilmiyor"
+
+#: elflink.h:4030
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "uyarý: `%s' dinamik sembolünün türü ve boyu tanýmlý deðil"
+msgstr "uyarı: `%s' dinamik sembolünün türü ve boyu tanımlı deÄŸil"
 
-#: elflink.h:4329
+#: elflink.h:4345
 #, c-format
 msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: sürümlü sembol ismi %s tanýmlý deðil"
+msgstr "%s: sürümlü sembol ismi %s tanımlı deÄŸil"
 
-#: elflink.h:4559 elflink.h:4567 elflink.h:6218 elflink.h:7295
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
 msgid "Error: out of memory"
-msgstr "Hata: bellek tükendi"
+msgstr "Hata: bellek tükendi"
 
-#: elflink.h:4729
+#: elflink.h:4781
 msgid "Not enough memory to sort relocations"
-msgstr "Yerdeðiþimleri sýralamak için gerekli bellek yok"
+msgstr "YerdeÄŸiÅŸimleri sıralamak için gerekli bellek yok"
 
-#: elflink.h:5995
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: çıktı bölümü %s bulunamadı"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "uyarı: %s bölümü sıfır boyunda"
+
+#: elflink.h:6275
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
-msgstr "%1$s: girdi bölümü %3$s için çýktý bölümü %2$s bulunamadý"
+msgstr "%1$s: girdi bölümü %3$s için çıktı bölümü %2$s bulunamadı"
 
-#: elflink.h:6568
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%1$s: %3$s bölümünde %2$s içinde yerdeÄŸiÅŸim boy uyuÅŸmazlığı"
+
+#: elflink.h:6849
 msgid "warning: relocation against removed section; zeroing"
-msgstr "uyarý: silinmiþ bölüme yer deðiþim; sýfýrlandý"
+msgstr "uyarı: silinmiÅŸ bölüme yer deÄŸiÅŸim; sıfırlandı"
 
-#: elflink.h:6598
+#: elflink.h:6879
 msgid "warning: relocation against removed section"
-msgstr "%1$s: silinmiþ bölüme yerdeðiþim"
+msgstr "%1$s: silinmiÅŸ bölüme yerdeÄŸiÅŸim"
 
-#: elflink.h:6611
+#: elflink.h:6892
 #, c-format
 msgid "local symbols in discarded section %s"
-msgstr "atýlmýþ %s bölümünde yerel semboller"
+msgstr "atılmış %s bölümünde yerel semboller"
 
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "statik altyordam (isimsiz)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "yerel GOT girdileri için yeterli GOT yeri yok"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: jal olmayan koçan yordamına sıçrama"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: %s bölümü için geçersiz yer deÄŸiÅŸim bulundu"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: 0x%lx'deki CALL16 yerdeÄŸiÅŸimi evrensel sembole göre deÄŸil"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: geçersiz bölüm adı `%s'"
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: PIC dosyaları PIC olmayan dosyalarla bağlanıyor"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: abicalls dosyaları abicalls olmayan dosyalarla bağlanıyor"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%1$s: Önceki modüllerle (-mips%3$d) ile ISA uyumsuzluÄŸu (-mips%2$d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%1$s: Önceki modüllerle (%3$d) ile ISA uyumsuzluÄŸu (%2$d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: ABI uyumsuzluÄŸu: %s modülü önceki %s modülle baÄŸlanıyor"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [abi bilinmiyor]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [abi atanmamış]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [bilinmeyen ISA]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [32bitkipi]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [32bitkipi deÄŸil]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
 #, c-format
 msgid "Output file requires shared library `%s'\n"
-msgstr "Çýktý dosyasý için paylaþýmlý kitaplýk `%s' gerekli\n"
+msgstr "Çıktı dosyası için paylaşımlı kitaplık `%s' gerekli\n"
 
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
-msgstr "Çýktý dosyasý için paylaþýmlý kitaplýk `%s.so.%s' gerekli\n"
+msgstr "Çıktı dosyası için paylaşımlı kitaplık `%s.so.%s' gerekli\n"
 
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
-msgstr "%s sembolü düzeltmeler için tanýmlý deðil\n"
+msgstr "%s sembolü düzeltmeler için tanımlı deÄŸil\n"
 
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
 msgid "Warning: fixup count mismatch\n"
-msgstr "Uyarý: düzeltme sayý uyumsuzluðu\n"
+msgstr "Uyarı: düzeltme sayı uyumsuzluÄŸu\n"
 
 #: ieee.c:235
 #, c-format
@@ -1518,261 +1765,261 @@
 #: ieee.c:365
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
-msgstr "%s: bilinmeyen `%s' sembol bayraklarý 0x%x"
+msgstr "%s: bilinmeyen `%s' sembol bayrakları 0x%x"
 
 #: ieee.c:877
 #, c-format
-msgid "%s: unimplemented ATI record  %u for symbol %u"
-msgstr "%1$s: %3$u için desteklenmeyen ATI kaydý %2$u"
+msgid "%s: unimplemented ATI record %u for symbol %u"
+msgstr "%1$s: %3$u sembolü için desteklenmeyen ATI kaydı %2$u"
 
 #: ieee.c:902
 #, c-format
 msgid "%s: unexpected ATN type %d in external part"
-msgstr "%s: dýþ parçada beklenmeyen ATN türü %d"
+msgstr "%s: dış parçada beklenmeyen ATN türü %d"
 
 #: ieee.c:924
 #, c-format
 msgid "%s: unexpected type after ATN"
-msgstr "%s: ATN'den sonra beklenmeyen tür"
+msgstr "%s: ATN'den sonra beklenmeyen tür"
 
 #: ihex.c:258
 #, c-format
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
-msgstr "%s:%d: Intel Onaltýlýk dosyasýnda beklenmeyen `%s' karakteri\n"
+msgstr "%s:%d: Intel Onaltılık dosyasında beklenmeyen `%s' karakteri\n"
 
-#: ihex.c:368
+#: ihex.c:366
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr ""
-"%s:%u: Intel Onaltýlýk dosyasýnda hatalý saðlama toplamý\n"
+"%s:%u: Intel Onaltılık dosyasında hatalı sağlama toplamı\n"
 "       (%u beklendi, %u bulundu)"
 
-#: ihex.c:422
+#: ihex.c:420
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr "%s:%u: Intel Onaltýlýk dosyasýnda hatalý uzun adres kaydý uzunluðu"
+msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun adres kaydı uzunluğu"
 
-#: ihex.c:439
+#: ihex.c:437
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr "%s:%u: Intel Onaltýlýk dosyasýnda hatalý uzun baþlangýç adresi uzunluðu"
+msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun baÅŸlangıç adresi uzunluÄŸu"
 
-#: ihex.c:456
+#: ihex.c:454
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr "%s:%u: Intel Onaltýlýk dosyasýnda hatalý uzun lineer adres kaydý uzunluðu"
+msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun lineer adres kaydı uzunluğu"
 
-#: ihex.c:473
+#: ihex.c:471
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr "%s:%u: Intel Onaltýlýk dosyasýnda hatalý uzun lineer baþlangýç adres uzunluðu"
+msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun lineer baÅŸlangıç adres uzunluÄŸu"
 
-#: ihex.c:490
+#: ihex.c:488
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
-msgstr "%s:%u: Intel Onaltýlýk dosyasýnda bilinmeyen onaltýlýk türü %u\n"
+msgstr "%s:%u: Intel Onaltılık dosyasında bilinmeyen onaltılık türü %u\n"
 
-#: ihex.c:610
+#: ihex.c:607
 #, c-format
 msgid "%s: internal error in ihex_read_section"
-msgstr "%s: ihex_read_section'da iç hata"
+msgstr "%s: ihex_read_section'da iç hata"
 
-#: ihex.c:645
+#: ihex.c:642
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
-msgstr "%s: ihex_read_section'da hatalý bölüm uzunluðu"
+msgstr "%s: ihex_read_section'da hatalı bölüm uzunluÄŸu"
 
-#: ihex.c:863
+#: ihex.c:860
 #, c-format
-msgid "%s: address 0x%s out of range for Intex Hex file"
-msgstr "%s: Intex Onaltýlýk dosyasý için 0x%s adresi kapsamdýþý"
+msgid "%s: address 0x%s out of range for Intel Hex file"
+msgstr "%s: Intex Onaltılık dosyası için 0x%s adresi kapsamdışı"
 
 #: libbfd.c:492
 #, c-format
 msgid "not mapping: data=%lx mapped=%d\n"
-msgstr "eþlenmeyen: veri=%lx eþleþen=%d\n"
+msgstr "eÅŸlenmeyen: veri=%lx eÅŸleÅŸen=%d\n"
 
 #: libbfd.c:495
 msgid "not mapping: env var not set\n"
-msgstr "eþlenmeyen: çevre deðiþkeni atanmamýþ\n"
+msgstr "eÅŸlenmeyen: çevre deÄŸiÅŸkeni atanmamış\n"
 
-#: libbfd.c:1463
+#: libbfd.c:1466
 #, c-format
-msgid "Deprecated %s called"
-msgstr "Geçerliliði kalkmýþ %s çaðrýldý"
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "GeçersizleÅŸmiÅŸ %s, %s'da, %d satırı, %s içerisinde çaÄŸrıldı\n"
 
-#: libbfd.c:1465
+#: libbfd.c:1469
 #, c-format
-msgid " at %s line %d in %s\n"
-msgstr "%s, %d satýrý, %s içerisinde\n"
+msgid "Deprecated %s called\n"
+msgstr "GeçerliliÄŸi kalkmış %s çaÄŸrıldı\n"
 
-#: linker.c:1849
+#: linker.c:1873
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
-msgstr "%1$s: `%3$s'den endirekt sembol `%2$s'e çevrim"
+msgstr "%1$s: `%3$s'den endirekt sembol `%2$s'e çevrim"
 
-#: linker.c:2745
+#: linker.c:2776
 #, c-format
 msgid "Attempt to do relocateable link with %s input and %s output"
-msgstr "%s girdi ve %s çýktýsý ile yerdeðiþimli bað deneniyor"
+msgstr "%s girdi ve %s çıktısı ile yerdeÄŸiÅŸimli baÄŸ deneniyor"
 
-#: merge.c:897
+#: merge.c:892
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
-msgstr "%s: karýþtýrýlmýþ bölümün sonundan ileride eriþim (%ld + %ld)"
+msgstr "%s: karıştırılmış bölümün sonundan ileride eriÅŸim (%ld + %ld)"
 
 #: mmo.c:460
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
-msgstr "%s: %s bölüm adýný ayýracak `core' yok\n"
+msgstr "%s: %s bölüm adını ayıracak `core' yok\n"
 
-#: mmo.c:537
+#: mmo.c:536
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
-msgstr "%s: %d bayt uzunluðunda bir sembole yer ayýrmak için `core' yok\n"
+msgstr "%s: %d bayt uzunluÄŸunda bir sembole yer ayırmak için `core' yok\n"
 
-#: mmo.c:1190
+#: mmo.c:1245
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
-msgstr "%s: geçersiz mmo dosyasý: $255 için baþlangýç deðeri `Main' deðil\n"
+msgstr "%s: geçersiz mmo dosyası: $255 için baÅŸlangıç deÄŸeri `Main' deÄŸil\n"
 
-#: mmo.c:1336
+#: mmo.c:1391
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr ""
-"%1$s: `%4$s' ile baþlayan sembol adýndan sonra desteklenmeyen\n"
-"    geniþ karakter dizisi 0x%2$02X 0x%3$02X\n"
+"%1$s: `%4$s' ile başlayan sembol adından sonra desteklenmeyen\n"
+"    geniÅŸ karakter dizisi 0x%2$02X 0x%3$02X\n"
 
-#: mmo.c:1571
+#: mmo.c:1633
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
-msgstr "%s: geçersiz mmo dosyasý: desteklenmeyen lopkod `%d'\n"
+msgstr "%s: geçersiz mmo dosyası: desteklenmeyen lopkod `%d'\n"
 
-#: mmo.c:1581
+#: mmo.c:1643
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
-msgstr "%s: geçersiz mmo dosyasý: YZ = 1 beklendi, lop_quote için YZ = %d bulundu\n"
+msgstr "%s: geçersiz mmo dosyası: YZ = 1 beklendi, lop_quote için YZ = %d bulundu\n"
 
-#: mmo.c:1617
+#: mmo.c:1679
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: z = 1 veya z = 2 beklendi, \n"
-"    lop_loc için z = %d bulundu\n"
+"%s: geçersiz mmo dosyası: z = 1 veya z = 2 beklendi, \n"
+"    lop_loc için z = %d bulundu\n"
 
-#: mmo.c:1663
+#: mmo.c:1725
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr "%s: geçersiz mmo dosyasý: z = 1 veya z = 2 beklendi;     lop_fixo için z = %d bulundu\n"
+msgstr "%s: geçersiz mmo dosyası: z = 1 veya z = 2 beklendi;     lop_fixo için z = %d bulundu\n"
 
-#: mmo.c:1702
+#: mmo.c:1764
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
-msgstr "%s: geçersiz mmo dosyasý: y = 0 beklendi; lop_fixrx için y = %d bulundu\n"
+msgstr "%s: geçersiz mmo dosyası: y = 0 beklendi; lop_fixrx için y = %d bulundu\n"
 
-#: mmo.c:1711
+#: mmo.c:1773
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: z = 16 veya z = 24 beklendi;\n"
-"    lop_fixrx için z = %d bulundu\n"
+"%s: geçersiz mmo dosyası: z = 16 veya z = 24 beklendi;\n"
+"    lop_fixrx için z = %d bulundu\n"
 
-#: mmo.c:1734
+#: mmo.c:1796
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: iþlenen word'un ilk baytý 0 veya 1 olmalý; \n"
-"    lop_fixrx için %d bulundu\n"
+"%s: geçersiz mmo dosyası: iÅŸlenen word'un ilk baytı 0 veya 1 olmalı; \n"
+"    lop_fixrx için %d bulundu\n"
 
-#: mmo.c:1757
+#: mmo.c:1819
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
-msgstr "%s: %d sayýlý dosya için dosya adý ayrýlamadý, %d bayt\n"
+msgstr "%s: %d sayılı dosya için dosya adı ayrılamadı, %d bayt\n"
 
-#: mmo.c:1777
+#: mmo.c:1839
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr "%s: geçersiz mmo dosyasý: %d sayýlý dosya, `%s', zaten `%s' olarak girilmiþ\n"
+msgstr "%s: geçersiz mmo dosyası: %d sayılı dosya, `%s', zaten `%s' olarak girilmiÅŸ\n"
 
-#: mmo.c:1790
+#: mmo.c:1852
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: %d sayýsý için dosya adý kullanýmdan\n"
-"    önce belirtilmemiþ\n"
+"%s: geçersiz mmo dosyası: %d sayısı için dosya adı kullanımdan\n"
+"    önce belirtilmemiÅŸ\n"
 
-#: mmo.c:1896
+#: mmo.c:1958
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: lop_stab'in y ve z alanlarý sýfýr deðil;\n"
+"%s: geçersiz mmo dosyası: lop_stab'in y ve z alanları sıfır deÄŸil;\n"
 "    y: %d, z: %d\n"
 
-#: mmo.c:1932
+#: mmo.c:1994
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
-msgstr "%s: geçersiz mmo dosyasý: lop_end dosyadaki son girdi deðil\n"
+msgstr "%s: geçersiz mmo dosyası: lop_end dosyadaki son girdi deÄŸil\n"
 
-#: mmo.c:1945
+#: mmo.c:2007
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr ""
-"%s: geçersiz mmo dosyasý: lop_end'in YZ'si (%ld); bir önceki \n"
-"    lop_stab'in (%ld) dörtlü sayýsýna eþit deðil\n"
+"%s: geçersiz mmo dosyası: lop_end'in YZ'si (%ld); bir önceki \n"
+"    lop_stab'in (%ld) dörtlü sayısına eÅŸit deÄŸil\n"
 
-#: mmo.c:2610
+#: mmo.c:2670
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
-msgstr "%s: geçersiz sembol tablosu: tekrarlanmýþ sembol `%s'\n"
+msgstr "%s: geçersiz sembol tablosu: tekrarlanmış sembol `%s'\n"
 
-#: mmo.c:2898
+#: mmo.c:2921
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr ""
-"%1$s: Hatalý sembol tanýmý: `Main' baþlangýç adresi %3$s yerine \n"
-"    %2$s olarak tanýmlanmýþ\n"
+"%1$s: Hatalı sembol tanımı: `Main' baÅŸlangıç adresi %3$s yerine \n"
+"    %2$s olarak tanımlanmış\n"
 
-#: mmo.c:2932
+#: mmo.c:3011
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr ""
-"%s: uyarý: sembol tablosu mmo için fazla büyük, 65535 32-bit word'den\n"
-"    fazla: %d. Yalnýz `Main' üretilecek. \n"
+"%s: uyarı: sembol tablosu mmo için fazla büyük, 65535 32-bit word'den\n"
+"    fazla: %d. Yalnız `Main' üretilecek. \n"
 
-#: mmo.c:2977
+#: mmo.c:3056
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
-msgstr "%s: iç hata, sembol tablosu büyüklüðü %d'den %d word'e deðiþti\n"
+msgstr "%s: iç hata, sembol tablosu büyüklüÄŸü %d'den %d word'e deÄŸiÅŸti\n"
 
-#: mmo.c:3032
+#: mmo.c:3111
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
-msgstr "%s: iç hata, %s iç yazmaç bölümü içerik taþýyor\n"
+msgstr "%s: iç hata, %s iç yazmaç bölümü içerik taşıyor\n"
 
-#: mmo.c:3084
+#: mmo.c:3163
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
-msgstr "%s: ilklenen yazmaç yok; bölüm uzunluðu 0\n"
+msgstr "%s: ilklenen yazmaç yok; bölüm uzunluÄŸu 0\n"
 
-#: mmo.c:3090
+#: mmo.c:3169
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
-msgstr "%s: çok fazla ilklenmiþ yazmaç; bölüm uzunluðu %ld\n"
+msgstr "%s: çok fazla ilklenmiÅŸ yazmaç; bölüm uzunluÄŸu %ld\n"
 
-#: mmo.c:3095
+#: mmo.c:3174
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
-msgstr "%s: %ld uzunluðunda ilklenmiþ yazmaçlar için hatalý baþlangýç adresi: 0x%lx%08lx\n"
+msgstr "%s: %ld uzunluÄŸunda ilklenmiÅŸ yazmaçlar için hatalı baÅŸlangıç adresi: 0x%lx%08lx\n"
 
-#: oasys.c:1036
+#: oasys.c:1029
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
-msgstr "%s: oasys'de `%s' bölümü gösterilemiyor"
+msgstr "%s: oasys'de `%s' bölümü gösterilemiyor"
 
 #: osf-core.c:132
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
-msgstr "Desteklenmeyen OSF/1 core dosyasý bölüm türü %d\n"
+msgstr "Desteklenmeyen OSF/1 core dosyası bölüm türü %d\n"
 
 #: pe-mips.c:658
 #, c-format
@@ -1787,62 +2034,66 @@
 #: pe-mips.c:794
 #, c-format
 msgid "%s: unimplemented %s\n"
-msgstr "%s: tamamlanmamýþ %s\n"
+msgstr "%s: tamamlanmamış %s\n"
 
 #: pe-mips.c:820
 #, c-format
 msgid "%s: jump too far away\n"
-msgstr "%s: sýçrama fazla uzak\n"
+msgstr "%s: sıçrama fazla uzak\n"
 
 #: pe-mips.c:847
 #, c-format
 msgid "%s: bad pair/reflo after refhi\n"
-msgstr "%s: refhi'den sonra hatalý çift/reflo\n"
+msgstr "%s: refhi'den sonra hatalı çift/reflo\n"
 
 #. XXX code yet to be written.
 #: peicode.h:785
 #, c-format
 msgid "%s: Unhandled import type; %x"
-msgstr "%s: Desteklenmeyen ithal türü; %x"
+msgstr "%s: Desteklenmeyen ithal türü; %x"
 
 #: peicode.h:790
 #, c-format
 msgid "%s: Unrecognised import type; %x"
-msgstr "%s: Tanýnmayan ithal türü; %x"
+msgstr "%s: Tanınmayan ithal türü; %x"
 
 #: peicode.h:804
 #, c-format
 msgid "%s: Unrecognised import name type; %x"
-msgstr "%s: Tanýnmayan ithal isim türü; %x"
+msgstr "%s: Tanınmayan ithal isim türü; %x"
 
 #: peicode.h:1162
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
-msgstr "%s: Ýthal Kitaplýk Biçem (ILF) arþivinde tanýnmayan makina türü (0x%x) "
+msgstr "%s: Ä°thal Kitaplık Biçem (ILF) arÅŸivinde tanınmayan makina türü (0x%x) "
 
 #: peicode.h:1174
 #, c-format
 msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
-msgstr "%s: Ýthal Kitaplýk Biçem (ILF) arþivinde bilinen fakat desteklenmeyen makina türü (0x%x)"
+msgstr "%s: Ä°thal Kitaplık Biçem (ILF) arÅŸivinde bilinen fakat desteklenmeyen makina türü (0x%x)"
 
 #: peicode.h:1191
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
-msgstr "%s: Ýthal Kitaplýk Biçem (ILF) baþlýðýnda boy alaný sýfýr"
+msgstr "%s: Ä°thal Kitaplık Biçem (ILF) baÅŸlığında boy alanı sıfır"
 
 #: peicode.h:1219
 #, c-format
 msgid "%s: string not null terminated in ILF object file."
-msgstr "%s: ILF nesne dosyasýnda dizge boþ deðerle sonlanmamýþ."
+msgstr "%s: ILF nesne dosyasında dizge boş değerle sonlanmamış."
 
 #: ppcboot.c:416
-msgid "\nppcboot header:\n"
-msgstr "\nppcboot baþlýðý:\n"
+msgid ""
+"\n"
+"ppcboot header:\n"
+msgstr ""
+"\n"
+"ppcboot başlığı:\n"
 
 #: ppcboot.c:417
 #, c-format
 msgid "Entry offset        = 0x%.8lx (%ld)\n"
-msgstr "Girdi göreli konumu = 0x%.8lx (%ld)\n"
+msgstr "Girdi göreli konumu = 0x%.8lx (%ld)\n"
 
 #: ppcboot.c:418
 #, c-format
@@ -1852,702 +2103,807 @@
 #: ppcboot.c:421
 #, c-format
 msgid "Flag field          = 0x%.2x\n"
-msgstr "Bayrak alaný        = 0x%.2x\n"
+msgstr "Bayrak alanı        = 0x%.2x\n"
 
 #: ppcboot.c:427
 #, c-format
 msgid "Partition name      = \"%s\"\n"
-msgstr "Bölüm adý           = \"%s\"\n"
+msgstr "Bölüm adı           = \"%s\"\n"
 
 #: ppcboot.c:446
 #, c-format
-msgid "\nPartition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
-msgstr "\nBölüm[%d] baþlangýcý  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgid ""
+"\n"
+"Partition[%d] start  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr ""
+"\n"
+"Bölüm[%d] baÅŸlangıcı  = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 
 #: ppcboot.c:452
 #, c-format
 msgid "Partition[%d] end    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
-msgstr "Bölüm[%d] sonu    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
+msgstr "Bölüm[%d] sonu    = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
 
 #: ppcboot.c:458
 #, c-format
 msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
-msgstr "Bölüm[%d] sektörü = 0x%.8lx (%ld)\n"
+msgstr "Bölüm[%d] sektörü = 0x%.8lx (%ld)\n"
 
 #: ppcboot.c:459
 #, c-format
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
-msgstr "Bölüm[%d] uzunluðu = 0x%.8lx (%ld)\n"
+msgstr "Bölüm[%d] uzunluÄŸu = 0x%.8lx (%ld)\n"
 
-#: som.c:5402
+#: som.c:5398
 msgid "som_sizeof_headers unimplemented"
-msgstr "som_sizeof_headers tamamlanmamýþ"
+msgstr "som_sizeof_headers tamamlanmamış"
 
 #: srec.c:301
 #, c-format
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
-msgstr "%s:%d: S-kayýt dosyasýnda beklenmeyen `%s' karakteri\n"
+msgstr "%s:%d: S-kayıt dosyasında beklenmeyen `%s' karakteri\n"
 
-#: syms.c:996
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): Stabs girdisinde geçersiz dizge indeksi."
+
+#: syms.c:1044
 msgid "Unsupported .stab relocation"
-msgstr "Desteklenmeyen .stab yerdeðiþimi"
+msgstr "Desteklenmeyen .stab yerdeÄŸiÅŸimi"
 
 #: vms-gsd.c:356
 #, c-format
 msgid "bfd_make_section (%s) failed"
-msgstr "bfd_make_section (%s) baþarýsýz"
+msgstr "bfd_make_section (%s) başarısız"
 
 #: vms-gsd.c:371
 #, c-format
 msgid "bfd_set_section_flags (%s, %x) failed"
-msgstr "bfd_set_section_flags (%s, %x) baþarýsýz"
+msgstr "bfd_set_section_flags (%s, %x) başarısız"
 
 #: vms-gsd.c:407
 #, c-format
 msgid "Size mismatch section %s=%lx, %s=%lx"
-msgstr "Boy uyumsuzluðu bölümü %s=%lx, %s=%lx"
+msgstr "Boy uyumsuzluÄŸu bölümü %s=%lx, %s=%lx"
 
-#: vms-gsd.c:704
+#: vms-gsd.c:702
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
-msgstr "bilinmeyen gsd/egsd alt türü %d"
+msgstr "bilinmeyen gsd/egsd alt türü %d"
 
 #: vms-hdr.c:406
 msgid "Object module NOT error-free !\n"
-msgstr "Nesne modülü hatasýz DEÐÝL !\n"
+msgstr "Nesne modülü hatasız DEĞİL !\n"
 
 #: vms-misc.c:543
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
-msgstr "_bfd_vms_push'da yýðýt taþmasý (%d)"
+msgstr "_bfd_vms_push'da yığıt taşması (%d)"
 
 #: vms-misc.c:561
 msgid "Stack underflow in _bfd_vms_pop"
-msgstr "_bfd_vms_pop'da yýðýt alt taþmasý"
+msgstr "_bfd_vms_pop'da yığıt alt taşması"
 
 #: vms-misc.c:919
 msgid "_bfd_vms_output_counted called with zero bytes"
-msgstr "_bfd_vms_output_counted sýfýr bayt ile çaðrýldý"
+msgstr "_bfd_vms_output_counted sıfır bayt ile çaÄŸrıldı"
 
 #: vms-misc.c:924
 msgid "_bfd_vms_output_counted called with too many bytes"
-msgstr "_bfd_vms_output_counted fazla bayt ile çaðrýldý"
+msgstr "_bfd_vms_output_counted fazla bayt ile çaÄŸrıldı"
 
 #: vms-misc.c:1055
 #, c-format
 msgid "Symbol %s replaced by %s\n"
-msgstr "%s sembolü %s ile deðiþtirildi\n"
+msgstr "%s sembolü %s ile deÄŸiÅŸtirildi\n"
 
 #: vms-misc.c:1117
 #, c-format
 msgid "failed to enter %s"
-msgstr "%s'e giriþ baþarýsýz"
+msgstr "%s'e giriş başarısız"
 
-#: vms-tir.c:78
+#: vms-tir.c:81
 msgid "No Mem !"
-msgstr "Hafýza Yok !"
+msgstr "Hafıza Yok !"
 
-#: vms-tir.c:313
-msgid "Bad section index in ETIR_S_C_STA_PQ"
-msgstr "ETIR_S_C_STA_PQ'de hatalý bölüm indeksi"
-
-#: vms-tir.c:328
+#: vms-tir.c:362
 #, c-format
-msgid "Unsupported STA cmd %d"
-msgstr "Desteklenmeyen STA komutu %d"
+msgid "bad section index in %s"
+msgstr "%s içinde hatalı bölüm indeksi"
 
-#: vms-tir.c:333 vms-tir.c:1301
+#: vms-tir.c:375
 #, c-format
-msgid "Reserved STA cmd %d"
-msgstr "Ayrýlmýþ STA komutu %d"
+msgid "unsupported STA cmd %s"
+msgstr "Desteklenmeyen STA komutu %s"
 
-#: vms-tir.c:443
+#: vms-tir.c:380 vms-tir.c:1240
 #, c-format
-msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_GBL: sembol yok \"%s\""
+msgid "reserved STA cmd %d"
+msgstr "Ayrılmış STA komutu %d"
 
-#: vms-tir.c:465
+#: vms-tir.c:491 vms-tir.c:514
 #, c-format
-msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_CA: sembol yok \"%s\""
+msgid "%s: no symbol \"%s\""
+msgstr "%s: \"%s\" sembolü yok"
 
-#: vms-tir.c:478
-msgid "ETIR_S_C_STO_RB/AB: Not supported"
-msgstr "ETIR_S_C_STO_RB/AB: Desteklenmiyor"
-
-#: vms-tir.c:538
-msgid "ETIR_S_C_STO_LP_PSB: Not supported"
-msgstr "ETIR_S_C_STO_LP_PSB: Desteklenmiyor"
-
-#: vms-tir.c:544
-msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
-msgstr "ETIR_S_C_STO_HINT_GBL: tamamlanmamýþ"
-
-#: vms-tir.c:550
-msgid "ETIR_S_C_STO_HINT_PS: not implemented"
-msgstr "ETIR_S_C_STO_HINT_PS: tamamlanmamýþ"
-
-#: vms-tir.c:554 vms-tir.c:1473
+#. unsigned shift
+#. rotate
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
+#: vms-tir.c:838 vms-tir.c:1563
 #, c-format
-msgid "Reserved STO cmd %d"
-msgstr "Ayrýlmýþ STO komutu %d"
+msgid "%s: not supported"
+msgstr "%s: desteklenmiyor"
 
-#: vms-tir.c:667
-msgid "ETIR_S_C_OPR_INSV: Not supported"
-msgstr "ETIR_S_C_OPR_INSV: Desteklenmiyor"
-
-#: vms-tir.c:685
-msgid "ETIR_S_C_OPR_USH: Not supported"
-msgstr "ETIR_S_C_OPR_USH: Desteklenmiyor"
-
-#: vms-tir.c:691
-msgid "ETIR_S_C_OPR_ROT: Not supported"
-msgstr "ETIR_S_C_OPR_ROT: Desteklenmiyor"
-
-#: vms-tir.c:710
-msgid "ETIR_S_C_OPR_REDEF: Not supported"
-msgstr "ETIR_S_C_OPR_REDEF: Desteklenmiyor"
-
-#: vms-tir.c:716
-msgid "ETIR_S_C_OPR_DFLIT: Not supported"
-msgstr "ETIR_S_C_OPR_DFLIT: Desteklenmiyor"
-
-#: vms-tir.c:720 vms-tir.c:1668
+#: vms-tir.c:586 vms-tir.c:1418
 #, c-format
-msgid "Reserved OPR cmd %d"
-msgstr "Ayrýlmýþ OPR komutu %d"
+msgid "%s: not implemented"
+msgstr "%s: tamamlanmamış"
 
-#: vms-tir.c:788 vms-tir.c:1737
+#: vms-tir.c:590 vms-tir.c:1422
 #, c-format
-msgid "Reserved CTL cmd %d"
-msgstr "Ayrýlmýþ CTL komutu %d"
+msgid "reserved STO cmd %d"
+msgstr "Ayrılmış STO komutu %d"
 
-#: vms-tir.c:816
-msgid "ETIR_S_C_STC_LP: not supported"
-msgstr "ETIR_S_C_STC_LP: desteklenmiyor"
+#: vms-tir.c:708 vms-tir.c:1568
+#, c-format
+msgid "reserved OPR cmd %d"
+msgstr "Ayrılmış OPR komutu %d"
 
-#: vms-tir.c:834
-msgid "ETIR_S_C_STC_GBL: not supported"
-msgstr "ETIR_S_C_STC_GBL: desteklenmiyor"
+#: vms-tir.c:776 vms-tir.c:1632
+#, c-format
+msgid "reserved CTL cmd %d"
+msgstr "Ayrılmış CTL komutu %d"
 
-#: vms-tir.c:842
-msgid "ETIR_S_C_STC_GCA: not supported"
-msgstr "ETIR_S_C_STC_GCA: desteklenmiyor"
+#. stack byte from image
+#. arg: none.
+#: vms-tir.c:1148
+msgid "stack-from-image not implemented"
+msgstr "Görüntüden-yığıt tamamlanmamış"
 
-#: vms-tir.c:851
-msgid "ETIR_S_C_STC_PS: not supported"
-msgstr "ETIR_S_C_STC_PS: desteklenmiyor"
+#: vms-tir.c:1166
+msgid "stack-entry-mask not fully implemented"
+msgstr "Yığın girdi maskı tamamlanmamış"
 
+#. compare procedure argument
+#. arg: cs	symbol name
+#. by	argument index
+#. da	argument descriptor
 #.
-#. * stack byte from image
-#. * arg: -
-#. *
-#.
-#: vms-tir.c:1199
-msgid "Stack-from-image not implemented"
-msgstr "Görüntüden-yýðýt tamamlanmamýþ"
-
-#: vms-tir.c:1219
-msgid "Stack-entry-mask not fully implemented"
-msgstr "Yýðýn girdi maský tamamlanmamýþ"
-
-#.
-#. * compare procedure argument
-#. * arg: cs	symbol name
-#. *	by	argument index
-#. *	da	argument descriptor
-#. *
-#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH)
-#. * and stack TRUE (args match) or FALSE (args dont match) value
-#.
-#: vms-tir.c:1235
+#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
+#. and stack TRUE (args match) or FALSE (args dont match) value.
+#: vms-tir.c:1180
 msgid "PASSMECH not fully implemented"
-msgstr "PASSMECH tamamlanmamýþ"
+msgstr "PASSMECH tamamlanmamış"
 
-#: vms-tir.c:1256
-msgid "Stack-local-symbol not fully implemented"
-msgstr "Yerel sembol yýðýtý tamamlanmamýþ"
+#: vms-tir.c:1199
+msgid "stack-local-symbol not fully implemented"
+msgstr "Yerel sembol yığıtı tamamlanmamış"
 
-#: vms-tir.c:1271
-msgid "Stack-literal not fully implemented"
-msgstr "Yýðýt sabiti tamamlanmamýþ"
+#: vms-tir.c:1212
+msgid "stack-literal not fully implemented"
+msgstr "Yığıt sabiti tamamlanmamış"
 
-#: vms-tir.c:1294
-msgid "Stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "Yýðýn yerel sembol girdi nokta maský tamamlanmamýþ"
+#: vms-tir.c:1233
+msgid "stack-local-symbol-entry-point-mask not fully implemented"
+msgstr "Yığın yerel sembol girdi noktası maskı tamamlanmamış"
 
-#: vms-tir.c:1469
+#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
+#: vms-tir.c:1619 vms-tir.c:1627
 #, c-format
-msgid "Unimplemented STO cmd %d"
-msgstr "Tamamlanmamýþ STO komutu %d"
+msgid "%s: not fully implemented"
+msgstr "%s: tamamlanmamış"
 
-#: vms-tir.c:1608
-msgid "TIR_S_C_OPR_ASH incomplete"
-msgstr "TIR_S_C_OPR_ASH tamamlanmamýþ"
-
-#: vms-tir.c:1622
-msgid "TIR_S_C_OPR_USH incomplete"
-msgstr "TIR_S_C_OPR_USH tamamlanmamýþ"
-
-#: vms-tir.c:1636
-msgid "TIR_S_C_OPR_ROT incomplete"
-msgstr "TIR_S_C_OPR_ROT tamamlanmamýþ"
-
-#.
-#. * redefine symbol to current location
-#.
-#: vms-tir.c:1657
-msgid "TIR_S_C_OPR_REDEF not supported"
-msgstr "TIR_S_C_OPR_REDEF desteklenmiyor"
-
-#.
-#. * define a literal
-#.
-#: vms-tir.c:1664
-msgid "TIR_S_C_OPR_DFLIT not supported"
-msgstr "TIR_S_C_OPR_DFLIT desteklenmiyor"
-
-#: vms-tir.c:1718
-msgid "TIR_S_C_CTL_DFLOC not fully implemented"
-msgstr "TIR_S_C_CTL_DFLOC tamamlanmamýþ"
-
-#: vms-tir.c:1726
-msgid "TIR_S_C_CTL_STLOC not fully implemented"
-msgstr "TIR_S_C_CTL_STLOC tamamlanmamýþ"
-
-#: vms-tir.c:1734
-msgid "TIR_S_C_CTL_STKDL not fully implemented"
-msgstr "TIR_S_C_CTL_STKDL tamamlanmamýþ"
-
-#: vms-tir.c:1791
+#: vms-tir.c:1684
 #, c-format
-msgid "Obj code %d not found"
-msgstr "Nesne kodu %d bulunmadý"
+msgid "obj code %d not found"
+msgstr "Nesne kodu %d bulunmadı"
 
-#: vms-tir.c:2137
+#: vms-tir.c:2019
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
-msgstr "%s bölümünde yerdeðiþim olmaksýzýn SEC_RELOC"
+msgstr "%s bölümünde yerdeÄŸiÅŸim olmaksızın SEC_RELOC"
 
-#: vms-tir.c:2424
+#: vms-tir.c:2307
 #, c-format
 msgid "Unhandled relocation %s"
-msgstr "Desteklenmeyen yerdeðiþim %s"
+msgstr "Desteklenmeyen yerdeÄŸiÅŸim %s"
 
-#: xcofflink.c:1241
+#: xcofflink.c:1243
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
-msgstr "%s: `%s' satýr numaralarýna sahip fakat onu içeren bölümü yok"
+msgstr "%s: `%s' satır numaralarına sahip fakat onu içeren bölümü yok"
 
-#: xcofflink.c:1294
+#: xcofflink.c:1296
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
-msgstr "%s: sýnýf %d sembol `%s'un alternatif girdileri yok"
+msgstr "%s: sınıf %d sembol `%s'un alternatif girdileri yok"
 
-#: xcofflink.c:1317
+#: xcofflink.c:1319
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
-msgstr "%s: `%s' sembolünde bilinmeyen csect türü %d var"
+msgstr "%s: `%s' sembolünde bilinmeyen csect türü %d var"
 
-#: xcofflink.c:1329
+#: xcofflink.c:1331
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
-msgstr "%s: hatalý XTY_ER sembolü `%s': sýnýf %d scnum %d scnlen %d"
+msgstr "%s: hatalı XTY_ER sembolü `%s': sınıf %d scnum %d scnlen %d"
 
-#: xcofflink.c:1365
+#: xcofflink.c:1367
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
-msgstr "%s: XMC_TC0 sembolü `%s': sýnýf %d scnlen %d"
+msgstr "%s: XMC_TC0 sembolü `%s': sınıf %d scnlen %d"
 
-#: xcofflink.c:1517
+#: xcofflink.c:1519
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
-msgstr "%s: csect `%s' onu içeren bölümde deðil"
+msgstr "%s: csect `%s' onu içeren bölümde deÄŸil"
 
-#: xcofflink.c:1624
+#: xcofflink.c:1626
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
-msgstr "%s: XTY_LD `%s'yanlýþ yerde"
+msgstr "%s: XTY_LD `%s'yanlış yerde"
 
-#: xcofflink.c:1948
+#: xcofflink.c:1957
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
-msgstr "%s: yerdeðiþim %s:%d csect içinde deðil"
+msgstr "%s: yerdeÄŸiÅŸim %s:%d csect içinde deÄŸil"
 
-#: xcofflink.c:2083
+#: xcofflink.c:2092
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
-msgstr "%s: XCOFF çýktýsý oluþturulmazken XCOFF paylaþýmlý nesnesi"
+msgstr "%s: XCOFF çıktısı oluÅŸturulmazken XCOFF paylaşımlı nesnesi"
 
-#: xcofflink.c:2104
+#: xcofflink.c:2113
 #, c-format
 msgid "%s: dynamic object with no .loader section"
-msgstr "%s: .loader bölümü olmayan dinamik nesne"
+msgstr "%s: .loader bölümü olmayan dinamik nesne"
 
-#: xcofflink.c:2749
+#: xcofflink.c:2758
 #, c-format
 msgid "%s: no such symbol"
-msgstr "%s: böyle bir sembol yok"
+msgstr "%s: böyle bir sembol yok"
 
-#: xcofflink.c:2890
+#: xcofflink.c:2891
 msgid "error: undefined symbol __rtinit"
-msgstr "hata: tanýmlanmamýþ sembol __rtinit"
+msgstr "hata: tanımlanmamış sembol __rtinit"
 
-#: xcofflink.c:3458
+#: xcofflink.c:3453
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
-msgstr "uyarý: tanýmlanmamýþ `%s' sembolünü ihraç denemesi"
+msgstr "uyarı: tanımlanmamış `%s' sembolünü ihraç denemesi"
 
-#: xcofflink.c:4452
+#: xcofflink.c:4447
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr "TOC taþmasý: 0x%lx > 0x10000; -mminimal-toc ile derlemeyi deneyin"
+msgstr "TOC taşması: 0x%lx > 0x10000; -mminimal-toc ile derlemeyi deneyin"
 
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
-msgstr "%s: bilinmeyen `%s' bölümünde yükleyici yerdeðiþimi"
+msgstr "%s: bilinmeyen `%s' bölümünde yükleyici yerdeÄŸiÅŸimi"
 
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
-msgstr "%s: `%s' yükleyici yerdeðiþiminde fakat yükleyici sembolü deðil"
+msgstr "%s: `%s' yükleyici yerdeÄŸiÅŸiminde fakat yükleyici sembolü deÄŸil"
 
-#: xcofflink.c:5329
+#: xcofflink.c:5324
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
-msgstr "%s: %s salt-okunur bölümünde yükleyici yerdeðiþimi"
+msgstr "%s: %s salt-okunur bölümünde yükleyici yerdeÄŸiÅŸimi"
 
-#: elf32-ia64.c:2190 elf64-ia64.c:2190
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
 msgid "@pltoff reloc against local symbol"
 msgstr "yerel sembole @pltoff yerdegisimi"
 
-#: elf32-ia64.c:2248 elf64-ia64.c:2248
-msgid "non-zero addend in @fptr reloc"
-msgstr "@fptr yerdeðiþiminde sýfýr olmayan eklenti"
-
-#: elf32-ia64.c:3414 elf64-ia64.c:3414
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
-msgstr "%s: kýsa veri bölümünde taþma (0x%lx >= 0x400000)"
+msgstr "%s: kısa veri bölümünde taÅŸma (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3425 elf64-ia64.c:3425
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
 #, c-format
 msgid "%s: __gp does not cover short data segment"
-msgstr "%s: __gp kýsa veri bölümünü kapsamýyor"
+msgstr "%s: __gp kısa veri bölümünü kapsamıyor"
 
-#: elf32-ia64.c:3729 elf64-ia64.c:3729
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
-msgstr "%s: pic olmayan kod paylaþmalý kitaplýkta baðlanýyor"
+msgstr "%s: pic olmayan kod paylaşmalı kitaplıkta bağlanıyor"
 
-#: elf32-ia64.c:3762 elf64-ia64.c:3762
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
-msgstr "%s: %s dinamik sembolüne @gprel yerdeðiþimi"
+msgstr "%s: %s dinamik sembolüne @gprel yerdeÄŸiÅŸimi"
 
-#: elf32-ia64.c:3901 elf64-ia64.c:3901
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
 #, c-format
 msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: kuþkulu düzeltmeye dinamik yerdeðiþim"
+msgstr "%s: kuÅŸkulu düzeltmeye dinamik yerdeÄŸiÅŸim"
 
-#: elf32-ia64.c:3909 elf64-ia64.c:3909
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
 #, c-format
 msgid "%s: speculation fixup against undefined weak symbol"
-msgstr "%s: tanýmlanmamýþ gevþek sembole tartýþmalý düzeltme"
+msgstr "%s: tanımlanmamış gevÅŸek sembole tartışmalı düzeltme"
 
-#: elf32-ia64.c:4093 elf64-ia64.c:4093
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
 msgid "unsupported reloc"
-msgstr "desteklenmeyen yerdeðiþim"
+msgstr "desteklenmeyen yerdeÄŸiÅŸim"
 
-#: elf32-ia64.c:4373 elf64-ia64.c:4373
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr "%s: NULL-halinde-tuzakla karþý-baþvurusu tuzaklamayan dosyalarla baðlandý"
+msgstr "%s: NULL-halinde-tuzakla karşı-başvurusu tuzaklamayan dosyalarla bağlandı"
 
-#: elf32-ia64.c:4382 elf64-ia64.c:4382
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
-msgstr "%s: büyük sonlu dosyalar küçük sonlu dosyalarla baðlanýyor"
+msgstr "%s: büyük sonlu dosyalar küçük sonlu dosyalarla baÄŸlanıyor"
 
-#: elf32-ia64.c:4391 elf64-ia64.c:4391
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
-msgstr "%s: 64 bitlik dosyalar 32 bitlik dosyalarla baðlanýyor"
+msgstr "%s: 64 bitlik dosyalar 32 bitlik dosyalarla bağlanıyor"
 
-#: elf32-ia64.c:4400 elf64-ia64.c:4400
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
-msgstr "%s: constant-gp dosyalarý constant-gp olmayan dosyalarla baðlanýyor"
+msgstr "%s: constant-gp dosyaları constant-gp olmayan dosyalarla bağlanıyor"
 
-#: elf32-ia64.c:4410 elf64-ia64.c:4410
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
-msgstr "%s: auto-pic dosyalarý auto-pic olmayan dosyalarla baðlanýyor"
+msgstr "%s: auto-pic dosyaları auto-pic olmayan dosyalarla bağlanıyor"
 
-#: peigen.c:964 pepigen.c:964
+#: peigen.c:962 pepigen.c:962
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
-msgstr "%s: satýr numarasý taþmasý: 0x%lx > 0xffff"
+msgstr "%s: satır numarası taşması: 0x%lx > 0xffff"
 
-#: peigen.c:981 pepigen.c:981
+#: peigen.c:979 pepigen.c:979
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-msgstr "%s: yerdeðiþim taþmasý 1: 0x%lx > 0xffff"
+msgstr "%s: yerdeğişim taşması 1: 0x%lx > 0xffff"
+
+#: peigen.c:993 pepigen.c:993
+msgid "Export Directory [.edata (or where ever we found it)]"
+msgstr "Ä°hraç Dizini [.edata (veya nerede bulundu ise)]"
+
+#: peigen.c:994 pepigen.c:994
+msgid "Import Directory [parts of .idata]"
+msgstr "Ä°thal Dizini [.idata'nın parçaları]"
 
 #: peigen.c:995 pepigen.c:995
-msgid "Export Directory [.edata (or where ever we found it)]"
-msgstr "Ýhraç Dizini [.edata (veya nerede bulundu ise)]"
-
-#: peigen.c:996 pepigen.c:996
-msgid "Import Directory [parts of .idata]"
-msgstr "Ýthal Dizini [.idata'nýn parçalarý]"
-
-#: peigen.c:997 pepigen.c:997
 msgid "Resource Directory [.rsrc]"
 msgstr "Kaynak Dizini [.rsrc]"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:996 pepigen.c:996
 msgid "Exception Directory [.pdata]"
-msgstr "Ýstisna Dizini [.pdata]"
+msgstr "Ä°stisna Dizini [.pdata]"
+
+#: peigen.c:997 pepigen.c:997
+msgid "Security Directory"
+msgstr "Güvenlik Dizini"
+
+#: peigen.c:998 pepigen.c:998
+msgid "Base Relocation Directory [.reloc]"
+msgstr "Temel YerdeÄŸiÅŸim Dizini [.reloc]"
 
 #: peigen.c:999 pepigen.c:999
-msgid "Security Directory"
-msgstr "Güvenlik Dizini"
+msgid "Debug Directory"
+msgstr "Hata Ayıklama Dizini"
 
 #: peigen.c:1000 pepigen.c:1000
-msgid "Base Relocation Directory [.reloc]"
-msgstr "Temel Yerdeðiþim Dizini [.reloc]"
+msgid "Description Directory"
+msgstr "Açıklama Dizini"
 
 #: peigen.c:1001 pepigen.c:1001
-msgid "Debug Directory"
-msgstr "Hata Ayýklama Dizini"
+msgid "Special Directory"
+msgstr "Özel Dizin"
 
 #: peigen.c:1002 pepigen.c:1002
-msgid "Description Directory"
-msgstr "Açýklama Dizini"
-
-#: peigen.c:1003 pepigen.c:1003
-msgid "Special Directory"
-msgstr "Özel Dizin"
-
-#: peigen.c:1004 pepigen.c:1004
 msgid "Thread Storage Directory [.tls]"
 msgstr "Dal Saklama Dizini [.tls]"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1003 pepigen.c:1003
 msgid "Load Configuration Directory"
-msgstr "Ayar Yükleme Dizini"
+msgstr "Ayar Yükleme Dizini"
+
+#: peigen.c:1004 pepigen.c:1004
+msgid "Bound Import Directory"
+msgstr "Sınır İthal Dizini"
+
+#: peigen.c:1005 pepigen.c:1005
+msgid "Import Address Table Directory"
+msgstr "Adres Tablosu Ä°thal Dizini"
 
 #: peigen.c:1006 pepigen.c:1006
-msgid "Bound Import Directory"
-msgstr "Sýnýr Ýthal Dizini"
-
-#: peigen.c:1007 pepigen.c:1007
-msgid "Import Address Table Directory"
-msgstr "Adres Tablosu Ýthal Dizini"
-
-#: peigen.c:1008 pepigen.c:1008
 msgid "Delay Import Directory"
-msgstr "Gecikmeli Ýthal Dizini"
+msgstr "Gecikmeli Ä°thal Dizini"
 
-#: peigen.c:1009 peigen.c:1010 pepigen.c:1009 pepigen.c:1010
+#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
 msgid "Reserved"
-msgstr "Ayrýlmýþ"
+msgstr "Ayrılmış"
 
-#: peigen.c:1073 pepigen.c:1073
-msgid "\nThere is an import table, but the section containing it could not be found\n"
-msgstr "\nBir ithal tablosu var, fakat onu içeren bölüm bulunamadý\n"
+#: peigen.c:1071 pepigen.c:1071
+msgid ""
+"\n"
+"There is an import table, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Bir ithal tablosu var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1078 pepigen.c:1078
+#: peigen.c:1076 pepigen.c:1076
 #, c-format
-msgid "\nThere is an import table in %s at 0x%lx\n"
-msgstr "\n%s içerisinde 0x%lx'de bir ithal tablosu var\n"
+msgid ""
+"\n"
+"There is an import table in %s at 0x%lx\n"
+msgstr ""
+"\n"
+"%s içerisinde 0x%lx'de bir ithal tablosu var\n"
 
-#: peigen.c:1115 pepigen.c:1115
+#: peigen.c:1113 pepigen.c:1113
 #, c-format
-msgid "\nFunction descriptor located at the start address: %04lx\n"
-msgstr "\nBaþlangýç adresinde iþlev betimleyicisi bulundu: %04lx\n"
+msgid ""
+"\n"
+"Function descriptor located at the start address: %04lx\n"
+msgstr ""
+"\n"
+"BaÅŸlangıç adresinde iÅŸlev betimleyicisi bulundu: %04lx\n"
 
-#: peigen.c:1118 pepigen.c:1118
+#: peigen.c:1116 pepigen.c:1116
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
-msgstr "\tkod temeli %08lx toc (yüklenebilir/gerçek) %08lx/%08lx\n"
+msgstr "\tkod temeli %08lx toc (yüklenebilir/gerçek) %08lx/%08lx\n"
 
-#: peigen.c:1124 pepigen.c:1124
-msgid "\nNo reldata section! Function descriptor not decoded.\n"
-msgstr "\nReldata bölümü yok! Ýþlev betimleyicisi çözümlenemedi.\n"
+#: peigen.c:1122 pepigen.c:1122
+msgid ""
+"\n"
+"No reldata section! Function descriptor not decoded.\n"
+msgstr ""
+"\n"
+"Reldata bölümü yok! Ä°ÅŸlev betimleyicisi çözümlenemedi.\n"
 
-#: peigen.c:1129 pepigen.c:1129
+#: peigen.c:1127 pepigen.c:1127
 #, c-format
-msgid "\nThe Import Tables (interpreted %s section contents)\n"
-msgstr "\nÝthal Tablolarý (%s bölüm içeriði çözümlendi)\n"
+msgid ""
+"\n"
+"The Import Tables (interpreted %s section contents)\n"
+msgstr ""
+"\n"
+"Ä°thal Tabloları (%s bölüm içeriÄŸi çözümlendi)\n"
 
-#: peigen.c:1132 pepigen.c:1132
-msgid " vma:            Hint    Time      Forward  DLL       First\n"
-msgstr " vma:            Ýpucu   Zaman     Ýleri    DLL       Ýlk\n"
+#: peigen.c:1130 pepigen.c:1130
+msgid ""
+" vma:            Hint    Time      Forward  DLL       First\n"
+"                 Table   Stamp     Chain    Name      Thunk\n"
+msgstr ""
+" vma:            Ä°pucu   Zaman     Ä°leri    DLL       Ä°lk\n"
+"                 Tablo   Damga     Zincir   Ä°sim      Parça\n"
 
-#: peigen.c:1134 pepigen.c:1134
-msgid "                 Table   Stamp     Chain    Name      Thunk\n"
-msgstr "                 Tablo   Damga     Zincir   Ýsim      Parça\n"
-
-#: peigen.c:1182 pepigen.c:1182
+#: peigen.c:1181 pepigen.c:1181
 #, c-format
-msgid "\n\tDLL Name: %s\n"
-msgstr "\n\tDLL Adý: %s\n"
+msgid ""
+"\n"
+"\tDLL Name: %s\n"
+msgstr ""
+"\n"
+"\tDLL Adı: %s\n"
 
-#: peigen.c:1186 peigen.c:1249 pepigen.c:1186 pepigen.c:1249
-msgid "\tvma:  Hint/Ord Member-Name\n"
-msgstr "\tvma:  Ýpucu/Sýra Üye-Adý\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma:  Ä°pucu/Sıra Üye-Adı Sınır\n"
 
-#: peigen.c:1248 pepigen.c:1248
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr "\tÝthal Adres Tablosu (fark bulundu)\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Bir ilk parça var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1255 pepigen.c:1255
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> IAT üyeleri bitti!\n"
+#: peigen.c:1357 pepigen.c:1357
+msgid ""
+"\n"
+"There is an export table, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Bir ihraç tablosu var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1273 pepigen.c:1273
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tÝthal Adres Tablosu ayný\n"
-
-#: peigen.c:1345 pepigen.c:1345
-msgid "\nThere is an export table, but the section containing it could not be found\n"
-msgstr "\nBir ihraç tablosu var, fakat onu içeren bölüm bulunamadý\n"
-
-#: peigen.c:1350 pepigen.c:1350
+#: peigen.c:1362 pepigen.c:1362
 #, c-format
-msgid "\nThere is an export table in %s at 0x%lx\n"
-msgstr "\n%s içinde 0x%lx'de bir ihraç tablosu var\n"
+msgid ""
+"\n"
+"There is an export table in %s at 0x%lx\n"
+msgstr ""
+"\n"
+"%s içinde 0x%lx'de bir ihraç tablosu var\n"
 
-#: peigen.c:1381 pepigen.c:1381
+#: peigen.c:1393 pepigen.c:1393
 #, c-format
-msgid "\nThe Export Tables (interpreted %s section contents)\n\n"
-msgstr "\nÝhraç Tablolarý (%s bölüm içeriði çözümlendi)\n\n"
+msgid ""
+"\n"
+"The Export Tables (interpreted %s section contents)\n"
+"\n"
+msgstr ""
+"\n"
+"Ä°hraç Tabloları (%s bölüm içeriÄŸi çözümlendi)\n"
+"\n"
 
-#: peigen.c:1385 pepigen.c:1385
+#: peigen.c:1397 pepigen.c:1397
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
-msgstr "Ýhraç Bayraklarý \t\t\t%lx\n"
-
-#: peigen.c:1388 pepigen.c:1388
-#, c-format
-msgid "Time/Date stamp \t\t%lx\n"
-msgstr "Saat/Tarih damgasý \t\t%lx\n"
-
-#: peigen.c:1391 pepigen.c:1391
-#, c-format
-msgid "Major/Minor \t\t\t%d/%d\n"
-msgstr "Majör/Minör \t\t\t%d/%d\n"
-
-#: peigen.c:1394 pepigen.c:1394
-msgid "Name \t\t\t\t"
-msgstr "Ýsim \t\t\t\t"
+msgstr "Ä°hraç Bayrakları \t\t\t%lx\n"
 
 #: peigen.c:1400 pepigen.c:1400
 #, c-format
+msgid "Time/Date stamp \t\t%lx\n"
+msgstr "Saat/Tarih damgası \t\t%lx\n"
+
+#: peigen.c:1403 pepigen.c:1403
+#, c-format
+msgid "Major/Minor \t\t\t%d/%d\n"
+msgstr "Majör/Minör \t\t\t%d/%d\n"
+
+#: peigen.c:1406 pepigen.c:1406
+msgid "Name \t\t\t\t"
+msgstr "Ä°sim \t\t\t\t"
+
+#: peigen.c:1412 pepigen.c:1412
+#, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Onluk Sistem \t\t\t%ld\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1415 pepigen.c:1415
 msgid "Number in:\n"
-msgstr "Sayý içinde:\n"
+msgstr "Sayı içinde:\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1418 pepigen.c:1418
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
-msgstr "\tÝhraç Adres Tablosu \t\t%08lx\n"
+msgstr "\tÄ°hraç Adres Tablosu \t\t%08lx\n"
 
-#: peigen.c:1410 pepigen.c:1410
+#: peigen.c:1422 pepigen.c:1422
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
-msgstr "\t[Ýsim Gösterge/Onluk] Tablo\t%08lx\n"
+msgstr "\t[Ä°sim Gösterge/Onluk] Tablo\t%08lx\n"
 
-#: peigen.c:1413 pepigen.c:1413
+#: peigen.c:1425 pepigen.c:1425
 msgid "Table Addresses\n"
 msgstr "Tablo Adresleri\n"
 
-#: peigen.c:1416 pepigen.c:1416
+#: peigen.c:1428 pepigen.c:1428
 msgid "\tExport Address Table \t\t"
-msgstr "\tÝhraç Adres Tablosu \t\t"
+msgstr "\tÄ°hraç Adres Tablosu \t\t"
 
-#: peigen.c:1421 pepigen.c:1421
+#: peigen.c:1433 pepigen.c:1433
 msgid "\tName Pointer Table \t\t"
-msgstr "\tÝsim Gösterge Tablosu \t\t"
+msgstr "\tÄ°sim Gösterge Tablosu \t\t"
 
-#: peigen.c:1426 pepigen.c:1426
+#: peigen.c:1438 pepigen.c:1438
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tOnluk Tablo \t\t\t"
 
-#: peigen.c:1441 pepigen.c:1441
+#: peigen.c:1453 pepigen.c:1453
 #, c-format
-msgid "\nExport Address Table -- Ordinal Base %ld\n"
-msgstr "\nÝhraç Adres Tablosu -- Onluk Sistem %ld\n"
+msgid ""
+"\n"
+"Export Address Table -- Ordinal Base %ld\n"
+msgstr ""
+"\n"
+"Ä°hraç Adres Tablosu -- Onluk Sistem %ld\n"
 
-#: peigen.c:1460 pepigen.c:1460
+#: peigen.c:1472 pepigen.c:1472
 msgid "Forwarder RVA"
-msgstr "RVA Yönlendiricisi"
+msgstr "RVA Yönlendiricisi"
 
-#: peigen.c:1471 pepigen.c:1471
+#: peigen.c:1483 pepigen.c:1483
 msgid "Export RVA"
-msgstr "RVA Ýhracý"
+msgstr "RVA İhracı"
 
-#: peigen.c:1478 pepigen.c:1478
-msgid "\n[Ordinal/Name Pointer] Table\n"
-msgstr "\n[Onluk/Ýsim Gösterge] Tablosu\n"
-
-#: peigen.c:1533 pepigen.c:1533
-#, c-format
-msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
-msgstr "Uyarý, .pdata bölüm boyu (%ld) %d'nin katý deðil\n"
-
-#: peigen.c:1537 pepigen.c:1537
-msgid "\nThe Function Table (interpreted .pdata section contents)\n"
-msgstr "\nÝþlev Tablosu (.pdata bölüm içeriði çözümlendi)\n"
-
-#: peigen.c:1540 pepigen.c:1540
-msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
-msgstr " vma:\t\t\tBaþlangýç Adresi Sonlanma Adresi  Geri Al Bilgisi\n"
-
-#: peigen.c:1543 pepigen.c:1543
-msgid " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
-msgstr " vma:\t\tBaþl.    Son      EH       EH       PrologSon  Ýstisna\n"
+#: peigen.c:1490 pepigen.c:1490
+msgid ""
+"\n"
+"[Ordinal/Name Pointer] Table\n"
+msgstr ""
+"\n"
+"[Onluk/Ä°sim Gösterge] Tablosu\n"
 
 #: peigen.c:1545 pepigen.c:1545
-msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
-msgstr "     \t\tAdres    Adres    Yön.     Veri     Adres      Mask\n"
+#, c-format
+msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
+msgstr "Uyarı, .pdata bölüm boyu (%ld) %d'nin katı deÄŸil\n"
 
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1549 pepigen.c:1549
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+"\n"
+"Ä°ÅŸlev Tablosu (.pdata bölüm içeriÄŸi çözümlendi)\n"
+
+#: peigen.c:1552 pepigen.c:1552
+msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
+msgstr " vma:\t\t\tBaÅŸlangıç Adresi Sonlanma Adresi  Geri Al Bilgisi\n"
+
+#: peigen.c:1554 pepigen.c:1554
+msgid ""
+" vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
+"     \t\tAddress  Address  Handler  Data     Address    Mask\n"
+msgstr ""
+" vma:\t\tBaÅŸl.    Son      EH       EH       PrologSon  Ä°stisna\n"
+"     \t\tAdres    Adres    Yakalay  Veri     Adres      Maske\n"
+
+#: peigen.c:1624 pepigen.c:1624
 msgid " Register save millicode"
 msgstr " Yazma milikodunu kaydet"
 
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1627 pepigen.c:1627
 msgid " Register restore millicode"
 msgstr " Geri alma milikodunu kaydet"
 
-#: peigen.c:1619 pepigen.c:1619
+#: peigen.c:1630 pepigen.c:1630
 msgid " Glue code sequence"
-msgstr " Birleþtirici kod dizisi"
+msgstr " BirleÅŸtirici kod dizisi"
 
-#: peigen.c:1671 pepigen.c:1671
-msgid "\n\nPE File Base Relocations (interpreted .reloc section contents)\n"
-msgstr "\n\nPE Dosya Temel Yerdeðiþimi (.reloc bölüm içeriði çözümlendi)\n"
+#: peigen.c:1682 pepigen.c:1682
+msgid ""
+"\n"
+"\n"
+"PE File Base Relocations (interpreted .reloc section contents)\n"
+msgstr ""
+"\n"
+"\n"
+"PE Dosya Temel YerdeÄŸiÅŸimi (.reloc bölüm içeriÄŸi çözümlendi)\n"
 
-#: peigen.c:1701 pepigen.c:1701
+#: peigen.c:1712 pepigen.c:1712
 #, c-format
-msgid "\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
-msgstr "\nSanal Adres: %08lx Parça boyu %ld (0x%lx) Düzeltme Sayýsý %ld\n"
+msgid ""
+"\n"
+"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
+msgstr ""
+"\n"
+"Sanal Adres: %08lx Parça boyu %ld (0x%lx) Düzeltme Sayısı %ld\n"
 
-#: peigen.c:1714 pepigen.c:1714
+#: peigen.c:1725 pepigen.c:1725
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
-msgstr "\tyer deðiþim %4d göreli konum %4x [%4lx] %s"
+msgstr "\tyer deÄŸiÅŸim %4d göreli konum %4x [%4lx] %s"
 
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1754 pepigen.c:1754
+#: peigen.c:1765 pepigen.c:1765
 #, c-format
-msgid "\nCharacteristics 0x%x\n"
-msgstr "\nÖzellikler 0x%x\n"
+msgid ""
+"\n"
+"Characteristics 0x%x\n"
+msgstr ""
+"\n"
+"Özellikler 0x%x\n"
+
+#~ msgid "GP relative relocation when GP not defined"
+#~ msgstr "GP tanımlanmamışken GP göreli yer deÄŸiÅŸtirmesi"
+
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: HATA: kayan sayıları kayan yazmaçlarda geçiriyor fakat hedef %s tamsayı yazmaç kullanıyor"
+
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: HATA: kayan sayıları tamsayı yazmaçlarda geçiriyor fakat hedef %s kayan yazmaç kullanıyor"
+
+#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
+#~ msgstr "Uyarı: %s girdi dosyası beraber çalışmayı destekliyor, fakat %s desteklemiyor."
+
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "Uyarı: %s girdi dosyası beraber çalışmayı desteklemiyor, fakat %s destekliyor."
+
+#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
+#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld sonraki %ld"
+
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "bfd sembolünden elf sembolü:0x%.8lx, isim= %s, sem num = %d, bayrak = 0x%.8lx%s\n"
+
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "Uyarı: beraber çalışmaz diye önceden belirtilmiÅŸ olduÄŸundan %s'nin beraber çalışma bayrağı atanmadı"
+
+#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
+#~ msgstr "Uyarı: Dış isteÄŸe uyularak %s'nin beraber çalışma bayrağı temizlendi"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
+
+#~ msgid "(unknown)"
+#~ msgstr "(bilinmeyen)"
+
+#~ msgid "  previously %s in %s"
+#~ msgstr "  daha önce %2$s içinde %1$s"
+
+#~ msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_GBL: sembol yok \"%s\""
+
+#~ msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_CA: sembol yok \"%s\""
+
+#~ msgid "ETIR_S_C_STO_RB/AB: Not supported"
+#~ msgstr "ETIR_S_C_STO_RB/AB: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_STO_LP_PSB: Not supported"
+#~ msgstr "ETIR_S_C_STO_LP_PSB: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_GBL: tamamlanmamış"
+
+#~ msgid "ETIR_S_C_STO_HINT_PS: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_PS: tamamlanmamış"
+
+#~ msgid "ETIR_S_C_OPR_INSV: Not supported"
+#~ msgstr "ETIR_S_C_OPR_INSV: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_OPR_USH: Not supported"
+#~ msgstr "ETIR_S_C_OPR_USH: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_OPR_ROT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_ROT: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_OPR_REDEF: Not supported"
+#~ msgstr "ETIR_S_C_OPR_REDEF: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_OPR_DFLIT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_DFLIT: Desteklenmiyor"
+
+#~ msgid "ETIR_S_C_STC_GBL: not supported"
+#~ msgstr "ETIR_S_C_STC_GBL: desteklenmiyor"
+
+#~ msgid "ETIR_S_C_STC_GCA: not supported"
+#~ msgstr "ETIR_S_C_STC_GCA: desteklenmiyor"
+
+#~ msgid "ETIR_S_C_STC_PS: not supported"
+#~ msgstr "ETIR_S_C_STC_PS: desteklenmiyor"
+
+#~ msgid "Unimplemented STO cmd %d"
+#~ msgstr "Tamamlanmamış STO komutu %d"
+
+#~ msgid "TIR_S_C_OPR_ASH incomplete"
+#~ msgstr "TIR_S_C_OPR_ASH tamamlanmamış"
+
+#~ msgid "TIR_S_C_OPR_USH incomplete"
+#~ msgstr "TIR_S_C_OPR_USH tamamlanmamış"
+
+#~ msgid "TIR_S_C_OPR_ROT incomplete"
+#~ msgstr "TIR_S_C_OPR_ROT tamamlanmamış"
+
+#~ msgid "TIR_S_C_OPR_REDEF not supported"
+#~ msgstr "TIR_S_C_OPR_REDEF desteklenmiyor"
+
+#~ msgid "TIR_S_C_OPR_DFLIT not supported"
+#~ msgstr "TIR_S_C_OPR_DFLIT desteklenmiyor"
+
+#~ msgid "TIR_S_C_CTL_DFLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_DFLOC tamamlanmamış"
+
+#~ msgid "TIR_S_C_CTL_STLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STLOC tamamlanmamış"
+
+#~ msgid "TIR_S_C_CTL_STKDL not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STKDL tamamlanmamış"
+
+#~ msgid " vma:            Hint    Time      Forward  DLL       First\n"
+#~ msgstr " vma:            Ä°pucu   Zaman     Ä°leri    DLL       Ä°lk\n"
+
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tÄ°thal Adres Tablosu (fark bulundu)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> IAT üyeleri bitti!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tİthal Adres Tablosu aynı\n"
+
+#~ msgid "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
+#~ msgstr "     \t\tAdres    Adres    Yön.     Veri     Adres      Mask\n"
diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c
index 22043b5..5b153bd 100644
--- a/bfd/ppcboot.c
+++ b/bfd/ppcboot.c
@@ -469,6 +469,7 @@
 #define ppcboot_bfd_relax_section bfd_generic_relax_section
 #define ppcboot_bfd_gc_sections bfd_generic_gc_sections
 #define ppcboot_bfd_merge_sections bfd_generic_merge_sections
+#define ppcboot_bfd_discard_group bfd_generic_discard_group
 #define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 20df4f8..deba952 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -645,7 +645,7 @@
   reloc_target_output_section = symbol->section->output_section;
 
   /* Convert input-section-relative symbol value to absolute.  */
-  if (output_bfd && howto->partial_inplace == false)
+  if (output_bfd && ! howto->partial_inplace)
     output_base = 0;
   else
     output_base = reloc_target_output_section->vma;
@@ -658,7 +658,7 @@
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == true)
+  if (howto->pc_relative)
     {
       /* This is a PC relative relocation.  We want to set RELOCATION
 	 to the distance between the address of the symbol and the
@@ -691,13 +691,13 @@
       relocation -=
 	input_section->output_section->vma + input_section->output_offset;
 
-      if (howto->pcrel_offset == true)
+      if (howto->pcrel_offset)
 	relocation -= reloc_entry->address;
     }
 
   if (output_bfd != (bfd *) NULL)
     {
-      if (howto->partial_inplace == false)
+      if (! howto->partial_inplace)
 	{
 	  /* This is a partial relocation, and we want to apply the relocation
 	     to the reloc entry rather than the raw data. Modify the reloc
@@ -1037,7 +1037,7 @@
   reloc_target_output_section = symbol->section->output_section;
 
   /* Convert input-section-relative symbol value to absolute.  */
-  if (howto->partial_inplace == false)
+  if (! howto->partial_inplace)
     output_base = 0;
   else
     output_base = reloc_target_output_section->vma;
@@ -1050,7 +1050,7 @@
   /* Here the variable relocation holds the final address of the
      symbol we are relocating against, plus any addend.  */
 
-  if (howto->pc_relative == true)
+  if (howto->pc_relative)
     {
       /* This is a PC relative relocation.  We want to set RELOCATION
 	 to the distance between the address of the symbol and the
@@ -1083,11 +1083,11 @@
       relocation -=
 	input_section->output_section->vma + input_section->output_offset;
 
-      if (howto->pcrel_offset == true && howto->partial_inplace == true)
+      if (howto->pcrel_offset && howto->partial_inplace)
 	relocation -= reloc_entry->address;
     }
 
-  if (howto->partial_inplace == false)
+  if (! howto->partial_inplace)
     {
       /* This is a partial relocation, and we want to apply the relocation
 	 to the reloc entry rather than the raw data. Modify the reloc
@@ -1963,6 +1963,35 @@
   STO_ALPHA_STD_GPLOAD.
 
 ENUM
+  BFD_RELOC_ALPHA_TLSGD
+ENUMX
+  BFD_RELOC_ALPHA_TLSLDM
+ENUMX
+  BFD_RELOC_ALPHA_DTPMOD64
+ENUMX
+  BFD_RELOC_ALPHA_GOTDTPREL16
+ENUMX
+  BFD_RELOC_ALPHA_DTPREL64
+ENUMX
+  BFD_RELOC_ALPHA_DTPREL_HI16
+ENUMX
+  BFD_RELOC_ALPHA_DTPREL_LO16
+ENUMX
+  BFD_RELOC_ALPHA_DTPREL16
+ENUMX
+  BFD_RELOC_ALPHA_GOTTPREL16
+ENUMX
+  BFD_RELOC_ALPHA_TPREL64
+ENUMX
+  BFD_RELOC_ALPHA_TPREL_HI16
+ENUMX
+  BFD_RELOC_ALPHA_TPREL_LO16
+ENUMX
+  BFD_RELOC_ALPHA_TPREL16
+ENUMDOC
+  Alpha thread-local storage relocations.
+
+ENUM
   BFD_RELOC_MIPS_JMP
 ENUMDOC
   Bits 27..2 of the relocation address shifted right 2 bits;
@@ -2050,6 +2079,27 @@
 ENUMX
   BFD_RELOC_MIPS_JALR
 COMMENT
+ENUM
+  BFD_RELOC_FRV_LABEL16
+ENUMX
+  BFD_RELOC_FRV_LABEL24
+ENUMX
+  BFD_RELOC_FRV_LO16
+ENUMX
+  BFD_RELOC_FRV_HI16
+ENUMX
+  BFD_RELOC_FRV_GPREL12
+ENUMX
+  BFD_RELOC_FRV_GPRELU12
+ENUMX
+  BFD_RELOC_FRV_GPREL32
+ENUMX
+  BFD_RELOC_FRV_GPRELHI
+ENUMX
+  BFD_RELOC_FRV_GPRELLO
+ENUMDOC
+  Fujitsu Frv Relocations.
+COMMENT
 COMMENT
 ENUMDOC
   MIPS ELF relocations.
@@ -3073,6 +3123,55 @@
   32 bit rel. offset to GOT entry.
 
 ENUM
+  BFD_RELOC_IP2K_FR9
+ENUMDOC
+  Scenix IP2K - 9-bit register number / data address
+ENUM
+  BFD_RELOC_IP2K_BANK
+ENUMDOC
+  Scenix IP2K - 4-bit register/data bank number
+ENUM
+  BFD_RELOC_IP2K_ADDR16CJP
+ENUMDOC
+  Scenix IP2K - low 13 bits of instruction word address
+ENUM
+  BFD_RELOC_IP2K_PAGE3
+ENUMDOC
+  Scenix IP2K - high 3 bits of instruction word address
+ENUM
+  BFD_RELOC_IP2K_LO8DATA
+ENUMX
+  BFD_RELOC_IP2K_HI8DATA
+ENUMX
+  BFD_RELOC_IP2K_EX8DATA
+ENUMDOC
+  Scenix IP2K - ext/low/high 8 bits of data address
+ENUM
+  BFD_RELOC_IP2K_LO8INSN
+ENUMX
+  BFD_RELOC_IP2K_HI8INSN
+ENUMDOC
+  Scenix IP2K - low/high 8 bits of instruction word address
+ENUM
+  BFD_RELOC_IP2K_PC_SKIP
+ENUMDOC
+  Scenix IP2K - even/odd PC modifier to modify snb pcl.0
+ENUM
+  BFD_RELOC_IP2K_TEXT
+ENUMDOC
+  Scenix IP2K - 16 bit word address in text section.
+ENUM
+  BFD_RELOC_IP2K_FR_OFFSET
+ENUMDOC
+  Scenix IP2K - 7-bit sp or dp offset
+ENUM
+  BFD_RELOC_VPE4KMATH_DATA
+ENUMX
+  BFD_RELOC_VPE4KMATH_INSN
+ENUMDOC
+  Scenix VPE4K coprocessor - data/insn-space addressing
+
+ENUM
   BFD_RELOC_VTABLE_INHERIT
 ENUMX
   BFD_RELOC_VTABLE_ENTRY
@@ -3260,17 +3359,53 @@
   BFD_RELOC_M68HC11_HI8
 ENUMDOC
   Motorola 68HC11 reloc.
-  This is the 8 bits high part of an absolute address.
+  This is the 8 bit high part of an absolute address.
 ENUM
   BFD_RELOC_M68HC11_LO8
 ENUMDOC
   Motorola 68HC11 reloc.
-  This is the 8 bits low part of an absolute address.
+  This is the 8 bit low part of an absolute address.
 ENUM
   BFD_RELOC_M68HC11_3B
 ENUMDOC
   Motorola 68HC11 reloc.
-  This is the 3 bits of a value.
+  This is the 3 bit of a value.
+ENUM
+  BFD_RELOC_M68HC11_RL_JUMP
+ENUMDOC
+  Motorola 68HC11 reloc.
+  This reloc marks the beginning of a jump/call instruction.
+  It is used for linker relaxation to correctly identify beginning
+  of instruction and change some branchs to use PC-relative
+  addressing mode.
+ENUM
+  BFD_RELOC_M68HC11_RL_GROUP
+ENUMDOC
+  Motorola 68HC11 reloc.
+  This reloc marks a group of several instructions that gcc generates
+  and for which the linker relaxation pass can modify and/or remove
+  some of them.
+ENUM
+  BFD_RELOC_M68HC11_LO16
+ENUMDOC
+  Motorola 68HC11 reloc.
+  This is the 16-bit lower part of an address.  It is used for 'call'
+  instruction to specify the symbol address without any special
+  transformation (due to memory bank window).
+ENUM
+  BFD_RELOC_M68HC11_PAGE
+ENUMDOC
+  Motorola 68HC11 reloc.
+  This is a 8-bit reloc that specifies the page number of an address.
+  It is used by 'call' instruction to specify the page number of
+  the symbol.
+ENUM
+  BFD_RELOC_M68HC11_24
+ENUMDOC
+  Motorola 68HC11 reloc.
+  This is a 24-bit reloc that represents the address with a 16-bit
+  value and a 8-bit page number.  The symbol address is transformed
+  to follow the 16K memory bank of 68HC12 (seen as mapped in the window).
 
 ENUM
   BFD_RELOC_CRIS_BDISP8
@@ -3420,6 +3555,15 @@
 ENUMDOC
   Sony Xstormy16 Relocations.
 
+ENUM
+  BFD_RELOC_VAX_GLOB_DAT
+ENUMX
+  BFD_RELOC_VAX_JMP_SLOT
+ENUMX
+  BFD_RELOC_VAX_RELATIVE
+ENUMDOC
+  Relocations used by VAX ELF.
+
 ENDSENUM
   BFD_RELOC_UNUSED
 CODE_FRAGMENT
diff --git a/bfd/reloc16.c b/bfd/reloc16.c
index 1d69a7f..1db8daf 100644
--- a/bfd/reloc16.c
+++ b/bfd/reloc16.c
@@ -196,8 +196,7 @@
          The last element is used as an accumlator of shrinks.  */
       amt = reloc_count + 1;
       amt *= sizeof (unsigned);
-      shrinks = (unsigned *) bfd_malloc (amt);
-      memset (shrinks, 0, (size_t) amt);
+      shrinks = (unsigned *) bfd_zmalloc (amt);
 
       /* Loop until nothing changes in this section.  */
       do {
diff --git a/bfd/section.c b/bfd/section.c
index 358f5c4..51b21c7 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -798,7 +798,7 @@
   sname = bfd_malloc ((bfd_size_type) len + 8);
   if (sname == NULL)
     return NULL;
-  strcpy (sname, templat);
+  memcpy (sname, templat, len);
   num = 1;
   if (count != NULL)
     num = *count;
@@ -1301,77 +1301,57 @@
 
 DESCRIPTION
 	Remove @var{section} from the output.  If the output section
-	becomes empty, remove it from the output bfd.  @var{info} may
-	be NULL; if it is not, it is used to decide whether the output
-	section is empty.
+	becomes empty, remove it from the output bfd.
+
+	This function won't actually do anything except twiddle flags
+	if called too late in the linking process, when it's not safe
+	to remove sections.
 */
 void
 _bfd_strip_section_from_output (info, s)
      struct bfd_link_info *info;
      asection *s;
 {
-  asection **spp, *os;
-  struct bfd_link_order *p, *pp;
-  boolean keep_os;
-
-  /* Excise the input section from the link order.
-
-     FIXME: For all calls that I can see to this function, the link
-     orders have not yet been set up.  So why are we checking them? --
-     Ian */
-  os = s->output_section;
-
-  /* Handle a section that wasn't output.  */
-  if (os == NULL)
-    return;
-
-  for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next)
-    if (p->type == bfd_indirect_link_order
-	&& p->u.indirect.section == s)
-      {
-	if (pp)
-	  pp->next = p->next;
-	else
-	  os->link_order_head = p->next;
-	if (!p->next)
-	  os->link_order_tail = pp;
-	break;
-      }
-
-  keep_os = os->link_order_head != NULL;
-
-  if (! keep_os && info != NULL)
-    {
-      bfd *abfd;
-      for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
-	{
-	  asection *is;
-	  for (is = abfd->sections; is != NULL; is = is->next)
-	    {
-	      if (is != s && is->output_section == os
-		  && (is->flags & SEC_EXCLUDE) == 0)
-		break;
-	    }
-	  if (is != NULL)
-	    break;
-	}
-      if (abfd != NULL)
-	keep_os = true;
-    }
-
-  /* If the output section is empty, remove it too.  Careful about sections
-     that have been discarded in the link script -- they are mapped to
-     bfd_abs_section, which has no owner.  */
-  if (!keep_os && os->owner != NULL)
-    {
-      for (spp = &os->owner->sections; *spp; spp = &(*spp)->next)
-	if (*spp == os)
-	  {
-	    bfd_section_list_remove (os->owner, spp);
-	    os->owner->section_count--;
-	    break;
-	  }
-    }
+  asection *os;
+  asection *is;
+  bfd *abfd;
 
   s->flags |= SEC_EXCLUDE;
+
+  /* If the section wasn't assigned to an output section, or the
+     section has been discarded by the linker script, there's nothing
+     more to do.  */
+  os = s->output_section;
+  if (os == NULL || os->owner == NULL)
+    return;
+
+  /* If the output section has other (non-excluded) input sections, we
+     can't remove it.  */
+  for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+    for (is = abfd->sections; is != NULL; is = is->next)
+      if (is->output_section == os && (is->flags & SEC_EXCLUDE) == 0)
+	return;
+
+  /* If the output section is empty, flag it for removal too.
+     See ldlang.c:strip_excluded_output_sections for the action.  */
+  os->flags |= SEC_EXCLUDE;
+}
+
+/*
+FUNCTION
+	bfd_generic_discard_group
+
+SYNOPSIS
+	boolean bfd_generic_discard_group (bfd *abfd, asection *group);
+
+DESCRIPTION
+	Remove all members of @var{group} from the output.
+*/
+
+boolean
+bfd_generic_discard_group (abfd, group)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *group ATTRIBUTE_UNUSED;
+{
+  return true;
 }
diff --git a/bfd/som.c b/bfd/som.c
index 55c9013..edc691e 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1740,7 +1740,7 @@
   int found;
 
   /* som_mkobject will set bfd_error if som_mkobject fails.  */
-  if (som_mkobject (abfd) != true)
+  if (! som_mkobject (abfd))
     return 0;
 
   /* Set BFD flags based on what information is available in the SOM.  */
@@ -1905,9 +1905,9 @@
 	space_asect->flags |= SEC_DEBUGGING;
 
       /* Set up all the attributes for the space.  */
-      if (bfd_som_set_section_attributes (space_asect, space.is_defined,
-					  space.is_private, space.sort_key,
-					  space.space_number) == false)
+      if (! bfd_som_set_section_attributes (space_asect, space.is_defined,
+					    space.is_private, space.sort_key,
+					    space.space_number))
 	goto error_return;
 
       /* If the space has no subspaces, then we're done.  */
@@ -1968,10 +1968,10 @@
 	    goto error_return;
 
 	  /* Store private information about the section.  */
-	  if (bfd_som_set_subsection_attributes (subspace_asect, space_asect,
-						 subspace.access_control_bits,
-						 subspace.sort_key,
-						 subspace.quadrant) == false)
+	  if (! bfd_som_set_subsection_attributes (subspace_asect, space_asect,
+						   subspace.access_control_bits,
+						   subspace.sort_key,
+						   subspace.quadrant))
 	    goto error_return;
 
 	  /* Keep an easy mapping between subspaces and sections.
@@ -3457,7 +3457,7 @@
   obj_som_file_hdr (abfd)->space_strings_location = current_offset;
 
   /* Scribble out the space strings.  */
-  if (som_write_space_strings (abfd, current_offset, &strings_size) == false)
+  if (! som_write_space_strings (abfd, current_offset, &strings_size))
     return false;
 
   /* Record total string table size in the header and update the
@@ -3727,10 +3727,9 @@
   obj_som_file_hdr (abfd)->symbol_strings_location = current_offset;
 
   /* Scribble out the symbol strings.  */
-  if (som_write_symbol_strings (abfd, current_offset, syms,
-				num_syms, &strings_size,
-				obj_som_compilation_unit (abfd))
-      == false)
+  if (! som_write_symbol_strings (abfd, current_offset, syms,
+				  num_syms, &strings_size,
+				  obj_som_compilation_unit (abfd)))
     return false;
 
   /* Record total string table size in header and update the
@@ -3751,7 +3750,7 @@
 
   /* Write the fixups and update fields in subspace headers which
      relate to the fixup stream.  */
-  if (som_write_fixups (abfd, current_offset, &total_reloc_size) == false)
+  if (! som_write_fixups (abfd, current_offset, &total_reloc_size))
     return false;
 
   /* Record the total size of the fixup stream in the file header.  */
@@ -3762,7 +3761,7 @@
 
   /* Now that the symbol table information is complete, build and
      write the symbol table.  */
-  if (som_build_and_write_symbol_table (abfd) == false)
+  if (! som_build_and_write_symbol_table (abfd))
     return false;
 
   /* Subspaces are written first so that we can set up information
@@ -4141,10 +4140,9 @@
      to hold the symbol table as we build it.  */
   symtab_size = num_syms;
   symtab_size *= sizeof (struct symbol_dictionary_record);
-  som_symtab = (struct symbol_dictionary_record *) bfd_malloc (symtab_size);
+  som_symtab = (struct symbol_dictionary_record *) bfd_zmalloc (symtab_size);
   if (som_symtab == NULL && symtab_size != 0)
     goto error_return;
-  memset (som_symtab, 0, (size_t) symtab_size);
 
   /* Walk over each symbol.  */
   for (i = 0; i < num_syms; i++)
@@ -4192,7 +4190,7 @@
 som_write_object_contents (abfd)
      bfd *abfd;
 {
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       /* Set up fixed parts of the file, space, and subspace headers.
 	 Notify the world that output has begun.  */
@@ -4230,10 +4228,9 @@
 
   /* Allocate and read in the string table.  */
   amt = obj_som_stringtab_size (abfd);
-  stringtab = bfd_malloc (amt);
+  stringtab = bfd_zmalloc (amt);
   if (stringtab == NULL)
     return false;
-  memset (stringtab, 0, obj_som_stringtab_size (abfd));
 
   if (bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET) != 0)
     return false;
@@ -4336,10 +4333,9 @@
 
   amt = symbol_count;
   amt *= sizeof (som_symbol_type);
-  symbase = (som_symbol_type *) bfd_malloc (amt);
+  symbase = (som_symbol_type *) bfd_zmalloc (amt);
   if (symbase == NULL)
     goto error_return;
-  memset (symbase, 0, symbol_count * sizeof (som_symbol_type));
 
   /* Read in the external SOM representation.  */
   amt = symbol_count;
@@ -5039,7 +5035,7 @@
   arelent *tblptr;
   int count;
 
-  if (som_slurp_reloc_table (abfd, section, symbols, false) == false)
+  if (! som_slurp_reloc_table (abfd, section, symbols, false))
     return -1;
 
   count = section->reloc_count;
@@ -5342,7 +5338,7 @@
      file_ptr offset;
      bfd_size_type count;
 {
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       /* Set up fixed parts of the file, space, and subspace headers.
 	 Notify the world that output has begun.  */
@@ -5752,8 +5748,7 @@
     }
 
   /* Count the number of symbols in the library symbol table.  */
-  if (som_bfd_count_ar_symbols (abfd, &lst_header, &ardata->symdef_count)
-      == false)
+  if (! som_bfd_count_ar_symbols (abfd, &lst_header, &ardata->symdef_count))
     return false;
 
   /* Get back to the start of the library symbol table.  */
@@ -5770,8 +5765,7 @@
     return false;
 
   /* Now fill in the canonical archive symbols.  */
-  if (som_bfd_fill_in_ar_symbols (abfd, &lst_header, &ardata->symdefs)
-      == false)
+  if (! som_bfd_fill_in_ar_symbols (abfd, &lst_header, &ardata->symdefs))
     return false;
 
   /* Seek back to the "first" file in the archive.  Note the "first"
@@ -5817,7 +5811,7 @@
       /* Make sure the symbol table has been read, then snag a pointer
 	 to it.  It's a little slimey to grab the symbols via obj_som_symtab,
 	 but doing so avoids allocating lots of extra memory.  */
-      if (som_slurp_symbol_table (curr_bfd) == false)
+      if (! som_slurp_symbol_table (curr_bfd))
 	return false;
 
       sym = obj_som_symtab (curr_bfd);
@@ -5899,19 +5893,19 @@
 
   amt = lst.hash_size;
   amt *= sizeof (unsigned int);
-  hash_table = (unsigned int *) bfd_malloc (amt);
+  hash_table = (unsigned int *) bfd_zmalloc (amt);
   if (hash_table == NULL && lst.hash_size != 0)
     goto error_return;
 
   amt = lst.module_count;
   amt *= sizeof (struct som_entry);
-  som_dict = (struct som_entry *) bfd_malloc (amt);
+  som_dict = (struct som_entry *) bfd_zmalloc (amt);
   if (som_dict == NULL && lst.module_count != 0)
     goto error_return;
 
   amt = lst.hash_size;
   amt *= sizeof (struct lst_symbol_record *);
-  last_hash_entry = ((struct lst_symbol_record **) bfd_malloc (amt));
+  last_hash_entry = ((struct lst_symbol_record **) bfd_zmalloc (amt));
   if (last_hash_entry == NULL && lst.hash_size != 0)
     goto error_return;
 
@@ -5919,12 +5913,6 @@
      of the lst record.  So save its location.  */
   lst_filepos = bfd_tell (abfd) - sizeof (struct lst_header);
 
-  /* Some initialization.  */
-  memset (hash_table, 0, 4 * lst.hash_size);
-  memset (som_dict, 0, lst.module_count * sizeof (struct som_entry));
-  memset (last_hash_entry, 0,
-	  lst.hash_size * sizeof (struct lst_symbol_record *));
-
   /* Symbols have som_index fields, so we have to keep track of the
      index of each SOM in the archive.
 
@@ -5978,7 +5966,7 @@
       /* Make sure the symbol table has been read, then snag a pointer
 	 to it.  It's a little slimey to grab the symbols via obj_som_symtab,
 	 but doing so avoids allocating lots of extra memory.  */
-      if (som_slurp_symbol_table (curr_bfd) == false)
+      if (! som_slurp_symbol_table (curr_bfd))
 	goto error_return;
 
       sym = obj_som_symtab (curr_bfd);
@@ -6214,7 +6202,7 @@
 
   /* Count how many symbols we will have on the hash chains and the
      size of the associated string table.  */
-  if (som_bfd_prep_for_ar_write (abfd, &nsyms, &stringsize) == false)
+  if (! som_bfd_prep_for_ar_write (abfd, &nsyms, &stringsize))
     return false;
 
   lst_size += sizeof (struct lst_symbol_record) * nsyms;
@@ -6340,6 +6328,7 @@
 
 #define som_bfd_gc_sections		bfd_generic_gc_sections
 #define som_bfd_merge_sections		bfd_generic_merge_sections
+#define som_bfd_discard_group		bfd_generic_discard_group
 
 const bfd_target som_vec = {
   "som",			/* name */
diff --git a/bfd/sparclinux.c b/bfd/sparclinux.c
index 7f1d270..e55a4ff 100644
--- a/bfd/sparclinux.c
+++ b/bfd/sparclinux.c
@@ -599,10 +599,9 @@
     {
       s->_raw_size = linux_hash_table (info)->fixup_count + 1;
       s->_raw_size *= 8;
-      s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+      s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
       if (s->contents == NULL)
        return false;
-      memset (s->contents, 0, (size_t) s->_raw_size);
     }
 
   return true;
diff --git a/bfd/srec.c b/bfd/srec.c
index b556f26..129b2ba 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -160,7 +160,7 @@
 {
   static boolean inited = false;
 
-  if (inited == false)
+  if (! inited)
     {
       inited = true;
       hex_init ();
@@ -230,22 +230,23 @@
 srec_mkobject (abfd)
      bfd *abfd;
 {
+  bfd_size_type amt;
+  tdata_type *tdata;
+
   srec_init ();
 
-  if (abfd->tdata.srec_data == NULL)
-    {
-      bfd_size_type amt = sizeof (tdata_type);
-      tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, amt);
-      if (tdata == NULL)
-	return false;
-      abfd->tdata.srec_data = tdata;
-      tdata->type = 1;
-      tdata->head = NULL;
-      tdata->tail = NULL;
-      tdata->symbols = NULL;
-      tdata->symtail = NULL;
-      tdata->csymbols = NULL;
-    }
+  amt = sizeof (tdata_type);
+  tdata = (tdata_type *) bfd_alloc (abfd, amt);
+  if (tdata == NULL)
+    return false;
+    
+  abfd->tdata.srec_data = tdata;
+  tdata->type = 1;
+  tdata->head = NULL;
+  tdata->tail = NULL;
+  tdata->symbols = NULL;
+  tdata->symtail = NULL;
+  tdata->csymbols = NULL;
 
   return true;
 }
@@ -640,6 +641,7 @@
 srec_object_p (abfd)
      bfd *abfd;
 {
+  PTR tdata_save;
   bfd_byte b[4];
 
   srec_init ();
@@ -654,9 +656,14 @@
       return NULL;
     }
 
-  if (! srec_mkobject (abfd)
-      || ! srec_scan (abfd))
-    return NULL;
+  tdata_save = abfd->tdata.any;
+  if (! srec_mkobject (abfd) || ! srec_scan (abfd))
+    {
+      if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+	bfd_release (abfd, abfd->tdata.any);
+      abfd->tdata.any = tdata_save;
+      return NULL;
+    }
 
   if (abfd->symcount > 0)
     abfd->flags |= HAS_SYMS;
@@ -670,6 +677,7 @@
 symbolsrec_object_p (abfd)
      bfd *abfd;
 {
+  PTR tdata_save;
   char b[2];
 
   srec_init ();
@@ -684,9 +692,14 @@
       return NULL;
     }
 
-  if (! srec_mkobject (abfd)
-      || ! srec_scan (abfd))
-    return NULL;
+  tdata_save = abfd->tdata.any;
+  if (! srec_mkobject (abfd) || ! srec_scan (abfd))
+    {
+      if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+	bfd_release (abfd, abfd->tdata.any);
+      abfd->tdata.any = tdata_save;
+      return NULL;
+    }
 
   if (abfd->symcount > 0)
     abfd->flags |= HAS_SYMS;
@@ -1270,6 +1283,7 @@
 #define srec_bfd_relax_section bfd_generic_relax_section
 #define srec_bfd_gc_sections bfd_generic_gc_sections
 #define srec_bfd_merge_sections bfd_generic_merge_sections
+#define srec_bfd_discard_group bfd_generic_discard_group
 #define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/stabs.c b/bfd/stabs.c
index bba4a6d..e225d9c 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -284,6 +284,7 @@
        sym < symend;
        sym += STABSIZE, ++pstridx)
     {
+      bfd_size_type symstroff;
       int type;
       const char *string;
 
@@ -311,9 +312,18 @@
 	}
 
       /* Store the string in the hash table, and record the index.  */
-      string = ((char *) stabstrbuf
-		+ stroff
-		+ bfd_get_32 (abfd, sym + STRDXOFF));
+      symstroff = stroff + bfd_get_32 (abfd, sym + STRDXOFF);
+      if (symstroff >= stabstrsec->_raw_size)
+	{
+	  (*_bfd_error_handler)
+	    (_("%s(%s+0x%lx): Stabs entry has invalid string index."),
+	     bfd_archive_filename (abfd),
+	     bfd_get_section_name (abfd, stabsec),
+	     (long) (sym - stabbuf));
+	  bfd_set_error (bfd_error_bad_value);
+	  goto error_return;
+	}
+      string = (char *) stabstrbuf + symstroff;
       *pstridx = _bfd_stringtab_add (sinfo->strings, string, true, true);
 
       /* An N_BINCL symbol indicates the start of the stabs entries
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 7825a82..5fec6f9 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1434,10 +1434,9 @@
       s = bfd_get_section_by_name (dynobj, ".hash");
       BFD_ASSERT (s != NULL);
       hashalloc = (dynsymcount + bucketcount - 1) * HASH_ENTRY_SIZE;
-      s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc);
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, hashalloc);
       if (s->contents == NULL && dynsymcount > 0)
 	return false;
-      memset (s->contents, 0, (size_t) hashalloc);
       for (i = 0; i < bucketcount; i++)
 	PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
       s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
diff --git a/bfd/syms.c b/bfd/syms.c
index 1c4bf28..6eea2d8 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -315,6 +315,7 @@
 #include "aout/stab_gnu.h"
 
 static char coff_section_type PARAMS ((const char *));
+static char decode_section_type PARAMS ((const struct sec *));
 static int cmpindexentry PARAMS ((const PTR, const PTR));
 
 /*
@@ -589,6 +590,41 @@
   return '?';
 }
 
+/* Return the single-character symbol type corresponding to section
+   SECTION, or '?' for an unknown section.  This uses section flags to
+   identify sections.
+
+   FIXME These types are unhandled: c, i, e, p.  If we handled these also,
+   we could perhaps obsolete coff_section_type.  */
+
+static char
+decode_section_type (section)
+     const struct sec *section;
+{
+  if (section->flags & SEC_CODE)
+    return 't';
+  if (section->flags & SEC_DATA)
+    {
+      if (section->flags & SEC_READONLY)
+	return 'r';
+      else if (section->flags & SEC_SMALL_DATA)
+	return 'g';
+      else
+	return 'd';
+    }
+  if ((section->flags & SEC_HAS_CONTENTS) == 0)
+    {
+      if (section->flags & SEC_SMALL_DATA)
+	return 's';
+      else
+	return 'b';
+    }
+  if (section->flags & SEC_DEBUGGING)
+    return 'N';
+
+  return '?';
+}
+
 /*
 FUNCTION
 	bfd_decode_symclass
@@ -639,7 +675,11 @@
   if (bfd_is_abs_section (symbol->section))
     c = 'a';
   else if (symbol->section)
-    c = coff_section_type (symbol->section->name);
+    {
+      c = coff_section_type (symbol->section->name);
+      if (c == '?')
+	c = decode_section_type (symbol->section);
+    }
   else
     return '?';
   if (symbol->flags & BSF_GLOBAL)
@@ -766,6 +806,7 @@
   return symcount;
 
  error_return:
+  bfd_set_error (bfd_error_no_symbols);
   if (syms != NULL)
     free (syms);
   return -1;
@@ -1313,14 +1354,16 @@
 	  || strncmp (info->filename, directory_name, dirlen) != 0
 	  || strcmp (info->filename + dirlen, file_name) != 0)
 	{
+	  size_t len;
+
 	  if (info->filename != NULL)
 	    free (info->filename);
-	  info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen
-						+ strlen (file_name) + 1);
+	  len = strlen (file_name) + 1;
+	  info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen + len);
 	  if (info->filename == NULL)
 	    return false;
-	  strcpy (info->filename, directory_name);
-	  strcpy (info->filename + dirlen, file_name);
+	  memcpy (info->filename, directory_name, dirlen);
+	  memcpy (info->filename + dirlen, file_name, len);
 	}
 
       *pfilename = info->filename;
diff --git a/bfd/targets.c b/bfd/targets.c
index fe778ca..093490c 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -400,7 +400,8 @@
 .CONCAT2 (NAME,_bfd_final_link), \
 .CONCAT2 (NAME,_bfd_link_split_section), \
 .CONCAT2 (NAME,_bfd_gc_sections), \
-.CONCAT2 (NAME,_bfd_merge_sections)
+.CONCAT2 (NAME,_bfd_merge_sections), \
+.CONCAT2 (NAME,_bfd_discard_group)
 .  int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
 .  bfd_byte *(*_bfd_get_relocated_section_contents)
 .    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@@ -435,6 +436,9 @@
 .  {* Attempt to merge SEC_MERGE sections.  *}
 .  boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
 .
+.  {* Discard members of a group.  *}
+.  boolean  (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+.
 .  {* Routines to handle dynamic symbols and relocs.  *}
 .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
 .CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@@ -477,6 +481,7 @@
    we can't intermix extern's and initializers.  */
 extern const bfd_target a29kcoff_big_vec;
 extern const bfd_target a_out_adobe_vec;
+extern const bfd_target aix5coff64_vec;
 extern const bfd_target aout0_big_vec;
 extern const bfd_target aout_arm_big_vec;
 extern const bfd_target aout_arm_little_vec;
@@ -503,26 +508,31 @@
 extern const bfd_target bfd_elf32_bigarc_vec;
 extern const bfd_target bfd_elf32_bigarm_oabi_vec;
 extern const bfd_target bfd_elf32_bigarm_vec;
+extern const bfd_target bfd_elf32_bigarmqnx_vec;
 extern const bfd_target bfd_elf32_bigmips_vec;
 extern const bfd_target bfd_elf32_cris_vec;
 extern const bfd_target bfd_elf32_d10v_vec;
 extern const bfd_target bfd_elf32_d30v_vec;
 extern const bfd_target bfd_elf32_dlx_big_vec;
 extern const bfd_target bfd_elf32_fr30_vec;
+extern const bfd_target bfd_elf32_frv_vec;
 extern const bfd_target bfd_elf32_h8300_vec;
 extern const bfd_target bfd_elf32_hppa_linux_vec;
 extern const bfd_target bfd_elf32_hppa_vec;
 extern const bfd_target bfd_elf32_i370_vec;
 extern const bfd_target bfd_elf32_i386_vec;
+extern const bfd_target bfd_elf32_i386qnx_vec;
 extern const bfd_target bfd_elf32_i860_little_vec;
 extern const bfd_target bfd_elf32_i860_vec;
 extern const bfd_target bfd_elf32_i960_vec;
 extern const bfd_target bfd_elf32_ia64_big_vec;
 extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
+extern const bfd_target bfd_elf32_ip2k_vec;
 extern const bfd_target bfd_elf32_little_generic_vec;
 extern const bfd_target bfd_elf32_littlearc_vec;
 extern const bfd_target bfd_elf32_littlearm_oabi_vec;
 extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearmqnx_vec;
 extern const bfd_target bfd_elf32_littlemips_vec;
 extern const bfd_target bfd_elf32_m32r_vec;
 extern const bfd_target bfd_elf32_m68hc11_vec;
@@ -533,24 +543,37 @@
 extern const bfd_target bfd_elf32_mcore_little_vec;
 extern const bfd_target bfd_elf32_mn10200_vec;
 extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_nbigmips_vec;
+extern const bfd_target bfd_elf32_nlittlemips_vec;
+extern const bfd_target bfd_elf32_ntradbigmips_vec;
+extern const bfd_target bfd_elf32_ntradlittlemips_vec;
 extern const bfd_target bfd_elf32_openrisc_vec;
 extern const bfd_target bfd_elf32_or32_big_vec;
 extern const bfd_target bfd_elf32_pj_vec;
 extern const bfd_target bfd_elf32_pjl_vec;
 extern const bfd_target bfd_elf32_powerpc_vec;
 extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_powerpcleqnx_vec;
+extern const bfd_target bfd_elf32_powerpcqnx_vec;
 extern const bfd_target bfd_elf32_s390_vec;
+extern const bfd_target bfd_elf32_sh64_vec;
+extern const bfd_target bfd_elf32_sh64l_vec;
+extern const bfd_target bfd_elf32_sh64lnbsd_vec;
+extern const bfd_target bfd_elf32_sh64nbsd_vec;
 extern const bfd_target bfd_elf32_sh_vec;
 extern const bfd_target bfd_elf32_shblin_vec;
 extern const bfd_target bfd_elf32_shl_vec;
 extern const bfd_target bfd_elf32_shlin_vec;
 extern const bfd_target bfd_elf32_shlnbsd_vec;
+extern const bfd_target bfd_elf32_shlqnx_vec;
 extern const bfd_target bfd_elf32_shnbsd_vec;
+extern const bfd_target bfd_elf32_shqnx_vec;
 extern const bfd_target bfd_elf32_sparc_vec;
 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_vax_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;
@@ -568,6 +591,10 @@
 extern const bfd_target bfd_elf64_powerpc_vec;
 extern const bfd_target bfd_elf64_powerpcle_vec;
 extern const bfd_target bfd_elf64_s390_vec;
+extern const bfd_target bfd_elf64_sh64_vec;
+extern const bfd_target bfd_elf64_sh64l_vec;
+extern const bfd_target bfd_elf64_sh64lnbsd_vec;
+extern const bfd_target bfd_elf64_sh64nbsd_vec;
 extern const bfd_target bfd_elf64_sparc_vec;
 extern const bfd_target bfd_elf64_tradbigmips_vec;
 extern const bfd_target bfd_elf64_tradlittlemips_vec;
@@ -640,7 +667,6 @@
 extern const bfd_target riscix_vec;
 extern const bfd_target rs6000coff64_vec;
 extern const bfd_target rs6000coff_vec;
-extern const bfd_target aix5coff64_vec;
 extern const bfd_target shcoff_small_vec;
 extern const bfd_target shcoff_vec;
 extern const bfd_target shlcoff_small_vec;
@@ -664,7 +690,9 @@
 extern const bfd_target tic54x_coff2_beh_vec;
 extern const bfd_target tic54x_coff2_vec;
 extern const bfd_target tic80coff_vec;
+extern const bfd_target vaxbsd_vec;
 extern const bfd_target vaxnetbsd_vec;
+extern const bfd_target vax1knetbsd_vec;
 extern const bfd_target versados_vec;
 extern const bfd_target vms_alpha_vec;
 extern const bfd_target vms_vax_vec;
@@ -692,10 +720,6 @@
 extern const bfd_target sco5_core_vec;
 extern const bfd_target trad_core_vec;
 
-extern const bfd_target bfd_elf32_sh64_vec;
-extern const bfd_target bfd_elf32_sh64l_vec;
-extern const bfd_target bfd_elf64_sh64_vec;
-extern const bfd_target bfd_elf64_sh64l_vec;
 static const bfd_target * const _bfd_target_vector[] = {
 
 #ifdef SELECT_VECS
@@ -715,6 +739,9 @@
 	   it wasn't omitted by mistake.  */
 	&a29kcoff_big_vec,
 	&a_out_adobe_vec,
+#ifdef BFD64
+	&aix5coff64_vec,
+#endif
 	&aout0_big_vec,
 #if 0
 	/* We have no way of distinguishing these from other a.out variants */
@@ -760,11 +787,13 @@
 	&bfd_elf32_d30v_vec,
 	&bfd_elf32_dlx_big_vec,
 	&bfd_elf32_fr30_vec,
+	&bfd_elf32_frv_vec,
 	&bfd_elf32_h8300_vec,
 	&bfd_elf32_hppa_linux_vec,
 	&bfd_elf32_hppa_vec,
 	&bfd_elf32_i370_vec,
 	&bfd_elf32_i386_vec,
+	&bfd_elf32_i386qnx_vec,
 	&bfd_elf32_i860_little_vec,
 	&bfd_elf32_i860_vec,
 	&bfd_elf32_i960_vec,
@@ -772,6 +801,7 @@
 	&bfd_elf32_ia64_big_vec,
 #endif
 	&bfd_elf32_ia64_hpux_big_vec,
+	&bfd_elf32_ip2k_vec,
 	&bfd_elf32_little_generic_vec,
 	&bfd_elf32_littlearc_vec,
 	&bfd_elf32_littlearm_oabi_vec,
@@ -786,12 +816,20 @@
 	&bfd_elf32_mcore_little_vec,
 	&bfd_elf32_mn10200_vec,
 	&bfd_elf32_mn10300_vec,
+#ifdef BFD64
+	&bfd_elf32_nbigmips_vec,
+	&bfd_elf32_nlittlemips_vec,
+	&bfd_elf32_ntradbigmips_vec,
+	&bfd_elf32_ntradlittlemips_vec,
+#endif
 	&bfd_elf32_openrisc_vec,
 	&bfd_elf32_or32_big_vec,
 	&bfd_elf32_pj_vec,
 	&bfd_elf32_pjl_vec,
 	&bfd_elf32_powerpc_vec,
 	&bfd_elf32_powerpcle_vec,
+	&bfd_elf32_powerpcleqnx_vec,
+	&bfd_elf32_powerpcqnx_vec,
 	&bfd_elf32_s390_vec,
         &bfd_elf32_sh_vec,
         &bfd_elf32_shblin_vec,
@@ -799,11 +837,18 @@
         &bfd_elf32_shlin_vec,
 	&bfd_elf32_shlnbsd_vec,
 	&bfd_elf32_shnbsd_vec,
+#ifdef BFD64
+	&bfd_elf32_sh64_vec,
+	&bfd_elf32_sh64l_vec,
+	&bfd_elf32_sh64lnbsd_vec,
+	&bfd_elf32_sh64nbsd_vec,
+#endif
 	&bfd_elf32_sparc_vec,
 	&bfd_elf32_tradbigmips_vec,
 	&bfd_elf32_tradlittlemips_vec,
 	&bfd_elf32_us_cris_vec,
 	&bfd_elf32_v850_vec,
+	&bfd_elf32_vax_vec,
 	&bfd_elf32_xstormy16_vec,
 #ifdef BFD64
 	&bfd_elf64_alpha_vec,
@@ -822,6 +867,10 @@
 	&bfd_elf64_powerpc_vec,
 	&bfd_elf64_powerpcle_vec,
 	&bfd_elf64_s390_vec,
+	&bfd_elf64_sh64_vec,
+	&bfd_elf64_sh64l_vec,
+	&bfd_elf64_sh64lnbsd_vec,
+	&bfd_elf64_sh64nbsd_vec,
 #if 0
 	&bfd_elf64_sparc_vec,
 #endif
@@ -965,7 +1014,9 @@
 	&tic54x_coff2_beh_vec,
 	&tic54x_coff2_vec,
 	&tic80coff_vec,
+	&vaxbsd_vec,
 	&vaxnetbsd_vec,
+	&vax1knetbsd_vec,
 	&versados_vec,
 #ifdef BFD64
 	&vms_alpha_vec,
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 4391da1..19dcb87 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -242,7 +242,7 @@
   static boolean inited = false;
   int val;
 
-  if (inited == false)
+  if (! inited)
     {
       inited = true;
       hex_init ();
@@ -354,17 +354,13 @@
     }
   if (!d)
     {
-      char *sname = bfd_alloc (abfd, (bfd_size_type) 12);
-
       /* No chunk for this address, so make one up */
       d = ((struct data_struct *)
-	   bfd_alloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
+	   bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
 
-      if (!sname || !d)
+      if (!d)
 	return NULL;
 
-      memset (d->chunk_init, 0, CHUNK_MASK + 1);
-      memset (d->chunk_data, 0, CHUNK_MASK + 1);
       d->next = abfd->tdata.tekhex_data->data;
       d->vma = vma;
       abfd->tdata.tekhex_data->data = d;
@@ -489,7 +485,7 @@
   /* To the front of the file */
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
     abort ();
-  while (eof == false)
+  while (! eof)
     {
       char buffer[MAXCHUNK];
       char *src = buffer;
@@ -681,7 +677,7 @@
      bfd_size_type bytes_to_do;
 {
 
-  if (abfd->output_has_begun == false)
+  if (! abfd->output_has_begun)
     {
       /* The first time around, allocate enough sections to hold all the chunks */
       asection *s = abfd->sections;
@@ -1005,6 +1001,7 @@
 #define tekhex_bfd_relax_section bfd_generic_relax_section
 #define tekhex_bfd_gc_sections bfd_generic_gc_sections
 #define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_discard_group bfd_generic_discard_group
 #define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/vaxbsd.c b/bfd/vaxbsd.c
new file mode 100644
index 0000000..5faedbe
--- /dev/null
+++ b/bfd/vaxbsd.c
@@ -0,0 +1,39 @@
+/* BFD back-end for BSD and Ultrix/VAX (1K page size) a.out-ish binaries.
+   Copyright 2002 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.  */
+
+#define N_HEADER_IN_TEXT(x) 0
+#define BYTES_IN_WORD 4
+#define ENTRY_CAN_BE_ZERO
+#define N_SHARED_LIB(x) 0 /* Avoids warning */
+#define TEXT_START_ADDR 0
+#define TARGET_PAGE_SIZE 1024
+#define SEGMENT_SIZE TARGET_PAGE_SIZE
+#define DEFAULT_ARCH bfd_arch_vax
+
+/* Do not "beautify" the CONCAT* macro args.  Traditional C will not   remove whitespace added here, and thus will fail to concatenate   the tokens.  */
+#define MY(OP) CONCAT2 (vaxbsd_,OP)
+
+#define TARGETNAME "a.out-vax-bsd"
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "libaout.h"
+
+#include "aout-target.h"
diff --git a/bfd/vaxnetbsd.c b/bfd/vaxnetbsd.c
index 21a0b37..48a1ed6 100644
--- a/bfd/vaxnetbsd.c
+++ b/bfd/vaxnetbsd.c
@@ -1,5 +1,5 @@
-/* BFD back-end for NetBSD/VAX a.out-ish binaries.
-   Copyright 1998, 2000, 2001 Free Software Foundation, Inc.
+/* BFD back-end for NetBSD/VAX (4K page size) a.out-ish binaries.
+   Copyright 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -20,11 +20,11 @@
 #define	BYTES_IN_WORD	4
 #undef TARGET_IS_BIG_ENDIAN_P
 
-#define	TARGET_PAGE_SIZE	1024
+#define	TARGET_PAGE_SIZE	0x1000
 #define	SEGMENT_SIZE	TARGET_PAGE_SIZE
 
 #define	DEFAULT_ARCH	bfd_arch_vax
-#define	DEFAULT_MID 	M_VAX_NETBSD
+#define	DEFAULT_MID 	M_VAX4K_NETBSD
 
 /* Do not "beautify" the CONCAT* macro args.  Traditional C will not
    remove whitespace added here, and thus will fail to concatenate
diff --git a/bfd/versados.c b/bfd/versados.c
index e1cd9f7..684c3db 100644
--- a/bfd/versados.c
+++ b/bfd/versados.c
@@ -612,6 +612,7 @@
 {
   struct ext_vheader ext;
   unsigned char len;
+  tdata_type *tdata_save;
 
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
     return NULL;
@@ -642,9 +643,12 @@
 
   /* OK, looks like a record, build the tdata and read in.  */
 
-  if (!versados_mkobject (abfd)
-      || !versados_scan (abfd))
-    return NULL;
+  tdata_save = abfd->tdata.versados_data;
+  if (!versados_mkobject (abfd) || !versados_scan (abfd))
+    {
+      abfd->tdata.versados_data = tdata_save;
+      return NULL;
+    }
 
   return abfd->xvec;
 }
@@ -867,6 +871,7 @@
 #define versados_bfd_relax_section bfd_generic_relax_section
 #define versados_bfd_gc_sections bfd_generic_gc_sections
 #define versados_bfd_merge_sections bfd_generic_merge_sections
+#define versados_bfd_discard_group bfd_generic_discard_group
 #define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
diff --git a/bfd/version.h b/bfd/version.h
index d6adfac..da65221 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1 +1 @@
-#define BFD_VERSION_DATE 20020528
+#define BFD_VERSION_DATE 20020824
diff --git a/bfd/vms-gsd.c b/bfd/vms-gsd.c
index d9dcd78..0024122 100644
--- a/bfd/vms-gsd.c
+++ b/bfd/vms-gsd.c
@@ -426,13 +426,12 @@
 	      else
 		{
 		  section->contents = ((unsigned char *)
-				       bfd_malloc (section->_raw_size));
+				       bfd_zmalloc (section->_raw_size));
 		  if (section->contents == NULL)
 		    {
 		      bfd_set_error (bfd_error_no_memory);
 		      return -1;
 		    }
-		  memset (section->contents, 0, (size_t) section->_raw_size);
 		}
 	      section->_cooked_size = section->_raw_size;
 #if VMS_DEBUG
@@ -618,10 +617,9 @@
 	    section->vma = (bfd_vma)base_addr;
 	    base_addr += section->_raw_size;
 	    section->contents = ((unsigned char *)
-				 bfd_malloc (section->_raw_size));
+				 bfd_zmalloc (section->_raw_size));
 	    if (section->contents == NULL)
 	      return -1;
-	    memset (section->contents, 0, (size_t) section->_raw_size);
 	    section->_cooked_size = section->_raw_size;
 #if VMS_DEBUG
 	    vms_debug(4, "egsd psc %d (%s, flags %04x=%s) ",
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c
index b871a5d..3b043b4 100644
--- a/bfd/vms-misc.c
+++ b/bfd/vms-misc.c
@@ -292,23 +292,23 @@
 
   if (PRIV (buf_size) == 0)
     {
+      bfd_size_type amt;
+
       if (PRIV (is_vax))
 	{
-	  PRIV (vms_buf) = (unsigned char *) malloc (OBJ_S_C_MAXRECSIZ);
-	  PRIV (buf_size) = OBJ_S_C_MAXRECSIZ;
+	  amt = OBJ_S_C_MAXRECSIZ;
 	  PRIV (file_format) = FF_VAX;
 	}
       else
-	PRIV (vms_buf) = (unsigned char *) malloc (6);
+	amt = 6;
+      PRIV (vms_buf) = (unsigned char *) bfd_malloc (amt);
+      PRIV (buf_size) = amt;
     }
 
   vms_buf = PRIV (vms_buf);
 
   if (vms_buf == 0)
-    {
-      bfd_set_error (bfd_error_no_memory);
-      return -1;
-    }
+    return -1;
 
   switch (PRIV (file_format))
     {
@@ -371,7 +371,7 @@
   if (PRIV (is_vax))
     {
       PRIV (rec_length) = bfd_bread (vms_buf, (bfd_size_type) PRIV (buf_size),
-				    abfd);
+				     abfd);
       if (PRIV (rec_length) <= 0)
 	{
 	  bfd_set_error (bfd_error_file_truncated);
@@ -383,7 +383,7 @@
     {
       /* extract vms record length  */
 
-      _bfd_vms_get_header_values (abfd, vms_buf+test_start, NULL,
+      _bfd_vms_get_header_values (abfd, vms_buf + test_start, NULL,
 				  &PRIV (rec_length));
 
       if (PRIV (rec_length) <= 0)
@@ -405,13 +405,11 @@
       if (PRIV (rec_length) > PRIV (buf_size))
 	{
 	  PRIV (vms_buf) = ((unsigned char *)
-			    realloc (vms_buf, (size_t) PRIV (rec_length)));
+			    bfd_realloc (vms_buf,
+					 (bfd_size_type) PRIV (rec_length)));
 	  vms_buf = PRIV (vms_buf);
 	  if (vms_buf == 0)
-	    {
-	      bfd_set_error (bfd_error_no_memory);
-	      return -1;
-	    }
+	    return -1;
 	  PRIV (buf_size) = PRIV (rec_length);
 	}
 
@@ -593,7 +591,8 @@
   if (sptr != NULL)
     return sptr;
 
-  newptr = (vms_section *) bfd_malloc ((bfd_size_type) sizeof (vms_section));
+  newptr = (vms_section *) bfd_alloc (abfd,
+				      (bfd_size_type) sizeof (vms_section));
   if (newptr == (vms_section *) NULL)
     return NULL;
   newptr->contents = (unsigned char *) bfd_alloc (abfd, section->_raw_size);
diff --git a/bfd/vms.c b/bfd/vms.c
index d2fb16b..fc6bcc3 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -133,6 +133,7 @@
 
 #define vms_make_empty_symbol _bfd_generic_make_empty_symbol
 #define vms_bfd_link_just_syms _bfd_generic_link_just_syms
+#define vms_bfd_discard_group bfd_generic_discard_group
 
 /*===========================================================================*/
 
@@ -237,13 +238,10 @@
   int i;
   bfd_size_type amt;
 
-  if (abfd->tdata.any != 0)
-    return true;
-
   bfd_set_start_address (abfd, (bfd_vma) -1);
 
   amt = sizeof (struct vms_private_data_struct);
-  abfd->tdata.any = (struct vms_private_data_struct*) bfd_malloc (amt);
+  abfd->tdata.any = (struct vms_private_data_struct*) bfd_alloc (abfd, amt);
   if (abfd->tdata.any == 0)
     return false;
 
@@ -260,49 +258,32 @@
   PRIV (sections) = NULL;
 
   amt = sizeof (struct stack_struct) * STACKSIZE;
-  PRIV (stack) = (struct stack_struct *) bfd_malloc (amt);
+  PRIV (stack) = (struct stack_struct *) bfd_alloc (abfd, amt);
   if (PRIV (stack) == 0)
-    {
-     vms_init_no_mem1:
-      free (abfd->tdata.any);
-      abfd->tdata.any = 0;
-      return false;
-    }
+    goto error_ret1;
   PRIV (stackptr) = 0;
 
   amt = sizeof (struct bfd_hash_table);
-  PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_malloc (amt);
+  PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_alloc (abfd, amt);
   if (PRIV (vms_symbol_table) == 0)
-    {
-     vms_init_no_mem2:
-      free (PRIV (stack));
-      PRIV (stack) = 0;
-      goto vms_init_no_mem1;
-    }
+    goto error_ret1;
 
   if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc))
-    return false;
+    goto error_ret1;
 
   amt = sizeof (struct location_struct) * LOCATION_SAVE_SIZE;
-  PRIV (location_stack) = (struct location_struct *) bfd_malloc (amt);
+  PRIV (location_stack) = (struct location_struct *) bfd_alloc (abfd, amt);
   if (PRIV (location_stack) == 0)
-    {
-     vms_init_no_mem3:
-      free (PRIV (vms_symbol_table));
-      PRIV (vms_symbol_table) = 0;
-      goto vms_init_no_mem2;
-    }
+    goto error_ret2;
 
   for (i = 0; i < VMS_SECTION_COUNT; i++)
     PRIV (vms_section_table)[i] = NULL;
 
-  PRIV (output_buf) = (unsigned char *) malloc (MAX_OUTREC_SIZE);
+  amt = MAX_OUTREC_SIZE;
+  PRIV (output_buf) = (unsigned char *) bfd_alloc (abfd, amt);
   if (PRIV (output_buf) == 0)
-    {
-      free (PRIV (location_stack));
-      PRIV (location_stack) = 0;
-      goto vms_init_no_mem3;
-    }
+    goto error_ret2;
+
   PRIV (push_level) = 0;
   PRIV (pushed_size) = 0;
   PRIV (length_pos) = 2;
@@ -310,6 +291,13 @@
   PRIV (output_alignment) = 1;
 
   return true;
+
+ error_ret2:
+  bfd_hash_table_free (PRIV (vms_symbol_table));
+ error_ret1:
+  bfd_release (abfd, abfd->tdata.any);
+  abfd->tdata.any = 0;
+  return false;
 }
 
 /* Fill symbol->section with section ptr
@@ -393,22 +381,17 @@
   int prev_type;
   const struct bfd_target *target_vector = 0;
   const bfd_arch_info_type *arch = 0;
+  PTR tdata_save = abfd->tdata.any;
 
 #if VMS_DEBUG
   vms_debug (1, "vms_object_p(%p)\n", abfd);
 #endif
 
   if (!vms_initialize (abfd))
-    {
-      fprintf (stderr, "vms_initialize () failed !!\n");
-      return 0;
-    }
+    goto error_ret;
 
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET))
-    {
-      bfd_set_error (bfd_error_file_truncated);
-      return 0;
-    }
+    goto err_wrong_format;
 
   prev_type = -1;
 
@@ -422,20 +405,18 @@
 #if VMS_DEBUG
 	  vms_debug (2, "next_record failed\n");
 #endif
-	  bfd_set_error (bfd_error_wrong_format);
-	  return 0;
+	  goto err_wrong_format;
 	}
 
       if ((prev_type == EOBJ_S_C_EGSD)
 	   && (PRIV (rec_type) != EOBJ_S_C_EGSD))
 	{
-	  if (vms_fixup_sections (abfd) == false)
+	  if (! vms_fixup_sections (abfd))
 	    {
 #if VMS_DEBUG
 	      vms_debug (2, "vms_fixup_sections failed\n");
 #endif
-	      bfd_set_error (bfd_error_wrong_format);
-	      return 0;
+	      goto err_wrong_format;
 	    }
 	}
 
@@ -487,21 +468,19 @@
 #if VMS_DEBUG
 	  vms_debug (2, "slurp type %d failed with %d\n", prev_type, err);
 #endif
-	  bfd_set_error (bfd_error_wrong_format);
-	  return 0;
+	  goto err_wrong_format;
 	}
     }
   while ((prev_type != EOBJ_S_C_EEOM) && (prev_type != OBJ_S_C_EOM) && (prev_type != OBJ_S_C_EOMW));
 
   if (target_vector == &vms_vax_vec)
     {
-      if (vms_fixup_sections (abfd) == false)
+      if (! vms_fixup_sections (abfd))
 	{
 #if VMS_DEBUG
 	  vms_debug (2, "vms_fixup_sections failed\n");
 #endif
-	  bfd_set_error (bfd_error_wrong_format);
-	  return 0;
+	  goto err_wrong_format;
 	}
 
       /* set arch_info to vax  */
@@ -528,12 +507,19 @@
 #if VMS_DEBUG
       vms_debug (2, "arch not found\n");
 #endif
-      bfd_set_error (bfd_error_wrong_format);
-      return 0;
+      goto err_wrong_format;
     }
   abfd->arch_info = arch;
 
   return target_vector;
+
+ err_wrong_format:
+  bfd_set_error (bfd_error_wrong_format);
+ error_ret:
+  if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+    bfd_release (abfd, abfd->tdata.any);
+  abfd->tdata.any = tdata_save;
+  return NULL;
 }
 
 /* Check the format for a file being read.
@@ -561,10 +547,7 @@
 #endif
 
   if (!vms_initialize (abfd))
-    {
-      fprintf (stderr, "vms_initialize () failed !!\n");
-      return 0;
-    }
+    return 0;
 
   {
 #ifdef __VAX
@@ -645,10 +628,6 @@
 vms_close_and_cleanup (abfd)
      bfd *abfd;
 {
-  asection *sec;
-  vms_section *es, *es1;
-  int i;
-
 #if VMS_DEBUG
   vms_debug (1, "vms_close_and_cleanup(%p)\n", abfd);
 #endif
@@ -656,63 +635,15 @@
     return true;
 
   if (PRIV (vms_buf) != NULL)
-    {
-      free (PRIV (vms_buf));
-      PRIV (vms_buf) = NULL;
-    }
-  PRIV (buf_size) = 0;
-
-  if (PRIV (output_buf) != 0)
-    {
-      free (PRIV (output_buf));
-      PRIV (output_buf) = 0;
-    }
-
-  sec = abfd->sections;
-  while (sec != NULL)
-    {
-      if (sec->contents)
-	free (sec->contents);
-      sec = sec->next;
-    }
+    free (PRIV (vms_buf));
 
   if (PRIV (sections) != NULL)
-    {
-      free (PRIV (sections));
-      PRIV (sections) = NULL;
-    }
+    free (PRIV (sections));
 
   if (PRIV (vms_symbol_table))
-    {
-      bfd_hash_table_free (PRIV (vms_symbol_table));
-      PRIV (vms_symbol_table) = 0;
-    }
+    bfd_hash_table_free (PRIV (vms_symbol_table));
 
-  if (PRIV (stack))
-    {
-      free (PRIV (stack));
-      PRIV (stack) = 0;
-    }
-
-  if (PRIV (location_stack))
-    {
-      free (PRIV (location_stack));
-      PRIV (location_stack) = 0;
-    }
-
-  for (i = 0; i < VMS_SECTION_COUNT; i++)
-    {
-      es = PRIV (vms_section_table)[i];
-      while (es != NULL)
-	{
-	  es1 = es->next;
-	  free (es);
-	  es = es1;
-	}
-      PRIV (vms_section_table)[i] = NULL;
-   }
-
-  free (abfd->tdata.any);
+  bfd_release (abfd, abfd->tdata.any);
   abfd->tdata.any = NULL;
 
   return true;
diff --git a/bfd/xcoff-target.h b/bfd/xcoff-target.h
index 0787b8d..413511b 100644
--- a/bfd/xcoff-target.h
+++ b/bfd/xcoff-target.h
@@ -1,5 +1,5 @@
 /* Common definitions for backends based on IBM RS/6000 "XCOFF64" files.
-   Copyright 2000, 2001
+   Copyright 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -98,6 +98,7 @@
 #define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section
 #define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
 #define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
+#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
 #define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
 
 /* XCOFF archives do not have anything which corresponds to an
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 9d66243..a869d7d 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1086,21 +1086,19 @@
   /* We keep a list of the linker hash table entries that correspond
      to each external symbol.  */
   amt = symcount * sizeof (struct xcoff_link_hash_entry *);
-  sym_hash = (struct xcoff_link_hash_entry **) bfd_alloc (abfd, amt);
+  sym_hash = (struct xcoff_link_hash_entry **) bfd_zalloc (abfd, amt);
   if (sym_hash == NULL && symcount != 0)
     goto error_return;
   coff_data (abfd)->sym_hashes = (struct coff_link_hash_entry **) sym_hash;
-  memset (sym_hash, 0, (size_t) amt);
 
   /* Because of the weird stuff we are doing with XCOFF csects, we can
      not easily determine which section a symbol is in, so we store
      the information in the tdata for the input file.  */
   amt = symcount * sizeof (asection *);
-  csect_cache = (asection **) bfd_alloc (abfd, amt);
+  csect_cache = (asection **) bfd_zalloc (abfd, amt);
   if (csect_cache == NULL && symcount != 0)
     goto error_return;
   xcoff_data (abfd)->csects = csect_cache;
-  memset (csect_cache, 0, (size_t) amt);
 
   /* While splitting sections into csects, we need to assign the
      relocs correctly.  The relocs and the csects must both be in
@@ -1109,10 +1107,9 @@
      into reloc_info using the section target_index.  */
   amt = abfd->section_count + 1;
   amt *= sizeof (struct reloc_info_struct);
-  reloc_info = (struct reloc_info_struct *) bfd_malloc (amt);
+  reloc_info = (struct reloc_info_struct *) bfd_zmalloc (amt);
   if (reloc_info == NULL)
     goto error_return;
-  memset ((PTR) reloc_info, 0, (size_t) amt);
 
   /* Read in the relocs and line numbers for each section.  */
   linesz = bfd_coff_linesz (abfd);
@@ -1129,11 +1126,9 @@
 					false, (struct internal_reloc *) NULL);
 	  amt = o->reloc_count;
 	  amt *= sizeof (asection *);
-	  reloc_info[o->target_index].csects = (asection **) bfd_malloc (amt);
+	  reloc_info[o->target_index].csects = (asection **) bfd_zmalloc (amt);
 	  if (reloc_info[o->target_index].csects == NULL)
 	    goto error_return;
-	  memset (reloc_info[o->target_index].csects, 0, (size_t) amt);
-
 	}
 
       if ((info->strip == strip_none || info->strip == strip_some)
@@ -2883,7 +2878,7 @@
     }
 
   /* __rtinit */
-  if (info->init_function || info->fini_function || rtld == true) 
+  if (info->init_function || info->fini_function || rtld) 
     {
       struct xcoff_link_hash_entry *hsym;
       struct internal_ldsym *ldsym;
@@ -5892,7 +5887,10 @@
       isym.n_value = (h->root.u.def.section->output_section->vma
 		      + h->root.u.def.section->output_offset
 		      + h->root.u.def.value);
-      isym.n_scnum = h->root.u.def.section->output_section->target_index;
+      if (bfd_is_abs_section (h->root.u.def.section->output_section))
+	isym.n_scnum = N_ABS;
+      else
+	isym.n_scnum = h->root.u.def.section->output_section->target_index;
       isym.n_sclass = C_HIDEXT;
       aux.x_csect.x_smtyp = XTY_SD;
 
diff --git a/config-ml.in b/config-ml.in
index 4b1be0f..aae3f87 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -537,6 +537,7 @@
 				LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
 				LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
 				LDFLAGS="$(LDFLAGS) $${flags}" \
+				DESTDIR="$(DESTDIR)" \
 				$(DO)); then \
 		  true; \
 		else \
diff --git a/config.guess b/config.guess
index fbad77f..c5438de 100755
--- a/config.guess
+++ b/config.guess
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2002-05-22'
+timestamp='2002-08-23'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -88,30 +88,40 @@
   exit 1
 fi
 
+trap 'exit 1' 1 2 15
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
 
-# CC_FOR_BUILD -- compiler used by this script.
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c ;
+# This shell variable is my proudest work .. or something. --bje
+
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
 	for c in cc gcc c89 c99 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
-	  if test $? = 0 ; then
+	  if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
-	rm -f $dummy.c $dummy.o $dummy.rel ;
+	rm -f $files ;
 	if test x"$CC_FOR_BUILD" = x ; then
 	  CC_FOR_BUILD=no_compiler_found ;
 	fi
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;
+unset files'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -221,6 +231,7 @@
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
+	eval $set_cc_for_build
 	cat <<EOF >$dummy.s
 	.data
 \$Lformat:
@@ -246,10 +257,9 @@
 	jsr \$26,exit
 	.end main
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
-		case `./$dummy` in
+		case `$dummy` in
 			0-0)
 				UNAME_MACHINE="alpha"
 				;;
@@ -271,9 +281,12 @@
 			2-1307)
 				UNAME_MACHINE="alphaev68"
 				;;
+			3-1307)
+				UNAME_MACHINE="alphaev7"
+				;;
 		esac
 	fi
-	rm -f $dummy.s $dummy
+	rm -f $dummy.s $dummy && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
@@ -314,6 +327,10 @@
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
@@ -421,9 +438,9 @@
 	}
 EOF
 	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
@@ -504,8 +521,8 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
+		$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+		rm -f $dummy.c $dummy && rmdir $tmpdir
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -603,9 +620,9 @@
                   exit (0);
               }
 EOF
-		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
 		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-		    rm -f $dummy.c $dummy
+		    rm -f $dummy.c $dummy && rmdir $tmpdir
 		fi ;;
 	esac
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -641,8 +658,8 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -725,7 +742,19 @@
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
     *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
@@ -786,7 +815,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	rm -f $dummy.c
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
@@ -849,7 +878,7 @@
 		;;
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;		
+		exit 0 ;;
 	  coff-i386)
 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 		exit 0 ;;
@@ -882,7 +911,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	rm -f $dummy.c
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
@@ -921,13 +950,13 @@
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
 			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 	else
@@ -960,6 +989,9 @@
 	# "miniframe"
 	echo m68010-convergent-sysv
 	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
@@ -1053,6 +1085,9 @@
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
 	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit 0 ;;
@@ -1245,8 +1280,8 @@
 }
 EOF
 
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+rm -f $dummy.c $dummy && rmdir $tmpdir
 
 # Apollos put the system type in the environment.
 
diff --git a/config.sub b/config.sub
index 4693ac1..b0222f7 100755
--- a/config.sub
+++ b/config.sub
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2002-05-22'
+timestamp='2002-08-22'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -231,22 +231,32 @@
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| fr30 \
+	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
+	| ip2k \
 	| m32r | m68000 | m68k | m88k | mcore \
-	| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
-	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
-	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
-	| mipsisa32 | mipsisa64 \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| ns16k | ns32k \
 	| openrisc | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
 	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
 	| strongarm \
 	| tahoe | thumb | tic80 | tron \
@@ -288,24 +298,35 @@
 	| clipper-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
 	| m32r-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 	| m88110-* | m88k-* | mcore-* \
-	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
-	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
-	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39 | mipstx39el \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
 	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
@@ -728,13 +749,13 @@
 	pbb)
 		basic_machine=m68k-tti
 		;;
-        pc532 | pc532-*)
+	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
-	pentiumpro | p6 | 6x86 | athlon)
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 		basic_machine=i686-pc
 		;;
 	pentiumii | pentium2)
@@ -755,22 +776,22 @@
 	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
-	        ;;
+		;;
 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
-	        ;;
+		;;
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64)	basic_machine=powerpc64-unknown
-	        ;;
+		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
-	        ;;
+		;;
 	ppc64le-* | powerpc64little-*)
 		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
@@ -801,6 +822,12 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -866,7 +893,7 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
-        sv1)
+	sv1)
 		basic_machine=sv1-cray
 		os=-unicos
 		;;
@@ -924,8 +951,8 @@
 		os=-vms
 		;;
 	vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
+		basic_machine=f301-fujitsu
+		;;
 	vxworks960)
 		basic_machine=i960-wrs
 		os=-vxworks
@@ -950,7 +977,7 @@
 		basic_machine=i386-pc
 		os=-windows32-msvcrt
 		;;
-        xps | xps100)
+	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
 	ymp)
@@ -996,7 +1023,7 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh3eb | sh4eb)
+	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
 		basic_machine=sh-unknown
 		;;
 	sh64)
@@ -1005,7 +1032,7 @@
 	sparc | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
-        cydra)
+	cydra)
 		basic_machine=cydra-cydrome
 		;;
 	orion)
@@ -1155,7 +1182,7 @@
 		os=-rtmk-nova
 		;;
 	-ns2 )
-	        os=-nextstep2
+		os=-nextstep2
 		;;
 	-nsk*)
 		os=-nsk
@@ -1194,8 +1221,8 @@
 	-xenix)
 		os=-xenix
 		;;
-        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-	        os=-mint
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
 		;;
 	-none)
 		;;
@@ -1232,7 +1259,7 @@
 	pdp10-*)
 		os=-tops20
 		;;
-        pdp11-*)
+	pdp11-*)
 		os=-none
 		;;
 	*-dec | vax-*)
@@ -1325,19 +1352,19 @@
 	*-next)
 		os=-nextstep3
 		;;
-        *-gould)
+	*-gould)
 		os=-sysv
 		;;
-        *-highlevel)
+	*-highlevel)
 		os=-bsd
 		;;
 	*-encore)
 		os=-bsd
 		;;
-        *-sgi)
+	*-sgi)
 		os=-irix
 		;;
-        *-siemens)
+	*-siemens)
 		os=-sysv4
 		;;
 	*-masscomp)
diff --git a/configure b/configure
index 2cb059f..339b23d 100755
--- a/configure
+++ b/configure
@@ -917,8 +917,8 @@
 
   tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
   tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET GCJ_FOR_TARGET"
-  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
-  tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
+  tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET BUILD_PREFIX"
+  tools="${tools} BUILD_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
   tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
   tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
   tools="${tools} OBJCOPY OBJDUMP"
@@ -955,8 +955,8 @@
   DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
   DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
   GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
-  HOST_PREFIX=${build_alias}-
-  HOST_PREFIX_1=${build_alias}-
+  BUILD_PREFIX=${build_alias}-
+  BUILD_PREFIX_1=${build_alias}-
   LD=${LD-${host_alias}-ld}
   LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
   MAKEINFO=${MAKEINFO-makeinfo}
diff --git a/configure.in b/configure.in
index b21918e..a945dcb 100644
--- a/configure.in
+++ b/configure.in
@@ -42,16 +42,14 @@
 
 # these libraries are used by various programs built for the host environment
 #
-host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui zlib"
+host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib"
 
 libstdcxx_version="target-libstdc++-v3"
-# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
 # know that we are building the simulator.
-host_tools="texinfo byacc flex bison binutils ld gas gcc cgen sid sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar"
 
 # libgcj represents the runtime libraries only used by gcj.
 libgcj="target-libffi \
@@ -66,7 +64,6 @@
 target_libs="target-libiberty \
 		target-libgloss \
 		target-newlib \
-		target-librx \
 		${libstdcxx_version} \
 		target-libf2c \
 		${libgcj}
@@ -93,11 +90,11 @@
 #
 # This must be a single line because of the way it is searched by grep in
 # the code below.
-native_only="autoconf automake libtool cvssrc fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
 
 # directories to be built in a cross environment only
 #
-cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"
+cross_only="target-libgloss target-newlib target-opcodes"
 
 ## All tools belong in one of the four categories, and are assigned above
 ## We assign ${configdirs} this way to remove all embedded newlines.  This
@@ -118,325 +115,16 @@
 
 # per-host:
 
-# Work in distributions that contain no compiler tools, like Autoconf.
-tentative_cc=""
-if test -d ${srcdir}/config ; then
-case "${host}" in
-  m68k-hp-hpux*)
-    # Avoid "too much defining" errors from HPUX compiler.
-    tentative_cc="cc -Wp,-H256000"
-    host_makefile_frag="config/mh-hp300"
-    ;;
-  m68k-apollo-sysv*)
-    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
-    host_makefile_frag="config/mh-apollo68"
-    ;;
-  m68k-apollo-bsd*)
-    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
-    # chokes on bfd, the compiler won't let you assign integers to enums, and
-    # other problems.  Defining CC to gcc is a questionable way to say "don't use
-    # the apollo compiler" (the preferred version of GCC could be called cc,
-    # or whatever), but I'm not sure leaving CC as cc is any better...
-    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
-    tentative_cc=gcc
-    host_makefile_frag="config/mh-a68bsd"
-    ;;
-  m88k-dg-dgux*)
-    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
-    host_makefile_frag="config/mh-dgux"
-    ;;
-  m88k-harris-cxux*)
-    # Under CX/UX, we want to tell the compiler to use ANSI mode.
-    tentative_cc="cc -Xa"
-    host_makefile_frag="config/mh-cxux"
-    ;;
-  m88k-motorola-sysv*)
-    host_makefile_frag="config/mh-delta88"
-    ;;
-  mips*-dec-ultrix*)
-    tentative_cc="cc -Wf,-XNg1000"
-    host_makefile_frag="config/mh-decstation"
-    ;;
-  mips*-nec-sysv4*)
-    # The C compiler on NEC MIPS SVR4 needs bigger tables.
-    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
-    host_makefile_frag="config/mh-necv4"
-    ;;
-  mips*-sgi-irix6*)
-    host_makefile_frag="config/mh-irix6"
-    ;;
-  mips*-sgi-irix5*)
-    host_makefile_frag="config/mh-irix5"
-    ;;
-  mips*-sgi-irix4*)
-    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
-    # environment.  Also bump switch table size so that cp-parse will
-    # compile.  Bump string length limit so linker builds.
-    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
-    ;;
-  mips*-sgi-irix3*)
-    host_makefile_frag="config/mh-sysv"
-    ;;
-  mips*-*-sysv4*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-  mips*-*-sysv*)
-    # This is for a MIPS running RISC/os 4.52C.
-
-    # This is needed for GDB, but needs to be in the top-level make because
-    # if a library is compiled with the bsd headers and gets linked with the
-    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
-    # a different size).
-    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
-    # known except to select the sysv environment.  Could we use /proc instead?
-    # These "sysv environments" and "bsd environments" often end up being a pain.
-    #
-    # This is not part of CFLAGS because perhaps not all C compilers have this
-    # option.
-    tentative_cc="cc -systype sysv"
-    host_makefile_frag="config/mh-riscos"
-    ;;
-  i370-ibm-opened*)
-    tentative_cc="c89"
-    host_makefile_frag="config/mh-openedition"
-    ;;
-  i[3456]86-*-sysv5*)
-    host_makefile_frag="config/mh-sysv5"
-    ;;
-  i[3456]86-*-dgux*)
-    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
-    host_makefile_frag="config/mh-dgux386"
-    ;;
-  i[3456]86-ncr-sysv4.3*)
-    # The MetaWare compiler will generate a copyright message unless you
-    # turn it off by adding the -Hnocopyr flag.
-    tentative_cc="cc -Hnocopyr"
-    host_makefile_frag="config/mh-ncrsvr43"
-    ;;
-  i[3456]86-ncr-sysv4*)
-    # for an NCR 3000 (i486/SVR4) system.
-    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
-    # This compiler not only emits obnoxious copyright messages every time
-    # you run it, but it chokes and dies on a whole bunch of GNU source
-    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
-    tentative_cc="/usr/ccs/ATT/cc"
-    host_makefile_frag="config/mh-ncr3000"
-    ;;
-  i[3456]86-*-sco3.2v5*)
-    host_makefile_frag="config/mh-sysv"
-    ;;
-  i[3456]86-*-sco*)
-    # The native C compiler botches some simple uses of const.  Unfortunately,
-    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
-    tentative_cc="cc -Dconst="
-    host_makefile_frag="config/mh-sco"
-    ;;
-  i[3456]86-*-udk*)
-    host_makefile_frag="config/mh-sysv5"
-    ;;
-  i[3456]86-*-isc*)
-    host_makefile_frag="config/mh-sysv"
-    ;;
-  i[3456]86-*-solaris2*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-  i[3456]86-*-aix*)
-    host_makefile_frag="config/mh-aix386"
-    ;;
-  i[3456]86-*-msdosdjgpp*)
-    host_makefile_frag="config/mh-djgpp"
-    ;;
-  *-cygwin*)
-    host_makefile_frag="config/mh-cygwin"
-    ;;
-  *-mingw32*)
-    host_makefile_frag="config/mh-mingw32"
-    ;;
-  *-interix*)
-    host_makefile_frag="config/mh-interix"
-    ;;
-  vax-*-ultrix2*)
-    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
-    tentative_cc=gcc
-    ;;
-  *-*-solaris2*)
-    host_makefile_frag="config/mh-solaris"
-    ;;
-  m68k-sun-sunos*)
-    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
-    # without overflowing the jump tables (-J says to use a 32 bit table)
-    tentative_cc="cc -J"
-    ;;
-  *-hp-hpux[78]*)
-    tentative_cc="cc -Wp,-H256000"
-    host_makefile_frag="config/mh-hpux8"
-    ;;
-  *-hp-hpux*)
-    tentative_cc="cc -Wp,-H256000"
-    host_makefile_frag="config/mh-hpux"
-    ;;
-  *-*-hiux*)
-    tentative_cc="cc -Wp,-H256000"
-    host_makefile_frag="config/mh-hpux"
-    ;;
-  rs6000-*-lynxos*)
-    # /bin/cc is less than useful for our purposes.  Always use GCC
-    tentative_cc="/usr/cygnus/progressive/bin/gcc"
-    host_makefile_frag="config/mh-lynxrs6k"
-    ;;
-  *-*-lynxos*)
-    # /bin/cc is less than useful for our purposes.  Always use GCC
-    tentative_cc="/bin/gcc"
-    ;;
-  *-*-sysv4*)
-    host_makefile_frag="config/mh-sysv4"
-    ;;
-  *-*-sysv*)
-    host_makefile_frag="config/mh-sysv"
-    ;;
-esac
-fi
-
-# If we aren't going to be using gcc, see if we can extract a definition
-# of CC from the fragment.
-# Actually, use the 'pre-extracted' version above.
-if test -z "${CC}" && test "${build}" = "${host}" ; then
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
-  found=
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/gcc; then
-      found=yes
-      break
-    fi
-  done
-  IFS="$save_ifs"
-  if test -z "${found}" && test -n "${tentative_cc}" ; then
-    CC=$tentative_cc
-  fi
-fi
-
-# We default to --with-shared on platforms where -fpic is meaningless.
-# Well, we don't yet, but we will.
-if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
-  case "${target}" in
-    alpha*-dec-osf*)	enable_shared=yes ;;
-    alpha*-*-linux*)	enable_shared=yes ;;
-    mips-sgi-irix5*)	enable_shared=yes ;;
-    *)			enable_shared=no ;;
-  esac
-fi
-
-# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
-# them automatically.
-case "${host}" in
-  hppa*64*-*-hpux11*)	
-    withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
-    ;;
-esac
-
-case "${enable_shared}" in
-  yes) shared=yes ;;
-  no) shared=no ;;
-  "") shared=no ;;
-  *) shared=yes ;;
-esac
-
-rm -f mh-frag
-if test -n "${host_makefile_frag}" ; then
-  for f in ${host_makefile_frag}
-  do
-    cat ${srcdir}/$f >> mh-frag
-  done
-  host_makefile_frag=mh-frag
-fi
+# There is no longer anything interesting in the per-host section.
 
 # per-target:
 
-case "${target}" in
-  v810*)
-    target_makefile_frag="${target_makefile_frag} config/mt-v810"
-    ;;
-  i[3456]86-*-netware*)
-    target_makefile_frag="${target_makefile_frag} config/mt-netware"
-    ;;
-  powerpc-*-netware*)
-    target_makefile_frag="${target_makefile_frag} config/mt-netware"
-    ;;
-  alpha*-*-linux*)
-    target_makefile_frag="${target_makefile_frag} config/mt-linux"
-    target_makefile_frag="${target_makefile_frag} config/mt-alphaieee"
-    ;;
-  alpha*-*-*)
-    target_makefile_frag="${target_makefile_frag} config/mt-alphaieee"
-    ;;
-  *-*-linux*)
-    target_makefile_frag="${target_makefile_frag} config/mt-linux"
-    ;;
-  *-*-aix4.[3456789]* | *-*-aix[56789].*)
-    target_makefile_frag="${target_makefile_frag} config/mt-aix43"
-    ;;
-  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
-    target_makefile_frag="${target_makefile_frag} config/mt-wince"
-    ;;
-esac
-
-# If --enable-target-optspace always use -Os instead of -O2 to build
-# the target libraries, similarly if it is not specified, use -Os
-# on selected platforms.
-case "${enable_target_optspace}:${target}" in
-  yes:*)
-    target_makefile_frag="${target_makefile_frag} config/mt-ospace"
-    ;;
-  :d30v-*)
-    target_makefile_frag="${target_makefile_frag} config/mt-d30v"
-    ;;
-  :m32r-* | :d10v-* | :fr30-*)
-    target_makefile_frag="${target_makefile_frag} config/mt-ospace"
-    ;;
-  no:* | :*)
-    ;;
-  *)
-    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
-    ;;
-esac
-
-skipdirs=
-gasdir=gas
-use_gnu_ld=
-use_gnu_as=
-
-# some tools are so dependent upon X11 that if we're not building with X, 
-# it's not even worth trying to configure, much less build, that tool.
-
-case ${with_x} in
-  yes | "")  # the default value for this tree is that X11 is available
-	;;
-  no)
-	skipdirs="${skipdirs} tk libgui"
-	;;
-  *)
-    	echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
-    	;;
-esac
-
-# Some tools are only suitable for building in a "native" situation.
-# Those are added when we have a host==target configuration.  For cross
-# toolchains, we add some directories that should only be useful in a
-# cross-compiler.
-
+# Define is_cross_compiler to save on calls to 'test'.
 is_cross_compiler=
-
 if test x"${host}" = x"${target}" ; then
-	# when doing a native toolchain, don't build the targets
-	# that are in the 'cross only' list
-	skipdirs="${skipdirs} ${cross_only}"
-	is_cross_compiler=no
+  is_cross_compiler=no
 else
-	# similarly, don't build the targets in the 'native only' 
-	# list when building a cross compiler
-	skipdirs="${skipdirs} ${native_only}"
-	is_cross_compiler=yes
+  is_cross_compiler=yes
 fi	
 
 # We always want to use the same name for this directory, so that dejagnu
@@ -463,40 +151,47 @@
   fi
 fi
 
-copy_dirs=
+# Skipdirs are removed silently.
+skipdirs=
+# Noconfigdirs are removed loudly.
+noconfigdirs=""
 
-# Handle --with-headers=XXX.  The contents of the named directory are
-# copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
-  if test x${is_cross_compiler} = xno ; then
-    echo 1>&2 '***' --with-headers is only supported when cross compiling
-    exit 1
-  fi
-  case "${exec_prefixoption}" in
-  "") x=${prefix} ;;
-  *) x=${exec_prefix} ;;
-  esac
-  copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+use_gnu_ld=
+# Make sure we don't let GNU ld be added if we didn't want it.
+if test x$with_gnu_ld = xno ; then
+  use_gnu_ld=no
+  noconfigdirs="$noconfigdirs ld"
 fi
 
-# Handle --with-libs=XXX.  Multiple directories are permitted.  The
-# contents are copied to $(tooldir)/lib.
-if test x"${with_libs}" != x ; then
-  if test x${is_cross_compiler} = xno ; then
-    echo 1>&2 '***' --with-libs is only supported when cross compiling
-    exit 1
-  fi
-  # Copy the libraries in reverse order, so that files in the first named
-  # library override files in subsequent libraries.
-  case "${exec_prefixoption}" in
-  "") x=${prefix} ;;
-  *) x=${exec_prefix} ;;
-  esac
-  for l in ${with_libs}; do
-    copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
-  done
+use_gnu_as=
+# Make sure we don't let GNU as be added if we didn't want it.
+if test x$with_gnu_as = xno ; then
+  use_gnu_as=no
+  noconfigdirs="$noconfigdirs gas"
 fi
 
+# some tools are so dependent upon X11 that if we're not building with X, 
+# it's not even worth trying to configure, much less build, that tool.
+
+case ${with_x} in
+  yes | "") ;; # the default value for this tree is that X11 is available
+  no)
+    skipdirs="${skipdirs} tk tix itcl libgui"
+    # We won't be able to build gdbtk without X.
+    enable_gdbtk=no 
+    ;;
+  *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
+esac
+
+# Some tools are only suitable for building in a "native" situation.
+# Remove these if host!=target.  Similarly, some are only suitable
+# for cross toolchains; remove if host=target.
+
+case $is_cross_compiler in
+  no) skipdirs="${skipdirs} ${cross_only}" ;;
+  yes) skipdirs="${skipdirs} ${native_only}" ;;
+esac
+
 # If both --with-headers and --with-libs are specified, default to
 # --without-newlib.
 if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
@@ -506,97 +201,51 @@
 fi
 
 # Recognize --with-newlib/--without-newlib.
-if test x${with_newlib} = xno ; then
-  skipdirs="${skipdirs} target-newlib"
-elif test x${with_newlib} = xyes ; then
-  skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
-fi
-
-# Default to using --with-stabs for certain targets.
-if test x${with_stabs} = x ; then
-  case "${target}" in
-  mips*-*-irix6*)
-    ;;
-  mips*-*-* | alpha*-*-osf*)
-    with_stabs=yes;
-    withoptions="${withoptions} --with-stabs"
-    ;;
-  esac
-fi
-
-# Handle ${copy_dirs}
-set fnord ${copy_dirs}
-shift
-while test $# != 0 ; do
-  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
-    :
-  else
-    echo Copying $1 to $2
-
-    # Use the install script to create the directory and all required
-    # parent directories.
-    if test -d $2 ; then
-      :
-    else
-      echo >config.temp
-      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
-    fi
-
-    # Copy the directory, assuming we have tar.
-    # FIXME: Should we use B in the second tar?  Not all systems support it.
-    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
-
-    # It is the responsibility of the user to correctly adjust all
-    # symlinks.  If somebody can figure out how to handle them correctly
-    # here, feel free to add the code.
-
-    echo $1 > $2/COPIED
-  fi
-  shift; shift
-done
+case ${with_newlib} in
+  no) skipdirs="${skipdirs} target-newlib" ;;
+  yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
+esac
 
 # Configure extra directories which are host specific
 
 case "${host}" in
-	i[3456]86-*-go32*)
-	  configdirs="$configdirs dosrel" ;;
-	i[3456]86-*-mingw32*)
-	  configdirs="$configdirs dosrel" ;;
-	*-cygwin*)
-	  configdirs="$configdirs libtermcap dosrel" ;;
+  i[3456]86-*-go32*)
+    configdirs="$configdirs dosrel" ;;
+  i[3456]86-*-mingw32*)
+    configdirs="$configdirs dosrel" ;;
+  *-cygwin*)
+    configdirs="$configdirs libtermcap dosrel" ;;
 esac
 
 # Remove more programs from consideration, based on the host or 
 # target this usually means that a port of the program doesn't
 # exist yet.
 
-noconfigdirs=""
-
 case "${host}" in
   hppa*64*-*-*)
     noconfigdirs="$noconfigdirs byacc"
     ;;
   i[3456]86-*-vsta)
-    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext"
+    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
     ;;
   i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
-    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile apache inet itcl tix db snavigator gnuserv libffi"
+    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
 	;;
   i[3456]86-*-mingw32*)
-    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv"
-     noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool"
+    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
+     noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
 	;;
   i[3456]86-*-beos*)
      noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
      ;;
   *-*-cygwin*)
-     noconfigdirs="autoconf automake send-pr rcs guile perl apache inet"
+     noconfigdirs="autoconf automake send-pr rcs guile perl"
     ;;
   *-*-netbsd*)
     noconfigdirs="rcs"
     ;;
   ppc*-*-pe)
-     noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv"
+     noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
     ;;
   powerpc-*-beos*)
     noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
@@ -639,7 +288,7 @@
     esac
     ;;
   *-*-netware)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-newlib target-libiberty target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
     ;;
   *-*-rtems*)
     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -665,8 +314,6 @@
   alpha*-*-linux*)
     # newlib is not 64 bit ready
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    # linux has rx in libc
-    skipdirs="$skipdirs target-librx"
     ;;
   alpha*-*-freebsd*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -677,8 +324,6 @@
     ;;
   sh-*-linux*)
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
-    # linux has rx in libc
-    skipdirs="$skipdirs target-librx"
     ;;    
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs ${libgcj}"
@@ -735,7 +380,7 @@
     noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
     ;;
   c4x-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
   c54x*-*-* | tic54x-*-*)
     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
@@ -744,22 +389,22 @@
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   d10v-*-*)
-    noconfigdirs="$noconfigdirs target-librx ${libstdcxx_version} target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
   d30v-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   fr30-*-elf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
-    fi
+    ;;
+  frv-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   h8300*-*-*)
     noconfigdirs="$noconfigdirs target-libgloss"
     ;;
   h8500-*-*)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj} target-libf2c"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
     ;;
   hppa*64*-*-linux* | parisc*64*-*-linux*)
     # In this case, it's because the hppa64-linux target is for
@@ -770,6 +415,7 @@
   hppa*-*-*elf* | \
   parisc*-*-linux* | hppa*-*-linux* | \
   hppa*-*-lites* | \
+  hppa*-*-openbsd* | \
   hppa*64*-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     # Do configure ld/binutils/gas for this case.
@@ -789,9 +435,6 @@
     ;;
   i[3456]86-*-coff | i[3456]86-*-elf)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-         target_configdirs="${target_configdirs} target-libstub target-cygmon"
-    fi
     ;;
   i[34567]86-*-freebsd*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -799,8 +442,6 @@
   s390*-*-linux*)
     # The libffi port is not yet in the GCC tree
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
-    # linux has rx in libc
-    skipdirs="$skipdirs target-librx"
     ;;
   i[3456]86-*-linux*)
     # This section makes it possible to build newlib natively on linux.
@@ -813,13 +454,6 @@
     # Note however, that newlib will only be configured in this situation
     # if the --with-newlib option has been given, because otherwise
     # 'target-newlib' will appear in skipdirs.
-    # linux has rx in libc
-    skipdirs="$skipdirs target-librx"
-    ;;
-  *-*-linux*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-    # linux has rx in libc
-    skipdirs="$skipdirs target-librx"
     ;;
   i[3456]86-*-mingw32*)
     target_configdirs="$target_configdirs target-mingw"
@@ -846,7 +480,7 @@
     esac
     ;;    
   i[3456]86-*-pe)
-    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
     ;;
   i[3456]86-*-sco3.2v5*)
     # The linker does not yet know about weak symbols in COFF,
@@ -870,15 +504,9 @@
     ;;
   m68k-*-elf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-cygmon"
-    fi
     ;;
   m68k-*-coff*)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-cygmon"
-    fi
     ;;
   mcore-*-pe*)
   # The EPOC C++ environment does not support exceptions or rtti,
@@ -890,20 +518,13 @@
     ;;
   mn10200-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-libstub target-cygmon"
-    fi
     ;;
   mn10300-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
-    fi
     ;;
   powerpc-*-aix*)
     # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss ${libgcj}"
-    use_gnu_ld=yes
+    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     ;;
   powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
     target_configdirs="$target_configdirs target-winsup"
@@ -920,17 +541,17 @@
     ;;
   powerpc-*-eabi)
     noconfigdirs="$noconfigdirs ${libgcj}"
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
-    fi
+    ;;
+  powerpc64*-*-linux*)
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+    # not yet ported.
+    noconfigdirs="$noconfigdirs target-libffi"
     ;;
   rs6000-*-lynxos*)
-    # The CVS server code doesn't work on the RS/6000
-    noconfigdirs="$noconfigdirs target-newlib gprof cvssrc ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
     ;;
   rs6000-*-aix*)
     noconfigdirs="$noconfigdirs gprof ${libgcj}"
-    use_gnu_ld=yes
     ;;
   rs6000-*-*)
     noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -958,10 +579,9 @@
     ;;
   mipstx39-*-*)
     noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
-    target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    ;;
   mips*-*-linux*)
-    noconfigdirs="$noconfigdirs target-libffi"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   mips*-*-*)
     noconfigdirs="$noconfigdirs gprof ${libgcj}"
@@ -982,27 +602,18 @@
     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     ;;
   sparc-*-elf*)
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-libstub target-cygmon"
-    fi
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   sparc64-*-elf*)
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-libstub target-cygmon"
-    fi
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   sparclite-*-*)
-    if test x${is_cross_compiler} != xno ; then
-	   target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
-    fi
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   sparc-*-sunos4*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     if test x${is_cross_compiler} != xno ; then
-           noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
+           noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     else
            use_gnu_ld=no
     fi
@@ -1027,15 +638,15 @@
   vax-*-*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  ip2k-*-*)
+    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
+    ;;
+  *-*-linux*)
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+    ;;
   *-*-lynxos*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;; 
-  *-*-macos* | \
-  *-*-mpw*)
-    # Macs want a resource compiler.
-    configdirs="$configdirs grez"
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;    
   *-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -1048,18 +659,6 @@
   *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
 esac
 
-# Make sure we don't let GNU ld be added if we didn't want it.
-if test x$with_gnu_ld = xno ; then
-  use_gnu_ld=no
-  noconfigdirs="$noconfigdirs ld"
-fi
-
-# Make sure we don't let GNU as be added if we didn't want it.
-if test x$with_gnu_as = xno ; then
-  use_gnu_as=no
-  noconfigdirs="$noconfigdirs gas"
-fi
-
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
 # the environment variable $LANGUAGES if defined. $LANGUAGES might
@@ -1263,6 +862,350 @@
   echo "    (Any other directories should still work fine.)" 1>&2
 fi
 
+case "$host" in
+  *msdosdjgpp*)
+    enable_gdbtk=no ;;
+esac
+# Determine whether gdb needs tk/tcl or not.
+case "$enable_gdbtk" in
+  no)
+    GDB_TK="" ;;
+  *)
+    GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;;
+esac
+
+copy_dirs=
+
+# Handle --with-headers=XXX.  The contents of the named directory are
+# copied to $(tooldir)/sys-include.
+if test x"${with_headers}" != x ; then
+  if test x${is_cross_compiler} = xno ; then
+    echo 1>&2 '***' --with-headers is only supported when cross compiling
+    exit 1
+  fi
+  case "${exec_prefixoption}" in
+  "") x=${prefix} ;;
+  *) x=${exec_prefix} ;;
+  esac
+  copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+fi
+
+# Handle --with-libs=XXX.  Multiple directories are permitted.  The
+# contents are copied to $(tooldir)/lib.
+if test x"${with_libs}" != x ; then
+  if test x${is_cross_compiler} = xno ; then
+    echo 1>&2 '***' --with-libs is only supported when cross compiling
+    exit 1
+  fi
+  # Copy the libraries in reverse order, so that files in the first named
+  # library override files in subsequent libraries.
+  case "${exec_prefixoption}" in
+  "") x=${prefix} ;;
+  *) x=${exec_prefix} ;;
+  esac
+  for l in ${with_libs}; do
+    copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+  done
+fi
+
+# Handle ${copy_dirs}
+set fnord ${copy_dirs}
+shift
+while test $# != 0 ; do
+  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
+    :
+  else
+    echo Copying $1 to $2
+
+    # Use the install script to create the directory and all required
+    # parent directories.
+    if test -d $2 ; then
+      :
+    else
+      echo >config.temp
+      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
+    fi
+
+    # Copy the directory, assuming we have tar.
+    # FIXME: Should we use B in the second tar?  Not all systems support it.
+    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
+
+    # It is the responsibility of the user to correctly adjust all
+    # symlinks.  If somebody can figure out how to handle them correctly
+    # here, feel free to add the code.
+
+    echo $1 > $2/COPIED
+  fi
+  shift; shift
+done
+
+# Work in distributions that contain no compiler tools, like Autoconf.
+tentative_cc=""
+if test -d ${srcdir}/config ; then
+case "${host}" in
+  m68k-hp-hpux*)
+    # Avoid "too much defining" errors from HPUX compiler.
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hp300"
+    ;;
+  m68k-apollo-sysv*)
+    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
+    host_makefile_frag="config/mh-apollo68"
+    ;;
+  m68k-apollo-bsd*)
+    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
+    # chokes on bfd, the compiler won't let you assign integers to enums, and
+    # other problems.  Defining CC to gcc is a questionable way to say "don't use
+    # the apollo compiler" (the preferred version of GCC could be called cc,
+    # or whatever), but I'm not sure leaving CC as cc is any better...
+    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
+    tentative_cc=gcc
+    host_makefile_frag="config/mh-a68bsd"
+    ;;
+  m88k-dg-dgux*)
+    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+    host_makefile_frag="config/mh-dgux"
+    ;;
+  m88k-harris-cxux*)
+    # Under CX/UX, we want to tell the compiler to use ANSI mode.
+    tentative_cc="cc -Xa"
+    host_makefile_frag="config/mh-cxux"
+    ;;
+  m88k-motorola-sysv*)
+    host_makefile_frag="config/mh-delta88"
+    ;;
+  mips*-dec-ultrix*)
+    tentative_cc="cc -Wf,-XNg1000"
+    host_makefile_frag="config/mh-decstation"
+    ;;
+  mips*-nec-sysv4*)
+    # The C compiler on NEC MIPS SVR4 needs bigger tables.
+    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
+    host_makefile_frag="config/mh-necv4"
+    ;;
+  mips*-sgi-irix6*)
+    host_makefile_frag="config/mh-irix6"
+    ;;
+  mips*-sgi-irix5*)
+    host_makefile_frag="config/mh-irix5"
+    ;;
+  mips*-sgi-irix4*)
+    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
+    # environment.  Also bump switch table size so that cp-parse will
+    # compile.  Bump string length limit so linker builds.
+    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
+    ;;
+  mips*-sgi-irix3*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
+  mips*-*-sysv4*)
+    host_makefile_frag="config/mh-sysv4"
+    ;;
+  mips*-*-sysv*)
+    # This is for a MIPS running RISC/os 4.52C.
+
+    # This is needed for GDB, but needs to be in the top-level make because
+    # if a library is compiled with the bsd headers and gets linked with the
+    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
+    # a different size).
+    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
+    # known except to select the sysv environment.  Could we use /proc instead?
+    # These "sysv environments" and "bsd environments" often end up being a pain.
+    #
+    # This is not part of CFLAGS because perhaps not all C compilers have this
+    # option.
+    tentative_cc="cc -systype sysv"
+    host_makefile_frag="config/mh-riscos"
+    ;;
+  i370-ibm-opened*)
+    tentative_cc="c89"
+    host_makefile_frag="config/mh-openedition"
+    ;;
+  i[3456]86-*-sysv5*)
+    host_makefile_frag="config/mh-sysv5"
+    ;;
+  i[3456]86-*-dgux*)
+    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
+    host_makefile_frag="config/mh-dgux386"
+    ;;
+  i[3456]86-ncr-sysv4.3*)
+    # The MetaWare compiler will generate a copyright message unless you
+    # turn it off by adding the -Hnocopyr flag.
+    tentative_cc="cc -Hnocopyr"
+    host_makefile_frag="config/mh-ncrsvr43"
+    ;;
+  i[3456]86-ncr-sysv4*)
+    # for an NCR 3000 (i486/SVR4) system.
+    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
+    # This compiler not only emits obnoxious copyright messages every time
+    # you run it, but it chokes and dies on a whole bunch of GNU source
+    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
+    tentative_cc="/usr/ccs/ATT/cc"
+    host_makefile_frag="config/mh-ncr3000"
+    ;;
+  i[3456]86-*-sco3.2v5*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
+  i[3456]86-*-sco*)
+    # The native C compiler botches some simple uses of const.  Unfortunately,
+    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
+    tentative_cc="cc -Dconst="
+    host_makefile_frag="config/mh-sco"
+    ;;
+  i[3456]86-*-udk*)
+    host_makefile_frag="config/mh-sysv5"
+    ;;
+  i[3456]86-*-isc*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
+  i[3456]86-*-solaris2*)
+    host_makefile_frag="config/mh-sysv4"
+    ;;
+  i[3456]86-*-aix*)
+    host_makefile_frag="config/mh-aix386"
+    ;;
+  i[3456]86-*-msdosdjgpp*)
+    host_makefile_frag="config/mh-djgpp"
+    ;;
+  *-cygwin*)
+    host_makefile_frag="config/mh-cygwin"
+    ;;
+  *-mingw32*)
+    host_makefile_frag="config/mh-mingw32"
+    ;;
+  *-interix*)
+    host_makefile_frag="config/mh-interix"
+    ;;
+  vax-*-ultrix2*)
+    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
+    tentative_cc=gcc
+    ;;
+  *-*-solaris2*)
+    host_makefile_frag="config/mh-solaris"
+    ;;
+  m68k-sun-sunos*)
+    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
+    # without overflowing the jump tables (-J says to use a 32 bit table)
+    tentative_cc="cc -J"
+    ;;
+  *-hp-hpux[78]*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux8"
+    ;;
+  *-hp-hpux*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux"
+    ;;
+  *-*-hiux*)
+    tentative_cc="cc -Wp,-H256000"
+    host_makefile_frag="config/mh-hpux"
+    ;;
+  rs6000-*-lynxos*)
+    # /bin/cc is less than useful for our purposes.  Always use GCC
+    tentative_cc="/usr/cygnus/progressive/bin/gcc"
+    host_makefile_frag="config/mh-lynxrs6k"
+    ;;
+  *-*-lynxos*)
+    # /bin/cc is less than useful for our purposes.  Always use GCC
+    tentative_cc="/bin/gcc"
+    ;;
+  *-*-sysv4*)
+    host_makefile_frag="config/mh-sysv4"
+    ;;
+  *-*-sysv*)
+    host_makefile_frag="config/mh-sysv"
+    ;;
+esac
+fi
+
+rm -f mh-frag
+if test -n "${host_makefile_frag}" ; then
+  for f in ${host_makefile_frag}
+  do
+    cat ${srcdir}/$f >> mh-frag
+  done
+  host_makefile_frag=mh-frag
+fi
+
+# If we aren't going to be using gcc, see if we can extract a definition
+# of CC from the fragment.
+# Actually, use the 'pre-extracted' version above.
+if test -z "${CC}" && test "${build}" = "${host}" ; then
+  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
+  found=
+  for dir in $PATH; do
+    test -z "$dir" && dir=.
+    if test -f $dir/gcc; then
+      found=yes
+      break
+    fi
+  done
+  IFS="$save_ifs"
+  if test -z "${found}" && test -n "${tentative_cc}" ; then
+    CC=$tentative_cc
+  fi
+fi
+
+case "${target}" in
+  v810*)
+    target_makefile_frag="config/mt-v810"
+    ;;
+  i[3456]86-*-netware*)
+    target_makefile_frag="config/mt-netware"
+    ;;
+  powerpc-*-netware*)
+    target_makefile_frag="config/mt-netware"
+    ;;
+  *-*-linux*)
+    target_makefile_frag="config/mt-linux"
+    ;;
+  *-*-aix4.[3456789]* | *-*-aix[56789].*)
+    target_makefile_frag="config/mt-aix43"
+    ;;
+  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
+    target_makefile_frag="config/mt-wince"
+    ;;
+esac
+
+alphaieee_frag=
+case $target in
+  alpha*-*-*)
+    # This just makes sure to use the -mieee option to build target libs.
+    # This should probably be set individually by each library.
+    alphaieee_frag="config/mt-alphaieee"
+    ;;
+esac
+
+# If --enable-target-optspace always use -Os instead of -O2 to build
+# the target libraries, similarly if it is not specified, use -Os
+# on selected platforms.
+ospace_frag=
+case "${enable_target_optspace}:${target}" in
+  yes:*)
+    ospace_frag="config/mt-ospace"
+    ;;
+  :d30v-*)
+    ospace_frag="config/mt-d30v"
+    ;;
+  :m32r-* | :d10v-* | :fr30-*)
+    ospace_frag="config/mt-ospace"
+    ;;
+  no:* | :*)
+    ;;
+  *)
+    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
+    ;;
+esac
+
+rm -f mt-frag
+if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then
+  for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag}
+  do
+    cat ${srcdir}/$f >> mt-frag
+  done
+  target_makefile_frag=mt-frag
+fi
+
 # Set with_gnu_as and with_gnu_ld as appropriate.
 #
 # This is done by determining whether or not the appropriate directory
@@ -1276,47 +1219,67 @@
 # want to do that, then you should use the --without-gnu-as and
 # --without-gnu-ld options for the configure script.
 
-if test x${use_gnu_as} = x ; then
-  if test x${with_gnu_as} != xno && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && test -d ${srcdir}/${gasdir} ; then
-    with_gnu_as=yes
-    withoptions="$withoptions --with-gnu-as"
-  fi
+if test x${use_gnu_as} = x &&
+   echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
+  with_gnu_as=yes
+  withoptions="$withoptions --with-gnu-as"
 fi
 
-if test x${use_gnu_ld} = x ; then
-  if test x${with_gnu_ld} != xno && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && test -d ${srcdir}/ld ; then
-    with_gnu_ld=yes
-    withoptions="$withoptions --with-gnu-ld"
-  fi
+if test x${use_gnu_ld} = x &&
+   echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
+  with_gnu_ld=yes
+  withoptions="$withoptions --with-gnu-ld"
 fi
 
 # If using newlib, add --with-newlib to the withoptions so that gcc/configure
 # can detect this case.
 
-if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
+if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
   with_newlib=yes
   withoptions="$withoptions --with-newlib"
 fi
 
-rm -f mt-frag
-if test -n "${target_makefile_frag}" ; then
-  for f in ${target_makefile_frag}
-  do
-    cat ${srcdir}/$f >> mt-frag
-  done
-  target_makefile_frag=mt-frag
+# We default to --with-shared on platforms where -fpic is meaningless.
+# Well, we don't yet, but we will.
+if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
+  case "${target}" in
+    alpha*-dec-osf*)	enable_shared=yes ;;
+    alpha*-*-linux*)	enable_shared=yes ;;
+    mips-sgi-irix5*)	enable_shared=yes ;;
+    *)			enable_shared=no ;;
+  esac
 fi
 
-case "$host" in
-  *msdosdjgpp*)
-    enable_gdbtk=no ;;
+case "${enable_shared}" in
+  yes) shared=yes ;;
+  no) shared=no ;;
+  "") shared=no ;;
+  *) shared=yes ;;
 esac
-# Determine whether gdb needs tk/tcl or not.
-case "$enable_gdbtk" in
-  no)
-    GDB_TK="" ;;
-  *)
-    GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;;
+
+
+# Default to using --with-stabs for certain targets.
+if test x${with_stabs} = x ; then
+  case "${target}" in
+  mips*-*-irix6*o32)
+    with_stabs=yes;
+    withoptions="${withoptions} --with-stabs"
+    ;;
+  mips*-*-irix6*)
+    ;;
+  mips*-*-* | alpha*-*-osf*)
+    with_stabs=yes;
+    withoptions="${withoptions} --with-stabs"
+    ;;
+  esac
+fi
+
+# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
+# them automatically.
+case "${host}" in
+  hppa*64*-*-hpux11*)	
+    withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
+    ;;
 esac
 
 # post-target:
@@ -1452,9 +1415,9 @@
 fi
 if test x${gxx_include_dir} = x; then
   if test x${enable_version_specific_runtime_libs} = xyes; then
-    gxx_include_dir='${libsubdir}/include/g++'
+    gxx_include_dir='${libsubdir}/include/c++'
   else
-    . ${topsrcdir}/config.if
+    . ${srcdir}/config.if
     gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
   fi
 else
@@ -1462,10 +1425,7 @@
 fi
 
 FLAGS_FOR_TARGET=
-case " $skipdirs " in
-*" target-newlib "*) ;;
-*)
- case " $target_configdirs " in
+case " $target_configdirs " in
  *" newlib "*)
   case " $targargs " in
   *" --with-newlib "*)
@@ -1475,7 +1435,7 @@
    esac
 
    # If we're not building GCC, don't discard standard headers.
-   if test -d ${topsrcdir}/gcc; then
+   if test -d ${srcdir}/gcc; then
      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
 
      if test "${build}" != "${host}"; then
@@ -1513,29 +1473,26 @@
    ;;
   esac
   ;;
- esac
- ;;
 esac
 
 # On Canadian crosses, we'll be searching the right directories for
 # the previously-installed cross compiler, so don't bother to add
 # flags for directories within the install tree of the compiler
 # being built; programs in there won't even run.
-if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
+if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
   # Search for pre-installed headers if nothing else fits.
   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
 fi
 
-if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
-   echo " ${configdirs} " | grep " ld " > /dev/null &&
-   test -d ${srcdir}/ld; then
+if test "x${use_gnu_ld}" = x &&
+   echo " ${configdirs} " | grep " ld " > /dev/null ; then
   # Arrange for us to find uninstalled linker scripts.
   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
 fi
 
 if test "x${CC_FOR_TARGET+set}" = xset; then
   :
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
   CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
 elif test "$host" = "$target"; then
   CC_FOR_TARGET='$(CC)'
@@ -1551,7 +1508,7 @@
 
 if test "x${GCJ_FOR_TARGET+set}" = xset; then
   :
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
   GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
 elif test "$host" = "$target"; then
   GCJ_FOR_TARGET='gcj'
@@ -1563,9 +1520,12 @@
 *) GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
 esac
 
+# Don't use libstdc++-v3's flags to configure/build itself.
+libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+
 if test "x${CXX_FOR_TARGET+set}" = xset; then
   :
-elif test -d ${topsrcdir}/gcc; then
+elif test -d ${srcdir}/gcc; then
   # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
   # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
   # default whereas gcc does not.
@@ -1594,10 +1554,10 @@
 s:^TARGET_CONFIGDIRS[ 	]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
 s%^TARGET_CONFIGARGS[ 	]*=.*$%TARGET_CONFIGARGS = ${targargs}%
 s%^FLAGS_FOR_TARGET[ 	]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
-s%^CC_FOR_TARGET[ 	]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%
-s%^GCJ_FOR_TARGET[      ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}%
-s%^CXX_FOR_TARGET[ 	]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%
-s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ 	]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%
+s%^CC_FOR_TARGET[ 	]*=.*$%CC_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
+s%^GCJ_FOR_TARGET[      ]*=.*$%GCJ_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
+s%^CXX_FOR_TARGET[ 	]*=.*$%CXX_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
+s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ 	]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = \$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
 s%^TARGET_SUBDIR[ 	]*=.*$%TARGET_SUBDIR = ${target_subdir}%
 s%^BUILD_SUBDIR[ 	]*=.*$%BUILD_SUBDIR = ${build_subdir}%
 s%^BUILD_CONFIGARGS[ 	]*=.*$%BUILD_CONFIGARGS = ${buildargs}%
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
new file mode 100644
index 0000000..4a0de85
--- /dev/null
+++ b/contrib/ChangeLog
@@ -0,0 +1,7 @@
+2002-07-03  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* ChangeLog: Newly created.
+	* texi2pod.pl: Imported from FSF GCC sources.
+	
+	
+
diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl
new file mode 100755
index 0000000..e5560f3
--- /dev/null
+++ b/contrib/texi2pod.pl
@@ -0,0 +1,431 @@
+#! /usr/bin/perl -w
+
+#   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This file is part of GNU CC.
+
+# GNU CC 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.
+
+# GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+# the Free Software Foundation, 59 Temple Place - Suite 330,
+# Boston MA 02111-1307, USA.
+
+# This does trivial (and I mean _trivial_) conversion of Texinfo
+# markup to Perl POD format.  It's intended to be used to extract
+# something suitable for a manpage from a Texinfo document.
+
+$output = 0;
+$skipping = 0;
+%sects = ();
+$section = "";
+@icstack = ();
+@endwstack = ();
+@skstack = ();
+@instack = ();
+$shift = "";
+%defs = ();
+$fnno = 1;
+$inf = "";
+$ibase = "";
+
+while ($_ = shift) {
+    if (/^-D(.*)$/) {
+	if ($1 ne "") {
+	    $flag = $1;
+	} else {
+	    $flag = shift;
+	}
+	$value = "";
+	($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
+	die "no flag specified for -D\n"
+	    unless $flag ne "";
+	die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
+	    unless $flag =~ /^[a-zA-Z0-9_-]+$/;
+	$defs{$flag} = $value;
+    } elsif (/^-/) {
+	usage();
+    } else {
+	$in = $_, next unless defined $in;
+	$out = $_, next unless defined $out;
+	usage();
+    }
+}
+
+if (defined $in) {
+    $inf = gensym();
+    open($inf, "<$in") or die "opening \"$in\": $!\n";
+    $ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
+} else {
+    $inf = \*STDIN;
+}
+
+if (defined $out) {
+    open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
+}
+
+while(defined $inf) {
+while(<$inf>) {
+    # Certain commands are discarded without further processing.
+    /^\@(?:
+	 [a-z]+index		# @*index: useful only in complete manual
+	 |need			# @need: useful only in printed manual
+	 |(?:end\s+)?group	# @group .. @end group: ditto
+	 |page			# @page: ditto
+	 |node			# @node: useful only in .info file
+	 |(?:end\s+)?ifnottex   # @ifnottex .. @end ifnottex: use contents
+	)\b/x and next;
+
+    chomp;
+
+    # Look for filename and title markers.
+    /^\@setfilename\s+([^.]+)/ and $fn = $1, next;
+    /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
+
+    # Identify a man title but keep only the one we are interested in.
+    /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
+	if (exists $defs{$1}) {
+	    $fn = $1;
+	    $tl = postprocess($2);
+	}
+	next;
+    };
+
+    # Look for blocks surrounded by @c man begin SECTION ... @c man end.
+    # This really oughta be @ifman ... @end ifman and the like, but such
+    # would require rev'ing all other Texinfo translators.
+    /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
+	$output = 1 if exists $defs{$2};
+        $sect = $1;
+	next;
+    };
+    /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
+    /^\@c\s+man\s+end/ and do {
+	$sects{$sect} = "" unless exists $sects{$sect};
+	$sects{$sect} .= postprocess($section);
+	$section = "";
+	$output = 0;
+	next;
+    };
+
+    # handle variables
+    /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
+	$defs{$1} = $2;
+	next;
+    };
+    /^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
+	delete $defs{$1};
+	next;
+    };
+
+    next unless $output;
+
+    # Discard comments.  (Can't do it above, because then we'd never see
+    # @c man lines.)
+    /^\@c\b/ and next;
+
+    # End-block handler goes up here because it needs to operate even
+    # if we are skipping.
+    /^\@end\s+([a-z]+)/ and do {
+	# Ignore @end foo, where foo is not an operation which may
+	# cause us to skip, if we are presently skipping.
+	my $ended = $1;
+	next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
+
+	die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
+	die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
+
+	$endw = pop @endwstack;
+
+	if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
+	    $skipping = pop @skstack;
+	    next;
+	} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
+	    $shift = "";
+	    $_ = "";	# need a paragraph break
+	} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
+	    $_ = "\n=back\n";
+	    $ic = pop @icstack;
+	} else {
+	    die "unknown command \@end $ended at line $.\n";
+	}
+    };
+
+    # We must handle commands which can cause skipping even while we
+    # are skipping, otherwise we will not process nested conditionals
+    # correctly.
+    /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do {
+	push @endwstack, $endw;
+	push @skstack, $skipping;
+	$endw = "ifset";
+	$skipping = 1 unless exists $defs{$1};
+	next;
+    };
+
+    /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do {
+	push @endwstack, $endw;
+	push @skstack, $skipping;
+	$endw = "ifclear";
+	$skipping = 1 if exists $defs{$1};
+	next;
+    };
+
+    /^\@(ignore|menu|iftex)\b/ and do {
+	push @endwstack, $endw;
+	push @skstack, $skipping;
+	$endw = $1;
+	$skipping = 1;
+	next;
+    };
+
+    next if $skipping;
+
+    # Character entities.  First the ones that can be replaced by raw text
+    # or discarded outright:
+    s/\@copyright\{\}/(c)/g;
+    s/\@dots\{\}/.../g;
+    s/\@enddots\{\}/..../g;
+    s/\@([.!? ])/$1/g;
+    s/\@[:-]//g;
+    s/\@bullet(?:\{\})?/*/g;
+    s/\@TeX\{\}/TeX/g;
+    s/\@pounds\{\}/\#/g;
+    s/\@minus(?:\{\})?/-/g;
+    s/\\,/,/g;
+
+    # Now the ones that have to be replaced by special escapes
+    # (which will be turned back into text by unmunge())
+    s/&/&amp;/g;
+    s/\@\{/&lbrace;/g;
+    s/\@\}/&rbrace;/g;
+    s/\@\@/&at;/g;
+
+    # Inside a verbatim block, handle @var specially.
+    if ($shift ne "") {
+	s/\@var\{([^\}]*)\}/<$1>/g;
+    }
+
+    # POD doesn't interpret E<> inside a verbatim block.
+    if ($shift eq "") {
+	s/</&lt;/g;
+	s/>/&gt;/g;
+    } else {
+	s/</&LT;/g;
+	s/>/&GT;/g;
+    }
+
+    # Single line command handlers.
+
+    /^\@include\s+(.+)$/ and do {
+	push @instack, $inf;
+	$inf = gensym();
+
+	# Try cwd and $ibase.
+	open($inf, "<" . $1) 
+	    or open($inf, "<" . $ibase . "/" . $1)
+		or die "cannot open $1 or $ibase/$1: $!\n";
+	next;
+    };
+
+    /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+	and $_ = "\n=head2 $1\n";
+    /^\@subsection\s+(.+)$/
+	and $_ = "\n=head3 $1\n";
+
+    # Block command handlers:
+    /^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
+	push @endwstack, $endw;
+	push @icstack, $ic;
+	$ic = $1;
+	$_ = "\n=over 4\n";
+	$endw = "itemize";
+    };
+
+    /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
+	push @endwstack, $endw;
+	push @icstack, $ic;
+	if (defined $1) {
+	    $ic = $1 . ".";
+	} else {
+	    $ic = "1.";
+	}
+	$_ = "\n=over 4\n";
+	$endw = "enumerate";
+    };
+
+    /^\@([fv]?table)\s+(\@[a-z]+)/ and do {
+	push @endwstack, $endw;
+	push @icstack, $ic;
+	$endw = $1;
+	$ic = $2;
+	$ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
+	$ic =~ s/\@(?:code|kbd)/C/;
+	$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
+	$ic =~ s/\@(?:file)/F/;
+	$_ = "\n=over 4\n";
+    };
+
+    /^\@((?:small)?example|display)/ and do {
+	push @endwstack, $endw;
+	$endw = $1;
+	$shift = "\t";
+	$_ = "";	# need a paragraph break
+    };
+
+    /^\@itemx?\s*(.+)?$/ and do {
+	if (defined $1) {
+	    # Entity escapes prevent munging by the <> processing below.
+	    $_ = "\n=item $ic\&LT;$1\&GT;\n";
+	} else {
+	    $_ = "\n=item $ic\n";
+	    $ic =~ y/A-Ya-y/B-Zb-z/;
+	    $ic =~ s/(\d+)/$1 + 1/eg;
+	}
+    };
+
+    $section .= $shift.$_."\n";
+}
+# End of current file.
+close($inf);
+$inf = pop @instack;
+}
+
+die "No filename or title\n" unless defined $fn && defined $tl;
+
+$sects{NAME} = "$fn \- $tl\n";
+$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
+
+for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
+	      BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
+    if(exists $sects{$sect}) {
+	$head = $sect;
+	$head =~ s/SEEALSO/SEE ALSO/;
+	print "=head1 $head\n\n";
+	print scalar unmunge ($sects{$sect});
+	print "\n";
+    }
+}
+
+sub usage
+{
+    die "usage: $0 [-D toggle...] [infile [outfile]]\n";
+}
+
+sub postprocess
+{
+    local $_ = $_[0];
+
+    # @value{foo} is replaced by whatever 'foo' is defined as.
+    while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
+	if (! exists $defs{$2}) {
+	    print STDERR "Option $2 not defined\n";
+	    s/\Q$1\E//;
+	} else {
+	    $value = $defs{$2};
+	    s/\Q$1\E/$value/;
+	}
+    }
+
+    # Formatting commands.
+    # Temporary escape for @r.
+    s/\@r\{([^\}]*)\}/R<$1>/g;
+    s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
+    s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
+    s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
+    s/\@sc\{([^\}]*)\}/\U$1/g;
+    s/\@file\{([^\}]*)\}/F<$1>/g;
+    s/\@w\{([^\}]*)\}/S<$1>/g;
+    s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
+
+    # Cross references are thrown away, as are @noindent and @refill.
+    # (@noindent is impossible in .pod, and @refill is unnecessary.)
+    # @* is also impossible in .pod; we discard it and any newline that
+    # follows it.  Similarly, our macro @gol must be discarded.
+
+    s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
+    s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
+    s/;\s+\@pxref\{(?:[^\}]*)\}//g;
+    s/\@noindent\s*//g;
+    s/\@refill//g;
+    s/\@gol//g;
+    s/\@\*\s*\n?//g;
+
+    # @uref can take one, two, or three arguments, with different
+    # semantics each time.  @url and @email are just like @uref with
+    # one argument, for our purposes.
+    s/\@(?:uref|url|email)\{([^\},]*)\}/&lt;B<$1>&gt;/g;
+    s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
+    s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
+
+    # Un-escape <> at this point.
+    s/&LT;/</g;
+    s/&GT;/>/g;
+
+    # Now un-nest all B<>, I<>, R<>.  Theoretically we could have
+    # indefinitely deep nesting; in practice, one level suffices.
+    1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1</g;
+
+    # Replace R<...> with bare ...; eliminate empty markup, B<>;
+    # shift white space at the ends of [BI]<...> expressions outside
+    # the expression.
+    s/R<([^<>]*)>/$1/g;
+    s/[BI]<>//g;
+    s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g;
+    s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g;
+
+    # Extract footnotes.  This has to be done after all other
+    # processing because otherwise the regexp will choke on formatting
+    # inside @footnote.
+    while (/\@footnote/g) {
+	s/\@footnote\{([^\}]+)\}/[$fnno]/;
+	add_footnote($1, $fnno);
+	$fnno++;
+    }
+
+    return $_;
+}
+
+sub unmunge
+{
+    # Replace escaped symbols with their equivalents.
+    local $_ = $_[0];
+
+    s/&lt;/E<lt>/g;
+    s/&gt;/E<gt>/g;
+    s/&lbrace;/\{/g;
+    s/&rbrace;/\}/g;
+    s/&at;/\@/g;
+    s/&amp;/&/g;
+    return $_;
+}
+
+sub add_footnote
+{
+    unless (exists $sects{FOOTNOTES}) {
+	$sects{FOOTNOTES} = "\n=over 4\n\n";
+    }
+
+    $sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
+    $sects{FOOTNOTES} .= $_[0];
+    $sects{FOOTNOTES} .= "\n\n";
+}
+
+# stolen from Symbol.pm
+{
+    my $genseq = 0;
+    sub gensym
+    {
+	my $name = "GEN" . $genseq++;
+	my $ref = \*{$name};
+	delete $::{$name};
+	return $ref;
+    }
+}
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 6b13bfd..debe735 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,31 @@
+2002-06-11  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	Import the following patches from the FSF GCC sources:
+	2002-03-25  Zack Weinberg  <zack@codesourcery.com>
+
+	* texi2pod.pl: Handle @end ftable and @end vtable.
+
+	2001-12-12  Matthias Klose  <doko@debian.org>
+
+	* texi2pod.pl: Merge changes from binutils' texi2pod.pl. Allows
+	generation of more than one man page from one source.
+	Add '-' to set of valid chars for an identifier.
+	Let -D option accept flags of the form <flag>=<value>.
+	Use \s+ for whitespace detection in '@c man' lines.
+	Handle @set and @clear independent of $output.
+	Substitute all @value{}'s in a line.
+
+	2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+	* texi2pod.pl: Handle @ifnottex, @iftex and @display.  Handle @var
+	in verbatim blocks specially.  Handle @unnumbered, @unnumberedsec
+	and @center.  Allow [a-z] after @enumerate.  Handle 0 and numbers
+	greater than 9 in enumerations.
+
+	2001-07-03  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+	* texi2pod.pl: Handle @r inside @item.
+
 2002-02-27  Andrew Cagney  <ac131313@redhat.com>
 
 	* fdl.texi: New file.
@@ -19,7 +47,7 @@
 
 	* add-log.el, add-log.vi: New files.
 
-Wed Jan 20 01:33:50 1999  Angela Marie Thomas (angela@cygnus.com)
+1999-01-20  Angela Marie Thomas (angela@cygnus.com)
 
 	* comp-tools-verify: Remove some checks that are no longer valid.
 
@@ -27,16 +55,16 @@
 
 	* targetdoc/fr30.texi: New document.
 	
-Thu Oct  1 21:15:59 1998  Angela Marie Thomas (angela@cygnus.com)
+1998-10-01  Angela Marie Thomas (angela@cygnus.com)
 
 	* comp-tools-fix, cross-tools-fix: Replace /usr/include
 	with ${FIXINCDIR}.
 
-Tue Aug 11 19:22:11 1998  Doug Evans  <devans@canuck.cygnus.com>
+1998-08-11  Doug Evans  <devans@canuck.cygnus.com>
 
 	* make-rel-sym-tree (version): Update calculation.
 
-Fri Jun 12 21:34:01 1998  Ian Lance Taylor  <ian@cygnus.com>
+1998-06-12  Ian Lance Taylor  <ian@cygnus.com>
 
 	* configure.texi: Various additions.
 	* Makefile.in (TEXI2HTML, DVIPS): New variables.
@@ -51,7 +79,7 @@
 	* configbuild.ein: New file (EPS version of configbuild.fig).
 	* configbuild.jin: New file (JPEG version of configbuild.fig).
 
-Wed Jun 10 14:41:25 1998  Ian Lance Taylor  <ian@cygnus.com>
+1998-06-10  Ian Lance Taylor  <ian@cygnus.com>
 
 	* configure.texi: New file.
 	* configdev.tin: New file.
diff --git a/etc/texi2pod.pl b/etc/texi2pod.pl
index e6ad9f9..bdc20e8 100644
--- a/etc/texi2pod.pl
+++ b/etc/texi2pod.pl
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 
-#   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+#   Copyright (C) 1999, 2000, 2001, 200 Free Software Foundation, Inc.
 
 # This file is part of GNU CC.
 
@@ -30,9 +30,12 @@
 @icstack = ();
 @endwstack = ();
 @skstack = ();
+@instack = ();
 $shift = "";
 %defs = ();
 $fnno = 1;
+$inf = "";
+$ibase = "";
 
 while ($_ = shift) {
     if (/^-D(.*)$/) {
@@ -41,15 +44,13 @@
 	} else {
 	    $flag = shift;
 	}
-	$value=$flag;
-	$value =~ s,^[a-zA-Z0-9_]+,,;
-	$value =~ s,.*=,,;
-	$flag =~ s,=.*$,,;
+	$value = "";
+	($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/);
 	die "no flag specified for -D\n"
 	    unless $flag ne "";
-	#print STDERR "FL = $flag, V = $value\n";
+	die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
+	    unless $flag =~ /^[a-zA-Z0-9_-]+$/;
 	$defs{$flag} = $value;
-
     } elsif (/^-/) {
 	usage();
     } else {
@@ -60,14 +61,19 @@
 }
 
 if (defined $in) {
-    open(STDIN, $in) or die "opening \"$in\": $!\n";
+    $inf = gensym();
+    open($inf, "<$in") or die "opening \"$in\": $!\n";
+    $ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
+} else {
+    $inf = \*STDIN;
 }
+
 if (defined $out) {
     open(STDOUT, ">$out") or die "opening \"$out\": $!\n";
 }
 
-while(<STDIN>)
-{
+while(defined $inf) {
+while(<$inf>) {
     # Certain commands are discarded without further processing.
     /^\@(?:
 	 [a-z]+index		# @*index: useful only in complete manual
@@ -75,8 +81,9 @@
 	 |(?:end\s+)?group	# @group .. @end group: ditto
 	 |page			# @page: ditto
 	 |node			# @node: useful only in .info file
+	 |(?:end\s+)?ifnottex   # @ifnottex .. @end ifnottex: use contents
 	)\b/x and next;
-    
+
     chomp;
 
     # Look for filename and title markers.
@@ -84,7 +91,7 @@
     /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next;
 
     # Identify a man title but keep only the one we are interested in.
-    /^\@c man title ([A-Za-z0-9]+) (.+)/ and do {
+    /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do {
 	if (exists $defs{$1}) {
 	    $fn = $1;
 	    $tl = postprocess($2);
@@ -95,19 +102,30 @@
     # Look for blocks surrounded by @c man begin SECTION ... @c man end.
     # This really oughta be @ifman ... @end ifman and the like, but such
     # would require rev'ing all other Texinfo translators.
-    /^\@c man begin ([A-Z]+) ([A-Za-z0-9]+)/ and do {
+    /^\@c\s+man\s+begin\s+([A-Z]+)\s+([A-Za-z0-9-]+)/ and do {
 	$output = 1 if exists $defs{$2};
         $sect = $1;
 	next;
     };
-    /^\@c man begin ([A-Z]+)/ and $sect = $1, $output = 1, next;
-    /^\@c man end/ and do {
+    /^\@c\s+man\s+begin\s+([A-Z]+)/ and $sect = $1, $output = 1, next;
+    /^\@c\s+man\s+end/ and do {
 	$sects{$sect} = "" unless exists $sects{$sect};
 	$sects{$sect} .= postprocess($section);
 	$section = "";
 	$output = 0;
 	next;
     };
+
+    # handle variables
+    /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
+	$defs{$1} = $2;
+	next;
+    };
+    /^\@clear\s+([a-zA-Z0-9_-]+)/ and do {
+	delete $defs{$1};
+	next;
+    };
+
     next unless $output;
 
     # Discard comments.  (Can't do it above, because then we'd never see
@@ -120,20 +138,20 @@
 	# Ignore @end foo, where foo is not an operation which may
 	# cause us to skip, if we are presently skipping.
 	my $ended = $1;
-	next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu)$/;
+	next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
 
 	die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
 	die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
 
 	$endw = pop @endwstack;
 
-	if ($ended =~ /^(?:ifset|ifclear|ignore|menu)$/) {
+	if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
 	    $skipping = pop @skstack;
 	    next;
-	} elsif ($ended =~ /^(?:example|smallexample)$/) {
+	} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
 	    $shift = "";
 	    $_ = "";	# need a paragraph break
-	} elsif ($ended =~ /^(?:itemize|enumerate|table)$/) {
+	} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
 	    $_ = "\n=back\n";
 	    $ic = pop @icstack;
 	} else {
@@ -160,7 +178,7 @@
 	next;
     };
 
-    /^\@(ignore|menu)\b/ and do {
+    /^\@(ignore|menu|iftex)\b/ and do {
 	push @endwstack, $endw;
 	push @skstack, $skipping;
 	$endw = $1;
@@ -189,6 +207,12 @@
     s/\@\{/&lbrace;/g;
     s/\@\}/&rbrace;/g;
     s/\@\@/&at;/g;
+
+    # Inside a verbatim block, handle @var specially.
+    if ($shift ne "") {
+	s/\@var\{([^\}]*)\}/<$1>/g;
+    }
+
     # POD doesn't interpret E<> inside a verbatim block.
     if ($shift eq "") {
 	s/</&lt;/g;
@@ -199,11 +223,22 @@
     }
 
     # Single line command handlers.
-    /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and $defs{$1} = $2, next;
-    /^\@clear\s+([a-zA-Z0-9_-]+)/ and delete $defs{$1}, next;
 
-    /^\@section\s+(.+)$/ and $_ = "\n=head2 $1\n";
-    /^\@subsection\s+(.+)$/ and $_ = "\n=head3 $1\n";
+    /^\@include\s+(.+)$/ and do {
+	push @instack, $inf;
+	$inf = gensym();
+
+	# Try cwd and $ibase.
+	open($inf, "<" . $1) 
+	    or open($inf, "<" . $ibase . "/" . $1)
+		or die "cannot open $1 or $ibase/$1: $!\n";
+	next;
+    };
+
+    /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/
+	and $_ = "\n=head2 $1\n";
+    /^\@subsection\s+(.+)$/
+	and $_ = "\n=head3 $1\n";
 
     # Block command handlers:
     /^\@itemize\s+(\@[a-z]+|\*|-)/ and do {
@@ -214,7 +249,7 @@
 	$endw = "itemize";
     };
 
-    /^\@enumerate(?:\s+([A-Z0-9]+))?/ and do {
+    /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do {
 	push @endwstack, $endw;
 	push @icstack, $ic;
 	if (defined $1) {
@@ -226,19 +261,19 @@
 	$endw = "enumerate";
     };
 
-    /^\@table\s+(\@[a-z]+)/ and do {
+    /^\@([fv]?table)\s+(\@[a-z]+)/ and do {
 	push @endwstack, $endw;
 	push @icstack, $ic;
-	$ic = $1;
+	$endw = $1;
+	$ic = $2;
 	$ic =~ s/\@(?:samp|strong|key|gcctabopt|env)/B/;
 	$ic =~ s/\@(?:code|kbd)/C/;
 	$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
 	$ic =~ s/\@(?:file)/F/;
 	$_ = "\n=over 4\n";
-	$endw = "table";
     };
 
-    /^\@((?:small)?example)/ and do {
+    /^\@((?:small)?example|display)/ and do {
 	push @endwstack, $endw;
 	$endw = $1;
 	$shift = "\t";
@@ -251,12 +286,17 @@
 	    $_ = "\n=item $ic\&LT;$1\&GT;\n";
 	} else {
 	    $_ = "\n=item $ic\n";
-	    $ic =~ y/A-Ya-y1-8/B-Zb-z2-9/;
+	    $ic =~ y/A-Ya-y/B-Zb-z/;
+	    $ic =~ s/(\d+)/$1 + 1/eg;
 	}
     };
 
     $section .= $shift.$_."\n";
 }
+# End of current file.
+close($inf);
+$inf = pop @instack;
+}
 
 die "No filename or title\n" unless defined $fn && defined $tl;
 
@@ -284,13 +324,15 @@
     local $_ = $_[0];
 
     # @value{foo} is replaced by whatever 'foo' is defined as.
-    if (/\@value\{([a-zA-Z0-9_-]+)\}/) {
-	if (! exists $defs{$1}) {
-	    print STDERR "Option $1 not define\n";
+    while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) {
+	if (! exists $defs{$2}) {
+	    print STDERR "Option $2 not defined\n";
+	    s/\Q$1\E//;
+	} else {
+	    $value = $defs{$2};
+	    s/\Q$1\E/$value/;
 	}
-
     }
-    s/\@value\{([a-zA-Z0-9_-]+)\}/$defs{$1}/g;
 
     # Formatting commands.
     # Temporary escape for @r.
@@ -303,9 +345,6 @@
     s/\@w\{([^\}]*)\}/S<$1>/g;
     s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
 
-    # Handle @r inside bold.
-    1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B</g;
-
     # Cross references are thrown away, as are @noindent and @refill.
     # (@noindent is impossible in .pod, and @refill is unnecessary.)
     # @* is also impossible in .pod; we discard it and any newline that
@@ -327,9 +366,11 @@
     s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
 
     # Turn B<blah I<blah> blah> into B<blah> I<blah> B<blah> to
-    # match Texinfo semantics of @emph inside @samp.
+    # match Texinfo semantics of @emph inside @samp.  Also handle @r
+    # inside bold.
     s/&LT;/</g;
     s/&GT;/>/g;
+    1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B</g;
     1 while (s/B<([^<>]*)I<([^>]+)>/B<$1>I<$2>B</g);
     1 while (s/I<([^<>]*)B<([^>]+)>/I<$1>B<$2>I</g);
     s/[BI]<>//g;
@@ -372,4 +413,15 @@
     $sects{FOOTNOTES} .= $_[0];
     $sects{FOOTNOTES} .= "\n\n";
 }
-    
+
+# stolen from Symbol.pm
+{
+    my $genseq = 0;
+    sub gensym
+    {
+	my $name = "GEN" . $genseq++;
+	my $ref = \*{$name};
+	delete $::{$name};
+	return $ref;
+    }
+}
diff --git a/gdb/29k-share/README b/gdb/29k-share/README
deleted file mode 100644
index 5e19715..0000000
--- a/gdb/29k-share/README
+++ /dev/null
@@ -1,9 +0,0 @@
-The files in this directory are shared with other debuggers and
-debug interfaces that use Advanced Micro Devices' UDI (universal debug
-interface) protocol.  The protocol provides a common interface among
-debuggers, logic analyzers, emulators, and embedded systems that use
-AMD 29000 family processors.
-
-Do not change these files without coordinating with Advanced Micro
-Devices, Embedded Processor Division, 5204 E. Ben White Blvd, Austin, TX 78741.
-Maybe postmaster@cayman.amd.com can direct you to the current maintainers.
diff --git a/gdb/29k-share/udi/udi2go32.c b/gdb/29k-share/udi/udi2go32.c
deleted file mode 100644
index 63d98ae..0000000
--- a/gdb/29k-share/udi/udi2go32.c
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
-
-Interface from UDI calls in 32-bit mode to go32 in 16-bit mode. 
-Communication is done through a single interrupt vector, which passes
-data through two linear buffers. 
-
-Call:
-	AH  = 0xfe
-	AL  = UDI function number
-	ECX = IN length
-	ESI = pointer to IN buffer
-	EDI = pointer to OUT buffer
-
-Return:
-	EAX = return value of UDI function
-
-Vector:
-	0x21
-
-*/
-#ifdef __GO32__
-
-#include <stdlib.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-char dfe_errmsg[500];
-
-static char in_buffer[4096];
-static char out_buffer[4096];
-static char *in_ptr;
-static char *out_ptr;
-
-#define IN_INIT()		in_ptr = in_buffer
-#define IN_VAL(t,v)		*((t *)in_ptr)++ = v
-#define IN_DATA(ptr, cnt)	memcpy(in_ptr, ptr, cnt), in_ptr += cnt
-
-#define OUT_INIT()		out_ptr = out_buffer
-#define OUT_VAL(t)		(*((t *)out_ptr)++)
-#define OUT_DATA(ptr, cnt)	memcpy(ptr, out_ptr, cnt), out_ptr += cnt
-
-static int DO_CALL(int function)
-{
-  asm("pushl %esi");
-  asm("pushl %edi");
-  asm("movb %0, %%al" : : "g" (function));
-  asm("movl _in_ptr, %ecx");
-  asm("movl $_in_buffer, %esi");
-  asm("subl %esi, %ecx");
-  asm("movl $_out_buffer, %edi");
-  asm("movb $0xfe, %ah");
-  asm("int $0x21");
-  asm("popl %edi");
-  asm("popl %esi");
-}
-
-/*----------------------------------------------------------------------*/
-
-#ifdef TEST_UDI
-int main()
-{
-  int r;
-  long p2;
-  short p1;
-  IN_INIT();
-  IN_VAL(long, 11111111);
-  IN_VAL(short, 2222);
-  IN_DATA("Hello, world\n", 17);
-
-  r = DO_CALL(42);
-
-  OUT_INIT();
-  p1 = OUT_VAL(short);
-  p2 = OUT_VAL(long);
-  printf("main: p1=%d p2=%d rv=%d\n", p1, p2, r);
-  return r;
-}
-#endif
-
-/*----------------------------------------------------------------------*/
-
-unsupported(char *s)
-{
-  printf("unsupported UDI host call %s\n", s);
-  abort();
-}
-
-UDIError UDIConnect (
-  char		*Configuration,		/* In */
-  UDISessionId	*Session		/* Out */
-  )
-{
-  int r;
-  out_buffer[0] = 0; /* DJ - test */
-  IN_INIT();
-  IN_DATA(Configuration, strlen(Configuration)+1);
-  
-  r = DO_CALL(UDIConnect_c);
-
-  OUT_INIT();  
-  *Session = OUT_VAL(UDISessionId);
-  return r;
-}
-
-UDIError UDIDisconnect (
-  UDISessionId	Session,		/* In */
-  UDIBool	Terminate		/* In */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(UDISessionId, Session);
-  IN_VAL(UDIBool, Terminate);
-  
-  return DO_CALL(UDIDisconnect_c);
-}
-
-UDIError UDISetCurrentConnection (
-  UDISessionId	Session			/* In */
-  )
-{
-  IN_INIT();
-  IN_VAL(UDISessionId, Session);
-  
-  return DO_CALL(UDISetCurrentConnection_c);
-}
-
-UDIError UDICapabilities (
-  UDIUInt32	*TIPId,			/* Out */
-  UDIUInt32	*TargetId,		/* Out */
-  UDIUInt32	DFEId,			/* In */
-  UDIUInt32	DFE,			/* In */
-  UDIUInt32	*TIP,			/* Out */
-  UDIUInt32	*DFEIPCId,		/* Out */
-  UDIUInt32	*TIPIPCId,		/* Out */
-  char		*TIPString		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(UDIUInt32, DFEId);
-  IN_VAL(UDIUInt32, DFE);
-  r = DO_CALL(UDICapabilities_c);
-  OUT_INIT();
-  *TIPId = OUT_VAL(UDIUInt32);
-  *TargetId = OUT_VAL(UDIUInt32);
-  *TIP = OUT_VAL(UDIUInt32);
-  *DFEIPCId = OUT_VAL(UDIUInt32);
-  *TIPIPCId = OUT_VAL(UDIUInt32);
-  strcpy(TIPString, out_ptr);
-  return r;
-}
-
-UDIError UDIEnumerateTIPs (
-  UDIInt	(*UDIETCallback)	/* In */
-    ( char *Configuration )	/* In to callback() */
-  )
-{
-  UDIETCallback("montip.exe");
-}
-
-UDIError UDIGetErrorMsg (
-  UDIError	ErrorCode,		/* In */
-  UDISizeT	MsgSize,		/* In */
-  char		*Msg,			/* Out */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  if (MsgSize > 4000)
-    MsgSize = 4000;
-  IN_INIT();
-  IN_VAL(UDIError, ErrorCode);
-  IN_VAL(UDISizeT, MsgSize);
-  
-  r = DO_CALL(UDIGetErrorMsg_c);
-  
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  OUT_DATA(Msg, *CountDone);
-  return r;
-}
-
-UDIError UDIGetTargetConfig (
-  UDIMemoryRange KnownMemory[],		/* Out */
-  UDIInt	*NumberOfRanges,	/* In/Out */
-  UDIUInt32	ChipVersions[],		/* Out */
-  UDIInt	*NumberOfChips		/* In/Out */
-  )
-{
-  int r, i;
-  int nr = *NumberOfRanges;
-  int nc = *NumberOfChips;
-  IN_INIT();
-  IN_VAL(UDIInt, *NumberOfRanges);
-  IN_VAL(UDIInt, *NumberOfChips);
-  r = DO_CALL(UDIGetTargetConfig_c);
-  if (r == UDIErrorIncomplete)
-    return r;
-  OUT_INIT();
-  *NumberOfRanges = OUT_VAL(UDIInt);
-  *NumberOfChips = OUT_VAL(UDIInt);
-  for (i=0; i<nr; i++)
-  {
-    KnownMemory[i].Space = OUT_VAL(short);
-    KnownMemory[i].Offset = OUT_VAL(CPUOffset);
-    KnownMemory[i].Size = OUT_VAL(CPUSizeT);
-  }
-  for (i=0; i<nc; i++)
-  {
-    ChipVersions[i] = OUT_VAL(UDIUInt32);
-  }
-  return r;
-}
-
-UDIError UDICreateProcess (
-  UDIPId	*PId			/* Out */
-  )
-{
-  int r = DO_CALL(UDICreateProcess_c);
-
-  OUT_INIT();
-  *PId = OUT_VAL(UDIPId);
-
-  return r;
-}
-
-UDIError UDISetCurrentProcess (
-  UDIPId	PId			/* In */
-  )
-{
-  IN_INIT();
-  IN_VAL(UDIPId, PId);
-
-  return DO_CALL(UDISetCurrentProcess_c);
-}
-
-UDIError UDIDestroyProcess (
-  UDIPId	PId			/* In */
-  )
-{
-  IN_INIT();
-  IN_VAL(UDIPId, PId);
-
-  return DO_CALL(UDIDestroyProcess_c);
-}
-
-UDIError UDIInitializeProcess (
-  UDIMemoryRange ProcessMemory[],	/* In */
-  UDIInt	NumberOfRanges,		/* In */
-  UDIResource	EntryPoint,		/* In */
-  CPUSizeT	StackSizes[],		/* In */
-  UDIInt	NumberOfStacks,		/* In */
-  char		*ArgString		/* In */
-  )
-{
-  int i, r;
-  IN_INIT();
-  IN_VAL(UDIInt, NumberOfRanges);
-  for (i=0; i<NumberOfRanges; i++)
-  {
-    IN_VAL(short, ProcessMemory[i].Space);
-    IN_VAL(CPUOffset, ProcessMemory[i].Offset);
-    IN_VAL(CPUSizeT, ProcessMemory[i].Size);
-  }
-  IN_VAL(short, EntryPoint.Space);
-  IN_VAL(CPUOffset, EntryPoint.Offset);
-  IN_VAL(UDIInt, NumberOfStacks);
-  for (i=0; i<NumberOfStacks; i++)
-    IN_VAL(CPUSizeT, StackSizes[i]);
-  IN_DATA(ArgString, strlen(ArgString)+1);
-
-  return DO_CALL(UDIInitializeProcess_c);
-}
-
-UDIError UDIRead (
-  UDIResource	From,			/* In */
-  UDIHostMemPtr	To,			/* Out */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	HostEndian		/* In */
-  )
-{
-  int cleft = Count, cthis, dthis;
-  int cdone = 0, r, bsize=2048/Size;
-  
-  while (cleft)
-  {
-    cthis = (cleft<bsize) ? cleft : bsize;
-    IN_INIT();
-    IN_VAL(short, From.Space);
-    IN_VAL(CPUOffset, From.Offset);
-    IN_VAL(UDICount, cthis);
-    IN_VAL(UDISizeT, Size);
-    IN_VAL(UDIBool, HostEndian);
-
-    r = DO_CALL(UDIRead_c);
-
-    OUT_INIT();
-    dthis = OUT_VAL(UDICount);
-    OUT_DATA(To, dthis*Size);
-    cdone += dthis;
-    To += dthis*Size;
-
-    if (r != UDINoError)
-    {
-      *CountDone = cdone;
-      return r;
-    }
-    cleft -= cthis;
-  }
-  *CountDone = cdone;
-  return UDINoError;
-}
-
-UDIError UDIWrite (
-  UDIHostMemPtr	From,			/* In */
-  UDIResource	To,			/* In */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	HostEndian		/* In */
-  )
-{
-  int cleft = Count, cthis, dthis;
-  int cdone = 0, r, bsize=2048/Size;
-  
-  while (cleft)
-  {
-    cthis = (cleft<bsize) ? cleft : bsize;
-    IN_INIT();
-    IN_VAL(short, To.Space);
-    IN_VAL(CPUOffset, To.Offset);
-    IN_VAL(UDICount, cthis);
-    IN_VAL(UDISizeT, Size);
-    IN_VAL(UDIBool, HostEndian);
-    IN_DATA(From, cthis*Size);
-    From += cthis*Size;
-    
-    r = DO_CALL(UDIWrite_c);
-
-    OUT_INIT();
-    cdone += OUT_VAL(UDICount);
-
-    if (r != UDINoError)
-    {
-      *CountDone = cdone;
-      return r;
-    }
-    cleft -= cthis;
-  }
-  *CountDone = cdone;
-  return UDINoError;
-}
-
-UDIError UDICopy (
-  UDIResource	From,			/* In */
-  UDIResource	To,			/* In */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	Direction		/* In */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(short, From.Space);
-  IN_VAL(CPUOffset, From.Offset);
-  IN_VAL(short, To.Space);
-  IN_VAL(CPUOffset, To.Offset);
-  IN_VAL(UDICount, Count);
-  IN_VAL(UDISizeT, Size);
-  IN_VAL(UDIBool, Direction);
-  
-  r = DO_CALL(UDICopy_c);
-  
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDICount);
-  
-  return r;
-}
-
-UDIError UDIExecute (
-  void
-  )
-{
-  return DO_CALL(UDIExecute_c);
-}
-
-UDIError UDIStep (
-  UDIUInt32	Steps,			/* In */
-  UDIStepType   StepType,		/* In */
-  UDIRange      Range			/* In */
-  )
-{
-  IN_INIT();
-  IN_VAL(UDIUInt32, Steps);
-  IN_VAL(UDIStepType, StepType);
-  IN_VAL(UDIRange, Range);
-  
-  return DO_CALL(UDIStep_c);
-}
-
-UDIVoid UDIStop (
-  void
-  )
-{
-  DO_CALL(UDIStop_c);
-}
-
-UDIError UDIWait (
-  UDIInt32	MaxTime,		/* In */
-  UDIPId	*PId,			/* Out */
-  UDIUInt32	*StopReason		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(UDIInt32, MaxTime);
-  r = DO_CALL(UDIWait_c);
-  OUT_INIT();
-  *PId = OUT_VAL(UDIPId);
-  *StopReason = OUT_VAL(UDIUInt32);
-  return r;
-}
-
-UDIError UDISetBreakpoint (
-  UDIResource	Addr,			/* In */
-  UDIInt32	PassCount,		/* In */
-  UDIBreakType	Type,			/* In */
-  UDIBreakId	*BreakId		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(short, Addr.Space);
-  IN_VAL(CPUOffset, Addr.Offset);
-  IN_VAL(UDIInt32, PassCount);
-  IN_VAL(UDIBreakType, Type);
-  
-  r = DO_CALL(UDISetBreakpoint_c);
-  
-  OUT_INIT();
-  *BreakId = OUT_VAL(UDIBreakId);
-  return r;
-}
-
-UDIError UDIQueryBreakpoint (
-  UDIBreakId	BreakId,		/* In */
-  UDIResource	*Addr,			/* Out */
-  UDIInt32	*PassCount,		/* Out */
-  UDIBreakType	*Type,			/* Out */
-  UDIInt32	*CurrentCount		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  IN_VAL(UDIBreakId, BreakId);
-  
-  r = DO_CALL(UDIQueryBreakpoint_c);
-  
-  OUT_INIT();
-  Addr->Space = OUT_VAL(short);
-  Addr->Offset = OUT_VAL(CPUOffset);
-  *PassCount = OUT_VAL(UDIInt32);
-  *Type = OUT_VAL(UDIBreakType);
-  *CurrentCount = OUT_VAL(UDIInt32);
-  
-  return r;
-}
-
-UDIError UDIClearBreakpoint (
-  UDIBreakId	BreakId			/* In */
-  )
-{
-  IN_INIT();
-  IN_VAL(UDIBreakId, BreakId);
-  
-  return DO_CALL(UDIClearBreakpoint_c);
-}
-
-UDIError UDIGetStdout (
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  if (BufSize > 4000)
-    BufSize = 4000;
-  IN_VAL(UDISizeT,BufSize);
-  r = DO_CALL(UDIGetStdout_c);
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  if (*CountDone <= BufSize)
-    OUT_DATA(Buf, *CountDone);
-  return r;
-}
-
-UDIError UDIGetStderr (
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  if (BufSize > 4000)
-    BufSize = 4000;
-  IN_VAL(UDISizeT,BufSize);
-  r = DO_CALL(UDIGetStderr_c);
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  OUT_DATA(Buf, *CountDone);
-  return r;
-}
-
-UDIError UDIPutStdin (
-  UDIHostMemPtr	Buf,			/* In */
-  UDISizeT	Count,			/* In */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  if (Count > 4000)
-    Count = 4000;
-  IN_VAL(UDISizeT,Count);
-  IN_DATA(Buf, Count);
-  r = DO_CALL(UDIPutStdin_c);
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  return r;
-}
-
-UDIError UDIStdinMode (
-  UDIMode	*Mode			/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  r = DO_CALL(UDIStdinMode_c);
-  OUT_INIT();
-  *Mode = OUT_VAL(UDIMode);
-  return r;
-}
-
-UDIError UDIPutTrans (
-  UDIHostMemPtr	Buf,			/* In */
-  UDISizeT	Count,			/* In */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  if (Count > 4000)
-    Count = 4000;
-  IN_VAL(UDISizeT,Count);
-  IN_DATA(Buf, Count);
-  r = DO_CALL(UDIPutTrans_c);
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  return r;
-}
-
-UDIError UDIGetTrans (
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  if (BufSize > 4000)
-    BufSize = 4000;
-  IN_VAL(UDISizeT,BufSize);
-  r = DO_CALL(UDIGetTrans_c);
-  OUT_INIT();
-  *CountDone = OUT_VAL(UDISizeT);
-  OUT_DATA(Buf, *CountDone);
-  return r;
-}
-
-UDIError UDITransMode (
-  UDIMode	*Mode			/* Out */
-  )
-{
-  int r;
-  IN_INIT();
-  r = DO_CALL(UDITransMode_c);
-  OUT_INIT();
-  *Mode = OUT_VAL(UDIMode);
-  return r;
-}
-
-#define DFEIPCIdCompany 0x0001	/* Company ID AMD */
-#define DFEIPCIdProduct 0x1	/* Product ID 0 */
-#define DFEIPCIdVersion 0x125	/* 1.2.5 */
-
-unsigned UDIGetDFEIPCId ()
-{
-    return((((UDIUInt32)DFEIPCIdCompany) << 16) |(DFEIPCIdProduct << 12) | DFEIPCIdVersion);
-}
-
-#endif /* __GO32__ */
diff --git a/gdb/29k-share/udi/udiids.h b/gdb/29k-share/udi/udiids.h
deleted file mode 100644
index 5f805e4..0000000
--- a/gdb/29k-share/udi/udiids.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file contains the DFE and TIP IDs to be used by AMD products for
-   the UDICapabilities call.
-   
-   Copyright 1993 Free Software Foundation, Inc.
-   
-   This file is part of GDB.
-   
-   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.  */
-
-	/* Company Codes -- AMD assigns these */
-#define UDICompanyCode_AMD 1
-
-	/* Build a UDIID given a CompanyProdCode and 3 version pieces */
-#define UDIID(CompanyProdCode, v1,v2,v3) ((((CompanyProdCode) & 0xfffff)<<12)+\
-				  (((v1)&0xf)<<8) + (((v2)&0xf)<<4) + ((v3)&0xf)) 
-
-
-	/* Extract a CompanyProdCode or a Version from a UDIID */
-#define UDIID_CompanyProdCode(id) (((id)>>12) & 0xfffff)
-#define UDIID_Version(id) ((id)&0xfff)
-
-
-#define UDIAMDProduct(ProdCode) ((UDICompanyCode_AMD<<4) + (ProdCode&0xf))
-
-	/* AMD DFE Product Codes */
-#define UDIProductCode_Mondfe UDIAMDProduct(0)
-#define UDIProductCode_XRAY   UDIAMDProduct(1)
-#define UDIProductCode_TIPTester  UDIAMDProduct(2)
-
-	/* AMD TIP Product Codes (need not be distinct from DFE Product Codes) */
-#define UDIProductCode_Montip UDIAMDProduct(0)
-#define UDIProductCode_Isstip UDIAMDProduct(1)
-
-
-#define UDILatestVersion 0x120	/* UDI 1.2.0, can be used in DFE and TIP desired UDI params */
-
diff --git a/gdb/29k-share/udi/udip2soc.c b/gdb/29k-share/udi/udip2soc.c
deleted file mode 100644
index c8af3fe..0000000
--- a/gdb/29k-share/udi/udip2soc.c
+++ /dev/null
@@ -1,1250 +0,0 @@
-/* Copyright 1993, 1998 Free Software Foundation, Inc.
-   
-   This file is part of GDB.
-   
-   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.  */
-
-static 	char udip2soc_c[]="@(#)udip2soc.c	2.11  Daniel Mann";
-static  char udip2soc_c_AMD[]="@(#)udip2soc.c	2.8, AMD";
-/* 
-*       This module converts UDI Procedural calls into
-*	UDI socket messages for UNIX. 
-*	It is used by DFE client processes
-********************************************************************** HISTORY
-*/
-/* This is all unneeded on DOS machines.  */
-#ifndef __GO32__
-
-#include <stdio.h>
-#include <string.h>
-
-/* Before sys/file.h for Unixware.  */
-#include <sys/types.h>
-
-#include <sys/file.h>
-
-/* This used to say sys/fcntl.h, but the only systems I know of that
-   require that are old (pre-4.3, at least) BSD systems, which we
-   probably don't need to worry about.  */
-#include <fcntl.h>
-
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <signal.h>
-#include <sys/errno.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-extern	int		errno;
-extern	int		sys_nerr;
-extern	int		udr_errno;
-extern	char*		getenv();
-
-/* local type decs. and macro defs. not in a .h  file ************* MACRO/TYPE
-*/
-#define		version_c 0x121		/* DFE-IPC version id */
-#define		TRUE -1
-#define		FALSE 0
-#define		PORT_NUM 7000
-#define		MAX_SESSIONS 5		/* maximum DFE-TIP connections */
-#define		SOC_BUF_SIZE 4* 1024	/* size of socket comms buffer */
-#define		SBUF_SIZE 500		/* size of string buffer */
-#define		ERRMSG_SIZE 500		/* size of error message buffer */
-
-typedef struct connection_str		/* record of connect session */
-{
-    int		in_use;
-    char	connect_id[20];		/* connection identifier */
-    char	domain_string[20];	/* dommaing for conection */
-    char	tip_string[30];		/* TIP host name for AF_INET */
-    char	tip_exe[80];		/* TIP exe name */
-    int		dfe_sd;			/* associated DFE socket */
-    int		tip_pid;		/* pid of TIP process */
-    struct sockaddr_in dfe_sockaddr;
-    struct sockaddr_in tip_sockaddr_in;
-    struct sockaddr    tip_sockaddr;
-} connection_t;
-
-typedef struct session_str
-{
-    int		  in_use;
-    connection_t* soc_con_p;		/* associated connection */
-    UDISessionId  tip_id;		/* associated TIP session ID */
-} session_t;
-
-/* global dec/defs. which are not in a .h   file ************* EXPORT DEC/DEFS
-*/
-UDIError	dfe_errno;
-char	dfe_errmsg[ERRMSG_SIZE];/* error string */
-
-/* local dec/defs. which are not in a .h   file *************** LOCAL DEC/DEFS
-*/
-LOCAL connection_t	soc_con[MAX_SESSIONS];	
-LOCAL session_t	session[MAX_SESSIONS];	
-LOCAL UDR	udr;
-LOCAL UDR*	udrs = &udr;		/* UDR for current session */
-LOCAL int	current;		/* int-id for current session */
-LOCAL char	sbuf[SBUF_SIZE];	/* String handler buffer */
-LOCAL char	config_file[80];	/* path/name for config file */
-
-/***************************************************************** UDI_CONNECT
-* Establish a new FDE to TIP conection. The file "./udi_soc" or
-* "/etc/udi_soc" may be examined to obtain the conection information
-* if the "Config" parameter is not a completd "line entry".
-*
-* NOTE: the Session string must not start whith white-space characters.
-* Format of string is:
-* <session>   <domain> <soc_name|host_name> <tip_exe|port> <pass to UDIconnect>
-* soc2cayman  AF_INET            cayman      7000           <not supported>
-* soc2tip     AF_UNIX   astring              tip.exe        ...
-*/
-UDIError
-UDIConnect(Config, Session)
-     char *Config;		/* in  -- identification string */
-     UDISessionId *Session;	/* out -- session ID */
-{
-    UDIInt32	service_id = UDIConnect_c;
-    int		domain;
-    int		cnt=0;
-    int		rcnt, pos, params_pos=0;
-    char	*tip_main_string;
-    char	*env_p;
-    struct hostent	*tip_info_p;
-    FILE	*fd;
-#if 0
-    FILE	*f_p;
-#endif
-    UDIUInt32	TIPIPCId;
-    UDIUInt32	DFEIPCId;
-
-#if 0 /* This is crap.  It assumes that udi_soc is executable! */
-    sprintf(sbuf, "which udi_soc");
-    f_p = popen(sbuf, "r");
-    if(f_p)
-    {   while( (sbuf[cnt++]=getc(f_p)) != EOF);
-	sbuf[cnt-2]=0;
-    }
-    pclose(f_p);
-#endif
-
-    for (rcnt=0;
-	 rcnt < MAX_SESSIONS && session[rcnt].in_use;
-	 rcnt++);
-
-    if (rcnt >= MAX_SESSIONS)
-      {
-	sprintf(dfe_errmsg, "DFE-ipc ERROR: Too many sessions already open");
-	return UDIErrorIPCLimitation;
-      }
-
-    /* One connection can be multiplexed between several sessions. */
-
-    for (cnt=0;
-	 cnt < MAX_SESSIONS && soc_con[cnt].in_use;
-	 cnt++);
-
-    if (cnt >= MAX_SESSIONS)
-      {
-        sprintf(dfe_errmsg,
-		"DFE-ipc ERROR: Too many connections already open");
-        return UDIErrorIPCLimitation;
-      }
-
-    *Session = rcnt;
-    session[rcnt].soc_con_p = &soc_con[cnt];
-
-    if (strchr(Config, ' '))		/* test if file entry given */
-      {
-        soc_con[cnt].in_use = TRUE;
-        sscanf(Config, "%s %s %s %s %n",
-	       soc_con[cnt].connect_id,
-	       soc_con[cnt].domain_string,
-	       soc_con[cnt].tip_string,
-	       soc_con[cnt].tip_exe,
-	       &params_pos);
-	tip_main_string = Config + params_pos;
-      }
-    else				/* here if need to read udi_soc file */
-      {
-	strcpy(config_file, "udi_soc");
-	env_p = getenv("UDICONF");
-	if (env_p)
-	  strcpy(config_file, env_p);
-
-	fd = fopen(config_file, "r");
-
-	if (!fd)
-	  {
-	    sprintf(dfe_errmsg, "UDIConnect, can't open udi_soc file:\n%s ",
-		    strerror(errno));
-	    dfe_errno = UDIErrorCantOpenConfigFile;
-	    goto tip_failure;
-	  }
-
-	while (1)
-	  {
-	    if (fscanf(fd, "%s %s %s %s %[^\n]\n",
-		       soc_con[cnt].connect_id,
-		       soc_con[cnt].domain_string,
-		       soc_con[cnt].tip_string,
-		       soc_con[cnt].tip_exe,
-		       sbuf) == EOF)
-	      break;
-
-	    if (strcmp(Config, soc_con[cnt].connect_id) != 0)
-	      continue;
-
-	    soc_con[cnt].in_use = TRUE; /* here if entry found */
-
-	    tip_main_string = sbuf;
-	    break;
-	  }
-
-	fclose(fd);
-	if (!soc_con[cnt].in_use)
-	  {
-	    sprintf(dfe_errmsg,
-		    "UDIConnect, can't find `%s' entry in udi_soc file",
-		    Config);
-	    dfe_errno = UDIErrorNoSuchConfiguration;
-	    goto tip_failure;
-	  }
-      }
-/*----------------------------------------------------------- SELECT DOMAIN */
-    if (strcmp(soc_con[cnt].domain_string, "AF_UNIX") == 0)
-      domain = AF_UNIX;
-    else if (strcmp(soc_con[cnt].domain_string, "AF_INET") == 0)
-      domain = AF_INET;
-    else
-      {
-    	sprintf(dfe_errmsg, "DFE-ipc ERROR: socket address family not known");
-	dfe_errno = UDIErrorBadConfigFileEntry;
-	goto tip_failure;
-      }
-
-/*---------------------------------------------------- MULTIPLEXED SOCKET ? */
-/* If the requested session requires communication with
-   a TIP which already has a socket connection established,
-   then we do not create a new socket but multiplex the
-   existing one. A TIP is said to use the same socket if
-   socket-name/host-name and the domain are the same.
- */
-    for (rcnt=0; rcnt < MAX_SESSIONS; rcnt++)
-      {
-	if (soc_con[rcnt].in_use
-	    && rcnt != cnt
-	    && strcmp(soc_con[cnt].domain_string,
-		      soc_con[rcnt].domain_string) == 0
-	    && strcmp(soc_con[cnt].tip_string,
-		      soc_con[rcnt].tip_string) == 0)
-	  {
-	    session[*Session].soc_con_p = &soc_con[rcnt];
-	    soc_con[cnt].in_use = FALSE;	/* don't need new connect */
-	    goto tip_connect; 
-	}
-      }
-/*------------------------------------------------------------------ SOCKET */
-    soc_con[cnt].dfe_sd = socket(domain, SOCK_STREAM, 0);
-    if (soc_con[cnt].dfe_sd == -1)
-      {
-    	sprintf(dfe_errmsg, "DFE-ipc ERROR, socket() call failed %s ",
-		strerror (errno));
-	dfe_errno = UDIErrorUnknownError;
-	goto tip_failure;
-      }
-
-/*--------------------------------------------------------- AF_UNIX CONNECT */
-    if (domain == AF_UNIX)
-      {
-	if (strcmp(soc_con[cnt].tip_string, "*") == 0)
-	  {
-	    for (pos = 0; pos < 20; pos++)
-	      {
-		int f;
-
-		sprintf(soc_con[cnt].tip_string,"/tmp/U%d", getpid() + pos);
-		f = open(soc_con[cnt].tip_string, O_CREAT);
-		if (f == -1)
-		  continue;
-
-		close(f);
-		unlink(soc_con[cnt].tip_string);
-		break;
-	      }
-
-	    if (pos >= 20)
-	      {
-		sprintf(dfe_errmsg,
-			"DFE-ipc ERROR, can't create random socket name");
-		dfe_errno = UDIErrorCantConnect;
-		goto tip_failure;
-	      }
-	  }
-
-        soc_con[cnt].tip_sockaddr.sa_family = domain;
-        memcpy(soc_con[cnt].tip_sockaddr.sa_data,
-	      soc_con[cnt].tip_string,
-	      sizeof(soc_con[cnt].tip_sockaddr.sa_data));
-    	if (connect(soc_con[cnt].dfe_sd,
-		    &soc_con[cnt].tip_sockaddr,
-		    sizeof(soc_con[cnt].tip_sockaddr)))
-	  { /* if connect() fails assume TIP not yet started */
-/*------------------------------------------------------------ AF_UNIX EXEC */
-	    int	pid;
-	    int statusp;
-	    char *arg0;
-
-	    arg0 = strrchr(soc_con[cnt].tip_exe,'/');
-
-	    if (arg0)
-	      arg0++;
-	    else
-	      arg0 = soc_con[cnt].tip_exe;
-    
-	    pid = vfork();
-
-	    if (pid == 0)	/* Child */
-	      {
-		execlp(soc_con[cnt].tip_exe,
-		       arg0,
-		       soc_con[cnt].domain_string,
-		       soc_con[cnt].tip_string,
-		       NULL);
-	        _exit(1);
-	      }
-
-            if (waitpid(pid, &statusp, WNOHANG))
-	      {
-	        sprintf(dfe_errmsg, "DFE-ipc ERROR: can't exec the TIP");
-	        dfe_errno = UDIErrorCantStartTIP;
-		goto tip_failure;
-	      }
-
-	    pos = 3;
-    	    for (pos = 3; pos > 0; pos--)
-	      {
-		if (!connect(soc_con[cnt].dfe_sd, 
-			     &soc_con[cnt].tip_sockaddr,
-			     sizeof(soc_con[cnt].tip_sockaddr)))
-		  break;
-		sleep(1);
-	      }
-
-	    if (pos == 0)
-	      {
-		sprintf(dfe_errmsg, "DFE-ipc ERROR, connect() call failed: %s",
-	    		strerror (errno));
-	        dfe_errno = UDIErrorCantConnect;
-		goto tip_failure;
-	      }
-	  }
-      }
-/*--------------------------------------------------------- AF_INET CONNECT */
-    else if (domain == AF_INET)
-      {
-	fprintf(stderr,
-		"DFE-ipc WARNING, need to have first started remote TIP");
-
-	soc_con[cnt].tip_sockaddr_in.sin_family = domain;
-	soc_con[cnt].tip_sockaddr_in.sin_addr.s_addr =
-	    inet_addr(soc_con[cnt].tip_string);
-	if (soc_con[cnt].tip_sockaddr_in.sin_addr.s_addr == -1)
-	  {
-	    tip_info_p = gethostbyname(soc_con[cnt].tip_string);
-	    if (tip_info_p == NULL)
-	      {
-		sprintf(dfe_errmsg,"DFE-ipc ERROR, No such host %s",
-			soc_con[cnt].tip_string);
-	    	dfe_errno = UDIErrorNoSuchConnection;
-		goto tip_failure;
-	      }
-	    memcpy((char *)&soc_con[cnt].tip_sockaddr_in.sin_addr,
-		  tip_info_p->h_addr,
-		  tip_info_p->h_length);
-	  }
-	soc_con[cnt].tip_sockaddr_in.sin_port
-	  = htons(atoi(soc_con[cnt].tip_exe));
-
-    	if (connect(soc_con[cnt].dfe_sd,
-		    (struct sockaddr *) &soc_con[cnt].tip_sockaddr_in,
-		    sizeof(soc_con[cnt].tip_sockaddr_in)))
-	  {
-    	    sprintf(dfe_errmsg, "DFE-ipc ERROR, connect() call failed %s ",
-		    strerror (errno));
-	    dfe_errno = UDIErrorCantConnect;
-	    goto tip_failure;
-	  }
-      }
-/*------------------------------------------------------------- TIP CONNECT */
-    if (cnt == 0) udr_create(udrs, soc_con[cnt].dfe_sd, SOC_BUF_SIZE);
-
-tip_connect:
-    current = cnt;
-    session[*Session].in_use = TRUE;	/* session id is now in use */
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-
-    DFEIPCId = (company_c << 16) + (product_c << 12) + version_c;
-    udr_UDIUInt32(udrs, &DFEIPCId);
-
-    udr_string(udrs, tip_main_string);
-
-    udr_sendnow(udrs);
-
-    udrs->udr_op = UDR_DECODE;		/* recv all "out" parameters */
-    udr_UDIUInt32(udrs, &TIPIPCId);
-    if ((TIPIPCId & 0xfff) < version_c)
-      sprintf(dfe_errmsg, "DFE-ipc: Obsolete TIP Specified");
-
-    udr_UDIInt32(udrs, &soc_con[cnt].tip_pid);
-
-    udr_UDISessionId(udrs, &session[*Session].tip_id);
-
-    udr_UDIError(udrs, &dfe_errno);
-    if (dfe_errno > 0) UDIKill(*Session, 0);
-
-    return dfe_errno;
-
-tip_failure:
-
-    soc_con[cnt].in_use = FALSE;
-    session[*Session].in_use = FALSE;
-/* XXX - Should also close dfe_sd, but not sure what to do if muxed */
-    return dfe_errno;
-}
-
-/************************************************************** UDI_Disconnect
-* UDIDisconnect() should be called before exiting the
-* DFE to ensure proper shut down of the TIP.
-*/
-UDIError UDIDisconnect(Session,  Terminate)
-UDISessionId	Session;
-UDIBool		Terminate;
-{
-    int	cnt;
-    UDIInt32	service_id = UDIDisconnect_c;
-    if(Session < 0 || Session > MAX_SESSIONS)
-    {
-	sprintf(dfe_errmsg," SessionId not valid (%d)", Session);
-	return UDIErrorNoSuchConfiguration;
-    }
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISessionId(udrs, &session[Session].tip_id);
-    udr_UDIBool(udrs, &Terminate);
-    udr_sendnow(udrs);
-
-    session[Session].in_use = FALSE;	/* session id is now free */
-    for (cnt=0; cnt < MAX_SESSIONS; cnt++)
-        if(session[cnt].in_use
-	&& session[cnt].soc_con_p == session[Session].soc_con_p
-		) break;
-    if(cnt >= MAX_SESSIONS)	/* test if socket not multiplexed */
-        if(shutdown(session[Session].soc_con_p->dfe_sd, 2))
-        {
-     	    sprintf(dfe_errmsg, "DFE-ipc WARNING: socket shutdown failed");
-	    return UDIErrorIPCInternal;
-        }
-	else
-	  session[Session].soc_con_p->in_use = 0;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************************** UDI_KILL
-* UDIKill() is used to send a signal to the TIP.
-* This is a private IPC call.
-*/
-UDIError UDIKill(Session,  Signal)
-UDISessionId	Session;
-UDIInt32	Signal;
-{
-    int	cnt;
-    UDIInt32	service_id = UDIKill_c;
-    if(Session < 0 || Session > MAX_SESSIONS)
-    {
-	sprintf(dfe_errmsg," SessionId not valid (%d)", Session);
-	return UDIErrorNoSuchConfiguration;
-    }
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISessionId(udrs, &session[Session].tip_id);
-    udr_UDIInt32(udrs, &Signal);
-    udr_sendnow(udrs);
-
-    session[Session].in_use = FALSE;	/* session id is now free */
-    for (cnt=0; cnt < MAX_SESSIONS; cnt++)
-        if(session[cnt].in_use
-	&& session[cnt].soc_con_p == session[Session].soc_con_p
-		) break;
-    if(cnt < MAX_SESSIONS)	/* test if socket not multiplexed */
-        if(shutdown(session[Session].soc_con_p->dfe_sd, 2))
-        {
-     	    sprintf(dfe_errmsg, "DFE-ipc WARNING: socket shutdown failed");
-	    return UDIErrorIPCInternal;
-        }
-	else
-	  session[Session].soc_con_p->in_use = 0;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************** UDI_Set_Current_Connection
-* If you are connected to multiple TIPs, you can change
-* TIPs using UDISetCurrentConnection().
-*/
-UDIError UDISetCurrentConnection(Session)
-UDISessionId	Session;
-{
-    UDIInt32	service_id = UDISetCurrentConnection_c;
-
-    if(Session < 0 || Session > MAX_SESSIONS)
-	return UDIErrorNoSuchConfiguration;
-    if(!session[Session].in_use) 		/* test if not in use yet */
-	return UDIErrorNoSuchConnection;
-
-    current = Session;
-    /* change socket or multiplex the same socket  */
-    udrs->sd = session[Session].soc_con_p->dfe_sd;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISessionId(udrs, &session[Session].tip_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************************ UDI_Capabilities
-* The DFE uses UDICapabilities() to both inform the TIP
-* of what services the DFE offers and to inquire of the
-* TIP what services the TIP offers.
-*/
-UDIError UDICapabilities(TIPId, TargetId, DFEId, DFE, TIP, DFEIPCId,
-		TIPIPCId, TIPString)
-UDIUInt32	*TIPId;		/* out */
-UDIUInt32	*TargetId;	/* out */
-UDIUInt32	DFEId;		/* in */
-UDIUInt32	DFE;		/* in */
-UDIUInt32	*TIP;		/* out */
-UDIUInt32	*DFEIPCId;	/* out */
-UDIUInt32	*TIPIPCId;	/* out */
-char		*TIPString;	/* out */
-{
-    UDIInt32	service_id = UDICapabilities_c;
-    int		size;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIInt32(udrs, &DFEId);
-    udr_UDIInt32(udrs, &DFE);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" paramters */
-    udr_UDIInt32(udrs, TIPId);
-    udr_UDIInt32(udrs, TargetId);
-    udr_UDIInt32(udrs, TIP);
-    udr_UDIInt32(udrs, DFEIPCId);
-    *DFEIPCId = (company_c << 16) + (product_c << 12) + version_c;
-    udr_UDIInt32(udrs, TIPIPCId);
-    udr_string(udrs, sbuf);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    size = strlen(sbuf);
-    if(size +1 > 80) return -1;		/* test if sufficient space */
-    strcpy(TIPString, sbuf);
-    return dfe_errno;
-}
-
-/********************************************************** UDI_Enumerate_TIPs
-* Used by the DFE to enquire about available TIP
-* connections.
-*/
-UDIError UDIEnumerateTIPs(UDIETCallback)
-  int (*UDIETCallback)();		/* In -- function to callback */
-{
-    FILE	*fp;
-
-    fp = fopen(config_file, "r");
-    if(fp == NULL)
-	return UDIErrorCantOpenConfigFile;
-    while(fgets( sbuf, SBUF_SIZE, fp))
-	if(UDIETCallback( sbuf) == UDITerminateEnumeration)
-	    break;
-    fclose( fp);
-    return UDINoError;			/* return success */
-}
-
-/*********************************************************** UDI_GET_ERROR_MSG
-* Some errors are target specific. They are indicated
-* by a negative error return value. The DFE uses
-* UDIGetErrorMsg() to get the descriptive text for
-* the error message which can then  be  displayed  to
-* the user.
-*/
-UDIError UDIGetErrorMsg(error_code, msg_len, msg, CountDone)
-UDIError	error_code;		/* In */
-UDISizeT	msg_len;		/* In  -- allowed message space */
-char*		msg;			/* Out -- length of message*/
-UDISizeT	*CountDone;		/* Out -- number of characters */
-{
-    UDIInt32	service_id = UDIGetErrorMsg_c;
-    int		size;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIError(udrs, &error_code);
-    udr_UDISizeT(udrs, &msg_len);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_string(udrs, sbuf);
-    udr_UDISizeT(udrs, CountDone);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    size = strlen(sbuf);
-    if(size +1 > msg_len) return -1;	/* test if sufficient space */
-    strcpy(msg, sbuf);
-    return dfe_errno;
-}
-
-/******************************************************* UDI_GET_TARGET_CONFIG
-* UDIGetTargetConfig() gets information about the target.
-*/
-UDIError UDIGetTargetConfig(KnownMemory, NumberOfRanges, ChipVersions,
-		NumberOfChips)
-UDIMemoryRange	KnownMemory[];		/* Out */
-UDIInt		*NumberOfRanges;	/* In and Out */
-UDIUInt32	ChipVersions[];		/* Out */
-UDIInt		*NumberOfChips;		/* In and Out */
-{
-    UDIInt32	service_id = UDIGetTargetConfig_c;
-    int		cnt;
-    int		MaxOfRanges = *NumberOfRanges;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIInt(udrs, NumberOfRanges);
-    udr_UDIInt(udrs, NumberOfChips);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" paramters */
-    for(cnt=1; cnt <= MaxOfRanges; cnt++)
-    	udr_UDIMemoryRange(udrs, &KnownMemory[cnt-1]);
-    udr_UDIInt(udrs, NumberOfRanges);
-    udr_UDIInt(udrs, NumberOfChips);
-    for(cnt=1; cnt <= *NumberOfChips; cnt++)
-    	udr_UDIUInt32(udrs, &ChipVersions[cnt -1]);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/********************************************************** UDI_CREATE_PRCOESS
-* UDICreateProcess() tells the  target  OS  that  a
-* process is to be created and gets a PID back unless
-* there is some error.
-*/
-UDIError UDICreateProcess(pid)
-UDIPId	*pid;	/* out */
-{
-    UDIInt32	service_id = UDICreateProcess_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIPId(udrs, pid);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/***************************************************** UDI_Set_Current_Process
-* UDISetCurrentProcess  uses   a   pid   supplied   by
-* UDICreateProcess  and  sets it as the default for all
-* udi calls until a new one is set.  A user of  a
-*/
-UDIError UDISetCurrentProcess (pid)
-UDIPId	pid;			/* In */
-{
-    UDIInt32	service_id = UDISetCurrentProcess_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIPId(udrs, &pid);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/****************************************************** UDI_INITIALISE_PROCESS
-* UDIInitializeProcess() prepare process for
-* execution. (Reset processor if process os processor).
-*/
-UDIError UDIInitializeProcess( ProcessMemory, NumberOfRanges, EntryPoint,
-		StackSizes, NumberOfStacks, ArgString)
-UDIMemoryRange	ProcessMemory[];	/* In */
-UDIInt		NumberOfRanges;		/* In */
-UDIResource	EntryPoint;		/* In */
-CPUSizeT	*StackSizes;		/* In */
-UDIInt		NumberOfStacks;		/* In */
-char		*ArgString;		/* In */
-{
-    UDIInt32	service_id = UDIInitializeProcess_c;
-    int		cnt;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIInt(udrs, &NumberOfRanges);
-    for(cnt = 0; cnt < NumberOfRanges; cnt++)
-	udr_UDIMemoryRange(udrs, &ProcessMemory[cnt] );
-    udr_UDIResource(udrs, &EntryPoint);
-    udr_UDIInt(udrs, &NumberOfStacks);
-    for(cnt = 0; cnt < NumberOfStacks; cnt++)
-	udr_CPUSizeT(udrs, &StackSizes[cnt]);
-    udr_string(udrs, ArgString);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/********************************************************* UDI_DESTROY_PROCESS
-* UDIDestroyProcess() frees a process resource
-* previously created by UDICreateProcess().
-*/
-UDIError UDIDestroyProcess(pid)
-UDIPId   pid;	/* in */
-{
-    UDIInt32	service_id = UDIDestroyProcess_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIPId(udrs, &pid);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/****************************************************************** UDI_READ
-* UDIRead() reads a block of objects from  a  target
-* address space  to host space.
-*/
-
-UDIError UDIRead (from, to, count, size, count_done, host_endian)
-UDIResource	from;		/* in - source address on target */
-UDIHostMemPtr	to;		/* out - destination address on host */
-UDICount	count;		/* in -- count of objects to be transferred */
-UDISizeT	size;		/* in -- size of each object */
-UDICount	*count_done;	/* out - count actually transferred */
-UDIBool		host_endian;	/* in -- flag for endian information */
-{
-    UDIInt32	service_id = UDIRead_c;
-    int		byte_count;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIResource(udrs, &from);
-    udr_UDICount(udrs, &count);
-    udr_UDISizeT(udrs, &size);
-    udr_UDIBool(udrs, &host_endian);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" paramters */
-    udr_UDICount(udrs, count_done);
-    byte_count = (*count_done) * size;
-    if(*count_done > 0 && *count_done <= count)
-        udr_bytes(udrs, to, byte_count);
-    if(udr_errno) return udr_errno;
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/****************************************************************** UDI_WRITE
-* UDIWrite() writes a block  of  objects  from  host
-* space  to  a  target  address+space.
-*/
-UDIError UDIWrite( from, to, count, size, count_done, host_endian )
-UDIHostMemPtr	from;		/* in -- source address on host */
-UDIResource	to;		/* in -- destination address on target */
-UDICount	count;		/* in -- count of objects to be transferred */
-UDISizeT	size;		/* in -- size of each object */
-UDICount	*count_done;	/* out - count actually transferred */
-UDIBool		host_endian;	/* in -- flag for endian information */
-{
-    UDIInt32	service_id = UDIWrite_c;
-    int		byte_count = count * size;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIResource(udrs, &to);
-    udr_UDICount(udrs, &count);
-    udr_UDISizeT(udrs, &size);
-    udr_UDIBool(udrs, &host_endian);
-    udr_bytes(udrs, from, byte_count);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" paramters */
-    udr_UDICount(udrs, count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************************** UDI_COPY
-* UDICopy() copies a block of objects from one  target
-* get  address/space to another target address/space.
-*/
-UDIError UDICopy(from, to, count, size, count_done, direction )
-UDIResource	from;		/* in -- destination address on target */
-UDIResource	to;		/* in -- source address on target */
-UDICount	count;		/* in -- count of objects to be transferred */
-UDISizeT	size;		/* in -- size of each object */
-UDICount	*count_done;	/* out - count actually transferred */
-UDIBool		direction;	/* in -- high-to-low or reverse */
-{
-    UDIInt32	service_id = UDICopy_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIResource(udrs, &from);
-    udr_UDIResource(udrs, &to);
-    udr_UDICount(udrs, &count);
-    udr_UDISizeT(udrs, &size);
-    udr_UDIBool(udrs, &direction);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDICount(udrs, count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/***************************************************************** UDI_EXECUTE
-* UDIExecute() continues execution  of  the  default
-* process from the current PC.
-*/
-UDIError UDIExecute()
-{
-    UDIInt32	service_id = UDIExecute_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************************** UDI_STEP
-* UDIStep()  specifies  a  number  of  "instruction"
-* steps  to  make.
-*/
-UDIError UDIStep(steps, steptype, range)
-UDIUInt32	steps;		/* in -- number of steps */
-UDIStepType	steptype;       /* in -- type of stepping to be done */
-UDIRange	range;          /* in -- range if StepInRange is TRUE */
-{
-    UDIInt32	service_id = UDIStep_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIInt32(udrs, &steps);
-    udr_UDIStepType(udrs, &steptype);
-    udr_UDIRange(udrs, &range);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************************** UDI_STOP
-* UDIStop() stops the default process
-*/
-UDIVoid UDIStop()
-{
-    if (strcmp(session[current].soc_con_p->domain_string, "AF_UNIX") == 0)
-      kill(session[current].soc_con_p->tip_pid, SIGINT);
-    else
-      udr_signal(udrs);
-
-/* XXX - should clean up session[] and soc_con[] structs here as well... */
-
-    return;
-}
-
-/******************************************************************** UDI_WAIT
-* UDIWait() returns the state of the target  procesor.
-*/
-UDIError UDIWait(maxtime, pid, stop_reason)
-UDIInt32   maxtime;        /* in -- maximum time to wait for completion */
-UDIPId     *pid;           /* out -- pid of process which stopped if any */
-UDIUInt32  *stop_reason;   /* out -- PC where process stopped */
-{
-    UDIInt32	service_id = UDIWait_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIInt32(udrs, &maxtime);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIPId(udrs, pid);
-    udr_UDIUInt32(udrs, stop_reason);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/********************************************************** UDI_SET_BREAKPOINT
-* UDISetBreakpoint() sets a breakpoint  at  an  adress
-* and  uses  the  passcount  to state how many
-* times that instruction should  be  hit  before  the
-* break  occurs.
-*/
-UDIError UDISetBreakpoint (addr, passcount, type, break_id)
-UDIResource	addr;		/* in -- where breakpoint gets set */
-UDIInt32	passcount;	/* in -- passcount for breakpoint  */
-UDIBreakType	type;		/* in -- breakpoint type */
-UDIBreakId	*break_id;	/* out - assigned break id */
-{
-    UDIInt32	service_id = UDISetBreakpoint_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIResource(udrs, &addr);
-    udr_UDIInt32(udrs, &passcount);
-    udr_UDIBreakType(udrs, &type);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIBreakId(udrs, break_id);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************** UDI_QUERY_BREAKPOINT
-*/
-UDIError UDIQueryBreakpoint (break_id, addr, passcount, type, current_count)
-UDIBreakId	break_id;	/* in -- assigned break id */
-UDIResource	*addr;		/* out - where breakpoint was set */
-UDIInt32	*passcount;	/* out - trigger passcount for breakpoint  */
-UDIBreakType	*type;		/* out - breakpoint type */
-UDIInt32	*current_count;	/* out - current count for breakpoint  */
-{
-    UDIInt32	service_id = UDIQueryBreakpoint_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIBreakId(udrs, &break_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIResource(udrs, addr);
-    udr_UDIInt32(udrs, passcount);
-    udr_UDIBreakType(udrs, type);
-    udr_UDIInt32(udrs, current_count);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/******************************************************** UDI_CLEAR_BREAKPOINT
-* UDIClearBreakpoint() is used to  clear  a  breakpoint.
-*/
-UDIError UDIClearBreakpoint (break_id)
-UDIBreakId	break_id;	/* in -- assigned break id */
-{
-    UDIInt32	service_id = UDIClearBreakpoint_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIBreakId(udrs, &break_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************************** UDI_GET_STDOUT
-* UDIGetStdout()  is  called   when   a   call   to
-* UDIWait() indicates there is STD output data ready. 
-*/
-UDIError UDIGetStdout(buf, bufsize, count_done)
-UDIHostMemPtr	buf;		/* out -- buffer to be filled */
-UDISizeT	bufsize;	/* in  -- buffer size in bytes */
-UDISizeT	*count_done;	/* out -- number of bytes written to buf */
-{
-    UDIInt32	service_id = UDIGetStdout_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISizeT(udrs, &bufsize);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDISizeT(udrs, count_done);
-    udr_bytes(udrs, buf, *count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************************** UDI_GET_STDERR
-* UDIGetStderr()  is  called   when   a   call   to
-* UDIWait() indicates there is STDERR output data ready
-*/
-UDIError UDIGetStderr(buf, bufsize, count_done)
-UDIHostMemPtr	buf;		/* out -- buffer to be filled */
-UDISizeT	bufsize;	/* in  -- buffer size in bytes */
-UDISizeT	*count_done;	/* out -- number of bytes written to buf */
-{
-    UDIInt32	service_id = UDIGetStderr_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISizeT(udrs, &bufsize);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDISizeT(udrs, count_done);
-    udr_bytes(udrs, buf, *count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/*************************************************************** UDI_PUT_STDIN
-* UDIPutStdin() is called whenever the DFE wants to
-* deliver an input character to the TIP.
-*/
-UDIError UDIPutStdin (buf, count, count_done)
-UDIHostMemPtr	buf;		/* in -- buffer to be filled */
-UDISizeT	count;		/* in -- buffer size in bytes */
-UDISizeT	*count_done;	/* out - number of bytes written to buf */
-{
-    UDIInt32	service_id = UDIPutStdin_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISizeT(udrs, &count);
-    udr_bytes(udrs, buf, count);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDISizeT(udrs, count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************************** UDI_STDIN_MODE
-* UDIStdinMode() is used to change the mode that chazcters
-* are fetched from the user.
-*/
-UDIError	UDIStdinMode(mode)
-UDIMode		*mode;		/* out - */
-{
-    UDIInt32	service_id = UDIStdinMode_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIMode(udrs, mode);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/*************************************************************** UDI_PUT_TRANS
-* UDIPutTrans() is used to feed input to  the  passthru  mode.
-*/
-UDIError	UDIPutTrans (buf, count, count_done)
-UDIHostMemPtr	buf;		/* in -- buffer address containing input data */
-UDISizeT	count;		/* in -- number of bytes in buf */
-UDISizeT	*count_done;	/* out-- number of bytes transfered */
-{
-    UDIInt32	service_id = UDIPutTrans_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISizeT(udrs, &count);
-    udr_bytes(udrs, buf, count);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDISizeT(udrs, count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/*************************************************************** UDI_GET_TRANS
-* UDIGetTrans() is used to get output lines from the
-* passthru mode.
-*/
-UDIError	UDIGetTrans (buf, bufsize, count_done)
-UDIHostMemPtr	buf;		/* out -- buffer to be filled */
-UDISizeT	bufsize;	/* in  -- size of buf */
-UDISizeT	*count_done;	/* out -- number of bytes in buf */
-{
-    UDIInt32	service_id = UDIGetTrans_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDISizeT(udrs, &bufsize);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDISizeT(udrs, count_done);
-    udr_bytes(udrs, buf, *count_done);
-    udr_UDIError(udrs, &dfe_errno);	/* get any TIP error */
-    return dfe_errno;
-}
-
-/************************************************************** UDI_Trans_Mode
-* UDITransMode() is used to change the mode that the
-* transparent routines operate in.
-*/
-UDIError UDITransMode(mode)
-UDIMode		*mode;		/* out  -- selected mode */
-{
-    UDIInt32	service_id = UDITransMode_c;
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-    udr_UDIMode(udrs, mode);
-    udr_sendnow(udrs);
-    if(udr_errno) return udr_errno;
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    udr_UDIError(udrs, &dfe_errno);
-    return dfe_errno;
-}
-
-/******************************************************************** UDI_TEST
-*/
-UDIError UDITest( cnt, str_p, array)
-UDISizeT	cnt;
-UDIHostMemPtr	str_p;
-UDIInt32	array[];
-{
-    UDIInt32	service_id = UDITest_c;
-    UDIInt16	scnt = cnt;
-    UDISizeT	r_cnt;
-    char	buf[256];
-
-    udr_errno = 0;
-    udrs->udr_op = UDR_ENCODE;		/* send all "in" parameters */
-    udr_UDIInt32(udrs, &service_id);
-
-    printf("send	cnt=%d scnt=%d\n", cnt, scnt);
-    udr_UDISizeT(udrs, &cnt);
-    udr_UDIInt16(udrs, &scnt);
-    printf("	array[0]=0x%x array[1]=0x%x array[2]=0x%x array[3]=0x%x\n",
-    	array[0], array[1], array[2], array[3]);
-    udr_bytes(udrs, (char*)array, 4*sizeof(UDIInt32));
-    printf("	string=%s\n", str_p);
-    udr_string(udrs, str_p);
-    udr_sendnow(udrs);
-    if(udr_errno)
-    {	fprintf(stderr, " DFE-ipc Send ERROR\n");
-	return udr_errno;
-    }
-
-    udrs->udr_op = UDR_DECODE;		/* receive all "out" parameters */
-    printf("recv	");
-    udr_UDISizeT(udrs, &r_cnt);
-    udr_UDIInt16(udrs, &scnt);
-    printf("	rcnt=%d scnt=%d\n", r_cnt, scnt);
-    udr_bytes(udrs, (char*)array, 4*sizeof(UDIInt32));
-
-    printf("	array[0]=0x%x array[1]=0x%x array[2]=0x%x array[3]=0x%x\n",
-    	array[0], array[1], array[2], array[3]);
-    udr_string(udrs, str_p);
-    printf("	string=%s\n", str_p);
-
-    udr_UDIError(udrs, &dfe_errno);
-    return dfe_errno;
-}
-
-
-
-UDIUInt32 UDIGetDFEIPCId()
-{
-    return ((company_c << 16) + (product_c << 12) + version_c);
-}
-#endif /* __GO32__ */
diff --git a/gdb/29k-share/udi/udiphcfg.h b/gdb/29k-share/udi/udiphcfg.h
deleted file mode 100644
index e9eff0a..0000000
--- a/gdb/29k-share/udi/udiphcfg.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This file just picks the correct udiphxxx.h depending on the host.
-   The two hosts that are now defined are UNIX and MSDOS.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*
- * For the moment, we will default to BSD_IPC; this might change if/when
- * another type of IPC (Mach? SysV?) is implemented.
- */
-
-#if 0
-
-/* We don't seem to have a copy of udiphdos.h.  Furthermore, all the
-   things in udiphunix.h are pretty much generic 32-bit machine defines
-   which don't have anything to do with IPC.  */
-
-#ifdef DOS_IPC
-#include "udiphdos.h"
-#else
-/*#ifdef BSD_IPC */
-#include "udiphunix.h"
-#endif
-
-#else
-
-#include "udiphunix.h"
-
-#endif
diff --git a/gdb/29k-share/udi/udiphunix.h b/gdb/29k-share/udi/udiphunix.h
deleted file mode 100644
index 172fbbf..0000000
--- a/gdb/29k-share/udi/udiphunix.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Originally called "udiphsun.h", however it was not very
-   Sun-specific; now it is used for generic-unix-with-bsd-ipc.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* This file is to be used to reconfigure the UDI Procedural interface
-   for a given host. This file should be placed so that it will be
-   included from udiproc.h. Everything in here may need to be changed
-   when you change either the host CPU or its compiler. Nothing in
-   here should change to support different targets. There are multiple
-   versions of this file, one for each of the different host/compiler
-   combinations in use.
-*/
-
-#define UDIStruct  struct		/* _packed not needed on unix */
-/* First, we need some types */
-/* Types with at least the specified number of bits */
-typedef double		UDIReal64;		/* 64-bit real value */
-typedef float		UDIReal32;		/* 32-bit real value */
-  
-typedef unsigned long	UDIUInt32;		/* unsigned integers */
-typedef unsigned short	UDIUInt16; 
-typedef unsigned char	UDIUInt8;
-  
-typedef long		UDIInt32;		/* 32-bit integer */ 
-typedef short		UDIInt16;		/* 16-bit integer */ 
-typedef char		UDIInt8;		/* unreliable signedness */
-
-/* To aid in supporting environments where the DFE and TIP use
-different compilers or hosts (like DOS 386 on one side, 286 on the
-other, or different Unix machines connected by sockets), we define
-two abstract types - UDIInt and UDISizeT.
-UDIInt should be defined to be int except for host/compiler combinations
-that are intended to talk to existing UDI components that have a different
-sized int. Similarly for UDISizeT.
-*/
-typedef int		UDIInt;
-typedef unsigned int	UDIUInt;
-
-typedef unsigned int	UDISizeT;
-
-/* Now two void types. The first is for function return types,
-the other for pointers to no particular type. Since these types
-are used solely for documentational clarity, if your host/compiler
-doesn't support either one, replace them with int and char *
-respectively.
-*/
-typedef void		UDIVoid;		/* void type */
-typedef void *		UDIVoidPtr;		/* void pointer type */
-typedef void *		UDIHostMemPtr;		/* Arbitrary memory pointer */
-
-/* Now we want a type optimized for boolean values. Normally this
-   would be int, but on some machines (Z80s, 8051s, etc) it might
-   be better to map it onto a char
-*/
-typedef	int		UDIBool;
-
-/* Now indicate whether your compiler support full ANSI style
-   prototypes. If so, use #if 1. If not use #if 0.
-*/
-#if 0
-#define UDIParams(x)	x
-#else
-#define UDIParams(x)	()
-#endif
diff --git a/gdb/29k-share/udi/udiproc.h b/gdb/29k-share/udi/udiproc.h
deleted file mode 100644
index 0cc1c20..0000000
--- a/gdb/29k-share/udi/udiproc.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/* local type decs. and macro defs.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "udiphcfg.h"	/* Get host specific configuration */
-#include "udiptcfg.h"	/* Get target specific configuration */
-
-/* Here are all of the CPU Families for which UDI is currently defined */
-#define Am29K		1	/* AMD's Am290xx and Am292xx parts */
-
-typedef UDIInt		UDIError;
-typedef UDIInt		UDISessionId;
-typedef	UDIInt		UDIPId;
-typedef	UDIInt		UDIStepType;
-typedef	UDIInt		UDIBreakType;
-typedef	UDIUInt		UDIBreakId;
-typedef UDIUInt		UDIMode;
-
-typedef UDIStruct
-{			
-    CPUSpace	Space;
-    CPUOffset	Offset;
-} UDIResource;
-
-typedef	UDIStruct
-{
-    CPUOffset	Low;
-    CPUOffset	High;
-} UDIRange;
-
-typedef UDIStruct
-{
-    CPUSpace	Space;
-    CPUOffset	Offset;
-    CPUSizeT	Size;
-    } UDIMemoryRange;
-
-/* Values for UDIStepType parameters */
-#define UDIStepNatural		0x0000
-#define UDIStepOverTraps	0x0001
-#define UDIStepOverCalls	0x0002
-#define UDIStepInRange		0x0004
-#define UDIStepNatural		0x0000
-
-/* Values for UDIBreakType parameters */
-#define UDIBreakFlagExecute	0x0001
-#define UDIBreakFlagRead	0x0002
-#define UDIBreakFlagWrite	0x0004
-#define UDIBreakFlagFetch	0x0008
-
-/* Special values for UDIWait MaxTime parameter */
-#define UDIWaitForever	(UDIInt32) -1	/* Infinite time delay */
-
-/* Special values for PId */
-#define UDIProcessProcessor	-1	/* Raw Hardware, if possible */
-
-/* Values for UDIWait StopReason */
-#define UDIGrossState		0xff
-#define UDITrapped		0	/* Fine state - which trap */
-#define UDINotExecuting		1
-#define UDIRunning		2
-#define UDIStopped		3
-#define UDIWarned		4
-#define UDIStepped		5
-#define UDIWaiting		6
-#define UDIHalted		7
-#define UDIStdoutReady		8	/* fine state - size */
-#define UDIStderrReady		9	/* fine state - size */
-#define UDIStdinNeeded		10	/* fine state - size */
-#define UDIStdinModeX  		11	/* fine state - mode */
-#define UDIBreak		12	/* Fine state - Breakpoint Id */
-#define UDIExited		13	/* Fine state - exit code */
-
-/* Enumerate the return values from the callback function
-   for UDIEnumerateTIPs.
-*/
-#define UDITerminateEnumeration	0
-#define UDIContinueEnumeration	1
-
-/* Enumerate values for Terminate parameter to UDIDisconnect */
-#define UDITerminateSession	1
-#define UDIContinueSession	0
-
-/* Error codes */
-#define UDINoError			0	/* No error occured */
-#define UDIErrorNoSuchConfiguration	1
-#define UDIErrorCantHappen		2
-#define UDIErrorCantConnect		3
-#define UDIErrorNoSuchConnection	4
-#define UDIErrorNoConnection		5
-#define UDIErrorCantOpenConfigFile	6
-#define UDIErrorCantStartTIP		7
-#define UDIErrorConnectionUnavailable	8
-#define UDIErrorTryAnotherTIP		9
-#define UDIErrorExecutableNotTIP	10
-#define UDIErrorInvalidTIPOption	11
-#define UDIErrorCantDisconnect		12
-#define UDIErrorUnknownError		13
-#define UDIErrorCantCreateProcess	14
-#define UDIErrorNoSuchProcess		15
-#define UDIErrorUnknownResourceSpace	16
-#define UDIErrorInvalidResource		17
-#define UDIErrorUnsupportedStepType	18
-#define UDIErrorCantSetBreakpoint	19
-#define UDIErrorTooManyBreakpoints	20
-#define UDIErrorInvalidBreakId		21
-#define UDIErrorNoMoreBreakIds		22
-#define UDIErrorUnsupportedService	23
-#define UDIErrorTryAgain		24
-#define UDIErrorIPCLimitation		25
-#define UDIErrorIncomplete		26
-#define UDIErrorAborted			27
-#define UDIErrorTransDone		28
-#define UDIErrorCantAccept		29
-#define UDIErrorTransInputNeeded	30
-#define UDIErrorTransModeX		31
-#define UDIErrorInvalidSize		32
-#define UDIErrorBadConfigFileEntry	33
-#define UDIErrorIPCInternal		34
-/* TBD */
-
-/****************************************************************** PROCEDURES
-*/
-
-UDIError UDIConnect UDIParams((
-  char		*Configuration,		/* In */
-  UDISessionId	*Session		/* Out */
-  ));
-
-UDIError UDIDisconnect UDIParams((
-  UDISessionId	Session,		/* In */
-  UDIBool	Terminate		/* In */
-  ));
-
-UDIError UDISetCurrentConnection UDIParams((
-  UDISessionId	Session			/* In */
-  ));
-
-UDIError UDICapabilities UDIParams((
-  UDIUInt32	*TIPId,			/* Out */
-  UDIUInt32	*TargetId,		/* Out */
-  UDIUInt32	DFEId,			/* In */
-  UDIUInt32	DFE,			/* In */
-  UDIUInt32	*TIP,			/* Out */
-  UDIUInt32	*DFEIPCId,		/* Out */
-  UDIUInt32	*TIPIPCId,		/* Out */
-  char		*TIPString		/* Out */
-  ));
-
-UDIError UDIEnumerateTIPs UDIParams((
-  UDIInt	(*UDIETCallback)	/* In */
-    UDIParams(( char *Configuration ))	/* In to callback() */
-  ));
-
-UDIError UDIGetErrorMsg UDIParams((
-  UDIError	ErrorCode,		/* In */
-  UDISizeT	MsgSize,		/* In */
-  char		*Msg,			/* Out */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDIGetTargetConfig UDIParams((
-  UDIMemoryRange KnownMemory[],		/* Out */
-  UDIInt	*NumberOfRanges,	/* In/Out */
-  UDIUInt32	ChipVersions[],		/* Out */
-  UDIInt	*NumberOfChips		/* In/Out */
-  ));
-
-UDIError UDICreateProcess UDIParams((
-  UDIPId	*PId			/* Out */
-  ));
-
-UDIError UDISetCurrentProcess UDIParams((
-  UDIPId	PId			/* In */
-  ));
-
-UDIError UDIDestroyProcess UDIParams((
-  UDIPId	PId			/* In */
-  ));
-
-UDIError UDIInitializeProcess UDIParams((
-  UDIMemoryRange ProcessMemory[],	/* In */
-  UDIInt	NumberOfRanges,		/* In */
-  UDIResource	EntryPoint,		/* In */
-  CPUSizeT	StackSizes[],		/* In */
-  UDIInt	NumberOfStacks,		/* In */
-  char		*ArgString		/* In */
-  ));
-
-UDIError UDIRead UDIParams((
-  UDIResource	From,			/* In */
-  UDIHostMemPtr	To,			/* Out */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	HostEndian		/* In */
-  ));
-
-UDIError UDIWrite UDIParams((
-  UDIHostMemPtr	From,			/* In */
-  UDIResource	To,			/* In */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	HostEndian		/* In */
-  ));
-
-UDIError UDICopy UDIParams((
-  UDIResource	From,			/* In */
-  UDIResource	To,			/* In */
-  UDICount	Count,			/* In */
-  UDISizeT	Size,			/* In */
-  UDICount	*CountDone,		/* Out */
-  UDIBool	Direction		/* In */
-  ));
-
-UDIError UDIExecute UDIParams((
-  void
-  ));
-
-UDIError UDIStep UDIParams((
-  UDIUInt32	Steps,			/* In */
-  UDIStepType   StepType,		/* In */
-  UDIRange      Range			/* In */
-  ));
-
-UDIVoid UDIStop UDIParams((
-  void
-  ));
-
-UDIError UDIWait UDIParams((
-  UDIInt32	MaxTime,		/* In */
-  UDIPId	*PId,			/* Out */
-  UDIUInt32	*StopReason		/* Out */
-  ));
-
-UDIError UDISetBreakpoint UDIParams((
-  UDIResource	Addr,			/* In */
-  UDIInt32	PassCount,		/* In */
-  UDIBreakType	Type,			/* In */
-  UDIBreakId	*BreakId		/* Out */
-  ));
-
-UDIError UDIQueryBreakpoint UDIParams((
-  UDIBreakId	BreakId,		/* In */
-  UDIResource	*Addr,			/* Out */
-  UDIInt32	*PassCount,		/* Out */
-  UDIBreakType	*Type,			/* Out */
-  UDIInt32	*CurrentCount		/* Out */
-  ));
-
-UDIError UDIClearBreakpoint UDIParams((
-  UDIBreakId	BreakId			/* In */
-  ));
-
-UDIError UDIGetStdout UDIParams((
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDIGetStderr UDIParams((
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDIPutStdin UDIParams((
-  UDIHostMemPtr	Buf,			/* In */
-  UDISizeT	Count,			/* In */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDIStdinMode UDIParams((
-  UDIMode	*Mode			/* Out */
-  ));
-
-UDIError UDIPutTrans UDIParams((
-  UDIHostMemPtr	Buf,			/* In */
-  UDISizeT	Count,			/* In */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDIGetTrans UDIParams((
-  UDIHostMemPtr	Buf,			/* Out */
-  UDISizeT	BufSize,		/* In */
-  UDISizeT	*CountDone		/* Out */
-  ));
-
-UDIError UDITransMode UDIParams((
-  UDIMode	*Mode			/* Out */
-  ));
diff --git a/gdb/29k-share/udi/udipt29k.h b/gdb/29k-share/udi/udipt29k.h
deleted file mode 100644
index 5de2f3f..0000000
--- a/gdb/29k-share/udi/udipt29k.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* This file is to be used to reconfigure the UDI Procedural interface
-   for a given target.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* This file should be placed so that it will be
-   included from udiproc.h. Everything in here will probably need to
-   be changed when you change the target processor. Nothing in here
-   should need to change when you change hosts or compilers.
-*/
-
-/* Select a target CPU Family */
-#define TargetCPUFamily 	Am29K
-
-/* Enumerate the processor specific values for Space in a resource */
-#define UDI29KDRAMSpace		0
-#define UDI29KIOSpace		1
-#define UDI29KCPSpace0		2
-#define UDI29KCPSpace1		3
-#define UDI29KIROMSpace		4
-#define UDI29KIRAMSpace		5
-#define UDI29KLocalRegs		8
-#define UDI29KGlobalRegs	9
-#define UDI29KRealRegs		10
-#define UDI29KSpecialRegs	11
-#define UDI29KTLBRegs		12	/* Not Am29005 */
-#define UDI29KACCRegs		13	/* Am29050 only */
-#define UDI29KICacheSpace	14	/* Am2903x only */
-#define UDI29KAm29027Regs	15	/* When available */
-#define UDI29KPC		16
-#define UDI29KDCacheSpace	17	/* When available */
-
-/* Enumerate the Co-processor registers */
-#define UDI29KCP_F		0
-#define UDI29KCP_Flag		8
-#define UDI29KCP_I		12
-#define UDI29KCP_ITmp		16
-#define UDI29KCP_R		20
-#define UDI29KCP_S		28
-#define UDI29KCP_RTmp		36
-#define UDI29KCP_STmp		44
-#define UDI29KCP_Stat		52
-#define UDI29KCP_Prec		56
-#define UDI29KCP_Reg0		60
-#define UDI29KCP_Reg1		68
-#define UDI29KCP_Reg2		76
-#define UDI29KCP_Reg3		84
-#define UDI29KCP_Reg4		92
-#define UDI29KCP_Reg5		100
-#define UDI29KCP_Reg6		108
-#define UDI29KCP_Reg7		116
-#define UDI29KCP_Mode		124
-
-/* Enumerate the stacks in StackSizes array */
-#define UDI29KMemoryStack	0
-#define UDI29KRegisterStack	1
-
-/* Enumerate the chips for ChipVersions array */
-#define UDI29K29KVersion	0
-#define UDI29K29027Version	1
-
-/* Define special value for elements of ChipVersions array for
- * chips not present */
-#define UDI29KChipNotPresent	-1
-
-typedef	UDIInt32		UDICount;
-typedef	UDIUInt32		UDISize;
-
-typedef UDIInt			CPUSpace;
-typedef UDIUInt32		CPUOffset;
-typedef	UDIUInt32		CPUSizeT;
diff --git a/gdb/29k-share/udi/udisoc.h b/gdb/29k-share/udi/udisoc.h
deleted file mode 100644
index bc68b39..0000000
--- a/gdb/29k-share/udi/udisoc.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* This module defines constants used in the UDI IPC modules.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-static char udisoc_h[]="@(#)udisoc.h	2.6  Daniel Mann";
-static char udisoc_h_AMD[]="@(#)udisoc.h	2.4, AMD";
-
-#define LOCAL static
-#define	company_c	1		/* AMD Company id */
-#define	product_c 	1		/* socket IPC id */
-
-/* Enumerate the UDI procedure services 
-*/
-#define	UDIConnect_c			0
-#define	UDIDisconnect_c			1
-#define	UDISetCurrentConnection_c	2
-#define	UDICapabilities_c		3
-#define	UDIEnumerateTIPs_c		4
-#define	UDIGetErrorMsg_c		5
-#define	UDIGetTargetConfig_c		6
-#define	UDICreateProcess_c		7
-#define	UDISetCurrentProcess_c		8
-#define	UDIDestroyProcess_c		9
-#define	UDIInitializeProcess_c		10
-#define	UDIRead_c			11
-#define	UDIWrite_c			12
-#define	UDICopy_c			13
-#define	UDIExecute_c			14
-#define	UDIStep_c			15
-#define	UDIStop_c			16
-#define	UDIWait_c			17
-#define	UDISetBreakpoint_c		18
-#define	UDIQueryBreakpoint_c		19
-#define	UDIClearBreakpoint_c		20
-#define	UDIGetStdout_c			21
-#define	UDIGetStderr_c			22
-#define	UDIPutStdin_c			23
-#define	UDIStdinMode_c			24
-#define	UDIPutTrans_c			25
-#define	UDIGetTrans_c			26
-#define	UDITransMode_c			27
-#define	UDITest_c			28
-#define	UDIKill_c			29
-
-#define	udr_UDIInt8(udrs, obj)  udr_work(udrs, obj, 1)
-#define	udr_UDIInt16(udrs, obj) udr_work(udrs, obj, 2)
-#define	udr_UDIInt32(udrs, obj) udr_work(udrs, obj, 4)
-#define	udr_UDIInt(udrs, obj)   udr_work(udrs, obj, 4)
-
-#define	udr_UDIUInt8(udrs, obj)  udr_work(udrs, obj, 1)
-#define	udr_UDIUInt16(udrs, obj) udr_work(udrs, obj, 2)
-#define	udr_UDIUInt32(udrs, obj) udr_work(udrs, obj, 4)
-#define	udr_UDIUInt(udrs, obj)   udr_work(udrs, obj, 4)
-
-#define	udr_UDIBool(udrs, obj)   udr_UDIInt32(udrs, obj)
-#define	udr_UDICount(udrs, obj)  udr_UDIInt32(udrs, obj)
-#define	udr_UDISize(udrs, obj)   udr_UDIUInt32(udrs, obj)
-#define	udr_CPUSpace(udrs, obj)  udr_UDIInt32(udrs, obj)
-#define	udr_CPUOffset(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define	udr_CPUSizeT(udrs, obj)  udr_UDIUInt32(udrs, obj)
-#define	udr_UDIBreakId(udrs,obj) udr_UDIUInt(udrs, obj)
-#define	udr_UDISizeT(udrs, obj)  udr_UDIUInt(udrs, obj)
-#define	udr_UDIMode(udrs, obj)   udr_UDIUInt(udrs, obj)
-
-#define	udr_UDIHostMemPtr(udrs, obj) udr_UDIUInt32(udrs, obj)
-#define	udr_UDIVoidPtr(udrs, obj)   udr_UDIUInt32(udrs, obj)
-#define	udr_UDIPId(udrs, obj)       udr_UDIUInt(udrs, obj)
-#define	udr_UDISessionId(udrs, obj) udr_UDIInt32(udrs, obj)
-#define	udr_UDIError(udrs, obj)     udr_UDIInt32(udrs, obj)
-#define	udr_UDIStepType(udrs, obj)  udr_UDIInt32(udrs, obj)
-#define	udr_UDIBreakType(udrs, obj) udr_UDIInt32(udrs, obj)
-
- 
-#define	UDR_ENCODE 1
-#define	UDR_DECODE 2
-
-typedef struct	UDR_str
-{
-    int		udr_op;			/* UDR operation */
-    int		previous_op;
-    int		sd;
-    int		bufsize;
-    char*	buff;
-    char*	getbytes;
-    char*	putbytes;
-    char*	putend;
-    int		domain;
-    char*	soc_name;
-} UDR;
-
-/******************************************* Declare UDR suport functions */
-int udr_create UDIParams((
-  UDR*	udrs,
-  int	sd,
-  int	size
-  ));
-
-int udr_free UDIParams((
-  UDR*	udrs,
-  ));
-
-int udr_signal UDIParams((
-  UDR*	udrs,
-  ));
-
-int udr_sendnow UDIParams((
-  UDR*	udrs
-  ));
-
-int udr_work UDIParams((
-  UDR*	udrs,
-  void*	object_p,
-  int	size
-  ));
-
-int udr_UDIResource UDIParams((
-  UDR*	udrs,
-  UDIResource*	object_p
-  ));
-
-int udr_UDIRange UDIParams((
-  UDR*	udrs,
-  UDIRange*	object_p
-  ));
-
-int udr_UDIMemoryRange UDIParams((
-  UDR*	udrs,
-  UDIMemoryRange*	object_p
-  ));
-
-int udr_UDIMemoryRange UDIParams((
-  UDR*	udrs,
-  UDIMemoryRange* object_p
-  ));
-
-int udr_int UDIParams((
-  UDR*	udrs,
-  int*	int_p
-  ));
-
-int udr_bytes UDIParams((
-  UDR*	udrs,
-  char*	ptr,
-  int	len
-  ));
-
-char* udr_inline UDIParams((
-  UDR*	udrs,
-  int	size
-  ));
-
-char*	udr_getpos UDIParams((
-  UDR*	udrs
-  ));
-int	udr_setpos UDIParams((
-  UDR*	udrs,
-  char*	pos
-  ));
-
-int	udr_readnow UDIParams((
-  UDR*	udrs,
-  int	size
-  ));
-
-int udr_align UDIParams((
-  UDR*	udrs,
-  int	size,
-  ));
diff --git a/gdb/29k-share/udi/udr.c b/gdb/29k-share/udi/udr.c
deleted file mode 100644
index 10a9f38..0000000
--- a/gdb/29k-share/udi/udr.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/* This module supports sending and receiving data objects over a
-   socket conection.
-
-   Copyright 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-static char udr_c[]="@(#)udr.c	2.8  Daniel Mann";
-static char udr_c_AMD[]="@(#)udr.c	2.3, AMD";
-/* 
-*	All data is serialised into a character stream,
-*	and de-serialised back into the approproiate objects.
-********************************************************************** HISTORY
-*/
-/* This is all unneeded on DOS machines.  */
-#ifndef __GO32__
-
-#include <stdio.h>
-#include <sys/types.h>
-
-/* This used to say sys/fcntl.h, but the only systems I know of that
-   require that are old (pre-4.3, at least) BSD systems, which we
-   probably don't need to worry about.  */
-#include <fcntl.h>
-
-#include <sys/socket.h>
-#include "udiproc.h"
-#include "udisoc.h"
-
-extern	int	errno;
-extern	char*	malloc();
-
-/* local type decs. and macro defs. not in a .h  file ************* MACRO/TYPE
-*/
-
-/* global dec/defs. which are not in a .h   file ************* EXPORT DEC/DEFS
-*/
-int		udr_errno;		/* error occurs during UDR service */
-
-/* local dec/defs. which are not in a .h   file *************** LOCAL DEC/DEFS
-*/
-
-/****************************************************************** UDR_CREATE
-* Build UDR structure for character stream processing.
-*/
-int udr_create(udrs, sd, size)
-UDR*	udrs;
-int	sd;
-int	size;
-{
-    udrs->sd = sd;
-    if(!udrs->buff) udrs->buff = malloc(size);
-    udrs->getbytes = udrs->buff;	/* set the buffer to the start */
-    udrs->putbytes = udrs->buff;
-    udrs->putend = udrs->buff;
-    udrs->udr_op = -1;			/* don't know the direction */
-    udrs->previous_op = -1;		/* don't know the direction */
-    udrs->bufsize = size;
-    return 0;
-}
-
-/******************************************************************** UDR_FREE
-* Free USR structure and close socket.
-*/
-int udr_free(udrs)
-UDR*	udrs;
-{
-    close(udrs->sd);
-    free(udrs->buff);
-    return 0;
-}
-
-/****************************************************************** UDR_SIGNAL
-* Send a signal to the process at the other end of the socket,
-* indicating that it should expect to recieve a new message shortly.
-*/
-int udr_signal(udrs)
-UDR*	udrs;
-{
-    if(send(udrs->sd, "I", 1, MSG_OOB) == -1)
-    {	perror("ERROR, udr_signal(), send(...MSG_OOB)");
-	udr_errno =  UDIErrorIPCInternal;
-    	return -1;		/* return error code */
-    }
-    return 0;
-}
-
-/***************************************************************** UDR_SENDNOW
-* used to flush the current character stream buffer to
-* the associated socket.  */
-int udr_sendnow(udrs)
-UDR*	udrs;
-{
-    int size = (UDIUInt32)(udrs->putend) - (UDIUInt32)(udrs->buff);
-    if(udrs->previous_op == 0)
-    {   udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-    udrs->putbytes = udrs->buff;
-    udrs->putend = udrs->buff;
-    if (write(udrs->sd, udrs->buff, size) == -1)
-    {	perror("ERROR, udr_sendnow(), write() call: ");
-	udr_errno =  UDIErrorIPCInternal;
-    	return -1;		/* return error code */
-    }
-    return 0;
-}
-
-/******************************************************************** UDR_WORK
-* Function to send or recieve data from the buffers supporting
-* socket communication. The buffer contains serialised objects
-* sent/recieved over a socket connection.
-*/
-int udr_work(udrs, object_p, size)
-UDR*	udrs;
-void*	object_p;
-int	size;
-{
-    int	    cnt, remain;
-
-    if(udrs->udr_op != udrs->previous_op)
-    {	if(udrs->previous_op == 0)
-	{   udr_errno =  UDIErrorIPCInternal;
-	    return -1;
-        }
-	udrs->previous_op= udrs->udr_op;
-	udrs->putbytes = udrs->buff;
-	udrs->getbytes = udrs->buff;
-    }
-
-    if(udrs->udr_op == UDR_ENCODE)
-    {			/* write data into character stream buffer */
-    	if( (UDIUInt32)(udrs->putbytes) + size >
-	    (UDIUInt32)(udrs->buff) + (UDIUInt32)(udrs->bufsize) )
-	{   udr_errno =  UDIErrorIPCInternal;
-	    return -1;
-        }
-	memcpy(udrs->putbytes, (char*)object_p, size);
-    	udrs->putbytes += size;
-    	if(udrs->putbytes > udrs->putend) udrs->putend = udrs->putbytes;
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-    	if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
-	{		 /* need more data in character stream buffer */
-       	    remain = (UDIUInt32)(udrs->bufsize) -
-		( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->buff) );
-       	    if( ((UDIUInt32)(udrs->bufsize) + (UDIUInt32)(udrs->buff)
-		- (UDIUInt32)(udrs->getbytes)) < size)
-	    {   udr_errno =  UDIErrorIPCInternal;
-	        return -1;
-            }
-    	    cnt = read(udrs->sd, (char*)udrs->putbytes, remain);
-	    if(cnt == -1) perror("ERROR udr_work(),  read() failure: ");
-	    udrs->putbytes += cnt;
-    	    if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
-	    {	udr_errno =  UDIErrorIPCInternal;
-	        return -1;		/* return error code */
-    	    }
-    	}		/* read data from character stream buffer */
-	memcpy((char*)object_p,  udrs->getbytes, size);
-    	udrs->getbytes += size;
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-    return 0;
-}
-
-/************************************************************* UDR_UDIResource
-*/
-int udr_UDIResource(udrs, object_p)
-UDR*	udrs;
-UDIResource*	object_p;
-{
-    int	retval;
-
-    retval = udr_CPUSpace(udrs, &object_p->Space);
-    retval = retval |  udr_CPUOffset(udrs, &object_p->Offset);
-    return retval;
-}
-
-/**************************************************************** UDR_UDIRange
-*/
-int udr_UDIRange(udrs, object_p)
-UDR*		udrs;
-UDIRange*	object_p;
-{
-    int	retval;
-
-    retval = udr_CPUOffset(udrs, &object_p->Low);
-    retval = retval | udr_CPUOffset(udrs, &object_p->High);
-    return retval;
-}
-
-/********************************************************** UDR_UDIMemoryRange
-*/
-int udr_UDIMemoryRange(udrs, object_p)
-UDR*		udrs;
-UDIMemoryRange*	object_p;
-{
-    int	retval;
-
-    retval = udr_CPUSpace(udrs, &object_p->Space);
-    retval = retval | udr_CPUOffset(udrs, &object_p->Offset);
-    retval = retval | udr_CPUSizeT(udrs, &object_p->Size);
-    return retval;
-}
-
-/****************************************************************** UDR_string
-*/
-int udr_string(udrs, sp)
-UDR*	udrs;
-char*	sp;
-{
-    int	len, retval;
-
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-	if(sp)
-    	{   len = strlen(sp) + 1;
-    	    retval = udr_UDIInt32(udrs, &len);
-    	    retval = retval | udr_work(udrs, sp, len);
-	}
-	else	/* deal with NULL pointer */
-	{   len = 0;
-    	    retval = udr_UDIInt32(udrs, &len);
-	}
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-    	retval = udr_UDIInt32(udrs, &len);
-	if(len)
-    	    retval = retval | udr_work(udrs, sp, len);
-	else	*sp = '\0';			/* terminate string */
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-    return retval;
-}
-
-/******************************************************************* UDR_BYTES
-*/
-int udr_bytes(udrs, ptr, len)
-UDR*	udrs;
-char*	ptr;
-int	len;
-{
-    return udr_work(udrs, ptr, len);
-}
-
-/********************************************************************* UDR_INT
-*/
-int udr_int(udrs, int_p)
-UDR*	udrs;
-int*	int_p;
-{
-    int ret_val;
-    UDIInt32  udr_obj;			/* object of know size */
-
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-        udr_obj = *int_p;		/* copy into know object size */
-        return udr_UDIInt32(udrs, &udr_obj);
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-        ret_val = udr_UDIInt32(udrs, &udr_obj);	/* get object of known size */
-	*int_p = udr_obj;
-	return ret_val;
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-}
-
-/****************************************************************** UDR_INLINE
-*/
-char* udr_inline(udrs, size)
-UDR*	udrs;
-int	size;
-{
-    if(udrs->udr_op != udrs->previous_op)
-    {	if(udrs->previous_op == 0)
-	{   udr_errno =  UDIErrorIPCInternal;
-	    return 0;
-        }
-    	udrs->previous_op= udrs->udr_op;
-	udrs->putbytes = udrs->buff;
-	udrs->getbytes = udrs->buff;
-    }
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-    	if(udrs->putbytes + size > udrs->bufsize + udrs->buff)
-	   return 0;
-    	udrs->putbytes += size;
-	return udrs->putbytes - size;
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-    	if(udrs->getbytes + size > udrs->bufsize + udrs->buff)
-	   return 0;
-    	udrs->getbytes += size;
-	return udrs->getbytes - size;
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return 0;
-    }
-}
-
-/****************************************************************** UDR_GETPOS
-*/
-char*	udr_getpos(udrs)
-UDR*	udrs;
-{
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-	return udrs->putbytes;
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-	return udrs->getbytes;
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return 0;
-    }
-}
-
-/****************************************************************** UDR_SETPOS
-*/
-int	udr_setpos(udrs, pos)
-UDR*	udrs;
-char*	pos;
-{
-    if( ((UDIUInt32)pos > (UDIUInt32)(udrs->buff) + (UDIUInt32)(udrs->bufsize))
-     || ((UDIUInt32)pos < (UDIUInt32)(udrs->buff) ) )
-    {	udr_errno =  UDIErrorIPCInternal;
-	return 0;
-    }
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-	udrs->putbytes = pos;
-	return 1;
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-	udrs->getbytes = pos;
-	return 1;
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return 0;
-    }
-}
-
-/***************************************************************** UDR_READNOW
-* Try and ensure "size" bytes are available in the
-* receive buffer character stream.
-*/
-int	udr_readnow(udrs, size)
-UDR*	udrs;
-int	size;
-{
-    int	cnt, remain;
-
-    if(udrs->udr_op == UDR_ENCODE)
-    {
-	udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-    else if(udrs->udr_op == UDR_DECODE)
-    {
-    	if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
-	{		 /* need more data in character stream buffer */
-       	    remain = (UDIUInt32)(udrs->bufsize) -
-		( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->buff) );
-    	    cnt = read(udrs->sd, (char*)udrs->putbytes, remain);
-	    if(cnt == -1) perror("ERROR udr_work(),  read() failure: ");
-	    udrs->putbytes += cnt;
-    	    if( (UDIUInt32)(udrs->putbytes)-(UDIUInt32)(udrs->getbytes) < size )
-    	    {  fprintf(stderr,"ERROR, udr_readnow() too few bytes in stream\n");
-	       return -1;		/* return error code */
-    	    }
-    	}		
-    }
-    else
-    {	udr_errno =  UDIErrorIPCInternal;
-	return -1;
-    }
-    return 0;
-}
-
-/******************************************************************* UDR_ALIGN
-*/
-int udr_align(udrs, size)
-UDR*	udrs;
-int	size;
-{
-    char*   align;
-    int	    offset;	
-
-    align = udr_getpos(udrs);
-    offset = size - ((int)align & (size -1));
-    offset = offset & (size -1);
-    if(offset) udr_setpos(udrs, align + offset);
-}
-#endif /* __GO32__ */
diff --git a/gdb/29k-share/udi_soc b/gdb/29k-share/udi_soc
deleted file mode 100644
index 343317f..0000000
--- a/gdb/29k-share/udi_soc
+++ /dev/null
@@ -1,9 +0,0 @@
-# @(#)udi_soc	2.1 Daniel Mann
-# NOTE: the Session string must not start whith white-space characters.
-# Format of string is:
-# <session>   <domain> <soc_name|host_name> <tip_exe> <pass to UDIconnect>
-soc2cayman  AF_INET            cayman      /bin/udi_tip   ...
-soc2tip     AF_UNIX   astring              tip.exe        ...
-cuba        AF_UNIX   soc_name    ../bin.68020/udi_tip    stuff to pass
-cayman      AF_INET   cayman      this_entry_not_matter   stuff to pass
-iss         AF_UNIX   *                  sun4/isstip	-r osboot
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6745068..25a0285 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,48 +1,4203 @@
-2002-05-28  Keith Seitz  <keiths@redhat.com>
+2002-08-24  Mark Kettenis  <kettenis@gnu.org>
 
-	* cli/cli-interp.c: New file. Almost entirely from Apple's
-	sources. Collected and moved here.
-	* mi/mi-interp.c: Ditto.
-	* mi/mi-events.c: Ditto.
-	* mi/mi.h: New file.
-	* Makefile.in: Add new files.
-	Update dependencies on interps.h.
-	* defs.h (selected_frame_level_changed_hook): Add declaration.
-	* wrapper.c (captured_execute_command): New function.
-	(do_captured_execute_command): New function.
-	* wrapper.h (captured_execute_command): Declare.
-	* top.c (catcher): If the caught command changes the uiout on us,
-	try to do something sane, like using the current interpreter's
-	uiout.
-	* mi/mi-main.c (captured_execute_command): Use catch_exception
-	instead of catch_errors.
-	(mi_execute_command_wrapper): Remove. Using catch_errors now.
-	(mi_input): Make global.
-	(mi_load_progress): Ditto.
-	Use interpreter functions instead of interpreter_p.
-	(mi_command_loop): Moved to mi-interp.c
-	(mi0_command_loop): Ditto.
-	(mi1_command_loop): Ditto.
-	(mi_init_ui): Remove.
-	(_initialize_mi_main): Remove. No longer needed.
+	* valprint.c (print_longest) [CC_HAS_LONG_LONG &&
+	PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned
+	long long) to prevent compiler warning on 64-bit systems.
 
-        From Jim Ingham <jingham@apple.com>:
-	* event-loop.c (start_event_loop): Poll the interpreter's event loop
-	as well as gdb...
-	* event-top.c (gdb_setup_readline, gdb_disable_readline): New functions,
-	used by console & mi to grab & relinquish control of the readline input.
-	* event-top.h (gdb_setup_readline, gdb_disable_readline): Declare.
-	* main.c (captured_main): Copy the interpreter name, since we will
-	eventually use it as a set variable.
-	* top.c (gdb_init): Use the interpreter mechanism to startup the stdin
-	handling.
-	* interps.c: New file. (Originally called interpreter.c by Apple)
-	* interps.h: New file. (Originally called interpreter.h by Apple)
-	* mi/mi-cmds.c, mi/mi-cmds.h: Add mi commands -interpreter-set and
-	-interpreter-exec.
-	* mi/mi-main.c: Add the interpreter functions.
-	(mi_execute_command): Don't print the prompt if the command return
-	is MI_CMD_QUIET.
+2002-08-23  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbarch.sh (STORE_RETURN_VALUE): Add regcache parameter.
+	(DEPRECATED_STORE_RETURN_VALUE): New method.
+	(EXTRACT_RETURN_VALUE): Make buffer parameter a void pointer.
+	* gdbarch.h, gdbarch.c: Re-generate.
+
+	* values.c (set_return_value): Pass current_regcache to
+	STORE_RETURN_VALUE.
+	* arch-utils.h (legacy_store_return_value): Declare.
+	* arch-utils.c (legacy_store_return_value): New function.
+	(legacy_extract_return_value): Update parameters.
+
+	* config/pa/tm-hppa.h (DEPRECATED_STORE_RETURN_VALUE): Rename
+	STORE_RETURN_VALUE.
+	* config/pa/tm-hppa64.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/z8k/tm-z8k.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/sparc/tm-sparclet.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/mn10200/tm-mn10200.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/m68k/tm-linux.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/m32r/tm-m32r.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/h8500/tm-h8500.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+	* config/h8300/tm-h8300.h (DEPRECATED_STORE_RETURN_VALUE): Ditto.
+
+	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+	* i386-tdep.c (i386_extract_return_value): Update.
+	* arch-utils.c (legacy_extract_return_value): Update.
+	* frv-tdep.c (frv_gdbarch_init): Update.
+	* cris-tdep.c (cris_gdbarch_init): Update.
+	* d10v-tdep.c (d10v_gdbarch_init): Update.
+	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
+	* m68k-tdep.c (m68k_gdbarch_init): Update.
+	* mcore-tdep.c (mcore_gdbarch_init): Update.
+	* mn10300-tdep.c (mn10300_gdbarch_init): Update.
+	* s390-tdep.c (s390_gdbarch_init): Update.
+	* sparc-tdep.c (sparc_gdbarch_init): Update.
+	* sh-tdep.c (sh_gdbarch_init): Update.
+	* x86-64-tdep.c (x86_64_gdbarch_init): Update.
+	* v850-tdep.c (v850_gdbarch_init): Update.
+	* avr-tdep.c (avr_gdbarch_init): Update.
+	* ia64-tdep.c (ia64_gdbarch_init): Update.
+	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
+	* vax-tdep.c (vax_gdbarch_init): Update.
+	* alpha-tdep.c (alpha_gdbarch_init): Update.
+	* arm-tdep.c (arm_gdbarch_init): Update.
+	* mips-tdep.c (mips_gdbarch_init): Update.
+	* i386-tdep.c (i386_gdbarch_init): Update.
+
+2002-08-23  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/djgpp/fnchange.lst: Add entries for bfd/elf32-ppcqnx.c,
+	bfd/elf32-ppc.c, bfd/elf32-sh.c and bfd/elf32-shqnx.c.
+
+2002-08-24  Mark Kettenis  <kettenis@gnu.org>
+
+	* PROBLEMS: Refer to GDB 5.3 instead of 5.2.  Mention FreeBSD
+	problems.
+
+2002-08-23  Joel Brobecker  <brobecker@gnat.com>
+
+	* infrun.c (handle_inferior_event): Move a comment outside of a
+	function call, in order to avoid indent reformatting this part
+	of the code in an unreadable way.
+
+2002-08-23  Grace Sainsbury  <graces@redhat.com>
+
+	* infrun.c (normal_stop, proceed): Remove call to print_sys_errmsg
+	when breakpoints fail. Move general breakpoint error messages to
+	insert_breakpoints.  
+	* breakpoint.c (insert_breakpoints): Change warnings when
+	breakpoints are nto inserted to specify the type. Remove call to
+	memory_error when hardware breakpoints can't be inserted. Remove
+	multiple calls to warning so all messages are sent to the user at
+	once.
+	(delete_breakpoints): Make insert error messsages more explicit.
+
+2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
+
+	* ChangeLog: Move gdbserver entries after GDB 5.2 to
+	gdbserver/ChangeLog.
+
+2002-08-23  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.c: Include "objfiles.h".
+	(i386_svr4_init_abi): Set in_solib_call_trampoline and
+	skip_trampoline_code.
+	* config/i386/tm-i386v4.h: Don't include "config/tm-sysv4.h".
+	(CPLUS_MARKER): Define to '.'.
+
+	* linux-proc.c (struct linux_corefile_thread_data): Add num_notes
+	member.
+	(linux_corefile_thread_callback): Increase args->num_notes.
+	(linux_make_note_section): Initialize thread_args.num_notes, and
+	use it to determine whether notes for any threads were created.
+
+2002-08-23  Donn Terry  <dterry@microsoft.com>
+
+	* proc-api.c (rw_table): Do not include a row for PCDSTOP if the
+	corresponding macro is not defined. Likewise for PCNICE, PCSHOLD
+	and PCUNKILL.
+	(write_with_trace): Conditionalize out the switch branch handling
+	PCSHOLD if the corresponding macro is not defined. Likewise for
+	PRSABORT and PRSTOP.
+	This change will be needed by the Interix port.
+
+2002-08-22  Elena Zannoni  <ezannoni@redhat.com>
+
+	* rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
+	ev_offset fields.
+	(skip_prologue): Add support for BookE/e500 instructions.
+	(e500_extract_return_value): New function.
+	(frame_get_saved_regs): Add support for saving ev registers and
+	pseudo gpr's.
+	(e500_store_return_value): New function.
+	(rs6000_gdbarch_init): Move up default intializations of
+	deprecated_extract_return_value and store_return_value.  Overwrite
+	init of store_return_value with e500 specific version.
+	Set extract_return_value for e500.
+	
+2002-08-22  Elena Zannoni  <ezannoni@redhat.com>
+
+	* blockframe.c (generic_call_dummy_register_unwind): Use
+	regcache_cooked_read to catch cases in which the variable is
+	stored in a pseudo register.
+
+2002-08-22  Andrew Cagney  <cagney@redhat.com>
+
+	* NEWS: Mention that the i960 has been made obsolete.
+	* Makefile.in (SFILES): Delete remote-nrom.c, remote-nindy.c and
+	i960-tdep.c
+	(remote-nrom.o): Obsolete target.
+	(remote-nindy.o, i960-tdep.o): Ditto.
+	* remote-nrom.c: Make file obsolete.
+	* remote-nindy.c, remote-vx960.c: Ditto.
+	* config/i960/vxworks960.mt, config/i960/nindy960.mt: Ditto.
+	* config/i960/mon960.mt, config/i960/tm-i960.h: Ditto.
+	* config/i960/tm-vx960.h, config/i960/tm-nindy960.h: Ditto.
+	* config/i960/tm-mon960.h, i960-tdep.c: Ditto.
+	* configure.tgt: Make i960-*-bout*, i960-nindy-coff*,
+	i960-*-coff*, i960-nindy-elf*, i960-*-elf*, i960-*-nindy* and
+	i960-*-vxworks* obsolete.
+	* MAINTAINERS: Note that the i960 is obsolete.
+
+2002-08-21  Corinna Vinschen  <vinschen@redhat.com
+
+	* aix-thread.c (aix_thread_detach): Disable thread debugging on
+	detach to allow reinitialization.
+
+2002-08-22  Andrew Cagney  <ac131313@redhat.com>
+
+	* MAINTAINERS: Change the s390 target to s390-linux-gnu (second
+	attempt).
+
+2002-08-22  Jim Blandy  <jimb@redhat.com>
+
+	* coffread.c (coff_symfile_read): Don't try to read the line
+	number table from disk if the image file doesn't have a symbol
+	table; we'll never actually look at the info anyway, and Windows
+	ships DLL's with bogus file offsets for the line number data.
+
+2002-08-21  Elena Zannoni  <ezannoni@redhat.com>
+
+        * rs6000-tdep.c (rs6000_gdbarch_init): Figure out whether we have
+        an e500 executable.
+
+2002-08-21  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (MSYMBOL_IS_SPECIAL): Replace macro with function.
+	(MSYMBOL_SIZE): Replace macro with function.
+	(DEFAULT_MIPS_TYPE): Delete unused macro.
+	* config/mips/tm-mips.h (DEFAULT_MIPS_TYPE): Delete unused macro.
+	* config/mips/tm-embed.h (DEFAULT_MIPS_TYPE): Delete unused macro.
+
+2002-08-21  Jim Blandy  <jimb@redhat.com>
+
+	* valops.c (value_cast): Simplify and correct logic for doing a
+	static cast from a pointer to a base class to a pointer to a
+	derived class.
+
+2002-08-21  Andrew Cagney  <ac131313@redhat.com>
+
+	* infcmd.c (default_print_registers_info): Replace
+	do_registers_info.
+	(registers_info): Use gdbarch_print_registers_info instead of
+	DO_REGISTERS_INFO.
+	* inferior.h (default_print_registers_info): Replace
+	do_registers_info.
+	* gdbarch.sh (PRINT_REGISTERS_INFO): New method.
+	(DO_REGISTERS_INFO): Change to a predicate function.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	
+2002-08-21  Keith Seitz  <keiths@redhat.com>
+
+	* gdb-events.sh: Add target-changed event.
+	* gdb-events.c: Regenerated.
+	* gdb-events.c: Regenerated.
+	* valops.c (value_assign): Add target-changed event notification
+	to inlval_register, lval_memory, and lval_reg_frame_relative.
+
+2002-08-21  Joel Brobecker  <brobecker@gnat.com>
+
+	* NEWS: Add an entry regarding the improvement of the next/step
+	operation on Alpha Tru64 multi-processor machines.
+
+2002-08-21  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in: Update dependencies for mi/ cli/ and tui/
+	directores.
+	* Makefile.in: Update all _h macro definitions.
+	* Makefile.in (install-gdbtk): Move to install section.
+	(rdi-share/libangsd.a): Move to end of file.
+
+2002-08-19  Andrew Cagney  <ac131313@redhat.com>
+
+	* frame.c (frame_register_unwind): When a register, set addrp to
+	the register's byte.
+
+2002-08-20  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): These are only
+	used locally, so move them from the target machine header to here.
+	(mips_set_processor_type, mips_register_name, mips32_next_pc, 
+	mips16_next_pc, cached_proc_desc, mips_set_processor_type): 
+	Make static.
+	* config/mips/tm-mips.h (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Delete.
+
+2002-08-20  Andrew Cagney  <cagney@redhat.com>
+
+	* NEWS: Mention that the Apollo line was made obsolete.
+	* configure.tgt: Make m68*-apollo*-bsd*, m68*-hp-bsd*, and
+	m68*-hp-hpux* obsolete.
+	* configure.host: Make m68*-apollo*-sysv*, m68*-apollo*-bsd*,
+	m68*-hp-bsd* and m68*-hp-hpux* obsolete.
+	* buildsym.c (make_blockvector): Make static.
+	* buildsym.h (make_blockvector): Make extern declaration obsolete.
+	* Makefile.in (HFILES_NO_SRCDIR): Remove dst.h
+	(ALLDEPFILES): Remove dstread.c.
+	(dstread.o): Obsolete make rule.
+	* dstread.c: Makefile obsolete.
+	* dst.h: Ditto.
+	* config/m68k/hp300hpux.mt: Ditto.
+	* config/m68k/hp300hpux.mh: Ditto.
+	* config/m68k/hp300bsd.mt: Ditto.
+	* config/m68k/hp300bsd.mh: Ditto.
+	* config/m68k/apollo68b.mt: Ditto.
+	* config/m68k/apollo68v.mh: Ditto.
+	* config/m68k/apollo68b.mh: Ditto.
+
+2002-08-20  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_in_return_stub): Make static.
+	(mips_gdbarch_init): Set in_solib_return_trampoline.
+	* config/mips/tm-mips.h (IN_SOLIB_RETURN_TRAMPOLINE): Delete.
+
+2002-08-20  Michael Snyder  <msnyder@redhat.com>
+
+	* gdbarch.sh (IN_SOLIB_RETURN_TRAMPOLINE): Add.
+	* gdbarch.c, gdbarch.h: Regenerate.
+	* arch-utils.c, arch-utils.h (generic_in_solib_return_trampoline):
+	Add.
+	* infrun.c (IN_SOLIB_RETURN_TRAMPOLINE): Delete default definition.
+
+2002-08-20  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_skip_stub, mips_in_call_stub): Make static.
+	(mips_gdbarch_init): Set skip_trampoline_code, 
+	in_solib_call_trampoline.
+	* config/mips/tm-mips.h (REGISTER_NAME): Delete.
+	(IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): Delete.
+
+2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
+
+	* ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
+
+	* rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
+	vector type for ev registers.
+	(e500_pseudo_register_read): New function.
+	(e500_pseudo_register_write): New function.
+	(e500_dwarf2_reg_to_regnum): New function.
+	(PPC_UISA_NOFP_SPRS): New macro.
+	(PPC_EV_REGS): New macro.
+	(PPC_GPRS_PSEUDO_REGS): New macro.
+	(registers_e500): New register set for e500.
+	(variants): Add e500 variant.
+	(rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
+	before setting architectural dependent variations.  Initialize ev
+	registers numbers.  Add case for e500 architecture.  Set the
+	number of pseudo registers.
+
+2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
+
+        * rs6000-tdep.c: Clean up comments.
+
+2002-08-20  Andrew Cagney  <cagney@redhat.com>
+
+	* h8300-tdep.c: Re-indent file.
+
+2002-08-20  Jim Blandy  <jimb@redhat.com>
+
+	* Makefile.in (LDFLAGS): Allow the configure script to establish a
+	default for this.
+
+2002-08-20  Keith Seitz  <keiths@redhat.com>
+
+	* breakpoints.c (watch_command_1): Use internal breakpoint
+	when setting a watchpoint_scope breakpoint.
+
+2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
+
+        * gdbtypes.c (build_builtin_type_vec64): Add name to type.
+        (build_builtin_type_vec64i): Ditto.
+        (build_builtin_type_vec128): Ditto.
+        (build_builtin_type_vec128i): Ditto.
+
+2002-08-19  Michael Snyder  <msnyder@redhat.com>
+
+	* config/mips/tm-mips.h (ELF_MAKE_MSYMBOL_SPECIAL): Delete.
+	(MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Change into functions.
+	(FIX_CALL_DUMMY, PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME,
+	POP_FRAME, INIT_EXTRA_FRAME_INFO): Delete.
+	(CALL_DUMMY_START_OFFSET, CALL_DUMMY_BREAKPOINT_OFFSET,
+	CALL_DUMMY_ADDRESS): Delete.
+	* mips-tdep.c (mips_elf_make_msymbol_special, mips_msymbol_size,
+	mips_msymbol_is_special, mips_fix_call_dummy): New functions.
+	(mips_gdbarch_init): Set elf_make_msymbol_special, pop_frame, 
+	push_dummy_frame, fix_call_dummy, init_extra_frame_info, 
+	push_return_address.
+	(mips_register_raw_size, mips_eabi_use_struct_convention, 
+	mips_n32n64_use_struct_convention, mips_o32_use_struct_convention,
+	mips_o32_reg_struct_has_addr, mips_frame_saved_pc, mips_frame_chain,
+	mips_init_extra_frame_info, mips_eabi_push_arguments, 
+	mips_n32n64_push_arguments, mips_push_return_address,
+	mips_push_dummy_frame, mips_pop_frame, mips_skip_prologue,
+	mips_breakpoint_from_pc, mips_call_dummy_address): Make static.
+
+2002-08-19  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_frame_num_args): New function.
+	(mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
+	frame_saved_pc, frame_args_address, frame_locals_address, 
+	frame_num_args, and frame_args_skip.
+	* config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
+	FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, 
+	FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
+	* config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
+
+2002-08-20  Michael Snyder  <msnyder@redhat.com>
+
+	* config/mips/tm-mips.h (STORE_STRUCT_RETURN): Delete.
+	(EXTRACT_STRUCT_VALUE_ADDRESS): Delete.
+	* mips-tdep.c (mips_store_struct_return): New function.
+	(mips_extract_struct_value_address): New function.
+	(mips_gdbarch_init): Set store_struct_return and
+	extract_struct_value_address.
+
+2002-08-20  David Carlton  <carlton@math.stanford.edu>
+
+	* dwarf2read.c (dwarf2_build_psymtabs): Check that
+	dwarf_line_offset is nonzero before creating dwarf_line_buffer.
+	(read_file_scope): Check that line_header is nonzero before
+	decoding macro information.
+
+2002-08-20  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.h (FP_REGNUM_P): Change such that we don't incorrectly
+	flag the general-purpose registers as floating-point on targets
+	that don't support the floating-point registers.
+
+2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
+
+	* rs6000-tdep.c (altivec_register_p): Delete.
+	(rs6000_do_altivec_registers): Delete.
+	(rs6000_altivec_registers_info): Delete.
+	(rs6000_do_registers_info): Delete.
+	(_initialize_rs6000_tdep): Remove command 'info powerpc altivec'.
+	(rs6000_gdbarch_init): Remove setting of do_registers_info.
+
+2002-08-20  Elena Zannoni  <ezannoni@redhat.com>
+
+	* infcmd.c (do_registers_info): Print vector registers in hex
+	format only.
+	(print_vector_info): Check that printing registers
+	makes sense.
+	(print_float_info): Ditto.
+
+2002-08-20  Andrew Cagney  <ac131313@redhat.com>
+
+	* mips-tdep.c (mips_gdbarch_init): Update.
+	(mips_o32_extract_return_value): Rewrite.
+	(mips_o32_store_return_value): Rewrite.
+	(mips_o32_xfer_return_value): New function.
+	(mips_xfer_register): Tweak debug print message.  Allow for
+	buf_offset when dumping the value transfered.
+
+2002-08-20  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/mips/tm-nbsd.h (MIPS_DEFAULT_ABI): Delete.
+	* config/mips/tm-linux.h (MIPS_DEFAULT_ABI): Delete.
+	* config/mips/tm-irix5.h (MIPS_DEFAULT_ABI): Delete.
+	* config/mips/tm-irix6.h (MIPS_DEFAULT_ABI): Delete.
+	* mips-tdep.c (mips_gdbarch_init) [MIPS_DEFAULT_ABI]: Delete code.
+
+2002-08-14  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_frame_chain): Check for call-dummy frames.
+
+2002-08-19  Elena Zannoni  <ezannoni@redhat.com>
+
+	* rs6000-tdep.c (struct reg): Add field to indicate a pseudo
+	register.
+	(P): New macro to define a register as a pseudo register.
+	(R, R4, R8, R16, FR32, R64, R0): Updated.
+	(struct variant): Add new fields for number of pseudo registers
+	and number of total registers.
+	(tot_num_registers): New macro replacing....
+	(num_registers): ...deleted macro.
+	(num_registers): New function.
+	(num_pseudo_registers): New function.
+	(variants): Update all variants to intialize new fields correctly.
+	Postpone initialization of number of pseudo regs and real regs.
+	(init_variants): New function.
+	(rs6000_gdbarch_init): Initialize variants.  Update calculation of
+	registers offsets.
+
+2002-08-19  David Carlton  <carlton@math.stanford.edu>
+
+	* valops.c (search_struct_field): Change error message to treat
+	return value of 0 from value_static_field as meaning that field is
+	optimized out.
+	(value_struct_elt_for_reference): Ditto.
+	* values.c (value_static_field): Treat an unresolved location the
+	same as a nonexistent symbol.  Fix PR gdb/635.
+	* gnu-v2-abi.c (gnuv2_value_rtti_type): Eliminate test for being
+	enclosed.  Fix PR gdb/574.
+	* MAINTAINERS: Add self to Write After Approval list.
+
+2002-08-19  Andrew Cagney  <ac131313@redhat.com>
+
+	* mips-tdep.c (mips_xfer_register): New function.
+	(mips_n32n64_extract_return_value): Rewrite.
+	(mips_gdbarch_init): For N32 and N64, set extract_return_value
+	instead of deprecated_extract_return_value.
+
+2002-08-19  Elena Zannoni  <ezannoni@redhat.com>
+
+	* rs6000-tdep.c (TDEP): Delete macro.
+	(branch_dest): Replace use of TDEP macro with its body.
+	(rs6000_pop_frame): Ditto.
+	(rs6000_push_arguments): Ditto.
+	(rs6000_skip_trampoline_code): Ditto.
+	(rs6000_frame_saved_pc): Ditto.
+	(rs6000_frame_chain): Ditto.
+	(rs6000_register_name): Ditto.
+	(rs6000_register_byte): Ditto.
+        (rs6000_register_raw_size): Ditto.
+	(rs6000_register_virtual_type): Ditto.
+	(rs6000_register_convertible): Ditto.
+	(rs6000_convert_from_func_ptr_addr): Ditto.
+
+2002-08-19  Daniel Jacobowitz  <drow@mvista.com>
+
+	* config/mips/tm-linux.h (REALTIME_LO, REALTIME_HI): Define
+	conditionally.
+	(JB_PC, JB_ELEMENT_SIZE): Rename to MIPS_LINUX_JB_PC and
+	MIPS_LINUX_JB_ELEMENT_SIZE.
+	* mips-linux-tdep.c (supply_gregset, fill_gregset): Use alloca
+	for MAX_REGISTER_RAW_SIZE arrays.
+	(mips_linux_get_longjmp_target): Use MIPS_LINUX_JB_PC and
+	MIPS_LINUX_JB_ELEMENT_SIZE.
+
+2002-08-19  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+	* i387-tdep.c (i387_print_float_info): Fix typo in comment.
+
+2002-08-19  Aidan Skinner <aidan@velvet.net>
+
+	* Makefile.in (SFILES): Add ada-exp.y ada-lang.c ada-typeprint.c
+	ada-valprint.c ada-tasks.c.
+	(YYFILES): Add ada-exp.y.
+	(ada-exp.tab.c ada-lex.c ada-lang.o): New target.
+	(ada-tasks.o ada-typeprint.o ada-valprint.o): New target.
+	(ada-exp.tab.o): New target.
+		
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* regcache.c (regcache_xfer_part): New function.
+	(regcache_raw_read_part): New function.
+	(regcache_raw_write_part): New function.
+	(regcache_cooked_read_part): New function.
+	(regcache_cooked_write_part): New function.
+	* regcache.h (regcache_raw_read_part): Declare.
+	(regcache_raw_write_part): Declare.
+	(regcache_cooked_read_part): Declare.
+	(regcache_cooked_write_part): Declare.
+
+2002-08-18  Daniel Jacobowitz  <drow@mvista.com>
+
+	* remote.c (remote_open_1): Add async_p.
+	(remote_async_open_1): Delete.
+	(open_remote_target): Delete.
+	(remote_open, extended_remote_open): Update calls to remote_open_1.
+	(remote_async_open, extended_remote_async_open): Call
+	remote_open_1 instead of remote_async_open_1.
+
+2002-08-19  Mark Kettenis  <kettenis@gnu.org>
+
+	* blockframe.c: Fix a few coding standard violations.
+
+2002-08-19  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/nm-i386sco5.h (START_INFERIOR_TRAPS_EXPECTED): Moved
+	here from ...
+	* config/i386/tm-i386sco5.h: ... here.  File removed.
+	* config/i386/i386sco5.mt (TM_FILE): Set to tm-i386v4.h.
+
+	* config/i386/nm-i386v.h (START_INFERIOR_TRAPS_EXPECTED): New define.
+	* config/i386/i386aout.mt (TDEPFILES): Add i387-tdep.o
+	(TM_FILE): Set to tm-i386.h.
+	* config/i386/i386v.mt (TM_FILE): Set to tm-i386.h.
+	* config/i386/tm-i386v.h: Remove file.
+	* config/i386/tm-ptx.h [!SEQUENT_PTX4]: Include "i386/tm-i386.h"
+	instead of "i386/tm-i386v.h".
+	(START_INFERIOR_TRAPS_EXPECTED): Remove define.
+	* config/i386/tm-symmetry: Include "i386/tm-i386.h" instead of
+	"i386/tm-i386v.h".
+	(START_INFERIOR_TRAPS_EXPECTED): Remove define.
+	* config/i386/tm-vxworks.h: Include "i386/tm-i386.h" instead of
+	"i386/tm-i386.h".
+
+2002-08-18  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/nm-i386v.h: Add protection against
+	multiple-inclusion.
+	(i386_register_u_addr): Remove prototype.
+	(register_u_addr): New prototype.
+	(REGISTER_U_ADDR): Redefine accordingly.
+	* i386v-nat.c: Improve several comments.
+	(i386_register_u_addr): Change signature and rename to
+	register_u_addr.  Use FP_REGNUM_P.  Rewrite slightly to get rid of
+	ubase variable.
+
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/mips/tm-mips.h (STORE_RETURN_VALUE): Delete macro.
+	(DEPRECATED_EXTRACT_RETURN_VALUE): Delete macro.
+	* mips-tdep.c (mips_gdbarch_init): Set store_return_value and
+	deprecated_extract_return_value.
+	(mips_o32_push_arguments, mips_o64_push_arguments): Clone and
+	rename mips_o32o64_push_arguments.
+	(mips_gdbarch_init): Update.
+	(mips_extract_return_value): Delete.
+	(mips_o32_extract_return_value): Clone mips_extract_return_value.
+	(mips_o64_extract_return_value): Clone mips_extract_return_value.
+	(mips_eabi_extract_return_value): Clone mips_extract_return_value.
+	(mips_n32n64_extract_return_value): Clone
+	mips_extract_return_value.
+	(mips_store_return_value): Delete.
+	(mips_o32_store_return_value): Clone mips_store_return_value.
+	(mips_o64_store_return_value): Clone mips_store_return_value.
+	(mips_eabi_store_return_value): Clone mips_store_return_value.
+	(mips_n32n64_store_return_value): Clone mips_store_return_value.
+
+2002-08-18  Aidan Skinner <aidan@velvet.net>
+
+	* ada-lang.c: Use gdb_string.h instead of <string.h>.
+	* ada-typeprint.c: Use gdb_string.h instead of <string.h>.
+		
+2002-08-18  Aidan Skinner <aidan@velvet.net>
+
+        * ada-lang.c: Run through gdb_indent.sh.
+        * ada-lang.h: Run through gdb_indent.sh.
+        * ada-tasks.c: Run through gdb_indent.sh.
+        * ada-typeprint.c: Run through gdb_indent.sh.
+        * ada-valprint.c: Run through gdb_indent.sh.
+
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* osabi.c (gdbarch_init_osabi): Don't complain about an unknown
+	ABI.
+
+2002-08-18  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386b-nat.c [FETCH_INFERIOR_REGISTERS]: Remove dead code.
+
+	* config/i386/nm-i386bsd.h (FLOAT_INFO): Remove redundant #undef.
+	* i386b-nat.c [FLOAT_INFO]: Remove dead code.
+
+	* i386-tdep.c (i386_do_pop_frame, i386_store_return_value): Call
+	write_register_gen instead of write_register_bytes.
+
+	* NEWS: Mention that the i[3456]-*mach3*, i[3456]-*-mach* and
+	i[3456]-*-osf1mk* configurations have been made obsolete.
+	* configure.host: Make i[3456]86-*-mach3*, i[3456]86-*mach* and
+	i[3456]86-*-osf1mk* hosts obsolete.
+	* confighure.tgt: Make i[3456]86-*-mach3*, i[3456]86-*-osf1mk*
+	targets obsolete.
+	* config/i386/i386mach.mh, config/i386/nm-i386mach.h,
+	config/i386/xm-i386mach.h, config/i386/i386m3.mh,
+	config/i386/i386m3.mt, config/i386/nm-m3.h,
+	config/i386/tm-i386m3.h, config/i386/xm-i386m3.h,
+	config/i386/i386mk.mh, config/i386/i386mk.mt,
+	config/i386/tm-i386mk.h, config/i386/xm-i386mk.h: Make files
+	obsolete.
+	* i386mach-nat.c, i386m3-nat.c: Make files obsolete.
+	* Makefile.in (ALLDEPFILES): Remove i386mach.c i386m3-nat.c
+	(i386mach-nat.o, i386m3-nat.o):Make targets obsolete.
+
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/pa/tm-hppa.h (hppa_store_return_value): Declare.
+	(hppa_value_returned_from_stack): Declare.
+	(hppa_extract_return_value): Declare.
+	* config/pa/hppa.mt: New file.
+	* configure.tgt: Recognize hppa*-*-*.
+	* MAINTAINERS: Change HPPA target to hppa-elf.  Still broken.
+
+2002-08-18  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-sol2-tdep.c (_initialize_i386_sol2_tdep): Fix typo in
+	comment.
+
+2002-08-17  Mark Kettenis  <kettenis@gnu.org>
+
+	* top.c (gdb_rl_operate_and_get_next): Make sure
+	operate-and-get-next functions correctly even when the history
+	list is completely filled.
+
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* MAINTAINERS (Target Instruction Set Architectures): Rename
+	Target/Architectures.  Replace vax-dec-vms5.5 with vax-netbsd.
+	Replace s390-linux with s390-linux-gnu.  Remove i386-aout,
+	mcore-pe, mips64-elf, sparc64-elf.  Remove i586-pc-msdosdjgpp,
+	already listed under Host/Native.
+
+	* configure.tgt: Combine i[3456]86-*-coff*, i[3456]86-*-elf*,
+	i[3456]86-*-pe*, and i[3456]86-*-aout* into i[3456]86-*-*.  Add
+	mips*-*-*.
+
+2002-08-17  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/ia64/ia64.mt: New file.
+	* config/alpha/alpha.mt: New file.
+	* MAINTAINERS: Change the alpha target to alpha-elf and IA-64 to
+	ia64-linux-gnu.  Mention that ia64-elf is broken.
+	* configure.tgt: Add alpha*-*-* and ia64*-*-* patterns.
+
+2002-08-17  Mark Kettenis  <kettenis@elgar.kettenis.dyndns.org>
+
+	* i386-tdep.c (i386_svr4_init_abi, i386_nw_init_abi): Use
+	generic_func_frame_valid instead of func_frame_valid.
+
+2002-08-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* alpha-osf1-tdep.c (alpha_osf1_init_abi): Unfortunately,
+	procfs appears to be broken when debugging on multi-processor
+	machines. So enable software single stepping in order to avoid
+	using the procfs interface to do next/step operations, using
+	internal breakpoints instead.
+
+	* infrun.c (handle_inferior_event): Readjust the stop_pc by
+	DECR_PC_AFTER_BREAK when hitting a single step breakpoint, to
+	make this pc address equal to the value it would have if the
+	system stepping capability was used. Also set a new flag used
+	to ensure that we don't readjust the PC one more time later.
+
+	* breakpoint.c (bpstat_stop_status): Do not adjust the PC
+	address by DECR_PC_AFTER_BREAK when software single step is
+	in use for this architecture, as this has already been taken
+	care of in handle_inferior_event().
+
+2002-08-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* infrun.c (handle_inferior_event): Minor reformatting, to make
+	a rather long condition expression easier to read.
+
+2002-08-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (gdbtk.o): Move to end of file.
+	(gdbtk-bp.o, gdbtk-cmds.o): Ditto.
+	(gdbtk-hooks.o, gdbtk-register.o): Ditto.
+	(gdbtk-stack.o, gdbtk-varobj.o): Ditto.
+	(gdbtk-wrapper.o, gdbres.o): Ditto.
+
+2002-08-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (copying.o): Separate out compile rule.
+	(hpux-thread.o, procfs.o, signals.o): Ditto.
+	(v850ice.o, z8k-tdep.o): Ditto.
+	(tui-file.o): Move to TUI section.
+	(xdr_ptrace.o, xdr_rdb.o, xdr_ld.o): Move to separate section.
+	(nindy.o, Onindy.o, ttyflush.o): Move to separate section.
+
+2002-08-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* i386-tdep.c (i386_pe_skip_trampoline_code): renamed from
+	skip_trampoline_code, for better namespace-proofing.   
+
+	* i386-tdep.h (i386_pe_skip_trampoline_code): Add declaration.
+
+2002-08-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* config/i386/tm-cygwin.h: Remove some "#if 0"'ed macros.
+
+2002-08-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* infrun.c (handle_inferior_event): When receiving a SIGTRAP
+	signal, check whether we hit a breakpoint before checking for a
+	single step breakpoint. Otherwise, GDB fails to notice that a
+	breakpoint has been hit when stepping onto a breakpoint.
+
+2002-08-16  Keith Seitz  <keiths@redhat.com>
+
+	* gdb-events.sh (clear_gdb_event_hooks): New function.
+	* gdb-events.c: Regenerate.
+	* gdb-events.h: Regenerate.
+
+2002-08-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* breakpoint.c (bpstat_stop_status): Rename not_a_breakpoint to
+	not_a_sw_breakpoint.
+	* breakpoint.h (bpstat_stop_status): Add parameter names.
+
+2002-08-16  Grace Sainsbury  <graces@redhat.com>
+
+	* remote.c (remote_insert_hw_breakpoint)
+	(remote_remove_hw_breakpoint): Fix calculation of length field
+	for Z-packet.
+
+2002-08-15  Michael Snyder  <msnyder@redhat.com>
+
+	* irix5-nat.c (supply_gregset): Allocate plenty-big buffer
+	(32 bytes) instead of using MAX_REGISTER_RAW_SIZE.
+	(supply_fpregset): Ditto.
+	
+	* config/mips/tm-mips.h (REGISTER_CONVERT_TO_VIRTUAL, 
+	REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE, 
+	MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
+	(TARGET_READ_SP): Delete.
+	(DO_REGISTERS_INFO): Delete.
+	(FUNCTION_START_OFFSET, IN_SIGTRAMP, REGISTER_VIRTUAL_SIZE):
+	Delete.
+	(REGISTER_CONVERT_FROM_TYPE, REGISTER_CONVERT_TO_TYPE): Convert
+	from macros to functions.
+
+	* mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
+	(mips_register_convertible, mips_register_convert_to_virtual,
+	mips_register_convert_to_raw): Make static.
+	(mips_read_sp): New function.
+	(mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
+	(mips_do_registers_info): Make static.
+	(mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
+	(in_sigtramp): Make static, rename to mips_pc_in_sigtramp.
+	(mips_register_convert_from_type, mips_register_convert_to_type):
+	New functions.
+	(mips_gdbarch_init): Set up function_start_offset, 
+	register_virtual_size, pc_in_sigtramp.
+
+2002-08-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* infcmd.c (vector_info): New function.
+	(_initialize_infcmd): Add command "info vector".
+	(print_vector_info): New function.
+
+	* gdbarch.sh (PRINT_VECTOR_INFO): New method
+	* gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* infcmd.c (do_registers_info): Rename parameter ``fpregs'' to
+	``print_all''.  Only print vector registers when ``print_all''.
+
+2002-08-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* i387-tdep.h (i387_print_float_info): Add `args' parameter.
+	* i387-tdep.c (i387_print_float_info): Add `args' parameter.
+
+	* gdbarch.sh (PRINT_FLOAT_INFO): Change to a predicate method.
+	Add `args' parameter.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	
+	* arm-tdep.c (arm_print_float_info): Add the parameter `args'.
+	
+	* infcmd.c (float_info): Call print_float_info.
+	(print_float_info): New function.  By default, print the
+	floating-point registers.
+
+	* arch-utils.h (default_print_float_info): Delete declaration.
+	* arch-utils.c (default_print_float_info): Delete function.
+	
+2002-08-16  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/nm-i386v.h (FLOAT_INFO): Remove already commented
+	out define.
+
+	* i387-tdep.c (i387_print_float_info): Add comment about ignoring
+	FRAME.
+
+	* NEWS: Mention that the i[3456]-*-aix target has been made obsolete.
+	* configure.host: Make i[3456]86-*-aix host obsolete.
+	* configure.tgt: Make i[3456]86-*-aix target obsolete.
+	* config/i386/i386aix.mh, config/i386/i386aix.mt,
+	config/i386/nm-i386aix.h, condig/i386/tm-i386aix.h,
+	config/i386/xm-i386aix.h: Make files obsolete.
+	* i386aix-nat.c: Make file obsolete.
+	* Makefile.in (ALLDEPFILES): Remove i386aix-nat.c.
+	(i386aix-nat.o): Make target obsolete.
+
+	* config/i386/nm-gnu.h: Removed.
+	* config/i386/nm-i386gnu.h: New file.
+	(THREAD_STATE_FLAVOR, THREAD_STATE_SIZE,
+	THREAD_STATE_SET_TRACED, THREAD_STATE_CLEAR_STATE, ATTACH_DETACH):
+	Moved here from ...
+	* config/i386/tm-i386gnu.h: ... here.  Removed.
+	* config/i386/xm-i386gnu.h: Removed.
+	* config/i386/i386gnu.mh (XM_FILE): Set to xm-i386.h.
+	(NAT_FILE): Set to nm-i386gnu.h.
+	* config/i386/i386gnu.mt (TDEPFILES): Add i386gnu-tdep.o.
+	* i386-tdep.c: New file.
+	* Makefile.in (ALLDEPFILES): Add i386gnu-nat.c and i386gnu-tdep.c.
+	(i386gnu-tdep.o): Specify dependencies.
+
+2002-08-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386sco5.h: Include "i386/tm-i386v4.h" instead of
+	"i386/tm-i386.h", "i386/tm-i386v.h" and "config/tm-sysv.h".
+	Adjust a few comments to reflect reality a bit closer.
+	(KERNEL_U_SIZE, TARGET_HAS_HARDWARE_WATCHPOINTS,
+	TARGET_CAN_USE_HARDWARE_WATCHPOINT, HAVE_CONTINUEABLE_WATCHPOINT,
+	HAVE_STEPPABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT,
+	target_insert_watchpoint, target_remove_watchpoint):
+	Move defines to ...
+	* config/i386/nm-i386sco5.h: ... here.
+	(kernel_u_size): Add prototype.  Improve a few comments and add
+	protection against multiple inclusion.
+	
+	* config/i386/nm-i386sco.h (FLOAT_INFO): Remove already commented
+	out define.
+
+	* uw-thread.c (SP_ARG0): Define if not already defined.
+	* config/i386/tm-i386.h (SO_ARG0): Remove define.
+
+	* config/i386/tm-i386v4.h (HAVE_I387_REGS): Remove define.
+
+	* config/i386/tm-i386.h: Don't include "regcache.h".
+
+	* i387-tdep.h (i387_print_float_info): New prototype.
+	* i387-tdep.c (print_i387_value, print_i387_ext,
+	print_i387_status_word, print_i387_control_word): Add `struct
+	ui_file *' argument and use it for output.
+	(i387_print_float_info): Renamed from i387_float_info.  Add
+	`struct gdbarch *' and `struct ui_file *' arguments and use the
+	latter for output.
+	* i386-tdep.c: Include "i387-tdep.h".
+	(i386_gdbarch_init): Set print_float_info.
+	* config/i386/tm-i386.h (i387_float_info): Remove prototype.
+	(FLOAT_INFO): Remove define.
+
+2002-08-13  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_push_arguments): Rename to
+	mips_eabi_push_arguments, and tune for EABI.
+	(MIPS_REGS_HAVE_HOME_P): Delete.
+	(struct gdbarch_tdep): Remove mips_regs_have_home_p field.
+	(mips_gdbarch_init): Set gdbarch push_arguments for eabi.
+	Delete references to mips_regs_have_home_p.
+
+2002-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* Makefile.in (install-gdbtk): Create insight plugin directory.
+	Install plugins.tcl file.
+
+2002-08-14  Keith Seitz  <keiths@redhat.com>
+
+	* configure.in: Move SUBDIRS to near top of the file so that
+	--enable options may add things to it.
+	If gdbtk is enabled, add gdbtk directory to SUBDIRS and configdirs.
+	* configure: Regenerate.
+
+2002-08-13  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_o32o64_push_arguments):  New function, 
+	cloned from mips_push_arguments, tuned for o32/o64 ABI.
+	(mips_gdbarch_init): Set gdbarch_push_arguments to new func.
+
+2002-08-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* vax-tdep.c (vax_get_saved_register): Delete function.
+	(vax_gdbarch_init): Update.
+	* ns32k-tdep.c (ns32k_get_saved_register): Delete function.
+	(ns32k_gdbarch_init): Update.
+	* alpha-tdep.c (alpha_get_saved_register): Delete function.
+	(alpha_gdbarch_init): Update.
+
+2002-08-13  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (init_regcache_descr): Overallocate the
+	raw_register_valid_p array including space for NUM_PSEUDO_REGS.
+	(registers_changed): Replace NUM_REGS+NUM_PSEUDO_REGS with
+	nr_raw_registers.
+	(set_register_cached): Add range checking assertions.  Use
+	current_regcache.
+
+2002-08-13  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.c (i386_stab_reg_to_regnum): Return correct register
+	numbers for MMX registers.
+
+2002-08-13  Andrew Cagney  <cagney@redhat.com>
+
+	* i386-tdep.c (i386_gdbarch_init): Use
+	generic_unwind_get_saved_register.
+
+2002-08-13  Kevin Buettner  <kevinb@redhat.com>
+
+	* procfs.c (procfs_can_use_hw_breakpoint): New function.
+	(init_procfs_ops): Define ``to_can_use_hw_breakpoint'' for procfs
+	target vector.
+	* config/mips/nm-irix5.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT):
+	Delete.  Add comment regarding this now-deleted target method.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-tdep.c (M68HC12_NUM_PSEUDO_REGS): New define.
+	(M68HC12_HARD_PC_REGNUM): Define specific PC for 68HC12 (pseudo reg).
+	(m68hc11_pseudo_register_read): Compute the 68HC12 PC using the
+	real PC and the page number (if it's within the memory bank window).
+	(m68hc11_pseudo_register_write): Likewise when saving.
+	(m68hc11_register_name): Name the virtual pc 'pc' and the real one ppc.
+	(m68hc11_register_virtual_type): Return uint32 for virtual pc.
+	(m68hc11_register_raw_size): And use 32-bit for it.
+	(m68hc11_gdbarch_init): Use 32-bit address for 68HC12 if the
+	16K memory bank is used by the prog; also use the virtual pc.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-tdep.c (m68hc11_elf_make_msymbol_special): New function.
+	(m68hc11_gdbarch_init): Install it in gdbarch.
+	(MSYMBOL_SET_RTC, MSYMBOL_SET_RTI): New to set symbol specific flags.
+	(MSYMBOL_IS_RTC, MSYMBOL_IS_RTI): New to test these flags.
+	(MSYMBOL_SIZE): New for documentation.
+	(insn_return_kind): Enum to specify how a function returns.
+	(frame_extra_info): Cleanup and record the return mode.
+	(gdbarch_tdep, USE_PAGE_REGISTER): New to control the use of page 
+	register in address computation.
+	(m68hc11_get_return_insn): New to obtain the return instruction used
+	by the function.
+	(m68hc11_frame_init_saved_regs): Take into account the return
+	instruction used by the function for far and interrupt functions.
+	(m68hc11_init_extra_frame_info): Take into account page register.
+	(m68hc11_frame_args_address): Adjust according to the return mode.
+	(show_regs): Print page register only when it's used.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-tdep.c (HARD_PAGE_REGNUM): Define for 68HC12 page register.
+	(M68HC11_LAST_HARD_REG, m68hc11_register_names): Update.
+	(m68hc11_register_virtual_type): Return a 8-bit type for 8-bit
+	registers.
+	(m68hc11_register_raw_size): Likewise.
+
+2002-08-13  Andrew Cagney  <cagney@redhat.com>
+
+	* i386-tdep.c (i386_register_name): Handle mmx registers.
+	(mmx_regnum_p): New function.
+	(i386_mmx_names): New array.
+	(mmx_num_regs): New variable.
+	(i386_pseudo_register_read): New function.
+	(i386_pseudo_register_write): New function.
+	(mmx_regnum_to_fp_regnum): New function. Code from Fernando Nasser.
+
+	* regcache.c (regcache_raw_read_unsigned): New function.
+	(regcache_raw_read_signed): New function.
+	* regcache.h (regcache_raw_read_unsigned): Declare.
+	(regcache_raw_read_signed): Declare.
+
+2002-08-13  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (regcache_raw_read_as_address): Delete function.
+	(regcache_cooked_read_signed): New function.
+	(regcache_cooked_read_unsigned): New function.
+	* regcache.h (regcache_cooked_read_signed): Declare.
+	(regcache_cooked_read_unsigned): Declare.
+	(regcache_raw_read_as_address): Delete declaration.
+
+	* blockframe.c (generic_read_register_dummy): Use
+	regcache_cooked_read_unsigned.
+	* i386-tdep.c (i386_extract_struct_value_address): Use
+	regcache_cooked_read_unsigned.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-tdep.c (m68hc11_gdbarch_init): Set int, double and long
+	double sizes according to ELF ABI flags.
+	(gdbarch_tdep): Record elf_flags.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-tdep.c (M6812_OP_PSHX, M6812_OP_PSHY): New defines.
+	(m6812_prolog): They can appear in 68HC12 function prologue.
+	(m68hc11_frame_chain): Cleanup.
+
+2002-08-12  Andrew Cagney  <cagney@redhat.com>
+
+	* i386-tdep.h (i386_register_byte, i386_register_raw_size): Delete
+	declarations.
+	* i386-linux-tdep.c (i386_linux_register_byte): Delete function.
+	(i386_linux_register_raw_size): Delete function.
+	(i386_linux_init_abi): Update.
+	* i386-tdep.c (i386_register_raw_size): Delete function.
+	(i386_register_byte): Delete function.
+	(i386_gdbarch_init): Update.
+	(i386_register_size): Delete array.
+	(i386_register_offset): Delete array.
+
+	* config/i386/tm-symmetry.h (REGISTER_BYTE): Delete macro.
+	(REGISTER_RAW_SIZE): Delete macro.
+	* config/i386/tm-ptx.h (REGISTER_RAW_SIZE): Delete macro.
+	(REGISTER_BYTE): Delete macro.
+
+2002-08-11  Aidan Skinner <aidan@velvet.net>
+
+	* ada-lang.c (ada_lookup_partial_symbol)
+	(to_fixed_variant_branch_type) (find_line_in_linetable): Fix
+	prototype names so that grep ^func works properly.
+
+	* ada-lang.c (ada_array_element_type)
+	(ada_lookup_partial_symbol): Fix typos in parameter list.
+
+	* ada-valprint.c (val_print_packed_array_elements) (ada_val_print_1):
+	Fix prototype names so that grep ^func works properly.
+ 	
+2002-08-10  Andrew Cagney  <cagney@redhat.com>
+	    Elena Zannoni  <ezannoni@redhat.com>
+	    Martin M. Hunt  <hunt@redhat.com>
+
+	* gdbtypes.c (build_builtin_type_vec128): Set the vector bit.
+	(build_builtin_type_vec128i): Set the vector bit.
+	* gdbtypes.h (builtin_type_vec64, builtin_type_vec64i): Declare.
+	* gdbtypes.c (builtin_type_vec64, builtin_type_vec64i): Define.
+	(build_builtin_type_vec64): New function.
+	(build_builtin_type_vec64i): New function.
+	(build_gdbtypes): Initialize builtin_type_vec64 and
+	builtin_type_vec64i.
+
+2002-08-09  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (regcache_dump): Compare the register offset
+	with REGISTER_BYTE.
+	* arch-utils.c (generic_register_byte): New function.
+	* arch-utils.h (generic_register_byte): Declare.
+	* gdbarch.sh (REGISTER_BYTE): Default to generic_register_byte.
+	* gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-09  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c: Include "gdbcmd.h"
+	(_initialize_regcache): Add commands "maintenance print
+	registers", "maintenance print raw-registers" and "maintenance
+	print cooked-registers".
+	(enum regcache_dump_what): Define.
+	(dump_endian_bytes): New function.
+	(regcache_dump): New function.
+	(regcache_print): New function.
+	(maintenance_print_registers): New function.
+	(maintenance_print_raw_registers): New function.
+	(maintenance_print_cooked_registers): New function.
+	* Makefile.in (regcache.o): Update dependencies.
+
+2002-08-09  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (ROUND_DOWN, ROUND_UP): Move to global scope.
+	(mips_push_arguments): Correct some comments.  Use paddr_nz
+	for printing addresses in debug output.  Replace static
+	allocation using MAX_REGISTER_RAW_SIZE with alloca.
+	(mips_n32n64_push_arguments): New function, cloned from
+	mips_push_arguments and tuned for the n32/n64 ABI.
+	(mips_push_register): Buffer needs dynamic allocation.
+	(mips_print_register): Ditto.
+	(do_gp_register_row): Ditto.
+	(mips_store_return_value): Ditto.
+	(mips_gdbarch_init): Set gdbarch_push_arguments per ABI.
+
+2002-08-09  Don Howard  <dhoward@redhat.com>
+
+	* memattr.c (mem_info_command): Print special case of upper bound
+	as max CORE_ADDR + 1.
+
+2002-08-08  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c (mips_n32n64_use_struct_convention): N32 only 
+	returns structs by ref if they're too big to fit in two registers.
+
+2002-08-09  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
+	saved regs value.
+	(read_next_frame_reg): Call FRAME_INIT_SAVED_REGS instead of
+	mips_find_saved_regs().
+	(mips_pop_frame): Likewise.
+
+2002-08-09  Kevin Buettner  <kevinb@redhat.com>
+
+	* blockframe.c (frame_saved_regs_register_unwind): Revise
+	PC_IN_CALL_DUMMY assertion to only apply when generic dummy
+	frames are in use.
+
+2002-08-09  Grace Sainsbury  <graces@redhat.com>
+        
+	* remote.c: (remote_wait, remote_async_wait): Add check for awatch
+        T-packets; the 'a' is not taken as a register number.
+	(remote_check_watch_resources, remote_stopped_by_watchpoint)
+        (remote_stopped_data_address): New functions; add to target
+        vector.
+        (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Change
+        prototypes to match other implementations of this
+        function. replace integer argument with pointer -- the length
+        field in the Z-packet is the length of what is pointed to or 1 if
+        pointer is null. Add to target vector.
+        (remote_insert_watchpoint, remote_remove_watchpoint): Add to
+        target vector.
+
+        From Mark Salter:
+        * remote.c (remote_wait): Add support to extract optional
+        watchpoint information from T-packet. Ignore unrecognized
+        optional info in T-packet.
+        (remote_async_wait): Ditto.
+
+2002-08-09  Corinna Vinschen  <vinschen@redhat.com>
+
+	* cli/cli-dump.c: Change fopen modes to use binary open modes
+	as defined in include/fopen-bin.h throughout.
+
+2002-08-08  Michael Snyder  <msnyder@redhat.com>
+
+	* mips-tdep.c: Minor whitespace and indentation clean-ups.
+
+2002-08-08  Kevin Buettner  <kevinb@redhat.com>
+
+	* doublest.c (store_floating): Avoid floatformat_from_doublest()
+	assertion failure by returning early after a warning.
+
+2002-08-08  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_find_saved_regs): Make static.
+	(mips_frame_init_saved_regs): New function.
+	(mips_gdbarch_init): Setup FRAME_INIT_SAVED_REGS method.
+	* config/mips/tm-mips.h (FRAME_INIT_SAVED_REGS): Delete macro.
+	(mips_find_saved_regs): Delete declaration.
+
+2002-08-08  Grace Sainsbury  <graces@redhat.com>
+
+	* remote.c (remote_wait, remote_async_wait): Change
+        thread_num from int to ULONGEST.
+	(unpack_varlen_hex): Change result parameter from
+	int * to ULONGEST *.
+
+2002-08-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure.tgt: Replace powerpc-*-sysv*, powerpc-*-elf*,
+	powerpcle-*-eabi*, powerpcle-*-sysv* and powerpcle-*-elf* with
+	powerpc*-*-*.
+	* MAINTAINERS: Remove redundant rs6000-ibm-aix4.1 target.
+
+2002-08-08  Andrew Cagney  <cagney@redhat.com>
+
+	* gcore.c (override_derive_stack_segment): Delete variable.
+	(preempt_derive_stack_segment): Delete function.
+	(derive_stack_segment): Delete function.
+	(default_derive_stack_segment): Renamed to derive_stack_segment.
+	(override_derive_heap_segment): Delete variable.
+	(preempt_derive_heap_segment): Delete function.
+	(derive_heap_segment): Delete function.
+	(default_derive_heap_segment): Rename to derive_heap_segment.
+
+2002-08-06  Michael Snyder  <msnyder@redhat.com>
+
+	* config/mips/tm-mips.h: Remove #define USE_STRUCT_CONVENTION.
+	* mips-tdep.c (mips_EABI_use_struct_convention, 
+	mips_OABI_use_struct_convention, mips_NABI_use_struct_convention):
+	New functions.  (mips_use_struct_convention): Delete.
+	(mips_gdbarch_init): set use_gdbarch_convention.
+
+2002-08-06  Michael Snyder  <msnyder@redhat.com>
+
+	*  mips-tdep.c: gdbarch-ify reg_struct_has_addr.
+	(mips_eabi_reg_struct_has_addr, mips_n32n64_reg_struct_has_addr, 
+	mips_o32_reg_struct_has_addr): New functions.
+	(mips_gdbarch_init): Set gdbarch reg_struct_has_addr.
+
+2002-08-07  Andrew Cagney  <ac131313@redhat.com>
+
+	* regcache.c (pseudo_register): Delete function.
+	(fetch_register): Delete function.
+	(store_register): Delete function.
+	(regcache_raw_read, legacy_read_register_gen): Use
+	target_fetch_registers instead of fetch_register.
+	(legacy_write_register_gen, regcache_raw_write): Use
+	target_store_register instead of store_register.
+	(write_register_bytes): Ditto.
+
+	* gdbarch.sh (FETCH_PSEUDO_REGISTER): Delete.
+	(STORE_PSEUDO_REGISTER): Delete.
+	* gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-06  Corinna Vinschen  <vinschen@redhat.com>
+
+	* cli/cli-dump.c (add_dump_command): Explicitely use "b" flag to
+	write dump file binary.
+
+2002-08-05  Michael Snyder  <msnyder@redhat.com>
+
+	*  mips-tdep.c (mips_find_saved_regs): Adjust stack according
+	to MIPS_SAVED_REGSIZE, not GDB_TARGET_IS_MIPS64.  Enhance comment.
+	(mips_gdbarch_init): Set N32 target to be mips64.
+
+2002-08-06  Kevin Buettner  <kevinb@redhat.com>
+
+	* frame.c (find_saved_register): Break out of loop once saved
+	register address is found.  Don't mention sparc in loop comment
+	anymore.
+
+2002-08-06  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set
+	mips_default_saved_regsize to 8.
+
+2002-08-06  Andrew Cagney  <ac131313@redhat.com>
+
+	* gcore.c: Do not include <sys/procfs.h>.
+	* Makefile.in (gcore.o): Update dependencies.
+
+2002-08-06  Andrew Cagney  <cagney@redhat.com>
+
+	* configure.tgt: Make arc-*-* obsolete.
+	* NEWS: Mention that arc-*-* has been identifed as obsolete.
+	* MAINTAINERS: Make arc-elf obsolete.
+	* arc-tdep.c: Make file obsolete.
+	* config/arc/arc.mt: Ditto.
+	* config/arc/tm-arc.h: Ditto.
+
+2002-08-05  Theodore A. Roth  <troth@verinet.com>
+
+	* avr-tdep.c (avr_skip_prologue): Fix to return the correct pc.
+
+2002-08-05  Andrew Cagney  <ac131313@redhat.com>
+
+	* mcore-tdep.c (mcore_gdbarch_init): Use
+	generic_unwind_get_saved_register instead of
+	generic_get_saved_register.
+	* v850-tdep.c (v850_gdbarch_init): Ditto.
+	* frv-tdep.c (frv_gdbarch_init): Ditto.
+	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+	* s390-tdep.c (s390_gdbarch_init): Ditto.
+	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
+	* config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Ditto.
+	* config/h8300/tm-h8300.h (GET_SAVED_REGISTER): Ditto.
+
+2002-08-05  Joel Brobecker  <brobecker@gnat.com>
+
+	* objfiles.h: Add missing #include "symfile.h"
+
+	* Makefile.in (objfiles_h): Add dependency on symfile.h and dependents.
+
+2002-08-04  Andrew Cagney  <ac131313@redhat.com>
+
+	From 2002-08-01 david carlton <carlton@math.stanford.edu>:
+	* hpread.c (hpread_read_struct_type): Deleted superfluous setting
+	of FIELD_BITSIZE.
+
+2002-08-04  Daniel Jacobowitz  <drow@mvista.com>
+
+	* NEWS: Cleanup and nitpick.
+
+2002-08-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* NEWS: Cleanup.  Use *-linux*-gnu*.  Only use `*' for headings.
+
+2002-08-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (gdbtk-bp.o): Update dependencies.
+	(gdbtk-register.o): Ditto.
+	(gdbtk-varobj.o): Ditto.
+
+2002-08-03  Andrew Cagney  <cagney@redhat.com>
+
+	* m68hc11-tdep.c (m68hc11_pseudo_register_read): Replace
+	m68hc11_fetch_pseudo_register.
+	(m68hc11_pseudo_register_write): Replace
+	m68hc11_store_pseudo_register.
+	(m68hc11_gdbarch_init): Update.
+
+Fri Aug  2 15:53:50 2002  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbarch.sh: Include "gdb_string.h".
+	* gdbarch.c: Regenerate.
+
+	* regcache.c: Include "gdb_string.h".
+	* ax-general.c: Ditto.
+	* varobj.c: Ditto.
+	* std-regs.c: Ditto.
+	* fbsd-proc.c: Ditto.
+	* thread.c: Ditto.
+
+	* Makefile.in (regcache.o): Update dependencies.
+	(thread.o, gdbarch.o): Ditto.
+	(ax-general.o, gdbarch.o): Ditto.
+	(varobj.o, std-regs.o): Ditto.
+	(fbsd-proc.o): Specify dependencies.
+
+2002-08-02  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (regcache_cooked_read): Rename rawnum parameter to
+	regnum.
+	(regcache_cooked_write): Ditto.
+
+2002-08-02  Andrew Cagney  <ac131313@redhat.com>
+
+	* regcache.c (regcache_cooked_read): New function.
+	(regcache_cooked_write): New function.
+	(read_register_gen): Rewrite using regcache_cooked_read.
+	(write_register_gen): Rewrite using regcache_cooked_write.
+
+	* regcache.h (regcache_cooked_read, regcache_cooked_write):
+	Declare.
+
+2002-08-02  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbarch.sh (pseudo_register_read, pseudo_register_write):
+	Replace the architecture methods register_read and register_write.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* regcache.c (init_regcache_descr): Update.
+	(read_register_gen): Update.
+	(write_register_gen): Update.
+	(supply_register): Update comment.
+
+	* sh-tdep.c (sh_gdbarch_init): Update.
+	(sh_pseudo_register_read, sh64_pseudo_register_read): Add
+	`regcache' and `gdbarch' parameters.  Make `buffer' a void
+	pointer.  Update code.
+	(sh_pseudo_register_write, sh64_pseudo_register_write): Add
+	`regcache' and `gdbarch' parameters.  Make `buffer' a constant
+	void pointer.  Update code.
+	(sh64_register_write): Delete.
+	(sh4_register_read): Delete.
+	(sh64_register_read): Delete.
+	(sh4_register_write): Delete.
+	(sh_sh4_register_convert_to_raw): Make `from' parameter a constant
+	void pointer, `to' parameter a void pointer.
+	(sh_sh64_register_convert_to_raw): Ditto.
+
+2002-08-01  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_register_virtual_type): Use architecture
+	invariant return values.
+
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* linux-proc.c: Include "gdb_string.h".
+	* Makefile.in (linux-proc.o): Update dependency list.
+
+2002-08-01  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_gdbarch_init): Add comments.  Fix typo in
+	comment.
+
+2002-08-01  Grace Sainsbury  <graces@redhat.com>
+
+	* target.h: Add to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+	to_insert_watchpoint, to_remove_watchpoint,
+	to_stopped_by_watchpoint, to_stopped_data_address,
+	to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint to
+	target vecctor. Define their corresponding macros so they call
+	them.
+	
+	* target.c: Add default and debug versions of for
+	to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+	to_insert_watchpoint, to_remove_watchpoint,
+	to_stopped_by_watchpoint, to_stopped_data_address,
+	to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint.
+
+2002-08-01  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_register_virtual_type): New function.
+	(mips_gdbarch_init): Register mips_register_virtual_type()
+	with gdbarch machinery.
+	* config/mips/tm-irix6.h (mips/tm-bigmips64.h): Include
+	this file instead of tm-bigmips.h.
+	(MIPS_REGSIZE): Delete this macro.
+	(REGISTER_VIRTUAL_TYPE): Delete macro.  Undef macro so that
+	multiarch version in mips-tdep.c will be found.
+
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* NEWS: Menion that CHILL has been made obsolete.
+
+	* gdbtypes.c (chill_varying_type): Make chill references obsolete.
+	* stabsread.c (read_range_type): Ditto.
+	* gdbtypes.h: Ditto.
+	* language.c (binop_type_check): Ditto.
+	(binop_result_type): Ditto.
+	(integral_type): Ditto.
+	(character_type): Ditto.
+	(string_type): Ditto.
+	(boolean_type): Ditto.
+	(structured_type): Ditto.
+	(lang_bool_type): Ditto.
+	(binop_type_check): Ditto.
+	* language.h (_LANG_chill): Ditto.
+	* dwarfread.c (set_cu_language): Ditto.
+	* dwarfread.c (CHILL_PRODUCER): Ditto.
+	* dwarfread.c (handle_producer): Ditto.
+	* expression.h (enum exp_opcode): Ditto.
+	* eval.c: Ditto for comments.
+	* typeprint.c (typedef_print) [_LANG_chill]: Ditto.
+	* expprint.c (print_subexp): Ditto.
+	(print_subexp): Ditto.
+	* valops.c (value_cast): Ditto.
+	(search_struct_field): Ditto.
+	* value.h (COERCE_VARYING_ARRAY): Ditto.
+	* symfile.c (init_filename_language_table): Ditto.
+	(add_psymbol_with_dem_name_to_list): Ditto.
+	* valarith.c (value_binop): Ditto.
+	(value_neg): Ditto.
+	* valops.c (value_slice): Ditto.
+	* symtab.h (union language_specific): Ditto.
+	(SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
+	(SYMBOL_DEMANGLED_NAME): Ditto.
+	(SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
+	* defs.h (enum language): Ditto.
+	* symtab.c (got_symtab): Ditto.
+	* utils.c (fprintf_symbol_filtered): Ditto.
+
+	* ch-typeprint.c: Make file obsolete.
+	* ch-valprint.c: Make file obsolete.
+	* ch-lang.h: Make file obsolete.
+	* ch-exp.c: Make file obsolete.
+	* ch-lang.c: Make file obsolete.
+
+	* Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
+	CHILL_LIB.
+	(TARGET_FLAGS_TO_PASS): Ditto.
+	(CHILLFLAGS): Obsolete.
+	(CHILL): Obsolete.
+	(CHILL_FOR_TARGET): Obsolete.
+	(CHILL_LIB): Obsolete.
+	(SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
+	ch-valprint.c.
+	(HFILES_NO_SRCDIR): Remove ch-lang.h.
+	(COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
+	ch-lang.o.
+	(ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
+	targets.
+
+2002-07-31  Joel Brobecker  <brobecker@gnat.com>
+
+	* dwarf2read.c (set_cu_language): Add handler for LANG_Ada95.
+	This does not change anything at the moment, but will be helpful
+	later when full Ada support is integrated.
+
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (_initialize_mips_tdep): Add "n64" to "set mips abi"
+	help message.
+
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_push_arguments): Fetch gdbarch_tdep struct
+	and save it in a local variable.  Use variable in later test.
+
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (mips_find_abi_section): Add N64 ABI recognition
+	test.  (Thanks to Daniel Jacobowitz.)
+	
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* mips-tdep.c (enum mips_abi): Add MIPS_ABI_N64.
+	(mips_abi_strings): Add "n64".
+	(mips_gdbarch_init): Add test for n64 abi.  Add MIPS_ABI_N64 case.
+
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* config/mips/tm-irix6.h (MIPS_REGSIZE): Define to be 8.
+	(REGISTER_VIRTUAL_TYPE): Some registers are now 64 bits wide.
+
+2002-07-31  Kevin Buettner  <kevinb@redhat.com>
+
+	* utils.c (host_pointer_to_address, address_to_host_pointer):
+	Use gdb_assert() instead of explicit call to internal_error().
+
+2002-07-30  Kevin Buettner  <kevinb@redhat.com>
+
+	* Makefile.in (rs6000-nat.o): Update dependencies.
+
+	From Nicholas Duffek:
+	* Makefile.in (ALLDEPFILES): Add aix-thread.c.
+	(aix-thread.o): New rule.
+	* configure.host (gdb_host): Set to aix432 on AIX 4.3.2+.
+	* config/powerpc/aix432.mh: New file.
+
+2002-07-30  Daniel Jacobowitz  <drow@mvista.com>
+
+	* ppc-linux-tdep.c (ELF_NGREG, ELF_NFPREG, ELF_NVRREG)
+	(ELF_FPREGSET_SIZE, ELF_GREGSET_SIZE): New enums.
+	(fetch_core_registers, ppc_linux_supply_gregset)
+	(ppc_linux_supply_fpregset): New functions.
+	(ppc_linux_regset_core_fns): New.
+	(_initialize_ppc_linux_tdep): Call add_core_fns.
+	* ppc-tdep.h: Add prototypes for ppc_linux_supply_fpregset
+	and ppc_linux_supply_gregset.
+	* ppc-linux-nat.c (supply_gregset): Call ppc_linux_supply_gregset.
+	(supply_fpregset): Call ppc_linux_supply_fpregset.
+	* config/powerpc/linux.mh (NATDEPFILES): Remove core-regset.o and
+	corelow.o.
+	* config/powerpc/linux.mt (TDEPFILES): Add corelow.o.
+
+2002-07-30  Daniel Jacobowitz  <drow@mvista.com>
+
+	* symtab.c (lookup_symbol): Demangle before lowercasing.
+
+2002-07-30  Andrew Cagney  <ac131313@redhat.com>
+
+	* symtab.h: Replace #include "gdb_obstack.h" with opaque
+	declaration.
+	* cli/cli-cmds.c, cli/cli-script.c: Include "gdb_string.h".
+	* gnu-v3-abi.c, arc-tdep.c, cli/cli-decode.c: Ditto.
+	* avr-tdep.c, mon960-rom.c, i960-tdep.c: Ditto.
+	* arch-utils.c, cli/cli-setshow.c: Unconditionally include
+	"gdb_string.h".
+	* Makefile.in (cli-script.o, cli-cmds.o): Update dependencies.
+	(gnu-v3-abi.o, cli-setshow.o, i960-tdep.o): Ditto.
+	(cli-decode.o, mi-cmd-var.o, mi-cmd-disas.o): Ditto.
+	(avr-tdep.o, mon960-rom.o): Ditto.
+	(aout_stabs_gnu_h): Define.
+	(symtab_h): Remove $(gdb_obstack_h).
+
+2002-07-30  Jim Blandy  <jimb@redhat.com>
+
+	Patch from David Carlton <carlton@math.stanford.edu>:
+	* gdbinit.in: Move the `dir' commands that add GDB's own source
+	directory to the search path to the end, so that the `gdb' source
+	directory will be searched first.
+
+2002-07-29  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb_obstack.h: New file.
+	* symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
+	(obstack_chunk_alloc, obstack_chunk_free): Delete macros.
+	* objfiles.h: Include "gdb_obstack.h".
+	* Makefile.in (gdb_obstack_h): Define.
+	(symtab_h): Add $(gdb_obstack_h).
+	(objfiles_h): Add $(gdb_obstack_h).
+	
+	* objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
+	* macrotab.c, cp-valprint.c, dbxread.c: Ditto.
+	* ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
+	* macroexp.c, p-typeprint.c, stabsread.c: Ditto.
+	* symtab.c, f-typeprint.c, mdebugread.c: Ditto.
+	* p-valprint.c, symmisc.c, typeprint.c: Ditto.
+	* symfile.c, coffread.c, c-typeprint.c: Ditto.
+	* buildsym.c, bcache.c, ada-typeprint.c: Ditto.
+
+	* Makefile.in (bcache.o): Update dependencies.
+	(buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
+	(ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
+	(dbxread.o, dstread.o, f-typeprint.o): Ditto.
+	(objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
+	(stabsread.o, symfile.o, symmisc.o): Ditto.
+	(symtab.o, typeprint.o, macroexp.o): Ditto.
+	(macrotab.o, mdebugread.o): Ditto.
+	(f_lang_h, coff_sym_h, coff_symconst_h): Define.
+	(coff_ecoff_h, aout_aout64_h): Define.
+	(aout_stabs_gnu_h, libaout_h): Define.
+
+2002-07-29  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (struct regcache_descr): Rename nr_registers to
+	nr_cooked_registers.  Revise comments describing the structure
+	member fields.
+	(init_regcache_descr): Update.
+	(init_legacy_regcache_descr): Update.
+	(read_register_gen, write_register_gen): When a cooked register in
+	the raw register range, directly access the value from the raw
+	register cache.
+
+2002-07-29  Andrew Cagney  <ac131313@redhat.com>
+
+	* z8k-tdep.c: Do not include "obstack.h".
+	* h8300-tdep.c, h8500-tdep.c: Ditto.
+	* m68hc11-tdep.c, sh-tdep.c: Ditto.
+	* valprint.c, v850-tdep.c: Ditto.
+	* d10v-tdep.c, mn10300-tdep.c: Ditto.
+	* mn10200-tdep.c: Ditto.
+
+	* Makefile.in (z8k-tdep.o): Update dependencies.
+	(m68hc11-tdep.o, valprint.o): Ditto.
+	(v850-tdep.o, d10v-tdep.o): Ditto.
+	(mn10300-tdep.o, sparc-tdep.o): Ditto.
+	(sh-tdep.o, h8500-tdep.o, h8300-tdep.o): Ditto.
+	(m32r-tdep.o, mn10200-tdep.o): Specify dependencies.
+	(sh_opc_h, gdb_sim_sh_h): Define.
+	(elf_sh_h, elf_bfd_h): Define.
+	(opcode_m68hc11_h): Define.
+	(OPCODES_SRC, OPCODES_DIR): define.
+	(OPCODES): Use $(OPCODES_DIR).
+	(gdb_sim_d10v_h): Rename sim_d10v_h.
+	(gdb_sim_arm_h): Rename sim_arm_h.
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* utils.c (host_pointer_to_address, address_to_host_pointer):
+	Change internal_error() message to indicate function responsible
+	for the error.
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* ui-out.c (ui_out_field_core_addr): Remove unnecessary cast in
+	calls to local_hex_string_custom().
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* irix5-nat.c: Move IRIX shared library support from here...
+	* solib-irix.c: ...to here.  Revised substantially to work with
+	generic solib framework.
+
+	* osabi.h (gdb_osabi): Add new enum constant GDB_OSABI_IRIX.
+	* osabi.c (gdb_osabi_names): Add corresponding string for Irix.
+	* mips-irix-tdep.c: New file.
+
+	* Makefile.in (ALLDEPFILES): Add mips-irix-tdep.c and solib-irix.c.
+	(mips-irix-tdep.o, solib-irix.o): New rules.
+	* config/mips/irix5.mt (TDEPFILES): Add mips-irix-tdep.o, solib.o,
+	solib-irix.o.
+	* config/mips/irix6.mt (TDEPFILES): Likewise.
+	* config/mips/irix6.mh (NATDEPFILES): Remove solib.o.
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (coff/internal.h, bfd/libcoff.h, pthread.h): Remove
+	disabled (via ``#if 0'') includes.
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
+	(fetch_regs_user_thread, fetch_regs_kernel_thread, fill_sprs64)
+	(fill_sprs32, store_regs_user_thread, store_regs_kernel_thread):
+	Add support for the fpscr register.
+	* rs6000-nat.c (regmap, fetch_inferior_registers)
+	(store_inferior_registers, fetch_core_registers): Likewise.
+
+2002-07-26  Kevin Buettner  <kevinb@redhat.com>
+
+	* rs6000-nat.c (language.h): Include.
+	(special_regs): Delete this array.
+	(regmap): New function.
+	(fetch_register, store_register):  Use regmap() to map gdb
+	register numbers to ptrace register numbers.  Also, use
+	outputs from regmap() to make decisions regarding type of
+	ptrace() call to make.  In particular, don't compare against
+	FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+	(fetch_inferior_registers, store_inferior_registers): Where
+	possible, obtain register numbers from tdep struct.  Don't
+	refer to FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+	* config/rs6000/tm-rs6000.h (FIRST_UISA_SP_REGNUM)
+	(LAST_UISA_SP_REGNUM): Delete.
+	
+2002-07-25  Kevin Buettner  <kevinb@redhat.com>
+
+	* rs6000-nat.c (ppc-tdep.h): Include.
+	(fetch_registers, store_register, fetch_core_registers): Don't
+	access registers[] directly.  Instead, use supply_register() or
+	regcache_collect() as appropriate.
+	(find_toc_address): Format hex address with local_hex_string().
+
+2002-07-25  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/djgpp/fnchange.lst: Rename bfd/elf32-fr30.c and
+	bfd/elf32-frv.c.
+
+2002-07-24  Tom Tromey  <tromey@redhat.com>
+
+	* jv-exp.y: Marked all strings with _().
+	(ClassInstanceCreationExpression, ArrayCreationExpression): Use
+	internal_error.
+	(MethodInvocation, CastExpression, parse_number, yyerror,
+	java_type_from_name, push_expression_name, yylex): Typo fixes.
+
+2002-07-24  Daniel Jacobowitz  <drow@mvista.com>
+
+	* ui-file.c (struct tee_file, tee_file_new, tee_file_delete)
+	(tee_file_flush, tee_file_write, tee_file_fputs)
+	(tee_file_isatty): New.
+	* ui-file.h (tee_file_new): Add prototype.
+
+2002-07-24  Aidan Skinner <aidan@velvet.net>
+
+	* ada-lang.c: Change k&r style function definitions to prototyped
+	form.
+	* ada-typeprint.c: Change k&r style function definitions to prototyped
+	form.
+	* ada-valprint.c: Change k&r style function definitions to prototyped
+	form.
+	
+2002-07-24  Andrew Cagney  <cagney@redhat.com>
+
+	* README: Remove reference to remote-bug.
+	* Makefile.in (ALLDEPFILES): Remove m88k-nat.c, m88k-tdep.c and
+	remote-bug.c.
+	(m88k-nat.o): Delete rule.
+	(m88k-tdep.o): Delete rule.
+	(remote-bug.o): Delete rule.
+	* MAINTAINERS: Mark as obsolete.
+	* elfread.c (elf_symtab_read): Mention that m88k is obsolete.
+	* m88k-tdep.c: Make file obsolete.
+	* config/m88k/m88k.mh: Ditto.
+	* config/m88k/delta88v4.mh: Ditto.
+	* config/m88k/delta88v4.mt: Ditto.
+	* config/m88k/delta88.mt: Ditto.
+	* config/m88k/delta88.mh: Ditto.
+	* remote-bug.c: Ditto.
+	* config/m88k/tm-delta88.h: Ditto.
+	* config/m88k/nm-delta88v4.h: Ditto.
+	* config/m88k/xm-delta88.h: Ditto.
+	* config/m88k/xm-dgux.h: Ditto.
+	* config/m88k/tm-m88k.h: Ditto.
+	* config/m88k/nm-m88k.h: Ditto.
+	* config/m88k/tm-delta88v4.h: Ditto.
+	* m88k-nat.c: Ditto.
+	* cxux-nat.c: Ditto.
+	* configure.host: Make m88*-motorola-sysv4*, m88*-motorola-sysv*
+	and m88*-*-* obsolete.
+	* configure.tgt: Make m88*-motorola-sysv4*, m88*-motorola-* and
+	m88*-*-* obsolete.
+
+2002-07-24  Andrew Cagney  <cagney@redhat.com>
+
+	* findvar.c (extract_unsigned_integer): Make `addr' parameter
+	constant.  Same for local pointer variables.
+	(extract_signed_integer): Ditto.
+	* defs.h (extract_unsigned_integer): Update.
+	(extract_signed_integer): Update.
+
+2002-07-24  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.c (regcache_raw_write): Change buf parameter to a
+	constant void pointer.
+	(regcache_raw_read): Change buf parameter to a void pointer.
+	(legacy_write_register_gen): Change myaddr parameter a constant
+	void pointer.
+	(supply_register): Change val parameter to a const void pointer.
+	* regcache.h (regcache_raw_write): Update declaration.
+	(regcache_raw_read): Update declaration.
+	(supply_register): Update declaration.
+
+2002-07-24  Tom Tromey  <tromey@redhat.com>
+
+	* defs.h (gdb_readline_wrapper): Declare.
+	* utils.c (prompt_for_continue): Use gdb_readline_wrapper.
+	* tracepoint.c (read_actions): Use gdb_readline_wrapper.
+	* top.c (gdb_readline_wrapper): New function.
+	(command_line_input): Use it.
+
+2002-07-24  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.h (regcache_raw_read, regcache_raw_write): Replace
+	regcache_read and regcache_write.
+	(regcache_raw_read_as_address): Replace regcache_read_as_address.
+	* regcache.c: Update.
+	* sh-tdep.c (sh64_push_arguments): Update comment.
+	(sh_pseudo_register_read): Update.
+	(sh_pseudo_register_write): Update.
+	(sh4_register_read): Update.
+	(sh4_register_write): Update.
+	(sh64_pseudo_register_read): Update.
+	(sh64_pseudo_register_write): Update.
+	(sh64_register_read): Update.
+	(sh64_register_write): Update.
+	* i386-tdep.c (i386_extract_return_value): Update.
+	(i386_extract_struct_value_address): Update.
+	(i386_extract_return_value): Update.
+	* blockframe.c (generic_read_register_dummy): Update.
+	(generic_call_dummy_register_unwind): Update
+	* infrun.c (write_inferior_status_register): Update.
+
+2002-07-23  Jim Blandy  <jimb@redhat.com>
+
+	* parser-defs.h (expression_context_pc): Make this extern.
+	(Thanks to Michael Snyder.)
+
+2002-07-23  Andrew Cagney  <ac131313@redhat.com>
+
+	GDB 5.2.1 released from 5.2 branch.
+	* NEWS: Mention changes in 5.2.1 including addition of AVR target.
+	* README: Update to mention 5.2.1.
+
+2002-07-23  Mark Salter  <msalter@redhat.com>
+
+	* remote.c (remote_read_bytes): Fix check for error.
+
+2002-07-22  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (language.h): Include.
+	(ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+	(pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc):
+	Print newlines at end of debug messages.
+	(pdc_symbol_addrs, pdc_read_regs, pdc_write_regs, pdc_read_data)
+	(pdc_write_data): Use local_hex_string() instead of %llx formats.
+
+2002-07-22  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (ppc-tdep.h): Include.
+	(special_register_p): New function.
+	(supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32)
+	(store_regs_user_thread): Use register number information from
+	gdbarch_tdep struct instead of hardcoded offsets relative to
+	FIRST_UISA_SP_REGNUM.
+	(fetch_regs_kernel_thread, store_regs_kernel_thread):  Call
+	special_register_p() instead of using FPLAST_REGNUM and
+	LAST_UISA_SP_REGNUM as lower and upper bounds on the special
+	register numbers.  Also, don't assume that LAST_UISA_SP_REGNUM
+	will be MQ's register number.
+
+2002-07-22  Michael Snyder  <msnyder@redhat.com>
+
+	* aix-thread.c (ops): Rename to aix_thread_ops.
+	(base_ops): Rename to base_target.
+	(ops_attach): Rename to aix_thread_attach.
+	(ops_detach): Rename to aix_thread_detach.
+	(ops_resume): Rename to aix_thread_detach.
+	(ops_wait):   Rename to aix_thread_wait.
+	(ops_kill):   Rename to aix_thread_kill.
+	(init_ops):   Rename to init_aix_thread_ops.
+	(ops_fetch_register): Rename to aix_thread_fetch_register.
+	(ops_store_register): Rename to aix_thread_store_register.
+	(ops_mourn_inferior): Rename to aix_thread_mourn_inferior.
+	(ops_thread_alive):   Rename to aix_thread_thread_alive.
+	(ops_extra_thread_info: Rename to aix_thread_extra_thread_info.
+	(ops_pid_to_str):  Rename to aix_thread_pid_to_str.
+	(ops_xfer_memory): Rename to aix_thread_xfer_memory.
+	(fetch_regs_lib):  Rename to fetch_regs_user_thread.
+	(fetch_regs_kern): Rename to fetch_regs_kernel_thread.
+	(store_regs_lib):  Rename to store_regs_user_thread.
+	(store_regs_kern): Rename to store_regs_kernel_thread.
+
+2002-07-22  Michael Snyder  <msnyder@redhat.com>
+
+	* aix-thread.c (ops_prepare_to_store): Eliminate.
+	(init_ops): Don't initialize ops.prepare_to_store.
+	(store_regs_kern): Pre-fetch register buffers from child, 
+	because some registers may not be in the cache.  Copy
+	regs from register cache only if they are cached.
+	(store_regs_lib): Copy regs from register cache only
+	if they are cached.
+	(fill_sprs32, (fill_sprs64, fill_fprs, fill_gprs32,
+	fill_gprs64): Ditto.
+
+2002-07-22  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (gdb_assert.h): Include.
+	(fill_sprs64, fill_sprs32): Add selected asserts to make sure that
+	register sizes (from register cache) match size of buffer holding
+	register data.
+	(fill_sprs32): Change parameter types to match those in the ptrace()
+	buffer.
+	(store_regs_lib): Likewise, but for 32-bit temporary variables.
+	(ops_prepare_to_store): Rename loop variable ``i'' to ``regno''.
+
+2002-07-22  Michael Snyder  <msnyder@redhat.com>
+
+	* aix-thread.c (supply_sprs64): Cosmetic change.
+	(supply_sprs32): Cosmetic change.
+	(fill_gprs64, fill_gprs32, fill_fprs, fill_sprs32): New funcs.
+	(fill_sprs64): Use regcache_collect instead of read_register.
+	(store_regs_lib): Use regcache_collect instead of 
+	read_register.  Use fill_sprs32 instead of fill_sprs64,
+	if debugging a 32-bit architecture.
+	(store_regs_kern): Use fill_gprs64 etc. to pull the values
+	out of the register cache, instead of passing a pointer into
+	the register cache directly to ptrace.  Use regcache_collect
+	insteaad of read_register.
+	(ops_prepare_to_store): Use target_read_registers instead
+	of read_register_bytes.
+
+2002-07-20  Aidan Skinner <aidan@velvet.net>
+
+	* MAINTAINERS: Add self under write after approval. 
+		
+2002-07-20  Aidan Skinner <aidan@velvet.net>
+
+	* ada-tasks.c: Change k&r style function definitions to prototyped
+	form.
+		
+2002-07-19  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (x86-64-tdep.o): Add $(objfiles_h).
+	* x86-64-tdep.c: Include "objfiles.h".
+	(x86_64_gdbarch_init): Set in_solib_call_trampoline to
+	in_plt_section.  From 2002-07-18 Michal Ludvig <mludvig@suse.cz>.
+
+2002-07-17  Michal Ludvig  <michal@suse.cz>
+
+	* dwarf2cfi.c (execute_stack_op): Complain on unknown DW_OP_ value.
+	(update_context): Initialise cfa variable.
+
+2002-07-17  Michael Snyder  <msnyder@redhat.com>
+
+	* aix-thread.c: Shorten some long lines.  
+	Bring comments into line with code spec.
+
+2002-07-18  Joel Brobecker  <brobecker@gnat.com>
+
+	* infrun.c: Re-indent using gdb_indent.sh.
+
+2002-07-18  Joel Brobecker  <brobecker@gnat.com>
+
+	* infrun.c (handle_inferior_event): Remove unneeded extra brace.
+	Leave the indentation temporarily untouched, to minimize the diffs.
+
+2002-07-18  Elena Zannoni  <ezannoni@redhat.com>
+
+	* stabsread.c: Make os9k sections of the code obsolete,
+	for real this time.
+	* stabsread.h: Make os9k sections of the code obsolete.
+
+2002-07-18  Michal Ludvig <mludvig@suse.cz>
+
+	* linux-low.c (regsets_store_inferior_registers): Add free()
+	at the end of a loop to prevent memory leak.
+	* linux-x86-64-low.c (x86_64_regmap): Add CS, SS registers.
+	(X86_64_NUM_GREGS): Count it from the size of x86_64_regmap.
+	* config/sparc/tm-sp64linux.h: Make the rest of #endif
+	line a comment.
+	* Makefile.in (x86-64-linux-nat.o): Remove dependency on i387-tdep.h
+
+2002-07-17  Jim Blandy  <jimb@redhat.com>
+
+	* macrocmd.c (info_macro_command): Remove newline from error
+	message.
+
+2002-07-17  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* sh-tdep.c (sh_dsp_register_sim_regno): New function.
+	(sh_gdbarch_init): Use it for sh-dsp.
+
+2002-07-16  Kevin Buettner  <kevinb@redhat.com>
+
+	* dwarf2read.c (read_initial_length): Handle older, non-standard,
+	64-bit DWARF2 format.
+
+2002-07-16  Joel Brobecker  <brobecker@gnat.com>
+
+	* proc-api.c: use HAVE_SYS_PROC_H macro to avoid including
+	<sys/proc.h> when not available.
+
+2002-07-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* NEWS: Mention that the i[34]86-*-os9k has been made obsolete.
+	* stabsread.c: Make os9k sections of the code obsolete.
+	* configure.tgt: Make i[3456]86-*-os9k target obsolete.
+	* config/i386/i386os9k.mt: Make file obsolete.
+	* Makefile.in (ALLDEPFILES): Remove remote-os9k.c.
+	(COMMON_OBS): Remove os9kread.o
+	(SFILES): Remove os9kread.c.
+	(os9kread.o, remote-os9k.o): Make target obsolete.
+	* remote-os9k.c: Make file obsolete.
+	* os9kread.c: Make file obsolete.
+	* Makefile.in
+
+2002-07-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* NEWS: Mention that the FR30 has been made obsolete.
+	* fr30-tdep.c: Make file obsolete.
+	* config/fr30/tm-fr30.h: Ditto.
+	* config/fr30/fr30.mt: Ditto.
+	* configure.tgt: Make fr30-*-elf obsolete.
+	* MAINTAINERS: Make fr30-elf obsolete.
+
+2002-07-16  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+	* blockframe.c (get_pc_function_start): return 0 if the minimal symbol
+	found is not inside a section.
+
+2002-07-15  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (ptrace_check): Use safe_strerror() instead of
+	strerror().
+	(pdc_realloc): Use xrealloc() instead of realloc().
+
+2002-07-15  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (PD_ERROR, CALL_BASE): Delete.
+	(ops_resume, ops_wait, fetch_regs_lib, store_regs_lib)
+	(ops_xfer_memory, ops_kill): Don't use PD_ERROR or CALL_BASE
+	macros.
+
+2002-07-15  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (ptrace_check): Eliminate goto.
+	(sync_threadlists): Eliminate gotos.  Also, fix array overrun
+	problem.
+
+2002-07-15  Kevin Buettner  <kevinb@redhat.com>
+
+	* aix-thread.c (gdbcmd.h): Include.
+	(DEBUG, DBG, DBG2, dbg): Eliminate.
+	(debug_aix_thread): New static global.
+	(ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+	(pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc)
+	(fetch_regs_lib, store_regs_lib, store_regs_kern): Rewrite
+	invocations to DBG and DBG2 macros to test against
+	``debug_aix_thread'' and call fprintf_unfiltered().
+	(_initialize_aix_thread): Add new command "set debug aix-thread".
+
+2002-07-15  Andrew Cagney  <ac131313@redhat.com>
+
+	From Gerhard Tonn <TON@de.ibm.com>:
+	* s390-nat.c (fill_fpregset, fill_gregset): Use regcache_collect
+	instead of supply_register.
+
+2002-07-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* dwarf2cfi.c: Include "gdb_assert.h".
+	(frame_state_for): Use gdb_assert to check that fde->cie_ptr is
+	non-NULL.
+	(update_context): Do not use __func__.  Add missing ``break''.
+	(update_context): Do not use __func__.
+
+2002-07-15  Elena Zannoni  <ezannoni@redhat.com>
+
+        * rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
+        and its setting.  Set gdbarch instruction printing functions
+        directly.  For non-rs6000 case use new function
+        gdb_print_insn_powerpc.
+        (gdb_print_insn_powerpc): New function.
+
+2002-07-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* NEWS: Mention that the d30v has been marked obsolete.
+	* MAINTAINERS: Note that d30v / d30v-elf has been made obsolete.
+	* configure.tgt: Mark d30v-*-* as obsolete.
+	* d30v-tdep.c: Mark file as obsolete.
+	* config/d30v/d30v.mt: Ditto.
+	* config/d30v/tm-d30v.h: Ditto.
+
+2002-07-13  Aidan Skinner <aidan@velvet.net>
+
+	* ada-tasks.c (add_task_entry): replace calls to
+	malloc() with xmalloc
+	* ada-tasks.c (init_task_list): replace calls to free with xfree()
+	
+	* ada-lang.c (replace_operator_with_call, fill_in_ada_prototype,
+	ada_finish_decode_line_1, all_sals_for_line
+	ada_breakpoint_rewrite): replace calls to free() with xfree()
+		
+2002-07-12  Kevin Buettner  <kevinb@redhat.com>
+
+	From Nicholas Duffek (with minor changes by Martin Hunt, 
+	Louis Hamilton, and Kevin Buettner):
+	* aix-thread.c: New file.
+
+2002-07-12  Petr Sorfa <petrs@caldera.com>
+
+        *  dwarf2read.c (dwarf2_invalid_attrib_class): New
+        complaint for invalid attribute class or form.
+        (read_func_scope): DW_AT_frame_base
+        better handling of DW_AT_block*.
+        (dwarf2_add_member_fn): DW_AT_vtable_elem_location
+        better handling of DW_AT_block*.
+        (read_common_block): DW_AT_location
+        better handling of DW_AT_block*.
+        (read_partial_die): DW_AT_location better handling
+        of DW_AT_block*.
+        (new_symbol): DW_AT_external better handling of
+        DW_AT_block*. Proper initialization of variable
+        "addr".
+        (attr_form_is_block): New function that returns true
+        if the attribute's form is of DW_FORM_block*.
+
+2002-07-12  Peter Schauer  <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>
+
+	* valops.c (find_method_list): Remove comment about
+	removed STATIC_MEMFUNCP argument.
+	(value_find_oload_method_list): Likewise.
+
+2002-07-12  Kevin Buettner  <kevinb@redhat.com>
+
+	From Nicholas Duffek:
+	* rs6000-nat.c (vmap_ldinfo, xcoff_relocate_core): Call
+	target_new_objfile_hook.
+
+2002-07-12  Kevin Buettner  <kevinb@redhat.com>
+
+	From Nicholas Duffek:
+	* xcoffread.c (scan_xcoff_symtab): Recognize XMC_TD as a data storage
+	csect.
+
+2002-07-12  Andrew Cagney  <cagney@redhat.com>
+
+	* MAINTAINERS: Mention --enable-sim-build-warnings.
+	(m68hc11-elf): Disable sim build warnings.
+	(m32r-elf): Mark as broken obsolete candidate.
+	(x86_64-linux-gnu): Mark as buildable with -Werror.
+	(arm-elf): Change -w to ``,'' which enables warnings but not
+	-Werror.
+
+2002-07-12  Andrew Cagney  <ac131313@redhat.com>
+
+	* bcache.h: Update copyright.
+	(struct bstring, struct bcache): Move definition to "bcache.c".
+	Replaced by opaque declaration.
+	(bcache_xfree): Replace free_bcache.
+	(bcache_xmalloc, bcache_memory_used): Declare.
+	
+	* bcache.c: Update copyright.
+	(struct bstring, struct bcache): Moved to here from "bcache.h".
+	Update comments.
+	(bcache_xmalloc, bcache_memory_used): New functions.
+	(bcache_xfree): Replace function free_bcache.
+	
+	* Makefile.in (objfiles.o): Add $(bcache_h).
+	(objfiles_h): Remove $(bcache_h).
+	(symfile.o): Add $(bcache_h).
+
+	* symmisc.c: Update copyright.
+	(print_symbol_bcache_statistics): Pass psymbol_cache by value.
+	(print_objfile_statistics): Use bcache_memory_used.
+
+	* symfile.c: Include "bcache.h".
+	(reread_symbols): Use bcache_xfree.
+	(reread_symbols): Use bcache_xmalloc and bcache_xfree.
+	(add_psymbol_to_list): Pass psymbol_cache by value.
+	(add_psymbol_with_dem_name_to_list): Ditto.
+
+	* objfiles.h: Update copyright.
+	(struct bcache): Declare opaque.  Do not include "bcache.h".
+	(struct objfile): Change psymbol_cache and macro_cache to ``struct
+	bcache'' pointers.
+	* dwarf2read.c (macro_start_file): Pass macro_cache by value.
+
+	* objfiles.c: Include "bcache.h".  Update copyright.
+	(allocate_objfile): Use bcache_xmalloc to create psymbol_cache and
+	macro_cache.
+	(free_objfile): Use bcache_xfree.
+
+2002-07-11  Grace Sainsbury  <graces@redhat.com>
+
+	* monitor.c (monitor_fetch_register): Make name a constant.
+	(monitor_store_register): Same.
+
+2002-07-11  Daniel Jacobowitz  <drow@mvista.com>
+
+	Based on patch from Daniel Berlin <dberlin@dberlin.org>.
+	* buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME.
+	(finish_block) For non-function blocks, hash the symbol table.  For
+	function blocks, mark the symbol table as unhashed.
+	* minsyms.c (msymbol_hash): Return hash value without taking modulus.
+	(msymbol_hash_iw): Likewise.
+	(add_minsym_to_hash_table): Take modulus of msymbol_hash's return
+	value.
+	(add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw.
+	(lookup_minimal_symbol): Likewise for both.
+	* symtab.h (struct block): Add `hashtable' flag.  Comment the
+	hashtable.
+	(BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro.
+	(ALL_BLOCK_SYMBOLS): Update.
+	(BLOCK_SHOULD_SORT): Do not sort hashed blocks.
+	(struct symbol): Add `hash_next' pointer.
+	* symtab.c (lookup_block_symbol): Search using the hash table when
+	possible.
+	(find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS.
+	(search_symbols, find_addr_symbol): Likewise.
+
+	* dstread.c (process_dst_block): Clear hashtable bit for new block.
+	(read_dst_symtab): Likewise.
+	* jv-lang.c (get_java_class_symtab): Likewise.
+	* mdebugread.c: Include "gdb_assert.h".
+	(shrink_block): Assert that the block being modified is not hashed.
+	* coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS.
+	* symmisc.c (free_symtab_block): Walk the hash table when freeing
+	symbols.
+	(dump_symtab): Recognize hashed blocks.
+	* printcmd.c (print_frame_args):  Assert that function blocks do not
+	have hashed symbol tables.
+	* ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS.
+	(fill_in_ada_prototype, debug_print_block): Likewise.
+	(ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS.  Handle hash tables.
+
+2002-07-11  Corinna Vinschen  <vinschen@redhat.com>
+
+	* stack.c (print_frame): Use result of frame_address_in_block()
+	instead of fi->pc when evaluating symbols.
+	(backtrace_command_1): Ditto.
+
+2002-07-11  Andrew Cagney  <cagney@redhat.com>
+
+	* cris-tdep.c (cris_saved_pc_after_call): Fix parameter type.
+	Make static.
+
+	* arm-tdep.c (arm_register_name): Make return type constant.
+
+2002-07-10  Andrew Cagney  <ac131313@redhat.com>
+
+	* win32-nat.c (has_detach_ability): Convert to strict ISO C
+	prototype.
+	* top.c (gdb_rl_operate_and_get_next_completion): Ditto.
+	* s390-tdep.c (s390_fp_regnum): Ditto.
+	(s390_read_fp): Ditto.
+	(s390_pop_frame): Ditto.
+	(_initialize_s390_tdep): Ditto.
+	* remote.c (get_remote_state): Ditto.
+	* procfs.c (mappingflags): Ditto.
+	* memattr.c (_initialize_mem): Ditto.
+	* mcore-tdep.c (mcore_pop_frame): Ditto.
+	* m68klinux-nat.c (_initialize_m68k_linux_nat): Ditto.
+	* m68k-tdep.c (m68k_register_bytes_ok): Ditto.
+	* language.c (set_case_str): Ditto.
+	* gnu-v3-abi.c (vtable_address_point_offset): Ditto.
+	* frv-tdep.c (new_variant): Ditto.
+	(frv_stopped_data_address): Ditto.
+	* dwarf2cfi.c (fde_chunks_need_space): Ditto.
+	(context_alloc): Ditto.
+	(frame_state_alloc): Ditto.
+	(unwind_tmp_obstack_init): Ditto.
+	(unwind_tmp_obstack_free): Ditto.
+	(cfi_read_fp): Ditto.
+	* cris-tdep.c (cris_saved_pc_after_call): Ditto.
+	(cris_pop_frame): Ditto.
+	* c-lang.c (scanning_macro_expansion): Ditto.
+	(finished_macro_expansion): Ditto.
+	(c_preprocess_and_parse): Ditto.
+	* gdbarch.sh: Ditto.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* config/mn10200/tm-mn10200.h: Adjust indentation.
+	* target.c: Adjust indentation.
+	* symtab.h: Adjust indentation.
+	* stabsread.h: Adjust indentation.
+	* remote-es.c: Adjust indentation.
+	* os9kread.c: Adjust indentation.
+
+2002-07-10  Andrew Cagney  <ac131313@redhat.com>
+	
+	* wince.c (_initialize_wince): Rename _initialize_inftarg.
+	* win32-nat.c (_initialize_win32_nat): Rename _initialize_inftarg.
+
+2002-07-10  Grace Sainsbury  <graces@redhat.com>
+	
+	* NEWS: Mention m68k, mcore multi-arching.  
+	* MAINTAINERS: Change status of m68k, mcore to reflect
+	multi-arching.
+
+2002-07-10  Daniel Jacobowitz  <drow@mvista.com>
+
+	* valops.c (find_overload_match): Free oload_syms.
+
+2002-07-09  Joel Brobecker  <brobecker@gnat.com>
+
+	Define HAVE_SYS_PROC_H if sys/proc.h exists
+	* configure.in: Add check for sys/proc.h
+	* config.in: Regenerate.
+	* configure: Regenerate.
+
+2002-07-09  Grace Sainsbury  <graces@redhat.com>
+
+	* config/m68k/tm-m68k.h: Remove macros wrapped in 
+	#if !GDB_MULTI_ARCH. 
+
+2002-07-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* config.in, configure: Regenerate.
+
+2002-07-08  Mark Kettenis  <kettenis@gnu.org>
+
+	* dwarf2cfi.c: Include "gcore.h".
+	(execute_stack_op): Fix implementation of the
+	DW_OP_deref and DW_OP_deref_size operators by letting do their
+	lookup in the target.
+
+2002-07-07  Mark Kettenis  <kettenis@gnu.org>
+
+	From Peter Schauer <Peter.Schauer@regent.e-technik.tu-muenchen.de>:
+	* i386-sol2-tdep.c (i386_sol2_init_abi): Correct value for
+	tdep->sc_sp_offset.
+
+2002-07-05  Daniel Jacobowitz  <drow@mvista.com>
+
+	Fix PR gdb/595, gdb/602
+	* gnu-v3-abi.c (gnuv3_baseclass_offset): Remove unused variables.
+	Don't call value_cast, just read the vtable pointer; update comments
+	to match.
+
+2002-07-05  Grace Sainsbury  <graces@redhat.com>
+
+	* config/mcore/tm-mcore.h: Remove file.
+	* config/mcore/mcore.mt: Remove definition of TM_FILE
+	* configure.tgt: Set gdb_multi_arch to yes for the mcore target.
+
+2002-07-05  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386bsd-tdep.c: Include "gdb_string.h".
+
+2002-07-04  Grace Sainsbury  <graces@redhat.com>
+
+	* config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Set to 2.
+	(PR_REGNUM, FIRST_ARGREG, LAST_ARGREG,RETVAL_REGNUM): Move to
+	mcore-tdep.
+	(REG_STRUCT_HAS_ADDR, USE_STRUCT_CONVENTION, GET_SAVED_REGISTER)
+	(TARGET_VIRTUAL_FRAME_POINTER, BELIEVE_PCC_PROMOTION): Remove.
+	* mcore-tdep.c (PR_REGNUM, FIRST_ARGREG, LAST_ARGREG)
+	(RETVAL_REGNUM): Move macros from tm-mcore.h
+	(mcore_reg_struct_has_addr): New function.
+	(mcore_gdbarch_init): Added initializations for the macros removed
+	from tm-mcore.h.
+
+2002-07-04  Mark Kettenis  <kettenis@gnu.org>
+
+	* osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
+	traditonal string branding within the ELF header.
+
+2002-07-04  Daniel Jacobowitz  <drow@mvista.com>
+
+	* symtab.c (remove_params): New function.
+	(make_symbol_overload_list): Use it instead of cplus_demangle.
+	(overload_list_add_symbol): Likewise.  Reorder.  Fix memory leak.
+
+2002-07-04  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386obsd-nat.c (_initialize_i386obsd_nat): Fix typo in prototype.
+
+	* i386bsd-tdep.c (i386nbsd_sigtramp_start, i386nbsd_sigtramp_end):
+	New variables.
+	(i386nbsd_init_abi): Use these to initialize tdep->sigtramp_start
+	and tdep->sigtramp_end.
+	* i386obsd-nat.c: New file.
+	* config/i386/obsd.mh (NATDEPFILES): Add i386obsd-nat.o.
+
+	* dwarf2cfi.c (cfi_pop_frame): Use alloca() for regbuf.
+	Don't call get_current_frame().
+
+2002-07-04  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+	* i386-nat.c (child_post_startup_inferior): New function
+	calling i386_cleanup_dregs if
+	I386_USE_GENERIC_WATCHPOINTS is defined.
+	* config/i386/nm-i386.h: define CHILD_POST_STARTUP_INFERIOR
+	conditional to acknowledge that i386-nat.c has its
+	own child_post_startup_inferior function.
+
+2002-07-04  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.h (I386_MAX_REGISTER_SIZE): New define.
+	* i386-tdep.c (i386_do_pop_frame): Use I386_MAX_REGISTER_SIZE
+	instead of MAX_REGISTER_RAW_SIZE.
+	(i386_extract_return_value, i386_extract_struct_value_address):
+	Convert to use regcache.
+	(i386_gdbarch_init): Set max_register_raw_size and
+	max_register_virtual_size to I386_MAX_REGISTER_SIZE.
+	Set extract_return_value and extract_struct_value_address instead
+	of their deprecated variants.
+
+	Convert i386 target to generic dummy frames.
+	* i386-tdep.c: Include "symfile.h".
+	(i386_frameless_signal_p): Consider a function to be frameless if
+	the pc points at the first instruction of the function.
+	(i386_frame_chain): Handle (generic) call dummies.
+	(i386_frame_saved_pc): Likewise.
+	(i386_frame_init_saved_regs): Remove code dealing with call
+	dummies on the stack.
+	(i386_push_dummy_frame): Removed.
+	(i386_call_dummy_words): Removed.
+	(i386_fix_call_dummy): Removed.
+	(i386_push_return_address): New function.
+	(i386_do_pop_frame): Renamed from i386_pop_frame.  Add FRAME
+	parameter, and don't call get_current_frame.
+	(i386_pop_frame): New function.
+	(i386_gdbarch_init): Set use_generic_dummy_frames to 1, set
+	call_dummy_location to AT_ENTRY_POINT, set call_dummy_address to
+	entry_point_address, set call_dummy_breakpoint_offset to 0, set
+	call_dummy_length to 0, set call_dummy_words to NULL, set
+	sizeof_call_dummy_words to 0, set fix_call_dummy to
+	generic_fix_call_dummy, set pc_in_call_dummy to
+	pc_in_call_dummy_at_entry_point, set push_dummy_frame to
+	generic_push_dummy_frame, set push_return_address to
+	i386_push_return_address and set frame_chain_valid to
+	generic_file_frame_chain_valid.
+
+2002-07-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbarch.sh (struct regcache): Add opaque declaration.
+	(EXTRACT_RETURN_VALUE): New architecture method.
+	(EXTRACT_STRUCT_VALUE_ADDRESS): Ditto.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* arch-utils.c (legacy_extract_return_value): New function.
+	* arch-utils.h (legacy_extract_return_value): Declare.
+	* values.c (value_being_returned): Re-enable code handling
+	EXTRACT_STRUCT_VALUE_ADDRESS.  Move
+	deprecated_grub_regcache_for_registers call to block handling
+	DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+	(EXTRACT_RETURN_VALUE): Do not define.
+
+2002-07-03  Grace Sainsbury  <graces@redhat.com>
+
+	* config/mcore/tm-mcore.h (REGISTER_BYTES, NUM_REGS, PC_REGNUM)
+	(SP_REGNUM, FP_REGNUM, FUNCTION_START_OFFSET, DECR_PC_AFTER_BREAK)
+	(BREAKPOINT_FROM_PC, INNER_THAN, SAVED_PC_AFTER_CALL)
+	(INIT_EXTRA_FRAME_INFO, FRAME_INIT_SAVED_REGS, INIT_FRAME_PC)
+	(FRAME_CHAIN, FRAME_CHAIN_VALID, FRAME_SAVED_PC)
+	(STORE_RETURN_VALUE, DEPRECATED_EXTRACT_RETURN_VALUE)
+	(STORE_STRUCT_RETURN, DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+	(SKIP_PROLOGUE, FRAME_ARGS_SKIP, FRAME_ARGS_ADDRESS)
+	(FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS, POP_FRAME)
+	(PUSH_RETURN_ADDRESS, PUSH_DUMMY_FRAME, PUSH_ARGUMENTS): Remove.
+	* mcore-tdep.c (mcore_init_extra_frame_info): Add fromleaf
+	argument so the function fits the prototype in the architecture
+	vector.
+	(mcore_pop_frame): Remove argument so the function fits the
+	prototype. Use get_current_frame instead of the argument.
+	(mcore_push_arguments): Change type of struct_return so the
+	function can be used in the architecture vector.
+	(mcore_store_struct_return): Add.
+	(mcore_frame_init_saved_regs): Add.
+	(mcore_gdbarch_init): Add function calls to replace the macros
+	removed from tm-mcore.h
+
+2002-07-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* infcmd.c (print_return_value): Remove compatibility code calling
+	deprecated_grub_regcache_for_registers.
+	
+	* values.c: Include "regcache.h".
+	(value_being_returned): Update.  Use
+	deprecated_grub_regcache_for_registers to extract the register
+	buffer address.  
+	* value.h (value_being_returned): Change ``retbuf'' parameter to a
+	``struct regcache''.
+	* Makefile.in (values.o): Add dependency on $(regcache_h).
+
+	* inferior.h (run_stack_dummy): Change type of second parameter to
+	a ``struct regcache''.
+	* valops.c (hand_function_call): Change type of retbuf to ``struct
+	regcache''.  Allocate using regcache_xmalloc, clean using
+	make_cleanup_regcache_xfree.
+	* infcmd.c (run_stack_dummy): Update.  Use
+	regcache_cpu_no_passthrough instead of memcpy to copy the buffer.
+
+	* regcache.c (do_regcache_xfree): New function.
+	(make_cleanup_regcache_xfree): New function.
+	* regcache.h (make_cleanup_regcache_xfree): Declare.
+
+2002-07-03  Martin M. Hunt  <hunt@redhat.com>
+
+	* event-top.c (command_line_handler): Don't read past
+        beginning of buffer.
+
+2002-07-03  Martin M. Hunt  <hunt@redhat.com>
+	
+        * varobj.c (struct varobj_root): Change frame from CORE_ADDR to 
+        struct frame_id. 
+        (varobj_create): Store frame_id for root.
+        (varobj_gen_name): Use xasprintf.
+        (varobj_update): Save and restore frame using get_frame_id() and
+        frame_find_by_id().
+        (create_child): Use xasprintf.
+        (new_root_variable): Initialize frame_id.
+        (c_name_of_child): Use xasprintf. Call find_frame_by_id().
+        (c_value_of_variable): Use xasprintf. Move mem_fileopen call
+        to prevent memory leak.
+
+2002-07-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* valops.c (hand_function_call): Move declaration of retbuf to
+	start of function, allocate using malloc, add a cleanup but before
+	the inf_status cleanup, cleanup the buffer.  Rename local variable
+	old_chain to inf_status_cleanup.
+
+2002-07-03  Martin M. Hunt  <hunt@redhat.com>
+
+	* top.c (execute_command): Use cmd_func() and cmd_func_p().
+
+	* cli/cli-decode.c (cmd_func_p): New function.
+	(cmd_func): New function.
+
+	* command.h: Add cmd_func() and cmd_func_p().	
+	
+2002-07-03  Grace Sainsbury  <graces@redhat.com>
+
+	* config/mcore/tm-mcore.h (GDB_MULTI_ARCH): Add macro. Set to 0.
+	(REGISTER_SIZE): Remove.
+	(MAX_REGISTER_RAW_SIZE): Remove.
+	(REGISTER_VIRTUAL_TYPE): Remove.
+	(MAX_REGISTER_VIRTUAL_SIZE): Remove.
+	(REGISTER_NAME): Remove.
+	(USE_GENERIC_DUMMY_FRAMES): Remove.
+	(CALL_DUMMY): Remove.
+	(CALL_DUMMY_START_OFFSET): Remove.
+	(CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
+	(CALL_DUMMY_LOCATION): Remove.
+	(FIX_CALL_DUMMY): Remove.
+	(CALL_DUMMY_ADDRESS): Remove.
+	(SIZEOF_CALL_DUMMY_WORDS): Remove.
+	(SAVE_DUMMY_FRAME_TOS): Remove.
+	* mcore-tdep.c (MCORE_REG_SIZE, MCORE_NUM_REGS): Add macros.
+	(mcore_register_virtual_type): New function.
+	(mcore_register_byte): New function.
+	(mcore_register_size): New function.
+	(mcore_register_name): New function.
+	(mcore_gdbarch_init): New function. Add set_gdbarch calls for
+	macros removed from tm-mcore.h.
+	(mcore_dump_tdep): Add.
+	(_initialize_mcore_tdep): Add gdbarch_register call.
+
+2002-07-03  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.c (i386_frameless_signal_p): Provide an argument in to
+	frameless_look_for_prologue, such that we actually call this
+	function.
+
+2002-07-02  Joel Brobecker  <brobecker@gnat.com>
+
+	* frame.h (frame_address_in_block): New function.
+
+	* blockframe.c (frame_address_in_block): New function extracted
+	from get_frame_block().
+	(get_frame_block): Use frame_address_in_block().
+	(block_innermost_frame): Use frame_address_in_block() to match
+	the frame pc address against the block boundaries rather than
+	the frame pc directly. This prevents a failure when a frame pc
+	is actually a return-address pointing immediately after the end
+	of the given block. 
+
+2002-07-02  Grace Sainsbury  <graces@redhat.com>
+
+	* MAINTAINERS: Add self under write after approval. 
+
+2002-07-02  Grace Sainsbury  <graces@redhat.com>
+
+	* m68k-tdep.c (m68k_remote_breakpoint_from_pc): Add. Currently not
+	used in architecture vector. The default is
+	m68k_local_breakpoint_from_pc.
+        (m68k_local_breakpoint_from_pc): Add.
+        (enum): Add register numbers from tm-m68k.h.
+        (m68k_gdbarch_init): Add breakpoint_from_pc to architecture
+	vector.  
+	* config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Set to
+	GDB_MULTI_ARCH_PARTIAL.
+        (BPT_VECTOR, REGISTER_BYTES_FP, REGISTER_BYTES_NOFP)
+        (NUM_FREGS, SIG_PC_FP_OFFSET, SP_ARG0, REMOTE_BPT_VECTOR): Move to
+	m68k-tdep.c.
+        (BREAKPOINT, REMOTE_BREAKPOINT): Remove.
+        (A1_REGNUM, FP0_REGNUM, FPC_REGNUM, FPS_REGNUM, FPI_REGNUM): Move
+	to enum in m68k-tdep.c
+
+2002-07-02  Joel Brobecker  <brobecker@gnat.com>
+
+	* solib-osf.c (open_map): Compute the list of shared libraries
+	loaded by the inferior, rather than the list of libraries loaded
+	by GDB itself.  Otherwise, GDB ends up reading the symbols from
+	the wrong shared libraries...
+
+2002-07-02  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-linux-tdep.c (i386_linux_sigcontext_addr): Make static.
+	(LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONEXT_SP_OFFSET): Remove
+	macros.
+	(i386_linux_sigtramp_saved_pc, i386_linux_sigtramp_saved_sp):
+	Remove functions.
+	(FRAMELESS_SIGNAL): Remove function.
+	(i386_linux_frame_chain, i386_linux_frame_saved_pc,
+	i386_linux_saved_pc_after_call): Removed.
+	(i386_linux_init_abi): Initialize tdep->sigcontext_addr,
+	tdep->sc_pc_offset and tdep->sc_sp_offset.  Don't override
+	frame_chain, frame_saved_pc and saved_pc_after_call any longer.
+
+	* i386-tdep.c (i386_frameless_signal_p): New function.
+	(i386_frame_chain): Deal with frameless signals.
+	(i386_sigtramp_saved_sp): New function.
+	(i386_frame_saved_pc): Deal with frameless signals.
+	(i386_saved_pc_after_call): Make sure the correct value is
+	returned just after entry into a sigtramp.
+	* i386bsd-tdep.c (i386bsd_sc_sp_offset, i386nbsd_sc_sp_offset,
+	i386fbsd4_sc_sp_offset): New variables.
+	(i386bsd_init_abi, i386nbsd_init_abi, i386fbsd4_init_abi): Use
+	these variables to initialize tdep->sc_sp_offset.  * i386bsd-nat.c
+	(_initialize_i386bsd_nat): Add sanity check for sc_sp_offset
+	similiar to what we already did for sc_pc_offset.
+	* i386-sol2-tdep.c (i386_sol2_init_abi): Initialize
+	tdep->sc_sp_offset.
+
+	* i386nbsd-tdep.c (fetch_elfcore_registers): Wrap long line.
+
+2002-07-02  Michal Ludvig  <mludvig@suse.cz>
+
+	* config/i386/tm-x86-64linux.h: New.
+	* config/i386/x86-64linux.mt: Add GDB_MULTI_ARCH and TM_FILE
+	definitions.
+	* config/i386/nm-x86-64.h: Rename to ...
+	* config/i386/nm-x86-64linux.h: ... this one.
+	* config/i386/x86-64linux.mh: Reflect the above change.
+	
+2002-07-01  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-tdep.h (struct gdbarch_tdep): Replace sigtramp_saved_pc
+	with sigcontext_addr.  Add sc_sp_offset.
+	(i386bsd_sigtramp_saved_pc): Remove prototype.
+	(i386bsd_sicontext_addr): Add prototype.
+	* i386-tdep.c (i386_sigtramp_saved_pc): New function.
+	(i386_frame_saved_pc): Rewrite to call i386_sigtramp_saved_pc.
+	(i386_svr4_sigtramp_saved_pc): Removed.
+	(i386_svr4_sigcontext_addr): New function.
+	(i386_svr4_init_abi): Don't initialize tdep->sigtramp_saved_pc.
+	Initialize tdep->sigcontext_addr instead.  Initialize
+	tdep->sc_pc_offset and tdep->sc_sp_offset.
+	(i386_gdbarch_init): Likewise.
+	* i386bsd-tdep.c (i386bsd_sigcontext_addr): Don't make it static
+	any more.
+	(i386bsd_sigtramp_saved_pc): Remove function.
+	(i386bsd_init_abi): Don't initialize tdep->sigtramp_saved_pc.
+	Initialize tdep->sigcontext_addr instead.  Initialize
+	tdep->sc_pc_offset.
+	* i386-linux-tdep.c (i386_linux_init_abi): Remove initialization
+	of tdep->sigtramp_saved_pc.
+	* i386-sol2-tdep.c (i386_sol2_init_abi): Don't initialize
+	tdep->sigtramp_saved_pc.  Initialize tdep->sigcontext_addr
+	instead.
+
+	* i386-tdep.c (i386_frameless_function_invocation,
+	i386_frame_num_args, i386_frame_init_saved_regs,
+	i386_skip_prologue, i386_push_dummy_frame, i386_fix_call_dummy,
+	i386_pop_frame, i386_push_arguments, i386_store_struct_return,
+	i386_extract_return_value, i386_store_return_value,
+	i386_extract_struct_value_address, i386_register_virtual_type,
+	i386_register_convertible, i386_register_convert_to_virtual,
+	i386_register_convert_to_raw, i386_svr4_sigtramp_saved_pc,
+	i386_go32_init_abi, i386_nw_init_abi, i386_gdbarch_init): Make
+	static.
+
+2002-07-01  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386bsd-tdep.c (i386bsd_frame_saved_pc): Removed.
+
+	* config/i386/tm-i386sol2.h (COERCE_FLOAT_TO_DOUBLE): Removed.
+	* i386-sol2-tdep.c (i386_sol2_init_abi): Adjust for the removal of
+	this macro.  Include "value.h".
+
+2002-06-30  Aidan Skinner  <aidan@velvet.net>
+
+	* ada-exp.tab.c: remove as it's a generated file
+	* ada-lex.c: remove as it's a generated file
+		
+2002-06-30  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386.h (struct frame_info, struct
+	frame_saved_regs, struct value, struct type): Remove forward
+	declarations.
+
+	* config/i386/tm-linux.h [HAVE_PTRACE_GETFPXREGS]
+	(FILL_FPXREGSET, HAVE_SSE_REGS): Remove define.
+	* config/i386/nm-linux.h [HAVE_PTRACE_GETFPXREGS]
+	(FILL_FPXREGSET): Define.
+
+	* config/i386/tm-nbsd.h (HAVE_SSE_REGS): Remove define.
+
+	* configure.tgt (i[3456]86-*-openbsd*): Fold into
+	i[3456]86-*-netbsd* case.
+	* config/i386/tm-obsd.h: Removed.
+	* config/i386/obsd.mt: Removed.
+	* config/i386/obsd.mh (NATDEPFILES): Remove corelow.o and
+	core-aout.o.
+	(MH_CFLAGS): Add -DYYDEBUG=0.
+
+	* i386bsd-nat.c (_initialize_i386bsd_nat): Define SC_PC_OFFSET to
+	i386nbsd_sc_pc_offset on OpenBSD too.
+
+	* config/i386/tm-fbsd.h [!SVR4_SHARED_LIBS]
+	(IN_SOLIB_CALL_TRAMPOLINE): Remove define.
+	* config/i386/tm-nbsdaout.h (IN_SOLIB_CALL_TRAMPOLINE): Remove
+	define.
+	* i386bsd-tdep.c: Include "arch-utils.h".
+	(i386bsd_aout_in_solib_call_trampoline): New function.
+	(i386bsd_init_abi): Set in_solib_call_trampoline to
+	i386bsd_aout_in_solib_call_trampoline.
+	(i386nbsdelf_init_abi, i386fbsd_init_abi): Set
+	in_solib_call_trampoline to generic_in_solib_call_trampoline.
+
+2002-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* macrotab.h: Do not include "obstack.h" or "bcache.h".
+	(struct obstack, struct bcache): Add opaque declarations.
+	* Makefile.in (macrotab_h): Update
+
+2002-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* blockframe.c (generic_find_dummy_frame): Change return type to
+	``struct regcache''.
+	(struct dummy_frame): Replace field ``registers'' with regcache, a
+	struct regcache object.
+	(generic_find_dummy_frame): Update.
+	(generic_push_dummy_frame): Update.  Use regcache_xfree,
+	regcache_xmalloc and regcache_cpy.
+	(generic_pop_dummy_frame): Update.  Use regcache_cpy and
+	regcache_xfree.
+	(deprecated_generic_find_dummy_frame): Update.
+	(generic_read_register_dummy): Update.  Use
+	regcache_read_as_address.
+	(generic_call_dummy_register_unwind): Update.  Use regcache_read.
+	(generic_get_saved_register): Update.  Use regcache_read.
+
+2002-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (objfiles_h): Add $(bcache_h).
+	* objfiles.h: Include "bcache.h".
+
+	* Makefile.in (symtab_h): Remove $(bcache_h).
+	* symtab.h: Do not include "bcache.h".
+
+2002-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* ppcnbsd-tdep.c (ppcnbsd_init_abi): Set frame_chain_valid to
+	generic_func_frame_chain_valid.
+
+2002-06-28  David O'Brien  <obrien@FreeBSD.org>
+
+	* config/i386/nm-fbsd.h: Include <sys/param.h>.
+	* config/i386/tm-fbsd.h: Likewise.
+
+2002-06-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* rs6000-tdep.c (rs6000_gdbarch_init): Use
+	generic_unwind_get_saved_register.
+
+2002-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+	From 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>:
+	* regcache.c (supply_register): Add missing argument to
+	register_buffer call.
+
+2002-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (init.c): Drop -e option to grep.  Not necessary and
+	Solaris /bin/grep does not not like it.  From Peter Schauer.
+
+2002-06-26  Tom Tromey  <tromey@redhat.com>
+
+	* command.h (add_setshow_cmd): Declare.
+	(add_setshow_cmd_full): Declare.
+	* cli/cli-decode.c (add_setshow_cmd): No longer static.  Now
+	returns void.  Use add_setshow_cmd_full.
+	(add_setshow_cmd_full): New function.
+	(add_setshow_auto_boolean_cmd): Use add_setshow_cmd_full.
+	(add_setshow_boolean_cmd): Likewise.
+
+2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* config/vax/tm-vax.h: Protect from multiple inclusion.
+	(TARGET_UPAGES, TARGET_NBPG, STACK_END_ADDR)
+	(SIGTRAMP_START, SIGTRAMP_END, SIGCONTEXT_PC_OFFSET): Move to...
+	* config/vax/tm-vaxbsd.h: ...here.  New file.
+	* config/vax/vax.mt (TM_FILE): Set to tm-vaxbsd.h.
+
+2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* config/vax/tm-vax.h (BREAKPOINT): Remove.
+	(BELIEVE_PCC_PROMOTION): Remove.
+	(AP_REGNUM): Move to...
+	* config/vax/nm-vax.h: ...here.
+	* vax-tdep.c: Use VAX_AP_REGNUM instead of AP_REGNUM.
+	(vax_breakpoint_from_pc): New function.
+	(vax_gdbarch_init): Initialize gdbarch_breakpoint_from_pc
+	and gdbarch_believe_pcc_promotion.
+
+2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.in (vax_tdep_h): Define.  
+	(vax-tdep.o): Use $(vax_tdep_h).
+	* vax-tdep.c (vax_gdbarch_init): Use generic OS ABI framework.
+	(vax_dump_tdep): New function. 
+	(_initialize_vax_tdep): Register vax_dump_tdep.
+	* vax-tdep.h: Include osabi.h.     
+	(struct gdbarch_tdep): New. 
+
+2002-06-26  Andrew Cagney  <cagney@redhat.com>
+
+	* frame.h (deprecated_generic_find_dummy_frame): Rename
+	generic_find_dummy_frame.
+	* blockframe.c (generic_find_dummy_frame): Make static.
+	(deprecated_generic_find_dummy_frame): New function.
+	* sh-tdep.c (sh_nofp_frame_init_saved_regs): Replace
+	generic_find_dummy_frame with deprecated_find_dummy_frame.
+	(sh64_nofp_frame_init_saved_regs): Ditto.
+	(sh_fp_frame_init_saved_regs): Ditto.
+	* s390-tdep.c (s390_frame_saved_pc_nofix): Ditto.
+	(s390_frame_chain): Ditto.
+	* cris-tdep.c (cris_frame_init_saved_regs): Ditto.
+
+2002-06-26  Grace Sainsbury  <graces@redhat.com>
+
+	* config/m68k/tm-m68k.h: Rearrange code so macros not in the
+	gdbarch vector are at the top.
+	(NUM_REGS): Remove.
+	(FP_REGNUM, SP_REGNUM, PS_REGNUM, PC_REGNUM, FP0_REGNUM): Remove.
+	(FRAME_ARGS_ADDRESS): Remove.
+	(FRAME_LOCALS_ADDRESS): Remove.
+	(FRAME_NUM_ARGS): Remove.
+	(FRAME_ARGS_SKIP): Remove.  
+	* m68k-tdep.c (enum): Add eumeration of special register numbers.
+	(m68k_gdbarch_init): Add gdbarch initializations for macros
+	undefined in tm-m68k.h
+
+2002-06-26  Grace Sainsbury  <graces@redhat.com>
+
+	* monitor.h: Add the function regname to monitor_ops
+	structure. This way NUM_REGS does not have to be a constant.
+	* monitor.c (monitor_fetch_register): Added support for regname
+	function. The function is called if the array regnames is NULL.
+	(monitor_store_register): Same.
+	* cpu32bug-rom.c (cpu32bug_regname): Add function. Replaces
+	regnames array.
+	(init_cpu32bug_cmds): set cpu32bug_cmds.regnames to NULL,
+	cpu32bug_cmds.regname to point to new function.
+	* abug-rom.c (abug_regname): Same as above.
+	(init_abug_cmds): Same.
+	* dbug-rom.c (dbug_regname): Same as above.
+	(init_dbug_cmds): Same.
+	* remote-est.c (est_regname): Same. 
+	(init_est_cmds): Same.
+	* rom68k-rom.c (rom68k_regname): Same. 
+	(init_rom68k_cmds): Same.
+
+2002-06-25  Tom Tromey  <tromey@redhat.com>
+
+	* breakpoint.c (delete_command): Don't repeat `delete' commands.
+
+2002-06-25  Andrew Cagney  <cagney@redhat.com>
+
+	* infrun.c (stop_registers): Change variable's type to ``struct
+	regcache'''.
+	(xmalloc_inferior_status): Delete function.
+	(free_inferior_status): Delete function.
+	(normal_stop): Use regcache_cpy.
+	(struct inferior_status): Change type of fields ``stop_registers''
+	and ``registers'' to ``struct regcache''.
+	(write_inferior_status_register): Use regcache_write.
+	(save_inferior_status): Instead of calling
+	xmalloc_inferior_status, allocate the inf_status buffer directly.
+	Use regcache_dup_no_passthrough and regcache_dup to save the
+	buffers.
+	(restore_inferior_status): Use regcache_xfree and regcache_cpy.
+	Replace the stop_registers regcache instead of overriding it.  Use
+	regcache_xfree.  Instead of calling free_inferior_status, xfree
+	the buffer directly.
+	(discard_inferior_status): Use regcache_xfree.  Instead of calling
+	free_inferior_status, xfree the buffer directly.
+	(build_infrun): Use regcache_xmalloc.
+	(_initialize_infrun): Delete redundant call to build_infrun.
+
+	* Makefile.in (infcmd.o): Add $(regcache_h).
+
+	* infcmd.c: Include "regcache.h".
+	(run_stack_dummy): Use deprecated_grub_regcache_for_registers to
+	obtain the address of `stop_registers' register buffer.
+	(print_return_value): Ditto.
+
+	* inferior.h (struct regcache): Add opaque declaration.
+	(stop_registers): Change variable's declared type to ``struct
+	regcache''.
+
+2002-06-24  Tom Tromey  <tromey@redhat.com>
+
+	* cli/cli-decode.c (add_show_from_set): Fixed typo in comment.
+	* target.c (initialize_targets): Fixed typo in
+	trust-readonly-sections `show' documentation.
+
+	* main.c: Marked all strings with _().
+
+2002-06-24  Don Howard  <dhoward@redhat.com>
+
+        * memattr.c (create_mem_region): Treat hi == 0 as a special case
+        that means max CORE_ADDR+1.
+        (lookup_mem_region): Ditto.
+        (mem_info_command): Ditto.
+
+2002-06-24  Grace Sainsbury  <graces@redhat.com>
+
+	* config/m68k/tm-m68k.h (DECR_PC_AFTER_BREAK): Remove.
+	(REGISTER_BYTES_OK): Remove.
+	(REGISTER_BYTES): Remove.
+	(STORE_STRUCT_RETURN): Remove.
+	(DEPRECATED_EXTRACT_RETURN_VALUE): Remove.
+	(STORE_RETURN_VALUE): Remove.
+	(DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Remove.
+	(FRAME_CHAIN): Remove.
+	(FRAMELESS_FUNCTION_INVOCATION): Remove.
+	(FRAME_SAVED_PC): Remove.  
+	* m68k-tdep.c (m68k_register_bytes_ok):Add.
+	(m68k_store_struct_return): Add.
+	(m68k_deprecated_extract_return_value): Add.
+	(m68k_deprecated_extract_struct_value_address): Add.
+	(m68k_store_return_value): Add.
+	(m68k_frame_chain): Add.
+	(m68k_frameless_function_invocation): Add.
+	(m68k_frame_saved_pc): Add.
+	(m68k_gdbarch_init): added set_gdbarch calls for new 
+	functions and deleted macros.
+
+2002-06-23  Tom Tromey  <tromey@redhat.com>
+
+	* Makefile.in (HFILES_NO_SRCDIR): Remove old files.
+	(ALLDEPFILES): Likewise.
+	(udiheaders): Removed.
+	(udip2soc.o): Likewise.
+	(udi2go32.o): Likewise.
+	(udr.o): Likewise.
+	(HFILES_WITH_SRCDIR): Don't mention udiheaders.
+
+2002-06-22  Andrew Cagney  <ac131313@redhat.com>
+
+	* infrun.c (_initialize_infrun): Delete unnecessary call to
+	build_infrun.
+
+	* regcache.h: Update comments describing the regcache_cpy family
+	of functions.
+	(regcache_save, regcache_restore): Delete declaration.
+	(regcache_save_no_passthrough): Delete declaration.
+	(regcache_restore_no_passthrough): Delete declaration.
+	* regcache.c (regcache_save): Delete function.
+	(regcache_save_no_passthrough): Delete function.
+	(regcache_restore): Delete function.
+	(regcache_restore_no_passthrough): Delete function.
+
+2002-06-21  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/m68k/tm-m68k.h: Fix typo.
+	(FRAME_INIT_SAVED_REGS): Define when non-multi-arch.
+	(m68k_frame_init_saved_regs): Declare.
+
+2002-06-21  Jim Blandy  <jimb@redhat.com>
+
+	Remove some vestiges of Harris 88k support.
+	* dwarf2read.c (decode_locdesc): Remove `#if' block for Harris 88k
+	register numbering quirk.
+	* elfread.c (elf_symtab_read): Remove `#if' block for skipping
+	odd symbols occurring in Harris 88k ELF targets.
+
+2002-06-21  Tom Tromey  <tromey@redhat.com>
+
+	* gdb_locale.h: New file.
+	* Makefile.in (GDB_CFLAGS): Define LOCALEDIR.
+	(defs_h): Added gdb_locale.h.
+	* configure, config.in: Rebuilt.
+	* configure.in (PACKAGE): Define.
+	* defs.h: Include gdb_locale.h.
+	* main.c (captured_main): Call setlocale, bindtextdomain,
+	textdomain.
+
+2002-06-21  Dave Brolley  <brolley@redhat.com>
+
+	From Stan Shebs, Jim Blandy, Mark Salter, Kevin Buettner:
+	* config/frv/frv.mt: New file.
+	* config/frv/tm-frv.h: New file.
+	* configure.tgt: Support frv-*-*.
+	* Makefile.in (frv-tdep.o): New target.
+	* frv-tdep.c: New file.
+	* NEWS: Mention frv.
+
+2002-06-21  Dave Brolley  <brolley@redhat.com>
+
+	* MAINTAINERS: Add self to "Write After Approval" list.
+
+2002-06-21  Grace Sainsbury  <graces@redhat.com>
+
+	* config/m68k/tm-m68k.h (REGISTER_BYTE, REGISTER_RAW_SIZE)
+	(REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE)
+	(REGISTER_VIRTUAL_TYPE, REGISTER_NAMES, TARGET_LONG_DOUBLE_FORMAT)
+	(FUNCTION_START_OFFSET, SKIP_PROLOGUE, SAVED_PC_AFTER_CALL)
+	(INNER_THAN, STACK_ALIGN, REGISTER_SIZE): Remove macros.
+
+	* m68k-tdep.c: Include arch-utils.h
+	(m68k_register_raw_size): Add.
+	(m68k_register_virtual_size): Add.
+	(m68k_register_virtual_type): Add.
+	(m68k_register_name): Add.
+	(m68k_stack_align): Add.
+	(m68k_register_byte): Add.
+	(m68k_gdbarch_init): Add set_gdbarch calls for macros removed in
+	tm-m68k.h.
+
+2002-06-21  Grace Sainsbury  <graces@redhat.com>
+
+	* m68k-tdep.c (m68k_frame_init_saved_regs): Replace
+        m68k_find_saved_regs.
+        (m68k_pop_frame): Removed saved_regs structure, and replaced
+        references to it with frame->saved_regs.
+        (m68k_gdbarch_init): Added function calls to initialize the
+        gdbarch structure.
+	(m68k_fix_call_dummy): Add. 
+	* config/m68k/tm-m68k.h: (FRAME_FIND_SAVED_REGS): Remove.
+       	(CALL_DUMMY): Remove.
+	(CALL_DUMMY_LENGTH): Remove.
+	(CALL_DUMMY_START_OFFSET): Remove.
+	(CALL_DUMMY_BREAKPOINT_OFFSET): Remove.
+	(FIX_CALL_DUMMY): Remove.
+	(PUSH_DUMMY_FRAME): Remove.
+	(POP_FRAME): Remove.
+
+2002-06-19  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+	* parse.c (parse_fprintf): New function used to avoid calls to
+	fprintf in bison parser generated debug code.
+	* parser-defs.h: Declaration of new parse_fprintf function.
+	* ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y:
+	Set YYDEBUG to 1 by default.
+	Set YYFPRINTF as parse_fprintf.
+
+2002-06-21  Michal Ludvig  <mludvig@suse.cz>
+
+	* dwarf2cfi.c (read_encoded_pointer): Don't handle pointer 
+	encoding anymore.
+	(pointer_encoding, enum ptr_encoding): New.
+	(execute_cfa_program): Take care about pointer encoding.	
+	(dwarf2_build_frame_info): Only call parse_frame_info for 
+	.debug_frame and .eh_frame.
+	(parse_frame_info): New, derived from former dwarf2_build_frame_info.
+	fixed augmentation handling, added relative addressing, 
+	ignore duplicate FDEs. Added comments.
+	* dwarf2cfi.c: Reindented.
+	
+2002-06-20  Elena Zannoni  <ezannoni@redhat.com>
+
+	* event-top.c (command_handler): Don't use space_at_cmd_start
+	unless there is sbrk() on the host. Assign time and space data
+	to union fields of the appropriate length.
+
+2002-06-20  Michal Ludvig  <mludvig@suse.cz>
+
+	* x86-64-tdep.c (x86_64_register_nr2name): Rename to 
+	x86_64_register_name. Return type changed to 'const char *'.
+	(x86_64_register_name2nr): Rename to x86_64_register_number.
+	(x86_64_gdbarch_init): Update to reflect the change.
+	* x86-64-tdep.h: Ditto.
+	* x86-64-linux-nat.c (x86_64_fxsave_offset)
+	(supply_fpregset): Ditto.
+
+2002-06-19  Andrew Cagney  <cagney@redhat.com>
+
+	* regcache.h: Update copyright.
+	(struct regcache, struct gdbarch): Add opaque declarations.
+	(current_regcache): Declare global variable.
+	(regcache_read, regcache_write): Add gdbarch parameter.
+	(regcache_save, regcache_save_no_passthrough)
+	(regcache_restore, regcache_restore_no_passthrough)
+	(regcache_dup, regcache_dup_no_passthrough)
+	(regcache_cpy, regcache_cpy_no_passthrough)
+	(deprecated_grub_regcache_for_registers)
+	(deprecated_grub_regcache_for_register_valid)
+	(regcache_valid_p): Add function declarations.
+	
+	* regcache.c: Update copyright.
+	(regcache_descr_handle): New global variable.
+	(struct regcache_descr): Define.
+	(init_legacy_regcache_descr, init_regcache_descr): New functions.
+	(regcache_descr, xfree_regcache_descr): New functions.
+	(struct regcache): Define.
+	(regcache_xmalloc, regcache_xfree): New functions.
+	(regcache_cpy, regcache_cpy_no_passthrough): New functions.
+	(regcache_dup, regcache_dup_no_passthrough): New functions.
+	(regcache_valid_p, regcache_read_as_address): New functions.
+	(deprecated_grub_regcache_for_registers): New function.
+	(deprecated_grub_regcache_for_register_valid): New function.
+	(current_regcache): New global variable.
+	(register_buffer): Add regcache parameter.  Update calls.
+	(regcache_read, regcache_write): Add regcache parameter.  Rewrite.
+	(read_register_gen, write_register_gen): Update register_buffer
+	call.  Test for legacy_p instead of gdbarch_register_read_p or
+	gdbarch_register_write_p.
+	(regcache_collect): Update register_buffer call.
+	(build_regcache): Rewrite.  Use deprecated grub functions.
+	(regcache_save, regcache_save_no_passthrough): New functions.
+	(regcache_restore, regcache_restore_no_passthrough): New
+	functions.
+	(_initialize_regcache): Create the regcache_data_handle. Swap
+	current_regcache global variable.
+	
+	* sh-tdep.c (sh_pseudo_register_read): Add current_regcache
+	parameter to regcache_read and regcache_write calls.
+	(sh4_register_read): Ditto.
+	(sh64_pseudo_register_read): Ditto.
+	(sh64_register_read): Ditto.
+	(sh_pseudo_register_write): Ditto.
+	(sh4_register_write): Ditto.
+	(sh64_pseudo_register_write): Ditto.
+	(sh64_register_write): Ditto.
+
+	* defs.h (XCALLOC): Define.
+
+2002-06-19  Grace Sainsbury  <graces@redhat.com>
+
+	* config/m68k/tm-m68k.h (GDB_MULTI_ARCH): Added (set to 0).
+	* m68k-tdep.c (m68k_gdbarch_init): Added.
+	(m68k_dump_tdep): Added.
+
+2002-06-19  Daniel Jacobowitz  <drow@mvista.com>
+
+	* ada-lang.c (fill_in_ada_prototype): Update comment.
+
+2002-06-19  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mips-tdep.c (enum mips_abi): Explicitly start at 0.  Add
+	MIPS_ABI_LAST.
+	(mips_abi_string, mips_abi_strings): New.
+	(struct gdbarch_tdep): Remove mips_abi_string, add found_abi.
+	(mips_gdbarch_init): Set tdep->found_abi.  Don't set
+	tdep->mips_abi_string.  Honor mips_abi_string.  Default to
+	O32 if no ABI is found.
+	(mips_dump_tdep): Use mips_abi_strings.
+	(mips_abi_update): New function.
+	(_initialize_mips_tdep): Initialize mips_abi_string.  Add  
+	``set mips abi'' and ``show mips abi''.  Check the size of
+	mips_abi_strings.
+
+2002-06-19  Andrew Cagney  <cagney@redhat.com>
+
+	* i386-linux-tdep.c (i386_linux_register_name): Make return type
+	constant.
+
+2002-06-18  Joel Brobecker  <brobecker@gnat.com>
+
+	* alpha-tdep.c (heuristic_proc_desc): Compute the size of the  
+	current frame using only the first stack size adjustment. All
+	subsequent size adjustments are not considered to be part of
+	the "static" part of the current frame.
+	Compute the address of the saved registers relative to the
+	Frame Pointer ($fp) instead of the Stack Pointer if $fp is
+	in use in this frame.
+
+2002-06-18  Don Howard  <dhoward@redhat.com>
+ 
+        * valops.c (value_ind): Use value_at_lazy() when dereferencing
+        type int expressions.  Thanks to Jim Blandy <jimb@redhat.com> for
+        suggesting this solution.
+
+2002-06-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/romp/xm-rtbsd.h: Delete file.
+	* config/romp/rtbsd.mh: Delete file.
+
+2002-06-18  Keith Seitz  <keiths@redhat.com>
+
+	* breakpoint.c (condition_command): Post breakpoint_modify
+	when a condition is added to an existing breakpoint.
+	(commands_command): Likewise for commands.
+	(set_ignore_count): Likewise for ignore counts.
+	If no tty, do not simply return, still need to send event
+	notification.
+	(ignore_command): Only print a newline if the command came
+	from a tty.
+	Don't call breakpoints_changed, since this is now properly
+	handled by set_ignore_count.
+
+2002-06-18  Andrew Cagney  <cagney@redhat.com>
+
+	* MAINTAINERS: Note that cris-elf target can be compiled with
+	-Werror.
+	* cris-tdep.c (cris_register_name): Make return type constant.
+	(cris_breakpoint_from_pc): Ditto.
+
+2002-06-18  Michal Ludvig  <mludvig@suse.cz>
+
+	* frame.h (struct frame_info): Change type of context to 
+	'struct context'.
+
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbarch.sh (REGISTER_NAME): Change return type a constant string
+	pointer.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* config/mips/tm-mips.h (mips_register_name): Update.
+	* i386-tdep.h (i386_register_name): Update.
+	* mips-tdep.c (mips_register_name): Update
+	* alpha-tdep.c (alpha_register_name): Update.
+	* arch-utils.c (legacy_register_name): Update.
+	* arch-utils.h (legacy_register_name): Update.
+	* avr-tdep.c (avr_register_name): Update.
+	* ia64-tdep.c (ia64_register_name): Update.
+	* i386-tdep.c (i386_register_name): Update.
+	* sparc-tdep.c (sparc32_register_name): Update.
+	(sparc64_register_name): Update.
+	(sparclite_register_name): Update.
+	(sparclet_register_name): Update.
+	* sh-tdep.c (sh_generic_register_name): Update.
+	(sh_sh_register_name): Update.
+	(sh_sh3_register_name): Update.
+	(sh_sh3e_register_name): Update.
+	(sh_sh_dsp_register_name): Update.
+	(sh_sh3_dsp_register_name): Update.
+	(sh_sh4_register_name): Update.
+	(sh_sh64_register_name): Update.
+	* s390-tdep.c (s390_register_name): Update.
+	* rs6000-tdep.c (rs6000_register_name): Update.
+	* ns32k-tdep.c (ns32k_register_name_32082): Update.
+	(ns32k_register_name_32382): Update.
+	* d10v-tdep.c (d10v_ts2_register_name): Update.
+	(d10v_ts3_register_name): Update.
+	* xstormy16-tdep.c (xstormy16_register_name): Update.
+	* vax-tdep.c (vax_register_name): Update.
+	* v850-tdep.c (v850_register_name): Update.
+	* m68hc11-tdep.c (m68hc11_register_name): Update.
+	* mn10300-tdep.c (mn10300_generic_register_name): Update.
+	(am33_register_name): Update.
+
+2002-06-17  Grace Sainsbury  <graces@redhat.com>
+
+	* m68k-tdep.c: Reindented.
+
+2002-06-17  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb_indent.sh: Add prgregset_t, fpregset_t, and gregset_t to the
+	list of predefined types.
+
+2002-06-16  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE,
+	REGISTER_CONVERTIBLE, REGISTER_CONVERT_TO_VIRTUAL,
+	REGISTER_CONVERT_TO_RAW): Remove defines.
+	(i386_register_virtual_type, i386_register_convertible,
+	i386_register_convert_to_virtual, i386_register_convert_to_raw):
+	Remove prototypes.
+	* i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+	macros mentioned above.
+
+	* config/i386/tm-i386lynx.h (SAVED_PC_AFTER_CALL): Remove define.
+	(i386lynx_saved_pc_after_call): Remove prototype.
+	* i386ly-tdep.c: Include "i386-tdep.h".
+	(i386lynx_saved_pc_after_call): Make static.  Use
+	read_memory_nobpt instead of read_memory.  Use
+	read_memory_unsigned_integer instead of read_memory_integer.
+	(i386lynx_init_abi): New function.
+	(i386lynx_coff_osabi_sniffer): New function.
+	(_initialize_i386bsd_tdep): New function.
+
+	* config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
+	CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
+	CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
+	(i386_fix_call_dummy): Remove prototype.
+	* i386-tdep.c (i386_call_dummy_words): New variable.
+	(i386_gdbarch_init): Adjust for removal of the
+	macros mentioned above.
+
+2002-06-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* command.h (add_setshow_auto_boolean_cmd): Replace
+	add_set_auto_boolean_cmd.
+	* cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace
+	add_set_auto_boolean_cmd.
+	* cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration.
+	* mips-tdep.c (_initialize_mips_tdep): Update ``set mips
+	mask-address'' command.
+	(show_mask_address): Add cmd parameter.
+	* remote.c (add_packet_config_cmd): Update.  Change type of
+	set_func and show_func to cmd_sfunc_ftype.
+	(_initialize_remote): Update `set remote Z-packet'
+	(show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter.
+	(show_remote_protocol_e_packet_cmd): Ditto.
+	(show_remote_protocol_E_packet_cmd): Ditto.
+	(show_remote_protocol_P_packet_cmd): Ditto.
+	(show_remote_protocol_Z_software_bp_packet_cmd): Ditto.
+	(show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto.
+	(show_remote_protocol_Z_write_wp_packet_cmd): Ditto.
+	(show_remote_protocol_Z_read_wp_packet_cmd): Ditto.
+	(show_remote_protocol_Z_access_wp_packet_cmd): Ditto.
+	(show_remote_protocol_Z_packet_cmd): Ditto.
+	(show_remote_protocol_binary_download_cmd): Ditto.
+	(show_remote_cmd): Pass NULL to all of above.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
+	DEPRECATED_EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+	DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, PUSH_DUMMY_FRAME,
+	POP_FRAME): Remove defines.
+	(i386_push_arguments, i386_store_struct_return,
+	i386_extract_return_value, i386_store_return_value,
+	i386_extract_struct_value_address, i386_push_dummy_frame,
+	i386_pop_frame): Renove prototypes.
+	* i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+	macros mentioned above.
+
+2002-06-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* cli/cli-decode.c (add_setshow_boolean_cmd): Replace
+	add_set_boolean_cmd.
+	(add_setshow_cmd): New function.
+	* command.h (add_setshow_boolean_cmd): Replace
+	add_set_boolean_cmd.
+	* remote-rdi.c (_initialize_remote_rdi): Update ``set rdiheartbeat''
+	and ``set rdiromatzero''.
+	* maint.c (_initialize_maint_cmds): Update commented out code.
+	* cli/cli-decode.h (add_set_boolean_cmd): Delete declaration.
+	* target.c (initialize_targets): Update `set
+	trust-readonly-sections'.
+	* remote.c (_initialize_remote): Update `set remotebreak'.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386.h (FUNCTION_START_OFFSET, INNER_THAN,
+	BREAKPOINT, DECR_PC_AFTER_BREAK): Removed.
+	* i386-tdep.c (i386_skip_prologue): Adjust function signature to
+	fit into multi-arch framework.
+	(i386_breakpoint_from_pc): New function.
+	(i386_gdbarch_init): Adjust for removal of the macros mentioned
+	above.
+
+	* config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION,
+	FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS, FRAME_NUM_ARGS,
+	FRAME_ARGS_SKIP, FRAME_INIT_SAVED_REGS): Remove defines.
+	(i386_frameless_function_invocation, i386_frame_num_args,
+	i386_frame_init_saved_regs): Remove prototypes.
+	* i386-tdep.c (i386_gdbarch_init): Adjust for removal of the
+	macros mentioned above.
+
+2002-06-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* cli/cli-decode.c (set_cmd_cfunc): Update.
+	(set_cmd_sfunc): Update.
+	* command.h (cmd_cfunc_ftype, cmd_sfunc_ftype): Declare.
+	(set_cmd_sfunc, set_cmd_cfunc): Update.
+	* cli/cli-decode.h: Update.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-sol2-tdep.c (i386_sol2_osabi_sniffer): New function.
+	(_initialize_i386_sol2_tdep): Register i386_sol2_osabi_sniffer.
+
+2002-06-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* defs.h (auto_boolean): Declare enum.
+	* command.h (cmd_auto_boolean): Delete enum.
+	* mips-tdep.c (mask_address_var): Update.
+	(mips_mask_address_p): Update.
+	(show_mask_address): Update.
+	* remote.c (struct packet_config): Update.
+	(update_packet_config): Update.
+	(show_packet_config_cmd): Update.
+	(packet_ok): Update.
+	(add_packet_config_cmd): Update.
+	(_initialize_remote): 
+	* command.h: Update.
+	* cli/cli-setshow.c (parse_auto_binary_operation): Update.
+	(do_setshow_command): Update.
+	* cli/cli-decode.c (add_set_auto_boolean_cmd): Update.
+	* cli/cli-decode.h: Update.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-cygwin.h, config/i386/tm-fbsd.h,
+	config/i386/tm-go32.h, config/i386/tm-i386gnu.h,
+	config/i386/tm-i386sol2.h, config/i386/tm-i386v4.h,
+	config/i386/tm-linux.h, config/i386/tm-nbsd.h,
+	config/i386/tm-obsd.h (HAVE_I387_REGS): Remove define.
+	* config/i386/tm-i386.h: Unconditionally define FLOAT_INFO.
+
+	* i386-tdep.c (i386_coff_osabi_sniffer): Add "coff-go32" to the
+	list of DJGPP COFF targets.
+
+	* config/i386/tm-i386.h (REGISTER_SIZE): Remove define.
+	(NUM_GREGS, NUM_FREGS, NUM_SSE_REGS): Remove defines.
+	(FP_REGNUM, SP_REGNUM, PC_REGNUM, PS_REGNUM): Remove defines.
+	(FP0_REGNUM): Remove define.
+	(MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE,
+	MAX_REGISTER_VIRTUAL_SIZE): Remove define.
+	(i386_register_virtual_size): Remove protoype.
+	* i386-tdep.c (i386_register_virtual_size): Removed.
+	(i386_extract_return_value, i386_store_return_value): Use
+	FP0_REGNUM instead of NUM_FREGS to determine whether the
+	floating-point registers are available.
+	(i386_gdbarch_init): Tweak FIXME about FPU registers.
+	Adjust for removal of macros mentioned above.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386v4-nat.c: Include "i386-tdep.h".  Reformat and tweak various
+	comments.
+	(fill_gregset, supply_gregset, supply_fpregset, fill_fpregset):
+	Remove prototypes.
+	(supply_gregset, fill_gregset): Remove use of register keyword and
+	remove declaration for regmap.  Use I386_NUM_GREGS instead of
+	NUM_REGS and NUM_FREGS.
+	(FPREGSET_FSAVE_OFFSET): Remove.
+	(supply_fpregset, fill_fpregset): Use FPO_REGNUM instead of
+	NUM_FREGS to determine whether the floating-point registers are
+	available.
+
+	* i386gnu-nat.c (supply_gregset, gnu_fetch_registers,
+	gnu_store_registers): Replace usage of NUM_GREGS with
+	I386_NUM_GREGS.
+
+	* i386-linux-nat.c (OLD_CANNOT_FETCH_REGISTER,
+	OLD_CANNOT_STORE_REGISTER, supply_gregset, fill_gregset): Replace
+	usage of NUM_GREGS with I386_NUM_GREGS.
+
+	* i386-linux-nat.c (fill_gregset): Remove redundant parentheses.
+
+	* i386bsd-nat.c: Include "i386-tdep.h".
+	(supply_gregset, fill_gregset): Replace usage of NUM_GREGS with
+	I386_NUM_GREGS.
+
+	* i386v-nat.c: Remove copnditional inclusion of <asm/debugreg.h>,
+	and associated comment.  They no longer make any sense, since we
+	don't use this file anymore on Linux.
+
+	* config/i386/tm-i386.h (MAX_NUM_REGS): Removed.
+	* i386-tdep.c (i386_register_offset, i386_register_size): Use
+	I386_SSE_NUM_REGS instead of MAX_NUM_REGS for the number of
+	elements in these arrays.
+	(_initialize_i386_tdep): Use I386_SSE_NUM_REGS instead of
+	MAX_NUM_REGS.
+
+2002-06-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* osabi.h (gdb_osabi): Add GDB_OSABI_LYNXOS.
+	* osabi.c (gdb_osabi_names): Add entry for "LynxOS".
+
+2002-06-14  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbarch.sh (DEPRECATED_EXTRACT_RETURN_VALUE): Rename
+	EXTRACT_RETURN_VALUE.
+	(DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Rename
+	EXTRACT_STRUCT_VALUE_ADDRESS.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	
+	* values.c (value_being_returned): Handle
+	DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
+	(EXTRACT_RETURN_VALUE): Define as DEPRECATED_EXTRACT_RETURN_VALUE.
+
+	* arm-linux-tdep.c (arm_linux_init_abi): Update. 
+	* arm-tdep.c (arm_gdbarch_init): Update.
+	* avr-tdep.c (avr_gdbarch_init): Update.
+	* cris-tdep.c (cris_gdbarch_init): Update.
+	* d10v-tdep.c (d10v_gdbarch_init): Update.
+	* ia64-tdep.c (ia64_gdbarch_init): Update.
+	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
+	* s390-tdep.c (s390_gdbarch_init): Update.
+	* sh-tdep.c (sh_gdbarch_init): Update.
+	* s390-tdep.c (s390_gdbarch_init): Update.
+	* sparc-tdep.c (sparc_gdbarch_init): Update.
+	* ns32k-tdep.c (ns32k_gdbarch_init): Update.
+	* v850-tdep.c (v850_gdbarch_init): Update.
+	* vax-tdep.c (vax_gdbarch_init): Update.
+	* x86-64-tdep.c (x86_64_gdbarch_init): Update.
+	* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+
+	* config/arc/tm-arc.h: Update.
+	* config/d30v/tm-d30v.h: Update.
+	* config/fr30/tm-fr30.h: Update.
+	* config/h8300/tm-h8300.h: Update.
+	* config/h8500/tm-h8500.h: Update.
+	* config/i386/tm-i386.h: Update.
+	* config/i386/tm-ptx.h: Update.
+	* config/i386/tm-symmetry.h: Update.
+	* config/i960/tm-i960.h: Update.
+	* config/m32r/tm-m32r.h: Update.
+	* config/m68k/tm-delta68.h: Update.
+	* config/m68k/tm-linux.h: Update.
+	* config/m68k/tm-m68k.h: Update.
+	* config/m88k/tm-m88k.h: Update.
+	* config/mcore/tm-mcore.h: Update.
+	* config/mips/tm-mips.h: Update.
+	* config/mn10200/tm-mn10200.h: Update.
+	* config/pa/tm-hppa.h: Update.
+	* config/pa/tm-hppa64.h: Update.
+	* config/sparc/tm-sp64.h: Update.
+	* config/sparc/tm-sparc.h: Update.
+	* config/sparc/tm-sparclet.h: Update.
+	* config/z8k/tm-z8k.h: Update.
+
+2002-06-14  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (i386_linux_tdep_h): Define.
+	(i386_tdep_h, i387_tdep_h): Define.
+	(i386-linux-nat.o): Add $(i386_linux_tdep_h),
+	$(i386_tdep_h) and $(i387_tdep_h).
+	* i386-linux-nat.c: Include "i386-linux-tdep.h".
+
+2002-06-14  Mark Kettenis  <kettenis@gnu.org>
+
+	* config/i386/tm-i386.h (START_INFERIOR_TRAPS_EXPECTED): Removed.
+	Already covered by the default.
+
+	* config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT,
+	TARGET_LONG_DOUBLE_BIT): Remove.  * i386-tdep.c
+	(i386_gdbarch_init): Initialize long_double_format and long_double
+	bit.
+
+	* config/i386/i386sol2.mt (TDEPFILES): Add i386-sol2-tdep.o and
+	i386bsd-tdep.o.  Remove solib.o, solib-svr4.o and solib-legacy.o.
+	Move these to ...
+	* config/i386/i386sol2.mh: ... here.
+	* config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Remove define.
+	(sigtramp_saved_pc, I386V4_SIGTRAMP_SAVED_PC): Don't #undef.
+	(SIGCONTEXT_PC_OFFSET): Remove define.
+	(IN_SIGTRAMP): Remove define.
+	* i386-sol2-tdep.c: New file.
+	
+	* config/i386/i386nw.mt (TM_FILE): Change to tm-i386.h.
+	* config/i386/tm-i386nw.h: Removed.
+
+	* config/i386/tm-fbsd.h (STAB_REG_TO_REGNUM,
+	USE_STRUCT_CONVENTION): Remove defines.
+	(JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+	(get_longjmp_target): Remove prototype.
+	(IN_SIGTRAMP): Remove define.
+	(i386bsd_in_sigtramp): Remove prototype.
+	(i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+	function.  Update comment accordingly
+	(SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+	(FRAME_SAVED_PC): Remove define.
+	(i386bsd_frame_saved_pc): Remove prototype.
+	* config/i386/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC,
+	GET_LONGJMP_TARGET): Remove defines.
+	(get_longjmp_target): Remove prototype.
+	(IN_SIGTRAMP): Remove define.
+	(i386bsd_in_sigtramp): Remove prototype.
+	(i386bsd_sigtramp_start, i386bsd_sigtramp_end): Turn into a
+	function.  Update comment accordingly
+	(SIGTRAMP_START, SIGTRAMP): Adjust definition accordingly.
+	(FRAME_SAVED_PC): Remove define.
+	(i386bsd_frame_saved_pc): Remove prototype.
+	* config/i386/tm-nbsdaout.h (i386nbsd_aout_use_struct_convention):
+	Remove prototype.
+	(USE_STRUCT_CONVENTION): Remove prototype.
+	* i386bsd-nat.c (i386bsd_sigcontext_pc_offset): Remove
+	declaration.
+	(_initialize_i386bsd_nat): Revise logic to determine some
+	constants at compile time when compiling a native GDB.  Warn if
+	things don't match up with what we expect.
+	* i386bsd-tdep.c (i386bsd_sigtramp_start, i386bsd_sigtramp_end):
+	Remove variables.
+	(i386bsd_in_sigtramp): Rename tp i386bsd_pc_in_sigtramp.  Rewrite
+	to use date stored in `struct gdbarch_tdep'.
+	(i386bsd_sigcontext_offset): Remove varaible.
+	(i386bsd_sigtramp_saved_pc): Make public.  Rewrite to use data
+	stored in `struct gdbarch_tdep'.
+	(i386bsd_frame_saved_pc): Make static.
+	(i386bsd_sigtramp_start, i386bsd_sigtramp_end): New functions.
+	(i386bsd_sc_pc_offset, i386nbsd_sc_pc_offset,
+	i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+	i386fbsd4_sc_pc_offset): New variables.
+	(i386bsd_init_abi, i386nbsd_init_abi, i386nbsdelf_init_abi,
+	i386fbsdaout_init_abi, i386fbsd_init_abi, i386fbsd4_init_abi): New
+	functions.
+	(i386bsd_aout_osabi_sniffer, _initialize_i386bsd_tdep): New
+	functions.
+	* i386fbsd-nat.c (_initialize_i386fbsd_nat): Fix type in comment.
+	Modify the value of i386fbsd_sigtramp_start and
+	i386fbsd_sigtramp_end instead of i386bsd_sigtramp_start and
+	i386fbsd_sigtramp_end.
+	* i386nbsd-tdep.c: (i386nbsd_aout_use_struct_convention): Remove
+	function.
+
+	* config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Move
+	define to i386-linux-tdep.h.
+	(NUM_REGS, MAX_NUM_REGS, REGISTER_BYTES, REGISTER_NAME,
+	REGISTER_BYTE, REGISTER_RAW_SIZE, STAB_REG_TO_REGNUM): Remove
+	defines.
+	(i386_linux_register_name, i386_linux_register_byte,
+	i386_linux_register_raw_size): Remove prototypes.
+	(i386_linux_svr4_fetch_link_map_offsets): Remove prototype.
+	(SVR4_FETCH_LINK_MAP_OFFSETS): Remove define.
+	(IN_SIGTRAMP, FRAME_CHAIN, FRAME_SAVED_PC, SAVED_PC_AFTER_CALL,
+	TARGET_WRITE_PC): Remove defines.
+	(i386_linux_in_sigtramp, i386_linux_frame_chain,
+	i386_linux_frame_saved_pc, i386_linux_saved_pc_after_call,
+	i386_linux_write_pc): Remove prototypes.
+	(JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+	(get_longjmp_target): Remove prototype.
+	* i386-linux-tdep.h: New file.
+	* i386-linux-nat.c: Include "i386-linux-tdep.h".
+	* i386-linux-tdep.c: Include "i386-tdep.h" and
+	"i386-linux-tdep.h".
+	(i386_linux_register_name, i386_linux_register_byte,
+	i386_linux_register_raw_size, i386_linux_in_sigtramp,
+	i386_linux_write_pc, i386_linux_svr4_fetch_link_map_offsets):
+	Make static.
+	(i386_linux_init_abi): New function.
+	(_initialize_i386_linux_tdep): New function.
+
+	* config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Remove define.
+	(i386_saved_pc_after_call): Remove prototype.
+	(MAX_NUM_REGS): Increase to deal with Linux's orig_eax "register".
+	(REGISTER_NAME, STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
+	DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Remove defines.
+	(i386_register_name, i386_stab_reg_to_regnum,
+	i386_dwarf_reg_to_regnum): Remove prototypes.
+	(SIZEOF_GREGS, SIZEOF_FPU_REGS, SIZEOF_FPU_CTL_REGS,
+	SIZEOF_SSE_REGS): Remove defines.
+	(REGISTER_BYTES): Remove define.
+	(REGISTER_BYTE, REGISTER_RAW_SIZE): Remove defines.
+	(i386_register_byte, i386_register_raw_size): Remove prototypes.
+	(FRAME_CHAIN, FRAME_SAVED_PC): Remove defines.
+	(i386_frame_chain, i386_frame_saved_pc): Remove prototypes.
+	* config/i386/tm-i386v4.h (FRAME_CHAIN_VALID): Remove define.
+	(JB_ELEMENT_SIZE, JB_PC, JB_EBX, JB_ESI, JB_EDI, JB_EBP, JB_ESP,
+	JB_EDX, GET_LONGJMP_TARGET): Remove defines.
+	(get_longjmp_target): Remove prototype.
+	(I386V4_SIGTRAMP_SAVED_PC, IN_SIGTRAMP): Remove defines.
+	(sigtramp_saved_pc): Remove define.
+	(i386v4_sigtramp_saved_pc): Remove prototype.
+	* config/i386/tm-go32.h (FRAME_CHAIN,
+	FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC): Remove defines.
+	(i386go32_frame_saved_pc): Remove prototype.
+	(JB_ELEMENT_SIZE, JB_PC, GET_LONGJMP_TARGET): Remove defines.
+	(get_longjmp_target): Remove prototype.
+	* i386-tdep.h: Include "osabi.h".
+	(enum i386_abi): Removed.
+	(enum struct_return): New enum.
+	(struct gdbarch_tdep): Remove abi member, add osabi, jb_pc_offset,
+	struct_return, sigtramp_saved_pc, sigtramp_start, sigtramp_end and
+	sc_pc_offset members.
+	(i386_gdbarch_register_os_abi): Remove prototype.
+	(I386_NUM_GREGS, I386_NUM_FREGS, I386_NUM_XREGS,
+	I386_SSE_NUM_REGS): New defines.
+	(I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS,
+	I386_SSE_SIZEOF_REGS): New defines.
+	(i386_register_name, i386_register_byte, i386_register_raw_size):
+	New prototypes.
+	(i386_elf_init_abi, i386_svr4_init_abi): New prototypes.
+	(i386bsd_sigtramp_saved_pc): New prototype.
+	* i386-tdep.c: Don't include "elf-bfd.h".
+	(i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum,
+	i386_frame_chain, i386_saved_pc_after_call): Make static.
+	(i386_frame_saved_pc): Rewrite to call architecture dependent
+	function to deal with signal handlers.  Make static.
+	(i386go32_frame_saved_pc): Removed.
+	[GET_LONGJMP_TARGET] (JB_PC, JB_ELEMENT_SIZE, get_longjmp_target):
+	Removed.
+	(i386_get_longjmp_target): New function.
+	(default_struct_convention, pcc_struct_convention,
+	reg_struct_convention, valid_conventions, struct_convention): New
+	variables.
+	(i386_use_struct_convention): New function.
+	(i386v4_sigtramp_saved_pc): Renamed to
+	i386_svr4_sigtramp_saved_pc.  Made static.  Moved.
+	(i386_pc_in_sigtramp): New function.
+	(i386_abi_names): Removed.
+	(ABI_TAG_OS_GNU_LINUX, ABI_TAG_OS_GNU_HURD,
+	ABI_TAG_OS_GNU_SOLARIS, ABI_TAG_OS_FREEBSD, ABI_TAG_OS_NETBSD):
+	Removed.
+	(process_note_sections, i386_elf_abi_from_note, i386_elf_abi,
+	i386_gdbarch_register_os_abi): Removed.
+	(struct i386_abi_handler): Removed.
+	(i386_abi_handler_list): Removed.
+	(i386_svr4_pc_in_sigtramp, i386_go32_pc_in_sigtramp): New
+	functions.
+	(i386_elf_init_abi, i386_svr4_init_abi, i386_go32_init_abi,
+	i386_nw_init_abi): New functions.
+	(i386_gdbarch_init): Rewritten to use generic OS ABI framework.
+	Use set_gdbarch_xxx() calls instead of relying on macros for a
+	number of calls.
+	(i386_coff_osabi_sniffer, i386_nlm_osabi_sniffer): New functions.
+	(_initialize_i386_tdep): Add new 'struct-convcention' command.
+	Register the various architecture variants defined in this file.
+
+2002-06-14  Daniel Jacobowitz  <drow@mvista.com>
+
+	* gdbtypes.h (TYPE_FLAG_VARARGS): Update comment.
+	(struct main_type): Remove arg_types member.  Update comments for
+	struct field.
+	(TYPE_ARG_TYPES): Remove.
+	(TYPE_FN_FIELD_ARGS): Update.
+	(smash_to_method_type): Update prototype.
+
+	* c-typeprint.c (cp_type_print_method_args): Take method type
+	instead of argument list.  Use new argument layout.  Simplify.
+	(c_type_print_args): Use new argument layout.  Simplify.
+	(c_type_print_base): Update call to cp_type_print_method_args.
+	* dwarf2read.c (dwarf2_add_member_fn): Remove unneeded type
+	argument; use die->type instead.  Update call to
+	smash_to_method_type.
+	(read_structure_scope): Update call to dwarf2_add_member_fn.
+	* gdbtypes.c (allocate_stub_method): Update comment.
+	(smash_to_method_type): Take new NARGS and VARARGS arguments.
+	Use new argument layout.
+	(check_stub_method): Use new argument layout.  Don't count
+	void as an argument.
+	(print_arg_types): Update comments.  Use new argument layout.
+	(recursive_dump_type): Don't print arg_types member.
+	* hpread.c (hpread_read_struct_type): Use new argument layout.
+	(fixup_class_method_type): Likewise.
+	(hpread_type_lookup): Likewise.
+	* stabsread.c (read_type): Update calls to read_args and
+	smash_to_method_type.
+	(read_args): Use new argument layout.  Simplify.
+	* valops.c (typecmp): Use new argument layout.  Update parameters
+	and comments.  Simplify.
+	(hand_function_call): Use new argument layout.
+	(search_struct_method): Update call to typecmp.
+	(find_overload_match): Use new argument layout.
+
+2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
+
+	* NEWS: Mention multithreaded debug support for gdbserver.
+
+2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
+
+	* MAINTAINERS: Mention NEWS.
+
+2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mips-tdep.c (PROC_SYMBOL): Add warning comment.
+	(struct mips_objfile_private, compare_pdr_entries): New.
+	(non_heuristic_proc_desc): Read the ".pdr" section if it
+	is present.
+
+2002-06-12  Andrew Cagney  <ac131313@redhat.com>
+
+	* arm-tdep.c (arm_push_arguments): Rewrite using a two-pass loop.
+	(arm_debug): New static variable.
+	(_initialize_arm_tdep): Add ``set debug arm'' command.
+
+2002-06-12  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (sim_arm_h): Define.
+	(arm-tdep.o): Add $(sim_arm_h) and $(gdb_assert_h).
+	* arm-tdep.c: Include "gdb/sim-arm.h" and "gdb_assert.h".
+	(arm_register_sim_regno): New function, map an internal REGNUM
+	onto a simulator register number.
+	(arm_gdbarch_init): Set register_sim_regno.
+
+2002-06-09  Aldy Hernandez  <aldyh@redhat.com>
+
+	* MAINTAINERS: Add self.
+
+2002-06-11  Jim Blandy  <jimb@redhat.com>
+
+	* source.c (source_info): Mention whether the symtab has
+	information about preprocessor macros.
+
+	Call the command `info macro', not `show macro'.
+	* macrocmd.c (info_macro_command): Renamed from `show_macro_command'.
+	Fix error message.
+	(_initialize_macrocmd): Register `info_macro_command' in
+	`infolist', not `showlist'.
+
+2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mips-tdep.c (MIPS_FPU_TYPE, FP_REGISTER_DOUBLE, MIPS_EABI)
+	(MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM)
+	(MIPS_DEFAULT_SAVED_REGSIZE, MIPS_REGS_HAVE_HOME_P)
+	(MIPS_DEFAULT_STACK_ARGSIZE, GDB_TARGET_IS_MIPS64)
+	(MIPS_DEFAULT_MASK_ADDRESS_P): Remove obsolete definitions.  Define
+	unconditionally.
+	(set_mipsfpu_single_command, set_mipsfpu_double_command)
+	(set_mipsfpu_none_command): Remove if (GDB_MULTI_ARCH).
+	(_initialize_mips_tdep): Remove dead code.
+	* config/mips/tm-irix5.h (MIPS_LAST_ARG_REGNUM)
+	(MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+	* config/mips/tm-irix6.h (MIPS_LAST_ARG_REGNUM)
+	(MIPS_DEFAULT_STACK_ARGSIZE, MIPS_REGS_HAVE_HOME_P): Remove.
+	* config/mips/tm-mips.h (MIPS_EABI, MIPS_LAST_ARG_REGNUM,
+	MIPS_LAST_FP_ARG_REGNUM): Remove.
+
+2002-06-11  Michal Ludvig  <mludvig@suse.cz>
+
+	* dwarf2cfi.c (unwind_tmp_obstack_init): New.
+	(unwind_tmp_obstack_free, parse_frame_info)
+	(update_context, cfi_read_fp, cfi_write_fp)
+	(cfi_frame_chain, cfi_init_extra_frame_info)
+	(cfi_virtual_frame_pointer): Use the above function.
+	* dwarf2cfi.c: Reindented (using 'indent dwarf2cfi.c').
+
+2002-06-11  Corinna Vinschen  <vinschen@redhat.com>
+
+	* v850-tdep.c (v850_type_is_scalar): New function.
+	(v850_use_struct_convention): Match current gcc implementation
+	as close as possible.
+	(v850_push_arguments): Fix stack_offset handling.  Don't write
+	struct_addr into register.  This is done by v850_store_struct_return.
+	(v850_extract_return_value): Care for structs.
+	(v850_store_return_value): Ditto.
+	(v850_store_struct_return): Actually write address.
+
+2002-06-11  Michal Ludvig  <mludvig@suse.cz>
+
+	* x86-64-tdep.c (x86_64_skip_prologue): Fix to work on functions
+	without debug information too.
+
+2002-06-10  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbarch.sh (PRINT_FLOAT_INFO): Add frame and ui_file parameters.
+	Make multi-arch pure.
+	* gdbarch.h, gdbarch.c: Re-generate.
+	* arm-tdep.c (arm_print_float_info): Update.
+	* arch-utils.h (default_print_float_info): Update.
+	* arch-utils.c (default_print_float_info): Update.
+	* infcmd.c (float_info): Update call.
+
+2002-06-10  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (init.c): Move the call to _initialize_gdbtypes to
+	the front of the initialize list.
+
+2002-06-10  Andrew Cagney  <ac131313@redhat.com>
+
+	* infrun.c (struct inferior_status): Replace fields
+	selected_frame_address and selected_level with field
+	selected_frame_id.
+	(save_inferior_status): Update.  Use get_frame_id.
+	(struct restore_selected_frame_args): Delete.
+	(restore_selected_frame): Update.  Use frame_find_by_id.
+	(restore_inferior_status): Update.
+
+	* breakpoint.h (struct breakpoint): Change type of
+	watchpoint_frame to frame_id.
+	* breakpoint.c (insert_breakpoints): Use frame_find_by_id.  Remove
+	call to get_current_frame.
+	(do_enable_breakpoint): Use frame_find_by_id.  Remove call to
+	get_current_frame.
+	(watchpoint_check): Use frame_find_by_id.
+
+	* frame.h (record_selected_frame): Delete declaration.
+	* stack.c (record_selected_frame): Delete function.
+	
+	* frame.h (struct frame_id): Define.
+	(get_frame_id): Declare.
+	(frame_find_by_id): Declare.
+	* frame.c (frame_find_by_id): New function.
+	(get_frame_id): New function.
+
+2002-06-10  Andrey Volkov <avolkov@transas.com>
+
+	* ser-e7kpc.c: Fix duplicated define and call of 
+        _initialize_ser_e7000pc
+	    
+2002-06-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* signals/signals.c (target_signal_from_host): Fix #ifdef
+	SIGRTMIN case.
+	(do_target_signal_to_host): Likewise.
+
+2002-06-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mips-tdep.c (mips_find_abi_section): New function.
+	(mips_gdbarch_init): Call it.
+
+2002-06-09  Mark Kettenis  <kettenis@gnu.org>
+
+	* solib-svr4.c (init_fetch_link_map_offsets): Simply return
+	legacy_fetch_link_map_offsets.  Adjust comment to reflect reality
+	after Andrew's 2002-06-08 gdbarch change.
+
+2002-06-09  Mark Kettenis  <kettenis@gnu.org>
+
+	* i386-linux-nat.c (suppy_gregset): Don't supply
+	I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
+	register cache.
+	(fill_gregset): Don't fetch it under the same circumstances.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (callback_h): Define.
+	(remote_sim_h): Update path to remote-sim.h.
+	(remote-rdp.o): Add $(callback_h).
+	(remote-sim.o): Use $(callback_h).
+	* remote-sim.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* remote-rdp.c: Include "gdb/callback.h".
+
+2002-06-09  Mark Kettenis  <kettenis@gnu.org>
+
+	* osabi.h (gdb_osabi): Add GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+	* osabi.c (gdb_osabi_names): Add "DJGPP" and "NetWare".
+
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* sparcl-tdep.c: Use __CYGWIN__ instead of __CYGWIN32__.
+	* rdi-share/serpardr.c: Ditto.
+	* rdi-share/unixcomm.c: Ditto.
+	* rdi-share/serdrv.c: Ditto.
+	* rdi-share/hostchan.h: Ditto.
+	* rdi-share/hostchan.c: Ditto.
+	* rdi-share/host.h: Ditto.
+	* rdi-share/devsw.c: Ditto.
+
+	* objfiles.h: Change type of obj_private to void pointer.
+	* pa64solib.c: Update copyright.  Don't include "assert.h", use
+	strcmp instead of STREQ, use LONGEST, do not use PTR
+	* somsolib.c: Ditto.
+
+	* config/djgpp/fnchange.lst: Fix problems with bfd/elf32-i386.c,
+	bfd/elf32-i386qnx.c, bfd/elf32-sh.c, bfd/elf32-sh64-nbsd.c,
+	bfd/elf64-sh64-nbsd.c bfd/elf64-sh64.c.
+
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* frame.c (GET_SAVED_REGISTER): Delete macro definition.
+	(default_get_saved_register): Delete function.
+	* gdbarch.sh (GET_SAVED_REGISTER): Set default to
+	generic_unwind_get_saved_register.
+	* gdbarch.h, gdbarch.c: Re-generate.
+	
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbarch.sh (FRAME_CHAIN_VALID): Set default to
+	generic_func_frame_chain_valid.
+	* gdbarch.h, gdbarch.c: Re-generate.
+	* blockframe.c (generic_func_frame_chain_valid): Only check
+	PC_IN_CALL_DUMMY when generic dummy frames.  Don't worry about
+	passing FP to PC_IN_CALL_DUMMY.
+	Fix PR gdb/360.
+
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbarch.sh (struct gdbarch_data): Add field init_p.
+	(register_gdbarch_data): Initialize init_p.
+	(gdbarch_data): Initialize data pointer using the init function.
+	(init_gdbarch_data): Delete function.
+	(gdbarch_update_p): Update.
+	(initialize_non_multiarch): Update.
+	(struct gdbarch): Add field initialized_p.
+	* gdbarch.h, gdbarch.c: Re-generate.
+
+2002-06-07  Michal Ludvig  <mludvig@suse.cz>
+
+	* x86-64-linux-nat.c (x86_64_fxsave_offset): New.
+	(supply_fpregset, fill_fpregset): Don't call i387_*_fxsave,
+	better do the things actually here.
+	* x86-64-tdep.c (x86_64_register_name2nr): New.
+	(x86_64_register_name): Renamed to x86_64_register_nr2name.
+	(x86_64_gdbarch_init): Respect the above change.
+	* x86-64-tdep.h (x86_64_register_name2nr)
+	(x86_64_register_nr2name): Add prototypes.
+	* config/i386/x86-64linux.mt (TDEPFILES): Remove i387-tdep.o.
+
+2002-06-06  Michael Snyder  <msnyder@redhat.com>
+
+	* d10v-tdep.c (d10v_push_arguments): Handle struct_return.
+	Delete extra braces and re-indent.
+	(d10v_store_return_value): Char return values
+	must be shifted over by one byte in R0.
+	(d10v_extract_return_value): Delete extra braces, re-indent.
+
+2002-06-06  Elena Zannoni  <ezannoni@redhat.com>
+
+        * d10v-tdep.c (d10v_read_sp, d10v_read_fp): Add prototype.
+        (d10v_register_virtual_type): Make $fp and $sp be pointer to data.
+        (d10v_integer_to_address): Rewrite.
+        (d10v_frame_init_saved_regs): When reading fp and sp registers use
+        the d10v specific functions which take care of converting to the
+        correct space.
+
+2002-06-06  Elena Zannoni  <ezannoni@redhat.com>
+
+	* config/djgpp/fnchange.lst: Add testsuite files altivec-abi.c,
+	altivec-abi.exp, altivec-regs.c, altivec-regs.exp.
+
+2002-06-02  Andrew Cagney  <ac131313@redhat.com>
+
+	* config/alpha/nm-linux.h: Add "config/" prefix to tm, nm and xm
+	includes.
+	* config/tm-linux.h: Ditto.
+	* config/alpha/tm-alphalinux.h: Ditto.
+	* config/arm/nm-linux.h, config/arm/tm-linux.h: Ditto.
+	* config/arm/xm-nbsd.h, config/i386/nm-gnu.h: Ditto.
+	* config/i386/nm-i386lynx.h, config/i386/nm-i386sol2.h: Ditto.
+	* config/i386/nm-i386v4.h, config/i386/nm-i386v42mp.h: Ditto.
+	* config/i386/nm-linux.h, config/i386/nm-m3.h: Ditto.
+	* config/i386/nm-ptx4.h, config/i386/nm-x86-64.h: Ditto.
+	* config/i386/tm-i386gnu.h, config/i386/tm-i386lynx.h: Ditto.
+	* config/i386/tm-i386m3.h, config/i386/tm-i386sco5.h: Ditto.
+	* config/i386/tm-i386v4.h, config/i386/tm-linux.h: Ditto.
+	* config/i386/tm-ptx4.h, config/i386/tm-vxworks.h: Ditto.
+	* config/i386/xm-i386v4.h, config/i386/xm-nbsd.h: Ditto.
+	* config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
+	* config/i960/tm-vx960.h, config/ia64/nm-aix.h: Ditto.
+	* config/ia64/nm-linux.h, config/ia64/tm-aix.h: Ditto.
+	* config/ia64/tm-linux.h, config/ia64/xm-aix.h: Ditto.
+	* config/m68k/nm-linux.h, config/m68k/nm-m68klynx.h: Ditto.
+	* config/m68k/nm-sysv4.h, config/m68k/tm-linux.h: Ditto.
+	* config/m68k/tm-m68klynx.h, config/m68k/tm-m68kv4.h: Ditto.
+	* config/m68k/tm-sun2os4.h, config/m68k/tm-sun3os4.h: Ditto.
+	* config/m68k/tm-vx68.h, config/m68k/xm-m68kv4.h: Ditto.
+	* config/m68k/xm-nbsd.h, config/m88k/nm-delta88v4.h: Ditto.
+	* config/m88k/tm-delta88v4.h, config/m88k/xm-delta88v4.h: Ditto.
+	* config/mips/nm-irix5.h, config/mips/nm-linux.h: Ditto.
+	* config/mips/tm-linux.h, config/mips/tm-mips64.h: Ditto.
+	* config/mips/tm-mipsm3.h, config/mips/tm-mipsv4.h: Ditto.
+	* config/mips/tm-vxmips.h, config/mips/xm-irix5.h: Ditto.
+	* config/mips/xm-mipsv4.h, config/ns32k/xm-nbsd.h: Ditto.
+	* config/pa/nm-hppao.h, config/powerpc/nm-linux.h: Ditto.
+	* config/powerpc/tm-linux.h, config/powerpc/tm-vxworks.h: Ditto.
+	* config/powerpc/xm-aix.h, config/rs6000/nm-rs6000ly.h: Ditto.
+	* config/rs6000/tm-rs6000ly.h, config/rs6000/xm-aix4.h: Ditto.
+	* config/sh/tm-linux.h, config/sparc/nm-linux.h: Ditto.
+	* config/sparc/nm-sparclynx.h, config/sparc/nm-sun4sol2.h: Ditto.
+	* config/sparc/tm-linux.h, config/sparc/tm-sp64linux.h: Ditto.
+	* config/sparc/tm-sp64sim.h, config/sparc/tm-sparclynx.h: Ditto.
+	* config/sparc/tm-sun4os4.h, config/sparc/tm-sun4sol2.h: Ditto.
+	* config/sparc/tm-vxsparc.h, config/sparc/xm-sun4sol2.h: Ditto.
+
+2002-05-04  Aidan Skinner <aidan@velvet.net>
+
+	* ada-exp.tab.c: New file
+	* ada-exp.y: New file
+	* ada-lang.c: New file
+	* ada-lang.h: New file
+	* ada-lex.c: New file
+	* ada-lex.l: New file
+	* ada-tasks.c: New file
+	* ada-typeprint.c: New file
+	* ada-valprint.c: New file
+	
+2002-06-02  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set
+	use_struct_convention to ppc_sysv_abi_broken_use_struct_convention.
+
+2002-06-02  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* config/rs6000/aix4.mt (TDEPFILES): Use ppc-sysv-tdep.o
+	insetead of ppc-linux-tdep.o.
+	* config/rs6000/rs6000.mt (TDEPFILES): Likewise.
+	* config/rs6000/rs6000lynx.mt (TDEPFILES): Likewise.
+
+2002-06-02  Andrew Cagney  <ac131313@redhat.com>
+
+	2002-05-07 Christian Groessler <chris@groessler.org>
+        * z8k-tdep.c (z8k_print_register_hook): Fix display of 32 and 64
+	bit register contents for little endian hosts.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* MAINTAINERS: Mention that any `HP/UX reader' can be changed by
+	any maintainer.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbarch.h: Regenerate.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* MAINTAINERS: Add everyone to write-after-approval list.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* stack.c (frame_info): Use frame_register_unwind instead of
+	saved_regs.  Mention when the SP is on the stack or in a register.
+
+	* frame.h (frame_register_unwind_ftype): Define.  Document.
+	(struct frame_info): Add field register_unwind and
+	register_unwind_cache.
+	(frame_register_unwind): Declare.
+	(generic_unwind_get_saved_register): Declare.
+
+	* frame.c (frame_register_unwind): New function.
+	(generic_unwind_get_saved_register): New function.
+
+	* blockframe.c (generic_call_dummy_register_unwind): New function.
+	(frame_saved_regs_register_unwind): New function.
+	(set_unwind_by_pc): New function.
+	(create_new_frame): New function.
+	(get_prev_frame): New function.
+
+2002-05-30  Andrew Cagney  <ac131313@redhat.com>
+
+	* a29k-share/: Delete directory.
+	* remote-vx29k.c: Delete file.
+
+2002-05-30  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* config/djgpp/fnchange.lst: Add ns32knbsd-nat.c, ns32knbsd-tdep.c,
+	ppcnbsd-nat.c, ppcnbsd-tdep.c, sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+
+2002-05-30  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.in (ALLDEPFILES): Add sparc64nbsd-nat.c,
+	sparcnbsd-nat.c, and sparcnbsd-tdep.c.
+	(sparc64nbsd-nat.o)
+	(sparcnbsd-nat.o)
+	(sparcnbsd-tdep.o): New dependency lists.
+	* NEWS: Note new UltraSPARC NetBSD native configuration.
+	* configure.host (sparc64-*-netbsd*): New host.
+	* configure.tgt (sparc-*-netbsdelf*)
+	(sparc-*-netbsd*): Set gdb_target to nbsd.
+	(sparc64-*-netbsd*): New target.
+	* sparc64nbsd-nat.c: New file.
+	* sparcnbsd-nat.c: New file.
+	* sparcnbsd-tdep.c: New file.
+	* sparcnbsd-tdep.h: New file.
+	* config/sparc/nbsd.mt: New file.
+	* config/sparc/nbsd64.mh: New file.
+	* config/sparc/nbsd64.mt: New file.
+	* config/sparc/nbsdaout.mh (NATDEPFILES): Remove corelow.o,
+	sparc-nat.o, and solib.o.  Add sparcnbsd-nat.o.
+	(HOST_IPC): Remove.
+	* config/sparc/nbsdaout.mt: Remove.
+	* config/sparc/nbsdelf.mh (NATDEPFILES): Remove corelow.o,
+	sparc-nat.o, and solib.o.  Add sparcnbsd-nat.o.
+	(HOST_IPC): Remove.
+	* config/sparc/nbsdelf.mt: Remove.
+	* config/sparc/nm-nbsd.h: Update copyright years.  Remove all
+	sparc-nat.c compatiblity defines.
+	* config/sparc/tm-nbsd.h: Update copyright years.  Include solib.h.
+	(GDB_MULTI_ARCH): Set to GDB_MULTI_ARCH_PARTIAL.
+	* config/sparc/tm-nbsd64.h: New file.
+	* config/sparc/tm-nbsdaout.h: Remove.
+	* config/sparc/xm-nbsd.h: Remove.
+
+2002-05-30  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.in (sparc-tdep.o): Add osabi.h to dependency list.
+	* sparc-tdep.c: Include osabi.h.
+	(gdbarch_tdep): Add osabi member.
+	(_initialize_sparc_tdep): Use gdbarch_register.
+	(sparc_gdbarch_init): Use generic OS ABI framework.
+	(sparc_dump_tdep): New function.
+
+2002-05-30  Kevin Buettner  <kevinb@redhat.com>
+
+	* corefile.c (do_captured_read_memory_integer): Return non-zero
+	result.
+	(safe_read_memory_integer): Copy result of memory read when
+	status is non-zero.  Also, add comments.
+
+2002-05-20  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* Makefile.in (ppc_tdep_h): Define.
+	(ppc-linux-nat.o)
+	(ppc-linux-tdep.o)
+	(rs6000-tdep.o): Use $(ppc_tdep_h).
+	(ppc-sysv-tdep.o)
+	(ppcnbsd-nat.o)
+	(ppcnbsd-tdep.o): New dependency lists.
+	* ppc-tdep.h: Use generic OS ABI framework.
+	* ppc-linux-tdep.c (_initialize_ppc_linux_tdep)
+	(ppc_linux_init_abi): New functions.
+	(ppc_sysv_abi_broken_use_struct_convention)
+	(ppc_sysv_abi_use_struct_convention)
+	(ppc_sysv_abi_push_arguments): Move to...
+	* ppc-sysv-tdep.c: ...here.
+	* ppcnbsd-nat.c: Don't include gdbcore.h and regcache.h.
+	* rs6000-tdep.c (process_note_abi_tag_sections)
+	(get_elfosabi): Remove.
+	(rs6000_gdbarch_init): Use generic OS ABI framework.
+	(rs6000_dump_tdep): New function.
+	(_initialize_rs6000_tdep): Use gdbarch_register.
+	* config/powerpc/linux.mt (TDEPFILES): Add ppc-sysv-tdep.o.
+	* config/powerpc/nbsd.mh (NATDEPFILES): Remove solib-legacy.o.
+	* config/powerpc/aix.mt (TDEPFILES): Use ppc-sysv-tdep.o instead
+	of ppc-linux-tdep.o.
+	* config/powerpc/nbsd.mt (TDEPFILES): Likewise.
+	* config/powerpc/ppc-eabi.mt (TDEPFILES): Likewise.
+	* config/powerpc/ppc-sim.mt (TDEPFILES): Likewise.
+	* config/powerpc/ppcle-eabi.mt (TDEPFILES): Likewise.
+	* config/powerpc/ppcle-sim.mt (TDEPFILES): Likewise.
+	* config/powerpc/vxworks.mt (TDEPFILES): Likewise.
+
+2002-05-29  Jim Blandy  <jimb@redhat.com>
+
+	* macroscope.c (default_macro_scope): Put `void' in empty argument
+	list.
+
+2002-05-29  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (arch-utils.o): Add $(sim_regno_h).
+	* arch-utils.c: Include "sim-regno.h".
+	* gdbarch.sh: Don't include "sim-regno.h".
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* sim-regno.h (legacy_register_sim_regno): Move declaration from
+	here.
+	* arch-utils.h (legacy_register_sim_regno): To here.
+	* remote-sim.c (legacy_register_sim_regno): Move function from
+	here.
+	* arch-utils.c (legacy_register_sim_regno): To here.
+
+2002-05-28  Andrew Cagney  <ac131313@redhat.com>
+
+	* sim-regno.h: New file.
+	* Makefile.in (sim_regno_h): Define.
+	(d10v-tdep.o, remote-sim.o): Add dependency on $(sim_regno_h).
+	* remote-sim.c: Include "sim-regno.h" and "gdb_assert.h".
+	(legacy_register_sim_regno): New function.
+	(one2one_register_sim_regno): New function.
+	(gdbsim_fetch_register): Rewrite.
+	(gdbsim_store_register): Only store a register when
+	REGISTER_SIM_REGNO is valid.
+	* d10v-tdep.c: Include "sim-regno.h".
+	(d10v_ts2_register_sim_regno): Add legacy_regiter_sim_regno check.
+	(d10v_ts3_register_sim_regno): Ditto.
+	* gdbarch.sh: Include "sim-regno.h".
+	(REGISTER_SIM_REGNO): Set default to legacy_register_sim_regno.
+	* gdbarch.h, gdbarch.c: Regenerate.
+	* arch-utils.h (default_register_sim_regno): Delete declaration.
+	* arch-utils.c (default_register_sim_regno): Delete function.
 
 2002-05-28  Jason Thorpe  <thorpej@wasabisystems.com>
 
@@ -620,12 +4775,6 @@
 	* hpread.c (hpread_read_struct_type): Remove assignments to args.
 	(fixup_class_method_type): Likewise.
 
-2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
-
-	From Martin Pool <mbp@samba.org>:
-	* gdbserver/server.c (gdbserver_usage): New function.
-	(main): Call it.
-
 2002-05-15  Jim Blandy  <jimb@redhat.com>
 
 	Add macro structures to GDB's symbol tables.  Nobody puts anything
@@ -664,11 +4813,6 @@
 	* arm-linux-tdep.c (ARM_LINUX_JB_PC): Renamed from JB_PC.
 	(ARM_LINUX_JB_ELEMENT_SIZE): Likewise.
 
-2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/mem-break.c (reinsert_breakpoint_by_bp): Correct typo
-	stop_at -> stop_pc.
-
 2002-05-14  Andrew Cagney  <ac131313@redhat.com>
 
 	* regcache.c (register_valid): Revise comments refering to "Not
@@ -1523,7 +5667,6 @@
 	* remote-eb.c: Delete.
 	* remote-adapt.c: Delete.
 	* Makefile.in: Remove obsolete code.
-	* gdbserver/Makefile.in: Ditto.
 	* config/s390/s390x.mt: Ditto.
 	* config/s390/s390.mt: Ditto.
 	* config/sparc/sparclynx.mh: Ditto.
@@ -1706,7 +5849,7 @@
 2002-04-24  Pierre Muller  <ics.u-strasbg.fr>
 
 	* hpread.c (hpread_psymtab_to_symtab_1,
-	hpread_psymtab_to_symtab): Replace fprintf (stderr,...)
+	hpread_psymtab_to_symtab): Replace fprintf tab_to_s...)
 	with fprintf_unfiltered (gdb_stderr,...).
 
 2002-04-24  Pierre Muller  <ics.u-strasbg.fr>
@@ -2038,13 +6181,6 @@
 	* i386-linux-tdep.c: Update comments.
 	* breakpoint.c (bpstat_what): Update comment.
 
-2002-04-24  Michal Ludvig  <mludvig@suse.cz>
-
-	* gdbserver/linux-low.c (regsets_fetch_inferior_registers),
-	(regsets_store_inferior_registers): Removed cast to int from
-	ptrace() calls.
-	* gdbserver/regcache.h: Added declaration of struct inferior_info.
-
 2002-04-24  David S. Miller  <davem@redhat.com>
 
 	* i960-tdep.c (register_in_window_p): New function.
@@ -2391,55 +6527,6 @@
 	sorted in most most-recent-used order.  Document.
 	* gdbarch.h, gdbarch.c: Regenerate.
 
-2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/inferiors.c (struct inferior_info): Add regcache_data.
-	(add_inferior): Call create_register_cache.
-	(clear_inferiors): Call free_register_cache.
-	(inferior_regcache_data, set_inferior_regcache_data): New functions.
-	* gdbserver/regcache.c (struct inferior_regcache_data): New.
-	(registers): Remove.
-	(get_regcache): New function.
-	(create_register_cache, free_register_cache): New functions.
-	(set_register_cache): Don't initialize the register cache here.
-	(registers_to_string, registers_from_string, register_data): Call
-	get_regcache.
-	* gdbserver/regcache.h: Add prototypes.
-	* gdbserver/server.h: Likewise.
-
-2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/mem-break.c: New file.
-	* gdbserver/mem-break.h: New file.
-	* gdbserver/Makefile.in: Add mem-break.o rule; update server.h
-	dependencies.
-	* gdbserver/inferiors.c (struct inferior_info): Add target_data
-	member.
-	(clear_inferiors): Free target_data member if set.
-	(inferior_target_data, set_inferior_target_data): New functions.
-	* gdbserver/linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
-	(i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
-	* gdbserver/linux-low.c (linux_bp_reinsert): New variable.
-	(struct inferior_linux_data): New.
-	(linux_create_inferior): Use set_inferior_target_data.
-	(linux_attach): Likewise.  Call add_inferior.
-	(linux_wait_for_one_inferior): New function.
-	(linux_wait): Call it.
-	(linux_write_memory): Add const.
-	(initialize_low): Call set_breakpoint_data.
-	* gdbserver/linux-low.h (struct linux_target_ops): Add breakpoint
-	handling members.
-	* gdbserver/server.c (attach_inferior): Remove extra add_inferior
-	call.
-	* gdbserver/server.h: Include mem-break.h.  Update inferior.c
-	prototypes.
-	* gdbserver/target.c (read_inferior_memory)
-	(write_inferior_memory): New functions.
-	* gdbserver/target.h (read_inferior_memory)
-	(write_inferior_memory): Change macros to prototypes.
-	(struct target_ops): Update comments.  Add const to write_memory
-	definition.
-
 2002-04-19  Andrew Cagney  <ac131313@redhat.com>
 
 	* sparc-tdep.c (sparc_get_saved_register): Use get_prev_frame
@@ -2641,11 +6728,6 @@
 
 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
 
-	* gdbserver/linux-low.c (usr_store_inferior_registers): Support
-	registers which are allowed to fail to store.
-	* gdbserver/linux-low.h (linux_target_ops): Likewise.
-	* gdbserver/linux-ppc-low.c (ppc_regmap): Support FPSCR.
-	(ppc_cannot_store_register): FPSCR may not be storable.
 	* regformats/reg-ppc.dat: Support FPSCR.
 
 2002-04-11  Kevin Buettner  <kevinb@redhat.com>
@@ -2721,88 +6803,6 @@
 	* server.h (look_up_one_symbol): Add prototype.
 	* target.h (struct target_ops): Add look_up_symbols hook.
 
-2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/server.h: Include <string.h> if HAVE_STRING_H.
-	* ChangeLog: Correct paths in last ChangeLog entry.
-
-2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/linux-low.h: Remove obsolete prototypes.
-	(struct linux_target_ops): New.
-	(extern the_low_target): New.
-	* gdbserver/linux-low.c (num_regs, regmap): Remove declarations.
-	(register_addr): Use the_low_target explicitly.
-	(fetch_register): Likewise.
-	(usr_fetch_inferior_registers): Likewise.
-	(usr_store_inferior_registers): Likewise.
-	* gdbserver/linux-arm-low.c (num_regs): Remove.
-	(arm_num_regs): Define.
-	(arm_regmap): Renamed from regmap, made static.
-	(arm_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(arm_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-i386-low.c (num_regs): Remove.
-	(i386_num_regs): Define.
-	(i386_regmap): Renamed from regmap, made static.
-	(i386_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(i386_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-ia64-low.c (num_regs): Remove.
-	(ia64_num_regs): Define.
-	(ia64_regmap): Renamed from regmap, made static.
-	(ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(ia64_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-m68k-low.c (num_regs): Remove.
-	(m68k_num_regs): Define.
-	(m68k_regmap): Renamed from regmap, made static.
-	(m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(m68k_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-mips-low.c (num_regs): Remove.
-	(mips_num_regs): Define.
-	(mips_regmap): Renamed from regmap, made static.
-	(mips_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(mips_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-ppc-low.c (num_regs): Remove.
-	(ppc_num_regs): Define.
-	(ppc_regmap): Renamed from regmap, made static.
-	(ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(ppc_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-s390-low.c (num_regs): Remove.
-	(s390_num_regs): Define.
-	(s390_regmap): Renamed from regmap, made static.
-	(s390_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(s390_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-sh-low.c (num_regs): Remove.
-	(sh_num_regs): Define.
-	(sh_regmap): Renamed from regmap, made static.
-	(sh_cannot_fetch_register): Renamed from cannot_fetch_register,
-	made static.
-	(sh_cannot_store_register): Renamed from cannot_store_register,
-	made static.
-	(the_low_target): New.
-	* gdbserver/linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
-	(the_low_target): New.
-
 2002-04-09  Andrew Cagney  <ac131313@redhat.com>
 
 	* frame.c (read_relative_register_raw_bytes_for_frame): Do not
@@ -2816,71 +6816,6 @@
 
 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
 
-	* gdbserver/Makefile.in: Add stamp-h target.
-	* gdbserver/configure.in: Create stamp-h.
-	* gdbserver/configure: Regenerated.
-
-2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/inferiors.c: New file.
-	* gdbserver/target.c: New file.
-	* gdbserver/target.h: New file.
-	* gdbserver/Makefile.in:  Add target.o and inferiors.o.  Update
-	dependencies.
-	* gdbserver/linux-low.c (inferior_pid): New static variable,
-	moved from server.c.
-	(linux_create_inferior): Renamed from create_inferior.
-	Call add_inferior.  Return 0 on success instead of a PID.
-	(linux_attach): Renamed from myattach.
-	(linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
-	(linux_thread_alive): Renamed from mythread_alive.
-	(linux_wait): Renamed from mywait.  Call clear_inferiors () if the
-	child dies.
-	(linux_resume): Renamed from myresume.  Add missing ``return 0''.
-	(regsets_store_inferior_registers): Correct error message.
-	Add missing ``return 0''.
-	(linux_fetch_registers): Renamed from fetch_inferior_registers.
-	(linux_store_registers): Renamed from store_inferior_registers.
-	(linux_read_memory): Renamed from read_inferior_memory.
-	(linux_write_memory): Renamed from write_inferior_memory.
-	(linux_target_ops): New structure.
-	(initialize_low): Call set_target_ops ().
-	* gdbserver/remote-utils.c (unhexify): New function.
-	(hexify): New function.
-	(input_interrupt): Send signals to ``signal_pid''.
-	* gdbserver/server.c (inferior_pid): Remove.
-	(start_inferior): Update create_inferior call.
-	(attach_inferior): Call add_inferior.
-	(handle_query): New function.
-	(main): Call handle_query for `q' packets.
-	* gdbserver/server.h: Include "target.h".  Remove obsolete prototypes.
-	Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
-
-2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
-
-	* gdbserver/Makefile.in: Add WARN_CFLAGS.  Update configury
-	dependencies.
-	* gdbserver/configure.in: Check for <string.h>
-	* gdbserver/configure: Regenerate.
-	* gdbserver/config.in: Regenerate.
-	* gdbserver/gdbreplay.c: Include needed system headers.
-	(remote_open): Remove strchr prototype.
-	* gdbserver/linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
-	* gdbserver/regcache.c (supply_register): Change buf argument to const void *.
-	(supply_register_by_name): Likewise.
-	(collect_register): Change buf argument to void *.
-	(collect_register_by_name): Likewise.
-	* gdbserver/regcache.h: Add missing prototypes.
-	* gdbserver/remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
-	* gdbserver/server.c (handle_query): New function.
-	(attached): New static variable, moved out of main.
-	(main): Quiet longjmp clobber warnings.
-	* gdbserver/server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
-	* gdbserver/utils.c (error): Remove NORETURN.
-	(fatal): Likewise.
-
-2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
-
 	* symtab.h (ALL_BLOCK_SYMBOLS): Don't dereference the pointer
 	after the last symbol in a block.
 
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 8b80d41..212007e 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -47,7 +47,7 @@
 instantaneous and loud complaints.
 
 
-Target/Architecture:
+Target Instruction Set Architectures:
 
 Generic ISA (Instruction Set Architecture) issues, API variants, CPU
 variants.  *-tdep.c. The Target/Architecture maintainer works with the
@@ -56,14 +56,12 @@
 
 	a29k		Deleted.
 
-	alpha		--target=alpha-dec-osf4.0a -Werror
+	alpha		--target=alpha-elf -Werror
 			Maintenance only
 
-	arc		--target=arc-elf ,-Werror
-			Maintenance only
-			OBSOLETE candidate, not multi-arch
+	arc		(--target=arc-elf OBSOLETE)
 
-	arm		--target=arm-elf -w
+	arm		--target=arm-elf ,
 			Fernando Nasser		fnasser@redhat.com
 			Scott Bambrough		scottb@netwinder.org
 			Richard Earnshaw	rearnsha@arm.com
@@ -72,22 +70,15 @@
 	avr		--target=avr ,-Werror
 			Theodore A. Roth	troth@verinet.com
 
-	cris		--target=cris-elf -w
+	cris		--target=cris-elf ,-Werror
 			Orjan Friberg		orjanf@axis.com
 
 	d10v		--target=d10v-elf ,-Werror
 			Maintenance only
 
-	d30v		--target=d30v-elf ,-Werror
-			Maintenance only
-			OBSOLETE candidate, not multi-arch
+	d30v		(--target=d30v-elf OBSOLETE)
 
-	djgpp		--target=i586-pc-msdosdjgpp ,-Werror
-			(See native and host)
-
-	fr30		--target=fr30-elf -Werror
-			Maintenance only
-			OBSOLETE candidate, not multi-arch
+	fr30		(--target=fr30-elf OBSOLETE)
 
 	h8300		--target=h8300hms -Werror
 			Maintenance only
@@ -97,37 +88,31 @@
 			Maintenance only
 			Not multi-arch, work in progress
 
-	i386		--target=i386-elf,i386-aout ,-Werror
+	i386		--target=i386-elf ,-Werror
 			Mark Kettenis           kettenis@gnu.org
 
-	i960		--target=i960-coff ,-Werror
-			Maintenance only
-			OBSOLETE candidate, not multi-arch
+	i960		(--target=i960-coff OBSOLETE)
 
-	ia64		--target=ia64-linux ,-Werror
+	ia64		--target=ia64-linux-gnu ,-Werror
+			(--target=ia64-elf broken)
 			Kevin Buettner		kevinb@redhat.com
 
-	m32r		--target=m32r-elf -Werror
+	m32r		(--target=m32r-elf broken)
 			Michael Snyder		msnyder@redhat.com
-			Not multi-arch
+			OBSOLETE candidate, not multi-arch
 
-	m68hc11		--target=m68hc11-elf ,-Werror
+	m68hc11		--target=m68hc11-elf ,-Werror ,
 			Stephane Carrez		stcarrez@nerim.fr
 
 	m68k		--target=m68k-elf ,-Werror
 			Maintenance only
-			OBSOLETE candidate, not multi-arch
 
-	m88k		--target=m88k ,-Werror
-			Known problem in 5.1
+	m88k		(--target=m88k OBSOLETE)
+
+	mcore		--target=mcore-elf ,-Werror
 			Maintenance only
-			OBSOLETE candidate, not multi-arch
 
-	mcore		--target=mcore-elf,mcore-pe ,-Werror
-			Maintenance only
-			OBSOLETE candidate, not multi-arch
-
-	mips		--target=mips-elf,mips64-elf ,-Werror
+	mips		--target=mips-elf ,-Werror
 			Andrew Cagney		cagney@redhat.com
 
 	mn10200		--target=mn10200-elf ,-Werror
@@ -140,23 +125,20 @@
 	ns32k		--target=ns32k-netbsd ,-Werror
 			Maintenance only
 
-	pa		(--target=hppa1.1-hp-proelf broken)
+	pa		(--target=hppa-elf broken)
 			Maintenance only
 			OBSOLETE candidate, not multi-arch
 
 	powerpc		--target=powerpc-eabi ,-Werror
 			Kevin Buettner		kevinb@redhat.com
 
-	rs6000		--target=rs6000-ibm-aix4.1 ,-Werror
-			(see rs6000 native and ppc target)
-
-	s390		--target=s390-linux ,-Werror
+	s390		--target=s390-linux-gnu ,-Werror
 			(contact DJ Barrow	djbarrow@de.ibm.com)
 
 	sh		--target=sh-elf ,-Werror
 			Elena Zannoni		ezannoni@redhat.com
 
-	sparc		--target=sparc-elf,sparc64-elf ,-Werror
+	sparc		--target=sparc-elf ,-Werror
 			Maintenance only
 
 	tic80		Deleted.
@@ -164,12 +146,12 @@
 	v850		--target=v850-elf ,-Werror
 			Maintenance only
 
-	vax		--target=vax-dec-vms5.5 ,-Werror
+	vax		--target=vax-netbsd ,-Werror
 			Maintenance only
 
 	w65		Deleted.
 
-	x86-64		(--target=x86_64-linux-gnu broken)
+	x86-64		--target=x86_64-linux-gnu ,-Werror
 			Maintenance only
 
 	xstormy16	--target=xstormy16-elf ,-Werror
@@ -210,11 +192,15 @@
 p
 '
 
-can be used to generate a complete list of --target=
---enable-gdb-build-warnings= pairs of the form:
+can be used to generate a list of buildable targets.  The list
+containing values for the configure options --target=,
+--enable-gdb-build-warnings= and optionally
+--enable-sim-build-warnings vis:
 
 	arc-elf ,-Werror
 	...
+	m68hc11-elf ,-Werror ,
+	...
 	hppa1.1-hp-proelf broken
 	...
 
@@ -282,6 +268,8 @@
   linespec		Jim Blandy		jimb@redhat.com
 			Elena Zannoni		ezannoni@redhat.com
 			Fernando Nasser		fnasser@redhat.com
+  HP/UX readers		Any [past] maintainer can modify this.
+			Please send tricky ones to the symtabs maintainers.
 
 tracing bytecode stuff  Jim Blandy              jimb@redhat.com
 tracing			Michael Snyder		msnyder@redhat.com
@@ -348,6 +336,8 @@
 
 mmalloc/		ALL Host maintainers
 
+NEWS			ALL
+
 sim/			See sim/MAINTAINERS
 
 readline/		Master version: ftp://ftp.cwru.edu/pub/bash/
@@ -364,16 +354,34 @@
 FSF assignment and have submitted one good patch.
 
 David Anderson					davea@sgi.com
+Scott Bambrough					scottb@netwinder.org
+Jim Blandy					jimb@redhat.com
 Philip Blundell					philb@gnu.org
+Per Bothner					per@bothner.com
 Joel Brobecker					brobecker@act-europe.fr
+Dave Brolley					brolley@redhat.com
+Kevin Buettner					kevinb@redhat.com
+Andrew Cagney					ac131313@redhat.com
+David Carlton					carlton@math.stanford.edu
+Stephane Carrez					stcarrez@nerim.fr
+Michael Chastain				mec@shout.net
+Eric Christopher				echristo@redhat.com
 Nick Clifton					nickc@redhat.com
+Philippe De Muyter				phdm@macqel.be
 Chris G. Demetriou				cgd@broadcom.com
 Klee Dienes					kdienes@apple.com
+DJ Delorie					dj@redhat.com
 Richard Earnshaw				rearnsha@arm.com
+Frank Ch. Eigler				fche@redhat.com
+Ben Elliston					bje@redhat.com
+Anthony Green			 		green@redhat.com
 Matthew Green					mrg@eterna.com.au
+Chris Faylor					cgf@redhat.com
+Fred Fish					fnf@ninemoons.com
 Orjan Friberg					orjanf@axis.com
 Ben Harris					bjh21@netbsd.org
 Richard Henderson				rth@redhat.com
+Aldy Hernandez					aldyh@redhat.com
 Paul Hilfinger					hilfinger@gnat.com
 Matt Hiller					hiller@redhat.com
 Kazu Hirata					kazu@hxi.com
@@ -384,33 +392,45 @@
 Daniel Jacobowitz				dan@debian.org
 Andreas Jaeger					aj@suse.de
 Geoff Keating					geoffk@redhat.com
+Mark Kettenis					kettenis@gnu.org
 Jim Kingdon					jkingdon@engr.sgi.com  ++
+Jeff Law					law@redhat.com
 Jonathan Larmour				jlarmour@redhat.co.uk
+Robert Lipe					rjl@sco.com
 H.J. Lu						hjl@lucon.org
+Michal Ludvig                                   mludvig@suse.cz
 Glen McCready					gkm@redhat.com
 Greg McGary					greg@mcgary.org
 Jason Merrill					jason@redhat.com
+David S. Miller					davem@redhat.com
 Jason Molenda					jmolenda@apple.com
 Pierre Muller					muller@sources.redhat.com
+Fernando Nasser					fnasser@redhat.com
+David O'Brien					obrien@freebsd.org
 Alexandre Oliva					aoliva@redhat.com
 Tom Rix						trix@redhat.com
 Theodore A. Roth				troth@verinet.com
+Ian Roxborough					irox@redhat.com
+Grace Sainsbury					graces@redhat.com
 Mark Salter					msalter@redhat.com
+Peter Schauer					Peter.Schauer@regent
 Andreas Schwab					schwab@suse.de
 Keith Seitz					keiths@redhat.com
+Aidan Skinner					aidan@velvet.net
 Jiri Smid					smid@suse.cz
 David Smith					dsmith@redhat.com
 Stephen P. Smith				ischis2@home.com
 Jackie Smith Cashion				jsmith@redhat.com
+Stan Shebs					shebs@apple.com
+Michael Snyder					msnyder@redhat.com
 Petr Sorfa					petrs@caldera.com
 Gary Thomas					gthomas@redhat.com
 Jason Thorpe					thorpej@wasabisystems.com
 Tom Tromey					tromey@redhat.com
 Corinna Vinschen				vinschen@redhat.com
 Keith Walker					keith.walker@arm.com
-Michal Ludvig                                   mludvig@suse.cz
-David S. Miller					davem@redhat.com
-Eric Christopher				echristo@redhat.com
+Elena Zannoni					ezannoni@redhat.com
+Eli Zaretskii					eliz@gnu.org
 
 
 
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 64b76f0..756ffdf 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -79,6 +79,11 @@
 
 YACC=@YACC@
 
+# This is used to rebuild ada-lex.c from ada-lex.l.  If the program is 
+# not defined, but ada-lex.c is present, compilation will continue,
+# possibly with a warning.
+FLEX = flex
+
 YLWRAP = $(srcdir)/../ylwrap
 
 # where to find makeinfo, preferably one designed for texinfo-2
@@ -137,11 +142,11 @@
 # CLI sub directory definitons
 #
 SUBDIR_CLI_OBS = \
-	cli-dump.o cli-decode.o \
-	cli-interp.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o
+	cli-dump.o \
+	cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o
 SUBDIR_CLI_SRCS = \
-	cli/cli-dump.c cli/cli-decode.c \
-	cli/cli-interp.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
+	cli/cli-dump.c \
+	cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
 	cli/cli-utils.c
 SUBDIR_CLI_DEPS =
 SUBDIR_CLI_INITS = \
@@ -159,13 +164,13 @@
 SUBDIR_MI_OBS = \
 	mi-out.o mi-console.o \
 	mi-cmds.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
-	mi-cmd-disas.o mi-events.o mi-interp.o \
+	mi-cmd-disas.o \
 	mi-main.o mi-parse.o mi-getopt.o
 SUBDIR_MI_SRCS = \
 	mi/mi-out.c mi/mi-console.c \
 	mi/mi-cmds.c \
 	mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
-	mi/mi-cmd-disas.c mi/mi-events.c mi/mi-interp.c \
+	mi/mi-cmd-disas.c \
 	mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
 SUBDIR_MI_DEPS =
 SUBDIR_MI_INITS = \
@@ -211,7 +216,9 @@
 # in INCLUDE_DIR.
 # Where is the "-lopcodes" library, with (some of) the opcode tables and
 # disassemblers?
-OPCODES = ../opcodes/libopcodes.a
+OPCODES_DIR = ../opcodes
+OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
+OPCODES = $(OPCODES_DIR)/libopcodes.a
 # Where are the other opcode tables which only have header file
 # versions?
 OP_INCLUDE = $(INCLUDE_DIR)/opcode
@@ -312,7 +319,7 @@
 # your system doesn't have fcntl.h in /usr/include (which is where it
 # should be according to Posix).
 DEFS = @DEFS@
-GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config $(DEFS)
+GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS)
 
 # M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS
 # from the config directory.
@@ -339,6 +346,7 @@
 
 # LDFLAGS is specifically reserved for setting from the command line
 # when running make.
+LDFLAGS = @LDFLAGS@
 
 # Profiling options need to go here to work.
 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
@@ -423,9 +431,6 @@
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CC=$(CC)" \
 	"CFLAGS=$(CFLAGS)" \
-	"CHILLFLAGS=$(CHILLFLAGS)" \
-	"CHILL=$(CHILL)" \
-	"CHILL_LIB=$(CHILL_LIB)" \
 	"CXX=$(CXX)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"DLLTOOL=$(DLLTOOL)" \
@@ -475,25 +480,25 @@
     fi; \
   fi`
 
-CHILLFLAGS = $(CFLAGS)
-CHILL = gcc
-CHILL_FOR_TARGET = ` \
-  if [ -f $${rootme}/../gcc/Makefile ] ; then \
-    echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
-  else \
-    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
-      echo $(CC); \
-    else \
-      t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
-    fi; \
-  fi`
-CHILL_LIB = ` \
-  if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
-    echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
-      $${rootme}/../gcc/ch/runtime/libchill.a; \
-  else \
-      echo -lchill; \
-  fi`
+# OBSOLETE CHILLFLAGS = $(CFLAGS)
+# OBSOLETE CHILL = gcc
+# OBSOLETE CHILL_FOR_TARGET = ` \
+# OBSOLETE   if [ -f $${rootme}/../gcc/Makefile ] ; then \
+# OBSOLETE     echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
+# OBSOLETE   else \
+# OBSOLETE     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+# OBSOLETE       echo $(CC); \
+# OBSOLETE     else \
+# OBSOLETE       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+# OBSOLETE     fi; \
+# OBSOLETE   fi`
+# OBSOLETE CHILL_LIB = ` \
+# OBSOLETE   if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
+# OBSOLETE     echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
+# OBSOLETE       $${rootme}/../gcc/ch/runtime/libchill.a; \
+# OBSOLETE   else \
+# OBSOLETE       echo -lchill; \
+# OBSOLETE   fi`
 
 # The use of $$(x_FOR_TARGET) reduces the command line length by not
 # duplicating the lengthy definition.
@@ -504,10 +509,6 @@
 	'CC=$$(CC_FOR_TARGET)' \
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
 	"CFLAGS=$(CFLAGS)" \
-	"CHILLFLAGS=$(CHILLFLAGS)" \
-	'CHILL=$$(CHILL_FOR_TARGET)' \
-	"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
-	"CHILL_LIB=$(CHILL_LIB)" \
 	'CXX=$$(CXX_FOR_TARGET)' \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
@@ -523,9 +524,10 @@
 # Links made at configuration time should not be specified here, since
 # SFILES is used in building the distribution archive.
 
-SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
+SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
+	ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
 	buildsym.c c-exp.y c-lang.c c-typeprint.c c-valprint.c \
-	ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c coffread.c \
+	coffread.c \
 	complaints.c completer.c corefile.c cp-valprint.c dbxread.c \
 	demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
 	event-loop.c event-top.c \
@@ -533,18 +535,18 @@
 	findvar.c regcache.c gdbarch.c arch-utils.c gdbtypes.c osabi.c \
 	inf-loop.c infcmd.c inflow.c infrun.c language.c \
 	kod.c kod-cisco.c \
-	ui-out.c cli-out.c interps.c \
+	ui-out.c cli-out.c \
 	varobj.c wrapper.c \
 	jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \
 	m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c main.c maint.c \
 	memattr.c mem-break.c minsyms.c mipsread.c nlmread.c objfiles.c \
 	p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c \
 	macrotab.c macroexp.c macrocmd.c macroscope.c \
-	printcmd.c remote.c remote-nrom.c scm-exp.c scm-lang.c \
+	printcmd.c remote.c scm-exp.c scm-lang.c \
 	scm-valprint.c source.c stabsread.c stack.c symfile.c \
 	symmisc.c symtab.c linespec.c target.c thread.c top.c tracepoint.c \
 	typeprint.c utils.c valarith.c valops.c valprint.c values.c \
-	serial.c ser-unix.c mdebugread.c os9kread.c \
+	serial.c ser-unix.c mdebugread.c \
 	tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \
 	tui/tuiData.c tui/tuiData.h tui/tuiDataWin.c tui/tuiDataWin.h \
 	tui/tuiDisassem.c tui/tuiDisassem.h tui/tuiGeneralWin.c \
@@ -565,14 +567,27 @@
 # (Why would we not want to depend on them?  If one of these changes in a 
 # non-binary-compatible way, it is a real pain to remake the right stuff
 # without these dependencies -kingdon, 13 Mar 1994)
+aout_aout64_h =	$(INCLUDE_DIR)/aout/aout64.h
+aout_stabs_gnu_h =	$(INCLUDE_DIR)/aout/stabs_gnu.h
 getopt_h =	$(INCLUDE_DIR)/getopt.h
 floatformat_h =	$(INCLUDE_DIR)/floatformat.h
 bfd_h =		$(BFD_DIR)/bfd.h
+callback_h =	$(INCLUDE_DIR)/gdb/callback.h
+coff_sym_h =	$(INCLUDE_DIR)/coff/sym.h
+coff_symconst_h =	$(INCLUDE_DIR)/coff/symconst.h
+coff_ecoff_h =	$(INCLUDE_DIR)/coff/ecoff.h
 dis_asm_h =	$(INCLUDE_DIR)/dis-asm.h 
-remote_sim_h =	$(INCLUDE_DIR)/remote-sim.h
+elf_sh_h =	$(INCLUDE_DIR)/elf/sh.h
+elf_bfd_h =	$(BFD_SRC)/elf-bfd.h
+libaout_h =	$(BFD_SRC)/libaout.h
+remote_sim_h =	$(INCLUDE_DIR)/gdb/remote-sim.h
 demangle_h =    $(INCLUDE_DIR)/demangle.h
 obstack_h =     $(INCLUDE_DIR)/obstack.h
-sim_d10v_h =	$(INCLUDE_DIR)/gdb/sim-d10v.h
+opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
+sh_opc_h = 	$(OPCODES_SRC)/sh-opc.h
+gdb_sim_arm_h =	$(INCLUDE_DIR)/gdb/sim-arm.h
+gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
+gdb_sim_sh_h =	$(INCLUDE_DIR)/gdb/sim-sh.h
 splay_tree_h =  $(INCLUDE_DIR)/splay-tree.h
 
 readline_headers = \
@@ -581,95 +596,175 @@
 	$(READLINE_SRC)/keymaps.h \
 	$(READLINE_SRC)/readline.h
 
-udiheaders = \
-	$(srcdir)/29k-share/udi/udiproc.h \
-	$(srcdir)/29k-share/udi/udiphcfg.h \
-	$(srcdir)/29k-share/udi/udiphunix.h \
-	$(srcdir)/29k-share/udi/udiptcfg.h \
-	$(srcdir)/29k-share/udi/udipt29k.h \
-	$(srcdir)/29k-share/udi/udisoc.h
-
 xm_h =		@xm_h@
 tm_h =		@tm_h@
 nm_h =		@nm_h@
 
-alpha_tdep_h =	alpha-tdep.h osabi.h
-annotate_h =	annotate.h $(symtab_h) $(gdbtypes_h)
-arch_utils_h =	arch-utils.h
-arm_tdep_h =	arm-tdep.h osabi.h
-ax_h = 		ax.h $(doublest_h)
-bcache_h =	bcache.h
+#
+# gdb/ header files
+#
+
+acconfig_h = acconfig.h
+ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
+alpha_tdep_h = alpha-tdep.h $(osabi_h)
+alphabsd_tdep_h = alphabsd-tdep.h
+annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
+arch_utils_h = arch-utils.h
+arm_tdep_h = arm-tdep.h $(osabi_h)
+ax_gdb_h = ax-gdb.h
+ax_h = ax.h $(doublest_h)
+bcache_h = bcache.h
+breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h)
+buildsym_h = buildsym.h
 builtin_regs_h = builtin-regs.h
-breakpoint_h =	breakpoint.h $(frame_h) $(value_h)
-buildsym_h =	buildsym.h
-c_lang_h =	c-lang.h $(value_h) $(macroexp_h)
-call_cmds_h =	call-cmds.h
-cli_cmds_h =	$(srcdir)/cli/cli-cmds.h
-cli_decode_h =	$(srcdir)/cli/cli-decode.h $(command_h)
-cli_dump_h =	$(srcdir)/cli/cli-dump.h
-cli_out_h =	cli-out.h
-cli_script_h =	$(srcdir)/cli/cli-script.h
-cli_setshow_h =	$(srcdir)/cli/cli-setshow.h
-cli_utils_h =	$(srcdir)/cli/cli-utils.h
-command_h =	command.h
-complaints_h =	complaints.h
-completer_h =	completer.h
-cp_abi_h =	cp-abi.h
-dcache_h =	dcache.h
-defs_h =	defs.h $(xm_h) $(tm_h) $(nm_h) config.status config.h \
-		gdbarch.h ui-file.h $(INCLUDE_DIR)/gdb/signals.h
-doublest_h =	doublest.h $(floatformat_h)
-dwarf2cfi_h =	dwarf2cfi.h
-event_loop_h =  event-loop.h
-event_top_h = 	event-top.h
-expression_h =	expression.h $(doublest_h) $(symtab_h)
-frame_h =	frame.h
-gdb_h =		gdb.h
-gdb_assert_h =	gdb_assert.h
-gdb_events_h =	gdb-events.h
-gdb_stabs_h =	gdb-stabs.h
-gdb_string_h =  gdb_string.h
-gdb_wait_h =	gdb_wait.h
-gdb_regex_h =	gdb_regex.h
-gdbcmd_h =	gdbcmd.h $(command_h) $(ui_out_h)
-gdbcore_h =	gdbcore.h $(bfd_h)
-gdbthread_h =	gdbthread.h $(breakpoint_h)
-gdbtypes_h =	gdbtypes.h
-inf_loop_h =  	inf-loop.h
-inferior_h =	inferior.h $(breakpoint_h)
-interps_h =	interps.h
-language_h =	language.h
-linespec_h =	linespec.h
-macroexp_h =	macroexp.h
-macrotab_h =    macrotab.h $(obstack_h) $(bcache_h)
-macroscope_h =  macroscope.h $(macrotab_h) $(symtab_h)
-memattr_h =     memattr.h
-monitor_h =	monitor.h
-objfiles_h =	objfiles.h
-parser_defs_h =	parser-defs.h $(doublest_h)
-regcache_h =	regcache.h
-remote_h =	remote.h
-remote_utils_h =  remote-utils.h $(target_h)
-ser_unix_h =	ser-unix.h
-serial_h =	serial.h
-sh_tdep_h =	sh-tdep.h osabi.h
-solist_h =	solist.h
-source_h =	source.h
-stabsread_h =	stabsread.h
-symfile_h =	symfile.h
-symtab_h =	symtab.h $(bcache_h)
-target_h =      target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
-terminal_h =	terminal.h
-top_h =		top.h
-tracepoint_h =	tracepoint.h
-typeprint_h =	typeprint.h
-ui_out_h =      ui-out.h
-valprint_h =	valprint.h
-value_h =	value.h $(symtab_h) $(gdbtypes_h) $(expression_h) $(doublest_h)
-varobj_h =      varobj.h $(symtab_h) $(gdbtypes_h)
-version_h = 	version.h
-wrapper_h =	wrapper.h
-xcoffsolib_h =	xcoffsolib.h
+c_lang_h = c-lang.h $(value_h) $(macroexp_h)
+call_cmds_h = call-cmds.h
+ch_lang_h = ch-lang.h
+cli_out_h = cli-out.h
+coff_solib_h = coff-solib.h
+command_h = command.h
+complaints_h = complaints.h
+completer_h = completer.h
+cp_abi_h = cp-abi.h
+dcache_h = dcache.h
+defs_h = defs.h $(config_h) $(gdb_locale_h) $(gdb_signals_h) $(ansidecl_h) \
+	$(libiberty_h) $(progress_h) $(bfd_h) $(tui_h) $(ui_file_h) $(xm_h) \
+	$(nm_h) $(tm_h) $(fopen_same_h) $(gdbarch_h) $(arch_utils_h)
+doublest_h = doublest.h $(floatformat_h)
+dst_h = dst.h
+dwarf2cfi_h = dwarf2cfi.h
+environ_h = environ.h
+event_loop_h = event-loop.h
+event_top_h = event-top.h
+expression_h = expression.h $(symtab_h) $(doublest_h)
+f_lang_h = f-lang.h
+frame_h = frame.h
+gdb_events_h = gdb-events.h
+gdb_stabs_h = gdb-stabs.h
+gdb_h = gdb.h
+gdb_assert_h = gdb_assert.h
+gdb_dirent_h = gdb_dirent.h
+gdb_locale_h = gdb_locale.h
+gdb_obstack_h = gdb_obstack.h $(obstack_h)
+gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
+gdb_regex_h = gdb_regex.h $(xregex_h)
+gdb_stat_h = gdb_stat.h
+gdb_string_h = gdb_string.h
+gdb_thread_db_h = gdb_thread_db.h
+gdb_vfork_h = gdb_vfork.h
+gdb_wait_h = gdb_wait.h
+gdbarch_h = gdbarch.h $(dis_asm_h) $(value_h) $(inferior_h)
+gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
+gdbcore_h = gdbcore.h $(bfd_h)
+gdbthread_h = gdbthread.h $(breakpoint_h)
+gdbtypes_h = gdbtypes.h
+gnu_nat_h = gnu-nat.h
+gregset_h = gregset.h
+i386_linux_tdep_h = i386-linux-tdep.h
+i386_tdep_h = i386-tdep.h $(osabi_h)
+i387_tdep_h = i387-tdep.h
+inf_loop_h = inf-loop.h
+inferior_h = inferior.h $(breakpoint_h) $(target_h)
+jv_lang_h = jv-lang.h
+kod_h = kod.h
+language_h = language.h
+linespec_h = linespec.h
+m2_lang_h = m2-lang.h
+macroexp_h = macroexp.h
+macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
+macrotab_h = macrotab.h
+memattr_h = memattr.h
+minimon_h = minimon.h
+mipsnbsd_tdep_h = mipsnbsd-tdep.h
+monitor_h = monitor.h
+nbsd_tdep_h = nbsd-tdep.h
+ns32k_tdep_h = ns32k-tdep.h $(osabi_h)
+objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
+ocd_h = ocd.h
+osabi_h = osabi.h
+p_lang_h = p-lang.h
+pa64solib_h = pa64solib.h
+parser_defs_h = parser-defs.h $(doublest_h)
+ppc_tdep_h = ppc-tdep.h $(osabi_h)
+ppcnbsd_tdep_h = ppcnbsd-tdep.h
+proc_utils_h = proc-utils.h
+regcache_h = regcache.h
+remote_utils_h = remote-utils.h $(target_h)
+remote_h = remote.h
+scm_lang_h = scm-lang.h $(scm_tags_h)
+scm_tags_h = scm-tags.h
+ser_unix_h = ser-unix.h
+serial_h = serial.h
+sh_tdep_h = sh-tdep.h $(osabi_h)
+shnbsd_tdep_h = shnbsd-tdep.h
+sim_regno_h = sim-regno.h
+solib_svr4_h = solib-svr4.h
+solib_h = solib.h
+solist_h = solist.h
+somsolib_h = somsolib.h
+source_h = source.h
+sparcnbsd_tdep_h = sparcnbsd-tdep.h
+srec_h = srec.h
+stabsread_h = stabsread.h
+symfile_h = symfile.h
+symtab_h = symtab.h
+target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
+terminal_h = terminal.h
+top_h = top.h
+tracepoint_h = tracepoint.h
+typeprint_h = typeprint.h
+ui_file_h = ui-file.h
+ui_out_h = ui-out.h
+valprint_h = valprint.h
+value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
+varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
+vax_tdep_h = vax-tdep.h $(osabi_h)
+version_h = version.h
+wince_stub_h = wince-stub.h
+wrapper_h = wrapper.h $(gdb_h)
+x86_64_tdep_h = x86-64-tdep.h $(i386_tdep_h)
+xcoffsolib_h = xcoffsolib.h
+xmodem_h = xmodem.h
+
+#
+# gdb/cli/ headers
+#
+
+cli_cmds_h = $(srcdir)/cli/cli-cmds.h
+cli_decode_h = $(srcdir)/cli/cli-decode.h $(gdb_regex_h) $(command_h)
+cli_dump_h = $(srcdir)/cli/cli-dump.h
+cli_script_h = $(srcdir)/cli/cli-script.h
+cli_setshow_h = $(srcdir)/cli/cli-setshow.h
+cli_utils_h = $(srcdir)/cli/cli-utils.h
+
+#
+# gdb/mi/ headers
+#
+
+mi_cmds_h = $(srcdir)/mi/mi-cmds.h
+mi_console_h = $(srcdir)/mi/mi-console.h
+mi_getopt_h = $(srcdir)/mi/mi-getopt.h
+mi_out_h = $(srcdir)/mi/mi-out.h
+mi_parse_h = $(srcdir)/mi/mi-parse.h
+
+#
+# gdb/tui/ headers
+#
+
+tui_file_h = $(srcdir)/tui/tui-file.h
+tui_h = $(srcdir)/tui/tui.h $(ansidecl_h)
+tuiCommand_h = $(srcdir)/tui/tuiCommand.h
+tuiData_h = $(srcdir)/tui/tuiData.h
+tuiDataWin_h = $(srcdir)/tui/tuiDataWin.h
+tuiDisassem_h = $(srcdir)/tui/tuiDisassem.h
+tuiGeneralWin_h = $(srcdir)/tui/tuiGeneralWin.h
+tuiIO_h = $(srcdir)/tui/tuiIO.h
+tuiLayout_h = $(srcdir)/tui/tuiLayout.h
+tuiRegs_h = $(srcdir)/tui/tuiRegs.h
+tuiSource_h = $(srcdir)/tui/tuiSource.h $(defs_h)
+tuiSourceWin_h = $(srcdir)/tui/tuiSourceWin.h
+tuiStack_h = $(srcdir)/tui/tuiStack.h
+tuiWin_h = $(srcdir)/tui/tuiWin.h
 
 # Header files that need to have srcdir added.  Note that in the cases
 # where we use a macro like $(gdbcmd_h), things are carefully arranged
@@ -678,16 +773,16 @@
 # right, it is probably easiest just to list .h files here directly.
 
 HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \
-	dst.h environ.h $(gdbcmd_h) gdb.h gdbcore.h \
+	environ.h $(gdbcmd_h) gdb.h gdbcore.h \
 	gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \
 	objfiles.h parser-defs.h serial.h solib.h \
 	symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
 	macrotab.h macroexp.h macroscope.h \
-	c-lang.h ch-lang.h f-lang.h \
+	c-lang.h f-lang.h \
 	jv-lang.h \
 	m2-lang.h  p-lang.h \
 	complaints.h valprint.h \
-	29k-share/udi/udiids.h 29k-share/udi_soc nindy-share/b.out.h \
+	nindy-share/b.out.h \
 	nindy-share/block_io.h nindy-share/coff.h \
 	nindy-share/env.h nindy-share/stop.h \
 	vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \
@@ -697,7 +792,7 @@
 
 # Header files that already have srcdir in them, or which are in objdir.
 
-HFILES_WITH_SRCDIR = $(udiheaders) ../bfd/bfd.h
+HFILES_WITH_SRCDIR = ../bfd/bfd.h
 
 
 # GDB "info" files, which should be included in their entirety
@@ -736,15 +831,15 @@
 	exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
 	dbxread.o coffread.o elfread.o \
 	dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
-	c-lang.o ch-exp.o ch-lang.o f-lang.o \
-	ui-out.o cli-out.o interps.o \
+	c-lang.o f-lang.o \
+	ui-out.o cli-out.o \
 	varobj.o wrapper.o \
 	jv-lang.o jv-valprint.o jv-typeprint.o \
 	m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
 	scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
-	c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
-	c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
-	nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
+	c-typeprint.o f-typeprint.o m2-typeprint.o \
+	c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
+	nlmread.o serial.o mdebugread.o top.o utils.o \
 	ui-file.o \
 	frame.o doublest.o \
 	gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o
@@ -757,6 +852,7 @@
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
 YYFILES = c-exp.tab.c \
+	ada-exp.tab.c \
 	jv-exp.tab.c \
 	f-exp.tab.c m2-exp.tab.c p-exp.tab.c
 YYOBJ = c-exp.tab.o \
@@ -827,6 +923,22 @@
 	rm -rf $(GDBTK_LIBRARY)
 	@$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do 
 
+install-gdbtk:
+	$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
+	$(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
+	$(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl $(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+	$(SHELL) $(srcdir)/../mkinstalldirs \
+		$(GDBTK_LIBRARY)/images \
+		$(GDBTK_LIBRARY)/images2 ; \
+	$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
+		$(GDBTK_LIBRARY)/help/images \
+		$(GDBTK_LIBRARY)/help/trace ; \
+	cd $(srcdir)/gdbtk/library ; \
+	for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
+	  do \
+		$(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
+	  done ;
+
 # We do this by grepping through sources.  If that turns out to be too slow,
 # maybe we could just require every .o file to have an initialization routine
 # of a given name (top.o -> _initialize_top, etc.).
@@ -842,7 +954,16 @@
 # list includes a file twice (because of some mistake somewhere else) 
 # the _initialize_* function will be included twice in init.c. Second, 
 # init.c may force unnecessary files to be linked in.
-#
+
+# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that
+# the first call is to _initialize_gdbtypes.  This is a hack to ensure
+# that all the architecture dependant global builtin_type_* variables
+# are initialized before anything else (per-architecture code is
+# called in the same order that it is registered).  The ``correct
+# fix'' is to have all the builtin types made part of the architecture
+# and initialize them on-demand (using gdbarch_data) just like
+# everything else.  The catch is that other modules still take the
+# address of these builtin types forcing them to be variables, sigh!
 
 INIT_FILES = $(OBS) $(TSOBS) $(CONFIG_OBS) $(CONFIG_INITS)
 init.c: $(INIT_FILES)
@@ -867,7 +988,8 @@
 	    -e 's,signals\.c,signals/signals\.c,' \
 	    -e 's|\([^  ][^     ]*\)|$(srcdir)/\1|g' | \
 	while read f; do grep '^_initialize_[a-z_0-9A-Z]* *(' $$f 2>/dev/null; done | \
-	sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' > init.l-tmp
+	sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' | \
+	( echo _initialize_gdbtypes ; grep -v '^_initialize_gdbtypes$$' ) > init.l-tmp
 	@echo '/* Do not modify this file.  */' >>init.c-tmp
 	@echo '/* It is created automatically by the Makefile.  */'>>init.c-tmp
 	@echo '#include "defs.h"' >>init.c-tmp
@@ -1008,6 +1130,7 @@
 	@echo "This command is intended for maintainers to use;"
 	@echo "it deletes files that may require special tools to rebuild."
 	rm -f c-exp.tab.c \
+		ada-lex.c ada-exp.tab.c \
 		jv-exp.tab \
 		f-exp.tab.c m2-exp.tab.c p-exp.tab.c
 	rm -f TAGS $(INFOFILES)
@@ -1143,6 +1266,33 @@
 	-rm m2-exp.tmp
 	mv m2-exp.new ./m2-exp.tab.c
 
+# ada-exp.tab.c is generated in objdir from ada-exp.y if it doesn't exist
+# in srcdir, then compiled in objdir to ada-exp.tab.o.
+# Remove bogus decls for malloc/realloc/free which conflict with everything
+# else.
+ada-exp.tab.c: ada-exp.y 
+	$(YACC) $(YFLAGS) $(srcdir)/ada-exp.y
+	-sed -e '/extern.*malloc/d' \
+	-e '/extern.*realloc/d' \
+	-e '/extern.*free/d' \
+	-e '/include.*malloc.h/d' \
+	-e 's/malloc/xmalloc/g' \
+	-e 's/realloc/xrealloc/g' \
+	< y.tab.c > ada-exp.new
+	-rm y.tab.c
+	mv ada-exp.new ./ada-exp.tab.c
+
+ada-lex.c: ada-lex.l
+	@if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
+	    echo $(FLEX) -Isit $(srcdir)/ada-lex.l ">" ada-lex.c; \
+	    $(FLEX) -Isit $(srcdir)/ada-lex.l > ada-lex.c; \
+	elif [ ! -f ada-lex.c -a ! -f $(srcdir)/ada-lex.c ]; then \
+	    echo "ada-lex.c missing and flex not available."; \
+	    false; \
+	elif [ ! -f ada-lex.c ]; then \
+	    echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \
+	fi
+
 # p-exp.tab.c is generated in objdir from p-exp.y if it doesn't exist
 # in srcdir, then compiled in objdir to p-exp.tab.o.
 # Remove bogus decls for malloc/realloc/free which conflict with everything
@@ -1163,7 +1313,7 @@
 
 # These files are updated atomically, so make never has to remove them
 .PRECIOUS: m2-exp.tab.c f-exp.tab.c c-exp.tab.c
-.PRECIOUS: jv-exp.tab.c p-exp.tab.c
+.PRECIOUS: jv-exp.tab.c p-exp.tab.c ada-exp.tab.c
 
 lint: $(LINTFILES)
 	$(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
@@ -1188,11 +1338,10 @@
 ## This is ugly, but I don't want GNU make to put these variables in
 ## the environment.  Older makes will see this as a set of targets
 ## with no dependencies and no actions.
-unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
 
-ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \
-	29k-share/udi/udi2go32.c \
-	a29k-tdep.c a68v-nat.c \
+ALLDEPFILES = a68v-nat.c \
+	aix-thread.c \
 	alpha-nat.c alphabsd-nat.c \
 	alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
 	alpha-osf1-tdep.c alphafbsd-tdep.c \
@@ -1201,24 +1350,24 @@
 	avr-tdep.c \
 	coff-solib.c \
 	core-sol2.c core-regset.c core-aout.c corelow.c \
-	dcache.c delta68-nat.c dpx2-nat.c dstread.c exec.c fork-child.c \
+	dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \
 	go32-nat.c h8300-tdep.c h8500-tdep.c \
 	hp300ux-nat.c hppa-tdep.c hppab-nat.c hppah-nat.c hpread.c \
-	i386-tdep.c i386b-nat.c i386mach-nat.c i386v-nat.c i386-linux-nat.c \
-	i386aix-nat.c i386m3-nat.c i386v4-nat.c i386ly-tdep.c \
+	i386-tdep.c i386b-nat.c i386v-nat.c i386-linux-nat.c \
+	i386v4-nat.c i386ly-tdep.c \
 	i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c \
 	i387-tdep.c \
 	i386-linux-tdep.c i386-nat.c \
-	i960-tdep.c \
+	i386gnu-nat.c i386gnu-tdep.c \
 	ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \
 	infptrace.c inftarg.c irix4-nat.c irix5-nat.c \
 	lynx-nat.c m3-nat.c \
 	m68hc11-tdep.c \
 	m68k-tdep.c \
-	m88k-nat.c m88k-tdep.c mac-nat.c \
 	mcore-tdep.c \
 	mips-linux-nat.c mips-linux-tdep.c \
 	mips-nat.c \
+	mips-irix-tdep.c \
 	mips-tdep.c mipsm3-nat.c mipsv4-nat.c \
 	mipsnbsd-nat.c mipsnbsd-tdep.c \
 	nbsd-tdep.c \
@@ -1226,19 +1375,21 @@
 	nindy-share/ttyflush.c nindy-tdep.c \
 	ns32k-tdep.c solib-osf.c \
 	somread.c somsolib.c $(HPREAD_SOURCE) \
-	ppc-linux-nat.c ppc-linux-tdep.c \
+	ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
+	ppcnbsd-nat.o ppcnbsd-tdep.o \
 	procfs.c \
-	remote-adapt.c remote-array.c remote-bug.c remote-e7000.c remote-eb.c \
+	remote-array.c remote-e7000.c \
 	remote-es.c remote-hms.c remote-mips.c \
-	remote-mm.c remote-nindy.c remote-os9k.c remote-rdp.c remote-sim.c \
+	remote-rdp.c remote-sim.c \
 	remote-st.c remote-utils.c dcache.c \
-	remote-udi.c remote-vx.c remote-vx29k.c \
+	remote-vx.c \
 	rs6000-nat.c rs6000-tdep.c \
 	s390-tdep.c s390-nat.c \
 	ser-go32.c ser-pipe.c ser-tcp.c \
 	sh-tdep.c shnbsd-tdep.c shnbsd-nat.c \
-	solib.c solib-svr4.c solib-sunos.c sparc-linux-nat.c \
+	solib.c solib-irix.c solib-svr4.c solib-sunos.c sparc-linux-nat.c \
 	sparc-nat.c \
+	sparc64nbsd-nat.c sparcnbsd-nat.c sparcnbsd-tdep.c \
 	sparc-tdep.c sparcl-tdep.c sun3-nat.c \
 	symm-tdep.c symm-nat.c \
 	vax-tdep.c \
@@ -1248,18 +1399,60 @@
 	xstormy16-tdep.c \
 	z8k-tdep.c
 
-udip2soc.o: $(srcdir)/29k-share/udi/udip2soc.c $(udiheaders)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/29k-share/udi/udip2soc.c
+# Some files need explict build rules (due to -Werror problems) or due
+# to sub-directory fun 'n' games.
 
-udi2go32.o: $(srcdir)/29k-share/udi/udi2go32.c $(udiheaders)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/29k-share/udi/udi2go32.c
+# Provide explicit rule/dependency - works for more makes.
+copying.o: $(srcdir)/copying.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c
 
-udr.o: $(srcdir)/29k-share/udi/udr.c $(udiheaders) 
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/29k-share/udi/udr.c
+hpux-thread.o: $(srcdir)/hpux-thread.c
+	$(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
+		-I$(srcdir)/osf-share/HP800 -I/usr/include/dce \
+		$(srcdir)/hpux-thread.c
+
+# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't
+# match output format strings.
+procfs.o: $(srcdir)/procfs.c
+	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c
+
+v850ice.o: $(srcdir)/v850ice.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+		$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
+		$(GDBTK_CFLAGS) \
+		$(srcdir)/v850ice.c
+
+# FIXME: z8k-tdep.c calls _initialize_gdbtypes().  Since that isn't
+# declared -Wimplicit fails. It should be using the GDBARCH framework.
+# cagney 1999-09-02.
+z8k-tdep.o: $(srcdir)/z8k-tdep.c
+	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
+		$(srcdir)/z8k-tdep.c
+
+# The dependencies.  In aphabetic order.
 
 a68v-nat.o: a68v-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(regcache_h)
 
+aix-thread.o: aix-thread.c $(defs_h) $(gdbcore_h) $(gdbthread_h) \
+	$(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) $(gdb_assert_h) \
+	$(ppc_tdep_h) $(language_h)
+
+ada-lang.o: ada-lang.c ada-lang.h c-lang.h $(defs_h) $(expression_h) \
+	$(gdbtypes_h) $(inferior_h) language.h parser-defs.h $(symtab_h) \
+	$(gdbcmd_h) $(ui_out_h) symfile.h objfiles.h $(gdbcore_h)
+
+ada-tasks.o: ada-tasks.c ada-lang.h $(defs_h) language.h $(value_h) \
+	$(command_h) $(value_h) $(gdbcore_h)
+
+ada-typeprint.o: ada-typeprint.c ada-lang.h $(defs_h) $(expression_h) \
+	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) \
+	target.h typeprint.h $(value_h) ada-lang.h
+
+ada-valprint.o: ada-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
+	language.h $(symtab_h) valprint.h $(value_h) c-lang.h ada-lang.h \
+	annotate.h
+
 alpha-nat.o: alpha-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
 	$(regcache_h) $(alpha_tdep_h)
 
@@ -1293,7 +1486,7 @@
 	$(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) $(doublest_h) \
 	$(value_h) $(arch_utils_h) $(solib_svr4_h) $(arm_tdep_h) \
 	$(BFD_SRC)/elf-bfd.h $(INCLUDE_DIR)/coff/internal.h \
-	$(INCLUDE_DIR)/elf/arm.h 
+	$(INCLUDE_DIR)/elf/arm.h $(sim_arm_h) $(gdb_assert_h)
 
 armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
 	$(regcache_h) $(gdbcore_h)
@@ -1302,9 +1495,9 @@
 	nbsd-tdep.h
 
 avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
-	$(symfile_h) $(regcache_h) $(arch_utils_h)
+	$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
 
-bcache.o: bcache.c $(bcache_h) $(defs_h)
+bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
 
 blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(objfiles_h) $(symfile_h) $(target_h) $(regcache_h)
@@ -1314,11 +1507,10 @@
 	$(gdb_string_h) $(gdb_events_h) $(linespec_h) $(ui_out_h) \
 	$(completer_h) $(gdb_h)
 
-buildsym.o: buildsym.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
-	$(objfiles_h) $(symfile_h) $(symtab_h) $(gdb_string_h) \
-	$(obstack_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
-	$(language_h) $(bcache_h) $(filenames_h) $(stabsread_h) \
-	$(macrotab_h)
+buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
+	$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(complaints_h) \
+	$(gdb_string_h) $(expression_h) $(language_h) $(bcache_h) \
+	$(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) $(stabsread_h)
 
 builtin-regs.o: builtin-regs.c $(defs.h) $(builtin_regs_h) $(gdbtypes_h) \
 	$(gdb_string_h) $(value_h) $(frame_h)
@@ -1327,9 +1519,10 @@
 	$(language_h) $(parser_defs_h) $(symtab_h) $(macroscope_h) \
 	gdb_assert.h
 
-c-typeprint.o: c-typeprint.c $(c_lang_h) $(defs_h) $(expression_h) \
-	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
-	$(target_h) $(typeprint_h) $(value_h) $(gdb_string_h) $(cp_abi_h)
+c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+	$(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
+	$(gdb_string_h)
 
 c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(cp_abi_h)
@@ -1340,38 +1533,39 @@
 f-lang.o: f-lang.c f-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
 	$(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
 
-f-typeprint.o: f-typeprint.c f-lang.h $(defs_h) $(expression_h) \
-	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
-	$(target_h) $(typeprint_h) $(value_h) $(gdb_string_h)
+f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+	$(f_lang_h) $(gdb_string_h)
 
 f-valprint.o: f-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(gdb_string_h)
 
-ch-exp.o: ch-exp.c ch-lang.h $(defs_h) $(language_h) $(parser_defs_h) \
-	$(bfd_h) $(symfile_h) $(objfiles_h) $(value_h)
+# OBSOLETE ch-exp.o: ch-exp.c ch-lang.h $(defs_h) $(language_h) $(parser_defs_h) \
+# OBSOLETE 	$(bfd_h) $(symfile_h) $(objfiles_h) $(value_h)
 
-ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
-	$(language_h) $(parser_defs_h) $(symtab_h)
+# OBSOLETE ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
+# OBSOLETE 	$(language_h) $(parser_defs_h) $(symtab_h)
 
-ch-typeprint.o: ch-typeprint.c ch-lang.h $(defs_h) $(expression_h) \
-	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
-	$(target_h) $(value_h) $(typeprint_h) $(gdb_string_h)
+# OBSOLETE ch-typeprint.o: ch-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
+# OBSOLETE 	$(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
+# OBSOLETE 	$(target_h) $(language_h) $(ch_lang_h) $(typeprint_h) $(gdb_string_h)
 
-ch-valprint.o: ch-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(c_lang_h)
+# OBSOLETE ch-valprint.o: ch-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+# OBSOLETE 	$(gdbtypes_h) $(valprint_h) $(expression_h) $(value_h) $(language_h) \
+# OBSOLETE 	$(demangle_h) $(c_lang_h) $(typeprint_h) $(ch_lang_h) $(annotate_h)
 
 coff-solib.o: coff-solib.c $(defs_h)
 
-coffread.o: coffread.c $(bfd_h) $(breakpoint_h) $(buildsym_h) \
-	$(complaints_h) $(defs_h) $(expression_h) $(gdbtypes_h) $(objfiles_h) \
-	$(symfile_h) $(symtab_h) $(gdb_stabs_h) $(stabsread_h) $(target_h) \
-	$(gdb_string_h)
+coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
+	$(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
+	$(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
+	$(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
+	$(target_h) $(gdb_assert_h)
 
 complaints.o: complaints.c $(complaints_h) $(defs_h) $(gdbcmd_h)
 
 # Provide explicit rule/dependency - works for more makes.
 copying.o: $(srcdir)/copying.c $(defs_h) $(gdbcmd_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c
 
 core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(inferior_h) \
 	$(regcache_h)
@@ -1389,30 +1583,33 @@
 corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(target_h) $(gdbthread_h) $(gdb_string_h) $(regcache_h)
 
-gcore.o: gcore.c $(defs_h) $(command_h) $(inferior_h) $(gdbcore_h) \
-	$(BFD_SRC)/elf-bfd.h $(symfile_h) $(objfiles_h) 
+gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
+	$(elf_bfd_h) $(symfile_h) $(objfiles_h)
 
-linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gregset_h) \
-	$(gdbcore_h) $(gdbthread_h) $(regcache_h) $(BFD_SRC)/elf-bfd.h 
+linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) $(gregset_h) \
+	$(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) $(cli_decode_h) \
+	$(gdb_string_h)
 
 cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h)
 
-cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
-	$(gdbtypes_h) $(symtab_h) $(value_h) $(gdb_string_h) $(cp_abi_h)
+cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+	$(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
+	$(cp_abi_h)
 
 dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) $(gdb_string_h) \
 	$(gdbcore_h) $(target_h)
 
-d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(obstack_h) $(symtab_h) \
-	$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
-	$(inferior_h) $(dis-asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
-	$(arch_utils_h) $(regcache_h) $(floatformat_h) $(sim_d10v_h)
+d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+	$(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
+	$(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) $(arch_utils_h) \
+	$(regcache_h) $(floatformat_h) $(sim_d10v_h) $(sim_regno_h)
 
-dbxread.o: dbxread.c $(breakpoint_h) $(buildsym_h) $(command_h) \
-	$(complaints_h) $(defs_h) $(expression_h) $(gdb_stabs_h) $(gdbcore_h) \
-	$(gdbtypes_h) $(language_h) $(objfiles_h) \
-	$(stabsread_h) $(symfile_h) $(symtab_h) $(target_h) $(gdb_string_h) \
-	$(cp_abi_h)
+dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) $(gdb_stat_h) \
+	$(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) $(libaout_h) \
+	$(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
+	$(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \
+	$(cp_abi_h) $(aout_aout64_h) $(aout_stab_gnu_h)
 
 delta68-nat.o: delta68-nat.c $(defs_h)
 
@@ -1424,7 +1621,9 @@
 
 dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
 
-dstread.o: dstread.c $(gdb_string_h)
+# OBSOLETE dstread.o: dstread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(breakpoint_h) \
+# OBSOLETE 	$(bfd_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(gdb_obstack_h) \
+# OBSOLETE 	$(gdb_string_h) $(dst_h)
 
 dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
 	$(target_h) $(inferior_h) $(regcache_h) $(dwarf2cfi_h)
@@ -1451,7 +1650,7 @@
 
 event-top.o: event-top.c $(top_h) $(readline_headers) \
       $(defs_h) $(inferior_h) $(event_loop_h) $(event_top_h) $(terminal_h) \
-	$(gdbcmd_h) $(target_h) $(cli_decode_h) $(interps_h)
+	$(gdbcmd_h) $(target_h) $(cli_decode_h)
 
 inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(inf_loop_h) $(event_loop_h) \
 	 $(event_top_h)
@@ -1462,130 +1661,48 @@
 expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
 	$(language_h) $(parser_defs_h) $(symtab_h) $(value_h)
 
+fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) $(gdb_string_h) \
+	$(elf_bfd_h) $(gregset_h)
+
 findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
 	$(gdb_string_h) $(regcache_h) $(builtin_regs_h)
 
 frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
 	$(regcache_h)
 
-regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
+frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
+	$(arch_utils_h) $(regcache_h)
+
+regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
+	$(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gdbcmd_h)
 
 fork-child.o: fork-child.c $(gdb_wait_h) $(defs_h) $(gdbcore_h) \
 	$(inferior_h) $(target_h) $(terminal_h) $(gdbthread_h) $(gdb_string_h)
 
-install-gdbtk:
-	$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
-	$(SHELL) $(srcdir)/../mkinstalldirs \
-		$(GDBTK_LIBRARY)/images \
-		$(GDBTK_LIBRARY)/images2 ; \
-	$(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
-		$(GDBTK_LIBRARY)/help/images \
-		$(GDBTK_LIBRARY)/help/trace ; \
-	cd $(srcdir)/gdbtk/library ; \
-	for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html  help/trace/*.html help/trace/index.toc help/images/*.gif; \
-	  do \
-		$(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
-	  done ;
-
-gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
-	$(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
-
-gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
-	$(symtab_h) $(inferior_h) $(command_h) \
-	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
-	$(tracepoint_h) $(top_h) 
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-        $(ITK_CFLAGS) $(TIX_CFLAGS) \
-	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
-		$(srcdir)/gdbtk/generic/gdbtk.c \
-		-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
-
-gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(defs_h) $(breakpoint_h) $(tracepoint_h) $(symfile_h) $(symtab_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
-	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(defs_h) $(symtab_h) $(inferior_h)	\
-	$(command_h) $(bfd_h) $(top_h) $(symfile_h) $(objfiles_h) $(target_h) \
-	$(gdb_string_h) $(tracepoint_h) $(source_h) $(regcache_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)	\
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)		\
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c		\
-	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
-	$(symtab_h) $(inferior_h) $(command_h) \
-	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
-	$(tracepoint_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
-	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
-		$(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(defs_h) $(frame_h) $(value_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
-	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
-	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
-	$(defs_h) $(frame_h) $(value_h) $(target_h) $(breakpoint_h) \
-	$(linespec_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
-	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
-	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
-	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
-
-gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
-	$(srcdir)/gdbtk/generic/gdbtk.h \
-	$(defs_h) $(value_h) $(varobj_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
-	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
-		$(srcdir)/gdbtk/generic/gdbtk-varobj.c
-
-gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
-	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
-	$(defs_h) $(frame_h) $(value_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
-		$(srcdir)/gdbtk/generic/gdbtk-wrapper.c
-
 v850ice.o: v850ice.c $(defs_h) $(symtab_h) $(inferior_h) $(command_h) \
 	$(frame_h) $(breakpoint_h) $(gdbcore_h) $(value_h) $(symfile_h) \
 	$(gdb_string_h) $(target_h) $(objfiles_h) $(regcache_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
-	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
-		$(srcdir)/v850ice.c
 
-v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(obstack_h) \
-	$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
-	$(symfile_h) $(arch_utils_h) $(regcache_h)
+v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+	$(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+	$(arch_utils_h) $(regcache_h) $(symtab_h)
 
 tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
 	$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) \
 	$(language_h) $(gdb_string_h) $(readline_headers) $(remote_h) \
 	$(linespec_h) $(regcache_h) $(completer_h)
 
-gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h) $(gdb_string_h) \
-	$(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) $(gdb_wait_h) \
-	$(gdbcore_h) $(target_h) $(gdbthread_h) $(annotate_h) $(symfile_h) \
-	$(value_h) $(symcat_h) $(floatformat_h) $(gdb_assert_h) \
-	$(gdb_events_h)
+gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
+	$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
+	$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
+	$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
+	$(gdb_assert_h) $(gdb_string_h) $(gdb_events_h)
 
 arch-utils.o: arch-utils.c $(defs_h) $(bfd_h) $(gdbcmd_h) \
 	$(arch_utils_h) $(gdb_assert_h) $(inferior_h) \
 	$(gdb_string_h) $(symtab.h) $(frame_h) $(breakpoint_h) $(gdb_wait_h) \
 	$(gdbcore_h) $(target_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
-	$(version_h) $(floatformat_h)
+	$(version_h) $(floatformat_h) $(sim_regno_h)
 
 gdbtypes.o: gdbtypes.c $(bfd_h) $(complaints_h) $(defs_h) $(expression_h) \
 	$(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
@@ -1602,13 +1719,15 @@
 gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
 	$(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) 
 
-gnu-v3-abi.o: gnu-v2-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h)
+gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
+	$(gdb_assert_h) $(gdb_string_h)
  
-h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(regcache_h)
+h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
+	$(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
+	$(regcache_h)
 
-h8500-tdep.o: h8500-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h) \
-	$(expression_h) $(frame_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) \
-	$(value_h) $(regcache_h)
+h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+	$(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
 
 hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
@@ -1625,6 +1744,8 @@
 hppah-nat.o: hppah-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
 	$(regcache_h)
 
+i386gnu-tdep.o: $(defs_h) $(i386_tdep_h)
+
 i386gnu-nat.o: gnu-nat.h
 
 i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h)	\
@@ -1634,8 +1755,8 @@
 
 i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
 
-i386aix-nat.o: i386aix-nat.c $(defs_h) $(frame_h) $(inferior_h) \
-	$(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
+# OBSOLETE i386aix-nat.o: i386aix-nat.c $(defs_h) $(frame_h) $(inferior_h) \
+# OBSOLETE 	$(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
 
 i386b-nat.o: i386b-nat.c $(defs_h) $(regcache_h)
 
@@ -1651,17 +1772,18 @@
 i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
 	$(regcache_h)
 
-i386m3-nat.o: i386m3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) $(target_h) \
-	$(regcache_h)
+# OBSOLETE i386m3-nat.o: i386m3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) $(target_h) \
+# OBSOLETE 	$(regcache_h)
 
-i386mach-nat.o: i386mach-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	$(regcache_h)
+# OBSOLETE i386mach-nat.o: i386mach-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+# OBSOLETE 	$(regcache_h)
 
 i386v-nat.o: i386v-nat.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
 	$(inferior_h) $(language_h) $(target_h)
 
 i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
-	$(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h)
+	$(symtab_h) $(symfile_h) $(objfiles_h) $(regcache_h) \
+	$(i386_linux_tdep_h) $(i386_tdep_h) $(i387_tdep_h)
 
 i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
 	$(value_h) $(regcache_h)
@@ -1671,9 +1793,8 @@
 i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
 	$(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h
 
-i960-tdep.o: i960-tdep.c $(floatformat_h) $(defs_h) $(expression_h) \
-	$(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(gdbcore_h) \
-	$(regcache_h)
+# OBSOLETE i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
+# OBSOLETE 	$(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
 ia64-linux-nat.o: ia64-linux-nat.c  $(defs_h) $(inferior_h) $(target_h) \
 	$(gdbcore_h) $(regcache_h)
@@ -1686,7 +1807,7 @@
 
 infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
 	$(inferior_h) $(target_h) $(language_h) $(symfile_h) $(gdb_string_h) \
-	$(ui_out_h) $(completer_h)
+	$(ui_out_h) $(completer_h) $(regcache_h)
 
 inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
 	$(target_h) $(terminal_h) $(gdbthread_h) $(gdb_string_h)
@@ -1745,18 +1866,26 @@
 m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) $(language_h) \
 	$(target_h) $(gdb_wait_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h)
 
+m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+	$(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+	$(regcache_h)
+
 p-lang.o: p-lang.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
 	$(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
 
-p-typeprint.o: p-typeprint.c p-lang.h $(defs_h) $(expression_h) \
-	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
-	$(target_h) $(typeprint_h) $(value_h) $(gdb_string_h)
+p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+	$(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
 
-p-valprint.o: p-valprint.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
-	$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(gdb_string_h)
+p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+	$(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) $(language_h) \
+	$(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
 
-m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
-	$(gdbcore_h) $(gdb_string_h)
+m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+	$(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
+	$(dis_asm_h) $(symfile_h) $(objfiles_h) $(arch_utils_h) $(regcache_h) \
+	$(target_h) $(opcode_m68hc11_h)
 
 m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
 	$(gdbcore_h) $(gdb_string_h) $(regcache_h)
@@ -1766,10 +1895,6 @@
 m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
 	$(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
 
-m88k-nat.o: m88k-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
-m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
 mac-nat.o: mac-nat.c $(defs_h) $(gdb_string_h) $(regcache_h)
 
 main.o: main.c $(top_h) $(defs_h) $(gdb_string_h) $(event_loop_h) \
@@ -1785,21 +1910,23 @@
 mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
 	$(gdb_string_h) $(regcache_h) $(serial_h)
 
-mdebugread.o: mdebugread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
-	$(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
-	$(language_h) $(objfiles_h) $(stabsread_h) \
-	$(symfile_h) $(symtab_h) $(gdb_string_h)
+mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+	$(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
+	$(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
+	$(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
+	$(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
+	$(aout_stab_gnu_h) $(expression_h) $(language_h)
 
 mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 
-# os9kread assumes that sizeof(char*) <= sizeof(int).  This looses on
-# 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9.
-os9kread.o: os9kread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
-	        $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
-		$(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
-		$(symtab_h) $(target_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
-		$(srcdir)/os9kread.c
+# OBSOLETE # os9kread assumes that sizeof(char*) <= sizeof(int).  This looses on
+# OBSOLETE # 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9.
+# OBSOLETE os9kread.o: os9kread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
+# OBSOLETE 	        $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
+# OBSOLETE 		$(language_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
+# OBSOLETE 		$(symtab_h) $(target_h) $(gdb_string_h)
+# OBSOLETE 	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
+# OBSOLETE 		$(srcdir)/os9kread.c
 
 mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
 	$(target_h)
@@ -1817,6 +1944,8 @@
 
 mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
+mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) osabi.h $(BFD_SRC)/elf-bfd.h
+
 mips-tdep.o: mips-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
 	$(arch_utils_h) $(regcache_h) \
 	$(inferior_h) $(language_h) $(objfiles_h) $(symfile_h) \
@@ -1836,9 +1965,13 @@
 mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
 	$(target_h) $(value_h) osabi.h solib-svr4.h mipsnbsd-tdep.h
 
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
-	$(obstack_h) $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) \
-	$(gdbcore_h) $(symfile_h) $(regcache_h) $(arch-utils.h)
+mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+	$(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+	$(regcache_h)
+
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+	$(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+	$(regcache_h) $(arch_utils_h)
 
 monitor.o: monitor.c $(monitor_h) $(bfd_h) $(defs_h) $(gdbcmd_h) \
 	$(inferior_h) $(target_h) $(serial_h) $(terminal_h) $(gdb_string_h) \
@@ -1846,27 +1979,17 @@
 
 nbsd-tdep.o: nbsd-tdep.c $(defs_h) solib-svr4.h
 
-Onindy.o: nindy-share/Onindy.c $(gdb_wait_h) nindy-share/block_io.h \
-	nindy-share/env.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/Onindy.c
-
-nindy.o: nindy-share/nindy.c $(gdb_wait_h) nindy-share/block_io.h \
-	nindy-share/env.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/nindy.c
-
 nlmread.o: nlmread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
 	$(gdb_stabs_h) $(objfiles_h) $(symfile_h) $(symtab_h) $(stabsread_h) \
 	$(gdb_string_h)
 
-ttyflush.o: nindy-share/ttyflush.c
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
-
 nindy-tdep.o: nindy-tdep.c $(defs_h) $(frame_h) $(symtab_h)  $(gdbcore_h)
 
 ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h)
 
-objfiles.o: objfiles.c $(bfd_h) $(defs_h) $(objfiles_h) $(symfile_h) \
-	$(symtab_h) $(gdb_string_h) $(breakpoint_h)
+objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
+	$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
+	$(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h)
 
 solib-osf.o: solib-osf.c $(defs_h) $(inferior_h) $(symtab_h) $(objfiles_h) \
 	$(symfile_h) $(target_h) $(gdb_string_h) $(solist_h)
@@ -1876,15 +1999,13 @@
 
 somsolib.o: somsolib.c $(defs_h) $(regcache_h)
 
-std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) \
-	$(gdbtypes_h) $(value_h)
+std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
+	$(value_h) $(gdb_string_h)
 
 pa64solib.o: pa64solib.c $(defs_h) $(regcache_h)
 
 hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) inferior.h \
 	$(regcache_h)
-	$(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
-	  -I$(srcdir)/osf-share/HP800 -I/usr/include/dce $(srcdir)/hpux-thread.c
 
 hpread.o: hpread.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
 	$(demangle_h) $(gdb_stabs_h) $(gdbtypes_h) $(objfiles_h) \
@@ -1900,10 +2021,20 @@
 	$(objfiles_h) $(gdb_stabs_h) $(serial_h) ocd.h $(regcache_h)
 
 ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdbcore_h) $(frame_h) \
-	$(inferior_h) $(target_h) $(regcache_h) ppc-tdep.h
+	$(inferior_h) $(target_h) $(regcache_h) $(ppc_tdep_h)
 
 ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	$(target_h) ppc-tdep.h $(regcache_h) $(value_h)
+	$(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h)
+
+ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+	$(value_h) $(regcache_h) $(ppc_tdep_h)
+
+ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
+	ppcnbsd-tdep.h
+
+ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+	$(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_t) ppcnbsd-tdep.h \
+	nbsd-tdep.h
 
 ppcbug-rom.o: ppcbug-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
 	$(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
@@ -1918,7 +2049,6 @@
 # match output format strings.
 procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(target_h) $(gdb_string_h) $(gdbthread_h) proc-utils.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c
 
 proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h $(completer_h)
 
@@ -1950,22 +2080,8 @@
 remote-rdi.o: remote-rdi.c $(defs_h) $(gdbcore_h) \
 	$(inferior_h) $(gdb_string_h) $(completer_h) $(arm_tdep_h)
 
-rdi-share/libangsd.a:	force
-	@dir=rdi-share; \
-	if [ -f ./$${dir}/Makefile ] ; then \
-	  r=`pwd`; export r; \
-	  srcroot=`cd $(srcdir); pwd`; export srcroot; \
-	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
-	else \
-	  true; \
-	fi
-
 remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
-	$(inferior_h) $(gdb_string_h) $(arm_tdep_h)
-
-remote-bug.o: remote-bug.c $(defs_h) $(gdbcore_h) $(serial_h) \
-	$(inferior_h) $(target_h) $(terminal_h) $(remote_utils_h) \
-	$(gdb_string_h) $(regcache_h)
+	$(inferior_h) $(gdb_string_h) $(arm_tdep_h) $(callback_h)
 
 remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(target_h) \
 	$(serial_h) $(gdb_string_h) $(regcache_h)
@@ -1984,22 +2100,23 @@
 	$(gdbcore_h) $(inferior_h) $(serial_h) $(symfile_h) $(target_h) \
 	$(regcache_h)
 
-remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
-	$(defs_h) $(gdbcore_h) $(inferior_h) \
-	nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
-	$(symfile_h) $(regcache_h)
+# OBSOLETE remote-nindy.o: remote-nindy.c $(floatformat_h) $(command_h) \
+# OBSOLETE 	$(defs_h) $(gdbcore_h) $(inferior_h) \
+# OBSOLETE 	nindy-share/env.h nindy-share/stop.h $(remote_utils_h) \
+# OBSOLETE 	$(symfile_h) $(regcache_h)
 
-remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
-	$(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
-	$(objfiles_h) $(gdb_stabs_h) $(gdb_string_h) $(regcache_h)
+# OBSOLETE remote-os9k.o: remote-os9k.c $(defs_h) $(gdbcore_h) \
+# OBSOLETE 	$(command_h) $(monitor_h) $(remote_utils_h) $(symtab_h) $(symfile_h) \
+# OBSOLETE 	$(objfiles_h) $(gdb_stabs_h) $(gdb_string_h) $(regcache_h)
 
 remote-sds.o: remote-sds.c $(bfd_h) $(defs_h) $(gdbcmd_h) \
 	$(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h) \
 	$(gdb_string_h) $(regcache_h)
 
 remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) $(gdb_string_h) \
-	$(terminal_h) $(target_h) $(gdbcore_h) $(INCLUDE_DIR)/callback.h \
-	$(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h) 
+	$(terminal_h) $(target_h) $(gdbcore_h) $(callback_h) \
+	$(remote_sim_h) $(remote_utils_h) $(command_h) $(regcache_h) \
+	$(sim_regno_h)
 
 remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(serial_h) \
 	$(target_h) $(gdb_string_h) $(regcache_h)
@@ -2027,8 +2144,8 @@
 	$(gdb_string_h) $(event_loop_h) $(event_top_h) $(remote_h) \
 	$(inf_loop_h) $(value_h)
 
-remote-nrom.o: remote-nrom.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
-	$(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h)
+# OBSOLETE remote-nrom.o: remote-nrom.c $(bfd_h) $(gdb_wait_h) $(defs_h) $(gdbcmd_h) \
+# OBSOLETE 	$(inferior_h) $(remote_utils_h) $(symfile_h) $(terminal_h)
 
 rom68k-rom.o: rom68k-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
 	$(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h) \
@@ -2036,10 +2153,11 @@
 
 rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
 	$(gdbcore_h) $(xcoffsolib_h) $(symfile_h) $(objfiles_h) \
-	$(gdb_stabs_h) $(regcache_h) $(arch_utils_h)
+	$(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \
+	$(ppc_tdep_h)
 
 rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-	$(target_h) ppc-tdep.h $(regcache_h) $(value_h) $(parser_defs_h)
+	$(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h) $(parser_defs_h)
 
 s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
 	$(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
@@ -2066,10 +2184,11 @@
 
 serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h)
 
-sh-tdep.o: sh-tdep.c $(bfd_h) $(dis_asm_h) \
-	$(srcdir)/../opcodes/sh-opc.h $(defs_h) $(expression_h) $(frame_h) \
-	$(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(arch_utils_h) \
-	$(regcache_h) $(doublest_h) $(sh_tdep_h)
+sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
+	$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
+	$(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
+	$(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
+	$(elf_sh_h) $(gdb_sim_sh_h)
 
 shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
 	$(value_h) $(sh_tdep_h) solib-svr4.h shnbsd-tdep.h nbsd-tdep.h
@@ -2080,16 +2199,17 @@
 	$(inferior_h) $(target_h) $(serial_h) $(terminal_h) $(arch_utils_h) \
 	$(regcache_h) $(sh_tdep_h)
 
-signals.o: signals/signals.c $(defs_h) $(target_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $<
-
-mon960-rom.o: mon960-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
-	$(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h)
+mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+	$(serial_h) $(srec_h) $(xmodem_h) $(symtab_h) $(symfile_h) \
+	$(inferior_h)
 
 solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
 	$(objfiles_h) $(gdb_regex_h) $(symfile_h) $(target_h) $(gdb_string_h) \
 	$(solist_h) $(completer_h)
 
+solib-irix.o: solib-irix.c $(defs_h) $(gdbcore_h) $(inferior_h) $(objfiles_h) \
+	$(symfile_h) $(target_h) $(solist_h) solib-svr4.h
+
 solib-sunos.o: solib-sunos.c $(defs_h) $(symfile_h) $(objfiles_h) \
 	$(gdbcore_h) $(inferior_h) $(solist_h)
 
@@ -2108,21 +2228,32 @@
 sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \
 	$(target_h) $(regcache_h)
 
-sparc-tdep.o: sparc-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
-	$(inferior_h) $(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) \
-	$(arch_utils_h) $(regcache_h)
+sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
+	$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(regcache_h) \
+	$(osabi_h) $(gregset_h) $(gdbcore_h) $(symfile_h)
 
 sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(target_h) $(regcache_h)
 
+sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+	sparcnbsd-tdep.h
+
+sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+	sparcnbsd-tdep.h 
+
+sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
+	$(target_h) $(value_h) osabi.h sparcnbsd-tdep.h nbsd-tdep.h \
+	solib-svr4.h
+
 xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
 	$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h)
 
 dsrec.o: dsrec.c $(defs_h) srec.h
 
-stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
-	$(INCLUDE_DIR)/aout/stab_gnu.h $(buildsym_h) $(complaints_h) \
-	$(defs_h) $(gdbtypes_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
-	$(symtab_h) $(gdb_string_h) $(doublest_h)
+stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
+	$(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
+	$(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
+	$(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
+	$(doublest_h) $(stabsread_h)
 
 stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
 	$(language_h) $(target_h) $(gdb_string_h) $(ui_out_h)
@@ -2130,40 +2261,45 @@
 ui-file.o: ui-file.c $(defs_h) ui-file.h
 tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(srcdir)/tui/tui-file.h \
 	$(srcdir)/tui/tuiIO.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
 
-ax-general.o: ax-general.c $(ax_h) $(defs_h) $(value_h)
+ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h)
+
 ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
 	$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
 
 sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
-symfile.o: symfile.c $(breakpoint_h) $(complaints_h) $(defs_h) \
-	$(expression_h) $(gdb_stabs_h) $(gdbcmd_h) $(gdbcore_h) \
-	$(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
-	$(target_h) $(gdb_string_h) $(completer_h)
+symfile.o: symfile.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+	$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
+	$(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
+	$(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
+	$(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h)
 
 symm-tdep.o: symm-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
 
 symm-nat.o: symm-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
 
-symmisc.o: symmisc.c $(bfd_h) $(breakpoint_h) $(command_h) $(defs_h) \
-	$(expression_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
-	$(symfile_h) $(symtab_h) $(gdb_string_h)
+symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
+	$(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
+	$(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h)
 
-symtab.o: symtab.c $(call_cmds_h) $(defs_h) $(expression_h) $(frame_h) \
-	$(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
-	$(gdb_regex_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
-	$(gdb_string_h) $(linespec_h) $(cp_abi_h)
+symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+	$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
+	$(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
+	$(language_h) $(demangle_h) $(inferior_h) $(linespec_h) \
+	$(filenames_h) $(gdb_obstack_h) $(gdb_string_h) $(gdb_stat_h) \
+	$(cp_abi_h)
 
 linespec.o: linespec.c $(linespec_h) $(defs_h) $(frame_h) $(value_h) \
 	$(objfiles_h) $(symfile_h) $(completer_h) $(symtab_h) \
 	$(demangle_h) $(command_h) $(cp_abi_h)
 
-macroexp.o: macroexp.c $(defs_h) $(macrotab_h)
+macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
+	$(macroexp_h) $(gdb_assert_h)
 
-macrotab.o: macrotab.c $(defs_h) $(obstack_h) $(objfiles_h) $(symtab_h) \
-	$(macrotab_h) $(splay_tree_h) gdb_assert.h $(bcache_h)
+macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) $(symtab_h) \
+	$(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) $(bcache_h) \
+	$(complaints_h)
 
 macroscope.o: macroscope.c $(defs_h) $(macroscope_h)
 
@@ -2173,8 +2309,9 @@
 target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
 	$(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) $(regcache_h)
 
-thread.o: thread.c $(defs_h) $(gdbthread_h) $(gdbcmd_h) $(target_h) \
-	$(regcache_h) $(ui_out_h) $(gdb_h)
+thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
+	$(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \
+	$(gdbcmd_h) $(regcache_h) $(gdb_h) $(ui_out_h)
 
 completer.o: completer.c $(completer_h) $(gdbtypes_h) $(symtab_h) \
 	$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers) \
@@ -2185,11 +2322,11 @@
 	$(defs_h) $(gdbcmd_h) $(inferior_h) $(language_h) \
 	$(remote_utils_h) $(gdb_string_h) $(event_loop_h) $(event_top_h) \
 	$(completer_h) $(version_h) $(ui_out_h) $(doublest_h) \
-	$(serial_h) $(interps_h)
+	$(serial_h)
 
-typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
-	$(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) \
-	$(value_h) $(gdb_string_h) $(cp_abi_h)
+typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+	$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
+	$(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
 
 utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
 	$(language_h) $(target_h) $(terminal_h) $(readline_headers) \
@@ -2202,43 +2339,32 @@
 valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
 	$(gdb_string_h) $(regcache_h) $(cp_abi_h) $(gdb_assert_h)
 
-valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
-	$(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) \
-	$(value_h) $(gdb_string_h) $(valprint_h) $(doublest_h)
+valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+	$(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(obstack_h) \
+	$(language_h) $(annotate_h) $(valprint_h) $(floatformat_h) \
+	$(doublest_h)
 
 values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
 	$(gdbcore_h) $(gdbtypes_h) $(symtab_h) $(target_h) $(value_h) \
-	$(gdb_string_h) scm-lang.h $(doublest_h)
+	$(gdb_string_h) scm-lang.h $(doublest_h) $(regcache_h)
 
 vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h) \
-	$(arch_utils_h) $(inferior_h) vax-tdep.h
+	$(arch_utils_h) $(inferior_h) $(vax_tdep_h)
 
 x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
 	$(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h $(dwarf2cfi_h)
 
-x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) $(gdbcmd_h) \
-	$(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h i386-tdep.h \
-	$(dwarf2cfi_h) $(gdb_assert_h)
+x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
+	$(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h \
+	i386-tdep.h $(dwarf2cfi_h) $(gdb_assert_h) $(objfiles_h)
 
 x86-64-linux-nat.o : x86-64-linux-nat.c $(defs_h) $(inferior_h) \
-	$(gdbcore_h) $(regcache_h) i387-tdep.h $(gdb_assert_h) x86-64-tdep.h \
+	$(gdbcore_h) $(regcache_h) $(gdb_assert_h) x86-64-tdep.h \
 	i386-tdep.h
 
 win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
 	$(gdb_string_h) $(regcache_h) $(completer_h)
 
-xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \
-	vx-share/vxWorks.h vx-share/xdr_ld.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c
-
-xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \
-	vx-share/vxWorks.h vx-share/xdr_ptrace.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c
-
-xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \
-	vx-share/vxWorks.h vx-share/xdr_rdb.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c
-
 xcoffread.o: xcoffread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
 	$(INCLUDE_DIR)/aout/stab_gnu.h $(INCLUDE_DIR)/coff/internal.h \
 	$(INCLUDE_DIR)/coff/rs6000.h $(BFD_SRC)/libcoff.h $(buildsym_h) \
@@ -2251,11 +2377,8 @@
 # FIXME: z8k-tdep.c calls _initialize_gdbtypes().  Since that isn't
 # declared -Wimplicit fails. It should be using the GDBARCH framework.
 # cagney 1999-09-02.
-z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h) $(frame_h) \
-	$(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h) $(value_h) \
-	$(regcache_h)
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
-		$(srcdir)/z8k-tdep.c
+z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcmd_h) \
+	$(gdbtypes_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
 
 c-exp.tab.o: c-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
 	$(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) \
@@ -2277,103 +2400,213 @@
 	$(language_h) p-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
 	$(bfd_h) $(objfiles_h) $(symfile_h)
 
+ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
+	$(defs_h) $(expression_h) \
+	$(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
+	$(bfd_h) objfiles.h symfile.h
+
 gdb-events.o: gdb-events.c $(gdb_events_h) $(defs_h) $(gdbcmd_h)
 
 ui-out.o: ui-out.c $(defs_h) $(ui_out_h) $(expression_h) $(language_h)
-cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(interps_h)
-inters.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
-		$(event_top_h) $(interps_h) $(gdb_h) $(wrapper_h)
-varobj.o: varobj.c $(defs_h) $(frame_h) $(value_h) \
-	$(language_h) $(valprint_h) $(varobj_h) $(wrapper_h)
+cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h)
+
+varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
+	$(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
 
 wrapper.o: wrapper.c $(defs_h) $(frame_h) $(value_h) $(wrapper_h)
 
 #
-# CLI dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the cli directory.
-
-cli-cmds.o: $(srcdir)/cli/cli-cmds.c  $(cli_cmds_h) $(cli_decode_h) \
-		$(cli_script_h) $(cli_setshow_h) $(top_h) $(completer_h) \
-		 $(defs_h) $(target_h) $(gdb_wait_h) $(gdb_regex_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
-
-cli-decode.o: $(srcdir)/cli/cli-decode.c $(cli_decode_h) \
-		$(cli_cmds_h) $(defs_h) $(ui_out_h) \
-		$(symtab_h) $(gdb_regex_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
-
-cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) $(command_h) \
-	$(value_h) $(gdbcmd_h) $(completer_h) $(cli_dump_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
-
-cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) \
-		$(wrapper_h) $(event_top_h) $(ui_out_h) $(cli_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
-
-cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(cli_setshow_h) \
-		$(cli_decode_h) $(cli_cmds_h) $(defs_h) \
-		$(value_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c
-
-cli-script.o: $(srcdir)/cli/cli-script.c $(cli_script_h) \
-		$(cli_cmds_h) $(cli_decode_h) $(top_h) \
-		$(defs_h) $(value_h) $(language_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c
-
-cli-utils.o: $(srcdir)/cli/cli-utils.c $(cli_utils_h) $(defs_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c
-
-#
-# MI dependencies
+# gdb/cli/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the mi directory.
 
-mi_h =		$(srcdir)/mi/mi.h
-mi_cmds_h =	$(srcdir)/mi/mi-cmds.h
-mi_out_h =	$(srcdir)/mi/mi-out.h
-mi_parse_h =	$(srcdir)/mi/mi-parse.h
-mi_getopt_h =	$(srcdir)/mi/mi-getopt.h
-mi_console_h =	$(srcdir)/mi/mi-console.h
+cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \
+	$(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \
+	$(ui_out_h) $(top_h) $(cli_decode_h) $(cli_script_h) \
+	$(cli_setshow_h) $(cli_cmds_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
+cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
+	$(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \
+	$(cli_decode_h) $(gdb_assert_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
+cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
+	$(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
+	$(cli_dump_h) $(gdb_assert_h) $(target_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
+cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
+	$(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \
+	$(cli_script_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c
+cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(value_h) \
+	$(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \
+	$(cli_setshow_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c
+cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c
 
-mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
-mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(top_h) $(mi_cmds_h) \
-		$(ui_out_h) $(varobj_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
-mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(top_h) $(mi_cmds_h) \
-		$(ui_out_h) $(frame_h) $(value_h) $(target_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
+#
+# GDBTK sub-directory
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the mi directory.
+
+gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
+	$(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o
+
+gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \
+	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
+	$(symtab_h) $(inferior_h) $(command_h) \
+	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
+	$(tracepoint_h) $(top_h) 
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+        $(ITK_CFLAGS) $(TIX_CFLAGS) \
+	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+		$(srcdir)/gdbtk/generic/gdbtk.c \
+		-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
+
+gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
+		$(srcdir)/gdbtk/generic/gdbtk.h \
+		$(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+		$(defs_h) $(breakpoint_h) $(tracepoint_h) \
+		$(symfile_h) $(symtab_h) $(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
+	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
+	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
+gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
+	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+	$(defs_h) $(symtab_h) $(inferior_h)	\
+	$(command_h) $(bfd_h) $(top_h) $(symfile_h) $(objfiles_h) $(target_h) \
+	$(gdb_string_h) $(tracepoint_h) $(source_h) $(regcache_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)	\
+	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)		\
+	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c		\
+	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
+gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \
+	$(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \
+	$(symtab_h) $(inferior_h) $(command_h) \
+	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
+	$(tracepoint_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+		$(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
+gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
+		$(srcdir)/gdbtk/generic/gdbtk.h \
+		$(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+		$(defs_h) $(frame_h) $(value_h) $(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
+	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
+	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
+gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
+	$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
+	$(defs_h) $(frame_h) $(value_h) $(target_h) $(breakpoint_h) \
+	$(linespec_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
+	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
+	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
+
+gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
+		$(srcdir)/gdbtk/generic/gdbtk.h \
+		$(defs_h) $(value_h) $(varobj_h) $(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
+	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
+		$(srcdir)/gdbtk/generic/gdbtk-varobj.c
+
+gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
+	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
+	$(defs_h) $(frame_h) $(value_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
+		$(srcdir)/gdbtk/generic/gdbtk-wrapper.c
+
+#
+# gdb/mi/ dependencies
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the mi directory.
+
 mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
-		$(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
-		$(gdb_events_h) $(mi_getopt_h) $(gdb_h)
+	$(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
+	$(mi_getopt_h) $(gdb_events_h) $(gdb_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
-mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(mi_cmds_h) \
-		$(ui_out_h) $(value_h) $(target_h)
+mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
+	$(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
-mi-events.o: $(srcdir)/mi/mi-events.c $(defs_h) $(ui_out_h) $(interps_h) \
-		$(gdb_h) $(breakpoint_h) $(mi_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-events.c
-mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(interps_h) \
-		$(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) \
-		$(top_h) $(mi_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c
-mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h) \
-		$(mi_console_h) $(mi_getopt_h) $(event_loop_h) $(event_top_h) \
-		$(mi_getopt_h) $(regcache_h) $(gdb_h) $(target_h) \
-		$(inferior_h) $(gdb_string_h) $(gdbthread_h) $(mi_out_h) \
-		$(gdbcore_h) $(value_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
-mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(mi_out_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
-mi-console.o: $(srcdir)/mi/mi-console.c $(mi_out_h) $(defs_h)
+mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
+	$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
+mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
+	$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
+mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
+	$(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
+mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \
+	$(gdb_string_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c
-mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_parse_h) $(mi_cmds_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
-mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(mi_getopt_h) $(defs_h)
+mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \
+	$(gdb_string_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c
+mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
+	$(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \
+	$(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \
+	$(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \
+	$(gdb_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
+mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
+mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
+	$(gdb_string_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
+
+#
+# nindy-share sub-directory
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the mi directory.
+
+Onindy.o: nindy-share/Onindy.c $(gdb_wait_h) nindy-share/block_io.h \
+	nindy-share/env.h
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/Onindy.c
+
+nindy.o: nindy-share/nindy.c $(gdb_wait_h) nindy-share/block_io.h \
+	nindy-share/env.h
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/nindy.c
+
+ttyflush.o: nindy-share/ttyflush.c $(srcdir)/nindy-share/ttyflush.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/nindy-share/ttyflush.c
+
+#
+# rdi-share sub-directory
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the mi directory.
+
+rdi-share/libangsd.a:	force
+	@dir=rdi-share; \
+	if [ -f ./$${dir}/Makefile ] ; then \
+	  r=`pwd`; export r; \
+	  srcroot=`cd $(srcdir); pwd`; export srcroot; \
+	  (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
+	else \
+	  true; \
+	fi
+
+#
+# Signals sub-directory
+#
+# Need to explicitly specify the compile rule as make will do nothing
+# or try to compile the object file into the mi directory.
+
+signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
 
 #
 # TUI dependencies
@@ -2381,69 +2614,89 @@
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the mi directory.
 
-tui.o: $(srcdir)/tui/tui.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiLayout.h $(srcdir)/tui/tuiIO.h \
-		$(srcdir)/tui/tuiRegs.h $(srcdir)/tui/tuiWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tui.c
-tui-out.o: $(srcdir)/tui/tui-out.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tui-out.c
-tui-hooks.o: $(srcdir)/tui/tui-hooks.c \
-		$(srcdir)/tui/tui.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tui-hooks.c
-tuiCommand.o: $(srcdir)/tui/tuiCommand.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiWin.h $(srcdir)/tui/tuiIO.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiCommand.c
-tuiData.o: $(srcdir)/tui/tuiData.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiData.c
-tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiRegs.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiDataWin.c
-tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiLayout.h $(srcdir)/tui/tuiSourceWin.h \
-		$(srcdir)/tui/tuiStack.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiDisassem.c
-tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiGeneralWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiGeneralWin.c
-tuiIO.o: $(srcdir)/tui/tuiIO.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiIO.h $(srcdir)/tui/tuiCommand.h \
-		$(srcdir)/tui/tuiWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiIO.c
-tuiLayout.o: $(srcdir)/tui/tuiLayout.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiGeneralWin.h $(srcdir)/tui/tuiStack.h \
-		$(srcdir)/tui/tuiRegs.h $(srcdir)/tui/tuiDisassem.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiLayout.c
-tuiRegs.o: $(srcdir)/tui/tuiRegs.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiLayout.h $(srcdir)/tui/tuiWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiRegs.c
-tuiSource.o: $(srcdir)/tui/tuiSource.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiStack.h $(srcdir)/tui/tuiSourceWin.h \
-		$(srcdir)/tui/tuiSource.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiSource.c
-tuiSourceWin.o: $(srcdir)/tui/tuiSourceWin.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiStack.h $(srcdir)/tui/tuiSourceWin.h \
-		$(srcdir)/tui/tuiSource.h $(srcdir)/tui/tuiDisassem.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiSourceWin.c
-tuiStack.o: $(srcdir)/tui/tuiStack.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiStack.h $(srcdir)/tui/tuiSourceWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiStack.c
-tuiWin.o: $(srcdir)/tui/tuiWin.c \
-		$(srcdir)/tui/tui.h $(srcdir)/tui/tuiData.h \
-		$(srcdir)/tui/tuiGeneralWin.h $(srcdir)/tui/tuiStack.h \
-		$(srcdir)/tui/tuiSourceWin.h $(srcdir)/tui/tuiDataWin.h
-	$(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/tui/tuiWin.c
+tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
+	$(tui_tuiIO_h) $(tui_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
+tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(config_h) $(defs_h) $(symtab_h) \
+	$(inferior_h) $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
+	$(target_h) $(gdbcore_h) $(event_loop_h) $(frame_h) $(breakpoint_h) \
+	$(gdb_events_h) $(tui_h) $(tuiData_h) $(tuiLayout_h) $(tuiIO_h) \
+	$(tuiRegs_h) $(tuiWin_h) $(tuiStack_h) $(tuiDataWin_h) \
+	$(tuiSourceWin_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
+tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
+	$(gdb_string_h) $(gdb_assert_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c
+tui.o: $(srcdir)/tui/tui.c $(config_h) $(defs_h) $(gdbcmd_h) $(tui_h) \
+	$(tuiData_h) $(tuiLayout_h) $(tuiIO_h) $(tuiRegs_h) $(tuiStack_h) \
+	$(tuiWin_h) $(tuiSourceWin_h) $(readline_h) $(target_h) $(frame_h) \
+	$(breakpoint_h) $(inferior_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
+tuiCommand.o: $(srcdir)/tui/tuiCommand.c $(config_h) $(defs_h) $(tui_h) \
+	$(tuiData_h) $(tuiWin_h) $(tuiIO_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiCommand.c
+tuiData.o: $(srcdir)/tui/tuiData.c $(config_h) $(defs_h) $(tui_h) \
+	$(tuiData_h) $(tuiGeneralWin_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiData.c
+tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c $(config_h) $(defs_h) $(tui_h) \
+	$(tuiData_h) $(tuiGeneralWin_h) $(tuiRegs_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDataWin.c
+tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c $(config_h) $(defs_h) $(symtab_h) \
+	$(breakpoint_h) $(frame_h) $(value_h) $(tui_h) $(tuiData_h) \
+	$(tuiWin_h) $(tuiLayout_h) $(tuiSourceWin_h) $(tuiStack_h) \
+	$(tui_file_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDisassem.c
+tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c $(config_h) $(defs_h) \
+	$(tui_h) $(tuiData_h) $(tuiGeneralWin_h) $(tuiWin_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiGeneralWin.c
+tuiIO.o: $(srcdir)/tui/tuiIO.c $(config_h) $(defs_h) $(terminal_h) \
+	$(target_h) $(event_loop_h) $(command_h) $(top_h) $(readline_h) \
+	$(tui_h) $(tuiData_h) $(tuiIO_h) $(tuiCommand_h) $(tuiWin_h) \
+	$(tuiGeneralWin_h) $(tui_file_h) $(ui_out_h) $(cli_out_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiIO.c
+tuiLayout.o: $(srcdir)/tui/tuiLayout.c $(config_h) $(defs_h) $(command_h) \
+	$(symtab_h) $(frame_h) $(tui_h) $(tuiData_h) $(tuiDataWin_h) \
+	$(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) $(tuiWin_h) \
+	$(tuiSourceWin_h) $(tuiDisassem_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiLayout.c
+tuiRegs.o: $(srcdir)/tui/tuiRegs.c $(config_h) $(defs_h) $(tui_h) \
+	$(tuiData_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) \
+	$(inferior_h) $(target_h) $(tuiLayout_h) $(tuiWin_h) $(tuiDataWin_h) \
+	$(tuiGeneralWin_h) $(tui_file_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiRegs.c
+tuiSource.o: $(srcdir)/tui/tuiSource.c $(config_h) $(defs_h) $(symtab_h) \
+	$(frame_h) $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) \
+	$(tuiData_h) $(tuiStack_h) $(tuiSourceWin_h) $(tuiSource_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiSource.c
+tuiSourceWin.o: $(srcdir)/tui/tuiSourceWin.c $(config_h) $(defs_h) \
+	$(symtab_h) $(frame_h) $(breakpoint_h) $(value_h) $(tui_h) \
+	$(tuiData_h) $(tuiStack_h) $(tuiWin_h) $(tuiGeneralWin_h) \
+	$(tuiSourceWin_h) $(tuiSource_h) $(tuiDisassem_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiSourceWin.c
+tuiStack.o: $(srcdir)/tui/tuiStack.c $(config_h) $(defs_h) $(symtab_h) \
+	$(breakpoint_h) $(frame_h) $(command_h) $(tui_h) $(tuiData_h) \
+	$(tuiStack_h) $(tuiGeneralWin_h) $(tuiSource_h) $(tuiSourceWin_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiStack.c
+tuiWin.o: $(srcdir)/tui/tuiWin.c $(config_h) $(defs_h) $(command_h) \
+	$(symtab_h) $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(tui_h) \
+	$(tuiData_h) $(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) \
+	$(tuiDisassem_h) $(tuiSource_h) $(tuiSourceWin_h) $(tuiDataWin_h)
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiWin.c
+
+#
+# vx-share sub-directory
+#
+
+xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \
+	vx-share/vxWorks.h vx-share/xdr_ld.h
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c
+
+xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \
+	vx-share/vxWorks.h vx-share/xdr_ptrace.h
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c
+
+xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \
+	vx-share/vxWorks.h vx-share/xdr_rdb.h
+	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c
 
 ### end of the gdb Makefile.in.
diff --git a/gdb/NEWS b/gdb/NEWS
index a61b435..8b09cf6 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,44 +3,50 @@
 
 *** Changes since GDB 5.2:
 
+* ``gdbserver'' now supports multi-threaded applications on some targets
+
+Support for debugging multi-threaded applications which use  
+the GNU/Linux LinuxThreads package has been added for
+arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
+powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
+
 * GDB now supports C/C++ preprocessor macros.
 
 GDB now expands preprocessor macro invocations in C/C++ expressions,
 and provides various commands for showing macro definitions and how
 they expand.
 
+The new command `macro expand EXPRESSION' expands any macro
+invocations in expression, and shows the result.
+
+The new command `show macro MACRO-NAME' shows the definition of the
+macro named MACRO-NAME, and where it was defined.
+
 Most compilers don't include information about macros in the debugging
 information by default.  In GCC 3.1, for example, you need to compile
 your program with the options `-gdwarf-2 -g3'.  If the macro
 information is present in the executable, GDB will read it.
 
-Here are the new commands for working with macros:
-
-** macro expand EXPRESSION
-
-Expand any macro invocations in expression, and show the result.
-
-** show macro MACRO-NAME
-
-Show the definition of the macro named MACRO-NAME, and where it was
-defined.
-
 * Multi-arched targets.
 
 DEC Alpha (partial)				alpha*-*-*
 DEC VAX (partial)				vax-*-*
 NEC V850					v850-*-*
 National Semiconductor NS32000 (partial)	ns32k-*-*
+Motorola 68000 (partial)                        m68k-*-*
+Motorola MCORE                                  mcore-*-*
 
 * New targets.
 
-Atmel AVR					avr*-*-*
+Fujitsu FRV architecture added by Red Hat	frv*-*-*
+
 
 * New native configurations
 
 Alpha NetBSD					alpha*-*-netbsd*
 SH NetBSD					sh*-*-netbsdelf*
 MIPS NetBSD					mips*-*-netbsd*
+UltraSPARC NetBSD				sparc64-*-netbsd*
 
 * OBSOLETE configurations and files
 
@@ -49,6 +55,24 @@
 configurations, the next release of GDB will have their sources
 permanently REMOVED.
 
+Mitsubishi D30V					d30v-*-*
+OS/9000						i[34]86-*-os9k
+IBM AIX PS/2					i[3456]86-*-aix
+Fujitsu FR30					fr30-*-elf*
+Motorola Delta 88000 running Sys V		m88k-motorola-sysv  or  delta88
+Argonaut Risc Chip (ARC)			arc-*-*
+i386 running Mach 3.0				i[3456]86-*-mach3*
+i386 running Mach				i[3456]86-*-mach*
+i386 running OSF/1				i[3456]86-*osf1mk*
+HP/Apollo 68k Family				m68*-apollo*-sysv*,
+						m68*-apollo*-bsd*,
+						m68*-hp-bsd*, m68*-hp-hpux*
+I960 with MON960				i960-*-coff
+
+* OBSOLETE languages
+
+CHILL, a Pascal like language used by telecommunications companies.
+
 * REMOVED configurations and files
 
 AMD 29k family via UDI				a29k-amd-udi, udi29k
@@ -74,6 +98,36 @@
 to a bfd-format or binary file (dump and append), and back
 from a file into memory (restore).
 
+* Improved "next/step" support on multi-processor Alpha Tru64.
+
+The previous single-step mechanism could cause unpredictable problems,
+including the random appearance of SIGSEGV or SIGTRAP signals. The use
+of a software single-step mechanism prevents this.
+
+*** Changes in GDB 5.2.1:
+
+* New targets.
+
+Atmel AVR					avr*-*-*
+
+* Bug fixes
+
+gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
+mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
+Fix, by Joel Brobecker imported from mainline.
+
+gdb/439: gdb/291: On some ELF object files, gdb was reporting:
+dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
+Fix, by Fred Fish, imported from mainline.
+
+Dwarf2 .debug_frame & .eh_frame handler improved in many ways. 
+Surprisingly enough, it works now.
+By Michal Ludvig, imported from mainline.
+
+i386 hardware watchpoint support: 
+avoid misses on second run for some targets.
+By Pierre Muller, imported from mainline.
+
 *** Changes in GDB 5.2:
 
 * New command "set trust-readonly-sections on[off]".
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index 49d2796..9ffea60 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -1,9 +1,26 @@
 
-			Known problems in GDB 5.2
+			Known problems in GDB 5.3
 
 		See also: http://www.gnu.org/software/gdb/bugs/
 
 
+*-*-freebsd*
+---------------
+
+Due to a kernel bug (kern/35175), detaching from an attached process
+will very likely cause the process to be stop or die with a Trace/BPT
+trap.
+
+
+i386-*-freebsd[34]*
+-------------------
+
+There is a bug (bin/41671) in FreeBSD's gcc that causes it to emit bad
+debug information when using the stabs format (which is the default).
+In earlier versions of GDB the effects were rather limited, but
+starting with GDB 5.3 the influence is much more prominent.
+
+
 hppa2.0-hp-hpux10.20
 --------------------
 
diff --git a/gdb/README b/gdb/README
index 8af440f..64526ae 100644
--- a/gdb/README
+++ b/gdb/README
@@ -1,5 +1,5 @@
-		     README for gdb-5.2 release
-		Updated 17 April, 2002 by Andrew Cagney
+		     README for gdb-5.2.1 release
+		Updated 19 July, 2002 by Andrew Cagney
 
 This is GDB, the GNU source-level debugger.
 
@@ -20,7 +20,7 @@
    In this release, the GDB debugger sources, the generic GNU include
 files, the BFD ("binary file description") library, the readline
 library, and other libraries all have directories of their own
-underneath the gdb-5.2 directory.  The idea is that a variety of GNU
+underneath the gdb-5.2.1 directory.  The idea is that a variety of GNU
 tools can share a common copy of these things.  Be aware of variation
 over time--for example don't try to build gdb with a copy of bfd from
 a release other than the gdb release (such as a binutils release),
@@ -29,8 +29,8 @@
 directory tree and automatically build all the pieces in the right
 order.
 
-   When you unpack the gdb-5.2.tar.gz file, you'll find a directory
-called `gdb-5.2', which contains:
+   When you unpack the gdb-5.2.1.tar.gz file, you'll find a directory
+called `gdb-5.2.1', which contains:
 
   COPYING       config.sub    intl         missing         opcodes
   COPYING.LIB   configure     libiberty    mkinstalldirs   readline
@@ -44,7 +44,7 @@
 
 You can build GDB right in the source directory:
 
-      cd gdb-5.2
+      cd gdb-5.2.1
       ./configure
       make
       cp gdb/gdb /usr/local/bin/gdb	(or wherever you want)
@@ -58,12 +58,12 @@
 
       mkdir build
       cd build
-      <full path to your sources>/gdb-5.2/configure
+      <full path to your sources>/gdb-5.2.1/configure
       make
       cp gdb/gdb /usr/local/bin/gdb	(or wherever you want)
 
 (Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
-different; see the file gdb-5.2/gdb/config/djgpp/README for details.)
+different; see the file gdb-5.2.1/gdb/config/djgpp/README for details.)
 
    This will configure and build all the libraries as well as GDB.  If
 `configure' can't determine your system type, specify one as its
@@ -94,7 +94,7 @@
 
    GDB includes an already formatted copy of the on-line Info version
 of this manual in the `gdb/doc' subdirectory.  The main Info file is
-`gdb-5.2/gdb/doc/gdb.info', and it refers to subordinate files
+`gdb-5.2.1/gdb/doc/gdb.info', and it refers to subordinate files
 matching `gdb.info*' in the same directory.  If necessary, you can
 print out these files, or read them with any editor; but they are
 easier to read using the `info' subsystem in GNU Emacs or the
@@ -106,7 +106,7 @@
 `makeinfo'.
 
    If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-5.2', in the case of version 5.2), you can make
+source directory (`gdb-5.2.1', in the case of version 5.2.1), you can make
 the Info file by typing:
 
       cd gdb/doc
@@ -115,7 +115,7 @@
    If you want to typeset and print copies of this manual, you need
 TeX, a program to print its DVI output files, and `texinfo.tex', the
 Texinfo definitions file.  This file is included in the GDB
-distribution, in the directory `gdb-5.2/texinfo'.
+distribution, in the directory `gdb-5.2.1/texinfo'.
 
    TeX is a typesetting program; it does not print files directly, but
 produces output files called DVI files.  To print a typeset document,
@@ -129,11 +129,11 @@
 This file tells TeX how to typeset a document written in Texinfo
 format.  On its own, TeX cannot read, much less typeset a Texinfo file.
  `texinfo.tex' is distributed with GDB and is located in the
-`gdb-5.2/texinfo' directory.
+`gdb-5.2.1/texinfo' directory.
 
    If you have TeX and a DVI printer program installed, you can typeset
 and print this manual.  First switch to the the `gdb' subdirectory of
-the main source directory (for example, to `gdb-5.2/gdb') and then type:
+the main source directory (for example, to `gdb-5.2.1/gdb') and then type:
 
       make doc/gdb.dvi
 
@@ -156,55 +156,55 @@
 a single directory, whose name is usually composed by appending the
 version number to `gdb'.
 
-   For example, the GDB version 5.2 distribution is in the `gdb-5.2'
+   For example, the GDB version 5.2.1 distribution is in the `gdb-5.2.1'
 directory.  That directory contains:
 
-`gdb-5.2/{COPYING,COPYING.LIB}'
+`gdb-5.2.1/{COPYING,COPYING.LIB}'
      Standard GNU license files.  Please read them.
 
-`gdb-5.2/bfd'
+`gdb-5.2.1/bfd'
      source for the Binary File Descriptor library
 
-`gdb-5.2/config*'
+`gdb-5.2.1/config*'
      script for configuring GDB, along with other support files
 
-`gdb-5.2/gdb'
+`gdb-5.2.1/gdb'
      the source specific to GDB itself
 
-`gdb-5.2/include'
+`gdb-5.2.1/include'
      GNU include files
 
-`gdb-5.2/libiberty'
+`gdb-5.2.1/libiberty'
      source for the `-liberty' free software library
 
-`gdb-5.2/mmalloc'
+`gdb-5.2.1/mmalloc'
      source for the GNU memory-mapped malloc package
 
-`gdb-5.2/opcodes'
+`gdb-5.2.1/opcodes'
      source for the library of opcode tables and disassemblers
 
-`gdb-5.2/readline'
+`gdb-5.2.1/readline'
      source for the GNU command-line interface
      NOTE:  The readline library is compiled for use by GDB, but will
      not be installed on your system when "make install" is issued.
 
-`gdb-5.2/sim'
+`gdb-5.2.1/sim'
      source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
 
-`gdb-5.2/intl'
+`gdb-5.2.1/intl'
      source for the GNU gettext library, for internationalization.
      This is slightly modified from the standalone gettext
      distribution you can get from GNU.
 
-`gdb-5.2/texinfo'
+`gdb-5.2.1/texinfo'
      The `texinfo.tex' file, which you need in order to make a printed
      manual using TeX.
 
-`gdb-5.2/etc'
+`gdb-5.2.1/etc'
      Coding standards, useful files for editing GDB, and other
      miscellanea.
 
-`gdb-5.2/utils'
+`gdb-5.2.1/utils'
      A grab bag of random utilities.
 
    Note: the following instructions are for building GDB on Unix or
@@ -213,14 +213,14 @@
 
    The simplest way to configure and build GDB is to run `configure'
 from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-5.2' directory.
+is the `gdb-5.2.1' directory.
 
    First switch to the `gdb-VERSION-NUMBER' source directory if you are
 not already in it; then run `configure'.
 
    For example:
 
-      cd gdb-5.2
+      cd gdb-5.2.1
       ./configure
       make
 
@@ -236,8 +236,8 @@
       sh configure
 
    If you run `configure' from a directory that contains source
-directories for multiple libraries or programs, such as the `gdb-5.2'
-source directory for version 5.2, `configure' creates configuration
+directories for multiple libraries or programs, such as the `gdb-5.2.1'
+source directory for version 5.2.1, `configure' creates configuration
 files for every directory level underneath (unless you tell it not to,
 with the `--norecursion' option).
 
@@ -245,10 +245,10 @@
 directories in the GDB distribution, if you only want to configure that
 subdirectory; but be sure to specify a path to it.
 
-   For example, with version 5.2, type the following to configure only
+   For example, with version 5.2.1, type the following to configure only
 the `bfd' subdirectory:
 
-      cd gdb-5.2/bfd
+      cd gdb-5.2.1/bfd
       ../configure
 
    You can install `gdb' anywhere; it has no hardwired paths. However,
@@ -277,13 +277,13 @@
 argument to `--srcdir', you can leave out the `--srcdir' option; it
 will be assumed.)
 
-   For example, with version 5.2, you can build GDB in a separate
+   For example, with version 5.2.1, you can build GDB in a separate
 directory for a Sun 4 like this:
 
-     cd gdb-5.2
+     cd gdb-5.2.1
      mkdir ../gdb-sun4
      cd ../gdb-sun4
-     ../gdb-5.2/configure
+     ../gdb-5.2.1/configure
      make
 
    When `configure' builds a configuration using a remote source
@@ -304,8 +304,8 @@
 
    The `Makefile' that `configure' generates in each source directory
 also runs recursively.  If you type `make' in a source directory such
-as `gdb-5.2' (or in a separate configured directory configured with
-`--srcdir=PATH/gdb-5.2'), you will build all the required libraries,
+as `gdb-5.2.1' (or in a separate configured directory configured with
+`--srcdir=PATH/gdb-5.2.1'), you will build all the required libraries,
 and then build GDB.
 
    When you have multiple hosts or targets configured in separate
@@ -348,7 +348,7 @@
      Invalid configuration `i786v': machine `i786v' not recognized
 
 `config.sub' is also distributed in the GDB source directory
-(`gdb-5.2', for version 5.2).
+(`gdb-5.2.1', for version 5.2.1).
 
 
 `configure' options
@@ -451,7 +451,6 @@
 
 	remote-adapt.c	 AMD 29000 "Adapt"
 	remote-array.c   Array Tech RAID controller
-	remote-bug.c	 Motorola BUG monitor
 	remote-e7000.c	 Hitachi E7000 ICE
 	remote-eb.c	 AMD 29000 "EBMON"
 	remote-es.c	 Ericsson 1800 monitor
@@ -496,7 +495,7 @@
 address "bug-gdb@gnu.org".
 
    When submitting a bug, please include the GDB version number (e.g.,
-gdb-5.2), and how you configured it (e.g., "sun4" or "mach386 host,
+gdb-5.2.1), and how you configured it (e.g., "sun4" or "mach386 host,
 i586-intel-synopsys target").  Since GDB now supports so many
 different configurations, it is important that you be precise about
 this.  If at all possible, you should include the actual banner that
@@ -551,17 +550,17 @@
 Once DejaGNU is installed, you can run the tests in one of the
 following ways:
 
-  (1)	cd gdb-5.2
+  (1)	cd gdb-5.2.1
 	make check-gdb
 
 or
 
-  (2)	cd gdb-5.2/gdb
+  (2)	cd gdb-5.2.1/gdb
 	make check
 
 or
 
-  (3)	cd gdb-5.2/gdb/testsuite
+  (3)	cd gdb-5.2.1/gdb/testsuite
 	make site.exp	(builds the site specific file)
 	runtest -tool gdb GDB=../gdb    (or GDB=<somepath> as appropriate)
 
diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c
index b4c44a9..8a9e8ff 100644
--- a/gdb/abug-rom.c
+++ b/gdb/abug-rom.c
@@ -76,12 +76,22 @@
  * registers either. So, typing "info reg sp" becomes an "A7".
  */
 
-static char *abug_regnames[NUM_REGS] =
+static const char *
+abug_regname (int index)
 {
-  "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-  "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
-  "PC",
-};
+  static char *regnames[] =
+  {
+    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
+    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
+    "PC",
+  };
+
+  if ((index >= (sizeof (regnames) / sizeof (regnames[0]))) 
+       || (index < 0) || (index >= NUM_REGS))
+    return NULL;
+  else
+    return regnames[index];
+}
 
 /*
  * Define the monitor command strings. Since these are passed directly
@@ -141,7 +151,8 @@
   abug_cmds.cmd_end = NULL;	/* optional command terminator */
   abug_cmds.target = &abug_ops;	/* target operations */
   abug_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  abug_cmds.regnames = abug_regnames;	/* registers names */
+  abug_cmds.regnames = NULL;	/* registers names */
+  abug_cmds.regname = abug_regname;
   abug_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
 };
 
diff --git a/gdb/ada-exp.tab.c b/gdb/ada-exp.tab.c
deleted file mode 100644
index bb6d29b..0000000
--- a/gdb/ada-exp.tab.c
+++ /dev/null
@@ -1,2389 +0,0 @@
-/* A Bison parser, made from ./ada-exp.y
-   by GNU bison 1.35.  */
-
-#define YYBISON 1  /* Identify Bison output.  */
-
-# define	INT	257
-# define	NULL_PTR	258
-# define	CHARLIT	259
-# define	FLOAT	260
-# define	TYPENAME	261
-# define	BLOCKNAME	262
-# define	STRING	263
-# define	NAME	264
-# define	DOT_ID	265
-# define	OBJECT_RENAMING	266
-# define	DOT_ALL	267
-# define	LAST	268
-# define	REGNAME	269
-# define	INTERNAL_VARIABLE	270
-# define	ASSIGN	271
-# define	_AND_	272
-# define	OR	273
-# define	XOR	274
-# define	THEN	275
-# define	ELSE	276
-# define	NOTEQUAL	277
-# define	LEQ	278
-# define	GEQ	279
-# define	IN	280
-# define	DOTDOT	281
-# define	UNARY	282
-# define	MOD	283
-# define	REM	284
-# define	STARSTAR	285
-# define	ABS	286
-# define	NOT	287
-# define	TICK_ACCESS	288
-# define	TICK_ADDRESS	289
-# define	TICK_FIRST	290
-# define	TICK_LAST	291
-# define	TICK_LENGTH	292
-# define	TICK_MAX	293
-# define	TICK_MIN	294
-# define	TICK_MODULUS	295
-# define	TICK_POS	296
-# define	TICK_RANGE	297
-# define	TICK_SIZE	298
-# define	TICK_TAG	299
-# define	TICK_VAL	300
-# define	ARROW	301
-# define	NEW	302
-
-#line 38 "./ada-exp.y"
-
-
-#include "defs.h"
-#include <string.h>
-#include <ctype.h>
-#include "expression.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "ada-lang.h"
-#include "bfd.h" /* Required by objfiles.h.  */
-#include "symfile.h" /* Required by objfiles.h.  */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-#include "frame.h"
-
-/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
-   as well as gratuitiously global symbol names, so we can have multiple
-   yacc generated parsers in gdb.  These are only the variables
-   produced by yacc.  If other parser generators (bison, byacc, etc) produce
-   additional global names that conflict at link time, then those parser
-   generators need to be fixed instead of adding those names to this list. */
-
-/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix  
-   options.  I presume we are maintaining it to accommodate systems
-   without BISON?  (PNH) */
-
-#define	yymaxdepth ada_maxdepth
-#define	yyparse	_ada_parse	/* ada_parse calls this after  initialization */
-#define	yylex	ada_lex
-#define	yyerror	ada_error
-#define	yylval	ada_lval
-#define	yychar	ada_char
-#define	yydebug	ada_debug
-#define	yypact	ada_pact	
-#define	yyr1	ada_r1			
-#define	yyr2	ada_r2			
-#define	yydef	ada_def		
-#define	yychk	ada_chk		
-#define	yypgo	ada_pgo		
-#define	yyact	ada_act		
-#define	yyexca	ada_exca
-#define yyerrflag ada_errflag
-#define yynerrs	ada_nerrs
-#define	yyps	ada_ps
-#define	yypv	ada_pv
-#define	yys	ada_s
-#define	yy_yys	ada_yys
-#define	yystate	ada_state
-#define	yytmp	ada_tmp
-#define	yyv	ada_v
-#define	yy_yyv	ada_yyv
-#define	yyval	ada_val
-#define	yylloc	ada_lloc
-#define yyreds	ada_reds		/* With YYDEBUG defined */
-#define yytoks	ada_toks		/* With YYDEBUG defined */
-
-#ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
-#endif
-
-struct name_info {
-  struct symbol* sym;
-  struct minimal_symbol* msym;
-  struct block* block;
-  struct stoken stoken;
-};
-
-/* If expression is in the context of TYPE'(...), then TYPE, else
- * NULL. */
-static struct type* type_qualifier;
-
-int yyparse (void);
-
-static int yylex (void);
-
-void yyerror (char *);
-
-static struct stoken string_to_operator (struct stoken);
-
-static void write_attribute_call0 (enum ada_attribute);
-
-static void write_attribute_call1 (enum ada_attribute, LONGEST);
-
-static void write_attribute_calln (enum ada_attribute, int);
-
-static void write_object_renaming (struct block*, struct symbol*);
-
-static void write_var_from_name (struct block*, struct name_info);
-
-static LONGEST
-convert_char_literal (struct type*, LONGEST);
-
-#line 131 "./ada-exp.y"
-#ifndef YYSTYPE
-typedef union
-  {
-    LONGEST lval;
-    struct {
-      LONGEST val;
-      struct type *type;
-    } typed_val;
-    struct {
-      DOUBLEST dval;
-      struct type *type;
-    } typed_val_float;
-    struct type *tval;
-    struct stoken sval;
-    struct name_info ssym;
-    int voidval;
-    struct block *bval;
-    struct internalvar *ivar;
-
-  } yystype;
-# define YYSTYPE yystype
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-
-
-#define	YYFINAL		184
-#define	YYFLAG		-32768
-#define	YYNTBASE	68
-
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 302 ? yytranslate[x] : 82)
-
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-static const char yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    34,    63,
-      57,    62,    36,    32,    64,    33,    56,    37,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,    61,
-      25,    23,    26,     2,    31,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,    58,     2,    67,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,    65,     2,    66,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
-      16,    17,    18,    19,    20,    21,    22,    24,    27,    28,
-      29,    30,    35,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    59,    60
-};
-
-#if YYDEBUG
-static const short yyprhs[] =
-{
-       0,     0,     2,     4,     6,    10,    13,    16,    21,    26,
-      27,    35,    36,    43,    47,    49,    51,    53,    55,    57,
-      61,    64,    67,    70,    73,    74,    76,    80,    84,    90,
-      95,    99,   103,   107,   111,   115,   119,   123,   127,   131,
-     135,   139,   143,   149,   155,   159,   166,   173,   178,   182,
-     186,   190,   194,   199,   203,   208,   212,   215,   218,   222,
-     226,   230,   233,   236,   244,   252,   258,   262,   266,   270,
-     276,   279,   280,   284,   286,   288,   289,   291,   293,   295,
-     297,   299,   302,   304,   307,   309,   312,   314,   316,   318,
-     320,   323,   325,   328,   331,   335,   338,   341
-};
-static const short yyrhs[] =
-{
-      69,     0,    81,     0,    73,     0,    69,    61,    73,     0,
-      70,    13,     0,    70,    11,     0,    70,    57,    74,    62,
-       0,    81,    57,    73,    62,     0,     0,    81,    63,    72,
-      71,    57,    73,    62,     0,     0,    70,    57,    73,    30,
-      73,    62,     0,    57,    69,    62,     0,    78,     0,    15,
-       0,    16,     0,    70,     0,    14,     0,    73,    17,    73,
-       0,    33,    73,     0,    32,    73,     0,    42,    73,     0,
-      41,    73,     0,     0,    73,     0,    79,    59,    73,     0,
-      74,    64,    73,     0,    74,    64,    79,    59,    73,     0,
-      65,    81,    66,    73,     0,    73,    40,    73,     0,    73,
-      36,    73,     0,    73,    37,    73,     0,    73,    39,    73,
-       0,    73,    38,    73,     0,    73,    31,    73,     0,    73,
-      32,    73,     0,    73,    34,    73,     0,    73,    33,    73,
-       0,    73,    23,    73,     0,    73,    24,    73,     0,    73,
-      27,    73,     0,    73,    29,    73,    30,    73,     0,    73,
-      29,    73,    52,    75,     0,    73,    29,     7,     0,    73,
-      42,    29,    73,    30,    73,     0,    73,    42,    29,    73,
-      52,    75,     0,    73,    42,    29,     7,     0,    73,    28,
-      73,     0,    73,    25,    73,     0,    73,    26,    73,     0,
-      73,    18,    73,     0,    73,    18,    21,    73,     0,    73,
-      19,    73,     0,    73,    19,    22,    73,     0,    73,    20,
-      73,     0,    70,    43,     0,    70,    44,     0,    70,    45,
-      75,     0,    70,    46,    75,     0,    70,    47,    75,     0,
-      70,    53,     0,    70,    54,     0,    77,    49,    57,    73,
-      64,    73,    62,     0,    77,    48,    57,    73,    64,    73,
-      62,     0,    77,    51,    57,    73,    62,     0,    76,    45,
-      75,     0,    76,    46,    75,     0,    76,    47,    75,     0,
-      76,    55,    57,    73,    62,     0,    76,    50,     0,     0,
-      57,     3,    62,     0,     7,     0,    76,     0,     0,     3,
-       0,     5,     0,     6,     0,     4,     0,     9,     0,    60,
-       7,     0,    10,     0,    80,    10,     0,    12,     0,    80,
-      12,     0,    10,     0,     7,     0,    12,     0,     8,     0,
-      80,     8,     0,     7,     0,    80,     7,     0,     7,    43,
-       0,    80,     7,    43,     0,    36,    73,     0,    34,    73,
-       0,    73,    58,    73,    67,     0
-};
-
-#endif
-
-#if YYDEBUG
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const short yyrline[] =
-{
-       0,   203,   204,   210,   211,   216,   220,   227,   235,   243,
-     243,   254,   256,   261,   264,   267,   274,   282,   285,   292,
-     296,   300,   304,   308,   312,   315,   317,   319,   321,   325,
-     335,   339,   343,   347,   351,   355,   359,   363,   367,   371,
-     375,   379,   383,   387,   393,   400,   405,   413,   423,   427,
-     431,   435,   439,   443,   447,   451,   455,   457,   463,   465,
-     467,   469,   471,   473,   475,   477,   479,   481,   483,   485,
-     487,   491,   493,   497,   504,   506,   513,   521,   533,   541,
-     548,   575,   579,   580,   582,   583,   587,   588,   589,   592,
-     594,   599,   600,   601,   603,   610,   612,   614
-};
-#endif
-
-
-#if (YYDEBUG) || defined YYERROR_VERBOSE
-
-/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
-static const char *const yytname[] =
-{
-  "$", "error", "$undefined.", "INT", "NULL_PTR", "CHARLIT", "FLOAT", 
-  "TYPENAME", "BLOCKNAME", "STRING", "NAME", "DOT_ID", "OBJECT_RENAMING", 
-  "DOT_ALL", "LAST", "REGNAME", "INTERNAL_VARIABLE", "ASSIGN", "_AND_", 
-  "OR", "XOR", "THEN", "ELSE", "'='", "NOTEQUAL", "'<'", "'>'", "LEQ", 
-  "GEQ", "IN", "DOTDOT", "'@'", "'+'", "'-'", "'&'", "UNARY", "'*'", 
-  "'/'", "MOD", "REM", "STARSTAR", "ABS", "NOT", "TICK_ACCESS", 
-  "TICK_ADDRESS", "TICK_FIRST", "TICK_LAST", "TICK_LENGTH", "TICK_MAX", 
-  "TICK_MIN", "TICK_MODULUS", "TICK_POS", "TICK_RANGE", "TICK_SIZE", 
-  "TICK_TAG", "TICK_VAL", "'.'", "'('", "'['", "ARROW", "NEW", "';'", 
-  "')'", "'\\''", "','", "'{'", "'}'", "']'", "start", "exp1", 
-  "simple_exp", "@1", "save_qualifier", "exp", "arglist", "tick_arglist", 
-  "type_prefix", "opt_type_prefix", "variable", "any_name", "block", 
-  "type", 0
-};
-#endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const short yyr1[] =
-{
-       0,    68,    68,    69,    69,    70,    70,    70,    70,    71,
-      70,    72,    70,    70,    70,    70,    70,    73,    70,    73,
-      73,    73,    73,    73,    74,    74,    74,    74,    74,    73,
-      73,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-      73,    73,    73,    73,    73,    73,    73,    73,    73,    73,
-      73,    73,    73,    73,    73,    73,    70,    70,    70,    70,
-      70,    70,    70,    70,    70,    70,    70,    70,    70,    70,
-      70,    75,    75,    76,    77,    77,    73,    73,    73,    73,
-      73,    73,    78,    78,    78,    78,    79,    79,    79,    80,
-      80,    81,    81,    81,    81,    73,    73,    73
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const short yyr2[] =
-{
-       0,     1,     1,     1,     3,     2,     2,     4,     4,     0,
-       7,     0,     6,     3,     1,     1,     1,     1,     1,     3,
-       2,     2,     2,     2,     0,     1,     3,     3,     5,     4,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
-       3,     3,     5,     5,     3,     6,     6,     4,     3,     3,
-       3,     3,     4,     3,     4,     3,     2,     2,     3,     3,
-       3,     2,     2,     7,     7,     5,     3,     3,     3,     5,
-       2,     0,     3,     1,     1,     0,     1,     1,     1,     1,
-       1,     2,     1,     2,     1,     2,     1,     1,     1,     1,
-       2,     1,     2,     2,     3,     2,     2,     4
-};
-
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
-   doesn't specify something else to do.  Zero means the default is an
-   error. */
-static const short yydefact[] =
-{
-      75,    76,    79,    77,    78,    73,    89,    80,    82,    84,
-      18,    15,    16,    75,    75,    75,    75,    75,    75,    75,
-       0,     0,     1,    17,     3,    74,     0,    14,     0,     2,
-      93,    21,     0,    20,    96,    95,    23,    22,     0,    81,
-      91,     0,     0,    75,     6,     5,    56,    57,    71,    71,
-      71,    61,    62,    75,    75,    75,    75,    75,    75,    75,
-      75,    75,    75,    75,    75,    75,    75,    75,    75,    75,
-      75,    75,    75,    75,     0,    75,    71,    71,    71,    70,
-       0,     0,     0,     0,    92,    90,    83,    85,    75,    11,
-      13,    75,     4,     0,    58,    59,    60,    73,    82,    84,
-      25,     0,     0,    19,    75,    51,    75,    53,    55,    39,
-      40,    49,    50,    41,    48,    44,     0,    35,    36,    38,
-      37,    31,    32,    34,    33,    30,    75,     0,    66,    67,
-      68,    75,    75,    75,    75,    94,     0,     9,    29,     0,
-      75,     7,    75,    75,    52,    54,    75,    71,    47,     0,
-      97,     0,     0,     0,     0,     8,     0,    72,     0,    27,
-       0,    26,    42,    43,    75,    71,    69,    75,    75,    65,
-      75,    12,    75,    45,    46,     0,     0,     0,    28,    64,
-      63,    10,     0,     0,     0
-};
-
-static const short yydefgoto[] =
-{
-     182,    22,    23,   156,   137,    24,   101,    94,    25,    26,
-      27,   102,    28,    32
-};
-
-static const short yypact[] =
-{
-     251,-32768,-32768,-32768,-32768,    20,-32768,-32768,-32768,-32768,
-  -32768,-32768,-32768,   251,   251,   251,   251,   251,   251,   251,
-       2,    79,   -47,    53,   958,   -23,    54,-32768,   104,   -32,
-  -32768,    31,   -32,    31,   -22,   -22,    31,    31,    33,-32768,
-      -5,   101,   -27,   251,-32768,-32768,-32768,-32768,     4,     4,
-       4,-32768,-32768,   131,   251,   171,   211,   251,   251,   251,
-     251,   251,   251,   251,   291,   251,   251,   251,   251,   251,
-     251,   251,   251,   251,    47,   251,     4,     4,     4,-32768,
-      23,    25,    27,    35,    45,-32768,-32768,-32768,   251,-32768,
-  -32768,   251,   958,    98,-32768,-32768,-32768,    22,    56,    58,
-     930,   -36,    64,   986,   251,  1009,   251,  1009,  1009,   -21,
-     -21,   -21,   -21,   -21,   -21,   534,   858,   387,    31,    31,
-      31,    32,    32,    32,    32,    32,   331,   415,-32768,-32768,
-  -32768,   251,   251,   251,   251,-32768,   536,-32768,   -22,    62,
-     251,-32768,   371,   251,  1009,  1009,   251,     4,   534,   894,
-  -32768,   582,   452,   494,   628,-32768,    68,-32768,   674,   958,
-      67,   958,   -21,-32768,   251,     4,-32768,   251,   251,-32768,
-     251,-32768,   251,   -21,-32768,   720,   766,   812,   958,-32768,
-  -32768,-32768,   128,   132,-32768
-};
-
-static const short yypgoto[] =
-{
-  -32768,   112,-32768,-32768,-32768,   -13,-32768,   -43,-32768,-32768,
-  -32768,     0,   123,     8
-};
-
-
-#define	YYLAST		1067
-
-
-static const short yytable[] =
-{
-      31,    33,    34,    35,    36,    37,    95,    96,    29,    39,
-      65,    66,    67,    68,    43,    69,    70,    71,    72,    73,
-     -91,    74,    76,    77,    78,    88,   141,    79,   142,    42,
-      92,    89,    80,   128,   129,   130,    75,    75,    30,    91,
-     100,   103,   105,   107,   108,   109,   110,   111,   112,   113,
-     114,   116,   117,   118,   119,   120,   121,   122,   123,   124,
-     125,    93,   127,    30,    44,    30,    45,    69,    70,    71,
-      72,    73,    73,    74,    74,   136,   126,   -91,   138,   -91,
-     131,   -87,   132,   -91,   133,   -91,    40,     6,   135,    75,
-      75,   144,   134,   145,    43,    90,    46,    47,    48,    49,
-      50,   139,    81,    82,   163,    83,    51,    52,    84,    85,
-      53,    84,    85,   149,    86,   -86,    87,   -88,   151,   152,
-     153,   154,   174,   143,   157,   170,   172,   158,   183,   159,
-     161,    38,   184,   162,     1,     2,     3,     4,    97,     6,
-       7,    98,   160,    99,    41,    10,    11,    12,     0,     0,
-       0,   173,     0,     0,   175,   176,     0,   177,     0,   178,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,     5,     6,
-       7,     8,     0,     9,     0,    10,    11,    12,    19,     0,
-       0,    20,   104,   -24,     0,   -24,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,     5,     6,
-       7,     8,     0,     9,     0,    10,    11,    12,    19,     0,
-       0,    20,     0,   106,     0,     0,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,     5,     6,
-       7,     8,     0,     9,     0,    10,    11,    12,    19,     0,
-       0,    20,     0,     0,     0,     0,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,   115,     6,
-       7,     8,     0,     9,     0,    10,    11,    12,    19,     0,
-       0,    20,     0,     0,     0,     0,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,   148,     6,
-       7,     8,     0,     9,     0,    10,    11,    12,    19,     0,
-       0,    20,     0,     0,     0,     0,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     1,     2,     3,     4,    97,     6,
-       7,    98,     0,    99,     0,    10,    11,    12,    19,     0,
-       0,    20,     0,     0,     0,     0,    21,     0,     0,     0,
-       0,     0,     0,    13,    14,    15,     0,    16,     0,     0,
-       0,     0,    17,    18,     0,     0,     0,     0,     0,    66,
-      67,    68,     0,    69,    70,    71,    72,    73,    19,    74,
-       0,    20,    54,    55,    56,    57,    21,     0,    58,    59,
-      60,    61,    62,    63,    64,    75,    65,    66,    67,    68,
-       0,    69,    70,    71,    72,    73,     0,    74,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    54,
-      55,    56,    57,    75,     0,    58,    59,    60,    61,    62,
-      63,    64,   150,    65,    66,    67,    68,     0,    69,    70,
-      71,    72,    73,     0,    74,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      75,    54,    55,    56,    57,     0,   167,    58,    59,    60,
-      61,    62,    63,    64,     0,    65,    66,    67,    68,     0,
-      69,    70,    71,    72,    73,     0,    74,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    75,    54,    55,    56,    57,     0,   168,    58,
-      59,    60,    61,    62,    63,    64,     0,    65,    66,    67,
-      68,     0,    69,    70,    71,    72,    73,    30,    74,   -73,
-     -73,   -73,   -73,   -73,   -73,   -73,     0,     0,     0,   -73,
-       0,   -91,     0,     0,    75,     0,     0,   -91,   155,    54,
-      55,    56,    57,     0,     0,    58,    59,    60,    61,    62,
-      63,    64,     0,    65,    66,    67,    68,     0,    69,    70,
-      71,    72,    73,     0,    74,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      75,     0,     0,     0,   166,    54,    55,    56,    57,     0,
-       0,    58,    59,    60,    61,    62,    63,    64,     0,    65,
-      66,    67,    68,     0,    69,    70,    71,    72,    73,     0,
-      74,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    75,     0,     0,     0,
-     169,    54,    55,    56,    57,     0,     0,    58,    59,    60,
-      61,    62,    63,    64,     0,    65,    66,    67,    68,     0,
-      69,    70,    71,    72,    73,     0,    74,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    75,     0,     0,     0,   171,    54,    55,    56,
-      57,     0,     0,    58,    59,    60,    61,    62,    63,    64,
-       0,    65,    66,    67,    68,     0,    69,    70,    71,    72,
-      73,     0,    74,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    75,     0,
-       0,     0,   179,    54,    55,    56,    57,     0,     0,    58,
-      59,    60,    61,    62,    63,    64,     0,    65,    66,    67,
-      68,     0,    69,    70,    71,    72,    73,     0,    74,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    75,     0,     0,     0,   180,    54,
-      55,    56,    57,     0,     0,    58,    59,    60,    61,    62,
-      63,    64,     0,    65,    66,    67,    68,     0,    69,    70,
-      71,    72,    73,     0,    74,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      75,     0,     0,     0,   181,    54,    55,    56,    57,     0,
-       0,    58,    59,    60,    61,    62,    63,    64,   146,    65,
-      66,    67,    68,     0,    69,    70,    71,    72,    73,     0,
-      74,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     147,    54,    55,    56,    57,     0,    75,    58,    59,    60,
-      61,    62,    63,    64,   164,    65,    66,    67,    68,     0,
-      69,    70,    71,    72,    73,     0,    74,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   165,    54,    55,    56,
-      57,     0,    75,    58,    59,    60,    61,    62,    63,    64,
-     140,    65,    66,    67,    68,     0,    69,    70,    71,    72,
-      73,     0,    74,     0,     0,    54,    55,    56,    57,     0,
-       0,    58,    59,    60,    61,    62,    63,    64,    75,    65,
-      66,    67,    68,     0,    69,    70,    71,    72,    73,     0,
-      74,     0,     0,-32768,    55,    56,    57,     0,     0,    58,
-      59,    60,    61,    62,    63,    64,    75,    65,    66,    67,
-      68,     0,    69,    70,    71,    72,    73,     0,    74,     0,
-       0,     0,    58,    59,    60,    61,    62,    63,    64,     0,
-      65,    66,    67,    68,    75,    69,    70,    71,    72,    73,
-       0,    74,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    75
-};
-
-static const short yycheck[] =
-{
-      13,    14,    15,    16,    17,    18,    49,    50,     0,     7,
-      31,    32,    33,    34,    61,    36,    37,    38,    39,    40,
-       0,    42,    45,    46,    47,    57,    62,    50,    64,    21,
-      43,    63,    55,    76,    77,    78,    58,    58,    43,    66,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    57,    75,    43,    11,    43,    13,    36,    37,    38,
-      39,    40,    40,    42,    42,    88,    29,    57,    91,    57,
-      57,    59,    57,    63,    57,    63,     7,     8,    43,    58,
-      58,   104,    57,   106,    61,    62,    43,    44,    45,    46,
-      47,     3,    48,    49,   147,    51,    53,    54,     7,     8,
-      57,     7,     8,   126,    10,    59,    12,    59,   131,   132,
-     133,   134,   165,    59,    62,    57,    59,   140,     0,   142,
-     143,    19,     0,   146,     3,     4,     5,     6,     7,     8,
-       9,    10,   142,    12,    21,    14,    15,    16,    -1,    -1,
-      -1,   164,    -1,    -1,   167,   168,    -1,   170,    -1,   172,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    21,    62,    -1,    64,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    -1,    22,    -1,    -1,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    -1,    -1,    -1,    -1,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    -1,    -1,    -1,    -1,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    -1,    -1,    -1,    -1,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,     3,     4,     5,     6,     7,     8,
-       9,    10,    -1,    12,    -1,    14,    15,    16,    57,    -1,
-      -1,    60,    -1,    -1,    -1,    -1,    65,    -1,    -1,    -1,
-      -1,    -1,    -1,    32,    33,    34,    -1,    36,    -1,    -1,
-      -1,    -1,    41,    42,    -1,    -1,    -1,    -1,    -1,    32,
-      33,    34,    -1,    36,    37,    38,    39,    40,    57,    42,
-      -1,    60,    17,    18,    19,    20,    65,    -1,    23,    24,
-      25,    26,    27,    28,    29,    58,    31,    32,    33,    34,
-      -1,    36,    37,    38,    39,    40,    -1,    42,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    17,
-      18,    19,    20,    58,    -1,    23,    24,    25,    26,    27,
-      28,    29,    67,    31,    32,    33,    34,    -1,    36,    37,
-      38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      58,    17,    18,    19,    20,    -1,    64,    23,    24,    25,
-      26,    27,    28,    29,    -1,    31,    32,    33,    34,    -1,
-      36,    37,    38,    39,    40,    -1,    42,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    58,    17,    18,    19,    20,    -1,    64,    23,
-      24,    25,    26,    27,    28,    29,    -1,    31,    32,    33,
-      34,    -1,    36,    37,    38,    39,    40,    43,    42,    45,
-      46,    47,    48,    49,    50,    51,    -1,    -1,    -1,    55,
-      -1,    57,    -1,    -1,    58,    -1,    -1,    63,    62,    17,
-      18,    19,    20,    -1,    -1,    23,    24,    25,    26,    27,
-      28,    29,    -1,    31,    32,    33,    34,    -1,    36,    37,
-      38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      58,    -1,    -1,    -1,    62,    17,    18,    19,    20,    -1,
-      -1,    23,    24,    25,    26,    27,    28,    29,    -1,    31,
-      32,    33,    34,    -1,    36,    37,    38,    39,    40,    -1,
-      42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    58,    -1,    -1,    -1,
-      62,    17,    18,    19,    20,    -1,    -1,    23,    24,    25,
-      26,    27,    28,    29,    -1,    31,    32,    33,    34,    -1,
-      36,    37,    38,    39,    40,    -1,    42,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    58,    -1,    -1,    -1,    62,    17,    18,    19,
-      20,    -1,    -1,    23,    24,    25,    26,    27,    28,    29,
-      -1,    31,    32,    33,    34,    -1,    36,    37,    38,    39,
-      40,    -1,    42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    58,    -1,
-      -1,    -1,    62,    17,    18,    19,    20,    -1,    -1,    23,
-      24,    25,    26,    27,    28,    29,    -1,    31,    32,    33,
-      34,    -1,    36,    37,    38,    39,    40,    -1,    42,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    58,    -1,    -1,    -1,    62,    17,
-      18,    19,    20,    -1,    -1,    23,    24,    25,    26,    27,
-      28,    29,    -1,    31,    32,    33,    34,    -1,    36,    37,
-      38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      58,    -1,    -1,    -1,    62,    17,    18,    19,    20,    -1,
-      -1,    23,    24,    25,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    -1,    36,    37,    38,    39,    40,    -1,
-      42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      52,    17,    18,    19,    20,    -1,    58,    23,    24,    25,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,    -1,
-      36,    37,    38,    39,    40,    -1,    42,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    52,    17,    18,    19,
-      20,    -1,    58,    23,    24,    25,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,    -1,    36,    37,    38,    39,
-      40,    -1,    42,    -1,    -1,    17,    18,    19,    20,    -1,
-      -1,    23,    24,    25,    26,    27,    28,    29,    58,    31,
-      32,    33,    34,    -1,    36,    37,    38,    39,    40,    -1,
-      42,    -1,    -1,    17,    18,    19,    20,    -1,    -1,    23,
-      24,    25,    26,    27,    28,    29,    58,    31,    32,    33,
-      34,    -1,    36,    37,    38,    39,    40,    -1,    42,    -1,
-      -1,    -1,    23,    24,    25,    26,    27,    28,    29,    -1,
-      31,    32,    33,    34,    58,    36,    37,    38,    39,    40,
-      -1,    42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    58
-};
-/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/usr/local/share/bison/bison.simple"
-
-/* Skeleton output parser for bison,
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   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.  */
-
-/* As a special exception, when this file is copied by Bison into a
-   Bison output file, you may use that output file without restriction.
-   This special exception was added by the Free Software Foundation
-   in version 1.24 of Bison.  */
-
-/* This is the parser code that is written into each bison parser when
-   the %semantic_parser declaration is not specified in the grammar.
-   It was written by Richard Stallman by simplifying the hairy parser
-   used when %semantic_parser is specified.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
-
-/* The parser invokes alloca or xmalloc; define the necessary symbols.  */
-
-# if YYSTACK_USE_ALLOCA
-#  define YYSTACK_ALLOC alloca
-# else
-#  ifndef YYSTACK_USE_ALLOCA
-#   if defined (alloca) || defined (_ALLOCA_H)
-#    define YYSTACK_ALLOC alloca
-#   else
-#    ifdef __GNUC__
-#     define YYSTACK_ALLOC __builtin_alloca
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning. */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
-#  define YYSTACK_ALLOC xmalloc
-#  define YYSTACK_FREE free
-# endif
-#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
-
-
-#if (! defined (yyoverflow) \
-     && (! defined (__cplusplus) \
-	 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  short yyss;
-  YYSTYPE yyvs;
-# if YYLSP_NEEDED
-  YYLTYPE yyls;
-# endif
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# if YYLSP_NEEDED
-#  define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))	\
-      + 2 * YYSTACK_GAP_MAX)
-# else
-#  define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
-      + YYSTACK_GAP_MAX)
-# endif
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  register YYSIZE_T yyi;		\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (0)
-#  endif
-# endif
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
-    do									\
-      {									\
-	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
-	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;	\
-	yyptr += yynewbytes / sizeof (*yyptr);				\
-      }									\
-    while (0)
-
-#endif
-
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#define yyerrok		(yyerrstatus = 0)
-#define yyclearin	(yychar = YYEMPTY)
-#define YYEMPTY		-2
-#define YYEOF		0
-#define YYACCEPT	goto yyacceptlab
-#define YYABORT 	goto yyabortlab
-#define YYERROR		goto yyerrlab1
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-#define YYFAIL		goto yyerrlab
-#define YYRECOVERING()  (!!yyerrstatus)
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yychar1 = YYTRANSLATE (yychar);				\
-      YYPOPSTACK;						\
-      goto yybackup;						\
-    }								\
-  else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");			\
-      YYERROR;							\
-    }								\
-while (0)
-
-#define YYTERROR	1
-#define YYERRCODE	256
-
-
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).
-
-   When YYLLOC_DEFAULT is run, CURRENT is set the location of the
-   first token.  By default, to implement support for ranges, extend
-   its range to the last symbol.  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)       	\
-   Current.last_line   = Rhs[N].last_line;	\
-   Current.last_column = Rhs[N].last_column;
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments.  */
-
-#if YYPURE
-# if YYLSP_NEEDED
-#  ifdef YYLEX_PARAM
-#   define YYLEX		yylex (&yylval, &yylloc, YYLEX_PARAM)
-#  else
-#   define YYLEX		yylex (&yylval, &yylloc)
-#  endif
-# else /* !YYLSP_NEEDED */
-#  ifdef YYLEX_PARAM
-#   define YYLEX		yylex (&yylval, YYLEX_PARAM)
-#  else
-#   define YYLEX		yylex (&yylval)
-#  endif
-# endif /* !YYLSP_NEEDED */
-#else /* !YYPURE */
-# define YYLEX			yylex ()
-#endif /* !YYPURE */
-
-
-/* Enable debugging if requested.  */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)			\
-do {						\
-  if (yydebug)					\
-    YYFPRINTF Args;				\
-} while (0)
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-#endif /* !YYDEBUG */
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-#ifdef YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined (__GLIBC__) && defined (_STRING_H)
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-#   if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-#   else
-yystrlen (yystr)
-     const char *yystr;
-#   endif
-{
-  register const char *yys = yystr;
-
-  while (*yys++ != '\0')
-    continue;
-
-  return yys - yystr - 1;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-#   if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-#   else
-yystpcpy (yydest, yysrc)
-     char *yydest;
-     const char *yysrc;
-#   endif
-{
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-#endif
-
-#line 315 "/usr/local/share/bison/bison.simple"
-
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
-   into yyparse.  The argument should have type void *.
-   It should actually point to an object.
-   Grammar actions can access the variable by casting it
-   to the proper pointer type.  */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL
-# else
-#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-# endif
-#else /* !YYPARSE_PARAM */
-# define YYPARSE_PARAM_ARG
-# define YYPARSE_PARAM_DECL
-#endif /* !YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes.  */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
-int yyparse (void *);
-# else
-int yyparse (void);
-# endif
-#endif
-
-/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
-   variables are global, or local to YYPARSE.  */
-
-#define YY_DECL_NON_LSP_VARIABLES			\
-/* The lookahead symbol.  */				\
-int yychar;						\
-							\
-/* The semantic value of the lookahead symbol. */	\
-YYSTYPE yylval;						\
-							\
-/* Number of parse errors so far.  */			\
-int yynerrs;
-
-#if YYLSP_NEEDED
-# define YY_DECL_VARIABLES			\
-YY_DECL_NON_LSP_VARIABLES			\
-						\
-/* Location data for the lookahead symbol.  */	\
-YYLTYPE yylloc;
-#else
-# define YY_DECL_VARIABLES			\
-YY_DECL_NON_LSP_VARIABLES
-#endif
-
-
-/* If nonreentrant, generate the variables here. */
-
-#if !YYPURE
-YY_DECL_VARIABLES
-#endif  /* !YYPURE */
-
-int
-yyparse (YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
-{
-  /* If reentrant, generate the variables here. */
-#if YYPURE
-  YY_DECL_VARIABLES
-#endif  /* !YYPURE */
-
-  register int yystate;
-  register int yyn;
-  int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yychar1 = 0;
-
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to xreallocate them elsewhere.  */
-
-  /* The state stack. */
-  short	yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
-
-#if YYLSP_NEEDED
-  /* The location stack.  */
-  YYLTYPE yylsa[YYINITDEPTH];
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-#endif
-
-#if YYLSP_NEEDED
-# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
-#else
-# define YYPOPSTACK   (yyvsp--, yyssp--)
-#endif
-
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-#if YYLSP_NEEDED
-  YYLTYPE yyloc;
-#endif
-
-  /* When reducing, the number of symbols on the RHS of the reduced
-     rule. */
-  int yylen;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-
-  yyssp = yyss;
-  yyvsp = yyvs;
-#if YYLSP_NEEDED
-  yylsp = yyls;
-#endif
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed. so pushing a state here evens the stacks.
-     */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyssp >= yyss + yystacksize - 1)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-	/* Give user a chance to xreallocate the stack. Use copies of
-	   these so that the &'s don't force the real ones into
-	   memory.  */
-	YYSTYPE *yyvs1 = yyvs;
-	short *yyss1 = yyss;
-
-	/* Each stack pointer address is followed by the size of the
-	   data in use in that stack, in bytes.  */
-# if YYLSP_NEEDED
-	YYLTYPE *yyls1 = yyls;
-	/* This used to be a conditional around just the two extra args,
-	   but that might be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yyls1, yysize * sizeof (*yylsp),
-		    &yystacksize);
-	yyls = yyls1;
-# else
-	yyoverflow ("parser stack overflow",
-		    &yyss1, yysize * sizeof (*yyssp),
-		    &yyvs1, yysize * sizeof (*yyvsp),
-		    &yystacksize);
-# endif
-	yyss = yyss1;
-	yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
-# else
-      /* Extend the stack our own way.  */
-      if (yystacksize >= YYMAXDEPTH)
-	goto yyoverflowlab;
-      yystacksize *= 2;
-      if (yystacksize > YYMAXDEPTH)
-	yystacksize = YYMAXDEPTH;
-
-      {
-	short *yyss1 = yyss;
-	union yyalloc *yyptr =
-	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-	if (! yyptr)
-	  goto yyoverflowlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-# if YYLSP_NEEDED
-	YYSTACK_RELOCATE (yyls);
-# endif
-# undef YYSTACK_RELOCATE
-	if (yyss1 != yyssa)
-	  YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
-      yylsp = yyls + yysize - 1;
-#endif
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-		  (unsigned long int) yystacksize));
-
-      if (yyssp >= yyss + yystacksize - 1)
-	YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  goto yybackup;
-
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
-/* yyresume: */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* yychar is either YYEMPTY or YYEOF
-     or a valid token in external form.  */
-
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
-
-  /* Convert token to internal form (in yychar1) for indexing tables with */
-
-  if (yychar <= 0)		/* This means end of input. */
-    {
-      yychar1 = 0;
-      yychar = YYEOF;		/* Don't call YYLEX any more */
-
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yychar1 = YYTRANSLATE (yychar);
-
-#if YYDEBUG
-     /* We have to keep this `#if YYDEBUG', since we use variables
-	which are defined only if `YYDEBUG' is set.  */
-      if (yydebug)
-	{
-	  YYFPRINTF (stderr, "Next token is %d (%s",
-		     yychar, yytname[yychar1]);
-	  /* Give the individual parser a way to print the precise
-	     meaning of a token, for further debugging info.  */
-# ifdef YYPRINT
-	  YYPRINT (stderr, yychar, yylval);
-# endif
-	  YYFPRINTF (stderr, ")\n");
-	}
-#endif
-    }
-
-  yyn += yychar1;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
-    goto yydefault;
-
-  yyn = yytable[yyn];
-
-  /* yyn is what to do for this token type in this state.
-     Negative => reduce, -yyn is rule number.
-     Positive => shift, yyn is new state.
-       New state is final state => don't bother to shift,
-       just return success.
-     0, or most negative number => error.  */
-
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-  else if (yyn == 0)
-    goto yyerrlab;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
-	      yychar, yytname[yychar1]));
-
-  /* Discard the token being shifted unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
-
-  *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to the semantic value of
-     the lookahead token.  This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-#if YYLSP_NEEDED
-  /* Similarly for the default location.  Let the user run additional
-     commands if for instance locations are ranges.  */
-  yyloc = yylsp[1-yylen];
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-#endif
-
-#if YYDEBUG
-  /* We have to keep this `#if YYDEBUG', since we use variables which
-     are defined only if `YYDEBUG' is set.  */
-  if (yydebug)
-    {
-      int yyi;
-
-      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
-		 yyn, yyrline[yyn]);
-
-      /* Print the symbols being reduced, and their result.  */
-      for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
-	YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
-      YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
-    }
-#endif
-
-  switch (yyn) {
-
-case 2:
-#line 204 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_TYPE);
-			  write_exp_elt_type (yyvsp[0].tval);
- 			  write_exp_elt_opcode (OP_TYPE); }
-    break;
-case 4:
-#line 212 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_COMMA); }
-    break;
-case 5:
-#line 217 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); }
-    break;
-case 6:
-#line 221 "./ada-exp.y"
-{ write_exp_elt_opcode (STRUCTOP_STRUCT);
-			  write_exp_string (yyvsp[0].ssym.stoken);
-			  write_exp_elt_opcode (STRUCTOP_STRUCT); 
-			  }
-    break;
-case 7:
-#line 228 "./ada-exp.y"
-{
-			  write_exp_elt_opcode (OP_FUNCALL);
-			  write_exp_elt_longcst (yyvsp[-1].lval);
-			  write_exp_elt_opcode (OP_FUNCALL);
-		        }
-    break;
-case 8:
-#line 236 "./ada-exp.y"
-{
-			  write_exp_elt_opcode (UNOP_CAST);
-			  write_exp_elt_type (yyvsp[-3].tval);
-			  write_exp_elt_opcode (UNOP_CAST); 
-			}
-    break;
-case 9:
-#line 243 "./ada-exp.y"
-{ type_qualifier = yyvsp[-2].tval; }
-    break;
-case 10:
-#line 244 "./ada-exp.y"
-{
-			  /*			  write_exp_elt_opcode (UNOP_QUAL); */
-			  /* FIXME: UNOP_QUAL should be defined in expression.h */
-			  write_exp_elt_type (yyvsp[-6].tval);
-			  /* write_exp_elt_opcode (UNOP_QUAL); */
-			  /* FIXME: UNOP_QUAL should be defined in expression.h */
-			  type_qualifier = yyvsp[-4].tval;
-			}
-    break;
-case 11:
-#line 254 "./ada-exp.y"
-{ yyval.tval = type_qualifier; }
-    break;
-case 12:
-#line 258 "./ada-exp.y"
-{ write_exp_elt_opcode (TERNOP_SLICE); }
-    break;
-case 13:
-#line 261 "./ada-exp.y"
-{ }
-    break;
-case 15:
-#line 268 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_REGISTER);
-			  write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
-			  write_exp_elt_opcode (OP_REGISTER); 
-			}
-    break;
-case 16:
-#line 275 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_INTERNALVAR);
-			  write_exp_elt_intern (yyvsp[0].ivar);
-			  write_exp_elt_opcode (OP_INTERNALVAR); 
-			}
-    break;
-case 18:
-#line 286 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_LAST);
-			  write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
-			  write_exp_elt_opcode (OP_LAST); 
-			 }
-    break;
-case 19:
-#line 293 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_ASSIGN); }
-    break;
-case 20:
-#line 297 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_NEG); }
-    break;
-case 21:
-#line 301 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_PLUS); }
-    break;
-case 22:
-#line 305 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
-    break;
-case 23:
-#line 309 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_ABS); }
-    break;
-case 24:
-#line 312 "./ada-exp.y"
-{ yyval.lval = 0; }
-    break;
-case 25:
-#line 316 "./ada-exp.y"
-{ yyval.lval = 1; }
-    break;
-case 26:
-#line 318 "./ada-exp.y"
-{ yyval.lval = 1; }
-    break;
-case 27:
-#line 320 "./ada-exp.y"
-{ yyval.lval = yyvsp[-2].lval + 1; }
-    break;
-case 28:
-#line 322 "./ada-exp.y"
-{ yyval.lval = yyvsp[-4].lval + 1; }
-    break;
-case 29:
-#line 327 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_MEMVAL);
-			  write_exp_elt_type (yyvsp[-2].tval);
-			  write_exp_elt_opcode (UNOP_MEMVAL); 
-			}
-    break;
-case 30:
-#line 336 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_EXP); }
-    break;
-case 31:
-#line 340 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_MUL); }
-    break;
-case 32:
-#line 344 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_DIV); }
-    break;
-case 33:
-#line 348 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_REM); }
-    break;
-case 34:
-#line 352 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_MOD); }
-    break;
-case 35:
-#line 356 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_REPEAT); }
-    break;
-case 36:
-#line 360 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_ADD); }
-    break;
-case 37:
-#line 364 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_CONCAT); }
-    break;
-case 38:
-#line 368 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_SUB); }
-    break;
-case 39:
-#line 372 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_EQUAL); }
-    break;
-case 40:
-#line 376 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_NOTEQUAL); }
-    break;
-case 41:
-#line 380 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_LEQ); }
-    break;
-case 42:
-#line 384 "./ada-exp.y"
-{ /*write_exp_elt_opcode (TERNOP_MBR); */ }
-    break;
-case 43:
-#line 388 "./ada-exp.y"
-{ /*write_exp_elt_opcode (BINOP_MBR); */
-			  /* FIXME: BINOP_MBR should be defined in expression.h */
-			  write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
-			  /*write_exp_elt_opcode (BINOP_MBR); */
-			}
-    break;
-case 44:
-#line 394 "./ada-exp.y"
-{ /*write_exp_elt_opcode (UNOP_MBR); */
-			  /* FIXME: UNOP_QUAL should be defined in expression.h */			  
-		          write_exp_elt_type (yyvsp[0].tval);
-			  /*		          write_exp_elt_opcode (UNOP_MBR); */
-			  /* FIXME: UNOP_MBR should be defined in expression.h */			  
-			}
-    break;
-case 45:
-#line 401 "./ada-exp.y"
-{ /*write_exp_elt_opcode (TERNOP_MBR); */
-			  /* FIXME: TERNOP_MBR should be defined in expression.h */			  			  
-		          write_exp_elt_opcode (UNOP_LOGICAL_NOT); 
-			}
-    break;
-case 46:
-#line 406 "./ada-exp.y"
-{ /* write_exp_elt_opcode (BINOP_MBR); */
-			  /* FIXME: BINOP_MBR should be defined in expression.h */
-			  write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
-			  /*write_exp_elt_opcode (BINOP_MBR);*/
-			  /* FIXME: BINOP_MBR should be defined in expression.h */			  
-		          write_exp_elt_opcode (UNOP_LOGICAL_NOT); 
-			}
-    break;
-case 47:
-#line 414 "./ada-exp.y"
-{ /*write_exp_elt_opcode (UNOP_MBR);*/
-			  /* FIXME: UNOP_MBR should be defined in expression.h */			  
-		          write_exp_elt_type (yyvsp[0].tval);
-			  /*		          write_exp_elt_opcode (UNOP_MBR);*/
-			  /* FIXME: UNOP_MBR should be defined in expression.h */			  			  
-		          write_exp_elt_opcode (UNOP_LOGICAL_NOT); 
-			}
-    break;
-case 48:
-#line 424 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_GEQ); }
-    break;
-case 49:
-#line 428 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_LESS); }
-    break;
-case 50:
-#line 432 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_GTR); }
-    break;
-case 51:
-#line 436 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_AND); }
-    break;
-case 52:
-#line 440 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_AND); }
-    break;
-case 53:
-#line 444 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_IOR); }
-    break;
-case 54:
-#line 448 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_LOGICAL_OR); }
-    break;
-case 55:
-#line 452 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_BITWISE_XOR); }
-    break;
-case 56:
-#line 456 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_ADDR); }
-    break;
-case 57:
-#line 458 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_ADDR);
-			  write_exp_elt_opcode (UNOP_CAST);
-			  write_exp_elt_type (builtin_type_ada_system_address);
-			  write_exp_elt_opcode (UNOP_CAST);
-			}
-    break;
-case 58:
-#line 464 "./ada-exp.y"
-{ write_attribute_call1 (ATR_FIRST, yyvsp[0].lval); }
-    break;
-case 59:
-#line 466 "./ada-exp.y"
-{ write_attribute_call1 (ATR_LAST, yyvsp[0].lval); }
-    break;
-case 60:
-#line 468 "./ada-exp.y"
-{ write_attribute_call1 (ATR_LENGTH, yyvsp[0].lval); }
-    break;
-case 61:
-#line 470 "./ada-exp.y"
-{ write_attribute_call0 (ATR_SIZE); }
-    break;
-case 62:
-#line 472 "./ada-exp.y"
-{ write_attribute_call0 (ATR_TAG); }
-    break;
-case 63:
-#line 474 "./ada-exp.y"
-{ write_attribute_calln (ATR_MIN, 2); }
-    break;
-case 64:
-#line 476 "./ada-exp.y"
-{ write_attribute_calln (ATR_MAX, 2); }
-    break;
-case 65:
-#line 478 "./ada-exp.y"
-{ write_attribute_calln (ATR_POS, 1); }
-    break;
-case 66:
-#line 480 "./ada-exp.y"
-{ write_attribute_call1 (ATR_FIRST, yyvsp[0].lval); }
-    break;
-case 67:
-#line 482 "./ada-exp.y"
-{ write_attribute_call1 (ATR_LAST, yyvsp[0].lval); }
-    break;
-case 68:
-#line 484 "./ada-exp.y"
-{ write_attribute_call1 (ATR_LENGTH, yyvsp[0].lval); }
-    break;
-case 69:
-#line 486 "./ada-exp.y"
-{ write_attribute_calln (ATR_VAL, 1); }
-    break;
-case 70:
-#line 488 "./ada-exp.y"
-{ write_attribute_call0 (ATR_MODULUS); }
-    break;
-case 71:
-#line 492 "./ada-exp.y"
-{ yyval.lval = 1; }
-    break;
-case 72:
-#line 494 "./ada-exp.y"
-{ yyval.lval = yyvsp[-1].typed_val.val; }
-    break;
-case 73:
-#line 499 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_TYPE);
-			  write_exp_elt_type (yyvsp[0].tval);
-			  write_exp_elt_opcode (OP_TYPE); }
-    break;
-case 75:
-#line 507 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_TYPE);
-			  write_exp_elt_type (builtin_type_void);
-			  write_exp_elt_opcode (OP_TYPE); }
-    break;
-case 76:
-#line 514 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
-			  write_exp_elt_type (yyvsp[0].typed_val.type);
-			  write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val.val));
-			  write_exp_elt_opcode (OP_LONG); 
-			}
-    break;
-case 77:
-#line 522 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
-			  if (type_qualifier == NULL) 
-			    write_exp_elt_type (yyvsp[0].typed_val.type);
-			  else
-			    write_exp_elt_type (type_qualifier);
-			  write_exp_elt_longcst 
-			    (convert_char_literal (type_qualifier, yyvsp[0].typed_val.val));
-			  write_exp_elt_opcode (OP_LONG); 
-			}
-    break;
-case 78:
-#line 534 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_DOUBLE);
-			  write_exp_elt_type (yyvsp[0].typed_val_float.type);
-			  write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval);
-			  write_exp_elt_opcode (OP_DOUBLE); 
-			}
-    break;
-case 79:
-#line 542 "./ada-exp.y"
-{ write_exp_elt_opcode (OP_LONG);
-			  write_exp_elt_type (builtin_type_int);
-			  write_exp_elt_longcst ((LONGEST)(0));
-			  write_exp_elt_opcode (OP_LONG); 
-			 }
-    break;
-case 80:
-#line 549 "./ada-exp.y"
-{ /* Ada strings are converted into array constants 
-			     a lower bound of 1.  Thus, the array upper bound 
-			     is the string length. */
-			  char *sp = yyvsp[0].sval.ptr; int count;
-			  if (yyvsp[0].sval.length == 0) 
-			    { /* One dummy character for the type */
-			      write_exp_elt_opcode (OP_LONG);
-			      write_exp_elt_type (builtin_type_ada_char);
-			      write_exp_elt_longcst ((LONGEST)(0));
-			      write_exp_elt_opcode (OP_LONG);
-			    }
-			  for (count = yyvsp[0].sval.length; count > 0; count -= 1)
-			    {
-			      write_exp_elt_opcode (OP_LONG);
-			      write_exp_elt_type (builtin_type_ada_char);
-			      write_exp_elt_longcst ((LONGEST)(*sp));
-			      sp += 1;
-			      write_exp_elt_opcode (OP_LONG);
-			    }
-			  write_exp_elt_opcode (OP_ARRAY);
-			  write_exp_elt_longcst ((LONGEST) 1);
-			  write_exp_elt_longcst ((LONGEST) (yyvsp[0].sval.length));
-			  write_exp_elt_opcode (OP_ARRAY); 
-			 }
-    break;
-case 81:
-#line 576 "./ada-exp.y"
-{ error ("NEW not implemented."); }
-    break;
-case 82:
-#line 579 "./ada-exp.y"
-{ write_var_from_name (NULL, yyvsp[0].ssym); }
-    break;
-case 83:
-#line 581 "./ada-exp.y"
-{ write_var_from_name (yyvsp[-1].bval, yyvsp[0].ssym); }
-    break;
-case 84:
-#line 582 "./ada-exp.y"
-{ write_object_renaming (NULL, yyvsp[0].ssym.sym); }
-    break;
-case 85:
-#line 584 "./ada-exp.y"
-{ write_object_renaming (yyvsp[-1].bval, yyvsp[0].ssym.sym); }
-    break;
-case 86:
-#line 587 "./ada-exp.y"
-{ }
-    break;
-case 87:
-#line 588 "./ada-exp.y"
-{ }
-    break;
-case 88:
-#line 589 "./ada-exp.y"
-{ }
-    break;
-case 89:
-#line 593 "./ada-exp.y"
-{ yyval.bval = yyvsp[0].bval; }
-    break;
-case 90:
-#line 595 "./ada-exp.y"
-{ yyval.bval = yyvsp[0].bval; }
-    break;
-case 91:
-#line 599 "./ada-exp.y"
-{ yyval.tval = yyvsp[0].tval; }
-    break;
-case 92:
-#line 600 "./ada-exp.y"
-{ yyval.tval = yyvsp[0].tval; }
-    break;
-case 93:
-#line 602 "./ada-exp.y"
-{ yyval.tval = lookup_pointer_type (yyvsp[-1].tval); }
-    break;
-case 94:
-#line 604 "./ada-exp.y"
-{ yyval.tval = lookup_pointer_type (yyvsp[-1].tval); }
-    break;
-case 95:
-#line 611 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_IND); }
-    break;
-case 96:
-#line 613 "./ada-exp.y"
-{ write_exp_elt_opcode (UNOP_ADDR); }
-    break;
-case 97:
-#line 615 "./ada-exp.y"
-{ write_exp_elt_opcode (BINOP_SUBSCRIPT); }
-    break;
-}
-
-#line 705 "/usr/local/share/bison/bison.simple"
-
-
-  yyvsp -= yylen;
-  yyssp -= yylen;
-#if YYLSP_NEEDED
-  yylsp -= yylen;
-#endif
-
-#if YYDEBUG
-  if (yydebug)
-    {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "state stack now");
-      while (yyssp1 != yyssp)
-	YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
-    }
-#endif
-
-  *++yyvsp = yyval;
-#if YYLSP_NEEDED
-  *++yylsp = yyloc;
-#endif
-
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
-  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTBASE];
-
-  goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
-      yyn = yypact[yystate];
-
-      if (yyn > YYFLAG && yyn < YYLAST)
-	{
-	  YYSIZE_T yysize = 0;
-	  char *yymsg;
-	  int yyx, yycount;
-
-	  yycount = 0;
-	  /* Start YYX at -YYN if negative to avoid negative indexes in
-	     YYCHECK.  */
-	  for (yyx = yyn < 0 ? -yyn : 0;
-	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
-	    if (yycheck[yyx + yyn] == yyx)
-	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
-	  yysize += yystrlen ("parse error, unexpected ") + 1;
-	  yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
-	    {
-	      char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
-
-	      if (yycount < 5)
-		{
-		  yycount = 0;
-		  for (yyx = yyn < 0 ? -yyn : 0;
-		       yyx < (int) (sizeof (yytname) / sizeof (char *));
-		       yyx++)
-		    if (yycheck[yyx + yyn] == yyx)
-		      {
-			const char *yyq = ! yycount ? ", expecting " : " or ";
-			yyp = yystpcpy (yyp, yyq);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yycount++;
-		      }
-		}
-	      yyerror (yymsg);
-	      YYSTACK_FREE (yymsg);
-	    }
-	  else
-	    yyerror ("parse error; also virtual memory exhausted");
-	}
-      else
-#endif /* defined (YYERROR_VERBOSE) */
-	yyerror ("parse error");
-    }
-  goto yyerrlab1;
-
-
-/*--------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action |
-`--------------------------------------------------*/
-yyerrlab1:
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-	 error, discard it.  */
-
-      /* return failure if at end of input */
-      if (yychar == YYEOF)
-	YYABORT;
-      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
-		  yychar, yytname[yychar1]));
-      yychar = YYEMPTY;
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-
-  yyerrstatus = 3;		/* Each real token shifted decrements this */
-
-  goto yyerrhandle;
-
-
-/*-------------------------------------------------------------------.
-| yyerrdefault -- current state does not do anything special for the |
-| error token.                                                       |
-`-------------------------------------------------------------------*/
-yyerrdefault:
-#if 0
-  /* This is wrong; only states that explicitly want error tokens
-     should shift them.  */
-
-  /* If its default is to accept any token, ok.  Otherwise pop it.  */
-  yyn = yydefact[yystate];
-  if (yyn)
-    goto yydefault;
-#endif
-
-
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token                                                    |
-`---------------------------------------------------------------*/
-yyerrpop:
-  if (yyssp == yyss)
-    YYABORT;
-  yyvsp--;
-  yystate = *--yyssp;
-#if YYLSP_NEEDED
-  yylsp--;
-#endif
-
-#if YYDEBUG
-  if (yydebug)
-    {
-      short *yyssp1 = yyss - 1;
-      YYFPRINTF (stderr, "Error: state stack now");
-      while (yyssp1 != yyssp)
-	YYFPRINTF (stderr, " %d", *++yyssp1);
-      YYFPRINTF (stderr, "\n");
-    }
-#endif
-
-/*--------------.
-| yyerrhandle.  |
-`--------------*/
-yyerrhandle:
-  yyn = yypact[yystate];
-  if (yyn == YYFLAG)
-    goto yyerrdefault;
-
-  yyn += YYTERROR;
-  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
-    goto yyerrdefault;
-
-  yyn = yytable[yyn];
-  if (yyn < 0)
-    {
-      if (yyn == YYFLAG)
-	goto yyerrpop;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-  else if (yyn == 0)
-    goto yyerrpop;
-
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
-  YYDPRINTF ((stderr, "Shifting error token, "));
-
-  *++yyvsp = yylval;
-#if YYLSP_NEEDED
-  *++yylsp = yylloc;
-#endif
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-/*---------------------------------------------.
-| yyoverflowab -- parser overflow comes here.  |
-`---------------------------------------------*/
-yyoverflowlab:
-  yyerror ("parser stack overflow");
-  yyresult = 2;
-  /* Fall through.  */
-
-yyreturn:
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-  return yyresult;
-}
-#line 618 "./ada-exp.y"
-
-
-/* yylex defined in ada-lex.c: Reads one token, getting characters */
-/* through lexptr.  */
-
-/* Remap normal flex interface names (yylex) as well as gratuitiously */
-/* global symbol names, so we can have multiple flex-generated parsers */
-/* in gdb.  */
-
-/* (See note above on previous definitions for YACC.) */
-
-#define yy_create_buffer ada_yy_create_buffer
-#define yy_delete_buffer ada_yy_delete_buffer
-#define yy_init_buffer ada_yy_init_buffer
-#define yy_load_buffer_state ada_yy_load_buffer_state
-#define yy_switch_to_buffer ada_yy_switch_to_buffer
-#define yyrestart ada_yyrestart
-#define yytext ada_yytext
-#define yywrap ada_yywrap
-
-/* The following kludge was found necessary to prevent conflicts between */
-/* defs.h and non-standard stdlib.h files.  */
-#define qsort __qsort__dummy
-#include "ada-lex.c"
-
-int
-ada_parse ()
-{
-  lexer_init (yyin);		/* (Re-)initialize lexer. */
-  left_block_context = NULL;
-  type_qualifier = NULL;
-  
-  return _ada_parse ();
-}
-
-void
-yyerror (msg)
-     char *msg;
-{
-  error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
-}
-
-/* The operator name corresponding to operator symbol STRING (adds 
-   quotes and maps to lower-case).  Destroys the previous contents of
-   the array pointed to by STRING.ptr.  Error if STRING does not match
-   a valid Ada operator.  Assumes that STRING.ptr points to a
-   null-terminated string and that, if STRING is a valid operator
-   symbol, the array pointed to by STRING.ptr contains at least
-   STRING.length+3 characters. */ 
-
-static struct stoken
-string_to_operator (string)
-     struct stoken string;
-{
-  int i;
-
-  for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
-    {
-      if (string.length == strlen (ada_opname_table[i].demangled)-2
-	  && strncasecmp (string.ptr, ada_opname_table[i].demangled+1,
-			  string.length) == 0)
-	{
-	  strncpy (string.ptr, ada_opname_table[i].demangled,
-		   string.length+2);
-	  string.length += 2;
-	  return string;
-	}
-    }
-  error ("Invalid operator symbol `%s'", string.ptr);
-}
-
-/* Emit expression to access an instance of SYM, in block BLOCK (if
- * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */
-static void
-write_var_from_sym (orig_left_context, block, sym)
-     struct block* orig_left_context;
-     struct block* block;
-     struct symbol* sym;
-{
-  if (orig_left_context == NULL && symbol_read_needs_frame (sym))
-    {
-      if (innermost_block == 0 ||
-	  contained_in (block, innermost_block))
-	innermost_block = block;
-    }
-
-  write_exp_elt_opcode (OP_VAR_VALUE);
-  /* We want to use the selected frame, not another more inner frame
-     which happens to be in the same block */
-  write_exp_elt_block (NULL);
-  write_exp_elt_sym (sym);
-  write_exp_elt_opcode (OP_VAR_VALUE);
-}
-
-/* Emit expression to access an instance of NAME. */
-static void
-write_var_from_name (orig_left_context, name)
-     struct block* orig_left_context;
-     struct name_info name;
-{
-  if (name.msym != NULL)
-    {
-      write_exp_msymbol (name.msym, 
-			 lookup_function_type (builtin_type_int),
-			 builtin_type_int);
-    }
-  else if (name.sym == NULL) 
-    {
-      /* Multiple matches: record name and starting block for later 
-         resolution by ada_resolve. */
-      /*      write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */
-      /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */      
-      write_exp_elt_block (name.block);
-      /*      write_exp_elt_name (name.stoken.ptr); */
-      /* FIXME: write_exp_elt_name should be defined in defs.h, located in parse.c */      
-      /*      write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */
-      /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */      
-    }
-  else
-    write_var_from_sym (orig_left_context, name.block, name.sym);
-}
-
-/* Write a call on parameterless attribute ATR.  */
-
-static void
-write_attribute_call0 (atr)
-     enum ada_attribute atr;
-{
-  /*  write_exp_elt_opcode (OP_ATTRIBUTE); */
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */      
-  write_exp_elt_longcst ((LONGEST) 0);
-  write_exp_elt_longcst ((LONGEST) atr);
-  /*  write_exp_elt_opcode (OP_ATTRIBUTE); */
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */      
-}
-
-/* Write a call on an attribute ATR with one constant integer
- * parameter. */
-
-static void
-write_attribute_call1 (atr, arg)
-     enum ada_attribute atr;
-     LONGEST arg;
-{
-  write_exp_elt_opcode (OP_LONG);
-  write_exp_elt_type (builtin_type_int);
-  write_exp_elt_longcst (arg);
-  write_exp_elt_opcode (OP_LONG);
-  /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
-  write_exp_elt_longcst ((LONGEST) 1);
-  write_exp_elt_longcst ((LONGEST) atr);
-  /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */        
-}  
-
-/* Write a call on an attribute ATR with N parameters, whose code must have
- * been generated previously. */
-
-static void
-write_attribute_calln (atr, n)
-     enum ada_attribute atr;
-     int n;
-{
-  /*write_exp_elt_opcode (OP_ATTRIBUTE);*/
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */      
-  write_exp_elt_longcst ((LONGEST) n);
-  write_exp_elt_longcst ((LONGEST) atr);
-  /*  write_exp_elt_opcode (OP_ATTRIBUTE);*/
-  /* FIXME: OP_ATTRIBUTE should be defined in expression.h */        
-}  
-
-/* Emit expression corresponding to the renamed object designated by 
- * the type RENAMING, which must be the referent of an object renaming
- * type, in the context of ORIG_LEFT_CONTEXT (?). */
-static void
-write_object_renaming (orig_left_context, renaming)
-     struct block* orig_left_context;
-     struct symbol* renaming;
-{
-  const char* qualification = SYMBOL_NAME (renaming);
-  const char* simple_tail;
-  const char* expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0);
-  const char* suffix;
-  char* name;
-  struct symbol* sym;
-  enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
-
-  /* if orig_left_context is null, then use the currently selected
-     block, otherwise we might fail our symbol lookup below */
-  if (orig_left_context == NULL)
-    orig_left_context = get_selected_block (NULL);
-
-  for (simple_tail = qualification + strlen (qualification); 
-       simple_tail != qualification; simple_tail -= 1)
-    {
-      if (*simple_tail == '.')
-	{
-	  simple_tail += 1;
-	  break;
-	} 
-      else if (STREQN (simple_tail, "__", 2))
-	{
-	  simple_tail += 2;
-	  break;
-	}
-    }
-
-  suffix = strstr (expr, "___XE");
-  if (suffix == NULL)
-    goto BadEncoding;
-
-  name = (char*) xmalloc (suffix - expr + 1);
-  /*  add_name_string_cleanup (name); */
-  /* FIXME: add_name_string_cleanup should be defined in
-     parser-defs.h, implemented in parse.c */    
-  strncpy (name, expr, suffix-expr);
-  name[suffix-expr] = '\000';
-  sym = lookup_symbol (name, orig_left_context, VAR_NAMESPACE, 0, NULL);
-  /*  if (sym == NULL) 
-    error ("Could not find renamed variable: %s", ada_demangle (name));
-  */
-  /* FIXME: ada_demangle should be defined in defs.h, implemented in ada-lang.c */  
-  write_var_from_sym (orig_left_context, block_found, sym);
-
-  suffix += 5;
-  slice_state = SIMPLE_INDEX;
-  while (*suffix == 'X') 
-    {
-      suffix += 1;
-
-      switch (*suffix) {
-      case 'L':
-	slice_state = LOWER_BOUND;
-      case 'S':
-	suffix += 1;
-	if (isdigit (*suffix)) 
-	  {
-	    char* next;
-	    long val = strtol (suffix, &next, 10);
-	    if (next == suffix) 
-	      goto BadEncoding;
-	    suffix = next;
-	    write_exp_elt_opcode (OP_LONG);
-	    write_exp_elt_type (builtin_type_ada_int);
-	    write_exp_elt_longcst ((LONGEST) val);
-	    write_exp_elt_opcode (OP_LONG);
-	  } 
-	else
-	  {
-	    const char* end;
-	    char* index_name;
-	    int index_len;
-	    struct symbol* index_sym;
-
-	    end = strchr (suffix, 'X');
-	    if (end == NULL) 
-	      end = suffix + strlen (suffix);
-	    
-	    index_len = simple_tail - qualification + 2 + (suffix - end) + 1;
-	    index_name = (char*) xmalloc (index_len);
-	    memset (index_name, '\000', index_len);
-	    /*	    add_name_string_cleanup (index_name);*/
-	    /* FIXME: add_name_string_cleanup should be defined in
-	       parser-defs.h, implemented in parse.c */    	    
-	    strncpy (index_name, qualification, simple_tail - qualification);
-	    index_name[simple_tail - qualification] = '\000';
-	    strncat (index_name, suffix, suffix-end);
-	    suffix = end;
-
-	    index_sym = 
-	      lookup_symbol (index_name, NULL, VAR_NAMESPACE, 0, NULL);
-	    if (index_sym == NULL)
-	      error ("Could not find %s", index_name);
-	    write_var_from_sym (NULL, block_found, sym);
-	  }
-	if (slice_state == SIMPLE_INDEX)
-	  { 
-	    write_exp_elt_opcode (OP_FUNCALL);
-	    write_exp_elt_longcst ((LONGEST) 1);
-	    write_exp_elt_opcode (OP_FUNCALL);
-	  }
-	else if (slice_state == LOWER_BOUND)
-	  slice_state = UPPER_BOUND;
-	else if (slice_state == UPPER_BOUND)
-	  {
-	    write_exp_elt_opcode (TERNOP_SLICE);
-	    slice_state = SIMPLE_INDEX;
-	  }
-	break;
-
-      case 'R':
-	{
-	  struct stoken field_name;
-	  const char* end;
-	  suffix += 1;
-	  
-	  if (slice_state != SIMPLE_INDEX)
-	    goto BadEncoding;
-	  end = strchr (suffix, 'X');
-	  if (end == NULL) 
-	    end = suffix + strlen (suffix);
-	  field_name.length = end - suffix;
-	  field_name.ptr = (char*) xmalloc (end - suffix + 1);
-	  strncpy (field_name.ptr, suffix, end - suffix);
-	  field_name.ptr[end - suffix] = '\000';
-	  suffix = end;
-	  write_exp_elt_opcode (STRUCTOP_STRUCT);
-	  write_exp_string (field_name);
-	  write_exp_elt_opcode (STRUCTOP_STRUCT); 	  
-	  break;
-	}
-	  
-      default:
-	goto BadEncoding;
-      }
-    }
-  if (slice_state == SIMPLE_INDEX)
-    return;
-
- BadEncoding:
-  error ("Internal error in encoding of renaming declaration: %s",
-	 SYMBOL_NAME (renaming));
-}
-
-/* Convert the character literal whose ASCII value would be VAL to the
-   appropriate value of type TYPE, if there is a translation.
-   Otherwise return VAL.  Hence, in an enumeration type ('A', 'B'), 
-   the literal 'A' (VAL == 65), returns 0. */
-static LONGEST
-convert_char_literal (struct type* type, LONGEST val)
-{
-  char name[7];
-  int f;
-
-  if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM)
-    return val;
-  sprintf (name, "QU%02x", (int) val);
-  for (f = 0; f < TYPE_NFIELDS (type); f += 1) 
-    {
-      if (STREQ (name, TYPE_FIELD_NAME (type, f)))
-	return TYPE_FIELD_BITPOS (type, f);
-    }
-  return val;
-}
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 7d46dd2..67185a3 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -92,9 +92,11 @@
 #define yytoks	ada_toks		/* With YYDEBUG defined */
 
 #ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
+#define	YYDEBUG	1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 struct name_info {
   struct symbol* sym;
   struct minimal_symbol* msym;
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index db1d7d4..c58d463 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -18,7 +18,7 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <stdio.h>
-#include <string.h>
+#include "gdb_string.h"
 #include <ctype.h>
 #include <stdarg.h>
 #include "demangle.h"
@@ -40,153 +40,165 @@
 #include "ui-out.h"
 #endif
 
-struct cleanup* unresolved_names;
+struct cleanup *unresolved_names;
 
 void extract_string (CORE_ADDR addr, char *buf);
 
-static struct type * ada_create_fundamental_type (struct objfile *, int);
+static struct type *ada_create_fundamental_type (struct objfile *, int);
 
 static void modify_general_field (char *, LONGEST, int, int);
 
-static struct type* desc_base_type (struct type*);
+static struct type *desc_base_type (struct type *);
 
-static struct type* desc_bounds_type (struct type*);
+static struct type *desc_bounds_type (struct type *);
 
-static struct value* desc_bounds (struct value*);
+static struct value *desc_bounds (struct value *);
 
-static int fat_pntr_bounds_bitpos (struct type*);
+static int fat_pntr_bounds_bitpos (struct type *);
 
-static int fat_pntr_bounds_bitsize (struct type*);
+static int fat_pntr_bounds_bitsize (struct type *);
 
-static struct type* desc_data_type (struct type*);
+static struct type *desc_data_type (struct type *);
 
-static struct value* desc_data (struct value*);
+static struct value *desc_data (struct value *);
 
-static int fat_pntr_data_bitpos (struct type*);
+static int fat_pntr_data_bitpos (struct type *);
 
-static int fat_pntr_data_bitsize (struct type*);
+static int fat_pntr_data_bitsize (struct type *);
 
-static struct value* desc_one_bound (struct value*, int, int);
+static struct value *desc_one_bound (struct value *, int, int);
 
-static int desc_bound_bitpos (struct type*, int, int);
+static int desc_bound_bitpos (struct type *, int, int);
 
-static int desc_bound_bitsize (struct type*, int, int);
+static int desc_bound_bitsize (struct type *, int, int);
 
-static struct type*  desc_index_type (struct type*, int);
+static struct type *desc_index_type (struct type *, int);
 
-static int desc_arity (struct type*);
+static int desc_arity (struct type *);
 
-static int ada_type_match (struct type*, struct type*, int);
+static int ada_type_match (struct type *, struct type *, int);
 
-static int ada_args_match (struct symbol*, struct value**, int);
+static int ada_args_match (struct symbol *, struct value **, int);
 
-static struct value* place_on_stack (struct value*, CORE_ADDR*);
+static struct value *place_on_stack (struct value *, CORE_ADDR *);
 
-static struct value* convert_actual (struct value*, struct type*, CORE_ADDR*);
+static struct value *convert_actual (struct value *, struct type *,
+				     CORE_ADDR *);
 
-static struct value* make_array_descriptor (struct type*, struct value*, CORE_ADDR*);
+static struct value *make_array_descriptor (struct type *, struct value *,
+					    CORE_ADDR *);
 
-static void ada_add_block_symbols (struct block*, const char*,
-				   namespace_enum, struct objfile*, int);
+static void ada_add_block_symbols (struct block *, const char *,
+				   namespace_enum, struct objfile *, int);
 
-static void fill_in_ada_prototype (struct symbol*);
+static void fill_in_ada_prototype (struct symbol *);
 
-static int is_nonfunction (struct symbol**, int);
+static int is_nonfunction (struct symbol **, int);
 
-static void add_defn_to_vec (struct symbol*, struct block*);
+static void add_defn_to_vec (struct symbol *, struct block *);
 
-static struct partial_symbol* 
-ada_lookup_partial_symbol (struct partial_symtab*, const char*, 
-			   int, namespace_enum, int);
+static struct partial_symbol *ada_lookup_partial_symbol (struct partial_symtab
+							 *, const char *, int,
+							 namespace_enum, int);
 
-static struct symtab* symtab_for_sym (struct symbol*);
+static struct symtab *symtab_for_sym (struct symbol *);
 
-static struct value* ada_resolve_subexp (struct expression**, int*, int, struct type*);
+static struct value *ada_resolve_subexp (struct expression **, int *, int,
+					 struct type *);
 
-static void replace_operator_with_call (struct expression**, int, int, int,
-					struct symbol*, struct block*);
+static void replace_operator_with_call (struct expression **, int, int, int,
+					struct symbol *, struct block *);
 
-static int possible_user_operator_p (enum exp_opcode, struct value**);
+static int possible_user_operator_p (enum exp_opcode, struct value **);
 
-static const char* ada_op_name (enum exp_opcode);
+static const char *ada_op_name (enum exp_opcode);
 
-static int numeric_type_p (struct type*);
+static int numeric_type_p (struct type *);
 
-static int integer_type_p (struct type*);
+static int integer_type_p (struct type *);
 
-static int scalar_type_p (struct type*);
+static int scalar_type_p (struct type *);
 
-static int discrete_type_p (struct type*);
+static int discrete_type_p (struct type *);
 
-static char* extended_canonical_line_spec (struct symtab_and_line, const char*);
+static char *extended_canonical_line_spec (struct symtab_and_line,
+					   const char *);
 
-static struct value* evaluate_subexp (struct type*, struct expression*, int*, enum noside);
+static struct value *evaluate_subexp (struct type *, struct expression *,
+				      int *, enum noside);
 
-static struct value* evaluate_subexp_type (struct expression*, int*);
+static struct value *evaluate_subexp_type (struct expression *, int *);
 
-static struct type * ada_create_fundamental_type (struct objfile*, int);
+static struct type *ada_create_fundamental_type (struct objfile *, int);
 
-static int  is_dynamic_field (struct type *, int);
+static int is_dynamic_field (struct type *, int);
 
-static struct type*
-to_fixed_variant_branch_type (struct type*, char*, CORE_ADDR, struct value*);
+static struct type *to_fixed_variant_branch_type (struct type *, char *,
+						  CORE_ADDR, struct value *);
 
-static struct type* to_fixed_range_type (char*, struct value*, struct objfile*);
+static struct type *to_fixed_range_type (char *, struct value *,
+					 struct objfile *);
 
-static struct type* to_static_fixed_type (struct type*);
+static struct type *to_static_fixed_type (struct type *);
 
-static struct value* unwrap_value (struct value*);
+static struct value *unwrap_value (struct value *);
 
-static struct type* packed_array_type (struct type*, long*);
+static struct type *packed_array_type (struct type *, long *);
 
-static struct type* decode_packed_array_type (struct type*);
+static struct type *decode_packed_array_type (struct type *);
 
-static struct value* decode_packed_array (struct value*);
+static struct value *decode_packed_array (struct value *);
 
-static struct value* value_subscript_packed (struct value*, int, struct value**);
+static struct value *value_subscript_packed (struct value *, int,
+					     struct value **);
 
-static struct value* coerce_unspec_val_to_type (struct value*, long, struct type*);
+static struct value *coerce_unspec_val_to_type (struct value *, long,
+						struct type *);
 
-static struct value* get_var_value (char*, char*);
+static struct value *get_var_value (char *, char *);
 
-static int lesseq_defined_than (struct symbol*, struct symbol*);
+static int lesseq_defined_than (struct symbol *, struct symbol *);
 
-static int equiv_types (struct type*, struct type*);
+static int equiv_types (struct type *, struct type *);
 
-static int is_name_suffix (const char*);
+static int is_name_suffix (const char *);
 
-static int wild_match (const char*, int, const char*);
+static int wild_match (const char *, int, const char *);
 
-static struct symtabs_and_lines find_sal_from_funcs_and_line (const char*, int, struct symbol**, int);
+static struct symtabs_and_lines find_sal_from_funcs_and_line (const char *,
+							      int,
+							      struct symbol
+							      **, int);
 
-static int
-find_line_in_linetable (struct linetable*, int, struct symbol**, int, int*);
+static int find_line_in_linetable (struct linetable *, int, struct symbol **,
+				   int, int *);
 
-static int find_next_line_in_linetable (struct linetable*, int, int, int);
+static int find_next_line_in_linetable (struct linetable *, int, int, int);
 
-static struct symtabs_and_lines all_sals_for_line (const char*, int, char***);
+static struct symtabs_and_lines all_sals_for_line (const char *, int,
+						   char ***);
 
-static void read_all_symtabs (const char*);
+static void read_all_symtabs (const char *);
 
-static int is_plausible_func_for_line (struct symbol*, int);
+static int is_plausible_func_for_line (struct symbol *, int);
 
-static struct value*  ada_coerce_ref (struct value*);
+static struct value *ada_coerce_ref (struct value *);
 
-static struct value* value_pos_atr (struct value*);
+static struct value *value_pos_atr (struct value *);
 
-static struct value* value_val_atr (struct type*, struct value*);
+static struct value *value_val_atr (struct type *, struct value *);
 
-static struct symbol* standard_lookup (const char*, namespace_enum);
+static struct symbol *standard_lookup (const char *, namespace_enum);
 
 extern void markTimeStart (int index);
 extern void markTimeStop (int index);
-
 
 
+
 /* Maximum-sized dynamic type. */
 static unsigned int varsize_limit;
 
-static const char* ada_completer_word_break_characters =
+static const char *ada_completer_word_break_characters =
   " \t\n!@#$%^&*()+=|~`}{[]\";:?/,-";
 
 /* The name of the symbol to use to get the name of the main subprogram */
@@ -202,18 +214,17 @@
 void
 extract_string (CORE_ADDR addr, char *buf)
 {
-   int char_index = 0;
+  int char_index = 0;
 
-   /* Loop, reading one byte at a time, until we reach the '\000' 
-      end-of-string marker */
-   do
-   {
-     target_read_memory (addr + char_index * sizeof (char), 
-                         buf + char_index * sizeof (char), 
-                         sizeof (char));
-     char_index++;
-   }
-   while (buf[char_index - 1] != '\000');
+  /* Loop, reading one byte at a time, until we reach the '\000' 
+     end-of-string marker */
+  do
+    {
+      target_read_memory (addr + char_index * sizeof (char),
+			  buf + char_index * sizeof (char), sizeof (char));
+      char_index++;
+    }
+  while (buf[char_index - 1] != '\000');
 }
 
 /* Assuming *OLD_VECT points to an array of *SIZE objects of size
@@ -221,48 +232,42 @@
    updating *OLD_VECT and *SIZE as necessary. */
 
 void
-grow_vect (old_vect, size, min_size, element_size)
-     void** old_vect;
-     size_t* size;
-     size_t min_size;
-     int element_size;
+grow_vect (void **old_vect, size_t * size, size_t min_size, int element_size)
 {
-  if (*size < min_size) {
-    *size *= 2;
-    if (*size < min_size)
-      *size = min_size;
-    *old_vect = xrealloc (*old_vect, *size * element_size);
-  }
+  if (*size < min_size)
+    {
+      *size *= 2;
+      if (*size < min_size)
+	*size = min_size;
+      *old_vect = xrealloc (*old_vect, *size * element_size);
+    }
 }
 
 /* True (non-zero) iff TARGET matches FIELD_NAME up to any trailing
    suffix of FIELD_NAME beginning "___" */
 
 static int
-field_name_match (field_name, target)
-     const char *field_name;
-     const char *target;
+field_name_match (const char *field_name, const char *target)
 {
   int len = strlen (target);
-  return 
-    STREQN (field_name, target, len) 
-    && (field_name[len] == '\0' 
+  return
+    STREQN (field_name, target, len)
+    && (field_name[len] == '\0'
 	|| (STREQN (field_name + len, "___", 3)
-	   && ! STREQ (field_name + strlen (field_name) - 6, "___XVN")));
+	    && !STREQ (field_name + strlen (field_name) - 6, "___XVN")));
 }
 
 
 /* The length of the prefix of NAME prior to any "___" suffix. */
 
 int
-ada_name_prefix_len (name)
-     const char* name;
+ada_name_prefix_len (const char *name)
 {
   if (name == NULL)
     return 0;
-  else 
+  else
     {
-      const char* p = strstr (name, "___");
+      const char *p = strstr (name, "___");
       if (p == NULL)
 	return strlen (name);
       else
@@ -272,7 +277,7 @@
 
 /* SUFFIX is a suffix of STR. False if STR is null. */
 static int
-is_suffix (const char* str, const char* suffix)
+is_suffix (const char *str, const char *suffix)
 {
   int len1, len2;
   if (str == NULL)
@@ -285,14 +290,12 @@
 /* Create a value of type TYPE whose contents come from VALADDR, if it
  * is non-null, and whose memory address (in the inferior) is
  * ADDRESS. */
-struct value*
-value_from_contents_and_address (type, valaddr, address)
-     struct type* type;
-     char* valaddr;
-     CORE_ADDR address;
+struct value *
+value_from_contents_and_address (struct type *type, char *valaddr,
+				 CORE_ADDR address)
 {
-  struct value* v = allocate_value (type);
-  if (valaddr == NULL) 
+  struct value *v = allocate_value (type);
+  if (valaddr == NULL)
     VALUE_LAZY (v) = 1;
   else
     memcpy (VALUE_CONTENTS_RAW (v), valaddr, TYPE_LENGTH (type));
@@ -305,27 +308,25 @@
 /* The contents of value VAL, beginning at offset OFFSET, treated as a
    value of type TYPE.  The result is an lval in memory if VAL is. */
 
-static struct value*
-coerce_unspec_val_to_type (val, offset, type)
-     struct value* val;
-     long offset;
-     struct type *type;
+static struct value *
+coerce_unspec_val_to_type (struct value *val, long offset, struct type *type)
 {
   CHECK_TYPEDEF (type);
   if (VALUE_LVAL (val) == lval_memory)
     return value_at_lazy (type,
-      VALUE_ADDRESS (val) + VALUE_OFFSET (val) + offset, NULL);
-  else 
+			  VALUE_ADDRESS (val) + VALUE_OFFSET (val) + offset,
+			  NULL);
+  else
     {
-      struct value* result = allocate_value (type);
+      struct value *result = allocate_value (type);
       VALUE_LVAL (result) = not_lval;
-      if (VALUE_ADDRESS (val) == 0) 
+      if (VALUE_ADDRESS (val) == 0)
 	memcpy (VALUE_CONTENTS_RAW (result), VALUE_CONTENTS (val) + offset,
-		TYPE_LENGTH (type) > TYPE_LENGTH (VALUE_TYPE (val)) 
+		TYPE_LENGTH (type) > TYPE_LENGTH (VALUE_TYPE (val))
 		? TYPE_LENGTH (VALUE_TYPE (val)) : TYPE_LENGTH (type));
-      else 
+      else
 	{
-	  VALUE_ADDRESS (result) = 
+	  VALUE_ADDRESS (result) =
 	    VALUE_ADDRESS (val) + VALUE_OFFSET (val) + offset;
 	  VALUE_LAZY (result) = 1;
 	}
@@ -333,10 +334,8 @@
     }
 }
 
-static char*
-cond_offset_host (valaddr, offset)
-     char* valaddr;
-     long offset;
+static char *
+cond_offset_host (char *valaddr, long offset)
 {
   if (valaddr == NULL)
     return NULL;
@@ -345,35 +344,33 @@
 }
 
 static CORE_ADDR
-cond_offset_target (address, offset)
-     CORE_ADDR address;
-     long offset;
+cond_offset_target (CORE_ADDR address, long offset)
 {
   if (address == 0)
     return 0;
-  else 
+  else
     return address + offset;
 }
 
 /* Perform execute_command on the result of concatenating all
    arguments up to NULL. */
 static void
-do_command (const char* arg, ...)
+do_command (const char *arg, ...)
 {
   int len;
-  char* cmd;
-  const char* s;
+  char *cmd;
+  const char *s;
   va_list ap;
 
   va_start (ap, arg);
   len = 0;
   s = arg;
   cmd = "";
-  for (; s != NULL; s = va_arg (ap, const char*)) 
+  for (; s != NULL; s = va_arg (ap, const char *))
     {
-      char* cmd1;
+      char *cmd1;
       len += strlen (s);
-      cmd1 = alloca (len+1);
+      cmd1 = alloca (len + 1);
       strcpy (cmd1, cmd);
       strcat (cmd1, s);
       cmd = cmd1;
@@ -381,65 +378,62 @@
   va_end (ap);
   execute_command (cmd, 0);
 }
-
 
+
 				/* Language Selection */
 
 /* If the main program is in Ada, return language_ada, otherwise return LANG
    (the main program is in Ada iif the adainit symbol is found).
 
    MAIN_PST is not used. */
-   
+
 enum language
-ada_update_initial_language (lang, main_pst)
-     enum language lang;
-     struct partial_symtab* main_pst;
+ada_update_initial_language (enum language lang,
+			     struct partial_symtab *main_pst)
 {
-  if (lookup_minimal_symbol ("adainit", (const char*) NULL,
-			     (struct objfile*) NULL) != NULL)
+  if (lookup_minimal_symbol ("adainit", (const char *) NULL,
+			     (struct objfile *) NULL) != NULL)
     /*    return language_ada; */
     /* FIXME: language_ada should be defined in defs.h */
     return language_unknown;
 
   return lang;
 }
-      
 
+
 				/* Symbols */
 
 /* Table of Ada operators and their GNAT-mangled names.  Last entry is pair 
    of NULLs. */
 
-const struct ada_opname_map ada_opname_table[] =
-{
-  { "Oadd", "\"+\"", BINOP_ADD },
-  { "Osubtract", "\"-\"", BINOP_SUB },
-  { "Omultiply", "\"*\"", BINOP_MUL },
-  { "Odivide", "\"/\"", BINOP_DIV },
-  { "Omod", "\"mod\"", BINOP_MOD },
-  { "Orem", "\"rem\"", BINOP_REM },
-  { "Oexpon", "\"**\"", BINOP_EXP },
-  { "Olt", "\"<\"", BINOP_LESS },
-  { "Ole", "\"<=\"", BINOP_LEQ },
-  { "Ogt", "\">\"", BINOP_GTR },
-  { "Oge", "\">=\"", BINOP_GEQ },
-  { "Oeq", "\"=\"", BINOP_EQUAL },
-  { "One", "\"/=\"", BINOP_NOTEQUAL },
-  { "Oand", "\"and\"", BINOP_BITWISE_AND },
-  { "Oor", "\"or\"", BINOP_BITWISE_IOR },
-  { "Oxor", "\"xor\"", BINOP_BITWISE_XOR },
-  { "Oconcat", "\"&\"", BINOP_CONCAT },
-  { "Oabs", "\"abs\"", UNOP_ABS },
-  { "Onot", "\"not\"", UNOP_LOGICAL_NOT },
-  { "Oadd", "\"+\"", UNOP_PLUS },
-  { "Osubtract", "\"-\"", UNOP_NEG },
-  { NULL, NULL }
+const struct ada_opname_map ada_opname_table[] = {
+  {"Oadd", "\"+\"", BINOP_ADD},
+  {"Osubtract", "\"-\"", BINOP_SUB},
+  {"Omultiply", "\"*\"", BINOP_MUL},
+  {"Odivide", "\"/\"", BINOP_DIV},
+  {"Omod", "\"mod\"", BINOP_MOD},
+  {"Orem", "\"rem\"", BINOP_REM},
+  {"Oexpon", "\"**\"", BINOP_EXP},
+  {"Olt", "\"<\"", BINOP_LESS},
+  {"Ole", "\"<=\"", BINOP_LEQ},
+  {"Ogt", "\">\"", BINOP_GTR},
+  {"Oge", "\">=\"", BINOP_GEQ},
+  {"Oeq", "\"=\"", BINOP_EQUAL},
+  {"One", "\"/=\"", BINOP_NOTEQUAL},
+  {"Oand", "\"and\"", BINOP_BITWISE_AND},
+  {"Oor", "\"or\"", BINOP_BITWISE_IOR},
+  {"Oxor", "\"xor\"", BINOP_BITWISE_XOR},
+  {"Oconcat", "\"&\"", BINOP_CONCAT},
+  {"Oabs", "\"abs\"", UNOP_ABS},
+  {"Onot", "\"not\"", UNOP_LOGICAL_NOT},
+  {"Oadd", "\"+\"", UNOP_PLUS},
+  {"Osubtract", "\"-\"", UNOP_NEG},
+  {NULL, NULL}
 };
 
 /* True if STR should be suppressed in info listings. */
 static int
-is_suppressed_name (str) 
-     const char* str;
+is_suppressed_name (const char *str)
 {
   if (STREQN (str, "_ada_", 5))
     str += 5;
@@ -447,13 +441,13 @@
     return 1;
   else
     {
-      const char* p;
-      const char* suffix = strstr (str, "___");
+      const char *p;
+      const char *suffix = strstr (str, "___");
       if (suffix != NULL && suffix[3] != 'X')
 	return 1;
       if (suffix == NULL)
 	suffix = str + strlen (str);
-      for (p = suffix-1; p != str; p -= 1)
+      for (p = suffix - 1; p != str; p -= 1)
 	if (isupper (*p))
 	  {
 	    int i;
@@ -462,11 +456,11 @@
 	    if (*p != 'O')
 	      return 1;
 	    for (i = 0; ada_opname_table[i].mangled != NULL; i += 1)
-	      if (STREQN (ada_opname_table[i].mangled, p, 
+	      if (STREQN (ada_opname_table[i].mangled, p,
 			  strlen (ada_opname_table[i].mangled)))
 		goto OK;
 	    return 1;
-	  OK: ;
+	  OK:;
 	  }
       return 0;
     }
@@ -475,43 +469,43 @@
 /* The "mangled" form of DEMANGLED, according to GNAT conventions.
  * The result is valid until the next call to ada_mangle. */
 char *
-ada_mangle (demangled)
-     const char* demangled;
+ada_mangle (const char *demangled)
 {
-  static char* mangling_buffer = NULL;
+  static char *mangling_buffer = NULL;
   static size_t mangling_buffer_size = 0;
-  const char* p;
+  const char *p;
   int k;
-  
+
   if (demangled == NULL)
     return NULL;
 
-  GROW_VECT (mangling_buffer, mangling_buffer_size, 2*strlen (demangled) + 10);
+  GROW_VECT (mangling_buffer, mangling_buffer_size,
+	     2 * strlen (demangled) + 10);
 
   k = 0;
   for (p = demangled; *p != '\0'; p += 1)
     {
-      if (*p == '.') 
+      if (*p == '.')
 	{
-	  mangling_buffer[k] = mangling_buffer[k+1] = '_';
+	  mangling_buffer[k] = mangling_buffer[k + 1] = '_';
 	  k += 2;
 	}
       else if (*p == '"')
 	{
-	  const struct ada_opname_map* mapping;
+	  const struct ada_opname_map *mapping;
 
 	  for (mapping = ada_opname_table;
-	       mapping->mangled != NULL && 
-	       ! STREQN (mapping->demangled, p, strlen (mapping->demangled));
+	       mapping->mangled != NULL &&
+	       !STREQN (mapping->demangled, p, strlen (mapping->demangled));
 	       p += 1)
 	    ;
 	  if (mapping->mangled == NULL)
 	    error ("invalid Ada operator name: %s", p);
-	  strcpy (mangling_buffer+k, mapping->mangled);
+	  strcpy (mangling_buffer + k, mapping->mangled);
 	  k += strlen (mapping->mangled);
 	  break;
 	}
-      else 
+      else
 	{
 	  mangling_buffer[k] = *p;
 	  k += 1;
@@ -525,19 +519,19 @@
 /* Return NAME folded to lower case, or, if surrounded by single
  * quotes, unfolded, but with the quotes stripped away.  Result good
  * to next call. */
-char*
-ada_fold_name (const char* name)
+char *
+ada_fold_name (const char *name)
 {
-  static char* fold_buffer = NULL;
+  static char *fold_buffer = NULL;
   static size_t fold_buffer_size = 0;
 
   int len = strlen (name);
-  GROW_VECT (fold_buffer, fold_buffer_size, len+1);
+  GROW_VECT (fold_buffer, fold_buffer_size, len + 1);
 
   if (name[0] == '\'')
     {
-      strncpy (fold_buffer, name+1, len-2);
-      fold_buffer[len-2] = '\000';
+      strncpy (fold_buffer, name + 1, len - 2);
+      fold_buffer[len - 2] = '\000';
     }
   else
     {
@@ -563,17 +557,16 @@
   */
 
 char *
-ada_demangle (mangled)
-     const char* mangled;
+ada_demangle (const char *mangled)
 {
   int i, j;
   int len0;
-  const char* p;
-  char* demangled;
+  const char *p;
+  char *demangled;
   int at_start_name;
-  static char* demangling_buffer = NULL;
+  static char *demangling_buffer = NULL;
   static size_t demangling_buffer_size = 0;
-  
+
   if (STREQN (mangled, "_ada_", 5))
     mangled += 5;
 
@@ -583,7 +576,7 @@
   p = strstr (mangled, "___");
   if (p == NULL)
     len0 = strlen (mangled);
-  else 
+  else
     {
       if (p[3] == 'X')
 	len0 = p - mangled;
@@ -596,19 +589,20 @@
     len0 -= 1;
 
   /* Make demangled big enough for possible expansion by operator name. */
-  GROW_VECT (demangling_buffer, demangling_buffer_size, 2*len0+1);
+  GROW_VECT (demangling_buffer, demangling_buffer_size, 2 * len0 + 1);
   demangled = demangling_buffer;
 
-  if (isdigit (mangled[len0 - 1])) {
-    for (i = len0-2; i >= 0 && isdigit (mangled[i]); i -= 1)
-      ;
-    if (i > 1 && mangled[i] == '_' && mangled[i-1] == '_')
-      len0 = i - 1;
-    else if (mangled[i] == '$')
-      len0 = i;
-  }
+  if (isdigit (mangled[len0 - 1]))
+    {
+      for (i = len0 - 2; i >= 0 && isdigit (mangled[i]); i -= 1)
+	;
+      if (i > 1 && mangled[i] == '_' && mangled[i - 1] == '_')
+	len0 = i - 1;
+      else if (mangled[i] == '$')
+	len0 = i;
+    }
 
-  for (i = 0, j = 0; i < len0 && ! isalpha (mangled[i]); i += 1, j += 1)
+  for (i = 0, j = 0; i < len0 && !isalpha (mangled[i]); i += 1, j += 1)
     demangled[j] = mangled[i];
 
   at_start_name = 1;
@@ -619,9 +613,10 @@
 	  int k;
 	  for (k = 0; ada_opname_table[k].mangled != NULL; k += 1)
 	    {
-	      int op_len = strlen (ada_opname_table[k].mangled); 
-	      if (STREQN (ada_opname_table[k].mangled+1, mangled+i+1, op_len-1)
-		  && ! isalnum (mangled[i + op_len]))
+	      int op_len = strlen (ada_opname_table[k].mangled);
+	      if (STREQN
+		  (ada_opname_table[k].mangled + 1, mangled + i + 1,
+		   op_len - 1) && !isalnum (mangled[i + op_len]))
 		{
 		  strcpy (demangled + j, ada_opname_table[k].demangled);
 		  at_start_name = 0;
@@ -635,9 +630,9 @@
 	}
       at_start_name = 0;
 
-      if (i < len0-4 && STREQN (mangled+i, "TK__", 4))
+      if (i < len0 - 4 && STREQN (mangled + i, "TK__", 4))
 	i += 2;
-      if (mangled[i] == 'X' && i != 0 && isalnum (mangled[i-1]))
+      if (mangled[i] == 'X' && i != 0 && isalnum (mangled[i - 1]))
 	{
 	  do
 	    i += 1;
@@ -645,16 +640,18 @@
 	  if (i < len0)
 	    goto Suppress;
 	}
-      else if (i < len0-2 && mangled[i] == '_' && mangled[i+1] == '_') 
+      else if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_')
 	{
 	  demangled[j] = '.';
 	  at_start_name = 1;
-	  i += 2; j += 1;
+	  i += 2;
+	  j += 1;
 	}
       else
 	{
 	  demangled[j] = mangled[i];
-	  i += 1;  j += 1;
+	  i += 1;
+	  j += 1;
 	}
     }
   demangled[j] = '\000';
@@ -666,8 +663,7 @@
   return demangled;
 
 Suppress:
-  GROW_VECT (demangling_buffer, demangling_buffer_size, 
-	     strlen (mangled) + 3);  
+  GROW_VECT (demangling_buffer, demangling_buffer_size, strlen (mangled) + 3);
   demangled = demangling_buffer;
   if (mangled[0] == '<')
     strcpy (demangled, mangled);
@@ -685,46 +681,43 @@
  * either argument is NULL. */
 
 int
-ada_match_name (sym_name, name, wild)
-     const char* sym_name;
-     const char* name;
-     int wild;
+ada_match_name (const char *sym_name, const char *name, int wild)
 {
   if (sym_name == NULL || name == NULL)
     return 0;
   else if (wild)
     return wild_match (name, strlen (name), sym_name);
-  else {
-    int len_name = strlen (name);
-    return (STREQN (sym_name, name, len_name) 
-	    && is_name_suffix (sym_name+len_name))
-      ||   (STREQN (sym_name, "_ada_", 5) 
-	    && STREQN (sym_name+5, name, len_name)
-	    && is_name_suffix (sym_name+len_name+5));
-  }
+  else
+    {
+      int len_name = strlen (name);
+      return (STREQN (sym_name, name, len_name)
+	      && is_name_suffix (sym_name + len_name))
+	|| (STREQN (sym_name, "_ada_", 5)
+	    && STREQN (sym_name + 5, name, len_name)
+	    && is_name_suffix (sym_name + len_name + 5));
+    }
 }
 
 /* True (non-zero) iff in Ada mode, the symbol SYM should be
    suppressed in info listings. */
 
 int
-ada_suppress_symbol_printing (sym)
-     struct symbol *sym;
+ada_suppress_symbol_printing (struct symbol *sym)
 {
   if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE)
     return 1;
-  else 
+  else
     return is_suppressed_name (SYMBOL_NAME (sym));
 }
-
 
+
 				/* Arrays */
 
 /* Names of MAX_ADA_DIMENS bounds in P_BOUNDS fields of 
    array descriptors.  */
 
-static char* bound_name[] = {
-  "LB0", "UB0", "LB1", "UB1", "LB2", "UB2", "LB3", "UB3", 
+static char *bound_name[] = {
+  "LB0", "UB0", "LB1", "UB1", "LB2", "UB2", "LB3", "UB3",
   "LB4", "UB4", "LB5", "UB5", "LB6", "UB6", "LB7", "UB7"
 };
 
@@ -735,14 +728,10 @@
 /* Like modify_field, but allows bitpos > wordlength. */
 
 static void
-modify_general_field (addr, fieldval, bitpos, bitsize)
-     char *addr;
-     LONGEST fieldval;
-     int bitpos, bitsize;
+modify_general_field (char *addr, LONGEST fieldval, int bitpos, int bitsize)
 {
-  modify_field (addr + sizeof (LONGEST) * bitpos / (8 * sizeof (LONGEST)), 
-		fieldval, bitpos % (8 * sizeof (LONGEST)), 
-		bitsize);
+  modify_field (addr + sizeof (LONGEST) * bitpos / (8 * sizeof (LONGEST)),
+		fieldval, bitpos % (8 * sizeof (LONGEST)), bitsize);
 }
 
 
@@ -751,9 +740,8 @@
 
 /* The descriptor or array type, if any, indicated by TYPE; removes
    level of indirection, if needed. */
-static struct type*
-desc_base_type (type)
-     struct type* type;
+static struct type *
+desc_base_type (struct type *type)
 {
   if (type == NULL)
     return NULL;
@@ -766,26 +754,25 @@
 
 /* True iff TYPE indicates a "thin" array pointer type. */
 static int
-is_thin_pntr (struct type* type)
+is_thin_pntr (struct type *type)
 {
-  return 
+  return
     is_suffix (ada_type_name (desc_base_type (type)), "___XUT")
     || is_suffix (ada_type_name (desc_base_type (type)), "___XUT___XVE");
 }
 
 /* The descriptor type for thin pointer type TYPE. */
-static struct type*
-thin_descriptor_type (struct type* type)
+static struct type *
+thin_descriptor_type (struct type *type)
 {
-  struct type* base_type = desc_base_type (type);
+  struct type *base_type = desc_base_type (type);
   if (base_type == NULL)
     return NULL;
   if (is_suffix (ada_type_name (base_type), "___XVE"))
     return base_type;
-  else 
+  else
     {
-      struct type* alt_type = 
-	ada_find_parallel_type (base_type, "___XVE");
+      struct type *alt_type = ada_find_parallel_type (base_type, "___XVE");
       if (alt_type == NULL)
 	return base_type;
       else
@@ -794,21 +781,21 @@
 }
 
 /* A pointer to the array data for thin-pointer value VAL. */
-static struct value*
-thin_data_pntr (struct value* val)
+static struct value *
+thin_data_pntr (struct value *val)
 {
-  struct type* type = VALUE_TYPE (val);
+  struct type *type = VALUE_TYPE (val);
   if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    return value_cast (desc_data_type (thin_descriptor_type (type)), 
+    return value_cast (desc_data_type (thin_descriptor_type (type)),
 		       value_copy (val));
-  else	
+  else
     return value_from_longest (desc_data_type (thin_descriptor_type (type)),
 			       VALUE_ADDRESS (val) + VALUE_OFFSET (val));
 }
 
 /* True iff TYPE indicates a "thick" array pointer type. */
 static int
-is_thick_pntr (struct type* type) 
+is_thick_pntr (struct type *type)
 {
   type = desc_base_type (type);
   return (type != NULL && TYPE_CODE (type) == TYPE_CODE_STRUCT
@@ -817,11 +804,10 @@
 
 /* If TYPE is the type of an array descriptor (fat or thin pointer) or a 
    pointer to one, the type of its bounds data; otherwise, NULL. */
-static struct type*
-desc_bounds_type (type)
-     struct type* type;
+static struct type *
+desc_bounds_type (struct type *type)
 {
-  struct type* r;
+  struct type *r;
 
   type = desc_base_type (type);
 
@@ -847,34 +833,34 @@
 
 /* If ARR is an array descriptor (fat or thin pointer), or pointer to
    one, a pointer to its bounds data.   Otherwise NULL. */
-static struct value*
-desc_bounds (arr)
-     struct value* arr;
+static struct value *
+desc_bounds (struct value *arr)
 {
-  struct type* type = check_typedef (VALUE_TYPE (arr));
-  if (is_thin_pntr (type)) 
+  struct type *type = check_typedef (VALUE_TYPE (arr));
+  if (is_thin_pntr (type))
     {
-      struct type* bounds_type = desc_bounds_type (thin_descriptor_type (type));
+      struct type *bounds_type =
+	desc_bounds_type (thin_descriptor_type (type));
       LONGEST addr;
 
       if (desc_bounds_type == NULL)
 	error ("Bad GNAT array descriptor");
 
       /* NOTE: The following calculation is not really kosher, but
-	 since desc_type is an XVE-encoded type (and shouldn't be),
-	 the correct calculation is a real pain. FIXME (and fix GCC). */
+         since desc_type is an XVE-encoded type (and shouldn't be),
+         the correct calculation is a real pain. FIXME (and fix GCC). */
       if (TYPE_CODE (type) == TYPE_CODE_PTR)
 	addr = value_as_long (arr);
-      else 
+      else
 	addr = VALUE_ADDRESS (arr) + VALUE_OFFSET (arr);
 
-      return 
-	  value_from_longest (lookup_pointer_type (bounds_type), 
-			      addr - TYPE_LENGTH (bounds_type));
+      return
+	value_from_longest (lookup_pointer_type (bounds_type),
+			    addr - TYPE_LENGTH (bounds_type));
     }
 
   else if (is_thick_pntr (type))
-    return value_struct_elt (&arr, NULL, "P_BOUNDS", NULL, 
+    return value_struct_elt (&arr, NULL, "P_BOUNDS", NULL,
 			     "Bad GNAT array descriptor");
   else
     return NULL;
@@ -883,8 +869,7 @@
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
    position of the field containing the address of the bounds data. */
 static int
-fat_pntr_bounds_bitpos (type)
-     struct type* type;
+fat_pntr_bounds_bitpos (struct type *type)
 {
   return TYPE_FIELD_BITPOS (desc_base_type (type), 1);
 }
@@ -892,12 +877,11 @@
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
    size of the field containing the address of the bounds data. */
 static int
-fat_pntr_bounds_bitsize (type)
-     struct type* type;
+fat_pntr_bounds_bitsize (struct type *type)
 {
   type = desc_base_type (type);
 
-  if (TYPE_FIELD_BITSIZE (type, 1) > 0) 
+  if (TYPE_FIELD_BITSIZE (type, 1) > 0)
     return TYPE_FIELD_BITSIZE (type, 1);
   else
     return 8 * TYPE_LENGTH (check_typedef (TYPE_FIELD_TYPE (type, 1)));
@@ -907,16 +891,15 @@
    pointer to one, the type of its array data (a
    pointer-to-array-with-no-bounds type); otherwise,  NULL.  Use
    ada_type_of_array to get an array type with bounds data. */
-static struct type*
-desc_data_type (type)
-     struct type* type;
+static struct type *
+desc_data_type (struct type *type)
 {
   type = desc_base_type (type);
 
   /* NOTE: The following is bogus; see comment in desc_bounds. */
   if (is_thin_pntr (type))
-    return lookup_pointer_type 
-      (desc_base_type (TYPE_FIELD_TYPE (thin_descriptor_type (type),1)));
+    return lookup_pointer_type
+      (desc_base_type (TYPE_FIELD_TYPE (thin_descriptor_type (type), 1)));
   else if (is_thick_pntr (type))
     return lookup_struct_elt_type (type, "P_ARRAY", 1);
   else
@@ -925,15 +908,14 @@
 
 /* If ARR is an array descriptor (fat or thin pointer), a pointer to
    its array data.  */
-static struct value*
-desc_data (arr)
-     struct value* arr;
+static struct value *
+desc_data (struct value *arr)
 {
-  struct type* type = VALUE_TYPE (arr);
+  struct type *type = VALUE_TYPE (arr);
   if (is_thin_pntr (type))
     return thin_data_pntr (arr);
   else if (is_thick_pntr (type))
-    return value_struct_elt (&arr, NULL, "P_ARRAY", NULL, 
+    return value_struct_elt (&arr, NULL, "P_ARRAY", NULL,
 			     "Bad GNAT array descriptor");
   else
     return NULL;
@@ -943,8 +925,7 @@
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
    position of the field containing the address of the data. */
 static int
-fat_pntr_data_bitpos (type)
-     struct type* type;
+fat_pntr_data_bitpos (struct type *type)
 {
   return TYPE_FIELD_BITPOS (desc_base_type (type), 0);
 }
@@ -952,27 +933,23 @@
 /* If TYPE is the type of an array-descriptor (fat pointer), the bit
    size of the field containing the address of the data. */
 static int
-fat_pntr_data_bitsize (type)
-     struct type* type;
+fat_pntr_data_bitsize (struct type *type)
 {
   type = desc_base_type (type);
 
   if (TYPE_FIELD_BITSIZE (type, 0) > 0)
     return TYPE_FIELD_BITSIZE (type, 0);
-  else 
+  else
     return TARGET_CHAR_BIT * TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0));
 }
 
 /* If BOUNDS is an array-bounds structure (or pointer to one), return 
    the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
    bound, if WHICH is 1.  The first bound is I=1. */
-static struct value*
-desc_one_bound (bounds, i, which)
-     struct value* bounds;
-     int i;
-     int which;
+static struct value *
+desc_one_bound (struct value *bounds, int i, int which)
 {
-  return value_struct_elt (&bounds, NULL, bound_name[2*i+which-2], NULL,
+  return value_struct_elt (&bounds, NULL, bound_name[2 * i + which - 2], NULL,
 			   "Bad GNAT array descriptor bounds");
 }
 
@@ -980,51 +957,42 @@
    of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
    bound, if WHICH is 1.  The first bound is I=1. */
 static int
-desc_bound_bitpos (type, i, which)
-     struct type* type;
-     int i;
-     int which;
+desc_bound_bitpos (struct type *type, int i, int which)
 {
-  return TYPE_FIELD_BITPOS (desc_base_type (type), 2*i+which-2);
+  return TYPE_FIELD_BITPOS (desc_base_type (type), 2 * i + which - 2);
 }
 
 /* If BOUNDS is an array-bounds structure type, return the bit field size
    of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
    bound, if WHICH is 1.  The first bound is I=1. */
 static int
-desc_bound_bitsize (type, i, which)
-     struct type* type;
-     int i;
-     int which;
+desc_bound_bitsize (struct type *type, int i, int which)
 {
   type = desc_base_type (type);
 
-  if (TYPE_FIELD_BITSIZE (type, 2*i+which-2) > 0)
-    return TYPE_FIELD_BITSIZE (type, 2*i+which-2);
-  else 
-    return 8 * TYPE_LENGTH (TYPE_FIELD_TYPE (type, 2*i+which-2));
+  if (TYPE_FIELD_BITSIZE (type, 2 * i + which - 2) > 0)
+    return TYPE_FIELD_BITSIZE (type, 2 * i + which - 2);
+  else
+    return 8 * TYPE_LENGTH (TYPE_FIELD_TYPE (type, 2 * i + which - 2));
 }
 
 /* If TYPE is the type of an array-bounds structure, the type of its
-   Ith bound (numbering from 1). Otherwise, NULL. */ 
-static struct type* 
-desc_index_type (type, i)
-     struct type* type;
-     int i;
+   Ith bound (numbering from 1). Otherwise, NULL. */
+static struct type *
+desc_index_type (struct type *type, int i)
 {
   type = desc_base_type (type);
 
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
-    return lookup_struct_elt_type (type, bound_name[2*i-2], 1);
-  else 
+    return lookup_struct_elt_type (type, bound_name[2 * i - 2], 1);
+  else
     return NULL;
 }
 
 /* The number of index positions in the array-bounds type TYPE.  0
    if TYPE is NULL. */
 static int
-desc_arity (type)
-     struct type* type;
+desc_arity (struct type *type)
 {
   type = desc_base_type (type);
 
@@ -1036,8 +1004,7 @@
 
 /* Non-zero iff type is a simple array type (or pointer to one). */
 int
-ada_is_simple_array (type)
-     struct type* type;
+ada_is_simple_array (struct type *type)
 {
   if (type == NULL)
     return 0;
@@ -1049,20 +1016,19 @@
 
 /* Non-zero iff type belongs to a GNAT array descriptor. */
 int
-ada_is_array_descriptor (type)
-     struct type* type;
+ada_is_array_descriptor (struct type *type)
 {
-  struct type* data_type = desc_data_type (type);
+  struct type *data_type = desc_data_type (type);
 
   if (type == NULL)
     return 0;
   CHECK_TYPEDEF (type);
-  return 
+  return
     data_type != NULL
     && ((TYPE_CODE (data_type) == TYPE_CODE_PTR
 	 && TYPE_TARGET_TYPE (data_type) != NULL
 	 && TYPE_CODE (TYPE_TARGET_TYPE (data_type)) == TYPE_CODE_ARRAY)
-	|| 
+	||
 	TYPE_CODE (data_type) == TYPE_CODE_ARRAY)
     && desc_arity (desc_bounds_type (type)) > 0;
 }
@@ -1072,15 +1038,14 @@
    debugging output from GNAT.  Re-examine periodically to see if it
    is still needed. */
 int
-ada_is_bogus_array_descriptor (type)
-     struct type *type;
+ada_is_bogus_array_descriptor (struct type *type)
 {
-  return 
+  return
     type != NULL
     && TYPE_CODE (type) == TYPE_CODE_STRUCT
     && (lookup_struct_elt_type (type, "P_BOUNDS", 1) != NULL
 	|| lookup_struct_elt_type (type, "P_ARRAY", 1) != NULL)
-    && ! ada_is_array_descriptor (type);
+    && !ada_is_array_descriptor (type);
 }
 
 
@@ -1091,47 +1056,47 @@
    the ARR denotes a null array descriptor and BOUNDS is non-zero, 
    returns NULL.  The result is simply the type of ARR if ARR is not 
    a descriptor.  */
-struct type*
-ada_type_of_array (arr, bounds)
-     struct value* arr;
-     int bounds;
+struct type *
+ada_type_of_array (struct value *arr, int bounds)
 {
   if (ada_is_packed_array_type (VALUE_TYPE (arr)))
     return decode_packed_array_type (VALUE_TYPE (arr));
 
-  if (! ada_is_array_descriptor (VALUE_TYPE (arr)))
+  if (!ada_is_array_descriptor (VALUE_TYPE (arr)))
     return VALUE_TYPE (arr);
-  
-  if (! bounds)
-    return check_typedef (TYPE_TARGET_TYPE (desc_data_type (VALUE_TYPE (arr))));
+
+  if (!bounds)
+    return
+      check_typedef (TYPE_TARGET_TYPE (desc_data_type (VALUE_TYPE (arr))));
   else
     {
-      struct type* elt_type;
+      struct type *elt_type;
       int arity;
-      struct value* descriptor;
+      struct value *descriptor;
       struct objfile *objf = TYPE_OBJFILE (VALUE_TYPE (arr));
 
       elt_type = ada_array_element_type (VALUE_TYPE (arr), -1);
       arity = ada_array_arity (VALUE_TYPE (arr));
 
-      if (elt_type == NULL || arity == 0) 
+      if (elt_type == NULL || arity == 0)
 	return check_typedef (VALUE_TYPE (arr));
 
       descriptor = desc_bounds (arr);
-      if (value_as_long (descriptor) == 0) 
+      if (value_as_long (descriptor) == 0)
 	return NULL;
-      while (arity > 0) {
-	struct type* range_type = alloc_type (objf);
-	struct type* array_type = alloc_type (objf);
-	struct value* low = desc_one_bound (descriptor, arity, 0);
-	struct value* high = desc_one_bound (descriptor, arity, 1);
-	arity -= 1;
+      while (arity > 0)
+	{
+	  struct type *range_type = alloc_type (objf);
+	  struct type *array_type = alloc_type (objf);
+	  struct value *low = desc_one_bound (descriptor, arity, 0);
+	  struct value *high = desc_one_bound (descriptor, arity, 1);
+	  arity -= 1;
 
-	create_range_type (range_type, VALUE_TYPE (low), 
-			   (int) value_as_long (low), 
-			   (int) value_as_long (high));
-	elt_type = create_array_type (array_type, elt_type, range_type);
-      }
+	  create_range_type (range_type, VALUE_TYPE (low),
+			     (int) value_as_long (low),
+			     (int) value_as_long (high));
+	  elt_type = create_array_type (array_type, elt_type, range_type);
+	}
 
       return lookup_pointer_type (elt_type);
     }
@@ -1141,13 +1106,12 @@
    Otherwise, returns either a standard GDB array with bounds set 
    appropriately or, if ARR is a non-null fat pointer, a pointer to a standard 
    GDB array.  Returns NULL if ARR is a null fat pointer. */
-struct value*
-ada_coerce_to_simple_array_ptr (arr)
-     struct value* arr;
+struct value *
+ada_coerce_to_simple_array_ptr (struct value *arr)
 {
   if (ada_is_array_descriptor (VALUE_TYPE (arr)))
     {
-      struct type* arrType = ada_type_of_array (arr, 1);
+      struct type *arrType = ada_type_of_array (arr, 1);
       if (arrType == NULL)
 	return NULL;
       return value_cast (arrType, value_copy (desc_data (arr)));
@@ -1161,33 +1125,31 @@
 /* If ARR does not represent an array, returns ARR unchanged.
    Otherwise, returns a standard GDB array describing ARR (which may
    be ARR itself if it already is in the proper form). */
-struct value*
-ada_coerce_to_simple_array (arr)
-     struct value* arr;
+struct value *
+ada_coerce_to_simple_array (struct value *arr)
 {
   if (ada_is_array_descriptor (VALUE_TYPE (arr)))
     {
-      struct value* arrVal = ada_coerce_to_simple_array_ptr (arr);
+      struct value *arrVal = ada_coerce_to_simple_array_ptr (arr);
       if (arrVal == NULL)
 	error ("Bounds unavailable for null array pointer.");
       return value_ind (arrVal);
     }
   else if (ada_is_packed_array_type (VALUE_TYPE (arr)))
     return decode_packed_array (arr);
-  else 
+  else
     return arr;
 }
 
 /* If TYPE represents a GNAT array type, return it translated to an
    ordinary GDB array type (possibly with BITSIZE fields indicating
    packing). For other types, is the identity. */
-struct type*
-ada_coerce_to_simple_array_type (type)
-     struct type* type;
+struct type *
+ada_coerce_to_simple_array_type (struct type *type)
 {
-  struct value* mark = value_mark ();
-  struct value* dummy = value_from_longest (builtin_type_long, 0);
-  struct type* result;
+  struct value *mark = value_mark ();
+  struct value *dummy = value_from_longest (builtin_type_long, 0);
+  struct type *result;
   VALUE_TYPE (dummy) = type;
   result = ada_type_of_array (dummy, 0);
   value_free_to_mark (dummy);
@@ -1196,13 +1158,12 @@
 
 /* Non-zero iff TYPE represents a standard GNAT packed-array type. */
 int
-ada_is_packed_array_type (type)
-     struct type* type;
+ada_is_packed_array_type (struct type *type)
 {
   if (type == NULL)
     return 0;
   CHECK_TYPEDEF (type);
-  return 
+  return
     ada_type_name (type) != NULL
     && strstr (ada_type_name (type), "___XP") != NULL;
 }
@@ -1215,13 +1176,11 @@
    constituent arrays) recorded in the BITSIZE components of its
    TYPE_FIELD_BITSIZE values, and with *ELT_BITS set to its total size 
    in bits. */
-static struct type*
-packed_array_type (type, elt_bits)
-     struct type* type;
-     long* elt_bits;
+static struct type *
+packed_array_type (struct type *type, long *elt_bits)
 {
-  struct type* new_elt_type;
-  struct type* new_type;
+  struct type *new_elt_type;
+  struct type *new_type;
   LONGEST low_bound, high_bound;
 
   CHECK_TYPEDEF (type);
@@ -1235,15 +1194,15 @@
   TYPE_FIELD_BITSIZE (new_type, 0) = *elt_bits;
   TYPE_NAME (new_type) = ada_type_name (type);
 
-  if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0), 
+  if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0),
 			   &low_bound, &high_bound) < 0)
     low_bound = high_bound = 0;
   if (high_bound < low_bound)
     *elt_bits = TYPE_LENGTH (new_type) = 0;
-  else 
+  else
     {
       *elt_bits *= (high_bound - low_bound + 1);
-      TYPE_LENGTH (new_type) = 
+      TYPE_LENGTH (new_type) =
 	(*elt_bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
     }
 
@@ -1254,16 +1213,15 @@
 
 /* The array type encoded by TYPE, where ada_is_packed_array_type (TYPE).
  */
-static struct type*
-decode_packed_array_type (type)
-     struct type* type;
+static struct type *
+decode_packed_array_type (struct type *type)
 {
-  struct symbol** syms;
-  struct block** blocks;
-  const char* raw_name = ada_type_name (check_typedef (type));
-  char* name = (char*) alloca (strlen (raw_name) + 1);
-  char* tail = strstr (raw_name, "___XP");
-  struct type* shadow_type;
+  struct symbol **syms;
+  struct block **blocks;
+  const char *raw_name = ada_type_name (check_typedef (type));
+  char *name = (char *) alloca (strlen (raw_name) + 1);
+  char *tail = strstr (raw_name, "___XP");
+  struct type *shadow_type;
   long bits;
   int i, n;
 
@@ -1272,7 +1230,7 @@
 
   /* NOTE: Use ada_lookup_symbol_list because of bug in some versions
    * of gcc (Solaris, e.g.). FIXME when compiler is fixed. */
-  n = ada_lookup_symbol_list (name, get_selected_block (NULL), 
+  n = ada_lookup_symbol_list (name, get_selected_block (NULL),
 			      VAR_NAMESPACE, &syms, &blocks);
   for (i = 0; i < n; i += 1)
     if (syms[i] != NULL && SYMBOL_CLASS (syms[i]) == LOC_TYPEDEF
@@ -1290,13 +1248,13 @@
       warning ("could not understand bounds information on packed array");
       return NULL;
     }
-				 				 
+
   if (sscanf (tail + sizeof ("___XP") - 1, "%ld", &bits) != 1)
     {
       warning ("could not understand bit size information on packed array");
       return NULL;
     }
-    
+
   return packed_array_type (shadow_type, &bits);
 }
 
@@ -1306,11 +1264,10 @@
    target types are set to the number of bits in each element, and the
    type length is set appropriately. */
 
-static struct value*
-decode_packed_array (arr)
-     struct value* arr;
+static struct value *
+decode_packed_array (struct value *arr)
 {
-  struct type* type = decode_packed_array_type (VALUE_TYPE (arr));
+  struct type *type = decode_packed_array_type (VALUE_TYPE (arr));
 
   if (type == NULL)
     {
@@ -1325,39 +1282,36 @@
 /* The value of the element of packed array ARR at the ARITY indices
    given in IND.   ARR must be a simple array. */
 
-static struct value*
-value_subscript_packed (arr, arity, ind)
-     struct value* arr;
-     int arity;
-     struct value** ind;
+static struct value *
+value_subscript_packed (struct value *arr, int arity, struct value **ind)
 {
   int i;
   int bits, elt_off, bit_off;
   long elt_total_bit_offset;
-  struct type* elt_type;
-  struct value* v;
+  struct type *elt_type;
+  struct value *v;
 
   bits = 0;
   elt_total_bit_offset = 0;
   elt_type = check_typedef (VALUE_TYPE (arr));
-  for (i = 0; i < arity; i += 1) 
+  for (i = 0; i < arity; i += 1)
     {
-      if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY 
+      if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY
 	  || TYPE_FIELD_BITSIZE (elt_type, 0) == 0)
-	error ("attempt to do packed indexing of something other than a packed array");
+	error
+	  ("attempt to do packed indexing of something other than a packed array");
       else
 	{
 	  struct type *range_type = TYPE_INDEX_TYPE (elt_type);
 	  LONGEST lowerbound, upperbound;
 	  LONGEST idx;
 
-	  if (get_discrete_bounds (range_type, &lowerbound,
-				   &upperbound) < 0)
+	  if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
 	    {
 	      warning ("don't know bounds of array");
 	      lowerbound = upperbound = 0;
 	    }
-      
+
 	  idx = value_as_long (value_pos_atr (ind[i]));
 	  if (idx < lowerbound || idx > upperbound)
 	    warning ("packed array index %ld out of bounds", (long) idx);
@@ -1368,8 +1322,8 @@
     }
   elt_off = elt_total_bit_offset / HOST_CHAR_BIT;
   bit_off = elt_total_bit_offset % HOST_CHAR_BIT;
-  
-  v = ada_value_primitive_packed_val (arr, NULL, elt_off, bit_off, 
+
+  v = ada_value_primitive_packed_val (arr, NULL, elt_off, bit_off,
 				      bits, elt_type);
   if (VALUE_LVAL (arr) == lval_internalvar)
     VALUE_LVAL (v) = lval_internalvar_component;
@@ -1381,19 +1335,19 @@
 /* Non-zero iff TYPE includes negative integer values. */
 
 static int
-has_negatives (type)
-     struct type* type;
+has_negatives (struct type *type)
 {
-  switch (TYPE_CODE (type)) {
-  default:
-    return 0;
-  case TYPE_CODE_INT:
-    return ! TYPE_UNSIGNED (type);
-  case TYPE_CODE_RANGE:
-    return TYPE_LOW_BOUND (type) < 0;
-  }
+  switch (TYPE_CODE (type))
+    {
+    default:
+      return 0;
+    case TYPE_CODE_INT:
+      return !TYPE_UNSIGNED (type);
+    case TYPE_CODE_RANGE:
+      return TYPE_LOW_BOUND (type) < 0;
+    }
 }
-      
+
 
 /* Create a new value of type TYPE from the contents of OBJ starting
    at byte OFFSET, and bit offset BIT_OFFSET within that byte,
@@ -1404,32 +1358,26 @@
    in this case is never an lval.   
    Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT. */
 
-struct value*
-ada_value_primitive_packed_val (obj, valaddr, offset, bit_offset, 
-				bit_size, type)
-     struct value* obj;
-     char* valaddr;
-     long offset;
-     int bit_offset;
-     int bit_size;
-     struct type* type;
+struct value *
+ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset,
+				int bit_offset, int bit_size,
+				struct type *type)
 {
-  struct value* v;
+  struct value *v;
   int src,			/* Index into the source area. */
     targ,			/* Index into the target area. */
-    i, 
-    srcBitsLeft, 		/* Number of source bits left to move. */
+    i, srcBitsLeft,		/* Number of source bits left to move. */
     nsrc, ntarg,		/* Number of source and target bytes. */
     unusedLS,			/* Number of bits in next significant
 				 * byte of source that are unused. */
     accumSize;			/* Number of meaningful bits in accum */
-  unsigned char* bytes;   /* First byte containing data to unpack. */
-  unsigned char* unpacked;
+  unsigned char *bytes;		/* First byte containing data to unpack. */
+  unsigned char *unpacked;
   unsigned long accum;		/* Staging area for bits being transferred */
   unsigned char sign;
   int len = (bit_size + bit_offset + HOST_CHAR_BIT - 1) / 8;
   /* Transmit bytes from least to most significant; delta is the
-   * direction the indices move. */     
+   * direction the indices move. */
   int delta = BITS_BIG_ENDIAN ? -1 : 1;
 
   CHECK_TYPEDEF (type);
@@ -1437,22 +1385,22 @@
   if (obj == NULL)
     {
       v = allocate_value (type);
-      bytes = (unsigned char*) (valaddr + offset);
+      bytes = (unsigned char *) (valaddr + offset);
     }
   else if (VALUE_LAZY (obj))
     {
       v = value_at (type,
 		    VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset, NULL);
-      bytes = (unsigned char*) alloca (len);
+      bytes = (unsigned char *) alloca (len);
       read_memory (VALUE_ADDRESS (v), bytes, len);
     }
-  else 
+  else
     {
       v = allocate_value (type);
-      bytes = (unsigned char*) VALUE_CONTENTS (obj) + offset;
+      bytes = (unsigned char *) VALUE_CONTENTS (obj) + offset;
     }
-      
-  if (obj != NULL) 
+
+  if (obj != NULL)
     {
       VALUE_LVAL (v) = VALUE_LVAL (obj);
       if (VALUE_LVAL (obj) == lval_internalvar)
@@ -1461,14 +1409,14 @@
       VALUE_BITPOS (v) = bit_offset + VALUE_BITPOS (obj);
       VALUE_BITSIZE (v) = bit_size;
       if (VALUE_BITPOS (v) >= HOST_CHAR_BIT)
-        {
-          VALUE_ADDRESS (v) += 1;
-          VALUE_BITPOS (v) -= HOST_CHAR_BIT;
-        }
+	{
+	  VALUE_ADDRESS (v) += 1;
+	  VALUE_BITPOS (v) -= HOST_CHAR_BIT;
+	}
     }
   else
     VALUE_BITSIZE (v) = bit_size;
-  unpacked = (unsigned char*) VALUE_CONTENTS (v);
+  unpacked = (unsigned char *) VALUE_CONTENTS (v);
 
   srcBitsLeft = bit_size;
   nsrc = len;
@@ -1481,34 +1429,34 @@
     }
   else if (BITS_BIG_ENDIAN)
     {
-      src = len-1;
-      if (has_negatives (type) && 
-	  ((bytes[0] << bit_offset) & (1 << (HOST_CHAR_BIT-1))))
+      src = len - 1;
+      if (has_negatives (type) &&
+	  ((bytes[0] << bit_offset) & (1 << (HOST_CHAR_BIT - 1))))
 	sign = ~0;
-      
-      unusedLS = 
+
+      unusedLS =
 	(HOST_CHAR_BIT - (bit_size + bit_offset) % HOST_CHAR_BIT)
 	% HOST_CHAR_BIT;
 
       switch (TYPE_CODE (type))
-        {
-        case TYPE_CODE_ARRAY:
-        case TYPE_CODE_UNION:
-        case TYPE_CODE_STRUCT:
-          /* Non-scalar values must be aligned at a byte boundary. */
-          accumSize =
-            (HOST_CHAR_BIT - bit_size % HOST_CHAR_BIT) % HOST_CHAR_BIT;
+	{
+	case TYPE_CODE_ARRAY:
+	case TYPE_CODE_UNION:
+	case TYPE_CODE_STRUCT:
+	  /* Non-scalar values must be aligned at a byte boundary. */
+	  accumSize =
+	    (HOST_CHAR_BIT - bit_size % HOST_CHAR_BIT) % HOST_CHAR_BIT;
 	  /* And are placed at the beginning (most-significant) bytes
 	   * of the target. */
 	  targ = src;
-          break;
-        default:
+	  break;
+	default:
 	  accumSize = 0;
 	  targ = TYPE_LENGTH (type) - 1;
-          break;
-        }
+	  break;
+	}
     }
-  else 
+  else
     {
       int sign_bit_offset = (bit_size + bit_offset - 1) % 8;
 
@@ -1516,23 +1464,24 @@
       unusedLS = bit_offset;
       accumSize = 0;
 
-      if (has_negatives (type) && (bytes[len-1] & (1 << sign_bit_offset)))
+      if (has_negatives (type) && (bytes[len - 1] & (1 << sign_bit_offset)))
 	sign = ~0;
     }
-      
+
   accum = 0;
   while (nsrc > 0)
     {
       /* Mask for removing bits of the next source byte that are not
        * part of the value. */
-      unsigned int unusedMSMask = 
-	(1 << (srcBitsLeft >= HOST_CHAR_BIT ? HOST_CHAR_BIT : srcBitsLeft))-1;
+      unsigned int unusedMSMask =
+	(1 << (srcBitsLeft >= HOST_CHAR_BIT ? HOST_CHAR_BIT : srcBitsLeft)) -
+	1;
       /* Sign-extend bits for this byte. */
       unsigned int signMask = sign & ~unusedMSMask;
-      accum |= 
+      accum |=
 	(((bytes[src] >> unusedLS) & unusedMSMask) | signMask) << accumSize;
       accumSize += HOST_CHAR_BIT - unusedLS;
-      if (accumSize >= HOST_CHAR_BIT) 
+      if (accumSize >= HOST_CHAR_BIT)
 	{
 	  unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT);
 	  accumSize -= HOST_CHAR_BIT;
@@ -1557,12 +1506,12 @@
 
   return v;
 }
-      
+
 /* Move N bits from SOURCE, starting at bit offset SRC_OFFSET to
    TARGET, starting at bit offset TARG_OFFSET.  SOURCE and TARGET must
    not overlap. */
 static void
-move_bits (char* target, int targ_offset, char* source, int src_offset, int n)
+move_bits (char *target, int targ_offset, char *source, int src_offset, int n)
 {
   unsigned int accum, mask;
   int accum_bits, chunk_size;
@@ -1571,13 +1520,13 @@
   targ_offset %= HOST_CHAR_BIT;
   source += src_offset / HOST_CHAR_BIT;
   src_offset %= HOST_CHAR_BIT;
-  if (BITS_BIG_ENDIAN) 
+  if (BITS_BIG_ENDIAN)
     {
       accum = (unsigned char) *source;
       source += 1;
       accum_bits = HOST_CHAR_BIT - src_offset;
 
-      while (n > 0) 
+      while (n > 0)
 	{
 	  int unused_right;
 	  accum = (accum << HOST_CHAR_BIT) + (unsigned char) *source;
@@ -1588,8 +1537,8 @@
 	    chunk_size = n;
 	  unused_right = HOST_CHAR_BIT - (chunk_size + targ_offset);
 	  mask = ((1 << chunk_size) - 1) << unused_right;
-	  *target = 
-	    (*target & ~mask) 
+	  *target =
+	    (*target & ~mask)
 	    | ((accum >> (accum_bits - chunk_size - unused_right)) & mask);
 	  n -= chunk_size;
 	  accum_bits -= chunk_size;
@@ -1603,7 +1552,7 @@
       source += 1;
       accum_bits = HOST_CHAR_BIT - src_offset;
 
-      while (n > 0) 
+      while (n > 0)
 	{
 	  accum = accum + ((unsigned char) *source << accum_bits);
 	  accum_bits += HOST_CHAR_BIT;
@@ -1612,8 +1561,7 @@
 	  if (chunk_size > n)
 	    chunk_size = n;
 	  mask = ((1 << chunk_size) - 1) << targ_offset;
-	  *target = 
-	    (*target & ~mask) | ((accum << targ_offset) & mask);
+	  *target = (*target & ~mask) | ((accum << targ_offset) & mask);
 	  n -= chunk_size;
 	  accum_bits -= chunk_size;
 	  accum >>= chunk_size;
@@ -1629,10 +1577,10 @@
    FROMVAL.   Handles assignment into packed fields that have
    floating-point or non-scalar types. */
 
-static struct value*
-ada_value_assign (struct value* toval, struct value* fromval)
+static struct value *
+ada_value_assign (struct value *toval, struct value *fromval)
 {
-  struct type* type = VALUE_TYPE (toval);
+  struct type *type = VALUE_TYPE (toval);
   int bits = VALUE_BITSIZE (toval);
 
   if (!toval->modifiable)
@@ -1640,36 +1588,36 @@
 
   COERCE_REF (toval);
 
-  if (VALUE_LVAL (toval) == lval_memory 
+  if (VALUE_LVAL (toval) == lval_memory
       && bits > 0
-      && (TYPE_CODE (type) == TYPE_CODE_FLT 
+      && (TYPE_CODE (type) == TYPE_CODE_FLT
 	  || TYPE_CODE (type) == TYPE_CODE_STRUCT))
     {
-      int len = 
-	(VALUE_BITPOS (toval) + bits + HOST_CHAR_BIT - 1)
-	/ HOST_CHAR_BIT;
-      char* buffer = (char*) alloca (len);
-      struct value* val;
+      int len =
+	(VALUE_BITPOS (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
+      char *buffer = (char *) alloca (len);
+      struct value *val;
 
       if (TYPE_CODE (type) == TYPE_CODE_FLT)
 	fromval = value_cast (type, fromval);
 
       read_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer, len);
       if (BITS_BIG_ENDIAN)
-	move_bits (buffer, VALUE_BITPOS (toval), 
-		   VALUE_CONTENTS (fromval), 
-		   TYPE_LENGTH (VALUE_TYPE (fromval)) * TARGET_CHAR_BIT - bits,
-		   bits);
+	move_bits (buffer, VALUE_BITPOS (toval),
+		   VALUE_CONTENTS (fromval),
+		   TYPE_LENGTH (VALUE_TYPE (fromval)) * TARGET_CHAR_BIT -
+		   bits, bits);
       else
-	move_bits (buffer, VALUE_BITPOS (toval), VALUE_CONTENTS (fromval), 
+	move_bits (buffer, VALUE_BITPOS (toval), VALUE_CONTENTS (fromval),
 		   0, bits);
-      write_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer, len);
+      write_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer,
+		    len);
 
       val = value_copy (toval);
       memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
 	      TYPE_LENGTH (type));
       VALUE_TYPE (val) = type;
-  
+
       return val;
     }
 
@@ -1681,27 +1629,24 @@
    ARR may be either a simple array, GNAT array descriptor, or pointer 
    thereto.  */
 
-struct value*
-ada_value_subscript (arr, arity, ind)
-     struct value* arr;
-     int arity;
-     struct value** ind;
+struct value *
+ada_value_subscript (struct value *arr, int arity, struct value **ind)
 {
   int k;
-  struct value* elt;
-  struct type* elt_type;
+  struct value *elt;
+  struct type *elt_type;
 
   elt = ada_coerce_to_simple_array (arr);
 
   elt_type = check_typedef (VALUE_TYPE (elt));
-  if (TYPE_CODE (elt_type) == TYPE_CODE_ARRAY 
+  if (TYPE_CODE (elt_type) == TYPE_CODE_ARRAY
       && TYPE_FIELD_BITSIZE (elt_type, 0) > 0)
     return value_subscript_packed (elt, arity, ind);
 
   for (k = 0; k < arity; k += 1)
     {
       if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY)
-	error("too many subscripts (%d expected)", k);
+	error ("too many subscripts (%d expected)", k);
       elt = value_subscript (elt, value_pos_atr (ind[k]));
     }
   return elt;
@@ -1711,26 +1656,23 @@
    value of the element of *ARR at the ARITY indices given in
    IND. Does not read the entire array into memory. */
 
-struct value*
-ada_value_ptr_subscript (arr, type, arity, ind)
-     struct value* arr;
-     struct type* type;
-     int arity;
-     struct value** ind;
+struct value *
+ada_value_ptr_subscript (struct value *arr, struct type *type, int arity,
+			 struct value **ind)
 {
   int k;
 
   for (k = 0; k < arity; k += 1)
     {
       LONGEST lwb, upb;
-      struct value* idx;
+      struct value *idx;
 
       if (TYPE_CODE (type) != TYPE_CODE_ARRAY)
-	error("too many subscripts (%d expected)", k);
-      arr = value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)), 
+	error ("too many subscripts (%d expected)", k);
+      arr = value_cast (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
 			value_copy (arr));
       get_discrete_bounds (TYPE_INDEX_TYPE (type), &lwb, &upb);
-      if (lwb == 0) 
+      if (lwb == 0)
 	idx = ind[k];
       else
 	idx = value_sub (ind[k], value_from_longest (builtin_type_int, lwb));
@@ -1747,8 +1689,7 @@
    type designation. Otherwise, returns 0. */
 
 int
-ada_array_arity (type)
-     struct type* type;
+ada_array_arity (struct type *type)
 {
   int arity;
 
@@ -1758,15 +1699,15 @@
   type = desc_base_type (type);
 
   arity = 0;
-  if (TYPE_CODE (type) == TYPE_CODE_STRUCT) 
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
     return desc_arity (desc_bounds_type (type));
-  else 
-    while (TYPE_CODE (type) == TYPE_CODE_ARRAY) 
+  else
+    while (TYPE_CODE (type) == TYPE_CODE_ARRAY)
       {
 	arity += 1;
 	type = check_typedef (TYPE_TARGET_TYPE (type));
       }
-	    
+
   return arity;
 }
 
@@ -1775,29 +1716,27 @@
    TYPE after indexing by NINDICES indices, or by all indices if
    NINDICES is -1. Otherwise, returns NULL. */
 
-struct type*
-ada_array_element_type (type, nindices)
-     struct type* type;
-     int nindices;
+struct type *
+ada_array_element_type (struct type *type, int nindices)
 {
   type = desc_base_type (type);
 
-  if (TYPE_CODE (type) == TYPE_CODE_STRUCT) 
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
     {
       int k;
-      struct type* p_array_type;
+      struct type *p_array_type;
 
       p_array_type = desc_data_type (type);
 
       k = ada_array_arity (type);
       if (k == 0)
 	return NULL;
-      
+
       /* Initially p_array_type = elt_type(*)[]...(k times)...[] */
       if (nindices >= 0 && k > nindices)
 	k = nindices;
       p_array_type = TYPE_TARGET_TYPE (p_array_type);
-      while (k > 0 && p_array_type != NULL) 
+      while (k > 0 && p_array_type != NULL)
 	{
 	  p_array_type = check_typedef (TYPE_TARGET_TYPE (p_array_type));
 	  k -= 1;
@@ -1820,10 +1759,8 @@
 /* The type of nth index in arrays of given type (n numbering from 1).  Does 
    not examine memory. */
 
-struct type*
-ada_index_type (type, n)
-     struct type* type;
-     int n;
+struct type *
+ada_index_type (struct type *type, int n)
 {
   type = desc_base_type (type);
 
@@ -1839,7 +1776,7 @@
 
       return TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0));
     }
-  else 
+  else
     return desc_index_type (desc_bounds_type (type), n);
 }
 
@@ -1851,23 +1788,20 @@
    run-time quantities other than discriminants. */
 
 LONGEST
-ada_array_bound_from_type (arr_type, n, which, typep)
-     struct type* arr_type;
-     int n; 
-     int which;
-     struct type** typep;
+ada_array_bound_from_type (struct type * arr_type, int n, int which,
+			   struct type ** typep)
 {
-  struct type* type;
-  struct type* index_type_desc;
+  struct type *type;
+  struct type *index_type_desc;
 
   if (ada_is_packed_array_type (arr_type))
     arr_type = decode_packed_array_type (arr_type);
 
-  if (arr_type == NULL || ! ada_is_simple_array (arr_type)) 
+  if (arr_type == NULL || !ada_is_simple_array (arr_type))
     {
       if (typep != NULL)
 	*typep = builtin_type_int;
-      return (LONGEST) -which;
+      return (LONGEST) - which;
     }
 
   if (TYPE_CODE (arr_type) == TYPE_CODE_PTR)
@@ -1876,12 +1810,12 @@
     type = arr_type;
 
   index_type_desc = ada_find_parallel_type (type, "___XA");
-  if (index_type_desc == NULL) 
+  if (index_type_desc == NULL)
     {
-      struct type* range_type;
-      struct type* index_type;
+      struct type *range_type;
+      struct type *index_type;
 
-      while (n > 1) 
+      while (n > 1)
 	{
 	  type = TYPE_TARGET_TYPE (type);
 	  n -= 1;
@@ -1890,23 +1824,23 @@
       range_type = TYPE_INDEX_TYPE (type);
       index_type = TYPE_TARGET_TYPE (range_type);
       if (TYPE_CODE (index_type) == TYPE_CODE_UNDEF)
-	  index_type = builtin_type_long;
+	index_type = builtin_type_long;
       if (typep != NULL)
 	*typep = index_type;
-      return 
-	(LONGEST) (which == 0 
+      return
+	(LONGEST) (which == 0
 		   ? TYPE_LOW_BOUND (range_type)
 		   : TYPE_HIGH_BOUND (range_type));
     }
-  else 
+  else
     {
-      struct type* index_type =
-	to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, n-1),
+      struct type *index_type =
+	to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, n - 1),
 			     NULL, TYPE_OBJFILE (arr_type));
       if (typep != NULL)
 	*typep = TYPE_TARGET_TYPE (index_type);
-      return 
-	(LONGEST) (which == 0 
+      return
+	(LONGEST) (which == 0
 		   ? TYPE_LOW_BOUND (index_type)
 		   : TYPE_HIGH_BOUND (index_type));
     }
@@ -1917,19 +1851,19 @@
    which is 1. This routine will also work for arrays with bounds
    supplied by run-time quantities other than discriminants. */
 
-struct value*
+struct value *
 ada_array_bound (arr, n, which)
-     struct value* arr;
-     int n; 
+     struct value *arr;
+     int n;
      int which;
 {
-  struct type* arr_type = VALUE_TYPE (arr);
+  struct type *arr_type = VALUE_TYPE (arr);
 
   if (ada_is_packed_array_type (arr_type))
     return ada_array_bound (decode_packed_array (arr), n, which);
-  else if (ada_is_simple_array (arr_type)) 
+  else if (ada_is_simple_array (arr_type))
     {
-      struct type* type;
+      struct type *type;
       LONGEST v = ada_array_bound_from_type (arr_type, n, which, &type);
       return value_from_longest (type, v);
     }
@@ -1941,46 +1875,42 @@
    nth index.  This routine will also work for arrays with bounds
    supplied by run-time quantities other than discriminants. Does not
    work for arrays indexed by enumeration types with representation
-   clauses at the moment. */ 
+   clauses at the moment. */
 
-struct value*
-ada_array_length (arr, n)
-     struct value* arr;
-     int n; 
+struct value *
+ada_array_length (struct value *arr, int n)
 {
-  struct type* arr_type = check_typedef (VALUE_TYPE (arr));
-  struct type* index_type_desc;
+  struct type *arr_type = check_typedef (VALUE_TYPE (arr));
+  struct type *index_type_desc;
 
   if (ada_is_packed_array_type (arr_type))
     return ada_array_length (decode_packed_array (arr), n);
 
   if (ada_is_simple_array (arr_type))
     {
-      struct type* type;
+      struct type *type;
       LONGEST v =
 	ada_array_bound_from_type (arr_type, n, 1, &type) -
 	ada_array_bound_from_type (arr_type, n, 0, NULL) + 1;
       return value_from_longest (type, v);
     }
   else
-    return 
+    return
       value_from_longest (builtin_type_ada_int,
 			  value_as_long (desc_one_bound (desc_bounds (arr),
 							 n, 1))
 			  - value_as_long (desc_one_bound (desc_bounds (arr),
-							   n, 0))
-			  + 1);
+							   n, 0)) + 1);
 }
-
 
+
 				/* Name resolution */
 
 /* The "demangled" name for the user-definable Ada operator corresponding
    to op. */
 
-static const char*
-ada_op_name (op)
-     enum exp_opcode op;
+static const char *
+ada_op_name (enum exp_opcode op)
 {
   int i;
 
@@ -2004,9 +1934,7 @@
    May change (expand) *EXP.  */
 
 void
-ada_resolve (expp, context_type)
-     struct expression** expp;
-     struct type* context_type;
+ada_resolve (struct expression **expp, struct type *context_type)
 {
   int pc;
   pc = 0;
@@ -2021,18 +1949,15 @@
    function-valued variables into parameterless calls.  May expand
    EXP. The CONTEXT_TYPE functions as in ada_resolve, above. */
 
-static struct value*
-ada_resolve_subexp (expp, pos, deprocedure_p, context_type) 
-     struct expression** expp;
-     int *pos;
-     int deprocedure_p;
-     struct type* context_type;
+static struct value *
+ada_resolve_subexp (struct expression **expp, int *pos, int deprocedure_p,
+		    struct type *context_type)
 {
   int pc = *pos;
   int i;
-  struct expression* exp;	/* Convenience: == *expp */
+  struct expression *exp;	/* Convenience: == *expp */
   enum exp_opcode op = (*expp)->elts[pc].opcode;
-  struct value** argvec;		/* Vector of operand types (alloca'ed). */
+  struct value **argvec;	/* Vector of operand types (alloca'ed). */
   int nargs;			/* Number of operands */
 
   argvec = NULL;
@@ -2043,7 +1968,7 @@
   switch (op)
     {
     case OP_VAR_VALUE:
-      /*    case OP_UNRESOLVED_VALUE:*/
+      /*    case OP_UNRESOLVED_VALUE: */
       /* FIXME:  OP_UNRESOLVED_VALUE should be defined in expression.h */
       *pos += 4;
       break;
@@ -2051,43 +1976,43 @@
     case OP_FUNCALL:
       nargs = longest_to_int (exp->elts[pc + 1].longconst) + 1;
       /* FIXME:  OP_UNRESOLVED_VALUE should be defined in expression.h */
-      /*      if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE) 	
-	{
-	  *pos += 7;
+      /*      if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE)        
+         {
+         *pos += 7;
 
-	  argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 1));
-	  for (i = 0; i < nargs-1; i += 1)
-	    argvec[i] = ada_resolve_subexp (expp, pos, 1, NULL);
-	  argvec[i] = NULL;
-	}
-      else
-	{
-	  *pos += 3;
-	  ada_resolve_subexp (expp, pos, 0, NULL);
-	  for (i = 1; i < nargs; i += 1)
-	    ada_resolve_subexp (expp, pos, 1, NULL);
-	}
-      */
+         argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 1));
+         for (i = 0; i < nargs-1; i += 1)
+         argvec[i] = ada_resolve_subexp (expp, pos, 1, NULL);
+         argvec[i] = NULL;
+         }
+         else
+         {
+         *pos += 3;
+         ada_resolve_subexp (expp, pos, 0, NULL);
+         for (i = 1; i < nargs; i += 1)
+         ada_resolve_subexp (expp, pos, 1, NULL);
+         }
+       */
       exp = *expp;
       break;
 
       /* FIXME:  UNOP_QUAL should be defined in expression.h */
       /*    case UNOP_QUAL:
-      nargs = 1;
-      *pos += 3;
-      ada_resolve_subexp (expp, pos, 1, exp->elts[pc + 1].type);
-      exp = *expp;
-      break;
-      */
-      /* FIXME:  OP_ATTRIBUTE should be defined in expression.h */      
+         nargs = 1;
+         *pos += 3;
+         ada_resolve_subexp (expp, pos, 1, exp->elts[pc + 1].type);
+         exp = *expp;
+         break;
+       */
+      /* FIXME:  OP_ATTRIBUTE should be defined in expression.h */
       /*    case OP_ATTRIBUTE:
-      nargs = longest_to_int (exp->elts[pc + 1].longconst) + 1;
-      *pos += 4;
-      for (i = 0; i < nargs; i += 1)
-	ada_resolve_subexp (expp, pos, 1, NULL);
-      exp = *expp;
-      break;
-      */
+         nargs = longest_to_int (exp->elts[pc + 1].longconst) + 1;
+         *pos += 4;
+         for (i = 0; i < nargs; i += 1)
+         ada_resolve_subexp (expp, pos, 1, NULL);
+         exp = *expp;
+         break;
+       */
     case UNOP_ADDR:
       nargs = 1;
       *pos += 1;
@@ -2097,7 +2022,7 @@
 
     case BINOP_ASSIGN:
       {
-	struct value* arg1;
+	struct value *arg1;
 	nargs = 2;
 	*pos += 1;
 	arg1 = ada_resolve_subexp (expp, pos, 0, NULL);
@@ -2109,16 +2034,16 @@
       }
 
     default:
-      switch (op) 
+      switch (op)
 	{
 	default:
 	  error ("Unexpected operator during name resolution");
 	case UNOP_CAST:
-	  /*	case UNOP_MBR:
-	  nargs = 1;
-	  *pos += 3;
-	  break;
-	  */
+	  /*    case UNOP_MBR:
+	     nargs = 1;
+	     *pos += 3;
+	     break;
+	   */
 	case BINOP_ADD:
 	case BINOP_SUB:
 	case BINOP_MUL:
@@ -2182,29 +2107,30 @@
 	  break;
 
 	case OP_ARRAY:
-	  *pos += 4;  
+	  *pos += 4;
 	  nargs = longest_to_int (exp->elts[pc + 2].longconst) + 1;
 	  nargs -= longest_to_int (exp->elts[pc + 1].longconst);
 	  /* A null array contains one dummy element to give the type. */
-	  /*	  if (nargs == 0)
-	    nargs = 1;
-	    break;*/
+	  /*      if (nargs == 0)
+	     nargs = 1;
+	     break; */
 
 	case TERNOP_SLICE:
 	  /* FIXME: TERNOP_MBR should be defined in expression.h */
-	  /*	case TERNOP_MBR:
-	  *pos += 1;
-	  nargs = 3;
-	  break;
-	  */
+	  /*    case TERNOP_MBR:
+	     *pos += 1;
+	     nargs = 3;
+	     break;
+	   */
 	  /* FIXME: BINOP_MBR should be defined in expression.h */
-	  /*	case BINOP_MBR:
-	  *pos += 3;
-	  nargs = 2;
-	  break;*/
+	  /*    case BINOP_MBR:
+	     *pos += 3;
+	     nargs = 2;
+	     break; */
 	}
 
-      argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 1));
+      argvec =
+	(struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
       for (i = 0; i < nargs; i += 1)
 	argvec[i] = ada_resolve_subexp (expp, pos, 1, NULL);
       argvec[i] = NULL;
@@ -2220,97 +2146,98 @@
 
       /* FIXME:  OP_UNRESOLVED_VALUE should be defined in expression.h */
       /*    case OP_UNRESOLVED_VALUE:
-      {
-	struct symbol** candidate_syms;
-	struct block** candidate_blocks;
-	int n_candidates;
+         {
+         struct symbol** candidate_syms;
+         struct block** candidate_blocks;
+         int n_candidates;
 
-	n_candidates = ada_lookup_symbol_list (exp->elts[pc + 2].name,
-					       exp->elts[pc + 1].block,
-					       VAR_NAMESPACE,
-					       &candidate_syms,
-					       &candidate_blocks);
-	
-	if (n_candidates > 1) 
-	{*/
-	    /* Types tend to get re-introduced locally, so if there
-	       are any local symbols that are not types, first filter
-	       out all types.*/	       /*
-	    int j;
-	    for (j = 0; j < n_candidates; j += 1) 
-	      switch (SYMBOL_CLASS (candidate_syms[j])) 
-		{
-		case LOC_REGISTER:
-		case LOC_ARG:
-		case LOC_REF_ARG:
-		case LOC_REGPARM:
-		case LOC_REGPARM_ADDR:
-		case LOC_LOCAL:
-		case LOC_LOCAL_ARG:
-		case LOC_BASEREG:
-		case LOC_BASEREG_ARG:
-		  goto FoundNonType;
-		default:
-		  break;
-		}
-	  FoundNonType:
-	    if (j < n_candidates) 
-	      {
-		j = 0;
-		while (j < n_candidates) 
-		  {
-		    if (SYMBOL_CLASS (candidate_syms[j]) == LOC_TYPEDEF)
-		      {
-			candidate_syms[j] = candidate_syms[n_candidates-1];
-			candidate_blocks[j] = candidate_blocks[n_candidates-1];
-			n_candidates -= 1;
-		      }
-		    else
-		      j += 1;
-		  }
-	      }
-	  }
+         n_candidates = ada_lookup_symbol_list (exp->elts[pc + 2].name,
+         exp->elts[pc + 1].block,
+         VAR_NAMESPACE,
+         &candidate_syms,
+         &candidate_blocks);
 
-	if (n_candidates == 0)
-	  error ("No definition found for %s", 
-		 ada_demangle (exp->elts[pc + 2].name));
-	else if (n_candidates == 1)
-	  i = 0;
-	else if (deprocedure_p 
-		 && ! is_nonfunction (candidate_syms, n_candidates))
-	  {
-	    i = ada_resolve_function (candidate_syms, candidate_blocks,
-				      n_candidates, NULL, 0,
-				      exp->elts[pc + 2].name, context_type);
-	    if (i < 0) 
-	      error ("Could not find a match for %s", 
-		     ada_demangle (exp->elts[pc + 2].name));
-	  }
-	else 
-	  {
-	    printf_filtered ("Multiple matches for %s\n", 
-			     ada_demangle (exp->elts[pc+2].name));
-	    user_select_syms (candidate_syms, candidate_blocks, 
-			      n_candidates, 1);
-	    i = 0;
-	  }
+         if (n_candidates > 1) 
+         { */
+      /* Types tend to get re-introduced locally, so if there
+         are any local symbols that are not types, first filter
+   out all types. *//*
+   int j;
+   for (j = 0; j < n_candidates; j += 1) 
+   switch (SYMBOL_CLASS (candidate_syms[j])) 
+   {
+   case LOC_REGISTER:
+   case LOC_ARG:
+   case LOC_REF_ARG:
+   case LOC_REGPARM:
+   case LOC_REGPARM_ADDR:
+   case LOC_LOCAL:
+   case LOC_LOCAL_ARG:
+   case LOC_BASEREG:
+   case LOC_BASEREG_ARG:
+   goto FoundNonType;
+   default:
+   break;
+   }
+   FoundNonType:
+   if (j < n_candidates) 
+   {
+   j = 0;
+   while (j < n_candidates) 
+   {
+   if (SYMBOL_CLASS (candidate_syms[j]) == LOC_TYPEDEF)
+   {
+   candidate_syms[j] = candidate_syms[n_candidates-1];
+   candidate_blocks[j] = candidate_blocks[n_candidates-1];
+   n_candidates -= 1;
+   }
+   else
+   j += 1;
+   }
+   }
+   }
 
-	exp->elts[pc].opcode = exp->elts[pc + 3].opcode = OP_VAR_VALUE;
-	exp->elts[pc + 1].block = candidate_blocks[i];
-	exp->elts[pc + 2].symbol = candidate_syms[i];
-	if (innermost_block == NULL ||
-	    contained_in (candidate_blocks[i], innermost_block))
-	  innermost_block = candidate_blocks[i];
-      }*/
+   if (n_candidates == 0)
+   error ("No definition found for %s", 
+   ada_demangle (exp->elts[pc + 2].name));
+   else if (n_candidates == 1)
+   i = 0;
+   else if (deprocedure_p 
+   && ! is_nonfunction (candidate_syms, n_candidates))
+   {
+   i = ada_resolve_function (candidate_syms, candidate_blocks,
+   n_candidates, NULL, 0,
+   exp->elts[pc + 2].name, context_type);
+   if (i < 0) 
+   error ("Could not find a match for %s", 
+   ada_demangle (exp->elts[pc + 2].name));
+   }
+   else 
+   {
+   printf_filtered ("Multiple matches for %s\n", 
+   ada_demangle (exp->elts[pc+2].name));
+   user_select_syms (candidate_syms, candidate_blocks, 
+   n_candidates, 1);
+   i = 0;
+   }
+
+   exp->elts[pc].opcode = exp->elts[pc + 3].opcode = OP_VAR_VALUE;
+   exp->elts[pc + 1].block = candidate_blocks[i];
+   exp->elts[pc + 2].symbol = candidate_syms[i];
+   if (innermost_block == NULL ||
+   contained_in (candidate_blocks[i], innermost_block))
+   innermost_block = candidate_blocks[i];
+   } */
       /* FALL THROUGH */
 
     case OP_VAR_VALUE:
-      if (deprocedure_p && 
-	  TYPE_CODE (SYMBOL_TYPE (exp->elts[pc+2].symbol)) == TYPE_CODE_FUNC)
+      if (deprocedure_p &&
+	  TYPE_CODE (SYMBOL_TYPE (exp->elts[pc + 2].symbol)) ==
+	  TYPE_CODE_FUNC)
 	{
-	  replace_operator_with_call (expp, pc, 0, 0, 
-				      exp->elts[pc+2].symbol,
-				      exp->elts[pc+1].block);
+	  replace_operator_with_call (expp, pc, 0, 0,
+				      exp->elts[pc + 2].symbol,
+				      exp->elts[pc + 1].block);
 	  exp = *expp;
 	}
       break;
@@ -2318,37 +2245,37 @@
     case OP_FUNCALL:
       {
 	/* FIXME:  OP_UNRESOLVED_VALUE should be defined in expression.h */
-	/*	if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE) 	
-	  {
-	    struct symbol** candidate_syms;
-	    struct block** candidate_blocks;
-	    int n_candidates;
+	/*      if (exp->elts[pc+3].opcode == OP_UNRESOLVED_VALUE)      
+	   {
+	   struct symbol** candidate_syms;
+	   struct block** candidate_blocks;
+	   int n_candidates;
 
-	    n_candidates = ada_lookup_symbol_list (exp->elts[pc + 5].name,
-						   exp->elts[pc + 4].block,
-						   VAR_NAMESPACE,
-						   &candidate_syms,
-						   &candidate_blocks);
-	    if (n_candidates == 1)
-	      i = 0;
-	    else
-	      {
-		i = ada_resolve_function (candidate_syms, candidate_blocks,
-					  n_candidates, argvec, nargs-1,
-					  exp->elts[pc + 5].name, context_type);
-		if (i < 0) 
-		  error ("Could not find a match for %s", 
-			 ada_demangle (exp->elts[pc + 5].name));
-	      }
+	   n_candidates = ada_lookup_symbol_list (exp->elts[pc + 5].name,
+	   exp->elts[pc + 4].block,
+	   VAR_NAMESPACE,
+	   &candidate_syms,
+	   &candidate_blocks);
+	   if (n_candidates == 1)
+	   i = 0;
+	   else
+	   {
+	   i = ada_resolve_function (candidate_syms, candidate_blocks,
+	   n_candidates, argvec, nargs-1,
+	   exp->elts[pc + 5].name, context_type);
+	   if (i < 0) 
+	   error ("Could not find a match for %s", 
+	   ada_demangle (exp->elts[pc + 5].name));
+	   }
 
-	    exp->elts[pc + 3].opcode = exp->elts[pc + 6].opcode = OP_VAR_VALUE;
-	    exp->elts[pc + 4].block = candidate_blocks[i];
-	    exp->elts[pc + 5].symbol = candidate_syms[i];
-	    if (innermost_block == NULL ||
-		contained_in (candidate_blocks[i], innermost_block))
-	      innermost_block = candidate_blocks[i];
-	      }*/
-	
+	   exp->elts[pc + 3].opcode = exp->elts[pc + 6].opcode = OP_VAR_VALUE;
+	   exp->elts[pc + 4].block = candidate_blocks[i];
+	   exp->elts[pc + 5].symbol = candidate_syms[i];
+	   if (innermost_block == NULL ||
+	   contained_in (candidate_blocks[i], innermost_block))
+	   innermost_block = candidate_blocks[i];
+	   } */
+
       }
       break;
     case BINOP_ADD:
@@ -2374,18 +2301,18 @@
     case UNOP_ABS:
       if (possible_user_operator_p (op, argvec))
 	{
-	  struct symbol** candidate_syms;
-	  struct block** candidate_blocks;
+	  struct symbol **candidate_syms;
+	  struct block **candidate_blocks;
 	  int n_candidates;
 
-	  n_candidates = ada_lookup_symbol_list (ada_mangle (ada_op_name (op)),
-						 (struct block*) NULL,
-						 VAR_NAMESPACE,
-						 &candidate_syms,
-						 &candidate_blocks);
-	  i = ada_resolve_function (candidate_syms, candidate_blocks,
-				    n_candidates, argvec, nargs,
-				    ada_op_name (op), NULL);
+	  n_candidates =
+	    ada_lookup_symbol_list (ada_mangle (ada_op_name (op)),
+				    (struct block *) NULL, VAR_NAMESPACE,
+				    &candidate_syms, &candidate_blocks);
+	  i =
+	    ada_resolve_function (candidate_syms, candidate_blocks,
+				  n_candidates, argvec, nargs,
+				  ada_op_name (op), NULL);
 	  if (i < 0)
 	    break;
 
@@ -2402,14 +2329,14 @@
 
 /* Return non-zero if formal type FTYPE matches actual type ATYPE.  If
    MAY_DEREF is non-zero, the formal may be a pointer and the actual 
-   a non-pointer. */ 
+   a non-pointer. */
 /* The term "match" here is rather loose.  The match is heuristic and
    liberal.  FIXME: TOO liberal, in fact. */
 
 static int
 ada_type_match (ftype, atype, may_deref)
-     struct type* ftype;
-     struct type* atype;
+     struct type *ftype;
+     struct type *atype;
      int may_deref;
 {
   CHECK_TYPEDEF (ftype);
@@ -2420,11 +2347,11 @@
   if (TYPE_CODE (atype) == TYPE_CODE_REF)
     atype = TYPE_TARGET_TYPE (atype);
 
-  if (TYPE_CODE (ftype) == TYPE_CODE_VOID 
+  if (TYPE_CODE (ftype) == TYPE_CODE_VOID
       || TYPE_CODE (atype) == TYPE_CODE_VOID)
     return 1;
 
-  switch (TYPE_CODE (ftype)) 
+  switch (TYPE_CODE (ftype))
     {
     default:
       return 1;
@@ -2432,8 +2359,9 @@
       if (TYPE_CODE (atype) == TYPE_CODE_PTR)
 	return ada_type_match (TYPE_TARGET_TYPE (ftype),
 			       TYPE_TARGET_TYPE (atype), 0);
-      else return (may_deref && 
-		   ada_type_match (TYPE_TARGET_TYPE (ftype), atype, 0));
+      else
+	return (may_deref &&
+		ada_type_match (TYPE_TARGET_TYPE (ftype), atype, 0));
     case TYPE_CODE_INT:
     case TYPE_CODE_ENUM:
     case TYPE_CODE_RANGE:
@@ -2448,16 +2376,16 @@
 	}
 
     case TYPE_CODE_ARRAY:
-      return (TYPE_CODE (atype) == TYPE_CODE_ARRAY 
+      return (TYPE_CODE (atype) == TYPE_CODE_ARRAY
 	      || ada_is_array_descriptor (atype));
 
     case TYPE_CODE_STRUCT:
       if (ada_is_array_descriptor (ftype))
-	return (TYPE_CODE (atype) == TYPE_CODE_ARRAY 
+	return (TYPE_CODE (atype) == TYPE_CODE_ARRAY
 		|| ada_is_array_descriptor (atype));
       else
 	return (TYPE_CODE (atype) == TYPE_CODE_STRUCT
-		&& ! ada_is_array_descriptor (atype));
+		&& !ada_is_array_descriptor (atype));
 
     case TYPE_CODE_UNION:
     case TYPE_CODE_FLT:
@@ -2471,15 +2399,12 @@
    argument function. */
 
 static int
-ada_args_match (func, actuals, n_actuals)
-     struct symbol* func;
-     struct value** actuals;
-     int n_actuals;
+ada_args_match (struct symbol *func, struct value **actuals, int n_actuals)
 {
   int i;
-  struct type* func_type = SYMBOL_TYPE (func);
+  struct type *func_type = SYMBOL_TYPE (func);
 
-  if (SYMBOL_CLASS (func) == LOC_CONST && 
+  if (SYMBOL_CLASS (func) == LOC_CONST &&
       TYPE_CODE (func_type) == TYPE_CODE_ENUM)
     return (n_actuals == 0);
   else if (func_type == NULL || TYPE_CODE (func_type) != TYPE_CODE_FUNC)
@@ -2490,11 +2415,11 @@
 
   for (i = 0; i < n_actuals; i += 1)
     {
-      struct type* ftype = check_typedef (TYPE_FIELD_TYPE (func_type, i));
-      struct type* atype = check_typedef (VALUE_TYPE (actuals[i]));
+      struct type *ftype = check_typedef (TYPE_FIELD_TYPE (func_type, i));
+      struct type *atype = check_typedef (VALUE_TYPE (actuals[i]));
 
-      if (! ada_type_match (TYPE_FIELD_TYPE (func_type, i), 
-			    VALUE_TYPE (actuals[i]), 1))
+      if (!ada_type_match (TYPE_FIELD_TYPE (func_type, i),
+			   VALUE_TYPE (actuals[i]), 1))
 	return 0;
     }
   return 1;
@@ -2506,25 +2431,23 @@
    or an enumerated type.  A null CONTEXT_TYPE indicates any non-void type.  */
 
 static int
-return_match (func_type, context_type)
-     struct type* func_type;
-     struct type* context_type;
+return_match (struct type *func_type, struct type *context_type)
 {
-  struct type* return_type;
+  struct type *return_type;
 
   if (func_type == NULL)
     return 1;
 
   /* FIXME: base_type should be declared in gdbtypes.h, implemented in valarith.c */
   /*  if (TYPE_CODE (func_type) == TYPE_CODE_FUNC)
-        return_type = base_type (TYPE_TARGET_TYPE (func_type));
-      else 
-	return_type = base_type (func_type);*/
+     return_type = base_type (TYPE_TARGET_TYPE (func_type));
+     else 
+     return_type = base_type (func_type); */
   if (return_type == NULL)
     return 1;
 
   /* FIXME: base_type should be declared in gdbtypes.h, implemented in valarith.c */
-  /*  context_type = base_type (context_type);*/
+  /*  context_type = base_type (context_type); */
 
   if (TYPE_CODE (return_type) == TYPE_CODE_ENUM)
     return context_type == NULL || return_type == context_type;
@@ -2547,18 +2470,14 @@
    is modified in parallel to SYMS. */
 
 int
-ada_resolve_function (syms, blocks, nsyms, args, nargs, name, context_type)
-     struct symbol* syms[];
-     struct block* blocks[];
-     struct value** args;
-     int nsyms, nargs;
-     const char* name;
-     struct type* context_type;
+ada_resolve_function (struct symbol *syms[], struct block *blocks[],
+		      int nsyms, struct value **args, int nargs,
+		      const char *name, struct type *context_type)
 {
   int k;
   int m;			/* Number of hits */
-  struct type* fallback;
-  struct type* return_type;
+  struct type *fallback;
+  struct type *return_type;
 
   return_type = context_type;
   if (context_type == NULL)
@@ -2566,12 +2485,12 @@
   else
     fallback = NULL;
 
-  m = 0; 
+  m = 0;
   while (1)
     {
       for (k = 0; k < nsyms; k += 1)
 	{
-	  struct type* type = check_typedef (SYMBOL_TYPE (syms[k]));
+	  struct type *type = check_typedef (SYMBOL_TYPE (syms[k]));
 
 	  if (ada_args_match (syms[k], args, nargs)
 	      && return_match (SYMBOL_TYPE (syms[k]), return_type))
@@ -2605,7 +2524,7 @@
 /* same package should sort in their source order.  We settle for ordering */
 /* such symbols by their trailing number (__N  or $N). */
 static int
-mangled_ordered_before (char* N0, char* N1)
+mangled_ordered_before (char *N0, char *N1)
 {
   if (N1 == NULL)
     return 0;
@@ -2614,53 +2533,50 @@
   else
     {
       int k0, k1;
-      for (k0 = strlen (N0)-1; k0 > 0 && isdigit (N0[k0]); k0 -= 1)
+      for (k0 = strlen (N0) - 1; k0 > 0 && isdigit (N0[k0]); k0 -= 1)
 	;
-      for (k1 = strlen (N1)-1; k1 > 0 && isdigit (N1[k1]); k1 -= 1)
+      for (k1 = strlen (N1) - 1; k1 > 0 && isdigit (N1[k1]); k1 -= 1)
 	;
-      if ((N0[k0] == '_' || N0[k0] == '$') && N0[k0+1] != '\000'
-	  && (N1[k1] == '_' || N1[k1] == '$') && N1[k1+1] != '\000')
+      if ((N0[k0] == '_' || N0[k0] == '$') && N0[k0 + 1] != '\000'
+	  && (N1[k1] == '_' || N1[k1] == '$') && N1[k1 + 1] != '\000')
 	{
 	  int n0, n1;
 	  n0 = k0;
-	  while (N0[n0] == '_' && n0 > 0 && N0[n0-1] == '_')
+	  while (N0[n0] == '_' && n0 > 0 && N0[n0 - 1] == '_')
 	    n0 -= 1;
 	  n1 = k1;
-	  while (N1[n1] == '_' && n1 > 0 && N1[n1-1] == '_')
+	  while (N1[n1] == '_' && n1 > 0 && N1[n1 - 1] == '_')
 	    n1 -= 1;
 	  if (n0 == n1 && STREQN (N0, N1, n0))
-	    return (atoi (N0+k0+1) < atoi (N1+k1+1));
+	    return (atoi (N0 + k0 + 1) < atoi (N1 + k1 + 1));
 	}
       return (strcmp (N0, N1) < 0);
     }
 }
-	  
+
 /* Sort SYMS[0..NSYMS-1] to put the choices in a canonical order by their */
 /* mangled names, rearranging BLOCKS[0..NSYMS-1] according to the same */
 /* permutation. */
-static void 
-sort_choices (syms, blocks, nsyms)
-     struct symbol* syms[];
-     struct block* blocks[];
-     int nsyms;
+static void
+sort_choices (struct symbol *syms[], struct block *blocks[], int nsyms)
 {
   int i, j;
-  for (i = 1; i < nsyms; i += 1) 
+  for (i = 1; i < nsyms; i += 1)
     {
-      struct symbol* sym = syms[i];
-      struct block* block = blocks[i];
+      struct symbol *sym = syms[i];
+      struct block *block = blocks[i];
       int j;
 
-      for (j = i-1; j >= 0; j -= 1) 
+      for (j = i - 1; j >= 0; j -= 1)
 	{
 	  if (mangled_ordered_before (SYMBOL_NAME (syms[j]),
 				      SYMBOL_NAME (sym)))
 	    break;
-	  syms[j+1] = syms[j];
-	  blocks[j+1] = blocks[j];
+	  syms[j + 1] = syms[j];
+	  blocks[j + 1] = blocks[j];
 	}
-      syms[j+1] = sym;
-      blocks[j+1] = block;
+      syms[j + 1] = sym;
+      blocks[j + 1] = block;
     }
 }
 
@@ -2675,14 +2591,11 @@
    to be re-integrated one of these days. */
 
 int
-user_select_syms (syms, blocks, nsyms, max_results)
-     struct symbol* syms[];
-     struct block* blocks[];
-     int nsyms;
-     int max_results;
+user_select_syms (struct symbol *syms[], struct block *blocks[], int nsyms,
+		  int max_results)
 {
   int i;
-  int* chosen = (int*) alloca (sizeof(int) * nsyms);
+  int *chosen = (int *) alloca (sizeof (int) * nsyms);
   int n_chosen;
   int first_choice = (max_results == 1) ? 1 : 2;
 
@@ -2691,9 +2604,9 @@
   if (nsyms <= 1)
     return nsyms;
 
-  printf_unfiltered("[0] cancel\n");
+  printf_unfiltered ("[0] cancel\n");
   if (max_results > 1)
-      printf_unfiltered("[1] all\n");
+    printf_unfiltered ("[1] all\n");
 
   sort_choices (syms, blocks, nsyms);
 
@@ -2706,30 +2619,27 @@
 	{
 	  struct symtab_and_line sal = find_function_start_sal (syms[i], 1);
 	  printf_unfiltered ("[%d] %s at %s:%d\n",
-			     i + first_choice, 
+			     i + first_choice,
 			     SYMBOL_SOURCE_NAME (syms[i]),
-			     sal.symtab == NULL 
-			       ? "<no source file available>"
-			       : sal.symtab->filename, 
-			     sal.line);
+			     sal.symtab == NULL
+			     ? "<no source file available>"
+			     : sal.symtab->filename, sal.line);
 	  continue;
 	}
-      else 
+      else
 	{
-	  int is_enumeral = 
+	  int is_enumeral =
 	    (SYMBOL_CLASS (syms[i]) == LOC_CONST
 	     && SYMBOL_TYPE (syms[i]) != NULL
-	     && TYPE_CODE (SYMBOL_TYPE (syms[i]))
-	        == TYPE_CODE_ENUM);
-	  struct symtab* symtab = symtab_for_sym (syms[i]);
+	     && TYPE_CODE (SYMBOL_TYPE (syms[i])) == TYPE_CODE_ENUM);
+	  struct symtab *symtab = symtab_for_sym (syms[i]);
 
 	  if (SYMBOL_LINE (syms[i]) != 0 && symtab != NULL)
 	    printf_unfiltered ("[%d] %s at %s:%d\n",
 			       i + first_choice,
 			       SYMBOL_SOURCE_NAME (syms[i]),
 			       symtab->filename, SYMBOL_LINE (syms[i]));
-	  else if (is_enumeral && 
-		   TYPE_NAME (SYMBOL_TYPE (syms[i])) != NULL)
+	  else if (is_enumeral && TYPE_NAME (SYMBOL_TYPE (syms[i])) != NULL)
 	    {
 	      printf_unfiltered ("[%d] ", i + first_choice);
 	      ada_print_type (SYMBOL_TYPE (syms[i]), NULL, gdb_stdout, -1, 0);
@@ -2737,7 +2647,7 @@
 				 SYMBOL_SOURCE_NAME (syms[i]));
 	    }
 	  else if (symtab != NULL)
-	    printf_unfiltered (is_enumeral 
+	    printf_unfiltered (is_enumeral
 			       ? "[%d] %s in %s (enumeral)\n"
 			       : "[%d] %s at %s:?\n",
 			       i + first_choice,
@@ -2747,17 +2657,18 @@
 	    printf_unfiltered (is_enumeral
 			       ? "[%d] %s (enumeral)\n"
 			       : "[%d] %s at ?\n",
-			       i + first_choice, SYMBOL_SOURCE_NAME (syms[i]));
+			       i + first_choice,
+			       SYMBOL_SOURCE_NAME (syms[i]));
 	}
     }
-  
+
   n_chosen = get_selections (chosen, nsyms, max_results, max_results > 1,
 			     "overload-choice");
 
   for (i = 0; i < n_chosen; i += 1)
     {
       syms[i] = syms[chosen[i]];
-      if (blocks != NULL) 
+      if (blocks != NULL)
 	blocks[i] = blocks[chosen[i]];
     }
 
@@ -2781,20 +2692,15 @@
    prompts (for use with the -f switch). */
 
 int
-get_selections (choices, n_choices, max_results, is_all_choice, 
-		annotation_suffix)
-     int* choices;
-     int n_choices;
-     int max_results;
-     int is_all_choice;
-     char* annotation_suffix;
+get_selections (int *choices, int n_choices, int max_results,
+		int is_all_choice, char *annotation_suffix)
 {
   int i;
-  char* args;
-  const char* prompt;
+  char *args;
+  const char *prompt;
   int n_chosen;
   int first_choice = is_all_choice ? 2 : 1;
-  
+
   prompt = getenv ("PS2");
   if (prompt == NULL)
     prompt = ">";
@@ -2803,7 +2709,7 @@
   gdb_flush (gdb_stdout);
 
   args = command_line_input ((char *) NULL, 0, annotation_suffix);
-  
+
   if (args == NULL)
     error_no_arg ("one or more choice numbers");
 
@@ -2813,7 +2719,7 @@
      order, as given in args.   Choices are validated. */
   while (1)
     {
-      char* args2;
+      char *args2;
       int choice, j;
 
       while (isspace (*args))
@@ -2824,11 +2730,12 @@
 	break;
 
       choice = strtol (args, &args2, 10);
-      if (args == args2 || choice < 0 || choice > n_choices + first_choice - 1)
+      if (args == args2 || choice < 0
+	  || choice > n_choices + first_choice - 1)
 	error ("Argument must be choice number");
       args = args2;
 
-      if (choice == 0) 
+      if (choice == 0)
 	error ("cancelled");
 
       if (choice < first_choice)
@@ -2840,22 +2747,23 @@
 	}
       choice -= first_choice;
 
-      for (j = n_chosen-1; j >= 0 && choice < choices[j]; j -= 1)
-	{}
+      for (j = n_chosen - 1; j >= 0 && choice < choices[j]; j -= 1)
+	{
+	}
 
       if (j < 0 || choice != choices[j])
 	{
 	  int k;
-	  for (k = n_chosen-1; k > j; k -= 1)
-	    choices[k+1] = choices[k];
-	  choices[j+1] = choice;
+	  for (k = n_chosen - 1; k > j; k -= 1)
+	    choices[k + 1] = choices[k];
+	  choices[j + 1] = choice;
 	  n_chosen += 1;
 	}
     }
 
   if (n_chosen > max_results)
     error ("Select no more than %d of the above", max_results);
-  
+
   return n_chosen;
 }
 
@@ -2864,23 +2772,21 @@
 /* arguments.  Update *EXPP as needed to hold more space. */
 
 static void
-replace_operator_with_call (expp, pc, nargs, oplen, sym, block)
-     struct expression** expp;
-     int pc, nargs, oplen;
-     struct symbol* sym;
-     struct block* block; 
+replace_operator_with_call (struct expression **expp, int pc, int nargs,
+			    int oplen, struct symbol *sym,
+			    struct block *block)
 {
   /* A new expression, with 6 more elements (3 for funcall, 4 for function
      symbol, -oplen for operator being replaced). */
-  struct expression* newexp = (struct expression*)
+  struct expression *newexp = (struct expression *)
     xmalloc (sizeof (struct expression)
 	     + EXP_ELEM_TO_BYTES ((*expp)->nelts + 7 - oplen));
-  struct expression* exp = *expp;
+  struct expression *exp = *expp;
 
   newexp->nelts = exp->nelts + 7 - oplen;
   newexp->language_defn = exp->language_defn;
   memcpy (newexp->elts, exp->elts, EXP_ELEM_TO_BYTES (pc));
-  memcpy (newexp->elts + pc + 7, exp->elts + pc + oplen, 
+  memcpy (newexp->elts + pc + 7, exp->elts + pc + oplen,
 	  EXP_ELEM_TO_BYTES (exp->nelts - pc - oplen));
 
   newexp->elts[pc].opcode = newexp->elts[pc + 2].opcode = OP_FUNCALL;
@@ -2891,8 +2797,8 @@
   newexp->elts[pc + 5].symbol = sym;
 
   *expp = newexp;
-  free (exp);
-}  
+  xfree (exp);
+}
 
 /* Type-class predicates */
 
@@ -2900,89 +2806,89 @@
 /* FLOAT.) */
 
 static int
-numeric_type_p (type)
-     struct type* type;
+numeric_type_p (struct type *type)
 {
   if (type == NULL)
     return 0;
-  else {
-    switch (TYPE_CODE (type))
-      {
-      case TYPE_CODE_INT:
-      case TYPE_CODE_FLT:
-	return 1;
-      case TYPE_CODE_RANGE:
-	return (type == TYPE_TARGET_TYPE (type)
-		|| numeric_type_p (TYPE_TARGET_TYPE (type)));
-      default:
-	return 0;
-      }
-  }
+  else
+    {
+      switch (TYPE_CODE (type))
+	{
+	case TYPE_CODE_INT:
+	case TYPE_CODE_FLT:
+	  return 1;
+	case TYPE_CODE_RANGE:
+	  return (type == TYPE_TARGET_TYPE (type)
+		  || numeric_type_p (TYPE_TARGET_TYPE (type)));
+	default:
+	  return 0;
+	}
+    }
 }
 
 /* True iff TYPE is integral (an INT or RANGE of INTs). */
 
 static int
-integer_type_p (type)
-     struct type* type;
+integer_type_p (struct type *type)
 {
   if (type == NULL)
     return 0;
-  else {
-    switch (TYPE_CODE (type))
-      {
-      case TYPE_CODE_INT:
-	return 1;
-      case TYPE_CODE_RANGE:
-	return (type == TYPE_TARGET_TYPE (type) 
-		|| integer_type_p (TYPE_TARGET_TYPE (type)));
-      default:
-	return 0;
-      }
-  }
+  else
+    {
+      switch (TYPE_CODE (type))
+	{
+	case TYPE_CODE_INT:
+	  return 1;
+	case TYPE_CODE_RANGE:
+	  return (type == TYPE_TARGET_TYPE (type)
+		  || integer_type_p (TYPE_TARGET_TYPE (type)));
+	default:
+	  return 0;
+	}
+    }
 }
 
 /* True iff TYPE is scalar (INT, RANGE, FLOAT, ENUM). */
 
 static int
-scalar_type_p (type)
-     struct type* type;
+scalar_type_p (struct type *type)
 {
   if (type == NULL)
     return 0;
-  else {
-    switch (TYPE_CODE (type))
-      {
-      case TYPE_CODE_INT:
-      case TYPE_CODE_RANGE:
-      case TYPE_CODE_ENUM:
-      case TYPE_CODE_FLT:
-	return 1;
-      default:
-	return 0;
-      }
-  }
+  else
+    {
+      switch (TYPE_CODE (type))
+	{
+	case TYPE_CODE_INT:
+	case TYPE_CODE_RANGE:
+	case TYPE_CODE_ENUM:
+	case TYPE_CODE_FLT:
+	  return 1;
+	default:
+	  return 0;
+	}
+    }
 }
 
 /* True iff TYPE is discrete (INT, RANGE, ENUM). */
 
 static int
-discrete_type_p (type)
-     struct type* type;
+discrete_type_p (struct type *type)
 {
   if (type == NULL)
     return 0;
-  else {
-    switch (TYPE_CODE (type))
-      {
-      case TYPE_CODE_INT:
-      case TYPE_CODE_RANGE:
-      case TYPE_CODE_ENUM:
-	return 1;
-      default:
-	return 0;
-      }
-  }
+  else
+    {
+      switch (TYPE_CODE (type))
+	{
+	case TYPE_CODE_INT:
+	case TYPE_CODE_RANGE:
+	case TYPE_CODE_ENUM:
+	  return 1;
+	default:
+	  return 0;
+	}
+    }
 }
 
 /* Returns non-zero if OP with operatands in the vector ARGS could be
@@ -2990,14 +2896,12 @@
    (i.e., result 0). */
 
 static int
-possible_user_operator_p (op, args)
-     enum exp_opcode op;
-     struct value* args[];
+possible_user_operator_p (enum exp_opcode op, struct value *args[])
 {
-  struct type* type0 = check_typedef (VALUE_TYPE (args[0]));
-  struct type* type1 = 
+  struct type *type0 = check_typedef (VALUE_TYPE (args[0]));
+  struct type *type1 =
     (args[1] == NULL) ? NULL : check_typedef (VALUE_TYPE (args[1]));
-  
+
   switch (op)
     {
     default:
@@ -3007,14 +2911,14 @@
     case BINOP_SUB:
     case BINOP_MUL:
     case BINOP_DIV:
-      return (! (numeric_type_p (type0) && numeric_type_p (type1)));
+      return (!(numeric_type_p (type0) && numeric_type_p (type1)));
 
     case BINOP_REM:
     case BINOP_MOD:
     case BINOP_BITWISE_AND:
     case BINOP_BITWISE_IOR:
     case BINOP_BITWISE_XOR:
-      return (! (integer_type_p (type0) && integer_type_p (type1)));
+      return (!(integer_type_p (type0) && integer_type_p (type1)));
 
     case BINOP_EQUAL:
     case BINOP_NOTEQUAL:
@@ -3022,26 +2926,25 @@
     case BINOP_GTR:
     case BINOP_LEQ:
     case BINOP_GEQ:
-      return (! (scalar_type_p (type0) && scalar_type_p (type1)));
+      return (!(scalar_type_p (type0) && scalar_type_p (type1)));
 
     case BINOP_CONCAT:
-      return ((TYPE_CODE (type0) != TYPE_CODE_ARRAY && 
-	       (TYPE_CODE (type0) != TYPE_CODE_PTR || 
-		TYPE_CODE (TYPE_TARGET_TYPE (type0)) 
-		    != TYPE_CODE_ARRAY))
-	      || (TYPE_CODE (type1) != TYPE_CODE_ARRAY && 
-		  (TYPE_CODE (type1) != TYPE_CODE_PTR || 
-		   TYPE_CODE (TYPE_TARGET_TYPE (type1)) 
-		     != TYPE_CODE_ARRAY)));
+      return ((TYPE_CODE (type0) != TYPE_CODE_ARRAY &&
+	       (TYPE_CODE (type0) != TYPE_CODE_PTR ||
+		TYPE_CODE (TYPE_TARGET_TYPE (type0))
+		!= TYPE_CODE_ARRAY))
+	      || (TYPE_CODE (type1) != TYPE_CODE_ARRAY &&
+		  (TYPE_CODE (type1) != TYPE_CODE_PTR ||
+		   TYPE_CODE (TYPE_TARGET_TYPE (type1)) != TYPE_CODE_ARRAY)));
 
     case BINOP_EXP:
-      return (! (numeric_type_p (type0) && integer_type_p (type1)));
+      return (!(numeric_type_p (type0) && integer_type_p (type1)));
 
     case UNOP_NEG:
     case UNOP_PLUS:
     case UNOP_LOGICAL_NOT:
-    case UNOP_ABS:      
-      return (! numeric_type_p (type0));
+    case UNOP_ABS:
+      return (!numeric_type_p (type0));
 
     }
 }
@@ -3056,16 +2959,15 @@
  * is XR for an object renaming, XRP for a procedure renaming, XRE for
  * an exception renaming, and XRS for a subprogram renaming.  Returns
  * NULL if NAME encodes none of these. */
-const char*
-ada_renaming_type (type)
-     struct type* type;
+const char *
+ada_renaming_type (struct type *type)
 {
   if (type != NULL && TYPE_CODE (type) == TYPE_CODE_ENUM)
     {
-      const char* name = type_name_no_tag (type);
-      const char* suffix = (name == NULL) ? NULL : strstr (name, "___XR");
-      if (suffix == NULL 
-      || (suffix[5] != '\000' && strchr ("PES_", suffix[5]) == NULL))
+      const char *name = type_name_no_tag (type);
+      const char *suffix = (name == NULL) ? NULL : strstr (name, "___XR");
+      if (suffix == NULL
+	  || (suffix[5] != '\000' && strchr ("PES_", suffix[5]) == NULL))
 	return NULL;
       else
 	return suffix + 3;
@@ -3076,25 +2978,23 @@
 
 /* Return non-zero iff SYM encodes an object renaming. */
 int
-ada_is_object_renaming (sym)
-     struct symbol* sym;
+ada_is_object_renaming (struct symbol *sym)
 {
-  const char* renaming_type = ada_renaming_type (SYMBOL_TYPE (sym));
-  return renaming_type != NULL 
+  const char *renaming_type = ada_renaming_type (SYMBOL_TYPE (sym));
+  return renaming_type != NULL
     && (renaming_type[2] == '\0' || renaming_type[2] == '_');
 }
 
 /* Assuming that SYM encodes a non-object renaming, returns the original
  * name of the renamed entity.   The name is good until the end of
  * parsing. */
-const char*
-ada_simple_renamed_entity (sym)
-     struct symbol* sym;
+const char *
+ada_simple_renamed_entity (struct symbol *sym)
 {
-  struct type* type;
-  const char* raw_name;
+  struct type *type;
+  const char *raw_name;
   int len;
-  char* result;
+  char *result;
 
   type = SYMBOL_TYPE (sym);
   if (type == NULL || TYPE_NFIELDS (type) < 1)
@@ -3106,31 +3006,30 @@
     error ("Improperly encoded renaming.");
 
   result = xmalloc (len + 1);
-  /* FIXME: add_name_string_cleanup should be defined in parse.c */  
-  /*  add_name_string_cleanup (result);*/
+  /* FIXME: add_name_string_cleanup should be defined in parse.c */
+  /*  add_name_string_cleanup (result); */
   strncpy (result, raw_name, len);
   result[len] = '\000';
   return result;
 }
-
 
+
 				/* Evaluation: Function Calls */
 
 /* Copy VAL onto the stack, using and updating *SP as the stack 
    pointer. Return VAL as an lvalue. */
 
-static struct value*
-place_on_stack (val, sp)
-    struct value* val;
-     CORE_ADDR* sp;
+static struct value *
+place_on_stack (struct value *val, CORE_ADDR *sp)
 {
   CORE_ADDR old_sp = *sp;
 
 #ifdef STACK_ALIGN
-  *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val), 
-		    STACK_ALIGN (TYPE_LENGTH (check_typedef (VALUE_TYPE (val)))));
+  *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val),
+		    STACK_ALIGN (TYPE_LENGTH
+				 (check_typedef (VALUE_TYPE (val)))));
 #else
-  *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val), 
+  *sp = push_bytes (*sp, VALUE_CONTENTS_RAW (val),
 		    TYPE_LENGTH (check_typedef (VALUE_TYPE (val))));
 #endif
 
@@ -3146,22 +3045,20 @@
 /* Return the value ACTUAL, converted to be an appropriate value for a
    formal of type FORMAL_TYPE.  Use *SP as a stack pointer for
    allocating any necessary descriptors (fat pointers), or copies of
-   values not residing in memory, updating it as needed. */ 
+   values not residing in memory, updating it as needed. */
 
-static struct value*
-convert_actual (actual, formal_type0, sp)
-     struct value* actual;
-     struct type* formal_type0;
-     CORE_ADDR* sp;
+static struct value *
+convert_actual (struct value *actual, struct type *formal_type0,
+		CORE_ADDR *sp)
 {
-  struct type* actual_type = check_typedef (VALUE_TYPE (actual));
-  struct type* formal_type = check_typedef (formal_type0);
-  struct type* formal_target =
-    TYPE_CODE (formal_type) == TYPE_CODE_PTR 
-      ? check_typedef (TYPE_TARGET_TYPE (formal_type)) : formal_type;
-  struct type* actual_target = 
-    TYPE_CODE (actual_type) == TYPE_CODE_PTR 
-      ? check_typedef (TYPE_TARGET_TYPE (actual_type)) : actual_type;
+  struct type *actual_type = check_typedef (VALUE_TYPE (actual));
+  struct type *formal_type = check_typedef (formal_type0);
+  struct type *formal_target =
+    TYPE_CODE (formal_type) == TYPE_CODE_PTR
+    ? check_typedef (TYPE_TARGET_TYPE (formal_type)) : formal_type;
+  struct type *actual_target =
+    TYPE_CODE (actual_type) == TYPE_CODE_PTR
+    ? check_typedef (TYPE_TARGET_TYPE (actual_type)) : actual_type;
 
   if (ada_is_array_descriptor (formal_target)
       && TYPE_CODE (actual_target) == TYPE_CODE_ARRAY)
@@ -3169,17 +3066,17 @@
   else if (TYPE_CODE (formal_type) == TYPE_CODE_PTR)
     {
       if (TYPE_CODE (formal_target) == TYPE_CODE_ARRAY
-	  && ada_is_array_descriptor (actual_target)) 
+	  && ada_is_array_descriptor (actual_target))
 	return desc_data (actual);
       else if (TYPE_CODE (actual_type) != TYPE_CODE_PTR)
 	{
 	  if (VALUE_LVAL (actual) != lval_memory)
 	    {
-	      struct value* val;
+	      struct value *val;
 	      actual_type = check_typedef (VALUE_TYPE (actual));
 	      val = allocate_value (actual_type);
-	      memcpy ((char*) VALUE_CONTENTS_RAW (val), 
-		      (char*) VALUE_CONTENTS (actual),
+	      memcpy ((char *) VALUE_CONTENTS_RAW (val),
+		      (char *) VALUE_CONTENTS (actual),
 		      TYPE_LENGTH (actual_type));
 	      actual = place_on_stack (val, sp);
 	    }
@@ -3199,33 +3096,30 @@
    to-descriptor type rather than a descriptor type), a struct value*
    representing a pointer to this descriptor. */
 
-static struct value*
-make_array_descriptor (type, arr, sp)
-     struct type* type;
-     struct value* arr;
-     CORE_ADDR* sp;
+static struct value *
+make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
 {
-  struct type* bounds_type = desc_bounds_type (type);
-  struct type* desc_type = desc_base_type (type);
-  struct value* descriptor = allocate_value (desc_type);
-  struct value* bounds = allocate_value (bounds_type);
+  struct type *bounds_type = desc_bounds_type (type);
+  struct type *desc_type = desc_base_type (type);
+  struct value *descriptor = allocate_value (desc_type);
+  struct value *bounds = allocate_value (bounds_type);
   CORE_ADDR bounds_addr;
   int i;
-  
+
   for (i = ada_array_arity (check_typedef (VALUE_TYPE (arr))); i > 0; i -= 1)
     {
       modify_general_field (VALUE_CONTENTS (bounds),
-			    value_as_long (ada_array_bound (arr, i, 0)), 
+			    value_as_long (ada_array_bound (arr, i, 0)),
 			    desc_bound_bitpos (bounds_type, i, 0),
 			    desc_bound_bitsize (bounds_type, i, 0));
       modify_general_field (VALUE_CONTENTS (bounds),
-			    value_as_long (ada_array_bound (arr, i, 1)), 
+			    value_as_long (ada_array_bound (arr, i, 1)),
 			    desc_bound_bitpos (bounds_type, i, 1),
 			    desc_bound_bitsize (bounds_type, i, 1));
     }
-  
+
   bounds = place_on_stack (bounds, sp);
-  
+
   modify_general_field (VALUE_CONTENTS (descriptor),
 			arr,
 			fat_pntr_data_bitpos (desc_type),
@@ -3253,26 +3147,21 @@
    value as needed. */
 
 void
-ada_convert_actuals (func, nargs, args, sp)
-     struct value* func;
-     int nargs;
-     struct value* args[];
-     CORE_ADDR* sp;
+ada_convert_actuals (struct value *func, int nargs, struct value *args[],
+		     CORE_ADDR *sp)
 {
   int i;
 
-  if (TYPE_NFIELDS (VALUE_TYPE (func)) == 0 
+  if (TYPE_NFIELDS (VALUE_TYPE (func)) == 0
       || nargs != TYPE_NFIELDS (VALUE_TYPE (func)))
     return;
 
   for (i = 0; i < nargs; i += 1)
-    args[i] = 
-      convert_actual (args[i], 
-		      TYPE_FIELD_TYPE (VALUE_TYPE (func), i), 
-		      sp);
+    args[i] =
+      convert_actual (args[i], TYPE_FIELD_TYPE (VALUE_TYPE (func), i), sp);
 }
-
 
+
 				/* Symbol Lookup */
 
 
@@ -3280,36 +3169,32 @@
 /* ada_lookup_symbol_list. */
 
 /* Current size of defn_symbols and defn_blocks */
-static size_t defn_vector_size = 0; 
+static size_t defn_vector_size = 0;
 
 /* Current number of symbols found. */
 static int ndefns = 0;
 
-static struct symbol** defn_symbols = NULL;
-static struct block** defn_blocks = NULL;
+static struct symbol **defn_symbols = NULL;
+static struct block **defn_blocks = NULL;
 
 /* Return the result of a standard (literal, C-like) lookup of NAME in 
  * given NAMESPACE. */
 
-static struct symbol*
-standard_lookup (name, namespace)
-     const char* name;
-     namespace_enum namespace;
+static struct symbol *
+standard_lookup (const char *name, namespace_enum namespace)
 {
-  struct symbol* sym;
-  struct symtab* symtab;
-  sym = lookup_symbol (name, (struct block*) NULL, namespace, 0, &symtab);
+  struct symbol *sym;
+  struct symtab *symtab;
+  sym = lookup_symbol (name, (struct block *) NULL, namespace, 0, &symtab);
   return sym;
 }
-  
+
 
 /* Non-zero iff there is at least one non-function/non-enumeral symbol */
 /* in SYMS[0..N-1].  We treat enumerals as functions, since they */
-/* contend in overloading in the same way. */ 
+/* contend in overloading in the same way. */
 static int
-is_nonfunction (syms, n)
-     struct symbol* syms[];
-     int n;
+is_nonfunction (struct symbol *syms[], int n)
 {
   int i;
 
@@ -3325,21 +3210,19 @@
    struct types.  Otherwise, they may not. */
 
 static int
-equiv_types (type0, type1)
-     struct type* type0;
-     struct type* type1;
+equiv_types (struct type *type0, struct type *type1)
 {
-  if (type0 == type1) 
+  if (type0 == type1)
     return 1;
-  if (type0 == NULL || type1 == NULL 
+  if (type0 == NULL || type1 == NULL
       || TYPE_CODE (type0) != TYPE_CODE (type1))
     return 0;
-  if ((TYPE_CODE (type0) == TYPE_CODE_STRUCT 
+  if ((TYPE_CODE (type0) == TYPE_CODE_STRUCT
        || TYPE_CODE (type0) == TYPE_CODE_ENUM)
       && ada_type_name (type0) != NULL && ada_type_name (type1) != NULL
       && STREQ (ada_type_name (type0), ada_type_name (type1)))
     return 1;
-  
+
   return 0;
 }
 
@@ -3347,9 +3230,7 @@
    no more defined than that of SYM1. */
 
 static int
-lesseq_defined_than (sym0, sym1)
-     struct symbol* sym0;
-     struct symbol* sym1;
+lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
 {
   if (sym0 == sym1)
     return 1;
@@ -3357,18 +3238,18 @@
       || SYMBOL_CLASS (sym0) != SYMBOL_CLASS (sym1))
     return 0;
 
-  switch (SYMBOL_CLASS (sym0)) 
+  switch (SYMBOL_CLASS (sym0))
     {
     case LOC_UNDEF:
       return 1;
     case LOC_TYPEDEF:
       {
-	struct type* type0 = SYMBOL_TYPE (sym0);
-	struct type* type1 = SYMBOL_TYPE (sym1);
-	char* name0 = SYMBOL_NAME (sym0);
-	char* name1 = SYMBOL_NAME (sym1);
+	struct type *type0 = SYMBOL_TYPE (sym0);
+	struct type *type1 = SYMBOL_TYPE (sym1);
+	char *name0 = SYMBOL_NAME (sym0);
+	char *name1 = SYMBOL_NAME (sym1);
 	int len0 = strlen (name0);
-	return 
+	return
 	  TYPE_CODE (type0) == TYPE_CODE (type1)
 	  && (equiv_types (type0, type1)
 	      || (len0 < strlen (name1) && STREQN (name0, name1, len0)
@@ -3377,8 +3258,8 @@
     case LOC_CONST:
       return SYMBOL_VALUE (sym0) == SYMBOL_VALUE (sym1)
 	&& equiv_types (SYMBOL_TYPE (sym0), SYMBOL_TYPE (sym1));
-    default: 
-      return 0;      
+    default:
+      return 0;
     }
 }
 
@@ -3387,14 +3268,12 @@
    defn_blocks as needed.   Do not include SYM if it is a duplicate.  */
 
 static void
-add_defn_to_vec (sym, block)
-     struct symbol* sym;
-     struct block* block;
+add_defn_to_vec (struct symbol *sym, struct block *block)
 {
   int i;
   size_t tmp;
 
-  if (SYMBOL_TYPE (sym) != NULL) 
+  if (SYMBOL_TYPE (sym) != NULL)
     CHECK_TYPEDEF (SYMBOL_TYPE (sym));
   for (i = 0; i < ndefns; i += 1)
     {
@@ -3409,8 +3288,8 @@
     }
 
   tmp = defn_vector_size;
-  GROW_VECT (defn_symbols, tmp, ndefns+2);
-  GROW_VECT (defn_blocks, defn_vector_size, ndefns+2);
+  GROW_VECT (defn_symbols, tmp, ndefns + 2);
+  GROW_VECT (defn_blocks, defn_vector_size, ndefns + 2);
 
   defn_symbols[ndefns] = sym;
   defn_blocks[ndefns] = block;
@@ -3422,12 +3301,8 @@
    wild-card match if WILD. */
 
 static struct partial_symbol *
-ada_lookup_partial_symbol (pst, name, global, namespace, wild)
-     struct partial_symtab *pst;
-     const char *name;
-     int global;
-     namespace_enum namespace;
-     int wild;
+ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name,
+			   int global, namespace_enum namespace, int wild)
 {
   struct partial_symbol **start;
   int name_len = strlen (name);
@@ -3438,16 +3313,16 @@
     {
       return (NULL);
     }
-  
+
   start = (global ?
 	   pst->objfile->global_psymbols.list + pst->globals_offset :
-	   pst->objfile->static_psymbols.list + pst->statics_offset  );
+	   pst->objfile->static_psymbols.list + pst->statics_offset);
 
   if (wild)
     {
       for (i = 0; i < length; i += 1)
 	{
-	  struct partial_symbol* psym = start[i];
+	  struct partial_symbol *psym = start[i];
 
 	  if (SYMBOL_NAMESPACE (psym) == namespace &&
 	      wild_match (name, name_len, SYMBOL_NAME (psym)))
@@ -3455,22 +3330,23 @@
 	}
       return NULL;
     }
-  else 
+  else
     {
       if (global)
 	{
 	  int U;
-	  i = 0; U = length-1;
-	  while (U - i > 4) 
+	  i = 0;
+	  U = length - 1;
+	  while (U - i > 4)
 	    {
-	      int M = (U+i) >> 1;
-	      struct partial_symbol* psym = start[M];
+	      int M = (U + i) >> 1;
+	      struct partial_symbol *psym = start[M];
 	      if (SYMBOL_NAME (psym)[0] < name[0])
-		i = M+1;
+		i = M + 1;
 	      else if (SYMBOL_NAME (psym)[0] > name[0])
-		U = M-1;
+		U = M - 1;
 	      else if (strcmp (SYMBOL_NAME (psym), name) < 0)
-		i = M+1;
+		i = M + 1;
 	      else
 		U = M;
 	    }
@@ -3485,14 +3361,14 @@
 	  if (SYMBOL_NAMESPACE (psym) == namespace)
 	    {
 	      int cmp = strncmp (name, SYMBOL_NAME (psym), name_len);
-	
-	      if (cmp < 0) 
+
+	      if (cmp < 0)
 		{
 		  if (global)
 		    break;
 		}
-	      else if (cmp == 0 
-		       && is_name_suffix (SYMBOL_NAME (psym) + name_len)) 
+	      else if (cmp == 0
+		       && is_name_suffix (SYMBOL_NAME (psym) + name_len))
 		return psym;
 	    }
 	  i += 1;
@@ -3501,17 +3377,18 @@
       if (global)
 	{
 	  int U;
-	  i = 0; U = length-1;
-	  while (U - i > 4) 
+	  i = 0;
+	  U = length - 1;
+	  while (U - i > 4)
 	    {
-	      int M = (U+i) >> 1;
+	      int M = (U + i) >> 1;
 	      struct partial_symbol *psym = start[M];
 	      if (SYMBOL_NAME (psym)[0] < '_')
-		i = M+1;
+		i = M + 1;
 	      else if (SYMBOL_NAME (psym)[0] > '_')
-		U = M-1;
+		U = M - 1;
 	      else if (strcmp (SYMBOL_NAME (psym), "_ada_") < 0)
-		i = M+1;
+		i = M + 1;
 	      else
 		U = M;
 	    }
@@ -3521,115 +3398,111 @@
 
       while (i < length)
 	{
-	  struct partial_symbol* psym = start[i];
+	  struct partial_symbol *psym = start[i];
 
 	  if (SYMBOL_NAMESPACE (psym) == namespace)
 	    {
 	      int cmp;
 
 	      cmp = (int) '_' - (int) SYMBOL_NAME (psym)[0];
-	      if (cmp == 0) 
+	      if (cmp == 0)
 		{
 		  cmp = strncmp ("_ada_", SYMBOL_NAME (psym), 5);
 		  if (cmp == 0)
 		    cmp = strncmp (name, SYMBOL_NAME (psym) + 5, name_len);
 		}
-	
-	      if (cmp < 0) 
+
+	      if (cmp < 0)
 		{
 		  if (global)
 		    break;
 		}
-	      else if (cmp == 0 
-		       && is_name_suffix (SYMBOL_NAME (psym) + name_len + 5)) 
+	      else if (cmp == 0
+		       && is_name_suffix (SYMBOL_NAME (psym) + name_len + 5))
 		return psym;
 	    }
 	  i += 1;
 	}
-      
+
     }
   return NULL;
 }
 
 
 /* Find a symbol table containing symbol SYM or NULL if none.  */
-static struct symtab*
-symtab_for_sym (sym)
-     struct symbol* sym;
+static struct symtab *
+symtab_for_sym (struct symbol *sym)
 {
-  struct symtab* s;
+  struct symtab *s;
   struct objfile *objfile;
   struct block *b;
+  struct symbol *tmp_sym;
   int i, j;
 
   ALL_SYMTABS (objfile, s)
-    {
-      switch (SYMBOL_CLASS (sym))
-	{
-	case LOC_CONST:
-	case LOC_STATIC:
-	case LOC_TYPEDEF:
-	case LOC_REGISTER:
-	case LOC_LABEL:
-	case LOC_BLOCK:
-	case LOC_CONST_BYTES:
-	  b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
-	  for (i = 0; i < BLOCK_NSYMS (b); i += 1)
-	    if (sym == BLOCK_SYM (b, i))
+  {
+    switch (SYMBOL_CLASS (sym))
+      {
+      case LOC_CONST:
+      case LOC_STATIC:
+      case LOC_TYPEDEF:
+      case LOC_REGISTER:
+      case LOC_LABEL:
+      case LOC_BLOCK:
+      case LOC_CONST_BYTES:
+	b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+	ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
+	  return s;
+	b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+	ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
+	  return s;
+	break;
+      default:
+	break;
+      }
+    switch (SYMBOL_CLASS (sym))
+      {
+      case LOC_REGISTER:
+      case LOC_ARG:
+      case LOC_REF_ARG:
+      case LOC_REGPARM:
+      case LOC_REGPARM_ADDR:
+      case LOC_LOCAL:
+      case LOC_TYPEDEF:
+      case LOC_LOCAL_ARG:
+      case LOC_BASEREG:
+      case LOC_BASEREG_ARG:
+	for (j = FIRST_LOCAL_BLOCK;
+	     j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
+	  {
+	    b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
+	    ALL_BLOCK_SYMBOLS (b, i, tmp_sym) if (sym == tmp_sym)
 	      return s;
-	  b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
-	  for (i = 0; i < BLOCK_NSYMS (b); i += 1)
-	    if (sym == BLOCK_SYM (b, i))
-	      return s;
-	  break;
-	default:
-	  break;
-	}
-      switch (SYMBOL_CLASS (sym))
-	{
-	case LOC_REGISTER:
-	case LOC_ARG:
-	case LOC_REF_ARG:
-	case LOC_REGPARM:
-	case LOC_REGPARM_ADDR:
-	case LOC_LOCAL:
-	case LOC_TYPEDEF:
-	case LOC_LOCAL_ARG:
-	case LOC_BASEREG:
-	case LOC_BASEREG_ARG:
-	  for (j = FIRST_LOCAL_BLOCK; 
-	       j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
-	    {
-	      b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
-	      for (i = 0; i < BLOCK_NSYMS (b); i += 1)
-		if (sym == BLOCK_SYM (b, i))
-		  return s;
-	    }
-	  break;
-	default:
-	  break;
-	}
-    }
+	  }
+	break;
+      default:
+	break;
+      }
+  }
   return NULL;
 }
 
 /* Return a minimal symbol matching NAME according to Ada demangling 
    rules. Returns NULL if there is no such minimal symbol. */
 
-struct minimal_symbol*
-ada_lookup_minimal_symbol (name)
-     const char* name;
+struct minimal_symbol *
+ada_lookup_minimal_symbol (const char *name)
 {
-  struct objfile* objfile;
-  struct minimal_symbol* msymbol;
+  struct objfile *objfile;
+  struct minimal_symbol *msymbol;
   int wild_match = (strstr (name, "__") == NULL);
 
   ALL_MSYMBOLS (objfile, msymbol)
-    {
-      if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match)
-	  && MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
-	return msymbol;
-    }
+  {
+    if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match)
+	&& MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
+      return msymbol;
+  }
 
   return NULL;
 }
@@ -3644,18 +3517,16 @@
  * frame as a static link, and then searches up the call stack for a
  * frame with that same local-variable base. */
 static void
-add_symbols_from_enclosing_procs (name, namespace, wild_match)
-     const char* name;
-     namespace_enum namespace;
-     int wild_match;
+add_symbols_from_enclosing_procs (const char *name, namespace_enum namespace,
+				  int wild_match)
 {
 #ifdef i386
   static struct symbol static_link_sym;
   static struct symbol *static_link;
 
-  struct cleanup* old_chain = make_cleanup (null_cleanup, NULL);
-  struct frame_info* frame;
-  struct frame_info* target_frame;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+  struct frame_info *frame;
+  struct frame_info *target_frame;
 
   if (static_link == NULL)
     {
@@ -3667,15 +3538,15 @@
       SYMBOL_CLASS (static_link) = LOC_LOCAL;
       SYMBOL_NAMESPACE (static_link) = VAR_NAMESPACE;
       SYMBOL_TYPE (static_link) = lookup_pointer_type (builtin_type_void);
-      SYMBOL_VALUE (static_link) = 
-	- (long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
+      SYMBOL_VALUE (static_link) =
+	-(long) TYPE_LENGTH (SYMBOL_TYPE (static_link));
     }
 
   frame = selected_frame;
   while (frame != NULL && ndefns == 0)
     {
-      struct block* block;
-      struct value* target_link_val = read_var_value (static_link, frame);
+      struct block *block;
+      struct value *target_link_val = read_var_value (static_link, frame);
       CORE_ADDR target_link;
 
       if (target_link_val == NULL)
@@ -3683,10 +3554,12 @@
       QUIT;
 
       target_link = target_link_val;
-      do {
+      do
+	{
 	  QUIT;
 	  frame = get_prev_frame (frame);
-      } while (frame != NULL && FRAME_LOCALS_ADDRESS (frame) != target_link);
+	}
+      while (frame != NULL && FRAME_LOCALS_ADDRESS (frame) != target_link);
 
       if (frame == NULL)
 	break;
@@ -3695,7 +3568,7 @@
       while (block != NULL && block_function (block) != NULL && ndefns == 0)
 	{
 	  ada_add_block_symbols (block, name, namespace, NULL, wild_match);
-      
+
 	  block = BLOCK_SUPERBLOCK (block);
 	}
     }
@@ -3707,10 +3580,9 @@
 /* True if TYPE is definitely an artificial type supplied to a symbol
  * for which no debugging information was given in the symbol file. */
 static int
-is_nondebugging_type (type)
-     struct type* type;
+is_nondebugging_type (struct type *type)
 {
-  char* name = ada_type_name (type);
+  char *name = ada_type_name (type);
   return (name != NULL && STREQ (name, "<variable, no debug info>"));
 }
 
@@ -3723,33 +3595,31 @@
  * correspondence between SYMS[i] and BLOCKS[i].  Returns the number
  * of symbols in the modified list. */
 static int
-remove_extra_symbols (syms, blocks, nsyms)
-     struct symbol** syms;
-     struct block** blocks;
-     int nsyms;
+remove_extra_symbols (struct symbol **syms, struct block **blocks, int nsyms)
 {
   int i, j;
 
   i = 0;
   while (i < nsyms)
     {
-      if (SYMBOL_NAME (syms[i]) != NULL && SYMBOL_CLASS (syms[i]) == LOC_STATIC
+      if (SYMBOL_NAME (syms[i]) != NULL
+	  && SYMBOL_CLASS (syms[i]) == LOC_STATIC
 	  && is_nondebugging_type (SYMBOL_TYPE (syms[i])))
 	{
 	  for (j = 0; j < nsyms; j += 1)
 	    {
-	      if (i != j 
+	      if (i != j
 		  && SYMBOL_NAME (syms[j]) != NULL
 		  && STREQ (SYMBOL_NAME (syms[i]), SYMBOL_NAME (syms[j]))
 		  && SYMBOL_CLASS (syms[i]) == SYMBOL_CLASS (syms[j])
-		  && SYMBOL_VALUE_ADDRESS (syms[i]) 
+		  && SYMBOL_VALUE_ADDRESS (syms[i])
 		  == SYMBOL_VALUE_ADDRESS (syms[j]))
 		{
 		  int k;
-		  for (k = i+1; k < nsyms; k += 1) 
+		  for (k = i + 1; k < nsyms; k += 1)
 		    {
-		      syms[k-1] = syms[k];
-		      blocks[k-1] = blocks[k];
+		      syms[k - 1] = syms[k];
+		      blocks[k - 1] = blocks[k];
 		    }
 		  nsyms -= 1;
 		  goto NextSymbol;
@@ -3775,12 +3645,9 @@
    surrounding BLOCK0, then these alone are returned. */
 
 int
-ada_lookup_symbol_list (name, block0, namespace, syms, blocks)
-     const char *name;
-     struct block *block0;
-     namespace_enum namespace;
-     struct symbol*** syms;
-     struct block*** blocks;
+ada_lookup_symbol_list (const char *name, struct block *block0,
+			namespace_enum namespace, struct symbol ***syms,
+			struct block ***blocks)
 {
   struct symbol *sym;
   struct symtab *s;
@@ -3818,117 +3685,117 @@
 
   if (ndefns > 0)
     goto done;
-  
+
   cacheIfUnique = 1;
 
   /* Now add symbols from all global blocks: symbol tables, minimal symbol
      tables, and psymtab's */
 
   ALL_SYMTABS (objfile, s)
-    {
-      QUIT;
-      if (! s->primary)
-	continue;
-      bv = BLOCKVECTOR (s);
-      block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
-      ada_add_block_symbols (block, name, namespace, objfile, wild_match);
-    }
+  {
+    QUIT;
+    if (!s->primary)
+      continue;
+    bv = BLOCKVECTOR (s);
+    block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+    ada_add_block_symbols (block, name, namespace, objfile, wild_match);
+  }
 
   if (namespace == VAR_NAMESPACE)
     {
       ALL_MSYMBOLS (objfile, msymbol)
-	{
-	  if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match))
-	    {
-	      switch (MSYMBOL_TYPE (msymbol))
-		{
-		case mst_solib_trampoline:
-		  break;
-		default:
-		  s = find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol));
-		  if (s != NULL)
-		    {
-		      int old_ndefns = ndefns;
-		      QUIT;
-		      bv = BLOCKVECTOR (s);
-		      block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
-		      ada_add_block_symbols (block, 
-					     SYMBOL_NAME (msymbol), 
-					     namespace, objfile, wild_match);
-		      if (ndefns == old_ndefns) 
-			{
-			  block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
-			  ada_add_block_symbols (block, 
-						 SYMBOL_NAME (msymbol), 
-						 namespace, objfile,
-						 wild_match);
-			}
-		    }
-		}
-	    }
-	}
+      {
+	if (ada_match_name (SYMBOL_NAME (msymbol), name, wild_match))
+	  {
+	    switch (MSYMBOL_TYPE (msymbol))
+	      {
+	      case mst_solib_trampoline:
+		break;
+	      default:
+		s = find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol));
+		if (s != NULL)
+		  {
+		    int old_ndefns = ndefns;
+		    QUIT;
+		    bv = BLOCKVECTOR (s);
+		    block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+		    ada_add_block_symbols (block,
+					   SYMBOL_NAME (msymbol),
+					   namespace, objfile, wild_match);
+		    if (ndefns == old_ndefns)
+		      {
+			block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+			ada_add_block_symbols (block,
+					       SYMBOL_NAME (msymbol),
+					       namespace, objfile,
+					       wild_match);
+		      }
+		  }
+	      }
+	  }
+      }
     }
-      
+
   ALL_PSYMTABS (objfile, ps)
-    {
-      QUIT;
-      if (!ps->readin 
-	  && ada_lookup_partial_symbol (ps, name, 1, namespace, wild_match))
-	{
-	  s = PSYMTAB_TO_SYMTAB (ps);
-	  if (! s->primary)
-	    continue;
-	  bv = BLOCKVECTOR (s);
-	  block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
-	  ada_add_block_symbols (block, name, namespace, objfile, wild_match);
-	}
-    }
-  
+  {
+    QUIT;
+    if (!ps->readin
+	&& ada_lookup_partial_symbol (ps, name, 1, namespace, wild_match))
+      {
+	s = PSYMTAB_TO_SYMTAB (ps);
+	if (!s->primary)
+	  continue;
+	bv = BLOCKVECTOR (s);
+	block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
+	ada_add_block_symbols (block, name, namespace, objfile, wild_match);
+      }
+  }
+
   /* Now add symbols from all per-file blocks if we've gotten no hits.  
      (Not strictly correct, but perhaps better than an error).
      Do the symtabs first, then check the psymtabs */
-  
+
   if (ndefns == 0)
     {
 
       ALL_SYMTABS (objfile, s)
-	{
-	  QUIT;
-	  if (! s->primary)
-	    continue;
-	  bv = BLOCKVECTOR (s);
-	  block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
-	  ada_add_block_symbols (block, name, namespace, objfile, wild_match);
-	}
-      
+      {
+	QUIT;
+	if (!s->primary)
+	  continue;
+	bv = BLOCKVECTOR (s);
+	block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+	ada_add_block_symbols (block, name, namespace, objfile, wild_match);
+      }
+
       ALL_PSYMTABS (objfile, ps)
-	{
-	  QUIT;
-	  if (!ps->readin 
-	      && ada_lookup_partial_symbol (ps, name, 0, namespace, wild_match))
-	    {
-	      s = PSYMTAB_TO_SYMTAB(ps);
-	      bv = BLOCKVECTOR (s);
-	      if (! s->primary)
-		continue;
-	      block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
-	      ada_add_block_symbols (block, name, namespace, 
-				     objfile, wild_match);
-	    }
-	}
-    }  
+      {
+	QUIT;
+	if (!ps->readin
+	    && ada_lookup_partial_symbol (ps, name, 0, namespace, wild_match))
+	  {
+	    s = PSYMTAB_TO_SYMTAB (ps);
+	    bv = BLOCKVECTOR (s);
+	    if (!s->primary)
+	      continue;
+	    block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+	    ada_add_block_symbols (block, name, namespace,
+				   objfile, wild_match);
+	  }
+      }
+    }
 
   /* Finally, we try to find NAME as a local symbol in some lexically
      enclosing block.  We do this last, expecting this case to be
      rare. */
-  if (ndefns == 0) 
+  if (ndefns == 0)
     {
       add_symbols_from_enclosing_procs (name, namespace, wild_match);
       if (ndefns > 0)
 	goto done;
     }
 
- done:
+done:
   ndefns = remove_extra_symbols (defn_symbols, defn_blocks, ndefns);
 
 
@@ -3946,14 +3813,12 @@
  * Otherwise, the result is as for ada_lookup_symbol_list, but is 
  * disambiguated by user query if needed. */
 
-struct symbol*
-ada_lookup_symbol (name, block0, namespace)
-     const char *name;
-     struct block *block0;
-     namespace_enum namespace;
+struct symbol *
+ada_lookup_symbol (const char *name, struct block *block0,
+		   namespace_enum namespace)
 {
-  struct symbol** candidate_syms;
-  struct block** candidate_blocks;
+  struct symbol **candidate_syms;
+  struct block **candidate_blocks;
   int n_candidates;
 
   n_candidates = ada_lookup_symbol_list (name,
@@ -3977,29 +3842,28 @@
  * 
  */
 static int
-is_name_suffix (str)
-     const char* str;
+is_name_suffix (const char *str)
 {
   int k;
   if (str[0] == 'X')
     {
       str += 1;
-      while (str[0] != '_' && str[0] != '\0') 
+      while (str[0] != '_' && str[0] != '\0')
 	{
 	  if (str[0] != 'n' && str[0] != 'b')
 	    return 0;
 	  str += 1;
-	} 
+	}
     }
   if (str[0] == '\000')
     return 1;
-  if (str[0] == '_') 
+  if (str[0] == '_')
     {
       if (str[1] != '_' || str[2] == '\000')
 	return 0;
-      if (str[2] == '_') 
+      if (str[2] == '_')
 	{
-	  if (STREQ (str+3, "LJM"))
+	  if (STREQ (str + 3, "LJM"))
 	    return 1;
 	  if (str[3] != 'X')
 	    return 0;
@@ -4024,48 +3888,49 @@
     }
   return 0;
 }
-      
+
 /* True if NAME represents a name of the form A1.A2....An, n>=1 and 
  * PATN[0..PATN_LEN-1] = Ak.Ak+1.....An for some k >= 1.  Ignores
  * informational suffixes of NAME (i.e., for which is_name_suffix is
- * true). */ 
+ * true). */
 static int
-wild_match (patn, patn_len, name)
-     const char* patn;
-     int patn_len;
-     const char* name;
+wild_match (const char *patn, int patn_len, const char *name)
 {
   int name_len;
   int s, e;
 
   name_len = strlen (name);
-  if (name_len >= patn_len+5 && STREQN (name, "_ada_", 5)
-      && STREQN (patn, name+5, patn_len)
-      && is_name_suffix (name+patn_len+5))
+  if (name_len >= patn_len + 5 && STREQN (name, "_ada_", 5)
+      && STREQN (patn, name + 5, patn_len)
+      && is_name_suffix (name + patn_len + 5))
     return 1;
 
-  while (name_len >= patn_len) 
+  while (name_len >= patn_len)
     {
-      if (STREQN (patn, name, patn_len)
-	  && is_name_suffix (name+patn_len))
+      if (STREQN (patn, name, patn_len) && is_name_suffix (name + patn_len))
 	return 1;
-      do {
-	name += 1; name_len -= 1;
-      } while (name_len > 0
-	       && name[0] != '.' && (name[0] != '_' || name[1] != '_'));
+      do
+	{
+	  name += 1;
+	  name_len -= 1;
+	}
+      while (name_len > 0
+	     && name[0] != '.' && (name[0] != '_' || name[1] != '_'));
       if (name_len <= 0)
 	return 0;
       if (name[0] == '_')
 	{
-	  if (! islower (name[2]))
+	  if (!islower (name[2]))
 	    return 0;
-	  name += 2; name_len -= 2;
+	  name += 2;
+	  name_len -= 2;
 	}
       else
 	{
-	  if (! islower (name[1]))
+	  if (!islower (name[1]))
 	    return 0;
-	  name += 1; name_len -= 1;
+	  name += 1;
+	  name_len -= 1;
 	}
     }
 
@@ -4079,13 +3944,10 @@
    currently stored in *defn_symbols).  If WILD, treat as NAME with a
    wildcard prefix. OBJFILE is the section containing BLOCK. */
 
-static void 
-ada_add_block_symbols (block, name, namespace, objfile, wild)
-     struct block* block;
-     const char* name;
-     namespace_enum namespace;
-     struct objfile* objfile;
-     int wild;
+static void
+ada_add_block_symbols (struct block *block, const char *name,
+		       namespace_enum namespace, struct objfile *objfile,
+		       int wild)
 {
   int i;
   int name_len = strlen (name);
@@ -4094,54 +3956,56 @@
   /* Set true when we find a matching non-argument symbol */
   int found_sym;
   int is_sorted = BLOCK_SHOULD_SORT (block);
+  struct symbol *sym;
 
-  arg_sym = NULL; found_sym = 0;
+  arg_sym = NULL;
+  found_sym = 0;
   if (wild)
     {
-      for (i = 0; i < BLOCK_NSYMS (block); i += 1)
-	{
-	  struct symbol *sym = BLOCK_SYM (block, i);
-
-	  if (SYMBOL_NAMESPACE (sym) == namespace &&
-	      wild_match (name, name_len, SYMBOL_NAME (sym)))
-	    {
-	      switch (SYMBOL_CLASS (sym))
-		{
-		case LOC_ARG:
-		case LOC_LOCAL_ARG:
-		case LOC_REF_ARG:
-		case LOC_REGPARM:
-		case LOC_REGPARM_ADDR:
-		case LOC_BASEREG_ARG:
-		  arg_sym = sym;
-		  break;
-		case LOC_UNRESOLVED:
-		  continue;
-		default:
-		  found_sym = 1;
-		  fill_in_ada_prototype (sym);
-		  add_defn_to_vec (fixup_symbol_section (sym, objfile), block);
-		  break;
-		}
-	    }
-	}
+      struct symbol *sym;
+      ALL_BLOCK_SYMBOLS (block, i, sym)
+      {
+	if (SYMBOL_NAMESPACE (sym) == namespace &&
+	    wild_match (name, name_len, SYMBOL_NAME (sym)))
+	  {
+	    switch (SYMBOL_CLASS (sym))
+	      {
+	      case LOC_ARG:
+	      case LOC_LOCAL_ARG:
+	      case LOC_REF_ARG:
+	      case LOC_REGPARM:
+	      case LOC_REGPARM_ADDR:
+	      case LOC_BASEREG_ARG:
+		arg_sym = sym;
+		break;
+	      case LOC_UNRESOLVED:
+		continue;
+	      default:
+		found_sym = 1;
+		fill_in_ada_prototype (sym);
+		add_defn_to_vec (fixup_symbol_section (sym, objfile), block);
+		break;
+	      }
+	  }
+      }
     }
-  else 
+  else
     {
       if (is_sorted)
 	{
 	  int U;
-	  i = 0; U = BLOCK_NSYMS (block)-1;
-	  while (U - i > 4) 
+	  i = 0;
+	  U = BLOCK_NSYMS (block) - 1;
+	  while (U - i > 4)
 	    {
-	      int M = (U+i) >> 1;
+	      int M = (U + i) >> 1;
 	      struct symbol *sym = BLOCK_SYM (block, M);
 	      if (SYMBOL_NAME (sym)[0] < name[0])
-		i = M+1;
+		i = M + 1;
 	      else if (SYMBOL_NAME (sym)[0] > name[0])
-		U = M-1;
+		U = M - 1;
 	      else if (strcmp (SYMBOL_NAME (sym), name) < 0)
-		i = M+1;
+		i = M + 1;
 	      else
 		U = M;
 	    }
@@ -4149,69 +4013,73 @@
       else
 	i = 0;
 
-      for (; i < BLOCK_NSYMS (block); i += 1)
-	{
-	  struct symbol *sym = BLOCK_SYM (block, i);
+      for (; i < BLOCK_BUCKETS (block); i += 1)
+	for (sym = BLOCK_BUCKET (block, i); sym != NULL; sym = sym->hash_next)
+	  {
+	    if (SYMBOL_NAMESPACE (sym) == namespace)
+	      {
+		int cmp = strncmp (name, SYMBOL_NAME (sym), name_len);
 
-	  if (SYMBOL_NAMESPACE (sym) == namespace)
-	    {
-	      int cmp = strncmp (name, SYMBOL_NAME (sym), name_len);
-	
-	      if (cmp < 0) 
-		{
-		  if (is_sorted)
-		    break;
-		}
-	      else if (cmp == 0 
-		       && is_name_suffix (SYMBOL_NAME (sym) + name_len)) 
-		{
-		  switch (SYMBOL_CLASS (sym))
-		    {
-		    case LOC_ARG:
-		    case LOC_LOCAL_ARG:
-		    case LOC_REF_ARG:
-		    case LOC_REGPARM:
-		    case LOC_REGPARM_ADDR:
-		    case LOC_BASEREG_ARG:
-		      arg_sym = sym;
-		      break;
-		    case LOC_UNRESOLVED:
-		      break;
-		    default:
-		      found_sym = 1;
-		      fill_in_ada_prototype (sym);
-		      add_defn_to_vec (fixup_symbol_section (sym, objfile),
-				       block);
-		      break;
-		    }
-		}
-	    }
-	}
+		if (cmp < 0)
+		  {
+		    if (is_sorted)
+		      {
+			i = BLOCK_BUCKETS (block);
+			break;
+		      }
+		  }
+		else if (cmp == 0
+			 && is_name_suffix (SYMBOL_NAME (sym) + name_len))
+		  {
+		    switch (SYMBOL_CLASS (sym))
+		      {
+		      case LOC_ARG:
+		      case LOC_LOCAL_ARG:
+		      case LOC_REF_ARG:
+		      case LOC_REGPARM:
+		      case LOC_REGPARM_ADDR:
+		      case LOC_BASEREG_ARG:
+			arg_sym = sym;
+			break;
+		      case LOC_UNRESOLVED:
+			break;
+		      default:
+			found_sym = 1;
+			fill_in_ada_prototype (sym);
+			add_defn_to_vec (fixup_symbol_section (sym, objfile),
+					 block);
+			break;
+		      }
+		  }
+	      }
+	  }
     }
 
-  if (! found_sym && arg_sym != NULL)
+  if (!found_sym && arg_sym != NULL)
     {
       fill_in_ada_prototype (arg_sym);
       add_defn_to_vec (fixup_symbol_section (arg_sym, objfile), block);
     }
 
-  if (! wild)
+  if (!wild)
     {
-      arg_sym = NULL; found_sym = 0;
+      arg_sym = NULL;
+      found_sym = 0;
       if (is_sorted)
 	{
 	  int U;
-	  i = 0; U = BLOCK_NSYMS (block)-1;
-	  while (U - i > 4) 
+	  i = 0;
+	  U = BLOCK_NSYMS (block) - 1;
+	  while (U - i > 4)
 	    {
-	      int M = (U+i) >> 1;
+	      int M = (U + i) >> 1;
 	      struct symbol *sym = BLOCK_SYM (block, M);
 	      if (SYMBOL_NAME (sym)[0] < '_')
-		i = M+1;
+		i = M + 1;
 	      else if (SYMBOL_NAME (sym)[0] > '_')
-		U = M-1;
+		U = M - 1;
 	      else if (strcmp (SYMBOL_NAME (sym), "_ada_") < 0)
-		i = M+1;
+		i = M + 1;
 	      else
 		U = M;
 	    }
@@ -4219,79 +4087,83 @@
       else
 	i = 0;
 
-      for (; i < BLOCK_NSYMS (block); i += 1)
-	{
-	  struct symbol *sym = BLOCK_SYM (block, i);
+      for (; i < BLOCK_BUCKETS (block); i += 1)
+	for (sym = BLOCK_BUCKET (block, i); sym != NULL; sym = sym->hash_next)
+	  {
+	    struct symbol *sym = BLOCK_SYM (block, i);
 
-	  if (SYMBOL_NAMESPACE (sym) == namespace)
-	    {
-	      int cmp;
+	    if (SYMBOL_NAMESPACE (sym) == namespace)
+	      {
+		int cmp;
 
-	      cmp = (int) '_' - (int) SYMBOL_NAME (sym)[0];
-	      if (cmp == 0) 
-		{
-		  cmp = strncmp ("_ada_", SYMBOL_NAME (sym), 5);
-		  if (cmp == 0)
-		    cmp = strncmp (name, SYMBOL_NAME (sym) + 5, name_len);
-		}
-	
-	      if (cmp < 0) 
-		{
-		  if (is_sorted)
-		    break;
-		}
-	      else if (cmp == 0 
-		       && is_name_suffix (SYMBOL_NAME (sym) + name_len + 5)) 
-		{
-		  switch (SYMBOL_CLASS (sym))
-		    {
-		    case LOC_ARG:
-		    case LOC_LOCAL_ARG:
-		    case LOC_REF_ARG:
-		    case LOC_REGPARM:
-		    case LOC_REGPARM_ADDR:
-		    case LOC_BASEREG_ARG:
-		      arg_sym = sym;
-		      break;
-		    case LOC_UNRESOLVED:
-		      break;
-		    default:
-		      found_sym = 1;
-		      fill_in_ada_prototype (sym);
-		      add_defn_to_vec (fixup_symbol_section (sym, objfile),
-				       block);
-		      break;
-		    }
-		}
-	    }
-	}
-      
+		cmp = (int) '_' - (int) SYMBOL_NAME (sym)[0];
+		if (cmp == 0)
+		  {
+		    cmp = strncmp ("_ada_", SYMBOL_NAME (sym), 5);
+		    if (cmp == 0)
+		      cmp = strncmp (name, SYMBOL_NAME (sym) + 5, name_len);
+		  }
+
+		if (cmp < 0)
+		  {
+		    if (is_sorted)
+		      {
+			i = BLOCK_BUCKETS (block);
+			break;
+		      }
+		  }
+		else if (cmp == 0
+			 && is_name_suffix (SYMBOL_NAME (sym) + name_len + 5))
+		  {
+		    switch (SYMBOL_CLASS (sym))
+		      {
+		      case LOC_ARG:
+		      case LOC_LOCAL_ARG:
+		      case LOC_REF_ARG:
+		      case LOC_REGPARM:
+		      case LOC_REGPARM_ADDR:
+		      case LOC_BASEREG_ARG:
+			arg_sym = sym;
+			break;
+		      case LOC_UNRESOLVED:
+			break;
+		      default:
+			found_sym = 1;
+			fill_in_ada_prototype (sym);
+			add_defn_to_vec (fixup_symbol_section (sym, objfile),
+					 block);
+			break;
+		      }
+		  }
+	      }
+	  }
+
       /* NOTE: This really shouldn't be needed for _ada_ symbols.
-	 They aren't parameters, right? */
-      if (! found_sym && arg_sym != NULL)
+         They aren't parameters, right? */
+      if (!found_sym && arg_sym != NULL)
 	{
 	  fill_in_ada_prototype (arg_sym);
 	  add_defn_to_vec (fixup_symbol_section (arg_sym, objfile), block);
 	}
     }
 }
-
 
+
 				/* Function Types */
 
 /* Assuming that SYM is the symbol for a function, fill in its type 
    with prototype information, if it is not already there.  */
 
 static void
-fill_in_ada_prototype (func)
-     struct symbol* func;
+fill_in_ada_prototype (struct symbol *func)
 {
-  struct block* b;
+  struct block *b;
   int nargs, nsyms;
   int i;
-  struct type* ftype;
-  struct type* rtype;
+  struct type *ftype;
+  struct type *rtype;
   size_t max_fields;
+  struct symbol *sym;
 
   if (func == NULL
       || TYPE_CODE (SYMBOL_TYPE (func)) != TYPE_CODE_FUNC
@@ -4308,47 +4180,44 @@
   SYMBOL_TYPE (func) = ftype;
 
   b = SYMBOL_BLOCK_VALUE (func);
-  nsyms = BLOCK_NSYMS (b);
 
   nargs = 0;
-  max_fields = 8; 
-  TYPE_FIELDS (ftype) = 
-    (struct field*) xmalloc (sizeof (struct field) * max_fields);
-  for (i = 0; i < nsyms; i += 1)
-    {
-      struct symbol *sym = BLOCK_SYM (b, i);
+  max_fields = 8;
+  TYPE_FIELDS (ftype) =
+    (struct field *) xmalloc (sizeof (struct field) * max_fields);
+  ALL_BLOCK_SYMBOLS (b, i, sym)
+  {
+    GROW_VECT (TYPE_FIELDS (ftype), max_fields, nargs + 1);
 
-      GROW_VECT (TYPE_FIELDS (ftype), max_fields, nargs+1);
-	
-      switch (SYMBOL_CLASS (sym)) 
-	{
-	case LOC_REF_ARG:
-	case LOC_REGPARM_ADDR:
-	  TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
-	  TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
-	  TYPE_FIELD_TYPE (ftype, nargs) = 
-	    lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
-	  TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
-	  nargs += 1;
-	
-	  break;
+    switch (SYMBOL_CLASS (sym))
+      {
+      case LOC_REF_ARG:
+      case LOC_REGPARM_ADDR:
+	TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
+	TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+	TYPE_FIELD_TYPE (ftype, nargs) =
+	  lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
+	TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+	nargs += 1;
 
-	case LOC_ARG:
-	case LOC_REGPARM:
-	case LOC_LOCAL_ARG:
-	case LOC_BASEREG_ARG:
-	  TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
-	  TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
-	  TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
-	  TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
-	  nargs += 1;
-	
-	  break;
+	break;
 
-	default:
-	  break;
-	}
-    }
+      case LOC_ARG:
+      case LOC_REGPARM:
+      case LOC_LOCAL_ARG:
+      case LOC_BASEREG_ARG:
+	TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
+	TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+	TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
+	TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
+	nargs += 1;
+
+	break;
+
+      default:
+	break;
+      }
+  }
 
   /* Re-allocate fields vector; if there are no fields, make the */
   /* fields pointer non-null anyway, to mark that this function type */
@@ -4357,38 +4226,37 @@
   TYPE_NFIELDS (ftype) = nargs;
   if (nargs == 0)
     {
-      static struct field dummy_field = {0, 0, 0, 0};
-      free (TYPE_FIELDS (ftype));
+      static struct field dummy_field = { 0, 0, 0, 0 };
+      xfree (TYPE_FIELDS (ftype));
       TYPE_FIELDS (ftype) = &dummy_field;
     }
   else
     {
-      struct field* fields = 
-	(struct field*) TYPE_ALLOC (ftype, nargs * sizeof (struct field));
-      memcpy ((char*) fields, 
-	      (char*) TYPE_FIELDS (ftype), 
-	      nargs * sizeof (struct field));
-      free (TYPE_FIELDS (ftype));
+      struct field *fields =
+	(struct field *) TYPE_ALLOC (ftype, nargs * sizeof (struct field));
+      memcpy ((char *) fields,
+	      (char *) TYPE_FIELDS (ftype), nargs * sizeof (struct field));
+      xfree (TYPE_FIELDS (ftype));
       TYPE_FIELDS (ftype) = fields;
     }
 }
-
 
+
 				/* Breakpoint-related */
 
-char no_symtab_msg[] = "No symbol table is loaded.  Use the \"file\" command.";
+char no_symtab_msg[] =
+  "No symbol table is loaded.  Use the \"file\" command.";
 
 /* Assuming that LINE is pointing at the beginning of an argument to
    'break', return a pointer to the delimiter for the initial segment
    of that name.  This is the first ':', ' ', or end of LINE. 
 */
-char*
-ada_start_decode_line_1 (line)
-     char* line;
+char *
+ada_start_decode_line_1 (char *line)
 {
   /* [NOTE: strpbrk would be more elegant, but I am reluctant to be
      the first to use such a library function in GDB code.] */
-  char* p;
+  char *p;
   for (p = line; *p != '\000' && *p != ' ' && *p != ':'; p += 1)
     ;
   return p;
@@ -4438,23 +4306,20 @@
    is the caller's responsibility to free them.   */
 
 struct symtabs_and_lines
-ada_finish_decode_line_1 (spec, file_table, funfirstline, canonical)
-     char** spec;
-     struct symtab* file_table;
-     int funfirstline;
-     char*** canonical;
+ada_finish_decode_line_1 (char **spec, struct symtab *file_table,
+			  int funfirstline, char ***canonical)
 {
-  struct symbol** symbols;
-  struct block** blocks;
-  struct block* block;
+  struct symbol **symbols;
+  struct block **blocks;
+  struct block *block;
   int n_matches, i, line_num;
   struct symtabs_and_lines selected;
-  struct cleanup* old_chain = make_cleanup (null_cleanup, NULL);
-  char* name;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+  char *name;
 
   int len;
-  char* lower_name;
-  char* unquoted_name;
+  char *lower_name;
+  char *unquoted_name;
 
   if (file_table == NULL)
     block = get_selected_block (NULL);
@@ -4462,15 +4327,15 @@
     block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_table), STATIC_BLOCK);
 
   if (canonical != NULL)
-    *canonical = (char**) NULL;
+    *canonical = (char **) NULL;
 
   name = *spec;
-  if (**spec == '*') 
+  if (**spec == '*')
     *spec += 1;
   else
     {
-      while (**spec != '\000' && 
-	     ! strchr (ada_completer_word_break_characters, **spec))
+      while (**spec != '\000' &&
+	     !strchr (ada_completer_word_break_characters, **spec))
 	*spec += 1;
     }
   len = *spec - name;
@@ -4479,11 +4344,11 @@
   if (file_table != NULL && (*spec)[0] == ':' && isdigit ((*spec)[1]))
     {
       line_num = strtol (*spec + 1, spec, 10);
-      while (**spec == ' ' || **spec == '\t') 
+      while (**spec == ' ' || **spec == '\t')
 	*spec += 1;
     }
 
-  if (name[0] == '*') 
+  if (name[0] == '*')
     {
       if (line_num == -1)
 	error ("Wild-card function with no line number or file name.");
@@ -4499,28 +4364,28 @@
 
   if (name[0] == '<')
     {
-      unquoted_name = (char*) alloca (len-1);
-      memcpy (unquoted_name, name+1, len-2);
-      unquoted_name[len-2] = '\000';
+      unquoted_name = (char *) alloca (len - 1);
+      memcpy (unquoted_name, name + 1, len - 2);
+      unquoted_name[len - 2] = '\000';
       lower_name = NULL;
     }
   else
     {
-      unquoted_name = (char*) alloca (len+1);
+      unquoted_name = (char *) alloca (len + 1);
       memcpy (unquoted_name, name, len);
       unquoted_name[len] = '\000';
-      lower_name = (char*) alloca (len + 1);
+      lower_name = (char *) alloca (len + 1);
       for (i = 0; i < len; i += 1)
 	lower_name[i] = tolower (name[i]);
       lower_name[len] = '\000';
     }
 
   n_matches = 0;
-  if (lower_name != NULL) 
-    n_matches = ada_lookup_symbol_list (ada_mangle (lower_name), block, 
+  if (lower_name != NULL)
+    n_matches = ada_lookup_symbol_list (ada_mangle (lower_name), block,
 					VAR_NAMESPACE, &symbols, &blocks);
   if (n_matches == 0)
-    n_matches = ada_lookup_symbol_list (unquoted_name, block, 
+    n_matches = ada_lookup_symbol_list (unquoted_name, block,
 					VAR_NAMESPACE, &symbols, &blocks);
   if (n_matches == 0 && line_num >= 0)
     error ("No line number information found for %s.", unquoted_name);
@@ -4530,22 +4395,22 @@
       /* FIXME: See comment in symtab.c::decode_line_1 */
 #undef volatile
       volatile struct symtab_and_line val;
-#define volatile /*nothing*/
+#define volatile		/*nothing */
 #else
       struct symtab_and_line val;
 #endif
-      struct minimal_symbol* msymbol;
+      struct minimal_symbol *msymbol;
 
       INIT_SAL (&val);
 
       msymbol = NULL;
-      if (lower_name != NULL) 
+      if (lower_name != NULL)
 	msymbol = ada_lookup_minimal_symbol (ada_mangle (lower_name));
       if (msymbol == NULL)
 	msymbol = ada_lookup_minimal_symbol (unquoted_name);
       if (msymbol != NULL)
 	{
-	  val.pc      = SYMBOL_VALUE_ADDRESS (msymbol);
+	  val.pc = SYMBOL_VALUE_ADDRESS (msymbol);
 	  val.section = SYMBOL_BFD_SECTION (msymbol);
 	  if (funfirstline)
 	    {
@@ -4557,38 +4422,39 @@
 	  selected.sals[0] = val;
 	  selected.nelts = 1;
 	  return selected;
-	}	
-      
+	}
+
       if (!have_full_symbols () &&
 	  !have_partial_symbols () && !have_minimal_symbols ())
 	error (no_symtab_msg);
 
       error ("Function \"%s\" not defined.", unquoted_name);
-      return selected;	/* for lint */
+      return selected;		/* for lint */
     }
 
   if (line_num >= 0)
     {
-      return 
-	find_sal_from_funcs_and_line (file_table->filename, line_num, 
+      return
+	find_sal_from_funcs_and_line (file_table->filename, line_num,
 				      symbols, n_matches);
     }
   else
     {
-      selected.nelts = user_select_syms (symbols, blocks, n_matches, n_matches);
+      selected.nelts =
+	user_select_syms (symbols, blocks, n_matches, n_matches);
     }
 
-  selected.sals = (struct symtab_and_line*) 
+  selected.sals = (struct symtab_and_line *)
     xmalloc (sizeof (struct symtab_and_line) * selected.nelts);
   memset (selected.sals, 0, selected.nelts * sizeof (selected.sals[i]));
-  make_cleanup (free, selected.sals);
+  make_cleanup (xfree, selected.sals);
 
   i = 0;
   while (i < selected.nelts)
     {
-      if (SYMBOL_CLASS (symbols[i]) == LOC_BLOCK) 
+      if (SYMBOL_CLASS (symbols[i]) == LOC_BLOCK)
 	selected.sals[i] = find_function_start_sal (symbols[i], funfirstline);
-      else if (SYMBOL_LINE (symbols[i]) != 0) 
+      else if (SYMBOL_LINE (symbols[i]) != 0)
 	{
 	  selected.sals[i].symtab = symtab_for_sym (symbols[i]);
 	  selected.sals[i].line = SYMBOL_LINE (symbols[i]);
@@ -4596,90 +4462,89 @@
       else if (line_num >= 0)
 	{
 	  /* Ignore this choice */
-	  symbols[i] = symbols[selected.nelts-1];
-	  blocks[i] = blocks[selected.nelts-1];
+	  symbols[i] = symbols[selected.nelts - 1];
+	  blocks[i] = blocks[selected.nelts - 1];
 	  selected.nelts -= 1;
 	  continue;
 	}
-      else 
+      else
 	error ("Line number not known for symbol \"%s\"", unquoted_name);
       i += 1;
     }
 
   if (canonical != NULL && (line_num >= 0 || n_matches > 1))
     {
-      *canonical = (char**) xmalloc (sizeof(char*) * selected.nelts);
+      *canonical = (char **) xmalloc (sizeof (char *) * selected.nelts);
       for (i = 0; i < selected.nelts; i += 1)
-	(*canonical)[i] = 
-	  extended_canonical_line_spec (selected.sals[i], 
+	(*canonical)[i] =
+	  extended_canonical_line_spec (selected.sals[i],
 					SYMBOL_SOURCE_NAME (symbols[i]));
     }
-   
+
   discard_cleanups (old_chain);
   return selected;
-}  
-      
+}
+
 /* The (single) sal corresponding to line LINE_NUM in a symbol table
    with file name FILENAME that occurs in one of the functions listed 
-   in SYMBOLS[0 .. NSYMS-1]. */   
+   in SYMBOLS[0 .. NSYMS-1]. */
 static struct symtabs_and_lines
-find_sal_from_funcs_and_line (filename, line_num, symbols, nsyms)
-     const char* filename;
-     int line_num;
-     struct symbol** symbols;
-     int nsyms;
+find_sal_from_funcs_and_line (const char *filename, int line_num,
+			      struct symbol **symbols, int nsyms)
 {
   struct symtabs_and_lines sals;
   int best_index, best;
-  struct linetable* best_linetable;
-  struct objfile* objfile;
-  struct symtab* s;
-  struct symtab* best_symtab;
+  struct linetable *best_linetable;
+  struct objfile *objfile;
+  struct symtab *s;
+  struct symtab *best_symtab;
 
   read_all_symtabs (filename);
 
-  best_index = 0; best_linetable = NULL; best_symtab = NULL;
+  best_index = 0;
+  best_linetable = NULL;
+  best_symtab = NULL;
   best = 0;
   ALL_SYMTABS (objfile, s)
-    {
-      struct linetable *l;
-      int ind, exact;
+  {
+    struct linetable *l;
+    int ind, exact;
 
-      QUIT;	
+    QUIT;
 
-      if (!STREQ (filename, s->filename))
-	continue;
-      l = LINETABLE (s);
-      ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact);
-      if (ind >= 0)
-	{
-	  if (exact)
-	    {
-	      best_index = ind;
-	      best_linetable = l;
-	      best_symtab = s;
-	      goto done;
-	    }
-	  if (best == 0 || l->item[ind].line < best)
-	    {
-	      best = l->item[ind].line;
-	      best_index = ind;
-	      best_linetable = l;
-	      best_symtab = s;
-	    }
-	}
-    }
+    if (!STREQ (filename, s->filename))
+      continue;
+    l = LINETABLE (s);
+    ind = find_line_in_linetable (l, line_num, symbols, nsyms, &exact);
+    if (ind >= 0)
+      {
+	if (exact)
+	  {
+	    best_index = ind;
+	    best_linetable = l;
+	    best_symtab = s;
+	    goto done;
+	  }
+	if (best == 0 || l->item[ind].line < best)
+	  {
+	    best = l->item[ind].line;
+	    best_index = ind;
+	    best_linetable = l;
+	    best_symtab = s;
+	  }
+      }
+  }
 
   if (best == 0)
     error ("Line number not found in designated function.");
 
- done:
-  
+done:
+
   sals.nelts = 1;
-  sals.sals = (struct symtab_and_line*) xmalloc (sizeof (sals.sals[0]));
+  sals.sals = (struct symtab_and_line *) xmalloc (sizeof (sals.sals[0]));
 
   INIT_SAL (&sals.sals[0]);
-  
+
   sals.sals[0].line = best_linetable->item[best_index].line;
   sals.sals[0].pc = best_linetable->item[best_index].pc;
   sals.sals[0].symtab = best_symtab;
@@ -4691,12 +4556,8 @@
    pc falls within one of the functions denoted by SYMBOLS[0..NSYMS-1].  
    Set *EXACTP to the 1 if the match is exact, and 0 otherwise. */
 static int
-find_line_in_linetable (linetable, line_num, symbols, nsyms, exactp)
-     struct linetable* linetable;
-     int line_num;
-     struct symbol** symbols;
-     int nsyms;
-     int* exactp;
+find_line_in_linetable (struct linetable *linetable, int line_num,
+			struct symbol **symbols, int nsyms, int *exactp)
 {
   int i, len, best_index, best;
 
@@ -4707,7 +4568,7 @@
   for (i = 0, best_index = -1, best = 0; i < len; i += 1)
     {
       int k;
-      struct linetable_entry* item = &(linetable->item[i]);
+      struct linetable_entry *item = &(linetable->item[i]);
 
       for (k = 0; k < nsyms; k += 1)
 	{
@@ -4741,9 +4602,7 @@
    LINETABLE, and k falls strictly within a named function that begins at
    or before LINE_NUM.  Return -1 if there is no such k. */
 static int
-nearest_line_number_in_linetable (linetable, line_num)
-     struct linetable* linetable;
-     int line_num;
+nearest_line_number_in_linetable (struct linetable *linetable, int line_num)
 {
   int i, len, best;
 
@@ -4751,15 +4610,16 @@
     return -1;
   len = linetable->nitems;
 
-  i = 0; best = INT_MAX;
+  i = 0;
+  best = INT_MAX;
   while (i < len)
     {
       int k;
-      struct linetable_entry* item = &(linetable->item[i]);
+      struct linetable_entry *item = &(linetable->item[i]);
 
       if (item->line >= line_num && item->line < best)
 	{
-	  char* func_name;
+	  char *func_name;
 	  CORE_ADDR start, end;
 
 	  func_name = NULL;
@@ -4769,9 +4629,9 @@
 	    {
 	      if (item->line == line_num)
 		return line_num;
-	      else 
+	      else
 		{
-		  struct symbol* sym = 
+		  struct symbol *sym =
 		    standard_lookup (func_name, VAR_NAMESPACE);
 		  if (is_plausible_func_for_line (sym, line_num))
 		    best = item->line;
@@ -4802,11 +4662,8 @@
    IND == -1 corresponds to no function. */
 
 static int
-find_next_line_in_linetable (linetable, line_num, starting_line, ind)
-     struct linetable* linetable;
-     int line_num;
-     int starting_line;
-     int ind;
+find_next_line_in_linetable (struct linetable *linetable, int line_num,
+			     int starting_line, int ind)
 {
   int i, len;
 
@@ -4814,12 +4671,12 @@
     return -1;
   len = linetable->nitems;
 
-  if (ind >= 0) 
+  if (ind >= 0)
     {
       CORE_ADDR start, end;
 
       if (find_pc_partial_function (linetable->item[ind].pc,
-				    (char**) NULL, &start, &end)) 
+				    (char **) NULL, &start, &end))
 	{
 	  while (ind < len && linetable->item[ind].pc < end)
 	    ind += 1;
@@ -4834,11 +4691,11 @@
   while (i < len)
     {
       int k;
-      struct linetable_entry* item = &(linetable->item[i]);
+      struct linetable_entry *item = &(linetable->item[i]);
 
       if (item->line >= line_num)
 	{
-	  char* func_name;
+	  char *func_name;
 	  CORE_ADDR start, end;
 
 	  func_name = NULL;
@@ -4848,13 +4705,13 @@
 	    {
 	      if (item->line == line_num)
 		{
-		  struct symbol* sym = 
+		  struct symbol *sym =
 		    standard_lookup (func_name, VAR_NAMESPACE);
 		  if (is_plausible_func_for_line (sym, starting_line))
 		    return i;
 		  else
 		    {
-		      while ((i+1) < len && linetable->item[i+1].pc < end)
+		      while ((i + 1) < len && linetable->item[i + 1].pc < end)
 			i += 1;
 		    }
 		}
@@ -4869,9 +4726,7 @@
 /* True iff function symbol SYM starts somewhere at or before line #
    LINE_NUM. */
 static int
-is_plausible_func_for_line (sym, line_num)
-     struct symbol* sym;
-     int line_num;
+is_plausible_func_for_line (struct symbol *sym, int line_num)
 {
   struct symtab_and_line start_sal;
 
@@ -4884,12 +4739,11 @@
 }
 
 static void
-debug_print_lines (lt)
-     struct linetable* lt;
+debug_print_lines (struct linetable *lt)
 {
   int i;
 
-  if (lt == NULL) 
+  if (lt == NULL)
     return;
 
   fprintf (stderr, "\t");
@@ -4899,155 +4753,152 @@
 }
 
 static void
-debug_print_block (b)
-     struct block* b;
+debug_print_block (struct block *b)
 {
   int i;
-  fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]", 
-	   b, BLOCK_START(b), BLOCK_END(b));
-  if (BLOCK_FUNCTION(b) != NULL)
-    fprintf (stderr, " Function: %s", SYMBOL_NAME (BLOCK_FUNCTION(b)));
+  struct symbol *i;
+
+  fprintf (stderr, "Block: %p; [0x%lx, 0x%lx]",
+	   b, BLOCK_START (b), BLOCK_END (b));
+  if (BLOCK_FUNCTION (b) != NULL)
+    fprintf (stderr, " Function: %s", SYMBOL_NAME (BLOCK_FUNCTION (b)));
   fprintf (stderr, "\n");
-  fprintf (stderr, "\t    Superblock: %p\n", BLOCK_SUPERBLOCK(b));
+  fprintf (stderr, "\t    Superblock: %p\n", BLOCK_SUPERBLOCK (b));
   fprintf (stderr, "\t    Symbols:");
-  for (i = 0; i < BLOCK_NSYMS (b); i += 1)
-    {
-      if (i > 0 && i % 4 == 0)
-	fprintf (stderr, "\n\t\t    ");
-      fprintf (stderr, " %s", SYMBOL_NAME (BLOCK_SYM (b, i)));
-    }
+  ALL_BLOCK_SYMBOLS (b, i, sym)
+  {
+    if (i > 0 && i % 4 == 0)
+      fprintf (stderr, "\n\t\t    ");
+    fprintf (stderr, " %s", SYMBOL_NAME (sym));
+  }
   fprintf (stderr, "\n");
 }
 
 static void
-debug_print_blocks (bv)
-     struct blockvector* bv;
+debug_print_blocks (struct blockvector *bv)
 {
   int i;
 
   if (bv == NULL)
     return;
-  for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); i += 1) {
-    fprintf (stderr, "%6d. ", i);
-    debug_print_block (BLOCKVECTOR_BLOCK (bv, i));
-  }
+  for (i = 0; i < BLOCKVECTOR_NBLOCKS (bv); i += 1)
+    {
+      fprintf (stderr, "%6d. ", i);
+      debug_print_block (BLOCKVECTOR_BLOCK (bv, i));
+    }
 }
 
 static void
-debug_print_symtab (s)
-     struct symtab* s;
+debug_print_symtab (struct symtab *s)
 {
   fprintf (stderr, "Symtab %p\n    File: %s; Dir: %s\n", s,
 	   s->filename, s->dirname);
   fprintf (stderr, "    Blockvector: %p, Primary: %d\n",
-	   BLOCKVECTOR(s), s->primary);
-  debug_print_blocks (BLOCKVECTOR(s));
+	   BLOCKVECTOR (s), s->primary);
+  debug_print_blocks (BLOCKVECTOR (s));
   fprintf (stderr, "    Line table: %p\n", LINETABLE (s));
-  debug_print_lines (LINETABLE(s));
+  debug_print_lines (LINETABLE (s));
 }
 
 /* Read in all symbol tables corresponding to partial symbol tables
    with file name FILENAME. */
 static void
-read_all_symtabs (filename)
-     const char* filename;
+read_all_symtabs (const char *filename)
 {
-  struct partial_symtab* ps;
-  struct objfile* objfile;
+  struct partial_symtab *ps;
+  struct objfile *objfile;
 
   ALL_PSYMTABS (objfile, ps)
-    {
-      QUIT;
+  {
+    QUIT;
 
-      if (STREQ (filename, ps->filename))
-	PSYMTAB_TO_SYMTAB (ps);
-    }
+    if (STREQ (filename, ps->filename))
+      PSYMTAB_TO_SYMTAB (ps);
+  }
 }
 
 /* All sals corresponding to line LINE_NUM in a symbol table from file
    FILENAME, as filtered by the user.  If CANONICAL is not null, set
    it to a corresponding array of canonical line specs. */
 static struct symtabs_and_lines
-all_sals_for_line (filename, line_num, canonical)
-     const char* filename;
-     int line_num;
-     char*** canonical;
+all_sals_for_line (const char *filename, int line_num, char ***canonical)
 {
   struct symtabs_and_lines result;
-  struct objfile* objfile;
-  struct symtab* s;
-  struct cleanup* old_chain = make_cleanup (null_cleanup, NULL);
+  struct objfile *objfile;
+  struct symtab *s;
+  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
   size_t len;
 
   read_all_symtabs (filename);
 
-  result.sals = (struct symtab_and_line*) xmalloc (4 * sizeof (result.sals[0]));
+  result.sals =
+    (struct symtab_and_line *) xmalloc (4 * sizeof (result.sals[0]));
   result.nelts = 0;
   len = 4;
   make_cleanup (free_current_contents, &result.sals);
 
-  ALL_SYMTABS (objfile, s) 
-    {
-      int ind, target_line_num;
+  ALL_SYMTABS (objfile, s)
+  {
+    int ind, target_line_num;
 
-      QUIT;
+    QUIT;
 
-      if (!STREQ (s->filename, filename))
-	continue;
+    if (!STREQ (s->filename, filename))
+      continue;
 
-      target_line_num = 
-	nearest_line_number_in_linetable (LINETABLE (s), line_num);
-      if (target_line_num == -1)
-	continue;
+    target_line_num =
+      nearest_line_number_in_linetable (LINETABLE (s), line_num);
+    if (target_line_num == -1)
+      continue;
 
-      ind = -1;
-      while (1) 
-	{
-	  ind = 
-	    find_next_line_in_linetable (LINETABLE (s),
-					 target_line_num, line_num, ind);
-	  
-	  if (ind < 0)
-	    break;
+    ind = -1;
+    while (1)
+      {
+	ind =
+	  find_next_line_in_linetable (LINETABLE (s),
+				       target_line_num, line_num, ind);
 
-	  GROW_VECT (result.sals, len, result.nelts+1);
-	  INIT_SAL (&result.sals[result.nelts]);
-	  result.sals[result.nelts].line = LINETABLE(s)->item[ind].line;
-	  result.sals[result.nelts].pc = LINETABLE(s)->item[ind].pc;
-	  result.sals[result.nelts].symtab = s;
-	  result.nelts += 1;
-	}
-    }
+	if (ind < 0)
+	  break;
+
+	GROW_VECT (result.sals, len, result.nelts + 1);
+	INIT_SAL (&result.sals[result.nelts]);
+	result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
+	result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
+	result.sals[result.nelts].symtab = s;
+	result.nelts += 1;
+      }
+  }
 
   if (canonical != NULL || result.nelts > 1)
     {
       int k;
-      char** func_names = (char**) alloca (result.nelts * sizeof (char*));
+      char **func_names = (char **) alloca (result.nelts * sizeof (char *));
       int first_choice = (result.nelts > 1) ? 2 : 1;
       int n;
-      int* choices = (int*) alloca (result.nelts * sizeof (int));
-      
-      for (k = 0; k < result.nelts; k += 1) 
+      int *choices = (int *) alloca (result.nelts * sizeof (int));
+
+      for (k = 0; k < result.nelts; k += 1)
 	{
-	  find_pc_partial_function (result.sals[k].pc, &func_names[k], 
-				    (CORE_ADDR*) NULL, (CORE_ADDR*) NULL);
+	  find_pc_partial_function (result.sals[k].pc, &func_names[k],
+				    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
 	  if (func_names[k] == NULL)
 	    error ("Could not find function for one or more breakpoints.");
 	}
-      
-      if (result.nelts > 1) 
+
+      if (result.nelts > 1)
 	{
-	  printf_unfiltered("[0] cancel\n");
-	  if (result.nelts > 1) 
-	    printf_unfiltered("[1] all\n");
+	  printf_unfiltered ("[0] cancel\n");
+	  if (result.nelts > 1)
+	    printf_unfiltered ("[1] all\n");
 	  for (k = 0; k < result.nelts; k += 1)
-	    printf_unfiltered ("[%d] %s\n", k + first_choice, 
+	    printf_unfiltered ("[%d] %s\n", k + first_choice,
 			       ada_demangle (func_names[k]));
-	  
+
 	  n = get_selections (choices, result.nelts, result.nelts,
 			      result.nelts > 1, "instance-choice");
-      
-	  for (k = 0; k < n; k += 1) 
+
+	  for (k = 0; k < n; k += 1)
 	    {
 	      result.sals[k] = result.sals[choices[k]];
 	      func_names[k] = func_names[choices[k]];
@@ -5055,17 +4906,17 @@
 	  result.nelts = n;
 	}
 
-      if (canonical != NULL) 
+      if (canonical != NULL)
 	{
-	  *canonical = (char**) xmalloc (result.nelts * sizeof (char**));
-	  make_cleanup (free, *canonical);
-	  for (k = 0; k < result.nelts; k += 1) 
+	  *canonical = (char **) xmalloc (result.nelts * sizeof (char **));
+	  make_cleanup (xfree, *canonical);
+	  for (k = 0; k < result.nelts; k += 1)
 	    {
-	      (*canonical)[k] = 
+	      (*canonical)[k] =
 		extended_canonical_line_spec (result.sals[k], func_names[k]);
 	      if ((*canonical)[k] == NULL)
 		error ("Could not locate one or more breakpoints.");
-	      make_cleanup (free, (*canonical)[k]);
+	      make_cleanup (xfree, (*canonical)[k]);
 	    }
 	}
     }
@@ -5080,19 +4931,16 @@
    information. The caller is responsible for releasing any space
    allocated. */
 
-static char*
-extended_canonical_line_spec (sal, name)
-     struct symtab_and_line sal;
-     const char* name;
+static char *
+extended_canonical_line_spec (struct symtab_and_line sal, const char *name)
 {
-  char* r;
+  char *r;
 
-  if (sal.symtab == NULL || sal.symtab->filename == NULL || 
-      sal.line <= 0)
+  if (sal.symtab == NULL || sal.symtab->filename == NULL || sal.line <= 0)
     return NULL;
 
-  r = (char*) xmalloc (strlen (name) + strlen (sal.symtab->filename)  
-		       + sizeof(sal.line)*3 + 3);
+  r = (char *) xmalloc (strlen (name) + strlen (sal.symtab->filename)
+			+ sizeof (sal.line) * 3 + 3);
   sprintf (r, "%s:'%s':%d", sal.symtab->filename, name, sal.line);
   return r;
 }
@@ -5102,118 +4950,112 @@
 #endif
 int begin_annotate_level = 0;
 
-static void 
-begin_cleanup (void* dummy) 
+static void
+begin_cleanup (void *dummy)
 {
   begin_annotate_level = 0;
 }
 
 static void
-begin_command (args, from_tty)
-     char *args;
-     int from_tty;
+begin_command (char *args, int from_tty)
 {
   struct minimal_symbol *msym;
   CORE_ADDR main_program_name_addr;
   char main_program_name[1024];
-  struct cleanup* old_chain = make_cleanup (begin_cleanup, NULL);
+  struct cleanup *old_chain = make_cleanup (begin_cleanup, NULL);
   begin_annotate_level = 2;
 
   /* Check that there is a program to debug */
   if (!have_full_symbols () && !have_partial_symbols ())
     error ("No symbol table is loaded.  Use the \"file\" command.");
-  
+
   /* Check that we are debugging an Ada program */
   /*  if (ada_update_initial_language (language_unknown, NULL) != language_ada)
-    error ("Cannot find the Ada initialization procedure.  Is this an Ada main program?");
-  */
+     error ("Cannot find the Ada initialization procedure.  Is this an Ada main program?");
+   */
   /* FIXME: language_ada should be defined in defs.h */
 
   /* Get the address of the name of the main procedure */
   msym = lookup_minimal_symbol (ADA_MAIN_PROGRAM_SYMBOL_NAME, NULL, NULL);
 
   if (msym != NULL)
-  {
-    main_program_name_addr = SYMBOL_VALUE_ADDRESS (msym);
-    if (main_program_name_addr == 0)
-      error ("Invalid address for Ada main program name.");
+    {
+      main_program_name_addr = SYMBOL_VALUE_ADDRESS (msym);
+      if (main_program_name_addr == 0)
+	error ("Invalid address for Ada main program name.");
 
-    /* Read the name of the main procedure */
-    extract_string (main_program_name_addr, main_program_name);
+      /* Read the name of the main procedure */
+      extract_string (main_program_name_addr, main_program_name);
 
-    /* Put a temporary breakpoint in the Ada main program and run */
-    do_command ("tbreak ", main_program_name, 0);
-    do_command ("run ", args, 0);
-  }
+      /* Put a temporary breakpoint in the Ada main program and run */
+      do_command ("tbreak ", main_program_name, 0);
+      do_command ("run ", args, 0);
+    }
   else
-  {
-    /* If we could not find the symbol containing the name of the
-       main program, that means that the compiler that was used to build
-       was not recent enough. In that case, we fallback to the previous
-       mechanism, which is a little bit less reliable, but has proved to work
-       in most cases. The only cases where it will fail is when the user
-       has set some breakpoints which will be hit before the end of the
-       begin command processing (eg in the initialization code).
+    {
+      /* If we could not find the symbol containing the name of the
+         main program, that means that the compiler that was used to build
+         was not recent enough. In that case, we fallback to the previous
+         mechanism, which is a little bit less reliable, but has proved to work
+         in most cases. The only cases where it will fail is when the user
+         has set some breakpoints which will be hit before the end of the
+         begin command processing (eg in the initialization code).
 
-       The begining of the main Ada subprogram is located by breaking
-       on the adainit procedure. Since we know that the binder generates
-       the call to this procedure exactly 2 calls before the call to the
-       Ada main subprogram, it is then easy to put a breakpoint on this
-       Ada main subprogram once we hit adainit.
-     */
-     do_command ("tbreak adainit", 0);
-     do_command ("run ", args, 0);
-     do_command ("up", 0);
-     do_command ("tbreak +2", 0);
-     do_command ("continue", 0);
-     do_command ("step", 0);
-  }
+         The begining of the main Ada subprogram is located by breaking
+         on the adainit procedure. Since we know that the binder generates
+         the call to this procedure exactly 2 calls before the call to the
+         Ada main subprogram, it is then easy to put a breakpoint on this
+         Ada main subprogram once we hit adainit.
+       */
+      do_command ("tbreak adainit", 0);
+      do_command ("run ", args, 0);
+      do_command ("up", 0);
+      do_command ("tbreak +2", 0);
+      do_command ("continue", 0);
+      do_command ("step", 0);
+    }
 
   do_cleanups (old_chain);
 }
 
 int
-is_ada_runtime_file (filename)
-     char *filename;
+is_ada_runtime_file (char *filename)
 {
   return (STREQN (filename, "s-", 2) ||
 	  STREQN (filename, "a-", 2) ||
-	  STREQN (filename, "g-", 2) ||
-	  STREQN (filename, "i-", 2));
+	  STREQN (filename, "g-", 2) || STREQN (filename, "i-", 2));
 }
 
 /* find the first frame that contains debugging information and that is not
    part of the Ada run-time, starting from fi and moving upward. */
 
 int
-find_printable_frame (fi, level)
-     struct frame_info *fi;
-     int level;
+find_printable_frame (struct frame_info *fi, int level)
 {
   struct symtab_and_line sal;
-  
+
   for (; fi != NULL; level += 1, fi = get_prev_frame (fi))
     {
       /* If fi is not the innermost frame, that normally means that fi->pc
-	 points to *after* the call instruction, and we want to get the line
-	 containing the call, never the next line.  But if the next frame is
-	 a signal_handler_caller or a dummy frame, then the next frame was
-	 not entered as the result of a call, and we want to get the line
-	 containing fi->pc.  */
+         points to *after* the call instruction, and we want to get the line
+         containing the call, never the next line.  But if the next frame is
+         a signal_handler_caller or a dummy frame, then the next frame was
+         not entered as the result of a call, and we want to get the line
+         containing fi->pc.  */
       sal =
-        find_pc_line (fi->pc,
+	find_pc_line (fi->pc,
 		      fi->next != NULL
 		      && !fi->next->signal_handler_caller
 		      && !frame_in_dummy (fi->next));
       if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
 	{
 #if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
-	/* libpthread.so contains some debugging information that prevents us
-	   from finding the right frame */
+	  /* libpthread.so contains some debugging information that prevents us
+	     from finding the right frame */
 
 	  if (sal.symtab->objfile &&
 	      STREQ (sal.symtab->objfile->name, "/usr/shlib/libpthread.so"))
-	      continue;
+	    continue;
 #endif
 	  selected_frame = fi;
 	  break;
@@ -5224,64 +5066,62 @@
 }
 
 void
-ada_report_exception_break (b)
-     struct breakpoint *b;
+ada_report_exception_break (struct breakpoint *b)
 {
 #ifdef UI_OUT
   /* FIXME: break_on_exception should be defined in breakpoint.h */
   /*  if (b->break_on_exception == 1)
-    {
-      /* Assume that cond has 16 elements, the 15th
-	 being the exception */ /*
-      if (b->cond && b->cond->nelts == 16)
-	{
-	  ui_out_text (uiout, "on ");
-	  ui_out_field_string (uiout, "exception",
-			       SYMBOL_NAME (b->cond->elts[14].symbol));
-	}
-      else
-	ui_out_text (uiout, "on all exceptions");
-    }
-  else if (b->break_on_exception == 2)
-    ui_out_text (uiout, "on unhandled exception");
-  else if (b->break_on_exception == 3)
-    ui_out_text (uiout, "on assert failure");
-#else
-  if (b->break_on_exception == 1)
-  {*/
-      /* Assume that cond has 16 elements, the 15th
-	 being the exception */ /*
-      if (b->cond && b->cond->nelts == 16)
-	{
-	  fputs_filtered ("on ", gdb_stdout);
-	  fputs_filtered (SYMBOL_NAME
-			  (b->cond->elts[14].symbol), gdb_stdout);
-	}
-      else
-	fputs_filtered ("on all exceptions", gdb_stdout);
-    }
-  else if (b->break_on_exception == 2)
-    fputs_filtered ("on unhandled exception", gdb_stdout);
-  else if (b->break_on_exception == 3)
-    fputs_filtered ("on assert failure", gdb_stdout);
-*/    
+     {
+     /* Assume that cond has 16 elements, the 15th
+   being the exception *//*
+   if (b->cond && b->cond->nelts == 16)
+   {
+   ui_out_text (uiout, "on ");
+   ui_out_field_string (uiout, "exception",
+   SYMBOL_NAME (b->cond->elts[14].symbol));
+   }
+   else
+   ui_out_text (uiout, "on all exceptions");
+   }
+   else if (b->break_on_exception == 2)
+   ui_out_text (uiout, "on unhandled exception");
+   else if (b->break_on_exception == 3)
+   ui_out_text (uiout, "on assert failure");
+   #else
+   if (b->break_on_exception == 1)
+   { */
+  /* Assume that cond has 16 elements, the 15th
+   being the exception *//*
+   if (b->cond && b->cond->nelts == 16)
+   {
+   fputs_filtered ("on ", gdb_stdout);
+   fputs_filtered (SYMBOL_NAME
+   (b->cond->elts[14].symbol), gdb_stdout);
+   }
+   else
+   fputs_filtered ("on all exceptions", gdb_stdout);
+   }
+   else if (b->break_on_exception == 2)
+   fputs_filtered ("on unhandled exception", gdb_stdout);
+   else if (b->break_on_exception == 3)
+   fputs_filtered ("on assert failure", gdb_stdout);
+ */
 #endif
 }
 
 int
-ada_is_exception_sym (struct symbol* sym)
+ada_is_exception_sym (struct symbol *sym)
 {
   char *type_name = type_name_no_tag (SYMBOL_TYPE (sym));
-  
+
   return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
 	  && SYMBOL_CLASS (sym) != LOC_BLOCK
 	  && SYMBOL_CLASS (sym) != LOC_CONST
-	  && type_name != NULL
-	  && STREQ (type_name, "exception"));
+	  && type_name != NULL && STREQ (type_name, "exception"));
 }
 
 int
-ada_maybe_exception_partial_symbol (struct partial_symbol* sym)
+ada_maybe_exception_partial_symbol (struct partial_symbol *sym)
 {
   return (SYMBOL_CLASS (sym) != LOC_TYPEDEF
 	  && SYMBOL_CLASS (sym) != LOC_BLOCK
@@ -5292,94 +5132,92 @@
    into equivalent form.  Return resulting argument string. Set
    *BREAK_ON_EXCEPTIONP to 1 for ordinary break on exception, 2 for
    break on unhandled, 3 for assert, 0 otherwise. */
-char* ada_breakpoint_rewrite (char* arg, int* break_on_exceptionp)
+char *
+ada_breakpoint_rewrite (char *arg, int *break_on_exceptionp)
 {
   if (arg == NULL)
     return arg;
   *break_on_exceptionp = 0;
-  /* FIXME: language_ada should be defined in defs.h */  
+  /* FIXME: language_ada should be defined in defs.h */
   /*  if (current_language->la_language == language_ada
-      && STREQN (arg, "exception", 9) &&
-      (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
-    {
-      char *tok, *end_tok;
-      int toklen;
+     && STREQN (arg, "exception", 9) &&
+     (arg[9] == ' ' || arg[9] == '\t' || arg[9] == '\0'))
+     {
+     char *tok, *end_tok;
+     int toklen;
 
-      *break_on_exceptionp = 1;
+     *break_on_exceptionp = 1;
 
-      tok = arg+9;
-      while (*tok == ' ' || *tok == '\t')
-	tok += 1;
+     tok = arg+9;
+     while (*tok == ' ' || *tok == '\t')
+     tok += 1;
 
-      end_tok = tok;
+     end_tok = tok;
 
-      while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
-	end_tok += 1;
+     while (*end_tok != ' ' && *end_tok != '\t' && *end_tok != '\000')
+     end_tok += 1;
 
-      toklen = end_tok - tok;
+     toklen = end_tok - tok;
 
-      arg = (char*) xmalloc (sizeof ("__gnat_raise_nodefer_with_msg if "
-				     "long_integer(e) = long_integer(&)")
-			     + toklen + 1);
-      make_cleanup (free, arg);
-      if (toklen == 0)
-	strcpy (arg, "__gnat_raise_nodefer_with_msg");
-      else if (STREQN (tok, "unhandled", toklen))
-	{
-	  *break_on_exceptionp = 2;
-	  strcpy (arg, "__gnat_unhandled_exception");
-	}
-      else
-	{
-	  sprintf (arg, "__gnat_raise_nodefer_with_msg if "
-		   "long_integer(e) = long_integer(&%.*s)", 
-		   toklen, tok);
-	}
-    }
-  else if (current_language->la_language == language_ada
-	   && STREQN (arg, "assert", 6) &&
-	   (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
-    {
-      char *tok = arg + 6;
+     arg = (char*) xmalloc (sizeof ("__gnat_raise_nodefer_with_msg if "
+     "long_integer(e) = long_integer(&)")
+     + toklen + 1);
+     make_cleanup (xfree, arg);
+     if (toklen == 0)
+     strcpy (arg, "__gnat_raise_nodefer_with_msg");
+     else if (STREQN (tok, "unhandled", toklen))
+     {
+     *break_on_exceptionp = 2;
+     strcpy (arg, "__gnat_unhandled_exception");
+     }
+     else
+     {
+     sprintf (arg, "__gnat_raise_nodefer_with_msg if "
+     "long_integer(e) = long_integer(&%.*s)", 
+     toklen, tok);
+     }
+     }
+     else if (current_language->la_language == language_ada
+     && STREQN (arg, "assert", 6) &&
+     (arg[6] == ' ' || arg[6] == '\t' || arg[6] == '\0'))
+     {
+     char *tok = arg + 6;
 
-      *break_on_exceptionp = 3;
+     *break_on_exceptionp = 3;
 
-      arg = (char*) 
-	xmalloc (sizeof ("system__assertions__raise_assert_failure")
-		 + strlen (tok) + 1);
-      make_cleanup (free, arg);
-      sprintf (arg, "system__assertions__raise_assert_failure%s", tok);
-    }
-  */
+     arg = (char*) 
+     xmalloc (sizeof ("system__assertions__raise_assert_failure")
+     + strlen (tok) + 1);
+     make_cleanup (xfree, arg);
+     sprintf (arg, "system__assertions__raise_assert_failure%s", tok);
+     }
+   */
   return arg;
 }
-
 
+
 				/* Field Access */
 
 /* True if field number FIELD_NUM in struct or union type TYPE is supposed
    to be invisible to users. */
 
 int
-ada_is_ignored_field (type, field_num)
-     struct type *type;
-     int field_num;
+ada_is_ignored_field (struct type *type, int field_num)
 {
   if (field_num < 0 || field_num > TYPE_NFIELDS (type))
     return 1;
-  else 
+  else
     {
-      const char* name = TYPE_FIELD_NAME (type, field_num);
+      const char *name = TYPE_FIELD_NAME (type, field_num);
       return (name == NULL
-	      || (name[0] == '_' && ! STREQN (name, "_parent", 7)));
+	      || (name[0] == '_' && !STREQN (name, "_parent", 7)));
     }
 }
 
 /* True iff structure type TYPE has a tag field. */
 
 int
-ada_is_tagged_type (type)
-     struct type *type;
+ada_is_tagged_type (struct type *type)
 {
   if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT)
     return 0;
@@ -5389,27 +5227,24 @@
 
 /* The type of the tag on VAL. */
 
-struct type*
-ada_tag_type (val)
-     struct value* val;
+struct type *
+ada_tag_type (struct value *val)
 {
   return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 0, NULL);
 }
 
 /* The value of the tag on VAL. */
 
-struct value*
-ada_value_tag (val)
-     struct value* val;
+struct value *
+ada_value_tag (struct value *val)
 {
   return ada_value_struct_elt (val, "_tag", "record");
 }
 
 /* The parent type of TYPE, or NULL if none. */
 
-struct type*
-ada_parent_type (type)
-     struct type *type;
+struct type *
+ada_parent_type (struct type *type)
 {
   int i;
 
@@ -5430,12 +5265,10 @@
    a structure type with at least FIELD_NUM+1 fields. */
 
 int
-ada_is_parent_field (type, field_num)
-     struct type *type;
-     int field_num;
+ada_is_parent_field (struct type *type, int field_num)
 {
-  const char* name = TYPE_FIELD_NAME (check_typedef (type), field_num);
-  return (name != NULL && 
+  const char *name = TYPE_FIELD_NAME (check_typedef (type), field_num);
+  return (name != NULL &&
 	  (STREQN (name, "PARENT", 6) || STREQN (name, "_parent", 7)));
 }
 
@@ -5446,44 +5279,38 @@
    structures. */
 
 int
-ada_is_wrapper_field (type, field_num)
-     struct type *type;
-     int field_num;
+ada_is_wrapper_field (struct type *type, int field_num)
 {
-  const char* name = TYPE_FIELD_NAME (type, field_num);
-  return (name != NULL 
-	  && (STREQN (name, "PARENT", 6) || STREQ (name, "REP") 
+  const char *name = TYPE_FIELD_NAME (type, field_num);
+  return (name != NULL
+	  && (STREQN (name, "PARENT", 6) || STREQ (name, "REP")
 	      || STREQN (name, "_parent", 7)
 	      || name[0] == 'S' || name[0] == 'R' || name[0] == 'O'));
 }
 
 /* True iff field number FIELD_NUM of structure or union type TYPE 
    is a variant wrapper.  Assumes TYPE is a structure type with at least 
-   FIELD_NUM+1 fields. */ 
+   FIELD_NUM+1 fields. */
 
 int
-ada_is_variant_part (type, field_num)
-     struct type *type;
-     int field_num;
+ada_is_variant_part (struct type *type, int field_num)
 {
-  struct type* field_type = TYPE_FIELD_TYPE (type, field_num);
+  struct type *field_type = TYPE_FIELD_TYPE (type, field_num);
   return (TYPE_CODE (field_type) == TYPE_CODE_UNION
 	  || (is_dynamic_field (type, field_num)
-	      && TYPE_CODE (TYPE_TARGET_TYPE (field_type)) == TYPE_CODE_UNION));
+	      && TYPE_CODE (TYPE_TARGET_TYPE (field_type)) ==
+	      TYPE_CODE_UNION));
 }
 
 /* Assuming that VAR_TYPE is a variant wrapper (type of the variant part)
    whose discriminants are contained in the record type OUTER_TYPE, 
    returns the type of the controlling discriminant for the variant.  */
 
-struct type*
-ada_variant_discrim_type (var_type, outer_type)
-     struct type *var_type;
-     struct type *outer_type;
+struct type *
+ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
 {
-  char* name = ada_variant_discrim_name (var_type);
-  struct type *type = 
-    ada_lookup_struct_elt_type (outer_type, name, 1, NULL);
+  char *name = ada_variant_discrim_name (var_type);
+  struct type *type = ada_lookup_struct_elt_type (outer_type, name, 1, NULL);
   if (type == NULL)
     return builtin_type_int;
   else
@@ -5495,11 +5322,9 @@
    represents a 'when others' clause; otherwise 0. */
 
 int
-ada_is_others_clause (type, field_num)
-     struct type *type;
-     int field_num;
+ada_is_others_clause (struct type *type, int field_num)
 {
-  const char* name = TYPE_FIELD_NAME (type, field_num);
+  const char *name = TYPE_FIELD_NAME (type, field_num);
   return (name != NULL && name[0] == 'O');
 }
 
@@ -5507,16 +5332,15 @@
    returns the name of the discriminant controlling the variant.  The
    value is valid until the next call to ada_variant_discrim_name. */
 
-char * 
-ada_variant_discrim_name (type0)
-     struct type *type0;
+char *
+ada_variant_discrim_name (struct type *type0)
 {
-  static char* result = NULL;
+  static char *result = NULL;
   static size_t result_len = 0;
-  struct type* type;
-  const char* name;
-  const char* discrim_end; 
-  const char* discrim_start;
+  struct type *type;
+  const char *name;
+  const char *discrim_end;
+  const char *discrim_start;
 
   if (TYPE_CODE (type0) == TYPE_CODE_PTR)
     type = TYPE_TARGET_TYPE (type0);
@@ -5537,19 +5361,19 @@
   if (discrim_end == name)
     return "";
 
-  for (discrim_start = discrim_end; discrim_start != name+3;
+  for (discrim_start = discrim_end; discrim_start != name + 3;
        discrim_start -= 1)
     {
-      if (discrim_start == name+1)
+      if (discrim_start == name + 1)
 	return "";
-      if ((discrim_start > name+3 && STREQN (discrim_start-3, "___", 3))
+      if ((discrim_start > name + 3 && STREQN (discrim_start - 3, "___", 3))
 	  || discrim_start[-1] == '.')
 	break;
     }
 
   GROW_VECT (result, result_len, discrim_end - discrim_start + 1);
   strncpy (result, discrim_start, discrim_end - discrim_start);
-  result[discrim_end-discrim_start] = '\0';
+  result[discrim_end - discrim_start] = '\0';
   return result;
 }
 
@@ -5562,15 +5386,11 @@
    does not occur. */
 
 int
-ada_scan_number (str, k, R, new_k)
-     const char str[];
-     int k;
-     LONGEST *R;
-     int *new_k;
+ada_scan_number (const char str[], int k, LONGEST * R, int *new_k)
 {
   ULONGEST RU;
 
-  if (! isdigit (str[k]))
+  if (!isdigit (str[k]))
     return 0;
 
   /* Do it the hard way so as not to make any assumption about 
@@ -5579,14 +5399,14 @@
   RU = 0;
   while (isdigit (str[k]))
     {
-      RU = RU*10 + (str[k] - '0');
+      RU = RU * 10 + (str[k] - '0');
       k += 1;
     }
 
-  if (str[k] == 'm') 
+  if (str[k] == 'm')
     {
       if (R != NULL)
-	*R = (- (LONGEST) (RU-1)) - 1;
+	*R = (-(LONGEST) (RU - 1)) - 1;
       k += 1;
     }
   else if (R != NULL)
@@ -5607,26 +5427,23 @@
    and FIELD_NUM is a valid field number within it, returns 1 iff VAL is 
    in the range encoded by field FIELD_NUM of TYPE; otherwise 0. */
 
-int 
-ada_in_variant (val, type, field_num)
-     LONGEST val;
-     struct type *type;
-     int field_num;
+int
+ada_in_variant (LONGEST val, struct type *type, int field_num)
 {
-  const char* name = TYPE_FIELD_NAME (type, field_num);
+  const char *name = TYPE_FIELD_NAME (type, field_num);
   int p;
 
   p = 0;
   while (1)
     {
-      switch (name[p]) 
+      switch (name[p])
 	{
 	case '\0':
 	  return 0;
 	case 'S':
 	  {
 	    LONGEST W;
-	    if (! ada_scan_number (name, p + 1, &W, &p))
+	    if (!ada_scan_number (name, p + 1, &W, &p))
 	      return 0;
 	    if (val == W)
 	      return 1;
@@ -5635,9 +5452,8 @@
 	case 'R':
 	  {
 	    LONGEST L, U;
-	    if (! ada_scan_number (name, p + 1, &L, &p)
-		|| name[p] != 'T'
-		|| ! ada_scan_number (name, p + 1, &U, &p))
+	    if (!ada_scan_number (name, p + 1, &L, &p)
+		|| name[p] != 'T' || !ada_scan_number (name, p + 1, &U, &p))
 	      return 0;
 	    if (val >= L && val <= U)
 	      return 1;
@@ -5657,14 +5473,11 @@
    FIELDNO says which field.   Differs from value_primitive_field only
    in that it can handle packed values of arbitrary type. */
 
-struct value*
-ada_value_primitive_field (arg1, offset, fieldno, arg_type)
-     struct value* arg1;
-     int offset;
-     int fieldno;
-     struct type *arg_type;
+struct value *
+ada_value_primitive_field (struct value *arg1, int offset, int fieldno,
+			   struct type *arg_type)
 {
-  struct value* v;
+  struct value *v;
   struct type *type;
 
   CHECK_TYPEDEF (arg_type);
@@ -5676,10 +5489,10 @@
     {
       int bit_pos = TYPE_FIELD_BITPOS (arg_type, fieldno);
       int bit_size = TYPE_FIELD_BITSIZE (arg_type, fieldno);
-      
+
       return ada_value_primitive_packed_val (arg1, VALUE_CONTENTS (arg1),
-					     offset + bit_pos/8, bit_pos % 8,
-					     bit_size, type);
+					     offset + bit_pos / 8,
+					     bit_pos % 8, bit_size, type);
     }
   else
     return value_primitive_field (arg1, offset, fieldno, arg_type);
@@ -5692,17 +5505,14 @@
 
    Searches recursively through wrapper fields (e.g., '_parent'). */
 
-struct value*
-ada_search_struct_field (name, arg, offset, type)
-     char *name;
-     struct value* arg;
-     int offset;
-     struct type *type;
+struct value *
+ada_search_struct_field (char *name, struct value *arg, int offset,
+			 struct type *type)
 {
   int i;
   CHECK_TYPEDEF (type);
 
-  for (i = TYPE_NFIELDS (type)-1; i >= 0; i -= 1)
+  for (i = TYPE_NFIELDS (type) - 1; i >= 0; i -= 1)
     {
       char *t_field_name = TYPE_FIELD_NAME (type, i);
 
@@ -5710,14 +5520,17 @@
 	continue;
 
       else if (field_name_match (t_field_name, name))
-	  return ada_value_primitive_field (arg, offset, i, type);
+	return ada_value_primitive_field (arg, offset, i, type);
 
       else if (ada_is_wrapper_field (type, i))
 	{
-	  struct value* v = 
-	    ada_search_struct_field (name, arg, 
-				     offset + TYPE_FIELD_BITPOS (type, i) / 8, 
-				     TYPE_FIELD_TYPE (type, i));
+	  struct value *v = ada_search_struct_field (name, arg,
+						     offset +
+						     TYPE_FIELD_BITPOS (type,
+									i) /
+						     8,
+						     TYPE_FIELD_TYPE (type,
+								      i));
 	  if (v != NULL)
 	    return v;
 	}
@@ -5730,11 +5543,13 @@
 
 	  for (j = TYPE_NFIELDS (field_type) - 1; j >= 0; j -= 1)
 	    {
-	      struct value* v = 
-		ada_search_struct_field (name, arg, 
-					 var_offset 
-					 + TYPE_FIELD_BITPOS (field_type, j)/8,
-					 TYPE_FIELD_TYPE (field_type, j));
+	      struct value *v = ada_search_struct_field (name, arg,
+							 var_offset
+							 +
+							 TYPE_FIELD_BITPOS
+							 (field_type, j) / 8,
+							 TYPE_FIELD_TYPE
+							 (field_type, j));
 	      if (v != NULL)
 		return v;
 	    }
@@ -5742,7 +5557,7 @@
     }
   return NULL;
 }
-  
+
 /* Given ARG, a value of type (pointer to a)* structure/union,
    extract the component named NAME from the ultimate target structure/union
    and return it as a value with its appropriate type.
@@ -5754,14 +5569,11 @@
    ERR is a name (for use in error messages) that identifies the class 
    of entity that ARG is supposed to be. */
 
-struct value*
-ada_value_struct_elt (arg, name, err)
-     struct value* arg;
-     char *name;
-     char *err;
+struct value *
+ada_value_struct_elt (struct value *arg, char *name, char *err)
 {
   struct type *t;
-  struct value* v;
+  struct value *v;
 
   arg = ada_coerce_ref (arg);
   t = check_typedef (VALUE_TYPE (arg));
@@ -5774,9 +5586,9 @@
       t = check_typedef (VALUE_TYPE (arg));
     }
 
-  if (   TYPE_CODE (t) != TYPE_CODE_STRUCT
-      && TYPE_CODE (t) != TYPE_CODE_UNION)
-    error ("Attempt to extract a component of a value that is not a %s.", err);
+  if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION)
+    error ("Attempt to extract a component of a value that is not a %s.",
+	   err);
 
   v = ada_search_struct_field (name, arg, 0, t);
   if (v == NULL)
@@ -5802,11 +5614,8 @@
    If NOERR is nonzero, return NULL if NAME is not suitably defined. */
 
 struct type *
-ada_lookup_struct_elt_type (type, name, noerr, dispp)
-     struct type *type;
-     char *name;
-     int noerr;
-     int *dispp;
+ada_lookup_struct_elt_type (struct type *type, char *name, int noerr,
+			    int *dispp)
 {
   int i;
 
@@ -5839,13 +5648,13 @@
       char *t_field_name = TYPE_FIELD_NAME (type, i);
       struct type *t;
       int disp;
-  
+
       if (t_field_name == NULL)
 	continue;
 
       else if (field_name_match (t_field_name, name))
 	{
-	  if (dispp != NULL) 
+	  if (dispp != NULL)
 	    *dispp += TYPE_FIELD_BITPOS (type, i) / 8;
 	  return check_typedef (TYPE_FIELD_TYPE (type, i));
 	}
@@ -5853,7 +5662,7 @@
       else if (ada_is_wrapper_field (type, i))
 	{
 	  disp = 0;
-	  t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (type, i), name, 
+	  t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (type, i), name,
 					  1, &disp);
 	  if (t != NULL)
 	    {
@@ -5875,7 +5684,7 @@
 					      name, 1, &disp);
 	      if (t != NULL)
 		{
-		  if (dispp != NULL) 
+		  if (dispp != NULL)
 		    *dispp += disp + TYPE_FIELD_BITPOS (type, i) / 8;
 		  return t;
 		}
@@ -5885,7 +5694,7 @@
     }
 
 BadName:
-  if (! noerr)
+  if (!noerr)
     {
       target_terminal_ours ();
       gdb_flush (gdb_stdout);
@@ -5903,21 +5712,19 @@
    OUTER_VALADDR, determine which variant clause (field number in VAR_TYPE, 
    numbering from 0) is applicable.  Returns -1 if none are. */
 
-int 
-ada_which_variant_applies (var_type, outer_type, outer_valaddr)
-     struct type *var_type;
-     struct type *outer_type;
-     char* outer_valaddr;
+int
+ada_which_variant_applies (struct type *var_type, struct type *outer_type,
+			   char *outer_valaddr)
 {
   int others_clause;
   int i;
   int disp;
-  struct type* discrim_type;
-  char* discrim_name = ada_variant_discrim_name (var_type);
+  struct type *discrim_type;
+  char *discrim_name = ada_variant_discrim_name (var_type);
   LONGEST discrim_val;
 
   disp = 0;
-  discrim_type = 
+  discrim_type =
     ada_lookup_struct_elt_type (outer_type, discrim_name, 1, &disp);
   if (discrim_type == NULL)
     return -1;
@@ -5934,9 +5741,9 @@
 
   return others_clause;
 }
-
-
 
+
+
 				/* Dynamic-Sized Records */
 
 /* Strategy: The type ostensibly attached to a value with dynamic size
@@ -5976,30 +5783,29 @@
    dereferencing it.  Differs from value_ind in its treatment of
    dynamic-sized types. */
 
-struct value*
-ada_value_ind (val0)
-     struct value* val0;
+struct value *
+ada_value_ind (struct value *val0)
 {
-  struct value* val = unwrap_value (value_ind (val0));
+  struct value *val = unwrap_value (value_ind (val0));
   return ada_to_fixed_value (VALUE_TYPE (val), 0,
-			     VALUE_ADDRESS (val) + VALUE_OFFSET (val),
-			     val);
+			     VALUE_ADDRESS (val) + VALUE_OFFSET (val), val);
 }
 
 /* The value resulting from dereferencing any "reference to"
  * qualifiers on VAL0. */
-static struct value* 
-ada_coerce_ref (val0)
-     struct value* val0;
+static struct value *
+ada_coerce_ref (struct value *val0)
 {
-  if (TYPE_CODE (VALUE_TYPE (val0)) == TYPE_CODE_REF) {
-    struct value* val = val0;
-    COERCE_REF (val);
-    val = unwrap_value (val);
-    return ada_to_fixed_value (VALUE_TYPE (val), 0, 
-			       VALUE_ADDRESS (val) + VALUE_OFFSET (val),
-			       val);
-  } else
+  if (TYPE_CODE (VALUE_TYPE (val0)) == TYPE_CODE_REF)
+    {
+      struct value *val = val0;
+      COERCE_REF (val);
+      val = unwrap_value (val);
+      return ada_to_fixed_value (VALUE_TYPE (val), 0,
+				 VALUE_ADDRESS (val) + VALUE_OFFSET (val),
+				 val);
+    }
+  else
     return val0;
 }
 
@@ -6007,9 +5813,7 @@
    ALIGNMENT (a power of 2). */
 
 static unsigned int
-align_value (off, alignment)
-     unsigned int off;
-     unsigned int alignment;
+align_value (unsigned int off, unsigned int alignment)
 {
   return (off + alignment - 1) & ~(alignment - 1);
 }
@@ -6018,9 +5822,7 @@
    type TYPE. */
 
 static unsigned int
-field_offset (type, f)
-     struct type *type;
-     int f;
+field_offset (struct type *type, int f)
 {
   int n = TYPE_FIELD_BITPOS (type, f);
   /* Kludge (temporary?) to fix problem with dwarf output. */
@@ -6034,34 +5836,31 @@
 /* Return the bit alignment required for field #F of template type TYPE. */
 
 static unsigned int
-field_alignment (type, f)
-     struct type *type;
-     int f;
+field_alignment (struct type *type, int f)
 {
-  const char* name = TYPE_FIELD_NAME (type, f);
+  const char *name = TYPE_FIELD_NAME (type, f);
   int len = (name == NULL) ? 0 : strlen (name);
   int align_offset;
 
-  if (len < 8 || ! isdigit (name[len-1]))
+  if (len < 8 || !isdigit (name[len - 1]))
     return TARGET_CHAR_BIT;
 
-  if (isdigit (name[len-2]))
+  if (isdigit (name[len - 2]))
     align_offset = len - 2;
   else
     align_offset = len - 1;
 
-  if (align_offset < 7 || ! STREQN ("___XV", name+align_offset-6, 5))
+  if (align_offset < 7 || !STREQN ("___XV", name + align_offset - 6, 5))
     return TARGET_CHAR_BIT;
 
-  return atoi (name+align_offset) * TARGET_CHAR_BIT;
+  return atoi (name + align_offset) * TARGET_CHAR_BIT;
 }
 
 /* Find a type named NAME.  Ignores ambiguity.  */
-struct type*
-ada_find_any_type (name)
-     const char *name;
+struct type *
+ada_find_any_type (const char *name)
 {
-  struct symbol* sym;
+  struct symbol *sym;
 
   sym = standard_lookup (name, VAR_NAMESPACE);
   if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
@@ -6079,9 +5878,7 @@
    that of TYPE1 for purposes of type printing, return non-zero;
    otherwise return 0. */
 int
-ada_prefer_type (type0, type1)
-     struct type* type0;
-     struct type* type1;
+ada_prefer_type (struct type *type0, struct type *type1)
 {
   if (type1 == NULL)
     return 1;
@@ -6093,9 +5890,10 @@
     return 0;
   else if (ada_is_packed_array_type (type0))
     return 1;
-  else if (ada_is_array_descriptor (type0) && ! ada_is_array_descriptor (type1))
+  else if (ada_is_array_descriptor (type0)
+	   && !ada_is_array_descriptor (type1))
     return 1;
-  else if (ada_renaming_type (type0) != NULL 
+  else if (ada_renaming_type (type0) != NULL
 	   && ada_renaming_type (type1) == NULL)
     return 1;
   return 0;
@@ -6103,11 +5901,10 @@
 
 /* The name of TYPE, which is either its TYPE_NAME, or, if that is
    null, its TYPE_TAG_NAME.  Null if TYPE is null. */
-char*
-ada_type_name (type)
-     struct type* type;
+char *
+ada_type_name (struct type *type)
 {
-  if (type == NULL) 
+  if (type == NULL)
     return NULL;
   else if (TYPE_NAME (type) != NULL)
     return TYPE_NAME (type);
@@ -6118,25 +5915,23 @@
 /* Find a parallel type to TYPE whose name is formed by appending
    SUFFIX to the name of TYPE. */
 
-struct type*
-ada_find_parallel_type (type, suffix)
-     struct type *type;
-     const char *suffix;
+struct type *
+ada_find_parallel_type (struct type *type, const char *suffix)
 {
-  static char* name;
+  static char *name;
   static size_t name_len = 0;
-  struct symbol** syms;
-  struct block** blocks;
+  struct symbol **syms;
+  struct block **blocks;
   int nsyms;
   int len;
-  char* typename = ada_type_name (type);
-  
+  char *typename = ada_type_name (type);
+
   if (typename == NULL)
     return NULL;
 
   len = strlen (typename);
 
-  GROW_VECT (name, name_len, len+strlen (suffix)+1);
+  GROW_VECT (name, name_len, len + strlen (suffix) + 1);
 
   strcpy (name, typename);
   strcpy (name + len, suffix);
@@ -6148,16 +5943,15 @@
 /* If TYPE is a variable-size record type, return the corresponding template
    type describing its fields.  Otherwise, return NULL. */
 
-static struct type*
-dynamic_template_type (type)
-     struct type* type;
+static struct type *
+dynamic_template_type (struct type *type)
 {
   CHECK_TYPEDEF (type);
 
   if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT
-      || ada_type_name (type) == NULL) 
+      || ada_type_name (type) == NULL)
     return NULL;
-  else 
+  else
     {
       int len = strlen (ada_type_name (type));
       if (len > 6 && STREQ (ada_type_name (type) + len - 6, "___XVE"))
@@ -6170,13 +5964,11 @@
 /* Assuming that TEMPL_TYPE is a union or struct type, returns
    non-zero iff field FIELD_NUM of TEMPL_TYPE has dynamic size. */
 
-static int 
-is_dynamic_field (templ_type, field_num)
-     struct type* templ_type;
-     int field_num;
+static int
+is_dynamic_field (struct type *templ_type, int field_num)
 {
   const char *name = TYPE_FIELD_NAME (templ_type, field_num);
-  return name != NULL 
+  return name != NULL
     && TYPE_CODE (TYPE_FIELD_TYPE (templ_type, field_num)) == TYPE_CODE_PTR
     && strstr (name, "___XVL") != NULL;
 }
@@ -6184,9 +5976,8 @@
 /* Assuming that TYPE is a struct type, returns non-zero iff TYPE
    contains a variant part. */
 
-static int 
-contains_variant_part (type)
-     struct type* type;
+static int
+contains_variant_part (struct type *type)
 {
   int f;
 
@@ -6197,11 +5988,10 @@
 }
 
 /* A record type with no fields, . */
-static struct type*
-empty_record (objfile) 
-     struct objfile* objfile;
+static struct type *
+empty_record (struct objfile *objfile)
 {
-  struct type* type = alloc_type (objfile);
+  struct type *type = alloc_type (objfile);
   TYPE_CODE (type) = TYPE_CODE_STRUCT;
   TYPE_NFIELDS (type) = 0;
   TYPE_FIELDS (type) = NULL;
@@ -6224,17 +6014,13 @@
  * variants occupy whole numbers of bytes.  However, they need not be
  * byte-aligned.  */
 
-static struct type*
-template_to_fixed_record_type (type, valaddr, address, dval0)
-     struct type* type;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* dval0;
-
+static struct type *
+template_to_fixed_record_type (struct type *type, char *valaddr,
+			       CORE_ADDR address, struct value *dval0)
 {
-  struct value* mark = value_mark();
-  struct value* dval;
-  struct type* rtype;
+  struct value *mark = value_mark ();
+  struct value *dval;
+  struct type *rtype;
   int nfields, bit_len;
   long off;
   int f;
@@ -6244,44 +6030,44 @@
   TYPE_CODE (rtype) = TYPE_CODE_STRUCT;
   INIT_CPLUS_SPECIFIC (rtype);
   TYPE_NFIELDS (rtype) = nfields;
-  TYPE_FIELDS (rtype) = (struct field*) 
+  TYPE_FIELDS (rtype) = (struct field *)
     TYPE_ALLOC (rtype, nfields * sizeof (struct field));
   memset (TYPE_FIELDS (rtype), 0, sizeof (struct field) * nfields);
   TYPE_NAME (rtype) = ada_type_name (type);
   TYPE_TAG_NAME (rtype) = NULL;
   /* FIXME: TYPE_FLAG_FIXED_INSTANCE should be defined in
-     gdbtypes.h */  
-  /*  TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE;*/
+     gdbtypes.h */
+  /*  TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE; */
 
-  off = 0; bit_len = 0;
+  off = 0;
+  bit_len = 0;
   for (f = 0; f < nfields; f += 1)
     {
       int fld_bit_len, bit_incr;
-      off = 
-	align_value (off, field_alignment (type, f))+TYPE_FIELD_BITPOS (type,f);
+      off =
+	align_value (off,
+		     field_alignment (type, f)) + TYPE_FIELD_BITPOS (type, f);
       /* NOTE: used to use field_offset above, but that causes
        * problems with really negative bit positions.  So, let's
        * rediscover why we needed field_offset and fix it properly. */
       TYPE_FIELD_BITPOS (rtype, f) = off;
-      TYPE_FIELD_BITSIZE (rtype, f) = 0;  
+      TYPE_FIELD_BITSIZE (rtype, f) = 0;
 
-      if (ada_is_variant_part (type, f)) 
+      if (ada_is_variant_part (type, f))
 	{
 	  struct type *branch_type;
 
 	  if (dval0 == NULL)
-	    dval = 
-	      value_from_contents_and_address (rtype, valaddr, address);
+	    dval = value_from_contents_and_address (rtype, valaddr, address);
 	  else
 	    dval = dval0;
 
-	  branch_type = 
-	    to_fixed_variant_branch_type 
-	      (TYPE_FIELD_TYPE (type, f),
-	       cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
-	       cond_offset_target (address, off / TARGET_CHAR_BIT),
-	       dval);
-	  if (branch_type == NULL) 
+	  branch_type =
+	    to_fixed_variant_branch_type
+	    (TYPE_FIELD_TYPE (type, f),
+	     cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
+	     cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
+	  if (branch_type == NULL)
 	    TYPE_NFIELDS (rtype) -= 1;
 	  else
 	    {
@@ -6295,18 +6081,16 @@
       else if (is_dynamic_field (type, f))
 	{
 	  if (dval0 == NULL)
-	    dval = 
-	      value_from_contents_and_address (rtype, valaddr, address);
+	    dval = value_from_contents_and_address (rtype, valaddr, address);
 	  else
 	    dval = dval0;
 
-	  TYPE_FIELD_TYPE (rtype, f) = 
-	    ada_to_fixed_type 
-	      (ada_get_base_type 
-	       (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, f))),
-	       cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
-	       cond_offset_target (address, off / TARGET_CHAR_BIT),
-	       dval);
+	  TYPE_FIELD_TYPE (rtype, f) =
+	    ada_to_fixed_type
+	    (ada_get_base_type
+	     (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, f))),
+	     cond_offset_host (valaddr, off / TARGET_CHAR_BIT),
+	     cond_offset_target (address, off / TARGET_CHAR_BIT), dval);
 	  TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
 	  bit_incr = fld_bit_len =
 	    TYPE_LENGTH (TYPE_FIELD_TYPE (rtype, f)) * TARGET_CHAR_BIT;
@@ -6316,7 +6100,7 @@
 	  TYPE_FIELD_TYPE (rtype, f) = TYPE_FIELD_TYPE (type, f);
 	  TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
 	  if (TYPE_FIELD_BITSIZE (type, f) > 0)
-	    bit_incr = fld_bit_len = 
+	    bit_incr = fld_bit_len =
 	      TYPE_FIELD_BITSIZE (rtype, f) = TYPE_FIELD_BITSIZE (type, f);
 	  else
 	    bit_incr = fld_bit_len =
@@ -6330,7 +6114,7 @@
   TYPE_LENGTH (rtype) = align_value (TYPE_LENGTH (rtype), TYPE_LENGTH (type));
 
   value_free_to_mark (mark);
-  if (TYPE_LENGTH (rtype) > varsize_limit) 
+  if (TYPE_LENGTH (rtype) > varsize_limit)
     error ("record type with dynamic size is larger than varsize-limit");
   return rtype;
 }
@@ -6342,9 +6126,8 @@
    Representation note: to save space, we memoize the result of this
    function in the TYPE_TARGET_TYPE of the template type. */
 
-static struct type*
-template_to_static_fixed_type (templ_type)
-     struct type* templ_type;
+static struct type *
+template_to_static_fixed_type (struct type *templ_type)
 {
   struct type *type;
   int nfields;
@@ -6354,34 +6137,35 @@
     return TYPE_TARGET_TYPE (templ_type);
 
   nfields = TYPE_NFIELDS (templ_type);
-  TYPE_TARGET_TYPE (templ_type) = type = alloc_type (TYPE_OBJFILE (templ_type));
+  TYPE_TARGET_TYPE (templ_type) = type =
+    alloc_type (TYPE_OBJFILE (templ_type));
   TYPE_CODE (type) = TYPE_CODE (templ_type);
   INIT_CPLUS_SPECIFIC (type);
   TYPE_NFIELDS (type) = nfields;
-  TYPE_FIELDS (type) = (struct field*) 
+  TYPE_FIELDS (type) = (struct field *)
     TYPE_ALLOC (type, nfields * sizeof (struct field));
   memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields);
   TYPE_NAME (type) = ada_type_name (templ_type);
   TYPE_TAG_NAME (type) = NULL;
-  /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */  
+  /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
   /*  TYPE_FLAGS (type) |= TYPE_FLAG_FIXED_INSTANCE; */
   TYPE_LENGTH (type) = 0;
 
   for (f = 0; f < nfields; f += 1)
     {
       TYPE_FIELD_BITPOS (type, f) = 0;
-      TYPE_FIELD_BITSIZE (type, f) = 0;  
+      TYPE_FIELD_BITSIZE (type, f) = 0;
 
       if (is_dynamic_field (templ_type, f))
 	{
-	  TYPE_FIELD_TYPE (type, f) = 
-	    to_static_fixed_type (TYPE_TARGET_TYPE 
+	  TYPE_FIELD_TYPE (type, f) =
+	    to_static_fixed_type (TYPE_TARGET_TYPE
 				  (TYPE_FIELD_TYPE (templ_type, f)));
 	  TYPE_FIELD_NAME (type, f) = TYPE_FIELD_NAME (templ_type, f);
 	}
       else
 	{
-	  TYPE_FIELD_TYPE (type, f) = 
+	  TYPE_FIELD_TYPE (type, f) =
 	    check_typedef (TYPE_FIELD_TYPE (templ_type, f));
 	  TYPE_FIELD_NAME (type, f) = TYPE_FIELD_NAME (templ_type, f);
 	}
@@ -6393,15 +6177,12 @@
 /* A revision of TYPE0 -- a non-dynamic-sized record with a variant
    part -- in which the variant part is replaced with the appropriate
    branch. */
-static struct type*
-to_record_with_fixed_variant_part (type, valaddr, address, dval)
-     struct type* type;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* dval;
+static struct type *
+to_record_with_fixed_variant_part (struct type *type, char *valaddr,
+				   CORE_ADDR address, struct value *dval)
 {
-  struct value* mark = value_mark();
-  struct type* rtype;
+  struct value *mark = value_mark ();
+  struct type *rtype;
   struct type *branch_type;
   int nfields = TYPE_NFIELDS (type);
 
@@ -6412,38 +6193,41 @@
   TYPE_CODE (rtype) = TYPE_CODE_STRUCT;
   INIT_CPLUS_SPECIFIC (type);
   TYPE_NFIELDS (rtype) = TYPE_NFIELDS (type);
-  TYPE_FIELDS (rtype) = 
-    (struct field*) TYPE_ALLOC (rtype, nfields * sizeof (struct field));
-  memcpy (TYPE_FIELDS (rtype), TYPE_FIELDS (type), 
+  TYPE_FIELDS (rtype) =
+    (struct field *) TYPE_ALLOC (rtype, nfields * sizeof (struct field));
+  memcpy (TYPE_FIELDS (rtype), TYPE_FIELDS (type),
 	  sizeof (struct field) * nfields);
   TYPE_NAME (rtype) = ada_type_name (type);
   TYPE_TAG_NAME (rtype) = NULL;
-  /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */  
+  /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
   /*  TYPE_FLAGS (rtype) |= TYPE_FLAG_FIXED_INSTANCE; */
   TYPE_LENGTH (rtype) = TYPE_LENGTH (type);
 
-  branch_type = 
-    to_fixed_variant_branch_type 
-      (TYPE_FIELD_TYPE (type, nfields - 1),
-       cond_offset_host (valaddr, 
-			 TYPE_FIELD_BITPOS (type, nfields-1) / TARGET_CHAR_BIT),
-       cond_offset_target (address, 
-			 TYPE_FIELD_BITPOS (type, nfields-1) / TARGET_CHAR_BIT),
-       dval);
-  if (branch_type == NULL) 
+  branch_type =
+    to_fixed_variant_branch_type
+    (TYPE_FIELD_TYPE (type, nfields - 1),
+     cond_offset_host (valaddr,
+		       TYPE_FIELD_BITPOS (type,
+					  nfields - 1) / TARGET_CHAR_BIT),
+     cond_offset_target (address,
+			 TYPE_FIELD_BITPOS (type,
+					    nfields - 1) / TARGET_CHAR_BIT),
+     dval);
+  if (branch_type == NULL)
     {
       TYPE_NFIELDS (rtype) -= 1;
-      TYPE_LENGTH (rtype) -= TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
+      TYPE_LENGTH (rtype) -=
+	TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
     }
   else
     {
-      TYPE_FIELD_TYPE (rtype, nfields-1) = branch_type;
-      TYPE_FIELD_NAME (rtype, nfields-1) = "S";
-      TYPE_FIELD_BITSIZE (rtype, nfields-1) = 0;
+      TYPE_FIELD_TYPE (rtype, nfields - 1) = branch_type;
+      TYPE_FIELD_NAME (rtype, nfields - 1) = "S";
+      TYPE_FIELD_BITSIZE (rtype, nfields - 1) = 0;
       TYPE_LENGTH (rtype) += TYPE_LENGTH (branch_type);
-	- TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
+      -TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
     }
-  
+
   return rtype;
 }
 
@@ -6453,22 +6237,19 @@
    should be in DVAL, a record value; it should be NULL if the object
    at ADDR itself contains any necessary  discriminant values.  A
    variant field (unless unchecked) is replaced by a particular branch
-   of the variant. */ 
+   of the variant. */
 
-static struct type*
-to_fixed_record_type (type0, valaddr, address, dval)
-     struct type* type0;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* dval;
+static struct type *
+to_fixed_record_type (struct type *type0, char *valaddr, CORE_ADDR address,
+		      struct value *dval)
 {
-  struct type* templ_type;
+  struct type *templ_type;
 
   /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
   /*  if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
-    return type0;
-  */
-  templ_type = dynamic_template_type (type0);  
+     return type0;
+   */
+  templ_type = dynamic_template_type (type0);
 
   if (templ_type != NULL)
     return template_to_fixed_record_type (templ_type, valaddr, address, dval);
@@ -6476,7 +6257,7 @@
     return to_record_with_fixed_variant_part (type0, valaddr, address, dval);
   else
     {
-      /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */      
+      /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
       /*      TYPE_FLAGS (type0) |= TYPE_FLAG_FIXED_INSTANCE; */
       return type0;
     }
@@ -6490,20 +6271,17 @@
    branch of the union at ADDR according to the discriminant value
    indicated in the union's type name. */
 
-static struct type*
-to_fixed_variant_branch_type (var_type0, valaddr, address, dval)
-     struct type* var_type0;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* dval;
+static struct type *
+to_fixed_variant_branch_type (struct type *var_type0, char *valaddr,
+			      CORE_ADDR address, struct value *dval)
 {
   int which;
-  struct type* templ_type;
-  struct type* var_type;
+  struct type *templ_type;
+  struct type *var_type;
 
   if (TYPE_CODE (var_type0) == TYPE_CODE_PTR)
     var_type = TYPE_TARGET_TYPE (var_type0);
-  else 
+  else
     var_type = var_type0;
 
   templ_type = ada_find_parallel_type (var_type, "___XVU");
@@ -6511,21 +6289,21 @@
   if (templ_type != NULL)
     var_type = templ_type;
 
-  which = 
-    ada_which_variant_applies (var_type, 
+  which =
+    ada_which_variant_applies (var_type,
 			       VALUE_TYPE (dval), VALUE_CONTENTS (dval));
 
   if (which < 0)
     return empty_record (TYPE_OBJFILE (var_type));
   else if (is_dynamic_field (var_type, which))
-    return 
-      to_fixed_record_type 
-         (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (var_type, which)),
-	  valaddr, address, dval);
+    return
+      to_fixed_record_type
+      (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (var_type, which)),
+       valaddr, address, dval);
   else if (contains_variant_part (TYPE_FIELD_TYPE (var_type, which)))
-    return 
-      to_fixed_record_type 
-         (TYPE_FIELD_TYPE (var_type, which), valaddr, address, dval);
+    return
+      to_fixed_record_type
+      (TYPE_FIELD_TYPE (var_type, which), valaddr, address, dval);
   else
     return TYPE_FIELD_TYPE (var_type, which);
 }
@@ -6539,19 +6317,17 @@
    varsize_limit.
 */
 
-static struct type*
-to_fixed_array_type (type0, dval, ignore_too_big)
-     struct type* type0;
-     struct value* dval;
-     int ignore_too_big;
+static struct type *
+to_fixed_array_type (struct type *type0, struct value *dval,
+		     int ignore_too_big)
 {
-  struct type* index_type_desc;
-  struct type* result;
+  struct type *index_type_desc;
+  struct type *result;
 
   /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
-  /*  if (ada_is_packed_array_type (type0)  /* revisit? */ /*
-      || (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE))
-    return type0;*/
+/*  if (ada_is_packed_array_type (type0)  /* revisit? *//*
+   || (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE))
+   return type0; */
 
   index_type_desc = ada_find_parallel_type (type0, "___XA");
   if (index_type_desc == NULL)
@@ -6559,14 +6335,13 @@
       struct type *elt_type0 = check_typedef (TYPE_TARGET_TYPE (type0));
       /* NOTE: elt_type---the fixed version of elt_type0---should never
        * depend on the contents of the array in properly constructed
-       * debugging data. */       
-      struct type *elt_type = 
-	ada_to_fixed_type (elt_type0, 0, 0, dval);
+       * debugging data. */
+      struct type *elt_type = ada_to_fixed_type (elt_type0, 0, 0, dval);
 
       if (elt_type0 == elt_type)
 	result = type0;
       else
-	result = create_array_type (alloc_type (TYPE_OBJFILE (type0)), 
+	result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
 				    elt_type, TYPE_INDEX_TYPE (type0));
     }
   else
@@ -6580,25 +6355,24 @@
 
       /* NOTE: result---the fixed version of elt_type0---should never
        * depend on the contents of the array in properly constructed
-       * debugging data. */       
-      result = 
-	ada_to_fixed_type (check_typedef (elt_type0), 0, 0, dval);
+       * debugging data. */
+      result = ada_to_fixed_type (check_typedef (elt_type0), 0, 0, dval);
       for (i = TYPE_NFIELDS (index_type_desc) - 1; i >= 0; i -= 1)
 	{
-	  struct type *range_type = 
+	  struct type *range_type =
 	    to_fixed_range_type (TYPE_FIELD_NAME (index_type_desc, i),
 				 dval, TYPE_OBJFILE (type0));
 	  result = create_array_type (alloc_type (TYPE_OBJFILE (type0)),
 				      result, range_type);
 	}
-      if (! ignore_too_big && TYPE_LENGTH (result) > varsize_limit) 
+      if (!ignore_too_big && TYPE_LENGTH (result) > varsize_limit)
 	error ("array type with dynamic size is larger than varsize-limit");
     }
 
 /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
 /*  TYPE_FLAGS (result) |= TYPE_FLAG_FIXED_INSTANCE; */
   return result;
-}  
+}
 
 
 /* A standard type (containing no dynamically sized components)
@@ -6606,54 +6380,51 @@
    DVAL describes a record containing any discriminants used in TYPE0,
    and may be NULL if there are none. */
 
-struct type*
-ada_to_fixed_type (type, valaddr, address, dval)
-     struct type* type;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* dval;
+struct type *
+ada_to_fixed_type (struct type *type, char *valaddr, CORE_ADDR address,
+		   struct value *dval)
 {
   CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type)) {
-  default:
-    return type;
-  case TYPE_CODE_STRUCT:
-    return to_fixed_record_type (type, valaddr, address, NULL);
-  case TYPE_CODE_ARRAY:
-    return to_fixed_array_type (type, dval, 0);
-  case TYPE_CODE_UNION:
-    if (dval == NULL) 
+  switch (TYPE_CODE (type))
+    {
+    default:
       return type;
-    else
-      return to_fixed_variant_branch_type (type, valaddr, address, dval);
-  }
+    case TYPE_CODE_STRUCT:
+      return to_fixed_record_type (type, valaddr, address, NULL);
+    case TYPE_CODE_ARRAY:
+      return to_fixed_array_type (type, dval, 0);
+    case TYPE_CODE_UNION:
+      if (dval == NULL)
+	return type;
+      else
+	return to_fixed_variant_branch_type (type, valaddr, address, dval);
+    }
 }
 
 /* A standard (static-sized) type corresponding as well as possible to
    TYPE0, but based on no runtime data. */
 
-static struct type*
-to_static_fixed_type (type0)
-     struct type* type0;
+static struct type *
+to_static_fixed_type (struct type *type0)
 {
-  struct type* type;
+  struct type *type;
 
   if (type0 == NULL)
     return NULL;
 
   /* FIXME:  TYPE_FLAG_FIXED_INSTANCE should be defined in gdbtypes.h */
   /*  if (TYPE_FLAGS (type0) & TYPE_FLAG_FIXED_INSTANCE)
-    return type0;
-  */
+     return type0;
+   */
   CHECK_TYPEDEF (type0);
-  
+
   switch (TYPE_CODE (type0))
     {
     default:
       return type0;
     case TYPE_CODE_STRUCT:
       type = dynamic_template_type (type0);
-      if (type != NULL) 
+      if (type != NULL)
 	return template_to_static_fixed_type (type);
       return type0;
     case TYPE_CODE_UNION:
@@ -6665,22 +6436,21 @@
 }
 
 /* A static approximation of TYPE with all type wrappers removed. */
-static struct type*
-static_unwrap_type (type)
-     struct type* type;
+static struct type *
+static_unwrap_type (struct type *type)
 {
   if (ada_is_aligner_type (type))
     {
-      struct type* type1 = TYPE_FIELD_TYPE (check_typedef (type), 0);
+      struct type *type1 = TYPE_FIELD_TYPE (check_typedef (type), 0);
       if (ada_type_name (type1) == NULL)
 	TYPE_NAME (type1) = ada_type_name (type);
 
       return static_unwrap_type (type1);
     }
-  else 
+  else
     {
-      struct type* raw_real_type = ada_get_base_type (type);
-      if (raw_real_type == type) 
+      struct type *raw_real_type = ada_get_base_type (type);
+      if (raw_real_type == type)
 	return type;
       else
 	return to_static_fixed_type (raw_real_type);
@@ -6700,19 +6470,18 @@
 
 /* A type equivalent to TYPE that is not a non-record stub, if one
    exists, otherwise TYPE. */
-struct type*
-ada_completed_type (type)
-     struct type* type;
+struct type *
+ada_completed_type (struct type *type)
 {
   CHECK_TYPEDEF (type);
   if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM
       || (TYPE_FLAGS (type) & TYPE_FLAG_STUB) == 0
       || TYPE_TAG_NAME (type) == NULL)
     return type;
-  else 
+  else
     {
-      char* name = TYPE_TAG_NAME (type);
-      struct type* type1 = ada_find_any_type (name);
+      char *name = TYPE_TAG_NAME (type);
+      struct type *type1 = ada_find_any_type (name);
       return (type1 == NULL) ? type : type1;
     }
 }
@@ -6721,19 +6490,17 @@
    type TYPE0, but with a standard (static-sized) type that correctly
    describes it.  If VAL0 is not NULL and TYPE0 already is a standard
    type, then return VAL0 [this feature is simply to avoid redundant
-   creation of struct values]. */ 
+   creation of struct values]. */
 
-struct value*
-ada_to_fixed_value (type0, valaddr, address, val0)
-     struct type* type0;
-     char* valaddr;
-     CORE_ADDR address;
-     struct value* val0;
+struct value *
+ada_to_fixed_value (struct type *type0, char *valaddr, CORE_ADDR address,
+		    struct value *val0)
 {
-  struct type* type = ada_to_fixed_type (type0, valaddr, address, NULL);
+  struct type *type = ada_to_fixed_type (type0, valaddr, address, NULL);
   if (type == type0 && val0 != NULL)
     return val0;
-  else return value_from_contents_and_address (type, valaddr, address);
+  else
+    return value_from_contents_and_address (type, valaddr, address);
 }
 
 /* A value representing VAL, but with a standard (static-sized) type 
@@ -6741,47 +6508,44 @@
    without consulting any runtime values.  For Ada dynamic-sized
    types, therefore, the type of the result is likely to be inaccurate. */
 
-struct value*
-ada_to_static_fixed_value (val)
-     struct value* val;
+struct value *
+ada_to_static_fixed_value (struct value *val)
 {
-  struct type *type = 
+  struct type *type =
     to_static_fixed_type (static_unwrap_type (VALUE_TYPE (val)));
   if (type == VALUE_TYPE (val))
     return val;
   else
     return coerce_unspec_val_to_type (val, 0, type);
 }
-
-
 
 
 
+
+
 /* Attributes */
 
 /* Table mapping attribute numbers to names */
 /* NOTE: Keep up to date with enum ada_attribute definition in ada-lang.h */
 
-static const char* attribute_names[] = {
+static const char *attribute_names[] = {
   "<?>",
 
-  "first", 
+  "first",
   "last",
   "length",
   "image",
   "img",
   "max",
   "min",
-  "pos"
-  "tag",
+  "pos" "tag",
   "val",
 
   0
 };
 
-const char*
-ada_attribute_name (n)
-     int n;
+const char *
+ada_attribute_name (int n)
 {
   if (n > 0 && n < (int) ATR_END)
     return attribute_names[n];
@@ -6791,13 +6555,12 @@
 
 /* Evaluate the 'POS attribute applied to ARG. */
 
-static struct value*
-value_pos_atr (arg)
-     struct value* arg;
+static struct value *
+value_pos_atr (struct value *arg)
 {
   struct type *type = VALUE_TYPE (arg);
 
-  if (! discrete_type_p (type))
+  if (!discrete_type_p (type))
     error ("'POS only defined on discrete types");
 
   if (TYPE_CODE (type) == TYPE_CODE_ENUM)
@@ -6805,7 +6568,7 @@
       int i;
       LONGEST v = value_as_long (arg);
 
-      for (i = 0; i < TYPE_NFIELDS (type); i += 1) 
+      for (i = 0; i < TYPE_NFIELDS (type); i += 1)
 	{
 	  if (v == TYPE_FIELD_BITPOS (type, i))
 	    return value_from_longest (builtin_type_ada_int, i);
@@ -6818,14 +6581,12 @@
 
 /* Evaluate the TYPE'VAL attribute applied to ARG. */
 
-static struct value*
-value_val_atr (type, arg)
-     struct type *type;
-     struct value* arg;
+static struct value *
+value_val_atr (struct type *type, struct value *arg)
 {
-  if (! discrete_type_p (type))
+  if (!discrete_type_p (type))
     error ("'VAL only defined on discrete types");
-  if (! integer_type_p (VALUE_TYPE (arg)))
+  if (!integer_type_p (VALUE_TYPE (arg)))
     error ("'VAL requires integral argument");
 
   if (TYPE_CODE (type) == TYPE_CODE_ENUM)
@@ -6833,28 +6594,26 @@
       long pos = value_as_long (arg);
       if (pos < 0 || pos >= TYPE_NFIELDS (type))
 	error ("argument to 'VAL out of range");
-      return 
-	value_from_longest (type, TYPE_FIELD_BITPOS (type, pos));
+      return value_from_longest (type, TYPE_FIELD_BITPOS (type, pos));
     }
   else
     return value_from_longest (type, value_as_long (arg));
 }
-
 
+
 				/* Evaluation */
 
 /* True if TYPE appears to be an Ada character type.  
  * [At the moment, this is true only for Character and Wide_Character;
  * It is a heuristic test that could stand improvement]. */
 
-int 
-ada_is_character_type (type)
-     struct type* type;
+int
+ada_is_character_type (struct type *type)
 {
-  const char* name = ada_type_name (type);
-  return 
+  const char *name = ada_type_name (type);
+  return
     name != NULL
-    && (TYPE_CODE (type) == TYPE_CODE_CHAR 
+    && (TYPE_CODE (type) == TYPE_CODE_CHAR
 	|| TYPE_CODE (type) == TYPE_CODE_INT
 	|| TYPE_CODE (type) == TYPE_CODE_RANGE)
     && (STREQ (name, "character") || STREQ (name, "wide_character")
@@ -6864,11 +6623,10 @@
 /* True if TYPE appears to be an Ada string type. */
 
 int
-ada_is_string_type (type)
-     struct type *type;
+ada_is_string_type (struct type *type)
 {
   CHECK_TYPEDEF (type);
-  if (type != NULL 
+  if (type != NULL
       && TYPE_CODE (type) != TYPE_CODE_PTR
       && (ada_is_simple_array (type) || ada_is_array_descriptor (type))
       && ada_array_arity (type) == 1)
@@ -6877,7 +6635,7 @@
 
       return ada_is_character_type (elttype);
     }
-  else 
+  else
     return 0;
 }
 
@@ -6887,8 +6645,7 @@
    distinctive name. */
 
 int
-ada_is_aligner_type (type)
-     struct type *type;
+ada_is_aligner_type (struct type *type)
 {
   CHECK_TYPEDEF (type);
   return (TYPE_CODE (type) == TYPE_CODE_STRUCT
@@ -6899,35 +6656,33 @@
 /* If there is an ___XVS-convention type parallel to SUBTYPE, return
    the parallel type. */
 
-struct type*
-ada_get_base_type (raw_type)
-     struct type* raw_type;
+struct type *
+ada_get_base_type (struct type *raw_type)
 {
-  struct type* real_type_namer;
-  struct type* raw_real_type;
-  struct type* real_type;
+  struct type *real_type_namer;
+  struct type *raw_real_type;
+  struct type *real_type;
 
   if (raw_type == NULL || TYPE_CODE (raw_type) != TYPE_CODE_STRUCT)
     return raw_type;
 
   real_type_namer = ada_find_parallel_type (raw_type, "___XVS");
-  if (real_type_namer == NULL 
+  if (real_type_namer == NULL
       || TYPE_CODE (real_type_namer) != TYPE_CODE_STRUCT
       || TYPE_NFIELDS (real_type_namer) != 1)
     return raw_type;
 
   raw_real_type = ada_find_any_type (TYPE_FIELD_NAME (real_type_namer, 0));
-  if (raw_real_type == NULL) 
+  if (raw_real_type == NULL)
     return raw_type;
   else
     return raw_real_type;
-}  
+}
 
 /* The type of value designated by TYPE, with all aligners removed. */
 
-struct type*
-ada_aligned_type (type)
-     struct type* type;
+struct type *
+ada_aligned_type (struct type *type)
 {
   if (ada_is_aligner_type (type))
     return ada_aligned_type (TYPE_FIELD_TYPE (type, 0));
@@ -6939,33 +6694,31 @@
 /* The address of the aligned value in an object at address VALADDR
    having type TYPE.  Assumes ada_is_aligner_type (TYPE). */
 
-char*
-ada_aligned_value_addr (type, valaddr)
-     struct type *type;
-     char *valaddr;
+char *
+ada_aligned_value_addr (struct type *type, char *valaddr)
 {
-  if (ada_is_aligner_type (type)) 
+  if (ada_is_aligner_type (type))
     return ada_aligned_value_addr (TYPE_FIELD_TYPE (type, 0),
-				   valaddr + 
-				   TYPE_FIELD_BITPOS (type, 0)/TARGET_CHAR_BIT);
+				   valaddr +
+				   TYPE_FIELD_BITPOS (type,
+						      0) / TARGET_CHAR_BIT);
   else
     return valaddr;
 }
 
 /* The printed representation of an enumeration literal with encoded
    name NAME. The value is good to the next call of ada_enum_name. */
-const char*
-ada_enum_name (name)
-     const char* name;
+const char *
+ada_enum_name (const char *name)
 {
-  char* tmp;
+  char *tmp;
 
-  while (1) 
+  while (1)
     {
       if ((tmp = strstr (name, "__")) != NULL)
-	name = tmp+2;
+	name = tmp + 2;
       else if ((tmp = strchr (name, '.')) != NULL)
-	name = tmp+1;
+	name = tmp + 1;
       else
 	break;
     }
@@ -6976,7 +6729,7 @@
       int v;
       if (name[1] == 'U' || name[1] == 'W')
 	{
-	  if (sscanf (name+2, "%x", &v) != 1) 
+	  if (sscanf (name + 2, "%x", &v) != 1)
 	    return name;
 	}
       else
@@ -6991,16 +6744,13 @@
 
       return result;
     }
-  else 
+  else
     return name;
 }
 
-static struct value*
-evaluate_subexp (expect_type, exp, pos, noside)
-     struct type *expect_type;
-     struct expression *exp;
-     int *pos;
-     enum noside noside;
+static struct value *
+evaluate_subexp (struct type *expect_type, struct expression *exp, int *pos,
+		 enum noside noside)
 {
   return (*exp->language_defn->evaluate_exp) (expect_type, exp, pos, noside);
 }
@@ -7009,65 +6759,60 @@
    evaluate_type, updating *POS to point just past the evaluated
    expression. */
 
-static struct value*
-evaluate_subexp_type (exp, pos)
-     struct expression* exp;
-     int* pos;
+static struct value *
+evaluate_subexp_type (struct expression *exp, int *pos)
 {
-  return (*exp->language_defn->evaluate_exp) 
+  return (*exp->language_defn->evaluate_exp)
     (NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
 }
 
 /* If VAL is wrapped in an aligner or subtype wrapper, return the
-   value it wraps. */ 
+   value it wraps. */
 
-static struct value*
-unwrap_value (val)
-     struct value* val;
+static struct value *
+unwrap_value (struct value *val)
 {
-  struct type* type = check_typedef (VALUE_TYPE (val));
+  struct type *type = check_typedef (VALUE_TYPE (val));
   if (ada_is_aligner_type (type))
     {
-      struct value* v = value_struct_elt (&val, NULL, "F", 
-				      NULL, "internal structure");
-      struct type* val_type = check_typedef (VALUE_TYPE (v));
+      struct value *v = value_struct_elt (&val, NULL, "F",
+					  NULL, "internal structure");
+      struct type *val_type = check_typedef (VALUE_TYPE (v));
       if (ada_type_name (val_type) == NULL)
 	TYPE_NAME (val_type) = ada_type_name (type);
 
       return unwrap_value (v);
     }
-  else 
+  else
     {
-      struct type* raw_real_type = 
+      struct type *raw_real_type =
 	ada_completed_type (ada_get_base_type (type));
-      
+
       if (type == raw_real_type)
 	return val;
 
-      return 
-	coerce_unspec_val_to_type 
+      return
+	coerce_unspec_val_to_type
 	(val, 0, ada_to_fixed_type (raw_real_type, 0,
 				    VALUE_ADDRESS (val) + VALUE_OFFSET (val),
 				    NULL));
     }
 }
-    
-static struct value*
-cast_to_fixed (type, arg)
-     struct type *type;
-     struct value* arg;
+
+static struct value *
+cast_to_fixed (struct type *type, struct value *arg)
 {
   LONGEST val;
 
   if (type == VALUE_TYPE (arg))
     return arg;
   else if (ada_is_fixed_point_type (VALUE_TYPE (arg)))
-    val = ada_float_to_fixed (type, 
+    val = ada_float_to_fixed (type,
 			      ada_fixed_to_float (VALUE_TYPE (arg),
 						  value_as_long (arg)));
-  else 
+  else
     {
-      DOUBLEST argd = 
+      DOUBLEST argd =
 	value_as_double (value_cast (builtin_type_double, value_copy (arg)));
       val = ada_float_to_fixed (type, argd);
     }
@@ -7075,9 +6820,8 @@
   return value_from_longest (type, val);
 }
 
-static struct value*
-cast_from_fixed_to_double (arg)
-     struct value* arg;
+static struct value *
+cast_from_fixed_to_double (struct value *arg)
 {
   DOUBLEST val = ada_fixed_to_float (VALUE_TYPE (arg),
 				     value_as_long (arg));
@@ -7086,42 +6830,38 @@
 
 /* Coerce VAL as necessary for assignment to an lval of type TYPE, and 
  * return the converted value. */
-static struct value*
-coerce_for_assign (type, val)
-     struct type* type;
-     struct value* val;
+static struct value *
+coerce_for_assign (struct type *type, struct value *val)
 {
-  struct type* type2 = VALUE_TYPE (val);
+  struct type *type2 = VALUE_TYPE (val);
   if (type == type2)
     return val;
 
   CHECK_TYPEDEF (type2);
   CHECK_TYPEDEF (type);
 
-  if (TYPE_CODE (type2) == TYPE_CODE_PTR && TYPE_CODE (type) == TYPE_CODE_ARRAY)
+  if (TYPE_CODE (type2) == TYPE_CODE_PTR
+      && TYPE_CODE (type) == TYPE_CODE_ARRAY)
     {
       val = ada_value_ind (val);
       type2 = VALUE_TYPE (val);
     }
 
-  if (TYPE_CODE (type2) == TYPE_CODE_ARRAY 
+  if (TYPE_CODE (type2) == TYPE_CODE_ARRAY
       && TYPE_CODE (type) == TYPE_CODE_ARRAY)
     {
       if (TYPE_LENGTH (type2) != TYPE_LENGTH (type)
 	  || TYPE_LENGTH (TYPE_TARGET_TYPE (type2))
-	     != TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
+	  != TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
 	error ("Incompatible types in assignment");
       VALUE_TYPE (val) = type;
     }
-  return val;  
+  return val;
 }
 
-struct value*
-ada_evaluate_subexp (expect_type, exp, pos, noside)
-     struct type *expect_type;
-     struct expression *exp;
-     int *pos;
-     enum noside noside;
+struct value *
+ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
+		     int *pos, enum noside noside)
 {
   enum exp_opcode op;
   enum ada_attribute atr;
@@ -7130,16 +6870,19 @@
   struct value *arg1 = NULL, *arg2 = NULL, *arg3;
   struct type *type;
   int nargs;
-  struct value* *argvec;
+  struct value **argvec;
 
-  pc = *pos; *pos += 1;
+  pc = *pos;
+  *pos += 1;
   op = exp->elts[pc].opcode;
 
-  switch (op) 
+  switch (op)
     {
     default:
       *pos -= 1;
-      return unwrap_value (evaluate_subexp_standard (expect_type, exp, pos, noside));
+      return
+	unwrap_value (evaluate_subexp_standard
+		      (expect_type, exp, pos, noside));
 
     case UNOP_CAST:
       (*pos) += 2;
@@ -7153,30 +6896,30 @@
 	    arg1 = cast_to_fixed (type, arg1);
 	  else if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
 	    arg1 = value_cast (type, cast_from_fixed_to_double (arg1));
-	  else if (VALUE_LVAL (arg1) == lval_memory) 
+	  else if (VALUE_LVAL (arg1) == lval_memory)
 	    {
 	      /* This is in case of the really obscure (and undocumented,
-		 but apparently expected) case of (Foo) Bar.all, where Bar 
-		 is an integer constant and Foo is a dynamic-sized type.
-		 If we don't do this, ARG1 will simply be relabeled with
-		 TYPE. */
-	      if (noside == EVAL_AVOID_SIDE_EFFECTS) 
+	         but apparently expected) case of (Foo) Bar.all, where Bar 
+	         is an integer constant and Foo is a dynamic-sized type.
+	         If we don't do this, ARG1 will simply be relabeled with
+	         TYPE. */
+	      if (noside == EVAL_AVOID_SIDE_EFFECTS)
 		return value_zero (to_static_fixed_type (type), not_lval);
-	      arg1 = 
-		ada_to_fixed_value 
-		  (type, 0, VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1), 0);
+	      arg1 =
+		ada_to_fixed_value
+		(type, 0, VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1), 0);
 	    }
-	  else		 
-	    arg1 = value_cast (type, arg1);	
+	  else
+	    arg1 = value_cast (type, arg1);
 	}
       return arg1;
 
       /* FIXME:  UNOP_QUAL should be defined in expression.h */
       /*    case UNOP_QUAL:
-      (*pos) += 2;
-      type = exp->elts[pc + 1].type;
-      return ada_evaluate_subexp (type, exp, pos, noside);
-      */
+         (*pos) += 2;
+         type = exp->elts[pc + 1].type;
+         return ada_evaluate_subexp (type, exp, pos, noside);
+       */
     case BINOP_ASSIGN:
       arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
       arg2 = evaluate_subexp (VALUE_TYPE (arg1), exp, pos, noside);
@@ -7184,13 +6927,14 @@
 	return arg1;
       if (binop_user_defined_p (op, arg1, arg2))
 	return value_x_binop (arg1, arg2, op, OP_NULL, EVAL_NORMAL);
-      else 
+      else
 	{
 	  if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
 	    arg2 = cast_to_fixed (VALUE_TYPE (arg1), arg2);
 	  else if (ada_is_fixed_point_type (VALUE_TYPE (arg2)))
-	    error ("Fixed-point values must be assigned to fixed-point variables");
-	  else 
+	    error
+	      ("Fixed-point values must be assigned to fixed-point variables");
+	  else
 	    arg2 = coerce_for_assign (VALUE_TYPE (arg1), arg2);
 	  return ada_value_assign (arg1, arg2);
 	}
@@ -7207,7 +6951,8 @@
 	  if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
 	       || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
 	      && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
-	    error ("Operands of fixed-point addition must have the same type");
+	    error
+	      ("Operands of fixed-point addition must have the same type");
 	  return value_cast (VALUE_TYPE (arg1), value_add (arg1, arg2));
 	}
 
@@ -7223,7 +6968,8 @@
 	  if ((ada_is_fixed_point_type (VALUE_TYPE (arg1))
 	       || ada_is_fixed_point_type (VALUE_TYPE (arg2)))
 	      && VALUE_TYPE (arg1) != VALUE_TYPE (arg2))
-	    error ("Operands of fixed-point subtraction must have the same type");		
+	    error
+	      ("Operands of fixed-point subtraction must have the same type");
 	  return value_cast (VALUE_TYPE (arg1), value_sub (arg1, arg2));
 	}
 
@@ -7238,7 +6984,7 @@
       else
 	if (noside == EVAL_AVOID_SIDE_EFFECTS
 	    && (op == BINOP_DIV || op == BINOP_REM || op == BINOP_MOD))
-	  return value_zero (VALUE_TYPE (arg1), not_lval);
+	return value_zero (VALUE_TYPE (arg1), not_lval);
       else
 	{
 	  if (ada_is_fixed_point_type (VALUE_TYPE (arg1)))
@@ -7261,38 +7007,39 @@
 
       /* FIXME:  OP_UNRESOLVED_VALUE should be defined in expression.h */
       /*    case OP_UNRESOLVED_VALUE:
-      /* Only encountered when an unresolved symbol occurs in a
+         /* Only encountered when an unresolved symbol occurs in a
          context other than a function call, in which case, it is
-	 illegal. *//*
-      (*pos) += 3;
-      if (noside == EVAL_SKIP)
-	goto nosideret;
-      else 
-	error ("Unexpected unresolved symbol, %s, during evaluation",
-	       ada_demangle (exp->elts[pc + 2].name));
-      */
+   illegal. *//*
+   (*pos) += 3;
+   if (noside == EVAL_SKIP)
+   goto nosideret;
+   else 
+   error ("Unexpected unresolved symbol, %s, during evaluation",
+   ada_demangle (exp->elts[pc + 2].name));
+ */
     case OP_VAR_VALUE:
       *pos -= 1;
       if (noside == EVAL_SKIP)
 	{
 	  *pos += 4;
 	  goto nosideret;
-	} 
+	}
       else if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	{
 	  *pos += 4;
-	  return value_zero 
-	    (to_static_fixed_type 
-	     (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc+2].symbol))),
+	  return value_zero
+	    (to_static_fixed_type
+	     (static_unwrap_type (SYMBOL_TYPE (exp->elts[pc + 2].symbol))),
 	     not_lval);
 	}
-      else 
+      else
 	{
-	  arg1 = unwrap_value (evaluate_subexp_standard (expect_type, exp, pos, 
-							 noside));
+	  arg1 =
+	    unwrap_value (evaluate_subexp_standard
+			  (expect_type, exp, pos, noside));
 	  return ada_to_fixed_value (VALUE_TYPE (arg1), 0,
-				     VALUE_ADDRESS (arg1) + VALUE_OFFSET(arg1),
-				     arg1);
+				     VALUE_ADDRESS (arg1) +
+				     VALUE_OFFSET (arg1), arg1);
 	}
 
     case OP_ARRAY:
@@ -7302,7 +7049,8 @@
       nargs = tem3 - tem2 + 1;
       type = expect_type ? check_typedef (expect_type) : NULL_TYPE;
 
-      argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 1));
+      argvec =
+	(struct value * *) alloca (sizeof (struct value *) * (nargs + 1));
       for (tem = 0; tem == 0 || tem < nargs; tem += 1)
 	/* At least one element gets inserted for the type */
 	{
@@ -7317,17 +7065,18 @@
       (*pos) += 2;
 
       /* Allocate arg vector, including space for the function to be
-	 called in argvec[0] and a terminating NULL */
+         called in argvec[0] and a terminating NULL */
       nargs = longest_to_int (exp->elts[pc + 1].longconst);
-      argvec = (struct value* *) alloca (sizeof (struct value*) * (nargs + 2));
+      argvec =
+	(struct value * *) alloca (sizeof (struct value *) * (nargs + 2));
 
       /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */
       /* FIXME: name should be defined in expresion.h */
       /*      if (exp->elts[*pos].opcode == OP_UNRESOLVED_VALUE)
-	error ("Unexpected unresolved symbol, %s, during evaluation",
-	       ada_demangle (exp->elts[pc + 5].name));
-      */
-      if (0) 
+         error ("Unexpected unresolved symbol, %s, during evaluation",
+         ada_demangle (exp->elts[pc + 5].name));
+       */
+      if (0)
 	{
 	  error ("unexpected code path, FIXME");
 	}
@@ -7349,7 +7098,7 @@
 
       type = check_typedef (VALUE_TYPE (argvec[0]));
       if (TYPE_CODE (type) == TYPE_CODE_PTR)
-	{	
+	{
 	  switch (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (type))))
 	    {
 	    case TYPE_CODE_FUNC:
@@ -7366,53 +7115,55 @@
 	      error ("cannot subscript or call something of type `%s'",
 		     ada_type_name (VALUE_TYPE (argvec[0])));
 	      break;
-	  }
+	    }
 	}
-	  
+
       switch (TYPE_CODE (type))
 	{
 	case TYPE_CODE_FUNC:
 	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	    return allocate_value (TYPE_TARGET_TYPE (type));
 	  return call_function_by_hand (argvec[0], nargs, argvec + 1);
-	case TYPE_CODE_STRUCT: 
+	case TYPE_CODE_STRUCT:
 	  {
 	    int arity = ada_array_arity (type);
 	    type = ada_array_element_type (type, nargs);
-	    if (type == NULL) 
+	    if (type == NULL)
 	      error ("cannot subscript or call a record");
-	    if (arity != nargs) 
+	    if (arity != nargs)
 	      error ("wrong number of subscripts; expecting %d", arity);
-	    if (noside == EVAL_AVOID_SIDE_EFFECTS) 
+	    if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	      return allocate_value (ada_aligned_type (type));
-	    return unwrap_value (ada_value_subscript (argvec[0], nargs, argvec+1));
+	    return
+	      unwrap_value (ada_value_subscript
+			    (argvec[0], nargs, argvec + 1));
 	  }
 	case TYPE_CODE_ARRAY:
 	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    {	
+	    {
 	      type = ada_array_element_type (type, nargs);
 	      if (type == NULL)
 		error ("element type of array unknown");
 	      else
 		return allocate_value (ada_aligned_type (type));
 	    }
-	  return 
+	  return
 	    unwrap_value (ada_value_subscript
 			  (ada_coerce_to_simple_array (argvec[0]),
-			   nargs, argvec+1));
-	case TYPE_CODE_PTR: /* Pointer to array */
+			   nargs, argvec + 1));
+	case TYPE_CODE_PTR:	/* Pointer to array */
 	  type = to_fixed_array_type (TYPE_TARGET_TYPE (type), NULL, 1);
 	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    {	
+	    {
 	      type = ada_array_element_type (type, nargs);
 	      if (type == NULL)
 		error ("element type of array unknown");
 	      else
 		return allocate_value (ada_aligned_type (type));
 	    }
-	  return 
-	    unwrap_value (ada_value_ptr_subscript (argvec[0], type, 
-						   nargs, argvec+1));
+	  return
+	    unwrap_value (ada_value_ptr_subscript (argvec[0], type,
+						   nargs, argvec + 1));
 
 	default:
 	  error ("Internal error in evaluate_subexp");
@@ -7420,47 +7171,46 @@
 
     case TERNOP_SLICE:
       {
-	struct value* array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+	struct value *array = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 	int lowbound
 	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
 	int upper
 	  = value_as_long (evaluate_subexp (NULL_TYPE, exp, pos, noside));
 	if (noside == EVAL_SKIP)
 	  goto nosideret;
-        
-        /* If this is a reference to an array, then dereference it */
-        if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_REF
-            && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
-            && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
-                 TYPE_CODE_ARRAY
-            && !ada_is_array_descriptor (check_typedef (VALUE_TYPE
-               (array))))
-          {
-            array = ada_coerce_ref (array);
-          }
+
+	/* If this is a reference to an array, then dereference it */
+	if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_REF
+	    && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
+	    && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
+	    TYPE_CODE_ARRAY
+	    && !ada_is_array_descriptor (check_typedef (VALUE_TYPE (array))))
+	  {
+	    array = ada_coerce_ref (array);
+	  }
 
 	if (noside == EVAL_AVOID_SIDE_EFFECTS &&
 	    ada_is_array_descriptor (check_typedef (VALUE_TYPE (array))))
 	  {
 	    /* Try to dereference the array, in case it is an access to array */
-	    struct type * arrType = ada_type_of_array (array, 0);
+	    struct type *arrType = ada_type_of_array (array, 0);
 	    if (arrType != NULL)
-	      array = value_at_lazy (arrType, 0, NULL); 
+	      array = value_at_lazy (arrType, 0, NULL);
 	  }
 	if (ada_is_array_descriptor (VALUE_TYPE (array)))
 	  array = ada_coerce_to_simple_array (array);
 
-        /* If at this point we have a pointer to an array, it means that
-           it is a pointer to a simple (non-ada) array. We just then
-           dereference it */
-        if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_PTR
-            && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
-            && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
-                 TYPE_CODE_ARRAY)
-          {
-              array = ada_value_ind (array);
-          }
-        
+	/* If at this point we have a pointer to an array, it means that
+	   it is a pointer to a simple (non-ada) array. We just then
+	   dereference it */
+	if (TYPE_CODE (VALUE_TYPE (array)) == TYPE_CODE_PTR
+	    && TYPE_TARGET_TYPE (VALUE_TYPE (array)) != NULL
+	    && TYPE_CODE (TYPE_TARGET_TYPE (VALUE_TYPE (array))) ==
+	    TYPE_CODE_ARRAY)
+	  {
+	    array = ada_value_ind (array);
+	  }
+
 	if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	  /* The following will get the bounds wrong, but only in contexts
 	     where the value is not being requested (FIXME?). */
@@ -7471,295 +7221,295 @@
 
       /* FIXME: UNOP_MBR should be defined in expression.h */
       /*    case UNOP_MBR:
-      (*pos) += 2;
-      arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-      type = exp->elts[pc + 1].type;
+         (*pos) += 2;
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         type = exp->elts[pc + 1].type;
 
-      if (noside == EVAL_SKIP)
-	goto nosideret;
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-      switch (TYPE_CODE (type)) 
-	{
-	default:
-	  warning ("Membership test incompletely implemented; always returns true");
-	  return value_from_longest (builtin_type_int, (LONGEST) 1);
-	  
-	case TYPE_CODE_RANGE:
-	  arg2 = value_from_longest (builtin_type_int, 
-				     (LONGEST) TYPE_LOW_BOUND (type));
-	  arg3 = value_from_longest (builtin_type_int, 
-				     (LONGEST) TYPE_HIGH_BOUND (type));
-	  return 
-	    value_from_longest (builtin_type_int,
-				(value_less (arg1,arg3) 
-				 || value_equal (arg1,arg3))
-				&& (value_less (arg2,arg1)
-				    || value_equal (arg2,arg1)));
-	}
-      */
-      /* FIXME: BINOP_MBR should be defined in expression.h */      
+         switch (TYPE_CODE (type)) 
+         {
+         default:
+         warning ("Membership test incompletely implemented; always returns true");
+         return value_from_longest (builtin_type_int, (LONGEST) 1);
+
+         case TYPE_CODE_RANGE:
+         arg2 = value_from_longest (builtin_type_int, 
+         (LONGEST) TYPE_LOW_BOUND (type));
+         arg3 = value_from_longest (builtin_type_int, 
+         (LONGEST) TYPE_HIGH_BOUND (type));
+         return 
+         value_from_longest (builtin_type_int,
+         (value_less (arg1,arg3) 
+         || value_equal (arg1,arg3))
+         && (value_less (arg2,arg1)
+         || value_equal (arg2,arg1)));
+         }
+       */
+      /* FIXME: BINOP_MBR should be defined in expression.h */
       /*    case BINOP_MBR:
-      (*pos) += 2;
-      arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-      arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         (*pos) += 2;
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 
-      if (noside == EVAL_SKIP)
-	goto nosideret;
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-      if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	return value_zero (builtin_type_int, not_lval);
+         if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return value_zero (builtin_type_int, not_lval);
 
-      tem = longest_to_int (exp->elts[pc + 1].longconst);
+         tem = longest_to_int (exp->elts[pc + 1].longconst);
 
-      if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg2)))
-	error ("invalid dimension number to '%s", "range");
+         if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg2)))
+         error ("invalid dimension number to '%s", "range");
 
-      arg3 = ada_array_bound (arg2, tem, 1);
-      arg2 = ada_array_bound (arg2, tem, 0);
+         arg3 = ada_array_bound (arg2, tem, 1);
+         arg2 = ada_array_bound (arg2, tem, 0);
 
-      return 
-	value_from_longest (builtin_type_int,
-			    (value_less (arg1,arg3) 
-			     || value_equal (arg1,arg3))
-			    && (value_less (arg2,arg1)
-				|| value_equal (arg2,arg1)));
-      */
+         return 
+         value_from_longest (builtin_type_int,
+         (value_less (arg1,arg3) 
+         || value_equal (arg1,arg3))
+         && (value_less (arg2,arg1)
+         || value_equal (arg2,arg1)));
+       */
       /* FIXME: TERNOP_MBR should be defined in expression.h */
       /*    case TERNOP_MBR:
-      arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-      arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-      arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         arg3 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
 
-      if (noside == EVAL_SKIP)
-	goto nosideret;
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-      return 
-	value_from_longest (builtin_type_int,
-			    (value_less (arg1,arg3) 
-			     || value_equal (arg1,arg3))
-			    && (value_less (arg2,arg1)
-				|| value_equal (arg2,arg1)));
-      */
+         return 
+         value_from_longest (builtin_type_int,
+         (value_less (arg1,arg3) 
+         || value_equal (arg1,arg3))
+         && (value_less (arg2,arg1)
+         || value_equal (arg2,arg1)));
+       */
       /* FIXME: OP_ATTRIBUTE should be defined in expression.h */
       /*    case OP_ATTRIBUTE:
-      *pos += 3;
-      atr = (enum ada_attribute) longest_to_int (exp->elts[pc + 2].longconst);
-      switch (atr) 
-	{
-	default:
-	  error ("unexpected attribute encountered");
+         *pos += 3;
+         atr = (enum ada_attribute) longest_to_int (exp->elts[pc + 2].longconst);
+         switch (atr) 
+         {
+         default:
+         error ("unexpected attribute encountered");
 
-	case ATR_FIRST:
-	case ATR_LAST:
-	case ATR_LENGTH:
-	  {
-	    struct type* type_arg;
-	    if (exp->elts[*pos].opcode == OP_TYPE)
-	      {
-		evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
-		arg1 = NULL;
-		type_arg = exp->elts[pc + 5].type;
-	      }
-	    else
-	      {
-		arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-		type_arg = NULL;
-	      }
+         case ATR_FIRST:
+         case ATR_LAST:
+         case ATR_LENGTH:
+         {
+         struct type* type_arg;
+         if (exp->elts[*pos].opcode == OP_TYPE)
+         {
+         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+         arg1 = NULL;
+         type_arg = exp->elts[pc + 5].type;
+         }
+         else
+         {
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         type_arg = NULL;
+         }
 
-	    if (exp->elts[*pos].opcode != OP_LONG) 
-	      error ("illegal operand to '%s", ada_attribute_name (atr));
-	    tem = longest_to_int (exp->elts[*pos+2].longconst);
-	    *pos += 4;
+         if (exp->elts[*pos].opcode != OP_LONG) 
+         error ("illegal operand to '%s", ada_attribute_name (atr));
+         tem = longest_to_int (exp->elts[*pos+2].longconst);
+         *pos += 4;
 
-	    if (noside == EVAL_SKIP)
-	      goto nosideret;
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-	    if (type_arg == NULL)
-	      {
-		arg1 = ada_coerce_ref (arg1);
+         if (type_arg == NULL)
+         {
+         arg1 = ada_coerce_ref (arg1);
 
-		if (ada_is_packed_array_type (VALUE_TYPE (arg1)))
-		  arg1 = ada_coerce_to_simple_array (arg1);
+         if (ada_is_packed_array_type (VALUE_TYPE (arg1)))
+         arg1 = ada_coerce_to_simple_array (arg1);
 
-		if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg1)))
-		  error ("invalid dimension number to '%s", 
-			 ada_attribute_name (atr));
+         if (tem < 1 || tem > ada_array_arity (VALUE_TYPE (arg1)))
+         error ("invalid dimension number to '%s", 
+         ada_attribute_name (atr));
 
-		if (noside == EVAL_AVOID_SIDE_EFFECTS)
-		  {
-		    type = ada_index_type (VALUE_TYPE (arg1), tem);
-		    if (type == NULL) 
-		      error ("attempt to take bound of something that is not an array");
-		    return allocate_value (type);
-		  }
+         if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         {
+         type = ada_index_type (VALUE_TYPE (arg1), tem);
+         if (type == NULL) 
+         error ("attempt to take bound of something that is not an array");
+         return allocate_value (type);
+         }
 
-		switch (atr) 
-		  {
-		  default: 
-		    error ("unexpected attribute encountered");
-		  case ATR_FIRST:
-		    return ada_array_bound (arg1, tem, 0);
-		  case ATR_LAST:
-		    return ada_array_bound (arg1, tem, 1);
-		  case ATR_LENGTH:
-		    return ada_array_length (arg1, tem);
-		  }
-	      }
-	    else if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE
-		     || TYPE_CODE (type_arg) == TYPE_CODE_INT) 
-	      {
-		struct type* range_type;
-		char* name = ada_type_name (type_arg);
-		if (name == NULL)
-		  {
-		    if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE) 
-		      range_type = type_arg;
-		    else
-		      error ("unimplemented type attribute");
-		  }
-		else 
-		  range_type = 
-		    to_fixed_range_type (name, NULL, TYPE_OBJFILE (type_arg));
-		switch (atr) 
-		  {
-		  default: 
-		    error ("unexpected attribute encountered");
-		  case ATR_FIRST:
-		    return value_from_longest (TYPE_TARGET_TYPE (range_type),
-					       TYPE_LOW_BOUND (range_type));
-		  case ATR_LAST:
-		    return value_from_longest (TYPE_TARGET_TYPE (range_type),
-					       TYPE_HIGH_BOUND (range_type));
-		  }
-	      }		
-	    else if (TYPE_CODE (type_arg) == TYPE_CODE_ENUM)
-	      {
-		switch (atr) 
-		  {
-		  default: 
-		    error ("unexpected attribute encountered");
-		  case ATR_FIRST:
-		    return value_from_longest 
-		      (type_arg, TYPE_FIELD_BITPOS (type_arg, 0));
-		  case ATR_LAST:
-		    return value_from_longest 
-		      (type_arg, 
-		       TYPE_FIELD_BITPOS (type_arg,
-					  TYPE_NFIELDS (type_arg) - 1));
-		  }
-	      }
-	    else if (TYPE_CODE (type_arg) == TYPE_CODE_FLT)
-	      error ("unimplemented type attribute");
-	    else 
-	      {
-		LONGEST low, high;
+         switch (atr) 
+         {
+         default: 
+         error ("unexpected attribute encountered");
+         case ATR_FIRST:
+         return ada_array_bound (arg1, tem, 0);
+         case ATR_LAST:
+         return ada_array_bound (arg1, tem, 1);
+         case ATR_LENGTH:
+         return ada_array_length (arg1, tem);
+         }
+         }
+         else if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE
+         || TYPE_CODE (type_arg) == TYPE_CODE_INT) 
+         {
+         struct type* range_type;
+         char* name = ada_type_name (type_arg);
+         if (name == NULL)
+         {
+         if (TYPE_CODE (type_arg) == TYPE_CODE_RANGE) 
+         range_type = type_arg;
+         else
+         error ("unimplemented type attribute");
+         }
+         else 
+         range_type = 
+         to_fixed_range_type (name, NULL, TYPE_OBJFILE (type_arg));
+         switch (atr) 
+         {
+         default: 
+         error ("unexpected attribute encountered");
+         case ATR_FIRST:
+         return value_from_longest (TYPE_TARGET_TYPE (range_type),
+         TYPE_LOW_BOUND (range_type));
+         case ATR_LAST:
+         return value_from_longest (TYPE_TARGET_TYPE (range_type),
+         TYPE_HIGH_BOUND (range_type));
+         }
+         }              
+         else if (TYPE_CODE (type_arg) == TYPE_CODE_ENUM)
+         {
+         switch (atr) 
+         {
+         default: 
+         error ("unexpected attribute encountered");
+         case ATR_FIRST:
+         return value_from_longest 
+         (type_arg, TYPE_FIELD_BITPOS (type_arg, 0));
+         case ATR_LAST:
+         return value_from_longest 
+         (type_arg, 
+         TYPE_FIELD_BITPOS (type_arg,
+         TYPE_NFIELDS (type_arg) - 1));
+         }
+         }
+         else if (TYPE_CODE (type_arg) == TYPE_CODE_FLT)
+         error ("unimplemented type attribute");
+         else 
+         {
+         LONGEST low, high;
 
-		if (ada_is_packed_array_type (type_arg))
-		  type_arg = decode_packed_array_type (type_arg);
+         if (ada_is_packed_array_type (type_arg))
+         type_arg = decode_packed_array_type (type_arg);
 
-		if (tem < 1 || tem > ada_array_arity (type_arg))
-		  error ("invalid dimension number to '%s", 
-			 ada_attribute_name (atr));
+         if (tem < 1 || tem > ada_array_arity (type_arg))
+         error ("invalid dimension number to '%s", 
+         ada_attribute_name (atr));
 
-		if (noside == EVAL_AVOID_SIDE_EFFECTS)
-		  {
-		    type = ada_index_type (type_arg, tem);
-		    if (type == NULL) 
-		      error ("attempt to take bound of something that is not an array");
-		    return allocate_value (type);
-		  }
+         if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         {
+         type = ada_index_type (type_arg, tem);
+         if (type == NULL) 
+         error ("attempt to take bound of something that is not an array");
+         return allocate_value (type);
+         }
 
-		switch (atr) 
-		  {
-		  default: 
-		    error ("unexpected attribute encountered");
-		  case ATR_FIRST:
-		    low = ada_array_bound_from_type (type_arg, tem, 0, &type);
-		    return value_from_longest (type, low);
-		  case ATR_LAST:
-		    high = ada_array_bound_from_type (type_arg, tem, 1, &type);
-		    return value_from_longest (type, high);
-		  case ATR_LENGTH:
-		    low = ada_array_bound_from_type (type_arg, tem, 0, &type);
-		    high = ada_array_bound_from_type (type_arg, tem, 1, NULL);
-		    return value_from_longest (type, high-low+1);
-		  }
-	      }
-	  }
+         switch (atr) 
+         {
+         default: 
+         error ("unexpected attribute encountered");
+         case ATR_FIRST:
+         low = ada_array_bound_from_type (type_arg, tem, 0, &type);
+         return value_from_longest (type, low);
+         case ATR_LAST:
+         high = ada_array_bound_from_type (type_arg, tem, 1, &type);
+         return value_from_longest (type, high);
+         case ATR_LENGTH:
+         low = ada_array_bound_from_type (type_arg, tem, 0, &type);
+         high = ada_array_bound_from_type (type_arg, tem, 1, NULL);
+         return value_from_longest (type, high-low+1);
+         }
+         }
+         }
 
-	case ATR_TAG:
-	  arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  if (noside == EVAL_SKIP)
-	    goto nosideret;
+         case ATR_TAG:
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return 	
-	      value_zero (ada_tag_type (arg1), not_lval);
-	  
-	  return ada_value_tag (arg1);
-	  
-	case ATR_MIN:
-	case ATR_MAX:
-	  evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
-	  arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  if (noside == EVAL_SKIP)
-	    goto nosideret;
-	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (VALUE_TYPE (arg1), not_lval);
-	  else
-	    return value_binop (arg1, arg2, 
-				atr == ATR_MIN ? BINOP_MIN : BINOP_MAX);
+         if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return         
+         value_zero (ada_tag_type (arg1), not_lval);
 
-	case ATR_MODULUS:
-	  {
-	    struct type* type_arg = exp->elts[pc + 5].type;
-	    evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
-	    *pos += 4;
+         return ada_value_tag (arg1);
 
-	    if (noside == EVAL_SKIP)
-	      goto nosideret;
+         case ATR_MIN:
+         case ATR_MAX:
+         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         if (noside == EVAL_SKIP)
+         goto nosideret;
+         else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return value_zero (VALUE_TYPE (arg1), not_lval);
+         else
+         return value_binop (arg1, arg2, 
+         atr == ATR_MIN ? BINOP_MIN : BINOP_MAX);
 
-	    if (! ada_is_modular_type (type_arg))
-	      error ("'modulus must be applied to modular type");
+         case ATR_MODULUS:
+         {
+         struct type* type_arg = exp->elts[pc + 5].type;
+         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+         *pos += 4;
 
-	    return value_from_longest (TYPE_TARGET_TYPE (type_arg),
-				       ada_modulus (type_arg));
-	  }
-	  
+         if (noside == EVAL_SKIP)
+         goto nosideret;
 
-	case ATR_POS:
-	  evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
-	  arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  if (noside == EVAL_SKIP)
-	    goto nosideret;
-	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (builtin_type_ada_int, not_lval);
-	  else 
-	    return value_pos_atr (arg1);
+         if (! ada_is_modular_type (type_arg))
+         error ("'modulus must be applied to modular type");
 
-	case ATR_SIZE:
-	  arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  if (noside == EVAL_SKIP)
-	    goto nosideret;
-	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (builtin_type_ada_int, not_lval);
-	  else
-	    return value_from_longest (builtin_type_ada_int,
-				       TARGET_CHAR_BIT 
-				       * TYPE_LENGTH (VALUE_TYPE (arg1)));
+         return value_from_longest (TYPE_TARGET_TYPE (type_arg),
+         ada_modulus (type_arg));
+         }
 
-	case ATR_VAL:
-	  evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
-	  arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
-	  type = exp->elts[pc + 5].type;
-	  if (noside == EVAL_SKIP)
-	    goto nosideret;
-	  else if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    return value_zero (type, not_lval);
-	  else 
-	    return value_val_atr (type, arg1);
-	    }*/
+
+         case ATR_POS:
+         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         if (noside == EVAL_SKIP)
+         goto nosideret;
+         else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return value_zero (builtin_type_ada_int, not_lval);
+         else 
+         return value_pos_atr (arg1);
+
+         case ATR_SIZE:
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         if (noside == EVAL_SKIP)
+         goto nosideret;
+         else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return value_zero (builtin_type_ada_int, not_lval);
+         else
+         return value_from_longest (builtin_type_ada_int,
+         TARGET_CHAR_BIT 
+         * TYPE_LENGTH (VALUE_TYPE (arg1)));
+
+         case ATR_VAL:
+         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
+         arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
+         type = exp->elts[pc + 5].type;
+         if (noside == EVAL_SKIP)
+         goto nosideret;
+         else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+         return value_zero (type, not_lval);
+         else 
+         return value_val_atr (type, arg1);
+         } */
     case BINOP_EXP:
       arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
       arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
@@ -7767,10 +7517,9 @@
 	goto nosideret;
       if (binop_user_defined_p (op, arg1, arg2))
 	return unwrap_value (value_x_binop (arg1, arg2, op, OP_NULL,
-	  EVAL_NORMAL));
-      else
-	if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	  return value_zero (VALUE_TYPE (arg1), not_lval);
+					    EVAL_NORMAL));
+      else if (noside == EVAL_AVOID_SIDE_EFFECTS)
+	return value_zero (VALUE_TYPE (arg1), not_lval);
       else
 	return value_binop (arg1, arg2, op);
 
@@ -7794,7 +7543,7 @@
 
     case UNOP_IND:
       if (expect_type && TYPE_CODE (expect_type) == TYPE_CODE_PTR)
-        expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
+	expect_type = TYPE_TARGET_TYPE (check_typedef (expect_type));
       arg1 = evaluate_subexp (expect_type, exp, pos, noside);
       if (noside == EVAL_SKIP)
 	goto nosideret;
@@ -7804,21 +7553,20 @@
 	  if (ada_is_array_descriptor (type))
 	    /* GDB allows dereferencing GNAT array descriptors. */
 	    {
-	      struct type* arrType = ada_type_of_array (arg1, 0); 
+	      struct type *arrType = ada_type_of_array (arg1, 0);
 	      if (arrType == NULL)
 		error ("Attempt to dereference null array pointer.");
 	      return value_at_lazy (arrType, 0, NULL);
 	    }
 	  else if (TYPE_CODE (type) == TYPE_CODE_PTR
-	      || TYPE_CODE (type) == TYPE_CODE_REF
-	      /* In C you can dereference an array to get the 1st elt.  */
-	      || TYPE_CODE (type) == TYPE_CODE_ARRAY
-	      )
-	    return 
-	      value_zero 
-	        (to_static_fixed_type 
-		  (ada_aligned_type (check_typedef (TYPE_TARGET_TYPE (type)))),
-		 lval_memory);
+		   || TYPE_CODE (type) == TYPE_CODE_REF
+		   /* In C you can dereference an array to get the 1st elt.  */
+		   || TYPE_CODE (type) == TYPE_CODE_ARRAY)
+	    return
+	      value_zero
+	      (to_static_fixed_type
+	       (ada_aligned_type (check_typedef (TYPE_TARGET_TYPE (type)))),
+	       lval_memory);
 	  else if (TYPE_CODE (type) == TYPE_CODE_INT)
 	    /* GDB allows dereferencing an int.  */
 	    return value_zero (builtin_type_int, lval_memory);
@@ -7827,7 +7575,7 @@
 	}
       arg1 = ada_coerce_ref (arg1);
       type = check_typedef (VALUE_TYPE (arg1));
-	  
+
       if (ada_is_array_descriptor (type))
 	/* GDB allows dereferencing GNAT array descriptors. */
 	return ada_coerce_to_simple_array (arg1);
@@ -7841,9 +7589,10 @@
       if (noside == EVAL_SKIP)
 	goto nosideret;
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	return value_zero (ada_aligned_type 
+	return value_zero (ada_aligned_type
 			   (ada_lookup_struct_elt_type (VALUE_TYPE (arg1),
-							&exp->elts[pc + 2].string,
+							&exp->elts[pc +
+								   2].string,
 							0, NULL)),
 			   lval_memory);
       else
@@ -7858,9 +7607,9 @@
 	goto nosideret;
       else if (noside == EVAL_AVOID_SIDE_EFFECTS)
 	return allocate_value (builtin_type_void);
-      else 
+      else
 	error ("Attempt to use a type name as an expression");
-      
+
     case STRUCTOP_PTR:
       tem = longest_to_int (exp->elts[pc + 1].longconst);
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
@@ -7868,9 +7617,10 @@
       if (noside == EVAL_SKIP)
 	goto nosideret;
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	return value_zero (ada_aligned_type 
+	return value_zero (ada_aligned_type
 			   (ada_lookup_struct_elt_type (VALUE_TYPE (arg1),
-							&exp->elts[pc + 2].string,
+							&exp->elts[pc +
+								   2].string,
 							0, NULL)),
 			   lval_memory);
       else
@@ -7882,28 +7632,26 @@
 nosideret:
   return value_from_longest (builtin_type_long, (LONGEST) 1);
 }
-
 
+
 				/* Fixed point */
 
 /* If TYPE encodes an Ada fixed-point type, return the suffix of the
    type name that encodes the 'small and 'delta information.
    Otherwise, return NULL. */
 
-static const char*
-fixed_type_info (type)
-     struct type *type;
+static const char *
+fixed_type_info (struct type *type)
 {
-  const char* name = ada_type_name (type);
+  const char *name = ada_type_name (type);
   enum type_code code = (type == NULL) ? TYPE_CODE_UNDEF : TYPE_CODE (type);
 
-  if ((code == TYPE_CODE_INT || code == TYPE_CODE_RANGE)
-      && name != NULL)
-    {	
+  if ((code == TYPE_CODE_INT || code == TYPE_CODE_RANGE) && name != NULL)
+    {
       const char *tail = strstr (name, "___XF_");
       if (tail == NULL)
 	return NULL;
-      else 
+      else
 	return tail + 5;
     }
   else if (code == TYPE_CODE_RANGE && TYPE_TARGET_TYPE (type) != type)
@@ -7915,8 +7663,7 @@
 /* Returns non-zero iff TYPE represents an Ada fixed-point type. */
 
 int
-ada_is_fixed_point_type (type)
-     struct type *type;
+ada_is_fixed_point_type (struct type *type)
 {
   return fixed_type_info (type) != NULL;
 }
@@ -7926,15 +7673,14 @@
    delta cannot be determined. */
 
 DOUBLEST
-ada_delta (type)
-     struct type *type;
+ada_delta (struct type *type)
 {
   const char *encoding = fixed_type_info (type);
   long num, den;
 
   if (sscanf (encoding, "_%ld_%ld", &num, &den) < 2)
     return -1.0;
-  else 
+  else
     return (DOUBLEST) num / (DOUBLEST) den;
 }
 
@@ -7942,20 +7688,19 @@
    factor ('SMALL value) associated with the type. */
 
 static DOUBLEST
-scaling_factor (type)
-     struct type *type;
+scaling_factor (struct type *type)
 {
   const char *encoding = fixed_type_info (type);
   unsigned long num0, den0, num1, den1;
   int n;
-  
+
   n = sscanf (encoding, "_%lu_%lu_%lu_%lu", &num0, &den0, &num1, &den1);
 
   if (n < 2)
     return 1.0;
   else if (n == 4)
     return (DOUBLEST) num1 / (DOUBLEST) den1;
-  else 
+  else
     return (DOUBLEST) num0 / (DOUBLEST) den0;
 }
 
@@ -7964,20 +7709,16 @@
    type TYPE, return its floating-point equivalent. */
 
 DOUBLEST
-ada_fixed_to_float (type, x)
-     struct type *type;
-     LONGEST x;
+ada_fixed_to_float (struct type *type, LONGEST x)
 {
-  return (DOUBLEST) x * scaling_factor (type);
+  return (DOUBLEST) x *scaling_factor (type);
 }
 
 /* The representation of a fixed-point value of type TYPE 
    corresponding to the value X. */
 
 LONGEST
-ada_float_to_fixed (type, x)
-     struct type *type;
-     DOUBLEST x;
+ada_float_to_fixed (struct type *type, DOUBLEST x)
 {
   return (LONGEST) (x / scaling_factor (type) + 0.5);
 }
@@ -7988,14 +7729,13 @@
 /* Non-zero iff TYPE represents one of the special VAX floating-point
    types. */
 int
-ada_is_vax_floating_type (type)
-     struct type* type;
+ada_is_vax_floating_type (struct type *type)
 {
-  int name_len = 
+  int name_len =
     (ada_type_name (type) == NULL) ? 0 : strlen (ada_type_name (type));
-  return 
+  return
     name_len > 6
-    && (TYPE_CODE (type) == TYPE_CODE_INT 
+    && (TYPE_CODE (type) == TYPE_CODE_INT
 	|| TYPE_CODE (type) == TYPE_CODE_RANGE)
     && STREQN (ada_type_name (type) + name_len - 6, "___XF", 5);
 }
@@ -8003,36 +7743,31 @@
 /* The type of special VAX floating-point type this is, assuming
    ada_is_vax_floating_point */
 int
-ada_vax_float_type_suffix (type)
-     struct type* type;
+ada_vax_float_type_suffix (struct type *type)
 {
-  return ada_type_name (type)[strlen (ada_type_name (type))-1];
+  return ada_type_name (type)[strlen (ada_type_name (type)) - 1];
 }
 
 /* A value representing the special debugging function that outputs 
    VAX floating-point values of the type represented by TYPE.  Assumes
    ada_is_vax_floating_type (TYPE). */
-struct value*
-ada_vax_float_print_function (type)
-
-     struct type* type;
+struct value *
+ada_vax_float_print_function (struct type *type)
 {
-  switch (ada_vax_float_type_suffix (type)) {
-  case 'F':
-    return 
-      get_var_value ("DEBUG_STRING_F", 0);
-  case 'D':
-    return 
-      get_var_value ("DEBUG_STRING_D", 0);
-  case 'G':
-    return 
-      get_var_value ("DEBUG_STRING_G", 0);
-  default:
-    error ("invalid VAX floating-point type");
-  }
+  switch (ada_vax_float_type_suffix (type))
+    {
+    case 'F':
+      return get_var_value ("DEBUG_STRING_F", 0);
+    case 'D':
+      return get_var_value ("DEBUG_STRING_D", 0);
+    case 'G':
+      return get_var_value ("DEBUG_STRING_G", 0);
+    default:
+      error ("invalid VAX floating-point type");
+    }
 }
-
 
+
 				/* Range types */
 
 /* Scan STR beginning at position K for a discriminant name, and
@@ -8042,39 +7777,34 @@
    not alter *PX and *PNEW_K if unsuccessful. */
 
 static int
-scan_discrim_bound (str, k, dval, px, pnew_k)
-     char *str;
-     int k;
-     struct value* dval;
-     LONGEST *px;
-     int *pnew_k;
+scan_discrim_bound (char *, int k, struct value *dval, LONGEST * px,
+		    int *pnew_k)
 {
   static char *bound_buffer = NULL;
   static size_t bound_buffer_len = 0;
   char *bound;
   char *pend;
-  struct value* bound_val;
+  struct value *bound_val;
 
   if (dval == NULL || str == NULL || str[k] == '\0')
     return 0;
 
-  pend = strstr (str+k, "__");
+  pend = strstr (str + k, "__");
   if (pend == NULL)
     {
-      bound = str+k;
+      bound = str + k;
       k += strlen (bound);
     }
-  else 
+  else
     {
-      GROW_VECT (bound_buffer, bound_buffer_len, pend - (str+k) + 1);
+      GROW_VECT (bound_buffer, bound_buffer_len, pend - (str + k) + 1);
       bound = bound_buffer;
-      strncpy (bound_buffer, str+k, pend-(str+k));
-      bound[pend-(str+k)] = '\0';
-      k = pend-str;
+      strncpy (bound_buffer, str + k, pend - (str + k));
+      bound[pend - (str + k)] = '\0';
+      k = pend - str;
     }
-  
-  bound_val = 
-    ada_search_struct_field (bound, dval, 0, VALUE_TYPE (dval));
+
+  bound_val = ada_search_struct_field (bound, dval, 0, VALUE_TYPE (dval));
   if (bound_val == NULL)
     return 0;
 
@@ -8087,17 +7817,16 @@
 /* Value of variable named NAME in the current environment.  If
    no such variable found, then if ERR_MSG is null, returns 0, and
    otherwise causes an error with message ERR_MSG. */
-static struct value*
-get_var_value (name, err_msg)
-     char* name;
-     char* err_msg;
+static struct value *
+get_var_value (char *name, char *err_msg)
 {
-  struct symbol** syms;
-  struct block** blocks;
+  struct symbol **syms;
+  struct block **blocks;
   int nsyms;
 
-  nsyms = ada_lookup_symbol_list (name, get_selected_block (NULL), VAR_NAMESPACE,
-				  &syms, &blocks);
+  nsyms =
+    ada_lookup_symbol_list (name, get_selected_block (NULL), VAR_NAMESPACE,
+			    &syms, &blocks);
 
   if (nsyms != 1)
     {
@@ -8109,18 +7838,15 @@
 
   return value_of_variable (syms[0], blocks[0]);
 }
- 
+
 /* Value of integer variable named NAME in the current environment.  If
    no such variable found, then if ERR_MSG is null, returns 0, and sets
    *FLAG to 0.  If successful, sets *FLAG to 1. */
 LONGEST
-get_int_var_value (name, err_msg, flag)
-     char* name;
-     char* err_msg;
-     int* flag;
+get_int_var_value (char *name, char *err_msg, int *flag)
 {
-  struct value* var_val = get_var_value (name, err_msg);
-  
+  struct value *var_val = get_var_value (name, err_msg);
+
   if (var_val == 0)
     {
       if (flag != NULL)
@@ -8134,7 +7860,7 @@
       return value_as_long (var_val);
     }
 }
- 
+
 
 /* Return a range type whose base type is that of the range type named
    NAME in the current environment, and whose bounds are calculated
@@ -8144,16 +7870,13 @@
    information, in general, is encoded in NAME, the base type given in
    the named range type. */
 
-static struct type*
-to_fixed_range_type (name, dval, objfile)
-     char *name;
-     struct value *dval;
-     struct objfile *objfile;
+static struct type *
+to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile)
 {
   struct type *raw_type = ada_find_any_type (name);
   struct type *base_type;
   LONGEST low, high;
-  char* subtype_info;
+  char *subtype_info;
 
   if (raw_type == NULL)
     base_type = builtin_type_int;
@@ -8183,62 +7906,60 @@
       bounds_str = strchr (subtype_info, '_');
       n = 1;
 
-      if (*subtype_info == 'L') 
+      if (*subtype_info == 'L')
 	{
-	  if (! ada_scan_number (bounds_str, n, &L, &n)
-	      && ! scan_discrim_bound (bounds_str, n, dval, &L, &n))
+	  if (!ada_scan_number (bounds_str, n, &L, &n)
+	      && !scan_discrim_bound (bounds_str, n, dval, &L, &n))
 	    return raw_type;
 	  if (bounds_str[n] == '_')
 	    n += 2;
-	  else if (bounds_str[n] == '.') /* FIXME? SGI Workshop kludge. */
+	  else if (bounds_str[n] == '.')	/* FIXME? SGI Workshop kludge. */
 	    n += 1;
 	  subtype_info += 1;
 	}
-      else 
+      else
 	{
-	  strcpy (name_buf+prefix_len, "___L");
+	  strcpy (name_buf + prefix_len, "___L");
 	  L = get_int_var_value (name_buf, "Index bound unknown.", NULL);
 	}
 
-      if (*subtype_info == 'U') 
+      if (*subtype_info == 'U')
 	{
-	  if (! ada_scan_number (bounds_str, n, &U, &n)
+	  if (!ada_scan_number (bounds_str, n, &U, &n)
 	      && !scan_discrim_bound (bounds_str, n, dval, &U, &n))
 	    return raw_type;
 	}
-      else 
+      else
 	{
-	  strcpy (name_buf+prefix_len, "___U");
+	  strcpy (name_buf + prefix_len, "___U");
 	  U = get_int_var_value (name_buf, "Index bound unknown.", NULL);
 	}
 
-      if (objfile == NULL) 
+      if (objfile == NULL)
 	objfile = TYPE_OBJFILE (base_type);
       type = create_range_type (alloc_type (objfile), base_type, L, U);
-      TYPE_NAME (type) = name; 
+      TYPE_NAME (type) = name;
       return type;
     }
 }
 
 /* True iff NAME is the name of a range type. */
 int
-ada_is_range_type_name (name)
-     const char* name;
+ada_is_range_type_name (const char *name)
 {
   return (name != NULL && strstr (name, "___XD"));
-}	  
-
+}
 
+
 				/* Modular types */
 
 /* True iff TYPE is an Ada modular type. */
 int
-ada_is_modular_type (type)
-     struct type* type;
+ada_is_modular_type (struct type *type)
 {
   /* FIXME: base_type should be declared in gdbtypes.h, implemented in
-     valarith.c */  
-  struct type* subranged_type; /* = base_type (type);*/
+     valarith.c */
+  struct type *subranged_type;	/* = base_type (type); */
 
   return (subranged_type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
 	  && TYPE_CODE (subranged_type) != TYPE_CODE_ENUM
@@ -8247,105 +7968,99 @@
 
 /* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */
 LONGEST
-ada_modulus (type)
-     struct type* type;
+ada_modulus (struct type * type)
 {
-    return TYPE_HIGH_BOUND (type) + 1;
+  return TYPE_HIGH_BOUND (type) + 1;
 }
-
-
 
+
+
 				/* Operators */
 
 /* Table mapping opcodes into strings for printing operators
    and precedences of the operators.  */
 
-static const struct op_print ada_op_print_tab[] =
-  {
-    {":=",  BINOP_ASSIGN, PREC_ASSIGN, 1},
-    {"or else", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
-    {"and then", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
-    {"or",  BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
-    {"xor",  BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
-    {"and",  BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
-    {"=", BINOP_EQUAL, PREC_EQUAL, 0},
-    {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
-    {"<=", BINOP_LEQ, PREC_ORDER, 0},
-    {">=", BINOP_GEQ, PREC_ORDER, 0},
-    {">",  BINOP_GTR, PREC_ORDER, 0},
-    {"<",  BINOP_LESS, PREC_ORDER, 0},
-    {">>", BINOP_RSH, PREC_SHIFT, 0},
-    {"<<", BINOP_LSH, PREC_SHIFT, 0},
-    {"+",  BINOP_ADD, PREC_ADD, 0},
-    {"-",  BINOP_SUB, PREC_ADD, 0},
-    {"&",  BINOP_CONCAT, PREC_ADD, 0},
-    {"*",  BINOP_MUL, PREC_MUL, 0},
-    {"/",  BINOP_DIV, PREC_MUL, 0},
-    {"rem",  BINOP_REM, PREC_MUL, 0},
-    {"mod",  BINOP_MOD, PREC_MUL, 0},
-    {"**", BINOP_EXP, PREC_REPEAT, 0 },
-    {"@",  BINOP_REPEAT, PREC_REPEAT, 0},
-    {"-",  UNOP_NEG, PREC_PREFIX, 0},
-    {"+",  UNOP_PLUS, PREC_PREFIX, 0},
-    {"not ",  UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
-    {"not ",  UNOP_COMPLEMENT, PREC_PREFIX, 0},
-    {"abs ",  UNOP_ABS, PREC_PREFIX, 0},
-    {".all",  UNOP_IND, PREC_SUFFIX, 1},  /* FIXME: postfix .ALL */
-    {"'access",  UNOP_ADDR, PREC_SUFFIX, 1}, /* FIXME: postfix 'ACCESS */
-    {NULL, 0, 0, 0}
+static const struct op_print ada_op_print_tab[] = {
+  {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
+  {"or else", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
+  {"and then", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
+  {"or", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
+  {"xor", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
+  {"and", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
+  {"=", BINOP_EQUAL, PREC_EQUAL, 0},
+  {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
+  {"<=", BINOP_LEQ, PREC_ORDER, 0},
+  {">=", BINOP_GEQ, PREC_ORDER, 0},
+  {">", BINOP_GTR, PREC_ORDER, 0},
+  {"<", BINOP_LESS, PREC_ORDER, 0},
+  {">>", BINOP_RSH, PREC_SHIFT, 0},
+  {"<<", BINOP_LSH, PREC_SHIFT, 0},
+  {"+", BINOP_ADD, PREC_ADD, 0},
+  {"-", BINOP_SUB, PREC_ADD, 0},
+  {"&", BINOP_CONCAT, PREC_ADD, 0},
+  {"*", BINOP_MUL, PREC_MUL, 0},
+  {"/", BINOP_DIV, PREC_MUL, 0},
+  {"rem", BINOP_REM, PREC_MUL, 0},
+  {"mod", BINOP_MOD, PREC_MUL, 0},
+  {"**", BINOP_EXP, PREC_REPEAT, 0},
+  {"@", BINOP_REPEAT, PREC_REPEAT, 0},
+  {"-", UNOP_NEG, PREC_PREFIX, 0},
+  {"+", UNOP_PLUS, PREC_PREFIX, 0},
+  {"not ", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
+  {"not ", UNOP_COMPLEMENT, PREC_PREFIX, 0},
+  {"abs ", UNOP_ABS, PREC_PREFIX, 0},
+  {".all", UNOP_IND, PREC_SUFFIX, 1},	/* FIXME: postfix .ALL */
+  {"'access", UNOP_ADDR, PREC_SUFFIX, 1},	/* FIXME: postfix 'ACCESS */
+  {NULL, 0, 0, 0}
 };
 
 			/* Assorted Types and Interfaces */
 
-struct type* builtin_type_ada_int;
-struct type* builtin_type_ada_short;
-struct type* builtin_type_ada_long;
-struct type* builtin_type_ada_long_long;
-struct type* builtin_type_ada_char;
-struct type* builtin_type_ada_float;
-struct type* builtin_type_ada_double;
-struct type* builtin_type_ada_long_double;
-struct type* builtin_type_ada_natural;
-struct type* builtin_type_ada_positive;
-struct type* builtin_type_ada_system_address;
+struct type *builtin_type_ada_int;
+struct type *builtin_type_ada_short;
+struct type *builtin_type_ada_long;
+struct type *builtin_type_ada_long_long;
+struct type *builtin_type_ada_char;
+struct type *builtin_type_ada_float;
+struct type *builtin_type_ada_double;
+struct type *builtin_type_ada_long_double;
+struct type *builtin_type_ada_natural;
+struct type *builtin_type_ada_positive;
+struct type *builtin_type_ada_system_address;
 
-struct type ** const (ada_builtin_types[]) = 
+struct type **const (ada_builtin_types[]) =
 {
-  
-  &builtin_type_ada_int,
-  &builtin_type_ada_long,
-  &builtin_type_ada_short,
-  &builtin_type_ada_char,
-  &builtin_type_ada_float,
-  &builtin_type_ada_double,
-  &builtin_type_ada_long_long,
-  &builtin_type_ada_long_double,
-  &builtin_type_ada_natural,
-  &builtin_type_ada_positive,
 
-  /* The following types are carried over from C for convenience. */
-  &builtin_type_int,
-  &builtin_type_long,
-  &builtin_type_short,
-  &builtin_type_char,
-  &builtin_type_float,
-  &builtin_type_double,
-  &builtin_type_long_long,
-  &builtin_type_void,
-  &builtin_type_signed_char,
-  &builtin_type_unsigned_char,
-  &builtin_type_unsigned_short,
-  &builtin_type_unsigned_int,
-  &builtin_type_unsigned_long,
-  &builtin_type_unsigned_long_long,
-  &builtin_type_long_double,
-  &builtin_type_complex,
-  &builtin_type_double_complex,
-  0
-};
+  &builtin_type_ada_int,
+    &builtin_type_ada_long,
+    &builtin_type_ada_short,
+    &builtin_type_ada_char,
+    &builtin_type_ada_float,
+    &builtin_type_ada_double,
+    &builtin_type_ada_long_long,
+    &builtin_type_ada_long_double,
+    &builtin_type_ada_natural, &builtin_type_ada_positive,
+    /* The following types are carried over from C for convenience. */
+&builtin_type_int,
+    &builtin_type_long,
+    &builtin_type_short,
+    &builtin_type_char,
+    &builtin_type_float,
+    &builtin_type_double,
+    &builtin_type_long_long,
+    &builtin_type_void,
+    &builtin_type_signed_char,
+    &builtin_type_unsigned_char,
+    &builtin_type_unsigned_short,
+    &builtin_type_unsigned_int,
+    &builtin_type_unsigned_long,
+    &builtin_type_unsigned_long_long,
+    &builtin_type_long_double,
+    &builtin_type_complex, &builtin_type_double_complex, 0};
 
 /* Not really used, but needed in the ada_language_defn. */
-static void emit_char (int c, struct ui_file* stream, int quoter) 
+static void
+emit_char (int c, struct ui_file *stream, int quoter)
 {
   ada_emit_char (c, stream, quoter, 1);
 }
@@ -8370,16 +8085,16 @@
   ada_print_type,		/* Print a type using appropriate syntax */
   ada_val_print,		/* Print a value using appropriate syntax */
   ada_value_print,		/* Print a top-level value */
-  {"",     "",    "",  ""},	/* Binary format info */
+  {"", "", "", ""},		/* Binary format info */
 #if 0
-  {"8#%lo#",  "8#",   "o", "#"},	/* Octal format info */
-  {"%ld",   "",    "d", ""},	/* Decimal format info */
-  {"16#%lx#", "16#",  "x", "#"},	/* Hex format info */
+  {"8#%lo#", "8#", "o", "#"},	/* Octal format info */
+  {"%ld", "", "d", ""},		/* Decimal format info */
+  {"16#%lx#", "16#", "x", "#"},	/* Hex format info */
 #else
   /* Copied from c-lang.c. */
-  {"0%lo",  "0",   "o", ""},	/* Octal format info */
-  {"%ld",   "",    "d", ""},	/* Decimal format info */
-  {"0x%lx", "0x",  "x", ""},	/* Hex format info */
+  {"0%lo", "0", "o", ""},	/* Octal format info */
+  {"%ld", "", "d", ""},		/* Decimal format info */
+  {"0x%lx", "0x", "x", ""},	/* Hex format info */
 #endif
   ada_op_print_tab,		/* expression operators for printing */
   1,				/* c-style arrays (FIXME?) */
@@ -8393,59 +8108,48 @@
 {
   builtin_type_ada_int =
     init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "integer", (struct objfile *) NULL);
+	       0, "integer", (struct objfile *) NULL);
   builtin_type_ada_long =
     init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "long_integer", (struct objfile *) NULL);
+	       0, "long_integer", (struct objfile *) NULL);
   builtin_type_ada_short =
     init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "short_integer", (struct objfile *) NULL);
+	       0, "short_integer", (struct objfile *) NULL);
   builtin_type_ada_char =
     init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "character", (struct objfile *) NULL);
+	       0, "character", (struct objfile *) NULL);
   builtin_type_ada_float =
     init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "float", (struct objfile *) NULL);
+	       0, "float", (struct objfile *) NULL);
   builtin_type_ada_double =
     init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "long_float", (struct objfile *) NULL);
+	       0, "long_float", (struct objfile *) NULL);
   builtin_type_ada_long_long =
     init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "long_long_integer", (struct objfile *) NULL);
+	       0, "long_long_integer", (struct objfile *) NULL);
   builtin_type_ada_long_double =
     init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "long_long_float", (struct objfile *) NULL);
+	       0, "long_long_float", (struct objfile *) NULL);
   builtin_type_ada_natural =
     init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "natural", (struct objfile *) NULL);
+	       0, "natural", (struct objfile *) NULL);
   builtin_type_ada_positive =
     init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "positive", (struct objfile *) NULL);
+	       0, "positive", (struct objfile *) NULL);
 
 
-  builtin_type_ada_system_address = 
-    lookup_pointer_type (init_type (TYPE_CODE_VOID, 1, 0, "void", 
+  builtin_type_ada_system_address =
+    lookup_pointer_type (init_type (TYPE_CODE_VOID, 1, 0, "void",
 				    (struct objfile *) NULL));
   TYPE_NAME (builtin_type_ada_system_address) = "system__address";
 
   add_language (&ada_language_defn);
 
-  add_show_from_set 
+  add_show_from_set
     (add_set_cmd ("varsize-limit", class_support, var_uinteger,
-		  (char*) &varsize_limit,
+		  (char *) &varsize_limit,
 		  "Set maximum bytes in dynamic-sized object.",
-		  &setlist),
-     &showlist);
+		  &setlist), &showlist);
   varsize_limit = 65536;
 
   add_com ("begin", class_breakpoint, begin_command,
@@ -8479,140 +8183,135 @@
    debugging information supplied by the compiler.  fnf@cygnus.com */
 
 static struct type *
-ada_create_fundamental_type (objfile, typeid)
-     struct objfile *objfile;
-     int typeid;
+ada_create_fundamental_type (struct objfile *objfile, int typeid)
 {
   struct type *type = NULL;
 
   switch (typeid)
     {
-      default:
-	/* FIXME:  For now, if we are asked to produce a type not in this
-	   language, create the equivalent of a C integer type with the
-	   name "<?type?>".  When all the dust settles from the type
-	   reconstruction work, this should probably become an error. */
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_INT_BIT / TARGET_CHAR_BIT,
-			  0, "<?type?>", objfile);
-        warning ("internal error: no Ada fundamental type %d", typeid);
-	break;
-      case FT_VOID:
-	type = init_type (TYPE_CODE_VOID,
-			  TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-			  0, "void", objfile);
-	break;
-      case FT_CHAR:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-			  0, "character", objfile);
-	break;
-      case FT_SIGNED_CHAR:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-			  0, "signed char", objfile);
-	break;
-      case FT_UNSIGNED_CHAR:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-			  TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
-	break;
-      case FT_SHORT:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_SHORT_BIT / TARGET_CHAR_BIT,
-			  0, "short_integer", objfile);
-	break;
-      case FT_SIGNED_SHORT:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_SHORT_BIT / TARGET_CHAR_BIT,
-			  0, "short_integer", objfile);	
-	break;
-      case FT_UNSIGNED_SHORT:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_SHORT_BIT / TARGET_CHAR_BIT,
-			  TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
-	break;
-      case FT_INTEGER:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_INT_BIT / TARGET_CHAR_BIT,
-			  0, "integer", objfile);
-	break;
-      case FT_SIGNED_INTEGER:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_INT_BIT / TARGET_CHAR_BIT,
-			  0, "integer", objfile); /* FIXME -fnf */
-	break;
-      case FT_UNSIGNED_INTEGER:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_INT_BIT / TARGET_CHAR_BIT,
-			  TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
-	break;
-      case FT_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_BIT / TARGET_CHAR_BIT,
-			  0, "long_integer", objfile);
-	break;
-      case FT_SIGNED_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_BIT / TARGET_CHAR_BIT,
-			  0, "long_integer", objfile);
-	break;
-      case FT_UNSIGNED_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_BIT / TARGET_CHAR_BIT,
-			  TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
-	break;
-      case FT_LONG_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
-			  0, "long_long_integer", objfile);
-	break;
-      case FT_SIGNED_LONG_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
-			  0, "long_long_integer", objfile);
-	break;
-      case FT_UNSIGNED_LONG_LONG:
-	type = init_type (TYPE_CODE_INT,
-			  TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
-			  TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
-	break;
-      case FT_FLOAT:
-	type = init_type (TYPE_CODE_FLT,
-			  TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
-			  0, "float", objfile);
-	break;
-      case FT_DBL_PREC_FLOAT:
-	type = init_type (TYPE_CODE_FLT,
-			  TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
-			  0, "long_float", objfile);
-	break;
-      case FT_EXT_PREC_FLOAT:
-	type = init_type (TYPE_CODE_FLT,
-			  TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
-			  0, "long_long_float", objfile);
-	break;
-      }
+    default:
+      /* FIXME:  For now, if we are asked to produce a type not in this
+         language, create the equivalent of a C integer type with the
+         name "<?type?>".  When all the dust settles from the type
+         reconstruction work, this should probably become an error. */
+      type = init_type (TYPE_CODE_INT,
+			TARGET_INT_BIT / TARGET_CHAR_BIT,
+			0, "<?type?>", objfile);
+      warning ("internal error: no Ada fundamental type %d", typeid);
+      break;
+    case FT_VOID:
+      type = init_type (TYPE_CODE_VOID,
+			TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+			0, "void", objfile);
+      break;
+    case FT_CHAR:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+			0, "character", objfile);
+      break;
+    case FT_SIGNED_CHAR:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+			0, "signed char", objfile);
+      break;
+    case FT_UNSIGNED_CHAR:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+			TYPE_FLAG_UNSIGNED, "unsigned char", objfile);
+      break;
+    case FT_SHORT:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+			0, "short_integer", objfile);
+      break;
+    case FT_SIGNED_SHORT:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+			0, "short_integer", objfile);
+      break;
+    case FT_UNSIGNED_SHORT:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_SHORT_BIT / TARGET_CHAR_BIT,
+			TYPE_FLAG_UNSIGNED, "unsigned short", objfile);
+      break;
+    case FT_INTEGER:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_INT_BIT / TARGET_CHAR_BIT,
+			0, "integer", objfile);
+      break;
+    case FT_SIGNED_INTEGER:
+      type = init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, 0, "integer", objfile);	/* FIXME -fnf */
+      break;
+    case FT_UNSIGNED_INTEGER:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_INT_BIT / TARGET_CHAR_BIT,
+			TYPE_FLAG_UNSIGNED, "unsigned int", objfile);
+      break;
+    case FT_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_BIT / TARGET_CHAR_BIT,
+			0, "long_integer", objfile);
+      break;
+    case FT_SIGNED_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_BIT / TARGET_CHAR_BIT,
+			0, "long_integer", objfile);
+      break;
+    case FT_UNSIGNED_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_BIT / TARGET_CHAR_BIT,
+			TYPE_FLAG_UNSIGNED, "unsigned long", objfile);
+      break;
+    case FT_LONG_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+			0, "long_long_integer", objfile);
+      break;
+    case FT_SIGNED_LONG_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+			0, "long_long_integer", objfile);
+      break;
+    case FT_UNSIGNED_LONG_LONG:
+      type = init_type (TYPE_CODE_INT,
+			TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
+			TYPE_FLAG_UNSIGNED, "unsigned long long", objfile);
+      break;
+    case FT_FLOAT:
+      type = init_type (TYPE_CODE_FLT,
+			TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
+			0, "float", objfile);
+      break;
+    case FT_DBL_PREC_FLOAT:
+      type = init_type (TYPE_CODE_FLT,
+			TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+			0, "long_float", objfile);
+      break;
+    case FT_EXT_PREC_FLOAT:
+      type = init_type (TYPE_CODE_FLT,
+			TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
+			0, "long_long_float", objfile);
+      break;
+    }
   return (type);
 }
 
-void ada_dump_symtab (struct symtab* s)
+void
+ada_dump_symtab (struct symtab *s)
 {
   int i;
   fprintf (stderr, "New symtab: [\n");
-  fprintf (stderr, "  Name: %s/%s;\n", 
-	   s->dirname ? s->dirname : "?", 
-	   s->filename ? s->filename : "?");
+  fprintf (stderr, "  Name: %s/%s;\n",
+	   s->dirname ? s->dirname : "?", s->filename ? s->filename : "?");
   fprintf (stderr, "  Format: %s;\n", s->debugformat);
   if (s->linetable != NULL)
     {
       fprintf (stderr, "  Line table (section %d):\n", s->block_line_section);
       for (i = 0; i < s->linetable->nitems; i += 1)
 	{
-	  struct linetable_entry* e = s->linetable->item + i;
+	  struct linetable_entry *e = s->linetable->item + i;
 	  fprintf (stderr, "    %4ld: %8lx\n", (long) e->line, (long) e->pc);
 	}
     }
   fprintf (stderr, "]\n");
 }
-
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index e5353f8..d2b426c 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -32,13 +32,14 @@
 
 /* Chain of cleanups for arguments of OP_UNRESOLVED_VALUE names.  Created in
    yyparse and freed in ada_resolve. */
-extern struct cleanup* unresolved_names;
+extern struct cleanup *unresolved_names;
 
 /* Corresponding mangled/demangled names and opcodes for Ada user-definable 
    operators. */
-struct ada_opname_map {
-  const char* mangled;
-  const char* demangled;
+struct ada_opname_map
+{
+  const char *mangled;
+  const char *demangled;
   enum exp_opcode op;
 };
 
@@ -53,7 +54,8 @@
    to update the table attribute_names in ada-lang.c whenever you change this.
    */
 
-enum ada_attribute {
+enum ada_attribute
+{
   /* Invalid attribute for error checking. */
   ATR_INVALID,
 
@@ -74,7 +76,8 @@
   ATR_END
 };
 
-enum task_states {
+enum task_states
+{
   Unactivated,
   Runnable,
   Terminated,
@@ -89,14 +92,18 @@
 
 extern char *ada_task_states[];
 
-typedef struct {
+typedef struct
+{
   char *P_ARRAY;
   int *P_BOUNDS;
-} fat_string;
+}
+fat_string;
 
-typedef struct entry_call {
+typedef struct entry_call
+{
   void *self;
-} *entry_call_link;
+}
+ *entry_call_link;
 
 struct task_fields
 {
@@ -126,7 +133,7 @@
 #if (defined (VXWORKS_TARGET) && defined (M68K_TARGET))
 __attribute__ ((packed))
 #endif
-;
+  ;
 
 struct task_entry
 {
@@ -139,17 +146,17 @@
   int stack_per;
 };
 
-extern struct type* builtin_type_ada_int;
-extern struct type* builtin_type_ada_short;
-extern struct type* builtin_type_ada_long;
-extern struct type* builtin_type_ada_long_long;
-extern struct type* builtin_type_ada_char;
-extern struct type* builtin_type_ada_float;
-extern struct type* builtin_type_ada_double;
-extern struct type* builtin_type_ada_long_double;
-extern struct type* builtin_type_ada_natural;
-extern struct type* builtin_type_ada_positive;
-extern struct type* builtin_type_ada_system_address;
+extern struct type *builtin_type_ada_int;
+extern struct type *builtin_type_ada_short;
+extern struct type *builtin_type_ada_long;
+extern struct type *builtin_type_ada_long_long;
+extern struct type *builtin_type_ada_char;
+extern struct type *builtin_type_ada_float;
+extern struct type *builtin_type_ada_double;
+extern struct type *builtin_type_ada_long_double;
+extern struct type *builtin_type_ada_natural;
+extern struct type *builtin_type_ada_positive;
+extern struct type *builtin_type_ada_system_address;
 
 /* Assuming V points to an array of S objects,  make sure that it contains at 
    least M objects, updating V and S as necessary. */
@@ -157,209 +164,225 @@
 #define GROW_VECT(v, s, m) 						\
    if ((s) < (m)) grow_vect ((void**) &(v), &(s), (m), sizeof(*(v)));
 
-extern void grow_vect (void**, size_t*, size_t, int);
+extern void grow_vect (void **, size_t *, size_t, int);
 
 extern int ada_parse (void);	/* Defined in ada-exp.y */
 
 extern void ada_error (char *);	/* Defined in ada-exp.y */
 
-			/* Defined in ada-typeprint.c */ 
-extern void ada_print_type (struct type*, char*, struct ui_file*, int, int);
+			/* Defined in ada-typeprint.c */
+extern void ada_print_type (struct type *, char *, struct ui_file *, int,
+			    int);
 
-extern int ada_val_print (struct type*, char*, int, CORE_ADDR, 
-			  struct ui_file*, int, int, int, enum val_prettyprint);
+extern int ada_val_print (struct type *, char *, int, CORE_ADDR,
+			  struct ui_file *, int, int, int,
+			  enum val_prettyprint);
 
-extern int ada_value_print (struct value*, struct ui_file*, int, 
+extern int ada_value_print (struct value *, struct ui_file *, int,
 			    enum val_prettyprint);
 
 				/* Defined in ada-lang.c */
 
-extern struct value* value_from_contents_and_address (struct type*, char*, CORE_ADDR);
+extern struct value *value_from_contents_and_address (struct type *, char *,
+						      CORE_ADDR);
 
 extern void ada_emit_char (int, struct ui_file *, int, int);
 
-extern void ada_printchar (int, struct ui_file*);
+extern void ada_printchar (int, struct ui_file *);
 
-extern void ada_printstr (struct ui_file*, char *, unsigned int, int, int);
+extern void ada_printstr (struct ui_file *, char *, unsigned int, int, int);
 
-extern void ada_convert_actuals (struct value*, int, struct value**, CORE_ADDR*);
+extern void ada_convert_actuals (struct value *, int, struct value **,
+				 CORE_ADDR *);
 
-extern struct value* ada_value_subscript (struct value*, int, struct value**);
+extern struct value *ada_value_subscript (struct value *, int,
+					  struct value **);
 
-extern struct type* ada_array_element_type (struct type*, int);
+extern struct type *ada_array_element_type (struct type *, int);
 
-extern int ada_array_arity (struct type*);
+extern int ada_array_arity (struct type *);
 
-struct type* ada_type_of_array (struct value*, int);
+struct type *ada_type_of_array (struct value *, int);
 
-extern struct value* ada_coerce_to_simple_array (struct value*);
+extern struct value *ada_coerce_to_simple_array (struct value *);
 
-extern struct value* ada_coerce_to_simple_array_ptr (struct value*);
+extern struct value *ada_coerce_to_simple_array_ptr (struct value *);
 
-extern int ada_is_simple_array (struct type*);
+extern int ada_is_simple_array (struct type *);
 
-extern int ada_is_array_descriptor (struct type*);
+extern int ada_is_array_descriptor (struct type *);
 
-extern int ada_is_bogus_array_descriptor (struct type*);
+extern int ada_is_bogus_array_descriptor (struct type *);
 
-extern struct type* ada_index_type (struct type*, int);
+extern struct type *ada_index_type (struct type *, int);
 
-extern struct value* ada_array_bound (struct value*, int, int);
+extern struct value *ada_array_bound (struct value *, int, int);
 
-extern int ada_lookup_symbol_list (const char*, struct block*, namespace_enum,
-				   struct symbol***, struct block***);
+extern int ada_lookup_symbol_list (const char *, struct block *,
+				   namespace_enum, struct symbol ***,
+				   struct block ***);
 
-extern char*  ada_fold_name (const char*);
+extern char *ada_fold_name (const char *);
 
-extern struct symbol* ada_lookup_symbol (const char*, struct block*, namespace_enum);
+extern struct symbol *ada_lookup_symbol (const char *, struct block *,
+					 namespace_enum);
 
-extern struct minimal_symbol* ada_lookup_minimal_symbol (const char*);
+extern struct minimal_symbol *ada_lookup_minimal_symbol (const char *);
 
-extern void ada_resolve (struct expression**, struct type*);
+extern void ada_resolve (struct expression **, struct type *);
 
-extern int ada_resolve_function (struct symbol**, struct block**, int, 
-				 struct value**, int, const char*, struct type*);
+extern int ada_resolve_function (struct symbol **, struct block **, int,
+				 struct value **, int, const char *,
+				 struct type *);
 
-extern void ada_fill_in_ada_prototype (struct symbol*);
+extern void ada_fill_in_ada_prototype (struct symbol *);
 
-extern int user_select_syms (struct symbol**, struct block**, int, int);
+extern int user_select_syms (struct symbol **, struct block **, int, int);
 
-extern int get_selections (int*, int, int, int, char*);
+extern int get_selections (int *, int, int, int, char *);
 
-extern char* ada_start_decode_line_1 (char*);
+extern char *ada_start_decode_line_1 (char *);
 
-extern struct symtabs_and_lines ada_finish_decode_line_1 (char**, struct symtab*, int, char***);
+extern struct symtabs_and_lines ada_finish_decode_line_1 (char **,
+							  struct symtab *,
+							  int, char ***);
 
-extern int ada_scan_number (const char*, int, LONGEST*, int*);
+extern int ada_scan_number (const char *, int, LONGEST *, int *);
 
-extern struct type* ada_parent_type (struct type*);
+extern struct type *ada_parent_type (struct type *);
 
-extern int ada_is_ignored_field (struct type*, int);
+extern int ada_is_ignored_field (struct type *, int);
 
-extern int ada_is_packed_array_type (struct type*);
+extern int ada_is_packed_array_type (struct type *);
 
-extern struct value* ada_value_primitive_packed_val (struct value*, char*, long, int,
-						 int, struct type*);
+extern struct value *ada_value_primitive_packed_val (struct value *, char *,
+						     long, int, int,
+						     struct type *);
 
-extern struct type* ada_coerce_to_simple_array_type (struct type*);
+extern struct type *ada_coerce_to_simple_array_type (struct type *);
 
-extern int ada_is_character_type (struct type*);
+extern int ada_is_character_type (struct type *);
 
-extern int ada_is_string_type (struct type*);
+extern int ada_is_string_type (struct type *);
 
-extern int  ada_is_tagged_type (struct type*);
+extern int ada_is_tagged_type (struct type *);
 
-extern struct type* ada_tag_type (struct value*);
+extern struct type *ada_tag_type (struct value *);
 
-extern struct value* ada_value_tag (struct value*);
+extern struct value *ada_value_tag (struct value *);
 
-extern int ada_is_parent_field (struct type*, int);
+extern int ada_is_parent_field (struct type *, int);
 
-extern int ada_is_wrapper_field (struct type*, int);
+extern int ada_is_wrapper_field (struct type *, int);
 
-extern int ada_is_variant_part (struct type*, int);
+extern int ada_is_variant_part (struct type *, int);
 
-extern struct type* ada_variant_discrim_type (struct type*, struct type*);
+extern struct type *ada_variant_discrim_type (struct type *, struct type *);
 
-extern int ada_is_others_clause (struct type*, int);
+extern int ada_is_others_clause (struct type *, int);
 
-extern int ada_in_variant (LONGEST, struct type*, int);
+extern int ada_in_variant (LONGEST, struct type *, int);
 
-extern char* ada_variant_discrim_name (struct type*);
+extern char *ada_variant_discrim_name (struct type *);
 
-extern struct type* ada_lookup_struct_elt_type (struct type*, char*, int, int*);
+extern struct type *ada_lookup_struct_elt_type (struct type *, char *, int,
+						int *);
 
-extern struct value* ada_value_struct_elt (struct value*, char*, char*);
+extern struct value *ada_value_struct_elt (struct value *, char *, char *);
 
-extern struct value* ada_search_struct_field (char*, struct value*, int, struct type*);
+extern struct value *ada_search_struct_field (char *, struct value *, int,
+					      struct type *);
 
-extern int ada_is_aligner_type (struct type*);
+extern int ada_is_aligner_type (struct type *);
 
-extern struct type* ada_aligned_type (struct type*);
+extern struct type *ada_aligned_type (struct type *);
 
-extern char* ada_aligned_value_addr (struct type*, char*);
+extern char *ada_aligned_value_addr (struct type *, char *);
 
-extern const char* ada_attribute_name (int);
+extern const char *ada_attribute_name (int);
 
-extern int ada_is_fixed_point_type (struct type*);
+extern int ada_is_fixed_point_type (struct type *);
 
-extern DOUBLEST ada_delta (struct type*);
+extern DOUBLEST ada_delta (struct type *);
 
 extern DOUBLEST ada_fixed_to_float (struct type *, LONGEST);
 
-extern LONGEST ada_float_to_fixed (struct type*, DOUBLEST);
+extern LONGEST ada_float_to_fixed (struct type *, DOUBLEST);
 
-extern int ada_is_vax_floating_type (struct type*);
+extern int ada_is_vax_floating_type (struct type *);
 
-extern int ada_vax_float_type_suffix (struct type*);
+extern int ada_vax_float_type_suffix (struct type *);
 
-extern struct value* ada_vax_float_print_function (struct type*);
+extern struct value *ada_vax_float_print_function (struct type *);
 
-extern struct type* ada_system_address_type (void);
+extern struct type *ada_system_address_type (void);
 
-extern int  ada_which_variant_applies (struct type*, struct type*, char*);
+extern int ada_which_variant_applies (struct type *, struct type *, char *);
 
-extern struct value* ada_to_fixed_value (struct type*, char*, CORE_ADDR, struct value*);
+extern struct value *ada_to_fixed_value (struct type *, char *, CORE_ADDR,
+					 struct value *);
 
-extern struct type* ada_to_fixed_type (struct type*, char*, CORE_ADDR, struct value*);
+extern struct type *ada_to_fixed_type (struct type *, char *, CORE_ADDR,
+				       struct value *);
 
-extern int ada_name_prefix_len (const char*);
+extern int ada_name_prefix_len (const char *);
 
-extern char* ada_type_name (struct type*);
+extern char *ada_type_name (struct type *);
 
-extern struct type* ada_find_parallel_type (struct type*, const char *suffix);
+extern struct type *ada_find_parallel_type (struct type *,
+					    const char *suffix);
 
-extern LONGEST get_int_var_value (char*, char*, int* );
+extern LONGEST get_int_var_value (char *, char *, int *);
 
-extern struct type* ada_find_any_type (const char *name);
+extern struct type *ada_find_any_type (const char *name);
 
-extern int ada_prefer_type (struct type*, struct type*);
+extern int ada_prefer_type (struct type *, struct type *);
 
-extern struct type* ada_get_base_type (struct type*);
+extern struct type *ada_get_base_type (struct type *);
 
-extern struct type* ada_completed_type (struct type*);
+extern struct type *ada_completed_type (struct type *);
 
-extern char*  ada_mangle (const char*);
+extern char *ada_mangle (const char *);
 
-extern const char* ada_enum_name (const char*);
+extern const char *ada_enum_name (const char *);
 
-extern int ada_is_modular_type (struct type*);
+extern int ada_is_modular_type (struct type *);
 
-extern LONGEST ada_modulus (struct type*);
+extern LONGEST ada_modulus (struct type *);
 
-extern struct value* ada_value_ind (struct value*);
+extern struct value *ada_value_ind (struct value *);
 
-extern void ada_print_scalar (struct type*, LONGEST, struct ui_file*);
+extern void ada_print_scalar (struct type *, LONGEST, struct ui_file *);
 
-extern int ada_is_range_type_name (const char*);
+extern int ada_is_range_type_name (const char *);
 
-extern const char* ada_renaming_type (struct type*);
+extern const char *ada_renaming_type (struct type *);
 
-extern int ada_is_object_renaming (struct symbol*);
+extern int ada_is_object_renaming (struct symbol *);
 
-extern const char* ada_simple_renamed_entity (struct symbol*);
+extern const char *ada_simple_renamed_entity (struct symbol *);
 
-extern char* ada_breakpoint_rewrite (char*, int*);
+extern char *ada_breakpoint_rewrite (char *, int *);
 
 /* Tasking-related: ada-tasks.c */
 
 extern int valid_task_id (int);
 
-extern int get_current_task (void); 
+extern int get_current_task (void);
 
 extern void init_task_list (void);
 
-extern void* get_self_id (void);
+extern void *get_self_id (void);
 
 extern int get_current_task (void);
 
-extern int get_entry_number (void*);
+extern int get_entry_number (void *);
 
 extern void ada_report_exception_break (struct breakpoint *);
 
-extern int ada_maybe_exception_partial_symbol (struct partial_symbol* sym);
+extern int ada_maybe_exception_partial_symbol (struct partial_symbol *sym);
 
-extern int ada_is_exception_sym (struct symbol* sym);
+extern int ada_is_exception_sym (struct symbol *sym);
 
 
 #endif
diff --git a/gdb/ada-lex.c b/gdb/ada-lex.c
deleted file mode 100644
index 9538f76..0000000
--- a/gdb/ada-lex.c
+++ /dev/null
@@ -1,3174 +0,0 @@
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header$
- * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define YY_USES_REJECT
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 57
-#define YY_END_OF_BUFFER 58
-static yyconst short int yy_acclist[386] =
-    {   0,
-       58,   56,   57,    1,   56,   57,    1,   57,   15,   56,
-       57,   53,   56,   57,   41,   56,   57,   56,   57,   43,
-       56,   57,   44,   56,   57,   41,   56,   57,   42,   56,
-       57,   41,   56,   57,   41,   56,   57,   41,   56,   57,
-        4,   56,   57,    4,   56,   57,   41,   56,   57,   41,
-       56,   57,   41,   56,   57,   41,   56,   57,   50,   56,
-       57,   47,   56,   57,   47,   56,   57,   47,   56,   57,
-       47,   56,   57,   47,   56,   57,   47,   56,   57,   47,
-       56,   57,   47,   56,   57,   47,   56,   57,   47,   56,
-       57,    1,   56,   57,   56,   57,   16,   56,   57,   53,
-
-       56,   57,   41,   56,   57,   56,   57,   43,   56,   57,
-       44,   56,   57,   41,   56,   57,   42,   56,   57,   41,
-       56,   57,   41,   56,   57,   41,   56,   57,    4,   56,
-       57,    4,   56,   57,   41,   56,   57,   41,   56,   57,
-       41,   56,   57,   41,   56,   57,   50,   56,   57,   41,
-       56,   57,   47,   56,   57,   47,   56,   57,   47,   56,
-       57,   47,   56,   57,   47,   56,   57,   47,   56,   57,
-       47,   56,   57,   47,   56,   57,   47,   56,   57,   47,
-       56,   57,   56,   57,   40,   56,   57,   51,   55,   54,
-       55,   55,   35,    2,   34,   46,   46,   37,    4,   36,
-
-       38,   33,   39,   47,   47,   47,   47,   47,   19,   47,
-       23,   47,   47,   47,   47,   47,   28,   47,   47,   47,
-       47,   16,   51,   55,   54,   55,   55,   16,   35,    2,
-       34,   46,   46,   37,    4,   36,   38,   33,   39,   16,
-       47,   47,   47,   47,   47,   19,   47,   23,   47,   47,
-       47,   47,   47,   28,   47,   47,   47,   47,16398,   52,
-       55,   12,   12,   32,    2,   46,   46,    9,    3,    7,
-       47,   47,   49,   20,   47,   21,   47,   47,   24,   47,
-       25,   47,   26,   47,   47,   29,   47,   47,   31,   47,
-       52,   55,   16,   32,    2,    2,   16,    2,   46,   46,
-
-        9,    3,    7,   47,   16,   47,   49,   20,   47,   21,
-       47,   47,   24,   47,   25,   47,   26,   47,   47,   29,
-       47,   47,   31,   47, 8206,   46,   45,   46,    6,    9,
-        3,   47,   22,   47,   27,   47,   30,   47,    2,   16,
-       46,   45,   46,    6,    9,    3,   47,   22,   47,   27,
-       47,   30,   47,   48,   47,   48,    2,    2,   18,   47,
-        5,   11,    8,   18,    2,    2,    5,   11,    8,   17,
-        5,    8,   17,    2,   18,    2,    5,    8,   13,    2,
-       17,   10,   10,   10,   10
-    } ;
-
-static yyconst short int yy_accept[364] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    2,    4,    7,
-        9,   12,   15,   18,   20,   23,   26,   29,   32,   35,
-       38,   41,   44,   47,   50,   53,   56,   59,   62,   65,
-       68,   71,   74,   77,   80,   83,   86,   89,   92,   95,
-       97,  100,  103,  106,  108,  111,  114,  117,  120,  123,
-      126,  129,  132,  135,  138,  141,  144,  147,  150,  153,
-      156,  159,  162,  165,  168,  171,  174,  177,  180,  183,
-      185,  188,  188,  188,  188,  188,  188,  188,  188,  188,
-      188,  188,  188,  190,  192,  193,  193,  193,  193,  193,
-      193,  193,  193,  194,  195,  195,  196,  196,  197,  198,
-
-      199,  199,  199,  200,  200,  200,  201,  202,  202,  203,
-      204,  204,  204,  205,  205,  206,  206,  207,  208,  209,
-      211,  213,  214,  215,  216,  217,  219,  220,  221,  222,
-      222,  223,  223,  225,  227,  228,  228,  228,  229,  229,
-      229,  230,  231,  231,  232,  232,  233,  234,  235,  235,
-      235,  236,  236,  236,  237,  238,  238,  239,  240,  241,
-      241,  242,  242,  243,  243,  244,  245,  246,  248,  250,
-      251,  252,  253,  254,  256,  257,  258,  259,  259,  260,
-      260,  260,  260,  260,  260,  260,  262,  262,  263,  264,
-      264,  265,  266,  266,  267,  268,  268,  269,  269,  270,
-
-      271,  271,  272,  272,  272,  272,  273,  274,  276,  278,
-      279,  281,  283,  285,  286,  288,  289,  291,  293,  293,
-      294,  295,  296,  298,  299,  299,  300,  301,  301,  302,
-      302,  303,  304,  304,  305,  305,  305,  305,  306,  306,
-      307,  308,  310,  312,  313,  315,  317,  319,  320,  322,
-      323,  325,  325,  326,  326,  326,  326,  326,  327,  329,
-      330,  330,  330,  331,  331,  332,  332,  332,  332,  332,
-      332,  332,  332,  332,  332,  332,  332,  332,  333,  335,
-      337,  339,  339,  339,  339,  339,  341,  341,  342,  344,
-      345,  345,  345,  346,  346,  347,  347,  347,  347,  348,
-
-      350,  352,  354,  355,  355,  355,  355,  355,  356,  356,
-      356,  356,  356,  356,  356,  356,  357,  357,  357,  358,
-      359,  359,  359,  359,  360,  360,  360,  361,  361,  361,
-      362,  363,  363,  364,  365,  365,  366,  367,  367,  368,
-      369,  369,  370,  371,  371,  372,  372,  373,  374,  376,
-      377,  378,  378,  379,  380,  380,  382,  382,  383,  384,
-      385,  386,  386
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    4,    5,    6,    7,    8,    5,    9,   10,   11,
-       12,   13,   14,   15,   16,   17,   18,   19,   20,   20,
-       20,   20,   20,   20,   20,   20,   20,   21,   22,   23,
-       24,   25,    5,   26,   30,   31,   32,   33,   34,   35,
-       36,   37,   38,   36,   36,   39,   40,   41,   42,   36,
-       36,   43,   44,   45,   46,   36,   47,   48,   36,   36,
-       27,    5,   28,    5,   29,    5,   30,   31,   32,   33,
-
-       34,   35,   36,   37,   38,   36,   36,   39,   40,   41,
-       42,   36,   36,   43,   44,   45,   46,   36,   47,   48,
-       36,   36,   26,   22,   26,    5,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[49] =
-    {   0,
-        1,    2,    3,    4,    5,    6,    7,    8,    5,    9,
-        5,    5,    5,    5,    5,    5,   10,    5,   11,   11,
-        9,    5,   12,   13,   14,    5,    5,    5,   15,   16,
-       16,   16,   16,   16,   16,   17,   17,   17,   17,   17,
-       17,   17,   17,   17,   17,   17,   17,   17
-    } ;
-
-static yyconst short int yy_base[385] =
-    {   0,
-        0,    0,   48,    0,   91,   92, 1405, 1771, 1771, 1771,
-       94,   96, 1771,  142, 1771, 1771, 1391, 1771, 1387,  189,
-     1378,  188,  194, 1377, 1376, 1374, 1361, 1771,  222,  242,
-       82,   91,   89,  196,   68,  163,  179,   97,  100,  194,
-        0,  280,  223,  328,  227,  228,  234,  229,  235,  375,
-      242,  418, 1335,  243,  463,  247,  251,  252,  254,  510,
-      168, 1343,  161, 1333,  234, 1331, 1336, 1323, 1316,    0,
-      558, 1340,  127,  258,  420,  422,  398, 1299, 1285, 1258,
-     1266, 1257,  411,  413,    0,  605, 1288, 1287, 1286, 1285,
-      119,  644, 1771,    0,  691, 1771,    0,    0, 1255, 1771,
-
-        0,  421,  690,  429,    0, 1771, 1771, 1244, 1771, 1771,
-      608,  696, 1771,  699,  419, 1247,  420,  422,  582,  583,
-      586,  587,  624,  625,  591,  590,  627,  628,  684,  430,
-     1771,  705,  653, 1256,  710, 1252,  731,    0, 1254,  750,
-      710,  798, 1222,  717,  802,  832, 1199,  720,  875,  730,
-     1189,  732,  892,  733,  795,  924,  796,  797, 1230,  971,
-      800,  997,    0,  876, 1183, 1191, 1176,    0,    0, 1174,
-     1151, 1150, 1097,    0, 1095, 1100, 1089, 1096,  805, 1043,
-     1047, 1043, 1023, 1016, 1010,  439,  808,  883, 1771, 1027,
-     1041,    0,  971,    0,  952,  736,  864,  614,  799,    0,
-
-      965,  976, 1046, 1061,    0, 1061, 1771,  714,  717,  858,
-      774,  789,  859, 1042,  860,  953,  954, 1047, 1086, 1108,
-        0, 1092,    0, 1094, 1140,    0,  950, 1182, 1091, 1110,
-     1199, 1210,    0, 1244,  981,    0,    0,    0, 1243, 1273,
-      890,    0,    0,  949,    0,    0,    0,  943,    0,  935,
-        0, 1120, 1771, 1188,  900, 1303,  895, 1771,    0,  882,
-        0, 1098, 1174,  440, 1177,  909,  421, 1048, 1093, 1102,
-     1169,  846,  818,  814,  822,  779,  792, 1249, 1190, 1191,
-     1192, 1322, 1228,  750, 1331, 1361,    0, 1106,    0, 1229,
-     1378,    0, 1325, 1326, 1349,  726,  725, 1410,    0,    0,
-
-        0,    0, 1771,  722,  839,  713,  644, 1369,  668,  671,
-      663,  615,  617,  576,  591, 1198,  540,  459,  456, 1440,
-     1462, 1483, 1458, 1771,  414,    0, 1517,  249,  794, 1238,
-      237,  258, 1310,    0,  203,  190,  209, 1460, 1477, 1350,
-        0, 1480, 1771,  131, 1328,  726, 1472,    0,    0,   86,
-     1516, 1523, 1522, 1385,  835,    0, 1505, 1511, 1527, 1533,
-     1549, 1771, 1571, 1587, 1592, 1608, 1622, 1639, 1642, 1649,
-       89,  187, 1656, 1672, 1689, 1701, 1707, 1718, 1720, 1736,
-      902,  903, 1743, 1754
-    } ;
-
-static yyconst short int yy_def[385] =
-    {   0,
-      362,    1,  362,    3,    1,    1,  362,  362,  362,  362,
-      362,  363,  362,  362,  362,  362,  362,  362,  362,  364,
-      362,  362,  362,  362,  365,  362,  362,  362,  366,  366,
-       30,   30,   30,   30,   30,   30,   30,   30,  367,  367,
-       11,  362,  367,  362,  367,  367,  367,  367,  367,  362,
-      367,  367,   52,  367,  362,  367,  367,  367,  367,  362,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   11,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  363,  363,  363,   71,   71,   71,   86,  362,
-       86,   86,  362,  368,  364,  362,  369,  370,  370,  362,
-
-      371,  362,  362,  362,  372,  362,  362,  373,  362,  362,
-      362,  362,  362,  374,   30,  362,   30,   30,   30,   30,
-       30,   30,   30,   30,   30,   30,   30,   30,   30,  367,
-      362,  367,   42,   42,   42,   44,   44,   86,  137,  137,
-      367,  375,   50,  367,   55,  145,  146,  367,  367,  367,
-       52,  367,  149,  367,  367,  362,  367,  367,  376,  367,
-      367,  362,   60,  367,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   92,  362,  362,
-      362,  362,  362,  362,  362,  363,  362,  362,  362,   86,
-       92,  368,  377,  370,  370,  378,  362,  362,  362,  372,
-
-      373,  362,  374,  362,  379,  380,  362,   30,   30,   30,
-       30,   30,   30,   30,   30,   30,   30,   42,  367,   86,
-      140,  375,  368,  375,  362,  146,  146,  149,  367,  367,
-      367,  149,  156,  367,  362,  381,  162,  204,  145,   60,
-      367,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,  362,  362,  362,  362,   86,  377,  362,  370,  362,
-      382,  378,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  383,  380,   30,   30,
-       30,  367,  367,   86,   86,  368,  225,  367,  146,  367,
-      149,  228,  367,  367,  367,  362,  362,  362,  240,   60,
-
-       60,   60,  362,   86,  362,  384,  362,  362,  362,  362,
-      362,  362,  362,  362,  383,  367,   86,   86,  368,  368,
-      367,  149,  367,  362,  362,  298,  367,   86,  362,  362,
-      362,  384,  362,   86,   86,  368,  368,  367,  367,  367,
-      322,  367,  362,   86,  362,  362,  362,   86,  368,  368,
-      367,  367,  367,  362,  362,  368,  367,  362,  367,  362,
-      367,    0,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362
-    } ;
-
-static yyconst short int yy_nxt[1820] =
-    {   0,
-        8,    9,   10,    9,    8,   11,    8,   12,   13,   14,
-       15,   16,   17,   13,   18,   19,   20,   21,   22,   23,
-       24,   13,   25,   26,   27,   28,   13,   13,   29,   30,
-       29,   29,   29,   31,   29,   29,   29,   32,   29,   33,
-       34,   35,   36,   29,   37,   29,   29,   38,    8,    9,
-       10,   39,   40,   41,   40,   42,   43,   44,   45,   46,
-       47,   43,   48,   49,   50,   51,   52,   53,   54,   43,
-       55,   56,   57,   58,   59,   43,   60,   61,   60,   60,
-       60,   62,   60,   60,   60,   63,   60,   64,   65,   66,
-       67,   60,   68,   60,   60,   69,   70,   70,  115,  196,
-
-       71,   71,   72,   83,  196,  131,   73,   72,  115,   72,
-      126,   74,  115,  356,   84,   84,   75,   72,   76,  115,
-      119,  115,  115,   77,  190,  120,  132,  115,  188,  115,
-      122,  121,  179,   78,   79,   80,   81,  115,  129,   72,
-      354,   82,   86,   87,   87,   88,   89,   89,   89,   89,
-       89,   90,   89,   89,   89,   89,   89,   89,   89,   89,
-       89,   89,   89,   89,   89,   89,   89,   89,   91,   89,
-       89,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-       95,   95,   95,  115,  101,  168,  127,  200,  165,  131,
-
-      101,  169,  200,  115,  102,   96,  103,  103,  166,  115,
-      102,   97,  103,  103,  350,  128,  103,  349,   99,  115,
-      132,  104,  103,  111,  111,  112,  115,  104,  131,  123,
-      348,  113,  131,  131,  131,  105,  115,  124,  114,  131,
-      131,  125,  116,  111,  111,  112,  141,  131,  131,  132,
-      142,  113,  131,  132,  132,  132,  131,  131,  114,  159,
-      132,  132,  116,  179,  331,  148,  154,  171,  132,  132,
-      346,  157,  117,  132,  158,  172,  344,  132,  132,  173,
-      132,   72,  118,  130,  130,  131,  130,  133,  130,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  134,  134,
-
-      130,  130,  130,  130,  130,  130,  132,  130,  135,  135,
-      135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
-      135,  135,  135,  135,  135,  135,  135,  135,   86,   87,
-       87,  136,  137,  138,  137,  137,  137,  130,  137,  137,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
-      137,  137,  137,  137,  139,  137,  137,  140,  140,  140,
-      140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
-      140,  140,  140,  140,  140,  140,   95,   95,  143,  130,
-      131,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-      130,  144,  130,  130,  130,  130,  130,  145,  130,  130,
-
-      130,  132,  130,  146,  147,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  131,  149,  179,  308,  179,  180,  186,
-      186,   84,   84,  266,  150,  131,  151,  151,  181,  197,
-      197,  343,  198,   72,  132,   72,  151,  199,  199,  115,
-      115,  152,  115,  307,  209,  307,  132,  186,  186,  115,
-      115,  336,  115,  208,  335,  153,  130,  130,  131,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  130,  155,  130,  130,  132,
-      130,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  111,  111,  160,  130,  131,  130,  130,  130,  161,
-      130,  130,  130,  130,  130,  130,  162,  130,  163,  163,
-      164,  130,  130,  130,  130,  130,  132,  130,  163,  163,
-      163,  163,  163,  163,  163,  163,  163,  163,  163,  163,
-      163,  163,  163,  163,  163,  163,  163,  163,   86,   87,
-       87,   87,   86,   86,   86,   86,   86,  334,   86,   86,
-       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,   86,   86,   86,   86,  178,  178,  178,
-      178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
-
-      178,  178,  178,  178,  178,  178,   86,   86,   86,  111,
-      111,  111,  115,  115,  187,  308,  115,  115,  266,  211,
-      115,  115,  115,  115,  114,  210,  115,  115,  116,  214,
-      115,  115,  199,  199,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,  188,  115,  115,  266,  115,  115,  266,
-      135,  216,  333,  333,  115,  115,  215,  115,  115,  213,
-      212,  218,  218,  191,  191,  191,  191,  191,  191,  191,
-      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
-      191,  191,   95,   95,   95,  266,  101,  111,  111,  112,
-
-      203,  203,  203,  266,  204,  113,  102,  362,  103,  103,
-      159,  266,  114,   97,  115,  131,  116,  135,  103,  331,
-       99,  205,  131,  104,  115,  131,  217,  328,  135,  135,
-      325,  132,   86,   86,  137,  131,  132,  131,  131,  355,
-      219,  355,  260,  132,  115,  230,  132,  115,  229,  229,
-      231,  231,  261,  324,  115,  317,  132,  115,  132,  132,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  221,
-      221,  221,  221,  221,  221,  221,  221,  221,  221,  221,
-      221,  221,  221,  221,  221,  221,  221,  221,  192,  192,
-
-      131,  131,  131,  223,  115,  131,  252,  252,  252,  254,
-      254,  254,  330,  330,  115,  253,  308,  265,  265,  115,
-      314,  132,  132,  132,  224,  130,  132,  265,  255,  115,
-      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
-      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
-      226,  226,  329,  358,  358,  313,  266,  330,  330,  312,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      131,  131,  263,  263,  254,  254,  254,  311,  115,  115,
-      115,  279,  263,  228,  228,  131,  241,  264,  115,  115,
-
-      115,  132,  132,  255,  228,  228,  228,  228,  228,  228,
-      232,  232,  297,  306,  308,  305,  132,  297,  306,  258,
-      303,  232,  232,  232,  232,  232,  232,  130,  130,  131,
-      130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
-      130,  130,  233,  233,  130,  130,  130,  130,  234,  130,
-      132,  130,  233,  233,  233,  233,  233,  233,  233,  233,
-      233,  233,  233,  233,  233,  233,  233,  233,  233,  233,
-      233,  233,  111,  111,  160,  302,  131,  111,  111,  112,
-      161,  301,  300,  115,  115,  113,  296,  162,  289,  202,
-      259,  164,  114,  281,  115,  258,  116,  132,  203,  203,
-
-      237,  130,  238,  130,  130,  130,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  130,  239,
-      130,  130,  130,  132,  130,  240,  240,  240,  240,  240,
-      240,  240,  240,  240,  240,  240,  240,  240,  240,  240,
-      240,  240,  240,  240,  240,  256,  256,  203,  203,  203,
-      187,  204,   72,  308,  135,   72,  256,  256,  256,  256,
-      256,  256,  111,  111,  112,  218,  218,   72,  205,  266,
-      113,  266,  115,  267,  266,   72,  266,  114,  268,   72,
-      280,  116,  115,  269,  266,  270,   72,  254,  254,  282,
-      271,  131,  192,  192,  192,  192,  131,  223,  308,  286,
-
-      272,  273,  274,  275,  260,  187,  283,  308,  276,  293,
-      293,  131,  132,  284,  261,  131,  266,  132,  224,  293,
-      224,  252,  252,  252,  294,  266,  285,  285,  231,  231,
-      253,  251,  132,  250,  249,  248,  132,  285,  285,  285,
-      285,  285,  285,  130,  130,  131,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  287,  287,
-      130,  130,  130,  130,  288,  130,  132,  130,  287,  287,
-      287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
-      287,  287,  287,  287,  287,  287,  287,  287,  290,  254,
-      254,  254,  263,  263,  247,  265,  265,  246,  291,  309,
-
-      292,  292,  263,  131,  131,  265,  245,  264,  255,  310,
-      292,  292,  292,  292,  292,  292,  292,  295,  295,  244,
-      115,  115,  115,  243,  132,  132,  242,  295,  232,  232,
-      115,  115,  115,  131,  131,  235,  130,  227,  130,  232,
-      232,  232,  232,  232,  232,  111,  111,  160,  316,  131,
-      111,  111,  112,  161,  132,  132,  345,  345,  113,  220,
-      162,  219,  321,  135,  164,  114,  345,  207,  202,  116,
-      132,  298,  298,  298,  298,  298,  298,  298,  298,  298,
-      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
-      298,  299,  299,  195,  189,  188,  188,  187,  185,  184,
-
-       72,  299,  299,  299,  299,  299,  299,  299,  299,  299,
-      299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
-      299,  304,  304,  254,  254,  282,  183,  131,  347,  347,
-      131,  131,  304,  304,  304,  304,  304,  304,  347,  323,
-      182,  323,  283,  293,  293,  179,  345,  345,  132,  318,
-      318,  132,  132,  293,  131,  131,  345,  177,  294,  176,
-      318,  318,  318,  318,  318,  318,  319,  295,  295,  175,
-      111,  111,  112,  174,  170,  132,  132,  295,  113,  320,
-      320,  167,  130,  352,  110,  114,  254,  254,  254,  116,
-      320,  320,  320,  320,  320,  320,  322,  322,  109,  107,
-
-      106,  100,   94,   93,  362,  255,  362,  322,  322,  322,
-      322,  322,  322,  130,  130,  131,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  326,  326,
-      130,  130,  130,  130,  327,  130,  132,  130,  326,  326,
-      326,  326,  326,  326,  326,  326,  326,  326,  326,  326,
-      326,  326,  326,  326,  326,  326,  326,  326,  337,  337,
-      362,  362,  362,  131,  362,  131,  362,  131,  362,  337,
-      337,  337,  337,  337,  337,  338,  342,  342,  339,  339,
-      339,  339,  131,  362,  132,  131,  132,  362,  132,  340,
-      347,  347,  362,  362,  362,  351,  351,  362,  353,  353,
-
-      347,  341,  341,  132,  362,  351,  132,  362,  353,  362,
-      131,  341,  341,  341,  341,  341,  341,  341,  111,  111,
-      160,  131,  131,  359,  359,  362,  161,  131,  131,  360,
-      360,  132,  131,  162,  351,  351,  357,  164,  357,  360,
-      353,  353,  132,  132,  351,  361,  361,  362,  132,  132,
-      353,  360,  360,  132,  131,  361,  362,  362,  362,  362,
-      362,  360,  362,  362,  362,  362,  362,  361,  361,  362,
-      362,  362,  362,  362,  362,  132,  362,  361,   85,  362,
-      362,   85,  362,  362,  362,   85,   85,   85,   98,   98,
-       98,  362,  362,  362,  362,  362,   98,  362,   98,  362,
-
-      362,   98,   98,   98,  108,  362,  108,  108,  108,  115,
-      115,  115,  362,  362,  362,  362,  115,  115,  115,  362,
-      362,  362,  115,  115,  115,  130,  130,  130,  130,  130,
-      130,  130,  130,  130,  130,  130,  130,  130,  130,  192,
-      192,  362,  192,  192,  192,  192,  192,  192,  192,  192,
-      192,  192,  192,  192,  192,  192,  193,  193,  193,  194,
-      362,  362,  362,  194,  194,  194,  201,  362,  362,  201,
-      201,  201,  201,  206,  206,  206,  362,  206,  362,  362,
-      362,  362,  362,  206,  362,  362,  206,  206,  206,  222,
-      222,  362,  222,  222,  222,  222,  222,  222,  222,  222,
-
-      222,  222,  222,  222,  222,  222,  236,  362,  362,  362,
-      362,  236,  362,  362,  362,  362,  236,  257,  362,  362,
-      257,  257,  257,  257,  262,  362,  362,  262,  262,  362,
-      362,  362,  262,  262,  277,  277,  277,  278,  278,  278,
-      362,  362,  362,  362,  278,  278,  278,  362,  362,  362,
-      278,  278,  278,  315,  362,  362,  315,  315,  315,  315,
-      332,  362,  362,  362,  332,  362,  362,  362,  332,  332,
-        7,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362
-    } ;
-
-static yyconst short int yy_chk[1820] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    5,    6,   35,  371,
-
-        5,    6,   11,   12,  371,   39,   11,   11,   35,   11,
-       35,   11,   31,  350,   12,   12,   11,   11,   11,   33,
-       31,   32,   31,   11,   91,   32,   39,   38,   91,   33,
-       33,   32,   73,   11,   11,   11,   11,   38,   38,   73,
-      344,   11,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
-       20,   20,   20,   36,   22,   63,   36,  372,   61,   40,
-
-       23,   63,  372,   36,   22,   20,   22,   22,   61,   37,
-       23,   20,   23,   23,  337,   37,   22,  336,   20,   37,
-       40,   22,   23,   29,   29,   29,   34,   23,   43,   34,
-      335,   29,   45,   46,   48,   22,   34,   34,   29,   47,
-       49,   34,   29,   30,   30,   30,   47,   51,   54,   43,
-       49,   30,   56,   45,   46,   48,   57,   58,   30,   59,
-       47,   49,   30,   74,  332,   51,   54,   65,   51,   54,
-      331,   56,   30,   56,   57,   65,  328,   57,   58,   65,
-       59,   74,   30,   42,   42,   42,   42,   42,   42,   42,
-       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
-
-       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
-       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
-       42,   42,   42,   42,   42,   42,   42,   42,   44,   44,
-       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
-       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
-       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
-       44,   44,   44,   44,   44,   44,   44,   44,   44,   44,
-       44,   44,   44,   44,   44,   44,   50,   50,   50,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-       50,   50,   50,   52,   52,   75,  267,   76,   77,   83,
-       83,   84,   84,  267,   52,  130,   52,   52,   77,  102,
-      102,  325,  104,   75,   52,   76,   52,  104,  104,  115,
-      117,   52,  118,  264,  118,  264,  130,  186,  186,  115,
-      117,  319,  118,  117,  318,   52,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   60,   60,   60,   71,   71,
-       71,   71,   71,   71,   71,   71,   71,  317,   71,   71,
-       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
-       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
-       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
-
-       71,   71,   71,   71,   71,   71,   86,   86,   86,  111,
-      111,  111,  119,  120,   86,  315,  121,  122,  314,  122,
-      126,  125,  119,  120,  111,  119,  121,  122,  111,  125,
-      126,  125,  198,  198,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
-       86,   86,   86,   92,  123,  124,  313,  127,  128,  312,
-      133,  128,  307,  307,  123,  124,  127,  127,  128,  124,
-      123,  133,  133,   92,   92,   92,   92,   92,   92,   92,
-       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
-       92,   92,   95,   95,   95,  311,  103,  112,  112,  112,
-
-      114,  114,  114,  310,  114,  112,  103,   95,  103,  103,
-      132,  309,  112,   95,  129,  141,  112,  135,  103,  306,
-       95,  114,  144,  103,  129,  148,  129,  304,  135,  135,
-      297,  132,  137,  137,  137,  150,  141,  152,  154,  346,
-      137,  346,  196,  144,  208,  152,  148,  209,  150,  150,
-      152,  152,  196,  296,  208,  284,  150,  209,  152,  154,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
-      137,  137,  137,  137,  137,  137,  137,  137,  137,  140,
-      140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
-      140,  140,  140,  140,  140,  140,  140,  140,  142,  142,
-
-      155,  157,  158,  142,  211,  161,  179,  179,  179,  187,
-      187,  187,  329,  329,  211,  179,  277,  199,  199,  212,
-      276,  155,  157,  158,  142,  145,  161,  199,  187,  212,
-      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
-      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
-      146,  146,  305,  355,  355,  275,  274,  305,  305,  273,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      146,  146,  146,  146,  146,  146,  146,  146,  146,  146,
-      149,  164,  197,  197,  188,  188,  188,  272,  210,  213,
-      215,  210,  197,  149,  149,  241,  164,  197,  210,  213,
-
-      215,  149,  164,  188,  149,  149,  149,  149,  149,  149,
-      153,  153,  381,  382,  266,  260,  241,  381,  382,  257,
-      255,  153,  153,  153,  153,  153,  153,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
-      156,  156,  160,  160,  160,  250,  160,  202,  202,  202,
-      160,  248,  244,  216,  217,  202,  235,  160,  227,  201,
-      195,  160,  202,  216,  217,  193,  202,  160,  162,  162,
-
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  162,  162,  162,  162,  162,
-      162,  162,  162,  162,  162,  190,  190,  203,  203,  203,
-      191,  203,  185,  268,  218,  184,  190,  190,  190,  190,
-      190,  190,  206,  206,  206,  218,  218,  183,  203,  204,
-      206,  268,  214,  204,  204,  182,  204,  206,  204,  181,
-      214,  206,  214,  204,  204,  204,  180,  219,  219,  219,
-      204,  219,  222,  222,  224,  224,  229,  222,  269,  224,
-
-      204,  204,  204,  204,  262,  178,  219,  270,  204,  229,
-      229,  288,  219,  220,  262,  230,  269,  229,  222,  229,
-      224,  252,  252,  252,  229,  270,  220,  220,  230,  230,
-      252,  177,  288,  176,  175,  173,  230,  220,  220,  220,
-      220,  220,  220,  225,  225,  225,  225,  225,  225,  225,
-      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
-      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
-      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
-      225,  225,  225,  225,  225,  225,  225,  225,  228,  254,
-      254,  254,  263,  263,  172,  265,  265,  171,  228,  271,
-
-      228,  228,  263,  316,  231,  265,  170,  263,  254,  271,
-      228,  228,  228,  228,  228,  228,  228,  231,  231,  167,
-      279,  280,  281,  166,  316,  231,  165,  231,  232,  232,
-      279,  280,  281,  283,  290,  159,  151,  147,  143,  232,
-      232,  232,  232,  232,  232,  234,  234,  234,  283,  234,
-      278,  278,  278,  234,  283,  290,  330,  330,  278,  139,
-      234,  136,  290,  134,  234,  278,  330,  116,  108,  278,
-      234,  239,  239,  239,  239,  239,  239,  239,  239,  239,
-      239,  239,  239,  239,  239,  239,  239,  239,  239,  239,
-      239,  240,  240,   99,   90,   89,   88,   87,   82,   81,
-
-       80,  240,  240,  240,  240,  240,  240,  240,  240,  240,
-      240,  240,  240,  240,  240,  240,  240,  240,  240,  240,
-      240,  256,  256,  282,  282,  282,   79,  282,  333,  333,
-      293,  294,  256,  256,  256,  256,  256,  256,  333,  294,
-       78,  294,  282,  293,  293,   72,  345,  345,  282,  285,
-      285,  293,  294,  293,  295,  340,  345,   69,  293,   68,
-      285,  285,  285,  285,  285,  285,  286,  295,  295,   67,
-      308,  308,  308,   66,   64,  295,  340,  295,  308,  286,
-      286,   62,   53,  340,   27,  308,  354,  354,  354,  308,
-      286,  286,  286,  286,  286,  286,  291,  291,   26,   25,
-
-       24,   21,   19,   17,    7,  354,    0,  291,  291,  291,
-      291,  291,  291,  298,  298,  298,  298,  298,  298,  298,
-      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
-      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
-      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
-      298,  298,  298,  298,  298,  298,  298,  298,  320,  320,
-        0,    0,    0,  323,    0,  338,    0,  321,    0,  320,
-      320,  320,  320,  320,  320,  321,  323,  323,  338,  338,
-      321,  321,  339,    0,  323,  342,  338,    0,  321,  322,
-      347,  347,    0,    0,    0,  339,  339,    0,  342,  342,
-
-      347,  322,  322,  339,    0,  339,  342,    0,  342,    0,
-      357,  322,  322,  322,  322,  322,  322,  322,  327,  327,
-      327,  351,  327,  357,  357,    0,  327,  353,  352,  358,
-      358,  357,  359,  327,  351,  351,  352,  327,  352,  358,
-      353,  353,  351,  327,  351,  359,  359,    0,  353,  352,
-      353,  360,  360,  359,  361,  359,    0,    0,    0,    0,
-        0,  360,    0,    0,    0,    0,    0,  361,  361,    0,
-        0,    0,    0,    0,    0,  361,    0,  361,  363,    0,
-        0,  363,    0,    0,    0,  363,  363,  363,  364,  364,
-      364,    0,    0,    0,    0,    0,  364,    0,  364,    0,
-
-        0,  364,  364,  364,  365,    0,  365,  365,  365,  366,
-      366,  366,    0,    0,    0,    0,  366,  366,  366,    0,
-        0,    0,  366,  366,  366,  367,  367,  367,  367,  367,
-      367,  367,  367,  367,  367,  367,  367,  367,  367,  368,
-      368,    0,  368,  368,  368,  368,  368,  368,  368,  368,
-      368,  368,  368,  368,  368,  368,  369,  369,  369,  370,
-        0,    0,    0,  370,  370,  370,  373,    0,    0,  373,
-      373,  373,  373,  374,  374,  374,    0,  374,    0,    0,
-        0,    0,    0,  374,    0,    0,  374,  374,  374,  375,
-      375,    0,  375,  375,  375,  375,  375,  375,  375,  375,
-
-      375,  375,  375,  375,  375,  375,  376,    0,    0,    0,
-        0,  376,    0,    0,    0,    0,  376,  377,    0,    0,
-      377,  377,  377,  377,  378,    0,    0,  378,  378,    0,
-        0,    0,  378,  378,  379,  379,  379,  380,  380,  380,
-        0,    0,    0,    0,  380,  380,  380,    0,    0,    0,
-      380,  380,  380,  383,    0,    0,  383,  383,  383,  383,
-      384,    0,    0,    0,  384,    0,    0,    0,  384,  384,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-
-      362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
-      362,  362,  362,  362,  362,  362,  362,  362,  362
-    } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
-static char *yy_full_match;
-static int yy_lp;
-static int yy_looking_for_trail_begin = 0;
-static int yy_full_lp;
-static int *yy_full_state;
-#define YY_TRAILING_MASK 0x2000
-#define YY_TRAILING_HEAD_MASK 0x4000
-#define REJECT \
-{ \
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yy_full_match; /* restore poss. backed-over text */ \
-yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
-yy_state_ptr = yy_full_state; /* restore orig. state */ \
-yy_current_state = *yy_state_ptr; /* restore curr. state */ \
-++yy_lp; \
-goto find_rule; \
-}
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "./ada-lex.l"
-#define INITIAL 0
-/* FLEX lexer for Ada expressions, for GDB.
-   Copyright (C) 1994, 1997, 2000
-   Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
-/*----------------------------------------------------------------------*/
-/* The converted version of this file is to be included in ada-exp.y, */
-/* the Ada parser for gdb.  The function yylex obtains characters from */
-/* the global pointer lexptr.  It returns a syntactic category for */
-/* each successive token and places a semantic value into yylval */
-/* (ada-lval), defined by the parser.   */
-/* Run flex with (at least) the -i option (case-insensitive), and the -I */
-/* option (interactive---no unnecessary lookahead).  */
-#line 48 "./ada-lex.l"
-#define NUMERAL_WIDTH 256
-#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
-
-/* Temporary staging for numeric literals. */
-static char numbuf[NUMERAL_WIDTH]; 
- static void canonicalizeNumeral (char* s1, const char*);
-static int processInt (const char*, const char*, const char*);
-static int processReal (const char*);
-static int processId (const char*, int);
-static int processAttribute (const char*);
-static int find_dot_all (const char*);
-
-#undef YY_DECL
-#define YY_DECL static int yylex ( void ) 
-
-#undef YY_INPUT
-#define YY_INPUT(BUF, RESULT, MAX_SIZE) \
-    if ( *lexptr == '\000' ) \
-      (RESULT) = YY_NULL; \
-    else \
-      { \
-        *(BUF) = *lexptr; \
-        (RESULT) = 1; \
-	lexptr += 1; \
-      }
-
-static char *tempbuf = NULL;
-static int tempbufsize = 0;
-static int tempbuf_len;
-static struct block* left_block_context;
-
-static void resize_tempbuf (unsigned int);
-
-static void block_lookup (char*, char*);
-
-static int name_lookup (char*, char*, int*);
-
-static int find_dot_all (const char*);
-
-#define IN_STRING 1
-#define BEFORE_QUAL_QUOTE 2
-
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-
-#line 91 "./ada-lex.l"
-
-
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-		yy_state_ptr = yy_state_buf;
-		*yy_state_ptr++ = yy_current_state;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 363 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			*yy_state_ptr++ = yy_current_state;
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 1771 );
-
-yy_find_action:
-		yy_current_state = *--yy_state_ptr;
-		yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
-		for ( ; ; ) /* until we find what rule we matched */
-			{
-			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
-				{
-				yy_act = yy_acclist[yy_lp];
-				if ( yy_act & YY_TRAILING_HEAD_MASK ||
-				     yy_looking_for_trail_begin )
-					{
-					if ( yy_act == yy_looking_for_trail_begin )
-						{
-						yy_looking_for_trail_begin = 0;
-						yy_act &= ~YY_TRAILING_HEAD_MASK;
-						break;
-						}
-					}
-				else if ( yy_act & YY_TRAILING_MASK )
-					{
-					yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
-					yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
-					}
-				else
-					{
-					yy_full_match = yy_cp;
-					yy_full_state = yy_state_ptr;
-					yy_full_lp = yy_lp;
-					break;
-					}
-				++yy_lp;
-				goto find_rule;
-				}
-			--yy_cp;
-			yy_current_state = *--yy_state_ptr;
-			yy_lp = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 93 "./ada-lex.l"
-{ }
-	YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 95 "./ada-lex.l"
-{ yyterminate(); }
-	YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 97 "./ada-lex.l"
-{ 
-		   canonicalizeNumeral (numbuf, yytext); 
-		   return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1);
-		 }
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 102 "./ada-lex.l"
-{ 
-		   canonicalizeNumeral (numbuf, yytext); 
-		   return processInt (NULL, numbuf, NULL);
-		 }
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 107 "./ada-lex.l"
-{
-		   canonicalizeNumeral (numbuf, yytext);
-    		   return processInt (numbuf,
-				      strchr (numbuf, '#') + 1, 
-				      strrchr(numbuf, '#') + 1);
-		 }
-	YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 114 "./ada-lex.l"
-{
-		   canonicalizeNumeral (numbuf, yytext);
-    		   return processInt (numbuf, strchr (numbuf, '#') + 1, NULL);
-		 }
-	YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 119 "./ada-lex.l"
-{
-		  canonicalizeNumeral (numbuf, yytext+2);
-		  return processInt ("16#", numbuf, NULL);
-		}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 125 "./ada-lex.l"
-{
-		   canonicalizeNumeral (numbuf, yytext); 
-		   return processReal (numbuf);
-		}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 130 "./ada-lex.l"
-{
-		   canonicalizeNumeral (numbuf, yytext); 
-		   return processReal (numbuf);
-		}
-	YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 135 "./ada-lex.l"
-{
-                   error ("Based real literals not implemented yet.");
-		}
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 139 "./ada-lex.l"
-{
-                   error ("Based real literals not implemented yet.");
-		}
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 143 "./ada-lex.l"
-{
-		   yylval.typed_val.type = builtin_type_ada_char;
-		   yylval.typed_val.val = yytext[1];
-		   return CHARLIT;
-		}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 149 "./ada-lex.l"
-{
-                   int v;
-                   yylval.typed_val.type = builtin_type_ada_char;
-		   sscanf (yytext+3, "%2x", &v);
-		   yylval.typed_val.val = v;
-		   return CHARLIT;
-		}
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 157 "./ada-lex.l"
-{ return processId (yytext, yyleng); }
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 159 "./ada-lex.l"
-{ 
-		   tempbuf_len = 0;
-		   BEGIN IN_STRING;
-		}
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 164 "./ada-lex.l"
-{
-		   resize_tempbuf (yyleng+tempbuf_len);
-		   strncpy (tempbuf+tempbuf_len, yytext, yyleng-1);
-		   tempbuf_len += yyleng-1;
-		   yylval.sval.ptr = tempbuf;
-		   yylval.sval.length = tempbuf_len;
-		   BEGIN INITIAL;
-		   return STRING;
-		}
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 174 "./ada-lex.l"
-{
-		   int n;
-		   resize_tempbuf (yyleng-5+tempbuf_len+1);
-		   strncpy (tempbuf+tempbuf_len, yytext, yyleng-6);
-		   sscanf(yytext+yyleng-4, "%2x", &n);
-		   tempbuf[yyleng-6+tempbuf_len] = (char) n;
-		   tempbuf_len += yyleng-5;
-		}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 183 "./ada-lex.l"
-{
-		   int n;
-		   resize_tempbuf (yyleng-4+tempbuf_len+1);
-		   strncpy (tempbuf+tempbuf_len, yytext, yyleng-6);
-		   tempbuf[yyleng-5+tempbuf_len] = '"';
-		   tempbuf_len += yyleng-4;
-		}
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 191 "./ada-lex.l"
-{ 
-		  while (*lexptr != 'i' && *lexptr != 'I') 
-		    lexptr -= 1; 
-		  yyrestart(NULL); 
-		  return 0;
-		}
-	YY_BREAK
-/* ADA KEYWORDS */
-case 20:
-YY_RULE_SETUP
-#line 200 "./ada-lex.l"
-{ return ABS; }
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 201 "./ada-lex.l"
-{ return _AND_; }
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 202 "./ada-lex.l"
-{ return ELSE; }
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 203 "./ada-lex.l"
-{ return IN; }
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 204 "./ada-lex.l"
-{ return MOD; }
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 205 "./ada-lex.l"
-{ return NEW; }
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 206 "./ada-lex.l"
-{ return NOT; }
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 207 "./ada-lex.l"
-{ return NULL_PTR; }
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 208 "./ada-lex.l"
-{ return OR; }
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 209 "./ada-lex.l"
-{ return REM; }
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 210 "./ada-lex.l"
-{ return THEN; }
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 211 "./ada-lex.l"
-{ return XOR; }
-	YY_BREAK
-/* ATTRIBUTES */
-case 32:
-YY_RULE_SETUP
-#line 215 "./ada-lex.l"
-{ return processAttribute (yytext+1); }
-	YY_BREAK
-/* PUNCTUATION */
-case 33:
-YY_RULE_SETUP
-#line 219 "./ada-lex.l"
-{ return ARROW; }
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 220 "./ada-lex.l"
-{ return DOTDOT; }
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 221 "./ada-lex.l"
-{ return STARSTAR; }
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 222 "./ada-lex.l"
-{ return ASSIGN; }
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 223 "./ada-lex.l"
-{ return NOTEQUAL; }
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 224 "./ada-lex.l"
-{ return LEQ; }
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 225 "./ada-lex.l"
-{ return GEQ; }
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 227 "./ada-lex.l"
-{ BEGIN INITIAL; return '\''; }
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 229 "./ada-lex.l"
-{ return yytext[0]; }
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 231 "./ada-lex.l"
-{ if (paren_depth == 0 && comma_terminates)
-		    {
-		      lexptr -= 1;
-		      yyrestart(NULL);
-		      return 0;
-		    }
-		  else 
-		    return ',';
-		}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 241 "./ada-lex.l"
-{ paren_depth += 1; return '('; }
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 242 "./ada-lex.l"
-{ if (paren_depth == 0) 
-		    {
-		      lexptr -= 1;
-		      yyrestart(NULL);
-		      return 0;
-		    }
-		  else 
- 		    {
-		      paren_depth -= 1; 
-		      return ')';
-		    }
-		}
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 255 "./ada-lex.l"
-{ return DOT_ALL; }
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 257 "./ada-lex.l"
-{ 
-	 	  processId (yytext+1, yyleng-1);
-	          return DOT_ID; 
-		}
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 262 "./ada-lex.l"
-{ 
-                  int all_posn = find_dot_all (yytext);
-		  int token_type, segments, k;
-		  int quote_follows;
-
-                  if (all_posn == -1 && yytext[yyleng-1] == '\'') 
-		    {
-		      quote_follows = 1;
-		      do { 
-			yyless (yyleng-1); 
-		      } while (yytext[yyleng-1] == ' ');
-		    }
-		  else
-		    quote_follows = 0;			
-		    
-                  if (all_posn >= 0)
-		    yyless (all_posn);
-                  processId(yytext, yyleng);
-                  segments = name_lookup (ada_mangle (yylval.ssym.stoken.ptr),
-		                          yylval.ssym.stoken.ptr, &token_type);
-		  left_block_context = NULL;
-		  for (k = yyleng; segments > 0 && k > 0; k -= 1)
-                    {
-		      if (yytext[k-1] == '.')
-			segments -= 1;
-		      quote_follows = 0;
-		    }
-		  if (k <= 0)
-		    error ("confused by name %s", yytext);
-		  yyless (k);
-		  if (quote_follows) 
-		    BEGIN BEFORE_QUAL_QUOTE;
-		  return token_type;
-                }
-	YY_BREAK
-/* GDB EXPRESSION CONSTRUCTS  */
-case 48:
-YY_RULE_SETUP
-#line 300 "./ada-lex.l"
-{
-                  processId(yytext, yyleng-2);
-                  block_lookup (yylval.ssym.stoken.ptr, yylval.ssym.stoken.ptr);
-                  return BLOCKNAME;
-		}
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 306 "./ada-lex.l"
-{ 
-                  processId(yytext, yyleng-2);
-                  block_lookup (ada_mangle (yylval.ssym.stoken.ptr),
-                                yylval.ssym.stoken.ptr);
-                  return BLOCKNAME;
-		}
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 313 "./ada-lex.l"
-{ return yytext[0]; }
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 315 "./ada-lex.l"
-{ yylval.lval = -1; return LAST; }
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 316 "./ada-lex.l"
-{ yylval.lval = -atoi(yytext+2); return LAST; }
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 317 "./ada-lex.l"
-{ yylval.lval = 0; return LAST; }
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 318 "./ada-lex.l"
-{ yylval.lval = atoi(yytext+1); return LAST; }
-	YY_BREAK
-/* REGISTERS AND GDB CONVENIENCE VARIABLES */
-case 55:
-YY_RULE_SETUP
-#line 323 "./ada-lex.l"
-{
-    		  int c;
-		  for (c = 0; c < NUM_REGS; c++)
-		    if (REGISTER_NAME (c) &&
-                        strcmp (yytext + 1, REGISTER_NAME (c)) == 0)
-		      {
-			yylval.lval = c;
-			return REGNAME;
-		      }
-		  yylval.sval.ptr = yytext;
-		  yylval.sval.length = yyleng;
-		  yylval.ivar = 
-		    lookup_internalvar (copy_name (yylval.sval) + 1);
-		  return INTERNAL_VARIABLE;
-		}
-	YY_BREAK
-/* CATCH-ALL ERROR CASE */
-case 56:
-YY_RULE_SETUP
-#line 341 "./ada-lex.l"
-{ error ("Invalid character '%s' in expression.", yytext); }
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 342 "./ada-lex.l"
-YY_FATAL_ERROR( "flex scanner jammed" );
-	YY_BREAK
-			case YY_STATE_EOF(INITIAL):
-			case YY_STATE_EOF(IN_STRING):
-			case YY_STATE_EOF(BEFORE_QUAL_QUOTE):
-				yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-	yy_state_ptr = yy_state_buf;
-	*yy_state_ptr++ = yy_current_state;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 363 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		*yy_state_ptr++ = yy_current_state;
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-
-	register YY_CHAR yy_c = 1;
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 363 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 362);
-	if ( ! yy_is_jam )
-		*yy_state_ptr++ = yy_current_state;
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 342 "./ada-lex.l"
-
-
-#include <ctype.h>
-#include <string.h>
-
-/* Initialize the lexer for processing new expression */
-void
-lexer_init (FILE* inp)
-{
-  BEGIN INITIAL;
-  yyrestart (inp);
-}
-
-
-/* Make sure that tempbuf points at an array at least N characters long. */
-
-static void
-resize_tempbuf (n)
-     unsigned int n;
-{
-  if (tempbufsize < n)
-    {
-      tempbufsize = (n+63) & ~63;
-      tempbuf = (char*) xrealloc (tempbuf, tempbufsize);
-    }
-}
- 
-/* Copy S2 to S1, removing all underscores, and downcasing all letters. */
-
-static void
-canonicalizeNumeral (s1,s2)
-     char* s1;
-     const char* s2;
-{
-  for (; *s2 != '\000'; s2 += 1) 
-    {
-      if (*s2 != '_')
-	{
-	  *s1 = tolower(*s2);
-	  s1 += 1;
-	}
-    }
-  s1[0] = '\000';
-}
-
-#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
-
-/* True (non-zero) iff DIGIT is a valid digit in radix BASE, 
-   where 2 <= BASE <= 16.  */
-
-static int
-is_digit_in_base (digit, base)
-     unsigned char digit;
-     int base;
-{
-  if (!isxdigit (digit))
-    return 0;
-  if (base <= 10)
-    return (isdigit (digit) && digit < base + '0');
-  else 
-    return (isdigit (digit) || tolower (digit) < base - 10 + 'a');
-}
-
-static int
-digit_to_int (c)
-     unsigned char c;
-{
-  if (isdigit (c))
-    return c - '0';
-  else
-    return tolower (c) - 'a' + 10;
-}
-
-/* As for strtoul, but for ULONGEST results. */
-ULONGEST
-strtoulst (num, trailer, base)
-     const char *num;
-     const char **trailer;
-     int base;
-{
-  unsigned int high_part;
-  ULONGEST result;
-  int i;
-  unsigned char lim;
-
-  if (base < 2 || base > 16)
-    {
-      errno = EINVAL;
-      return 0;
-    }
-  lim = base - 1 + '0';
-
-  result = high_part = 0;
-  for (i = 0; is_digit_in_base (num[i], base); i += 1)
-    {
-      result = result*base + digit_to_int (num[i]);
-      high_part = high_part*base + (unsigned int) (result >> HIGH_BYTE_POSN);
-      result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1;
-      if (high_part > 0xff) 
-	{
-	  errno = ERANGE;
-	  result = high_part = 0;
-	  break;
-	}
-    }
-
-  if (trailer != NULL)
-    *trailer = &num[i];
-
-  return result + ((ULONGEST) high_part << HIGH_BYTE_POSN);
-}
-
-
-
-/* Interprets the prefix of NUM that consists of digits of the given BASE
-   as an integer of that BASE, with the string EXP as an exponent.
-   Puts value in yylval, and returns INT, if the string is valid.  Causes
-   an error if the number is improperly formated.   BASE, if NULL, defaults 
-   to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */
-
-static int
-processInt (base0, num0, exp0)
-     const char* num0;
-     const char* base0;
-     const char* exp0;
-{
-  ULONGEST result;
-  long exp;
-  int base;
-
-  char* trailer;
-
-  if (base0 == NULL)
-    base = 10;
-  else
-    {	
-      base = strtol (base0, (char**) NULL, 10);
-      if (base < 2 || base > 16)
-	error ("Invalid base: %d.", base);
-    }
-
-  if (exp0 == NULL)
-    exp = 0;
-  else
-    exp = strtol(exp0, (char**) NULL, 10);
-
-  errno = 0;
-  result = strtoulst (num0, &trailer, base);
-  if (errno == ERANGE)
-    error ("Integer literal out of range");
-  if (isxdigit(*trailer))
-    error ("Invalid digit `%c' in based literal", *trailer);
-
-  while (exp > 0) 
-    {
-      if (result > (ULONG_MAX / base))
-	error ("Integer literal out of range");
-      result *= base;
-      exp -= 1;
-    }
-    
-  if ((result >> (TARGET_INT_BIT-1)) == 0)
-    yylval.typed_val.type = builtin_type_ada_int;
-  else if ((result >> (TARGET_LONG_BIT-1)) == 0)
-    yylval.typed_val.type = builtin_type_ada_long;
-  else if (((result >> (TARGET_LONG_BIT-1)) >> 1) == 0)
-    {
-      /* We have a number representable as an unsigned integer quantity.
-         For consistency with the C treatment, we will treat it as an 
-	 anonymous modular (unsigned) quantity.  Alas, the types are such
-	 that we need to store .val as a signed quantity.  Sorry 
-         for the mess, but C doesn't officially guarantee that a simple
-         assignment does the trick (no, it doesn't; read the reference manual).
-       */
-      yylval.typed_val.type = builtin_type_unsigned_long;
-      if (result & LONGEST_SIGN)
-	yylval.typed_val.val = 
-	  (LONGEST) (result & ~LONGEST_SIGN) 
-	  - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1);
-      else
-	yylval.typed_val.val = (LONGEST) result;
-      return INT;
-    }
-  else 
-    yylval.typed_val.type = builtin_type_ada_long_long;
-
-  yylval.typed_val.val = (LONGEST) result;
-  return INT;
-}
-
-static int
-processReal (num0)
-     const char* num0;
-{
-  if (sizeof (DOUBLEST) <= sizeof (float))
-    sscanf (num0, "%g", &yylval.typed_val_float.dval);
-  else if (sizeof (DOUBLEST) <= sizeof (double))
-    sscanf (num0, "%lg", &yylval.typed_val_float.dval);
-  else
-    {
-#ifdef PRINTF_HAS_LONG_DOUBLE
-      sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
-#else
-      /* Scan it into a double, then convert and assign it to the 
-	 long double.  This at least wins with values representable 
-	 in the range of doubles. */
-      double temp;
-      sscanf (num0, "%lg", &temp);
-      yylval.typed_val_float.dval = temp;
-#endif
-    }
-
-  yylval.typed_val_float.type = builtin_type_ada_float;
-  if (sizeof(DOUBLEST) >= TARGET_DOUBLE_BIT / TARGET_CHAR_BIT)
-    yylval.typed_val_float.type = builtin_type_ada_double;
-  if (sizeof(DOUBLEST) >= TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT)
-    yylval.typed_val_float.type = builtin_type_ada_long_double;
-
-  return FLOAT;
-}
-
-static int
-processId (name0, len)
-     const char *name0;
-     int len;
-{
-  char* name = xmalloc (len + 11);
-  int i0, i;
-  
-/*  add_name_string_cleanup (name); */
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
-  while (len > 0 && isspace (name0[len-1]))
-    len -= 1;
-  i = i0 = 0;
-  while (i0 < len) 
-    {
-      if (isalnum (name0[i0]))
-	{
-	  name[i] = tolower (name0[i0]);
-	  i += 1; i0 += 1;
-	}
-      else switch (name0[i0]) 
-	{
-	default:
-	  name[i] = name0[i0];
-	  i += 1; i0 += 1;
-	  break;
-	case ' ': case '\t':
-	  i0 += 1;
-	  break;
-	case '\'':
-	  i0 += 1;
-	  while (i0 < len && name0[i0] != '\'')
-	    {
-	      name[i] = name0[i0];
-	      i += 1; i0 += 1;
-	    }
-	  i0 += 1;
-	  break;
-	case '<':
-	  i0 += 1;
-	  while (i0 < len && name0[i0] != '>')
-	    {
-	      name[i] = name0[i0];
-	      i += 1; i0 += 1;
-	    }
-	  i0 += 1;
-	  break;
-	}
-    }
-  name[i] = '\000';
-
-  yylval.ssym.sym = NULL;
-  yylval.ssym.stoken.ptr = name;
-  yylval.ssym.stoken.length = i;
-  return NAME;
-}
-
-static void 
-block_lookup (name, err_name)
-     char* name;
-     char* err_name;
-{
-  struct symbol** syms;
-  struct block** blocks;
-  int nsyms;
-  struct symtab *symtab;
-  nsyms = ada_lookup_symbol_list (name, left_block_context,
-				  VAR_NAMESPACE, &syms, &blocks);
-  if (left_block_context == NULL &&
-      (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK))
-    symtab = lookup_symtab (name);
-  else
-    symtab = NULL;
-
-  if (symtab != NULL)
-    left_block_context = yylval.bval =
-      BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
-  else if (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK)
-    {
-      if (left_block_context == NULL)
-	error ("No file or function \"%s\".", err_name);
-      else
-	error ("No function \"%s\" in specified context.", err_name);
-    }
-  else 
-    {
-      left_block_context = yylval.bval = SYMBOL_BLOCK_VALUE (syms[0]); 
-      if (nsyms > 1)
-	warning ("Function name \"%s\" ambiguous here", err_name);
-    }
-}
-
-/* Look up NAME0 (assumed to be mangled) as a name in VAR_NAMESPACE,
-   setting *TOKEN_TYPE to NAME or TYPENAME, depending on what is
-   found.  Try first the entire name, then the name without the last 
-   segment (i.e., after the last .id), etc., and return the number of
-   segments that had to be removed to get a match.  Calls error if no
-   matches are found, using ERR_NAME in any error message.  When
-   exactly one symbol match is found, it is placed in yylval. */
- 
-static int
-name_lookup (name0, err_name, token_type)
-     char* name0;
-     char* err_name;
-     int* token_type;
-{
-  struct symbol** syms;
-  struct block** blocks;
-  struct type* type;
-  int len0 = strlen (name0);
-  char* name = savestring (name0, len0);
-  int nsyms;
-  int segments;
- 
-/*  add_name_string_cleanup (name);*/
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
-  yylval.ssym.stoken.ptr = name;
-  yylval.ssym.stoken.length = strlen (name);
-  for (segments = 0; ; segments += 1)
-    {
-      struct type* preferred_type;
-      int i, preferred_index;
-
-      if (left_block_context == NULL) 
-	nsyms = ada_lookup_symbol_list (name, expression_context_block, 
-					VAR_NAMESPACE, &syms, &blocks);
-      else
-	nsyms = ada_lookup_symbol_list (name, left_block_context, 
-					VAR_NAMESPACE, &syms, &blocks);
-
-      /* Check for a type definition. */
-
-      /* Look for a symbol that doesn't denote void.  This is (I think) a */
-      /* temporary kludge to get around problems in GNAT output. */
-      preferred_index = -1; preferred_type = NULL;
-      for (i = 0; i < nsyms; i += 1)
-	switch (SYMBOL_CLASS (syms[i])) 
-	  {
-	  case LOC_TYPEDEF:
-	    if (ada_prefer_type (SYMBOL_TYPE (syms[i]), preferred_type))
-	      {
-		preferred_index = i;
-		preferred_type = SYMBOL_TYPE (syms[i]);
-	      }
-	    break;
-	  case LOC_REGISTER:
-	  case LOC_ARG:
-	  case LOC_REF_ARG:
-	  case LOC_REGPARM:
-	  case LOC_REGPARM_ADDR:
-	  case LOC_LOCAL:
-	  case LOC_LOCAL_ARG:
-	  case LOC_BASEREG:
-	  case LOC_BASEREG_ARG:
-	    goto NotType;
-	  default:
-	    break;
-	  }
-      if (preferred_type != NULL)
-	{
-/*	  if (TYPE_CODE (preferred_type) == TYPE_CODE_VOID)
-	    error ("`%s' matches only void type name(s)", 
-		   ada_demangle (name));
-*/
-/* FIXME: ada_demangle should be defined in defs.h, and is located in ada-lang.c */
-/*	  else*/ if (ada_is_object_renaming (syms[preferred_index]))
-	    {
-	      yylval.ssym.sym = syms[preferred_index];
-	      *token_type = OBJECT_RENAMING;
-	      return segments;
-	    } 
-	  else if (ada_renaming_type (SYMBOL_TYPE (syms[preferred_index])) 
-                   != NULL)
-	    {
-	      int result;
-	      const char* renaming = 
-		ada_simple_renamed_entity (syms[preferred_index]);
-	      char* new_name = xmalloc (strlen (renaming) + len0 
-					- yylval.ssym.stoken.length + 1);
-/*	      add_name_string_cleanup (new_name);*/
-/* FIXME: add_name_string_cleanup should be defined in parse.c */
-	      strcpy (new_name, renaming);
-	      strcat (new_name, name0 + yylval.ssym.stoken.length);
-	      result = name_lookup (new_name, err_name, token_type);
-	      if (result > segments) 
-		error ("Confused by renamed symbol.");
-	      return result;
-	    }
-	  else if (segments == 0)
-	    {
-	      yylval.tval = preferred_type;
-	      *token_type = TYPENAME;
-	      return 0;
-	    } 
-	}
-
-      if (segments == 0)
-	{
-	  type = lookup_primitive_typename (name);
-	  if (type == NULL && STREQ ("system__address", name))
-	    type = builtin_type_ada_system_address;
-	  if (type != NULL)
-	    {
-	      yylval.tval = type;
-	      *token_type = TYPENAME;
-	      return 0;
-	    }
-	}
-
-    NotType:
-      if (nsyms == 1) 
-	{
-	  *token_type = NAME;
-	  yylval.ssym.sym = syms[0];
-	  yylval.ssym.msym = NULL;
-	  yylval.ssym.block = blocks[0];
-	  return segments;
-	}
-      else if (nsyms == 0) {
-	int i;
-	yylval.ssym.msym = ada_lookup_minimal_symbol (name);
-	if (yylval.ssym.msym != NULL)
-	  {
-	    yylval.ssym.sym = NULL;
-	    yylval.ssym.block = NULL;
-            *token_type = NAME;
-	    return segments;
-	  }
-
-	for (i = yylval.ssym.stoken.length - 1; i > 0; i -= 1)
-	  {
-            if (name[i] == '.')
-	      { 
-		name[i] = '\0';
-		yylval.ssym.stoken.length = i;
-		break;
-	      }
-	    else if (name[i] == '_' && name[i-1] == '_')
-	      {
-		i -= 1;
-		name[i] = '\0';
-		yylval.ssym.stoken.length = i;
-		break;
-	      }
-	  }
-	if (i <= 0) 
-	  {
-	    if (!have_full_symbols () && !have_partial_symbols ()
-		&& left_block_context == NULL)
-	      error ("No symbol table is loaded.  Use the \"file\" command.");
-	    if (left_block_context == NULL)
-	      error ("No definition of \"%s\" in current context.", 
-		     err_name);
-	    else
-	      error ("No definition of \"%s\" in specified context.", 
-		     err_name);
-	  }
-      }
-      else 
-	{
-	  *token_type = NAME;
-	  yylval.ssym.sym = NULL;
-	  yylval.ssym.msym = NULL;
-	  if (left_block_context == NULL)
-	    yylval.ssym.block = expression_context_block;
-	  else
-	    yylval.ssym.block = left_block_context;
-	  return segments;
-	}
-    }
-}
-
-/* Returns the position within STR of the '.' in a
-   '.{WHITE}*all' component of a dotted name, or -1 if there is none. */
-static int
-find_dot_all (str)
-     const char* str;
-{
-  int i;
-  for (i = 0; str[i] != '\000'; i += 1)
-    {
-      if (str[i] == '.')
-	{
-	  int i0 = i;
-	  do 
-	    i += 1;
-	  while (isspace (str[i]));
-	  if (strcmp (str+i, "all") == 0
-	      && ! isalnum (str[i+3]) && str[i+3] != '_')
-	    return i0;
-	}
-    }
-  return -1;
-}    
-
-/* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring
-   case. */
-
-static int
-subseqMatch (subseq, str)
-     const char* subseq;
-     const char* str;
-{
-  if (subseq[0] == '\0')
-    return 1;
-  else if (str[0] == '\0')
-    return 0;
-  else if (tolower (subseq[0]) == tolower (str[0]))
-    return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1);
-  else
-    return subseqMatch (subseq, str+1);
-}
-  
-
-static struct { const char* name; int code; } 
-attributes[] = {
-  { "address", TICK_ADDRESS },
-  { "unchecked_access", TICK_ACCESS },
-  { "unrestricted_access", TICK_ACCESS },
-  { "access", TICK_ACCESS },
-  { "first", TICK_FIRST },
-  { "last", TICK_LAST },
-  { "length", TICK_LENGTH },
-  { "max", TICK_MAX },
-  { "min", TICK_MIN },
-  { "modulus", TICK_MODULUS },
-  { "pos", TICK_POS },
-  { "range", TICK_RANGE },
-  { "size", TICK_SIZE },
-  { "tag", TICK_TAG },
-  { "val", TICK_VAL },
-  { NULL, -1 }
-};
-
-/* Return the syntactic code corresponding to the attribute name or
-   abbreviation STR.  */
-
-static int
-processAttribute (str)
-     const char* str;
-{
-  int i, k;
-
-  for (i = 0; attributes[i].code != -1; i += 1)
-    if (strcasecmp (str, attributes[i].name) == 0)
-      return attributes[i].code;
-
-  for (i = 0, k = -1; attributes[i].code != -1; i += 1)
-    if (subseqMatch (str, attributes[i].name)) 
-      {
-	if (k == -1)
-	  k = i;
-	else 
-	  error ("ambiguous attribute name: `%s'", str);
-      }
-  if (k == -1)
-    error ("unrecognized attribute: `%s'", str);
-
-  return attributes[k].code;
-}
-
-int
-yywrap()
-{
-  return 1;
-}
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 23dc105..eccd5a1 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -14,9 +14,9 @@
 
 */
 
-#include <ctype.h> 
-#include "defs.h" 
-#include "command.h" 
+#include <ctype.h>
+#include "defs.h"
+#include "command.h"
 #include "value.h"
 #include "language.h"
 #include "inferior.h"
@@ -30,7 +30,7 @@
 
 #if (defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET))
 #include "gregset.h"
-#endif 
+#endif
 
 #include "ada-lang.h"
 
@@ -71,10 +71,10 @@
 #elif defined (sun) && defined (__SVR4)
 #define GET_CURRENT_THREAD solaris_thread_get_current_thread
 #define THREAD_FETCH_REGISTERS() (-1)
-extern void *GET_CURRENT_THREAD();
+extern void *GET_CURRENT_THREAD ();
 
 #elif defined (_AIX) || (defined(__alpha__) && defined(__osf__))
-extern void *GET_CURRENT_THREAD();
+extern void *GET_CURRENT_THREAD ();
 
 #elif defined (__WIN32__) || defined (hpux)
 #define GET_CURRENT_THREAD() (inferior_pid)
@@ -90,7 +90,7 @@
 #define READ_MEMORY(addr, var) read_memory (addr, (char*) &var, sizeof (var))
 /* external declarations */
 
-extern struct value* find_function_in_inferior (char *);
+extern struct value *find_function_in_inferior (char *);
 
 /* Global visible variables */
 
@@ -110,8 +110,7 @@
 int current_task = -1, current_task_id = -1, current_task_index;
 void *current_thread, *current_lwp;
 
-char *ada_task_states[] =
-{
+char *ada_task_states[] = {
   "Unactivated",
   "Runnable",
   "Terminated",
@@ -131,8 +130,7 @@
 
 /* Global internal types */
 
-static char *ada_long_task_states[] =
-{
+static char *ada_long_task_states[] = {
   "Unactivated",
   "Runnable",
   "Terminated",
@@ -153,18 +151,17 @@
 /* Global internal variables */
 
 static int highest_task_num = 0;
-int thread_support = 0; /* 1 if the thread library in use is supported */
+int thread_support = 0;		/* 1 if the thread library in use is supported */
 static int gdbtk_task_initialization = 0;
 
-static int add_task_entry (p_task_id, index)
-     void *p_task_id;
-     int index;
+static int
+add_task_entry (void *p_task_id, int index)
 {
   struct task_entry *new_task_entry = NULL;
   struct task_entry *pt;
 
   highest_task_num++;
-  new_task_entry = malloc (sizeof (struct task_entry));
+  new_task_entry = xmalloc (sizeof (struct task_entry));
   new_task_entry->task_num = highest_task_num;
   new_task_entry->task_id = p_task_id;
   new_task_entry->known_tasks_index = index;
@@ -177,13 +174,13 @@
       pt->next_task = new_task_entry;
       pt->stack_per = 0;
     }
-  else task_list = new_task_entry;
+  else
+    task_list = new_task_entry;
   return new_task_entry->task_num;
 }
 
-int 
-get_entry_number (p_task_id)
-     void *p_task_id;
+int
+get_entry_number (void *p_task_id)
 {
   struct task_entry *pt;
 
@@ -197,8 +194,8 @@
   return 0;
 }
 
-static struct task_entry *get_thread_entry_vptr (thread)
-     void *thread;
+static struct task_entry *
+get_thread_entry_vptr (void *thread)
 {
   struct task_entry *pt;
 
@@ -206,14 +203,14 @@
   while (pt != NULL)
     {
       if (pt->thread == thread)
-      return pt;
+	return pt;
       pt = pt->next_task;
     }
   return 0;
 }
 
-static struct task_entry *get_entry_vptr (p_task_num)
-     int p_task_num;
+static struct task_entry *
+get_entry_vptr (int p_task_num)
 {
   struct task_entry *pt;
 
@@ -227,7 +224,8 @@
   return NULL;
 }
 
-void init_task_list ()
+void
+init_task_list (void)
 {
   struct task_entry *pt, *old_pt;
 
@@ -236,21 +234,22 @@
     {
       old_pt = pt;
       pt = pt->next_task;
-      free (old_pt);
+      xfree (old_pt);
     };
   task_list = NULL;
   highest_task_num = 0;
 }
 
-int valid_task_id (task)
-     int task;
+int
+valid_task_id (int task)
 {
   return get_entry_vptr (task) != NULL;
 }
 
-void *get_self_id ()
+void *
+get_self_id (void)
 {
-  struct value* val;
+  struct value *val;
   void *self_id;
   int result;
   struct task_entry *ent;
@@ -270,10 +269,11 @@
   return NULL;
 }
 
-int get_current_task ()
+int
+get_current_task ()
 {
   int result;
-  
+
   /* FIXME: language_ada should be defined in defs.h */
   /*  if (current_language->la_language != language_ada) return -1; */
 
@@ -286,31 +286,29 @@
 /* Print detailed information about specified task */
 
 static void
-info_task (arg, from_tty)
-     char *arg;
-     int from_tty;
+info_task (char *arg, int from_tty)
 {
   void *temp_task;
   struct task_entry *pt, *pt2;
   void *self_id, *caller;
   struct task_fields atcb, atcb2;
   struct entry_call call;
-  int bounds [2];
-  char image [256];
+  int bounds[2];
+  char image[256];
   int num;
 
   /* FIXME: language_ada should be defined in defs.h */
   /*  if (current_language->la_language != language_ada) 
-    { 
-      printf_filtered ("The current language does not support tasks.\n"); 
-      return; 
-    } 
-  */
+     { 
+     printf_filtered ("The current language does not support tasks.\n"); 
+     return; 
+     } 
+   */
   pt = get_entry_vptr (atoi (arg));
   if (pt == NULL)
     {
-      printf_filtered ("Task %s not found.\n", arg); 
-      return; 
+      printf_filtered ("Task %s not found.\n", arg);
+      return;
     }
 
   temp_task = pt->task_id;
@@ -322,14 +320,16 @@
   printf_filtered ("Ada Task: %p\n", temp_task);
 
   /* print the name of the task */
-  if (atcb.image.P_ARRAY != NULL) {
-    READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS), bounds);
-    bounds [1] = EXTRACT_INT (bounds [1]);
-    read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
-                 (char*) &image, bounds [1]);
-    printf_filtered ("Name: %.*s\n", bounds [1], image);
-  }
-  else printf_filtered ("<no name>\n");
+  if (atcb.image.P_ARRAY != NULL)
+    {
+      READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS), bounds);
+      bounds[1] = EXTRACT_INT (bounds[1]);
+      read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
+		   (char *) &image, bounds[1]);
+      printf_filtered ("Name: %.*s\n", bounds[1], image);
+    }
+  else
+    printf_filtered ("<no name>\n");
 
   /* print the thread id */
 
@@ -341,9 +341,9 @@
   if ((long) pt->lwp != 0)
     {
       if ((long) pt->lwp < 65536)
-        printf_filtered ("LWP: %ld\n", (long int) pt->lwp);
+	printf_filtered ("LWP: %ld\n", (long int) pt->lwp);
       else
-        printf_filtered ("LWP: %p\n", pt->lwp);
+	printf_filtered ("LWP: %p\n", pt->lwp);
     }
 
   /* print the parent gdb task id */
@@ -355,16 +355,17 @@
       READ_MEMORY ((CORE_ADDR) pt2->task_id, atcb2);
 
       /* print the name of the task */
-      if (atcb2.image.P_ARRAY != NULL) {
-        READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
-                     bounds);
-        bounds [1] = EXTRACT_INT (bounds [1]);
-        read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
-                     (char*) &image, bounds [1]);
-        printf_filtered (" (%.*s)\n", bounds [1], image);
-      }
+      if (atcb2.image.P_ARRAY != NULL)
+	{
+	  READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
+		       bounds);
+	  bounds[1] = EXTRACT_INT (bounds[1]);
+	  read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
+		       (char *) &image, bounds[1]);
+	  printf_filtered (" (%.*s)\n", bounds[1], image);
+	}
       else
-        printf_filtered ("\n");
+	printf_filtered ("\n");
     }
   else
     printf_filtered ("No parent\n");
@@ -377,11 +378,12 @@
   /* check if this task is accepting a rendezvous */
   if (atcb.call == NULL)
     caller = NULL;
-  else {
-    READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
-    caller = EXTRACT_ADDRESS (call.self);
-  }
- 
+  else
+    {
+      READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
+      caller = EXTRACT_ADDRESS (call.self);
+    }
+
   if (caller != NULL)
     {
       num = get_entry_number (caller);
@@ -393,14 +395,15 @@
 	  READ_MEMORY ((CORE_ADDR) pt2->task_id, atcb2);
 
 	  /* print the name of the task */
-	  if (atcb2.image.P_ARRAY != NULL) {
-	    READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
-                         bounds);
-            bounds [1] = EXTRACT_INT (bounds [1]);
-	    read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
-                         (char*) &image, bounds [1]);
-	    printf_filtered (" (%.*s)\n", bounds [1], image);
-	  }
+	  if (atcb2.image.P_ARRAY != NULL)
+	    {
+	      READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_BOUNDS),
+			   bounds);
+	      bounds[1] = EXTRACT_INT (bounds[1]);
+	      read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb2.image.P_ARRAY),
+			   (char *) &image, bounds[1]);
+	      printf_filtered (" (%.*s)\n", bounds[1], image);
+	    }
 	  else
 	    printf_filtered ("\n");
 	}
@@ -408,7 +411,7 @@
 	printf_filtered ("\n");
     }
   else
-    printf_filtered ("State: %s\n", ada_long_task_states [atcb.state]);
+    printf_filtered ("State: %s\n", ada_long_task_states[atcb.state]);
 }
 
 #if 0
@@ -417,50 +420,57 @@
    tasks_fields structure
  */
 
-print_align ()
+print_align (void)
 {
   struct task_fields tf;
-  void *tf_base             = &(tf);
-  void *tf_state            = &(tf.state);
-  void *tf_entry_num        = &(tf.entry_num);
-  void *tf_parent           = &(tf.parent);
-  void *tf_priority         = &(tf.priority);
+  void *tf_base = &(tf);
+  void *tf_state = &(tf.state);
+  void *tf_entry_num = &(tf.entry_num);
+  void *tf_parent = &(tf.parent);
+  void *tf_priority = &(tf.priority);
   void *tf_current_priority = &(tf.current_priority);
-  void *tf_image            = &(tf.image);
-  void *tf_call             = &(tf.call);
-  void *tf_thread           = &(tf.thread);
-  void *tf_lwp              = &(tf.lwp);
+  void *tf_image = &(tf.image);
+  void *tf_call = &(tf.call);
+  void *tf_thread = &(tf.thread);
+  void *tf_lwp = &(tf.lwp);
   printf_filtered ("\n");
   printf_filtered ("(tf_base = 0x%x)\n", tf_base);
-  printf_filtered ("task_fields.entry_num        at %3d (0x%x)\n", tf_entry_num - tf_base, tf_entry_num);
-  printf_filtered ("task_fields.state            at %3d (0x%x)\n", tf_state - tf_base, tf_state);
-  printf_filtered ("task_fields.parent           at %3d (0x%x)\n", tf_parent - tf_base, tf_parent);
-  printf_filtered ("task_fields.priority         at %3d (0x%x)\n", tf_priority - tf_base, tf_priority);
-  printf_filtered ("task_fields.current_priority at %3d (0x%x)\n", tf_current_priority - tf_base, tf_current_priority);
-  printf_filtered ("task_fields.image            at %3d (0x%x)\n", tf_image - tf_base, tf_image);
-  printf_filtered ("task_fields.call             at %3d (0x%x)\n", tf_call - tf_base, tf_call);
-  printf_filtered ("task_fields.thread           at %3d (0x%x)\n", tf_thread - tf_base, tf_thread);
-  printf_filtered ("task_fields.lwp              at %3d (0x%x)\n", tf_lwp - tf_base, tf_lwp);
-  printf_filtered ("\n"); 
+  printf_filtered ("task_fields.entry_num        at %3d (0x%x)\n",
+		   tf_entry_num - tf_base, tf_entry_num);
+  printf_filtered ("task_fields.state            at %3d (0x%x)\n",
+		   tf_state - tf_base, tf_state);
+  printf_filtered ("task_fields.parent           at %3d (0x%x)\n",
+		   tf_parent - tf_base, tf_parent);
+  printf_filtered ("task_fields.priority         at %3d (0x%x)\n",
+		   tf_priority - tf_base, tf_priority);
+  printf_filtered ("task_fields.current_priority at %3d (0x%x)\n",
+		   tf_current_priority - tf_base, tf_current_priority);
+  printf_filtered ("task_fields.image            at %3d (0x%x)\n",
+		   tf_image - tf_base, tf_image);
+  printf_filtered ("task_fields.call             at %3d (0x%x)\n",
+		   tf_call - tf_base, tf_call);
+  printf_filtered ("task_fields.thread           at %3d (0x%x)\n",
+		   tf_thread - tf_base, tf_thread);
+  printf_filtered ("task_fields.lwp              at %3d (0x%x)\n",
+		   tf_lwp - tf_base, tf_lwp);
+  printf_filtered ("\n");
 }
 #endif
 
 /* Print information about currently known tasks */
 
 static void
-info_tasks (arg, from_tty)
-     char *arg;
-     int from_tty;
+info_tasks (char *arg, int from_tty)
 {
-  struct value* val;
+  struct value *val;
   int i, task_number, state;
-  void *temp_task, *temp_tasks [MAX_NUMBER_OF_KNOWN_TASKS];
+  void *temp_task, *temp_tasks[MAX_NUMBER_OF_KNOWN_TASKS];
   struct task_entry *pt;
-  void *self_id, *caller, *thread_id=NULL;
+  void *self_id, *caller, *thread_id = NULL;
   struct task_fields atcb;
   struct entry_call call;
-  int bounds [2];
-  char image [256];
+  int bounds[2];
+  char image[256];
   int size;
   char car;
 
@@ -478,7 +488,7 @@
 
   task_number = 0;
 
-  if (PIDGET(inferior_ptid) == 0)
+  if (PIDGET (inferior_ptid) == 0)
     {
       printf_filtered ("The program is not being run under gdb. ");
       printf_filtered ("Use 'run' or 'attach' first.\n");
@@ -498,7 +508,7 @@
 	known_tasks_addr = (void *) SYMBOL_VALUE_ADDRESS (msym);
       else
 #ifndef VXWORKS_TARGET
-	return; 
+	return;
 #else
 	{
 	  if (target_lookup_symbol (KNOWN_TASKS_NAME, &known_tasks_addr) != 0)
@@ -523,28 +533,29 @@
 
   READ_MEMORY ((CORE_ADDR) known_tasks_addr, temp_tasks);
 
-  for (i=0; i<MAX_NUMBER_OF_KNOWN_TASKS; i++)
+  for (i = 0; i < MAX_NUMBER_OF_KNOWN_TASKS; i++)
     {
       temp_task = EXTRACT_ADDRESS (temp_tasks[i]);
 
       if (temp_task != NULL)
-        {
-          task_number = get_entry_number (temp_task);
-          if (task_number == 0)
+	{
+	  task_number = get_entry_number (temp_task);
+	  if (task_number == 0)
 	    task_number = add_task_entry (temp_task, i);
-        }
-    }      
+	}
+    }
 
   /* Return without printing anything if this function was called in
      order to init GDBTK tasking. */
 
-  if (init_only) return;
+  if (init_only)
+    return;
 
   /* print the header */
 
 #if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
   printf_filtered
-   ("  ID       TID P-ID Pri Stack  %% State                  Name\n");
+    ("  ID       TID P-ID Pri Stack  %% State                  Name\n");
 #else
   printf_filtered ("  ID       TID P-ID Pri State                  Name\n");
 #endif
@@ -583,15 +594,15 @@
       printf_filtered (" %9lx", (long) temp_task);
 #else
 #ifdef TARGET_64
-      printf_filtered (" %#9lx", (unsigned long)pt->thread & 0x3ffffffffff);
+      printf_filtered (" %#9lx", (unsigned long) pt->thread & 0x3ffffffffff);
 #else
-      printf_filtered (" %#9lx", (long)pt->thread);
+      printf_filtered (" %#9lx", (long) pt->thread);
 #endif
 #endif
 
       /* print the parent gdb task id */
       printf_filtered
-        (" %4d", get_entry_number (EXTRACT_ADDRESS (atcb.parent)));
+	(" %4d", get_entry_number (EXTRACT_ADDRESS (atcb.parent)));
 
       /* print the base priority of the task */
       printf_filtered (" %3d", EXTRACT_INT (atcb.priority));
@@ -599,39 +610,41 @@
 #if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
       if (pt->task_num == 1 || atcb.state == Terminated)
 	{
-          printf_filtered ("  Unknown");
+	  printf_filtered ("  Unknown");
 	  goto next;
 	}
 
-      read_memory ((CORE_ADDR)atcb.thread, &thr, sizeof (thr));
+      read_memory ((CORE_ADDR) atcb.thread, &thr, sizeof (thr));
       current_thread = atcb.thread;
-      regs.regs [SP_REGNUM] = 0;
-      if (dec_thread_get_registers (&regs, NULL) == 0) {
-	pt->stack_per = (100 * ((long)thr.__stack_base -
-	regs.regs [SP_REGNUM])) / thr.__stack_size;
-	/* if the thread is terminated but still there, the
-	stack_base/size values are erroneous. Try to patch it */
-	if (pt->stack_per < 0 || pt->stack_per > 100) pt->stack_per = 0;
-      }
+      regs.regs[SP_REGNUM] = 0;
+      if (dec_thread_get_registers (&regs, NULL) == 0)
+	{
+	  pt->stack_per = (100 * ((long) thr.__stack_base -
+				  regs.regs[SP_REGNUM])) / thr.__stack_size;
+	  /* if the thread is terminated but still there, the
+	     stack_base/size values are erroneous. Try to patch it */
+	  if (pt->stack_per < 0 || pt->stack_per > 100)
+	    pt->stack_per = 0;
+	}
 
       /* print information about stack space used in the thread */
-      if (thr.__stack_size < 1024*1024)
+      if (thr.__stack_size < 1024 * 1024)
 	{
 	  size = thr.__stack_size / 1024;
 	  car = 'K';
 	}
-      else if (thr.__stack_size < 1024*1024*1024)
+      else if (thr.__stack_size < 1024 * 1024 * 1024)
 	{
 	  size = thr.__stack_size / 1024 / 1024;
 	  car = 'M';
 	}
-      else /* Who knows... */
+      else			/* Who knows... */
 	{
 	  size = thr.__stack_size / 1024 / 1024 / 1024;
 	  car = 'G';
 	}
       printf_filtered (" %4d%c %2d", size, car, pt->stack_per);
-next:
+    next:
 #endif
 
       /* print the current state of the task */
@@ -639,13 +652,15 @@
       /* check if this task is accepting a rendezvous */
       if (atcb.call == NULL)
 	caller = NULL;
-      else {
-	READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
-	caller = EXTRACT_ADDRESS (call.self);
-      }
- 
+      else
+	{
+	  READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.call), call);
+	  caller = EXTRACT_ADDRESS (call.self);
+	}
+
       if (caller != NULL)
-	printf_filtered (" Accepting RV with %-4d", get_entry_number (caller));
+	printf_filtered (" Accepting RV with %-4d",
+			 get_entry_number (caller));
       else
 	{
 	  state = atcb.state;
@@ -657,18 +672,21 @@
 	    /* Replace "Runnable" by "Running" if this is the current task */
 	    printf_filtered (" %-22s", "Running");
 	  else
-	    printf_filtered (" %-22s", ada_task_states [state]);
+	    printf_filtered (" %-22s", ada_task_states[state]);
 	}
 
       /* finally, print the name of the task */
-      if (atcb.image.P_ARRAY != NULL) {
-        READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS), bounds);
-        bounds [1] = EXTRACT_INT (bounds [1]);
-        read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
-                     (char*)&image, bounds [1]);
-        printf_filtered (" %.*s\n", bounds [1], image);
-      }
-      else printf_filtered (" <no name>\n");
+      if (atcb.image.P_ARRAY != NULL)
+	{
+	  READ_MEMORY ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_BOUNDS),
+		       bounds);
+	  bounds[1] = EXTRACT_INT (bounds[1]);
+	  read_memory ((CORE_ADDR) EXTRACT_ADDRESS (atcb.image.P_ARRAY),
+		       (char *) &image, bounds[1]);
+	  printf_filtered (" %.*s\n", bounds[1], image);
+	}
+      else
+	printf_filtered (" <no name>\n");
 
       pt = pt->next_task;
     }
@@ -679,7 +697,7 @@
    actually print anything. */
 
 int
-gdbtk_tcl_tasks_initialize ()
+gdbtk_tcl_tasks_initialize (void)
 {
   gdbtk_task_initialization = 1;
   info_tasks ("", gdb_stdout);
@@ -688,21 +706,18 @@
 }
 
 static void
-info_tasks_command (arg, from_tty)
-     char *arg;
-     int from_tty;
+info_tasks_command (char *arg, int from_tty)
 {
-   if (arg == NULL || *arg == '\000')
-      info_tasks (arg, from_tty);
-   else
-      info_task (arg, from_tty);
+  if (arg == NULL || *arg == '\000')
+    info_tasks (arg, from_tty);
+  else
+    info_task (arg, from_tty);
 }
 
 /* Switch from one thread to another. */
 
 static void
 switch_to_thread (ptid_t ptid)
-
 {
   if (ptid_equal (ptid, inferior_ptid))
     return;
@@ -716,8 +731,8 @@
 
 /* Switch to a specified task. */
 
-static int task_switch (tid, lwpid)
-     void *tid, *lwpid;
+static int
+task_switch (void *tid, void *lwpid)
 {
   int res = 0, pid;
 
@@ -737,7 +752,8 @@
 #endif
 	}
 
-      if (res == 0) stop_pc = read_pc();
+      if (res == 0)
+	stop_pc = read_pc ();
       select_frame (get_current_frame ());
       return res;
     }
@@ -745,23 +761,22 @@
   return -1;
 }
 
-static void task_command (tidstr, from_tty)
-     char *tidstr;
-     int from_tty;
+static void
+task_command (char *tidstr, int from_tty)
 {
   int num;
   struct task_entry *e;
 
   if (!tidstr)
     error ("Please specify a task ID.  Use the \"info tasks\" command to\n"
-           "see the IDs of currently known tasks.");
+	   "see the IDs of currently known tasks.");
 
   num = atoi (tidstr);
   e = get_entry_vptr (num);
 
   if (e == NULL)
     error ("Task ID %d not known.  Use the \"info tasks\" command to\n"
-           "see the IDs of currently known tasks.", num);
+	   "see the IDs of currently known tasks.", num);
 
   if (current_task_id == -1)
     {
@@ -779,28 +794,27 @@
   if (task_switch (e->thread, e->lwp) == 0)
     {
       /* FIXME: find_printable_frame should be defined in frame.h, and
-	 implemented in ada-lang.c */
-      /*      find_printable_frame (selected_frame, frame_relative_level (selected_frame));*/
+         implemented in ada-lang.c */
+      /*      find_printable_frame (selected_frame, frame_relative_level (selected_frame)); */
       printf_filtered ("[Switching to task %d]\n", num);
-      print_stack_frame (selected_frame, frame_relative_level (selected_frame), 1);
+      print_stack_frame (selected_frame,
+			 frame_relative_level (selected_frame), 1);
     }
   else
     printf_filtered ("Unable to switch to task %d\n", num);
 }
 
 void
-_initialize_tasks ()
+_initialize_tasks (void)
 {
   static struct cmd_list_element *task_cmd_list = NULL;
   extern struct cmd_list_element *cmdlist;
 
-  add_info (
-        "tasks", info_tasks_command,
-	"Without argument: list all known Ada tasks, with status information.\n"
-	"info tasks n: print detailed information of task n.\n");
+  add_info ("tasks", info_tasks_command,
+	    "Without argument: list all known Ada tasks, with status information.\n"
+	    "info tasks n: print detailed information of task n.\n");
 
   add_prefix_cmd ("task", class_run, task_command,
-                  "Use this command to switch between tasks.\n\
- The new task ID must be currently known.", &task_cmd_list, "task ", 1,
-                  &cmdlist);
+		  "Use this command to switch between tasks.\n\
+ The new task ID must be currently known.", &task_cmd_list, "task ", 1, &cmdlist);
 }
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 6773561..c18aa85 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -18,7 +18,7 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bfd.h"		/* Binary File Description */
 #include "symtab.h"
 #include "gdbtypes.h"
@@ -35,44 +35,45 @@
 #include "ada-lang.h"
 
 #include <ctype.h>
-#include <string.h>
+#include "gdb_string.h"
 #include <errno.h>
 
-static int print_record_field_types (struct type *, struct type *, 
+static int print_record_field_types (struct type *, struct type *,
 				     struct ui_file *, int, int);
 
-static void print_array_type (struct type*, struct ui_file*, int, int);
+static void print_array_type (struct type *, struct ui_file *, int, int);
 
-static void print_choices (struct type*, int, struct ui_file*, struct type*);
+static void print_choices (struct type *, int, struct ui_file *,
+			   struct type *);
 
-static void print_range (struct type*, struct ui_file*);
+static void print_range (struct type *, struct ui_file *);
 
-static void print_range_bound (struct type*, char*, int*, struct ui_file*);
+static void print_range_bound (struct type *, char *, int *,
+			       struct ui_file *);
 
-static void 
-print_dynamic_range_bound (struct type*, const char*, int, 
-			   const char*, struct ui_file*);
+static void
+print_dynamic_range_bound (struct type *, const char *, int,
+			   const char *, struct ui_file *);
 
-static void print_range_type_named (char*, struct ui_file*);
-
+static void print_range_type_named (char *, struct ui_file *);
 
 
-static char* name_buffer;
+
+static char *name_buffer;
 static int name_buffer_len;
 
 /* The (demangled) Ada name of TYPE. This value persists until the
    next call. */
 
-static char*
-demangled_type_name (type)
-     struct type *type;
+static char *
+demangled_type_name (struct type *type)
 {
   if (ada_type_name (type) == NULL)
     return NULL;
-  else 
+  else
     {
-      char* raw_name = ada_type_name (type);
-      char *s, *q; 
+      char *raw_name = ada_type_name (type);
+      char *s, *q;
 
       if (name_buffer == NULL || name_buffer_len <= strlen (raw_name))
 	{
@@ -81,7 +82,7 @@
 	}
       strcpy (name_buffer, raw_name);
 
-      s = (char*) strstr (name_buffer, "___");
+      s = (char *) strstr (name_buffer, "___");
       if (s != NULL)
 	*s = '\0';
 
@@ -92,18 +93,20 @@
       if (s == name_buffer)
 	return name_buffer;
 
-      if (! islower (s[1]))
+      if (!islower (s[1]))
 	return NULL;
 
       for (s = q = name_buffer; *s != '\0'; q += 1)
 	{
 	  if (s[0] == '_' && s[1] == '_')
 	    {
-	      *q = '.'; s += 2;
+	      *q = '.';
+	      s += 2;
 	    }
 	  else
 	    {
-	      *q = *s; s += 1;
+	      *q = *s;
+	      s += 1;
 	    }
 	}
       *q = '\0';
@@ -117,30 +120,26 @@
    NEW is the new name for a type TYPE. */
 
 void
-ada_typedef_print (type, new, stream)
-   struct type *type;
-   struct symbol *new;
-   struct ui_file *stream;
+ada_typedef_print (struct type *type, struct symbol *new,
+		   struct ui_file *stream)
 {
-  fprintf_filtered (stream, "type %.*s is ", 
-		    ada_name_prefix_len (SYMBOL_SOURCE_NAME(new)), 
-		    SYMBOL_SOURCE_NAME(new));
+  fprintf_filtered (stream, "type %.*s is ",
+		    ada_name_prefix_len (SYMBOL_SOURCE_NAME (new)),
+		    SYMBOL_SOURCE_NAME (new));
   type_print (type, "", stream, 1);
 }
 
 /* Print range type TYPE on STREAM. */
 
 static void
-print_range (type, stream)
-     struct type* type;
-     struct ui_file* stream;
+print_range (struct type *type, struct ui_file *stream)
 {
-  struct type* target_type;
+  struct type *target_type;
   target_type = TYPE_TARGET_TYPE (type);
   if (target_type == NULL)
     target_type = type;
 
-  switch (TYPE_CODE (target_type)) 
+  switch (TYPE_CODE (target_type))
     {
     case TYPE_CODE_RANGE:
     case TYPE_CODE_INT:
@@ -162,8 +161,8 @@
          Note that if the name is not defined, then we don't print anything.
        */
       fprintf_filtered (stream, "%.*s",
-                        ada_name_prefix_len (TYPE_NAME (type)),
-                        TYPE_NAME (type));
+			ada_name_prefix_len (TYPE_NAME (type)),
+			TYPE_NAME (type));
     }
   else
     {
@@ -171,7 +170,7 @@
          and the last element of the type->fields array */
       const LONGEST lower_bound = (LONGEST) TYPE_LOW_BOUND (type);
       const LONGEST upper_bound =
-        (LONGEST) TYPE_FIELD_BITPOS (type, TYPE_NFIELDS (type) -1);
+	(LONGEST) TYPE_FIELD_BITPOS (type, TYPE_NFIELDS (type) - 1);
 
       ada_print_scalar (target_type, lower_bound, stream);
       fprintf_filtered (stream, " .. ");
@@ -183,11 +182,8 @@
    set *N past the bound and its delimiter, if any. */
 
 static void
-print_range_bound (type, bounds, n, stream)
-     struct type* type;
-     char* bounds;
-     int* n;
-     struct ui_file* stream;
+print_range_bound (struct type *type, char *bounds, int *n,
+		   struct ui_file *stream)
 {
   LONGEST B;
   if (ada_scan_number (bounds, *n, &B, n))
@@ -199,13 +195,13 @@
   else
     {
       int bound_len;
-      char* bound = bounds + *n;
-      char* pend;
+      char *bound = bounds + *n;
+      char *pend;
 
       pend = strstr (bound, "__");
       if (pend == NULL)
 	*n += bound_len = strlen (bound);
-      else 
+      else
 	{
 	  bound_len = pend - bound;
 	  *n += bound_len + 2;
@@ -219,12 +215,8 @@
    "___U") according to the ___XD conventions. */
 
 static void
-print_dynamic_range_bound (type, name, name_len, suffix, stream)
-     struct type* type;
-     const char* name;
-     int name_len;
-     const char* suffix;
-     struct ui_file* stream;
+print_dynamic_range_bound (struct type *type, const char *name, int name_len,
+			   const char *suffix, struct ui_file *stream)
 {
   static char *name_buf = NULL;
   static size_t name_buf_len = 0;
@@ -245,14 +237,12 @@
 /* Print the range type named NAME. */
 
 static void
-print_range_type_named (name, stream)
-     char* name;
-     struct ui_file* stream;
+print_range_type_named (char *name, struct ui_file *stream)
 {
   struct type *raw_type = ada_find_any_type (name);
   struct type *base_type;
   LONGEST low, high;
-  char* subtype_info;
+  char *subtype_info;
 
   if (raw_type == NULL)
     base_type = builtin_type_int;
@@ -276,29 +266,29 @@
       bounds_str = strchr (subtype_info, '_');
       n = 1;
 
-      if (*subtype_info == 'L') 
+      if (*subtype_info == 'L')
 	{
 	  print_range_bound (raw_type, bounds_str, &n, stream);
 	  subtype_info += 1;
 	}
       else
-	print_dynamic_range_bound (raw_type, name, prefix_len, "___L", stream);
+	print_dynamic_range_bound (raw_type, name, prefix_len, "___L",
+				   stream);
 
       fprintf_filtered (stream, " .. ");
 
-      if (*subtype_info == 'U') 
+      if (*subtype_info == 'U')
 	print_range_bound (raw_type, bounds_str, &n, stream);
       else
-	print_dynamic_range_bound (raw_type, name, prefix_len, "___U", stream);
+	print_dynamic_range_bound (raw_type, name, prefix_len, "___U",
+				   stream);
     }
-}  
+}
 
 /* Print enumerated type TYPE on STREAM. */
 
 static void
-print_enum_type (type, stream)
-     struct type *type;
-     struct ui_file *stream;
+print_enum_type (struct type *type, struct ui_file *stream)
 {
   int len = TYPE_NFIELDS (type);
   int i, lastval;
@@ -310,7 +300,8 @@
   for (i = 0; i < len; i++)
     {
       QUIT;
-      if (i) fprintf_filtered (stream, ", ");
+      if (i)
+	fprintf_filtered (stream, ", ");
       wrap_here ("    ");
       fputs_filtered (ada_enum_name (TYPE_FIELD_NAME (type, i)), stream);
       if (lastval != TYPE_FIELD_BITPOS (type, i))
@@ -326,9 +317,7 @@
 /* Print representation of Ada fixed-point type TYPE on STREAM. */
 
 static void
-print_fixed_point_type (type, stream)
-     struct type *type;
-     struct ui_file *stream;
+print_fixed_point_type (struct type *type, struct ui_file *stream)
 {
   DOUBLEST delta = ada_delta (type);
   DOUBLEST small = ada_fixed_to_float (type, 1.0);
@@ -338,7 +327,7 @@
   else
     {
       fprintf_filtered (stream, "delta %g", (double) delta);
-      if (delta != small) 
+      if (delta != small)
 	fprintf_filtered (stream, " <'small = %g>", (double) small);
     }
 }
@@ -346,9 +335,7 @@
 /* Print representation of special VAX floating-point type TYPE on STREAM. */
 
 static void
-print_vax_floating_point_type (type, stream)
-     struct type *type;
-     struct ui_file *stream;
+print_vax_floating_point_type (struct type *type, struct ui_file *stream)
 {
   fprintf_filtered (stream, "<float format %c>",
 		    ada_vax_float_type_suffix (type));
@@ -360,11 +347,8 @@
    structure to show (see ada_print_type). */
 
 static void
-print_array_type (type, stream, show, level)
-     struct type *type;
-     struct ui_file *stream;
-     int show;
-     int level;
+print_array_type (struct type *type, struct ui_file *stream, int show,
+		  int level)
 {
   int bitsize;
   int n_indices;
@@ -373,17 +357,17 @@
   fprintf_filtered (stream, "array (");
 
   n_indices = -1;
-  if (show < 0) 
+  if (show < 0)
     fprintf_filtered (stream, "...");
   else
     {
       if (ada_is_packed_array_type (type))
 	type = ada_coerce_to_simple_array_type (type);
-      if (ada_is_simple_array (type)) 
+      if (ada_is_simple_array (type))
 	{
-	  struct type* range_desc_type = 
+	  struct type *range_desc_type =
 	    ada_find_parallel_type (type, "___XA");
-	  struct type* arr_type;
+	  struct type *arr_type;
 
 	  bitsize = 0;
 	  if (range_desc_type == NULL)
@@ -398,24 +382,24 @@
 		    bitsize = TYPE_FIELD_BITSIZE (arr_type, 0);
 		}
 	    }
-	  else 
+	  else
 	    {
 	      int k;
-	      n_indices = TYPE_NFIELDS (range_desc_type); 
-	      for (k = 0, arr_type = type; 
+	      n_indices = TYPE_NFIELDS (range_desc_type);
+	      for (k = 0, arr_type = type;
 		   k < n_indices;
 		   k += 1, arr_type = TYPE_TARGET_TYPE (arr_type))
 		{
 		  if (k > 0)
 		    fprintf_filtered (stream, ", ");
-		  print_range_type_named (TYPE_FIELD_NAME (range_desc_type, k),
-					  stream);
+		  print_range_type_named (TYPE_FIELD_NAME
+					  (range_desc_type, k), stream);
 		  if (TYPE_FIELD_BITSIZE (arr_type, 0) > 0)
 		    bitsize = TYPE_FIELD_BITSIZE (arr_type, 0);
-		}		  
+		}
 	    }
 	}
-      else 
+      else
 	{
 	  int i, i0;
 	  for (i = i0 = ada_array_arity (type); i > 0; i -= 1)
@@ -425,8 +409,8 @@
 
   fprintf_filtered (stream, ") of ");
   wrap_here ("");
-  ada_print_type (ada_array_element_type (type, n_indices), "", stream, 
-		  show == 0 ? 0 : show-1, level+1);
+  ada_print_type (ada_array_element_type (type, n_indices), "", stream,
+		  show == 0 ? 0 : show - 1, level + 1);
   if (bitsize > 0)
     fprintf_filtered (stream, " <packed: %d-bit elements>", bitsize);
 }
@@ -435,22 +419,19 @@
    STREAM, assuming the VAL_TYPE is the type of the values. */
 
 static void
-print_choices (type, field_num, stream, val_type)
-     struct type *type;
-     int field_num;
-     struct ui_file *stream;
-     struct type *val_type;
+print_choices (struct type *type, int field_num, struct ui_file *stream,
+	       struct type *val_type)
 {
   int have_output;
   int p;
-  const char* name = TYPE_FIELD_NAME (type, field_num);
+  const char *name = TYPE_FIELD_NAME (type, field_num);
 
   have_output = 0;
 
   /* Skip over leading 'V': NOTE soon to be obsolete. */
   if (name[0] == 'V')
     {
-      if (! ada_scan_number (name, 1, NULL, &p))
+      if (!ada_scan_number (name, 1, NULL, &p))
 	goto Huh;
     }
   else
@@ -458,25 +439,25 @@
 
   while (1)
     {
-      switch (name[p]) 
+      switch (name[p])
 	{
 	default:
 	  return;
 	case 'S':
 	case 'R':
 	case 'O':
-	  if (have_output) 
+	  if (have_output)
 	    fprintf_filtered (stream, " | ");
 	  have_output = 1;
 	  break;
 	}
 
-      switch (name[p]) 
+      switch (name[p])
 	{
 	case 'S':
 	  {
 	    LONGEST W;
-	    if (! ada_scan_number (name, p + 1, &W, &p))
+	    if (!ada_scan_number (name, p + 1, &W, &p))
 	      goto Huh;
 	    ada_print_scalar (val_type, W, stream);
 	    break;
@@ -484,9 +465,8 @@
 	case 'R':
 	  {
 	    LONGEST L, U;
-	    if (! ada_scan_number (name, p + 1, &L, &p)
-		|| name[p] != 'T'
-		|| ! ada_scan_number (name, p + 1, &U, &p))
+	    if (!ada_scan_number (name, p + 1, &L, &p)
+		|| name[p] != 'T' || !ada_scan_number (name, p + 1, &U, &p))
 	      goto Huh;
 	    ada_print_scalar (val_type, L, stream);
 	    fprintf_filtered (stream, " .. ");
@@ -515,13 +495,9 @@
    immediately outside the variant part. */
 
 static void
-print_variant_clauses (type, field_num, outer_type, stream, show, level)
-     struct type *type;
-     int field_num;
-     struct type *outer_type;
-     struct ui_file *stream;
-     int show;
-     int level;
+print_variant_clauses (struct type *type, int field_num,
+		       struct type *outer_type, struct ui_file *stream,
+		       int show, int level)
 {
   int i;
   struct type *var_type;
@@ -533,7 +509,7 @@
   if (TYPE_CODE (var_type) == TYPE_CODE_PTR)
     {
       var_type = TYPE_TARGET_TYPE (var_type);
-      if (TYPE_FLAGS (var_type) & TYPE_FLAG_STUB) 
+      if (TYPE_FLAGS (var_type) & TYPE_FLAG_STUB)
 	{
 	  var_type = ada_find_parallel_type (var_type, "___XVU");
 	  if (var_type == NULL)
@@ -541,13 +517,13 @@
 	}
     }
 
-  for (i = 0; i < TYPE_NFIELDS (var_type); i += 1) 
+  for (i = 0; i < TYPE_NFIELDS (var_type); i += 1)
     {
       fprintf_filtered (stream, "\n%*swhen ", level + 4, "");
       print_choices (var_type, i, stream, discr_type);
       fprintf_filtered (stream, " =>");
-      if (print_record_field_types (TYPE_FIELD_TYPE (var_type, i), 
-				    outer_type, stream, show, level+4) <= 0)
+      if (print_record_field_types (TYPE_FIELD_TYPE (var_type, i),
+				    outer_type, stream, show, level + 4) <= 0)
 	fprintf_filtered (stream, " null;");
     }
 }
@@ -561,18 +537,14 @@
    level as the fields immediately outside the variant part. */
 
 static void
-print_variant_part (type, field_num, outer_type, stream, show, level)
-     struct type *type;
-     int field_num;
-     struct type *outer_type;
-     struct ui_file *stream;
-     int show;
-     int level;
+print_variant_part (struct type *type, int field_num, struct type *outer_type,
+		    struct ui_file *stream, int show, int level)
 {
   fprintf_filtered (stream, "\n%*scase %s is", level + 4, "",
-		    ada_variant_discrim_name 
-		      (TYPE_FIELD_TYPE (type, field_num)));
-  print_variant_clauses (type, field_num, outer_type, stream, show, level + 4);
+		    ada_variant_discrim_name
+		    (TYPE_FIELD_TYPE (type, field_num)));
+  print_variant_clauses (type, field_num, outer_type, stream, show,
+			 level + 4);
   fprintf_filtered (stream, "\n%*send case;", level + 4, "");
 }
 
@@ -586,12 +558,8 @@
    end. */
 
 static int
-print_record_field_types (type, outer_type, stream, show, level)
-     struct type *type;
-     struct type *outer_type;
-     struct ui_file *stream;
-     int show;
-     int level;
+print_record_field_types (struct type *type, struct type *outer_type,
+			  struct ui_file *stream, int show, int level)
 {
   int len, i, flds;
 
@@ -605,13 +573,12 @@
     {
       QUIT;
 
-      if (ada_is_parent_field (type, i) 
-	  || ada_is_ignored_field (type, i))
+      if (ada_is_parent_field (type, i) || ada_is_ignored_field (type, i))
 	;
       else if (ada_is_wrapper_field (type, i))
 	flds += print_record_field_types (TYPE_FIELD_TYPE (type, i), type,
 					  stream, show, level);
-      else if (ada_is_variant_part (type, i)) 
+      else if (ada_is_variant_part (type, i))
 	{
 	  print_variant_part (type, i, outer_type, stream, show, level);
 	  flds = 1;
@@ -635,26 +602,23 @@
    the number of levels of internal structure to show (see ada_print_type). */
 
 static void
-print_record_type (type0, stream, show, level)
-     struct type* type0;
-     struct ui_file* stream;
-     int show;
-     int level;
+print_record_type (struct type *type0, struct ui_file *stream, int show,
+		   int level)
 {
-  struct type* parent_type;
-  struct type* type;
-  
+  struct type *parent_type;
+  struct type *type;
+
   type = type0;
   if (TYPE_FLAGS (type) & TYPE_FLAG_STUB)
     {
-      struct type* type1 = ada_find_parallel_type (type, "___XVE");
+      struct type *type1 = ada_find_parallel_type (type, "___XVE");
       if (type1 != NULL)
 	type = type1;
     }
 
   parent_type = ada_parent_type (type);
-  if (ada_type_name (parent_type) != NULL) 
-    fprintf_filtered (stream, "new %s with ", 
+  if (ada_type_name (parent_type) != NULL)
+    fprintf_filtered (stream, "new %s with ",
 		      demangled_type_name (parent_type));
   else if (parent_type == NULL && ada_is_tagged_type (type))
     fprintf_filtered (stream, "tagged ");
@@ -669,15 +633,15 @@
 
       flds = 0;
       if (parent_type != NULL && ada_type_name (parent_type) == NULL)
-	flds += print_record_field_types (parent_type, parent_type, 
+	flds += print_record_field_types (parent_type, parent_type,
 					  stream, show, level);
       flds += print_record_field_types (type, type, stream, show, level);
-      
+
       if (flds > 0)
 	fprintf_filtered (stream, "\n%*send record", level, "");
-      else if (flds < 0) 
+      else if (flds < 0)
 	fprintf_filtered (stream, " <incomplete type> end record");
-      else 
+      else
 	fprintf_filtered (stream, " null; end record");
     }
 }
@@ -687,47 +651,43 @@
    in case the element type itself has nested structure, and SHOW is the
    number of levels of internal structure to show (see ada_print_type). */
 static void
-print_unchecked_union_type (struct type* type, struct ui_file* stream, 
+print_unchecked_union_type (struct type *type, struct ui_file *stream,
 			    int show, int level)
 {
   fprintf_filtered (stream, "record (?) is");
 
   if (show < 0)
     fprintf_filtered (stream, " ... end record");
-  else if (TYPE_NFIELDS (type) == 0) 
+  else if (TYPE_NFIELDS (type) == 0)
     fprintf_filtered (stream, " null; end record");
   else
     {
       int i;
 
-      fprintf_filtered (stream, "\n%*scase ? is", 
-			level+4, "");
+      fprintf_filtered (stream, "\n%*scase ? is", level + 4, "");
 
-      for (i = 0; i < TYPE_NFIELDS (type); i += 1) 
+      for (i = 0; i < TYPE_NFIELDS (type); i += 1)
 	{
-	  fprintf_filtered (stream, "\n%*swhen ? =>\n%*s", level+8, "",
-			    level+12, "");
+	  fprintf_filtered (stream, "\n%*swhen ? =>\n%*s", level + 8, "",
+			    level + 12, "");
 	  ada_print_type (TYPE_FIELD_TYPE (type, i),
 			  TYPE_FIELD_NAME (type, i),
 			  stream, show - 1, level + 12);
 	  fprintf_filtered (stream, ";");
 	}
 
-      fprintf_filtered (stream, "\n%*send case;\n%*send record", 
-			level+4, "", level, "");
+      fprintf_filtered (stream, "\n%*send case;\n%*send record",
+			level + 4, "", level, "");
     }
 }
-  
+
 
 
 /* Print function or procedure type TYPE on STREAM.  Make it a header
    for function or procedure NAME if NAME is not null. */
 
 static void
-print_func_type (type, stream, name)
-     struct type *type;
-     struct ui_file *stream;
-     char* name;
+print_func_type (struct type *type, struct ui_file *stream, char *name)
 {
   int i, len = TYPE_NFIELDS (type);
 
@@ -736,10 +696,10 @@
   else
     fprintf_filtered (stream, "function");
 
-  if (name != NULL && name[0] != '\0') 
+  if (name != NULL && name[0] != '\0')
     fprintf_filtered (stream, " %s", name);
 
-  if (len > 0) 
+  if (len > 0)
     {
       fprintf_filtered (stream, " (");
       for (i = 0; i < len; i += 1)
@@ -749,11 +709,11 @@
 	      fputs_filtered ("; ", stream);
 	      wrap_here ("    ");
 	    }
-	  fprintf_filtered (stream, "a%d: ", i+1);
+	  fprintf_filtered (stream, "a%d: ", i + 1);
 	  ada_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0);
 	}
       fprintf_filtered (stream, ")");
-    }      
+    }
 
   if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
     {
@@ -777,39 +737,34 @@
    LEVEL indicates level of recursion (for nested definitions). */
 
 void
-ada_print_type (type0, varstring, stream, show, level)
-     struct type* type0;
-     char* varstring;
-     struct ui_file* stream;
-     int show;
-     int level;
+ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
+		int show, int level)
 {
   enum type_code code;
   int demangled_args;
-  struct type* type = ada_completed_type (ada_get_base_type (type0));
-  char* type_name = demangled_type_name (type);
+  struct type *type = ada_completed_type (ada_get_base_type (type0));
+  char *type_name = demangled_type_name (type);
   int is_var_decl = (varstring != NULL && varstring[0] != '\0');
 
   if (type == NULL)
     {
       if (is_var_decl)
 	fprintf_filtered (stream, "%.*s: ",
-			  ada_name_prefix_len(varstring),
-			  varstring);
+			  ada_name_prefix_len (varstring), varstring);
       fprintf_filtered (stream, "<null type?>");
       return;
     }
 
   if (show > 0)
-      CHECK_TYPEDEF (type);
+    CHECK_TYPEDEF (type);
 
   if (is_var_decl && TYPE_CODE (type) != TYPE_CODE_FUNC)
-      fprintf_filtered (stream, "%.*s: ", 
-			ada_name_prefix_len (varstring), varstring);
+    fprintf_filtered (stream, "%.*s: ",
+		      ada_name_prefix_len (varstring), varstring);
 
   if (type_name != NULL && show <= 0)
     {
-      fprintf_filtered (stream, "%.*s", 
+      fprintf_filtered (stream, "%.*s",
 			ada_name_prefix_len (type_name), type_name);
       return;
     }
@@ -819,78 +774,78 @@
   else if (ada_is_packed_array_type (type))
     print_array_type (type, stream, show, level);
   else
-  switch (TYPE_CODE (type))
-    {
-    default:
-      fprintf_filtered (stream, "<");
-      c_print_type (type, "", stream, show, level);
-      fprintf_filtered (stream, ">");
-      break;
-    case TYPE_CODE_PTR:
-      fprintf_filtered (stream, "access ");
-      ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show,
-		      level);
-      break;
-    case TYPE_CODE_REF:
-      fprintf_filtered (stream, "<ref> ");
-      ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show,
-		      level);
-      break;
-    case TYPE_CODE_ARRAY:
-      print_array_type (type, stream, show, level);
-      break;
-    case TYPE_CODE_INT:
-      if (ada_is_fixed_point_type (type))
-	print_fixed_point_type (type, stream);
-      else if (ada_is_vax_floating_type (type))
-	print_vax_floating_point_type (type, stream);
-      else
-	{
-	  char* name = ada_type_name (type);
-	  if (! ada_is_range_type_name (name))
-	    fprintf_filtered (stream, "<%d-byte integer>", TYPE_LENGTH (type));
-	  else
-	    {
-	      fprintf_filtered (stream, "range ");
-	      print_range_type_named (name, stream);
-	    }
-	}
-      break;
-    case TYPE_CODE_RANGE:
-      if (ada_is_fixed_point_type (type))
-	print_fixed_point_type (type, stream);
-      else if (ada_is_vax_floating_type (type))
-	print_vax_floating_point_type (type, stream);
-      else if (ada_is_modular_type (type))
-	fprintf_filtered (stream, "mod %ld", (long) ada_modulus (type));
-      else
-	{
-	  fprintf_filtered (stream, "range ");
-	  print_range (type, stream);
-	}
-      break;
-    case TYPE_CODE_FLT:
-      fprintf_filtered (stream, "<%d-byte float>", TYPE_LENGTH (type));
-      break;
-    case TYPE_CODE_ENUM:
-      if (show < 0)
-	fprintf_filtered (stream, "(...)");
-      else
-	print_enum_type (type, stream);
-      break;
-    case TYPE_CODE_STRUCT:
-      if (ada_is_array_descriptor (type))
+    switch (TYPE_CODE (type))
+      {
+      default:
+	fprintf_filtered (stream, "<");
+	c_print_type (type, "", stream, show, level);
+	fprintf_filtered (stream, ">");
+	break;
+      case TYPE_CODE_PTR:
+	fprintf_filtered (stream, "access ");
+	ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
+	break;
+      case TYPE_CODE_REF:
+	fprintf_filtered (stream, "<ref> ");
+	ada_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
+	break;
+      case TYPE_CODE_ARRAY:
 	print_array_type (type, stream, show, level);
-      else if (ada_is_bogus_array_descriptor (type))
-	fprintf_filtered (stream, "array (?) of ? (<mal-formed descriptor>)");
-      else
-	print_record_type (type, stream, show, level);
-      break;
-    case TYPE_CODE_UNION:
-      print_unchecked_union_type (type, stream, show, level);
-      break;
-    case TYPE_CODE_FUNC:
-      print_func_type (type, stream, varstring);
-      break;
-    }
+	break;
+      case TYPE_CODE_INT:
+	if (ada_is_fixed_point_type (type))
+	  print_fixed_point_type (type, stream);
+	else if (ada_is_vax_floating_type (type))
+	  print_vax_floating_point_type (type, stream);
+	else
+	  {
+	    char *name = ada_type_name (type);
+	    if (!ada_is_range_type_name (name))
+	      fprintf_filtered (stream, "<%d-byte integer>",
+				TYPE_LENGTH (type));
+	    else
+	      {
+		fprintf_filtered (stream, "range ");
+		print_range_type_named (name, stream);
+	      }
+	  }
+	break;
+      case TYPE_CODE_RANGE:
+	if (ada_is_fixed_point_type (type))
+	  print_fixed_point_type (type, stream);
+	else if (ada_is_vax_floating_type (type))
+	  print_vax_floating_point_type (type, stream);
+	else if (ada_is_modular_type (type))
+	  fprintf_filtered (stream, "mod %ld", (long) ada_modulus (type));
+	else
+	  {
+	    fprintf_filtered (stream, "range ");
+	    print_range (type, stream);
+	  }
+	break;
+      case TYPE_CODE_FLT:
+	fprintf_filtered (stream, "<%d-byte float>", TYPE_LENGTH (type));
+	break;
+      case TYPE_CODE_ENUM:
+	if (show < 0)
+	  fprintf_filtered (stream, "(...)");
+	else
+	  print_enum_type (type, stream);
+	break;
+      case TYPE_CODE_STRUCT:
+	if (ada_is_array_descriptor (type))
+	  print_array_type (type, stream, show, level);
+	else if (ada_is_bogus_array_descriptor (type))
+	  fprintf_filtered (stream,
+			    "array (?) of ? (<mal-formed descriptor>)");
+	else
+	  print_record_type (type, stream, show, level);
+	break;
+      case TYPE_CODE_UNION:
+	print_unchecked_union_type (type, stream, show, level);
+	break;
+      case TYPE_CODE_FUNC:
+	print_func_type (type, stream, varstring);
+	break;
+      }
 }
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 6db18eb..fc2db70 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -32,9 +32,10 @@
 #include "c-lang.h"
 
 /* Encapsulates arguments to ada_val_print. */
-struct ada_val_print_args {
-  struct type* type;
-  char* valaddr0;
+struct ada_val_print_args
+{
+  struct type *type;
+  char *valaddr0;
   int embedded_offset;
   CORE_ADDR address;
   struct ui_file *stream;
@@ -47,50 +48,48 @@
 extern int inspect_it;
 extern unsigned int repeat_count_threshold;
 
-static void print_record (struct type*, char*, struct ui_file*, int,
+static void print_record (struct type *, char *, struct ui_file *, int,
 			  int, enum val_prettyprint);
 
-static int print_field_values (struct type*, char*, struct ui_file*, 
+static int print_field_values (struct type *, char *, struct ui_file *,
 			       int, int, enum val_prettyprint,
-			       int, struct type*, char*);
+			       int, struct type *, char *);
 
-static int print_variant_part (struct type*, int, char*, 
-			       struct ui_file*, int, int, enum val_prettyprint,
-			       int, struct type*, char*);
+static int print_variant_part (struct type *, int, char *,
+			       struct ui_file *, int, int,
+			       enum val_prettyprint, int, struct type *,
+			       char *);
 
-static void
-val_print_packed_array_elements (struct type*, char *valaddr, int,
-				 struct ui_file*, int, int, 
-				 enum val_prettyprint);
+static void val_print_packed_array_elements (struct type *, char *valaddr,
+					     int, struct ui_file *, int, int,
+					     enum val_prettyprint);
 
-static void adjust_type_signedness (struct type*);
+static void adjust_type_signedness (struct type *);
 
 static int ada_val_print_stub (PTR args0);
 
-static int
-ada_val_print_1 (struct type*, char*, int, CORE_ADDR, struct ui_file*,
-		 int, int, int, enum val_prettyprint);
+static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
+			    struct ui_file *, int, int, int,
+			    enum val_prettyprint);
 
 
 /* Make TYPE unsigned if its range of values includes no negatives. */
-static void 
+static void
 adjust_type_signedness (type)
-     struct type* type;
+     struct type *type;
 {
-  if (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE 
+  if (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
       && TYPE_LOW_BOUND (type) >= 0)
     TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
-}	
+}
 
 /* Assuming TYPE is a simple array type, prints its lower bound on STREAM,
    if non-standard (i.e., other than 1 for numbers, other than lower bound
    of index type for enumerated type). Returns 1 if something printed, 
    otherwise 0. */
 
-static int 
-print_optional_low_bound (stream, type)
-     struct ui_file *stream;
-     struct type *type;
+static int
+print_optional_low_bound (struct ui_file *stream, struct type *type)
 {
   struct type *index_type;
   long low_bound;
@@ -100,27 +99,28 @@
 
   if (index_type == NULL)
     return 0;
-  if (TYPE_CODE (index_type) == TYPE_CODE_RANGE) 
+  if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
     {
       low_bound = TYPE_LOW_BOUND (index_type);
       index_type = TYPE_TARGET_TYPE (index_type);
     }
   else
     return 0;
-      
-  switch (TYPE_CODE (index_type)) {
-  case TYPE_CODE_ENUM:
-    if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
-      return 0;
-    break;
-  case TYPE_CODE_UNDEF:
-    index_type = builtin_type_long;
-    /* FALL THROUGH */
-  default:
-    if (low_bound == 1)
-      return 0;
-    break;
-  }
+
+  switch (TYPE_CODE (index_type))
+    {
+    case TYPE_CODE_ENUM:
+      if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
+	return 0;
+      break;
+    case TYPE_CODE_UNDEF:
+      index_type = builtin_type_long;
+      /* FALL THROUGH */
+    default:
+      if (low_bound == 1)
+	return 0;
+      break;
+    }
 
   ada_print_scalar (index_type, (LONGEST) low_bound, stream);
   fprintf_filtered (stream, " => ");
@@ -132,18 +132,13 @@
     BITOFFSET from VALADDR on STREAM.  Formats according to FORMAT and
     separates with commas. RECURSE is the recursion (nesting) level.
     If PRETTY, uses "prettier" format. TYPE must have been decoded (as
-    by ada_coerce_to_simple_array).  */ 
+    by ada_coerce_to_simple_array).  */
 
 static void
-val_print_packed_array_elements (type, valaddr, bitoffset, stream, format, 
-				 recurse, pretty)
-     struct type *type;
-     char *valaddr;
-     int bitoffset;
-     struct ui_file *stream;
-     int format;
-     int recurse;
-     enum val_prettyprint pretty;
+val_print_packed_array_elements (struct type *type, char *valaddr,
+				 int bitoffset, struct ui_file *stream,
+				 int format, int recurse,
+				 enum val_prettyprint pretty)
 {
   unsigned int i;
   unsigned int things_printed = 0;
@@ -156,8 +151,8 @@
   /* Number of repetitions we have detected so far.  */
   unsigned int reps;
   unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
-  struct value* mark = value_mark ();
-      
+  struct value *mark = value_mark ();
+
   elttype = TYPE_TARGET_TYPE (type);
   eltlen = TYPE_LENGTH (check_typedef (elttype));
 
@@ -192,7 +187,7 @@
       wrap_here (n_spaces (2 + 2 * recurse));
 
       i0 = i;
-      v0 = ada_value_primitive_packed_val (NULL, valaddr, 
+      v0 = ada_value_primitive_packed_val (NULL, valaddr,
 					   (i0 * bitsize) / HOST_CHAR_BIT,
 					   (i0 * bitsize) % HOST_CHAR_BIT,
 					   bitsize, elttype);
@@ -201,12 +196,11 @@
 	  i += 1;
 	  if (i >= len)
 	    break;
-	  v1 = ada_value_primitive_packed_val (NULL, valaddr, 
+	  v1 = ada_value_primitive_packed_val (NULL, valaddr,
 					       (i * bitsize) / HOST_CHAR_BIT,
 					       (i * bitsize) % HOST_CHAR_BIT,
 					       bitsize, elttype);
-	  if (memcmp (VALUE_CONTENTS (v0), VALUE_CONTENTS (v1), eltlen) 
-	      != 0)
+	  if (memcmp (VALUE_CONTENTS (v0), VALUE_CONTENTS (v1), eltlen) != 0)
 	    break;
 	}
 
@@ -224,7 +218,7 @@
 	  int j;
 	  for (j = i0; j < i; j += 1)
 	    {
-	      if (j > i0) 
+	      if (j > i0)
 		{
 		  if (prettyprint_arrays)
 		    {
@@ -253,10 +247,8 @@
   value_free_to_mark (mark);
 }
 
-static struct type*
-printable_val_type (type, valaddr)
-     struct type* type;
-     char* valaddr;
+static struct type *
+printable_val_type (struct type *type, char *valaddr)
 {
   return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
 }
@@ -266,11 +258,7 @@
    (1 or 2) of the character. */
 
 void
-ada_emit_char (c, stream, quoter, type_len)
-     int c;
-     struct ui_file *stream;
-     int quoter;
-     int type_len;
+ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
 {
   if (type_len != 2)
     type_len = 1;
@@ -285,28 +273,23 @@
 	fprintf_filtered (stream, "%c", c);
     }
   else
-    fprintf_filtered (stream, "[\"%0*x\"]", type_len*2, c);
+    fprintf_filtered (stream, "[\"%0*x\"]", type_len * 2, c);
 }
 
 /* Character #I of STRING, given that TYPE_LEN is the size in bytes (1
    or 2) of a character. */
 
 static int
-char_at (string, i, type_len)
-     char* string;
-     int i;
-     int type_len;
+char_at (char *string, int i, int type_len)
 {
   if (type_len == 1)
     return string[i];
-  else 
-    return (int) extract_unsigned_integer (string + 2*i, 2);
+  else
+    return (int) extract_unsigned_integer (string + 2 * i, 2);
 }
 
 void
-ada_printchar (c, stream)
-     int c;
-     struct ui_file *stream;
+ada_printchar (int c, struct ui_file *stream)
 {
   fputs_filtered ("'", stream);
   ada_emit_char (c, stream, '\'', 1);
@@ -317,10 +300,7 @@
    form appropriate for TYPE. */
 
 void
-ada_print_scalar (type, val, stream)
-     struct type *type;
-     LONGEST val;
-     struct ui_file *stream;
+ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
 {
   unsigned int i;
   unsigned len;
@@ -396,12 +376,8 @@
  */
 
 static void
-printstr (stream, string, length, force_ellipses, type_len)
-     struct ui_file *stream;
-     char *string;
-     unsigned int length;
-     int force_ellipses;
-     int type_len;
+printstr (struct ui_file *stream, char *string, unsigned int length,
+	  int force_ellipses, int type_len)
 {
   unsigned int i;
   unsigned int things_printed = 0;
@@ -417,7 +393,7 @@
   for (i = 0; i < length && things_printed < print_max; i += 1)
     {
       /* Position of the character we are examining
-	 to see whether it is repeated.  */
+         to see whether it is repeated.  */
       unsigned int rep1;
       /* Number of repetitions we have detected so far.  */
       unsigned int reps;
@@ -432,8 +408,9 @@
 
       rep1 = i + 1;
       reps = 1;
-      while (rep1 < length && 
-	     char_at(string, rep1, type_len) == char_at (string, i, type_len))
+      while (rep1 < length &&
+	     char_at (string, rep1, type_len) == char_at (string, i,
+							  type_len))
 	{
 	  rep1 += 1;
 	  reps += 1;
@@ -450,7 +427,8 @@
 	      in_quotes = 0;
 	    }
 	  fputs_filtered ("'", stream);
-	  ada_emit_char (char_at (string, i, type_len), stream, '\'', type_len);
+	  ada_emit_char (char_at (string, i, type_len), stream, '\'',
+			 type_len);
 	  fputs_filtered ("'", stream);
 	  fprintf_filtered (stream, " <repeats %u times>", reps);
 	  i = rep1 - 1;
@@ -487,12 +465,8 @@
 }
 
 void
-ada_printstr (stream, string, length, force_ellipses, width)
-     struct ui_file *stream;
-     char *string;
-     unsigned int length;
-     int force_ellipses;
-     int width;
+ada_printstr (struct ui_file *stream, char *string, unsigned int length,
+	      int force_ellipses, int width)
 {
   printstr (stream, string, length, force_ellipses, width);
 }
@@ -518,20 +492,13 @@
    arrays.)  */
 
 int
-ada_val_print (type, valaddr0, embedded_offset, address, stream,
-	       format, deref_ref, recurse, pretty)
-     struct type* type;
-     char* valaddr0;
-     int embedded_offset;
-     CORE_ADDR address;
-     struct ui_file *stream;
-     int format;
-     int deref_ref;
-     int recurse;
-     enum val_prettyprint pretty;
+ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
+	       CORE_ADDR address, struct ui_file *stream, int format,
+	       int deref_ref, int recurse, enum val_prettyprint pretty)
 {
   struct ada_val_print_args args;
-  args.type = type; args.valaddr0 = valaddr0; 
+  args.type = type;
+  args.valaddr0 = valaddr0;
   args.embedded_offset = embedded_offset;
   args.address = address;
   args.stream = stream;
@@ -548,28 +515,20 @@
 static int
 ada_val_print_stub (PTR args0)
 {
-  struct ada_val_print_args* argsp = (struct ada_val_print_args*) args0;
-  return ada_val_print_1 (argsp->type, argsp->valaddr0, argsp->embedded_offset,
-			  argsp->address, argsp->stream, argsp->format,
-			  argsp->deref_ref, argsp->recurse,
-			  argsp->pretty);
+  struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
+  return ada_val_print_1 (argsp->type, argsp->valaddr0,
+			  argsp->embedded_offset, argsp->address,
+			  argsp->stream, argsp->format, argsp->deref_ref,
+			  argsp->recurse, argsp->pretty);
 }
 
 /* See the comment on ada_val_print.  This function differs in that it
  * does not catch evaluation errors (leaving that to ada_val_print). */
 
 static int
-ada_val_print_1 (type, valaddr0, embedded_offset, address, stream,
-		 format, deref_ref, recurse, pretty)
-     struct type* type;
-     char* valaddr0;
-     int embedded_offset;
-     CORE_ADDR address;
-     struct ui_file *stream;
-     int format;
-     int deref_ref;
-     int recurse;
-     enum val_prettyprint pretty;
+ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
+		 CORE_ADDR address, struct ui_file *stream, int format,
+		 int deref_ref, int recurse, enum val_prettyprint pretty)
 {
   unsigned int len;
   int i;
@@ -577,15 +536,15 @@
   unsigned int eltlen;
   LONGEST val;
   CORE_ADDR addr;
-  char* valaddr = valaddr0 + embedded_offset;
+  char *valaddr = valaddr0 + embedded_offset;
 
   CHECK_TYPEDEF (type);
 
   if (ada_is_array_descriptor (type) || ada_is_packed_array_type (type))
     {
       int retn;
-      struct value* mark = value_mark ();
-      struct value* val;
+      struct value *mark = value_mark ();
+      struct value *val;
       val = value_from_contents_and_address (type, valaddr, address);
       val = ada_coerce_to_simple_array_ptr (val);
       if (val == NULL)
@@ -595,7 +554,7 @@
 	}
       else
 	retn = ada_val_print_1 (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
-				VALUE_ADDRESS (val), stream, format, 
+				VALUE_ADDRESS (val), stream, format,
 				deref_ref, recurse, pretty);
       value_free_to_mark (mark);
       return retn;
@@ -608,7 +567,7 @@
   switch (TYPE_CODE (type))
     {
     default:
-      return c_val_print (type, valaddr0, embedded_offset, address, stream, 
+      return c_val_print (type, valaddr0, embedded_offset, address, stream,
 			  format, deref_ref, recurse, pretty);
 
     case TYPE_CODE_INT:
@@ -624,26 +583,26 @@
 	}
       else if (ada_is_vax_floating_type (type))
 	{
-	  struct value* val = 
+	  struct value *val =
 	    value_from_contents_and_address (type, valaddr, address);
-	  struct value* func = ada_vax_float_print_function (type);
+	  struct value *func = ada_vax_float_print_function (type);
 	  if (func != 0)
 	    {
-	      static struct type* parray_of_char = NULL;
-	      struct value* printable_val;
+	      static struct type *parray_of_char = NULL;
+	      struct value *printable_val;
 
-	      if (parray_of_char == NULL) 
-		parray_of_char = 
-		  make_pointer_type 
-		    (create_array_type 
-		      (NULL, builtin_type_char,
-		       create_range_type (NULL, builtin_type_int, 0, 32)),
-		     NULL);
+	      if (parray_of_char == NULL)
+		parray_of_char =
+		  make_pointer_type
+		  (create_array_type
+		   (NULL, builtin_type_char,
+		    create_range_type (NULL, builtin_type_int, 0, 32)), NULL);
 
-	      printable_val = 
+	      printable_val =
 		value_ind (value_cast (parray_of_char,
-				       call_function_by_hand (func, 1, &val)));
-	      
+				       call_function_by_hand (func, 1,
+							      &val)));
+
 	      fprintf_filtered (stream, "%s", VALUE_CONTENTS (printable_val));
 	      return 0;
 	    }
@@ -651,26 +610,26 @@
 	}
       else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
 	{
-	  struct type* target_type = TYPE_TARGET_TYPE (type);
+	  struct type *target_type = TYPE_TARGET_TYPE (type);
 	  if (TYPE_LENGTH (type) != TYPE_LENGTH (target_type))
 	    {
 	      /* Obscure case of range type that has different length from
-		 its base type.  Perform a conversion, or we will get a
-		 nonsense value.  Actually, we could use the same
-		 code regardless of lengths; I'm just avoiding a cast. */
-	      struct value* v = 
-		value_cast (target_type, 
-			    value_from_contents_and_address (type, valaddr, 0));
+	         its base type.  Perform a conversion, or we will get a
+	         nonsense value.  Actually, we could use the same
+	         code regardless of lengths; I'm just avoiding a cast. */
+	      struct value *v = value_cast (target_type,
+					    value_from_contents_and_address
+					    (type, valaddr, 0));
 	      return ada_val_print_1 (target_type, VALUE_CONTENTS (v), 0, 0,
 				      stream, format, 0, recurse + 1, pretty);
 	    }
 	  else
-	    return ada_val_print_1 (TYPE_TARGET_TYPE (type), 
+	    return ada_val_print_1 (TYPE_TARGET_TYPE (type),
 				    valaddr0, embedded_offset,
-				    address,  stream, format, deref_ref, 
+				    address, stream, format, deref_ref,
 				    recurse, pretty);
 	}
-      else 
+      else
 	{
 	  format = format ? format : output_format;
 	  if (format)
@@ -708,8 +667,8 @@
 	}
       if (i < len)
 	{
-	  const char* name = ada_enum_name (TYPE_FIELD_NAME (type, i));
-	  if (name[0] == '\'') 
+	  const char *name = ada_enum_name (TYPE_FIELD_NAME (type, i));
+	  if (name[0] == '\'')
 	    fprintf_filtered (stream, "%ld %s", (long) val, name);
 	  else
 	    fputs_filtered (name, stream);
@@ -719,18 +678,17 @@
 	  print_longest (stream, 'd', 0, val);
 	}
       break;
-      
+
     case TYPE_CODE_UNION:
     case TYPE_CODE_STRUCT:
       if (ada_is_bogus_array_descriptor (type))
 	{
 	  fprintf_filtered (stream, "(...?)");
 	  return 0;
-	}			      
+	}
       else
 	{
-	  print_record (type, valaddr, stream, format,
-			recurse, pretty);
+	  print_record (type, valaddr, stream, format, recurse, pretty);
 	  return 0;
 	}
 
@@ -740,21 +698,20 @@
 	  elttype = TYPE_TARGET_TYPE (type);
 	  eltlen = TYPE_LENGTH (elttype);
 	  len = TYPE_LENGTH (type) / eltlen;
-	      
+
 	  /* For an array of chars, print with string syntax.  */
-	  if (ada_is_string_type (type) 
-	      && (format == 0 || format == 's'))
+	  if (ada_is_string_type (type) && (format == 0 || format == 's'))
 	    {
 	      if (prettyprint_arrays)
 		{
 		  print_spaces_filtered (2 + 2 * recurse, stream);
 		}
 	      /* If requested, look for the first null char and only print
-		 elements up to it.  */
+	         elements up to it.  */
 	      if (stop_print_at_null)
 		{
 		  int temp_len;
-		  
+
 		  /* Look for a NULL char. */
 		  for (temp_len = 0;
 		       temp_len < len && temp_len < print_max
@@ -762,7 +719,7 @@
 		       temp_len += 1);
 		  len = temp_len;
 		}
-	      
+
 	      printstr (stream, valaddr, len, 0, eltlen);
 	    }
 	  else
@@ -770,10 +727,9 @@
 	      len = 0;
 	      fprintf_filtered (stream, "(");
 	      print_optional_low_bound (stream, type);
-	      if (TYPE_FIELD_BITSIZE (type, 0) > 0) 
+	      if (TYPE_FIELD_BITSIZE (type, 0) > 0)
 		val_print_packed_array_elements (type, valaddr, 0, stream,
-						 format, recurse,
-						 pretty);
+						 format, recurse, pretty);
 	      else
 		val_print_array_elements (type, valaddr, address, stream,
 					  format, deref_ref, recurse,
@@ -787,27 +743,27 @@
     case TYPE_CODE_REF:
       elttype = check_typedef (TYPE_TARGET_TYPE (type));
       if (addressprint)
-        {
+	{
 	  fprintf_filtered (stream, "@");
 	  print_address_numeric
 	    (extract_address (valaddr,
 			      TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
 	  if (deref_ref)
 	    fputs_filtered (": ", stream);
-        }
+	}
       /* De-reference the reference */
       if (deref_ref)
 	{
 	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
 	    {
-	      LONGEST deref_val_int = (LONGEST) 
-		unpack_pointer (lookup_pointer_type (builtin_type_void), 
+	      LONGEST deref_val_int = (LONGEST)
+		unpack_pointer (lookup_pointer_type (builtin_type_void),
 				valaddr);
-	      if (deref_val_int != 0) 
+	      if (deref_val_int != 0)
 		{
-		  struct value* deref_val =
-		    ada_value_ind (value_from_longest 
-				   (lookup_pointer_type (elttype), 
+		  struct value *deref_val =
+		    ada_value_ind (value_from_longest
+				   (lookup_pointer_type (elttype),
 				    deref_val_int));
 		  val_print (VALUE_TYPE (deref_val),
 			     VALUE_CONTENTS (deref_val), 0,
@@ -826,28 +782,18 @@
 }
 
 static int
-print_variant_part (type, field_num, valaddr, 
-		    stream, format, recurse, pretty, comma_needed,
-		    outer_type, outer_valaddr)
-     struct type *type;
-     int field_num;
-     char *valaddr;
-     struct ui_file *stream;
-     int format;
-     int recurse;
-     enum val_prettyprint pretty;
-     int comma_needed;
-     struct type *outer_type;
-     char *outer_valaddr;
+print_variant_part (struct type *type, int field_num, char *valaddr,
+		    struct ui_file *stream, int format, int recurse,
+		    enum val_prettyprint pretty, int comma_needed,
+		    struct type *outer_type, char *outer_valaddr)
 {
   struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
-  int which = 
-    ada_which_variant_applies (var_type, outer_type, outer_valaddr);
+  int which = ada_which_variant_applies (var_type, outer_type, outer_valaddr);
 
   if (which < 0)
     return 0;
   else
-    return print_field_values 
+    return print_field_values
       (TYPE_FIELD_TYPE (var_type, which),
        valaddr + TYPE_FIELD_BITPOS (type, field_num) / HOST_CHAR_BIT
        + TYPE_FIELD_BITPOS (var_type, which) / HOST_CHAR_BIT,
@@ -856,26 +802,23 @@
 }
 
 int
-ada_value_print (val0, stream, format, pretty)
-     struct value* val0;
-     struct ui_file *stream;
-     int format;
-     enum val_prettyprint pretty;
+ada_value_print (struct value *val0, struct ui_file *stream, int format,
+		 enum val_prettyprint pretty)
 {
-  char* valaddr = VALUE_CONTENTS (val0);
+  char *valaddr = VALUE_CONTENTS (val0);
   CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
-  struct type* type = 
+  struct type *type =
     ada_to_fixed_type (VALUE_TYPE (val0), valaddr, address, NULL);
-  struct value* val = value_from_contents_and_address (type, valaddr, address);
+  struct value *val =
+    value_from_contents_and_address (type, valaddr, address);
 
   /* If it is a pointer, indicate what it points to. */
-  if (TYPE_CODE (type) == TYPE_CODE_PTR ||
-      TYPE_CODE (type) == TYPE_CODE_REF)
+  if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF)
     {
       /* Hack:  remove (char *) for char strings.  Their
-	 type is indicated by the quoted string anyway. */
+         type is indicated by the quoted string anyway. */
       if (TYPE_CODE (type) == TYPE_CODE_PTR &&
-	  TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof(char) &&
+	  TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof (char) &&
 	  TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
 	  !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
 	{
@@ -888,7 +831,7 @@
 	  fprintf_filtered (stream, ") ");
 	}
     }
-  else if (ada_is_array_descriptor (type)) 
+  else if (ada_is_array_descriptor (type))
     {
       fprintf_filtered (stream, "(");
       type_print (type, "", stream, -1);
@@ -901,26 +844,20 @@
       fprintf_filtered (stream, ") (...?)");
       return 0;
     }
-  return (val_print (type, VALUE_CONTENTS (val), 0, address, 
+  return (val_print (type, VALUE_CONTENTS (val), 0, address,
 		     stream, format, 1, 0, pretty));
 }
- 
+
 static void
-print_record (type, valaddr, stream, format, recurse, pretty)
-     struct type *type;
-     char *valaddr;
-     struct ui_file *stream;
-     int format;
-     int recurse;
-     enum val_prettyprint pretty;
+print_record (struct type *type, char *valaddr, struct ui_file *stream,
+	      int format, int recurse, enum val_prettyprint pretty)
 {
   CHECK_TYPEDEF (type);
 
   fprintf_filtered (stream, "(");
 
   if (print_field_values (type, valaddr, stream, format, recurse, pretty,
-			  0, type, valaddr) != 0
-      && pretty)
+			  0, type, valaddr) != 0 && pretty)
     {
       fprintf_filtered (stream, "\n");
       print_spaces_filtered (2 * recurse, stream);
@@ -944,17 +881,10 @@
    Returns 1 if COMMA_NEEDED or any fields were printed. */
 
 static int
-print_field_values (type, valaddr, stream, format, recurse, pretty, 
-		    comma_needed, outer_type, outer_valaddr)
-     struct type *type;
-     char *valaddr;
-     struct ui_file *stream;
-     int format;
-     int recurse;
-     enum val_prettyprint pretty;
-     int comma_needed;
-     struct type *outer_type;
-     char *outer_valaddr;
+print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
+		    int format, int recurse, enum val_prettyprint pretty,
+		    int comma_needed, struct type *outer_type,
+		    char *outer_valaddr)
 {
   int i, len;
 
@@ -963,13 +893,13 @@
   for (i = 0; i < len; i += 1)
     {
       if (ada_is_ignored_field (type, i))
-	  continue;
+	continue;
 
       if (ada_is_wrapper_field (type, i))
 	{
-	  comma_needed = 
+	  comma_needed =
 	    print_field_values (TYPE_FIELD_TYPE (type, i),
-				valaddr 
+				valaddr
 				+ TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
 				stream, format, recurse, pretty,
 				comma_needed, type, valaddr);
@@ -993,7 +923,7 @@
 	  fprintf_filtered (stream, "\n");
 	  print_spaces_filtered (2 + 2 * recurse, stream);
 	}
-      else 
+      else
 	{
 	  wrap_here (n_spaces (2 + 2 * recurse));
 	}
@@ -1013,7 +943,7 @@
       else
 	{
 	  annotate_field_begin (TYPE_FIELD_TYPE (type, i));
-	  fprintf_filtered (stream, "%.*s", 
+	  fprintf_filtered (stream, "%.*s",
 			    ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
 			    TYPE_FIELD_NAME (type, i));
 	  annotate_field_name_end ();
@@ -1023,7 +953,7 @@
 
       if (TYPE_FIELD_PACKED (type, i))
 	{
-	  struct value* v;
+	  struct value *v;
 
 	  /* Bitfields require special handling, especially due to byte
 	     order problems.  */
@@ -1036,21 +966,21 @@
 	    {
 	      int bit_pos = TYPE_FIELD_BITPOS (type, i);
 	      int bit_size = TYPE_FIELD_BITSIZE (type, i);
-      
+
 	      adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
 	      v = ada_value_primitive_packed_val (NULL, valaddr,
 						  bit_pos / HOST_CHAR_BIT,
 						  bit_pos % HOST_CHAR_BIT,
-						  bit_size, 
+						  bit_size,
 						  TYPE_FIELD_TYPE (type, i));
-	      val_print (TYPE_FIELD_TYPE(type, i), VALUE_CONTENTS (v), 0, 0,
+	      val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
 			 stream, format, 0, recurse + 1, pretty);
 	    }
 	}
       else
-	  ada_val_print (TYPE_FIELD_TYPE (type, i), 
-		         valaddr + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
-		         0, 0, stream, format, 0, recurse + 1, pretty);
+	ada_val_print (TYPE_FIELD_TYPE (type, i),
+		       valaddr + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
+		       0, 0, stream, format, 0, recurse + 1, pretty);
       annotate_field_end ();
     }
 
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
new file mode 100644
index 0000000..da75f21
--- /dev/null
+++ b/gdb/aix-thread.c
@@ -0,0 +1,1707 @@
+/* Low level interface for debugging AIX 4.3+ pthreads.
+
+   Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+   Written by Nick Duffek <nsd@redhat.com>.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+
+/* This module uses the libpthdebug.a library provided by AIX 4.3+ for
+   debugging pthread applications.
+
+   Some name prefix conventions:
+     pthdb_	provided by libpthdebug.a
+     pdc_	callbacks that this module provides to libpthdebug.a
+     pd_	variables or functions interfacing with libpthdebug.a
+
+   libpthdebug peculiarities:
+
+     - pthdb_ptid_pthread() is prototyped in <sys/pthdebug.h>, but
+       it's not documented, and after several calls it stops working
+       and causes other libpthdebug functions to fail.
+
+     - pthdb_tid_pthread() doesn't always work after
+       pthdb_session_update(), but it does work after cycling through
+       all threads using pthdb_pthread().
+
+     */
+
+#include "defs.h"
+#include "gdb_assert.h"
+#include "gdbthread.h"
+#include "target.h"
+#include "inferior.h"
+#include "regcache.h"
+#include "gdbcmd.h"
+#include "language.h"		/* for local_hex_string() */
+#include "ppc-tdep.h"
+
+#include <procinfo.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/reg.h>
+#include <sched.h>
+#include <sys/pthdebug.h>
+
+/* Whether to emit debugging output.  */
+static int debug_aix_thread;
+
+/* In AIX 5.1, functions use pthdb_tid_t instead of tid_t.  */
+#ifndef PTHDB_VERSION_3
+#define pthdb_tid_t	tid_t
+#endif
+
+/* Return whether to treat PID as a debuggable thread id.  */
+
+#define PD_TID(ptid)	(pd_active && ptid_get_tid (ptid) != 0)
+
+/* Build a thread ptid.  */
+#define BUILD_THREAD(TID, PID) ptid_build (PID, 0, TID)
+
+/* Build and lwp ptid.  */
+#define BUILD_LWP(LWP, PID) MERGEPID (PID, LWP)
+
+/* pthdb_user_t value that we pass to pthdb functions.  0 causes
+   PTHDB_BAD_USER errors, so use 1.  */
+
+#define PD_USER	1
+
+/* Success and failure values returned by pthdb callbacks.  */
+
+#define PDC_SUCCESS	PTHDB_SUCCESS
+#define PDC_FAILURE	PTHDB_CALLBACK
+
+/* Private data attached to each element in GDB's thread list.  */
+
+struct private_thread_info {
+  pthdb_pthread_t pdtid;	 /* thread's libpthdebug id */
+  pthdb_tid_t tid;			/* kernel thread id */
+};
+
+/* Information about a thread of which libpthdebug is aware.  */
+
+struct pd_thread {
+  pthdb_pthread_t pdtid;
+  pthread_t pthid;
+  pthdb_tid_t tid;
+};
+
+/* This module's target-specific operations, active while pd_able is true.  */
+
+static struct target_ops aix_thread_ops;
+
+/* Copy of the target over which ops is pushed.  
+   This is more convenient than a pointer to child_ops or core_ops,
+   because they lack current_target's default callbacks.  */
+
+static struct target_ops base_target;
+
+/* Address of the function that libpthread will call when libpthdebug
+   is ready to be initialized.  */
+
+static CORE_ADDR pd_brk_addr;
+
+/* Whether the current application is debuggable by pthdb.  */
+
+static int pd_able = 0;
+
+/* Whether a threaded application is being debugged.  */
+
+static int pd_active = 0;
+
+/* Whether the current architecture is 64-bit.  
+   Only valid when pd_able is true.  */
+
+static int arch64;
+
+/* Saved pointer to previous owner of target_new_objfile_hook.  */
+
+static void (*target_new_objfile_chain)(struct objfile *);
+
+/* Forward declarations for pthdb callbacks.  */
+
+static int pdc_symbol_addrs (pthdb_user_t, pthdb_symbol_t *, int);
+static int pdc_read_data (pthdb_user_t, void *, pthdb_addr_t, size_t);
+static int pdc_write_data (pthdb_user_t, void *, pthdb_addr_t, size_t);
+static int pdc_read_regs (pthdb_user_t user, pthdb_tid_t tid,
+			  unsigned long long flags, 
+			  pthdb_context_t *context);
+static int pdc_write_regs (pthdb_user_t user, pthdb_tid_t tid,
+			   unsigned long long flags, 
+			   pthdb_context_t *context);
+static int pdc_alloc (pthdb_user_t, size_t, void **);
+static int pdc_realloc (pthdb_user_t, void *, size_t, void **);
+static int pdc_dealloc (pthdb_user_t, void *);
+
+/* pthdb callbacks.  */
+
+static pthdb_callbacks_t pd_callbacks = {
+  pdc_symbol_addrs,
+  pdc_read_data,
+  pdc_write_data,
+  pdc_read_regs,
+  pdc_write_regs,
+  pdc_alloc,
+  pdc_realloc,
+  pdc_dealloc,
+  NULL
+};
+
+/* Current pthdb session.  */
+
+static pthdb_session_t pd_session;
+
+/* Return a printable representation of pthdebug function return
+   STATUS.  */
+
+static char *
+pd_status2str (int status)
+{
+  switch (status)
+    {
+    case PTHDB_SUCCESS:		return "SUCCESS";
+    case PTHDB_NOSYS:		return "NOSYS";
+    case PTHDB_NOTSUP:		return "NOTSUP";
+    case PTHDB_BAD_VERSION:	return "BAD_VERSION";
+    case PTHDB_BAD_USER:	return "BAD_USER";
+    case PTHDB_BAD_SESSION:	return "BAD_SESSION";
+    case PTHDB_BAD_MODE:	return "BAD_MODE";
+    case PTHDB_BAD_FLAGS:	return "BAD_FLAGS";
+    case PTHDB_BAD_CALLBACK:	return "BAD_CALLBACK";
+    case PTHDB_BAD_POINTER:	return "BAD_POINTER";
+    case PTHDB_BAD_CMD:		return "BAD_CMD";
+    case PTHDB_BAD_PTHREAD:	return "BAD_PTHREAD";
+    case PTHDB_BAD_ATTR:	return "BAD_ATTR";
+    case PTHDB_BAD_MUTEX:	return "BAD_MUTEX";
+    case PTHDB_BAD_MUTEXATTR:	return "BAD_MUTEXATTR";
+    case PTHDB_BAD_COND:	return "BAD_COND";
+    case PTHDB_BAD_CONDATTR:	return "BAD_CONDATTR";
+    case PTHDB_BAD_RWLOCK:	return "BAD_RWLOCK";
+    case PTHDB_BAD_RWLOCKATTR:	return "BAD_RWLOCKATTR";
+    case PTHDB_BAD_KEY:		return "BAD_KEY";
+    case PTHDB_BAD_PTID:	return "BAD_PTID";
+    case PTHDB_BAD_TID:		return "BAD_TID";
+    case PTHDB_CALLBACK:	return "CALLBACK";
+    case PTHDB_CONTEXT:		return "CONTEXT";
+    case PTHDB_HELD:		return "HELD";
+    case PTHDB_NOT_HELD:	return "NOT_HELD";
+    case PTHDB_MEMORY:		return "MEMORY";
+    case PTHDB_NOT_PTHREADED:	return "NOT_PTHREADED";
+    case PTHDB_SYMBOL:		return "SYMBOL";
+    case PTHDB_NOT_AVAIL:	return "NOT_AVAIL";
+    case PTHDB_INTERNAL:	return "INTERNAL";
+    default:			return "UNKNOWN";
+    }
+}
+
+/* A call to ptrace(REQ, ID, ...) just returned RET.  Check for
+   exceptional conditions and either return nonlocally or else return
+   1 for success and 0 for failure.  */
+
+static int
+ptrace_check (int req, int id, int ret)
+{
+  if (ret == 0 && !errno)
+    return 1;
+
+  /* According to ptrace(2), ptrace may fail with EPERM if "the
+     Identifier parameter corresponds to a kernel thread which is
+     stopped in kernel mode and whose computational state cannot be
+     read or written."  This happens quite often with register reads.  */
+
+  switch (req)
+    {
+    case PTT_READ_GPRS:
+    case PTT_READ_FPRS:
+    case PTT_READ_SPRS:
+      if (ret == -1 && errno == EPERM)
+	{
+	  if (debug_aix_thread)
+	    fprintf_unfiltered (gdb_stdlog, 
+				"ptrace (%d, %d) = %d (errno = %d)\n",
+				req, id, ret, errno);
+	  return ret == -1 ? 0 : 1;
+	}
+      break;
+    }
+  error ("aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)",
+	 req, id, ret, errno, safe_strerror (errno));
+  return 0;  /* Not reached.  */
+}
+
+/* Call ptracex (REQ, ID, ADDR, DATA, BUF).  Return success.  */
+
+static int
+ptrace64aix (int req, int id, long long addr, int data, int *buf)
+{
+  errno = 0;
+  return ptrace_check (req, id, ptracex (req, id, addr, data, buf));
+}
+
+/* Call ptrace (REQ, ID, ADDR, DATA, BUF).  Return success.  */
+
+static int
+ptrace32 (int req, int id, int *addr, int data, int *buf)
+{
+  errno = 0;
+  return ptrace_check (req, id, 
+		       ptrace (req, id, (int *) addr, data, buf));
+}
+
+/* If *PIDP is a composite process/thread id, convert it to a
+   process id.  */
+
+static void
+pid_to_prc (ptid_t *ptidp)
+{
+  ptid_t ptid;
+
+  ptid = *ptidp;
+  if (PD_TID (ptid))
+    *ptidp = pid_to_ptid (PIDGET (ptid));
+}
+
+/* pthdb callback: for <i> from 0 to COUNT, set SYMBOLS[<i>].addr to
+   the address of SYMBOLS[<i>].name.  */
+
+static int
+pdc_symbol_addrs (pthdb_user_t user, pthdb_symbol_t *symbols, int count)
+{
+  struct minimal_symbol *ms;
+  int i;
+  char *name;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+      "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n",
+      user, (long) symbols, count);
+
+  for (i = 0; i < count; i++)
+    {
+      name = symbols[i].name;
+      if (debug_aix_thread)
+	fprintf_unfiltered (gdb_stdlog, 
+			    "  symbols[%d].name = \"%s\"\n", i, name);
+
+      if (!*name)
+	symbols[i].addr = 0;
+      else
+	{
+	  if (!(ms = lookup_minimal_symbol (name, NULL, NULL)))
+	    {
+	      if (debug_aix_thread)
+		fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE\n");
+	      return PDC_FAILURE;
+	    }
+	  symbols[i].addr = SYMBOL_VALUE_ADDRESS (ms);
+	}
+      if (debug_aix_thread)
+	fprintf_unfiltered (gdb_stdlog, "  symbols[%d].addr = %s\n",
+			    i, local_hex_string (symbols[i].addr));
+    }
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS\n");
+  return PDC_SUCCESS;
+}
+
+/* Read registers call back function should be able to read the
+   context information of a debuggee kernel thread from an active
+   process or from a core file.  The information should be formatted
+   in context64 form for both 32-bit and 64-bit process.  
+   If successful return 0, else non-zero is returned.  */
+
+static int
+pdc_read_regs (pthdb_user_t user, 
+	       pthdb_tid_t tid,
+	       unsigned long long flags,
+	       pthdb_context_t *context)
+{
+  /* This function doesn't appear to be used, so we could probably
+   just return 0 here.  HOWEVER, if it is not defined, the OS will
+   complain and several thread debug functions will fail.  In case
+   this is needed, I have implemented what I think it should do,
+   however this code is untested.  */
+
+  uint64_t gprs64[32];
+  uint32_t gprs32[32];
+  double fprs[32];
+  struct ptxsprs sprs64;
+  struct ptsprs sprs32;
+  
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n",
+                        (int) tid, local_hex_string (flags));
+
+  /* General-purpose registers.  */
+  if (flags & PTHDB_FLAG_GPRS)
+    {
+      if (arch64)
+	{
+	  if (!ptrace64aix (PTT_READ_GPRS, tid, 
+			    (unsigned long) gprs64, 0, NULL))
+	    memset (gprs64, 0, sizeof (gprs64));
+	  memcpy (context->gpr, gprs64, sizeof(gprs64));
+	}
+      else
+	{
+	  if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
+	    memset (gprs32, 0, sizeof (gprs32));
+	  memcpy (context->gpr, gprs32, sizeof(gprs32));
+	}
+    }
+
+  /* Floating-point registers.  */
+  if (flags & PTHDB_FLAG_FPRS)
+    {
+      if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
+	memset (fprs, 0, sizeof (fprs));
+      	  memcpy (context->fpr, fprs, sizeof(fprs));
+    }
+
+  /* Special-purpose registers.  */
+  if (flags & PTHDB_FLAG_SPRS)
+    {
+      if (arch64)
+	{
+	  if (!ptrace64aix (PTT_READ_SPRS, tid, 
+			    (unsigned long) &sprs64, 0, NULL))
+	    memset (&sprs64, 0, sizeof (sprs64));
+      	  memcpy (&context->msr, &sprs64, sizeof(sprs64));
+	}
+      else
+	{
+	  if (!ptrace32 (PTT_READ_SPRS, tid, (int *) &sprs32, 0, NULL))
+	    memset (&sprs32, 0, sizeof (sprs32));
+      	  memcpy (&context->msr, &sprs32, sizeof(sprs32));
+	}
+    }  
+  return 0;
+}
+
+/* Write register function should be able to write requested context
+   information to specified debuggee's kernel thread id. 
+   If successful return 0, else non-zero is returned.  */
+
+static int
+pdc_write_regs (pthdb_user_t user,
+		pthdb_tid_t tid,
+		unsigned long long flags,
+		pthdb_context_t *context)
+{ 
+  /* This function doesn't appear to be used, so we could probably
+     just return 0 here.  HOWEVER, if it is not defined, the OS will
+     complain and several thread debug functions will fail.  In case
+     this is needed, I have implemented what I think it should do,
+     however this code is untested.  */
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n",
+                        (int) tid, local_hex_string (flags));
+
+  /* General-purpose registers.  */
+  if (flags & PTHDB_FLAG_GPRS)
+    {
+      if (arch64)
+	ptrace64aix (PTT_WRITE_GPRS, tid, 
+		     (unsigned long) context->gpr, 0, NULL);
+      else
+	ptrace32 (PTT_WRITE_GPRS, tid, (int *) context->gpr, 0, NULL);
+    }
+
+ /* Floating-point registers.  */
+  if (flags & PTHDB_FLAG_FPRS)
+    {
+      ptrace32 (PTT_WRITE_FPRS, tid, (int *) context->fpr, 0, NULL);
+    }
+
+  /* Special-purpose registers.  */
+  if (flags & PTHDB_FLAG_SPRS)
+    {
+      if (arch64)
+	{
+	  ptrace64aix (PTT_WRITE_SPRS, tid, 
+		       (unsigned long) &context->msr, 0, NULL);
+	}
+      else
+	{
+	  ptrace32 (PTT_WRITE_SPRS, tid, (int *) &context->msr, 0, NULL);
+	}
+    }
+  return 0;
+}
+
+/* pthdb callback: read LEN bytes from process ADDR into BUF.  */
+
+static int
+pdc_read_data (pthdb_user_t user, void *buf, 
+	       pthdb_addr_t addr, size_t len)
+{
+  int status, ret;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+      "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+      user, (long) buf, local_hex_string (addr), len);
+
+  status = target_read_memory (addr, buf, len);
+  ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, "  status=%d, returning %s\n",
+			status, pd_status2str (ret));
+  return ret;
+}
+
+/* pthdb callback: write LEN bytes from BUF to process ADDR.  */
+
+static int
+pdc_write_data (pthdb_user_t user, void *buf, 
+		pthdb_addr_t addr, size_t len)
+{
+  int status, ret;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+      "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+      user, (long) buf, local_hex_string (addr), len);
+
+  status = target_write_memory (addr, buf, len);
+  ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, "  status=%d, returning %s\n", status,
+			pd_status2str (ret));
+  return ret;
+}
+
+/* pthdb callback: allocate a LEN-byte buffer and store a pointer to it
+   in BUFP.  */
+
+static int
+pdc_alloc (pthdb_user_t user, size_t len, void **bufp)
+{
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+                        "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n",
+			user, len, (long) bufp);
+  *bufp = xmalloc (len);
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"  malloc returned 0x%lx\n", (long) *bufp);
+
+  /* Note: xmalloc() can't return 0; therefore PDC_FAILURE will never
+     be returned.  */
+
+  return *bufp ? PDC_SUCCESS : PDC_FAILURE;
+}
+
+/* pthdb callback: reallocate BUF, which was allocated by the alloc or
+   realloc callback, so that it contains LEN bytes, and store a
+   pointer to the result in BUFP.  */
+
+static int
+pdc_realloc (pthdb_user_t user, void *buf, size_t len, void **bufp)
+{
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+      "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n",
+      user, (long) buf, len, (long) bufp);
+  *bufp = xrealloc (buf, len);
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"  realloc returned 0x%lx\n", (long) *bufp);
+  return *bufp ? PDC_SUCCESS : PDC_FAILURE;
+}
+
+/* pthdb callback: free BUF, which was allocated by the alloc or
+   realloc callback.  */
+
+static int
+pdc_dealloc (pthdb_user_t user, void *buf)
+{
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"pdc_free (user = %ld, buf = 0x%lx)\n", user,
+                        (long) buf);
+  xfree (buf);
+  return PDC_SUCCESS;
+}
+
+/* Return a printable representation of pthread STATE.  */
+
+static char *
+state2str (pthdb_state_t state)
+{
+  switch (state)
+    {
+    case PST_IDLE:	return "idle";		/* being created */
+    case PST_RUN:	return "running";	/* running */
+    case PST_SLEEP:	return "sleeping";	/* awaiting an event */
+    case PST_READY:	return "ready";		/* runnable */
+    case PST_TERM:	return "finished";	/* awaiting a join/detach */
+    default:		return "unknown";
+    }
+}
+
+/* qsort() comparison function for sorting pd_thread structs by pthid.  */
+
+static int
+pcmp (const void *p1v, const void *p2v)
+{
+  struct pd_thread *p1 = (struct pd_thread *) p1v;
+  struct pd_thread *p2 = (struct pd_thread *) p2v;
+  return p1->pthid < p2->pthid ? -1 : p1->pthid > p2->pthid;
+}
+
+/* iterate_over_threads() callback for counting GDB threads.  */
+
+static int
+giter_count (struct thread_info *thread, void *countp)
+{
+  (*(int *) countp)++;
+  return 0;
+}
+
+/* iterate_over_threads() callback for accumulating GDB thread pids.  */
+
+static int
+giter_accum (struct thread_info *thread, void *bufp)
+{
+  **(struct thread_info ***) bufp = thread;
+  (*(struct thread_info ***) bufp)++;
+  return 0;
+}
+
+/* ptid comparison function */
+
+static int
+ptid_cmp (ptid_t ptid1, ptid_t ptid2)
+{
+  int pid1, pid2;
+
+  if (ptid_get_pid (ptid1) < ptid_get_pid (ptid2))
+    return -1;
+  else if (ptid_get_pid (ptid1) > ptid_get_pid (ptid2))
+    return 1;
+  else if (ptid_get_tid (ptid1) < ptid_get_tid (ptid2))
+    return -1;
+  else if (ptid_get_tid (ptid1) > ptid_get_tid (ptid2))
+    return 1;
+  else if (ptid_get_lwp (ptid1) < ptid_get_lwp (ptid2))
+    return -1;
+  else if (ptid_get_lwp (ptid1) > ptid_get_lwp (ptid2))
+    return 1;
+  else
+    return 0;
+}
+
+/* qsort() comparison function for sorting thread_info structs by pid.  */
+
+static int
+gcmp (const void *t1v, const void *t2v)
+{
+  struct thread_info *t1 = *(struct thread_info **) t1v;
+  struct thread_info *t2 = *(struct thread_info **) t2v;
+  return ptid_cmp (t1->ptid, t2->ptid);
+}
+
+/* Synchronize GDB's thread list with libpthdebug's.
+
+   There are some benefits of doing this every time the inferior stops:
+
+     - allows users to run thread-specific commands without needing to
+       run "info threads" first
+
+     - helps pthdb_tid_pthread() work properly (see "libpthdebug
+       peculiarities" at the top of this module)
+
+     - simplifies the demands placed on libpthdebug, which seems to
+       have difficulty with certain call patterns */
+
+static void
+sync_threadlists (void)
+{
+  int cmd, status, infpid;
+  int pcount, psize, pi, gcount, gi;
+  struct pd_thread *pbuf;
+  struct thread_info **gbuf, **g, *thread;
+  pthdb_pthread_t pdtid;
+  pthread_t pthid;
+  pthdb_tid_t tid;
+
+  /* Accumulate an array of libpthdebug threads sorted by pthread id.  */
+
+  pcount = 0;
+  psize = 1;
+  pbuf = (struct pd_thread *) xmalloc (psize * sizeof *pbuf);
+
+  for (cmd = PTHDB_LIST_FIRST;; cmd = PTHDB_LIST_NEXT)
+    {
+      status = pthdb_pthread (pd_session, &pdtid, cmd);
+      if (status != PTHDB_SUCCESS || pdtid == PTHDB_INVALID_PTHREAD)
+	break;
+
+      status = pthdb_pthread_ptid (pd_session, pdtid, &pthid);
+      if (status != PTHDB_SUCCESS || pthid == PTHDB_INVALID_PTID)
+	continue;
+
+      if (pcount == psize)
+	{
+	  psize *= 2;
+	  pbuf = (struct pd_thread *) xrealloc (pbuf, 
+						psize * sizeof *pbuf);
+	}
+      pbuf[pcount].pdtid = pdtid;
+      pbuf[pcount].pthid = pthid;
+      pcount++;
+    }
+
+  for (pi = 0; pi < pcount; pi++)
+    {
+      status = pthdb_pthread_tid (pd_session, pbuf[pi].pdtid, &tid);
+      if (status != PTHDB_SUCCESS)
+	tid = PTHDB_INVALID_TID;
+      pbuf[pi].tid = tid;
+    }
+
+  qsort (pbuf, pcount, sizeof *pbuf, pcmp);
+
+  /* Accumulate an array of GDB threads sorted by pid.  */
+
+  gcount = 0;
+  iterate_over_threads (giter_count, &gcount);
+  g = gbuf = (struct thread_info **) xmalloc (gcount * sizeof *gbuf);
+  iterate_over_threads (giter_accum, &g);
+  qsort (gbuf, gcount, sizeof *gbuf, gcmp);
+
+  /* Apply differences between the two arrays to GDB's thread list.  */
+
+  infpid = PIDGET (inferior_ptid);
+  for (pi = gi = 0; pi < pcount || gi < gcount;)
+    {
+      if (pi == pcount)
+	{
+	  delete_thread (gbuf[gi]->ptid);
+	  gi++;
+	}
+      else if (gi == gcount)
+	{
+	  thread = add_thread (BUILD_THREAD (pbuf[pi].pthid, infpid));
+	  thread->private = xmalloc (sizeof (struct private_thread_info));
+	  thread->private->pdtid = pbuf[pi].pdtid;
+	  thread->private->tid = pbuf[pi].tid;
+	  pi++;
+	}
+      else
+	{
+	  ptid_t pptid, gptid;
+	  int cmp_result;
+
+	  pptid = BUILD_THREAD (pbuf[pi].pthid, infpid);
+	  gptid = gbuf[gi]->ptid;
+	  pdtid = pbuf[pi].pdtid;
+	  tid = pbuf[pi].tid;
+
+	  cmp_result = ptid_cmp (pptid, gptid);
+
+	  if (cmp_result == 0)
+	    {
+	      gbuf[gi]->private->pdtid = pdtid;
+	      gbuf[gi]->private->tid = tid;
+	      pi++;
+	      gi++;
+	    }
+	  else if (cmp_result > 0)
+	    {
+	      delete_thread (gptid);
+	      gi++;
+	    }
+	  else
+	    {
+	      thread = add_thread (pptid);
+	      thread->private = xmalloc (sizeof (struct private_thread_info));
+	      thread->private->pdtid = pdtid;
+	      thread->private->tid = tid;
+	      pi++;
+	    }
+	}
+    }
+
+  xfree (pbuf);
+  xfree (gbuf);
+}
+
+/* Iterate_over_threads() callback for locating a thread whose kernel
+   thread just received a trap signal.  */
+
+static int
+iter_trap (struct thread_info *thread, void *unused)
+{
+  struct thrdsinfo64 thrinf;
+  pthdb_tid_t tid;
+
+  /* getthrds(3) isn't prototyped in any AIX 4.3.3 #include file.  */
+  extern int getthrds (pid_t, struct thrdsinfo64 *, 
+		       int, pthdb_tid_t *, int);
+
+  tid = thread->private->tid;
+  if (tid == PTHDB_INVALID_TID)
+    return 0;
+
+  if (getthrds (PIDGET (inferior_ptid), &thrinf, 
+		sizeof (thrinf), &tid, 1) != 1)
+    return 0;
+
+  return thrinf.ti_cursig == SIGTRAP;
+}
+
+/* Synchronize libpthdebug's state with the inferior and with GDB,
+   generate a composite process/thread <pid> for the current thread,
+   set inferior_ptid to <pid> if SET_INFPID, and return <pid>.  */
+
+static ptid_t
+pd_update (int set_infpid)
+{
+  int status;
+  ptid_t ptid;
+  struct thread_info *thread;
+
+  if (!pd_active)
+    return inferior_ptid;
+
+  status = pthdb_session_update (pd_session);
+  if (status != PTHDB_SUCCESS)
+    return inferior_ptid;
+
+  sync_threadlists ();
+
+  /* Define "current thread" as one that just received a trap signal.  */
+
+  thread = iterate_over_threads (iter_trap, NULL);
+  if (!thread)
+    ptid = inferior_ptid;
+  else
+    {
+      ptid = thread->ptid;
+      if (set_infpid)
+	inferior_ptid = ptid;
+    }
+  return ptid;
+}
+
+/* Try to start debugging threads in the current process. 
+   If successful and SET_INFPID, set inferior_ptid to reflect the
+   current thread.  */
+
+static ptid_t
+pd_activate (int set_infpid)
+{
+  int status;
+		
+  status = pthdb_session_init (PD_USER, arch64 ? PEM_64BIT : PEM_32BIT,
+			       PTHDB_FLAG_REGS, &pd_callbacks, 
+			       &pd_session);
+  if (status != PTHDB_SUCCESS)
+    {
+      return inferior_ptid;
+    }
+  pd_active = 1;
+  return pd_update (set_infpid);
+}
+
+/* Undo the effects of pd_activate().  */
+
+static void
+pd_deactivate (void)
+{
+  if (!pd_active)
+    return;
+  pthdb_session_destroy (pd_session);
+  
+  pid_to_prc (&inferior_ptid);
+  pd_active = 0;
+}
+
+/* An object file has just been loaded.  Check whether the current
+   application is pthreaded, and if so, prepare for thread debugging.  */
+
+static void
+pd_enable (void)
+{
+  int status;
+  char *stub_name;
+  struct minimal_symbol *ms;
+
+  /* Don't initialize twice.  */
+  if (pd_able)
+    return;
+
+  /* Check application word size.  */
+  arch64 = REGISTER_RAW_SIZE (0) == 8;
+
+  /* Check whether the application is pthreaded.  */
+  stub_name = NULL;
+  status = pthdb_session_pthreaded (PD_USER, PTHDB_FLAG_REGS,
+				    &pd_callbacks, &stub_name);
+  if ((status != PTHDB_SUCCESS && 
+       status != PTHDB_NOT_PTHREADED) || !stub_name)
+    return;
+
+  /* Set a breakpoint on the returned stub function.  */
+  if (!(ms = lookup_minimal_symbol (stub_name, NULL, NULL)))
+    return;
+  pd_brk_addr = SYMBOL_VALUE_ADDRESS (ms);
+  if (!create_thread_event_breakpoint (pd_brk_addr))
+    return;
+
+  /* Prepare for thread debugging.  */
+  base_target = current_target;
+  push_target (&aix_thread_ops);
+  pd_able = 1;
+
+  /* If we're debugging a core file or an attached inferior, the
+     pthread library may already have been initialized, so try to
+     activate thread debugging.  */
+  pd_activate (1);
+}
+
+/* Undo the effects of pd_enable().  */
+
+static void
+pd_disable (void)
+{
+  if (!pd_able)
+    return;
+  if (pd_active)
+    pd_deactivate ();
+  pd_able = 0;
+  unpush_target (&aix_thread_ops);
+}
+
+/* target_new_objfile_hook callback.
+
+   If OBJFILE is non-null, check whether a threaded application is
+   being debugged, and if so, prepare for thread debugging.
+
+   If OBJFILE is null, stop debugging threads.  */
+
+static void
+new_objfile (struct objfile *objfile)
+{
+  if (objfile)
+    pd_enable ();
+  else
+    pd_disable ();
+
+  if (target_new_objfile_chain)
+    target_new_objfile_chain (objfile);
+}
+
+/* Attach to process specified by ARGS.  */
+
+static void
+aix_thread_attach (char *args, int from_tty)
+{
+  base_target.to_attach (args, from_tty);
+  pd_activate (1);
+}
+
+/* Detach from the process attached to by aix_thread_attach().  */
+
+static void
+aix_thread_detach (char *args, int from_tty)
+{
+  pd_disable ();
+  base_target.to_detach (args, from_tty);
+}
+
+/* Tell the inferior process to continue running thread PID if != -1
+   and all threads otherwise.  */
+
+static void
+aix_thread_resume (ptid_t ptid, int step, enum target_signal sig)
+{
+  struct thread_info *thread;
+  pthdb_tid_t tid[2];
+
+  if (!PD_TID (ptid))
+    {
+      struct cleanup *cleanup = save_inferior_ptid ();
+      inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
+      base_target.to_resume (ptid, step, sig);
+      do_cleanups (cleanup);
+    }
+  else
+    {
+      thread = find_thread_pid (ptid);
+      if (!thread)
+	error ("aix-thread resume: unknown pthread %ld", 
+	       TIDGET (ptid));
+
+      tid[0] = thread->private->tid;
+      if (tid[0] == PTHDB_INVALID_TID)
+	error ("aix-thread resume: no tid for pthread %ld", 
+	       TIDGET (ptid));
+      tid[1] = 0;
+
+      if (arch64)
+	ptrace64aix (PTT_CONTINUE, tid[0], 1, 
+		     target_signal_to_host (sig), (int *) tid);
+      else
+	ptrace32 (PTT_CONTINUE, tid[0], (int *) 1,
+		  target_signal_to_host (sig), (int *) tid);
+    }
+}
+
+/* Wait for thread/process ID if != -1 or for any thread otherwise.
+   If an error occurs, return -1, else return the pid of the stopped
+   thread.  */
+
+static ptid_t
+aix_thread_wait (ptid_t ptid, struct target_waitstatus *status)
+{
+  struct cleanup *cleanup = save_inferior_ptid ();
+
+  pid_to_prc (&ptid);
+
+  inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
+  ptid = base_target.to_wait (ptid, status);
+  do_cleanups (cleanup);
+
+  if (PIDGET (ptid) == -1)
+    return pid_to_ptid (-1);
+
+  /* Check whether libpthdebug might be ready to be initialized.  */
+  if (!pd_active && status->kind == TARGET_WAITKIND_STOPPED &&
+      status->value.sig == TARGET_SIGNAL_TRAP &&
+      read_pc_pid (ptid) - DECR_PC_AFTER_BREAK == pd_brk_addr)
+    return pd_activate (0);
+
+  return pd_update (0);
+}
+
+/* Record that the 64-bit general-purpose registers contain VALS.  */
+
+static void
+supply_gprs64 (uint64_t *vals)
+{
+  int regno;
+
+  for (regno = 0; regno < 32; regno++)
+    supply_register (regno, (char *) (vals + regno));
+}
+
+/* Record that 32-bit register REGNO contains VAL.  */
+
+static void
+supply_reg32 (int regno, uint32_t val)
+{
+  supply_register (regno, (char *) &val);
+}
+
+/* Record that the floating-point registers contain VALS.  */
+
+static void
+supply_fprs (double *vals)
+{
+  int regno;
+
+  for (regno = 0; regno < 32; regno++)
+    supply_register (regno + FP0_REGNUM, (char *) (vals + regno));
+}
+
+/* Predicate to test whether given register number is a "special" register.  */
+static int
+special_register_p (int regno)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  return regno == PC_REGNUM
+      || regno == tdep->ppc_ps_regnum
+      || regno == tdep->ppc_cr_regnum
+      || regno == tdep->ppc_lr_regnum
+      || regno == tdep->ppc_ctr_regnum
+      || regno == tdep->ppc_xer_regnum
+      || regno == tdep->ppc_fpscr_regnum
+      || (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum);
+}
+
+
+/* Record that the special registers contain the specified 64-bit and
+   32-bit values.  */
+
+static void
+supply_sprs64 (uint64_t iar, uint64_t msr, uint32_t cr,
+	       uint64_t lr, uint64_t ctr, uint32_t xer,
+	       uint32_t fpscr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  supply_register (PC_REGNUM,     (char *) &iar);
+  supply_register (tdep->ppc_ps_regnum, (char *) &msr);
+  supply_register (tdep->ppc_cr_regnum, (char *) &cr);
+  supply_register (tdep->ppc_lr_regnum, (char *) &lr);
+  supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
+  supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+  supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+}
+
+/* Record that the special registers contain the specified 32-bit
+   values.  */
+
+static void
+supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr,
+	       uint32_t lr, uint32_t ctr, uint32_t xer,
+	       uint32_t fpscr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  supply_register (PC_REGNUM,     (char *) &iar);
+  supply_register (tdep->ppc_ps_regnum, (char *) &msr);
+  supply_register (tdep->ppc_cr_regnum, (char *) &cr);
+  supply_register (tdep->ppc_lr_regnum, (char *) &lr);
+  supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
+  supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+  supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
+}
+
+/* Fetch all registers from pthread PDTID, which doesn't have a kernel
+   thread.
+
+   There's no way to query a single register from a non-kernel
+   pthread, so there's no need for a single-register version of this
+   function.  */
+
+static void
+fetch_regs_user_thread (pthdb_pthread_t pdtid)
+{
+  int status, i;
+  pthdb_context_t ctx;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"fetch_regs_user_thread %lx\n", (long) pdtid);
+  status = pthdb_pthread_context (pd_session, pdtid, &ctx);
+  if (status != PTHDB_SUCCESS)
+    error ("aix-thread: fetch_registers: pthdb_pthread_context returned %s",
+           pd_status2str (status));
+
+  /* General-purpose registers.  */
+
+  if (arch64)
+    supply_gprs64 (ctx.gpr);
+  else
+    for (i = 0; i < 32; i++)
+      supply_reg32 (i, ctx.gpr[i]);
+
+  /* Floating-point registers.  */
+
+  supply_fprs (ctx.fpr);
+
+  /* Special registers.  */
+
+  if (arch64)
+    supply_sprs64 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer,
+                   ctx.fpscr);
+  else
+    supply_sprs32 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer,
+                   ctx.fpscr);
+}
+
+/* Fetch register REGNO if != -1 or all registers otherwise from
+   kernel thread TID.
+
+   AIX provides a way to query all of a kernel thread's GPRs, FPRs, or
+   SPRs, but there's no way to query individual registers within those
+   groups.  Therefore, if REGNO != -1, this function fetches an entire
+   group.
+
+   Unfortunately, kernel thread register queries often fail with
+   EPERM, indicating that the thread is in kernel space.  This breaks
+   backtraces of threads other than the current one.  To make that
+   breakage obvious without throwing an error to top level (which is
+   bad e.g. during "info threads" output), zero registers that can't
+   be retrieved.  */
+
+static void
+fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
+{
+  uint64_t gprs64[32];
+  uint32_t gprs32[32];
+  double fprs[32];
+  struct ptxsprs sprs64;
+  struct ptsprs sprs32;
+  int i;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog,
+	"fetch_regs_kernel_thread tid=%lx regno=%d arch64=%d\n",
+	(long) tid, regno, arch64);
+
+  /* General-purpose registers.  */
+  if (regno == -1 || regno < FP0_REGNUM)
+    {
+      if (arch64)
+	{
+	  if (!ptrace64aix (PTT_READ_GPRS, tid, 
+			    (unsigned long) gprs64, 0, NULL))
+	    memset (gprs64, 0, sizeof (gprs64));
+	  supply_gprs64 (gprs64);
+	}
+      else
+	{
+	  if (!ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL))
+	    memset (gprs32, 0, sizeof (gprs32));
+	  for (i = 0; i < 32; i++)
+	    supply_reg32 (i, gprs32[i]);
+	}
+    }
+
+  /* Floating-point registers.  */
+
+  if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+    {
+      if (!ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL))
+	memset (fprs, 0, sizeof (fprs));
+      supply_fprs (fprs);
+    }
+
+  /* Special-purpose registers.  */
+
+  if (regno == -1 || special_register_p (regno))
+    {
+      if (arch64)
+	{
+	  if (!ptrace64aix (PTT_READ_SPRS, tid, 
+			    (unsigned long) &sprs64, 0, NULL))
+	    memset (&sprs64, 0, sizeof (sprs64));
+	  supply_sprs64 (sprs64.pt_iar, sprs64.pt_msr, sprs64.pt_cr,
+			 sprs64.pt_lr, sprs64.pt_ctr, sprs64.pt_xer,
+			 sprs64.pt_fpscr);
+	}
+      else
+	{
+	  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+	  if (!ptrace32 (PTT_READ_SPRS, tid, (int *) &sprs32, 0, NULL))
+	    memset (&sprs32, 0, sizeof (sprs32));
+	  supply_sprs32 (sprs32.pt_iar, sprs32.pt_msr, sprs32.pt_cr,
+			 sprs32.pt_lr, sprs32.pt_ctr, sprs32.pt_xer,
+			 sprs32.pt_fpscr);
+
+	  if (tdep->ppc_mq_regnum >= 0)
+	    supply_register (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq);
+	}
+    }
+}
+
+/* Fetch register REGNO if != -1 or all registers otherwise in the
+   thread/process specified by inferior_ptid.  */
+
+static void
+aix_thread_fetch_registers (int regno)
+{
+  struct thread_info *thread;
+  pthdb_tid_t tid;
+
+  if (!PD_TID (inferior_ptid))
+    base_target.to_fetch_registers (regno);
+  else
+    {
+      thread = find_thread_pid (inferior_ptid);
+      tid = thread->private->tid;
+
+      if (tid == PTHDB_INVALID_TID)
+	fetch_regs_user_thread (thread->private->pdtid);
+      else
+	fetch_regs_kernel_thread (regno, tid);
+    }
+}
+
+/* Store the gp registers into an array of uint32_t or uint64_t.  */
+
+static void
+fill_gprs64 (uint64_t *vals)
+{
+  int regno;
+
+  for (regno = 0; regno < FP0_REGNUM; regno++)
+    if (register_cached (regno))
+      regcache_collect (regno, vals + regno);
+}
+
+static void 
+fill_gprs32 (uint32_t *vals)
+{
+  int regno;
+
+  for (regno = 0; regno < FP0_REGNUM; regno++)
+    if (register_cached (regno))
+      regcache_collect (regno, vals + regno);
+}
+
+/* Store the floating point registers into a double array.  */
+static void
+fill_fprs (double *vals)
+{
+  int regno;
+
+  for (regno = FP0_REGNUM; regno < FPLAST_REGNUM; regno++)
+    if (register_cached (regno))
+      regcache_collect (regno, vals + regno);
+}
+
+/* Store the special registers into the specified 64-bit and 32-bit
+   locations.  */
+
+static void
+fill_sprs64 (uint64_t *iar, uint64_t *msr, uint32_t *cr,
+	     uint64_t *lr, uint64_t *ctr, uint32_t *xer,
+	     uint32_t *fpscr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  /* Verify that the size of the size of the IAR buffer is the
+     same as the raw size of the PC (in the register cache).  If
+     they're not, then either GDB has been built incorrectly, or
+     there's some other kind of internal error.  To be really safe,
+     we should check all of the sizes.   */
+  gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (PC_REGNUM));
+
+  if (register_cached (PC_REGNUM))
+    regcache_collect (PC_REGNUM, iar);
+  if (register_cached (tdep->ppc_ps_regnum))
+    regcache_collect (tdep->ppc_ps_regnum, msr);
+  if (register_cached (tdep->ppc_cr_regnum))
+    regcache_collect (tdep->ppc_cr_regnum, cr);
+  if (register_cached (tdep->ppc_lr_regnum))
+    regcache_collect (tdep->ppc_lr_regnum, lr);
+  if (register_cached (tdep->ppc_ctr_regnum))
+    regcache_collect (tdep->ppc_ctr_regnum, ctr);
+  if (register_cached (tdep->ppc_xer_regnum))
+    regcache_collect (tdep->ppc_xer_regnum, xer);
+  if (register_cached (tdep->ppc_fpscr_regnum))
+    regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+}
+
+static void
+fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr,
+	     unsigned long *lr,  unsigned long *ctr, unsigned long *xer,
+	     unsigned long *fpscr)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  /* Verify that the size of the size of the IAR buffer is the
+     same as the raw size of the PC (in the register cache).  If
+     they're not, then either GDB has been built incorrectly, or
+     there's some other kind of internal error.  To be really safe,
+     we should check all of the sizes. 
+
+     If this assert() fails, the most likely reason is that GDB was
+     built incorrectly.  In order to make use of many of the header
+     files in /usr/include/sys, GDB needs to be configured so that
+     sizeof (long) == 4).  */
+  gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (PC_REGNUM));
+
+  if (register_cached (PC_REGNUM))
+    regcache_collect (PC_REGNUM, iar);
+  if (register_cached (tdep->ppc_ps_regnum))
+    regcache_collect (tdep->ppc_ps_regnum, msr);
+  if (register_cached (tdep->ppc_cr_regnum))
+    regcache_collect (tdep->ppc_cr_regnum, cr);
+  if (register_cached (tdep->ppc_lr_regnum))
+    regcache_collect (tdep->ppc_lr_regnum, lr);
+  if (register_cached (tdep->ppc_ctr_regnum))
+    regcache_collect (tdep->ppc_ctr_regnum, ctr);
+  if (register_cached (tdep->ppc_xer_regnum))
+    regcache_collect (tdep->ppc_xer_regnum, xer);
+  if (register_cached (tdep->ppc_fpscr_regnum))
+    regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
+}
+
+/* Store all registers into pthread PDTID, which doesn't have a kernel
+   thread.
+
+   It's possible to store a single register into a non-kernel pthread,
+   but I doubt it's worth the effort.  */
+
+static void
+store_regs_user_thread (pthdb_pthread_t pdtid)
+{
+  int status, i;
+  pthdb_context_t ctx;
+  uint32_t int32;
+  uint64_t int64;
+  double   dbl;
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"store_regs_user_thread %lx\n", (long) pdtid);
+
+  /* Retrieve the thread's current context for its non-register
+     values.  */
+  status = pthdb_pthread_context (pd_session, pdtid, &ctx);
+  if (status != PTHDB_SUCCESS)
+    error ("aix-thread: store_registers: pthdb_pthread_context returned %s",
+           pd_status2str (status));
+
+  /* Collect general-purpose register values from the regcache.  */
+
+  for (i = 0; i < 32; i++)
+    if (register_cached (i))
+      {
+	if (arch64)
+	  {
+	    regcache_collect (i, (void *) &int64);
+	    ctx.gpr[i] = int64;
+	  }
+	else
+	  {
+	    regcache_collect (i, (void *) &int32);
+	    ctx.gpr[i] = int32;
+	  }
+      }
+
+  /* Collect floating-point register values from the regcache.  */
+  fill_fprs (ctx.fpr);
+
+  /* Special registers (always kept in ctx as 64 bits).  */
+  if (arch64)
+    {
+      fill_sprs64 (&ctx.iar, &ctx.msr, &ctx.cr, &ctx.lr, &ctx.ctr, &ctx.xer,
+                   &ctx.fpscr);
+    }
+  else
+    {
+      /* Problem: ctx.iar etc. are 64 bits, but raw_registers are 32.
+	 Solution: use 32-bit temp variables.  (The assert() in fill_sprs32()
+	 will fail if the size of an unsigned long is incorrect.  If this
+	 happens, GDB needs to be reconfigured so that longs are 32-bits.)  */
+      unsigned long tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer,
+                    tmp_fpscr;
+      struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+      fill_sprs32 (&tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr, &tmp_xer,
+                   &tmp_fpscr);
+      if (register_cached (PC_REGNUM))
+	ctx.iar = tmp_iar;
+      if (register_cached (tdep->ppc_ps_regnum))
+	ctx.msr = tmp_msr;
+      if (register_cached (tdep->ppc_cr_regnum))
+	ctx.cr  = tmp_cr;
+      if (register_cached (tdep->ppc_lr_regnum))
+	ctx.lr  = tmp_lr;
+      if (register_cached (tdep->ppc_ctr_regnum))
+	ctx.ctr = tmp_ctr;
+      if (register_cached (tdep->ppc_xer_regnum))
+	ctx.xer = tmp_xer;
+      if (register_cached (tdep->ppc_xer_regnum))
+	ctx.fpscr = tmp_fpscr;
+    }
+
+  status = pthdb_pthread_setcontext (pd_session, pdtid, &ctx);
+  if (status != PTHDB_SUCCESS)
+    error ("aix-thread: store_registers: pthdb_pthread_setcontext returned %s",
+           pd_status2str (status));
+}
+
+/* Store register REGNO if != -1 or all registers otherwise into
+   kernel thread TID.
+
+   AIX provides a way to set all of a kernel thread's GPRs, FPRs, or
+   SPRs, but there's no way to set individual registers within those
+   groups.  Therefore, if REGNO != -1, this function stores an entire
+   group.  */
+
+static void
+store_regs_kernel_thread (int regno, pthdb_tid_t tid)
+{
+  uint64_t gprs64[32];
+  uint32_t gprs32[32];
+  double fprs[32];
+  struct ptxsprs sprs64;
+  struct ptsprs  sprs32;
+  int i;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (debug_aix_thread)
+    fprintf_unfiltered (gdb_stdlog, 
+			"store_regs_kernel_thread tid=%lx regno=%d\n",
+                        (long) tid, regno);
+
+  /* General-purpose registers.  */
+  if (regno == -1 || regno < FP0_REGNUM)
+    {
+      if (arch64)
+	{
+	  /* Pre-fetch: some regs may not be in the cache.  */
+	  ptrace64aix (PTT_READ_GPRS, tid, (unsigned long) gprs64, 0, NULL);
+	  fill_gprs64 (gprs64);
+	  ptrace64aix (PTT_WRITE_GPRS, tid, (unsigned long) gprs64, 0, NULL);
+	}
+      else
+	{
+	  /* Pre-fetch: some regs may not be in the cache.  */
+	  ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL);
+	  fill_gprs32 (gprs32);
+	  ptrace32 (PTT_WRITE_GPRS, tid, gprs32, 0, NULL);
+	}
+    }
+
+  /* Floating-point registers.  */
+
+  if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
+    {
+      /* Pre-fetch: some regs may not be in the cache.  */
+      ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);
+      fill_fprs (fprs);
+      ptrace32 (PTT_WRITE_FPRS, tid, (int *) fprs, 0, NULL);
+    }
+
+  /* Special-purpose registers.  */
+
+  if (regno == -1 || special_register_p (regno))
+    {
+      if (arch64)
+	{
+	  /* Pre-fetch: some registers won't be in the cache.  */
+	  ptrace64aix (PTT_READ_SPRS, tid, 
+		       (unsigned long) &sprs64, 0, NULL);
+	  fill_sprs64 (&sprs64.pt_iar, &sprs64.pt_msr, &sprs64.pt_cr,
+		       &sprs64.pt_lr,  &sprs64.pt_ctr, &sprs64.pt_xer,
+		       &sprs64.pt_fpscr);
+	  ptrace64aix (PTT_WRITE_SPRS, tid, 
+		       (unsigned long) &sprs64, 0, NULL);
+	}
+      else
+	{
+	  /* Pre-fetch: some registers won't be in the cache.  */
+	  ptrace32 (PTT_READ_SPRS, tid, (int *) &sprs32, 0, NULL);
+
+	  fill_sprs32 (&sprs32.pt_iar, &sprs32.pt_msr, &sprs32.pt_cr,
+		       &sprs32.pt_lr,  &sprs32.pt_ctr, &sprs32.pt_xer,
+		       &sprs32.pt_fpscr);
+
+	  if (tdep->ppc_mq_regnum >= 0)
+	    if (register_cached (tdep->ppc_mq_regnum))
+	      regcache_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
+
+	  ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL);
+	}
+    }
+}
+
+/* Store gdb's current view of the register set into the
+   thread/process specified by inferior_ptid.  */
+
+static void
+aix_thread_store_registers (int regno)
+{
+  struct thread_info *thread;
+  pthdb_tid_t tid;
+
+  if (!PD_TID (inferior_ptid))
+    base_target.to_store_registers (regno);
+  else
+    {
+      thread = find_thread_pid (inferior_ptid);
+      tid = thread->private->tid;
+
+      if (tid == PTHDB_INVALID_TID)
+	store_regs_user_thread (thread->private->pdtid);
+      else
+	store_regs_kernel_thread (regno, tid);
+    }
+}
+
+/* Transfer LEN bytes of memory from GDB address MYADDR to target
+   address MEMADDR if WRITE and vice versa otherwise.  */
+
+static int
+aix_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+		      struct mem_attrib *attrib,
+		      struct target_ops *target)
+{
+  int n;
+  struct cleanup *cleanup = save_inferior_ptid ();
+
+  inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
+  n = base_target.to_xfer_memory (memaddr, myaddr, len, 
+				  write, attrib, &base_target);
+  do_cleanups (cleanup);
+
+  return n;
+}
+
+/* Kill and forget about the inferior process.  */
+
+static void
+aix_thread_kill (void)
+{
+  struct cleanup *cleanup = save_inferior_ptid ();
+
+  inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
+  base_target.to_kill ();
+  do_cleanups (cleanup);
+}
+
+/* Clean up after the inferior exits.  */
+
+static void
+aix_thread_mourn_inferior (void)
+{
+  pd_deactivate ();
+  base_target.to_mourn_inferior ();
+}
+
+/* Return whether thread PID is still valid.  */
+
+static int
+aix_thread_thread_alive (ptid_t ptid)
+{
+  if (!PD_TID (ptid))
+    return base_target.to_thread_alive (ptid);
+
+  /* We update the thread list every time the child stops, so all
+     valid threads should be in the thread list.  */
+  return in_thread_list (ptid);
+}
+
+/* Return a printable representation of composite PID for use in
+   "info threads" output.  */
+
+static char *
+aix_thread_pid_to_str (ptid_t ptid)
+{
+  static char *ret = NULL;
+
+  if (!PD_TID (ptid))
+    return base_target.to_pid_to_str (ptid);
+
+  /* Free previous return value; a new one will be allocated by
+     xasprintf().  */
+  xfree (ret);
+
+  xasprintf (&ret, "Thread %ld", ptid_get_tid (ptid));
+  return ret;
+}
+
+/* Return a printable representation of extra information about
+   THREAD, for use in "info threads" output.  */
+
+static char *
+aix_thread_extra_thread_info (struct thread_info *thread)
+{
+  struct ui_file *buf;
+  int status;
+  pthdb_pthread_t pdtid;
+  pthdb_tid_t tid;
+  pthdb_state_t state;
+  pthdb_suspendstate_t suspendstate;
+  pthdb_detachstate_t detachstate;
+  int cancelpend;
+  long length;
+  static char *ret = NULL;
+
+  if (!PD_TID (thread->ptid))
+    return NULL;
+
+  buf = mem_fileopen ();
+
+  pdtid = thread->private->pdtid;
+  tid = thread->private->tid;
+
+  if (tid != PTHDB_INVALID_TID)
+    fprintf_unfiltered (buf, "tid %d", tid);
+
+  status = pthdb_pthread_state (pd_session, pdtid, &state);
+  if (status != PTHDB_SUCCESS)
+    state = PST_NOTSUP;
+  fprintf_unfiltered (buf, ", %s", state2str (state));
+
+  status = pthdb_pthread_suspendstate (pd_session, pdtid, 
+				       &suspendstate);
+  if (status == PTHDB_SUCCESS && suspendstate == PSS_SUSPENDED)
+    fprintf_unfiltered (buf, ", suspended");
+
+  status = pthdb_pthread_detachstate (pd_session, pdtid, 
+				      &detachstate);
+  if (status == PTHDB_SUCCESS && detachstate == PDS_DETACHED)
+    fprintf_unfiltered (buf, ", detached");
+
+  pthdb_pthread_cancelpend (pd_session, pdtid, &cancelpend);
+  if (status == PTHDB_SUCCESS && cancelpend)
+    fprintf_unfiltered (buf, ", cancel pending");
+
+  ui_file_write (buf, "", 1);
+
+  xfree (ret);			/* Free old buffer.  */
+
+  ret = ui_file_xstrdup (buf, &length);
+  ui_file_delete (buf);
+
+  return ret;
+}
+
+/* Initialize target aix_thread_ops.  */
+
+static void
+init_aix_thread_ops (void)
+{
+  aix_thread_ops.to_shortname          = "aix-threads";
+  aix_thread_ops.to_longname           = "AIX pthread support";
+  aix_thread_ops.to_doc                = "AIX pthread support";
+
+  aix_thread_ops.to_attach             = aix_thread_attach;
+  aix_thread_ops.to_detach             = aix_thread_detach;
+  aix_thread_ops.to_resume             = aix_thread_resume;
+  aix_thread_ops.to_wait               = aix_thread_wait;
+  aix_thread_ops.to_fetch_registers    = aix_thread_fetch_registers;
+  aix_thread_ops.to_store_registers    = aix_thread_store_registers;
+  aix_thread_ops.to_xfer_memory        = aix_thread_xfer_memory;
+  /* No need for aix_thread_ops.to_create_inferior, because we activate thread
+     debugging when the inferior reaches pd_brk_addr.  */
+  aix_thread_ops.to_kill               = aix_thread_kill;
+  aix_thread_ops.to_mourn_inferior     = aix_thread_mourn_inferior;
+  aix_thread_ops.to_thread_alive       = aix_thread_thread_alive;
+  aix_thread_ops.to_pid_to_str         = aix_thread_pid_to_str;
+  aix_thread_ops.to_extra_thread_info  = aix_thread_extra_thread_info;
+  aix_thread_ops.to_stratum            = thread_stratum;
+  aix_thread_ops.to_magic              = OPS_MAGIC;
+}
+
+/* Module startup initialization function, automagically called by
+   init.c.  */
+
+void
+_initialize_aix_thread (void)
+{
+  init_aix_thread_ops ();
+  add_target (&aix_thread_ops);
+
+  /* Notice when object files get loaded and unloaded.  */
+  target_new_objfile_chain = target_new_objfile_hook;
+  target_new_objfile_hook = new_objfile;
+
+  add_show_from_set (add_set_cmd ("aix-thread", no_class, var_zinteger,
+				  (char *) &debug_aix_thread, 
+				  "Set debugging of AIX thread module.\n"
+                                  "Enables printf debugging output.\n",
+				  &setdebuglist),
+		                  &showdebuglist);
+}
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index 1232051..ece5e26 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -58,6 +58,10 @@
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
+  /* The next/step support via procfs on OSF1 is broken when running
+     on multi-processor machines. We need to use software single stepping
+     instead.  */
+  set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
 
   tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame;
   tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index efafcc9..7018d39 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -53,9 +53,8 @@
     alpha_register_convert_to_virtual;
 static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw;
 static gdbarch_store_struct_return_ftype alpha_store_struct_return;
-static gdbarch_extract_return_value_ftype alpha_extract_return_value;
-static gdbarch_store_return_value_ftype alpha_store_return_value;
-static gdbarch_extract_struct_value_address_ftype
+static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value;
+static gdbarch_deprecated_extract_struct_value_address_ftype
     alpha_extract_struct_value_address;
 static gdbarch_use_struct_convention_ftype alpha_use_struct_convention;
 
@@ -65,7 +64,6 @@
 static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
 
 static gdbarch_skip_prologue_ftype alpha_skip_prologue;
-static gdbarch_get_saved_register_ftype alpha_get_saved_register;
 static gdbarch_saved_pc_after_call_ftype alpha_saved_pc_after_call;
 static gdbarch_frame_chain_ftype alpha_frame_chain;
 static gdbarch_frame_saved_pc_ftype alpha_frame_saved_pc;
@@ -277,7 +275,7 @@
 }
 
 
-static char *
+static const char *
 alpha_register_name (int regno)
 {
   static char *register_names[] =
@@ -501,54 +499,6 @@
   return read_next_frame_reg (frame, pcreg);
 }
 
-static void
-alpha_get_saved_register (char *raw_buffer,
-			  int *optimized,
-			  CORE_ADDR *addrp,
-			  struct frame_info *frame,
-			  int regnum,
-			  enum lval_type *lval)
-{
-  CORE_ADDR addr;
-
-  if (!target_has_registers)
-    error ("No registers.");
-
-  /* Normal systems don't optimize out things with register numbers.  */
-  if (optimized != NULL)
-    *optimized = 0;
-  addr = find_saved_register (frame, regnum);
-  if (addr != 0)
-    {
-      if (lval != NULL)
-	*lval = lval_memory;
-      if (regnum == SP_REGNUM)
-	{
-	  if (raw_buffer != NULL)
-	    {
-	      /* Put it back in target format.  */
-	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			     (LONGEST) addr);
-	    }
-	  if (addrp != NULL)
-	    *addrp = 0;
-	  return;
-	}
-      if (raw_buffer != NULL)
-	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  else
-    {
-      if (lval != NULL)
-	*lval = lval_register;
-      addr = REGISTER_BYTE (regnum);
-      if (raw_buffer != NULL)
-	read_register_gen (regnum, raw_buffer);
-    }
-  if (addrp != NULL)
-    *addrp = addr;
-}
-
 static CORE_ADDR
 alpha_saved_pc_after_call (struct frame_info *frame)
 {
@@ -649,11 +599,13 @@
 		     struct frame_info *next_frame)
 {
   CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
+  CORE_ADDR vfp = sp;
   CORE_ADDR cur_pc;
   int frame_size;
   int has_frame_reg = 0;
   unsigned long reg_mask = 0;
   int pcreg = -1;
+  int regno;
 
   if (start_pc == 0)
     return NULL;
@@ -678,7 +630,12 @@
       if ((word & 0xffff0000) == 0x23de0000)	/* lda $sp,n($sp) */
 	{
 	  if (word & 0x8000)
-	    frame_size += (-word) & 0xffff;
+          {
+            /* Consider only the first stack allocation instruction
+               to contain the static size of the frame. */
+            if (frame_size == 0)
+	        frame_size += (-word) & 0xffff;
+          }
 	  else
 	    /* Exit loop if a positive stack adjustment is found, which
 	       usually means that the stack cleanup code in the function
@@ -690,7 +647,16 @@
 	{
 	  int reg = (word & 0x03e00000) >> 21;
 	  reg_mask |= 1 << reg;
-	  temp_saved_regs[reg] = sp + (short) word;
+
+          /* Do not compute the address where the register was saved yet,
+             because we don't know yet if the offset will need to be
+             relative to $sp or $fp (we can not compute the address relative
+             to $sp if $sp is updated during the execution of the current
+             subroutine, for instance when doing some alloca). So just store
+             the offset for the moment, and compute the address later
+             when we know whether this frame has a frame pointer or not.
+           */
+          temp_saved_regs[reg] = (short) word;
 
 	  /* Starting with OSF/1-3.2C, the system libraries are shipped
 	     without local symbols, but they still contain procedure
@@ -719,8 +685,15 @@
 	}
       else if ((word & 0xffe0ffff) == 0x6be08001)	/* ret zero,reg,1 */
 	pcreg = (word >> 16) & 0x1f;
-      else if (word == 0x47de040f)	/* bis sp,sp fp */
-	has_frame_reg = 1;
+      else if (word == 0x47de040f || word == 0x47fe040f) /* bis sp,sp fp */
+        {
+          /* ??? I am not sure what instruction is 0x47fe040f, and I
+             am suspecting that there was a typo and should have been
+             0x47fe040f. I'm keeping it in the test above until further
+             investigation */
+	    has_frame_reg = 1;
+          vfp = read_next_frame_reg (next_frame, ALPHA_GCC_FP_REGNUM);
+        }
     }
   if (pcreg == -1)
     {
@@ -759,6 +732,18 @@
     PROC_FRAME_REG (&temp_proc_desc) = ALPHA_GCC_FP_REGNUM;
   else
     PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
+
+  /* At this point, we know which of the Stack Pointer or the Frame Pointer
+     to use as the reference address to compute the saved registers address.
+     But in both cases, the processing above has set vfp to this reference
+     address, so just need to increment the offset of each saved register
+     by this address. */
+  for (regno = 0; regno < NUM_REGS; regno++)
+    {
+      if (reg_mask & 1 << regno)
+	temp_saved_regs[regno] += vfp;
+    }
+
   PROC_FRAME_OFFSET (&temp_proc_desc) = frame_size;
   PROC_REG_MASK (&temp_proc_desc) = reg_mask;
   PROC_PC_REG (&temp_proc_desc) = (pcreg == -1) ? ALPHA_RA_REGNUM : pcreg;
@@ -1869,14 +1854,13 @@
   set_gdbarch_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
-  set_gdbarch_get_saved_register (gdbarch, alpha_get_saved_register);
 
   set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
-  set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
 
   set_gdbarch_store_struct_return (gdbarch, alpha_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch,
+  set_gdbarch_deprecated_store_return_value (gdbarch, alpha_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
 					    alpha_extract_struct_value_address);
 
   /* Settings for calling functions in the inferior.  */
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index cab7721..5c44915 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -1,737 +1,738 @@
-/* ARC target-dependent stuff.
-   Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "floatformat.h"
-#include "symtab.h"
-#include "gdbcmd.h"
-#include "regcache.h"
-
-/* Local functions */
-
-static int arc_set_cpu_type (char *str);
-
-/* Current CPU, set with the "set cpu" command.  */
-static int arc_bfd_mach_type;
-char *arc_cpu_type;
-char *tmp_arc_cpu_type;
-
-/* Table of cpu names.  */
-struct
-  {
-    char *name;
-    int value;
-  }
-arc_cpu_type_table[] =
-{
-  { "arc5", bfd_mach_arc_5 },
-  { "arc6", bfd_mach_arc_6 },
-  { "arc7", bfd_mach_arc_7 },
-  { "arc8", bfd_mach_arc_8 },
-  {  NULL,  0 }
-};
-
-/* Used by simulator.  */
-int display_pipeline_p;
-int cpu_timer;
-/* This one must have the same type as used in the emulator.
-   It's currently an enum so this should be ok for now.  */
-int debug_pipeline_p;
-
-#define ARC_CALL_SAVED_REG(r) ((r) >= 16 && (r) < 24)
-
-#define OPMASK	0xf8000000
-
-/* Instruction field accessor macros.
-   See the Programmer's Reference Manual.  */
-#define X_OP(i) (((i) >> 27) & 0x1f)
-#define X_A(i) (((i) >> 21) & 0x3f)
-#define X_B(i) (((i) >> 15) & 0x3f)
-#define X_C(i) (((i) >> 9) & 0x3f)
-#define X_D(i) ((((i) & 0x1ff) ^ 0x100) - 0x100)
-#define X_L(i) (((((i) >> 5) & 0x3ffffc) ^ 0x200000) - 0x200000)
-#define X_N(i) (((i) >> 5) & 3)
-#define X_Q(i) ((i) & 0x1f)
-
-/* Return non-zero if X is a short immediate data indicator.  */
-#define SHIMM_P(x) ((x) == 61 || (x) == 63)
-
-/* Return non-zero if X is a "long" (32 bit) immediate data indicator.  */
-#define LIMM_P(x) ((x) == 62)
-
-/* Build a simple instruction.  */
-#define BUILD_INSN(op, a, b, c, d) \
-  ((((op) & 31) << 27) \
-   | (((a) & 63) << 21) \
-   | (((b) & 63) << 15) \
-   | (((c) & 63) << 9) \
-   | ((d) & 511))
-
-/* Codestream stuff.  */
-static void codestream_read (unsigned int *, int);
-static void codestream_seek (CORE_ADDR);
-static unsigned int codestream_fill (int);
-
-#define CODESTREAM_BUFSIZ 16
-static CORE_ADDR codestream_next_addr;
-static CORE_ADDR codestream_addr;
-/* FIXME assumes sizeof (int) == 32? */
-static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
-static int codestream_off;
-static int codestream_cnt;
-
-#define codestream_tell() \
-  (codestream_addr + codestream_off * sizeof (codestream_buf[0]))
-#define codestream_peek() \
-  (codestream_cnt == 0 \
-   ? codestream_fill (1) \
-   : codestream_buf[codestream_off])
-#define codestream_get() \
-  (codestream_cnt-- == 0 \
-   ? codestream_fill (0) \
-   : codestream_buf[codestream_off++])
-
-static unsigned int
-codestream_fill (int peek_flag)
-{
-  codestream_addr = codestream_next_addr;
-  codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
-  codestream_off = 0;
-  codestream_cnt = CODESTREAM_BUFSIZ;
-  read_memory (codestream_addr, (char *) codestream_buf,
-	       CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
-  /* FIXME: check return code?  */
-
-
-  /* Handle byte order differences -> convert to host byte ordering.  */
-  {
-    int i;
-    for (i = 0; i < CODESTREAM_BUFSIZ; i++)
-      codestream_buf[i] =
-	extract_unsigned_integer (&codestream_buf[i],
-				  sizeof (codestream_buf[i]));
-  }
-
-  if (peek_flag)
-    return codestream_peek ();
-  else
-    return codestream_get ();
-}
-
-static void
-codestream_seek (CORE_ADDR place)
-{
-  codestream_next_addr = place / CODESTREAM_BUFSIZ;
-  codestream_next_addr *= CODESTREAM_BUFSIZ;
-  codestream_cnt = 0;
-  codestream_fill (1);
-  while (codestream_tell () != place)
-    codestream_get ();
-}
-
-/* This function is currently unused but leave in for now.  */
-
-static void
-codestream_read (unsigned int *buf, int count)
-{
-  unsigned int *p;
-  int i;
-  p = buf;
-  for (i = 0; i < count; i++)
-    *p++ = codestream_get ();
-}
-
-/* Set up prologue scanning and return the first insn.  */
-
-static unsigned int
-setup_prologue_scan (CORE_ADDR pc)
-{
-  unsigned int insn;
-
-  codestream_seek (pc);
-  insn = codestream_get ();
-
-  return insn;
-}
-
-/*
- * Find & return amount a local space allocated, and advance codestream to
- * first register push (if any).
- * If entry sequence doesn't make sense, return -1, and leave 
- * codestream pointer random.
- */
-
-static long
-arc_get_frame_setup (CORE_ADDR pc)
-{
-  unsigned int insn;
-  /* Size of frame or -1 if unrecognizable prologue.  */
-  int frame_size = -1;
-  /* An initial "sub sp,sp,N" may or may not be for a stdarg fn.  */
-  int maybe_stdarg_decr = -1;
-
-  insn = setup_prologue_scan (pc);
-
-  /* The authority for what appears here is the home-grown ABI.
-     The most recent version is 1.2.  */
-
-  /* First insn may be "sub sp,sp,N" if stdarg fn.  */
-  if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
-      == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
-    {
-      maybe_stdarg_decr = X_D (insn);
-      insn = codestream_get ();
-    }
-
-  if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st blink,[sp,4] */
-      == BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
-    {
-      insn = codestream_get ();
-      /* Frame may not be necessary, even though blink is saved.
-         At least this is something we recognize.  */
-      frame_size = 0;
-    }
-
-  if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st fp,[sp] */
-      == BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
-    {
-      insn = codestream_get ();
-      if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
-	  != BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
-	return -1;
-
-      /* Check for stack adjustment sub sp,sp,N.  */
-      insn = codestream_peek ();
-      if ((insn & BUILD_INSN (-1, -1, -1, 0, 0))
-	  == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, 0, 0))
-	{
-	  if (LIMM_P (X_C (insn)))
-	    frame_size = codestream_get ();
-	  else if (SHIMM_P (X_C (insn)))
-	    frame_size = X_D (insn);
-	  else
-	    return -1;
-	  if (frame_size < 0)
-	    return -1;
-
-	  codestream_get ();
-
-	  /* This sequence is used to get the address of the return
-	     buffer for a function that returns a structure.  */
-	  insn = codestream_peek ();
-	  if ((insn & OPMASK) == 0x60000000)
-	    codestream_get ();
-	}
-      /* Frameless fn.  */
-      else
-	{
-	  frame_size = 0;
-	}
-    }
-
-  /* If we found a "sub sp,sp,N" and nothing else, it may or may not be a
-     stdarg fn.  The stdarg decrement is not treated as part of the frame size,
-     so we have a dilemma: what do we return?  For now, if we get a
-     "sub sp,sp,N" and nothing else assume this isn't a stdarg fn.  One way
-     to fix this completely would be to add a bit to the function descriptor
-     that says the function is a stdarg function.  */
-
-  if (frame_size < 0 && maybe_stdarg_decr > 0)
-    return maybe_stdarg_decr;
-  return frame_size;
-}
-
-/* Given a pc value, skip it forward past the function prologue by
-   disassembling instructions that appear to be a prologue.
-
-   If FRAMELESS_P is set, we are only testing to see if the function
-   is frameless.  If it is a frameless function, return PC unchanged.
-   This allows a quicker answer.  */
-
-CORE_ADDR
-arc_skip_prologue (CORE_ADDR pc, int frameless_p)
-{
-  unsigned int insn;
-  int i, frame_size;
-
-  if ((frame_size = arc_get_frame_setup (pc)) < 0)
-    return (pc);
-
-  if (frameless_p)
-    return frame_size == 0 ? pc : codestream_tell ();
-
-  /* Skip over register saves.  */
-  for (i = 0; i < 8; i++)
-    {
-      insn = codestream_peek ();
-      if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
-	  != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
-	break;			/* not st insn */
-      if (!ARC_CALL_SAVED_REG (X_C (insn)))
-	break;
-      codestream_get ();
-    }
-
-  return codestream_tell ();
-}
-
-/* Is the prologue at PC frameless?  */
-
-int
-arc_prologue_frameless_p (CORE_ADDR pc)
-{
-  return (pc == arc_skip_prologue (pc, 1));
-}
-
-/* Return the return address for a frame.
-   This is used to implement FRAME_SAVED_PC.
-   This is taken from frameless_look_for_prologue.  */
-
-CORE_ADDR
-arc_frame_saved_pc (struct frame_info *frame)
-{
-  CORE_ADDR func_start;
-  unsigned int insn;
-
-  func_start = get_pc_function_start (frame->pc) + FUNCTION_START_OFFSET;
-  if (func_start == 0)
-    {
-      /* Best guess.  */
-      return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
-    }
-
-  /* The authority for what appears here is the home-grown ABI.
-     The most recent version is 1.2.  */
-
-  insn = setup_prologue_scan (func_start);
-
-  /* First insn may be "sub sp,sp,N" if stdarg fn.  */
-  if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
-      == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
-    insn = codestream_get ();
-
-  /* If the next insn is "st blink,[sp,4]" we can get blink from there.
-     Otherwise this is a leaf function and we can use blink.  Note that
-     this still allows for the case where a leaf function saves/clobbers/
-     restores blink.  */
-
-  if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st blink,[sp,4] */
-      != BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
-    return ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM));
-  else
-    return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
-}
-
-/*
- * Parse the first few instructions of the function to see
- * what registers were stored.
- *
- * The startup sequence can be at the start of the function.
- * 'st blink,[sp+4], st fp,[sp], mov fp,sp' 
- *
- * Local space is allocated just below by sub sp,sp,nnn.
- * Next, the registers used by this function are stored (as offsets from sp).
- */
-
-void
-frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
-{
-  long locals;
-  unsigned int insn;
-  CORE_ADDR dummy_bottom;
-  CORE_ADDR adr;
-  int i, regnum, offset;
-
-  memset (fsrp, 0, sizeof *fsrp);
-
-  /* If frame is the end of a dummy, compute where the beginning would be.  */
-  dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
-
-  /* Check if the PC is in the stack, in a dummy frame.  */
-  if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
-    {
-      /* all regs were saved by push_call_dummy () */
-      adr = fip->frame;
-      for (i = 0; i < NUM_REGS; i++)
-	{
-	  adr -= REGISTER_RAW_SIZE (i);
-	  fsrp->regs[i] = adr;
-	}
-      return;
-    }
-
-  locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
-
-  if (locals >= 0)
-    {
-      /* Set `adr' to the value of `sp'.  */
-      adr = fip->frame - locals;
-      for (i = 0; i < 8; i++)
-	{
-	  insn = codestream_get ();
-	  if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
-	      != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
-	    break;
-	  regnum = X_C (insn);
-	  offset = X_D (insn);
-	  fsrp->regs[regnum] = adr + offset;
-	}
-    }
-
-  fsrp->regs[PC_REGNUM] = fip->frame + 4;
-  fsrp->regs[FP_REGNUM] = fip->frame;
-}
-
-void
-arc_push_dummy_frame (void)
-{
-  CORE_ADDR sp = read_register (SP_REGNUM);
-  int regnum;
-  char regbuf[MAX_REGISTER_RAW_SIZE];
-
-  read_register_gen (PC_REGNUM, regbuf);
-  write_memory (sp + 4, regbuf, REGISTER_SIZE);
-  read_register_gen (FP_REGNUM, regbuf);
-  write_memory (sp, regbuf, REGISTER_SIZE);
-  write_register (FP_REGNUM, sp);
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    {
-      read_register_gen (regnum, regbuf);
-      sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
-    }
-  sp += (2 * REGISTER_SIZE);
-  write_register (SP_REGNUM, sp);
-}
-
-void
-arc_pop_frame (void)
-{
-  struct frame_info *frame = get_current_frame ();
-  CORE_ADDR fp;
-  int regnum;
-  struct frame_saved_regs fsr;
-  char regbuf[MAX_REGISTER_RAW_SIZE];
-
-  fp = FRAME_FP (frame);
-  get_frame_saved_regs (frame, &fsr);
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    {
-      CORE_ADDR adr;
-      adr = fsr.regs[regnum];
-      if (adr)
-	{
-	  read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum));
-	  write_register_bytes (REGISTER_BYTE (regnum), regbuf,
-				REGISTER_RAW_SIZE (regnum));
-	}
-    }
-  write_register (FP_REGNUM, read_memory_integer (fp, 4));
-  write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
-  write_register (SP_REGNUM, fp + 8);
-  flush_cached_frames ();
-}
-
-/* Simulate single-step.  */
-
-typedef enum
-{
-  NORMAL4,			/* a normal 4 byte insn */
-  NORMAL8,			/* a normal 8 byte insn */
-  BRANCH4,			/* a 4 byte branch insn, including ones without delay slots */
-  BRANCH8,			/* an 8 byte branch insn, including ones with delay slots */
-}
-insn_type;
-
-/* Return the type of INSN and store in TARGET the destination address of a
-   branch if this is one.  */
-/* ??? Need to verify all cases are properly handled.  */
-
-static insn_type
-get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
-{
-  unsigned long limm;
-
-  switch (insn >> 27)
-    {
-    case 0:
-    case 1:
-    case 2:			/* load/store insns */
-      if (LIMM_P (X_A (insn))
-	  || LIMM_P (X_B (insn))
-	  || LIMM_P (X_C (insn)))
-	return NORMAL8;
-      return NORMAL4;
-    case 4:
-    case 5:
-    case 6:			/* branch insns */
-      *target = pc + 4 + X_L (insn);
-      /* ??? It isn't clear that this is always the right answer.
-         The problem occurs when the next insn is an 8 byte insn.  If the
-         branch is conditional there's no worry as there shouldn't be an 8
-         byte insn following.  The programmer may be cheating if s/he knows
-         the branch will never be taken, but we don't deal with that.
-         Note that the programmer is also allowed to play games by putting
-         an insn with long immediate data in the delay slot and then duplicate
-         the long immediate data at the branch target.  Ugh!  */
-      if (X_N (insn) == 0)
-	return BRANCH4;
-      return BRANCH8;
-    case 7:			/* jump insns */
-      if (LIMM_P (X_B (insn)))
-	{
-	  limm = read_memory_integer (pc + 4, 4);
-	  *target = ARC_PC_TO_REAL_ADDRESS (limm);
-	  return BRANCH8;
-	}
-      if (SHIMM_P (X_B (insn)))
-	*target = ARC_PC_TO_REAL_ADDRESS (X_D (insn));
-      else
-	*target = ARC_PC_TO_REAL_ADDRESS (read_register (X_B (insn)));
-      if (X_Q (insn) == 0 && X_N (insn) == 0)
-	return BRANCH4;
-      return BRANCH8;
-    default:			/* arithmetic insns, etc. */
-      if (LIMM_P (X_A (insn))
-	  || LIMM_P (X_B (insn))
-	  || LIMM_P (X_C (insn)))
-	return NORMAL8;
-      return NORMAL4;
-    }
-}
-
-/* single_step() is called just before we want to resume the inferior, if we
-   want to single-step it but there is no hardware or kernel single-step
-   support.  We find all the possible targets of the coming instruction and
-   breakpoint them.
-
-   single_step is also called just after the inferior stops.  If we had
-   set up a simulated single-step, we undo our damage.  */
-
-void
-arc_software_single_step (enum target_signal ignore,	/* sig but we don't need it */
-			  int insert_breakpoints_p)
-{
-  static CORE_ADDR next_pc, target;
-  static int brktrg_p;
-  typedef char binsn_quantum[BREAKPOINT_MAX];
-  static binsn_quantum break_mem[2];
-
-  if (insert_breakpoints_p)
-    {
-      insn_type type;
-      CORE_ADDR pc;
-      unsigned long insn;
-
-      pc = read_register (PC_REGNUM);
-      insn = read_memory_integer (pc, 4);
-      type = get_insn_type (insn, pc, &target);
-
-      /* Always set a breakpoint for the insn after the branch.  */
-      next_pc = pc + ((type == NORMAL8 || type == BRANCH8) ? 8 : 4);
-      target_insert_breakpoint (next_pc, break_mem[0]);
-
-      brktrg_p = 0;
-
-      if ((type == BRANCH4 || type == BRANCH8)
-      /* Watch out for branches to the following location.
-         We just stored a breakpoint there and another call to
-         target_insert_breakpoint will think the real insn is the
-         breakpoint we just stored there.  */
-	  && target != next_pc)
-	{
-	  brktrg_p = 1;
-	  target_insert_breakpoint (target, break_mem[1]);
-	}
-
-    }
-  else
-    {
-      /* Remove breakpoints.  */
-      target_remove_breakpoint (next_pc, break_mem[0]);
-
-      if (brktrg_p)
-	target_remove_breakpoint (target, break_mem[1]);
-
-      /* Fix the pc.  */
-      stop_pc -= DECR_PC_AFTER_BREAK;
-      write_pc (stop_pc);
-    }
-}
-
-/* Because of Multi-arch, GET_LONGJMP_TARGET is always defined.  So test
-   for a definition of JB_PC.  */
-#ifdef JB_PC
-/* Figure out where the longjmp will land.  Slurp the args out of the stack.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into PC.
-   This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
-  CORE_ADDR sp, jb_addr;
-
-  sp = read_register (SP_REGNUM);
-
-  if (target_read_memory (sp + SP_ARG0,		/* Offset of first arg on stack */
-			  buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
-    return 0;
-
-  jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
-  if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
-    return 0;
-
-  *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
-  return 1;
-}
-#endif /* GET_LONGJMP_TARGET */
-
-/* Disassemble one instruction.  */
-
-static int
-arc_print_insn (bfd_vma vma, disassemble_info *info)
-{
-  static int current_mach;
-  static int current_endian;
-  static disassembler_ftype current_disasm;
-
-  if (current_disasm == NULL
-      || arc_bfd_mach_type != current_mach
-      || TARGET_BYTE_ORDER != current_endian)
-    {
-      current_mach = arc_bfd_mach_type;
-      current_endian = TARGET_BYTE_ORDER;
-      current_disasm = arc_get_disassembler (NULL);
-    }
-
-  return (*current_disasm) (vma, info);
-}
-
-/* Command to set cpu type.  */
-
-void
-arc_set_cpu_type_command (char *args, int from_tty)
-{
-  int i;
-
-  if (tmp_arc_cpu_type == NULL || *tmp_arc_cpu_type == '\0')
-    {
-      printf_unfiltered ("The known ARC cpu types are as follows:\n");
-      for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
-	printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
-
-      /* Restore the value.  */
-      tmp_arc_cpu_type = xstrdup (arc_cpu_type);
-
-      return;
-    }
-
-  if (!arc_set_cpu_type (tmp_arc_cpu_type))
-    {
-      error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
-      /* Restore its value.  */
-      tmp_arc_cpu_type = xstrdup (arc_cpu_type);
-    }
-}
-
-static void
-arc_show_cpu_type_command (char *args, int from_tty)
-{
-}
-
-/* Modify the actual cpu type.
-   Result is a boolean indicating success.  */
-
-static int
-arc_set_cpu_type (char *str)
-{
-  int i, j;
-
-  if (str == NULL)
-    return 0;
-
-  for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
-    {
-      if (strcasecmp (str, arc_cpu_type_table[i].name) == 0)
-	{
-	  arc_cpu_type = str;
-	  arc_bfd_mach_type = arc_cpu_type_table[i].value;
-	  return 1;
-	}
-    }
-
-  return 0;
-}
-
-void
-_initialize_arc_tdep (void)
-{
-  struct cmd_list_element *c;
-
-  c = add_set_cmd ("cpu", class_support, var_string_noescape,
-		   (char *) &tmp_arc_cpu_type,
-		   "Set the type of ARC cpu in use.\n\
-This command has two purposes.  In a multi-cpu system it lets one\n\
-change the cpu being debugged.  It also gives one access to\n\
-cpu-type-specific registers and recognize cpu-type-specific instructions.\
-",
-		   &setlist);
-  set_cmd_cfunc (c, arc_set_cpu_type_command);
-  c = add_show_from_set (c, &showlist);
-  set_cmd_cfunc (c, arc_show_cpu_type_command);
-
-  /* We have to use xstrdup() here because the `set' command frees it
-     before setting a new value.  */
-  tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
-  arc_set_cpu_type (tmp_arc_cpu_type);
-
-  c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
-		   (char *) &display_pipeline_p,
-		   "Set pipeline display (simulator only).\n\
-When enabled, the state of the pipeline after each cycle is displayed.",
-		   &setlist);
-  c = add_show_from_set (c, &showlist);
-
-  c = add_set_cmd ("debugpipeline", class_support, var_zinteger,
-		   (char *) &debug_pipeline_p,
-		   "Set pipeline debug display (simulator only).\n\
-When enabled, debugging information about the pipeline is displayed.",
-		   &setlist);
-  c = add_show_from_set (c, &showlist);
-
-  c = add_set_cmd ("cputimer", class_support, var_zinteger,
-		   (char *) &cpu_timer,
-		   "Set maximum cycle count (simulator only).\n\
-Control will return to gdb if the timer expires.\n\
-A negative value disables the timer.",
-		   &setlist);
-  c = add_show_from_set (c, &showlist);
-
-  tm_print_insn = arc_print_insn;
-}
+// OBSOLETE /* ARC target-dependent stuff.
+// OBSOLETE    Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE 
+// OBSOLETE /* Local functions */
+// OBSOLETE 
+// OBSOLETE static int arc_set_cpu_type (char *str);
+// OBSOLETE 
+// OBSOLETE /* Current CPU, set with the "set cpu" command.  */
+// OBSOLETE static int arc_bfd_mach_type;
+// OBSOLETE char *arc_cpu_type;
+// OBSOLETE char *tmp_arc_cpu_type;
+// OBSOLETE 
+// OBSOLETE /* Table of cpu names.  */
+// OBSOLETE struct
+// OBSOLETE   {
+// OBSOLETE     char *name;
+// OBSOLETE     int value;
+// OBSOLETE   }
+// OBSOLETE arc_cpu_type_table[] =
+// OBSOLETE {
+// OBSOLETE   { "arc5", bfd_mach_arc_5 },
+// OBSOLETE   { "arc6", bfd_mach_arc_6 },
+// OBSOLETE   { "arc7", bfd_mach_arc_7 },
+// OBSOLETE   { "arc8", bfd_mach_arc_8 },
+// OBSOLETE   {  NULL,  0 }
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Used by simulator.  */
+// OBSOLETE int display_pipeline_p;
+// OBSOLETE int cpu_timer;
+// OBSOLETE /* This one must have the same type as used in the emulator.
+// OBSOLETE    It's currently an enum so this should be ok for now.  */
+// OBSOLETE int debug_pipeline_p;
+// OBSOLETE 
+// OBSOLETE #define ARC_CALL_SAVED_REG(r) ((r) >= 16 && (r) < 24)
+// OBSOLETE 
+// OBSOLETE #define OPMASK	0xf8000000
+// OBSOLETE 
+// OBSOLETE /* Instruction field accessor macros.
+// OBSOLETE    See the Programmer's Reference Manual.  */
+// OBSOLETE #define X_OP(i) (((i) >> 27) & 0x1f)
+// OBSOLETE #define X_A(i) (((i) >> 21) & 0x3f)
+// OBSOLETE #define X_B(i) (((i) >> 15) & 0x3f)
+// OBSOLETE #define X_C(i) (((i) >> 9) & 0x3f)
+// OBSOLETE #define X_D(i) ((((i) & 0x1ff) ^ 0x100) - 0x100)
+// OBSOLETE #define X_L(i) (((((i) >> 5) & 0x3ffffc) ^ 0x200000) - 0x200000)
+// OBSOLETE #define X_N(i) (((i) >> 5) & 3)
+// OBSOLETE #define X_Q(i) ((i) & 0x1f)
+// OBSOLETE 
+// OBSOLETE /* Return non-zero if X is a short immediate data indicator.  */
+// OBSOLETE #define SHIMM_P(x) ((x) == 61 || (x) == 63)
+// OBSOLETE 
+// OBSOLETE /* Return non-zero if X is a "long" (32 bit) immediate data indicator.  */
+// OBSOLETE #define LIMM_P(x) ((x) == 62)
+// OBSOLETE 
+// OBSOLETE /* Build a simple instruction.  */
+// OBSOLETE #define BUILD_INSN(op, a, b, c, d) \
+// OBSOLETE   ((((op) & 31) << 27) \
+// OBSOLETE    | (((a) & 63) << 21) \
+// OBSOLETE    | (((b) & 63) << 15) \
+// OBSOLETE    | (((c) & 63) << 9) \
+// OBSOLETE    | ((d) & 511))
+// OBSOLETE 
+// OBSOLETE /* Codestream stuff.  */
+// OBSOLETE static void codestream_read (unsigned int *, int);
+// OBSOLETE static void codestream_seek (CORE_ADDR);
+// OBSOLETE static unsigned int codestream_fill (int);
+// OBSOLETE 
+// OBSOLETE #define CODESTREAM_BUFSIZ 16
+// OBSOLETE static CORE_ADDR codestream_next_addr;
+// OBSOLETE static CORE_ADDR codestream_addr;
+// OBSOLETE /* FIXME assumes sizeof (int) == 32? */
+// OBSOLETE static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
+// OBSOLETE static int codestream_off;
+// OBSOLETE static int codestream_cnt;
+// OBSOLETE 
+// OBSOLETE #define codestream_tell() \
+// OBSOLETE   (codestream_addr + codestream_off * sizeof (codestream_buf[0]))
+// OBSOLETE #define codestream_peek() \
+// OBSOLETE   (codestream_cnt == 0 \
+// OBSOLETE    ? codestream_fill (1) \
+// OBSOLETE    : codestream_buf[codestream_off])
+// OBSOLETE #define codestream_get() \
+// OBSOLETE   (codestream_cnt-- == 0 \
+// OBSOLETE    ? codestream_fill (0) \
+// OBSOLETE    : codestream_buf[codestream_off++])
+// OBSOLETE 
+// OBSOLETE static unsigned int
+// OBSOLETE codestream_fill (int peek_flag)
+// OBSOLETE {
+// OBSOLETE   codestream_addr = codestream_next_addr;
+// OBSOLETE   codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
+// OBSOLETE   codestream_off = 0;
+// OBSOLETE   codestream_cnt = CODESTREAM_BUFSIZ;
+// OBSOLETE   read_memory (codestream_addr, (char *) codestream_buf,
+// OBSOLETE 	       CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
+// OBSOLETE   /* FIXME: check return code?  */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Handle byte order differences -> convert to host byte ordering.  */
+// OBSOLETE   {
+// OBSOLETE     int i;
+// OBSOLETE     for (i = 0; i < CODESTREAM_BUFSIZ; i++)
+// OBSOLETE       codestream_buf[i] =
+// OBSOLETE 	extract_unsigned_integer (&codestream_buf[i],
+// OBSOLETE 				  sizeof (codestream_buf[i]));
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   if (peek_flag)
+// OBSOLETE     return codestream_peek ();
+// OBSOLETE   else
+// OBSOLETE     return codestream_get ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE codestream_seek (CORE_ADDR place)
+// OBSOLETE {
+// OBSOLETE   codestream_next_addr = place / CODESTREAM_BUFSIZ;
+// OBSOLETE   codestream_next_addr *= CODESTREAM_BUFSIZ;
+// OBSOLETE   codestream_cnt = 0;
+// OBSOLETE   codestream_fill (1);
+// OBSOLETE   while (codestream_tell () != place)
+// OBSOLETE     codestream_get ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* This function is currently unused but leave in for now.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE codestream_read (unsigned int *buf, int count)
+// OBSOLETE {
+// OBSOLETE   unsigned int *p;
+// OBSOLETE   int i;
+// OBSOLETE   p = buf;
+// OBSOLETE   for (i = 0; i < count; i++)
+// OBSOLETE     *p++ = codestream_get ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set up prologue scanning and return the first insn.  */
+// OBSOLETE 
+// OBSOLETE static unsigned int
+// OBSOLETE setup_prologue_scan (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE   unsigned int insn;
+// OBSOLETE 
+// OBSOLETE   codestream_seek (pc);
+// OBSOLETE   insn = codestream_get ();
+// OBSOLETE 
+// OBSOLETE   return insn;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Find & return amount a local space allocated, and advance codestream to
+// OBSOLETE  * first register push (if any).
+// OBSOLETE  * If entry sequence doesn't make sense, return -1, and leave 
+// OBSOLETE  * codestream pointer random.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static long
+// OBSOLETE arc_get_frame_setup (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE   unsigned int insn;
+// OBSOLETE   /* Size of frame or -1 if unrecognizable prologue.  */
+// OBSOLETE   int frame_size = -1;
+// OBSOLETE   /* An initial "sub sp,sp,N" may or may not be for a stdarg fn.  */
+// OBSOLETE   int maybe_stdarg_decr = -1;
+// OBSOLETE 
+// OBSOLETE   insn = setup_prologue_scan (pc);
+// OBSOLETE 
+// OBSOLETE   /* The authority for what appears here is the home-grown ABI.
+// OBSOLETE      The most recent version is 1.2.  */
+// OBSOLETE 
+// OBSOLETE   /* First insn may be "sub sp,sp,N" if stdarg fn.  */
+// OBSOLETE   if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE       == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
+// OBSOLETE     {
+// OBSOLETE       maybe_stdarg_decr = X_D (insn);
+// OBSOLETE       insn = codestream_get ();
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st blink,[sp,4] */
+// OBSOLETE       == BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
+// OBSOLETE     {
+// OBSOLETE       insn = codestream_get ();
+// OBSOLETE       /* Frame may not be necessary, even though blink is saved.
+// OBSOLETE          At least this is something we recognize.  */
+// OBSOLETE       frame_size = 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st fp,[sp] */
+// OBSOLETE       == BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
+// OBSOLETE     {
+// OBSOLETE       insn = codestream_get ();
+// OBSOLETE       if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE 	  != BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
+// OBSOLETE 	return -1;
+// OBSOLETE 
+// OBSOLETE       /* Check for stack adjustment sub sp,sp,N.  */
+// OBSOLETE       insn = codestream_peek ();
+// OBSOLETE       if ((insn & BUILD_INSN (-1, -1, -1, 0, 0))
+// OBSOLETE 	  == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, 0, 0))
+// OBSOLETE 	{
+// OBSOLETE 	  if (LIMM_P (X_C (insn)))
+// OBSOLETE 	    frame_size = codestream_get ();
+// OBSOLETE 	  else if (SHIMM_P (X_C (insn)))
+// OBSOLETE 	    frame_size = X_D (insn);
+// OBSOLETE 	  else
+// OBSOLETE 	    return -1;
+// OBSOLETE 	  if (frame_size < 0)
+// OBSOLETE 	    return -1;
+// OBSOLETE 
+// OBSOLETE 	  codestream_get ();
+// OBSOLETE 
+// OBSOLETE 	  /* This sequence is used to get the address of the return
+// OBSOLETE 	     buffer for a function that returns a structure.  */
+// OBSOLETE 	  insn = codestream_peek ();
+// OBSOLETE 	  if ((insn & OPMASK) == 0x60000000)
+// OBSOLETE 	    codestream_get ();
+// OBSOLETE 	}
+// OBSOLETE       /* Frameless fn.  */
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  frame_size = 0;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* If we found a "sub sp,sp,N" and nothing else, it may or may not be a
+// OBSOLETE      stdarg fn.  The stdarg decrement is not treated as part of the frame size,
+// OBSOLETE      so we have a dilemma: what do we return?  For now, if we get a
+// OBSOLETE      "sub sp,sp,N" and nothing else assume this isn't a stdarg fn.  One way
+// OBSOLETE      to fix this completely would be to add a bit to the function descriptor
+// OBSOLETE      that says the function is a stdarg function.  */
+// OBSOLETE 
+// OBSOLETE   if (frame_size < 0 && maybe_stdarg_decr > 0)
+// OBSOLETE     return maybe_stdarg_decr;
+// OBSOLETE   return frame_size;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given a pc value, skip it forward past the function prologue by
+// OBSOLETE    disassembling instructions that appear to be a prologue.
+// OBSOLETE 
+// OBSOLETE    If FRAMELESS_P is set, we are only testing to see if the function
+// OBSOLETE    is frameless.  If it is a frameless function, return PC unchanged.
+// OBSOLETE    This allows a quicker answer.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE arc_skip_prologue (CORE_ADDR pc, int frameless_p)
+// OBSOLETE {
+// OBSOLETE   unsigned int insn;
+// OBSOLETE   int i, frame_size;
+// OBSOLETE 
+// OBSOLETE   if ((frame_size = arc_get_frame_setup (pc)) < 0)
+// OBSOLETE     return (pc);
+// OBSOLETE 
+// OBSOLETE   if (frameless_p)
+// OBSOLETE     return frame_size == 0 ? pc : codestream_tell ();
+// OBSOLETE 
+// OBSOLETE   /* Skip over register saves.  */
+// OBSOLETE   for (i = 0; i < 8; i++)
+// OBSOLETE     {
+// OBSOLETE       insn = codestream_peek ();
+// OBSOLETE       if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
+// OBSOLETE 	  != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
+// OBSOLETE 	break;			/* not st insn */
+// OBSOLETE       if (!ARC_CALL_SAVED_REG (X_C (insn)))
+// OBSOLETE 	break;
+// OBSOLETE       codestream_get ();
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return codestream_tell ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Is the prologue at PC frameless?  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE arc_prologue_frameless_p (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE   return (pc == arc_skip_prologue (pc, 1));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the return address for a frame.
+// OBSOLETE    This is used to implement FRAME_SAVED_PC.
+// OBSOLETE    This is taken from frameless_look_for_prologue.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE arc_frame_saved_pc (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR func_start;
+// OBSOLETE   unsigned int insn;
+// OBSOLETE 
+// OBSOLETE   func_start = get_pc_function_start (frame->pc) + FUNCTION_START_OFFSET;
+// OBSOLETE   if (func_start == 0)
+// OBSOLETE     {
+// OBSOLETE       /* Best guess.  */
+// OBSOLETE       return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* The authority for what appears here is the home-grown ABI.
+// OBSOLETE      The most recent version is 1.2.  */
+// OBSOLETE 
+// OBSOLETE   insn = setup_prologue_scan (func_start);
+// OBSOLETE 
+// OBSOLETE   /* First insn may be "sub sp,sp,N" if stdarg fn.  */
+// OBSOLETE   if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE       == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
+// OBSOLETE     insn = codestream_get ();
+// OBSOLETE 
+// OBSOLETE   /* If the next insn is "st blink,[sp,4]" we can get blink from there.
+// OBSOLETE      Otherwise this is a leaf function and we can use blink.  Note that
+// OBSOLETE      this still allows for the case where a leaf function saves/clobbers/
+// OBSOLETE      restores blink.  */
+// OBSOLETE 
+// OBSOLETE   if ((insn & BUILD_INSN (-1, 0, -1, -1, -1))	/* st blink,[sp,4] */
+// OBSOLETE       != BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
+// OBSOLETE     return ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM));
+// OBSOLETE   else
+// OBSOLETE     return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Parse the first few instructions of the function to see
+// OBSOLETE  * what registers were stored.
+// OBSOLETE  *
+// OBSOLETE  * The startup sequence can be at the start of the function.
+// OBSOLETE  * 'st blink,[sp+4], st fp,[sp], mov fp,sp' 
+// OBSOLETE  *
+// OBSOLETE  * Local space is allocated just below by sub sp,sp,nnn.
+// OBSOLETE  * Next, the registers used by this function are stored (as offsets from sp).
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
+// OBSOLETE {
+// OBSOLETE   long locals;
+// OBSOLETE   unsigned int insn;
+// OBSOLETE   CORE_ADDR dummy_bottom;
+// OBSOLETE   CORE_ADDR adr;
+// OBSOLETE   int i, regnum, offset;
+// OBSOLETE 
+// OBSOLETE   memset (fsrp, 0, sizeof *fsrp);
+// OBSOLETE 
+// OBSOLETE   /* If frame is the end of a dummy, compute where the beginning would be.  */
+// OBSOLETE   dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
+// OBSOLETE 
+// OBSOLETE   /* Check if the PC is in the stack, in a dummy frame.  */
+// OBSOLETE   if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
+// OBSOLETE     {
+// OBSOLETE       /* all regs were saved by push_call_dummy () */
+// OBSOLETE       adr = fip->frame;
+// OBSOLETE       for (i = 0; i < NUM_REGS; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  adr -= REGISTER_RAW_SIZE (i);
+// OBSOLETE 	  fsrp->regs[i] = adr;
+// OBSOLETE 	}
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
+// OBSOLETE 
+// OBSOLETE   if (locals >= 0)
+// OBSOLETE     {
+// OBSOLETE       /* Set `adr' to the value of `sp'.  */
+// OBSOLETE       adr = fip->frame - locals;
+// OBSOLETE       for (i = 0; i < 8; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  insn = codestream_get ();
+// OBSOLETE 	  if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
+// OBSOLETE 	      != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
+// OBSOLETE 	    break;
+// OBSOLETE 	  regnum = X_C (insn);
+// OBSOLETE 	  offset = X_D (insn);
+// OBSOLETE 	  fsrp->regs[regnum] = adr + offset;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   fsrp->regs[PC_REGNUM] = fip->frame + 4;
+// OBSOLETE   fsrp->regs[FP_REGNUM] = fip->frame;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE arc_push_dummy_frame (void)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR sp = read_register (SP_REGNUM);
+// OBSOLETE   int regnum;
+// OBSOLETE   char regbuf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE 
+// OBSOLETE   read_register_gen (PC_REGNUM, regbuf);
+// OBSOLETE   write_memory (sp + 4, regbuf, REGISTER_SIZE);
+// OBSOLETE   read_register_gen (FP_REGNUM, regbuf);
+// OBSOLETE   write_memory (sp, regbuf, REGISTER_SIZE);
+// OBSOLETE   write_register (FP_REGNUM, sp);
+// OBSOLETE   for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE     {
+// OBSOLETE       read_register_gen (regnum, regbuf);
+// OBSOLETE       sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
+// OBSOLETE     }
+// OBSOLETE   sp += (2 * REGISTER_SIZE);
+// OBSOLETE   write_register (SP_REGNUM, sp);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE arc_pop_frame (void)
+// OBSOLETE {
+// OBSOLETE   struct frame_info *frame = get_current_frame ();
+// OBSOLETE   CORE_ADDR fp;
+// OBSOLETE   int regnum;
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE   char regbuf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE 
+// OBSOLETE   fp = FRAME_FP (frame);
+// OBSOLETE   get_frame_saved_regs (frame, &fsr);
+// OBSOLETE   for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE     {
+// OBSOLETE       CORE_ADDR adr;
+// OBSOLETE       adr = fsr.regs[regnum];
+// OBSOLETE       if (adr)
+// OBSOLETE 	{
+// OBSOLETE 	  read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum));
+// OBSOLETE 	  write_register_bytes (REGISTER_BYTE (regnum), regbuf,
+// OBSOLETE 				REGISTER_RAW_SIZE (regnum));
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   write_register (FP_REGNUM, read_memory_integer (fp, 4));
+// OBSOLETE   write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
+// OBSOLETE   write_register (SP_REGNUM, fp + 8);
+// OBSOLETE   flush_cached_frames ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Simulate single-step.  */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE   NORMAL4,			/* a normal 4 byte insn */
+// OBSOLETE   NORMAL8,			/* a normal 8 byte insn */
+// OBSOLETE   BRANCH4,			/* a 4 byte branch insn, including ones without delay slots */
+// OBSOLETE   BRANCH8,			/* an 8 byte branch insn, including ones with delay slots */
+// OBSOLETE }
+// OBSOLETE insn_type;
+// OBSOLETE 
+// OBSOLETE /* Return the type of INSN and store in TARGET the destination address of a
+// OBSOLETE    branch if this is one.  */
+// OBSOLETE /* ??? Need to verify all cases are properly handled.  */
+// OBSOLETE 
+// OBSOLETE static insn_type
+// OBSOLETE get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
+// OBSOLETE {
+// OBSOLETE   unsigned long limm;
+// OBSOLETE 
+// OBSOLETE   switch (insn >> 27)
+// OBSOLETE     {
+// OBSOLETE     case 0:
+// OBSOLETE     case 1:
+// OBSOLETE     case 2:			/* load/store insns */
+// OBSOLETE       if (LIMM_P (X_A (insn))
+// OBSOLETE 	  || LIMM_P (X_B (insn))
+// OBSOLETE 	  || LIMM_P (X_C (insn)))
+// OBSOLETE 	return NORMAL8;
+// OBSOLETE       return NORMAL4;
+// OBSOLETE     case 4:
+// OBSOLETE     case 5:
+// OBSOLETE     case 6:			/* branch insns */
+// OBSOLETE       *target = pc + 4 + X_L (insn);
+// OBSOLETE       /* ??? It isn't clear that this is always the right answer.
+// OBSOLETE          The problem occurs when the next insn is an 8 byte insn.  If the
+// OBSOLETE          branch is conditional there's no worry as there shouldn't be an 8
+// OBSOLETE          byte insn following.  The programmer may be cheating if s/he knows
+// OBSOLETE          the branch will never be taken, but we don't deal with that.
+// OBSOLETE          Note that the programmer is also allowed to play games by putting
+// OBSOLETE          an insn with long immediate data in the delay slot and then duplicate
+// OBSOLETE          the long immediate data at the branch target.  Ugh!  */
+// OBSOLETE       if (X_N (insn) == 0)
+// OBSOLETE 	return BRANCH4;
+// OBSOLETE       return BRANCH8;
+// OBSOLETE     case 7:			/* jump insns */
+// OBSOLETE       if (LIMM_P (X_B (insn)))
+// OBSOLETE 	{
+// OBSOLETE 	  limm = read_memory_integer (pc + 4, 4);
+// OBSOLETE 	  *target = ARC_PC_TO_REAL_ADDRESS (limm);
+// OBSOLETE 	  return BRANCH8;
+// OBSOLETE 	}
+// OBSOLETE       if (SHIMM_P (X_B (insn)))
+// OBSOLETE 	*target = ARC_PC_TO_REAL_ADDRESS (X_D (insn));
+// OBSOLETE       else
+// OBSOLETE 	*target = ARC_PC_TO_REAL_ADDRESS (read_register (X_B (insn)));
+// OBSOLETE       if (X_Q (insn) == 0 && X_N (insn) == 0)
+// OBSOLETE 	return BRANCH4;
+// OBSOLETE       return BRANCH8;
+// OBSOLETE     default:			/* arithmetic insns, etc. */
+// OBSOLETE       if (LIMM_P (X_A (insn))
+// OBSOLETE 	  || LIMM_P (X_B (insn))
+// OBSOLETE 	  || LIMM_P (X_C (insn)))
+// OBSOLETE 	return NORMAL8;
+// OBSOLETE       return NORMAL4;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* single_step() is called just before we want to resume the inferior, if we
+// OBSOLETE    want to single-step it but there is no hardware or kernel single-step
+// OBSOLETE    support.  We find all the possible targets of the coming instruction and
+// OBSOLETE    breakpoint them.
+// OBSOLETE 
+// OBSOLETE    single_step is also called just after the inferior stops.  If we had
+// OBSOLETE    set up a simulated single-step, we undo our damage.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE arc_software_single_step (enum target_signal ignore,	/* sig but we don't need it */
+// OBSOLETE 			  int insert_breakpoints_p)
+// OBSOLETE {
+// OBSOLETE   static CORE_ADDR next_pc, target;
+// OBSOLETE   static int brktrg_p;
+// OBSOLETE   typedef char binsn_quantum[BREAKPOINT_MAX];
+// OBSOLETE   static binsn_quantum break_mem[2];
+// OBSOLETE 
+// OBSOLETE   if (insert_breakpoints_p)
+// OBSOLETE     {
+// OBSOLETE       insn_type type;
+// OBSOLETE       CORE_ADDR pc;
+// OBSOLETE       unsigned long insn;
+// OBSOLETE 
+// OBSOLETE       pc = read_register (PC_REGNUM);
+// OBSOLETE       insn = read_memory_integer (pc, 4);
+// OBSOLETE       type = get_insn_type (insn, pc, &target);
+// OBSOLETE 
+// OBSOLETE       /* Always set a breakpoint for the insn after the branch.  */
+// OBSOLETE       next_pc = pc + ((type == NORMAL8 || type == BRANCH8) ? 8 : 4);
+// OBSOLETE       target_insert_breakpoint (next_pc, break_mem[0]);
+// OBSOLETE 
+// OBSOLETE       brktrg_p = 0;
+// OBSOLETE 
+// OBSOLETE       if ((type == BRANCH4 || type == BRANCH8)
+// OBSOLETE       /* Watch out for branches to the following location.
+// OBSOLETE          We just stored a breakpoint there and another call to
+// OBSOLETE          target_insert_breakpoint will think the real insn is the
+// OBSOLETE          breakpoint we just stored there.  */
+// OBSOLETE 	  && target != next_pc)
+// OBSOLETE 	{
+// OBSOLETE 	  brktrg_p = 1;
+// OBSOLETE 	  target_insert_breakpoint (target, break_mem[1]);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* Remove breakpoints.  */
+// OBSOLETE       target_remove_breakpoint (next_pc, break_mem[0]);
+// OBSOLETE 
+// OBSOLETE       if (brktrg_p)
+// OBSOLETE 	target_remove_breakpoint (target, break_mem[1]);
+// OBSOLETE 
+// OBSOLETE       /* Fix the pc.  */
+// OBSOLETE       stop_pc -= DECR_PC_AFTER_BREAK;
+// OBSOLETE       write_pc (stop_pc);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Because of Multi-arch, GET_LONGJMP_TARGET is always defined.  So test
+// OBSOLETE    for a definition of JB_PC.  */
+// OBSOLETE #ifdef JB_PC
+// OBSOLETE /* Figure out where the longjmp will land.  Slurp the args out of the stack.
+// OBSOLETE    We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE    we extract the pc (JB_PC) that we will land at.  The pc is copied into PC.
+// OBSOLETE    This routine returns true on success. */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE get_longjmp_target (CORE_ADDR *pc)
+// OBSOLETE {
+// OBSOLETE   char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+// OBSOLETE   CORE_ADDR sp, jb_addr;
+// OBSOLETE 
+// OBSOLETE   sp = read_register (SP_REGNUM);
+// OBSOLETE 
+// OBSOLETE   if (target_read_memory (sp + SP_ARG0,		/* Offset of first arg on stack */
+// OBSOLETE 			  buf,
+// OBSOLETE 			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+// OBSOLETE 
+// OBSOLETE   if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
+// OBSOLETE 			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+// OBSOLETE 
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE #endif /* GET_LONGJMP_TARGET */
+// OBSOLETE 
+// OBSOLETE /* Disassemble one instruction.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE arc_print_insn (bfd_vma vma, disassemble_info *info)
+// OBSOLETE {
+// OBSOLETE   static int current_mach;
+// OBSOLETE   static int current_endian;
+// OBSOLETE   static disassembler_ftype current_disasm;
+// OBSOLETE 
+// OBSOLETE   if (current_disasm == NULL
+// OBSOLETE       || arc_bfd_mach_type != current_mach
+// OBSOLETE       || TARGET_BYTE_ORDER != current_endian)
+// OBSOLETE     {
+// OBSOLETE       current_mach = arc_bfd_mach_type;
+// OBSOLETE       current_endian = TARGET_BYTE_ORDER;
+// OBSOLETE       current_disasm = arc_get_disassembler (NULL);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (*current_disasm) (vma, info);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Command to set cpu type.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE arc_set_cpu_type_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   if (tmp_arc_cpu_type == NULL || *tmp_arc_cpu_type == '\0')
+// OBSOLETE     {
+// OBSOLETE       printf_unfiltered ("The known ARC cpu types are as follows:\n");
+// OBSOLETE       for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
+// OBSOLETE 	printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
+// OBSOLETE 
+// OBSOLETE       /* Restore the value.  */
+// OBSOLETE       tmp_arc_cpu_type = xstrdup (arc_cpu_type);
+// OBSOLETE 
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (!arc_set_cpu_type (tmp_arc_cpu_type))
+// OBSOLETE     {
+// OBSOLETE       error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
+// OBSOLETE       /* Restore its value.  */
+// OBSOLETE       tmp_arc_cpu_type = xstrdup (arc_cpu_type);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE arc_show_cpu_type_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Modify the actual cpu type.
+// OBSOLETE    Result is a boolean indicating success.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE arc_set_cpu_type (char *str)
+// OBSOLETE {
+// OBSOLETE   int i, j;
+// OBSOLETE 
+// OBSOLETE   if (str == NULL)
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
+// OBSOLETE     {
+// OBSOLETE       if (strcasecmp (str, arc_cpu_type_table[i].name) == 0)
+// OBSOLETE 	{
+// OBSOLETE 	  arc_cpu_type = str;
+// OBSOLETE 	  arc_bfd_mach_type = arc_cpu_type_table[i].value;
+// OBSOLETE 	  return 1;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_arc_tdep (void)
+// OBSOLETE {
+// OBSOLETE   struct cmd_list_element *c;
+// OBSOLETE 
+// OBSOLETE   c = add_set_cmd ("cpu", class_support, var_string_noescape,
+// OBSOLETE 		   (char *) &tmp_arc_cpu_type,
+// OBSOLETE 		   "Set the type of ARC cpu in use.\n\
+// OBSOLETE This command has two purposes.  In a multi-cpu system it lets one\n\
+// OBSOLETE change the cpu being debugged.  It also gives one access to\n\
+// OBSOLETE cpu-type-specific registers and recognize cpu-type-specific instructions.\
+// OBSOLETE ",
+// OBSOLETE 		   &setlist);
+// OBSOLETE   set_cmd_cfunc (c, arc_set_cpu_type_command);
+// OBSOLETE   c = add_show_from_set (c, &showlist);
+// OBSOLETE   set_cmd_cfunc (c, arc_show_cpu_type_command);
+// OBSOLETE 
+// OBSOLETE   /* We have to use xstrdup() here because the `set' command frees it
+// OBSOLETE      before setting a new value.  */
+// OBSOLETE   tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
+// OBSOLETE   arc_set_cpu_type (tmp_arc_cpu_type);
+// OBSOLETE 
+// OBSOLETE   c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
+// OBSOLETE 		   (char *) &display_pipeline_p,
+// OBSOLETE 		   "Set pipeline display (simulator only).\n\
+// OBSOLETE When enabled, the state of the pipeline after each cycle is displayed.",
+// OBSOLETE 		   &setlist);
+// OBSOLETE   c = add_show_from_set (c, &showlist);
+// OBSOLETE 
+// OBSOLETE   c = add_set_cmd ("debugpipeline", class_support, var_zinteger,
+// OBSOLETE 		   (char *) &debug_pipeline_p,
+// OBSOLETE 		   "Set pipeline debug display (simulator only).\n\
+// OBSOLETE When enabled, debugging information about the pipeline is displayed.",
+// OBSOLETE 		   &setlist);
+// OBSOLETE   c = add_show_from_set (c, &showlist);
+// OBSOLETE 
+// OBSOLETE   c = add_set_cmd ("cputimer", class_support, var_zinteger,
+// OBSOLETE 		   (char *) &cpu_timer,
+// OBSOLETE 		   "Set maximum cycle count (simulator only).\n\
+// OBSOLETE Control will return to gdb if the timer expires.\n\
+// OBSOLETE A negative value disables the timer.",
+// OBSOLETE 		   &setlist);
+// OBSOLETE   c = add_show_from_set (c, &showlist);
+// OBSOLETE 
+// OBSOLETE   tm_print_insn = arc_print_insn;
+// OBSOLETE }
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index bde89a8..ecdecaf 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -29,7 +29,6 @@
 #else
 /* Just include everything in sight so that the every old definition
    of macro is visible. */
-#include "gdb_string.h"
 #include "symtab.h"
 #include "frame.h"
 #include "inferior.h"
@@ -40,8 +39,10 @@
 #include "target.h"
 #include "annotate.h"
 #endif
+#include "gdb_string.h"
 #include "regcache.h"
 #include "gdb_assert.h"
+#include "sim-regno.h"
 
 #include "version.h"
 
@@ -90,6 +91,46 @@
   return NULL;
 }
 
+/* Implementation of extract return value that grubs around in the
+   register cache.  */
+void
+legacy_extract_return_value (struct type *type, struct regcache *regcache,
+			     void *valbuf)
+{
+  char *registers = deprecated_grub_regcache_for_registers (regcache);
+  bfd_byte *buf = valbuf;
+  DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf);
+}
+
+/* Implementation of store return value that grubs the register cache.
+   Takes a local copy of the buffer to avoid const problems.  */
+void
+legacy_store_return_value (struct type *type, struct regcache *regcache,
+			   const void *buf)
+{
+  bfd_byte *b = alloca (TYPE_LENGTH (type));
+  gdb_assert (regcache == current_regcache);
+  memcpy (b, buf, TYPE_LENGTH (type));
+  DEPRECATED_STORE_RETURN_VALUE (type, b);
+}
+
+
+int
+legacy_register_sim_regno (int regnum)
+{
+  /* Only makes sense to supply raw registers.  */
+  gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+  /* NOTE: cagney/2002-05-13: The old code did it this way and it is
+     suspected that some GDB/SIM combinations may rely on this
+     behavour.  The default should be one2one_register_sim_regno
+     (below).  */
+  if (REGISTER_NAME (regnum) != NULL
+      && REGISTER_NAME (regnum)[0] != '\0')
+    return regnum;
+  else
+    return LEGACY_SIM_REGNO_IGNORE;
+}
+
 int
 generic_frameless_function_invocation_not (struct frame_info *fi)
 {
@@ -115,12 +156,18 @@
 }
 
 int
+generic_in_solib_return_trampoline (CORE_ADDR pc, char *name)
+{
+  return 0;
+}
+
+int
 generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   return 0;
 }
 
-char *
+const char *
 legacy_register_name (int i)
 {
 #ifdef REGISTER_NAMES
@@ -223,19 +270,6 @@
     }
 }
 
-void
-default_print_float_info (void)
-{
-#ifdef FLOAT_INFO
-#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
-#error "FLOAT_INFO defined in multi-arch"
-#endif
-  FLOAT_INFO;
-#else
-  printf_filtered ("No floating point info available for this processor.\n");
-#endif
-}
-
 /* Misc helper functions for targets. */
 
 int
@@ -267,13 +301,6 @@
   return 0;
 }
 
-int
-default_register_sim_regno (int num)
-{
-  return num;
-}
-
-
 CORE_ADDR
 core_addr_identity (CORE_ADDR addr)
 {
@@ -422,6 +449,23 @@
        (name && STREQ ("_sigtramp", name))
 #endif
 #endif
+
+/* Assume all registers are adjacent.  */
+
+int
+generic_register_byte (int regnum)
+{
+  int byte;
+  int i;
+  gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
+  byte = 0;
+  for (i = 0; i < regnum; i++)
+    {
+      byte += TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (i));
+    }
+  return byte;
+}
+
 
 int
 legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 594a832..91aa2f8 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -39,6 +39,13 @@
    targets that don't yet implement their own breakpoint_from_pc(). */
 extern gdbarch_breakpoint_from_pc_ftype legacy_breakpoint_from_pc;
 
+/* Implementation of extract return value that grubs around in the
+   register cache.  */
+extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
+
+/* Implementation of store return value that grubs the register cache.  */
+extern gdbarch_store_return_value_ftype legacy_store_return_value;
+
 /* Frameless functions not identifable. */
 extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_invocation_not;
 
@@ -48,7 +55,7 @@
 extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
 
 /* Map onto old REGISTER_NAMES. */
-extern char *legacy_register_name (int i);
+extern const char *legacy_register_name (int i);
 
 /* Accessor for old global function pointer for disassembly. */
 extern int legacy_print_insn (bfd_vma vma, disassemble_info *info);
@@ -94,11 +101,6 @@
 
 extern int (*target_architecture_hook) (const struct bfd_arch_info *);
 
-
-/* Default raw->sim register re-numbering - does nothing. */
-
-extern int default_register_sim_regno (int reg_nr);
-
 /* Identity function on a CORE_ADDR.  Just returns its parameter.  */
 
 extern CORE_ADDR core_addr_identity (CORE_ADDR addr);
@@ -145,15 +147,18 @@
 
 extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
 
-extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
+extern int generic_in_solib_return_trampoline (CORE_ADDR pc, char *name);
 
-extern void default_print_float_info (void);
+extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
 
 /* Assume that the world is sane, a registers raw and virtual size
    both match its type.  */
 
 extern int generic_register_size (int regnum);
 
+/* Assume that the world is sane, the registers are all adjacent.  */
+extern int generic_register_byte (int regnum);
+
 /* Prop up old targets that use various IN_SIGTRAMP() macros.  */
 extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name);
 
@@ -166,6 +171,12 @@
 extern void legacy_register_to_value (int regnum, struct type *type, char *from, char *to);
 extern void legacy_value_to_register (struct type *type, int regnum, char *from, char *to);
 
+/* For compatibility with older architectures, returns
+   (LEGACY_SIM_REGNO_IGNORE) when the register doesn't have a valid
+   name.  */
+
+extern int legacy_register_sim_regno (int regnum);
+
 /* Initialize a ``struct info''.  Can't use memset(0) since some
    default values are not zero.  */
 extern void gdbarch_info_init (struct gdbarch_info *info);
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 920d27b..cb930b6 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -532,7 +532,7 @@
 				       sizeof (arm_linux_call_dummy_words));
 
   /* The following two overrides shouldn't be needed.  */
-  set_gdbarch_extract_return_value (gdbarch, arm_linux_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, arm_linux_push_arguments);
 
   /* Shared library handling.  */
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 04fca2e..b896b68 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -36,11 +36,16 @@
 #include "solib-svr4.h"
 
 #include "arm-tdep.h"
+#include "gdb/sim-arm.h"
 
 #include "elf-bfd.h"
 #include "coff/internal.h"
 #include "elf/arm.h"
 
+#include "gdb_assert.h"
+
+static int arm_debug;
+
 /* Each OS has a different mechanism for accessing the various
    registers stored in the sigcontext structure.
 
@@ -1407,104 +1412,125 @@
 arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
 		    int struct_return, CORE_ADDR struct_addr)
 {
-  char *fp;
-  int argnum, argreg, nstack_size;
+  CORE_ADDR fp;
+  int argnum;
+  int argreg;
+  int nstack;
+  int simd_argreg;
+  int second_pass;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
   /* Walk through the list of args and determine how large a temporary
      stack is required.  Need to take care here as structs may be
-     passed on the stack, and we have to to push them.  */
-  nstack_size = -4 * REGISTER_SIZE;	/* Some arguments go into A1-A4.  */
-  if (struct_return)			/* The struct address goes in A1.  */
-    nstack_size += REGISTER_SIZE;
-
-  /* Walk through the arguments and add their size to nstack_size.  */
-  for (argnum = 0; argnum < nargs; argnum++)
+     passed on the stack, and we have to to push them.  On the second
+     pass, do the store.  */
+  nstack = 0;
+  fp = sp;
+  for (second_pass = 0; second_pass < 2; second_pass++)
     {
-      int len;
-      struct type *arg_type;
+      /* Compute the FP using the information computed during the
+         first pass.  */
+      if (second_pass)
+	fp = sp - nstack;
 
-      arg_type = check_typedef (VALUE_TYPE (args[argnum]));
-      len = TYPE_LENGTH (arg_type);
+      simd_argreg = 0;
+      argreg = ARM_A1_REGNUM;
+      nstack = 0;
 
-      nstack_size += len;
-    }
-
-  /* Allocate room on the stack, and initialize our stack frame
-     pointer.  */
-  fp = NULL;
-  if (nstack_size > 0)
-    {
-      sp -= nstack_size;
-      fp = (char *) sp;
-    }
-
-  /* Initialize the integer argument register pointer.  */
-  argreg = ARM_A1_REGNUM;
-
-  /* The struct_return pointer occupies the first parameter passing
-     register.  */
-  if (struct_return)
-    write_register (argreg++, struct_addr);
-
-  /* Process arguments from left to right.  Store as many as allowed
-     in the parameter passing registers (A1-A4), and save the rest on
-     the temporary stack.  */
-  for (argnum = 0; argnum < nargs; argnum++)
-    {
-      int len;
-      char *val;
-      CORE_ADDR regval;
-      enum type_code typecode;
-      struct type *arg_type, *target_type;
-
-      arg_type = check_typedef (VALUE_TYPE (args[argnum]));
-      target_type = TYPE_TARGET_TYPE (arg_type);
-      len = TYPE_LENGTH (arg_type);
-      typecode = TYPE_CODE (arg_type);
-      val = (char *) VALUE_CONTENTS (args[argnum]);
-
-#if 1
-      /* I don't know why this code was disable. The only logical use
-         for a function pointer is to call that function, so setting
-         the mode bit is perfectly fine.  FN */
-      /* If the argument is a pointer to a function, and it is a Thumb
-         function, set the low bit of the pointer.  */
-      if (TYPE_CODE_PTR == typecode
-	  && NULL != target_type
-	  && TYPE_CODE_FUNC == TYPE_CODE (target_type))
+      /* The struct_return pointer occupies the first parameter
+	 passing register.  */
+      if (struct_return)
 	{
-	  CORE_ADDR regval = extract_address (val, len);
-	  if (arm_pc_is_thumb (regval))
-	    store_address (val, len, MAKE_THUMB_ADDR (regval));
+	  if (second_pass)
+	    {
+	      if (arm_debug)
+		fprintf_unfiltered (gdb_stdlog,
+				    "struct return in %s = 0x%s\n",
+				    REGISTER_NAME (argreg),
+				    paddr (struct_addr));
+	      write_register (argreg, struct_addr);
+	    }
+	  argreg++;
 	}
-#endif
-      /* Copy the argument to general registers or the stack in
-         register-sized pieces.  Large arguments are split between
-         registers and stack.  */
-      while (len > 0)
+
+      for (argnum = 0; argnum < nargs; argnum++)
 	{
-	  int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
-
-	  if (argreg <= ARM_LAST_ARG_REGNUM)
+	  int len;
+	  struct type *arg_type;
+	  struct type *target_type;
+	  enum type_code typecode;
+	  char *val;
+	  
+	  arg_type = check_typedef (VALUE_TYPE (args[argnum]));
+	  len = TYPE_LENGTH (arg_type);
+	  target_type = TYPE_TARGET_TYPE (arg_type);
+	  typecode = TYPE_CODE (arg_type);
+	  val = VALUE_CONTENTS (args[argnum]);
+	  
+	  /* If the argument is a pointer to a function, and it is a
+	     Thumb function, create a LOCAL copy of the value and set
+	     the THUMB bit in it.  */
+	  if (second_pass
+	      && TYPE_CODE_PTR == typecode
+	      && target_type != NULL
+	      && TYPE_CODE_FUNC == TYPE_CODE (target_type))
 	    {
-	      /* It's an argument being passed in a general register.  */
-	      regval = extract_address (val, partial_len);
-	      write_register (argreg++, regval);
-	    }
-	  else
-	    {
-	      /* Push the arguments onto the stack.  */
-	      write_memory ((CORE_ADDR) fp, val, REGISTER_SIZE);
-	      fp += REGISTER_SIZE;
+	      CORE_ADDR regval = extract_address (val, len);
+	      if (arm_pc_is_thumb (regval))
+		{
+		  val = alloca (len);
+		  store_address (val, len, MAKE_THUMB_ADDR (regval));
+		}
 	    }
 
-	  len -= partial_len;
-	  val += partial_len;
+	  /* Copy the argument to general registers or the stack in
+	     register-sized pieces.  Large arguments are split between
+	     registers and stack.  */
+	  while (len > 0)
+	    {
+	      int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
+	      
+	      if (argreg <= ARM_LAST_ARG_REGNUM)
+		{
+		  /* The argument is being passed in a general purpose
+		     register.  */
+		  if (second_pass)
+		    {
+		      CORE_ADDR regval = extract_address (val,
+							  partial_len);
+		      if (arm_debug)
+			fprintf_unfiltered (gdb_stdlog,
+					    "arg %d in %s = 0x%s\n",
+					    argnum,
+					    REGISTER_NAME (argreg),
+					    phex (regval, REGISTER_SIZE));
+		      write_register (argreg, regval);
+		    }
+		  argreg++;
+		}
+	      else
+		{
+		  if (second_pass)
+		    {
+		      /* Push the arguments onto the stack.  */
+		      if (arm_debug)
+			fprintf_unfiltered (gdb_stdlog,
+					    "arg %d @ 0x%s + %d\n",
+					    argnum, paddr (fp), nstack);
+		      write_memory (fp + nstack, val, REGISTER_SIZE);
+		    }
+		  nstack += REGISTER_SIZE;
+		}
+	      
+	      len -= partial_len;
+	      val += partial_len;
+	    }
+
 	}
     }
 
-  /* Return adjusted stack pointer.  */
-  return sp;
+  /* Return the botom of the argument list (pointed to by fp).  */
+  return fp;
 }
 
 /* Pop the current frame.  So long as the frame info has been
@@ -1558,7 +1584,8 @@
 /* Print interesting information about the floating point processor
    (if present) or emulator.  */
 static void
-arm_print_float_info (void)
+arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+		      struct frame_info *frame, const char *args)
 {
   register unsigned long status = read_register (ARM_FPS_REGNUM);
   int type;
@@ -1635,6 +1662,27 @@
     return STATUS_REGISTER_SIZE;
 }
 
+/* Map GDB internal REGNUM onto the Arm simulator register numbers.  */
+static int
+arm_register_sim_regno (int regnum)
+{
+  int reg = regnum;
+  gdb_assert (reg >= 0 && reg < NUM_REGS);
+
+  if (reg < NUM_GREGS)
+    return SIM_ARM_R0_REGNUM + reg;
+  reg -= NUM_GREGS;
+
+  if (reg < NUM_FREGS)
+    return SIM_ARM_FP0_REGNUM + reg;
+  reg -= NUM_FREGS;
+
+  if (reg < NUM_SREGS)
+    return SIM_ARM_FPS_REGNUM + reg;
+  reg -= NUM_SREGS;
+
+  internal_error (__FILE__, __LINE__, "Bad REGNUM %d", regnum);
+}
 
 /* NOTE: cagney/2001-08-20: Both convert_from_extended() and
    convert_to_extended() use floatformat_arm_ext_littlebyte_bigword.
@@ -2455,7 +2503,7 @@
 }
 
 /* Return the ARM register name corresponding to register I.  */
-static char *
+static const char *
 arm_register_name (int i)
 {
   return arm_register_names[i];
@@ -2869,16 +2917,19 @@
   set_gdbarch_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
   set_gdbarch_register_virtual_type (gdbarch, arm_register_type);
 
+  /* Internal <-> external register number maps.  */
+  set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno);
+
   /* Integer registers are 4 bytes.  */
   set_gdbarch_register_size (gdbarch, 4);
   set_gdbarch_register_name (gdbarch, arm_register_name);
 
   /* Returning results.  */
-  set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value);
-  set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, arm_extract_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, arm_store_return_value);
   set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
   set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
-  set_gdbarch_extract_struct_value_address (gdbarch,
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
 					    arm_extract_struct_value_address);
 
   /* Single stepping.  */
@@ -3076,4 +3127,10 @@
   prologue_cache.saved_regs = NULL;
   prologue_cache.extra_info = (struct frame_extra_info *)
     xcalloc (1, sizeof (struct frame_extra_info));
+
+  /* Debugging flag.  */
+  add_show_from_set (add_set_cmd ("arm", class_maintenance, var_zinteger,
+				  &arm_debug, "Set arm debugging.\n\
+When non-zero, arm specific debugging is enabled.", &setdebuglist),
+		     &showdebuglist);
 }
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 71c7796..b245332 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -31,6 +31,7 @@
 #include "symfile.h"
 #include "arch-utils.h"
 #include "regcache.h"
+#include "gdb_string.h"
 
 /* AVR Background:
 
@@ -158,7 +159,7 @@
 
 /* Lookup the name of a register given it's number. */
 
-static char *
+static const char *
 avr_register_name (int regnum)
 {
   static char *register_names[] = {
@@ -995,7 +996,14 @@
     {
       sal = find_pc_line (func_addr, 0);
 
-      if (sal.line != 0 && sal.end < func_end)
+      /* troth/2002-08-05: For some very simple functions, gcc doesn't
+         generate a prologue and the sal.end ends up being the 2-byte ``ret''
+         instruction at the end of the function, but func_end ends up being
+         the address of the first instruction of the _next_ function. By
+         adjusting func_end by 2 bytes, we can catch these functions and not
+         return sal.end if it is the ``ret'' instruction. */
+
+      if (sal.line != 0 && sal.end < (func_end-2))
 	return sal.end;
     }
 
@@ -1230,18 +1238,18 @@
 
   set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
   set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
-  set_gdbarch_extract_return_value (gdbarch, avr_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, avr_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
 /*    set_gdbarch_push_return_address (gdbarch, avr_push_return_address); */
   set_gdbarch_pop_frame (gdbarch, avr_pop_frame);
 
-  set_gdbarch_store_return_value (gdbarch, avr_store_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, avr_store_return_value);
 
   set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
   set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return);
-  set_gdbarch_extract_struct_value_address (gdbarch,
-					    avr_extract_struct_value_address);
+  set_gdbarch_deprecated_extract_struct_value_address
+    (gdbarch, avr_extract_struct_value_address);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, avr_scan_prologue);
   set_gdbarch_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
diff --git a/gdb/ax-general.c b/gdb/ax-general.c
index 9451837..c36c76d 100644
--- a/gdb/ax-general.c
+++ b/gdb/ax-general.c
@@ -27,6 +27,7 @@
 #include "ax.h"
 
 #include "value.h"
+#include "gdb_string.h"
 
 static void grow_expr (struct agent_expr *x, int n);
 
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 73b86e8..5a310f3 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -22,13 +22,57 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bcache.h"
 #include "gdb_string.h"		/* For memcpy declaration */
 
 #include <stddef.h>
 #include <stdlib.h>
 
+/* The type used to hold a single bcache string.  The user data is
+   stored in d.data.  Since it can be any type, it needs to have the
+   same alignment as the most strict alignment of any type on the host
+   machine.  I don't know of any really correct way to do this in
+   stock ANSI C, so just do it the same way obstack.h does.  */
+
+struct bstring
+{
+  struct bstring *next;
+  size_t length;
+
+  union
+  {
+    char data[1];
+    double dummy;
+  }
+  d;
+};
+
+
+/* The structure for a bcache itself.  The bcache is initialized, in
+   bcache_xmalloc(), by filling it with zeros and then setting the
+   corresponding obstack's malloc() and free() methods.  */
+
+struct bcache
+{
+  /* All the bstrings are allocated here.  */
+  struct obstack cache;
+
+  /* How many hash buckets we're using.  */
+  unsigned int num_buckets;
+  
+  /* Hash buckets.  This table is allocated using malloc, so when we
+     grow the table we can return the old table to the system.  */
+  struct bstring **bucket;
+
+  /* Statistics.  */
+  unsigned long unique_count;	/* number of unique strings */
+  long total_count;	/* total number of strings cached, including dups */
+  long unique_size;	/* size of unique strings, in bytes */
+  long total_size;      /* total number of bytes cached, including dups */
+  long structure_size;	/* total size of bcache, including infrastructure */
+};
+
 /* The old hash function was stolen from SDBM. This is what DB 3.0 uses now,
  * and is better than the old one. 
  */
@@ -166,19 +210,26 @@
 }
 
 
-/* Freeing bcaches.  */
+/* Allocating and freeing bcaches.  */
+
+struct bcache *
+bcache_xmalloc (void)
+{
+  /* Allocate the bcache pre-zeroed.  */
+  struct bcache *b = XCALLOC (1, struct bcache);
+  obstack_specify_allocation (&b->cache, 0, 0, xmalloc, xfree);
+  return b;
+}
 
 /* Free all the storage associated with BCACHE.  */
 void
-free_bcache (struct bcache *bcache)
+bcache_xfree (struct bcache *bcache)
 {
+  if (bcache == NULL)
+    return;
   obstack_free (&bcache->cache, 0);
-  if (bcache->bucket)
-    xfree (bcache->bucket);
-
-  /* This isn't necessary, but at least the bcache is always in a
-     consistent state.  */
-  memset (bcache, 0, sizeof (*bcache));
+  xfree (bcache->bucket);
+  xfree (bcache);
 }
 
 
@@ -291,3 +342,9 @@
   printf_filtered ("    Maximum hash chain length: %3d\n", max_chain_length);
   printf_filtered ("\n");
 }
+
+int
+bcache_memory_used (struct bcache *bcache)
+{
+  return obstack_memory_used (&bcache->cache);
+}
diff --git a/gdb/bcache.h b/gdb/bcache.h
index 2b03ead..61fbbe6 100644
--- a/gdb/bcache.h
+++ b/gdb/bcache.h
@@ -1,7 +1,8 @@
 /* Include file cached obstack implementation.
    Written by Fred Fish <fnf@cygnus.com>
    Rewritten by Jim Blandy <jimb@cygnus.com>
-   Copyright 1999, 2000 Free Software Foundation, Inc.
+
+   Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -63,68 +64,27 @@
      any chance of sharing its space with future duplicates.  */
 
 
-/* The type used to hold a single bcache string.  The user data is
-   stored in d.data.  Since it can be any type, it needs to have the
-   same alignment as the most strict alignment of any type on the host
-   machine.  I don't know of any really correct way to do this in
-   stock ANSI C, so just do it the same way obstack.h does.
-
-   It would be nicer to have this stuff hidden away in bcache.c, but
-   struct objstack contains a struct bcache directly --- not a pointer
-   to one --- and then the memory-mapped stuff makes this a real pain.
-   We don't strictly need to expose struct bstring, but it's better to
-   have it all in one place.  */
-
-struct bstring {
-  struct bstring *next;
-  size_t length;
-
-  union
-  {
-    char data[1];
-    double dummy;
-  }
-  d;
-};
-
-
-/* The structure for a bcache itself.
-   To initialize a bcache, just fill it with zeros.  */
-struct bcache {
-  /* All the bstrings are allocated here.  */
-  struct obstack cache;
-
-  /* How many hash buckets we're using.  */
-  unsigned int num_buckets;
-  
-  /* Hash buckets.  This table is allocated using malloc, so when we
-     grow the table we can return the old table to the system.  */
-  struct bstring **bucket;
-
-  /* Statistics.  */
-  unsigned long unique_count;	/* number of unique strings */
-  long total_count;	/* total number of strings cached, including dups */
-  long unique_size;	/* size of unique strings, in bytes */
-  long total_size;      /* total number of bytes cached, including dups */
-  long structure_size;	/* total size of bcache, including infrastructure */
-};
-
+struct bcache;
 
 /* Find a copy of the LENGTH bytes at ADDR in BCACHE.  If BCACHE has
    never seen those bytes before, add a copy of them to BCACHE.  In
    either case, return a pointer to BCACHE's copy of that string.  */
 extern void *bcache (const void *addr, int length, struct bcache *bcache);
 
-/* Free all the storage that BCACHE refers to.  The result is a valid,
-   but empty, bcache.  This does not free BCACHE itself, since that
-   might be part of some larger object.  */
-extern void free_bcache (struct bcache *bcache);
+/* Free all the storage used by BCACHE.  */
+extern void bcache_xfree (struct bcache *bcache);
+
+/* Create a new bcache object.  */
+extern struct bcache *bcache_xmalloc (void);
 
 /* Print statistics on BCACHE's memory usage and efficacity at
    eliminating duplication.  TYPE should be a string describing the
    kind of data BCACHE holds.  Statistics are printed using
    `printf_filtered' and its ilk.  */
 extern void print_bcache_statistics (struct bcache *bcache, char *type);
+extern int bcache_memory_used (struct bcache *bcache);
+
 /* The hash function */
 extern unsigned long hash(const void *addr, int length);
+
 #endif /* BCACHE_H */
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 706d028..b2c5d0e 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -34,9 +34,28 @@
 #include "inferior.h"		/* for read_pc */
 #include "annotate.h"
 #include "regcache.h"
+#include "gdb_assert.h"
 
 /* Prototypes for exported functions. */
 
+static void generic_call_dummy_register_unwind (struct frame_info *frame,
+						void **cache,
+						int regnum,
+						int *optimized,
+						enum lval_type *lval,
+						CORE_ADDR *addrp,
+						int *realnum,
+						void *raw_buffer);
+static void frame_saved_regs_register_unwind (struct frame_info *frame,
+					      void **cache,
+					      int regnum,
+					      int *optimized,
+					      enum lval_type *lval,
+					      CORE_ADDR *addrp,
+					      int *realnum,
+					      void *buffer);
+
+
 void _initialize_blockframe (void);
 
 /* A default FRAME_CHAIN_VALID, in the form that is suitable for most
@@ -208,6 +227,27 @@
   current_frame = frame;
 }
 
+
+/* Using the PC, select a mechanism for unwinding a frame returning
+   the previous frame.  The register unwind function should, on
+   demand, initialize the ->context object.  */
+
+static void
+set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
+		  frame_register_unwind_ftype **unwind)
+{
+  if (!USE_GENERIC_DUMMY_FRAMES)
+    /* Still need to set this to something.  The ``info frame'' code
+       calls this function to find out where the saved registers are.
+       Hopefully this is robust enough to stop any core dumps and
+       return vaguely correct values..  */
+    *unwind = frame_saved_regs_register_unwind;
+  else if (PC_IN_CALL_DUMMY (pc, fp, fp))
+    *unwind = generic_call_dummy_register_unwind;
+  else
+    *unwind = frame_saved_regs_register_unwind;
+}
+
 /* Create an arbitrary (i.e. address specified by user) or innermost frame.
    Always returns a non-NULL value.  */
 
@@ -232,6 +272,9 @@
   if (INIT_EXTRA_FRAME_INFO_P ())
     INIT_EXTRA_FRAME_INFO (0, fi);
 
+  /* Select/initialize an unwind function.  */
+  set_unwind_by_pc (fi->pc, fi->frame, &fi->register_unwind);
+
   return fi;
 }
 
@@ -371,6 +414,15 @@
          start go curfluy than have an abort called from main not show
          main.  */
       address = FRAME_CHAIN (next_frame);
+
+      /* FIXME: cagney/2002-06-08: There should be two tests here.
+         The first would check for a valid frame chain based on a user
+         selectable policy.  The default being ``stop at main'' (as
+         implemented by generic_func_frame_chain_valid()).  Other
+         policies would be available - stop at NULL, ....  The second
+         test, if provided by the target architecture, would check for
+         more exotic cases - most target architectures wouldn't bother
+         with this second case.  */
       if (!FRAME_CHAIN_VALID (address, next_frame))
 	return 0;
     }
@@ -456,6 +508,12 @@
 	}
     }
 
+  /* Initialize the code used to unwind the frame PREV based on the PC
+     (and probably other architectural information).  The PC lets you
+     check things like the debug info at that point (dwarf2cfi?) and
+     use that to decide how the frame should be unwound.  */
+  set_unwind_by_pc (prev->pc, prev->frame, &prev->register_unwind);
+
   find_pc_partial_function (prev->pc, &name,
 			    (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
   if (PC_IN_SIGTRAMP (prev->pc, name))
@@ -470,6 +528,26 @@
   return frame->pc;
 }
 
+/* return the address of the PC for the given FRAME, ie the current PC value
+   if FRAME is the innermost frame, or the address adjusted to point to the
+   call instruction if not.  */
+
+CORE_ADDR
+frame_address_in_block (struct frame_info *frame)
+{
+  CORE_ADDR pc = frame->pc;
+
+  /* If we are not in the innermost frame, and we are not interrupted
+     by a signal, frame->pc points to the instruction following the
+     call. As a consequence, we need to get the address of the previous
+     instruction. Unfortunately, this is not straightforward to do, so
+     we just use the address minus one, which is a good enough
+     approximation.  */
+  if (frame->next != 0 && frame->next->signal_handler_caller == 0)
+    --pc;
+
+  return pc;
+}
 
 #ifdef FRAME_FIND_SAVED_REGS
 /* XXX - deprecated.  This is a compatibility function for targets
@@ -518,17 +596,7 @@
 struct block *
 get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block)
 {
-  CORE_ADDR pc;
-
-  pc = frame->pc;
-  if (frame->next != 0 && frame->next->signal_handler_caller == 0)
-    /* We are not in the innermost frame and we were not interrupted
-       by a signal.  We need to subtract one to get the correct block,
-       in case the call instruction was the last instruction of the block.
-       If there are any machines on which the saved pc does not point to
-       after the call insn, we probably want to make frame->pc point after
-       the call insn anyway.  */
-    --pc;
+  const CORE_ADDR pc = frame_address_in_block (frame);
 
   if (addr_in_block)
     *addr_in_block = pc;
@@ -564,6 +632,8 @@
   else if ((msymbol = lookup_minimal_symbol_by_pc (pc)) != NULL)
     {
       fstart = SYMBOL_VALUE_ADDRESS (msymbol);
+      if (!find_pc_section (fstart))
+	return 0;
     }
   else
     {
@@ -739,9 +809,9 @@
 
   mapped_pc = overlay_mapped_address (pc, section);
 
-  if (mapped_pc >= cache_pc_function_low &&
-      mapped_pc < cache_pc_function_high &&
-      section == cache_pc_function_section)
+  if (mapped_pc >= cache_pc_function_low
+      && mapped_pc < cache_pc_function_high
+      && section == cache_pc_function_section)
     goto return_cached_value;
 
   /* If sigtramp is in the u area, it counts as a function (especially
@@ -847,7 +917,7 @@
   for (i = 1; SYMBOL_NAME (msymbol + i) != NULL; i++)
     {
       if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
-	&& SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
+	  && SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
 	break;
     }
 
@@ -859,7 +929,7 @@
        So the end address is the end of the section.  */
     cache_pc_function_high = osect->endaddr;
 
-return_cached_value:
+ return_cached_value:
 
   if (address)
     {
@@ -878,8 +948,8 @@
 	{
 	  /* Because the high address is actually beyond the end of
 	     the function (and therefore possibly beyond the end of
-	     the overlay), we must actually convert (high - 1)
-	     and then add one to that. */
+	     the overlay), we must actually convert (high - 1) and
+	     then add one to that. */
 
 	  *endaddr = 1 + overlay_unmapped_address (cache_pc_function_high - 1,
 						   section);
@@ -891,7 +961,7 @@
   return 1;
 }
 
-/* Backward compatibility, no section argument */
+/* Backward compatibility, no section argument.  */
 
 int
 find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
@@ -912,6 +982,7 @@
   struct frame_info *frame;
   register CORE_ADDR start;
   register CORE_ADDR end;
+  CORE_ADDR calling_pc;
 
   if (block == NULL)
     return NULL;
@@ -925,7 +996,8 @@
       frame = get_prev_frame (frame);
       if (frame == NULL)
 	return NULL;
-      if (frame->pc >= start && frame->pc < end)
+      calling_pc = frame_address_in_block (frame);
+      if (calling_pc >= start && calling_pc < end)
 	return frame;
     }
 }
@@ -1069,7 +1141,7 @@
   CORE_ADDR fp;
   CORE_ADDR sp;
   CORE_ADDR top;
-  char *registers;
+  struct regcache *regcache;
 
   /* Address range of the call dummy code.  Look for PC in the range
      [LO..HI) (after allowing for DECR_PC_AFTER_BREAK).  */
@@ -1086,7 +1158,7 @@
    adjust for DECR_PC_AFTER_BREAK.  This is because it is only legal
    to call this function after the PC has been adjusted.  */
 
-char *
+static struct regcache *
 generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
 {
   struct dummy_frame *dummyframe;
@@ -1098,11 +1170,20 @@
 	    || fp == dummyframe->sp
 	    || fp == dummyframe->top))
       /* The frame in question lies between the saved fp and sp, inclusive */
-      return dummyframe->registers;
+      return dummyframe->regcache;
 
   return 0;
 }
 
+char *
+deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
+{
+  struct regcache *regcache = generic_find_dummy_frame (pc, fp);
+  if (regcache == NULL)
+    return NULL;
+  return deprecated_grub_regcache_for_registers (regcache);
+}
+
 /* Function: pc_in_call_dummy (pc, sp, fp)
 
    Return true if the PC falls in a dummy frame created by gdb for an
@@ -1131,11 +1212,23 @@
 CORE_ADDR
 generic_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
 {
-  char *dummy_regs = generic_find_dummy_frame (pc, fp);
+  struct regcache *dummy_regs = generic_find_dummy_frame (pc, fp);
 
   if (dummy_regs)
-    return extract_address (&dummy_regs[REGISTER_BYTE (regno)],
-			    REGISTER_RAW_SIZE (regno));
+    {
+      /* NOTE: cagney/2002-08-12: Replaced a call to
+	 regcache_raw_read_as_address() with a call to
+	 regcache_cooked_read_unsigned().  The old, ...as_address
+	 function was eventually calling extract_unsigned_integer (via
+	 extract_address) to unpack the registers value.  The below is
+	 doing an unsigned extract so that it is functionally
+	 equivalent.  The read needs to be cooked as, otherwise, it
+	 will never correctly return the value of a register in the
+	 [NUM_REGS .. NUM_REGS+NUM_PSEUDO_REGS) range.  */
+      ULONGEST val;
+      regcache_cooked_read_unsigned (dummy_regs, regno, &val);
+      return val;
+    }
   else
     return 0;
 }
@@ -1162,7 +1255,7 @@
     if (INNER_THAN (dummy_frame->fp, fp))	/* stale -- destroy! */
       {
 	dummy_frame_stack = dummy_frame->next;
-	xfree (dummy_frame->registers);
+	regcache_xfree (dummy_frame->regcache);
 	xfree (dummy_frame);
 	dummy_frame = dummy_frame_stack;
       }
@@ -1170,13 +1263,13 @@
       dummy_frame = dummy_frame->next;
 
   dummy_frame = xmalloc (sizeof (struct dummy_frame));
-  dummy_frame->registers = xmalloc (REGISTER_BYTES);
+  dummy_frame->regcache = regcache_xmalloc (current_gdbarch);
 
   dummy_frame->pc = read_pc ();
   dummy_frame->sp = read_sp ();
   dummy_frame->top = dummy_frame->sp;
   dummy_frame->fp = fp;
-  read_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
+  regcache_cpy (dummy_frame->regcache, current_regcache);
   dummy_frame->next = dummy_frame_stack;
   dummy_frame_stack = dummy_frame;
 }
@@ -1224,10 +1317,10 @@
   if (!dummy_frame)
     error ("Can't pop dummy frame!");
   dummy_frame_stack = dummy_frame->next;
-  write_register_bytes (0, dummy_frame->registers, REGISTER_BYTES);
+  regcache_cpy (current_regcache, dummy_frame->regcache);
   flush_cached_frames ();
 
-  xfree (dummy_frame->registers);
+  regcache_xfree (dummy_frame->regcache);
   xfree (dummy_frame);
 }
 
@@ -1249,7 +1342,8 @@
 int
 generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
 {
-  if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
+  if (USE_GENERIC_DUMMY_FRAMES
+      && PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
     return 1;			/* don't prune CALL_DUMMY frames */
   else				/* fall back to default algorithm (see frame.h) */
     return (fp != 0
@@ -1269,6 +1363,147 @@
   return;
 }
 
+/* Given a call-dummy dummy-frame, return the registers.  Here the
+   register value is taken from the local copy of the register buffer.  */
+
+static void
+generic_call_dummy_register_unwind (struct frame_info *frame, void **cache,
+				    int regnum, int *optimized,
+				    enum lval_type *lvalp, CORE_ADDR *addrp,
+				    int *realnum, void *bufferp)
+{
+  gdb_assert (frame != NULL);
+  gdb_assert (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
+
+  /* Describe the register's location.  Generic dummy frames always
+     have the register value in an ``expression''.  */
+  *optimized = 0;
+  *lvalp = not_lval;
+  *addrp = 0;
+  *realnum = -1;
+
+  /* If needed, find and return the value of the register.  */
+  if (bufferp != NULL)
+    {
+      struct regcache *registers;
+#if 1
+      /* Get the address of the register buffer that contains all the
+	 saved registers for this dummy frame.  Cache that address.  */
+      registers = (*cache);
+      if (registers == NULL)
+	{
+	  registers = generic_find_dummy_frame (frame->pc, frame->frame);
+	  (*cache) = registers;
+	}
+#else
+      /* Get the address of the register buffer that contains the
+         saved registers and then extract the value from that.  */
+      registers = generic_find_dummy_frame (frame->pc, frame->frame);
+#endif
+      gdb_assert (registers != NULL);
+      /* Return the actual value.  */
+      /* Use the regcache_cooked_read() method so that it, on the fly,
+         constructs either a raw or pseudo register from the raw
+         register cache.  */
+      regcache_cooked_read (registers, regnum, bufferp);
+    }
+}
+
+/* Return the register saved in the simplistic ``saved_regs'' cache.
+   If the value isn't here AND a value is needed, try the next inner
+   most frame.  */
+
+static void
+frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
+				  int regnum, int *optimizedp,
+				  enum lval_type *lvalp, CORE_ADDR *addrp,
+				  int *realnump, void *bufferp)
+{
+  /* There is always a frame at this point.  And THIS is the frame
+     we're interested in.  */
+  gdb_assert (frame != NULL);
+  /* If we're using generic dummy frames, we'd better not be in a call
+     dummy.  (generic_call_dummy_register_unwind ought to have been called
+     instead.)  */
+  gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
+                && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
+
+  /* Load the saved_regs register cache.  */
+  if (frame->saved_regs == NULL)
+    FRAME_INIT_SAVED_REGS (frame);
+
+  if (frame->saved_regs != NULL
+      && frame->saved_regs[regnum] != 0)
+    {
+      if (regnum == SP_REGNUM)
+	{
+	  /* SP register treated specially.  */
+	  *optimizedp = 0;
+	  *lvalp = not_lval;
+	  *addrp = 0;
+	  *realnump = -1;
+	  if (bufferp != NULL)
+	    store_address (bufferp, REGISTER_RAW_SIZE (regnum),
+			   frame->saved_regs[regnum]);
+	}
+      else
+	{
+	  /* Any other register is saved in memory, fetch it but cache
+             a local copy of its value.  */
+	  *optimizedp = 0;
+	  *lvalp = lval_memory;
+	  *addrp = frame->saved_regs[regnum];
+	  *realnump = -1;
+	  if (bufferp != NULL)
+	    {
+#if 1
+	      /* Save each register value, as it is read in, in a
+                 frame based cache.  */
+	      void **regs = (*cache);
+	      if (regs == NULL)
+		{
+		  int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
+				      * sizeof (void *));
+		  regs = frame_obstack_alloc (sizeof_cache);
+		  memset (regs, 0, sizeof_cache);
+		  (*cache) = regs;
+		}
+	      if (regs[regnum] == NULL)
+		{
+		  regs[regnum]
+		    = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
+		  read_memory (frame->saved_regs[regnum], regs[regnum],
+			       REGISTER_RAW_SIZE (regnum));
+		}
+	      memcpy (bufferp, regs[regnum], REGISTER_RAW_SIZE (regnum));
+#else
+	      /* Read the value in from memory.  */
+	      read_memory (frame->saved_regs[regnum], bufferp,
+			   REGISTER_RAW_SIZE (regnum));
+#endif
+	    }
+	}
+      return;
+    }
+
+  /* No luck, assume this and the next frame have the same register
+     value.  If a value is needed, pass the request on down the chain;
+     otherwise just return an indication that the value is in the same
+     register as the next frame.  */
+  if (bufferp == NULL)
+    {
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = regnum;
+    }
+  else
+    {
+      frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+			     realnump, bufferp);
+    }
+}
+
 /* Function: get_saved_register
    Find register number REGNUM relative to FRAME and put its (raw,
    target format) contents in *RAW_BUFFER.  
@@ -1320,10 +1555,13 @@
 	  if (lval)		/* found it in a CALL_DUMMY frame */
 	    *lval = not_lval;
 	  if (raw_buffer)
-	    memcpy (raw_buffer,
-		    generic_find_dummy_frame (frame->pc, frame->frame) +
-		    REGISTER_BYTE (regnum),
-		    REGISTER_RAW_SIZE (regnum));
+	    /* FIXME: cagney/2002-06-26: This should be via the
+	       gdbarch_register_read() method so that it, on the fly,
+	       constructs either a raw or pseudo register from the raw
+	       register cache.  */
+	    regcache_raw_read (generic_find_dummy_frame (frame->pc,
+							 frame->frame),
+			       regnum, raw_buffer);
 	  return;
 	}
 
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6f604f1..0f498af 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -553,6 +553,7 @@
 	    error ("Junk at end of expression");
 	}
       breakpoints_changed ();
+      breakpoint_modify_event (b->number);
       return;
     }
 
@@ -592,6 +593,7 @@
       free_command_lines (&b->commands);
       b->commands = l;
       breakpoints_changed ();
+      breakpoint_modify_event (b->number);
       return;
     }
   error ("No breakpoint number %d.", bnum);
@@ -713,10 +715,22 @@
   int return_val = 0;	/* return success code. */
   int val = 0;
   int disabled_breaks = 0;
+  int hw_breakpoint_error = 0;
+  int process_warning = 0;
 
   static char message1[] = "Error inserting catchpoint %d:\n";
   static char message[sizeof (message1) + 30];
 
+#ifdef ONE_PROCESS_WRITETEXT
+  process_warning = 1;
+#endif
+
+  struct ui_file *tmp_error_stream = mem_fileopen ();
+  make_cleanup_ui_file_delete (tmp_error_stream);
+
+  /* Explicitly mark the warning -- this will only be printed if
+     there was an error.  */
+  fprintf_unfiltered (tmp_error_stream, "Warning:\n");
 
   ALL_BREAKPOINTS_SAFE (b, temp)
   {
@@ -774,8 +788,9 @@
 		    /* Set a software (trap) breakpoint at the LMA.  */
 		    val = target_insert_breakpoint (addr, b->shadow_contents);
 		    if (val != 0)
-		      warning ("overlay breakpoint %d failed: in ROM?", 
-			       b->number);
+		      fprintf_unfiltered (tmp_error_stream, 
+					  "Overlay breakpoint %d failed: in ROM?", 
+					  b->number);
 		  }
 	      }
 	    /* Shall we set a breakpoint at the VMA? */
@@ -808,22 +823,34 @@
 		b->enable_state = bp_shlib_disabled;
 		if (!disabled_breaks)
 		  {
-		    target_terminal_ours_for_output ();
-		    warning ("Cannot insert breakpoint %d:", b->number);
-		    warning ("Temporarily disabling shared library breakpoints:");
+		    fprintf_unfiltered (tmp_error_stream, 
+					"Cannot insert breakpoint %d.\n", b->number);
+		    fprintf_unfiltered (tmp_error_stream, 
+					"Temporarily disabling shared library breakpoints:\n");
 		  }
 		disabled_breaks = 1;
-		warning ("breakpoint #%d ", b->number);
+		fprintf_unfiltered (tmp_error_stream, "breakpoint #%d\n", b->number);
 	      }
 	    else
 #endif
 	      {
-		target_terminal_ours_for_output ();
-		warning ("Cannot insert breakpoint %d:", b->number);
-#ifdef ONE_PROCESS_WRITETEXT
-		warning ("The same program may be running in another process.");
-#endif
-		memory_error (val, b->address);	   /* which bombs us out */
+		process_warning = 1;
+		if (b->type == bp_hardware_breakpoint)
+		  {
+		    hw_breakpoint_error = 1;
+		    fprintf_unfiltered (tmp_error_stream, 
+					"Cannot insert hardware breakpoint %d.\n",
+					b->number);
+		  }
+		else
+		  {
+		    fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
+		    fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
+		    print_address_numeric (b->address, 1, tmp_error_stream);
+		    fprintf_filtered (tmp_error_stream, ": %s.\n",
+				      safe_strerror (val));
+		  }
+
 	      }
 	  }
 	else
@@ -850,9 +877,13 @@
 	if (val)
 	  {
 	    /* Couldn't set breakpoint for some reason */
-	    target_terminal_ours_for_output ();
-	    warning ("Cannot insert catchpoint %d; disabling it.",
-		     b->number);
+	    fprintf_unfiltered (tmp_error_stream, 
+				"Cannot insert catchpoint %d; disabling it.\n",
+				b->number);
+	    fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
+	    print_address_numeric (b->address, 1, tmp_error_stream);
+	    fprintf_filtered (tmp_error_stream, ": %s.\n",
+			      safe_strerror (val));
 	    b->enable_state = bp_disabled;
 	  }
 	else
@@ -874,9 +905,9 @@
 	    if (val == -1)
 	      {
 		/* something went wrong */
-		target_terminal_ours_for_output ();
-		warning ("Cannot insert catchpoint %d; disabling it.",
-			 b->number);
+		fprintf_unfiltered (tmp_error_stream, 
+				    "Cannot insert catchpoint %d; disabling it.\n",
+				    b->number);
 		b->enable_state = bp_disabled;
 	      }
 	  }
@@ -909,13 +940,7 @@
 	else
 	  {
 	    struct frame_info *fi;
-
-	    /* There might be no current frame at this moment if we are
-	       resuming from a step over a breakpoint.
-	       Set up current frame before trying to find the watchpoint
-	       frame.  */
-	    get_current_frame ();
-	    fi = find_frame_addr_in_frame_chain (b->watchpoint_frame);
+	    fi = frame_find_by_id (b->watchpoint_frame);
 	    within_current_scope = (fi != NULL);
 	    if (within_current_scope)
 	      select_frame (fi);
@@ -959,7 +984,7 @@
 
 			addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
 			len = TYPE_LENGTH (VALUE_TYPE (v));
-			type   = hw_write;
+			type = hw_write;
 			if (b->type == bp_read_watchpoint)
 			  type = hw_read;
 			else if (b->type == bp_access_watchpoint)
@@ -984,9 +1009,11 @@
 	       value chain brings us here.  */
 	    if (!b->inserted)
 	      {
+		process_warning = 1;
 		remove_breakpoint (b, mark_uninserted);
-		warning ("Could not insert hardware watchpoint %d.",
-			 b->number);
+		hw_breakpoint_error = 1;
+		fprintf_unfiltered (tmp_error_stream,
+				    "Cannot insert hardware watchpoint %d.\n", b->number);
 		val = -1;
 	      }               
 	  }
@@ -1033,8 +1060,7 @@
 	  }
 	if (val < 0)
 	  {
-	    target_terminal_ours_for_output ();
-	    warning ("Cannot insert catchpoint %d.", b->number);
+	    fprintf_unfiltered (tmp_error_stream, "Cannot insert catchpoint %d.", b->number);
 	  }
 	else
 	  b->inserted = 1;
@@ -1043,11 +1069,26 @@
 	  return_val = val;	/* remember failure */
       }
   }
+  
+  if (return_val) 
+    {
+      /* If a hardware breakpoint or watchpoint was inserted, add a
+         message about possibly exhausted resources.  */
+      if (hw_breakpoint_error)  
+	{
+	  fprintf_unfiltered (tmp_error_stream, "Could not insert hardware breakpoints:\n" 
+			      "You may have requested too many hardware breakpoints/watchpoints.\n");
+	}
 
+      if (process_warning)
+	fprintf_unfiltered (tmp_error_stream,"The same program may be running in another process.");
+
+      target_terminal_ours_for_output ();
+      error_stream (tmp_error_stream);
+    }
   return return_val;
 }
 
-
 int
 remove_breakpoints (void)
 {
@@ -2320,7 +2361,7 @@
          any chance of handling watchpoints on local variables, we'll need
          the frame chain (so we can determine if we're in scope).  */
       reinit_frame_cache ();
-      fr = find_frame_addr_in_frame_chain (b->watchpoint_frame);
+      fr = frame_find_by_id (b->watchpoint_frame);
       within_current_scope = (fr != NULL);
       /* in_function_epilogue_p() returns a non-zero value if we're still
 	 in the function but the stack frame has already been invalidated.
@@ -2394,7 +2435,7 @@
 
 /* Get a bpstat associated with having just stopped at address *PC
    and frame address CORE_ADDRESS.  Update *PC to point at the
-   breakpoint (if we hit a breakpoint).  NOT_A_BREAKPOINT is nonzero
+   breakpoint (if we hit a breakpoint).  NOT_A_SW_BREAKPOINT is nonzero
    if this is known to not be a real breakpoint (it could still be a
    watchpoint, though).  */
 
@@ -2413,7 +2454,7 @@
    commands, FIXME??? fields.  */
 
 bpstat
-bpstat_stop_status (CORE_ADDR *pc, int not_a_breakpoint)
+bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
 {
   register struct breakpoint *b, *temp;
   CORE_ADDR bp_addr;
@@ -2427,14 +2468,13 @@
   "Error evaluating expression for watchpoint %d\n";
   char message[sizeof (message1) + 30 /* slop */ ];
 
-  /* Get the address where the breakpoint would have been.  
-     The "not_a_breakpoint" argument is meant to distinguish 
-     between a breakpoint trap event and a trace/singlestep
-     trap event.  For a trace/singlestep trap event, we would
-     not want to subtract DECR_PC_AFTER_BREAK from the PC. */
+  /* Get the address where the breakpoint would have been.  The
+     "not_a_sw_breakpoint" argument is meant to distinguish between a
+     breakpoint trap event and a trace/singlestep trap event.  For a
+     trace/singlestep trap event, we would not want to subtract
+     DECR_PC_AFTER_BREAK from the PC. */
 
-  bp_addr = *pc - (not_a_breakpoint && !SOFTWARE_SINGLE_STEP_P () ? 
-                   0 : DECR_PC_AFTER_BREAK);
+  bp_addr = *pc - (not_a_sw_breakpoint ? 0 : DECR_PC_AFTER_BREAK);
 
   ALL_BREAKPOINTS_SAFE (b, temp)
   {
@@ -5321,10 +5361,12 @@
   if (frame)
     {
       prev_frame = get_prev_frame (frame);
-      b->watchpoint_frame = frame->frame;
+      get_frame_id (frame, &b->watchpoint_frame);
     }
   else
-    b->watchpoint_frame = (CORE_ADDR) 0;
+    {
+      memset (&b->watchpoint_frame, 0, sizeof (b->watchpoint_frame));
+    }
 
   /* If the expression is "local", then set up a "watchpoint scope"
      breakpoint at the point where we've left the scope of the watchpoint
@@ -5334,16 +5376,8 @@
       if (prev_frame)
 	{
 	  struct breakpoint *scope_breakpoint;
-	  struct symtab_and_line scope_sal;
-
-	  INIT_SAL (&scope_sal);	/* initialize to zeroes */
-	  scope_sal.pc = get_frame_pc (prev_frame);
-	  scope_sal.section = find_pc_overlay (scope_sal.pc);
-
-	  scope_breakpoint = set_raw_breakpoint (scope_sal,
-	                                         bp_watchpoint_scope);
-	  set_breakpoint_count (breakpoint_count + 1);
-	  scope_breakpoint->number = breakpoint_count;
+	  scope_breakpoint = create_internal_breakpoint (get_frame_pc (prev_frame),
+							 bp_watchpoint_scope);
 
 	  scope_breakpoint->enable_state = bp_enabled;
 
@@ -6692,11 +6726,32 @@
 	  else
 	    val = target_insert_breakpoint (b->address, b->shadow_contents);
 
+	  /* If there was an error in the insert, print a message, then stop execution.  */
 	  if (val != 0)
 	    {
+	      struct ui_file *tmp_error_stream = mem_fileopen ();
+	      make_cleanup_ui_file_delete (tmp_error_stream);
+	     
+
+	      if (b->type == bp_hardware_breakpoint)
+		{
+		  fprintf_unfiltered (tmp_error_stream, 
+					"Cannot insert hardware breakpoint %d.\n"
+				      "You may have requested too many hardware breakpoints.\n",
+					b->number);
+		  }
+		else
+		  {
+		    fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
+		    fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
+		    print_address_numeric (b->address, 1, tmp_error_stream);
+		    fprintf_filtered (tmp_error_stream, ": %s.\n",
+				      safe_strerror (val));
+		  }
+	      
+	      fprintf_unfiltered (tmp_error_stream,"The same program may be running in another process.");
 	      target_terminal_ours_for_output ();
-	      warning ("Cannot insert breakpoint %d:", b->number);
-	      memory_error (val, b->address);	/* which bombs us out */
+	      error_stream(tmp_error_stream); 
 	    }
 	  else
 	    b->inserted = 1;
@@ -6771,6 +6826,8 @@
 {
   struct breakpoint *b, *temp;
 
+  dont_repeat ();
+
   if (arg == 0)
     {
       int breaks_to_delete = 0;
@@ -7075,18 +7132,20 @@
     if (b->number == bptnum)
     {
       b->ignore_count = count;
-      if (!from_tty)
-	return;
-      else if (count == 0)
-	printf_filtered ("Will stop next time breakpoint %d is reached.",
-			 bptnum);
-      else if (count == 1)
-	printf_filtered ("Will ignore next crossing of breakpoint %d.",
-			 bptnum);
-      else
-	printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
-			 count, bptnum);
+      if (from_tty)
+	{
+	  if (count == 0)
+	    printf_filtered ("Will stop next time breakpoint %d is reached.",
+			     bptnum);
+	  else if (count == 1)
+	    printf_filtered ("Will ignore next crossing of breakpoint %d.",
+			     bptnum);
+	  else
+	    printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
+			     count, bptnum);
+	}
       breakpoints_changed ();
+      breakpoint_modify_event (b->number);
       return;
     }
 
@@ -7123,8 +7182,8 @@
   set_ignore_count (num,
 		    longest_to_int (value_as_long (parse_and_eval (p))),
 		    from_tty);
-  printf_filtered ("\n");
-  breakpoints_changed ();
+  if (from_tty)
+    printf_filtered ("\n");
 }
 
 /* Call FUNCTION on each of the breakpoints
@@ -7266,12 +7325,7 @@
       if (bpt->exp_valid_block != NULL)
 	{
 	  struct frame_info *fr =
-
-	  /* Ensure that we have the current frame.  Else, this
-	     next query may pessimistically be answered as, "No,
-	     not within current scope". */
-	  get_current_frame ();
-	  fr = find_frame_addr_in_frame_chain (bpt->watchpoint_frame);
+	  fr = frame_find_by_id (bpt->watchpoint_frame);
 	  if (fr == NULL)
 	    {
 	      printf_filtered ("\
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 3a58aad..226703b 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -270,10 +270,10 @@
        it the watchpoint_scope breakpoint or something like that. FIXME).  */
     struct breakpoint *related_breakpoint;
 
-    /* Holds the frame address which identifies the frame this watchpoint
-       should be evaluated in, or NULL if the watchpoint should be evaluated
-       on the outermost frame.  */
-    CORE_ADDR watchpoint_frame;
+    /* Holds the frame address which identifies the frame this
+       watchpoint should be evaluated in, or `null' if the watchpoint
+       should be evaluated on the outermost frame.  */
+    struct frame_id watchpoint_frame;
 
     /* Thread number for thread-specific breakpoint, or -1 if don't care */
     int thread;
@@ -322,7 +322,7 @@
    is part of the bpstat is copied as well.  */
 extern bpstat bpstat_copy (bpstat);
 
-extern bpstat bpstat_stop_status (CORE_ADDR *, int);
+extern bpstat bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint);
 
 /* This bpstat_what stuff tells wait_for_inferior what to do with a
    breakpoint (a challenging task).  */
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 5078935..b1962df 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -28,7 +28,7 @@
 
 #include "defs.h"
 #include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "symtab.h"
 #include "symfile.h"		/* Needed for "struct complaint" */
 #include "objfiles.h"
@@ -40,6 +40,7 @@
 #include "bcache.h"
 #include "filenames.h"		/* For DOSish file names */
 #include "macrotab.h"
+#include "demangle.h"		/* Needed by SYMBOL_INIT_DEMANGLED_NAME.  */
 /* Ask buildsym.h to define the vars it normally declares `extern'.  */
 #define	EXTERN
 /**/
@@ -243,17 +244,49 @@
       /* EMPTY */ ;
     }
 
-  block = (struct block *) obstack_alloc (&objfile->symbol_obstack,
-	    (sizeof (struct block) + ((i - 1) * sizeof (struct symbol *))));
-
   /* Copy the symbols into the block.  */
 
-  BLOCK_NSYMS (block) = i;
-  for (next = *listhead; next; next = next->next)
+  if (symbol)
     {
-      for (j = next->nsyms - 1; j >= 0; j--)
+      block = (struct block *) 
+	obstack_alloc (&objfile->symbol_obstack,
+		       (sizeof (struct block) + 
+			((i - 1) * sizeof (struct symbol *))));
+      BLOCK_NSYMS (block) = i;
+      for (next = *listhead; next; next = next->next)
+	for (j = next->nsyms - 1; j >= 0; j--)
+	  {
+	    BLOCK_SYM (block, --i) = next->symbol[j];
+	  }
+    }
+  else
+    {
+      int htab_size = BLOCK_HASHTABLE_SIZE (i);
+
+      block = (struct block *) 
+	obstack_alloc (&objfile->symbol_obstack,
+		       (sizeof (struct block) + 
+			((htab_size - 1) * sizeof (struct symbol *))));
+      for (j = 0; j < htab_size; j++)
 	{
-	  BLOCK_SYM (block, --i) = next->symbol[j];
+	  BLOCK_BUCKET (block, j) = 0;
+	}
+      BLOCK_BUCKETS (block) = htab_size;
+      for (next = *listhead; next; next = next->next)
+	{
+	  for (j = next->nsyms - 1; j >= 0; j--)
+	    {
+	      struct symbol *sym;
+	      unsigned int hash_index;
+	      const char *name = SYMBOL_DEMANGLED_NAME (next->symbol[j]);
+	      if (name == NULL)
+		name = SYMBOL_NAME (next->symbol[j]);
+	      hash_index = msymbol_hash_iw (name);
+	      hash_index = hash_index % BLOCK_BUCKETS (block);
+	      sym = BLOCK_BUCKET (block, hash_index);
+	      BLOCK_BUCKET (block, hash_index) = next->symbol[j];
+	      next->symbol[j]->hash_next = sym;
+	    }
 	}
     }
 
@@ -271,6 +304,7 @@
       struct type *ftype = SYMBOL_TYPE (symbol);
       SYMBOL_BLOCK_VALUE (symbol) = block;
       BLOCK_FUNCTION (block) = symbol;
+      BLOCK_HASHTABLE (block) = 0;
 
       if (TYPE_NFIELDS (ftype) <= 0)
 	{
@@ -352,6 +386,7 @@
   else
     {
       BLOCK_FUNCTION (block) = NULL;
+      BLOCK_HASHTABLE (block) = 1;
     }
 
   /* Now "free" the links of the list, and empty the list.  */
@@ -451,11 +486,11 @@
     }
 }
 
-/* Note that this is only used in this file and in dstread.c, which
-   should be fixed to not need direct access to this function.  When
-   that is done, it can be made static again. */
+/* OBSOLETE Note that this is only used in this file and in dstread.c, which */
+/* OBSOLETE should be fixed to not need direct access to this function.  When */
+/* OBSOLETE that is done, it can be made static again. */
 
-struct blockvector *
+static struct blockvector *
 make_blockvector (struct objfile *objfile)
 {
   register struct pending_block *next;
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index d023aa3..8a252cb 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -277,11 +277,11 @@
 
 extern void free_pending_blocks (void);
 
-/* FIXME: Note that this is used only in buildsym.c and dstread.c,
-   which should be fixed to not need direct access to
-   make_blockvector. */
+/* OBSOLETE FIXME: Note that this is used only in buildsym.c and dstread.c, */
+/* OBSOLETE which should be fixed to not need direct access to */
+/* OBSOLETE make_blockvector. */
 
-extern struct blockvector *make_blockvector (struct objfile *objfile);
+/* OBSOLETE extern struct blockvector *make_blockvector (struct objfile *objfile); */
 
 /* FIXME: Note that this is used only in buildsym.c and dstread.c,
    which should be fixed to not need direct access to
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index f555518..ea50836 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -100,9 +100,11 @@
 #define yycheck	 c_yycheck
 
 #ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
+#define	YYDEBUG 1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 09a2e6a..9ee92ad 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -415,14 +415,14 @@
 
 
 int
-scanning_macro_expansion ()
+scanning_macro_expansion (void)
 {
   return macro_original_text != 0;
 }
 
 
 void 
-finished_macro_expansion ()
+finished_macro_expansion (void)
 {
   /* There'd better be something to pop back to, and we better have
      saved a pointer to the start of the expanded text.  */
@@ -461,7 +461,7 @@
 
 
 static int
-c_preprocess_and_parse ()
+c_preprocess_and_parse (void)
 {
   /* Set up a lookup function for the macro expander.  */
   struct macro_scope *scope = 0;
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 430d567..bede194 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -21,7 +21,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bfd.h"		/* Binary File Description */
 #include "symtab.h"
 #include "gdbtypes.h"
@@ -41,7 +41,7 @@
 /* Flag indicating target was compiled by HP compiler */
 extern int hp_som_som_object_present;
 
-static void cp_type_print_method_args (struct type ** args, char *prefix,
+static void cp_type_print_method_args (struct type *mtype, char *prefix,
 				       char *varstring, int staticp,
 				       struct ui_file *stream);
 
@@ -147,40 +147,40 @@
       fputs_filtered (" ", stream);
     }
 }
+
 /* Print the C++ method arguments ARGS to the file STREAM.  */
 
 static void
-cp_type_print_method_args (struct type **args, char *prefix, char *varstring,
+cp_type_print_method_args (struct type *mtype, char *prefix, char *varstring,
 			   int staticp, struct ui_file *stream)
 {
+  struct field *args = TYPE_FIELDS (mtype);
+  int nargs = TYPE_NFIELDS (mtype);
+  int varargs = TYPE_VARARGS (mtype);
   int i;
 
   fprintf_symbol_filtered (stream, prefix, language_cplus, DMGL_ANSI);
   fprintf_symbol_filtered (stream, varstring, language_cplus, DMGL_ANSI);
   fputs_filtered ("(", stream);
-  if (args && args[!staticp] && TYPE_CODE (args[!staticp]) != TYPE_CODE_VOID)
+
+  /* Skip the class variable.  */
+  i = staticp ? 0 : 1;
+  if (nargs > i)
     {
-      i = !staticp;		/* skip the class variable */
-      while (1)
+      while (i < nargs)
 	{
-	  type_print (args[i++], "", stream, 0);
-	  if (!args[i])
-	    {
-	      fprintf_filtered (stream, " ...");
-	      break;
-	    }
-	  else if (TYPE_CODE (args[i]) != TYPE_CODE_VOID)
-	    {
-	      fprintf_filtered (stream, ", ");
-	    }
-	  else
-	    break;
+	  type_print (args[i++].type, "", stream, 0);
+
+	  if (i == nargs && varargs)
+	    fprintf_filtered (stream, ", ...");
+	  else if (i < nargs)
+	    fprintf_filtered (stream, ", ");
 	}
     }
+  else if (varargs)
+    fprintf_filtered (stream, "...");
   else if (current_language->la_language == language_cplus)
-    {
-      fprintf_filtered (stream, "void");
-    }
+    fprintf_filtered (stream, "void");
 
   fprintf_filtered (stream, ")");
 }
@@ -336,39 +336,31 @@
 c_type_print_args (struct type *type, struct ui_file *stream)
 {
   int i;
-  struct type **args;
+  struct field *args;
 
   fprintf_filtered (stream, "(");
-  args = TYPE_ARG_TYPES (type);
+  args = TYPE_FIELDS (type);
   if (args != NULL)
     {
-      if (args[1] == NULL)
+      int i;
+
+      /* FIXME drow/2002-05-31: Always skips the first argument,
+	 should we be checking for static members?  */
+
+      for (i = 1; i < TYPE_NFIELDS (type); i++)
 	{
-	  fprintf_filtered (stream, "...");
-	}
-      else if ((TYPE_CODE (args[1]) == TYPE_CODE_VOID) &&
-	       (current_language->la_language == language_cplus))
-	{
-	  fprintf_filtered (stream, "void");
-	}
-      else
-	{
-	  for (i = 1;
-	       args[i] != NULL && TYPE_CODE (args[i]) != TYPE_CODE_VOID;
-	       i++)
+	  c_print_type (args[i].type, "", stream, -1, 0);
+	  if (i != TYPE_NFIELDS (type))
 	    {
-	      c_print_type (args[i], "", stream, -1, 0);
-	      if (args[i + 1] == NULL)
-		{
-		  fprintf_filtered (stream, "...");
-		}
-	      else if (TYPE_CODE (args[i + 1]) != TYPE_CODE_VOID)
-		{
-		  fprintf_filtered (stream, ",");
-		  wrap_here ("    ");
-		}
+	      fprintf_filtered (stream, ",");
+	      wrap_here ("    ");
 	    }
 	}
+      if (TYPE_VARARGS (type))
+	fprintf_filtered (stream, "...");
+      else if (i == 1
+	       && (current_language->la_language == language_cplus))
+	fprintf_filtered (stream, "void");
     }
   else if (current_language->la_language == language_cplus)
     {
@@ -1010,10 +1002,15 @@
 		         Let's try to reconstruct the function signature from 
 		         the symbol information */
 		      if (!TYPE_FN_FIELD_STUB (f, j))
-			cp_type_print_method_args (TYPE_FN_FIELD_ARGS (f, j), "",
-						   method_name,
-					      TYPE_FN_FIELD_STATIC_P (f, j),
-						   stream);
+			{
+			  int staticp = TYPE_FN_FIELD_STATIC_P (f, j);
+			  struct type *mtype = TYPE_FN_FIELD_TYPE (f, j);
+			  cp_type_print_method_args (mtype,
+						     "",
+						     method_name,
+						     staticp,
+						     stream);
+			}
 		      else
 			fprintf_filtered (stream, "<badly mangled name '%s'>",
 					  mangled_name);
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c
index e96a6f8..d588ec2 100644
--- a/gdb/ch-exp.c
+++ b/gdb/ch-exp.c
@@ -1,2233 +1,2233 @@
-/* Parser for GNU CHILL (CCITT High-Level Language)  -*- C -*-
-   Copyright 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Parse a Chill expression from text in a string,
-   and return the result as a  struct expression  pointer.
-   That structure contains arithmetic operations in reverse polish,
-   with constants represented by operations that are followed by special data.
-   See expression.h for the details of the format.
-   What is important here is that it can be built up sequentially
-   during the process of parsing; the lower levels of the tree always
-   come first in the result.
-
-   Note that the language accepted by this parser is more liberal
-   than the one accepted by an actual Chill compiler.  For example, the
-   language rule that a simple name string can not be one of the reserved
-   simple name strings is not enforced (e.g "case" is not treated as a
-   reserved name).  Another example is that Chill is a strongly typed
-   language, and certain expressions that violate the type constraints
-   may still be evaluated if gdb can do so in a meaningful manner, while
-   such expressions would be rejected by the compiler.  The reason for
-   this more liberal behavior is the philosophy that the debugger
-   is intended to be a tool that is used by the programmer when things
-   go wrong, and as such, it should provide as few artificial barriers
-   to it's use as possible.  If it can do something meaningful, even
-   something that violates language contraints that are enforced by the
-   compiler, it should do so without complaint.
-
- */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <ctype.h>
-#include "expression.h"
-#include "language.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "ch-lang.h"
-#include "bfd.h"		/* Required by objfiles.h.  */
-#include "symfile.h"		/* Required by objfiles.h.  */
-#include "objfiles.h"		/* For have_full_symbols and have_partial_symbols */
-
-#ifdef __GNUC__
-#define INLINE __inline__
-#endif
-
-typedef union
-
-  {
-    LONGEST lval;
-    ULONGEST ulval;
-    struct
-      {
-	LONGEST val;
-	struct type *type;
-      }
-    typed_val;
-    double dval;
-    struct symbol *sym;
-    struct type *tval;
-    struct stoken sval;
-    struct ttype tsym;
-    struct symtoken ssym;
-  }
-YYSTYPE;
-
-enum ch_terminal
-  {
-    END_TOKEN = 0,
-    /* '\001' ... '\xff' come first. */
-    OPEN_PAREN = '(',
-    TOKEN_NOT_READ = 999,
-    INTEGER_LITERAL,
-    BOOLEAN_LITERAL,
-    CHARACTER_LITERAL,
-    FLOAT_LITERAL,
-    GENERAL_PROCEDURE_NAME,
-    LOCATION_NAME,
-    EMPTINESS_LITERAL,
-    CHARACTER_STRING_LITERAL,
-    BIT_STRING_LITERAL,
-    TYPENAME,
-    DOT_FIELD_NAME,		/* '.' followed by <field name> */
-    CASE,
-    OF,
-    ESAC,
-    LOGIOR,
-    ORIF,
-    LOGXOR,
-    LOGAND,
-    ANDIF,
-    NOTEQUAL,
-    GEQ,
-    LEQ,
-    IN,
-    SLASH_SLASH,
-    MOD,
-    REM,
-    NOT,
-    POINTER,
-    RECEIVE,
-    UP,
-    IF,
-    THEN,
-    ELSE,
-    FI,
-    ELSIF,
-    ILLEGAL_TOKEN,
-    NUM,
-    PRED,
-    SUCC,
-    ABS,
-    CARD,
-    MAX_TOKEN,
-    MIN_TOKEN,
-    ADDR_TOKEN,
-    SIZE,
-    UPPER,
-    LOWER,
-    LENGTH,
-    ARRAY,
-    GDB_VARIABLE,
-    GDB_ASSIGNMENT
-  };
-
-/* Forward declarations. */
-
-static void write_lower_upper_value (enum exp_opcode, struct type *);
-static enum ch_terminal match_bitstring_literal (void);
-static enum ch_terminal match_integer_literal (void);
-static enum ch_terminal match_character_literal (void);
-static enum ch_terminal match_string_literal (void);
-static enum ch_terminal match_float_literal (void);
-static int decode_integer_literal (LONGEST *, char **);
-static int decode_integer_value (int, char **, LONGEST *);
-static char *match_simple_name_string (void);
-static void growbuf_by_size (int);
-static void parse_case_label (void);
-static void parse_untyped_expr (void);
-static void parse_if_expression (void);
-static void parse_if_expression_body (void);
-static void parse_else_alternative (void);
-static void parse_then_alternative (void);
-static void parse_expr (void);
-static void parse_operand0 (void);
-static void parse_operand1 (void);
-static void parse_operand2 (void);
-static void parse_operand3 (void);
-static void parse_operand4 (void);
-static void parse_operand5 (void);
-static void parse_operand6 (void);
-static void parse_primval (void);
-static void parse_tuple (struct type *);
-static void parse_opt_element_list (struct type *);
-static void parse_tuple_element (struct type *);
-static void parse_named_record_element (void);
-static void parse_call (void);
-static struct type *parse_mode_or_normal_call (void);
-#if 0
-static struct type *parse_mode_call (void);
-#endif
-static void parse_unary_call (void);
-static int parse_opt_untyped_expr (void);
-static int expect (enum ch_terminal, char *);
-static enum ch_terminal ch_lex (void);
-INLINE static enum ch_terminal PEEK_TOKEN (void);
-static enum ch_terminal peek_token_ (int);
-static void forward_token_ (void);
-static void require (enum ch_terminal);
-static int check_token (enum ch_terminal);
-
-#define MAX_LOOK_AHEAD 2
-static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD + 1] =
-{
-  TOKEN_NOT_READ, TOKEN_NOT_READ, TOKEN_NOT_READ};
-static YYSTYPE yylval;
-static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
-
-/*int current_token, lookahead_token; */
-
-INLINE static enum ch_terminal
-PEEK_TOKEN (void)
-{
-  if (terminal_buffer[0] == TOKEN_NOT_READ)
-    {
-      terminal_buffer[0] = ch_lex ();
-      val_buffer[0] = yylval;
-    }
-  return terminal_buffer[0];
-}
-#define PEEK_LVAL() val_buffer[0]
-#define PEEK_TOKEN1() peek_token_(1)
-#define PEEK_TOKEN2() peek_token_(2)
-static enum ch_terminal
-peek_token_ (int i)
-{
-  if (i > MAX_LOOK_AHEAD)
-    internal_error (__FILE__, __LINE__,
-		    "too much lookahead");
-  if (terminal_buffer[i] == TOKEN_NOT_READ)
-    {
-      terminal_buffer[i] = ch_lex ();
-      val_buffer[i] = yylval;
-    }
-  return terminal_buffer[i];
-}
-
-#if 0
-
-static void
-pushback_token (enum ch_terminal code, YYSTYPE node)
-{
-  int i;
-  if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
-    internal_error (__FILE__, __LINE__,
-		    "cannot pushback token");
-  for (i = MAX_LOOK_AHEAD; i > 0; i--)
-    {
-      terminal_buffer[i] = terminal_buffer[i - 1];
-      val_buffer[i] = val_buffer[i - 1];
-    }
-  terminal_buffer[0] = code;
-  val_buffer[0] = node;
-}
-
-#endif
-
-static void
-forward_token_ (void)
-{
-  int i;
-  for (i = 0; i < MAX_LOOK_AHEAD; i++)
-    {
-      terminal_buffer[i] = terminal_buffer[i + 1];
-      val_buffer[i] = val_buffer[i + 1];
-    }
-  terminal_buffer[MAX_LOOK_AHEAD] = TOKEN_NOT_READ;
-}
-#define FORWARD_TOKEN() forward_token_()
-
-/* Skip the next token.
-   if it isn't TOKEN, the parser is broken. */
-
-static void
-require (enum ch_terminal token)
-{
-  if (PEEK_TOKEN () != token)
-    {
-      internal_error (__FILE__, __LINE__,
-		      "expected token %d", (int) token);
-    }
-  FORWARD_TOKEN ();
-}
-
-static int
-check_token (enum ch_terminal token)
-{
-  if (PEEK_TOKEN () != token)
-    return 0;
-  FORWARD_TOKEN ();
-  return 1;
-}
-
-/* return 0 if expected token was not found,
-   else return 1.
- */
-static int
-expect (enum ch_terminal token, char *message)
-{
-  if (PEEK_TOKEN () != token)
-    {
-      if (message)
-	error (message);
-      else if (token < 256)
-	error ("syntax error - expected a '%c' here \"%s\"", token, lexptr);
-      else
-	error ("syntax error");
-      return 0;
-    }
-  else
-    FORWARD_TOKEN ();
-  return 1;
-}
-
-#if 0
-/* Parse a name string.  If ALLOW_ALL is 1, ALL is allowed as a postfix. */
-
-static tree
-parse_opt_name_string (int allow_all)
-{
-  int token = PEEK_TOKEN ();
-  tree name;
-  if (token != NAME)
-    {
-      if (token == ALL && allow_all)
-	{
-	  FORWARD_TOKEN ();
-	  return ALL_POSTFIX;
-	}
-      return NULL_TREE;
-    }
-  name = PEEK_LVAL ();
-  for (;;)
-    {
-      FORWARD_TOKEN ();
-      token = PEEK_TOKEN ();
-      if (token != '!')
-	return name;
-      FORWARD_TOKEN ();
-      token = PEEK_TOKEN ();
-      if (token == ALL && allow_all)
-	return get_identifier3 (IDENTIFIER_POINTER (name), "!", "*");
-      if (token != NAME)
-	{
-	  if (pass == 1)
-	    error ("'%s!' is not followed by an identifier",
-		   IDENTIFIER_POINTER (name));
-	  return name;
-	}
-      name = get_identifier3 (IDENTIFIER_POINTER (name),
-			      "!", IDENTIFIER_POINTER (PEEK_LVAL ()));
-    }
-}
-
-static tree
-parse_simple_name_string (void)
-{
-  int token = PEEK_TOKEN ();
-  tree name;
-  if (token != NAME)
-    {
-      error ("expected a name here");
-      return error_mark_node;
-    }
-  name = PEEK_LVAL ();
-  FORWARD_TOKEN ();
-  return name;
-}
-
-static tree
-parse_name_string (void)
-{
-  tree name = parse_opt_name_string (0);
-  if (name)
-    return name;
-  if (pass == 1)
-    error ("expected a name string here");
-  return error_mark_node;
-}
-
-/* Matches: <name_string>
-   Returns if pass 1: the identifier.
-   Returns if pass 2: a decl or value for identifier. */
-
-static tree
-parse_name (void)
-{
-  tree name = parse_name_string ();
-  if (pass == 1 || ignoring)
-    return name;
-  else
-    {
-      tree decl = lookup_name (name);
-      if (decl == NULL_TREE)
-	{
-	  error ("`%s' undeclared", IDENTIFIER_POINTER (name));
-	  return error_mark_node;
-	}
-      else if (TREE_CODE (TREE_TYPE (decl)) == ERROR_MARK)
-	return error_mark_node;
-      else if (TREE_CODE (decl) == CONST_DECL)
-	return DECL_INITIAL (decl);
-      else if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
-	return convert_from_reference (decl);
-      else
-	return decl;
-    }
-}
-#endif
-
-#if 0
-static void
-pushback_paren_expr (tree expr)
-{
-  if (pass == 1 && !ignoring)
-    expr = build1 (PAREN_EXPR, NULL_TREE, expr);
-  pushback_token (EXPR, expr);
-}
-#endif
-
-/* Matches: <case label> */
-
-static void
-parse_case_label (void)
-{
-  if (check_token (ELSE))
-    error ("ELSE in tuples labels not implemented");
-  /* Does not handle the case of a mode name.  FIXME */
-  parse_expr ();
-  if (check_token (':'))
-    {
-      parse_expr ();
-      write_exp_elt_opcode (BINOP_RANGE);
-    }
-}
-
-static int
-parse_opt_untyped_expr (void)
-{
-  switch (PEEK_TOKEN ())
-    {
-    case ',':
-    case ':':
-    case ')':
-      return 0;
-    default:
-      parse_untyped_expr ();
-      return 1;
-    }
-}
-
-static void
-parse_unary_call (void)
-{
-  FORWARD_TOKEN ();
-  expect ('(', NULL);
-  parse_expr ();
-  expect (')', NULL);
-}
-
-/* Parse NAME '(' MODENAME ')'. */
-
-#if 0
-
-static struct type *
-parse_mode_call (void)
-{
-  struct type *type;
-  FORWARD_TOKEN ();
-  expect ('(', NULL);
-  if (PEEK_TOKEN () != TYPENAME)
-    error ("expect MODENAME here `%s'", lexptr);
-  type = PEEK_LVAL ().tsym.type;
-  FORWARD_TOKEN ();
-  expect (')', NULL);
-  return type;
-}
-
-#endif
-
-static struct type *
-parse_mode_or_normal_call (void)
-{
-  struct type *type;
-  FORWARD_TOKEN ();
-  expect ('(', NULL);
-  if (PEEK_TOKEN () == TYPENAME)
-    {
-      type = PEEK_LVAL ().tsym.type;
-      FORWARD_TOKEN ();
-    }
-  else
-    {
-      parse_expr ();
-      type = NULL;
-    }
-  expect (')', NULL);
-  return type;
-}
-
-/* Parse something that looks like a function call.
-   Assume we have parsed the function, and are at the '('. */
-
-static void
-parse_call (void)
-{
-  int arg_count;
-  require ('(');
-  /* This is to save the value of arglist_len
-     being accumulated for each dimension. */
-  start_arglist ();
-  if (parse_opt_untyped_expr ())
-    {
-      int tok = PEEK_TOKEN ();
-      arglist_len = 1;
-      if (tok == UP || tok == ':')
-	{
-	  FORWARD_TOKEN ();
-	  parse_expr ();
-	  expect (')', "expected ')' to terminate slice");
-	  end_arglist ();
-	  write_exp_elt_opcode (tok == UP ? TERNOP_SLICE_COUNT
-				: TERNOP_SLICE);
-	  return;
-	}
-      while (check_token (','))
-	{
-	  parse_untyped_expr ();
-	  arglist_len++;
-	}
-    }
-  else
-    arglist_len = 0;
-  expect (')', NULL);
-  arg_count = end_arglist ();
-  write_exp_elt_opcode (MULTI_SUBSCRIPT);
-  write_exp_elt_longcst (arg_count);
-  write_exp_elt_opcode (MULTI_SUBSCRIPT);
-}
-
-static void
-parse_named_record_element (void)
-{
-  struct stoken label;
-  char buf[256];
-
-  label = PEEK_LVAL ().sval;
-  sprintf (buf, "expected a field name here `%s'", lexptr);
-  expect (DOT_FIELD_NAME, buf);
-  if (check_token (','))
-    parse_named_record_element ();
-  else if (check_token (':'))
-    parse_expr ();
-  else
-    error ("syntax error near `%s' in named record tuple element", lexptr);
-  write_exp_elt_opcode (OP_LABELED);
-  write_exp_string (label);
-  write_exp_elt_opcode (OP_LABELED);
-}
-
-/* Returns one or more TREE_LIST nodes, in reverse order. */
-
-static void
-parse_tuple_element (struct type *type)
-{
-  if (PEEK_TOKEN () == DOT_FIELD_NAME)
-    {
-      /* Parse a labelled structure tuple. */
-      parse_named_record_element ();
-      return;
-    }
-
-  if (check_token ('('))
-    {
-      if (check_token ('*'))
-	{
-	  expect (')', "missing ')' after '*' case label list");
-	  if (type)
-	    {
-	      if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
-		{
-		  /* do this as a range from low to high */
-		  struct type *range_type = TYPE_FIELD_TYPE (type, 0);
-		  LONGEST low_bound, high_bound;
-		  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
-		    error ("cannot determine bounds for (*)");
-		  /* lower bound */
-		  write_exp_elt_opcode (OP_LONG);
-		  write_exp_elt_type (range_type);
-		  write_exp_elt_longcst (low_bound);
-		  write_exp_elt_opcode (OP_LONG);
-		  /* upper bound */
-		  write_exp_elt_opcode (OP_LONG);
-		  write_exp_elt_type (range_type);
-		  write_exp_elt_longcst (high_bound);
-		  write_exp_elt_opcode (OP_LONG);
-		  write_exp_elt_opcode (BINOP_RANGE);
-		}
-	      else
-		error ("(*) in invalid context");
-	    }
-	  else
-	    error ("(*) only possible with modename in front of tuple (mode[..])");
-	}
-      else
-	{
-	  parse_case_label ();
-	  while (check_token (','))
-	    {
-	      parse_case_label ();
-	      write_exp_elt_opcode (BINOP_COMMA);
-	    }
-	  expect (')', NULL);
-	}
-    }
-  else
-    parse_untyped_expr ();
-  if (check_token (':'))
-    {
-      /* A powerset range or a labeled Array. */
-      parse_untyped_expr ();
-      write_exp_elt_opcode (BINOP_RANGE);
-    }
-}
-
-/* Matches:  a COMMA-separated list of tuple elements.
-   Returns a list (of TREE_LIST nodes). */
-static void
-parse_opt_element_list (struct type *type)
-{
-  arglist_len = 0;
-  if (PEEK_TOKEN () == ']')
-    return;
-  for (;;)
-    {
-      parse_tuple_element (type);
-      arglist_len++;
-      if (PEEK_TOKEN () == ']')
-	break;
-      if (!check_token (','))
-	error ("bad syntax in tuple");
-    }
-}
-
-/* Parses: '[' elements ']'
-   If modename is non-NULL it prefixed the tuple.  */
-
-static void
-parse_tuple (struct type *mode)
-{
-  struct type *type;
-  if (mode)
-    type = check_typedef (mode);
-  else
-    type = 0;
-  require ('[');
-  start_arglist ();
-  parse_opt_element_list (type);
-  expect (']', "missing ']' after tuple");
-  write_exp_elt_opcode (OP_ARRAY);
-  write_exp_elt_longcst ((LONGEST) 0);
-  write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
-  write_exp_elt_opcode (OP_ARRAY);
-  if (type)
-    {
-      if (TYPE_CODE (type) != TYPE_CODE_ARRAY
-	  && TYPE_CODE (type) != TYPE_CODE_STRUCT
-	  && TYPE_CODE (type) != TYPE_CODE_SET)
-	error ("invalid tuple mode");
-      write_exp_elt_opcode (UNOP_CAST);
-      write_exp_elt_type (mode);
-      write_exp_elt_opcode (UNOP_CAST);
-    }
-}
-
-static void
-parse_primval (void)
-{
-  struct type *type;
-  enum exp_opcode op;
-  char *op_name;
-  switch (PEEK_TOKEN ())
-    {
-    case INTEGER_LITERAL:
-    case CHARACTER_LITERAL:
-      write_exp_elt_opcode (OP_LONG);
-      write_exp_elt_type (PEEK_LVAL ().typed_val.type);
-      write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
-      write_exp_elt_opcode (OP_LONG);
-      FORWARD_TOKEN ();
-      break;
-    case BOOLEAN_LITERAL:
-      write_exp_elt_opcode (OP_BOOL);
-      write_exp_elt_longcst ((LONGEST) PEEK_LVAL ().ulval);
-      write_exp_elt_opcode (OP_BOOL);
-      FORWARD_TOKEN ();
-      break;
-    case FLOAT_LITERAL:
-      write_exp_elt_opcode (OP_DOUBLE);
-      write_exp_elt_type (builtin_type_double);
-      write_exp_elt_dblcst (PEEK_LVAL ().dval);
-      write_exp_elt_opcode (OP_DOUBLE);
-      FORWARD_TOKEN ();
-      break;
-    case EMPTINESS_LITERAL:
-      write_exp_elt_opcode (OP_LONG);
-      write_exp_elt_type (lookup_pointer_type (builtin_type_void));
-      write_exp_elt_longcst (0);
-      write_exp_elt_opcode (OP_LONG);
-      FORWARD_TOKEN ();
-      break;
-    case CHARACTER_STRING_LITERAL:
-      write_exp_elt_opcode (OP_STRING);
-      write_exp_string (PEEK_LVAL ().sval);
-      write_exp_elt_opcode (OP_STRING);
-      FORWARD_TOKEN ();
-      break;
-    case BIT_STRING_LITERAL:
-      write_exp_elt_opcode (OP_BITSTRING);
-      write_exp_bitstring (PEEK_LVAL ().sval);
-      write_exp_elt_opcode (OP_BITSTRING);
-      FORWARD_TOKEN ();
-      break;
-    case ARRAY:
-      FORWARD_TOKEN ();
-      /* This is pseudo-Chill, similar to C's '(TYPE[])EXPR'
-         which casts to an artificial array. */
-      expect ('(', NULL);
-      expect (')', NULL);
-      if (PEEK_TOKEN () != TYPENAME)
-	error ("missing MODENAME after ARRAY()");
-      type = PEEK_LVAL ().tsym.type;
-      FORWARD_TOKEN ();
-      expect ('(', NULL);
-      parse_expr ();
-      expect (')', "missing right parenthesis");
-      type = create_array_type ((struct type *) NULL, type,
-				create_range_type ((struct type *) NULL,
-						   builtin_type_int, 0, 0));
-      TYPE_ARRAY_UPPER_BOUND_TYPE (type) = BOUND_CANNOT_BE_DETERMINED;
-      write_exp_elt_opcode (UNOP_CAST);
-      write_exp_elt_type (type);
-      write_exp_elt_opcode (UNOP_CAST);
-      break;
-#if 0
-    case CONST:
-    case EXPR:
-      val = PEEK_LVAL ();
-      FORWARD_TOKEN ();
-      break;
-#endif
-    case '(':
-      FORWARD_TOKEN ();
-      parse_expr ();
-      expect (')', "missing right parenthesis");
-      break;
-    case '[':
-      parse_tuple (NULL);
-      break;
-    case GENERAL_PROCEDURE_NAME:
-    case LOCATION_NAME:
-      write_exp_elt_opcode (OP_VAR_VALUE);
-      write_exp_elt_block (NULL);
-      write_exp_elt_sym (PEEK_LVAL ().ssym.sym);
-      write_exp_elt_opcode (OP_VAR_VALUE);
-      FORWARD_TOKEN ();
-      break;
-    case GDB_VARIABLE:		/* gdb specific */
-      FORWARD_TOKEN ();
-      break;
-    case NUM:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_CAST);
-      write_exp_elt_type (builtin_type_int);
-      write_exp_elt_opcode (UNOP_CAST);
-      break;
-    case CARD:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_CARD);
-      break;
-    case MAX_TOKEN:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_CHMAX);
-      break;
-    case MIN_TOKEN:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_CHMIN);
-      break;
-    case PRED:
-      op_name = "PRED";
-      goto unimplemented_unary_builtin;
-    case SUCC:
-      op_name = "SUCC";
-      goto unimplemented_unary_builtin;
-    case ABS:
-      op_name = "ABS";
-      goto unimplemented_unary_builtin;
-    unimplemented_unary_builtin:
-      parse_unary_call ();
-      error ("not implemented:  %s builtin function", op_name);
-      break;
-    case ADDR_TOKEN:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_ADDR);
-      break;
-    case SIZE:
-      type = parse_mode_or_normal_call ();
-      if (type)
-	{
-	  write_exp_elt_opcode (OP_LONG);
-	  write_exp_elt_type (builtin_type_int);
-	  CHECK_TYPEDEF (type);
-	  write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (type));
-	  write_exp_elt_opcode (OP_LONG);
-	}
-      else
-	write_exp_elt_opcode (UNOP_SIZEOF);
-      break;
-    case LOWER:
-      op = UNOP_LOWER;
-      goto lower_upper;
-    case UPPER:
-      op = UNOP_UPPER;
-      goto lower_upper;
-    lower_upper:
-      type = parse_mode_or_normal_call ();
-      write_lower_upper_value (op, type);
-      break;
-    case LENGTH:
-      parse_unary_call ();
-      write_exp_elt_opcode (UNOP_LENGTH);
-      break;
-    case TYPENAME:
-      type = PEEK_LVAL ().tsym.type;
-      FORWARD_TOKEN ();
-      switch (PEEK_TOKEN ())
-	{
-	case '[':
-	  parse_tuple (type);
-	  break;
-	case '(':
-	  FORWARD_TOKEN ();
-	  parse_expr ();
-	  expect (')', "missing right parenthesis");
-	  write_exp_elt_opcode (UNOP_CAST);
-	  write_exp_elt_type (type);
-	  write_exp_elt_opcode (UNOP_CAST);
-	  break;
-	default:
-	  error ("typename in invalid context");
-	}
-      break;
-
-    default:
-      error ("invalid expression syntax at `%s'", lexptr);
-    }
-  for (;;)
-    {
-      switch (PEEK_TOKEN ())
-	{
-	case DOT_FIELD_NAME:
-	  write_exp_elt_opcode (STRUCTOP_STRUCT);
-	  write_exp_string (PEEK_LVAL ().sval);
-	  write_exp_elt_opcode (STRUCTOP_STRUCT);
-	  FORWARD_TOKEN ();
-	  continue;
-	case POINTER:
-	  FORWARD_TOKEN ();
-	  if (PEEK_TOKEN () == TYPENAME)
-	    {
-	      type = PEEK_LVAL ().tsym.type;
-	      write_exp_elt_opcode (UNOP_CAST);
-	      write_exp_elt_type (lookup_pointer_type (type));
-	      write_exp_elt_opcode (UNOP_CAST);
-	      FORWARD_TOKEN ();
-	    }
-	  write_exp_elt_opcode (UNOP_IND);
-	  continue;
-	case OPEN_PAREN:
-	  parse_call ();
-	  continue;
-	case CHARACTER_STRING_LITERAL:
-	case CHARACTER_LITERAL:
-	case BIT_STRING_LITERAL:
-	  /* Handle string repetition. (See comment in parse_operand5.) */
-	  parse_primval ();
-	  write_exp_elt_opcode (MULTI_SUBSCRIPT);
-	  write_exp_elt_longcst (1);
-	  write_exp_elt_opcode (MULTI_SUBSCRIPT);
-	  continue;
-	case END_TOKEN:
-	case TOKEN_NOT_READ:
-	case INTEGER_LITERAL:
-	case BOOLEAN_LITERAL:
-	case FLOAT_LITERAL:
-	case GENERAL_PROCEDURE_NAME:
-	case LOCATION_NAME:
-	case EMPTINESS_LITERAL:
-	case TYPENAME:
-	case CASE:
-	case OF:
-	case ESAC:
-	case LOGIOR:
-	case ORIF:
-	case LOGXOR:
-	case LOGAND:
-	case ANDIF:
-	case NOTEQUAL:
-	case GEQ:
-	case LEQ:
-	case IN:
-	case SLASH_SLASH:
-	case MOD:
-	case REM:
-	case NOT:
-	case RECEIVE:
-	case UP:
-	case IF:
-	case THEN:
-	case ELSE:
-	case FI:
-	case ELSIF:
-	case ILLEGAL_TOKEN:
-	case NUM:
-	case PRED:
-	case SUCC:
-	case ABS:
-	case CARD:
-	case MAX_TOKEN:
-	case MIN_TOKEN:
-	case ADDR_TOKEN:
-	case SIZE:
-	case UPPER:
-	case LOWER:
-	case LENGTH:
-	case ARRAY:
-	case GDB_VARIABLE:
-	case GDB_ASSIGNMENT:
-	  break;
-	}
-      break;
-    }
-  return;
-}
-
-static void
-parse_operand6 (void)
-{
-  if (check_token (RECEIVE))
-    {
-      parse_primval ();
-      error ("not implemented:  RECEIVE expression");
-    }
-  else if (check_token (POINTER))
-    {
-      parse_primval ();
-      write_exp_elt_opcode (UNOP_ADDR);
-    }
-  else
-    parse_primval ();
-}
-
-static void
-parse_operand5 (void)
-{
-  enum exp_opcode op;
-  /* We are supposed to be looking for a <string repetition operator>,
-     but in general we can't distinguish that from a parenthesized
-     expression.  This is especially difficult if we allow the
-     string operand to be a constant expression (as requested by
-     some users), and not just a string literal.
-     Consider:  LPRN expr RPRN LPRN expr RPRN
-     Is that a function call or string repetition?
-     Instead, we handle string repetition in parse_primval,
-     and build_generalized_call. */
-  switch (PEEK_TOKEN ())
-    {
-    case NOT:
-      op = UNOP_LOGICAL_NOT;
-      break;
-    case '-':
-      op = UNOP_NEG;
-      break;
-    default:
-      op = OP_NULL;
-    }
-  if (op != OP_NULL)
-    FORWARD_TOKEN ();
-  parse_operand6 ();
-  if (op != OP_NULL)
-    write_exp_elt_opcode (op);
-}
-
-static void
-parse_operand4 (void)
-{
-  enum exp_opcode op;
-  parse_operand5 ();
-  for (;;)
-    {
-      switch (PEEK_TOKEN ())
-	{
-	case '*':
-	  op = BINOP_MUL;
-	  break;
-	case '/':
-	  op = BINOP_DIV;
-	  break;
-	case MOD:
-	  op = BINOP_MOD;
-	  break;
-	case REM:
-	  op = BINOP_REM;
-	  break;
-	default:
-	  return;
-	}
-      FORWARD_TOKEN ();
-      parse_operand5 ();
-      write_exp_elt_opcode (op);
-    }
-}
-
-static void
-parse_operand3 (void)
-{
-  enum exp_opcode op;
-  parse_operand4 ();
-  for (;;)
-    {
-      switch (PEEK_TOKEN ())
-	{
-	case '+':
-	  op = BINOP_ADD;
-	  break;
-	case '-':
-	  op = BINOP_SUB;
-	  break;
-	case SLASH_SLASH:
-	  op = BINOP_CONCAT;
-	  break;
-	default:
-	  return;
-	}
-      FORWARD_TOKEN ();
-      parse_operand4 ();
-      write_exp_elt_opcode (op);
-    }
-}
-
-static void
-parse_operand2 (void)
-{
-  enum exp_opcode op;
-  parse_operand3 ();
-  for (;;)
-    {
-      if (check_token (IN))
-	{
-	  parse_operand3 ();
-	  write_exp_elt_opcode (BINOP_IN);
-	}
-      else
-	{
-	  switch (PEEK_TOKEN ())
-	    {
-	    case '>':
-	      op = BINOP_GTR;
-	      break;
-	    case GEQ:
-	      op = BINOP_GEQ;
-	      break;
-	    case '<':
-	      op = BINOP_LESS;
-	      break;
-	    case LEQ:
-	      op = BINOP_LEQ;
-	      break;
-	    case '=':
-	      op = BINOP_EQUAL;
-	      break;
-	    case NOTEQUAL:
-	      op = BINOP_NOTEQUAL;
-	      break;
-	    default:
-	      return;
-	    }
-	  FORWARD_TOKEN ();
-	  parse_operand3 ();
-	  write_exp_elt_opcode (op);
-	}
-    }
-}
-
-static void
-parse_operand1 (void)
-{
-  enum exp_opcode op;
-  parse_operand2 ();
-  for (;;)
-    {
-      switch (PEEK_TOKEN ())
-	{
-	case LOGAND:
-	  op = BINOP_BITWISE_AND;
-	  break;
-	case ANDIF:
-	  op = BINOP_LOGICAL_AND;
-	  break;
-	default:
-	  return;
-	}
-      FORWARD_TOKEN ();
-      parse_operand2 ();
-      write_exp_elt_opcode (op);
-    }
-}
-
-static void
-parse_operand0 (void)
-{
-  enum exp_opcode op;
-  parse_operand1 ();
-  for (;;)
-    {
-      switch (PEEK_TOKEN ())
-	{
-	case LOGIOR:
-	  op = BINOP_BITWISE_IOR;
-	  break;
-	case LOGXOR:
-	  op = BINOP_BITWISE_XOR;
-	  break;
-	case ORIF:
-	  op = BINOP_LOGICAL_OR;
-	  break;
-	default:
-	  return;
-	}
-      FORWARD_TOKEN ();
-      parse_operand1 ();
-      write_exp_elt_opcode (op);
-    }
-}
-
-static void
-parse_expr (void)
-{
-  parse_operand0 ();
-  if (check_token (GDB_ASSIGNMENT))
-    {
-      parse_expr ();
-      write_exp_elt_opcode (BINOP_ASSIGN);
-    }
-}
-
-static void
-parse_then_alternative (void)
-{
-  expect (THEN, "missing 'THEN' in 'IF' expression");
-  parse_expr ();
-}
-
-static void
-parse_else_alternative (void)
-{
-  if (check_token (ELSIF))
-    parse_if_expression_body ();
-  else if (check_token (ELSE))
-    parse_expr ();
-  else
-    error ("missing ELSE/ELSIF in IF expression");
-}
-
-/* Matches: <boolean expression> <then alternative> <else alternative> */
-
-static void
-parse_if_expression_body (void)
-{
-  parse_expr ();
-  parse_then_alternative ();
-  parse_else_alternative ();
-  write_exp_elt_opcode (TERNOP_COND);
-}
-
-static void
-parse_if_expression (void)
-{
-  require (IF);
-  parse_if_expression_body ();
-  expect (FI, "missing 'FI' at end of conditional expression");
-}
-
-/* An <untyped_expr> is a superset of <expr>.  It also includes
-   <conditional expressions> and untyped <tuples>, whose types
-   are not given by their constituents.  Hence, these are only
-   allowed in certain contexts that expect a certain type.
-   You should call convert() to fix up the <untyped_expr>. */
-
-static void
-parse_untyped_expr (void)
-{
-  switch (PEEK_TOKEN ())
-    {
-    case IF:
-      parse_if_expression ();
-      return;
-    case CASE:
-      error ("not implemented:  CASE expression");
-    case '(':
-      switch (PEEK_TOKEN1 ())
-	{
-	case IF:
-	case CASE:
-	  goto skip_lprn;
-	case '[':
-	skip_lprn:
-	  FORWARD_TOKEN ();
-	  parse_untyped_expr ();
-	  expect (')', "missing ')'");
-	  return;
-	default:;
-	  /* fall through */
-	}
-    default:
-      parse_operand0 ();
-    }
-}
-
-int
-chill_parse (void)
-{
-  terminal_buffer[0] = TOKEN_NOT_READ;
-  if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
-    {
-      write_exp_elt_opcode (OP_TYPE);
-      write_exp_elt_type (PEEK_LVAL ().tsym.type);
-      write_exp_elt_opcode (OP_TYPE);
-      FORWARD_TOKEN ();
-    }
-  else
-    parse_expr ();
-  if (terminal_buffer[0] != END_TOKEN)
-    {
-      if (comma_terminates && terminal_buffer[0] == ',')
-	lexptr--;		/* Put the comma back.  */
-      else
-	error ("Junk after end of expression.");
-    }
-  return 0;
-}
-
-
-/* Implementation of a dynamically expandable buffer for processing input
-   characters acquired through lexptr and building a value to return in
-   yylval. */
-
-static char *tempbuf;		/* Current buffer contents */
-static int tempbufsize;		/* Size of allocated buffer */
-static int tempbufindex;	/* Current index into buffer */
-
-#define GROWBY_MIN_SIZE 64	/* Minimum amount to grow buffer by */
-
-#define CHECKBUF(size) \
-  do { \
-    if (tempbufindex + (size) >= tempbufsize) \
-      { \
-	growbuf_by_size (size); \
-      } \
-  } while (0);
-
-/* Grow the static temp buffer if necessary, including allocating the first one
-   on demand. */
-
-static void
-growbuf_by_size (int count)
-{
-  int growby;
-
-  growby = max (count, GROWBY_MIN_SIZE);
-  tempbufsize += growby;
-  if (tempbuf == NULL)
-    {
-      tempbuf = (char *) xmalloc (tempbufsize);
-    }
-  else
-    {
-      tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
-    }
-}
-
-/* Try to consume a simple name string token.  If successful, returns
-   a pointer to a nullbyte terminated copy of the name that can be used
-   in symbol table lookups.  If not successful, returns NULL. */
-
-static char *
-match_simple_name_string (void)
-{
-  char *tokptr = lexptr;
-
-  if (isalpha (*tokptr) || *tokptr == '_')
-    {
-      char *result;
-      do
-	{
-	  tokptr++;
-	}
-      while (isalnum (*tokptr) || (*tokptr == '_'));
-      yylval.sval.ptr = lexptr;
-      yylval.sval.length = tokptr - lexptr;
-      lexptr = tokptr;
-      result = copy_name (yylval.sval);
-      return result;
-    }
-  return (NULL);
-}
-
-/* Start looking for a value composed of valid digits as set by the base
-   in use.  Note that '_' characters are valid anywhere, in any quantity,
-   and are simply ignored.  Since we must find at least one valid digit,
-   or reject this token as an integer literal, we keep track of how many
-   digits we have encountered. */
-
-static int
-decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
-{
-  char *tokptr = *tokptrptr;
-  int temp;
-  int digits = 0;
-
-  while (*tokptr != '\0')
-    {
-      temp = *tokptr;
-      if (isupper (temp))
-	temp = tolower (temp);
-      tokptr++;
-      switch (temp)
-	{
-	case '_':
-	  continue;
-	case '0':
-	case '1':
-	case '2':
-	case '3':
-	case '4':
-	case '5':
-	case '6':
-	case '7':
-	case '8':
-	case '9':
-	  temp -= '0';
-	  break;
-	case 'a':
-	case 'b':
-	case 'c':
-	case 'd':
-	case 'e':
-	case 'f':
-	  temp -= 'a';
-	  temp += 10;
-	  break;
-	default:
-	  temp = base;
-	  break;
-	}
-      if (temp < base)
-	{
-	  digits++;
-	  *ivalptr *= base;
-	  *ivalptr += temp;
-	}
-      else
-	{
-	  /* Found something not in domain for current base. */
-	  tokptr--;		/* Unconsume what gave us indigestion. */
-	  break;
-	}
-    }
-
-  /* If we didn't find any digits, then we don't have a valid integer
-     value, so reject the entire token.  Otherwise, update the lexical
-     scan pointer, and return non-zero for success. */
-
-  if (digits == 0)
-    {
-      return (0);
-    }
-  else
-    {
-      *tokptrptr = tokptr;
-      return (1);
-    }
-}
-
-static int
-decode_integer_literal (LONGEST *valptr, char **tokptrptr)
-{
-  char *tokptr = *tokptrptr;
-  int base = 0;
-  LONGEST ival = 0;
-  int explicit_base = 0;
-
-  /* Look for an explicit base specifier, which is optional. */
-
-  switch (*tokptr)
-    {
-    case 'd':
-    case 'D':
-      explicit_base++;
-      base = 10;
-      tokptr++;
-      break;
-    case 'b':
-    case 'B':
-      explicit_base++;
-      base = 2;
-      tokptr++;
-      break;
-    case 'h':
-    case 'H':
-      explicit_base++;
-      base = 16;
-      tokptr++;
-      break;
-    case 'o':
-    case 'O':
-      explicit_base++;
-      base = 8;
-      tokptr++;
-      break;
-    default:
-      base = 10;
-      break;
-    }
-
-  /* If we found an explicit base ensure that the character after the
-     explicit base is a single quote. */
-
-  if (explicit_base && (*tokptr++ != '\''))
-    {
-      return (0);
-    }
-
-  /* Attempt to decode whatever follows as an integer value in the
-     indicated base, updating the token pointer in the process and
-     computing the value into ival.  Also, if we have an explicit
-     base, then the next character must not be a single quote, or we
-     have a bitstring literal, so reject the entire token in this case.
-     Otherwise, update the lexical scan pointer, and return non-zero
-     for success. */
-
-  if (!decode_integer_value (base, &tokptr, &ival))
-    {
-      return (0);
-    }
-  else if (explicit_base && (*tokptr == '\''))
-    {
-      return (0);
-    }
-  else
-    {
-      *valptr = ival;
-      *tokptrptr = tokptr;
-      return (1);
-    }
-}
-
-/*  If it wasn't for the fact that floating point values can contain '_'
-   characters, we could just let strtod do all the hard work by letting it
-   try to consume as much of the current token buffer as possible and
-   find a legal conversion.  Unfortunately we need to filter out the '_'
-   characters before calling strtod, which we do by copying the other
-   legal chars to a local buffer to be converted.  However since we also
-   need to keep track of where the last unconsumed character in the input
-   buffer is, we have transfer only as many characters as may compose a
-   legal floating point value. */
-
-static enum ch_terminal
-match_float_literal (void)
-{
-  char *tokptr = lexptr;
-  char *buf;
-  char *copy;
-  double dval;
-  extern double strtod ();
-
-  /* Make local buffer in which to build the string to convert.  This is
-     required because underscores are valid in chill floating point numbers
-     but not in the string passed to strtod to convert.  The string will be
-     no longer than our input string. */
-
-  copy = buf = (char *) alloca (strlen (tokptr) + 1);
-
-  /* Transfer all leading digits to the conversion buffer, discarding any
-     underscores. */
-
-  while (isdigit (*tokptr) || *tokptr == '_')
-    {
-      if (*tokptr != '_')
-	{
-	  *copy++ = *tokptr;
-	}
-      tokptr++;
-    }
-
-  /* Now accept either a '.', or one of [eEdD].  Dot is legal regardless
-     of whether we found any leading digits, and we simply accept it and
-     continue on to look for the fractional part and/or exponent.  One of
-     [eEdD] is legal only if we have seen digits, and means that there
-     is no fractional part.  If we find neither of these, then this is
-     not a floating point number, so return failure. */
-
-  switch (*tokptr++)
-    {
-    case '.':
-      /* Accept and then look for fractional part and/or exponent. */
-      *copy++ = '.';
-      break;
-
-    case 'e':
-    case 'E':
-    case 'd':
-    case 'D':
-      if (copy == buf)
-	{
-	  return (0);
-	}
-      *copy++ = 'e';
-      goto collect_exponent;
-      break;
-
-    default:
-      return (0);
-      break;
-    }
-
-  /* We found a '.', copy any fractional digits to the conversion buffer, up
-     to the first nondigit, non-underscore character. */
-
-  while (isdigit (*tokptr) || *tokptr == '_')
-    {
-      if (*tokptr != '_')
-	{
-	  *copy++ = *tokptr;
-	}
-      tokptr++;
-    }
-
-  /* Look for an exponent, which must start with one of [eEdD].  If none
-     is found, jump directly to trying to convert what we have collected
-     so far. */
-
-  switch (*tokptr)
-    {
-    case 'e':
-    case 'E':
-    case 'd':
-    case 'D':
-      *copy++ = 'e';
-      tokptr++;
-      break;
-    default:
-      goto convert_float;
-      break;
-    }
-
-  /* Accept an optional '-' or '+' following one of [eEdD]. */
-
-collect_exponent:
-  if (*tokptr == '+' || *tokptr == '-')
-    {
-      *copy++ = *tokptr++;
-    }
-
-  /* Now copy an exponent into the conversion buffer.  Note that at the 
-     moment underscores are *not* allowed in exponents. */
-
-  while (isdigit (*tokptr))
-    {
-      *copy++ = *tokptr++;
-    }
-
-  /* If we transfered any chars to the conversion buffer, try to interpret its
-     contents as a floating point value.  If any characters remain, then we
-     must not have a valid floating point string. */
-
-convert_float:
-  *copy = '\0';
-  if (copy != buf)
-    {
-      dval = strtod (buf, &copy);
-      if (*copy == '\0')
-	{
-	  yylval.dval = dval;
-	  lexptr = tokptr;
-	  return (FLOAT_LITERAL);
-	}
-    }
-  return (0);
-}
-
-/* Recognize a string literal.  A string literal is a sequence
-   of characters enclosed in matching single or double quotes, except that
-   a single character inside single quotes is a character literal, which
-   we reject as a string literal.  To embed the terminator character inside
-   a string, it is simply doubled (I.E. "this""is""one""string") */
-
-static enum ch_terminal
-match_string_literal (void)
-{
-  char *tokptr = lexptr;
-  int in_ctrlseq = 0;
-  LONGEST ival;
-
-  for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
-    {
-      CHECKBUF (1);
-    tryagain:;
-      if (in_ctrlseq)
-	{
-	  /* skip possible whitespaces */
-	  while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
-	    tokptr++;
-	  if (*tokptr == ')')
-	    {
-	      in_ctrlseq = 0;
-	      tokptr++;
-	      goto tryagain;
-	    }
-	  else if (*tokptr != ',')
-	    error ("Invalid control sequence");
-	  tokptr++;
-	  /* skip possible whitespaces */
-	  while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
-	    tokptr++;
-	  if (!decode_integer_literal (&ival, &tokptr))
-	    error ("Invalid control sequence");
-	  tokptr--;
-	}
-      else if (*tokptr == *lexptr)
-	{
-	  if (*(tokptr + 1) == *lexptr)
-	    {
-	      ival = *tokptr++;
-	    }
-	  else
-	    {
-	      break;
-	    }
-	}
-      else if (*tokptr == '^')
-	{
-	  if (*(tokptr + 1) == '(')
-	    {
-	      in_ctrlseq = 1;
-	      tokptr += 2;
-	      if (!decode_integer_literal (&ival, &tokptr))
-		error ("Invalid control sequence");
-	      tokptr--;
-	    }
-	  else if (*(tokptr + 1) == '^')
-	    ival = *tokptr++;
-	  else
-	    error ("Invalid control sequence");
-	}
-      else
-	ival = *tokptr;
-      tempbuf[tempbufindex++] = ival;
-    }
-  if (in_ctrlseq)
-    error ("Invalid control sequence");
-
-  if (*tokptr == '\0'		/* no terminator */
-      || (tempbufindex == 1 && *tokptr == '\''))	/* char literal */
-    {
-      return (0);
-    }
-  else
-    {
-      tempbuf[tempbufindex] = '\0';
-      yylval.sval.ptr = tempbuf;
-      yylval.sval.length = tempbufindex;
-      lexptr = ++tokptr;
-      return (CHARACTER_STRING_LITERAL);
-    }
-}
-
-/* Recognize a character literal.  A character literal is single character
-   or a control sequence, enclosed in single quotes.  A control sequence
-   is a comma separated list of one or more integer literals, enclosed
-   in parenthesis and introduced with a circumflex character.
-
-   EX:  'a'  '^(7)'  '^(7,8)'
-
-   As a GNU chill extension, the syntax C'xx' is also recognized as a 
-   character literal, where xx is a hex value for the character.
-
-   Note that more than a single character, enclosed in single quotes, is
-   a string literal.
-
-   Returns CHARACTER_LITERAL if a match is found.
- */
-
-static enum ch_terminal
-match_character_literal (void)
-{
-  char *tokptr = lexptr;
-  LONGEST ival = 0;
-
-  if ((*tokptr == 'c' || *tokptr == 'C') && (*(tokptr + 1) == '\''))
-    {
-      /* We have a GNU chill extension form, so skip the leading "C'",
-         decode the hex value, and then ensure that we have a trailing
-         single quote character. */
-      tokptr += 2;
-      if (!decode_integer_value (16, &tokptr, &ival) || (*tokptr != '\''))
-	{
-	  return (0);
-	}
-      tokptr++;
-    }
-  else if (*tokptr == '\'')
-    {
-      tokptr++;
-
-      /* Determine which form we have, either a control sequence or the
-         single character form. */
-
-      if (*tokptr == '^')
-	{
-	  if (*(tokptr + 1) == '(')
-	    {
-	      /* Match and decode a control sequence.  Return zero if we don't
-	         find a valid integer literal, or if the next unconsumed character
-	         after the integer literal is not the trailing ')'. */
-	      tokptr += 2;
-	      if (!decode_integer_literal (&ival, &tokptr) || (*tokptr++ != ')'))
-		{
-		  return (0);
-		}
-	    }
-	  else if (*(tokptr + 1) == '^')
-	    {
-	      ival = *tokptr;
-	      tokptr += 2;
-	    }
-	  else
-	    /* fail */
-	    error ("Invalid control sequence");
-	}
-      else if (*tokptr == '\'')
-	{
-	  /* this must be duplicated */
-	  ival = *tokptr;
-	  tokptr += 2;
-	}
-      else
-	{
-	  ival = *tokptr++;
-	}
-
-      /* The trailing quote has not yet been consumed.  If we don't find
-         it, then we have no match. */
-
-      if (*tokptr++ != '\'')
-	{
-	  return (0);
-	}
-    }
-  else
-    {
-      /* Not a character literal. */
-      return (0);
-    }
-  yylval.typed_val.val = ival;
-  yylval.typed_val.type = builtin_type_chill_char;
-  lexptr = tokptr;
-  return (CHARACTER_LITERAL);
-}
-
-/* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
-   Note that according to 5.2.4.2, a single "_" is also a valid integer
-   literal, however GNU-chill requires there to be at least one "digit"
-   in any integer literal. */
-
-static enum ch_terminal
-match_integer_literal (void)
-{
-  char *tokptr = lexptr;
-  LONGEST ival;
-
-  if (!decode_integer_literal (&ival, &tokptr))
-    {
-      return (0);
-    }
-  else
-    {
-      yylval.typed_val.val = ival;
-#if defined(CC_HAS_LONG_LONG)
-      if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
-	yylval.typed_val.type = builtin_type_long_long;
-      else
-#endif
-	yylval.typed_val.type = builtin_type_int;
-      lexptr = tokptr;
-      return (INTEGER_LITERAL);
-    }
-}
-
-/* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
-   Note that according to 5.2.4.8, a single "_" is also a valid bit-string
-   literal, however GNU-chill requires there to be at least one "digit"
-   in any bit-string literal. */
-
-static enum ch_terminal
-match_bitstring_literal (void)
-{
-  register char *tokptr = lexptr;
-  int bitoffset = 0;
-  int bitcount = 0;
-  int bits_per_char;
-  int digit;
-
-  tempbufindex = 0;
-  CHECKBUF (1);
-  tempbuf[0] = 0;
-
-  /* Look for the required explicit base specifier. */
-
-  switch (*tokptr++)
-    {
-    case 'b':
-    case 'B':
-      bits_per_char = 1;
-      break;
-    case 'o':
-    case 'O':
-      bits_per_char = 3;
-      break;
-    case 'h':
-    case 'H':
-      bits_per_char = 4;
-      break;
-    default:
-      return (0);
-      break;
-    }
-
-  /* Ensure that the character after the explicit base is a single quote. */
-
-  if (*tokptr++ != '\'')
-    {
-      return (0);
-    }
-
-  while (*tokptr != '\0' && *tokptr != '\'')
-    {
-      digit = *tokptr;
-      if (isupper (digit))
-	digit = tolower (digit);
-      tokptr++;
-      switch (digit)
-	{
-	case '_':
-	  continue;
-	case '0':
-	case '1':
-	case '2':
-	case '3':
-	case '4':
-	case '5':
-	case '6':
-	case '7':
-	case '8':
-	case '9':
-	  digit -= '0';
-	  break;
-	case 'a':
-	case 'b':
-	case 'c':
-	case 'd':
-	case 'e':
-	case 'f':
-	  digit -= 'a';
-	  digit += 10;
-	  break;
-	default:
-	  /* this is not a bitstring literal, probably an integer */
-	  return 0;
-	}
-      if (digit >= 1 << bits_per_char)
-	{
-	  /* Found something not in domain for current base. */
-	  error ("Too-large digit in bitstring or integer.");
-	}
-      else
-	{
-	  /* Extract bits from digit, packing them into the bitstring byte. */
-	  int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
-	  for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
-	       TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
-	    {
-	      bitcount++;
-	      if (digit & (1 << k))
-		{
-		  tempbuf[tempbufindex] |=
-		    (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-		    ? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
-		    : (1 << bitoffset);
-		}
-	      bitoffset++;
-	      if (bitoffset == HOST_CHAR_BIT)
-		{
-		  bitoffset = 0;
-		  tempbufindex++;
-		  CHECKBUF (1);
-		  tempbuf[tempbufindex] = 0;
-		}
-	    }
-	}
-    }
-
-  /* Verify that we consumed everything up to the trailing single quote,
-     and that we found some bits (IE not just underbars). */
-
-  if (*tokptr++ != '\'')
-    {
-      return (0);
-    }
-  else
-    {
-      yylval.sval.ptr = tempbuf;
-      yylval.sval.length = bitcount;
-      lexptr = tokptr;
-      return (BIT_STRING_LITERAL);
-    }
-}
-
-struct token
-{
-  char *operator;
-  int token;
-};
-
-static const struct token idtokentab[] =
-{
-  {"array", ARRAY},
-  {"length", LENGTH},
-  {"lower", LOWER},
-  {"upper", UPPER},
-  {"andif", ANDIF},
-  {"pred", PRED},
-  {"succ", SUCC},
-  {"card", CARD},
-  {"size", SIZE},
-  {"orif", ORIF},
-  {"num", NUM},
-  {"abs", ABS},
-  {"max", MAX_TOKEN},
-  {"min", MIN_TOKEN},
-  {"mod", MOD},
-  {"rem", REM},
-  {"not", NOT},
-  {"xor", LOGXOR},
-  {"and", LOGAND},
-  {"in", IN},
-  {"or", LOGIOR},
-  {"up", UP},
-  {"addr", ADDR_TOKEN},
-  {"null", EMPTINESS_LITERAL}
-};
-
-static const struct token tokentab2[] =
-{
-  {":=", GDB_ASSIGNMENT},
-  {"//", SLASH_SLASH},
-  {"->", POINTER},
-  {"/=", NOTEQUAL},
-  {"<=", LEQ},
-  {">=", GEQ}
-};
-
-/* Read one token, getting characters through lexptr.  */
-/* This is where we will check to make sure that the language and the
-   operators used are compatible.  */
-
-static enum ch_terminal
-ch_lex (void)
-{
-  unsigned int i;
-  enum ch_terminal token;
-  char *inputname;
-  struct symbol *sym;
-
-  /* Skip over any leading whitespace. */
-  while (isspace (*lexptr))
-    {
-      lexptr++;
-    }
-  /* Look for special single character cases which can't be the first
-     character of some other multicharacter token. */
-  switch (*lexptr)
-    {
-    case '\0':
-      return END_TOKEN;
-    case ',':
-    case '=':
-    case ';':
-    case '!':
-    case '+':
-    case '*':
-    case '(':
-    case ')':
-    case '[':
-    case ']':
-      return (*lexptr++);
-    }
-  /* Look for characters which start a particular kind of multicharacter
-     token, such as a character literal, register name, convenience
-     variable name, string literal, etc. */
-  switch (*lexptr)
-    {
-    case '\'':
-    case '\"':
-      /* First try to match a string literal, which is any
-         sequence of characters enclosed in matching single or double
-         quotes, except that a single character inside single quotes
-         is a character literal, so we have to catch that case also. */
-      token = match_string_literal ();
-      if (token != 0)
-	{
-	  return (token);
-	}
-      if (*lexptr == '\'')
-	{
-	  token = match_character_literal ();
-	  if (token != 0)
-	    {
-	      return (token);
-	    }
-	}
-      break;
-    case 'C':
-    case 'c':
-      token = match_character_literal ();
-      if (token != 0)
-	{
-	  return (token);
-	}
-      break;
-    case '$':
-      yylval.sval.ptr = lexptr;
-      do
-	{
-	  lexptr++;
-	}
-      while (isalnum (*lexptr) || *lexptr == '_' || *lexptr == '$');
-      yylval.sval.length = lexptr - yylval.sval.ptr;
-      write_dollar_variable (yylval.sval);
-      return GDB_VARIABLE;
-      break;
-    }
-  /* See if it is a special token of length 2.  */
-  for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
-    {
-      if (STREQN (lexptr, tokentab2[i].operator, 2))
-	{
-	  lexptr += 2;
-	  return (tokentab2[i].token);
-	}
-    }
-  /* Look for single character cases which which could be the first
-     character of some other multicharacter token, but aren't, or we
-     would already have found it. */
-  switch (*lexptr)
-    {
-    case '-':
-    case ':':
-    case '/':
-    case '<':
-    case '>':
-      return (*lexptr++);
-    }
-  /* Look for a float literal before looking for an integer literal, so
-     we match as much of the input stream as possible. */
-  token = match_float_literal ();
-  if (token != 0)
-    {
-      return (token);
-    }
-  token = match_bitstring_literal ();
-  if (token != 0)
-    {
-      return (token);
-    }
-  token = match_integer_literal ();
-  if (token != 0)
-    {
-      return (token);
-    }
-
-  /* Try to match a simple name string, and if a match is found, then
-     further classify what sort of name it is and return an appropriate
-     token.  Note that attempting to match a simple name string consumes
-     the token from lexptr, so we can't back out if we later find that
-     we can't classify what sort of name it is. */
-
-  inputname = match_simple_name_string ();
-
-  if (inputname != NULL)
-    {
-      char *simplename = (char *) alloca (strlen (inputname) + 1);
-
-      char *dptr = simplename, *sptr = inputname;
-      for (; *sptr; sptr++)
-	*dptr++ = isupper (*sptr) ? tolower (*sptr) : *sptr;
-      *dptr = '\0';
-
-      /* See if it is a reserved identifier. */
-      for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
-	{
-	  if (STREQ (simplename, idtokentab[i].operator))
-	    {
-	      return (idtokentab[i].token);
-	    }
-	}
-
-      /* Look for other special tokens. */
-      if (STREQ (simplename, "true"))
-	{
-	  yylval.ulval = 1;
-	  return (BOOLEAN_LITERAL);
-	}
-      if (STREQ (simplename, "false"))
-	{
-	  yylval.ulval = 0;
-	  return (BOOLEAN_LITERAL);
-	}
-
-      sym = lookup_symbol (inputname, expression_context_block,
-			   VAR_NAMESPACE, (int *) NULL,
-			   (struct symtab **) NULL);
-      if (sym == NULL && strcmp (inputname, simplename) != 0)
-	{
-	  sym = lookup_symbol (simplename, expression_context_block,
-			       VAR_NAMESPACE, (int *) NULL,
-			       (struct symtab **) NULL);
-	}
-      if (sym != NULL)
-	{
-	  yylval.ssym.stoken.ptr = NULL;
-	  yylval.ssym.stoken.length = 0;
-	  yylval.ssym.sym = sym;
-	  yylval.ssym.is_a_field_of_this = 0;	/* FIXME, C++'ism */
-	  switch (SYMBOL_CLASS (sym))
-	    {
-	    case LOC_BLOCK:
-	      /* Found a procedure name. */
-	      return (GENERAL_PROCEDURE_NAME);
-	    case LOC_STATIC:
-	      /* Found a global or local static variable. */
-	      return (LOCATION_NAME);
-	    case LOC_REGISTER:
-	    case LOC_ARG:
-	    case LOC_REF_ARG:
-	    case LOC_REGPARM:
-	    case LOC_REGPARM_ADDR:
-	    case LOC_LOCAL:
-	    case LOC_LOCAL_ARG:
-	    case LOC_BASEREG:
-	    case LOC_BASEREG_ARG:
-	      if (innermost_block == NULL
-		  || contained_in (block_found, innermost_block))
-		{
-		  innermost_block = block_found;
-		}
-	      return (LOCATION_NAME);
-	      break;
-	    case LOC_CONST:
-	    case LOC_LABEL:
-	      return (LOCATION_NAME);
-	      break;
-	    case LOC_TYPEDEF:
-	      yylval.tsym.type = SYMBOL_TYPE (sym);
-	      return TYPENAME;
-	    case LOC_UNDEF:
-	    case LOC_CONST_BYTES:
-	    case LOC_OPTIMIZED_OUT:
-	      error ("Symbol \"%s\" names no location.", inputname);
-	      break;
-	    default:
-	      internal_error (__FILE__, __LINE__,
-			      "unhandled SYMBOL_CLASS in ch_lex()");
-	      break;
-	    }
-	}
-      else if (!have_full_symbols () && !have_partial_symbols ())
-	{
-	  error ("No symbol table is loaded.  Use the \"file\" command.");
-	}
-      else
-	{
-	  error ("No symbol \"%s\" in current context.", inputname);
-	}
-    }
-
-  /* Catch single character tokens which are not part of some
-     longer token. */
-
-  switch (*lexptr)
-    {
-    case '.':			/* Not float for example. */
-      lexptr++;
-      while (isspace (*lexptr))
-	lexptr++;
-      inputname = match_simple_name_string ();
-      if (!inputname)
-	return '.';
-      return DOT_FIELD_NAME;
-    }
-
-  return (ILLEGAL_TOKEN);
-}
-
-static void
-write_lower_upper_value (enum exp_opcode opcode,	/* Either UNOP_LOWER or UNOP_UPPER */
-			 struct type *type)
-{
-  if (type == NULL)
-    write_exp_elt_opcode (opcode);
-  else
-    {
-      struct type *result_type;
-      LONGEST val = type_lower_upper (opcode, type, &result_type);
-      write_exp_elt_opcode (OP_LONG);
-      write_exp_elt_type (result_type);
-      write_exp_elt_longcst (val);
-      write_exp_elt_opcode (OP_LONG);
-    }
-}
-
-void
-chill_error (char *msg)
-{
-  /* Never used. */
-}
+// OBSOLETE /* Parser for GNU CHILL (CCITT High-Level Language)  -*- C -*-
+// OBSOLETE    Copyright 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Parse a Chill expression from text in a string,
+// OBSOLETE    and return the result as a  struct expression  pointer.
+// OBSOLETE    That structure contains arithmetic operations in reverse polish,
+// OBSOLETE    with constants represented by operations that are followed by special data.
+// OBSOLETE    See expression.h for the details of the format.
+// OBSOLETE    What is important here is that it can be built up sequentially
+// OBSOLETE    during the process of parsing; the lower levels of the tree always
+// OBSOLETE    come first in the result.
+// OBSOLETE 
+// OBSOLETE    Note that the language accepted by this parser is more liberal
+// OBSOLETE    than the one accepted by an actual Chill compiler.  For example, the
+// OBSOLETE    language rule that a simple name string can not be one of the reserved
+// OBSOLETE    simple name strings is not enforced (e.g "case" is not treated as a
+// OBSOLETE    reserved name).  Another example is that Chill is a strongly typed
+// OBSOLETE    language, and certain expressions that violate the type constraints
+// OBSOLETE    may still be evaluated if gdb can do so in a meaningful manner, while
+// OBSOLETE    such expressions would be rejected by the compiler.  The reason for
+// OBSOLETE    this more liberal behavior is the philosophy that the debugger
+// OBSOLETE    is intended to be a tool that is used by the programmer when things
+// OBSOLETE    go wrong, and as such, it should provide as few artificial barriers
+// OBSOLETE    to it's use as possible.  If it can do something meaningful, even
+// OBSOLETE    something that violates language contraints that are enforced by the
+// OBSOLETE    compiler, it should do so without complaint.
+// OBSOLETE 
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "parser-defs.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "bfd.h"		/* Required by objfiles.h.  */
+// OBSOLETE #include "symfile.h"		/* Required by objfiles.h.  */
+// OBSOLETE #include "objfiles.h"		/* For have_full_symbols and have_partial_symbols */
+// OBSOLETE 
+// OBSOLETE #ifdef __GNUC__
+// OBSOLETE #define INLINE __inline__
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE typedef union
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     LONGEST lval;
+// OBSOLETE     ULONGEST ulval;
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	LONGEST val;
+// OBSOLETE 	struct type *type;
+// OBSOLETE       }
+// OBSOLETE     typed_val;
+// OBSOLETE     double dval;
+// OBSOLETE     struct symbol *sym;
+// OBSOLETE     struct type *tval;
+// OBSOLETE     struct stoken sval;
+// OBSOLETE     struct ttype tsym;
+// OBSOLETE     struct symtoken ssym;
+// OBSOLETE   }
+// OBSOLETE YYSTYPE;
+// OBSOLETE 
+// OBSOLETE enum ch_terminal
+// OBSOLETE   {
+// OBSOLETE     END_TOKEN = 0,
+// OBSOLETE     /* '\001' ... '\xff' come first. */
+// OBSOLETE     OPEN_PAREN = '(',
+// OBSOLETE     TOKEN_NOT_READ = 999,
+// OBSOLETE     INTEGER_LITERAL,
+// OBSOLETE     BOOLEAN_LITERAL,
+// OBSOLETE     CHARACTER_LITERAL,
+// OBSOLETE     FLOAT_LITERAL,
+// OBSOLETE     GENERAL_PROCEDURE_NAME,
+// OBSOLETE     LOCATION_NAME,
+// OBSOLETE     EMPTINESS_LITERAL,
+// OBSOLETE     CHARACTER_STRING_LITERAL,
+// OBSOLETE     BIT_STRING_LITERAL,
+// OBSOLETE     TYPENAME,
+// OBSOLETE     DOT_FIELD_NAME,		/* '.' followed by <field name> */
+// OBSOLETE     CASE,
+// OBSOLETE     OF,
+// OBSOLETE     ESAC,
+// OBSOLETE     LOGIOR,
+// OBSOLETE     ORIF,
+// OBSOLETE     LOGXOR,
+// OBSOLETE     LOGAND,
+// OBSOLETE     ANDIF,
+// OBSOLETE     NOTEQUAL,
+// OBSOLETE     GEQ,
+// OBSOLETE     LEQ,
+// OBSOLETE     IN,
+// OBSOLETE     SLASH_SLASH,
+// OBSOLETE     MOD,
+// OBSOLETE     REM,
+// OBSOLETE     NOT,
+// OBSOLETE     POINTER,
+// OBSOLETE     RECEIVE,
+// OBSOLETE     UP,
+// OBSOLETE     IF,
+// OBSOLETE     THEN,
+// OBSOLETE     ELSE,
+// OBSOLETE     FI,
+// OBSOLETE     ELSIF,
+// OBSOLETE     ILLEGAL_TOKEN,
+// OBSOLETE     NUM,
+// OBSOLETE     PRED,
+// OBSOLETE     SUCC,
+// OBSOLETE     ABS,
+// OBSOLETE     CARD,
+// OBSOLETE     MAX_TOKEN,
+// OBSOLETE     MIN_TOKEN,
+// OBSOLETE     ADDR_TOKEN,
+// OBSOLETE     SIZE,
+// OBSOLETE     UPPER,
+// OBSOLETE     LOWER,
+// OBSOLETE     LENGTH,
+// OBSOLETE     ARRAY,
+// OBSOLETE     GDB_VARIABLE,
+// OBSOLETE     GDB_ASSIGNMENT
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE /* Forward declarations. */
+// OBSOLETE 
+// OBSOLETE static void write_lower_upper_value (enum exp_opcode, struct type *);
+// OBSOLETE static enum ch_terminal match_bitstring_literal (void);
+// OBSOLETE static enum ch_terminal match_integer_literal (void);
+// OBSOLETE static enum ch_terminal match_character_literal (void);
+// OBSOLETE static enum ch_terminal match_string_literal (void);
+// OBSOLETE static enum ch_terminal match_float_literal (void);
+// OBSOLETE static int decode_integer_literal (LONGEST *, char **);
+// OBSOLETE static int decode_integer_value (int, char **, LONGEST *);
+// OBSOLETE static char *match_simple_name_string (void);
+// OBSOLETE static void growbuf_by_size (int);
+// OBSOLETE static void parse_case_label (void);
+// OBSOLETE static void parse_untyped_expr (void);
+// OBSOLETE static void parse_if_expression (void);
+// OBSOLETE static void parse_if_expression_body (void);
+// OBSOLETE static void parse_else_alternative (void);
+// OBSOLETE static void parse_then_alternative (void);
+// OBSOLETE static void parse_expr (void);
+// OBSOLETE static void parse_operand0 (void);
+// OBSOLETE static void parse_operand1 (void);
+// OBSOLETE static void parse_operand2 (void);
+// OBSOLETE static void parse_operand3 (void);
+// OBSOLETE static void parse_operand4 (void);
+// OBSOLETE static void parse_operand5 (void);
+// OBSOLETE static void parse_operand6 (void);
+// OBSOLETE static void parse_primval (void);
+// OBSOLETE static void parse_tuple (struct type *);
+// OBSOLETE static void parse_opt_element_list (struct type *);
+// OBSOLETE static void parse_tuple_element (struct type *);
+// OBSOLETE static void parse_named_record_element (void);
+// OBSOLETE static void parse_call (void);
+// OBSOLETE static struct type *parse_mode_or_normal_call (void);
+// OBSOLETE #if 0
+// OBSOLETE static struct type *parse_mode_call (void);
+// OBSOLETE #endif
+// OBSOLETE static void parse_unary_call (void);
+// OBSOLETE static int parse_opt_untyped_expr (void);
+// OBSOLETE static int expect (enum ch_terminal, char *);
+// OBSOLETE static enum ch_terminal ch_lex (void);
+// OBSOLETE INLINE static enum ch_terminal PEEK_TOKEN (void);
+// OBSOLETE static enum ch_terminal peek_token_ (int);
+// OBSOLETE static void forward_token_ (void);
+// OBSOLETE static void require (enum ch_terminal);
+// OBSOLETE static int check_token (enum ch_terminal);
+// OBSOLETE 
+// OBSOLETE #define MAX_LOOK_AHEAD 2
+// OBSOLETE static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD + 1] =
+// OBSOLETE {
+// OBSOLETE   TOKEN_NOT_READ, TOKEN_NOT_READ, TOKEN_NOT_READ};
+// OBSOLETE static YYSTYPE yylval;
+// OBSOLETE static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
+// OBSOLETE 
+// OBSOLETE /*int current_token, lookahead_token; */
+// OBSOLETE 
+// OBSOLETE INLINE static enum ch_terminal
+// OBSOLETE PEEK_TOKEN (void)
+// OBSOLETE {
+// OBSOLETE   if (terminal_buffer[0] == TOKEN_NOT_READ)
+// OBSOLETE     {
+// OBSOLETE       terminal_buffer[0] = ch_lex ();
+// OBSOLETE       val_buffer[0] = yylval;
+// OBSOLETE     }
+// OBSOLETE   return terminal_buffer[0];
+// OBSOLETE }
+// OBSOLETE #define PEEK_LVAL() val_buffer[0]
+// OBSOLETE #define PEEK_TOKEN1() peek_token_(1)
+// OBSOLETE #define PEEK_TOKEN2() peek_token_(2)
+// OBSOLETE static enum ch_terminal
+// OBSOLETE peek_token_ (int i)
+// OBSOLETE {
+// OBSOLETE   if (i > MAX_LOOK_AHEAD)
+// OBSOLETE     internal_error (__FILE__, __LINE__,
+// OBSOLETE 		    "too much lookahead");
+// OBSOLETE   if (terminal_buffer[i] == TOKEN_NOT_READ)
+// OBSOLETE     {
+// OBSOLETE       terminal_buffer[i] = ch_lex ();
+// OBSOLETE       val_buffer[i] = yylval;
+// OBSOLETE     }
+// OBSOLETE   return terminal_buffer[i];
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE pushback_token (enum ch_terminal code, YYSTYPE node)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
+// OBSOLETE     internal_error (__FILE__, __LINE__,
+// OBSOLETE 		    "cannot pushback token");
+// OBSOLETE   for (i = MAX_LOOK_AHEAD; i > 0; i--)
+// OBSOLETE     {
+// OBSOLETE       terminal_buffer[i] = terminal_buffer[i - 1];
+// OBSOLETE       val_buffer[i] = val_buffer[i - 1];
+// OBSOLETE     }
+// OBSOLETE   terminal_buffer[0] = code;
+// OBSOLETE   val_buffer[0] = node;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE forward_token_ (void)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   for (i = 0; i < MAX_LOOK_AHEAD; i++)
+// OBSOLETE     {
+// OBSOLETE       terminal_buffer[i] = terminal_buffer[i + 1];
+// OBSOLETE       val_buffer[i] = val_buffer[i + 1];
+// OBSOLETE     }
+// OBSOLETE   terminal_buffer[MAX_LOOK_AHEAD] = TOKEN_NOT_READ;
+// OBSOLETE }
+// OBSOLETE #define FORWARD_TOKEN() forward_token_()
+// OBSOLETE 
+// OBSOLETE /* Skip the next token.
+// OBSOLETE    if it isn't TOKEN, the parser is broken. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE require (enum ch_terminal token)
+// OBSOLETE {
+// OBSOLETE   if (PEEK_TOKEN () != token)
+// OBSOLETE     {
+// OBSOLETE       internal_error (__FILE__, __LINE__,
+// OBSOLETE 		      "expected token %d", (int) token);
+// OBSOLETE     }
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE check_token (enum ch_terminal token)
+// OBSOLETE {
+// OBSOLETE   if (PEEK_TOKEN () != token)
+// OBSOLETE     return 0;
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* return 0 if expected token was not found,
+// OBSOLETE    else return 1.
+// OBSOLETE  */
+// OBSOLETE static int
+// OBSOLETE expect (enum ch_terminal token, char *message)
+// OBSOLETE {
+// OBSOLETE   if (PEEK_TOKEN () != token)
+// OBSOLETE     {
+// OBSOLETE       if (message)
+// OBSOLETE 	error (message);
+// OBSOLETE       else if (token < 256)
+// OBSOLETE 	error ("syntax error - expected a '%c' here \"%s\"", token, lexptr);
+// OBSOLETE       else
+// OBSOLETE 	error ("syntax error");
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     FORWARD_TOKEN ();
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE /* Parse a name string.  If ALLOW_ALL is 1, ALL is allowed as a postfix. */
+// OBSOLETE 
+// OBSOLETE static tree
+// OBSOLETE parse_opt_name_string (int allow_all)
+// OBSOLETE {
+// OBSOLETE   int token = PEEK_TOKEN ();
+// OBSOLETE   tree name;
+// OBSOLETE   if (token != NAME)
+// OBSOLETE     {
+// OBSOLETE       if (token == ALL && allow_all)
+// OBSOLETE 	{
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  return ALL_POSTFIX;
+// OBSOLETE 	}
+// OBSOLETE       return NULL_TREE;
+// OBSOLETE     }
+// OBSOLETE   name = PEEK_LVAL ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       token = PEEK_TOKEN ();
+// OBSOLETE       if (token != '!')
+// OBSOLETE 	return name;
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       token = PEEK_TOKEN ();
+// OBSOLETE       if (token == ALL && allow_all)
+// OBSOLETE 	return get_identifier3 (IDENTIFIER_POINTER (name), "!", "*");
+// OBSOLETE       if (token != NAME)
+// OBSOLETE 	{
+// OBSOLETE 	  if (pass == 1)
+// OBSOLETE 	    error ("'%s!' is not followed by an identifier",
+// OBSOLETE 		   IDENTIFIER_POINTER (name));
+// OBSOLETE 	  return name;
+// OBSOLETE 	}
+// OBSOLETE       name = get_identifier3 (IDENTIFIER_POINTER (name),
+// OBSOLETE 			      "!", IDENTIFIER_POINTER (PEEK_LVAL ()));
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static tree
+// OBSOLETE parse_simple_name_string (void)
+// OBSOLETE {
+// OBSOLETE   int token = PEEK_TOKEN ();
+// OBSOLETE   tree name;
+// OBSOLETE   if (token != NAME)
+// OBSOLETE     {
+// OBSOLETE       error ("expected a name here");
+// OBSOLETE       return error_mark_node;
+// OBSOLETE     }
+// OBSOLETE   name = PEEK_LVAL ();
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   return name;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static tree
+// OBSOLETE parse_name_string (void)
+// OBSOLETE {
+// OBSOLETE   tree name = parse_opt_name_string (0);
+// OBSOLETE   if (name)
+// OBSOLETE     return name;
+// OBSOLETE   if (pass == 1)
+// OBSOLETE     error ("expected a name string here");
+// OBSOLETE   return error_mark_node;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Matches: <name_string>
+// OBSOLETE    Returns if pass 1: the identifier.
+// OBSOLETE    Returns if pass 2: a decl or value for identifier. */
+// OBSOLETE 
+// OBSOLETE static tree
+// OBSOLETE parse_name (void)
+// OBSOLETE {
+// OBSOLETE   tree name = parse_name_string ();
+// OBSOLETE   if (pass == 1 || ignoring)
+// OBSOLETE     return name;
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       tree decl = lookup_name (name);
+// OBSOLETE       if (decl == NULL_TREE)
+// OBSOLETE 	{
+// OBSOLETE 	  error ("`%s' undeclared", IDENTIFIER_POINTER (name));
+// OBSOLETE 	  return error_mark_node;
+// OBSOLETE 	}
+// OBSOLETE       else if (TREE_CODE (TREE_TYPE (decl)) == ERROR_MARK)
+// OBSOLETE 	return error_mark_node;
+// OBSOLETE       else if (TREE_CODE (decl) == CONST_DECL)
+// OBSOLETE 	return DECL_INITIAL (decl);
+// OBSOLETE       else if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
+// OBSOLETE 	return convert_from_reference (decl);
+// OBSOLETE       else
+// OBSOLETE 	return decl;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE static void
+// OBSOLETE pushback_paren_expr (tree expr)
+// OBSOLETE {
+// OBSOLETE   if (pass == 1 && !ignoring)
+// OBSOLETE     expr = build1 (PAREN_EXPR, NULL_TREE, expr);
+// OBSOLETE   pushback_token (EXPR, expr);
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* Matches: <case label> */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_case_label (void)
+// OBSOLETE {
+// OBSOLETE   if (check_token (ELSE))
+// OBSOLETE     error ("ELSE in tuples labels not implemented");
+// OBSOLETE   /* Does not handle the case of a mode name.  FIXME */
+// OBSOLETE   parse_expr ();
+// OBSOLETE   if (check_token (':'))
+// OBSOLETE     {
+// OBSOLETE       parse_expr ();
+// OBSOLETE       write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE parse_opt_untyped_expr (void)
+// OBSOLETE {
+// OBSOLETE   switch (PEEK_TOKEN ())
+// OBSOLETE     {
+// OBSOLETE     case ',':
+// OBSOLETE     case ':':
+// OBSOLETE     case ')':
+// OBSOLETE       return 0;
+// OBSOLETE     default:
+// OBSOLETE       parse_untyped_expr ();
+// OBSOLETE       return 1;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_unary_call (void)
+// OBSOLETE {
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   expect ('(', NULL);
+// OBSOLETE   parse_expr ();
+// OBSOLETE   expect (')', NULL);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Parse NAME '(' MODENAME ')'. */
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE parse_mode_call (void)
+// OBSOLETE {
+// OBSOLETE   struct type *type;
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   expect ('(', NULL);
+// OBSOLETE   if (PEEK_TOKEN () != TYPENAME)
+// OBSOLETE     error ("expect MODENAME here `%s'", lexptr);
+// OBSOLETE   type = PEEK_LVAL ().tsym.type;
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   expect (')', NULL);
+// OBSOLETE   return type;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE parse_mode_or_normal_call (void)
+// OBSOLETE {
+// OBSOLETE   struct type *type;
+// OBSOLETE   FORWARD_TOKEN ();
+// OBSOLETE   expect ('(', NULL);
+// OBSOLETE   if (PEEK_TOKEN () == TYPENAME)
+// OBSOLETE     {
+// OBSOLETE       type = PEEK_LVAL ().tsym.type;
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       parse_expr ();
+// OBSOLETE       type = NULL;
+// OBSOLETE     }
+// OBSOLETE   expect (')', NULL);
+// OBSOLETE   return type;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Parse something that looks like a function call.
+// OBSOLETE    Assume we have parsed the function, and are at the '('. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_call (void)
+// OBSOLETE {
+// OBSOLETE   int arg_count;
+// OBSOLETE   require ('(');
+// OBSOLETE   /* This is to save the value of arglist_len
+// OBSOLETE      being accumulated for each dimension. */
+// OBSOLETE   start_arglist ();
+// OBSOLETE   if (parse_opt_untyped_expr ())
+// OBSOLETE     {
+// OBSOLETE       int tok = PEEK_TOKEN ();
+// OBSOLETE       arglist_len = 1;
+// OBSOLETE       if (tok == UP || tok == ':')
+// OBSOLETE 	{
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  parse_expr ();
+// OBSOLETE 	  expect (')', "expected ')' to terminate slice");
+// OBSOLETE 	  end_arglist ();
+// OBSOLETE 	  write_exp_elt_opcode (tok == UP ? TERNOP_SLICE_COUNT
+// OBSOLETE 				: TERNOP_SLICE);
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       while (check_token (','))
+// OBSOLETE 	{
+// OBSOLETE 	  parse_untyped_expr ();
+// OBSOLETE 	  arglist_len++;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     arglist_len = 0;
+// OBSOLETE   expect (')', NULL);
+// OBSOLETE   arg_count = end_arglist ();
+// OBSOLETE   write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE   write_exp_elt_longcst (arg_count);
+// OBSOLETE   write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_named_record_element (void)
+// OBSOLETE {
+// OBSOLETE   struct stoken label;
+// OBSOLETE   char buf[256];
+// OBSOLETE 
+// OBSOLETE   label = PEEK_LVAL ().sval;
+// OBSOLETE   sprintf (buf, "expected a field name here `%s'", lexptr);
+// OBSOLETE   expect (DOT_FIELD_NAME, buf);
+// OBSOLETE   if (check_token (','))
+// OBSOLETE     parse_named_record_element ();
+// OBSOLETE   else if (check_token (':'))
+// OBSOLETE     parse_expr ();
+// OBSOLETE   else
+// OBSOLETE     error ("syntax error near `%s' in named record tuple element", lexptr);
+// OBSOLETE   write_exp_elt_opcode (OP_LABELED);
+// OBSOLETE   write_exp_string (label);
+// OBSOLETE   write_exp_elt_opcode (OP_LABELED);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Returns one or more TREE_LIST nodes, in reverse order. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_tuple_element (struct type *type)
+// OBSOLETE {
+// OBSOLETE   if (PEEK_TOKEN () == DOT_FIELD_NAME)
+// OBSOLETE     {
+// OBSOLETE       /* Parse a labelled structure tuple. */
+// OBSOLETE       parse_named_record_element ();
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (check_token ('('))
+// OBSOLETE     {
+// OBSOLETE       if (check_token ('*'))
+// OBSOLETE 	{
+// OBSOLETE 	  expect (')', "missing ')' after '*' case label list");
+// OBSOLETE 	  if (type)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+// OBSOLETE 		{
+// OBSOLETE 		  /* do this as a range from low to high */
+// OBSOLETE 		  struct type *range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE 		  LONGEST low_bound, high_bound;
+// OBSOLETE 		  if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
+// OBSOLETE 		    error ("cannot determine bounds for (*)");
+// OBSOLETE 		  /* lower bound */
+// OBSOLETE 		  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 		  write_exp_elt_type (range_type);
+// OBSOLETE 		  write_exp_elt_longcst (low_bound);
+// OBSOLETE 		  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 		  /* upper bound */
+// OBSOLETE 		  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 		  write_exp_elt_type (range_type);
+// OBSOLETE 		  write_exp_elt_longcst (high_bound);
+// OBSOLETE 		  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 		  write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		error ("(*) in invalid context");
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    error ("(*) only possible with modename in front of tuple (mode[..])");
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  parse_case_label ();
+// OBSOLETE 	  while (check_token (','))
+// OBSOLETE 	    {
+// OBSOLETE 	      parse_case_label ();
+// OBSOLETE 	      write_exp_elt_opcode (BINOP_COMMA);
+// OBSOLETE 	    }
+// OBSOLETE 	  expect (')', NULL);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     parse_untyped_expr ();
+// OBSOLETE   if (check_token (':'))
+// OBSOLETE     {
+// OBSOLETE       /* A powerset range or a labeled Array. */
+// OBSOLETE       parse_untyped_expr ();
+// OBSOLETE       write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Matches:  a COMMA-separated list of tuple elements.
+// OBSOLETE    Returns a list (of TREE_LIST nodes). */
+// OBSOLETE static void
+// OBSOLETE parse_opt_element_list (struct type *type)
+// OBSOLETE {
+// OBSOLETE   arglist_len = 0;
+// OBSOLETE   if (PEEK_TOKEN () == ']')
+// OBSOLETE     return;
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       parse_tuple_element (type);
+// OBSOLETE       arglist_len++;
+// OBSOLETE       if (PEEK_TOKEN () == ']')
+// OBSOLETE 	break;
+// OBSOLETE       if (!check_token (','))
+// OBSOLETE 	error ("bad syntax in tuple");
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Parses: '[' elements ']'
+// OBSOLETE    If modename is non-NULL it prefixed the tuple.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_tuple (struct type *mode)
+// OBSOLETE {
+// OBSOLETE   struct type *type;
+// OBSOLETE   if (mode)
+// OBSOLETE     type = check_typedef (mode);
+// OBSOLETE   else
+// OBSOLETE     type = 0;
+// OBSOLETE   require ('[');
+// OBSOLETE   start_arglist ();
+// OBSOLETE   parse_opt_element_list (type);
+// OBSOLETE   expect (']', "missing ']' after tuple");
+// OBSOLETE   write_exp_elt_opcode (OP_ARRAY);
+// OBSOLETE   write_exp_elt_longcst ((LONGEST) 0);
+// OBSOLETE   write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
+// OBSOLETE   write_exp_elt_opcode (OP_ARRAY);
+// OBSOLETE   if (type)
+// OBSOLETE     {
+// OBSOLETE       if (TYPE_CODE (type) != TYPE_CODE_ARRAY
+// OBSOLETE 	  && TYPE_CODE (type) != TYPE_CODE_STRUCT
+// OBSOLETE 	  && TYPE_CODE (type) != TYPE_CODE_SET)
+// OBSOLETE 	error ("invalid tuple mode");
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE       write_exp_elt_type (mode);
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_primval (void)
+// OBSOLETE {
+// OBSOLETE   struct type *type;
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   char *op_name;
+// OBSOLETE   switch (PEEK_TOKEN ())
+// OBSOLETE     {
+// OBSOLETE     case INTEGER_LITERAL:
+// OBSOLETE     case CHARACTER_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE       write_exp_elt_type (PEEK_LVAL ().typed_val.type);
+// OBSOLETE       write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case BOOLEAN_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_BOOL);
+// OBSOLETE       write_exp_elt_longcst ((LONGEST) PEEK_LVAL ().ulval);
+// OBSOLETE       write_exp_elt_opcode (OP_BOOL);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case FLOAT_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_DOUBLE);
+// OBSOLETE       write_exp_elt_type (builtin_type_double);
+// OBSOLETE       write_exp_elt_dblcst (PEEK_LVAL ().dval);
+// OBSOLETE       write_exp_elt_opcode (OP_DOUBLE);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case EMPTINESS_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE       write_exp_elt_type (lookup_pointer_type (builtin_type_void));
+// OBSOLETE       write_exp_elt_longcst (0);
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case CHARACTER_STRING_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_STRING);
+// OBSOLETE       write_exp_string (PEEK_LVAL ().sval);
+// OBSOLETE       write_exp_elt_opcode (OP_STRING);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case BIT_STRING_LITERAL:
+// OBSOLETE       write_exp_elt_opcode (OP_BITSTRING);
+// OBSOLETE       write_exp_bitstring (PEEK_LVAL ().sval);
+// OBSOLETE       write_exp_elt_opcode (OP_BITSTRING);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case ARRAY:
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       /* This is pseudo-Chill, similar to C's '(TYPE[])EXPR'
+// OBSOLETE          which casts to an artificial array. */
+// OBSOLETE       expect ('(', NULL);
+// OBSOLETE       expect (')', NULL);
+// OBSOLETE       if (PEEK_TOKEN () != TYPENAME)
+// OBSOLETE 	error ("missing MODENAME after ARRAY()");
+// OBSOLETE       type = PEEK_LVAL ().tsym.type;
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       expect ('(', NULL);
+// OBSOLETE       parse_expr ();
+// OBSOLETE       expect (')', "missing right parenthesis");
+// OBSOLETE       type = create_array_type ((struct type *) NULL, type,
+// OBSOLETE 				create_range_type ((struct type *) NULL,
+// OBSOLETE 						   builtin_type_int, 0, 0));
+// OBSOLETE       TYPE_ARRAY_UPPER_BOUND_TYPE (type) = BOUND_CANNOT_BE_DETERMINED;
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE       write_exp_elt_type (type);
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE       break;
+// OBSOLETE #if 0
+// OBSOLETE     case CONST:
+// OBSOLETE     case EXPR:
+// OBSOLETE       val = PEEK_LVAL ();
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE #endif
+// OBSOLETE     case '(':
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       parse_expr ();
+// OBSOLETE       expect (')', "missing right parenthesis");
+// OBSOLETE       break;
+// OBSOLETE     case '[':
+// OBSOLETE       parse_tuple (NULL);
+// OBSOLETE       break;
+// OBSOLETE     case GENERAL_PROCEDURE_NAME:
+// OBSOLETE     case LOCATION_NAME:
+// OBSOLETE       write_exp_elt_opcode (OP_VAR_VALUE);
+// OBSOLETE       write_exp_elt_block (NULL);
+// OBSOLETE       write_exp_elt_sym (PEEK_LVAL ().ssym.sym);
+// OBSOLETE       write_exp_elt_opcode (OP_VAR_VALUE);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case GDB_VARIABLE:		/* gdb specific */
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       break;
+// OBSOLETE     case NUM:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE       write_exp_elt_type (builtin_type_int);
+// OBSOLETE       write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE       break;
+// OBSOLETE     case CARD:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_CARD);
+// OBSOLETE       break;
+// OBSOLETE     case MAX_TOKEN:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_CHMAX);
+// OBSOLETE       break;
+// OBSOLETE     case MIN_TOKEN:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_CHMIN);
+// OBSOLETE       break;
+// OBSOLETE     case PRED:
+// OBSOLETE       op_name = "PRED";
+// OBSOLETE       goto unimplemented_unary_builtin;
+// OBSOLETE     case SUCC:
+// OBSOLETE       op_name = "SUCC";
+// OBSOLETE       goto unimplemented_unary_builtin;
+// OBSOLETE     case ABS:
+// OBSOLETE       op_name = "ABS";
+// OBSOLETE       goto unimplemented_unary_builtin;
+// OBSOLETE     unimplemented_unary_builtin:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       error ("not implemented:  %s builtin function", op_name);
+// OBSOLETE       break;
+// OBSOLETE     case ADDR_TOKEN:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_ADDR);
+// OBSOLETE       break;
+// OBSOLETE     case SIZE:
+// OBSOLETE       type = parse_mode_or_normal_call ();
+// OBSOLETE       if (type)
+// OBSOLETE 	{
+// OBSOLETE 	  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 	  write_exp_elt_type (builtin_type_int);
+// OBSOLETE 	  CHECK_TYPEDEF (type);
+// OBSOLETE 	  write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (type));
+// OBSOLETE 	  write_exp_elt_opcode (OP_LONG);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	write_exp_elt_opcode (UNOP_SIZEOF);
+// OBSOLETE       break;
+// OBSOLETE     case LOWER:
+// OBSOLETE       op = UNOP_LOWER;
+// OBSOLETE       goto lower_upper;
+// OBSOLETE     case UPPER:
+// OBSOLETE       op = UNOP_UPPER;
+// OBSOLETE       goto lower_upper;
+// OBSOLETE     lower_upper:
+// OBSOLETE       type = parse_mode_or_normal_call ();
+// OBSOLETE       write_lower_upper_value (op, type);
+// OBSOLETE       break;
+// OBSOLETE     case LENGTH:
+// OBSOLETE       parse_unary_call ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_LENGTH);
+// OBSOLETE       break;
+// OBSOLETE     case TYPENAME:
+// OBSOLETE       type = PEEK_LVAL ().tsym.type;
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case '[':
+// OBSOLETE 	  parse_tuple (type);
+// OBSOLETE 	  break;
+// OBSOLETE 	case '(':
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  parse_expr ();
+// OBSOLETE 	  expect (')', "missing right parenthesis");
+// OBSOLETE 	  write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE 	  write_exp_elt_type (type);
+// OBSOLETE 	  write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  error ("typename in invalid context");
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE       error ("invalid expression syntax at `%s'", lexptr);
+// OBSOLETE     }
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case DOT_FIELD_NAME:
+// OBSOLETE 	  write_exp_elt_opcode (STRUCTOP_STRUCT);
+// OBSOLETE 	  write_exp_string (PEEK_LVAL ().sval);
+// OBSOLETE 	  write_exp_elt_opcode (STRUCTOP_STRUCT);
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  continue;
+// OBSOLETE 	case POINTER:
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  if (PEEK_TOKEN () == TYPENAME)
+// OBSOLETE 	    {
+// OBSOLETE 	      type = PEEK_LVAL ().tsym.type;
+// OBSOLETE 	      write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE 	      write_exp_elt_type (lookup_pointer_type (type));
+// OBSOLETE 	      write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE 	      FORWARD_TOKEN ();
+// OBSOLETE 	    }
+// OBSOLETE 	  write_exp_elt_opcode (UNOP_IND);
+// OBSOLETE 	  continue;
+// OBSOLETE 	case OPEN_PAREN:
+// OBSOLETE 	  parse_call ();
+// OBSOLETE 	  continue;
+// OBSOLETE 	case CHARACTER_STRING_LITERAL:
+// OBSOLETE 	case CHARACTER_LITERAL:
+// OBSOLETE 	case BIT_STRING_LITERAL:
+// OBSOLETE 	  /* Handle string repetition. (See comment in parse_operand5.) */
+// OBSOLETE 	  parse_primval ();
+// OBSOLETE 	  write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE 	  write_exp_elt_longcst (1);
+// OBSOLETE 	  write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE 	  continue;
+// OBSOLETE 	case END_TOKEN:
+// OBSOLETE 	case TOKEN_NOT_READ:
+// OBSOLETE 	case INTEGER_LITERAL:
+// OBSOLETE 	case BOOLEAN_LITERAL:
+// OBSOLETE 	case FLOAT_LITERAL:
+// OBSOLETE 	case GENERAL_PROCEDURE_NAME:
+// OBSOLETE 	case LOCATION_NAME:
+// OBSOLETE 	case EMPTINESS_LITERAL:
+// OBSOLETE 	case TYPENAME:
+// OBSOLETE 	case CASE:
+// OBSOLETE 	case OF:
+// OBSOLETE 	case ESAC:
+// OBSOLETE 	case LOGIOR:
+// OBSOLETE 	case ORIF:
+// OBSOLETE 	case LOGXOR:
+// OBSOLETE 	case LOGAND:
+// OBSOLETE 	case ANDIF:
+// OBSOLETE 	case NOTEQUAL:
+// OBSOLETE 	case GEQ:
+// OBSOLETE 	case LEQ:
+// OBSOLETE 	case IN:
+// OBSOLETE 	case SLASH_SLASH:
+// OBSOLETE 	case MOD:
+// OBSOLETE 	case REM:
+// OBSOLETE 	case NOT:
+// OBSOLETE 	case RECEIVE:
+// OBSOLETE 	case UP:
+// OBSOLETE 	case IF:
+// OBSOLETE 	case THEN:
+// OBSOLETE 	case ELSE:
+// OBSOLETE 	case FI:
+// OBSOLETE 	case ELSIF:
+// OBSOLETE 	case ILLEGAL_TOKEN:
+// OBSOLETE 	case NUM:
+// OBSOLETE 	case PRED:
+// OBSOLETE 	case SUCC:
+// OBSOLETE 	case ABS:
+// OBSOLETE 	case CARD:
+// OBSOLETE 	case MAX_TOKEN:
+// OBSOLETE 	case MIN_TOKEN:
+// OBSOLETE 	case ADDR_TOKEN:
+// OBSOLETE 	case SIZE:
+// OBSOLETE 	case UPPER:
+// OBSOLETE 	case LOWER:
+// OBSOLETE 	case LENGTH:
+// OBSOLETE 	case ARRAY:
+// OBSOLETE 	case GDB_VARIABLE:
+// OBSOLETE 	case GDB_ASSIGNMENT:
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand6 (void)
+// OBSOLETE {
+// OBSOLETE   if (check_token (RECEIVE))
+// OBSOLETE     {
+// OBSOLETE       parse_primval ();
+// OBSOLETE       error ("not implemented:  RECEIVE expression");
+// OBSOLETE     }
+// OBSOLETE   else if (check_token (POINTER))
+// OBSOLETE     {
+// OBSOLETE       parse_primval ();
+// OBSOLETE       write_exp_elt_opcode (UNOP_ADDR);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     parse_primval ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand5 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   /* We are supposed to be looking for a <string repetition operator>,
+// OBSOLETE      but in general we can't distinguish that from a parenthesized
+// OBSOLETE      expression.  This is especially difficult if we allow the
+// OBSOLETE      string operand to be a constant expression (as requested by
+// OBSOLETE      some users), and not just a string literal.
+// OBSOLETE      Consider:  LPRN expr RPRN LPRN expr RPRN
+// OBSOLETE      Is that a function call or string repetition?
+// OBSOLETE      Instead, we handle string repetition in parse_primval,
+// OBSOLETE      and build_generalized_call. */
+// OBSOLETE   switch (PEEK_TOKEN ())
+// OBSOLETE     {
+// OBSOLETE     case NOT:
+// OBSOLETE       op = UNOP_LOGICAL_NOT;
+// OBSOLETE       break;
+// OBSOLETE     case '-':
+// OBSOLETE       op = UNOP_NEG;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       op = OP_NULL;
+// OBSOLETE     }
+// OBSOLETE   if (op != OP_NULL)
+// OBSOLETE     FORWARD_TOKEN ();
+// OBSOLETE   parse_operand6 ();
+// OBSOLETE   if (op != OP_NULL)
+// OBSOLETE     write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand4 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   parse_operand5 ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case '*':
+// OBSOLETE 	  op = BINOP_MUL;
+// OBSOLETE 	  break;
+// OBSOLETE 	case '/':
+// OBSOLETE 	  op = BINOP_DIV;
+// OBSOLETE 	  break;
+// OBSOLETE 	case MOD:
+// OBSOLETE 	  op = BINOP_MOD;
+// OBSOLETE 	  break;
+// OBSOLETE 	case REM:
+// OBSOLETE 	  op = BINOP_REM;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       parse_operand5 ();
+// OBSOLETE       write_exp_elt_opcode (op);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand3 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   parse_operand4 ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case '+':
+// OBSOLETE 	  op = BINOP_ADD;
+// OBSOLETE 	  break;
+// OBSOLETE 	case '-':
+// OBSOLETE 	  op = BINOP_SUB;
+// OBSOLETE 	  break;
+// OBSOLETE 	case SLASH_SLASH:
+// OBSOLETE 	  op = BINOP_CONCAT;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       parse_operand4 ();
+// OBSOLETE       write_exp_elt_opcode (op);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand2 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   parse_operand3 ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       if (check_token (IN))
+// OBSOLETE 	{
+// OBSOLETE 	  parse_operand3 ();
+// OBSOLETE 	  write_exp_elt_opcode (BINOP_IN);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  switch (PEEK_TOKEN ())
+// OBSOLETE 	    {
+// OBSOLETE 	    case '>':
+// OBSOLETE 	      op = BINOP_GTR;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case GEQ:
+// OBSOLETE 	      op = BINOP_GEQ;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case '<':
+// OBSOLETE 	      op = BINOP_LESS;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case LEQ:
+// OBSOLETE 	      op = BINOP_LEQ;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case '=':
+// OBSOLETE 	      op = BINOP_EQUAL;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case NOTEQUAL:
+// OBSOLETE 	      op = BINOP_NOTEQUAL;
+// OBSOLETE 	      break;
+// OBSOLETE 	    default:
+// OBSOLETE 	      return;
+// OBSOLETE 	    }
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  parse_operand3 ();
+// OBSOLETE 	  write_exp_elt_opcode (op);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand1 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   parse_operand2 ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case LOGAND:
+// OBSOLETE 	  op = BINOP_BITWISE_AND;
+// OBSOLETE 	  break;
+// OBSOLETE 	case ANDIF:
+// OBSOLETE 	  op = BINOP_LOGICAL_AND;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       parse_operand2 ();
+// OBSOLETE       write_exp_elt_opcode (op);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_operand0 (void)
+// OBSOLETE {
+// OBSOLETE   enum exp_opcode op;
+// OBSOLETE   parse_operand1 ();
+// OBSOLETE   for (;;)
+// OBSOLETE     {
+// OBSOLETE       switch (PEEK_TOKEN ())
+// OBSOLETE 	{
+// OBSOLETE 	case LOGIOR:
+// OBSOLETE 	  op = BINOP_BITWISE_IOR;
+// OBSOLETE 	  break;
+// OBSOLETE 	case LOGXOR:
+// OBSOLETE 	  op = BINOP_BITWISE_XOR;
+// OBSOLETE 	  break;
+// OBSOLETE 	case ORIF:
+// OBSOLETE 	  op = BINOP_LOGICAL_OR;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE       parse_operand1 ();
+// OBSOLETE       write_exp_elt_opcode (op);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_expr (void)
+// OBSOLETE {
+// OBSOLETE   parse_operand0 ();
+// OBSOLETE   if (check_token (GDB_ASSIGNMENT))
+// OBSOLETE     {
+// OBSOLETE       parse_expr ();
+// OBSOLETE       write_exp_elt_opcode (BINOP_ASSIGN);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_then_alternative (void)
+// OBSOLETE {
+// OBSOLETE   expect (THEN, "missing 'THEN' in 'IF' expression");
+// OBSOLETE   parse_expr ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_else_alternative (void)
+// OBSOLETE {
+// OBSOLETE   if (check_token (ELSIF))
+// OBSOLETE     parse_if_expression_body ();
+// OBSOLETE   else if (check_token (ELSE))
+// OBSOLETE     parse_expr ();
+// OBSOLETE   else
+// OBSOLETE     error ("missing ELSE/ELSIF in IF expression");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Matches: <boolean expression> <then alternative> <else alternative> */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_if_expression_body (void)
+// OBSOLETE {
+// OBSOLETE   parse_expr ();
+// OBSOLETE   parse_then_alternative ();
+// OBSOLETE   parse_else_alternative ();
+// OBSOLETE   write_exp_elt_opcode (TERNOP_COND);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_if_expression (void)
+// OBSOLETE {
+// OBSOLETE   require (IF);
+// OBSOLETE   parse_if_expression_body ();
+// OBSOLETE   expect (FI, "missing 'FI' at end of conditional expression");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* An <untyped_expr> is a superset of <expr>.  It also includes
+// OBSOLETE    <conditional expressions> and untyped <tuples>, whose types
+// OBSOLETE    are not given by their constituents.  Hence, these are only
+// OBSOLETE    allowed in certain contexts that expect a certain type.
+// OBSOLETE    You should call convert() to fix up the <untyped_expr>. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE parse_untyped_expr (void)
+// OBSOLETE {
+// OBSOLETE   switch (PEEK_TOKEN ())
+// OBSOLETE     {
+// OBSOLETE     case IF:
+// OBSOLETE       parse_if_expression ();
+// OBSOLETE       return;
+// OBSOLETE     case CASE:
+// OBSOLETE       error ("not implemented:  CASE expression");
+// OBSOLETE     case '(':
+// OBSOLETE       switch (PEEK_TOKEN1 ())
+// OBSOLETE 	{
+// OBSOLETE 	case IF:
+// OBSOLETE 	case CASE:
+// OBSOLETE 	  goto skip_lprn;
+// OBSOLETE 	case '[':
+// OBSOLETE 	skip_lprn:
+// OBSOLETE 	  FORWARD_TOKEN ();
+// OBSOLETE 	  parse_untyped_expr ();
+// OBSOLETE 	  expect (')', "missing ')'");
+// OBSOLETE 	  return;
+// OBSOLETE 	default:;
+// OBSOLETE 	  /* fall through */
+// OBSOLETE 	}
+// OBSOLETE     default:
+// OBSOLETE       parse_operand0 ();
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE chill_parse (void)
+// OBSOLETE {
+// OBSOLETE   terminal_buffer[0] = TOKEN_NOT_READ;
+// OBSOLETE   if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
+// OBSOLETE     {
+// OBSOLETE       write_exp_elt_opcode (OP_TYPE);
+// OBSOLETE       write_exp_elt_type (PEEK_LVAL ().tsym.type);
+// OBSOLETE       write_exp_elt_opcode (OP_TYPE);
+// OBSOLETE       FORWARD_TOKEN ();
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     parse_expr ();
+// OBSOLETE   if (terminal_buffer[0] != END_TOKEN)
+// OBSOLETE     {
+// OBSOLETE       if (comma_terminates && terminal_buffer[0] == ',')
+// OBSOLETE 	lexptr--;		/* Put the comma back.  */
+// OBSOLETE       else
+// OBSOLETE 	error ("Junk after end of expression.");
+// OBSOLETE     }
+// OBSOLETE   return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Implementation of a dynamically expandable buffer for processing input
+// OBSOLETE    characters acquired through lexptr and building a value to return in
+// OBSOLETE    yylval. */
+// OBSOLETE 
+// OBSOLETE static char *tempbuf;		/* Current buffer contents */
+// OBSOLETE static int tempbufsize;		/* Size of allocated buffer */
+// OBSOLETE static int tempbufindex;	/* Current index into buffer */
+// OBSOLETE 
+// OBSOLETE #define GROWBY_MIN_SIZE 64	/* Minimum amount to grow buffer by */
+// OBSOLETE 
+// OBSOLETE #define CHECKBUF(size) \
+// OBSOLETE   do { \
+// OBSOLETE     if (tempbufindex + (size) >= tempbufsize) \
+// OBSOLETE       { \
+// OBSOLETE 	growbuf_by_size (size); \
+// OBSOLETE       } \
+// OBSOLETE   } while (0);
+// OBSOLETE 
+// OBSOLETE /* Grow the static temp buffer if necessary, including allocating the first one
+// OBSOLETE    on demand. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE growbuf_by_size (int count)
+// OBSOLETE {
+// OBSOLETE   int growby;
+// OBSOLETE 
+// OBSOLETE   growby = max (count, GROWBY_MIN_SIZE);
+// OBSOLETE   tempbufsize += growby;
+// OBSOLETE   if (tempbuf == NULL)
+// OBSOLETE     {
+// OBSOLETE       tempbuf = (char *) xmalloc (tempbufsize);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Try to consume a simple name string token.  If successful, returns
+// OBSOLETE    a pointer to a nullbyte terminated copy of the name that can be used
+// OBSOLETE    in symbol table lookups.  If not successful, returns NULL. */
+// OBSOLETE 
+// OBSOLETE static char *
+// OBSOLETE match_simple_name_string (void)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = lexptr;
+// OBSOLETE 
+// OBSOLETE   if (isalpha (*tokptr) || *tokptr == '_')
+// OBSOLETE     {
+// OBSOLETE       char *result;
+// OBSOLETE       do
+// OBSOLETE 	{
+// OBSOLETE 	  tokptr++;
+// OBSOLETE 	}
+// OBSOLETE       while (isalnum (*tokptr) || (*tokptr == '_'));
+// OBSOLETE       yylval.sval.ptr = lexptr;
+// OBSOLETE       yylval.sval.length = tokptr - lexptr;
+// OBSOLETE       lexptr = tokptr;
+// OBSOLETE       result = copy_name (yylval.sval);
+// OBSOLETE       return result;
+// OBSOLETE     }
+// OBSOLETE   return (NULL);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Start looking for a value composed of valid digits as set by the base
+// OBSOLETE    in use.  Note that '_' characters are valid anywhere, in any quantity,
+// OBSOLETE    and are simply ignored.  Since we must find at least one valid digit,
+// OBSOLETE    or reject this token as an integer literal, we keep track of how many
+// OBSOLETE    digits we have encountered. */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = *tokptrptr;
+// OBSOLETE   int temp;
+// OBSOLETE   int digits = 0;
+// OBSOLETE 
+// OBSOLETE   while (*tokptr != '\0')
+// OBSOLETE     {
+// OBSOLETE       temp = *tokptr;
+// OBSOLETE       if (isupper (temp))
+// OBSOLETE 	temp = tolower (temp);
+// OBSOLETE       tokptr++;
+// OBSOLETE       switch (temp)
+// OBSOLETE 	{
+// OBSOLETE 	case '_':
+// OBSOLETE 	  continue;
+// OBSOLETE 	case '0':
+// OBSOLETE 	case '1':
+// OBSOLETE 	case '2':
+// OBSOLETE 	case '3':
+// OBSOLETE 	case '4':
+// OBSOLETE 	case '5':
+// OBSOLETE 	case '6':
+// OBSOLETE 	case '7':
+// OBSOLETE 	case '8':
+// OBSOLETE 	case '9':
+// OBSOLETE 	  temp -= '0';
+// OBSOLETE 	  break;
+// OBSOLETE 	case 'a':
+// OBSOLETE 	case 'b':
+// OBSOLETE 	case 'c':
+// OBSOLETE 	case 'd':
+// OBSOLETE 	case 'e':
+// OBSOLETE 	case 'f':
+// OBSOLETE 	  temp -= 'a';
+// OBSOLETE 	  temp += 10;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  temp = base;
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       if (temp < base)
+// OBSOLETE 	{
+// OBSOLETE 	  digits++;
+// OBSOLETE 	  *ivalptr *= base;
+// OBSOLETE 	  *ivalptr += temp;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* Found something not in domain for current base. */
+// OBSOLETE 	  tokptr--;		/* Unconsume what gave us indigestion. */
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* If we didn't find any digits, then we don't have a valid integer
+// OBSOLETE      value, so reject the entire token.  Otherwise, update the lexical
+// OBSOLETE      scan pointer, and return non-zero for success. */
+// OBSOLETE 
+// OBSOLETE   if (digits == 0)
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       *tokptrptr = tokptr;
+// OBSOLETE       return (1);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE decode_integer_literal (LONGEST *valptr, char **tokptrptr)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = *tokptrptr;
+// OBSOLETE   int base = 0;
+// OBSOLETE   LONGEST ival = 0;
+// OBSOLETE   int explicit_base = 0;
+// OBSOLETE 
+// OBSOLETE   /* Look for an explicit base specifier, which is optional. */
+// OBSOLETE 
+// OBSOLETE   switch (*tokptr)
+// OBSOLETE     {
+// OBSOLETE     case 'd':
+// OBSOLETE     case 'D':
+// OBSOLETE       explicit_base++;
+// OBSOLETE       base = 10;
+// OBSOLETE       tokptr++;
+// OBSOLETE       break;
+// OBSOLETE     case 'b':
+// OBSOLETE     case 'B':
+// OBSOLETE       explicit_base++;
+// OBSOLETE       base = 2;
+// OBSOLETE       tokptr++;
+// OBSOLETE       break;
+// OBSOLETE     case 'h':
+// OBSOLETE     case 'H':
+// OBSOLETE       explicit_base++;
+// OBSOLETE       base = 16;
+// OBSOLETE       tokptr++;
+// OBSOLETE       break;
+// OBSOLETE     case 'o':
+// OBSOLETE     case 'O':
+// OBSOLETE       explicit_base++;
+// OBSOLETE       base = 8;
+// OBSOLETE       tokptr++;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       base = 10;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* If we found an explicit base ensure that the character after the
+// OBSOLETE      explicit base is a single quote. */
+// OBSOLETE 
+// OBSOLETE   if (explicit_base && (*tokptr++ != '\''))
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Attempt to decode whatever follows as an integer value in the
+// OBSOLETE      indicated base, updating the token pointer in the process and
+// OBSOLETE      computing the value into ival.  Also, if we have an explicit
+// OBSOLETE      base, then the next character must not be a single quote, or we
+// OBSOLETE      have a bitstring literal, so reject the entire token in this case.
+// OBSOLETE      Otherwise, update the lexical scan pointer, and return non-zero
+// OBSOLETE      for success. */
+// OBSOLETE 
+// OBSOLETE   if (!decode_integer_value (base, &tokptr, &ival))
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else if (explicit_base && (*tokptr == '\''))
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       *valptr = ival;
+// OBSOLETE       *tokptrptr = tokptr;
+// OBSOLETE       return (1);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*  If it wasn't for the fact that floating point values can contain '_'
+// OBSOLETE    characters, we could just let strtod do all the hard work by letting it
+// OBSOLETE    try to consume as much of the current token buffer as possible and
+// OBSOLETE    find a legal conversion.  Unfortunately we need to filter out the '_'
+// OBSOLETE    characters before calling strtod, which we do by copying the other
+// OBSOLETE    legal chars to a local buffer to be converted.  However since we also
+// OBSOLETE    need to keep track of where the last unconsumed character in the input
+// OBSOLETE    buffer is, we have transfer only as many characters as may compose a
+// OBSOLETE    legal floating point value. */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_float_literal (void)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = lexptr;
+// OBSOLETE   char *buf;
+// OBSOLETE   char *copy;
+// OBSOLETE   double dval;
+// OBSOLETE   extern double strtod ();
+// OBSOLETE 
+// OBSOLETE   /* Make local buffer in which to build the string to convert.  This is
+// OBSOLETE      required because underscores are valid in chill floating point numbers
+// OBSOLETE      but not in the string passed to strtod to convert.  The string will be
+// OBSOLETE      no longer than our input string. */
+// OBSOLETE 
+// OBSOLETE   copy = buf = (char *) alloca (strlen (tokptr) + 1);
+// OBSOLETE 
+// OBSOLETE   /* Transfer all leading digits to the conversion buffer, discarding any
+// OBSOLETE      underscores. */
+// OBSOLETE 
+// OBSOLETE   while (isdigit (*tokptr) || *tokptr == '_')
+// OBSOLETE     {
+// OBSOLETE       if (*tokptr != '_')
+// OBSOLETE 	{
+// OBSOLETE 	  *copy++ = *tokptr;
+// OBSOLETE 	}
+// OBSOLETE       tokptr++;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Now accept either a '.', or one of [eEdD].  Dot is legal regardless
+// OBSOLETE      of whether we found any leading digits, and we simply accept it and
+// OBSOLETE      continue on to look for the fractional part and/or exponent.  One of
+// OBSOLETE      [eEdD] is legal only if we have seen digits, and means that there
+// OBSOLETE      is no fractional part.  If we find neither of these, then this is
+// OBSOLETE      not a floating point number, so return failure. */
+// OBSOLETE 
+// OBSOLETE   switch (*tokptr++)
+// OBSOLETE     {
+// OBSOLETE     case '.':
+// OBSOLETE       /* Accept and then look for fractional part and/or exponent. */
+// OBSOLETE       *copy++ = '.';
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case 'e':
+// OBSOLETE     case 'E':
+// OBSOLETE     case 'd':
+// OBSOLETE     case 'D':
+// OBSOLETE       if (copy == buf)
+// OBSOLETE 	{
+// OBSOLETE 	  return (0);
+// OBSOLETE 	}
+// OBSOLETE       *copy++ = 'e';
+// OBSOLETE       goto collect_exponent;
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE       return (0);
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* We found a '.', copy any fractional digits to the conversion buffer, up
+// OBSOLETE      to the first nondigit, non-underscore character. */
+// OBSOLETE 
+// OBSOLETE   while (isdigit (*tokptr) || *tokptr == '_')
+// OBSOLETE     {
+// OBSOLETE       if (*tokptr != '_')
+// OBSOLETE 	{
+// OBSOLETE 	  *copy++ = *tokptr;
+// OBSOLETE 	}
+// OBSOLETE       tokptr++;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Look for an exponent, which must start with one of [eEdD].  If none
+// OBSOLETE      is found, jump directly to trying to convert what we have collected
+// OBSOLETE      so far. */
+// OBSOLETE 
+// OBSOLETE   switch (*tokptr)
+// OBSOLETE     {
+// OBSOLETE     case 'e':
+// OBSOLETE     case 'E':
+// OBSOLETE     case 'd':
+// OBSOLETE     case 'D':
+// OBSOLETE       *copy++ = 'e';
+// OBSOLETE       tokptr++;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       goto convert_float;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept an optional '-' or '+' following one of [eEdD]. */
+// OBSOLETE 
+// OBSOLETE collect_exponent:
+// OBSOLETE   if (*tokptr == '+' || *tokptr == '-')
+// OBSOLETE     {
+// OBSOLETE       *copy++ = *tokptr++;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Now copy an exponent into the conversion buffer.  Note that at the 
+// OBSOLETE      moment underscores are *not* allowed in exponents. */
+// OBSOLETE 
+// OBSOLETE   while (isdigit (*tokptr))
+// OBSOLETE     {
+// OBSOLETE       *copy++ = *tokptr++;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* If we transfered any chars to the conversion buffer, try to interpret its
+// OBSOLETE      contents as a floating point value.  If any characters remain, then we
+// OBSOLETE      must not have a valid floating point string. */
+// OBSOLETE 
+// OBSOLETE convert_float:
+// OBSOLETE   *copy = '\0';
+// OBSOLETE   if (copy != buf)
+// OBSOLETE     {
+// OBSOLETE       dval = strtod (buf, &copy);
+// OBSOLETE       if (*copy == '\0')
+// OBSOLETE 	{
+// OBSOLETE 	  yylval.dval = dval;
+// OBSOLETE 	  lexptr = tokptr;
+// OBSOLETE 	  return (FLOAT_LITERAL);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Recognize a string literal.  A string literal is a sequence
+// OBSOLETE    of characters enclosed in matching single or double quotes, except that
+// OBSOLETE    a single character inside single quotes is a character literal, which
+// OBSOLETE    we reject as a string literal.  To embed the terminator character inside
+// OBSOLETE    a string, it is simply doubled (I.E. "this""is""one""string") */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_string_literal (void)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = lexptr;
+// OBSOLETE   int in_ctrlseq = 0;
+// OBSOLETE   LONGEST ival;
+// OBSOLETE 
+// OBSOLETE   for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
+// OBSOLETE     {
+// OBSOLETE       CHECKBUF (1);
+// OBSOLETE     tryagain:;
+// OBSOLETE       if (in_ctrlseq)
+// OBSOLETE 	{
+// OBSOLETE 	  /* skip possible whitespaces */
+// OBSOLETE 	  while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
+// OBSOLETE 	    tokptr++;
+// OBSOLETE 	  if (*tokptr == ')')
+// OBSOLETE 	    {
+// OBSOLETE 	      in_ctrlseq = 0;
+// OBSOLETE 	      tokptr++;
+// OBSOLETE 	      goto tryagain;
+// OBSOLETE 	    }
+// OBSOLETE 	  else if (*tokptr != ',')
+// OBSOLETE 	    error ("Invalid control sequence");
+// OBSOLETE 	  tokptr++;
+// OBSOLETE 	  /* skip possible whitespaces */
+// OBSOLETE 	  while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
+// OBSOLETE 	    tokptr++;
+// OBSOLETE 	  if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE 	    error ("Invalid control sequence");
+// OBSOLETE 	  tokptr--;
+// OBSOLETE 	}
+// OBSOLETE       else if (*tokptr == *lexptr)
+// OBSOLETE 	{
+// OBSOLETE 	  if (*(tokptr + 1) == *lexptr)
+// OBSOLETE 	    {
+// OBSOLETE 	      ival = *tokptr++;
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else if (*tokptr == '^')
+// OBSOLETE 	{
+// OBSOLETE 	  if (*(tokptr + 1) == '(')
+// OBSOLETE 	    {
+// OBSOLETE 	      in_ctrlseq = 1;
+// OBSOLETE 	      tokptr += 2;
+// OBSOLETE 	      if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE 		error ("Invalid control sequence");
+// OBSOLETE 	      tokptr--;
+// OBSOLETE 	    }
+// OBSOLETE 	  else if (*(tokptr + 1) == '^')
+// OBSOLETE 	    ival = *tokptr++;
+// OBSOLETE 	  else
+// OBSOLETE 	    error ("Invalid control sequence");
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	ival = *tokptr;
+// OBSOLETE       tempbuf[tempbufindex++] = ival;
+// OBSOLETE     }
+// OBSOLETE   if (in_ctrlseq)
+// OBSOLETE     error ("Invalid control sequence");
+// OBSOLETE 
+// OBSOLETE   if (*tokptr == '\0'		/* no terminator */
+// OBSOLETE       || (tempbufindex == 1 && *tokptr == '\''))	/* char literal */
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       tempbuf[tempbufindex] = '\0';
+// OBSOLETE       yylval.sval.ptr = tempbuf;
+// OBSOLETE       yylval.sval.length = tempbufindex;
+// OBSOLETE       lexptr = ++tokptr;
+// OBSOLETE       return (CHARACTER_STRING_LITERAL);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Recognize a character literal.  A character literal is single character
+// OBSOLETE    or a control sequence, enclosed in single quotes.  A control sequence
+// OBSOLETE    is a comma separated list of one or more integer literals, enclosed
+// OBSOLETE    in parenthesis and introduced with a circumflex character.
+// OBSOLETE 
+// OBSOLETE    EX:  'a'  '^(7)'  '^(7,8)'
+// OBSOLETE 
+// OBSOLETE    As a GNU chill extension, the syntax C'xx' is also recognized as a 
+// OBSOLETE    character literal, where xx is a hex value for the character.
+// OBSOLETE 
+// OBSOLETE    Note that more than a single character, enclosed in single quotes, is
+// OBSOLETE    a string literal.
+// OBSOLETE 
+// OBSOLETE    Returns CHARACTER_LITERAL if a match is found.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_character_literal (void)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = lexptr;
+// OBSOLETE   LONGEST ival = 0;
+// OBSOLETE 
+// OBSOLETE   if ((*tokptr == 'c' || *tokptr == 'C') && (*(tokptr + 1) == '\''))
+// OBSOLETE     {
+// OBSOLETE       /* We have a GNU chill extension form, so skip the leading "C'",
+// OBSOLETE          decode the hex value, and then ensure that we have a trailing
+// OBSOLETE          single quote character. */
+// OBSOLETE       tokptr += 2;
+// OBSOLETE       if (!decode_integer_value (16, &tokptr, &ival) || (*tokptr != '\''))
+// OBSOLETE 	{
+// OBSOLETE 	  return (0);
+// OBSOLETE 	}
+// OBSOLETE       tokptr++;
+// OBSOLETE     }
+// OBSOLETE   else if (*tokptr == '\'')
+// OBSOLETE     {
+// OBSOLETE       tokptr++;
+// OBSOLETE 
+// OBSOLETE       /* Determine which form we have, either a control sequence or the
+// OBSOLETE          single character form. */
+// OBSOLETE 
+// OBSOLETE       if (*tokptr == '^')
+// OBSOLETE 	{
+// OBSOLETE 	  if (*(tokptr + 1) == '(')
+// OBSOLETE 	    {
+// OBSOLETE 	      /* Match and decode a control sequence.  Return zero if we don't
+// OBSOLETE 	         find a valid integer literal, or if the next unconsumed character
+// OBSOLETE 	         after the integer literal is not the trailing ')'. */
+// OBSOLETE 	      tokptr += 2;
+// OBSOLETE 	      if (!decode_integer_literal (&ival, &tokptr) || (*tokptr++ != ')'))
+// OBSOLETE 		{
+// OBSOLETE 		  return (0);
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	  else if (*(tokptr + 1) == '^')
+// OBSOLETE 	    {
+// OBSOLETE 	      ival = *tokptr;
+// OBSOLETE 	      tokptr += 2;
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    /* fail */
+// OBSOLETE 	    error ("Invalid control sequence");
+// OBSOLETE 	}
+// OBSOLETE       else if (*tokptr == '\'')
+// OBSOLETE 	{
+// OBSOLETE 	  /* this must be duplicated */
+// OBSOLETE 	  ival = *tokptr;
+// OBSOLETE 	  tokptr += 2;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  ival = *tokptr++;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       /* The trailing quote has not yet been consumed.  If we don't find
+// OBSOLETE          it, then we have no match. */
+// OBSOLETE 
+// OBSOLETE       if (*tokptr++ != '\'')
+// OBSOLETE 	{
+// OBSOLETE 	  return (0);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* Not a character literal. */
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   yylval.typed_val.val = ival;
+// OBSOLETE   yylval.typed_val.type = builtin_type_chill_char;
+// OBSOLETE   lexptr = tokptr;
+// OBSOLETE   return (CHARACTER_LITERAL);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
+// OBSOLETE    Note that according to 5.2.4.2, a single "_" is also a valid integer
+// OBSOLETE    literal, however GNU-chill requires there to be at least one "digit"
+// OBSOLETE    in any integer literal. */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_integer_literal (void)
+// OBSOLETE {
+// OBSOLETE   char *tokptr = lexptr;
+// OBSOLETE   LONGEST ival;
+// OBSOLETE 
+// OBSOLETE   if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       yylval.typed_val.val = ival;
+// OBSOLETE #if defined(CC_HAS_LONG_LONG)
+// OBSOLETE       if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
+// OBSOLETE 	yylval.typed_val.type = builtin_type_long_long;
+// OBSOLETE       else
+// OBSOLETE #endif
+// OBSOLETE 	yylval.typed_val.type = builtin_type_int;
+// OBSOLETE       lexptr = tokptr;
+// OBSOLETE       return (INTEGER_LITERAL);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
+// OBSOLETE    Note that according to 5.2.4.8, a single "_" is also a valid bit-string
+// OBSOLETE    literal, however GNU-chill requires there to be at least one "digit"
+// OBSOLETE    in any bit-string literal. */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_bitstring_literal (void)
+// OBSOLETE {
+// OBSOLETE   register char *tokptr = lexptr;
+// OBSOLETE   int bitoffset = 0;
+// OBSOLETE   int bitcount = 0;
+// OBSOLETE   int bits_per_char;
+// OBSOLETE   int digit;
+// OBSOLETE 
+// OBSOLETE   tempbufindex = 0;
+// OBSOLETE   CHECKBUF (1);
+// OBSOLETE   tempbuf[0] = 0;
+// OBSOLETE 
+// OBSOLETE   /* Look for the required explicit base specifier. */
+// OBSOLETE 
+// OBSOLETE   switch (*tokptr++)
+// OBSOLETE     {
+// OBSOLETE     case 'b':
+// OBSOLETE     case 'B':
+// OBSOLETE       bits_per_char = 1;
+// OBSOLETE       break;
+// OBSOLETE     case 'o':
+// OBSOLETE     case 'O':
+// OBSOLETE       bits_per_char = 3;
+// OBSOLETE       break;
+// OBSOLETE     case 'h':
+// OBSOLETE     case 'H':
+// OBSOLETE       bits_per_char = 4;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       return (0);
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Ensure that the character after the explicit base is a single quote. */
+// OBSOLETE 
+// OBSOLETE   if (*tokptr++ != '\'')
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   while (*tokptr != '\0' && *tokptr != '\'')
+// OBSOLETE     {
+// OBSOLETE       digit = *tokptr;
+// OBSOLETE       if (isupper (digit))
+// OBSOLETE 	digit = tolower (digit);
+// OBSOLETE       tokptr++;
+// OBSOLETE       switch (digit)
+// OBSOLETE 	{
+// OBSOLETE 	case '_':
+// OBSOLETE 	  continue;
+// OBSOLETE 	case '0':
+// OBSOLETE 	case '1':
+// OBSOLETE 	case '2':
+// OBSOLETE 	case '3':
+// OBSOLETE 	case '4':
+// OBSOLETE 	case '5':
+// OBSOLETE 	case '6':
+// OBSOLETE 	case '7':
+// OBSOLETE 	case '8':
+// OBSOLETE 	case '9':
+// OBSOLETE 	  digit -= '0';
+// OBSOLETE 	  break;
+// OBSOLETE 	case 'a':
+// OBSOLETE 	case 'b':
+// OBSOLETE 	case 'c':
+// OBSOLETE 	case 'd':
+// OBSOLETE 	case 'e':
+// OBSOLETE 	case 'f':
+// OBSOLETE 	  digit -= 'a';
+// OBSOLETE 	  digit += 10;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  /* this is not a bitstring literal, probably an integer */
+// OBSOLETE 	  return 0;
+// OBSOLETE 	}
+// OBSOLETE       if (digit >= 1 << bits_per_char)
+// OBSOLETE 	{
+// OBSOLETE 	  /* Found something not in domain for current base. */
+// OBSOLETE 	  error ("Too-large digit in bitstring or integer.");
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* Extract bits from digit, packing them into the bitstring byte. */
+// OBSOLETE 	  int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
+// OBSOLETE 	  for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
+// OBSOLETE 	       TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
+// OBSOLETE 	    {
+// OBSOLETE 	      bitcount++;
+// OBSOLETE 	      if (digit & (1 << k))
+// OBSOLETE 		{
+// OBSOLETE 		  tempbuf[tempbufindex] |=
+// OBSOLETE 		    (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+// OBSOLETE 		    ? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
+// OBSOLETE 		    : (1 << bitoffset);
+// OBSOLETE 		}
+// OBSOLETE 	      bitoffset++;
+// OBSOLETE 	      if (bitoffset == HOST_CHAR_BIT)
+// OBSOLETE 		{
+// OBSOLETE 		  bitoffset = 0;
+// OBSOLETE 		  tempbufindex++;
+// OBSOLETE 		  CHECKBUF (1);
+// OBSOLETE 		  tempbuf[tempbufindex] = 0;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Verify that we consumed everything up to the trailing single quote,
+// OBSOLETE      and that we found some bits (IE not just underbars). */
+// OBSOLETE 
+// OBSOLETE   if (*tokptr++ != '\'')
+// OBSOLETE     {
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       yylval.sval.ptr = tempbuf;
+// OBSOLETE       yylval.sval.length = bitcount;
+// OBSOLETE       lexptr = tokptr;
+// OBSOLETE       return (BIT_STRING_LITERAL);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE struct token
+// OBSOLETE {
+// OBSOLETE   char *operator;
+// OBSOLETE   int token;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static const struct token idtokentab[] =
+// OBSOLETE {
+// OBSOLETE   {"array", ARRAY},
+// OBSOLETE   {"length", LENGTH},
+// OBSOLETE   {"lower", LOWER},
+// OBSOLETE   {"upper", UPPER},
+// OBSOLETE   {"andif", ANDIF},
+// OBSOLETE   {"pred", PRED},
+// OBSOLETE   {"succ", SUCC},
+// OBSOLETE   {"card", CARD},
+// OBSOLETE   {"size", SIZE},
+// OBSOLETE   {"orif", ORIF},
+// OBSOLETE   {"num", NUM},
+// OBSOLETE   {"abs", ABS},
+// OBSOLETE   {"max", MAX_TOKEN},
+// OBSOLETE   {"min", MIN_TOKEN},
+// OBSOLETE   {"mod", MOD},
+// OBSOLETE   {"rem", REM},
+// OBSOLETE   {"not", NOT},
+// OBSOLETE   {"xor", LOGXOR},
+// OBSOLETE   {"and", LOGAND},
+// OBSOLETE   {"in", IN},
+// OBSOLETE   {"or", LOGIOR},
+// OBSOLETE   {"up", UP},
+// OBSOLETE   {"addr", ADDR_TOKEN},
+// OBSOLETE   {"null", EMPTINESS_LITERAL}
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static const struct token tokentab2[] =
+// OBSOLETE {
+// OBSOLETE   {":=", GDB_ASSIGNMENT},
+// OBSOLETE   {"//", SLASH_SLASH},
+// OBSOLETE   {"->", POINTER},
+// OBSOLETE   {"/=", NOTEQUAL},
+// OBSOLETE   {"<=", LEQ},
+// OBSOLETE   {">=", GEQ}
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Read one token, getting characters through lexptr.  */
+// OBSOLETE /* This is where we will check to make sure that the language and the
+// OBSOLETE    operators used are compatible.  */
+// OBSOLETE 
+// OBSOLETE static enum ch_terminal
+// OBSOLETE ch_lex (void)
+// OBSOLETE {
+// OBSOLETE   unsigned int i;
+// OBSOLETE   enum ch_terminal token;
+// OBSOLETE   char *inputname;
+// OBSOLETE   struct symbol *sym;
+// OBSOLETE 
+// OBSOLETE   /* Skip over any leading whitespace. */
+// OBSOLETE   while (isspace (*lexptr))
+// OBSOLETE     {
+// OBSOLETE       lexptr++;
+// OBSOLETE     }
+// OBSOLETE   /* Look for special single character cases which can't be the first
+// OBSOLETE      character of some other multicharacter token. */
+// OBSOLETE   switch (*lexptr)
+// OBSOLETE     {
+// OBSOLETE     case '\0':
+// OBSOLETE       return END_TOKEN;
+// OBSOLETE     case ',':
+// OBSOLETE     case '=':
+// OBSOLETE     case ';':
+// OBSOLETE     case '!':
+// OBSOLETE     case '+':
+// OBSOLETE     case '*':
+// OBSOLETE     case '(':
+// OBSOLETE     case ')':
+// OBSOLETE     case '[':
+// OBSOLETE     case ']':
+// OBSOLETE       return (*lexptr++);
+// OBSOLETE     }
+// OBSOLETE   /* Look for characters which start a particular kind of multicharacter
+// OBSOLETE      token, such as a character literal, register name, convenience
+// OBSOLETE      variable name, string literal, etc. */
+// OBSOLETE   switch (*lexptr)
+// OBSOLETE     {
+// OBSOLETE     case '\'':
+// OBSOLETE     case '\"':
+// OBSOLETE       /* First try to match a string literal, which is any
+// OBSOLETE          sequence of characters enclosed in matching single or double
+// OBSOLETE          quotes, except that a single character inside single quotes
+// OBSOLETE          is a character literal, so we have to catch that case also. */
+// OBSOLETE       token = match_string_literal ();
+// OBSOLETE       if (token != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  return (token);
+// OBSOLETE 	}
+// OBSOLETE       if (*lexptr == '\'')
+// OBSOLETE 	{
+// OBSOLETE 	  token = match_character_literal ();
+// OBSOLETE 	  if (token != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      return (token);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     case 'C':
+// OBSOLETE     case 'c':
+// OBSOLETE       token = match_character_literal ();
+// OBSOLETE       if (token != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  return (token);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     case '$':
+// OBSOLETE       yylval.sval.ptr = lexptr;
+// OBSOLETE       do
+// OBSOLETE 	{
+// OBSOLETE 	  lexptr++;
+// OBSOLETE 	}
+// OBSOLETE       while (isalnum (*lexptr) || *lexptr == '_' || *lexptr == '$');
+// OBSOLETE       yylval.sval.length = lexptr - yylval.sval.ptr;
+// OBSOLETE       write_dollar_variable (yylval.sval);
+// OBSOLETE       return GDB_VARIABLE;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   /* See if it is a special token of length 2.  */
+// OBSOLETE   for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
+// OBSOLETE     {
+// OBSOLETE       if (STREQN (lexptr, tokentab2[i].operator, 2))
+// OBSOLETE 	{
+// OBSOLETE 	  lexptr += 2;
+// OBSOLETE 	  return (tokentab2[i].token);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   /* Look for single character cases which which could be the first
+// OBSOLETE      character of some other multicharacter token, but aren't, or we
+// OBSOLETE      would already have found it. */
+// OBSOLETE   switch (*lexptr)
+// OBSOLETE     {
+// OBSOLETE     case '-':
+// OBSOLETE     case ':':
+// OBSOLETE     case '/':
+// OBSOLETE     case '<':
+// OBSOLETE     case '>':
+// OBSOLETE       return (*lexptr++);
+// OBSOLETE     }
+// OBSOLETE   /* Look for a float literal before looking for an integer literal, so
+// OBSOLETE      we match as much of the input stream as possible. */
+// OBSOLETE   token = match_float_literal ();
+// OBSOLETE   if (token != 0)
+// OBSOLETE     {
+// OBSOLETE       return (token);
+// OBSOLETE     }
+// OBSOLETE   token = match_bitstring_literal ();
+// OBSOLETE   if (token != 0)
+// OBSOLETE     {
+// OBSOLETE       return (token);
+// OBSOLETE     }
+// OBSOLETE   token = match_integer_literal ();
+// OBSOLETE   if (token != 0)
+// OBSOLETE     {
+// OBSOLETE       return (token);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Try to match a simple name string, and if a match is found, then
+// OBSOLETE      further classify what sort of name it is and return an appropriate
+// OBSOLETE      token.  Note that attempting to match a simple name string consumes
+// OBSOLETE      the token from lexptr, so we can't back out if we later find that
+// OBSOLETE      we can't classify what sort of name it is. */
+// OBSOLETE 
+// OBSOLETE   inputname = match_simple_name_string ();
+// OBSOLETE 
+// OBSOLETE   if (inputname != NULL)
+// OBSOLETE     {
+// OBSOLETE       char *simplename = (char *) alloca (strlen (inputname) + 1);
+// OBSOLETE 
+// OBSOLETE       char *dptr = simplename, *sptr = inputname;
+// OBSOLETE       for (; *sptr; sptr++)
+// OBSOLETE 	*dptr++ = isupper (*sptr) ? tolower (*sptr) : *sptr;
+// OBSOLETE       *dptr = '\0';
+// OBSOLETE 
+// OBSOLETE       /* See if it is a reserved identifier. */
+// OBSOLETE       for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
+// OBSOLETE 	{
+// OBSOLETE 	  if (STREQ (simplename, idtokentab[i].operator))
+// OBSOLETE 	    {
+// OBSOLETE 	      return (idtokentab[i].token);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       /* Look for other special tokens. */
+// OBSOLETE       if (STREQ (simplename, "true"))
+// OBSOLETE 	{
+// OBSOLETE 	  yylval.ulval = 1;
+// OBSOLETE 	  return (BOOLEAN_LITERAL);
+// OBSOLETE 	}
+// OBSOLETE       if (STREQ (simplename, "false"))
+// OBSOLETE 	{
+// OBSOLETE 	  yylval.ulval = 0;
+// OBSOLETE 	  return (BOOLEAN_LITERAL);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       sym = lookup_symbol (inputname, expression_context_block,
+// OBSOLETE 			   VAR_NAMESPACE, (int *) NULL,
+// OBSOLETE 			   (struct symtab **) NULL);
+// OBSOLETE       if (sym == NULL && strcmp (inputname, simplename) != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  sym = lookup_symbol (simplename, expression_context_block,
+// OBSOLETE 			       VAR_NAMESPACE, (int *) NULL,
+// OBSOLETE 			       (struct symtab **) NULL);
+// OBSOLETE 	}
+// OBSOLETE       if (sym != NULL)
+// OBSOLETE 	{
+// OBSOLETE 	  yylval.ssym.stoken.ptr = NULL;
+// OBSOLETE 	  yylval.ssym.stoken.length = 0;
+// OBSOLETE 	  yylval.ssym.sym = sym;
+// OBSOLETE 	  yylval.ssym.is_a_field_of_this = 0;	/* FIXME, C++'ism */
+// OBSOLETE 	  switch (SYMBOL_CLASS (sym))
+// OBSOLETE 	    {
+// OBSOLETE 	    case LOC_BLOCK:
+// OBSOLETE 	      /* Found a procedure name. */
+// OBSOLETE 	      return (GENERAL_PROCEDURE_NAME);
+// OBSOLETE 	    case LOC_STATIC:
+// OBSOLETE 	      /* Found a global or local static variable. */
+// OBSOLETE 	      return (LOCATION_NAME);
+// OBSOLETE 	    case LOC_REGISTER:
+// OBSOLETE 	    case LOC_ARG:
+// OBSOLETE 	    case LOC_REF_ARG:
+// OBSOLETE 	    case LOC_REGPARM:
+// OBSOLETE 	    case LOC_REGPARM_ADDR:
+// OBSOLETE 	    case LOC_LOCAL:
+// OBSOLETE 	    case LOC_LOCAL_ARG:
+// OBSOLETE 	    case LOC_BASEREG:
+// OBSOLETE 	    case LOC_BASEREG_ARG:
+// OBSOLETE 	      if (innermost_block == NULL
+// OBSOLETE 		  || contained_in (block_found, innermost_block))
+// OBSOLETE 		{
+// OBSOLETE 		  innermost_block = block_found;
+// OBSOLETE 		}
+// OBSOLETE 	      return (LOCATION_NAME);
+// OBSOLETE 	      break;
+// OBSOLETE 	    case LOC_CONST:
+// OBSOLETE 	    case LOC_LABEL:
+// OBSOLETE 	      return (LOCATION_NAME);
+// OBSOLETE 	      break;
+// OBSOLETE 	    case LOC_TYPEDEF:
+// OBSOLETE 	      yylval.tsym.type = SYMBOL_TYPE (sym);
+// OBSOLETE 	      return TYPENAME;
+// OBSOLETE 	    case LOC_UNDEF:
+// OBSOLETE 	    case LOC_CONST_BYTES:
+// OBSOLETE 	    case LOC_OPTIMIZED_OUT:
+// OBSOLETE 	      error ("Symbol \"%s\" names no location.", inputname);
+// OBSOLETE 	      break;
+// OBSOLETE 	    default:
+// OBSOLETE 	      internal_error (__FILE__, __LINE__,
+// OBSOLETE 			      "unhandled SYMBOL_CLASS in ch_lex()");
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else if (!have_full_symbols () && !have_partial_symbols ())
+// OBSOLETE 	{
+// OBSOLETE 	  error ("No symbol table is loaded.  Use the \"file\" command.");
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  error ("No symbol \"%s\" in current context.", inputname);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Catch single character tokens which are not part of some
+// OBSOLETE      longer token. */
+// OBSOLETE 
+// OBSOLETE   switch (*lexptr)
+// OBSOLETE     {
+// OBSOLETE     case '.':			/* Not float for example. */
+// OBSOLETE       lexptr++;
+// OBSOLETE       while (isspace (*lexptr))
+// OBSOLETE 	lexptr++;
+// OBSOLETE       inputname = match_simple_name_string ();
+// OBSOLETE       if (!inputname)
+// OBSOLETE 	return '.';
+// OBSOLETE       return DOT_FIELD_NAME;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (ILLEGAL_TOKEN);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE write_lower_upper_value (enum exp_opcode opcode,	/* Either UNOP_LOWER or UNOP_UPPER */
+// OBSOLETE 			 struct type *type)
+// OBSOLETE {
+// OBSOLETE   if (type == NULL)
+// OBSOLETE     write_exp_elt_opcode (opcode);
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       struct type *result_type;
+// OBSOLETE       LONGEST val = type_lower_upper (opcode, type, &result_type);
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE       write_exp_elt_type (result_type);
+// OBSOLETE       write_exp_elt_longcst (val);
+// OBSOLETE       write_exp_elt_opcode (OP_LONG);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE chill_error (char *msg)
+// OBSOLETE {
+// OBSOLETE   /* Never used. */
+// OBSOLETE }
diff --git a/gdb/ch-lang.c b/gdb/ch-lang.c
index b46dce0..50b446e 100644
--- a/gdb/ch-lang.c
+++ b/gdb/ch-lang.c
@@ -1,663 +1,663 @@
-/* Chill language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "value.h"
-#include "expression.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "ch-lang.h"
-#include "valprint.h"
-
-extern void _initialize_chill_language (void);
-
-static struct value *evaluate_subexp_chill (struct type *, struct expression *,
-					    int *, enum noside);
-
-static struct value *value_chill_max_min (enum exp_opcode, struct value *);
-
-static struct value *value_chill_card (struct value *);
-
-static struct value *value_chill_length (struct value *);
-
-static struct type *chill_create_fundamental_type (struct objfile *, int);
-
-static void chill_printstr (struct ui_file * stream, char *string,
-			    unsigned int length, int width,
-			    int force_ellipses);
-
-static void chill_printchar (int, struct ui_file *);
-
-/* For now, Chill uses a simple mangling algorithm whereby you simply
-   discard everything after the occurance of two successive CPLUS_MARKER
-   characters to derive the demangled form. */
-
-char *
-chill_demangle (const char *mangled)
-{
-  const char *joiner = NULL;
-  char *demangled;
-  const char *cp = mangled;
-
-  while (*cp)
-    {
-      if (is_cplus_marker (*cp))
-	{
-	  joiner = cp;
-	  break;
-	}
-      cp++;
-    }
-  if (joiner != NULL && *(joiner + 1) == *joiner)
-    {
-      demangled = savestring (mangled, joiner - mangled);
-    }
-  else
-    {
-      demangled = NULL;
-    }
-  return (demangled);
-}
-
-static void
-chill_printchar (register int c, struct ui_file *stream)
-{
-  c &= 0xFF;			/* Avoid sign bit follies */
-
-  if (PRINT_LITERAL_FORM (c))
-    {
-      if (c == '\'' || c == '^')
-	fprintf_filtered (stream, "'%c%c'", c, c);
-      else
-	fprintf_filtered (stream, "'%c'", c);
-    }
-  else
-    {
-      fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
-    }
-}
-
-/* Print the character string STRING, printing at most LENGTH characters.
-   Printing stops early if the number hits print_max; repeat counts
-   are printed as appropriate.  Print ellipses at the end if we
-   had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
-   Note that gdb maintains the length of strings without counting the
-   terminating null byte, while chill strings are typically written with
-   an explicit null byte.  So we always assume an implied null byte
-   until gdb is able to maintain non-null terminated strings as well
-   as null terminated strings (FIXME).
- */
-
-static void
-chill_printstr (struct ui_file *stream, char *string, unsigned int length,
-		int width, int force_ellipses)
-{
-  register unsigned int i;
-  unsigned int things_printed = 0;
-  int in_literal_form = 0;
-  int in_control_form = 0;
-  int need_slashslash = 0;
-  unsigned int c;
-
-  if (length == 0)
-    {
-      fputs_filtered ("\"\"", stream);
-      return;
-    }
-
-  for (i = 0; i < length && things_printed < print_max; ++i)
-    {
-      /* Position of the character we are examining
-         to see whether it is repeated.  */
-      unsigned int rep1;
-      /* Number of repetitions we have detected so far.  */
-      unsigned int reps;
-
-      QUIT;
-
-      if (need_slashslash)
-	{
-	  fputs_filtered ("//", stream);
-	  need_slashslash = 0;
-	}
-
-      rep1 = i + 1;
-      reps = 1;
-      while (rep1 < length && string[rep1] == string[i])
-	{
-	  ++rep1;
-	  ++reps;
-	}
-
-      c = string[i];
-      if (reps > repeat_count_threshold)
-	{
-	  if (in_control_form || in_literal_form)
-	    {
-	      if (in_control_form)
-		fputs_filtered (")", stream);
-	      fputs_filtered ("\"//", stream);
-	      in_control_form = in_literal_form = 0;
-	    }
-	  chill_printchar (c, stream);
-	  fprintf_filtered (stream, "<repeats %u times>", reps);
-	  i = rep1 - 1;
-	  things_printed += repeat_count_threshold;
-	  need_slashslash = 1;
-	}
-      else
-	{
-	  if (!in_literal_form && !in_control_form)
-	    fputs_filtered ("\"", stream);
-	  if (PRINT_LITERAL_FORM (c))
-	    {
-	      if (!in_literal_form)
-		{
-		  if (in_control_form)
-		    {
-		      fputs_filtered (")", stream);
-		      in_control_form = 0;
-		    }
-		  in_literal_form = 1;
-		}
-	      fprintf_filtered (stream, "%c", c);
-	      if (c == '"' || c == '^')
-		/* duplicate this one as must be done at input */
-		fprintf_filtered (stream, "%c", c);
-	    }
-	  else
-	    {
-	      if (!in_control_form)
-		{
-		  if (in_literal_form)
-		    {
-		      in_literal_form = 0;
-		    }
-		  fputs_filtered ("^(", stream);
-		  in_control_form = 1;
-		}
-	      else
-		fprintf_filtered (stream, ",");
-	      c = c & 0xff;
-	      fprintf_filtered (stream, "%u", (unsigned int) c);
-	    }
-	  ++things_printed;
-	}
-    }
-
-  /* Terminate the quotes if necessary.  */
-  if (in_control_form)
-    {
-      fputs_filtered (")", stream);
-    }
-  if (in_literal_form || in_control_form)
-    {
-      fputs_filtered ("\"", stream);
-    }
-  if (force_ellipses || (i < length))
-    {
-      fputs_filtered ("...", stream);
-    }
-}
-
-static struct type *
-chill_create_fundamental_type (struct objfile *objfile, int typeid)
-{
-  register struct type *type = NULL;
-
-  switch (typeid)
-    {
-    default:
-      /* FIXME:  For now, if we are asked to produce a type not in this
-         language, create the equivalent of a C integer type with the
-         name "<?type?>".  When all the dust settles from the type
-         reconstruction work, this should probably become an error. */
-      type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
-      warning ("internal error: no chill fundamental type %d", typeid);
-      break;
-    case FT_VOID:
-      /* FIXME:  Currently the GNU Chill compiler emits some DWARF entries for
-         typedefs, unrelated to anything directly in the code being compiled,
-         that have some FT_VOID types.  Just fake it for now. */
-      type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
-      break;
-    case FT_BOOLEAN:
-      type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
-      break;
-    case FT_CHAR:
-      type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
-      break;
-    case FT_SIGNED_CHAR:
-      type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
-      break;
-    case FT_UNSIGNED_CHAR:
-      type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
-      break;
-    case FT_SHORT:		/* Chill ints are 2 bytes */
-      type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
-      break;
-    case FT_UNSIGNED_SHORT:	/* Chill ints are 2 bytes */
-      type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
-      break;
-    case FT_INTEGER:		/* FIXME? */
-    case FT_SIGNED_INTEGER:	/* FIXME? */
-    case FT_LONG:		/* Chill longs are 4 bytes */
-    case FT_SIGNED_LONG:	/* Chill longs are 4 bytes */
-      type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
-      break;
-    case FT_UNSIGNED_INTEGER:	/* FIXME? */
-    case FT_UNSIGNED_LONG:	/* Chill longs are 4 bytes */
-      type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
-      break;
-    case FT_FLOAT:
-      type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
-      break;
-    case FT_DBL_PREC_FLOAT:
-      type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
-      break;
-    }
-  return (type);
-}
-
-
-/* Table of operators and their precedences for printing expressions.  */
-
-static const struct op_print chill_op_print_tab[] =
-{
-  {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
-  {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
-  {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
-  {"MOD", BINOP_MOD, PREC_MUL, 0},
-  {"REM", BINOP_REM, PREC_MUL, 0},
-  {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
-  {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
-  {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
-  {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
-  {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
-  {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
-  {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
-  {"=", BINOP_EQUAL, PREC_EQUAL, 0},
-  {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
-  {"<=", BINOP_LEQ, PREC_ORDER, 0},
-  {">=", BINOP_GEQ, PREC_ORDER, 0},
-  {">", BINOP_GTR, PREC_ORDER, 0},
-  {"<", BINOP_LESS, PREC_ORDER, 0},
-  {"+", BINOP_ADD, PREC_ADD, 0},
-  {"-", BINOP_SUB, PREC_ADD, 0},
-  {"*", BINOP_MUL, PREC_MUL, 0},
-  {"/", BINOP_DIV, PREC_MUL, 0},
-  {"//", BINOP_CONCAT, PREC_PREFIX, 0},		/* FIXME: precedence? */
-  {"-", UNOP_NEG, PREC_PREFIX, 0},
-  {"->", UNOP_IND, PREC_SUFFIX, 1},
-  {"->", UNOP_ADDR, PREC_PREFIX, 0},
-  {":", BINOP_RANGE, PREC_ASSIGN, 0},
-  {NULL, 0, 0, 0}
-};
-
-/* The built-in types of Chill.  */
-
-struct type *builtin_type_chill_bool;
-struct type *builtin_type_chill_char;
-struct type *builtin_type_chill_long;
-struct type *builtin_type_chill_ulong;
-struct type *builtin_type_chill_real;
-
-struct type **const (chill_builtin_types[]) =
-{
-  &builtin_type_chill_bool,
-    &builtin_type_chill_char,
-    &builtin_type_chill_long,
-    &builtin_type_chill_ulong,
-    &builtin_type_chill_real,
-    0
-};
-
-/* Calculate LOWER or UPPER of TYPE.
-   Returns the result as an integer.
-   *RESULT_TYPE is the appropriate type for the result. */
-
-LONGEST
-type_lower_upper (enum exp_opcode op,	/* Either UNOP_LOWER or UNOP_UPPER */
-		  struct type *type, struct type **result_type)
-{
-  LONGEST low, high;
-  *result_type = type;
-  CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_STRUCT:
-      *result_type = builtin_type_int;
-      if (chill_varying_type (type))
-	return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
-      break;
-    case TYPE_CODE_ARRAY:
-    case TYPE_CODE_BITSTRING:
-    case TYPE_CODE_STRING:
-      type = TYPE_FIELD_TYPE (type, 0);		/* Get index type */
-
-      /* ... fall through ... */
-    case TYPE_CODE_RANGE:
-      *result_type = TYPE_TARGET_TYPE (type);
-      return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
-
-    case TYPE_CODE_ENUM:
-    case TYPE_CODE_BOOL:
-    case TYPE_CODE_INT:
-    case TYPE_CODE_CHAR:
-      if (get_discrete_bounds (type, &low, &high) >= 0)
-	{
-	  *result_type = type;
-	  return op == UNOP_LOWER ? low : high;
-	}
-      break;
-    case TYPE_CODE_UNDEF:
-    case TYPE_CODE_PTR:
-    case TYPE_CODE_UNION:
-    case TYPE_CODE_FUNC:
-    case TYPE_CODE_FLT:
-    case TYPE_CODE_VOID:
-    case TYPE_CODE_SET:
-    case TYPE_CODE_ERROR:
-    case TYPE_CODE_MEMBER:
-    case TYPE_CODE_METHOD:
-    case TYPE_CODE_REF:
-    case TYPE_CODE_COMPLEX:
-    default:
-      break;
-    }
-  error ("unknown mode for LOWER/UPPER builtin");
-}
-
-static struct value *
-value_chill_length (struct value *val)
-{
-  LONGEST tmp;
-  struct type *type = VALUE_TYPE (val);
-  struct type *ttype;
-  CHECK_TYPEDEF (type);
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_ARRAY:
-    case TYPE_CODE_BITSTRING:
-    case TYPE_CODE_STRING:
-      tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
-	- type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
-      break;
-    case TYPE_CODE_STRUCT:
-      if (chill_varying_type (type))
-	{
-	  tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
-	  break;
-	}
-      /* ... else fall through ... */
-    default:
-      error ("bad argument to LENGTH builtin");
-    }
-  return value_from_longest (builtin_type_int, tmp);
-}
-
-static struct value *
-value_chill_card (struct value *val)
-{
-  LONGEST tmp = 0;
-  struct type *type = VALUE_TYPE (val);
-  CHECK_TYPEDEF (type);
-
-  if (TYPE_CODE (type) == TYPE_CODE_SET)
-    {
-      struct type *range_type = TYPE_INDEX_TYPE (type);
-      LONGEST lower_bound, upper_bound;
-      int i;
-
-      get_discrete_bounds (range_type, &lower_bound, &upper_bound);
-      for (i = lower_bound; i <= upper_bound; i++)
-	if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
-	  tmp++;
-    }
-  else
-    error ("bad argument to CARD builtin");
-
-  return value_from_longest (builtin_type_int, tmp);
-}
-
-static struct value *
-value_chill_max_min (enum exp_opcode op, struct value *val)
-{
-  LONGEST tmp = 0;
-  struct type *type = VALUE_TYPE (val);
-  struct type *elttype;
-  CHECK_TYPEDEF (type);
-
-  if (TYPE_CODE (type) == TYPE_CODE_SET)
-    {
-      LONGEST lower_bound, upper_bound;
-      int i, empty = 1;
-
-      elttype = TYPE_INDEX_TYPE (type);
-      CHECK_TYPEDEF (elttype);
-      get_discrete_bounds (elttype, &lower_bound, &upper_bound);
-
-      if (op == UNOP_CHMAX)
-	{
-	  for (i = upper_bound; i >= lower_bound; i--)
-	    {
-	      if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
-		{
-		  tmp = i;
-		  empty = 0;
-		  break;
-		}
-	    }
-	}
-      else
-	{
-	  for (i = lower_bound; i <= upper_bound; i++)
-	    {
-	      if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
-		{
-		  tmp = i;
-		  empty = 0;
-		  break;
-		}
-	    }
-	}
-      if (empty)
-	error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
-    }
-  else
-    error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
-
-  return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
-			     ? TYPE_TARGET_TYPE (elttype)
-			     : elttype,
-			     tmp);
-}
-
-static struct value *
-evaluate_subexp_chill (struct type *expect_type,
-		       register struct expression *exp, register int *pos,
-		       enum noside noside)
-{
-  int pc = *pos;
-  struct type *type;
-  int tem, nargs;
-  struct value *arg1;
-  struct value **argvec;
-  enum exp_opcode op = exp->elts[*pos].opcode;
-  switch (op)
-    {
-    case MULTI_SUBSCRIPT:
-      if (noside == EVAL_SKIP)
-	break;
-      (*pos) += 3;
-      nargs = longest_to_int (exp->elts[pc + 1].longconst);
-      arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
-      type = check_typedef (VALUE_TYPE (arg1));
-
-      if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
-	{
-	  /* Looks like string repetition. */
-	  struct value *string = evaluate_subexp_with_coercion (exp, pos,
-								noside);
-	  return value_concat (arg1, string);
-	}
-
-      switch (TYPE_CODE (type))
-	{
-	case TYPE_CODE_PTR:
-	  type = check_typedef (TYPE_TARGET_TYPE (type));
-	  if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
-	    error ("reference value used as function");
-	  /* ... fall through ... */
-	case TYPE_CODE_FUNC:
-	  /* It's a function call. */
-	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
-	    break;
-
-	  /* Allocate arg vector, including space for the function to be
-	     called in argvec[0] and a terminating NULL */
-	  argvec = (struct value **) alloca (sizeof (struct value *)
-					     * (nargs + 2));
-	  argvec[0] = arg1;
-	  tem = 1;
-	  for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
-	    {
-	      argvec[tem]
-		= evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
-					 exp, pos, noside);
-	    }
-	  for (; tem <= nargs; tem++)
-	    argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
-	  argvec[tem] = 0;	/* signal end of arglist */
-
-	  return call_function_by_hand (argvec[0], nargs, argvec + 1);
-	default:
-	  break;
-	}
-
-      while (nargs-- > 0)
-	{
-	  struct value *index = evaluate_subexp_with_coercion (exp, pos,
-							       noside);
-	  arg1 = value_subscript (arg1, index);
-	}
-      return (arg1);
-
-    case UNOP_LOWER:
-    case UNOP_UPPER:
-      (*pos)++;
-      if (noside == EVAL_SKIP)
-	{
-	  (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
-	  goto nosideret;
-	}
-      arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
-						  EVAL_AVOID_SIDE_EFFECTS);
-      tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
-      return value_from_longest (type, tem);
-
-    case UNOP_LENGTH:
-      (*pos)++;
-      arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
-      return value_chill_length (arg1);
-
-    case UNOP_CARD:
-      (*pos)++;
-      arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
-      return value_chill_card (arg1);
-
-    case UNOP_CHMAX:
-    case UNOP_CHMIN:
-      (*pos)++;
-      arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
-      return value_chill_max_min (op, arg1);
-
-    case BINOP_COMMA:
-      error ("',' operator used in invalid context");
-
-    default:
-      break;
-    }
-
-  return evaluate_subexp_standard (expect_type, exp, pos, noside);
-nosideret:
-  return value_from_longest (builtin_type_long, (LONGEST) 1);
-}
-
-const struct language_defn chill_language_defn =
-{
-  "chill",
-  language_chill,
-  chill_builtin_types,
-  range_check_on,
-  type_check_on,
-  case_sensitive_on,
-  chill_parse,			/* parser */
-  chill_error,			/* parser error function */
-  evaluate_subexp_chill,
-  chill_printchar,		/* print a character constant */
-  chill_printstr,		/* function to print a string constant */
-  NULL,				/* Function to print a single char */
-  chill_create_fundamental_type,	/* Create fundamental type in this language */
-  chill_print_type,		/* Print a type using appropriate syntax */
-  chill_val_print,		/* Print a value using appropriate syntax */
-  chill_value_print,		/* Print a top-levl value */
-  {"", "B'", "", ""},		/* Binary format info */
-  {"O'%lo", "O'", "o", ""},	/* Octal format info */
-  {"D'%ld", "D'", "d", ""},	/* Decimal format info */
-  {"H'%lx", "H'", "x", ""},	/* Hex format info */
-  chill_op_print_tab,		/* expression operators for printing */
-  0,				/* arrays are first-class (not c-style) */
-  0,				/* String lower bound */
-  &builtin_type_chill_char,	/* Type of string elements */
-  LANG_MAGIC
-};
-
-/* Initialization for Chill */
-
-void
-_initialize_chill_language (void)
-{
-  builtin_type_chill_bool =
-    init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-	       TYPE_FLAG_UNSIGNED,
-	       "BOOL", (struct objfile *) NULL);
-  builtin_type_chill_char =
-    init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
-	       TYPE_FLAG_UNSIGNED,
-	       "CHAR", (struct objfile *) NULL);
-  builtin_type_chill_long =
-    init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "LONG", (struct objfile *) NULL);
-  builtin_type_chill_ulong =
-    init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
-	       TYPE_FLAG_UNSIGNED,
-	       "ULONG", (struct objfile *) NULL);
-  builtin_type_chill_real =
-    init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
-	       0,
-	       "LONG_REAL", (struct objfile *) NULL);
-
-  add_language (&chill_language_defn);
-}
+// OBSOLETE /* Chill language support routines for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "parser-defs.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "valprint.h"
+// OBSOLETE 
+// OBSOLETE extern void _initialize_chill_language (void);
+// OBSOLETE 
+// OBSOLETE static struct value *evaluate_subexp_chill (struct type *, struct expression *,
+// OBSOLETE 					    int *, enum noside);
+// OBSOLETE 
+// OBSOLETE static struct value *value_chill_max_min (enum exp_opcode, struct value *);
+// OBSOLETE 
+// OBSOLETE static struct value *value_chill_card (struct value *);
+// OBSOLETE 
+// OBSOLETE static struct value *value_chill_length (struct value *);
+// OBSOLETE 
+// OBSOLETE static struct type *chill_create_fundamental_type (struct objfile *, int);
+// OBSOLETE 
+// OBSOLETE static void chill_printstr (struct ui_file * stream, char *string,
+// OBSOLETE 			    unsigned int length, int width,
+// OBSOLETE 			    int force_ellipses);
+// OBSOLETE 
+// OBSOLETE static void chill_printchar (int, struct ui_file *);
+// OBSOLETE 
+// OBSOLETE /* For now, Chill uses a simple mangling algorithm whereby you simply
+// OBSOLETE    discard everything after the occurance of two successive CPLUS_MARKER
+// OBSOLETE    characters to derive the demangled form. */
+// OBSOLETE 
+// OBSOLETE char *
+// OBSOLETE chill_demangle (const char *mangled)
+// OBSOLETE {
+// OBSOLETE   const char *joiner = NULL;
+// OBSOLETE   char *demangled;
+// OBSOLETE   const char *cp = mangled;
+// OBSOLETE 
+// OBSOLETE   while (*cp)
+// OBSOLETE     {
+// OBSOLETE       if (is_cplus_marker (*cp))
+// OBSOLETE 	{
+// OBSOLETE 	  joiner = cp;
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       cp++;
+// OBSOLETE     }
+// OBSOLETE   if (joiner != NULL && *(joiner + 1) == *joiner)
+// OBSOLETE     {
+// OBSOLETE       demangled = savestring (mangled, joiner - mangled);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       demangled = NULL;
+// OBSOLETE     }
+// OBSOLETE   return (demangled);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_printchar (register int c, struct ui_file *stream)
+// OBSOLETE {
+// OBSOLETE   c &= 0xFF;			/* Avoid sign bit follies */
+// OBSOLETE 
+// OBSOLETE   if (PRINT_LITERAL_FORM (c))
+// OBSOLETE     {
+// OBSOLETE       if (c == '\'' || c == '^')
+// OBSOLETE 	fprintf_filtered (stream, "'%c%c'", c, c);
+// OBSOLETE       else
+// OBSOLETE 	fprintf_filtered (stream, "'%c'", c);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Print the character string STRING, printing at most LENGTH characters.
+// OBSOLETE    Printing stops early if the number hits print_max; repeat counts
+// OBSOLETE    are printed as appropriate.  Print ellipses at the end if we
+// OBSOLETE    had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
+// OBSOLETE    Note that gdb maintains the length of strings without counting the
+// OBSOLETE    terminating null byte, while chill strings are typically written with
+// OBSOLETE    an explicit null byte.  So we always assume an implied null byte
+// OBSOLETE    until gdb is able to maintain non-null terminated strings as well
+// OBSOLETE    as null terminated strings (FIXME).
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_printstr (struct ui_file *stream, char *string, unsigned int length,
+// OBSOLETE 		int width, int force_ellipses)
+// OBSOLETE {
+// OBSOLETE   register unsigned int i;
+// OBSOLETE   unsigned int things_printed = 0;
+// OBSOLETE   int in_literal_form = 0;
+// OBSOLETE   int in_control_form = 0;
+// OBSOLETE   int need_slashslash = 0;
+// OBSOLETE   unsigned int c;
+// OBSOLETE 
+// OBSOLETE   if (length == 0)
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered ("\"\"", stream);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i < length && things_printed < print_max; ++i)
+// OBSOLETE     {
+// OBSOLETE       /* Position of the character we are examining
+// OBSOLETE          to see whether it is repeated.  */
+// OBSOLETE       unsigned int rep1;
+// OBSOLETE       /* Number of repetitions we have detected so far.  */
+// OBSOLETE       unsigned int reps;
+// OBSOLETE 
+// OBSOLETE       QUIT;
+// OBSOLETE 
+// OBSOLETE       if (need_slashslash)
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered ("//", stream);
+// OBSOLETE 	  need_slashslash = 0;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       rep1 = i + 1;
+// OBSOLETE       reps = 1;
+// OBSOLETE       while (rep1 < length && string[rep1] == string[i])
+// OBSOLETE 	{
+// OBSOLETE 	  ++rep1;
+// OBSOLETE 	  ++reps;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       c = string[i];
+// OBSOLETE       if (reps > repeat_count_threshold)
+// OBSOLETE 	{
+// OBSOLETE 	  if (in_control_form || in_literal_form)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (in_control_form)
+// OBSOLETE 		fputs_filtered (")", stream);
+// OBSOLETE 	      fputs_filtered ("\"//", stream);
+// OBSOLETE 	      in_control_form = in_literal_form = 0;
+// OBSOLETE 	    }
+// OBSOLETE 	  chill_printchar (c, stream);
+// OBSOLETE 	  fprintf_filtered (stream, "<repeats %u times>", reps);
+// OBSOLETE 	  i = rep1 - 1;
+// OBSOLETE 	  things_printed += repeat_count_threshold;
+// OBSOLETE 	  need_slashslash = 1;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  if (!in_literal_form && !in_control_form)
+// OBSOLETE 	    fputs_filtered ("\"", stream);
+// OBSOLETE 	  if (PRINT_LITERAL_FORM (c))
+// OBSOLETE 	    {
+// OBSOLETE 	      if (!in_literal_form)
+// OBSOLETE 		{
+// OBSOLETE 		  if (in_control_form)
+// OBSOLETE 		    {
+// OBSOLETE 		      fputs_filtered (")", stream);
+// OBSOLETE 		      in_control_form = 0;
+// OBSOLETE 		    }
+// OBSOLETE 		  in_literal_form = 1;
+// OBSOLETE 		}
+// OBSOLETE 	      fprintf_filtered (stream, "%c", c);
+// OBSOLETE 	      if (c == '"' || c == '^')
+// OBSOLETE 		/* duplicate this one as must be done at input */
+// OBSOLETE 		fprintf_filtered (stream, "%c", c);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      if (!in_control_form)
+// OBSOLETE 		{
+// OBSOLETE 		  if (in_literal_form)
+// OBSOLETE 		    {
+// OBSOLETE 		      in_literal_form = 0;
+// OBSOLETE 		    }
+// OBSOLETE 		  fputs_filtered ("^(", stream);
+// OBSOLETE 		  in_control_form = 1;
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		fprintf_filtered (stream, ",");
+// OBSOLETE 	      c = c & 0xff;
+// OBSOLETE 	      fprintf_filtered (stream, "%u", (unsigned int) c);
+// OBSOLETE 	    }
+// OBSOLETE 	  ++things_printed;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Terminate the quotes if necessary.  */
+// OBSOLETE   if (in_control_form)
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered (")", stream);
+// OBSOLETE     }
+// OBSOLETE   if (in_literal_form || in_control_form)
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered ("\"", stream);
+// OBSOLETE     }
+// OBSOLETE   if (force_ellipses || (i < length))
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered ("...", stream);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE chill_create_fundamental_type (struct objfile *objfile, int typeid)
+// OBSOLETE {
+// OBSOLETE   register struct type *type = NULL;
+// OBSOLETE 
+// OBSOLETE   switch (typeid)
+// OBSOLETE     {
+// OBSOLETE     default:
+// OBSOLETE       /* FIXME:  For now, if we are asked to produce a type not in this
+// OBSOLETE          language, create the equivalent of a C integer type with the
+// OBSOLETE          name "<?type?>".  When all the dust settles from the type
+// OBSOLETE          reconstruction work, this should probably become an error. */
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
+// OBSOLETE       warning ("internal error: no chill fundamental type %d", typeid);
+// OBSOLETE       break;
+// OBSOLETE     case FT_VOID:
+// OBSOLETE       /* FIXME:  Currently the GNU Chill compiler emits some DWARF entries for
+// OBSOLETE          typedefs, unrelated to anything directly in the code being compiled,
+// OBSOLETE          that have some FT_VOID types.  Just fake it for now. */
+// OBSOLETE       type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_BOOLEAN:
+// OBSOLETE       type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_CHAR:
+// OBSOLETE       type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_SIGNED_CHAR:
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_UNSIGNED_CHAR:
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_SHORT:		/* Chill ints are 2 bytes */
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_UNSIGNED_SHORT:	/* Chill ints are 2 bytes */
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_INTEGER:		/* FIXME? */
+// OBSOLETE     case FT_SIGNED_INTEGER:	/* FIXME? */
+// OBSOLETE     case FT_LONG:		/* Chill longs are 4 bytes */
+// OBSOLETE     case FT_SIGNED_LONG:	/* Chill longs are 4 bytes */
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_UNSIGNED_INTEGER:	/* FIXME? */
+// OBSOLETE     case FT_UNSIGNED_LONG:	/* Chill longs are 4 bytes */
+// OBSOLETE       type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_FLOAT:
+// OBSOLETE       type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
+// OBSOLETE       break;
+// OBSOLETE     case FT_DBL_PREC_FLOAT:
+// OBSOLETE       type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   return (type);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Table of operators and their precedences for printing expressions.  */
+// OBSOLETE 
+// OBSOLETE static const struct op_print chill_op_print_tab[] =
+// OBSOLETE {
+// OBSOLETE   {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
+// OBSOLETE   {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
+// OBSOLETE   {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
+// OBSOLETE   {"MOD", BINOP_MOD, PREC_MUL, 0},
+// OBSOLETE   {"REM", BINOP_REM, PREC_MUL, 0},
+// OBSOLETE   {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE   {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
+// OBSOLETE   {"=", BINOP_EQUAL, PREC_EQUAL, 0},
+// OBSOLETE   {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
+// OBSOLETE   {"<=", BINOP_LEQ, PREC_ORDER, 0},
+// OBSOLETE   {">=", BINOP_GEQ, PREC_ORDER, 0},
+// OBSOLETE   {">", BINOP_GTR, PREC_ORDER, 0},
+// OBSOLETE   {"<", BINOP_LESS, PREC_ORDER, 0},
+// OBSOLETE   {"+", BINOP_ADD, PREC_ADD, 0},
+// OBSOLETE   {"-", BINOP_SUB, PREC_ADD, 0},
+// OBSOLETE   {"*", BINOP_MUL, PREC_MUL, 0},
+// OBSOLETE   {"/", BINOP_DIV, PREC_MUL, 0},
+// OBSOLETE   {"//", BINOP_CONCAT, PREC_PREFIX, 0},		/* FIXME: precedence? */
+// OBSOLETE   {"-", UNOP_NEG, PREC_PREFIX, 0},
+// OBSOLETE   {"->", UNOP_IND, PREC_SUFFIX, 1},
+// OBSOLETE   {"->", UNOP_ADDR, PREC_PREFIX, 0},
+// OBSOLETE   {":", BINOP_RANGE, PREC_ASSIGN, 0},
+// OBSOLETE   {NULL, 0, 0, 0}
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* The built-in types of Chill.  */
+// OBSOLETE 
+// OBSOLETE struct type *builtin_type_chill_bool;
+// OBSOLETE struct type *builtin_type_chill_char;
+// OBSOLETE struct type *builtin_type_chill_long;
+// OBSOLETE struct type *builtin_type_chill_ulong;
+// OBSOLETE struct type *builtin_type_chill_real;
+// OBSOLETE 
+// OBSOLETE struct type **const (chill_builtin_types[]) =
+// OBSOLETE {
+// OBSOLETE   &builtin_type_chill_bool,
+// OBSOLETE     &builtin_type_chill_char,
+// OBSOLETE     &builtin_type_chill_long,
+// OBSOLETE     &builtin_type_chill_ulong,
+// OBSOLETE     &builtin_type_chill_real,
+// OBSOLETE     0
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Calculate LOWER or UPPER of TYPE.
+// OBSOLETE    Returns the result as an integer.
+// OBSOLETE    *RESULT_TYPE is the appropriate type for the result. */
+// OBSOLETE 
+// OBSOLETE LONGEST
+// OBSOLETE type_lower_upper (enum exp_opcode op,	/* Either UNOP_LOWER or UNOP_UPPER */
+// OBSOLETE 		  struct type *type, struct type **result_type)
+// OBSOLETE {
+// OBSOLETE   LONGEST low, high;
+// OBSOLETE   *result_type = type;
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE   switch (TYPE_CODE (type))
+// OBSOLETE     {
+// OBSOLETE     case TYPE_CODE_STRUCT:
+// OBSOLETE       *result_type = builtin_type_int;
+// OBSOLETE       if (chill_varying_type (type))
+// OBSOLETE 	return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_ARRAY:
+// OBSOLETE     case TYPE_CODE_BITSTRING:
+// OBSOLETE     case TYPE_CODE_STRING:
+// OBSOLETE       type = TYPE_FIELD_TYPE (type, 0);		/* Get index type */
+// OBSOLETE 
+// OBSOLETE       /* ... fall through ... */
+// OBSOLETE     case TYPE_CODE_RANGE:
+// OBSOLETE       *result_type = TYPE_TARGET_TYPE (type);
+// OBSOLETE       return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_ENUM:
+// OBSOLETE     case TYPE_CODE_BOOL:
+// OBSOLETE     case TYPE_CODE_INT:
+// OBSOLETE     case TYPE_CODE_CHAR:
+// OBSOLETE       if (get_discrete_bounds (type, &low, &high) >= 0)
+// OBSOLETE 	{
+// OBSOLETE 	  *result_type = type;
+// OBSOLETE 	  return op == UNOP_LOWER ? low : high;
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_UNDEF:
+// OBSOLETE     case TYPE_CODE_PTR:
+// OBSOLETE     case TYPE_CODE_UNION:
+// OBSOLETE     case TYPE_CODE_FUNC:
+// OBSOLETE     case TYPE_CODE_FLT:
+// OBSOLETE     case TYPE_CODE_VOID:
+// OBSOLETE     case TYPE_CODE_SET:
+// OBSOLETE     case TYPE_CODE_ERROR:
+// OBSOLETE     case TYPE_CODE_MEMBER:
+// OBSOLETE     case TYPE_CODE_METHOD:
+// OBSOLETE     case TYPE_CODE_REF:
+// OBSOLETE     case TYPE_CODE_COMPLEX:
+// OBSOLETE     default:
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   error ("unknown mode for LOWER/UPPER builtin");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_length (struct value *val)
+// OBSOLETE {
+// OBSOLETE   LONGEST tmp;
+// OBSOLETE   struct type *type = VALUE_TYPE (val);
+// OBSOLETE   struct type *ttype;
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE   switch (TYPE_CODE (type))
+// OBSOLETE     {
+// OBSOLETE     case TYPE_CODE_ARRAY:
+// OBSOLETE     case TYPE_CODE_BITSTRING:
+// OBSOLETE     case TYPE_CODE_STRING:
+// OBSOLETE       tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
+// OBSOLETE 	- type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_STRUCT:
+// OBSOLETE       if (chill_varying_type (type))
+// OBSOLETE 	{
+// OBSOLETE 	  tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       /* ... else fall through ... */
+// OBSOLETE     default:
+// OBSOLETE       error ("bad argument to LENGTH builtin");
+// OBSOLETE     }
+// OBSOLETE   return value_from_longest (builtin_type_int, tmp);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_card (struct value *val)
+// OBSOLETE {
+// OBSOLETE   LONGEST tmp = 0;
+// OBSOLETE   struct type *type = VALUE_TYPE (val);
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE 
+// OBSOLETE   if (TYPE_CODE (type) == TYPE_CODE_SET)
+// OBSOLETE     {
+// OBSOLETE       struct type *range_type = TYPE_INDEX_TYPE (type);
+// OBSOLETE       LONGEST lower_bound, upper_bound;
+// OBSOLETE       int i;
+// OBSOLETE 
+// OBSOLETE       get_discrete_bounds (range_type, &lower_bound, &upper_bound);
+// OBSOLETE       for (i = lower_bound; i <= upper_bound; i++)
+// OBSOLETE 	if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE 	  tmp++;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     error ("bad argument to CARD builtin");
+// OBSOLETE 
+// OBSOLETE   return value_from_longest (builtin_type_int, tmp);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_max_min (enum exp_opcode op, struct value *val)
+// OBSOLETE {
+// OBSOLETE   LONGEST tmp = 0;
+// OBSOLETE   struct type *type = VALUE_TYPE (val);
+// OBSOLETE   struct type *elttype;
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE 
+// OBSOLETE   if (TYPE_CODE (type) == TYPE_CODE_SET)
+// OBSOLETE     {
+// OBSOLETE       LONGEST lower_bound, upper_bound;
+// OBSOLETE       int i, empty = 1;
+// OBSOLETE 
+// OBSOLETE       elttype = TYPE_INDEX_TYPE (type);
+// OBSOLETE       CHECK_TYPEDEF (elttype);
+// OBSOLETE       get_discrete_bounds (elttype, &lower_bound, &upper_bound);
+// OBSOLETE 
+// OBSOLETE       if (op == UNOP_CHMAX)
+// OBSOLETE 	{
+// OBSOLETE 	  for (i = upper_bound; i >= lower_bound; i--)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE 		{
+// OBSOLETE 		  tmp = i;
+// OBSOLETE 		  empty = 0;
+// OBSOLETE 		  break;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  for (i = lower_bound; i <= upper_bound; i++)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE 		{
+// OBSOLETE 		  tmp = i;
+// OBSOLETE 		  empty = 0;
+// OBSOLETE 		  break;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       if (empty)
+// OBSOLETE 	error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
+// OBSOLETE 
+// OBSOLETE   return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
+// OBSOLETE 			     ? TYPE_TARGET_TYPE (elttype)
+// OBSOLETE 			     : elttype,
+// OBSOLETE 			     tmp);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct value *
+// OBSOLETE evaluate_subexp_chill (struct type *expect_type,
+// OBSOLETE 		       register struct expression *exp, register int *pos,
+// OBSOLETE 		       enum noside noside)
+// OBSOLETE {
+// OBSOLETE   int pc = *pos;
+// OBSOLETE   struct type *type;
+// OBSOLETE   int tem, nargs;
+// OBSOLETE   struct value *arg1;
+// OBSOLETE   struct value **argvec;
+// OBSOLETE   enum exp_opcode op = exp->elts[*pos].opcode;
+// OBSOLETE   switch (op)
+// OBSOLETE     {
+// OBSOLETE     case MULTI_SUBSCRIPT:
+// OBSOLETE       if (noside == EVAL_SKIP)
+// OBSOLETE 	break;
+// OBSOLETE       (*pos) += 3;
+// OBSOLETE       nargs = longest_to_int (exp->elts[pc + 1].longconst);
+// OBSOLETE       arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
+// OBSOLETE       type = check_typedef (VALUE_TYPE (arg1));
+// OBSOLETE 
+// OBSOLETE       if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
+// OBSOLETE 	{
+// OBSOLETE 	  /* Looks like string repetition. */
+// OBSOLETE 	  struct value *string = evaluate_subexp_with_coercion (exp, pos,
+// OBSOLETE 								noside);
+// OBSOLETE 	  return value_concat (arg1, string);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       switch (TYPE_CODE (type))
+// OBSOLETE 	{
+// OBSOLETE 	case TYPE_CODE_PTR:
+// OBSOLETE 	  type = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE 	  if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
+// OBSOLETE 	    error ("reference value used as function");
+// OBSOLETE 	  /* ... fall through ... */
+// OBSOLETE 	case TYPE_CODE_FUNC:
+// OBSOLETE 	  /* It's a function call. */
+// OBSOLETE 	  if (noside == EVAL_AVOID_SIDE_EFFECTS)
+// OBSOLETE 	    break;
+// OBSOLETE 
+// OBSOLETE 	  /* Allocate arg vector, including space for the function to be
+// OBSOLETE 	     called in argvec[0] and a terminating NULL */
+// OBSOLETE 	  argvec = (struct value **) alloca (sizeof (struct value *)
+// OBSOLETE 					     * (nargs + 2));
+// OBSOLETE 	  argvec[0] = arg1;
+// OBSOLETE 	  tem = 1;
+// OBSOLETE 	  for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
+// OBSOLETE 	    {
+// OBSOLETE 	      argvec[tem]
+// OBSOLETE 		= evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
+// OBSOLETE 					 exp, pos, noside);
+// OBSOLETE 	    }
+// OBSOLETE 	  for (; tem <= nargs; tem++)
+// OBSOLETE 	    argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
+// OBSOLETE 	  argvec[tem] = 0;	/* signal end of arglist */
+// OBSOLETE 
+// OBSOLETE 	  return call_function_by_hand (argvec[0], nargs, argvec + 1);
+// OBSOLETE 	default:
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       while (nargs-- > 0)
+// OBSOLETE 	{
+// OBSOLETE 	  struct value *index = evaluate_subexp_with_coercion (exp, pos,
+// OBSOLETE 							       noside);
+// OBSOLETE 	  arg1 = value_subscript (arg1, index);
+// OBSOLETE 	}
+// OBSOLETE       return (arg1);
+// OBSOLETE 
+// OBSOLETE     case UNOP_LOWER:
+// OBSOLETE     case UNOP_UPPER:
+// OBSOLETE       (*pos)++;
+// OBSOLETE       if (noside == EVAL_SKIP)
+// OBSOLETE 	{
+// OBSOLETE 	  (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
+// OBSOLETE 	  goto nosideret;
+// OBSOLETE 	}
+// OBSOLETE       arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
+// OBSOLETE 						  EVAL_AVOID_SIDE_EFFECTS);
+// OBSOLETE       tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
+// OBSOLETE       return value_from_longest (type, tem);
+// OBSOLETE 
+// OBSOLETE     case UNOP_LENGTH:
+// OBSOLETE       (*pos)++;
+// OBSOLETE       arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE       return value_chill_length (arg1);
+// OBSOLETE 
+// OBSOLETE     case UNOP_CARD:
+// OBSOLETE       (*pos)++;
+// OBSOLETE       arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE       return value_chill_card (arg1);
+// OBSOLETE 
+// OBSOLETE     case UNOP_CHMAX:
+// OBSOLETE     case UNOP_CHMIN:
+// OBSOLETE       (*pos)++;
+// OBSOLETE       arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE       return value_chill_max_min (op, arg1);
+// OBSOLETE 
+// OBSOLETE     case BINOP_COMMA:
+// OBSOLETE       error ("',' operator used in invalid context");
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return evaluate_subexp_standard (expect_type, exp, pos, noside);
+// OBSOLETE nosideret:
+// OBSOLETE   return value_from_longest (builtin_type_long, (LONGEST) 1);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE const struct language_defn chill_language_defn =
+// OBSOLETE {
+// OBSOLETE   "chill",
+// OBSOLETE   language_chill,
+// OBSOLETE   chill_builtin_types,
+// OBSOLETE   range_check_on,
+// OBSOLETE   type_check_on,
+// OBSOLETE   case_sensitive_on,
+// OBSOLETE   chill_parse,			/* parser */
+// OBSOLETE   chill_error,			/* parser error function */
+// OBSOLETE   evaluate_subexp_chill,
+// OBSOLETE   chill_printchar,		/* print a character constant */
+// OBSOLETE   chill_printstr,		/* function to print a string constant */
+// OBSOLETE   NULL,				/* Function to print a single char */
+// OBSOLETE   chill_create_fundamental_type,	/* Create fundamental type in this language */
+// OBSOLETE   chill_print_type,		/* Print a type using appropriate syntax */
+// OBSOLETE   chill_val_print,		/* Print a value using appropriate syntax */
+// OBSOLETE   chill_value_print,		/* Print a top-levl value */
+// OBSOLETE   {"", "B'", "", ""},		/* Binary format info */
+// OBSOLETE   {"O'%lo", "O'", "o", ""},	/* Octal format info */
+// OBSOLETE   {"D'%ld", "D'", "d", ""},	/* Decimal format info */
+// OBSOLETE   {"H'%lx", "H'", "x", ""},	/* Hex format info */
+// OBSOLETE   chill_op_print_tab,		/* expression operators for printing */
+// OBSOLETE   0,				/* arrays are first-class (not c-style) */
+// OBSOLETE   0,				/* String lower bound */
+// OBSOLETE   &builtin_type_chill_char,	/* Type of string elements */
+// OBSOLETE   LANG_MAGIC
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Initialization for Chill */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_chill_language (void)
+// OBSOLETE {
+// OBSOLETE   builtin_type_chill_bool =
+// OBSOLETE     init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 	       TYPE_FLAG_UNSIGNED,
+// OBSOLETE 	       "BOOL", (struct objfile *) NULL);
+// OBSOLETE   builtin_type_chill_char =
+// OBSOLETE     init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 	       TYPE_FLAG_UNSIGNED,
+// OBSOLETE 	       "CHAR", (struct objfile *) NULL);
+// OBSOLETE   builtin_type_chill_long =
+// OBSOLETE     init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 	       0,
+// OBSOLETE 	       "LONG", (struct objfile *) NULL);
+// OBSOLETE   builtin_type_chill_ulong =
+// OBSOLETE     init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 	       TYPE_FLAG_UNSIGNED,
+// OBSOLETE 	       "ULONG", (struct objfile *) NULL);
+// OBSOLETE   builtin_type_chill_real =
+// OBSOLETE     init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 	       0,
+// OBSOLETE 	       "LONG_REAL", (struct objfile *) NULL);
+// OBSOLETE 
+// OBSOLETE   add_language (&chill_language_defn);
+// OBSOLETE }
diff --git a/gdb/ch-lang.h b/gdb/ch-lang.h
index b55e2dd..d4e5356 100644
--- a/gdb/ch-lang.h
+++ b/gdb/ch-lang.h
@@ -1,41 +1,41 @@
-/* Chill language support definitions for GDB, the GNU debugger.
-   Copyright 1992, 1994, 1996, 1998, 1999, 2000
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Forward decls for prototypes */
-struct value;
-
-extern int chill_parse (void);	/* Defined in ch-exp.y */
-
-extern void chill_error (char *);	/* Defined in ch-exp.y */
-
-/* Defined in ch-typeprint.c */
-extern void chill_print_type (struct type *, char *, struct ui_file *, int,
-			      int);
-
-extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
-			    struct ui_file *, int, int, int,
-			    enum val_prettyprint);
-
-extern int chill_value_print (struct value *, struct ui_file *,
-			      int, enum val_prettyprint);
-
-extern LONGEST
-type_lower_upper (enum exp_opcode, struct type *, struct type **);
+// OBSOLETE /* Chill language support definitions for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1992, 1994, 1996, 1998, 1999, 2000
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Forward decls for prototypes */
+// OBSOLETE struct value;
+// OBSOLETE 
+// OBSOLETE extern int chill_parse (void);	/* Defined in ch-exp.y */
+// OBSOLETE 
+// OBSOLETE extern void chill_error (char *);	/* Defined in ch-exp.y */
+// OBSOLETE 
+// OBSOLETE /* Defined in ch-typeprint.c */
+// OBSOLETE extern void chill_print_type (struct type *, char *, struct ui_file *, int,
+// OBSOLETE 			      int);
+// OBSOLETE 
+// OBSOLETE extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
+// OBSOLETE 			    struct ui_file *, int, int, int,
+// OBSOLETE 			    enum val_prettyprint);
+// OBSOLETE 
+// OBSOLETE extern int chill_value_print (struct value *, struct ui_file *,
+// OBSOLETE 			      int, enum val_prettyprint);
+// OBSOLETE 
+// OBSOLETE extern LONGEST
+// OBSOLETE type_lower_upper (enum exp_opcode, struct type *, struct type **);
diff --git a/gdb/ch-typeprint.c b/gdb/ch-typeprint.c
index 011bd12..32590f8 100644
--- a/gdb/ch-typeprint.c
+++ b/gdb/ch-typeprint.c
@@ -1,340 +1,340 @@
-/* Support for printing Chill types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 2000
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "obstack.h"
-#include "bfd.h"		/* Binary File Description */
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "expression.h"
-#include "value.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "language.h"
-#include "ch-lang.h"
-#include "typeprint.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-
-static void chill_type_print_base (struct type *, struct ui_file *, int, int);
-
-void
-chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
-		  int show, int level)
-{
-  if (varstring != NULL && *varstring != '\0')
-    {
-      fputs_filtered (varstring, stream);
-      fputs_filtered (" ", stream);
-    }
-  chill_type_print_base (type, stream, show, level);
-}
-
-/* Print the name of the type (or the ultimate pointer target,
-   function value or array element).
-
-   SHOW nonzero means don't print this type as just its name;
-   show its real definition even if it has a name.
-   SHOW zero means print just typename or tag if there is one
-   SHOW negative means abbreviate structure elements.
-   SHOW is decremented for printing of structure elements.
-
-   LEVEL is the depth to indent by.
-   We increase it for some recursive calls.  */
-
-static void
-chill_type_print_base (struct type *type, struct ui_file *stream, int show,
-		       int level)
-{
-  register int len;
-  register int i;
-  struct type *index_type;
-  struct type *range_type;
-  LONGEST low_bound;
-  LONGEST high_bound;
-
-  QUIT;
-
-  wrap_here ("    ");
-  if (type == NULL)
-    {
-      fputs_filtered ("<type unknown>", stream);
-      return;
-    }
-
-  /* When SHOW is zero or less, and there is a valid type name, then always
-     just print the type name directly from the type. */
-
-  if ((show <= 0) && (TYPE_NAME (type) != NULL))
-    {
-      fputs_filtered (TYPE_NAME (type), stream);
-      return;
-    }
-
-  if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
-    CHECK_TYPEDEF (type);
-
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_TYPEDEF:
-      chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
-      break;
-    case TYPE_CODE_PTR:
-      if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
-	{
-	  fprintf_filtered (stream,
-			    TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
-	  break;
-	}
-      fprintf_filtered (stream, "REF ");
-      chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
-      break;
-
-    case TYPE_CODE_BOOL:
-      /* FIXME: we should probably just print the TYPE_NAME, in case
-         anyone ever fixes the compiler to give us the real names
-         in the presence of the chill equivalent of typedef (assuming
-         there is one).  */
-      fprintf_filtered (stream,
-			TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
-      break;
-
-    case TYPE_CODE_ARRAY:
-      fputs_filtered ("ARRAY (", stream);
-      range_type = TYPE_FIELD_TYPE (type, 0);
-      if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
-	chill_print_type (range_type, "", stream, 0, level);
-      else
-	{
-	  index_type = TYPE_TARGET_TYPE (range_type);
-	  low_bound = TYPE_FIELD_BITPOS (range_type, 0);
-	  high_bound = TYPE_FIELD_BITPOS (range_type, 1);
-	  print_type_scalar (index_type, low_bound, stream);
-	  fputs_filtered (":", stream);
-	  print_type_scalar (index_type, high_bound, stream);
-	}
-      fputs_filtered (") ", stream);
-      chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
-      break;
-
-    case TYPE_CODE_BITSTRING:
-      fprintf_filtered (stream, "BOOLS (%d)",
-		      TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
-      break;
-
-    case TYPE_CODE_SET:
-      fputs_filtered ("POWERSET ", stream);
-      chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
-			show - 1, level);
-      break;
-
-    case TYPE_CODE_STRING:
-      range_type = TYPE_FIELD_TYPE (type, 0);
-      index_type = TYPE_TARGET_TYPE (range_type);
-      high_bound = TYPE_FIELD_BITPOS (range_type, 1);
-      fputs_filtered ("CHARS (", stream);
-      print_type_scalar (index_type, high_bound + 1, stream);
-      fputs_filtered (")", stream);
-      break;
-
-    case TYPE_CODE_MEMBER:
-      fprintf_filtered (stream, "MEMBER ");
-      chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
-      break;
-    case TYPE_CODE_REF:
-      fprintf_filtered (stream, "/*LOC*/ ");
-      chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
-      break;
-    case TYPE_CODE_FUNC:
-      fprintf_filtered (stream, "PROC (");
-      len = TYPE_NFIELDS (type);
-      for (i = 0; i < len; i++)
-	{
-	  struct type *param_type = TYPE_FIELD_TYPE (type, i);
-	  if (i > 0)
-	    {
-	      fputs_filtered (", ", stream);
-	      wrap_here ("    ");
-	    }
-	  if (TYPE_CODE (param_type) == TYPE_CODE_REF)
-	    {
-	      chill_type_print_base (TYPE_TARGET_TYPE (param_type),
-				     stream, 0, level);
-	      fputs_filtered (" LOC", stream);
-	    }
-	  else
-	    chill_type_print_base (param_type, stream, show, level);
-	}
-      fprintf_filtered (stream, ")");
-      if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
-	{
-	  fputs_filtered (" RETURNS (", stream);
-	  chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
-	  fputs_filtered (")", stream);
-	}
-      break;
-
-    case TYPE_CODE_STRUCT:
-      if (chill_varying_type (type))
-	{
-	  chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
-				 stream, 0, level);
-	  fputs_filtered (" VARYING", stream);
-	}
-      else
-	{
-	  fprintf_filtered (stream, "STRUCT ");
-
-	  fprintf_filtered (stream, "(\n");
-	  if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
-	    {
-	      if (TYPE_STUB (type))
-		{
-		  fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
-		}
-	      else
-		{
-		  fprintfi_filtered (level + 4, stream, "<no data fields>\n");
-		}
-	    }
-	  else
-	    {
-	      len = TYPE_NFIELDS (type);
-	      for (i = TYPE_N_BASECLASSES (type); i < len; i++)
-		{
-		  struct type *field_type = TYPE_FIELD_TYPE (type, i);
-		  QUIT;
-		  print_spaces_filtered (level + 4, stream);
-		  if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
-		    {
-		      int j;	/* variant number */
-		      fputs_filtered ("CASE OF\n", stream);
-		      for (j = 0; j < TYPE_NFIELDS (field_type); j++)
-			{
-			  int k;	/* variant field index */
-			  struct type *variant_type
-			  = TYPE_FIELD_TYPE (field_type, j);
-			  int var_len = TYPE_NFIELDS (variant_type);
-			  print_spaces_filtered (level + 4, stream);
-			  if (strcmp (TYPE_FIELD_NAME (field_type, j),
-				      "else") == 0)
-			    fputs_filtered ("ELSE\n", stream);
-			  else
-			    fputs_filtered (":\n", stream);
-			  if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
-			    error ("variant record confusion");
-			  for (k = 0; k < var_len; k++)
-			    {
-			      print_spaces_filtered (level + 8, stream);
-			      chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
-					  TYPE_FIELD_NAME (variant_type, k),
-						stream, show - 1, level + 8);
-			      if (k < (var_len - 1))
-				fputs_filtered (",", stream);
-			      fputs_filtered ("\n", stream);
-			    }
-			}
-		      print_spaces_filtered (level + 4, stream);
-		      fputs_filtered ("ESAC", stream);
-		    }
-		  else
-		    chill_print_type (field_type,
-				      TYPE_FIELD_NAME (type, i),
-				      stream, show - 1, level + 4);
-		  if (i < (len - 1))
-		    {
-		      fputs_filtered (",", stream);
-		    }
-		  fputs_filtered ("\n", stream);
-		}
-	    }
-	  fprintfi_filtered (level, stream, ")");
-	}
-      break;
-
-    case TYPE_CODE_RANGE:
-      {
-	struct type *target = TYPE_TARGET_TYPE (type);
-	if (target && TYPE_NAME (target))
-	  fputs_filtered (TYPE_NAME (target), stream);
-	else
-	  fputs_filtered ("RANGE", stream);
-	if (target == NULL)
-	  target = builtin_type_long;
-	fputs_filtered (" (", stream);
-	print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
-	fputs_filtered (":", stream);
-	print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
-	fputs_filtered (")", stream);
-      }
-      break;
-
-    case TYPE_CODE_ENUM:
-      {
-	register int lastval = 0;
-	fprintf_filtered (stream, "SET (");
-	len = TYPE_NFIELDS (type);
-	for (i = 0; i < len; i++)
-	  {
-	    QUIT;
-	    if (i)
-	      fprintf_filtered (stream, ", ");
-	    wrap_here ("    ");
-	    fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
-	    if (lastval != TYPE_FIELD_BITPOS (type, i))
-	      {
-		fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
-		lastval = TYPE_FIELD_BITPOS (type, i);
-	      }
-	    lastval++;
-	  }
-	fprintf_filtered (stream, ")");
-      }
-      break;
-
-    case TYPE_CODE_VOID:
-    case TYPE_CODE_UNDEF:
-    case TYPE_CODE_ERROR:
-    case TYPE_CODE_UNION:
-    case TYPE_CODE_METHOD:
-      error ("missing language support in chill_type_print_base");
-      break;
-
-    default:
-
-      /* Handle types not explicitly handled by the other cases,
-         such as fundamental types.  For these, just print whatever
-         the type name is, as recorded in the type itself.  If there
-         is no type name, then complain. */
-
-      if (TYPE_NAME (type) != NULL)
-	{
-	  fputs_filtered (TYPE_NAME (type), stream);
-	}
-      else
-	{
-	  error ("Unrecognized type code (%d) in symbol table.",
-		 TYPE_CODE (type));
-	}
-      break;
-    }
-}
+// OBSOLETE /* Support for printing Chill types for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 2000
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE #include "bfd.h"		/* Binary File Description */
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "typeprint.h"
+// OBSOLETE 
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <errno.h>
+// OBSOLETE 
+// OBSOLETE static void chill_type_print_base (struct type *, struct ui_file *, int, int);
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
+// OBSOLETE 		  int show, int level)
+// OBSOLETE {
+// OBSOLETE   if (varstring != NULL && *varstring != '\0')
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered (varstring, stream);
+// OBSOLETE       fputs_filtered (" ", stream);
+// OBSOLETE     }
+// OBSOLETE   chill_type_print_base (type, stream, show, level);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Print the name of the type (or the ultimate pointer target,
+// OBSOLETE    function value or array element).
+// OBSOLETE 
+// OBSOLETE    SHOW nonzero means don't print this type as just its name;
+// OBSOLETE    show its real definition even if it has a name.
+// OBSOLETE    SHOW zero means print just typename or tag if there is one
+// OBSOLETE    SHOW negative means abbreviate structure elements.
+// OBSOLETE    SHOW is decremented for printing of structure elements.
+// OBSOLETE 
+// OBSOLETE    LEVEL is the depth to indent by.
+// OBSOLETE    We increase it for some recursive calls.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_type_print_base (struct type *type, struct ui_file *stream, int show,
+// OBSOLETE 		       int level)
+// OBSOLETE {
+// OBSOLETE   register int len;
+// OBSOLETE   register int i;
+// OBSOLETE   struct type *index_type;
+// OBSOLETE   struct type *range_type;
+// OBSOLETE   LONGEST low_bound;
+// OBSOLETE   LONGEST high_bound;
+// OBSOLETE 
+// OBSOLETE   QUIT;
+// OBSOLETE 
+// OBSOLETE   wrap_here ("    ");
+// OBSOLETE   if (type == NULL)
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered ("<type unknown>", stream);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* When SHOW is zero or less, and there is a valid type name, then always
+// OBSOLETE      just print the type name directly from the type. */
+// OBSOLETE 
+// OBSOLETE   if ((show <= 0) && (TYPE_NAME (type) != NULL))
+// OBSOLETE     {
+// OBSOLETE       fputs_filtered (TYPE_NAME (type), stream);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
+// OBSOLETE     CHECK_TYPEDEF (type);
+// OBSOLETE 
+// OBSOLETE   switch (TYPE_CODE (type))
+// OBSOLETE     {
+// OBSOLETE     case TYPE_CODE_TYPEDEF:
+// OBSOLETE       chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_PTR:
+// OBSOLETE       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_filtered (stream,
+// OBSOLETE 			    TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       fprintf_filtered (stream, "REF ");
+// OBSOLETE       chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_BOOL:
+// OBSOLETE       /* FIXME: we should probably just print the TYPE_NAME, in case
+// OBSOLETE          anyone ever fixes the compiler to give us the real names
+// OBSOLETE          in the presence of the chill equivalent of typedef (assuming
+// OBSOLETE          there is one).  */
+// OBSOLETE       fprintf_filtered (stream,
+// OBSOLETE 			TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_ARRAY:
+// OBSOLETE       fputs_filtered ("ARRAY (", stream);
+// OBSOLETE       range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE       if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
+// OBSOLETE 	chill_print_type (range_type, "", stream, 0, level);
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE 	  low_bound = TYPE_FIELD_BITPOS (range_type, 0);
+// OBSOLETE 	  high_bound = TYPE_FIELD_BITPOS (range_type, 1);
+// OBSOLETE 	  print_type_scalar (index_type, low_bound, stream);
+// OBSOLETE 	  fputs_filtered (":", stream);
+// OBSOLETE 	  print_type_scalar (index_type, high_bound, stream);
+// OBSOLETE 	}
+// OBSOLETE       fputs_filtered (") ", stream);
+// OBSOLETE       chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_BITSTRING:
+// OBSOLETE       fprintf_filtered (stream, "BOOLS (%d)",
+// OBSOLETE 		      TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_SET:
+// OBSOLETE       fputs_filtered ("POWERSET ", stream);
+// OBSOLETE       chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
+// OBSOLETE 			show - 1, level);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_STRING:
+// OBSOLETE       range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE       index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE       high_bound = TYPE_FIELD_BITPOS (range_type, 1);
+// OBSOLETE       fputs_filtered ("CHARS (", stream);
+// OBSOLETE       print_type_scalar (index_type, high_bound + 1, stream);
+// OBSOLETE       fputs_filtered (")", stream);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_MEMBER:
+// OBSOLETE       fprintf_filtered (stream, "MEMBER ");
+// OBSOLETE       chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_REF:
+// OBSOLETE       fprintf_filtered (stream, "/*LOC*/ ");
+// OBSOLETE       chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_FUNC:
+// OBSOLETE       fprintf_filtered (stream, "PROC (");
+// OBSOLETE       len = TYPE_NFIELDS (type);
+// OBSOLETE       for (i = 0; i < len; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  struct type *param_type = TYPE_FIELD_TYPE (type, i);
+// OBSOLETE 	  if (i > 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      fputs_filtered (", ", stream);
+// OBSOLETE 	      wrap_here ("    ");
+// OBSOLETE 	    }
+// OBSOLETE 	  if (TYPE_CODE (param_type) == TYPE_CODE_REF)
+// OBSOLETE 	    {
+// OBSOLETE 	      chill_type_print_base (TYPE_TARGET_TYPE (param_type),
+// OBSOLETE 				     stream, 0, level);
+// OBSOLETE 	      fputs_filtered (" LOC", stream);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    chill_type_print_base (param_type, stream, show, level);
+// OBSOLETE 	}
+// OBSOLETE       fprintf_filtered (stream, ")");
+// OBSOLETE       if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered (" RETURNS (", stream);
+// OBSOLETE 	  chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE 	  fputs_filtered (")", stream);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_STRUCT:
+// OBSOLETE       if (chill_varying_type (type))
+// OBSOLETE 	{
+// OBSOLETE 	  chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
+// OBSOLETE 				 stream, 0, level);
+// OBSOLETE 	  fputs_filtered (" VARYING", stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_filtered (stream, "STRUCT ");
+// OBSOLETE 
+// OBSOLETE 	  fprintf_filtered (stream, "(\n");
+// OBSOLETE 	  if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
+// OBSOLETE 	    {
+// OBSOLETE 	      if (TYPE_STUB (type))
+// OBSOLETE 		{
+// OBSOLETE 		  fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		{
+// OBSOLETE 		  fprintfi_filtered (level + 4, stream, "<no data fields>\n");
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      len = TYPE_NFIELDS (type);
+// OBSOLETE 	      for (i = TYPE_N_BASECLASSES (type); i < len; i++)
+// OBSOLETE 		{
+// OBSOLETE 		  struct type *field_type = TYPE_FIELD_TYPE (type, i);
+// OBSOLETE 		  QUIT;
+// OBSOLETE 		  print_spaces_filtered (level + 4, stream);
+// OBSOLETE 		  if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
+// OBSOLETE 		    {
+// OBSOLETE 		      int j;	/* variant number */
+// OBSOLETE 		      fputs_filtered ("CASE OF\n", stream);
+// OBSOLETE 		      for (j = 0; j < TYPE_NFIELDS (field_type); j++)
+// OBSOLETE 			{
+// OBSOLETE 			  int k;	/* variant field index */
+// OBSOLETE 			  struct type *variant_type
+// OBSOLETE 			  = TYPE_FIELD_TYPE (field_type, j);
+// OBSOLETE 			  int var_len = TYPE_NFIELDS (variant_type);
+// OBSOLETE 			  print_spaces_filtered (level + 4, stream);
+// OBSOLETE 			  if (strcmp (TYPE_FIELD_NAME (field_type, j),
+// OBSOLETE 				      "else") == 0)
+// OBSOLETE 			    fputs_filtered ("ELSE\n", stream);
+// OBSOLETE 			  else
+// OBSOLETE 			    fputs_filtered (":\n", stream);
+// OBSOLETE 			  if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
+// OBSOLETE 			    error ("variant record confusion");
+// OBSOLETE 			  for (k = 0; k < var_len; k++)
+// OBSOLETE 			    {
+// OBSOLETE 			      print_spaces_filtered (level + 8, stream);
+// OBSOLETE 			      chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
+// OBSOLETE 					  TYPE_FIELD_NAME (variant_type, k),
+// OBSOLETE 						stream, show - 1, level + 8);
+// OBSOLETE 			      if (k < (var_len - 1))
+// OBSOLETE 				fputs_filtered (",", stream);
+// OBSOLETE 			      fputs_filtered ("\n", stream);
+// OBSOLETE 			    }
+// OBSOLETE 			}
+// OBSOLETE 		      print_spaces_filtered (level + 4, stream);
+// OBSOLETE 		      fputs_filtered ("ESAC", stream);
+// OBSOLETE 		    }
+// OBSOLETE 		  else
+// OBSOLETE 		    chill_print_type (field_type,
+// OBSOLETE 				      TYPE_FIELD_NAME (type, i),
+// OBSOLETE 				      stream, show - 1, level + 4);
+// OBSOLETE 		  if (i < (len - 1))
+// OBSOLETE 		    {
+// OBSOLETE 		      fputs_filtered (",", stream);
+// OBSOLETE 		    }
+// OBSOLETE 		  fputs_filtered ("\n", stream);
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	  fprintfi_filtered (level, stream, ")");
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_RANGE:
+// OBSOLETE       {
+// OBSOLETE 	struct type *target = TYPE_TARGET_TYPE (type);
+// OBSOLETE 	if (target && TYPE_NAME (target))
+// OBSOLETE 	  fputs_filtered (TYPE_NAME (target), stream);
+// OBSOLETE 	else
+// OBSOLETE 	  fputs_filtered ("RANGE", stream);
+// OBSOLETE 	if (target == NULL)
+// OBSOLETE 	  target = builtin_type_long;
+// OBSOLETE 	fputs_filtered (" (", stream);
+// OBSOLETE 	print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
+// OBSOLETE 	fputs_filtered (":", stream);
+// OBSOLETE 	print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
+// OBSOLETE 	fputs_filtered (")", stream);
+// OBSOLETE       }
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_ENUM:
+// OBSOLETE       {
+// OBSOLETE 	register int lastval = 0;
+// OBSOLETE 	fprintf_filtered (stream, "SET (");
+// OBSOLETE 	len = TYPE_NFIELDS (type);
+// OBSOLETE 	for (i = 0; i < len; i++)
+// OBSOLETE 	  {
+// OBSOLETE 	    QUIT;
+// OBSOLETE 	    if (i)
+// OBSOLETE 	      fprintf_filtered (stream, ", ");
+// OBSOLETE 	    wrap_here ("    ");
+// OBSOLETE 	    fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
+// OBSOLETE 	    if (lastval != TYPE_FIELD_BITPOS (type, i))
+// OBSOLETE 	      {
+// OBSOLETE 		fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
+// OBSOLETE 		lastval = TYPE_FIELD_BITPOS (type, i);
+// OBSOLETE 	      }
+// OBSOLETE 	    lastval++;
+// OBSOLETE 	  }
+// OBSOLETE 	fprintf_filtered (stream, ")");
+// OBSOLETE       }
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_VOID:
+// OBSOLETE     case TYPE_CODE_UNDEF:
+// OBSOLETE     case TYPE_CODE_ERROR:
+// OBSOLETE     case TYPE_CODE_UNION:
+// OBSOLETE     case TYPE_CODE_METHOD:
+// OBSOLETE       error ("missing language support in chill_type_print_base");
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE 
+// OBSOLETE       /* Handle types not explicitly handled by the other cases,
+// OBSOLETE          such as fundamental types.  For these, just print whatever
+// OBSOLETE          the type name is, as recorded in the type itself.  If there
+// OBSOLETE          is no type name, then complain. */
+// OBSOLETE 
+// OBSOLETE       if (TYPE_NAME (type) != NULL)
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered (TYPE_NAME (type), stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  error ("Unrecognized type code (%d) in symbol table.",
+// OBSOLETE 		 TYPE_CODE (type));
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE }
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c
index 44b1c53..f2a35b3 100644
--- a/gdb/ch-valprint.c
+++ b/gdb/ch-valprint.c
@@ -1,605 +1,605 @@
-/* Support for printing Chill values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 2000, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "obstack.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "valprint.h"
-#include "expression.h"
-#include "value.h"
-#include "language.h"
-#include "demangle.h"
-#include "c-lang.h"		/* For c_val_print */
-#include "typeprint.h"
-#include "ch-lang.h"
-#include "annotate.h"
-
-static void chill_print_value_fields (struct type *, char *,
-				      struct ui_file *, int, int,
-				      enum val_prettyprint, struct type **);
-
-static void chill_print_type_scalar (struct type *, LONGEST,
-				     struct ui_file *);
-
-static void chill_val_print_array_elements (struct type *, char *,
-					    CORE_ADDR, struct ui_file *,
-					    int, int, int,
-					    enum val_prettyprint);
-
-
-/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
-   Used to print data from type structures in a specified type.  For example,
-   array bounds may be characters or booleans in some languages, and this
-   allows the ranges to be printed in their "natural" form rather than as
-   decimal integer values. */
-
-static void
-chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
-{
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_RANGE:
-      if (TYPE_TARGET_TYPE (type))
-	{
-	  chill_print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
-	  return;
-	}
-      break;
-    case TYPE_CODE_UNDEF:
-    case TYPE_CODE_PTR:
-    case TYPE_CODE_ARRAY:
-    case TYPE_CODE_STRUCT:
-    case TYPE_CODE_UNION:
-    case TYPE_CODE_ENUM:
-    case TYPE_CODE_FUNC:
-    case TYPE_CODE_INT:
-    case TYPE_CODE_FLT:
-    case TYPE_CODE_VOID:
-    case TYPE_CODE_SET:
-    case TYPE_CODE_STRING:
-    case TYPE_CODE_BITSTRING:
-    case TYPE_CODE_ERROR:
-    case TYPE_CODE_MEMBER:
-    case TYPE_CODE_METHOD:
-    case TYPE_CODE_REF:
-    case TYPE_CODE_CHAR:
-    case TYPE_CODE_BOOL:
-    case TYPE_CODE_COMPLEX:
-    case TYPE_CODE_TYPEDEF:
-    default:
-      break;
-    }
-  print_type_scalar (type, val, stream);
-}
-
-/* Print the elements of an array.
-   Similar to val_print_array_elements, but prints
-   element indexes (in Chill syntax). */
-
-static void
-chill_val_print_array_elements (struct type *type, char *valaddr,
-				CORE_ADDR address, struct ui_file *stream,
-				int format, int deref_ref, int recurse,
-				enum val_prettyprint pretty)
-{
-  unsigned int i = 0;
-  unsigned int things_printed = 0;
-  unsigned len;
-  struct type *elttype;
-  struct type *range_type = TYPE_FIELD_TYPE (type, 0);
-  struct type *index_type = TYPE_TARGET_TYPE (range_type);
-  unsigned eltlen;
-  /* Position of the array element we are examining to see
-     whether it is repeated.  */
-  unsigned int rep1;
-  /* Number of repetitions we have detected so far.  */
-  unsigned int reps;
-  LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
-
-  elttype = check_typedef (TYPE_TARGET_TYPE (type));
-  eltlen = TYPE_LENGTH (elttype);
-  len = TYPE_LENGTH (type) / eltlen;
-
-  annotate_array_section_begin (i, elttype);
-
-  for (; i < len && things_printed < print_max; i++)
-    {
-      if (i != 0)
-	{
-	  if (prettyprint_arrays)
-	    {
-	      fprintf_filtered (stream, ",\n");
-	      print_spaces_filtered (2 + 2 * recurse, stream);
-	    }
-	  else
-	    {
-	      fprintf_filtered (stream, ", ");
-	    }
-	}
-      wrap_here (n_spaces (2 + 2 * recurse));
-
-      rep1 = i + 1;
-      reps = 1;
-      while ((rep1 < len) &&
-	     !memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
-	{
-	  ++reps;
-	  ++rep1;
-	}
-
-      fputs_filtered ("(", stream);
-      chill_print_type_scalar (index_type, low_bound + i, stream);
-      if (reps > 1)
-	{
-	  fputs_filtered (":", stream);
-	  chill_print_type_scalar (index_type, low_bound + i + reps - 1,
-				   stream);
-	  fputs_filtered ("): ", stream);
-	  val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
-		     deref_ref, recurse + 1, pretty);
-
-	  i = rep1 - 1;
-	  things_printed += 1;
-	}
-      else
-	{
-	  fputs_filtered ("): ", stream);
-	  val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
-		     deref_ref, recurse + 1, pretty);
-	  annotate_elt ();
-	  things_printed++;
-	}
-    }
-  annotate_array_section_end ();
-  if (i < len)
-    {
-      fprintf_filtered (stream, "...");
-    }
-}
-
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
-   the inferior at address ADDRESS, onto stdio stream STREAM according to
-   FORMAT (a letter or 0 for natural format).  The data at VALADDR is in
-   target byte order.
-
-   If the data are a string pointer, returns the number of string characters
-   printed.
-
-   If DEREF_REF is nonzero, then dereference references, otherwise just print
-   them like pointers.
-
-   The PRETTY parameter controls prettyprinting.  */
-
-int
-chill_val_print (struct type *type, char *valaddr, int embedded_offset,
-		 CORE_ADDR address, struct ui_file *stream, int format,
-		 int deref_ref, int recurse, enum val_prettyprint pretty)
-{
-  LONGEST val;
-  unsigned int i = 0;		/* Number of characters printed.  */
-  struct type *elttype;
-  CORE_ADDR addr;
-
-  CHECK_TYPEDEF (type);
-
-  switch (TYPE_CODE (type))
-    {
-    case TYPE_CODE_ARRAY:
-      if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
-	{
-	  if (prettyprint_arrays)
-	    {
-	      print_spaces_filtered (2 + 2 * recurse, stream);
-	    }
-	  fprintf_filtered (stream, "[");
-	  chill_val_print_array_elements (type, valaddr, address, stream,
-					format, deref_ref, recurse, pretty);
-	  fprintf_filtered (stream, "]");
-	}
-      else
-	{
-	  error ("unimplemented in chill_val_print; unspecified array length");
-	}
-      break;
-
-    case TYPE_CODE_INT:
-      format = format ? format : output_format;
-      if (format)
-	{
-	  print_scalar_formatted (valaddr, type, format, 0, stream);
-	}
-      else
-	{
-	  val_print_type_code_int (type, valaddr, stream);
-	}
-      break;
-
-    case TYPE_CODE_CHAR:
-      format = format ? format : output_format;
-      if (format)
-	{
-	  print_scalar_formatted (valaddr, type, format, 0, stream);
-	}
-      else
-	{
-	  LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
-			 stream);
-	}
-      break;
-
-    case TYPE_CODE_FLT:
-      if (format)
-	{
-	  print_scalar_formatted (valaddr, type, format, 0, stream);
-	}
-      else
-	{
-	  print_floating (valaddr, type, stream);
-	}
-      break;
-
-    case TYPE_CODE_BOOL:
-      format = format ? format : output_format;
-      if (format)
-	{
-	  print_scalar_formatted (valaddr, type, format, 0, stream);
-	}
-      else
-	{
-	  /* FIXME: Why is this using builtin_type_chill_bool not type?  */
-	  val = unpack_long (builtin_type_chill_bool, valaddr);
-	  fprintf_filtered (stream, val ? "TRUE" : "FALSE");
-	}
-      break;
-
-    case TYPE_CODE_UNDEF:
-      /* This happens (without TYPE_FLAG_STUB set) on systems which don't use
-         dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
-         and no complete type for struct foo in that file.  */
-      fprintf_filtered (stream, "<incomplete type>");
-      break;
-
-    case TYPE_CODE_PTR:
-      if (format && format != 's')
-	{
-	  print_scalar_formatted (valaddr, type, format, 0, stream);
-	  break;
-	}
-      addr = unpack_pointer (type, valaddr);
-      elttype = check_typedef (TYPE_TARGET_TYPE (type));
-
-      /* We assume a NULL pointer is all zeros ... */
-      if (addr == 0)
-	{
-	  fputs_filtered ("NULL", stream);
-	  return 0;
-	}
-
-      if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
-	{
-	  /* Try to print what function it points to.  */
-	  print_address_demangle (addr, stream, demangle);
-	  /* Return value is irrelevant except for string pointers.  */
-	  return (0);
-	}
-      if (addressprint && format != 's')
-	{
-	  print_address_numeric (addr, 1, stream);
-	}
-
-      /* For a pointer to char or unsigned char, also print the string
-         pointed to, unless pointer is null.  */
-      if (TYPE_LENGTH (elttype) == 1
-	  && TYPE_CODE (elttype) == TYPE_CODE_CHAR
-	  && (format == 0 || format == 's')
-	  && addr != 0
-	  &&			/* If print_max is UINT_MAX, the alloca below will fail.
-				   In that case don't try to print the string.  */
-	  print_max < UINT_MAX)
-	i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
-
-      /* Return number of characters printed, plus one for the
-         terminating null if we have "reached the end".  */
-      return (i + (print_max && i != print_max));
-      break;
-
-    case TYPE_CODE_STRING:
-      i = TYPE_LENGTH (type);
-      LA_PRINT_STRING (stream, valaddr, i, 1, 0);
-      /* Return number of characters printed, plus one for the terminating
-         null if we have "reached the end".  */
-      return (i + (print_max && i != print_max));
-      break;
-
-    case TYPE_CODE_BITSTRING:
-    case TYPE_CODE_SET:
-      elttype = TYPE_INDEX_TYPE (type);
-      CHECK_TYPEDEF (elttype);
-      if (TYPE_STUB (elttype))
-	{
-	  fprintf_filtered (stream, "<incomplete type>");
-	  gdb_flush (stream);
-	  break;
-	}
-      {
-	struct type *range = elttype;
-	LONGEST low_bound, high_bound;
-	int i;
-	int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
-	int need_comma = 0;
-
-	if (is_bitstring)
-	  fputs_filtered ("B'", stream);
-	else
-	  fputs_filtered ("[", stream);
-
-	i = get_discrete_bounds (range, &low_bound, &high_bound);
-      maybe_bad_bstring:
-	if (i < 0)
-	  {
-	    fputs_filtered ("<error value>", stream);
-	    goto done;
-	  }
-
-	for (i = low_bound; i <= high_bound; i++)
-	  {
-	    int element = value_bit_index (type, valaddr, i);
-	    if (element < 0)
-	      {
-		i = element;
-		goto maybe_bad_bstring;
-	      }
-	    if (is_bitstring)
-	      fprintf_filtered (stream, "%d", element);
-	    else if (element)
-	      {
-		if (need_comma)
-		  fputs_filtered (", ", stream);
-		chill_print_type_scalar (range, (LONGEST) i, stream);
-		need_comma = 1;
-
-		/* Look for a continuous range of true elements. */
-		if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
-		  {
-		    int j = i;	/* j is the upper bound so far of the range */
-		    fputs_filtered (":", stream);
-		    while (i + 1 <= high_bound
-			   && value_bit_index (type, valaddr, ++i))
-		      j = i;
-		    chill_print_type_scalar (range, (LONGEST) j, stream);
-		  }
-	      }
-	  }
-      done:
-	if (is_bitstring)
-	  fputs_filtered ("'", stream);
-	else
-	  fputs_filtered ("]", stream);
-      }
-      break;
-
-    case TYPE_CODE_STRUCT:
-      if (chill_varying_type (type))
-	{
-	  struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
-	  long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
-	  char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
-
-	  switch (TYPE_CODE (inner))
-	    {
-	    case TYPE_CODE_STRING:
-	      if (length > TYPE_LENGTH (type) - 2)
-		{
-		  fprintf_filtered (stream,
-			"<dynamic length %ld > static length %d> *invalid*",
-				    length, TYPE_LENGTH (type));
-
-		  /* Don't print the string; doing so might produce a
-		     segfault.  */
-		  return length;
-		}
-	      LA_PRINT_STRING (stream, data_addr, length, 1, 0);
-	      return length;
-	    default:
-	      break;
-	    }
-	}
-      chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
-				0);
-      break;
-
-    case TYPE_CODE_REF:
-      if (addressprint)
-	{
-	  fprintf_filtered (stream, "LOC(");
-	  print_address_numeric
-	    (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
-	     1,
-	     stream);
-	  fprintf_filtered (stream, ")");
-	  if (deref_ref)
-	    fputs_filtered (": ", stream);
-	}
-      /* De-reference the reference.  */
-      if (deref_ref)
-	{
-	  if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
-	    {
-	      struct value *deref_val =
-	      value_at
-	      (TYPE_TARGET_TYPE (type),
-	       unpack_pointer (lookup_pointer_type (builtin_type_void),
-			       valaddr),
-	       NULL);
-	      val_print (VALUE_TYPE (deref_val),
-			 VALUE_CONTENTS (deref_val),
-			 0,
-			 VALUE_ADDRESS (deref_val), stream, format,
-			 deref_ref, recurse + 1, pretty);
-	    }
-	  else
-	    fputs_filtered ("???", stream);
-	}
-      break;
-
-    case TYPE_CODE_ENUM:
-      c_val_print (type, valaddr, 0, address, stream, format,
-		   deref_ref, recurse, pretty);
-      break;
-
-    case TYPE_CODE_RANGE:
-      if (TYPE_TARGET_TYPE (type))
-	chill_val_print (TYPE_TARGET_TYPE (type), valaddr, 0, address, stream,
-			 format, deref_ref, recurse, pretty);
-      break;
-
-    case TYPE_CODE_MEMBER:
-    case TYPE_CODE_UNION:
-    case TYPE_CODE_FUNC:
-    case TYPE_CODE_VOID:
-    case TYPE_CODE_ERROR:
-    default:
-      /* Let's defer printing to the C printer, rather than
-         print an error message.  FIXME! */
-      c_val_print (type, valaddr, 0, address, stream, format,
-		   deref_ref, recurse, pretty);
-    }
-  gdb_flush (stream);
-  return (0);
-}
-
-/* Mutually recursive subroutines of cplus_print_value and c_val_print to
-   print out a structure's fields: cp_print_value_fields and cplus_print_value.
-
-   TYPE, VALADDR, STREAM, RECURSE, and PRETTY have the
-   same meanings as in cplus_print_value and c_val_print.
-
-   DONT_PRINT is an array of baseclass types that we
-   should not print, or zero if called from top level.  */
-
-static void
-chill_print_value_fields (struct type *type, char *valaddr,
-			  struct ui_file *stream, int format, int recurse,
-			  enum val_prettyprint pretty, struct type **dont_print)
-{
-  int i, len;
-  int fields_seen = 0;
-
-  CHECK_TYPEDEF (type);
-
-  fprintf_filtered (stream, "[");
-  len = TYPE_NFIELDS (type);
-  if (len == 0)
-    {
-      fprintf_filtered (stream, "<No data fields>");
-    }
-  else
-    {
-      for (i = 0; i < len; i++)
-	{
-	  if (fields_seen)
-	    {
-	      fprintf_filtered (stream, ", ");
-	    }
-	  fields_seen = 1;
-	  if (pretty)
-	    {
-	      fprintf_filtered (stream, "\n");
-	      print_spaces_filtered (2 + 2 * recurse, stream);
-	    }
-	  else
-	    {
-	      wrap_here (n_spaces (2 + 2 * recurse));
-	    }
-	  fputs_filtered (".", stream);
-	  fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
-				   language_chill, DMGL_NO_OPTS);
-	  fputs_filtered (": ", stream);
-	  if (TYPE_FIELD_PACKED (type, i))
-	    {
-	      struct value *v;
-
-	      /* Bitfields require special handling, especially due to byte
-	         order problems.  */
-	      v = value_from_longest (TYPE_FIELD_TYPE (type, i),
-				   unpack_field_as_long (type, valaddr, i));
-
-	      chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
-			       stream, format, 0, recurse + 1, pretty);
-	    }
-	  else
-	    {
-	      chill_val_print (TYPE_FIELD_TYPE (type, i),
-			       valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
-			       0, stream, format, 0, recurse + 1, pretty);
-	    }
-	}
-      if (pretty)
-	{
-	  fprintf_filtered (stream, "\n");
-	  print_spaces_filtered (2 * recurse, stream);
-	}
-    }
-  fprintf_filtered (stream, "]");
-}
-
-int
-chill_value_print (struct value *val, struct ui_file *stream, int format,
-		   enum val_prettyprint pretty)
-{
-  struct type *type = VALUE_TYPE (val);
-  struct type *real_type = check_typedef (type);
-
-  /* If it is a pointer, indicate what it points to.
-
-     Print type also if it is a reference. */
-
-  if (TYPE_CODE (real_type) == TYPE_CODE_PTR ||
-      TYPE_CODE (real_type) == TYPE_CODE_REF)
-    {
-      char *valaddr = VALUE_CONTENTS (val);
-      CORE_ADDR addr = unpack_pointer (type, valaddr);
-      if (TYPE_CODE (type) != TYPE_CODE_PTR || addr != 0)
-	{
-	  int i;
-	  char *name = TYPE_NAME (type);
-	  if (name)
-	    fputs_filtered (name, stream);
-	  else if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
-	    fputs_filtered ("PTR", stream);
-	  else
-	    {
-	      fprintf_filtered (stream, "(");
-	      type_print (type, "", stream, -1);
-	      fprintf_filtered (stream, ")");
-	    }
-	  fprintf_filtered (stream, "(");
-	  i = val_print (type, valaddr, 0, VALUE_ADDRESS (val),
-			 stream, format, 1, 0, pretty);
-	  fprintf_filtered (stream, ")");
-	  return i;
-	}
-    }
-  return (val_print (type, VALUE_CONTENTS (val), 0,
-		     VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
-}
+// OBSOLETE /* Support for printing Chill values for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+// OBSOLETE    1998, 2000, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "valprint.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "demangle.h"
+// OBSOLETE #include "c-lang.h"		/* For c_val_print */
+// OBSOLETE #include "typeprint.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "annotate.h"
+// OBSOLETE 
+// OBSOLETE static void chill_print_value_fields (struct type *, char *,
+// OBSOLETE 				      struct ui_file *, int, int,
+// OBSOLETE 				      enum val_prettyprint, struct type **);
+// OBSOLETE 
+// OBSOLETE static void chill_print_type_scalar (struct type *, LONGEST,
+// OBSOLETE 				     struct ui_file *);
+// OBSOLETE 
+// OBSOLETE static void chill_val_print_array_elements (struct type *, char *,
+// OBSOLETE 					    CORE_ADDR, struct ui_file *,
+// OBSOLETE 					    int, int, int,
+// OBSOLETE 					    enum val_prettyprint);
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
+// OBSOLETE    Used to print data from type structures in a specified type.  For example,
+// OBSOLETE    array bounds may be characters or booleans in some languages, and this
+// OBSOLETE    allows the ranges to be printed in their "natural" form rather than as
+// OBSOLETE    decimal integer values. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
+// OBSOLETE {
+// OBSOLETE   switch (TYPE_CODE (type))
+// OBSOLETE     {
+// OBSOLETE     case TYPE_CODE_RANGE:
+// OBSOLETE       if (TYPE_TARGET_TYPE (type))
+// OBSOLETE 	{
+// OBSOLETE 	  chill_print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     case TYPE_CODE_UNDEF:
+// OBSOLETE     case TYPE_CODE_PTR:
+// OBSOLETE     case TYPE_CODE_ARRAY:
+// OBSOLETE     case TYPE_CODE_STRUCT:
+// OBSOLETE     case TYPE_CODE_UNION:
+// OBSOLETE     case TYPE_CODE_ENUM:
+// OBSOLETE     case TYPE_CODE_FUNC:
+// OBSOLETE     case TYPE_CODE_INT:
+// OBSOLETE     case TYPE_CODE_FLT:
+// OBSOLETE     case TYPE_CODE_VOID:
+// OBSOLETE     case TYPE_CODE_SET:
+// OBSOLETE     case TYPE_CODE_STRING:
+// OBSOLETE     case TYPE_CODE_BITSTRING:
+// OBSOLETE     case TYPE_CODE_ERROR:
+// OBSOLETE     case TYPE_CODE_MEMBER:
+// OBSOLETE     case TYPE_CODE_METHOD:
+// OBSOLETE     case TYPE_CODE_REF:
+// OBSOLETE     case TYPE_CODE_CHAR:
+// OBSOLETE     case TYPE_CODE_BOOL:
+// OBSOLETE     case TYPE_CODE_COMPLEX:
+// OBSOLETE     case TYPE_CODE_TYPEDEF:
+// OBSOLETE     default:
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   print_type_scalar (type, val, stream);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Print the elements of an array.
+// OBSOLETE    Similar to val_print_array_elements, but prints
+// OBSOLETE    element indexes (in Chill syntax). */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_val_print_array_elements (struct type *type, char *valaddr,
+// OBSOLETE 				CORE_ADDR address, struct ui_file *stream,
+// OBSOLETE 				int format, int deref_ref, int recurse,
+// OBSOLETE 				enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE   unsigned int i = 0;
+// OBSOLETE   unsigned int things_printed = 0;
+// OBSOLETE   unsigned len;
+// OBSOLETE   struct type *elttype;
+// OBSOLETE   struct type *range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE   struct type *index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE   unsigned eltlen;
+// OBSOLETE   /* Position of the array element we are examining to see
+// OBSOLETE      whether it is repeated.  */
+// OBSOLETE   unsigned int rep1;
+// OBSOLETE   /* Number of repetitions we have detected so far.  */
+// OBSOLETE   unsigned int reps;
+// OBSOLETE   LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
+// OBSOLETE 
+// OBSOLETE   elttype = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE   eltlen = TYPE_LENGTH (elttype);
+// OBSOLETE   len = TYPE_LENGTH (type) / eltlen;
+// OBSOLETE 
+// OBSOLETE   annotate_array_section_begin (i, elttype);
+// OBSOLETE 
+// OBSOLETE   for (; i < len && things_printed < print_max; i++)
+// OBSOLETE     {
+// OBSOLETE       if (i != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  if (prettyprint_arrays)
+// OBSOLETE 	    {
+// OBSOLETE 	      fprintf_filtered (stream, ",\n");
+// OBSOLETE 	      print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      fprintf_filtered (stream, ", ");
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       wrap_here (n_spaces (2 + 2 * recurse));
+// OBSOLETE 
+// OBSOLETE       rep1 = i + 1;
+// OBSOLETE       reps = 1;
+// OBSOLETE       while ((rep1 < len) &&
+// OBSOLETE 	     !memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
+// OBSOLETE 	{
+// OBSOLETE 	  ++reps;
+// OBSOLETE 	  ++rep1;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       fputs_filtered ("(", stream);
+// OBSOLETE       chill_print_type_scalar (index_type, low_bound + i, stream);
+// OBSOLETE       if (reps > 1)
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered (":", stream);
+// OBSOLETE 	  chill_print_type_scalar (index_type, low_bound + i + reps - 1,
+// OBSOLETE 				   stream);
+// OBSOLETE 	  fputs_filtered ("): ", stream);
+// OBSOLETE 	  val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
+// OBSOLETE 		     deref_ref, recurse + 1, pretty);
+// OBSOLETE 
+// OBSOLETE 	  i = rep1 - 1;
+// OBSOLETE 	  things_printed += 1;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered ("): ", stream);
+// OBSOLETE 	  val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
+// OBSOLETE 		     deref_ref, recurse + 1, pretty);
+// OBSOLETE 	  annotate_elt ();
+// OBSOLETE 	  things_printed++;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   annotate_array_section_end ();
+// OBSOLETE   if (i < len)
+// OBSOLETE     {
+// OBSOLETE       fprintf_filtered (stream, "...");
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Print data of type TYPE located at VALADDR (within GDB), which came from
+// OBSOLETE    the inferior at address ADDRESS, onto stdio stream STREAM according to
+// OBSOLETE    FORMAT (a letter or 0 for natural format).  The data at VALADDR is in
+// OBSOLETE    target byte order.
+// OBSOLETE 
+// OBSOLETE    If the data are a string pointer, returns the number of string characters
+// OBSOLETE    printed.
+// OBSOLETE 
+// OBSOLETE    If DEREF_REF is nonzero, then dereference references, otherwise just print
+// OBSOLETE    them like pointers.
+// OBSOLETE 
+// OBSOLETE    The PRETTY parameter controls prettyprinting.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE chill_val_print (struct type *type, char *valaddr, int embedded_offset,
+// OBSOLETE 		 CORE_ADDR address, struct ui_file *stream, int format,
+// OBSOLETE 		 int deref_ref, int recurse, enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE   LONGEST val;
+// OBSOLETE   unsigned int i = 0;		/* Number of characters printed.  */
+// OBSOLETE   struct type *elttype;
+// OBSOLETE   CORE_ADDR addr;
+// OBSOLETE 
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE 
+// OBSOLETE   switch (TYPE_CODE (type))
+// OBSOLETE     {
+// OBSOLETE     case TYPE_CODE_ARRAY:
+// OBSOLETE       if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
+// OBSOLETE 	{
+// OBSOLETE 	  if (prettyprint_arrays)
+// OBSOLETE 	    {
+// OBSOLETE 	      print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE 	    }
+// OBSOLETE 	  fprintf_filtered (stream, "[");
+// OBSOLETE 	  chill_val_print_array_elements (type, valaddr, address, stream,
+// OBSOLETE 					format, deref_ref, recurse, pretty);
+// OBSOLETE 	  fprintf_filtered (stream, "]");
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  error ("unimplemented in chill_val_print; unspecified array length");
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_INT:
+// OBSOLETE       format = format ? format : output_format;
+// OBSOLETE       if (format)
+// OBSOLETE 	{
+// OBSOLETE 	  print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  val_print_type_code_int (type, valaddr, stream);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_CHAR:
+// OBSOLETE       format = format ? format : output_format;
+// OBSOLETE       if (format)
+// OBSOLETE 	{
+// OBSOLETE 	  print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
+// OBSOLETE 			 stream);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_FLT:
+// OBSOLETE       if (format)
+// OBSOLETE 	{
+// OBSOLETE 	  print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  print_floating (valaddr, type, stream);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_BOOL:
+// OBSOLETE       format = format ? format : output_format;
+// OBSOLETE       if (format)
+// OBSOLETE 	{
+// OBSOLETE 	  print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* FIXME: Why is this using builtin_type_chill_bool not type?  */
+// OBSOLETE 	  val = unpack_long (builtin_type_chill_bool, valaddr);
+// OBSOLETE 	  fprintf_filtered (stream, val ? "TRUE" : "FALSE");
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_UNDEF:
+// OBSOLETE       /* This happens (without TYPE_FLAG_STUB set) on systems which don't use
+// OBSOLETE          dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
+// OBSOLETE          and no complete type for struct foo in that file.  */
+// OBSOLETE       fprintf_filtered (stream, "<incomplete type>");
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_PTR:
+// OBSOLETE       if (format && format != 's')
+// OBSOLETE 	{
+// OBSOLETE 	  print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       addr = unpack_pointer (type, valaddr);
+// OBSOLETE       elttype = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE 
+// OBSOLETE       /* We assume a NULL pointer is all zeros ... */
+// OBSOLETE       if (addr == 0)
+// OBSOLETE 	{
+// OBSOLETE 	  fputs_filtered ("NULL", stream);
+// OBSOLETE 	  return 0;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
+// OBSOLETE 	{
+// OBSOLETE 	  /* Try to print what function it points to.  */
+// OBSOLETE 	  print_address_demangle (addr, stream, demangle);
+// OBSOLETE 	  /* Return value is irrelevant except for string pointers.  */
+// OBSOLETE 	  return (0);
+// OBSOLETE 	}
+// OBSOLETE       if (addressprint && format != 's')
+// OBSOLETE 	{
+// OBSOLETE 	  print_address_numeric (addr, 1, stream);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       /* For a pointer to char or unsigned char, also print the string
+// OBSOLETE          pointed to, unless pointer is null.  */
+// OBSOLETE       if (TYPE_LENGTH (elttype) == 1
+// OBSOLETE 	  && TYPE_CODE (elttype) == TYPE_CODE_CHAR
+// OBSOLETE 	  && (format == 0 || format == 's')
+// OBSOLETE 	  && addr != 0
+// OBSOLETE 	  &&			/* If print_max is UINT_MAX, the alloca below will fail.
+// OBSOLETE 				   In that case don't try to print the string.  */
+// OBSOLETE 	  print_max < UINT_MAX)
+// OBSOLETE 	i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
+// OBSOLETE 
+// OBSOLETE       /* Return number of characters printed, plus one for the
+// OBSOLETE          terminating null if we have "reached the end".  */
+// OBSOLETE       return (i + (print_max && i != print_max));
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_STRING:
+// OBSOLETE       i = TYPE_LENGTH (type);
+// OBSOLETE       LA_PRINT_STRING (stream, valaddr, i, 1, 0);
+// OBSOLETE       /* Return number of characters printed, plus one for the terminating
+// OBSOLETE          null if we have "reached the end".  */
+// OBSOLETE       return (i + (print_max && i != print_max));
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_BITSTRING:
+// OBSOLETE     case TYPE_CODE_SET:
+// OBSOLETE       elttype = TYPE_INDEX_TYPE (type);
+// OBSOLETE       CHECK_TYPEDEF (elttype);
+// OBSOLETE       if (TYPE_STUB (elttype))
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_filtered (stream, "<incomplete type>");
+// OBSOLETE 	  gdb_flush (stream);
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       {
+// OBSOLETE 	struct type *range = elttype;
+// OBSOLETE 	LONGEST low_bound, high_bound;
+// OBSOLETE 	int i;
+// OBSOLETE 	int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
+// OBSOLETE 	int need_comma = 0;
+// OBSOLETE 
+// OBSOLETE 	if (is_bitstring)
+// OBSOLETE 	  fputs_filtered ("B'", stream);
+// OBSOLETE 	else
+// OBSOLETE 	  fputs_filtered ("[", stream);
+// OBSOLETE 
+// OBSOLETE 	i = get_discrete_bounds (range, &low_bound, &high_bound);
+// OBSOLETE       maybe_bad_bstring:
+// OBSOLETE 	if (i < 0)
+// OBSOLETE 	  {
+// OBSOLETE 	    fputs_filtered ("<error value>", stream);
+// OBSOLETE 	    goto done;
+// OBSOLETE 	  }
+// OBSOLETE 
+// OBSOLETE 	for (i = low_bound; i <= high_bound; i++)
+// OBSOLETE 	  {
+// OBSOLETE 	    int element = value_bit_index (type, valaddr, i);
+// OBSOLETE 	    if (element < 0)
+// OBSOLETE 	      {
+// OBSOLETE 		i = element;
+// OBSOLETE 		goto maybe_bad_bstring;
+// OBSOLETE 	      }
+// OBSOLETE 	    if (is_bitstring)
+// OBSOLETE 	      fprintf_filtered (stream, "%d", element);
+// OBSOLETE 	    else if (element)
+// OBSOLETE 	      {
+// OBSOLETE 		if (need_comma)
+// OBSOLETE 		  fputs_filtered (", ", stream);
+// OBSOLETE 		chill_print_type_scalar (range, (LONGEST) i, stream);
+// OBSOLETE 		need_comma = 1;
+// OBSOLETE 
+// OBSOLETE 		/* Look for a continuous range of true elements. */
+// OBSOLETE 		if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
+// OBSOLETE 		  {
+// OBSOLETE 		    int j = i;	/* j is the upper bound so far of the range */
+// OBSOLETE 		    fputs_filtered (":", stream);
+// OBSOLETE 		    while (i + 1 <= high_bound
+// OBSOLETE 			   && value_bit_index (type, valaddr, ++i))
+// OBSOLETE 		      j = i;
+// OBSOLETE 		    chill_print_type_scalar (range, (LONGEST) j, stream);
+// OBSOLETE 		  }
+// OBSOLETE 	      }
+// OBSOLETE 	  }
+// OBSOLETE       done:
+// OBSOLETE 	if (is_bitstring)
+// OBSOLETE 	  fputs_filtered ("'", stream);
+// OBSOLETE 	else
+// OBSOLETE 	  fputs_filtered ("]", stream);
+// OBSOLETE       }
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_STRUCT:
+// OBSOLETE       if (chill_varying_type (type))
+// OBSOLETE 	{
+// OBSOLETE 	  struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
+// OBSOLETE 	  long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
+// OBSOLETE 	  char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
+// OBSOLETE 
+// OBSOLETE 	  switch (TYPE_CODE (inner))
+// OBSOLETE 	    {
+// OBSOLETE 	    case TYPE_CODE_STRING:
+// OBSOLETE 	      if (length > TYPE_LENGTH (type) - 2)
+// OBSOLETE 		{
+// OBSOLETE 		  fprintf_filtered (stream,
+// OBSOLETE 			"<dynamic length %ld > static length %d> *invalid*",
+// OBSOLETE 				    length, TYPE_LENGTH (type));
+// OBSOLETE 
+// OBSOLETE 		  /* Don't print the string; doing so might produce a
+// OBSOLETE 		     segfault.  */
+// OBSOLETE 		  return length;
+// OBSOLETE 		}
+// OBSOLETE 	      LA_PRINT_STRING (stream, data_addr, length, 1, 0);
+// OBSOLETE 	      return length;
+// OBSOLETE 	    default:
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
+// OBSOLETE 				0);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_REF:
+// OBSOLETE       if (addressprint)
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_filtered (stream, "LOC(");
+// OBSOLETE 	  print_address_numeric
+// OBSOLETE 	    (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
+// OBSOLETE 	     1,
+// OBSOLETE 	     stream);
+// OBSOLETE 	  fprintf_filtered (stream, ")");
+// OBSOLETE 	  if (deref_ref)
+// OBSOLETE 	    fputs_filtered (": ", stream);
+// OBSOLETE 	}
+// OBSOLETE       /* De-reference the reference.  */
+// OBSOLETE       if (deref_ref)
+// OBSOLETE 	{
+// OBSOLETE 	  if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
+// OBSOLETE 	    {
+// OBSOLETE 	      struct value *deref_val =
+// OBSOLETE 	      value_at
+// OBSOLETE 	      (TYPE_TARGET_TYPE (type),
+// OBSOLETE 	       unpack_pointer (lookup_pointer_type (builtin_type_void),
+// OBSOLETE 			       valaddr),
+// OBSOLETE 	       NULL);
+// OBSOLETE 	      val_print (VALUE_TYPE (deref_val),
+// OBSOLETE 			 VALUE_CONTENTS (deref_val),
+// OBSOLETE 			 0,
+// OBSOLETE 			 VALUE_ADDRESS (deref_val), stream, format,
+// OBSOLETE 			 deref_ref, recurse + 1, pretty);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    fputs_filtered ("???", stream);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_ENUM:
+// OBSOLETE       c_val_print (type, valaddr, 0, address, stream, format,
+// OBSOLETE 		   deref_ref, recurse, pretty);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_RANGE:
+// OBSOLETE       if (TYPE_TARGET_TYPE (type))
+// OBSOLETE 	chill_val_print (TYPE_TARGET_TYPE (type), valaddr, 0, address, stream,
+// OBSOLETE 			 format, deref_ref, recurse, pretty);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case TYPE_CODE_MEMBER:
+// OBSOLETE     case TYPE_CODE_UNION:
+// OBSOLETE     case TYPE_CODE_FUNC:
+// OBSOLETE     case TYPE_CODE_VOID:
+// OBSOLETE     case TYPE_CODE_ERROR:
+// OBSOLETE     default:
+// OBSOLETE       /* Let's defer printing to the C printer, rather than
+// OBSOLETE          print an error message.  FIXME! */
+// OBSOLETE       c_val_print (type, valaddr, 0, address, stream, format,
+// OBSOLETE 		   deref_ref, recurse, pretty);
+// OBSOLETE     }
+// OBSOLETE   gdb_flush (stream);
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Mutually recursive subroutines of cplus_print_value and c_val_print to
+// OBSOLETE    print out a structure's fields: cp_print_value_fields and cplus_print_value.
+// OBSOLETE 
+// OBSOLETE    TYPE, VALADDR, STREAM, RECURSE, and PRETTY have the
+// OBSOLETE    same meanings as in cplus_print_value and c_val_print.
+// OBSOLETE 
+// OBSOLETE    DONT_PRINT is an array of baseclass types that we
+// OBSOLETE    should not print, or zero if called from top level.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE chill_print_value_fields (struct type *type, char *valaddr,
+// OBSOLETE 			  struct ui_file *stream, int format, int recurse,
+// OBSOLETE 			  enum val_prettyprint pretty, struct type **dont_print)
+// OBSOLETE {
+// OBSOLETE   int i, len;
+// OBSOLETE   int fields_seen = 0;
+// OBSOLETE 
+// OBSOLETE   CHECK_TYPEDEF (type);
+// OBSOLETE 
+// OBSOLETE   fprintf_filtered (stream, "[");
+// OBSOLETE   len = TYPE_NFIELDS (type);
+// OBSOLETE   if (len == 0)
+// OBSOLETE     {
+// OBSOLETE       fprintf_filtered (stream, "<No data fields>");
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       for (i = 0; i < len; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  if (fields_seen)
+// OBSOLETE 	    {
+// OBSOLETE 	      fprintf_filtered (stream, ", ");
+// OBSOLETE 	    }
+// OBSOLETE 	  fields_seen = 1;
+// OBSOLETE 	  if (pretty)
+// OBSOLETE 	    {
+// OBSOLETE 	      fprintf_filtered (stream, "\n");
+// OBSOLETE 	      print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      wrap_here (n_spaces (2 + 2 * recurse));
+// OBSOLETE 	    }
+// OBSOLETE 	  fputs_filtered (".", stream);
+// OBSOLETE 	  fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+// OBSOLETE 				   language_chill, DMGL_NO_OPTS);
+// OBSOLETE 	  fputs_filtered (": ", stream);
+// OBSOLETE 	  if (TYPE_FIELD_PACKED (type, i))
+// OBSOLETE 	    {
+// OBSOLETE 	      struct value *v;
+// OBSOLETE 
+// OBSOLETE 	      /* Bitfields require special handling, especially due to byte
+// OBSOLETE 	         order problems.  */
+// OBSOLETE 	      v = value_from_longest (TYPE_FIELD_TYPE (type, i),
+// OBSOLETE 				   unpack_field_as_long (type, valaddr, i));
+// OBSOLETE 
+// OBSOLETE 	      chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
+// OBSOLETE 			       stream, format, 0, recurse + 1, pretty);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      chill_val_print (TYPE_FIELD_TYPE (type, i),
+// OBSOLETE 			       valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
+// OBSOLETE 			       0, stream, format, 0, recurse + 1, pretty);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       if (pretty)
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_filtered (stream, "\n");
+// OBSOLETE 	  print_spaces_filtered (2 * recurse, stream);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   fprintf_filtered (stream, "]");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE chill_value_print (struct value *val, struct ui_file *stream, int format,
+// OBSOLETE 		   enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE   struct type *type = VALUE_TYPE (val);
+// OBSOLETE   struct type *real_type = check_typedef (type);
+// OBSOLETE 
+// OBSOLETE   /* If it is a pointer, indicate what it points to.
+// OBSOLETE 
+// OBSOLETE      Print type also if it is a reference. */
+// OBSOLETE 
+// OBSOLETE   if (TYPE_CODE (real_type) == TYPE_CODE_PTR ||
+// OBSOLETE       TYPE_CODE (real_type) == TYPE_CODE_REF)
+// OBSOLETE     {
+// OBSOLETE       char *valaddr = VALUE_CONTENTS (val);
+// OBSOLETE       CORE_ADDR addr = unpack_pointer (type, valaddr);
+// OBSOLETE       if (TYPE_CODE (type) != TYPE_CODE_PTR || addr != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  int i;
+// OBSOLETE 	  char *name = TYPE_NAME (type);
+// OBSOLETE 	  if (name)
+// OBSOLETE 	    fputs_filtered (name, stream);
+// OBSOLETE 	  else if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
+// OBSOLETE 	    fputs_filtered ("PTR", stream);
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      fprintf_filtered (stream, "(");
+// OBSOLETE 	      type_print (type, "", stream, -1);
+// OBSOLETE 	      fprintf_filtered (stream, ")");
+// OBSOLETE 	    }
+// OBSOLETE 	  fprintf_filtered (stream, "(");
+// OBSOLETE 	  i = val_print (type, valaddr, 0, VALUE_ADDRESS (val),
+// OBSOLETE 			 stream, format, 1, 0, pretty);
+// OBSOLETE 	  fprintf_filtered (stream, ")");
+// OBSOLETE 	  return i;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   return (val_print (type, VALUE_CONTENTS (val), 0,
+// OBSOLETE 		     VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
+// OBSOLETE }
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index bcd9a42..799e1f4 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -24,6 +24,7 @@
 #include "target.h"	 /* For baud_rate, remote_debug and remote_timeout */
 #include "gdb_wait.h"		/* For shell escape implementation */
 #include "gdb_regex.h"		/* Used by apropos_command */
+#include "gdb_string.h"
 #include "filenames.h"		/* for DOSish file names */
 
 #include "ui-out.h"
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 3f510ac..bce0c2d 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -22,6 +22,7 @@
 #include "symtab.h"
 #include <ctype.h>
 #include "gdb_regex.h"
+#include "gdb_string.h"
 
 #include "ui-out.h"
 
@@ -53,8 +54,7 @@
 }
 
 void
-set_cmd_cfunc (struct cmd_list_element *cmd,
-	       void (*cfunc) (char *args, int from_tty))
+set_cmd_cfunc (struct cmd_list_element *cmd, cmd_cfunc_ftype *cfunc)
 {
   if (cfunc == NULL)
     cmd->func = NULL;
@@ -70,9 +70,7 @@
 }
 
 void
-set_cmd_sfunc (struct cmd_list_element *cmd,
-	       void (*sfunc) (char *args, int from_tty,
-			      struct cmd_list_element * c))
+set_cmd_sfunc (struct cmd_list_element *cmd, cmd_sfunc_ftype *sfunc)
 {
   if (sfunc == NULL)
     cmd->func = NULL;
@@ -328,6 +326,61 @@
   return c;
 }
 
+/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
+   CLASS is as in add_cmd.  VAR_TYPE is the kind of thing we are
+   setting.  VAR is address of the variable being controlled by this
+   command.  SET_FUNC and SHOW_FUNC are the callback functions (if
+   non-NULL).  SET_DOC and SHOW_DOC are the documentation strings.
+   SET_RESULT and SHOW_RESULT, if not NULL, are set to the resulting
+   command structures.  */
+
+void
+add_setshow_cmd_full (char *name,
+		      enum command_class class,
+		      var_types var_type, void *var,
+		      char *set_doc, char *show_doc,
+		      cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
+		      struct cmd_list_element **set_list,
+		      struct cmd_list_element **show_list,
+		      struct cmd_list_element **set_result,
+		      struct cmd_list_element **show_result)
+{
+  struct cmd_list_element *set;
+  struct cmd_list_element *show;
+  set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
+			     set_doc, set_list);
+  if (set_func != NULL)
+    set_cmd_sfunc (set, set_func);
+  show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+			      show_doc, show_list);
+  if (show_func != NULL)
+    set_cmd_sfunc (show, show_func);
+
+  if (set_result != NULL)
+    *set_result = set;
+  if (show_result != NULL)
+    *show_result = show;
+}
+
+/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
+   CLASS is as in add_cmd.  VAR_TYPE is the kind of thing we are
+   setting.  VAR is address of the variable being controlled by this
+   command.  SET_FUNC and SHOW_FUNC are the callback functions (if
+   non-NULL).  SET_DOC and SHOW_DOC are the documentation strings.  */
+
+void
+add_setshow_cmd (char *name,
+		 enum command_class class,
+		 var_types var_type, void *var,
+		 char *set_doc, char *show_doc,
+		 cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
+		 struct cmd_list_element **set_list,
+		 struct cmd_list_element **show_list)
+{
+  add_setshow_cmd_full (name, class, var_type, var, set_doc, show_doc,
+			set_func, show_func, set_list, show_list,
+			NULL, NULL);
+}
 
 struct cmd_list_element *
 add_set_cmd (char *name,
@@ -363,49 +416,57 @@
   return c;
 }
 
-/* Add element named NAME to command list LIST (the list for set
-   or some sublist thereof).
-   CLASS is as in add_cmd.
-   VAR is address of the variable which will contain the value.
-   DOC is the documentation string.  */
-struct cmd_list_element *
-add_set_auto_boolean_cmd (char *name,
-			  enum command_class class,
-			  enum cmd_auto_boolean *var,
-			  char *doc,
-			  struct cmd_list_element **list)
+/* Add an auto-boolean command named NAME to both the set and show
+   command list lists.  CLASS is as in add_cmd.  VAR is address of the
+   variable which will contain the value.  DOC is the documentation
+   string.  FUNC is the corresponding callback.  */
+void
+add_setshow_auto_boolean_cmd (char *name,
+			      enum command_class class,
+			      enum auto_boolean *var,
+			      char *set_doc, char *show_doc,
+			      cmd_sfunc_ftype *set_func,
+			      cmd_sfunc_ftype *show_func,
+			      struct cmd_list_element **set_list,
+			      struct cmd_list_element **show_list)
 {
   static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
   struct cmd_list_element *c;
-  c = add_set_cmd (name, class, var_auto_boolean, var, doc, list);
+  add_setshow_cmd_full (name, class, var_auto_boolean, var,
+			set_doc, show_doc, set_func, show_func,
+			set_list, show_list,
+			&c, NULL);
   c->enums = auto_boolean_enums;
-  return c;
 }
 
-/* Add element named NAME to command list LIST (the list for set
-   or some sublist thereof).
-   CLASS is as in add_cmd.
-   VAR is address of the variable which will contain the value.
-   DOC is the documentation string.  */
-struct cmd_list_element *
-add_set_boolean_cmd (char *name,
-		     enum command_class class,
-		     int *var,
-		     char *doc,
-		     struct cmd_list_element **list)
+/* Add element named NAME to both the set and show command LISTs (the
+   list for set/show or some sublist thereof).  CLASS is as in
+   add_cmd.  VAR is address of the variable which will contain the
+   value.  SET_DOC and SHOW_DOR are the documentation strings.  */
+void
+add_setshow_boolean_cmd (char *name,
+			 enum command_class class,
+			 int *var, char *set_doc, char *show_doc,
+			 cmd_sfunc_ftype *set_func,
+			 cmd_sfunc_ftype *show_func,
+			 struct cmd_list_element **set_list,
+			 struct cmd_list_element **show_list)
 {
   static const char *boolean_enums[] = { "on", "off", NULL };
   struct cmd_list_element *c;
-  c = add_set_cmd (name, class, var_boolean, var, doc, list);
+  add_setshow_cmd_full (name, class, var_boolean, var,
+			set_doc, show_doc,
+			set_func, show_func,
+			set_list, show_list,
+			&c, NULL);
   c->enums = boolean_enums;
-  return c;
 }
 
 /* Where SETCMD has already been added, add the corresponding show
    command to LIST and return a pointer to the added command (not
    necessarily the head of LIST).  */
 /* NOTE: cagney/2002-03-17: The original version of add_show_from_set
-   used memcpy() to clone `set' into `show'.  This ment that in
+   used memcpy() to clone `set' into `show'.  This meant that in
    addition to all the needed fields (var, name, et.al.) some
    unnecessary fields were copied (namely the callback function).  The
    function explictly copies relevant fields.  For a `set' and `show'
@@ -1445,3 +1506,23 @@
   return matchlist;
 }
 
+
+/* check function pointer */
+int
+cmd_func_p (struct cmd_list_element *cmd)
+{
+  return (cmd->func != NULL);
+}
+
+
+/* call the command function */
+void
+cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
+{
+  if (cmd_func_p (cmd))
+    (*cmd->func) (cmd, args, from_tty);
+  else
+    error ("Invalid command");
+}
+
+
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index 72436f0..e8563ff 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -69,12 +69,11 @@
        to one of the below.  */
     union
       {
-	/* If type is not_set_cmd, call it like this:  */
-	void (*cfunc) (char *args, int from_tty);
-
-	/* If type is set_cmd or show_cmd, first set the variables, and
-	   then call this.  */
-	void (*sfunc) (char *args, int from_tty, struct cmd_list_element * c);
+	/* If type is not_set_cmd, call it like this: */
+	cmd_cfunc_ftype *cfunc;
+	/* If type is set_cmd or show_cmd, first set the variables,
+	   and then call this: */
+	cmd_sfunc_ftype *sfunc;
       }
     function;
 
@@ -294,18 +293,6 @@
 						  char *doc,
 						  struct cmd_list_element **list);
 
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
-							  enum command_class class,
-							  enum cmd_auto_boolean *var,
-							  char *doc,
-							  struct cmd_list_element **list);
-
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
-						     enum command_class class,
-						     int *var,
-						     char *doc,
-						     struct cmd_list_element **list);
-
 extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
 						   struct cmd_list_element
 						   **);
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 36c1d2d..a648093 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -360,61 +360,61 @@
 static void
 dump_srec_memory (char *args, int from_tty)
 {
-  dump_memory_to_file (args, "w", "srec");
+  dump_memory_to_file (args, FOPEN_WB, "srec");
 }
 
 static void
 dump_srec_value (char *args, int from_tty)
 {
-  dump_value_to_file (args, "w", "srec");
+  dump_value_to_file (args, FOPEN_WB, "srec");
 }
 
 static void
 dump_ihex_memory (char *args, int from_tty)
 {
-  dump_memory_to_file (args, "w", "ihex");
+  dump_memory_to_file (args, FOPEN_WB, "ihex");
 }
 
 static void
 dump_ihex_value (char *args, int from_tty)
 {
-  dump_value_to_file (args, "w", "ihex");
+  dump_value_to_file (args, FOPEN_WB, "ihex");
 }
 
 static void
 dump_tekhex_memory (char *args, int from_tty)
 {
-  dump_memory_to_file (args, "w", "tekhex");
+  dump_memory_to_file (args, FOPEN_WB, "tekhex");
 }
 
 static void
 dump_tekhex_value (char *args, int from_tty)
 {
-  dump_value_to_file (args, "w", "tekhex");
+  dump_value_to_file (args, FOPEN_WB, "tekhex");
 }
 
 static void
 dump_binary_memory (char *args, int from_tty)
 {
-  dump_memory_to_file (args, "w", "binary");
+  dump_memory_to_file (args, FOPEN_WB, "binary");
 }
 
 static void
 dump_binary_value (char *args, int from_tty)
 {
-  dump_value_to_file (args, "w", "binary");
+  dump_value_to_file (args, FOPEN_WB, "binary");
 }
 
 static void
 append_binary_memory (char *args, int from_tty)
 {
-  dump_memory_to_file (args, "a", "binary");
+  dump_memory_to_file (args, FOPEN_AB, "binary");
 }
 
 static void
 append_binary_value (char *args, int from_tty)
 {
-  dump_value_to_file (args, "a", "binary");
+  dump_value_to_file (args, FOPEN_AB, "binary");
 }
 
 struct dump_context
@@ -442,7 +442,7 @@
   c->completer =  filename_completer;
   d = XMALLOC (struct dump_context);
   d->func = func;
-  d->mode = "w";
+  d->mode = FOPEN_WB;
   set_cmd_context (c, d);
   c->func = call_dump_func;
 
@@ -450,7 +450,7 @@
   c->completer =  filename_completer;
   d = XMALLOC (struct dump_context);
   d->func = func;
-  d->mode = "a";
+  d->mode = FOPEN_AB;
   set_cmd_context (c, d);
   c->func = call_dump_func;
 
@@ -547,7 +547,7 @@
 static void
 restore_binary_file (char *filename, struct callback_data *data)
 {
-  FILE *file = fopen_with_cleanup (filename, "r");
+  FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
   int status;
   char *buf;
   long len;
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
deleted file mode 100644
index db66492..0000000
--- a/gdb/cli/cli-interp.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* CLI Definitions for GDB
-   Copyright 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "interps.h"
-#include "wrapper.h"
-#include "event-top.h"
-#include "ui-out.h"
-#include "cli-out.h"
-
-/* Prototypes for the CLI Interpreter functions */
-
-int cli_interpreter_init (void *data);
-int cli_interpreter_resume (void *data);
-int cli_interpreter_do_one_event (void *data);
-int cli_interpreter_suspend (void *data);
-int cli_interpreter_delete (void *data);
-int cli_interpreter_exec (void *data, char *command_str);
-int cli_interpreter_display_prompt (void *data, char *new_prompt);
-
-/* These are the ui_out and the interpreter for the console interpreter. */
-struct ui_out *cli_uiout;
-struct gdb_interpreter *cli_interp;
-
-/* These implement the cli out interpreter: */
-
-int
-cli_interpreter_init (void *data)
-{
-  return 1;
-}
-
-int
-cli_interpreter_resume (void *data)
-{
-  /*sync_execution = 1;*/
-  gdb_setup_readline ();
-  return 1;
-}
-
-int
-cli_interpreter_do_one_event (void *data)
-{
-  return 1;
-}
-
-int
-cli_interpreter_suspend (void *data)
-{
-  gdb_disable_readline ();
-  return 1;
-}
-
-int
-cli_interpreter_delete (void *data)
-{
-  return 1;
-}
-
-int
-cli_interpreter_display_prompt (void *data, char *new_prompt)
-{
-  if (gdb_interpreter_is_quiet (NULL))
-    {
-      return 1;
-    }
-  else
-    {
-      return 0;
-    }
-}
-
-int
-cli_interpreter_exec (void *data, char *command_str)
-{
-  return gdb_execute_command (uiout, command_str, 0);
-}
-
-/* standard gdb initialization hook */
-void
-_initialize_cli_interp (void)
-{
-  struct gdb_interpreter_procs procs = {
-    cli_interpreter_init,	/* init_proc */
-    cli_interpreter_resume,	/* resume_proc */
-    cli_interpreter_do_one_event, /* do_one_event_proc */
-    cli_interpreter_suspend,	/* suspend_proc */
-    cli_interpreter_delete,	/* delete_proc */
-    cli_interpreter_exec,	/* exec_proc */
-    cli_interpreter_display_prompt /* prompt_proc */
-  };
-
-  cli_uiout = cli_out_new (gdb_stdout);
-  cli_interp = gdb_new_interpreter (GDB_INTERPRETER_CONSOLE, NULL, cli_uiout,
-				    &procs);
-  gdb_add_interpreter (cli_interp);
-}
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index fc3261c..9aac6e6 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -27,6 +27,7 @@
 #include <ctype.h>
 
 #include "ui-out.h"
+#include "gdb_string.h"
 
 #include "top.h"
 #include "cli/cli-cmds.h"
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index f967b0c..44b0b4e 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -20,9 +20,7 @@
 #include "defs.h"
 #include "value.h"
 #include <ctype.h>
-#if 0
 #include "gdb_string.h"
-#endif
 
 #include "ui-out.h"
 
@@ -34,9 +32,8 @@
 
 static int parse_binary_operation (char *);
 
-static enum cmd_auto_boolean parse_auto_binary_operation (const char *arg);
 
-static enum cmd_auto_boolean
+static enum auto_boolean
 parse_auto_binary_operation (const char *arg)
 {
   if (arg != NULL && *arg != '\0')
@@ -48,18 +45,18 @@
 	  || strncmp (arg, "1", length) == 0
 	  || strncmp (arg, "yes", length) == 0
 	  || strncmp (arg, "enable", length) == 0)
-	return CMD_AUTO_BOOLEAN_TRUE;
+	return AUTO_BOOLEAN_TRUE;
       else if (strncmp (arg, "off", length) == 0
 	       || strncmp (arg, "0", length) == 0
 	       || strncmp (arg, "no", length) == 0
 	       || strncmp (arg, "disable", length) == 0)
-	return CMD_AUTO_BOOLEAN_FALSE;
+	return AUTO_BOOLEAN_FALSE;
       else if (strncmp (arg, "auto", length) == 0
 	       || (strncmp (arg, "-1", length) == 0 && length > 1))
-	return CMD_AUTO_BOOLEAN_AUTO;
+	return AUTO_BOOLEAN_AUTO;
     }
   error ("\"on\", \"off\" or \"auto\" expected.");
-  return CMD_AUTO_BOOLEAN_AUTO; /* pacify GCC */
+  return AUTO_BOOLEAN_AUTO; /* pacify GCC */
 }
 
 static int
@@ -167,7 +164,7 @@
 	  *(int *) c->var = parse_binary_operation (arg);
 	  break;
 	case var_auto_boolean:
-	  *(enum cmd_auto_boolean *) c->var = parse_auto_binary_operation (arg);
+	  *(enum auto_boolean *) c->var = parse_auto_binary_operation (arg);
 	  break;
 	case var_uinteger:
 	  if (arg == NULL)
@@ -296,15 +293,15 @@
 	  fputs_filtered (*(int *) c->var ? "on" : "off", stb->stream);
 	  break;
 	case var_auto_boolean:
-	  switch (*(enum cmd_auto_boolean*) c->var)
+	  switch (*(enum auto_boolean*) c->var)
 	    {
-	    case CMD_AUTO_BOOLEAN_TRUE:
+	    case AUTO_BOOLEAN_TRUE:
 	      fputs_filtered ("on", stb->stream);
 	      break;
-	    case CMD_AUTO_BOOLEAN_FALSE:
+	    case AUTO_BOOLEAN_FALSE:
 	      fputs_filtered ("off", stb->stream);
 	      break;
-	    case CMD_AUTO_BOOLEAN_AUTO:
+	    case AUTO_BOOLEAN_AUTO:
 	      fputs_filtered ("auto", stb->stream);
 	      break;
 	    default:
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 84b3761..d794a7d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -28,7 +28,7 @@
 #include "breakpoint.h"
 
 #include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 
 #include "gdb_string.h"
 #include <ctype.h>
@@ -593,16 +593,34 @@
 
 /* End of warning */
 
-  /* Read the line number table, all at once.  */
   info->min_lineno_offset = 0;
   info->max_lineno_offset = 0;
-  bfd_map_over_sections (abfd, find_linenos, (void *) info);
 
-  make_cleanup (free_linetab_cleanup, 0 /*ignore*/);
-  val = init_lineno (abfd, info->min_lineno_offset,
-		     info->max_lineno_offset - info->min_lineno_offset);
-  if (val < 0)
-    error ("\"%s\": error reading line numbers\n", name);
+  /* Only read line number information if we have symbols.
+
+     On Windows NT, some of the system's DLL's have sections with
+     PointerToLinenumbers fields that are non-zero, but point at
+     random places within the image file.  (In the case I found,
+     KERNEL32.DLL's .text section has a line number info pointer that
+     points into the middle of the string `lib\\i386\kernel32.dll'.)
+
+     However, these DLL's also have no symbols.  The line number
+     tables are meaningless without symbols.  And in fact, GDB never
+     uses the line number information unless there are symbols.  So we
+     can avoid spurious error messages (and maybe run a little
+     faster!) by not even reading the line number table unless we have
+     symbols.  */
+  if (num_symbols > 0)
+    {
+      /* Read the line number table, all at once.  */
+      bfd_map_over_sections (abfd, find_linenos, (void *) info);
+
+      make_cleanup (free_linetab_cleanup, 0 /*ignore*/);
+      val = init_lineno (abfd, info->min_lineno_offset,
+                         info->max_lineno_offset - info->min_lineno_offset);
+      if (val < 0)
+        error ("\"%s\": error reading line numbers\n", name);
+    }
 
   /* Now read the string table, all at once.  */
 
@@ -1409,13 +1427,12 @@
 
   /* Go through the per-file symbols only */
   b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
-  for (i = BLOCK_NSYMS (b) - 1; i >= 0; i--)
+  ALL_BLOCK_SYMBOLS (b, i, real_sym)
     {
       /* Find completed typedefs to use to fix opaque ones.
          Remove syms from the chain when their types are stored,
          but search the whole chain, as there may be several syms
          from different files with the same name.  */
-      real_sym = BLOCK_SYM (b, i);
       if (SYMBOL_CLASS (real_sym) == LOC_TYPEDEF &&
 	  SYMBOL_NAMESPACE (real_sym) == VAR_NAMESPACE &&
 	  TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR &&
diff --git a/gdb/command.h b/gdb/command.h
index db7a740..96c99ab 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -51,14 +51,6 @@
   }
 cmd_types;
 
-/* Reasonable values for an AUTO_BOOLEAN variable. */
-enum cmd_auto_boolean
-{
-  CMD_AUTO_BOOLEAN_TRUE,
-  CMD_AUTO_BOOLEAN_FALSE,
-  CMD_AUTO_BOOLEAN_AUTO
-};
-
 /* Types of "set" or "show" command.  */
 typedef enum var_types
   {
@@ -67,9 +59,9 @@
     var_boolean,
 
     /* "on" / "true" / "enable" or "off" / "false" / "disable" or
-       "auto.  *VAR is an ``enum cmd_auto_boolean''.  NOTE: In general
-       a custom show command will need to be implemented - one that
-       for "auto" prints both the "auto" and the current auto-selected
+       "auto.  *VAR is an ``enum auto_boolean''.  NOTE: In general a
+       custom show command will need to be implemented - one that for
+       "auto" prints both the "auto" and the current auto-selected
        value. */
     var_auto_boolean,
 
@@ -132,12 +124,14 @@
 
 /* Set the commands corresponding callback.  */
 
+typedef void cmd_cfunc_ftype (char *args, int from_tty);
 extern void set_cmd_cfunc (struct cmd_list_element *cmd,
-			   void (*cfunc) (char *args, int from_tty));
+			   cmd_cfunc_ftype *cfunc);
 
+typedef void cmd_sfunc_ftype (char *args, int from_tty,
+			      struct cmd_list_element *c);
 extern void set_cmd_sfunc (struct cmd_list_element *cmd,
-			   void (*sfunc) (char *args, int from_tty,
-					  struct cmd_list_element * c));
+			   cmd_sfunc_ftype *sfunc);
 
 extern void set_cmd_completer (struct cmd_list_element *cmd,
 			       char **(*completer) (char *text, char *word));
@@ -216,6 +210,26 @@
 extern void help_cmd_list (struct cmd_list_element *, enum command_class,
 			   char *, int, struct ui_file *);
 
+extern void add_setshow_cmd (char *name,
+			     enum command_class class,
+			     var_types var_type, void *var,
+			     char *set_doc, char *show_doc,
+			     cmd_sfunc_ftype *set_func,
+			     cmd_sfunc_ftype *show_func,
+			     struct cmd_list_element **set_list,
+			     struct cmd_list_element **show_list);
+
+extern void add_setshow_cmd_full (char *name,
+				  enum command_class class,
+				  var_types var_type, void *var,
+				  char *set_doc, char *show_doc,
+				  cmd_sfunc_ftype *set_func,
+				  cmd_sfunc_ftype *show_func,
+				  struct cmd_list_element **set_list,
+				  struct cmd_list_element **show_list,
+				  struct cmd_list_element **set_result,
+				  struct cmd_list_element **show_result);
+
 extern struct cmd_list_element *add_set_cmd (char *name, enum
 					     command_class class,
 					     var_types var_type, void *var,
@@ -229,17 +243,24 @@
 						  char *doc,
 						  struct cmd_list_element **list);
 
-extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
-							  enum command_class class,
-							  enum cmd_auto_boolean *var,
-							  char *doc,
-							  struct cmd_list_element **list);
+extern void add_setshow_auto_boolean_cmd (char *name,
+					  enum command_class class,
+					  enum auto_boolean *var,
+					  char *set_doc, char *show_doc,
+					  cmd_sfunc_ftype *set_func,
+					  cmd_sfunc_ftype *show_func,
+					  struct cmd_list_element **set_list,
+					  struct cmd_list_element **show_list);
 
-extern struct cmd_list_element *add_set_boolean_cmd (char *name,
-						     enum command_class class,
-						     int *var,
-						     char *doc,
-						     struct cmd_list_element **list);
+extern void add_setshow_boolean_cmd (char *name,
+				     enum command_class class,
+				     int *var,
+				     char *set_doc,
+				     char *show_doc,
+				     cmd_sfunc_ftype *set_func,
+				     cmd_sfunc_ftype *show_func,
+				     struct cmd_list_element **set_list,
+				     struct cmd_list_element **show_list);
 
 extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
 						   struct cmd_list_element
@@ -259,4 +280,10 @@
 
 extern void not_just_help_class_command (char *, int);
 
+/* check function pointer */
+extern int cmd_func_p (struct cmd_list_element *cmd);
+
+/* call the command function */
+extern void cmd_func (struct cmd_list_element *cmd, char *args, int from_tty);
+
 #endif /* !defined (COMMAND_H) */
diff --git a/gdb/config.in b/gdb/config.in
index 750a8ae..8c1c7bf 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -1,4 +1,4 @@
-/* config.in.  Generated automatically from configure.in by autoheader.  */
+/* config.in.  Generated automatically from configure.in by autoheader 2.13.  */
 
 /* Define if on AIX 3.
    System headers sometimes define this.
@@ -41,6 +41,9 @@
 /* Define to `int' if <sys/types.h> doesn't define.  */
 #undef pid_t
 
+/* Define if you need to in order for stat and other things to work.  */
+#undef _POSIX_SOURCE
+
 /* Define as the return type of signal handlers (int or void).  */
 #undef RETSIGTYPE
 
@@ -364,6 +367,9 @@
 /* Define if you have the <sys/poll.h> header file.  */
 #undef HAVE_SYS_POLL_H
 
+/* Define if you have the <sys/proc.h> header file.  */
+#undef HAVE_SYS_PROC_H
+
 /* Define if you have the <sys/procfs.h> header file.  */
 #undef HAVE_SYS_PROCFS_H
 
@@ -439,6 +445,9 @@
 /* Define as 1 if you have gettext and don't want to use GNU gettext. */
 #undef HAVE_GETTEXT
 
+/* Name of this package.  */
+#undef PACKAGE
+
 /* Define if sigsetjmp is available.  */
 #undef HAVE_SIGSETJMP
 
diff --git a/gdb/config/alpha/alpha.mt b/gdb/config/alpha/alpha.mt
new file mode 100644
index 0000000..dfff657
--- /dev/null
+++ b/gdb/config/alpha/alpha.mt
@@ -0,0 +1,2 @@
+TDEPFILES= alpha-tdep.o
+TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index c59b88c..990ccb4 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -23,7 +23,7 @@
 #ifndef NM_LINUX_H
 #define NM_LINUX_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* ptrace register ``addresses'' are absolute.  */
 
diff --git a/gdb/config/alpha/tm-alphalinux.h b/gdb/config/alpha/tm-alphalinux.h
index 27ff457..4858b90 100644
--- a/gdb/config/alpha/tm-alphalinux.h
+++ b/gdb/config/alpha/tm-alphalinux.h
@@ -40,6 +40,6 @@
 #undef START_INFERIOR_TRAPS_EXPECTED
 #define START_INFERIOR_TRAPS_EXPECTED 2
 
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 #endif /* TM_LINUXALPHA_H */
diff --git a/gdb/config/arc/arc.mt b/gdb/config/arc/arc.mt
index 8ee8c3d..3ed7410 100644
--- a/gdb/config/arc/arc.mt
+++ b/gdb/config/arc/arc.mt
@@ -1,3 +1,3 @@
-# Target: ARC processor
-TDEPFILES = arc-tdep.o
-TM_FILE = tm-arc.h
+# OBSOLETE # Target: ARC processor
+# OBSOLETE TDEPFILES = arc-tdep.o
+# OBSOLETE TM_FILE = tm-arc.h
diff --git a/gdb/config/arc/tm-arc.h b/gdb/config/arc/tm-arc.h
index cbdcf41..1c7c74f 100644
--- a/gdb/config/arc/tm-arc.h
+++ b/gdb/config/arc/tm-arc.h
@@ -1,336 +1,336 @@
-/* Parameters for target machine ARC, for GDB, the GNU debugger.
-   Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-   This file is part of GDB.
-
-   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 "regcache.h"
-
-/* Used by arc-tdep.c to set the default cpu type.  */
-#define DEFAULT_ARC_CPU_TYPE "base"
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
-   to reach some "real" code.  */
-
-#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
-extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
-
-#define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
-extern int arc_prologue_frameless_p (CORE_ADDR);
-
-/* Sequence of bytes for breakpoint instruction.
-   ??? The current value is "sr -1,[-1]" and is for the simulator only.
-   The simulator watches for this and does the right thing.
-   The hardware version will have to associate with each breakpoint
-   the sequence "flag 1; nop; nop; nop".  IE: The breakpoint insn will not
-   be a fixed set of bits but instead will be a branch to a semi-random
-   address.  Presumably this will be cleaned up for "second silicon".  */
-#define BIG_BREAKPOINT { 0x12, 0x1f, 0xff, 0xff }
-#define LITTLE_BREAKPOINT { 0xff, 0xff, 0x1f, 0x12 }
-
-/* Given the exposed pipeline, there isn't any one correct value.
-   However, this value must be 4.  GDB can't handle any other value (other than
-   zero).  See for example infrun.c:
-   "prev_pc != stop_pc - DECR_PC_AFTER_BREAK"  */
-/* FIXME */
-#define DECR_PC_AFTER_BREAK 8
-
-/* We don't have a reliable single step facility.
-   ??? We do have a cycle single step facility, but that won't work.  */
-#define SOFTWARE_SINGLE_STEP_P() 1
-extern void arc_software_single_step (enum target_signal, int);
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
-
-/* FIXME: Need to set STEP_SKIPS_DELAY.  */
-
-/* Given a pc value as defined by the hardware, return the real address.
-   Remember that on the ARC blink contains that status register which
-   includes PC + flags (so we have to mask out the flags).  */
-#define ARC_PC_TO_REAL_ADDRESS(pc) (((pc) & 0xffffff) << 2)
-
-/* Immediately after a function call, return the saved pc.
-   Can't always go through the frames for this because on some machines
-   the new frame is not set up until the new function
-   executes some instructions.  */
-
-#define SAVED_PC_AFTER_CALL(frame) \
-  (ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM)))
-
-/* Stack grows upward */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-#define NUM_REGS 92
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-
-#define REGISTER_NAMES \
-{ \
-    /*  0 */ "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7", \
-    /*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15", \
-    /* 16 */ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
-    /* 24 */ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
-    /* 32 */ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
-    /* 40 */ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
-    /* 48 */ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
-    /* 56 */ "r56", "mlo", "mmid", "mhi", "lp_count", \
-    /* 61 */ "status", "sema", "lp_start", "lp_end", "identity", "debug", \
-    /* 67 */ "aux10", "aux11", "aux12", "aux13", "aux14", \
-    /* 72 */ "aux15", "aux16", "aux17", "aux18", "aux19", \
-    /* 77 */ "aux1a", "aux1b", "aux1c", "aux1d", "aux1e", \
-    /* 82 */ "aux1f", "aux20", "aux21", "aux22", \
-    /* 86 */ "aux30", "aux31", "aux32", "aux33", "aux40", \
-    /* 91 */ "pc" \
-}
-
-/* Register numbers of various important registers (used to index
-   into arrays of register names and register values).  */
-
-#define R0_REGNUM   0		/* First local register           */
-#define R59_REGNUM 59		/* Last local register            */
-#define FP_REGNUM  27		/* Contains address of executing stack frame */
-#define SP_REGNUM  28		/* stack pointer */
-#define BLINK_REGNUM 31		/* link register */
-#define	STA_REGNUM 61		/* processor status word */
-#define PC_REGNUM  91		/* instruction pointer */
-#define AUX_BEG_REGNUM  61	/* aux reg begins */
-#define AUX_END_REGNUM  90	/* aux reg ends, pc not real aux reg */
-
-/* Fake registers used to mark immediate data.  */
-#define SHIMM_FLAG_REGNUM 61
-#define LIMM_REGNUM 62
-#define SHIMM_REGNUM 63
-
-#define AUX_REG_MAP \
-{ \
-   {  0,  1,  2,  3,  4,  5, \
-     16, -1, -1, -1, -1, \
-     -1, -1, -1, -1, -1, \
-     -1, -1, -1, -1, 30, \
-     -1, 32, 33, -1, \
-      48, 49, 50, 51, 64, \
-      0 \
-    }, \
-   {  0,  1,  2,  3,  4,  5, \
-     16, -1, -1, -1, -1, \
-     -1, -1, -1, -1, -1, \
-     -1, -1, -1, -1, 30, \
-     31, 32, 33, -1, \
-     -1, -1, -1, -1, -1, \
-      0 \
-    }, \
-   {  0,  1,  2,  3,  4,  5, \
-      16, 17, 18, 19, 20, \
-      21, 22, 23, 24, 25, \
-      26, 27, 28, 29, 30, \
-      31, 32, 33, 34, \
-     -1, -1, -1, -1, -1, \
-      0 \
-    } \
-}
-
-#define PFP_REGNUM R0_REGNUM	/* Previous frame pointer */
-
-/* Total amount of space needed to store our copies of the machine's
-   register state, the array `registers'.  */
-#define REGISTER_BYTES (NUM_REGS * 4)
-
-/* Index within `registers' of the first byte of the space for register N.  */
-#define REGISTER_BYTE(N) (4*(N))
-
-/* Number of bytes of storage in the actual machine representation
-   for register N. */
-#define REGISTER_RAW_SIZE(N) 4
-
-/* Number of bytes of storage in the program's representation for register N. */
-#define REGISTER_VIRTUAL_SIZE(N) 4
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
-   of data in register N.  */
-#define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
-
-
-/* Macros for understanding function return values... */
-
-/* Does the specified function use the "struct returning" convention
-   or the "value returning" convention?  The "value returning" convention
-   almost invariably returns the entire value in registers.  The
-   "struct returning" convention often returns the entire value in
-   memory, and passes a pointer (out of or into the function) saying
-   where the value (is or should go).
-
-   Since this sometimes depends on whether it was compiled with GCC,
-   this is also an argument.  This is used in call_function to build a
-   stack, and in value_being_returned to print return values.
-
-   On arc, a structure is always retunred with pointer in r0. */
-
-#define USE_STRUCT_CONVENTION(gcc_p, type) 1
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  This is only called if USE_STRUCT_CONVENTION for this
-   type is 0.
- */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-	memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
-
-/* If USE_STRUCT_CONVENTION produces a 1, 
-   extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one). */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-   (error("Don't know where large structure is returned on arc"), 0)
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format, for "value returning" functions.
-   For 'return' command:  not (yet) implemented for arc.  */
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-    error ("Returning values from functions is not implemented in arc gdb")
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. */
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-    error ("Returning values from functions is not implemented in arc gdb")
-
-
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* We cache information about saved registers in the frame structure,
-   to save us from having to re-scan function prologues every time
-   a register in a non-current frame is accessed.  */
-
-#define EXTRA_FRAME_INFO \
-	struct frame_saved_regs *fsr; \
-	CORE_ADDR arg_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
-   so that FRAME_FIND_SAVED_REGS () will know to allocate and
-   initialize a frame_saved_regs struct the first time it is called.
-   Set the arg_pointer to -1, which is not valid; 0 and other values
-   indicate real, cached values.  */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
-	((fi)->fsr = 0, (fi)->arg_pointer = -1)
-
-/* FRAME_CHAIN takes a frame's nominal address
-   and produces the frame's chain-pointer.
-   However, if FRAME_CHAIN_VALID returns zero,
-   it means the given frame is the outermost one and has no caller.  */
-/* On the arc, we get the chain pointer by reading the PFP saved
-   on the stack. */
-/* The PFP and RPC is in fp and fp+4.  */
-
-#define FRAME_CHAIN(thisframe) \
-  (read_memory_integer (FRAME_FP (thisframe), 4))
-
-/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
-   and has no caller.  */
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
-/* An expression that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it. */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
-     (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
-
-/* Where is the PC for a specific frame.
-   A leaf function may never save blink, so we have to check for that here.  */
-
-#define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
-struct frame_info;		/* in case frame.h not included yet */
-CORE_ADDR arc_frame_saved_pc (struct frame_info *);
-
-/* If the argument is on the stack, it will be here.
-   We cache this value in the frame info if we've already looked it up.  */
-/* ??? Is the arg_pointer check necessary?  */
-
-#define FRAME_ARGS_ADDRESS(fi) \
-  (((fi)->arg_pointer != -1) ? (fi)->arg_pointer : (fi)->frame)
-
-/* This is the same except it should return 0 when
-   it does not really know where the args are, rather than guessing.
-   This value is not cached since it is only used infrequently.  */
-
-#define FRAME_LOCALS_ADDRESS(fi)	((fi)->frame)
-
-/* Set NUMARGS to the number of args passed to a frame.
-   Can return -1, meaning no way to tell.  */
-
-#define FRAME_NUM_ARGS(fi)	(-1)
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Produce the positions of the saved registers in a stack frame.  */
-
-#define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
-	frame_find_saved_regs (frame_info_addr, &sr)
-extern void frame_find_saved_regs ();	/* See arc-tdep.c */
-
-
-/* Things needed for making calls to functions in the inferior process */
-void arc_push_dummy_frame (void);
-#define PUSH_DUMMY_FRAME \
-	arc_push_dummy_frame ()
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-void arc_pop_frame (void);
-#define POP_FRAME \
-	arc_pop_frame ()
-
-/* This sequence of words is the instructions  bl xxxx, flag 1 */
-#define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
-#define CALL_DUMMY_LENGTH 8
-
-/* Start execution at beginning of dummy */
-#define CALL_DUMMY_START_OFFSET 0
-
-/* Insert the specified number of args and function address
-   into a call sequence of the above form stored at 'dummyname'. */
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ \
-        int from, to, delta, loc; \
-        loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
-        from = loc + 4; \
-        to = (int)(fun); \
-        delta = (to - from) >> 2; \
-        *((char *)(dummyname) + 1) = (delta & 0x1); \
-        *((char *)(dummyname) + 2) = ((delta >> 1) & 0xff); \
-        *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
-        *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
-}
+// OBSOLETE /* Parameters for target machine ARC, for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Support.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE /* Used by arc-tdep.c to set the default cpu type.  */
+// OBSOLETE #define DEFAULT_ARC_CPU_TYPE "base"
+// OBSOLETE 
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE    Zero on most machines.  */
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE 
+// OBSOLETE /* Advance PC across any function entry prologue instructions
+// OBSOLETE    to reach some "real" code.  */
+// OBSOLETE 
+// OBSOLETE #define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
+// OBSOLETE extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
+// OBSOLETE 
+// OBSOLETE #define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
+// OBSOLETE extern int arc_prologue_frameless_p (CORE_ADDR);
+// OBSOLETE 
+// OBSOLETE /* Sequence of bytes for breakpoint instruction.
+// OBSOLETE    ??? The current value is "sr -1,[-1]" and is for the simulator only.
+// OBSOLETE    The simulator watches for this and does the right thing.
+// OBSOLETE    The hardware version will have to associate with each breakpoint
+// OBSOLETE    the sequence "flag 1; nop; nop; nop".  IE: The breakpoint insn will not
+// OBSOLETE    be a fixed set of bits but instead will be a branch to a semi-random
+// OBSOLETE    address.  Presumably this will be cleaned up for "second silicon".  */
+// OBSOLETE #define BIG_BREAKPOINT { 0x12, 0x1f, 0xff, 0xff }
+// OBSOLETE #define LITTLE_BREAKPOINT { 0xff, 0xff, 0x1f, 0x12 }
+// OBSOLETE 
+// OBSOLETE /* Given the exposed pipeline, there isn't any one correct value.
+// OBSOLETE    However, this value must be 4.  GDB can't handle any other value (other than
+// OBSOLETE    zero).  See for example infrun.c:
+// OBSOLETE    "prev_pc != stop_pc - DECR_PC_AFTER_BREAK"  */
+// OBSOLETE /* FIXME */
+// OBSOLETE #define DECR_PC_AFTER_BREAK 8
+// OBSOLETE 
+// OBSOLETE /* We don't have a reliable single step facility.
+// OBSOLETE    ??? We do have a cycle single step facility, but that won't work.  */
+// OBSOLETE #define SOFTWARE_SINGLE_STEP_P() 1
+// OBSOLETE extern void arc_software_single_step (enum target_signal, int);
+// OBSOLETE #define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
+// OBSOLETE 
+// OBSOLETE /* FIXME: Need to set STEP_SKIPS_DELAY.  */
+// OBSOLETE 
+// OBSOLETE /* Given a pc value as defined by the hardware, return the real address.
+// OBSOLETE    Remember that on the ARC blink contains that status register which
+// OBSOLETE    includes PC + flags (so we have to mask out the flags).  */
+// OBSOLETE #define ARC_PC_TO_REAL_ADDRESS(pc) (((pc) & 0xffffff) << 2)
+// OBSOLETE 
+// OBSOLETE /* Immediately after a function call, return the saved pc.
+// OBSOLETE    Can't always go through the frames for this because on some machines
+// OBSOLETE    the new frame is not set up until the new function
+// OBSOLETE    executes some instructions.  */
+// OBSOLETE 
+// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
+// OBSOLETE   (ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM)))
+// OBSOLETE 
+// OBSOLETE /* Stack grows upward */
+// OBSOLETE 
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE 
+// OBSOLETE /* Say how long (ordinary) registers are.  This is a piece of bogosity
+// OBSOLETE    used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE    real way to know how big a register is.  */
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE 
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE #define NUM_REGS 92
+// OBSOLETE 
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE    There should be NUM_REGS strings in this initializer.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_NAMES \
+// OBSOLETE { \
+// OBSOLETE     /*  0 */ "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7", \
+// OBSOLETE     /*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15", \
+// OBSOLETE     /* 16 */ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
+// OBSOLETE     /* 24 */ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
+// OBSOLETE     /* 32 */ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
+// OBSOLETE     /* 40 */ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
+// OBSOLETE     /* 48 */ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
+// OBSOLETE     /* 56 */ "r56", "mlo", "mmid", "mhi", "lp_count", \
+// OBSOLETE     /* 61 */ "status", "sema", "lp_start", "lp_end", "identity", "debug", \
+// OBSOLETE     /* 67 */ "aux10", "aux11", "aux12", "aux13", "aux14", \
+// OBSOLETE     /* 72 */ "aux15", "aux16", "aux17", "aux18", "aux19", \
+// OBSOLETE     /* 77 */ "aux1a", "aux1b", "aux1c", "aux1d", "aux1e", \
+// OBSOLETE     /* 82 */ "aux1f", "aux20", "aux21", "aux22", \
+// OBSOLETE     /* 86 */ "aux30", "aux31", "aux32", "aux33", "aux40", \
+// OBSOLETE     /* 91 */ "pc" \
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Register numbers of various important registers (used to index
+// OBSOLETE    into arrays of register names and register values).  */
+// OBSOLETE 
+// OBSOLETE #define R0_REGNUM   0		/* First local register           */
+// OBSOLETE #define R59_REGNUM 59		/* Last local register            */
+// OBSOLETE #define FP_REGNUM  27		/* Contains address of executing stack frame */
+// OBSOLETE #define SP_REGNUM  28		/* stack pointer */
+// OBSOLETE #define BLINK_REGNUM 31		/* link register */
+// OBSOLETE #define	STA_REGNUM 61		/* processor status word */
+// OBSOLETE #define PC_REGNUM  91		/* instruction pointer */
+// OBSOLETE #define AUX_BEG_REGNUM  61	/* aux reg begins */
+// OBSOLETE #define AUX_END_REGNUM  90	/* aux reg ends, pc not real aux reg */
+// OBSOLETE 
+// OBSOLETE /* Fake registers used to mark immediate data.  */
+// OBSOLETE #define SHIMM_FLAG_REGNUM 61
+// OBSOLETE #define LIMM_REGNUM 62
+// OBSOLETE #define SHIMM_REGNUM 63
+// OBSOLETE 
+// OBSOLETE #define AUX_REG_MAP \
+// OBSOLETE { \
+// OBSOLETE    {  0,  1,  2,  3,  4,  5, \
+// OBSOLETE      16, -1, -1, -1, -1, \
+// OBSOLETE      -1, -1, -1, -1, -1, \
+// OBSOLETE      -1, -1, -1, -1, 30, \
+// OBSOLETE      -1, 32, 33, -1, \
+// OBSOLETE       48, 49, 50, 51, 64, \
+// OBSOLETE       0 \
+// OBSOLETE     }, \
+// OBSOLETE    {  0,  1,  2,  3,  4,  5, \
+// OBSOLETE      16, -1, -1, -1, -1, \
+// OBSOLETE      -1, -1, -1, -1, -1, \
+// OBSOLETE      -1, -1, -1, -1, 30, \
+// OBSOLETE      31, 32, 33, -1, \
+// OBSOLETE      -1, -1, -1, -1, -1, \
+// OBSOLETE       0 \
+// OBSOLETE     }, \
+// OBSOLETE    {  0,  1,  2,  3,  4,  5, \
+// OBSOLETE       16, 17, 18, 19, 20, \
+// OBSOLETE       21, 22, 23, 24, 25, \
+// OBSOLETE       26, 27, 28, 29, 30, \
+// OBSOLETE       31, 32, 33, 34, \
+// OBSOLETE      -1, -1, -1, -1, -1, \
+// OBSOLETE       0 \
+// OBSOLETE     } \
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #define PFP_REGNUM R0_REGNUM	/* Previous frame pointer */
+// OBSOLETE 
+// OBSOLETE /* Total amount of space needed to store our copies of the machine's
+// OBSOLETE    register state, the array `registers'.  */
+// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
+// OBSOLETE 
+// OBSOLETE /* Index within `registers' of the first byte of the space for register N.  */
+// OBSOLETE #define REGISTER_BYTE(N) (4*(N))
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the actual machine representation
+// OBSOLETE    for register N. */
+// OBSOLETE #define REGISTER_RAW_SIZE(N) 4
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  */
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
+// OBSOLETE 
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE    of data in register N.  */
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Macros for understanding function return values... */
+// OBSOLETE 
+// OBSOLETE /* Does the specified function use the "struct returning" convention
+// OBSOLETE    or the "value returning" convention?  The "value returning" convention
+// OBSOLETE    almost invariably returns the entire value in registers.  The
+// OBSOLETE    "struct returning" convention often returns the entire value in
+// OBSOLETE    memory, and passes a pointer (out of or into the function) saying
+// OBSOLETE    where the value (is or should go).
+// OBSOLETE 
+// OBSOLETE    Since this sometimes depends on whether it was compiled with GCC,
+// OBSOLETE    this is also an argument.  This is used in call_function to build a
+// OBSOLETE    stack, and in value_being_returned to print return values.
+// OBSOLETE 
+// OBSOLETE    On arc, a structure is always retunred with pointer in r0. */
+// OBSOLETE 
+// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) 1
+// OBSOLETE 
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE    into VALBUF.  This is only called if USE_STRUCT_CONVENTION for this
+// OBSOLETE    type is 0.
+// OBSOLETE  */
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE 	memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
+// OBSOLETE 
+// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1, 
+// OBSOLETE    extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    the address in which a function should return its structure value,
+// OBSOLETE    as a CORE_ADDR (or an expression that can be used as one). */
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+// OBSOLETE    (error("Don't know where large structure is returned on arc"), 0)
+// OBSOLETE 
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE    of type TYPE, given in virtual format, for "value returning" functions.
+// OBSOLETE    For 'return' command:  not (yet) implemented for arc.  */
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE     error ("Returning values from functions is not implemented in arc gdb")
+// OBSOLETE 
+// OBSOLETE /* Store the address of the place in which to copy the structure the
+// OBSOLETE    subroutine will return.  This is called from call_function. */
+// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
+// OBSOLETE     error ("Returning values from functions is not implemented in arc gdb")
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
+// OBSOLETE    (its caller).  */
+// OBSOLETE 
+// OBSOLETE /* We cache information about saved registers in the frame structure,
+// OBSOLETE    to save us from having to re-scan function prologues every time
+// OBSOLETE    a register in a non-current frame is accessed.  */
+// OBSOLETE 
+// OBSOLETE #define EXTRA_FRAME_INFO \
+// OBSOLETE 	struct frame_saved_regs *fsr; \
+// OBSOLETE 	CORE_ADDR arg_pointer;
+// OBSOLETE 
+// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
+// OBSOLETE    so that FRAME_FIND_SAVED_REGS () will know to allocate and
+// OBSOLETE    initialize a frame_saved_regs struct the first time it is called.
+// OBSOLETE    Set the arg_pointer to -1, which is not valid; 0 and other values
+// OBSOLETE    indicate real, cached values.  */
+// OBSOLETE 
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+// OBSOLETE 	((fi)->fsr = 0, (fi)->arg_pointer = -1)
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
+// OBSOLETE    and produces the frame's chain-pointer.
+// OBSOLETE    However, if FRAME_CHAIN_VALID returns zero,
+// OBSOLETE    it means the given frame is the outermost one and has no caller.  */
+// OBSOLETE /* On the arc, we get the chain pointer by reading the PFP saved
+// OBSOLETE    on the stack. */
+// OBSOLETE /* The PFP and RPC is in fp and fp+4.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_CHAIN(thisframe) \
+// OBSOLETE   (read_memory_integer (FRAME_FP (thisframe), 4))
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
+// OBSOLETE    and has no caller.  */
+// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
+// OBSOLETE 
+// OBSOLETE /* An expression that tells us whether the function invocation represented
+// OBSOLETE    by FI does not have a frame on the stack associated with it. */
+// OBSOLETE 
+// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
+// OBSOLETE      (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
+// OBSOLETE 
+// OBSOLETE /* Where is the PC for a specific frame.
+// OBSOLETE    A leaf function may never save blink, so we have to check for that here.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
+// OBSOLETE struct frame_info;		/* in case frame.h not included yet */
+// OBSOLETE CORE_ADDR arc_frame_saved_pc (struct frame_info *);
+// OBSOLETE 
+// OBSOLETE /* If the argument is on the stack, it will be here.
+// OBSOLETE    We cache this value in the frame info if we've already looked it up.  */
+// OBSOLETE /* ??? Is the arg_pointer check necessary?  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
+// OBSOLETE   (((fi)->arg_pointer != -1) ? (fi)->arg_pointer : (fi)->frame)
+// OBSOLETE 
+// OBSOLETE /* This is the same except it should return 0 when
+// OBSOLETE    it does not really know where the args are, rather than guessing.
+// OBSOLETE    This value is not cached since it is only used infrequently.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi)	((fi)->frame)
+// OBSOLETE 
+// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
+// OBSOLETE    Can return -1, meaning no way to tell.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_NUM_ARGS(fi)	(-1)
+// OBSOLETE 
+// OBSOLETE /* Return number of bytes at start of arglist that are not really args.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE 
+// OBSOLETE /* Produce the positions of the saved registers in a stack frame.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
+// OBSOLETE 	frame_find_saved_regs (frame_info_addr, &sr)
+// OBSOLETE extern void frame_find_saved_regs ();	/* See arc-tdep.c */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Things needed for making calls to functions in the inferior process */
+// OBSOLETE void arc_push_dummy_frame (void);
+// OBSOLETE #define PUSH_DUMMY_FRAME \
+// OBSOLETE 	arc_push_dummy_frame ()
+// OBSOLETE 
+// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers.  */
+// OBSOLETE void arc_pop_frame (void);
+// OBSOLETE #define POP_FRAME \
+// OBSOLETE 	arc_pop_frame ()
+// OBSOLETE 
+// OBSOLETE /* This sequence of words is the instructions  bl xxxx, flag 1 */
+// OBSOLETE #define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
+// OBSOLETE #define CALL_DUMMY_LENGTH 8
+// OBSOLETE 
+// OBSOLETE /* Start execution at beginning of dummy */
+// OBSOLETE #define CALL_DUMMY_START_OFFSET 0
+// OBSOLETE 
+// OBSOLETE /* Insert the specified number of args and function address
+// OBSOLETE    into a call sequence of the above form stored at 'dummyname'. */
+// OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
+// OBSOLETE { \
+// OBSOLETE         int from, to, delta, loc; \
+// OBSOLETE         loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
+// OBSOLETE         from = loc + 4; \
+// OBSOLETE         to = (int)(fun); \
+// OBSOLETE         delta = (to - from) >> 2; \
+// OBSOLETE         *((char *)(dummyname) + 1) = (delta & 0x1); \
+// OBSOLETE         *((char *)(dummyname) + 2) = ((delta >> 1) & 0xff); \
+// OBSOLETE         *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
+// OBSOLETE         *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
+// OBSOLETE }
diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h
index 2a0ebb3..7e0156d 100644
--- a/gdb/config/arm/nm-linux.h
+++ b/gdb/config/arm/nm-linux.h
@@ -21,7 +21,7 @@
 #ifndef NM_ARMLINUX_H
 #define NM_ARMLINUX_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* ptrace register ``addresses'' are absolute.  */
 
diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h
index 6a0d0e4..bbf566d 100644
--- a/gdb/config/arm/tm-linux.h
+++ b/gdb/config/arm/tm-linux.h
@@ -28,7 +28,7 @@
 /* Include the common ARM target definitions.  */
 #include "arm/tm-arm.h"
 
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 /* Use target-specific function to define link map offsets.  */
 extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void);
diff --git a/gdb/config/arm/xm-nbsd.h b/gdb/config/arm/xm-nbsd.h
index c5348d3..d3f76a7 100644
--- a/gdb/config/arm/xm-nbsd.h
+++ b/gdb/config/arm/xm-nbsd.h
@@ -19,4 +19,4 @@
    Boston, MA 02111-1307, USA.  */
 
 /* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
diff --git a/gdb/config/d30v/d30v.mt b/gdb/config/d30v/d30v.mt
index da0af2f..49bd83b 100644
--- a/gdb/config/d30v/d30v.mt
+++ b/gdb/config/d30v/d30v.mt
@@ -1,5 +1,5 @@
-# Target: Mitsubishi D30V processor
-TDEPFILES= d30v-tdep.o
-TM_FILE= tm-d30v.h
-SIM_OBS= remote-sim.o
-SIM= ../sim/d30v/libsim.a
+# OBSOLETE # Target: Mitsubishi D30V processor
+# OBSOLETE TDEPFILES= d30v-tdep.o
+# OBSOLETE TM_FILE= tm-d30v.h
+# OBSOLETE SIM_OBS= remote-sim.o
+# OBSOLETE SIM= ../sim/d30v/libsim.a
diff --git a/gdb/config/d30v/tm-d30v.h b/gdb/config/d30v/tm-d30v.h
index 7a14e39..3e1ea3f 100644
--- a/gdb/config/d30v/tm-d30v.h
+++ b/gdb/config/d30v/tm-d30v.h
@@ -1,323 +1,323 @@
-/* Target-specific definition for the Mitsubishi D30V
-   Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_D30V_H
-#define TM_D30V_H
-
-#include "regcache.h"
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
-/* these are the addresses the D30V-EVA board maps data */
-/* and instruction memory to. */
-
-#define DMEM_START	0x20000000
-#define IMEM_START	0x00000000	/* was 0x10000000 */
-#define STACK_START	0x20007ffe
-
-/* Forward decls for prototypes */
-struct frame_info;
-struct frame_saved_regs;
-struct type;
-struct value;
-
-/* Advance PC across any function entry prologue instructions
-   to reach some "real" code.  */
-
-extern CORE_ADDR d30v_skip_prologue (CORE_ADDR);
-#define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip))
-
-
-/* Stack grows downward.  */
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* for a breakpoint, use "dbt || nop" */
-#define BREAKPOINT {0x00, 0xb0, 0x00, 0x00,\
-		    0x00, 0xf0, 0x00, 0x00}
-
-/* If your kernel resets the pc after the trap happens you may need to
-   define this before including this file.  */
-#define DECR_PC_AFTER_BREAK 0
-
-#define REGISTER_NAMES \
-{   "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",	\
-    "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",	\
-    "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",	\
-    "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",	\
-    "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39",	\
-    "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47",	\
-    "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55",	\
-    "r56", "r57", "r58", "r59", "r60", "r61", "r62", "r63",	\
-    "spi", "spu", \
-    "psw", "bpsw", "pc", "bpc", "dpsw", "dpc", "cr6", "rpt_c",	\
-    "rpt_s", "rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "eit_vb",\
-    "int_s", "int_m", "a0", "a1" \
-    }
-
-#define NUM_REGS 86
-
-/* Register numbers of various important registers.
-   Note that some of these values are "real" register numbers,
-   and correspond to the general registers of the machine,
-   and some are "phony" register numbers which are too large
-   to be actual register numbers as far as the user is concerned
-   but do serve to get the desired values when passed to read_register.  */
-
-#define R0_REGNUM	0
-#define FP_REGNUM	61
-#define LR_REGNUM 	62
-#define SP_REGNUM 	63
-#define SPI_REGNUM	64	/* Interrupt stack pointer */
-#define SPU_REGNUM	65	/* User stack pointer */
-#define CREGS_START	66
-
-#define PSW_REGNUM 	(CREGS_START + 0)	/* psw, bpsw, or dpsw??? */
-#define     PSW_SM (((unsigned long)0x80000000) >> 0)	/* Stack mode: 0/SPI */
-							/*             1/SPU */
-#define     PSW_EA (((unsigned long)0x80000000) >> 2)	/* Execution status */
-#define     PSW_DB (((unsigned long)0x80000000) >> 3)	/* Debug mode */
-#define     PSW_DS (((unsigned long)0x80000000) >> 4)	/* Debug EIT status */
-#define     PSW_IE (((unsigned long)0x80000000) >> 5)	/* Interrupt enable */
-#define     PSW_RP (((unsigned long)0x80000000) >> 6)	/* Repeat enable */
-#define     PSW_MD (((unsigned long)0x80000000) >> 7)	/* Modulo enable */
-#define     PSW_F0 (((unsigned long)0x80000000) >> 17)	/* F0 flag */
-#define     PSW_F1 (((unsigned long)0x80000000) >> 19)	/* F1 flag */
-#define     PSW_F2 (((unsigned long)0x80000000) >> 21)	/* F2 flag */
-#define     PSW_F3 (((unsigned long)0x80000000) >> 23)	/* F3 flag */
-#define     PSW_S  (((unsigned long)0x80000000) >> 25)	/* Saturation flag */
-#define     PSW_V  (((unsigned long)0x80000000) >> 27)	/* Overflow flag */
-#define     PSW_VA (((unsigned long)0x80000000) >> 29)	/* Accum. overflow */
-#define     PSW_C  (((unsigned long)0x80000000) >> 31)	/* Carry/Borrow flag */
-
-#define BPSW_REGNUM	(CREGS_START + 1)	/* Backup PSW (on interrupt) */
-#define PC_REGNUM 	(CREGS_START + 2)	/* pc, bpc, or dpc??? */
-#define BPC_REGNUM 	(CREGS_START + 3)	/* Backup PC (on interrupt) */
-#define DPSW_REGNUM	(CREGS_START + 4)	/* Backup PSW (on debug trap) */
-#define DPC_REGNUM 	(CREGS_START + 5)	/* Backup PC (on debug trap) */
-#define RPT_C_REGNUM	(CREGS_START + 7)	/* Loop count */
-#define RPT_S_REGNUM	(CREGS_START + 8)	/* Loop start address */
-#define RPT_E_REGNUM	(CREGS_START + 9)	/* Loop end address */
-#define MOD_S_REGNUM	(CREGS_START + 10)
-#define MOD_E_REGNUM	(CREGS_START + 11)
-#define IBA_REGNUM	(CREGS_START + 14)	/* Instruction break address */
-#define EIT_VB_REGNUM	(CREGS_START + 15)	/* Vector base address */
-#define INT_S_REGNUM	(CREGS_START + 16)	/* Interrupt status */
-#define INT_M_REGNUM	(CREGS_START + 17)	/* Interrupt mask */
-#define A0_REGNUM 	84
-#define A1_REGNUM 	85
-
-/* Say how much memory is needed to store a copy of the register set */
-#define REGISTER_BYTES    ((NUM_REGS - 2) * 4 + 2 * 8)
-
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-
-#define REGISTER_BYTE(N)  \
-( ((N) >= A0_REGNUM) ? ( ((N) - A0_REGNUM) * 8 + A0_REGNUM * 4 ) : ((N) * 4) )
-
-/* Number of bytes of storage in the actual machine representation
-   for register N.  */
-
-#define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 4 )
-
-/* Number of bytes of storage in the program's representation
-   for register N.  */
-#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 8
-
-/* Return the GDB type object for the "standard" data type
-   of data in register N.  */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
-( ((N) < A0_REGNUM ) ? builtin_type_long : builtin_type_long_long)
-
-/* Writing to r0 is a noop (not an error or exception or anything like
-   that, however).  */
-
-#define CANNOT_STORE_REGISTER(regno) ((regno) == R0_REGNUM)
-
-void d30v_do_registers_info (int regnum, int fpregs);
-
-#define DO_REGISTERS_INFO d30v_do_registers_info
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. 
-
-   We store structs through a pointer passed in R2 */
-
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-    { write_register (2, (ADDR));  }
-
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  
-
-   Things always get returned in R2/R3 */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  write_register_bytes (REGISTER_BYTE(2), VALBUF, TYPE_LENGTH (TYPE))
-
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one).  */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2])
-
-
-/* Define other aspects of the stack frame. 
-   we keep a copy of the worked out return pc lying around, since it
-   is a useful bit of info */
-
-#define EXTRA_FRAME_INFO \
-    CORE_ADDR return_pc; \
-    CORE_ADDR dummy; \
-    int frameless; \
-    int size;
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
-    d30v_init_extra_frame_info(fromleaf, fi)
-
-extern void d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi);
-
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
-  (frameless_look_for_prologue (FI))
-
-CORE_ADDR d30v_frame_chain (struct frame_info *frame);
-#define FRAME_CHAIN(FRAME)       d30v_frame_chain(FRAME)
-extern int d30v_frame_chain_valid (CORE_ADDR, struct frame_info *);
-#define FRAME_CHAIN_VALID(chain, thisframe) d30v_frame_chain_valid (chain, thisframe)
-#define FRAME_SAVED_PC(FRAME)    ((FRAME)->return_pc)
-#define FRAME_ARGS_ADDRESS(fi)   (fi)->frame
-#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
-
-void d30v_init_frame_pc (int fromleaf, struct frame_info *prev);
-#define INIT_FRAME_PC_FIRST(fromleaf, prev)	d30v_init_frame_pc(fromleaf, prev)
-#define INIT_FRAME_PC(fromleaf, prev)	/* nada */
-
-/* Immediately after a function call, return the saved pc.  We can't */
-/* use frame->return_pc beause that is determined by reading R62 off the */
-/* stack and that may not be written yet. */
-
-#define SAVED_PC_AFTER_CALL(frame) (read_register(LR_REGNUM))
-
-/* Set VAL to the number of args passed to frame described by FI.
-   Can set VAL to -1, meaning no way to tell.  */
-/* We can't tell how many args there are */
-
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 0
-
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs)	    \
-   d30v_frame_find_saved_regs(frame_info, &(frame_saved_regs))
-
-extern void d30v_frame_find_saved_regs (struct frame_info *,
-					struct frame_saved_regs *);
-
-/* DUMMY FRAMES.  Need these to support inferior function calls.
-   They work like this on D30V:
-   First we set a breakpoint at 0 or __start.
-   Then we push all the registers onto the stack.
-   Then put the function arguments in the proper registers and set r13
-   to our breakpoint address.
-   Finally call the function directly.
-   When it hits the breakpoint, clear the break point and pop the old
-   register contents off the stack. */
-
-#define CALL_DUMMY		{ 0 }
-#define PUSH_DUMMY_FRAME
-#define CALL_DUMMY_START_OFFSET	0
-#define CALL_DUMMY_LOCATION	AT_ENTRY_POINT
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-
-extern CORE_ADDR d30v_call_dummy_address (void);
-#define CALL_DUMMY_ADDRESS() d30v_call_dummy_address()
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-sp = d30v_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
-
-#define PC_IN_CALL_DUMMY(pc, sp, frame_address)	( pc == IMEM_START + 4 )
-
-extern CORE_ADDR d30v_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR,
-				      int, struct value **,
-				      struct type *, int);
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-  (d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
-extern CORE_ADDR d30v_push_arguments (int, struct value **, CORE_ADDR, int,
-				      CORE_ADDR);
-
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  */
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-d30v_extract_return_value(TYPE, REGBUF, VALBUF)
-extern void d30v_extract_return_value (struct type *, char *, char *);
-
-
-/* Discard from the stack the innermost frame,
-   restoring all saved registers.  */
-#define POP_FRAME d30v_pop_frame();
-extern void d30v_pop_frame (void);
-
-#define REGISTER_SIZE 4
-
-/* Need to handle SP special, as we need to select between spu and spi.  */
-#if 0				/* XXX until the simulator is fixed */
-#define TARGET_READ_SP() ((read_register (PSW_REGNUM) & PSW_SM) \
-			  ? read_register (SPU_REGNUM) \
-			  : read_register (SPI_REGNUM))
-
-#define TARGET_WRITE_SP(val) ((read_register (PSW_REGNUM) & PSW_SM) \
-			  ? write_register (SPU_REGNUM, (val)) \
-			  : write_register (SPI_REGNUM, (val)))
-#endif
-
-#define STACK_ALIGN(len)	(((len) + 7 ) & ~7)
-
-/* Turn this on to cause remote-sim.c to use sim_set/clear_breakpoint. */
-
-#define SIM_HAS_BREAKPOINTS
-
-#endif /* TM_D30V_H */
+/* OBSOLETE /* Target-specific definition for the Mitsubishi D30V */
+/* OBSOLETE    Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. */
+/* OBSOLETE  */
+/* OBSOLETE    This file is part of GDB. */
+/* OBSOLETE  */
+/* OBSOLETE    This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE    it under the terms of the GNU General Public License as published by */
+/* OBSOLETE    the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE    (at your option) any later version. */
+/* OBSOLETE  */
+/* OBSOLETE    This program is distributed in the hope that it will be useful, */
+/* OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE    GNU General Public License for more details. */
+/* OBSOLETE  */
+/* OBSOLETE    You should have received a copy of the GNU General Public License */
+/* OBSOLETE    along with this program; if not, write to the Free Software */
+/* OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE    Boston, MA 02111-1307, USA.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef TM_D30V_H */
+/* OBSOLETE #define TM_D30V_H */
+/* OBSOLETE  */
+/* OBSOLETE #include "regcache.h" */
+/* OBSOLETE  */
+/* OBSOLETE /* Offset from address of function to start of its code. */
+/* OBSOLETE    Zero on most machines.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define FUNCTION_START_OFFSET 0 */
+/* OBSOLETE  */
+/* OBSOLETE /* these are the addresses the D30V-EVA board maps data */ */
+/* OBSOLETE /* and instruction memory to. */ */
+/* OBSOLETE  */
+/* OBSOLETE #define DMEM_START	0x20000000 */
+/* OBSOLETE #define IMEM_START	0x00000000	/* was 0x10000000 */ */
+/* OBSOLETE #define STACK_START	0x20007ffe */
+/* OBSOLETE  */
+/* OBSOLETE /* Forward decls for prototypes */ */
+/* OBSOLETE struct frame_info; */
+/* OBSOLETE struct frame_saved_regs; */
+/* OBSOLETE struct type; */
+/* OBSOLETE struct value; */
+/* OBSOLETE  */
+/* OBSOLETE /* Advance PC across any function entry prologue instructions */
+/* OBSOLETE    to reach some "real" code.  */ */
+/* OBSOLETE  */
+/* OBSOLETE extern CORE_ADDR d30v_skip_prologue (CORE_ADDR); */
+/* OBSOLETE #define SKIP_PROLOGUE(ip) (d30v_skip_prologue (ip)) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Stack grows downward.  */ */
+/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
+/* OBSOLETE  */
+/* OBSOLETE /* for a breakpoint, use "dbt || nop" */ */
+/* OBSOLETE #define BREAKPOINT {0x00, 0xb0, 0x00, 0x00,\ */
+/* OBSOLETE 		    0x00, 0xf0, 0x00, 0x00} */
+/* OBSOLETE  */
+/* OBSOLETE /* If your kernel resets the pc after the trap happens you may need to */
+/* OBSOLETE    define this before including this file.  */ */
+/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */
+/* OBSOLETE  */
+/* OBSOLETE #define REGISTER_NAMES \ */
+/* OBSOLETE {   "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",	\ */
+/* OBSOLETE     "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",	\ */
+/* OBSOLETE     "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",	\ */
+/* OBSOLETE     "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",	\ */
+/* OBSOLETE     "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39",	\ */
+/* OBSOLETE     "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47",	\ */
+/* OBSOLETE     "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55",	\ */
+/* OBSOLETE     "r56", "r57", "r58", "r59", "r60", "r61", "r62", "r63",	\ */
+/* OBSOLETE     "spi", "spu", \ */
+/* OBSOLETE     "psw", "bpsw", "pc", "bpc", "dpsw", "dpc", "cr6", "rpt_c",	\ */
+/* OBSOLETE     "rpt_s", "rpt_e", "mod_s", "mod_e", "cr12", "cr13", "iba", "eit_vb",\ */
+/* OBSOLETE     "int_s", "int_m", "a0", "a1" \ */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE #define NUM_REGS 86 */
+/* OBSOLETE  */
+/* OBSOLETE /* Register numbers of various important registers. */
+/* OBSOLETE    Note that some of these values are "real" register numbers, */
+/* OBSOLETE    and correspond to the general registers of the machine, */
+/* OBSOLETE    and some are "phony" register numbers which are too large */
+/* OBSOLETE    to be actual register numbers as far as the user is concerned */
+/* OBSOLETE    but do serve to get the desired values when passed to read_register.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define R0_REGNUM	0 */
+/* OBSOLETE #define FP_REGNUM	61 */
+/* OBSOLETE #define LR_REGNUM 	62 */
+/* OBSOLETE #define SP_REGNUM 	63 */
+/* OBSOLETE #define SPI_REGNUM	64	/* Interrupt stack pointer */ */
+/* OBSOLETE #define SPU_REGNUM	65	/* User stack pointer */ */
+/* OBSOLETE #define CREGS_START	66 */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_REGNUM 	(CREGS_START + 0)	/* psw, bpsw, or dpsw??? */ */
+/* OBSOLETE #define     PSW_SM (((unsigned long)0x80000000) >> 0)	/* Stack mode: 0/SPI */ */
+/* OBSOLETE 							/*             1/SPU */ */
+/* OBSOLETE #define     PSW_EA (((unsigned long)0x80000000) >> 2)	/* Execution status */ */
+/* OBSOLETE #define     PSW_DB (((unsigned long)0x80000000) >> 3)	/* Debug mode */ */
+/* OBSOLETE #define     PSW_DS (((unsigned long)0x80000000) >> 4)	/* Debug EIT status */ */
+/* OBSOLETE #define     PSW_IE (((unsigned long)0x80000000) >> 5)	/* Interrupt enable */ */
+/* OBSOLETE #define     PSW_RP (((unsigned long)0x80000000) >> 6)	/* Repeat enable */ */
+/* OBSOLETE #define     PSW_MD (((unsigned long)0x80000000) >> 7)	/* Modulo enable */ */
+/* OBSOLETE #define     PSW_F0 (((unsigned long)0x80000000) >> 17)	/* F0 flag */ */
+/* OBSOLETE #define     PSW_F1 (((unsigned long)0x80000000) >> 19)	/* F1 flag */ */
+/* OBSOLETE #define     PSW_F2 (((unsigned long)0x80000000) >> 21)	/* F2 flag */ */
+/* OBSOLETE #define     PSW_F3 (((unsigned long)0x80000000) >> 23)	/* F3 flag */ */
+/* OBSOLETE #define     PSW_S  (((unsigned long)0x80000000) >> 25)	/* Saturation flag */ */
+/* OBSOLETE #define     PSW_V  (((unsigned long)0x80000000) >> 27)	/* Overflow flag */ */
+/* OBSOLETE #define     PSW_VA (((unsigned long)0x80000000) >> 29)	/* Accum. overflow */ */
+/* OBSOLETE #define     PSW_C  (((unsigned long)0x80000000) >> 31)	/* Carry/Borrow flag */ */
+/* OBSOLETE  */
+/* OBSOLETE #define BPSW_REGNUM	(CREGS_START + 1)	/* Backup PSW (on interrupt) */ */
+/* OBSOLETE #define PC_REGNUM 	(CREGS_START + 2)	/* pc, bpc, or dpc??? */ */
+/* OBSOLETE #define BPC_REGNUM 	(CREGS_START + 3)	/* Backup PC (on interrupt) */ */
+/* OBSOLETE #define DPSW_REGNUM	(CREGS_START + 4)	/* Backup PSW (on debug trap) */ */
+/* OBSOLETE #define DPC_REGNUM 	(CREGS_START + 5)	/* Backup PC (on debug trap) */ */
+/* OBSOLETE #define RPT_C_REGNUM	(CREGS_START + 7)	/* Loop count */ */
+/* OBSOLETE #define RPT_S_REGNUM	(CREGS_START + 8)	/* Loop start address */ */
+/* OBSOLETE #define RPT_E_REGNUM	(CREGS_START + 9)	/* Loop end address */ */
+/* OBSOLETE #define MOD_S_REGNUM	(CREGS_START + 10) */
+/* OBSOLETE #define MOD_E_REGNUM	(CREGS_START + 11) */
+/* OBSOLETE #define IBA_REGNUM	(CREGS_START + 14)	/* Instruction break address */ */
+/* OBSOLETE #define EIT_VB_REGNUM	(CREGS_START + 15)	/* Vector base address */ */
+/* OBSOLETE #define INT_S_REGNUM	(CREGS_START + 16)	/* Interrupt status */ */
+/* OBSOLETE #define INT_M_REGNUM	(CREGS_START + 17)	/* Interrupt mask */ */
+/* OBSOLETE #define A0_REGNUM 	84 */
+/* OBSOLETE #define A1_REGNUM 	85 */
+/* OBSOLETE  */
+/* OBSOLETE /* Say how much memory is needed to store a copy of the register set */ */
+/* OBSOLETE #define REGISTER_BYTES    ((NUM_REGS - 2) * 4 + 2 * 8) */
+/* OBSOLETE  */
+/* OBSOLETE /* Index within `registers' of the first byte of the space for */
+/* OBSOLETE    register N.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define REGISTER_BYTE(N)  \ */
+/* OBSOLETE ( ((N) >= A0_REGNUM) ? ( ((N) - A0_REGNUM) * 8 + A0_REGNUM * 4 ) : ((N) * 4) ) */
+/* OBSOLETE  */
+/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
+/* OBSOLETE    for register N.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define REGISTER_RAW_SIZE(N) ( ((N) >= A0_REGNUM) ? 8 : 4 ) */
+/* OBSOLETE  */
+/* OBSOLETE /* Number of bytes of storage in the program's representation */
+/* OBSOLETE    for register N.  */ */
+/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N) */
+/* OBSOLETE  */
+/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 8 */
+/* OBSOLETE  */
+/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8 */
+/* OBSOLETE  */
+/* OBSOLETE /* Return the GDB type object for the "standard" data type */
+/* OBSOLETE    of data in register N.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ */
+/* OBSOLETE ( ((N) < A0_REGNUM ) ? builtin_type_long : builtin_type_long_long) */
+/* OBSOLETE  */
+/* OBSOLETE /* Writing to r0 is a noop (not an error or exception or anything like */
+/* OBSOLETE    that, however).  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define CANNOT_STORE_REGISTER(regno) ((regno) == R0_REGNUM) */
+/* OBSOLETE  */
+/* OBSOLETE void d30v_do_registers_info (int regnum, int fpregs); */
+/* OBSOLETE  */
+/* OBSOLETE #define DO_REGISTERS_INFO d30v_do_registers_info */
+/* OBSOLETE  */
+/* OBSOLETE /* Store the address of the place in which to copy the structure the */
+/* OBSOLETE    subroutine will return.  This is called from call_function.  */
+/* OBSOLETE  */
+/* OBSOLETE    We store structs through a pointer passed in R2 */ */
+/* OBSOLETE  */
+/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */
+/* OBSOLETE     { write_register (2, (ADDR));  } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Write into appropriate registers a function return value */
+/* OBSOLETE    of type TYPE, given in virtual format.   */
+/* OBSOLETE  */
+/* OBSOLETE    Things always get returned in R2/R3 */ */
+/* OBSOLETE  */
+/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
+/* OBSOLETE   write_register_bytes (REGISTER_BYTE(2), VALBUF, TYPE_LENGTH (TYPE)) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
+/* OBSOLETE    the address in which a function should return its structure value, */
+/* OBSOLETE    as a CORE_ADDR (or an expression that can be used as one).  */ */
+/* OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (((CORE_ADDR *)(REGBUF))[2]) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Define other aspects of the stack frame.  */
+/* OBSOLETE    we keep a copy of the worked out return pc lying around, since it */
+/* OBSOLETE    is a useful bit of info */ */
+/* OBSOLETE  */
+/* OBSOLETE #define EXTRA_FRAME_INFO \ */
+/* OBSOLETE     CORE_ADDR return_pc; \ */
+/* OBSOLETE     CORE_ADDR dummy; \ */
+/* OBSOLETE     int frameless; \ */
+/* OBSOLETE     int size; */
+/* OBSOLETE  */
+/* OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \ */
+/* OBSOLETE     d30v_init_extra_frame_info(fromleaf, fi) */
+/* OBSOLETE  */
+/* OBSOLETE extern void d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi); */
+/* OBSOLETE  */
+/* OBSOLETE /* A macro that tells us whether the function invocation represented */
+/* OBSOLETE    by FI does not have a frame on the stack associated with it.  If it */
+/* OBSOLETE    does not, FRAMELESS is set to 1, else 0.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \ */
+/* OBSOLETE   (frameless_look_for_prologue (FI)) */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR d30v_frame_chain (struct frame_info *frame); */
+/* OBSOLETE #define FRAME_CHAIN(FRAME)       d30v_frame_chain(FRAME) */
+/* OBSOLETE extern int d30v_frame_chain_valid (CORE_ADDR, struct frame_info *); */
+/* OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) d30v_frame_chain_valid (chain, thisframe) */
+/* OBSOLETE #define FRAME_SAVED_PC(FRAME)    ((FRAME)->return_pc) */
+/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi)   (fi)->frame */
+/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame */
+/* OBSOLETE  */
+/* OBSOLETE void d30v_init_frame_pc (int fromleaf, struct frame_info *prev); */
+/* OBSOLETE #define INIT_FRAME_PC_FIRST(fromleaf, prev)	d30v_init_frame_pc(fromleaf, prev) */
+/* OBSOLETE #define INIT_FRAME_PC(fromleaf, prev)	/* nada */ */
+/* OBSOLETE  */
+/* OBSOLETE /* Immediately after a function call, return the saved pc.  We can't */ */
+/* OBSOLETE /* use frame->return_pc beause that is determined by reading R62 off the */ */
+/* OBSOLETE /* stack and that may not be written yet. */ */
+/* OBSOLETE  */
+/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (read_register(LR_REGNUM)) */
+/* OBSOLETE  */
+/* OBSOLETE /* Set VAL to the number of args passed to frame described by FI. */
+/* OBSOLETE    Can set VAL to -1, meaning no way to tell.  */ */
+/* OBSOLETE /* We can't tell how many args there are */ */
+/* OBSOLETE  */
+/* OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) */
+/* OBSOLETE  */
+/* OBSOLETE /* Return number of bytes at start of arglist that are not really args.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
+/* OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO. */
+/* OBSOLETE    This includes special registers such as pc and fp saved in special */
+/* OBSOLETE    ways in the stack frame.  sp is even more special: */
+/* OBSOLETE    the address we return for it IS the sp for the next frame.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs)	    \ */
+/* OBSOLETE    d30v_frame_find_saved_regs(frame_info, &(frame_saved_regs)) */
+/* OBSOLETE  */
+/* OBSOLETE extern void d30v_frame_find_saved_regs (struct frame_info *, */
+/* OBSOLETE 					struct frame_saved_regs *); */
+/* OBSOLETE  */
+/* OBSOLETE /* DUMMY FRAMES.  Need these to support inferior function calls. */
+/* OBSOLETE    They work like this on D30V: */
+/* OBSOLETE    First we set a breakpoint at 0 or __start. */
+/* OBSOLETE    Then we push all the registers onto the stack. */
+/* OBSOLETE    Then put the function arguments in the proper registers and set r13 */
+/* OBSOLETE    to our breakpoint address. */
+/* OBSOLETE    Finally call the function directly. */
+/* OBSOLETE    When it hits the breakpoint, clear the break point and pop the old */
+/* OBSOLETE    register contents off the stack. */ */
+/* OBSOLETE  */
+/* OBSOLETE #define CALL_DUMMY		{ 0 } */
+/* OBSOLETE #define PUSH_DUMMY_FRAME */
+/* OBSOLETE #define CALL_DUMMY_START_OFFSET	0 */
+/* OBSOLETE #define CALL_DUMMY_LOCATION	AT_ENTRY_POINT */
+/* OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0) */
+/* OBSOLETE  */
+/* OBSOLETE extern CORE_ADDR d30v_call_dummy_address (void); */
+/* OBSOLETE #define CALL_DUMMY_ADDRESS() d30v_call_dummy_address() */
+/* OBSOLETE  */
+/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */
+/* OBSOLETE sp = d30v_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p) */
+/* OBSOLETE  */
+/* OBSOLETE #define PC_IN_CALL_DUMMY(pc, sp, frame_address)	( pc == IMEM_START + 4 ) */
+/* OBSOLETE  */
+/* OBSOLETE extern CORE_ADDR d30v_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, */
+/* OBSOLETE 				      int, struct value **, */
+/* OBSOLETE 				      struct type *, int); */
+/* OBSOLETE #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \ */
+/* OBSOLETE   (d30v_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr))) */
+/* OBSOLETE extern CORE_ADDR d30v_push_arguments (int, struct value **, CORE_ADDR, int, */
+/* OBSOLETE 				      CORE_ADDR); */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
+/* OBSOLETE    a function return value of type TYPE, and copy that, in virtual format, */
+/* OBSOLETE    into VALBUF.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
+/* OBSOLETE d30v_extract_return_value(TYPE, REGBUF, VALBUF) */
+/* OBSOLETE extern void d30v_extract_return_value (struct type *, char *, char *); */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Discard from the stack the innermost frame, */
+/* OBSOLETE    restoring all saved registers.  */ */
+/* OBSOLETE #define POP_FRAME d30v_pop_frame(); */
+/* OBSOLETE extern void d30v_pop_frame (void); */
+/* OBSOLETE  */
+/* OBSOLETE #define REGISTER_SIZE 4 */
+/* OBSOLETE  */
+/* OBSOLETE /* Need to handle SP special, as we need to select between spu and spi.  */ */
+/* OBSOLETE #if 0				/* XXX until the simulator is fixed */ */
+/* OBSOLETE #define TARGET_READ_SP() ((read_register (PSW_REGNUM) & PSW_SM) \ */
+/* OBSOLETE 			  ? read_register (SPU_REGNUM) \ */
+/* OBSOLETE 			  : read_register (SPI_REGNUM)) */
+/* OBSOLETE  */
+/* OBSOLETE #define TARGET_WRITE_SP(val) ((read_register (PSW_REGNUM) & PSW_SM) \ */
+/* OBSOLETE 			  ? write_register (SPU_REGNUM, (val)) \ */
+/* OBSOLETE 			  : write_register (SPI_REGNUM, (val))) */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE #define STACK_ALIGN(len)	(((len) + 7 ) & ~7) */
+/* OBSOLETE  */
+/* OBSOLETE /* Turn this on to cause remote-sim.c to use sim_set/clear_breakpoint. */ */
+/* OBSOLETE  */
+/* OBSOLETE #define SIM_HAS_BREAKPOINTS */
+/* OBSOLETE  */
+/* OBSOLETE #endif /* TM_D30V_H */ */
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index e536844..47e5483 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -10,13 +10,24 @@
 @V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
 @V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
 @V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
-@V@/bfd/elf32-i370.c @V@/bfd/elf32-i7.c
+@V@/bfd/elf32-fr30.c @V@/bfd/elf32f30.c
+@V@/bfd/elf32-frv.c @V@/bfd/elf32fv.c
+@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
+@V@/bfd/elf32-i386.c @V@/bfd/e32i86.c
+@V@/bfd/elf32-i386qnx.c @V@/bfd/e32i86q.c
 @V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
 @V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
 @V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
-@V@/bfd/elf32-sh-lin.c @V@/bfd/elf32shlin.c
-@V@/bfd/elf32-sh-nbsd.c @V@/bfd/elf32shnb.c
-@V@/bfd/elf32-sh64.c @V@/bfd/elf32sh64.c
+@V@/bfd/elf32-ppc.c @V@/bfd/e32ppc.c
+@V@/bfd/elf32-ppcqnx.c @V@/bfd/e32ppcq.c
+@V@/bfd/elf32-sh.c @V@/bfd/e32sh.c
+@V@/bfd/elf32-shqnx.c @V@/bfd/e32shq.c
+@V@/bfd/elf32-sh-lin.c @V@/bfd/e32shlin.c
+@V@/bfd/elf32-sh-nbsd.c @V@/bfd/e32shn.c
+@V@/bfd/elf32-sh64.c @V@/bfd/e32sh64.c
+@V@/bfd/elf32-sh64-nbsd.c @V@/bfd/e32sh64n.c
+@V@/bfd/elf64-sh64.c @V@/bfd/e64sh64.c
+@V@/bfd/elf64-sh64-nbsd.c @V@/bfd/e64sh64n.c
 @V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
 @V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
 @V@/dejagnu/baseboards/mn10300-cygmon.exp @V@/dejagnu/baseboards/mn10300cygmon.exp
@@ -131,9 +142,13 @@
 @V@/gdb/mipsnbsd-nat.c @V@/gdb/mipsnbnat.c
 @V@/gdb/mipsnbsd-tdep.c @V@/gdb/mipsnbtdep.c
 @V@/gdb/nindy-share/b.out.h @V@/gdb/nindy-share/b_out.h
+@V@/gdb/ns32knbsd-nat.c @V@/gdb/ns32nb-nat.c
+@V@/gdb/ns32knbsd-tdep.c @V@/gdb/ns32nb-tdep.c
 @V@/gdb/osf-share/cma_stack_int.h @V@/gdb/osf-share/cma_stkint.h
 @V@/gdb/p-exp.tab.c @V@/gdb/p-exp_tab.c
 @V@/gdb/ppc-linux-tdep.c @V@/gdb/ppc-linx-tdep.c
+@V@/gdb/ppcnbsd-nat.c @V@/gdb/ppcnb-nat.c
+@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-tdep.c
 @V@/gdb/regformats/reg-i386-linux.dat @V@/gdb/regformats/r-i386-lnx.dat
 @V@/gdb/regformats/reg-s390x.dat @V@/gdb/regformats/r-s390x.dat
 @V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
@@ -160,7 +175,13 @@
 @V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
 @V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
 @V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
+@V@/gdb/sparcnbsd-nat.c @V@/gdb/spnb-nat.c
+@V@/gdb/sparcnbsd-tdep.c @V@/gdb/spnb-tdep.c
 @V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
+@V@/gdb/testsuite/gdb.arch/altivec-abi.c @V@/gdb/testsuite/gdb.arch/av-abi.c
+@V@/gdb/testsuite/gdb.arch/altivec-abi.exp @V@/gdb/testsuite/gdb.arch/av-abi.exp
+@V@/gdb/testsuite/gdb.arch/altivec-regs.c @V@/gdb/testsuite/gdb.arch/av-regs.c
+@V@/gdb/testsuite/gdb.arch/altivec-regs.exp @V@/gdb/testsuite/gdb.arch/av-regs.exp
 @V@/gdb/testsuite/gdb.base/coremaker2.c @V@/gdb/testsuite/gdb.base/core2maker.c
 @V@/gdb/testsuite/gdb.c++ @V@/gdb/testsuite/gdb.cxx
 @V@/gdb/testsuite/gdb.c++/Makefile.in @V@/gdb/testsuite/gdb.cxx/Makefile.in
diff --git a/gdb/config/fr30/fr30.mt b/gdb/config/fr30/fr30.mt
index fac307e..b702970 100644
--- a/gdb/config/fr30/fr30.mt
+++ b/gdb/config/fr30/fr30.mt
@@ -1,5 +1,5 @@
-# Target: Fujitsu FR30 processor
-TDEPFILES= fr30-tdep.o
-TM_FILE= tm-fr30.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/fr30/libsim.a
+# OBSOLETE # Target: Fujitsu FR30 processor
+# OBSOLETE TDEPFILES= fr30-tdep.o
+# OBSOLETE TM_FILE= tm-fr30.h
+# OBSOLETE SIM_OBS = remote-sim.o
+# OBSOLETE SIM = ../sim/fr30/libsim.a
diff --git a/gdb/config/fr30/tm-fr30.h b/gdb/config/fr30/tm-fr30.h
index 22ddd04..7a58337 100644
--- a/gdb/config/fr30/tm-fr30.h
+++ b/gdb/config/fr30/tm-fr30.h
@@ -1,233 +1,233 @@
-/* Parameters for execution on a Fujitsu FR30 processor.
-   Copyright 1999, 2000 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "regcache.h"
-
-#define FR30_GENREGS		16
-#define FR30_DEDICATEDREGS	8
-#define FR30_REGSIZE		4	/* bytes */
-
-#define NUM_REGS (FR30_GENREGS + FR30_DEDICATEDREGS)
-#define REGISTER_BYTES ((FR30_GENREGS + FR30_DEDICATEDREGS)*FR30_REGSIZE)
-
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-#define REGISTER_BYTE(N) ((N) * FR30_REGSIZE)
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-#define REGISTER_NAMES \
-{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
-  "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-  "pc", "ps", "tbr", "rp", "ssp", "usp", "mdh", "mdl" }
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-#define FUNCTION_START_OFFSET 0
-
-/* Amount PC must be decremented by after a breakpoint.
-   This is often the number of bytes in BREAKPOINT
-   but not always.  */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Stack grows downward.  */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-#define R0_REGNUM  0
-#define R1_REGNUM  1
-#define R2_REGNUM  2
-#define R3_REGNUM  3
-#define R4_REGNUM  4
-#define R5_REGNUM  5
-#define R6_REGNUM  6
-#define R7_REGNUM  7
-#define R8_REGNUM  8
-#define R9_REGNUM  9
-#define R10_REGNUM  10
-#define R11_REGNUM  11
-#define R12_REGNUM  12
-#define R13_REGNUM  13
-#define FP_REGNUM 14		/* Frame pointer */
-#define SP_REGNUM 15		/* Stack pointer */
-#define PC_REGNUM 16		/* Program counter */
-#define RP_REGNUM 19		/* Return pointer */
-
-#define FIRST_ARGREG	R4_REGNUM	/* first arg (or struct ret val addr) */
-#define LAST_ARGREG	R7_REGNUM	/* fourth (or third arg) */
-#define RETVAL_REG	R4_REGNUM	/* return vaue */
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-#define REGISTER_SIZE FR30_REGSIZE
-
-/* Number of bytes of storage in the actual machine representation
-   for register N.  */
-#define REGISTER_RAW_SIZE(N) FR30_REGSIZE
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-#define MAX_REGISTER_RAW_SIZE FR30_REGSIZE
-
-/* Number of bytes of storage in the program's representation
-   for register N.  */
-#define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-#define MAX_REGISTER_VIRTUAL_SIZE FR30_REGSIZE
-
-extern void fr30_pop_frame (void);
-#define POP_FRAME fr30_pop_frame()
-
-#define USE_GENERIC_DUMMY_FRAMES 1
-#define CALL_DUMMY                   {0}
-#define CALL_DUMMY_START_OFFSET      (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
-#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-#define CALL_DUMMY_ADDRESS()         entry_point_address ()
-#define PUSH_RETURN_ADDRESS(PC, SP)  (write_register(RP_REGNUM, CALL_DUMMY_ADDRESS()), SP)
-#define PUSH_DUMMY_FRAME	generic_push_dummy_frame ()
-
-/* Number of bytes at start of arglist that are not really args.  */
-#define FRAME_ARGS_SKIP 0
-
-/* Return the GDB type object for the "standard" data type
-   of data in register N.  */
-#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  */
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-    memcpy (VALBUF, REGBUF + REGISTER_BYTE(RETVAL_REG) +  \
-	(TYPE_LENGTH(TYPE) < 4 ? 4 - TYPE_LENGTH(TYPE) : 0), TYPE_LENGTH (TYPE))
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one).  */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-  extract_address (REGBUF + REGISTER_BYTE (RETVAL_REG), \
-		   REGISTER_RAW_SIZE (RETVAL_REG))
-
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-  { write_register (RETVAL_REG, (ADDR)); }
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Return number of args passed to a frame.
-   Can return -1, meaning no way to tell.  */
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Forward decls for prototypes */
-struct frame_info;
-struct frame_saved_regs;
-struct type;
-struct value;
-
-#define EXTRA_FRAME_INFO \
-  struct frame_saved_regs fsr;  \
-  int framesize;		\
-  int frameoffset;		\
-  int framereg;
-
-extern CORE_ADDR fr30_frame_chain (struct frame_info *fi);
-#define FRAME_CHAIN(fi) fr30_frame_chain (fi)
-
-extern CORE_ADDR fr30_frame_saved_pc (struct frame_info *);
-#define FRAME_SAVED_PC(fi) (fr30_frame_saved_pc (fi))
-
-#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
-
-extern CORE_ADDR fr30_skip_prologue (CORE_ADDR pc);
-#define SKIP_PROLOGUE(pc) (fr30_skip_prologue (pc))
-
-/* Write into appropriate registers a function return value of type
-   TYPE, given in virtual format.  VALBUF is in the target byte order;
-   it's typically the VALUE_CONTENTS of some struct value, and those
-   are in the target's byte order.  */
-extern void fr30_store_return_value (struct type *type, char *valbuf);
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  (fr30_store_return_value ((TYPE), (VALBUF)))
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-#define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
-
-/* Use INT #BREAKPOINT_INTNUM instruction for breakpoint */
-#define FR30_BREAKOP	0x1f	/* opcode, type D instruction */
-#define BREAKPOINT_INTNUM 9	/* one of the reserved traps */
-#define BREAKPOINT {FR30_BREAKOP, BREAKPOINT_INTNUM}
-
-/* Define this for Wingdb */
-#define TARGET_FR30
-
-/* Define other aspects of the stack frame.  */
-
-/* An expression that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  */
-extern int fr30_frameless_function_invocation (struct frame_info *frame);
-#define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
-
-extern void fr30_init_extra_frame_info (struct frame_info *fi);
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
-
-#define FRAME_CHAIN_VALID(FP, FI)	generic_file_frame_chain_valid (FP, FI)
-
-extern CORE_ADDR
-fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-		     int struct_return, CORE_ADDR struct_addr);
-#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-
-#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-
-/* Fujitsu's ABI requires all structs to be passed using a pointer.
-   That is obviously not very efficient, so I am leaving the definitions
-   to make gdb work with GCC style struct passing, in case we decide
-   to go for better performance, rather than for compatibility with
-   Fujitsu (just change STRUCT_ALWAYS_BY_ADDR to 0) */
-
-#define STRUCT_ALWAYS_BY_ADDR	1
-
-#if(STRUCT_ALWAYS_BY_ADDR)
-#define REG_STRUCT_HAS_ADDR(gcc_p,type)		1
-#else
-/* more standard GCC (optimized) */
-#define REG_STRUCT_HAS_ADDR(gcc_p,type)		\
-		((TYPE_LENGTH(type) > 4) && (TYPE_LENGTH(type) & 0x3))
-#endif
-/* alway return struct by value by input pointer */
-#define USE_STRUCT_CONVENTION(GCC_P, TYPE)	1
-
-/* The stack should always be aligned on a four-word boundary.  */
-#define STACK_ALIGN(len) (((len) + 3) & ~3)
-
-/* I think the comment about this in value_arg_coerce is wrong; this
-   should be true on any system where you can rely on the prototyping
-   information.  When this is true, value_arg_coerce will promote
-   floats to doubles iff the function is not prototyped.  */
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
+// OBSOLETE /* Parameters for execution on a Fujitsu FR30 processor.
+// OBSOLETE    Copyright 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #define FR30_GENREGS		16
+// OBSOLETE #define FR30_DEDICATEDREGS	8
+// OBSOLETE #define FR30_REGSIZE		4	/* bytes */
+// OBSOLETE 
+// OBSOLETE #define NUM_REGS (FR30_GENREGS + FR30_DEDICATEDREGS)
+// OBSOLETE #define REGISTER_BYTES ((FR30_GENREGS + FR30_DEDICATEDREGS)*FR30_REGSIZE)
+// OBSOLETE 
+// OBSOLETE /* Index within `registers' of the first byte of the space for
+// OBSOLETE    register N.  */
+// OBSOLETE #define REGISTER_BYTE(N) ((N) * FR30_REGSIZE)
+// OBSOLETE 
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE    There should be NUM_REGS strings in this initializer.  */
+// OBSOLETE #define REGISTER_NAMES \
+// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
+// OBSOLETE   "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
+// OBSOLETE   "pc", "ps", "tbr", "rp", "ssp", "usp", "mdh", "mdl" }
+// OBSOLETE 
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE    Zero on most machines.  */
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE 
+// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
+// OBSOLETE    This is often the number of bytes in BREAKPOINT
+// OBSOLETE    but not always.  */
+// OBSOLETE 
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE 
+// OBSOLETE /* Stack grows downward.  */
+// OBSOLETE 
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE 
+// OBSOLETE #define R0_REGNUM  0
+// OBSOLETE #define R1_REGNUM  1
+// OBSOLETE #define R2_REGNUM  2
+// OBSOLETE #define R3_REGNUM  3
+// OBSOLETE #define R4_REGNUM  4
+// OBSOLETE #define R5_REGNUM  5
+// OBSOLETE #define R6_REGNUM  6
+// OBSOLETE #define R7_REGNUM  7
+// OBSOLETE #define R8_REGNUM  8
+// OBSOLETE #define R9_REGNUM  9
+// OBSOLETE #define R10_REGNUM  10
+// OBSOLETE #define R11_REGNUM  11
+// OBSOLETE #define R12_REGNUM  12
+// OBSOLETE #define R13_REGNUM  13
+// OBSOLETE #define FP_REGNUM 14		/* Frame pointer */
+// OBSOLETE #define SP_REGNUM 15		/* Stack pointer */
+// OBSOLETE #define PC_REGNUM 16		/* Program counter */
+// OBSOLETE #define RP_REGNUM 19		/* Return pointer */
+// OBSOLETE 
+// OBSOLETE #define FIRST_ARGREG	R4_REGNUM	/* first arg (or struct ret val addr) */
+// OBSOLETE #define LAST_ARGREG	R7_REGNUM	/* fourth (or third arg) */
+// OBSOLETE #define RETVAL_REG	R4_REGNUM	/* return vaue */
+// OBSOLETE 
+// OBSOLETE /* Say how long (ordinary) registers are.  This is a piece of bogosity
+// OBSOLETE    used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE    real way to know how big a register is.  */
+// OBSOLETE #define REGISTER_SIZE FR30_REGSIZE
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the actual machine representation
+// OBSOLETE    for register N.  */
+// OBSOLETE #define REGISTER_RAW_SIZE(N) FR30_REGSIZE
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  */
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE FR30_REGSIZE
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the program's representation
+// OBSOLETE    for register N.  */
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE FR30_REGSIZE
+// OBSOLETE 
+// OBSOLETE extern void fr30_pop_frame (void);
+// OBSOLETE #define POP_FRAME fr30_pop_frame()
+// OBSOLETE 
+// OBSOLETE #define USE_GENERIC_DUMMY_FRAMES 1
+// OBSOLETE #define CALL_DUMMY                   {0}
+// OBSOLETE #define CALL_DUMMY_START_OFFSET      (0)
+// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
+// OBSOLETE #define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
+// OBSOLETE #define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
+// OBSOLETE #define CALL_DUMMY_ADDRESS()         entry_point_address ()
+// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP)  (write_register(RP_REGNUM, CALL_DUMMY_ADDRESS()), SP)
+// OBSOLETE #define PUSH_DUMMY_FRAME	generic_push_dummy_frame ()
+// OBSOLETE 
+// OBSOLETE /* Number of bytes at start of arglist that are not really args.  */
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE 
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE    of data in register N.  */
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
+// OBSOLETE 
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE    into VALBUF.  */
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE     memcpy (VALBUF, REGBUF + REGISTER_BYTE(RETVAL_REG) +  \
+// OBSOLETE 	(TYPE_LENGTH(TYPE) < 4 ? 4 - TYPE_LENGTH(TYPE) : 0), TYPE_LENGTH (TYPE))
+// OBSOLETE 
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    the address in which a function should return its structure value,
+// OBSOLETE    as a CORE_ADDR (or an expression that can be used as one).  */
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+// OBSOLETE   extract_address (REGBUF + REGISTER_BYTE (RETVAL_REG), \
+// OBSOLETE 		   REGISTER_RAW_SIZE (RETVAL_REG))
+// OBSOLETE 
+// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
+// OBSOLETE   { write_register (RETVAL_REG, (ADDR)); }
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+// OBSOLETE 
+// OBSOLETE /* Return number of args passed to a frame.
+// OBSOLETE    Can return -1, meaning no way to tell.  */
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
+// OBSOLETE 
+// OBSOLETE /* Forward decls for prototypes */
+// OBSOLETE struct frame_info;
+// OBSOLETE struct frame_saved_regs;
+// OBSOLETE struct type;
+// OBSOLETE struct value;
+// OBSOLETE 
+// OBSOLETE #define EXTRA_FRAME_INFO \
+// OBSOLETE   struct frame_saved_regs fsr;  \
+// OBSOLETE   int framesize;		\
+// OBSOLETE   int frameoffset;		\
+// OBSOLETE   int framereg;
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR fr30_frame_chain (struct frame_info *fi);
+// OBSOLETE #define FRAME_CHAIN(fi) fr30_frame_chain (fi)
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR fr30_frame_saved_pc (struct frame_info *);
+// OBSOLETE #define FRAME_SAVED_PC(fi) (fr30_frame_saved_pc (fi))
+// OBSOLETE 
+// OBSOLETE #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR fr30_skip_prologue (CORE_ADDR pc);
+// OBSOLETE #define SKIP_PROLOGUE(pc) (fr30_skip_prologue (pc))
+// OBSOLETE 
+// OBSOLETE /* Write into appropriate registers a function return value of type
+// OBSOLETE    TYPE, given in virtual format.  VALBUF is in the target byte order;
+// OBSOLETE    it's typically the VALUE_CONTENTS of some struct value, and those
+// OBSOLETE    are in the target's byte order.  */
+// OBSOLETE extern void fr30_store_return_value (struct type *type, char *valbuf);
+// OBSOLETE 
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE   (fr30_store_return_value ((TYPE), (VALBUF)))
+// OBSOLETE 
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE    This includes special registers such as pc and fp saved in special
+// OBSOLETE    ways in the stack frame.  sp is even more special:
+// OBSOLETE    the address we return for it IS the sp for the next frame.  */
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
+// OBSOLETE 
+// OBSOLETE /* Use INT #BREAKPOINT_INTNUM instruction for breakpoint */
+// OBSOLETE #define FR30_BREAKOP	0x1f	/* opcode, type D instruction */
+// OBSOLETE #define BREAKPOINT_INTNUM 9	/* one of the reserved traps */
+// OBSOLETE #define BREAKPOINT {FR30_BREAKOP, BREAKPOINT_INTNUM}
+// OBSOLETE 
+// OBSOLETE /* Define this for Wingdb */
+// OBSOLETE #define TARGET_FR30
+// OBSOLETE 
+// OBSOLETE /* Define other aspects of the stack frame.  */
+// OBSOLETE 
+// OBSOLETE /* An expression that tells us whether the function invocation represented
+// OBSOLETE    by FI does not have a frame on the stack associated with it.  */
+// OBSOLETE extern int fr30_frameless_function_invocation (struct frame_info *frame);
+// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) (fr30_frameless_function_invocation (FI));
+// OBSOLETE 
+// OBSOLETE extern void fr30_init_extra_frame_info (struct frame_info *fi);
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) fr30_init_extra_frame_info (fi)
+// OBSOLETE 
+// OBSOLETE #define FRAME_CHAIN_VALID(FP, FI)	generic_file_frame_chain_valid (FP, FI)
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR
+// OBSOLETE fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+// OBSOLETE 		     int struct_return, CORE_ADDR struct_addr);
+// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
+// OBSOLETE   (fr30_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
+// OBSOLETE 
+// OBSOLETE #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
+// OBSOLETE 
+// OBSOLETE /* Fujitsu's ABI requires all structs to be passed using a pointer.
+// OBSOLETE    That is obviously not very efficient, so I am leaving the definitions
+// OBSOLETE    to make gdb work with GCC style struct passing, in case we decide
+// OBSOLETE    to go for better performance, rather than for compatibility with
+// OBSOLETE    Fujitsu (just change STRUCT_ALWAYS_BY_ADDR to 0) */
+// OBSOLETE 
+// OBSOLETE #define STRUCT_ALWAYS_BY_ADDR	1
+// OBSOLETE 
+// OBSOLETE #if(STRUCT_ALWAYS_BY_ADDR)
+// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type)		1
+// OBSOLETE #else
+// OBSOLETE /* more standard GCC (optimized) */
+// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type)		\
+// OBSOLETE 		((TYPE_LENGTH(type) > 4) && (TYPE_LENGTH(type) & 0x3))
+// OBSOLETE #endif
+// OBSOLETE /* alway return struct by value by input pointer */
+// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE)	1
+// OBSOLETE 
+// OBSOLETE /* The stack should always be aligned on a four-word boundary.  */
+// OBSOLETE #define STACK_ALIGN(len) (((len) + 3) & ~3)
+// OBSOLETE 
+// OBSOLETE /* I think the comment about this in value_arg_coerce is wrong; this
+// OBSOLETE    should be true on any system where you can rely on the prototyping
+// OBSOLETE    information.  When this is true, value_arg_coerce will promote
+// OBSOLETE    floats to doubles iff the function is not prototyped.  */
+// OBSOLETE #define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
diff --git a/gdb/config/frv/frv.mt b/gdb/config/frv/frv.mt
new file mode 100644
index 0000000..07fc4e7
--- /dev/null
+++ b/gdb/config/frv/frv.mt
@@ -0,0 +1,5 @@
+# Target: Fujitsu FRV processor
+TDEPFILES= frv-tdep.o
+TM_FILE= tm-frv.h
+#SIM_OBS = remote-sim.o
+#SIM = ../sim/frv/libsim.a
diff --git a/gdb/config/frv/tm-frv.h b/gdb/config/frv/tm-frv.h
new file mode 100644
index 0000000..40a2480
--- /dev/null
+++ b/gdb/config/frv/tm-frv.h
@@ -0,0 +1,62 @@
+/* Target definitions for the Fujitsu FR-V, for GDB, the GNU Debugger.
+   Copyright 2000 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* This target uses an architecture vector for most architecture methods.  */
+
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+
+
+#define TARGET_HW_BREAK_LIMIT 4
+#define TARGET_HW_WATCH_LIMIT 4
+
+#define TARGET_HAS_HARDWARE_WATCHPOINTS
+
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
+	frv_check_watch_resources (type, cnt, ot)
+extern int frv_check_watch_resources (int type, int cnt, int ot);
+
+/* When a hardware watchpoint fires off the PC will be left at the
+   instruction which caused the watchpoint.  It will be necessary for
+   GDB to step over the watchpoint. */
+
+/*#define HAVE_STEPPABLE_WATCHPOINT 1*/
+
+#define STOPPED_BY_WATCHPOINT(W) \
+   ((W).kind == TARGET_WAITKIND_STOPPED \
+   && (W).value.sig == TARGET_SIGNAL_TRAP \
+   && (frv_stopped_data_address() != ((CORE_ADDR)0)))
+extern CORE_ADDR frv_stopped_data_address(void);
+
+/* Use these macros for watchpoint insertion/deletion.  */
+#define target_insert_watchpoint(addr, len, type) \
+		remote_insert_watchpoint (addr, len, type)
+#define target_remove_watchpoint(addr, len, type) \
+		remote_remove_watchpoint (addr, len, type)
+#define target_insert_hw_breakpoint(addr, shadow) \
+		remote_insert_hw_breakpoint (addr, 1)
+#define target_remove_hw_breakpoint(addr, shadow) \
+		remote_remove_hw_breakpoint (addr, 1)
+#define target_stopped_data_address() frv_stopped_data_address()
+
+/* These declarations should be in remote.h, no?  */
+extern int remote_insert_watchpoint (CORE_ADDR addr, int len, int type);
+extern int remote_remove_watchpoint (CORE_ADDR addr, int len, int type);
+extern int remote_insert_hw_breakpoint (CORE_ADDR addr, int len);
+extern int remote_remove_hw_breakpoint (CORE_ADDR addr, int len);
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 08c8cbd..3020e4d 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -166,7 +166,7 @@
 /* FIXME: Won't work with both h8/300's.  */
 
 extern void h8300_extract_return_value (struct type *, char *, char *);
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
     h8300_extract_return_value (TYPE, (char *)(REGBUF), (char *)(VALBUF))
 
 /* Write into appropriate registers a function return value
@@ -175,7 +175,7 @@
 /* FIXME: Won't work with both h8/300's.  */
 
 extern void h8300_store_return_value (struct type *, char *);
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
     h8300_store_return_value(TYPE, (char *) (VALBUF))
 
 /* struct passing and returning stuff */
@@ -188,7 +188,7 @@
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
      extract_address (REGBUF + REGISTER_BYTE (0), \
 		      REGISTER_RAW_SIZE (0))
 
@@ -311,4 +311,4 @@
 /* override the standard get_saved_register function with 
    one that takes account of generic CALL_DUMMY frames */
 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-     generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+     generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index fae6704..30acdbe 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -162,20 +162,20 @@
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE))
 
 /* Write into appropriate registers a function return value
    of type TYPE, given in virtual format.  */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
 
 /* Extract from an array REGBUF containing the (raw) register state
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
 
 
 /* Define other aspects of the stack frame.  */
diff --git a/gdb/config/i386/i386aix.mh b/gdb/config/i386/i386aix.mh
index af88729..df571bf 100644
--- a/gdb/config/i386/i386aix.mh
+++ b/gdb/config/i386/i386aix.mh
@@ -1,9 +1,9 @@
-# Host: IBM PS/2 (i386) running AIX PS/2
-
-XM_FILE= xm-i386aix.h
-
-NAT_FILE= nm-i386aix.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o i386aix-nat.o
-
-# Use gcc. Only coff output can be debugged
-CC=gcc
+# OBSOLETE # Host: IBM PS/2 (i386) running AIX PS/2
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-i386aix.h
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-i386aix.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o i386aix-nat.o
+# OBSOLETE 
+# OBSOLETE # Use gcc. Only coff output can be debugged
+# OBSOLETE CC=gcc
diff --git a/gdb/config/i386/i386aix.mt b/gdb/config/i386/i386aix.mt
index 12e0e1f..57d124d 100644
--- a/gdb/config/i386/i386aix.mt
+++ b/gdb/config/i386/i386aix.mt
@@ -1,7 +1,7 @@
-# This port, for aix ps/2 (i386), will allow you to debug the coff
-# output generated gcc-2.3.3 + gas.  It will not understand IBM's
-# proprietary debug info.
-#
-# Target: IBM PS/2 (i386) running AIX PS/2
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386aix.h
+# OBSOLETE # This port, for aix ps/2 (i386), will allow you to debug the coff
+# OBSOLETE # output generated gcc-2.3.3 + gas.  It will not understand IBM's
+# OBSOLETE # proprietary debug info.
+# OBSOLETE #
+# OBSOLETE # Target: IBM PS/2 (i386) running AIX PS/2
+# OBSOLETE TDEPFILES= i386-tdep.o i387-tdep.o
+# OBSOLETE TM_FILE= tm-i386aix.h
diff --git a/gdb/config/i386/i386aout.mt b/gdb/config/i386/i386aout.mt
index 1c94ba5..2a33369 100644
--- a/gdb/config/i386/i386aout.mt
+++ b/gdb/config/i386/i386aout.mt
@@ -1,3 +1,3 @@
 # Target: Intel 386 with a.out
-TDEPFILES= i386-tdep.o
-TM_FILE= tm-i386v.h
+TDEPFILES= i386-tdep.o i387-tdep.o
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386gnu.mh b/gdb/config/i386/i386gnu.mh
index da444a5..c2eb7af 100644
--- a/gdb/config/i386/i386gnu.mh
+++ b/gdb/config/i386/i386gnu.mh
@@ -4,8 +4,8 @@
 	     notify_S.o process_reply_S.o msg_reply_S.o \
 	     msg_U.o exc_request_U.o exc_request_S.o
 
-XM_FILE= xm-i386gnu.h
-NAT_FILE= nm-gnu.h
+XM_FILE= xm-i386.h
+NAT_FILE= nm-i386gnu.h
 MH_CFLAGS = -D_GNU_SOURCE
 
 XM_CLIBS = -lshouldbeinlibc
diff --git a/gdb/config/i386/i386gnu.mt b/gdb/config/i386/i386gnu.mt
index e08e2a2..dc3edd2 100644
--- a/gdb/config/i386/i386gnu.mt
+++ b/gdb/config/i386/i386gnu.mt
@@ -1,3 +1,3 @@
-# Target: Intel 386/elf/GNU Hurd
-TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386gnu.h
+# Target: Intel 386 running the GNU Hurd
+TDEPFILES= i386-tdep.o i387-tdep.o i386gnu-tdep.o
+TM_FILE= tm-i386v4.h
diff --git a/gdb/config/i386/i386m3.mh b/gdb/config/i386/i386m3.mh
index 41ea30c..7b840e2 100644
--- a/gdb/config/i386/i386m3.mh
+++ b/gdb/config/i386/i386m3.mh
@@ -1,6 +1,6 @@
-# Host: Intel 386 running Mach3
-
-NATDEPFILES= i386m3-nat.o m3-nat.o fork-child.o i387-tdep.o core-aout.o
-NAT_CLIBS= -lmachid -lnetname -lmach
-XM_FILE= xm-i386m3.h
-NAT_FILE= nm-m3.h
+# OBSOLETE # Host: Intel 386 running Mach3
+# OBSOLETE 
+# OBSOLETE NATDEPFILES= i386m3-nat.o m3-nat.o fork-child.o i387-tdep.o core-aout.o
+# OBSOLETE NAT_CLIBS= -lmachid -lnetname -lmach
+# OBSOLETE XM_FILE= xm-i386m3.h
+# OBSOLETE NAT_FILE= nm-m3.h
diff --git a/gdb/config/i386/i386m3.mt b/gdb/config/i386/i386m3.mt
index e985ae3..550e92e 100644
--- a/gdb/config/i386/i386m3.mt
+++ b/gdb/config/i386/i386m3.mt
@@ -1,3 +1,3 @@
-# Target: Intel 386 with a.out under Mach 3
-TDEPFILES= i386-tdep.o 
-TM_FILE= tm-i386m3.h
+# OBSOLETE # Target: Intel 386 with a.out under Mach 3
+# OBSOLETE TDEPFILES= i386-tdep.o 
+# OBSOLETE TM_FILE= tm-i386m3.h
diff --git a/gdb/config/i386/i386mach.mh b/gdb/config/i386/i386mach.mh
index 90dbdf4..4e4e097 100644
--- a/gdb/config/i386/i386mach.mh
+++ b/gdb/config/i386/i386mach.mh
@@ -1,9 +1,9 @@
-# Host: Intel 386 running Mach
-
-# This is for mach2, maybe, or is obsolete (and seems to have only
-# host and native, not target).  Once we get the mach3 stuff working,
-# I think it can go away.
-
-XM_FILE= xm-i386mach.h
-NAT_FILE= nm-i386mach.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o i386mach-nat.o
+# OBSOLETE # Host: Intel 386 running Mach
+# OBSOLETE 
+# OBSOLETE # This is for mach2, maybe, or is obsolete (and seems to have only
+# OBSOLETE # host and native, not target).  Once we get the mach3 stuff working,
+# OBSOLETE # I think it can go away.
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-i386mach.h
+# OBSOLETE NAT_FILE= nm-i386mach.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o i386mach-nat.o
diff --git a/gdb/config/i386/i386nw.mt b/gdb/config/i386/i386nw.mt
index 3109c42..9eafe7d 100644
--- a/gdb/config/i386/i386nw.mt
+++ b/gdb/config/i386/i386nw.mt
@@ -1,3 +1,3 @@
 # Target: Intel 386 running NetWare
 TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386nw.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/i386os9k.mt b/gdb/config/i386/i386os9k.mt
index 5a8794d..939e9e2 100644
--- a/gdb/config/i386/i386os9k.mt
+++ b/gdb/config/i386/i386os9k.mt
@@ -1,3 +1,3 @@
-# Target: Intel 386 running OS9000
-TDEPFILES= i386-tdep.o remote-os9k.o
-TM_FILE= tm-i386os9k.h
+# OBSOLETE # Target: Intel 386 running OS9000
+# OBSOLETE TDEPFILES= i386-tdep.o remote-os9k.o
+# OBSOLETE TM_FILE= tm-i386os9k.h
diff --git a/gdb/config/i386/i386sco5.mt b/gdb/config/i386/i386sco5.mt
index 54dc68d..ace2258 100644
--- a/gdb/config/i386/i386sco5.mt
+++ b/gdb/config/i386/i386sco5.mt
@@ -1,3 +1,3 @@
 # Target: Intel 386 running SCO Open Server 5
 TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386sco5.h
+TM_FILE= tm-i386v4.h
diff --git a/gdb/config/i386/i386sol2.mh b/gdb/config/i386/i386sol2.mh
index ec93f4a..931cc13 100644
--- a/gdb/config/i386/i386sol2.mh
+++ b/gdb/config/i386/i386sol2.mh
@@ -5,4 +5,5 @@
 
 NAT_FILE= nm-i386sol2.h
 NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o \
-	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o
+	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o gcore.o \
+        solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index 86d93a3..f8fabd4 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -1,3 +1,3 @@
-# Target: Intel 386 running SVR4
-TDEPFILES= i386-tdep.o i387-tdep.o solib.o solib-svr4.o solib-legacy.o
+# Target: Intel 386 running Solaris 2 (SVR4)
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o i386bsd-tdep.o
 TM_FILE= tm-i386sol2.h
diff --git a/gdb/config/i386/i386v.mt b/gdb/config/i386/i386v.mt
index 7242d3e..1ee5305 100644
--- a/gdb/config/i386/i386v.mt
+++ b/gdb/config/i386/i386v.mt
@@ -1,3 +1,3 @@
 # Target: Intel 386 running System V
 TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/nm-fbsd.h b/gdb/config/i386/nm-fbsd.h
index b791903..e47e9ef 100644
--- a/gdb/config/i386/nm-fbsd.h
+++ b/gdb/config/i386/nm-fbsd.h
@@ -28,6 +28,10 @@
 
 #include "i386/nm-i386.h"
 
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
 /* Provide access to the i386 hardware debugging registers.  */
 
 #define I386_DR_LOW_SET_CONTROL(control) \
diff --git a/gdb/config/i386/nm-gnu.h b/gdb/config/i386/nm-gnu.h
deleted file mode 100644
index fa6d829..0000000
--- a/gdb/config/i386/nm-gnu.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Native-dependent definitions for Intel 386 running the GNU Hurd
-   Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 the generic hurd definitions.  */
-
-#include "nm-gnu.h"
diff --git a/gdb/config/i386/nm-i386.h b/gdb/config/i386/nm-i386.h
index 500bf7b..eed05a4 100644
--- a/gdb/config/i386/nm-i386.h
+++ b/gdb/config/i386/nm-i386.h
@@ -115,6 +115,10 @@
 
 #define DECR_PC_AFTER_HW_BREAK 0
 
+/* child_post_startup_inferior used to
+   reset all debug registers by calling i386_cleanup_dregs ().  */ 
+#define CHILD_POST_STARTUP_INFERIOR
+
 #endif /* I386_USE_GENERIC_WATCHPOINTS */
 
 #endif /* NM_I386_H */
diff --git a/gdb/config/i386/nm-i386aix.h b/gdb/config/i386/nm-i386aix.h
index 4a6ffc1..08f0779 100644
--- a/gdb/config/i386/nm-i386aix.h
+++ b/gdb/config/i386/nm-i386aix.h
@@ -1,43 +1,43 @@
-/* Native support for i386 aix ps/2.
-   Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*
- * Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com)
- * Revision:     5-May-93 00:11:35
- */
-
-#ifndef NM_I386AIX_H
-#define NM_I386AIX_H 1
-
-/* code to execute to print interesting information about the
- * floating point processor (if any)
- * No need to define if there is nothing to do.
- */
-#define FLOAT_INFO { i386_float_info (); }
-
-/* This is the amount to subtract from u.u_ar0
-   to get the offset in the core file of the register values.  */
-#undef  KERNEL_U_ADDR
-#define KERNEL_U_ADDR 0xf03fd000
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
-#define FETCH_INFERIOR_REGISTERS
-
-#endif /* NM_I386AIX_H */
+// OBSOLETE /* Native support for i386 aix ps/2.
+// OBSOLETE    Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com)
+// OBSOLETE  * Revision:     5-May-93 00:11:35
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #ifndef NM_I386AIX_H
+// OBSOLETE #define NM_I386AIX_H 1
+// OBSOLETE 
+// OBSOLETE /* code to execute to print interesting information about the
+// OBSOLETE  * floating point processor (if any)
+// OBSOLETE  * No need to define if there is nothing to do.
+// OBSOLETE  */
+// OBSOLETE #define FLOAT_INFO { i386_float_info (); }
+// OBSOLETE 
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE    to get the offset in the core file of the register values.  */
+// OBSOLETE #undef  KERNEL_U_ADDR
+// OBSOLETE #define KERNEL_U_ADDR 0xf03fd000
+// OBSOLETE 
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE 
+// OBSOLETE #endif /* NM_I386AIX_H */
diff --git a/gdb/config/i386/nm-i386bsd.h b/gdb/config/i386/nm-i386bsd.h
index 0015af2..628c648 100644
--- a/gdb/config/i386/nm-i386bsd.h
+++ b/gdb/config/i386/nm-i386bsd.h
@@ -28,8 +28,6 @@
 #include <machine/vmparam.h>
 #define KERNEL_U_ADDR USRSTACK
 
-#undef FLOAT_INFO		/* No float info yet */
-
 #define REGISTER_U_ADDR(addr, blockend, regno) \
 	(addr) = i386_register_u_addr ((blockend),(regno));
 
diff --git a/gdb/config/i386/nm-i386gnu.h b/gdb/config/i386/nm-i386gnu.h
new file mode 100644
index 0000000..4fef763
--- /dev/null
+++ b/gdb/config/i386/nm-i386gnu.h
@@ -0,0 +1,38 @@
+/* Native-dependent definitions for Intel 386 running the GNU Hurd
+   Copyright 1994, 1995, 1996, 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 NM_I386GNU_H
+#define NM_I386GNU_H
+
+/* Include common definitions for GNU systems.  */
+#include "config/nm-gnu.h"
+
+/* Thread flavors used in re-setting the T bit.  */
+#define THREAD_STATE_FLAVOR		i386_REGS_SEGS_STATE
+#define THREAD_STATE_SIZE		i386_THREAD_STATE_COUNT
+#define THREAD_STATE_SET_TRACED(state) \
+  	((struct i386_thread_state *) (state))->efl |= 0x100
+#define THREAD_STATE_CLEAR_TRACED(state) \
+  	((((struct i386_thread_state *) (state))->efl &= ~0x100), 1)
+
+/* We can attach and detach.  */
+#define ATTACH_DETACH 1
+
+#endif /* nm-i386gnu.h */
diff --git a/gdb/config/i386/nm-i386lynx.h b/gdb/config/i386/nm-i386lynx.h
index 5d0d41d..bc6a234 100644
--- a/gdb/config/i386/nm-i386lynx.h
+++ b/gdb/config/i386/nm-i386lynx.h
@@ -21,6 +21,6 @@
 #ifndef NM_I386LYNX_H
 #define NM_I386LYNX_H
 
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
 
 #endif /* NM_I386LYNX_H */
diff --git a/gdb/config/i386/nm-i386mach.h b/gdb/config/i386/nm-i386mach.h
index ef10a28..21f3c61 100644
--- a/gdb/config/i386/nm-i386mach.h
+++ b/gdb/config/i386/nm-i386mach.h
@@ -1,30 +1,30 @@
-/* Native definitions for Mach on an Intel 386
-   Copyright 1986, 1987, 1989, 1991, 1992, 1996
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "regcache.h"
-
-/* Do implement the attach and detach commands.  */
-/* #define ATTACH_DETACH        1 */
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
-#define FETCH_INFERIOR_REGISTERS
-
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+// OBSOLETE /* Native definitions for Mach on an Intel 386
+// OBSOLETE    Copyright 1986, 1987, 1989, 1991, 1992, 1996
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE /* Do implement the attach and detach commands.  */
+// OBSOLETE /* #define ATTACH_DETACH        1 */
+// OBSOLETE 
+// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE 
+// OBSOLETE #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
diff --git a/gdb/config/i386/nm-i386sco.h b/gdb/config/i386/nm-i386sco.h
index b467761..e3bdc2d 100644
--- a/gdb/config/i386/nm-i386sco.h
+++ b/gdb/config/i386/nm-i386sco.h
@@ -20,17 +20,6 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#if 0
-/* code to execute to print interesting information about the
-   floating point processor (if any)
-   No need to define if there is nothing to do.
-   On the 386, unfortunately this code is host-dependent (and lives
-   in the i386-xdep.c file), so we can't
-   do this unless we *know* we aren't cross-debugging.  FIXME.
- */
-#define FLOAT_INFO { i386_float_info (); }
-#endif /*0 */
-
 #define REGISTER_U_ADDR(addr, blockend, regno) \
 	(addr) = i386_register_u_addr ((blockend),(regno));
 
diff --git a/gdb/config/i386/nm-i386sco5.h b/gdb/config/i386/nm-i386sco5.h
index db2880c..37a4b16 100644
--- a/gdb/config/i386/nm-i386sco5.h
+++ b/gdb/config/i386/nm-i386sco5.h
@@ -1,5 +1,5 @@
-/* Native support for SCO OpenServer 5
-   Copyright 1996, 1998 Free Software Foundation, Inc.
+/* Native support for SCO OpenServer 5.
+   Copyright 1996, 1998, 2002 Free Software Foundation, Inc.
    Re-written by J. Kean Johnston <jkj@sco.com>.
    Originally written by Robert Lipe <robertl@dgii.com>, based on 
    work by Ian Lance Taylor <ian@cygnus.com> and 
@@ -22,17 +22,57 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef NM_I386SCO5_H
+#define NM_I386SCO5_H
+
 /* Basically, its a lot like the older versions ... */
 #include "i386/nm-i386sco.h"
 
-/* ... but it can do a lot of SVR4 type stuff too. */
+/* ... but it can do a lot of SVR4 type stuff too.  */
 #define SVR4_SHARED_LIBS
-#include "solib.h"		/* Pick up shared library support */
+#include "solib.h"		/* Pick up shared library support.  */
 
-#define ATTACH_DETACH
+/* SCO is unlike other SVR4 systems in that it has SVR4 style shared
+   libs, with a slight twist.  We expect 3 traps (2 for the exec and
+   one for the dynamic loader).  After the third trap we insert the
+   shared library breakpoints, then wait for the 4th trap.  */
 
-/* SCO does not provide <sys/ptrace.h>.  infptrace.c does not 
+#undef START_INFERIOR_TRAPS_EXPECTED
+#define START_INFERIOR_TRAPS_EXPECTED 3
+
+/* SCO does not provide <sys/ptrace.h>.  However, infptrace.c does not
    have defaults for these values.  */
 
 #define PTRACE_ATTACH 10
 #define PTRACE_DETACH 11
+
+/* Return the size of the user struct.  */
+
+#define KERNEL_U_SIZE kernel_u_size ()
+extern int kernel_u_size (void);
+
+/* We can attach and detach.  */
+#define ATTACH_DETACH
+
+/* Hardware-assisted breakpoints and watchpoints.  */
+
+/* We can also do hardware watchpoints.  */
+#define TARGET_HAS_HARDWARE_WATCHPOINTS
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
+
+/* After a watchpoint trap, the PC points to the instruction which
+   caused the trap.  But we can continue over it without disabling the
+   trap.  */
+#define HAVE_CONTINUABLE_WATCHPOINT
+#define HAVE_STEPPABLE_WATCHPOINT
+
+#define STOPPED_BY_WATCHPOINT(W)  \
+  i386_stopped_by_watchpoint (PIDGET (inferior_ptid))
+
+#define target_insert_watchpoint(addr, len, type)  \
+  i386_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type)
+
+#define target_remove_watchpoint(addr, len, type)  \
+  i386_remove_watchpoint (PIDGET (inferior_ptid), addr, len)
+
+#endif /* nm-i386sco5.h */
diff --git a/gdb/config/i386/nm-i386sol2.h b/gdb/config/i386/nm-i386sol2.h
index 0e6b3ef..8a51942 100644
--- a/gdb/config/i386/nm-i386sol2.h
+++ b/gdb/config/i386/nm-i386sol2.h
@@ -18,7 +18,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
 
 #ifdef NEW_PROC_API	/* Solaris 6 and above can do HW watchpoints */
 
diff --git a/gdb/config/i386/nm-i386v.h b/gdb/config/i386/nm-i386v.h
index e7bfca4..f94c5bb 100644
--- a/gdb/config/i386/nm-i386v.h
+++ b/gdb/config/i386/nm-i386v.h
@@ -1,5 +1,6 @@
-/* Native support for i386.
-   Copyright 1986, 1987, 1989, 1992, 1993, 1998, 2000
+/* Native support for i386 running System V (pre-SVR4).
+
+   Copyright 1986, 1987, 1989, 1992, 1993, 1998, 2000, 2002
    Free Software Foundation, Inc.
    Changes for 80386 by Pace Willisson (pace@prep.ai.mit.edu), July 1988.
 
@@ -20,18 +21,24 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#if 0
-/* code to execute to print interesting information about the
-   floating point processor (if any)
-   No need to define if there is nothing to do.
-   On the 386, unfortunately this code is host-dependent (and lives
-   in the i386-xdep.c file), so we can't
-   do this unless we *know* we aren't cross-debugging.  FIXME.
- */
-#define FLOAT_INFO { i386_float_info (); }
-#endif /*0 */
+#ifndef NM_I386V_H
+#define NM_I386V_H
 
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-	(addr) = i386_register_u_addr ((blockend),(regno));
+/* Support for the user struct.  */
 
-extern int i386_register_u_addr (int, int);
+/* This is the amount to subtract from u.u_ar0
+   to get the offset in the core file of the register values.  */
+
+#define REGISTER_U_ADDR(addr, blockend, regnum) \
+  (addr) = register_u_addr ((blockend), (regnum))
+extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regnum);
+
+
+/* Number of traps that happen between exec'ing the shell to run an
+   inferior, and when we finally get to the inferior code.  This is 2
+   on most implementations.  Override here to 4.  */
+
+#undef START_INFERIOR_TRAPS_EXPECTED
+#define START_INFERIOR_TRAPS_EXPECTED 4
+
+#endif /* nm-i386v.h */
diff --git a/gdb/config/i386/nm-i386v4.h b/gdb/config/i386/nm-i386v4.h
index 02d445e..356d3cb 100644
--- a/gdb/config/i386/nm-i386v4.h
+++ b/gdb/config/i386/nm-i386v4.h
@@ -20,7 +20,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
 
 /* Poll causes GDB to hang, at least under Unixware 1.1.2.  */
 #define LOSING_POLL
diff --git a/gdb/config/i386/nm-i386v42mp.h b/gdb/config/i386/nm-i386v42mp.h
index 72e440d..7ded361 100644
--- a/gdb/config/i386/nm-i386v42mp.h
+++ b/gdb/config/i386/nm-i386v42mp.h
@@ -20,4 +20,4 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
index 8ae3ece..073c3a3 100644
--- a/gdb/config/i386/nm-linux.h
+++ b/gdb/config/i386/nm-linux.h
@@ -27,7 +27,7 @@
 #define I386_USE_GENERIC_WATCHPOINTS
 
 #include "i386/nm-i386.h"
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* Support for the user area.  */
 
@@ -77,6 +77,11 @@
 #define CANNOT_FETCH_REGISTER(regno) cannot_fetch_register (regno)
 #define CANNOT_STORE_REGISTER(regno) cannot_store_register (regno)
 
+#ifdef HAVE_PTRACE_GETFPXREGS
+/* Include register set support for the SSE registers.  */
+#define FILL_FPXREGSET
+#endif
+
 /* Override child_resume in `infptrace.c'.  */
 #define CHILD_RESUME
 
diff --git a/gdb/config/i386/nm-m3.h b/gdb/config/i386/nm-m3.h
index 00128cf..87d587b 100644
--- a/gdb/config/i386/nm-m3.h
+++ b/gdb/config/i386/nm-m3.h
@@ -1,23 +1,23 @@
-/* Native-dependent definitions for Intel 386 running Mach 3.
-   Copyright 1994 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 the generic Mach 3 definitions.  */
-
-#include "nm-m3.h"
+// OBSOLETE /* Native-dependent definitions for Intel 386 running Mach 3.
+// OBSOLETE    Copyright 1994 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Include the generic Mach 3 definitions.  */
+// OBSOLETE 
+// OBSOLETE #include "config/nm-m3.h"
diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h
index 32b76d2..253b194 100644
--- a/gdb/config/i386/nm-ptx4.h
+++ b/gdb/config/i386/nm-ptx4.h
@@ -22,11 +22,11 @@
 
 #include "regcache.h"
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
 
 #undef USE_PROC_FS
 
-#include "nm-symmetry.h"
+#include "i386/nm-symmetry.h"
 
 #define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0)
 #define PTRACE_WRITE_REGS(pid,regaddr) \
diff --git a/gdb/config/i386/nm-x86-64.h b/gdb/config/i386/nm-x86-64linux.h
similarity index 98%
rename from gdb/config/i386/nm-x86-64.h
rename to gdb/config/i386/nm-x86-64linux.h
index 30e3731..4430fcb 100644
--- a/gdb/config/i386/nm-x86-64.h
+++ b/gdb/config/i386/nm-x86-64linux.h
@@ -23,7 +23,7 @@
 #ifndef NM_X86_64_H
 #define NM_X86_64_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 #define I386_USE_GENERIC_WATCHPOINTS
 #include "i386/nm-i386.h"
diff --git a/gdb/config/i386/obsd.mh b/gdb/config/i386/obsd.mh
index d9593ce..ec22fcb 100644
--- a/gdb/config/i386/obsd.mh
+++ b/gdb/config/i386/obsd.mh
@@ -3,5 +3,9 @@
 XM_FILE= xm-i386.h
 
 NAT_FILE= nm-obsd.h
-# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-sunos.o corelow.o core-aout.o i386-nat.o i386bsd-nat.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o i386bsd-nat.o i386obsd-nat.o \
+	solib.o solib-sunos.o
+
+# The OpenBSD yacc generates yyname and yyrule tables that conflict at
+# link time if we define YYDEBUG to a non-zero value.
+MH_CFLAGS= -DYYDEBUG=0
diff --git a/gdb/config/i386/obsd.mt b/gdb/config/i386/obsd.mt
deleted file mode 100644
index 5c96426..0000000
--- a/gdb/config/i386/obsd.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Intel 386 running OpenBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o
-TM_FILE= tm-obsd.h
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 1d49133..59f60f0 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -25,16 +25,9 @@
 #else
 #undef HAVE_SSE_REGS
 #endif /* CONTEXT_EXTENDED_REGISTERS */
-#define HAVE_I387_REGS
 
 #include "i386/tm-i386.h"
 
-#if 0
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
-#define SKIP_TRAMPOLINE_CODE(pc)           skip_trampoline_code (pc, 0)
-extern CORE_ADDR skip_trampoline_code (CORE_ADDR pc, char *name);
-#endif
-
 #define ATTACH_NO_WAIT
 #define SOLIB_ADD(filename, from_tty, targ, readsyms) child_solib_add(filename, from_tty, targ, readsyms)
 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) child_solib_loaded_library_pathname(pid)
diff --git a/gdb/config/i386/tm-fbsd.h b/gdb/config/i386/tm-fbsd.h
index 61f5de5..1975a9b 100644
--- a/gdb/config/i386/tm-fbsd.h
+++ b/gdb/config/i386/tm-fbsd.h
@@ -21,69 +21,22 @@
 #ifndef TM_FBSD_H
 #define TM_FBSD_H
 
-#define HAVE_I387_REGS
 #include "i386/tm-i386.h"
 
-/* FreeBSD/ELF uses stabs-in-ELF with the DWARF register numbering
-   scheme by default, so we must redefine STAB_REG_TO_REGNUM.  This
-   messes up the floating-point registers for a.out, but there is not
-   much we can do about that.  */
-
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* FreeBSD uses the old gcc convention for struct returns.  */
-
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
-  generic_use_struct_convention (1, type)
-
-
-/* Support for longjmp.  */
-
-/* Details about jmp_buf.  It's supposed to be an array of integers.  */
-
-#define JB_ELEMENT_SIZE 4	/* Size of elements in jmp_buf.  */
-#define JB_PC		0	/* Array index of saved PC.  */
-
-/* Figure out where the longjmp will land.  Store the address that
-   longjmp will jump to in *ADDR, and return non-zero if successful.  */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
-
-
-/* Support for signal handlers.  */
-
-#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
-extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 
 /* These defines allow the recognition of sigtramps as a function name
    <sigtramp>.
 
-   FIXME: kettenis/2001-07-13: These should be added to the target
-   vector and turned into functions when we go "multi-arch".  */
+   FIXME: kettenis/2002-05-12: Of course these defines will have to go
+   if we go truly "multi-arch", but I don't know yet how to get rid of
+   them.  */
 
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
-extern CORE_ADDR i386bsd_sigtramp_start;
-extern CORE_ADDR i386bsd_sigtramp_end;
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers.  */
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
-extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
-
-
-/* Shared library support.  */
-
-#ifndef SVR4_SHARED_LIBS
-
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-  (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* !SVR4_SHARED_LIBS */
+#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
+#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
+extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
+extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
 
 #endif /* TM_FBSD_H */
diff --git a/gdb/config/i386/tm-go32.h b/gdb/config/i386/tm-go32.h
index b660827..85e0888 100644
--- a/gdb/config/i386/tm-go32.h
+++ b/gdb/config/i386/tm-go32.h
@@ -22,47 +22,7 @@
 #define TM_GO32_H
 
 #undef HAVE_SSE_REGS	/* FIXME! go32-nat.c needs to support XMMi registers */
-#define HAVE_I387_REGS
 
 #include "i386/tm-i386.h"
 
-/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
-   chain-pointer.
-   In the case of the i386, the frame's nominal address
-   is the address of a 4-byte word containing the calling frame's address.
-   DJGPP doesn't have any special frames for signal handlers, they are
-   just normal C functions. */
-#undef  FRAME_CHAIN
-#define FRAME_CHAIN(thisframe) \
-  (!inside_entry_file ((thisframe)->pc) ? \
-   read_memory_integer ((thisframe)->frame, 4) :\
-   0)
-
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-#undef  FRAMELESS_FUNCTION_INVOCATION
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
-     (frameless_look_for_prologue(FI))
-
-extern CORE_ADDR i386go32_frame_saved_pc (struct frame_info *frame);
-#undef  FRAME_SAVED_PC
-#define FRAME_SAVED_PC(FRAME) (i386go32_frame_saved_pc ((FRAME)))
-
-/* Support for longjmp.  */
-
-/* Details about jmp_buf.  It's supposed to be an array of integers.  */
-
-#define JB_ELEMENT_SIZE 4	/* Size of elements in jmp_buf.  */
-#define JB_PC		8	/* Array index of saved PC inside jmp_buf.  */
-
-/* Figure out where the longjmp will land.  Slurp the args out of the
-   stack.  We expect the first arg to be a pointer to the jmp_buf
-   structure from which we extract the pc (JB_PC) that we will land
-   at.  The pc is copied into ADDR.  This routine returns true on
-   success.  */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
-
 #endif /* TM_GO32_H */
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index f9326fe..e80b258 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -24,356 +24,8 @@
 
 #define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
 
-#include "regcache.h"
-
-/* Forward declarations for prototypes.  */
-struct frame_info;
-struct frame_saved_regs;
-struct value;
-struct type;
-
-/* The format used for `long double' on almost all i386 targets is the
-   i387 extended floating-point format.  In fact, of all targets in the
-   GCC 2.95 tree, only OSF/1 does it different, and insists on having
-   a `long double' that's not `long' at all.  */
-
-#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i387_ext
-
-/* Although the i386 extended floating-point has only 80 significant
-   bits, a `long double' actually takes up 96, probably to enforce
-   alignment.  */
-
-#define TARGET_LONG_DOUBLE_BIT 96
-
-/* Number of traps that happen between exec'ing the shell to run an
-   inferior, and when we finally get to the inferior code.  This is 2
-   on most implementations. */
-
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions to reach some
-   "real" code.  */
-
-#define SKIP_PROLOGUE(frompc)   (i386_skip_prologue (frompc))
-
-extern int i386_skip_prologue (int);
-
-/* Immediately after a function call, return the saved pc.  */
-
-#define SAVED_PC_AFTER_CALL(frame) i386_saved_pc_after_call (frame)
-extern CORE_ADDR i386_saved_pc_after_call (struct frame_info *frame);
-
-/* Stack grows downward.  */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction.  */
-
-#define BREAKPOINT {0xcc}
-
-/* Amount PC must be decremented by after a breakpoint.  This is often the
-   number of bytes in BREAKPOINT but not always. */
-
-#define DECR_PC_AFTER_BREAK 1
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-
-#define REGISTER_SIZE 4
-
-/* This register file is parameterized by two macros:
-   HAVE_I387_REGS --- register file should include i387 registers
-   HAVE_SSE_REGS  --- register file should include SSE registers
-   If HAVE_SSE_REGS is #defined, then HAVE_I387_REGS must also be #defined.
-   
-   However, GDB code should not test those macros with #ifdef, since
-   that makes code which is annoying to multi-arch.  Instead, GDB code
-   should check the values of NUM_GREGS, NUM_FREGS, and NUM_SSE_REGS,
-   which will eventually get mapped onto architecture vector entries.
-
-   It's okay to use the macros in tm-*.h files, though, since those
-   files will get completely replaced when we multi-arch anyway.  */
-
-/* Number of general registers, present on every 32-bit x86 variant.  */
-#define NUM_GREGS (16)
-
-/* Number of floating-point unit registers.  */
-#ifdef HAVE_I387_REGS
-#define NUM_FREGS (16)
-#else
-#define NUM_FREGS (0)
-#endif
-
-/* Number of SSE registers.  */
-#ifdef HAVE_SSE_REGS
-#define NUM_SSE_REGS (9)
-#else
-#define NUM_SSE_REGS (0)
-#endif
-
-/* Largest number of registers we could have in any configuration.  */
-#define MAX_NUM_REGS (16 + 16 + 9)
-
-/* Register numbers of various important registers.
-   Note that some of these values are "real" register numbers,
-   and correspond to the general registers of the machine,
-   and some are "phony" register numbers which are too large
-   to be actual register numbers as far as the user is concerned
-   but do serve to get the desired values when passed to read_register.  */
-
-#define FP_REGNUM 5		/* (ebp) Contains address of executing stack
-				   frame */
-#define SP_REGNUM 4		/* (usp) Contains address of top of stack */
-#define PC_REGNUM 8		/* (eip) Contains program counter */
-#define PS_REGNUM 9		/* (ps)  Contains processor status */
-
-/* First FPU data register.  */
-#ifdef HAVE_I387_REGS
-#define FP0_REGNUM 16
-#else
-#define FP0_REGNUM 0
-#endif
-
-/* Return the name of register REG.  */
-
-#define REGISTER_NAME(reg) i386_register_name ((reg))
-extern char *i386_register_name (int reg);
-
-/* Use the "default" register numbering scheme for stabs and COFF.  */
-
-#define STAB_REG_TO_REGNUM(reg) i386_stab_reg_to_regnum ((reg))
-#define SDB_REG_TO_REGNUM(reg) i386_stab_reg_to_regnum ((reg))
-extern int i386_stab_reg_to_regnum (int reg);
-
-/* Use the DWARF register numbering scheme for DWARF and DWARF 2.  */
-
-#define DWARF_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-#define DWARF2_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-extern int i386_dwarf_reg_to_regnum (int reg);
-
-/* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to be
-   in use on any of the supported i386 targets.  */
-
-
-/* Sizes of individual register sets.  These cover the entire register
-   file, so summing up the sizes of those portions actually present
-   yields REGISTER_BYTES.  */
-#define SIZEOF_GREGS (NUM_GREGS * 4)
-#define SIZEOF_FPU_REGS (8 * 10)
-#define SIZEOF_FPU_CTRL_REGS (8 * 4)
-#define SIZEOF_SSE_REGS (8 * 16 + 4)
-
-
-/* Total amount of space needed to store our copies of the machine's register
-   state, the array `registers'. */
-#ifdef HAVE_SSE_REGS
-#define REGISTER_BYTES \
-  (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS)
-#else
-#ifdef HAVE_I387_REGS
-#define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS)
-#else
-#define REGISTER_BYTES (SIZEOF_GREGS)
-#endif
-#endif
-
-/* Return the offset into the register array of the start of register
-   number REG.  */
-#define REGISTER_BYTE(reg) i386_register_byte ((reg))
-extern int i386_register_byte (int reg);
-
-/* Return the number of bytes of storage in GDB's register array
-   occupied by register REG.  */
-#define REGISTER_RAW_SIZE(reg) i386_register_raw_size ((reg))
-extern int i386_register_raw_size (int reg);
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-#define MAX_REGISTER_RAW_SIZE 16
-
-/* Return the size in bytes of the virtual type of register REG.  */
-#define REGISTER_VIRTUAL_SIZE(reg) i386_register_virtual_size ((reg))
-extern int i386_register_virtual_size (int reg);
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-#define MAX_REGISTER_VIRTUAL_SIZE 16
-
-/* Return the GDB type object for the "standard" data type of data in
-   register REGNUM.  */
-
-#define REGISTER_VIRTUAL_TYPE(regnum) i386_register_virtual_type (regnum)
-extern struct type *i386_register_virtual_type (int regnum);
-
-/* Return true iff register REGNUM's virtual format is different from
-   its raw format.  */
-
-#define REGISTER_CONVERTIBLE(regnum) i386_register_convertible (regnum)
-extern int i386_register_convertible (int regnum);
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
-   virtual format with type TYPE in buffer TO.  */
-
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) \
-  i386_register_convert_to_virtual ((regnum), (type), (from), (to))
-extern void i386_register_convert_to_virtual (int regnum, struct type *type,
-					      char *from, char *to);
-
-/* Convert data from virtual format with type TYPE in buffer FROM to
-   raw format for register REGNUM in buffer TO.  */
-
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) \
-  i386_register_convert_to_raw ((type), (regnum), (from), (to))
-extern void i386_register_convert_to_raw (struct type *type, int regnum,
-					  char *from, char *to);
-
-/* Print out the i387 floating point state.  */
-#ifdef HAVE_I387_REGS
-extern void i387_float_info (void);
-#define FLOAT_INFO { i387_float_info (); }
-#endif
-
-
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-  i386_push_arguments ((nargs), (args), (sp), (struct_return), (struct_addr))
-extern CORE_ADDR i386_push_arguments (int nargs, struct value **args,
-				      CORE_ADDR sp, int struct_return,
-				      CORE_ADDR struct_addr);
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function.  */
-
-#define STORE_STRUCT_RETURN(addr, sp) \
-  i386_store_struct_return ((addr), (sp))
-extern void i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  */
-
-#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) \
-  i386_extract_return_value ((type), (regbuf), (valbuf))
-extern void i386_extract_return_value (struct type *type, char *regbuf,
-				       char *valbuf);
-
-/* Write into the appropriate registers a function return value stored
-   in VALBUF of type TYPE, given in virtual format.  */
-
-#define STORE_RETURN_VALUE(type, valbuf) \
-  i386_store_return_value ((type), (valbuf))
-extern void i386_store_return_value (struct type *type, char *valbuf);
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR.  */
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) \
-  i386_extract_struct_value_address ((regbuf))
-extern CORE_ADDR i386_extract_struct_value_address (char *regbuf);
-
-/* The following redefines make backtracing through sigtramp work.
-   They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
-   from the sigcontext structure which is pushed by the kernel on the
-   user stack, along with a pointer to it.  */
-
-/* Return the chain-pointer for FRAME.  In the case of the i386, the
-   frame's nominal address is the address of a 4-byte word containing
-   the calling frame's address.  */
-
-#define FRAME_CHAIN(frame) i386_frame_chain ((frame))
-extern CORE_ADDR i386_frame_chain (struct frame_info *frame);
-
-/* Determine whether the function invocation represented by FRAME does
-   not have a from on the stack associated with it.  If it does not,
-   return non-zero, otherwise return zero.  */
-
-#define FRAMELESS_FUNCTION_INVOCATION(frame) \
-  i386_frameless_function_invocation (frame)
-extern int i386_frameless_function_invocation (struct frame_info *frame);
-
-/* Return the saved program counter for FRAME.  */
-
-#define FRAME_SAVED_PC(frame) i386_frame_saved_pc (frame)
-extern CORE_ADDR i386_frame_saved_pc (struct frame_info *frame);
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Return number of args passed to a frame.  Can return -1, meaning no way
-   to tell, which is typical now that the C compiler delays popping them.  */
-
-#define FRAME_NUM_ARGS(fi) (i386_frame_num_args(fi))
-
-extern int i386_frame_num_args (struct frame_info *);
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 8
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-
-extern void i386_frame_init_saved_regs (struct frame_info *);
-#define FRAME_INIT_SAVED_REGS(FI) i386_frame_init_saved_regs (FI)
-
-
-
-/* Things needed for making the inferior call functions.  */
-
-/* "An argument's size is increased, if necessary, to make it a
-   multiple of [32 bit] words.  This may require tail padding,
-   depending on the size of the argument" - from the x86 ABI.  */
-#define PARM_BOUNDARY 32
-
-/* Push an empty stack frame, to record the current PC, etc.  */
-
-#define PUSH_DUMMY_FRAME { i386_push_dummy_frame (); }
-
-extern void i386_push_dummy_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-
-#define POP_FRAME  { i386_pop_frame (); }
-
-extern void i386_pop_frame (void);
-
-
-/* this is 
- *   call 11223344 (32 bit relative)
- *   int3
- */
-
-#define CALL_DUMMY { 0x223344e8, 0xcc11 }
-
-#define CALL_DUMMY_LENGTH 8
-
-#define CALL_DUMMY_START_OFFSET 0	/* Start execution at beginning of dummy */
-
-#define CALL_DUMMY_BREAKPOINT_OFFSET 5
-
-/* Insert the specified number of args and function address
-   into a call sequence of the above form stored at DUMMYNAME.  */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-  i386_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
-extern void i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
-				 int nargs, struct value **args,
-				 struct type *type, int gcc_p);
-
 /* FIXME: kettenis/2000-06-12: These do not belong here.  */
 extern void print_387_control_word (unsigned int);
 extern void print_387_status_word (unsigned int);
 
-/* Offset from SP to first arg on stack at first instruction of a function */
-
-#define SP_ARG0 (1 * 4)
-
 #endif /* ifndef TM_I386_H */
diff --git a/gdb/config/i386/tm-i386aix.h b/gdb/config/i386/tm-i386aix.h
index a8f24ed..fe11420 100644
--- a/gdb/config/i386/tm-i386aix.h
+++ b/gdb/config/i386/tm-i386aix.h
@@ -1,48 +1,48 @@
-/* Macro defintions for IBM AIX PS/2 (i386).
-   Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 2000
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com).  */
-
-#ifndef TM_I386AIX_H
-#define TM_I386AIX_H 1
-
-#include "i386/tm-i386.h"
-#include <sys/reg.h>
-
-#ifndef I386
-#define I386 1
-#endif
-
-/* AIX/i386 has FPU support.  However, the native configuration (which
-   is the only supported configuration) doesn't make the FPU control
-   registers available.  Override the appropriate symbols such that
-   only the normal FPU registers are included in GDB's register array.  */
-
-#undef NUM_FPREGS
-#define NUM_FPREGS (8)
-
-#undef NUM_REGS
-#define NUM_REGS (NUM_GREGS + NUM_FPREGS)
-
-#undef REGISTER_BYTES
-#define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS)
-
-#endif /* TM_I386AIX_H */
+// OBSOLETE /* Macro defintions for IBM AIX PS/2 (i386).
+// OBSOLETE    Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 2000
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com).  */
+// OBSOLETE 
+// OBSOLETE #ifndef TM_I386AIX_H
+// OBSOLETE #define TM_I386AIX_H 1
+// OBSOLETE 
+// OBSOLETE #include "i386/tm-i386.h"
+// OBSOLETE #include <sys/reg.h>
+// OBSOLETE 
+// OBSOLETE #ifndef I386
+// OBSOLETE #define I386 1
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* AIX/i386 has FPU support.  However, the native configuration (which
+// OBSOLETE    is the only supported configuration) doesn't make the FPU control
+// OBSOLETE    registers available.  Override the appropriate symbols such that
+// OBSOLETE    only the normal FPU registers are included in GDB's register array.  */
+// OBSOLETE 
+// OBSOLETE #undef NUM_FPREGS
+// OBSOLETE #define NUM_FPREGS (8)
+// OBSOLETE 
+// OBSOLETE #undef NUM_REGS
+// OBSOLETE #define NUM_REGS (NUM_GREGS + NUM_FPREGS)
+// OBSOLETE 
+// OBSOLETE #undef REGISTER_BYTES
+// OBSOLETE #define REGISTER_BYTES (SIZEOF_GREGS + SIZEOF_FPU_REGS)
+// OBSOLETE 
+// OBSOLETE #endif /* TM_I386AIX_H */
diff --git a/gdb/config/i386/tm-i386gnu.h b/gdb/config/i386/tm-i386gnu.h
deleted file mode 100644
index 00cb5a9..0000000
--- a/gdb/config/i386/tm-i386gnu.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Macro definitions for i386 running the GNU Hurd.
-   Copyright 1992, 1999, 2000 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_I386GNU_H
-#define TM_I386GNU_H 1
-
-/* Include common definitions for GNU systems.
-   FIXME: This does not belong here since this is supposed to contain
-   only native-dependent information.  */
-#include "nm-gnu.h"
-
-/* Thread flavors used in re-setting the T bit.
-   FIXME: This is native-dependent.  */
-#define THREAD_STATE_FLAVOR		i386_REGS_SEGS_STATE
-#define THREAD_STATE_SIZE		i386_THREAD_STATE_COUNT
-#define THREAD_STATE_SET_TRACED(state) \
-  	((struct i386_thread_state *)state)->efl |= 0x100
-#define THREAD_STATE_CLEAR_TRACED(state) \
-  	((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
-
-/* We can attach and detach.
-   FIXME: This is probably native-dependent too.  */
-#define ATTACH_DETACH 1
-
-#define HAVE_I387_REGS
-#include "i386/tm-i386.h"
-
-/* We use stabs-in-ELF with the DWARF register numbering scheme.  */
-
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* Offset to saved PC in sigcontext.  */
-#define SIGCONTEXT_PC_OFFSET 68
-
-/* We need this file for the SOLIB_TRAMPOLINE stuff.  */
-#include "tm-sysv4.h"
-
-#endif /* TM_I386GNU_H */
diff --git a/gdb/config/i386/tm-i386lynx.h b/gdb/config/i386/tm-i386lynx.h
index 842f9a7..03fe4ff 100644
--- a/gdb/config/i386/tm-i386lynx.h
+++ b/gdb/config/i386/tm-i386lynx.h
@@ -1,5 +1,5 @@
 /* Macro definitions for Intel 386 running under LynxOS.
-   Copyright 1993, 1995 Free Software Foundation, Inc.
+   Copyright 1993, 1995, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,14 +21,9 @@
 #ifndef TM_I386LYNX_H
 #define TM_I386LYNX_H
 
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
 
 /* Most definitions from sysv could be used. */
 #include "i386/tm-i386.h"
 
-#undef SAVED_PC_AFTER_CALL
-
-#define SAVED_PC_AFTER_CALL i386lynx_saved_pc_after_call
-CORE_ADDR i386lynx_saved_pc_after_call ();
-
 #endif /* TM_I386LYNX_H */
diff --git a/gdb/config/i386/tm-i386m3.h b/gdb/config/i386/tm-i386m3.h
index edc301d..cadd5cd 100644
--- a/gdb/config/i386/tm-i386m3.h
+++ b/gdb/config/i386/tm-i386m3.h
@@ -1,56 +1,56 @@
-/* Macro definitions for i386, Mach 3.0
-   Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 common definitions for Mach3 systems */
-#include "nm-m3.h"
-
-/* Define offsets to access CPROC stack when it does not have
- * a kernel thread.
- */
-#define MACHINE_CPROC_SP_OFFSET 20
-#define MACHINE_CPROC_PC_OFFSET 16
-#define MACHINE_CPROC_FP_OFFSET 12
-
-/* Thread flavors used in re-setting the T bit.
- * @@ this is also bad for cross debugging.
- */
-#define TRACE_FLAVOR		i386_THREAD_STATE
-#define TRACE_FLAVOR_SIZE	i386_THREAD_STATE_COUNT
-#define TRACE_SET(x,state) \
-  	((struct i386_thread_state *)state)->efl |= 0x100
-#define TRACE_CLEAR(x,state) \
-  	((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
-
-/* we can do it */
-#define ATTACH_DETACH 1
-
-/* Sigh. There should be a file for i386 but no sysv stuff in it */
-#include "i386/tm-i386.h"
-
-/* I want to test this float info code. See comment in tm-i386v.h */
-#undef FLOAT_INFO
-#define FLOAT_INFO { i386_mach3_float_info (); }
-
-/* Address of end of stack space.
- * for MACH, see <machine/vmparam.h>
- * @@@ I don't know what is in the 5 ints...
- */
-#undef  STACK_END_ADDR
-#define STACK_END_ADDR (0xc0000000-sizeof(int [5]))
+// OBSOLETE /* Macro definitions for i386, Mach 3.0
+// OBSOLETE    Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Include common definitions for Mach3 systems */
+// OBSOLETE #include "config/nm-m3.h"
+// OBSOLETE 
+// OBSOLETE /* Define offsets to access CPROC stack when it does not have
+// OBSOLETE  * a kernel thread.
+// OBSOLETE  */
+// OBSOLETE #define MACHINE_CPROC_SP_OFFSET 20
+// OBSOLETE #define MACHINE_CPROC_PC_OFFSET 16
+// OBSOLETE #define MACHINE_CPROC_FP_OFFSET 12
+// OBSOLETE 
+// OBSOLETE /* Thread flavors used in re-setting the T bit.
+// OBSOLETE  * @@ this is also bad for cross debugging.
+// OBSOLETE  */
+// OBSOLETE #define TRACE_FLAVOR		i386_THREAD_STATE
+// OBSOLETE #define TRACE_FLAVOR_SIZE	i386_THREAD_STATE_COUNT
+// OBSOLETE #define TRACE_SET(x,state) \
+// OBSOLETE   	((struct i386_thread_state *)state)->efl |= 0x100
+// OBSOLETE #define TRACE_CLEAR(x,state) \
+// OBSOLETE   	((((struct i386_thread_state *)state)->efl &= ~0x100), 1)
+// OBSOLETE 
+// OBSOLETE /* we can do it */
+// OBSOLETE #define ATTACH_DETACH 1
+// OBSOLETE 
+// OBSOLETE /* Sigh. There should be a file for i386 but no sysv stuff in it */
+// OBSOLETE #include "i386/tm-i386.h"
+// OBSOLETE 
+// OBSOLETE /* I want to test this float info code. See comment in tm-i386v.h */
+// OBSOLETE #undef FLOAT_INFO
+// OBSOLETE #define FLOAT_INFO { i386_mach3_float_info (); }
+// OBSOLETE 
+// OBSOLETE /* Address of end of stack space.
+// OBSOLETE  * for MACH, see <machine/vmparam.h>
+// OBSOLETE  * @@@ I don't know what is in the 5 ints...
+// OBSOLETE  */
+// OBSOLETE #undef  STACK_END_ADDR
+// OBSOLETE #define STACK_END_ADDR (0xc0000000-sizeof(int [5]))
diff --git a/gdb/config/i386/tm-i386mk.h b/gdb/config/i386/tm-i386mk.h
index e46ca55..74355a8 100644
--- a/gdb/config/i386/tm-i386mk.h
+++ b/gdb/config/i386/tm-i386mk.h
@@ -1,38 +1,38 @@
-/* Macro definitions for i386, Mach 3.0, OSF 1/MK
-   Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Until OSF switches to a newer Mach kernel that has
- * a different get_emul_vector() interface.
- */
-#define MK67 1
-
-#include "i386/tm-i386m3.h"
-
-/* FIMXE: kettenis/2000-03-26: On OSF 1, `long double' is equivalent
-   to `double'.  However, I'm not sure what is the consequence of:
-
-   #define TARGET_LONG_DOUBLE_FORMAT TARGET_DOUBLE_FORMAT
-   #define TARGET_LONG_DOUBLE_BIT TARGET_DOUBLE_BIT
-
-   So I'll go with the current status quo instead.  It looks like this
-   target won't compile anyway.  Perhaps it should be obsoleted?  */
-   
-#undef TARGET_LONG_DOUBLE_FORMAT
-#undef TARGET_LONG_DOUBLE_BIT
+// OBSOLETE /* Macro definitions for i386, Mach 3.0, OSF 1/MK
+// OBSOLETE    Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Until OSF switches to a newer Mach kernel that has
+// OBSOLETE  * a different get_emul_vector() interface.
+// OBSOLETE  */
+// OBSOLETE #define MK67 1
+// OBSOLETE 
+// OBSOLETE #include "i386/tm-i386m3.h"
+// OBSOLETE 
+// OBSOLETE /* FIMXE: kettenis/2000-03-26: On OSF 1, `long double' is equivalent
+// OBSOLETE    to `double'.  However, I'm not sure what is the consequence of:
+// OBSOLETE 
+// OBSOLETE    #define TARGET_LONG_DOUBLE_FORMAT TARGET_DOUBLE_FORMAT
+// OBSOLETE    #define TARGET_LONG_DOUBLE_BIT TARGET_DOUBLE_BIT
+// OBSOLETE 
+// OBSOLETE    So I'll go with the current status quo instead.  It looks like this
+// OBSOLETE    target won't compile anyway.  Perhaps it should be obsoleted?  */
+// OBSOLETE    
+// OBSOLETE #undef TARGET_LONG_DOUBLE_FORMAT
+// OBSOLETE #undef TARGET_LONG_DOUBLE_BIT
diff --git a/gdb/config/i386/tm-i386nw.h b/gdb/config/i386/tm-i386nw.h
deleted file mode 100644
index 9ede2c0..0000000
--- a/gdb/config/i386/tm-i386nw.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Macro definitions for i386 running NetWare.
-   Copyright 1993, 1994, 1995, 1998, 1999, 2000
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_I386NW_H
-#define TM_I386NW_H 1
-
-#include "i386/tm-i386.h"
-
-/* Stop backtracing when we wander into main.  */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-
-/* Offsets (in target ints) into jmp_buf.  Not defined in any system header
-   file, so we have to step through setjmp/longjmp with a debugger and figure
-   them out.  */
-
-#define JB_ELEMENT_SIZE 4	/* jmp_buf[] is array of ints */
-
-#define JB_PC	6		/* Setjmp()'s return PC saved here */
-
-/* Figure out where the longjmp will land.  Slurp the args out of the stack.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into ADDR.
-   This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-#endif /* ifndef TM_I386NW_H */
diff --git a/gdb/config/i386/tm-i386sco5.h b/gdb/config/i386/tm-i386sco5.h
deleted file mode 100644
index e4cb014..0000000
--- a/gdb/config/i386/tm-i386sco5.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Macro definitions for GDB on an Intel i386 running SCO Open Server 5.
-   Copyright 1998 Free Software Foundation, Inc.
-   Written by J. Kean Johnston (jkj@sco.com).
-
-   This file is part of GDB.
-
-   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 TM_I386SCO5_H
-#define TM_I386SCO5_H 1
-
-/* Pick up most of what we need from the generic i386 target include file. */
-
-#include "i386/tm-i386.h"
-
-/* Pick up more stuff from the generic SYSV and SVR4 host include files. */
-#include "i386/tm-i386v.h"
-#include "tm-sysv4.h"
-
-#define KERNEL_U_SIZE kernel_u_size()
-
-/*
- * SCO is unlike other SVR3 targets in that it has SVR4 style shared
- * libs, with a slight twist. We expect 3 traps (2 for the exec and
- * one for the dynamic loader).  After the third trap we insert the
- * SOLIB breakpoints, then wait for the 4th trap.
- */
-#undef START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 3
-
-/* We can also do hardware watchpoints */
-#define TARGET_HAS_HARDWARE_WATCHPOINTS
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
-
-/* After a watchpoint trap, the PC points to the instruction which
-   caused the trap.  But we can continue over it without disabling the
-   trap. */
-#define HAVE_CONTINUABLE_WATCHPOINT
-#define HAVE_STEPPABLE_WATCHPOINT
-
-#define STOPPED_BY_WATCHPOINT(W)  \
-  i386_stopped_by_watchpoint (PIDGET (inferior_ptid))
-
-#define target_insert_watchpoint(addr, len, type)  \
-  i386_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type)
-
-#define target_remove_watchpoint(addr, len, type)  \
-  i386_remove_watchpoint (PIDGET (inferior_ptid), addr, len)
-
-#endif /* ifndef TM_I386SCO5_H */
diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h
index c90e0d4..35d63d1 100644
--- a/gdb/config/i386/tm-i386sol2.h
+++ b/gdb/config/i386/tm-i386sol2.h
@@ -21,31 +21,8 @@
 #ifndef TM_I386SOL2_H
 #define TM_I386SOL2_H 1
 
-#define HAVE_I387_REGS
 #include "i386/tm-i386v4.h"
 
-/* We use stabs-in-ELF with the DWARF register numbering scheme.  */
-
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* If the current gcc for for this target does not produce correct
-   debugging information for float parameters, both prototyped and
-   unprototyped, then define this macro.  This forces gdb to always
-   assume that floats are passed as doubles and then converted in the
-   callee. */
-
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
-
-/* Signal handler frames under Solaris 2 are recognized by a return address
-   of 0xFFFFFFFF, the third parameter on the signal handler stack is
-   a pointer to an ucontext.  */
-#undef sigtramp_saved_pc
-#undef I386V4_SIGTRAMP_SAVED_PC
-#define SIGCONTEXT_PC_OFFSET (36 + 14 * 4)
-#undef IN_SIGTRAMP
-#define IN_SIGTRAMP(pc, name) (pc == 0xFFFFFFFF)
-
 /* The SunPRO compiler puts out 0 instead of the address in N_SO symbols,
    and for SunPRO 3.0, N_FUN symbols too.  */
 #define SOFUN_ADDRESS_MAYBE_MISSING
diff --git a/gdb/config/i386/tm-i386v.h b/gdb/config/i386/tm-i386v.h
deleted file mode 100644
index d524652..0000000
--- a/gdb/config/i386/tm-i386v.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Macro definitions for i386, Unix System V.
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_I386V_H
-#define TM_I386V_H 1
-
-/* First pick up the generic *86 target file. */
-
-#include "i386/tm-i386.h"
-
-/* Number of traps that happen between exec'ing the shell to run an
-   inferior, and when we finally get to the inferior code.  This is
-   2 on most implementations.  Override here to 4. */
-
-#undef  START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 4
-
-#endif /* ifndef TM_I386V_H */
diff --git a/gdb/config/i386/tm-i386v4.h b/gdb/config/i386/tm-i386v4.h
index 2003b96..9363327 100644
--- a/gdb/config/i386/tm-i386v4.h
+++ b/gdb/config/i386/tm-i386v4.h
@@ -1,5 +1,5 @@
 /* Macro definitions for GDB on an Intel i386 running SVR4.
-   Copyright 1991, 1994, 1995, 1998, 1999, 2000
+   Copyright 1991, 1994, 1995, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
 
@@ -23,57 +23,17 @@
 #ifndef TM_I386V4_H
 #define TM_I386V4_H 1
 
-/* Pick up most of what we need from the generic i386 target include file. */
-#define HAVE_I387_REGS
+/* Pick up most of what we need from the generic i386 target include file.  */
 #include "i386/tm-i386.h"
 
-/* Pick up more stuff from the generic SVR4 host include file. */
+/* It is unknown which, if any, SVR4 assemblers do not accept dollar signs
+   in identifiers.  The default in G++ is to use dots instead, for all SVR4
+   systems, so we make that our default also.  FIXME: There should be some
+   way to get G++ to tell us what CPLUS_MARKER it is using, perhaps by
+   stashing it in the debugging information as part of the name of an
+   invented symbol ("gcc_cplus_marker$" for example). */
 
-#include "tm-sysv4.h"
-
-/* Use the alternate method of determining valid frame chains. */
-
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-/* Offsets (in target ints) into jmp_buf.  Not defined in any system header
-   file, so we have to step through setjmp/longjmp with a debugger and figure
-   them out.  Note that <setjmp> defines _JBLEN as 10, which is the default
-   if no specific machine is selected, even though we only use 6 slots. */
-
-#define JB_ELEMENT_SIZE sizeof(int)	/* jmp_buf[_JBLEN] is array of ints */
-
-#define JB_EBX	0
-#define JB_ESI	1
-#define JB_EDI	2
-#define JB_EBP	3
-#define JB_ESP	4
-#define JB_EDX	5
-
-#define JB_PC	JB_EDX		/* Setjmp()'s return PC saved in EDX */
-
-/* Figure out where the longjmp will land.  Slurp the args out of the stack.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into ADDR.
-   This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-/* The following redefines make backtracing through sigtramp work.
-   They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
-   from the ucontext structure which is pushed by the kernel on the
-   user stack. Unfortunately there are three variants of sigtramp handlers.  */
-
-#define I386V4_SIGTRAMP_SAVED_PC
-#define IN_SIGTRAMP(pc, name) ((name)					\
-			       && (STREQ ("_sigreturn", name)		\
-				   || STREQ ("_sigacthandler", name)	\
-				   || STREQ ("sigvechandler", name)))
-
-/* Saved Pc.  Get it from ucontext if within sigtramp.  */
-
-#define sigtramp_saved_pc i386v4_sigtramp_saved_pc
-extern CORE_ADDR i386v4_sigtramp_saved_pc (struct frame_info *);
+#undef CPLUS_MARKER
+#define CPLUS_MARKER '.'
 
 #endif /* ifndef TM_I386V4_H */
diff --git a/gdb/config/i386/tm-linux.h b/gdb/config/i386/tm-linux.h
index 60c4b1e..ca46cb5 100644
--- a/gdb/config/i386/tm-linux.h
+++ b/gdb/config/i386/tm-linux.h
@@ -24,81 +24,13 @@
 #define TM_LINUX_H
 
 #define I386_GNULINUX_TARGET
-#define HAVE_I387_REGS
-#ifdef HAVE_PTRACE_GETFPXREGS
-#define FILL_FPXREGSET
-#define HAVE_SSE_REGS
-#endif
 
 #include "i386/tm-i386.h"
-#include "tm-linux.h"
-
-/* Register number for the "orig_eax" pseudo-register.  If this
-   pseudo-register contains a value >= 0 it is interpreted as the
-   system call number that the kernel is supposed to restart.  */
-#define I386_LINUX_ORIG_EAX_REGNUM (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS)
-
-/* Adjust a few macros to deal with this extra register.  */
-
-#undef NUM_REGS
-#define NUM_REGS (NUM_GREGS + NUM_FREGS + NUM_SSE_REGS + 1)
-
-#undef MAX_NUM_REGS
-#define MAX_NUM_REGS (16 + 16 + 9 + 1)
-
-#undef REGISTER_BYTES
-#define REGISTER_BYTES \
-  (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + SIZEOF_SSE_REGS + 4)
-
-#undef REGISTER_NAME
-#define REGISTER_NAME(reg) i386_linux_register_name ((reg))
-extern char *i386_linux_register_name (int reg);
-
-#undef REGISTER_BYTE
-#define REGISTER_BYTE(reg) i386_linux_register_byte ((reg))
-extern int i386_linux_register_byte (int reg);
-
-#undef REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(reg) i386_linux_register_raw_size ((reg))
-extern int i386_linux_register_raw_size (int reg);
-
-/* GNU/Linux ELF uses stabs-in-ELF with the DWARF register numbering
-   scheme by default, so we must redefine STAB_REG_TO_REGNUM.  This
-   messes up the floating-point registers for a.out, but there is not
-   much we can do about that.  */
-#undef STAB_REG_TO_REGNUM
-#define STAB_REG_TO_REGNUM(reg) i386_dwarf_reg_to_regnum ((reg))
-
-/* Use target_specific function to define link map offsets.  */
-extern struct link_map_offsets *i386_linux_svr4_fetch_link_map_offsets (void);
-#define SVR4_FETCH_LINK_MAP_OFFSETS() i386_linux_svr4_fetch_link_map_offsets ()
+#include "config/tm-linux.h"
 
 /* The following works around a problem with /usr/include/sys/procfs.h  */
 #define sys_quotactl 1
 
-/* When the i386 Linux kernel calls a signal handler, the return
-   address points to a bit of code on the stack.  These definitions
-   are used to identify this bit of code as a signal trampoline in
-   order to support backtracing through calls to signal handlers.  */
-
-#define IN_SIGTRAMP(pc, name) i386_linux_in_sigtramp (pc, name)
-extern int i386_linux_in_sigtramp (CORE_ADDR, char *);
-
-#undef FRAME_CHAIN
-#define FRAME_CHAIN(frame) i386_linux_frame_chain (frame)
-extern CORE_ADDR i386_linux_frame_chain (struct frame_info *frame);
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386_linux_frame_saved_pc (frame)
-extern CORE_ADDR i386_linux_frame_saved_pc (struct frame_info *frame);
-
-#undef SAVED_PC_AFTER_CALL
-#define SAVED_PC_AFTER_CALL(frame) i386_linux_saved_pc_after_call (frame)
-extern CORE_ADDR i386_linux_saved_pc_after_call (struct frame_info *);
-
-#define TARGET_WRITE_PC(pc, ptid) i386_linux_write_pc (pc, ptid)
-extern void i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid);
-
 /* When we call a function in a shared library, and the PLT sends us
    into the dynamic linker to find the function's real address, we
    need to skip over the dynamic linker call.  This function decides
@@ -110,22 +42,5 @@
 /* N_FUN symbols in shared libaries have 0 for their values and need
    to be relocated. */
 #define SOFUN_ADDRESS_MAYBE_MISSING
-
-
-/* Support for longjmp.  */
-
-/* Details about jmp_buf.  It's supposed to be an array of integers.  */
-
-#define JB_ELEMENT_SIZE 4	/* Size of elements in jmp_buf.  */
-#define JB_PC		5	/* Array index of saved PC.  */
-
-/* Figure out where the longjmp will land.  Slurp the args out of the
-   stack.  We expect the first arg to be a pointer to the jmp_buf
-   structure from which we extract the pc (JB_PC) that we will land
-   at.  The pc is copied into ADDR.  This routine returns true on
-   success.  */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
 
 #endif /* #ifndef TM_LINUX_H */
diff --git a/gdb/config/i386/tm-nbsd.h b/gdb/config/i386/tm-nbsd.h
index b4fb754..0d73d3a 100644
--- a/gdb/config/i386/tm-nbsd.h
+++ b/gdb/config/i386/tm-nbsd.h
@@ -21,44 +21,18 @@
 #ifndef TM_NBSD_H
 #define TM_NBSD_H
 
-#define HAVE_I387_REGS
-#define HAVE_SSE_REGS
-
 #include "i386/tm-i386.h"
 
-#define JB_ELEMENT_SIZE sizeof(int)	/* jmp_buf[_JBLEN] is array of ints */
-#define JB_PC	0		/* Setjmp()'s return PC saved here */
-
-/* Figure out where the longjmp will land.  Slurp the args out of the stack.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into ADDR.
-   This routine returns true on success */
-
-extern int get_longjmp_target (CORE_ADDR *);
-
-#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
-
-
-/* Support for signal handlers.  */
-
-#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
-extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
-
 /* These defines allow the recognition of sigtramps as a function name
    <sigtramp>.
 
-   FIXME: kettenis/2001-07-13: These should be added to the target
-   vector and turned into functions when we go "multi-arch".  */
+   FIXME: kettenis/2002-05-12: Of course these defines will have to go
+   if we go truly "multi-arch", but I don't know yet how to get rid of
+   them.  */
 
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
-extern CORE_ADDR i386bsd_sigtramp_start;
-extern CORE_ADDR i386bsd_sigtramp_end;
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers.  */
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
-extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
+#define SIGTRAMP_START(pc) i386bsd_sigtramp_start (pc)
+#define SIGTRAMP_END(pc) i386bsd_sigtramp_end (pc)
+extern CORE_ADDR i386bsd_sigtramp_start (CORE_ADDR pc);
+extern CORE_ADDR i386bsd_sigtramp_end (CORE_ADDR pc);
 
 #endif /* TM_NBSD_H */
diff --git a/gdb/config/i386/tm-nbsdaout.h b/gdb/config/i386/tm-nbsdaout.h
index 95fe2e7..25325e1 100644
--- a/gdb/config/i386/tm-nbsdaout.h
+++ b/gdb/config/i386/tm-nbsdaout.h
@@ -23,12 +23,4 @@
 
 #include "i386/tm-nbsd.h"
 
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-  (name && !strcmp(name, "_DYNAMIC"))
-
-extern use_struct_convention_fn i386nbsd_aout_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
-        i386nbsd_aout_use_struct_convention(gcc_p, type)
-
 #endif /* TM_NBSDAOUT_H */
diff --git a/gdb/config/i386/tm-obsd.h b/gdb/config/i386/tm-obsd.h
deleted file mode 100644
index d26b03b..0000000
--- a/gdb/config/i386/tm-obsd.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Target-dependent definitions for OpenBSD/i386.
-   Copyright 2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_OBSD_H
-#define TM_OBSD_H
-
-#define HAVE_I387_REGS
-#include "i386/tm-i386.h"
-
-/* OpenBSD uses the old gcc convention for struct returns.  */
-
-#define USE_STRUCT_CONVENTION(gcc_p, type) \
-  generic_use_struct_convention (1, type)
-
-
-/* Support for longjmp.  */
-
-/* Details about jmp_buf.  It's supposed to be an array of integers.  */
-
-#define JB_ELEMENT_SIZE 4	/* Size of elements in jmp_buf.  */
-#define JB_PC		0	/* Array index of saved PC.  */
-
-/* Figure out where the longjmp will land.  Store the address that
-   longjmp will jump to in *ADDR, and return non-zero if successful.  */
-
-#define GET_LONGJMP_TARGET(addr) get_longjmp_target (addr)
-extern int get_longjmp_target (CORE_ADDR *addr);
-
-
-/* Support for signal handlers.  */
-
-#define IN_SIGTRAMP(pc, name) i386bsd_in_sigtramp (pc, name)
-extern int i386bsd_in_sigtramp (CORE_ADDR pc, char *name);
-
-/* These defines allow the recognition of sigtramps as a function name
-   <sigtramp>.
-
-   FIXME: kettenis/2001-07-13: These should be added to the target
-   vector and turned into functions when we go "multi-arch".  */
-
-#define SIGTRAMP_START(pc) i386bsd_sigtramp_start
-#define SIGTRAMP_END(pc) i386bsd_sigtramp_end
-extern CORE_ADDR i386bsd_sigtramp_start;
-extern CORE_ADDR i386bsd_sigtramp_end;
-
-/* Override FRAME_SAVED_PC to enable the recognition of signal handlers.  */
-
-#undef FRAME_SAVED_PC
-#define FRAME_SAVED_PC(frame) i386bsd_frame_saved_pc (frame)
-extern CORE_ADDR i386bsd_frame_saved_pc (struct frame_info *frame);
-
-
-/* Shared library support.  */
-
-/* Return non-zero if we are in a shared library trampoline code stub.  */
-
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-  (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* tm-obsd.h */
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
index 2a1731a..8d773c8 100644
--- a/gdb/config/i386/tm-ptx.h
+++ b/gdb/config/i386/tm-ptx.h
@@ -32,17 +32,9 @@
 #ifdef SEQUENT_PTX4
 #include "i386/tm-i386v4.h"
 #else /* !SEQUENT_PTX4 */
-#include "i386/tm-i386v.h"
+#include "i386/tm-i386.h"
 #endif
 
-/* Number of traps that happen between exec'ing the shell to run an
-   inferior, and when we finally get to the inferior code.  This is 2
-   on most implementations. Here we have to undo what tm-i386v.h gave
-   us and restore the default. */
-
-#undef START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
 /* Amount PC must be decremented by after a breakpoint.  This is often the
    number of bytes in BREAKPOINT but not always (such as now). */
 
@@ -149,24 +141,6 @@
 #undef  REGISTER_BYTES
 #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
 
-/* Index within `registers' of the first byte of the space for register N. */
-
-#undef  REGISTER_BYTE
-#define REGISTER_BYTE(N) 		\
-(((N) < ST0_REGNUM) ? ((N) * 4) : \
- ((N) < FP1_REGNUM) ? (40 + (((N) - ST0_REGNUM) * 10)) : \
- (40 + 80 + (((N) - FP1_REGNUM) * 4)))
-
-/* Number of bytes of storage in the actual machine representation for
-   register N.  All registers are 4 bytes, except 387 st(0) - st(7),
-   which are 80 bits each. */
-
-#undef  REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) \
-(((N) < ST0_REGNUM) ? 4 : \
- ((N) < FP1_REGNUM) ? 10 : \
- 4)
-
 /* Largest value REGISTER_RAW_SIZE can have.  */
 
 #undef  MAX_REGISTER_RAW_SIZE
@@ -220,8 +194,8 @@
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#undef  EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef  DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
 
 /*
diff --git a/gdb/config/i386/tm-ptx4.h b/gdb/config/i386/tm-ptx4.h
index 1f221ba..a13d4a6 100644
--- a/gdb/config/i386/tm-ptx4.h
+++ b/gdb/config/i386/tm-ptx4.h
@@ -23,4 +23,4 @@
 
 #define SEQUENT_PTX4
 
-#include "tm-ptx.h"
+#include "i386/tm-ptx.h"
diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h
index 7828181..dc7c81f 100644
--- a/gdb/config/i386/tm-symmetry.h
+++ b/gdb/config/i386/tm-symmetry.h
@@ -31,10 +31,7 @@
    a copy of the right include file.  */
 #include <machine/reg.h>
 
-#include "i386/tm-i386v.h"
-
-#undef START_INFERIOR_TRAPS_EXPECTED
-#define START_INFERIOR_TRAPS_EXPECTED 2
+#include "i386/tm-i386.h"
 
 /* Amount PC must be decremented by after a breakpoint.  This is often the
    number of bytes in BREAKPOINT but not always (such as now). */
@@ -225,30 +222,6 @@
 #undef  REGISTER_BYTES
 #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
 
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-
-#undef  REGISTER_BYTE
-#define REGISTER_BYTE(N) 		\
-(((N) < 3) ? ((N) * 4) :		\
-((N) < 5) ? ((((N) - 2) * 10) + 2) :	\
-((N) < 8) ? ((((N) - 5) * 4) + 32) :	\
-((N) < 14) ? ((((N) - 8) * 10) + 44) :	\
-    ((((N) - 14) * 4) + 104))
-
-/* Number of bytes of storage in the actual machine representation
- * for register N.  All registers are 4 bytes, except 387 st(0) - st(7),
- * which are 80 bits each. 
- */
-
-#undef  REGISTER_RAW_SIZE
-#define REGISTER_RAW_SIZE(N) \
-(((N) < 3) ? 4 :	\
-((N) < 5) ? 10 :	\
-((N) < 8) ? 4 :		\
-((N) < 14) ? 10 :	\
-    4)
-
 /* Nonzero if register N requires conversion
    from raw format to virtual format.  */
 
@@ -308,8 +281,8 @@
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#undef  EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef  DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
 
 /* The following redefines make backtracing through sigtramp work.
diff --git a/gdb/config/i386/tm-vxworks.h b/gdb/config/i386/tm-vxworks.h
index 6434a6e..f9b6be4 100644
--- a/gdb/config/i386/tm-vxworks.h
+++ b/gdb/config/i386/tm-vxworks.h
@@ -22,7 +22,7 @@
 #ifndef TM_VXWORKS_H
 #define TM_VXWORKS_H
 
-#include "i386/tm-i386v.h"
-#include "tm-vxworks.h"
+#include "i386/tm-i386.h"
+#include "config/tm-vxworks.h"
 
 #endif /* ifndef TM_VXWORKS_H */
diff --git a/gdb/config/i386/tm-x86-64linux.h b/gdb/config/i386/tm-x86-64linux.h
new file mode 100644
index 0000000..11eea93
--- /dev/null
+++ b/gdb/config/i386/tm-x86-64linux.h
@@ -0,0 +1,36 @@
+/* Definitions to target GDB to GNU/Linux on x86-64.
+
+   Copyright 2002 Free Software Foundation, Inc.
+
+   Contributed by Michal Ludvig, SuSE Labs.
+
+   This file is part of GDB.
+
+   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 TM_X86_64LINUX_H
+#define TM_X86_64LINUX_H
+
+/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
+ * link.h is available on all linux platforms.  For I386 and SH3/4, 
+ * we hard-code the information rather than use link.h anyway (for 
+ * the benefit of cross-debugging).  We may move to doing that for
+ * other architectures as well.  */
+
+#define SVR4_SHARED_LIBS
+#include "solib.h"              /* Support for shared libraries. */
+
+#endif /* #ifndef TM_X86_64LINUX_H */
diff --git a/gdb/config/i386/x86-64linux.mh b/gdb/config/i386/x86-64linux.mh
index bc79f3f..7c221eb 100644
--- a/gdb/config/i386/x86-64linux.mh
+++ b/gdb/config/i386/x86-64linux.mh
@@ -2,7 +2,7 @@
 
 XM_FILE= xm-i386.h
 
-NAT_FILE= nm-x86-64.h
+NAT_FILE= nm-x86-64linux.h
 NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
 	core-aout.o i386-nat.o x86-64-linux-nat.o \
 	proc-service.o thread-db.o lin-lwp.o \
diff --git a/gdb/config/i386/x86-64linux.mt b/gdb/config/i386/x86-64linux.mt
index 85f1972..7d0c491 100644
--- a/gdb/config/i386/x86-64linux.mt
+++ b/gdb/config/i386/x86-64linux.mt
@@ -1,3 +1,7 @@
 # Target: AMD x86-64 running GNU/Linux
-TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o i387-tdep.o dwarf2cfi.o \
+TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o dwarf2cfi.o \
 	solib.o solib-svr4.o solib-legacy.o
+
+GDB_MULTI_ARCH=GDB_MULTI_ARCH_TM
+
+TM_FILE=tm-x86-64linux.h
diff --git a/gdb/config/i386/xm-i386aix.h b/gdb/config/i386/xm-i386aix.h
index 842eadf..03cb86c 100644
--- a/gdb/config/i386/xm-i386aix.h
+++ b/gdb/config/i386/xm-i386aix.h
@@ -1,29 +1,29 @@
-/* Macro defintions for AIX PS/2 (i386)
-   Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*
- * Changed for IBM AIX ps/2 by Minh Tran Le (tranle@intellicorp.com)
- * Revision:    23-Oct-92 17:42:49
- */
-
-#include "i386/xm-i386v.h"
-
-#undef HAVE_TERMIO
-#define HAVE_SGTTY
+// OBSOLETE /* Macro defintions for AIX PS/2 (i386)
+// OBSOLETE    Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Changed for IBM AIX ps/2 by Minh Tran Le (tranle@intellicorp.com)
+// OBSOLETE  * Revision:    23-Oct-92 17:42:49
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #include "i386/xm-i386v.h"
+// OBSOLETE 
+// OBSOLETE #undef HAVE_TERMIO
+// OBSOLETE #define HAVE_SGTTY
diff --git a/gdb/config/i386/xm-i386m3.h b/gdb/config/i386/xm-i386m3.h
index f25b389..da44215 100644
--- a/gdb/config/i386/xm-i386m3.h
+++ b/gdb/config/i386/xm-i386m3.h
@@ -1,33 +1,33 @@
-/* Definitions to make GDB run on Mach 3 on an Intel 386
-   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Do implement the attach and detach commands.  */
-#define ATTACH_DETACH	1
-
-/* Not needeed */
-#define KERNEL_U_ADDR 0
-
-#ifndef EMULATOR_BASE
-/* For EMULATOR_BASE and EMULATOR_END.
- * OSF 1/MK has different values in some other place.
- */
-#include <machine/vmparam.h>
-#endif /* EMULATOR_BASE */
+// OBSOLETE /* Definitions to make GDB run on Mach 3 on an Intel 386
+// OBSOLETE    Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Do implement the attach and detach commands.  */
+// OBSOLETE #define ATTACH_DETACH	1
+// OBSOLETE 
+// OBSOLETE /* Not needeed */
+// OBSOLETE #define KERNEL_U_ADDR 0
+// OBSOLETE 
+// OBSOLETE #ifndef EMULATOR_BASE
+// OBSOLETE /* For EMULATOR_BASE and EMULATOR_END.
+// OBSOLETE  * OSF 1/MK has different values in some other place.
+// OBSOLETE  */
+// OBSOLETE #include <machine/vmparam.h>
+// OBSOLETE #endif /* EMULATOR_BASE */
diff --git a/gdb/config/i386/xm-i386mach.h b/gdb/config/i386/xm-i386mach.h
index e0a5d65..b36c79c 100644
--- a/gdb/config/i386/xm-i386mach.h
+++ b/gdb/config/i386/xm-i386mach.h
@@ -1,28 +1,28 @@
-/* Definitions to make GDB run on Mach on an Intel 386
-   Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1996, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This is the amount to subtract from u.u_ar0
-   to get the offset in the core file of the register values.  */
-
-#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
-
-/* <errno.h> only defines this if __STDC__!!! */
-extern int errno;
+// OBSOLETE /* Definitions to make GDB run on Mach on an Intel 386
+// OBSOLETE    Copyright 1986, 1987, 1989, 1991, 1992, 1994, 1996, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE    to get the offset in the core file of the register values.  */
+// OBSOLETE 
+// OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
+// OBSOLETE 
+// OBSOLETE /* <errno.h> only defines this if __STDC__!!! */
+// OBSOLETE extern int errno;
diff --git a/gdb/config/i386/xm-i386mk.h b/gdb/config/i386/xm-i386mk.h
index cbf6271..4609604 100644
--- a/gdb/config/i386/xm-i386mk.h
+++ b/gdb/config/i386/xm-i386mk.h
@@ -1,26 +1,26 @@
-/* Definitions to make GDB run on Mach 3 OSF 1/MK on an Intel 386
-   Copyright 1992, 1993, 1998 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#define HAVE_TERMIO	1
-
-#define EMULATOR_BASE	0xa0000000
-#define EMULATOR_END	0xa0040000
-
-#include "i386/xm-i386m3.h"
+// OBSOLETE /* Definitions to make GDB run on Mach 3 OSF 1/MK on an Intel 386
+// OBSOLETE    Copyright 1992, 1993, 1998 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #define HAVE_TERMIO	1
+// OBSOLETE 
+// OBSOLETE #define EMULATOR_BASE	0xa0000000
+// OBSOLETE #define EMULATOR_END	0xa0040000
+// OBSOLETE 
+// OBSOLETE #include "i386/xm-i386m3.h"
diff --git a/gdb/config/i386/xm-i386v4.h b/gdb/config/i386/xm-i386v4.h
index c324110..154986c 100644
--- a/gdb/config/i386/xm-i386v4.h
+++ b/gdb/config/i386/xm-i386v4.h
@@ -25,4 +25,4 @@
 
 /* Pick up more stuff from the generic SVR4 host include file. */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
diff --git a/gdb/config/i386/xm-nbsd.h b/gdb/config/i386/xm-nbsd.h
index 415d0fa..4a998cd 100644
--- a/gdb/config/i386/xm-nbsd.h
+++ b/gdb/config/i386/xm-nbsd.h
@@ -19,6 +19,6 @@
    Boston, MA 02111-1307, USA.  */
 
 /* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
 
 #define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
diff --git a/gdb/config/i386/xm-ptx.h b/gdb/config/i386/xm-ptx.h
index 6dfb9d6..8987f29 100644
--- a/gdb/config/i386/xm-ptx.h
+++ b/gdb/config/i386/xm-ptx.h
@@ -23,7 +23,7 @@
 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
 
 #ifdef _SEQUENT_PTX4_
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
 #endif /* _SEQUENT_PTX4_ */
 
 /* This machine doesn't have the siginterrupt call.  */
diff --git a/gdb/config/i386/xm-ptx4.h b/gdb/config/i386/xm-ptx4.h
index 2f466e6..6059413 100644
--- a/gdb/config/i386/xm-ptx4.h
+++ b/gdb/config/i386/xm-ptx4.h
@@ -22,6 +22,6 @@
 
 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
 
-#include "xm-ptx.h"
+#include "i386/xm-ptx.h"
diff --git a/gdb/config/i960/mon960.mt b/gdb/config/i960/mon960.mt
index 6cd7345..c735d94 100644
--- a/gdb/config/i960/mon960.mt
+++ b/gdb/config/i960/mon960.mt
@@ -1,6 +1,5 @@
-# Target: Intel 960 rom monitor
-TDEPFILES= i960-tdep.o monitor.o mon960-rom.o ttyflush.o xmodem.o dsrec.o
-TM_FILE= tm-mon960.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/i960/libsim.a
-
+# OBSOLETE # Target: Intel 960 rom monitor
+# OBSOLETE TDEPFILES= i960-tdep.o monitor.o mon960-rom.o ttyflush.o xmodem.o dsrec.o
+# OBSOLETE TM_FILE= tm-mon960.h
+# OBSOLETE SIM_OBS = remote-sim.o
+# OBSOLETE SIM = ../sim/i960/libsim.a
diff --git a/gdb/config/i960/nindy960.mt b/gdb/config/i960/nindy960.mt
index f37c1da..5ed15a8 100644
--- a/gdb/config/i960/nindy960.mt
+++ b/gdb/config/i960/nindy960.mt
@@ -1,3 +1,3 @@
-# Target: Intel 80960, in an embedded system under the NINDY monitor
-TDEPFILES= i960-tdep.o nindy-tdep.o remote-nindy.o nindy.o Onindy.o ttyflush.o
-TM_FILE= tm-nindy960.h
+# OBSOLETE # Target: Intel 80960, in an embedded system under the NINDY monitor
+# OBSOLETE TDEPFILES= i960-tdep.o nindy-tdep.o remote-nindy.o nindy.o Onindy.o ttyflush.o
+# OBSOLETE TM_FILE= tm-nindy960.h
diff --git a/gdb/config/i960/tm-i960.h b/gdb/config/i960/tm-i960.h
index a62e35d..91bdf91 100644
--- a/gdb/config/i960/tm-i960.h
+++ b/gdb/config/i960/tm-i960.h
@@ -1,345 +1,345 @@
-/* Parameters for target machine Intel 960, for GDB, the GNU debugger.
-
-   Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free
-   Software Foundation, Inc.
-
-   Contributed by Intel Corporation.
-   This file is part of GDB.
-
-   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.  */
-
-/* Definitions to target GDB to any i960.  */
-
-#ifndef I80960
-#define I80960
-#endif
-
-#include "doublest.h"
-
-/* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol
-   information.  In the i960, parameters can be stored as locals or as
-   args, depending on the type of the debug record.
-
-   From empirical observation, gcc960 uses N_LSYM to indicate
-   arguments passed in registers and then copied immediately
-   to the frame, and N_PSYM to indicate arguments passed in a
-   g14-relative argument block.  */
-
-#define	DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance ip across any function entry prologue instructions
-   to reach some "real" code.  */
-
-#define SKIP_PROLOGUE(ip)	(i960_skip_prologue (ip))
-extern CORE_ADDR i960_skip_prologue ();
-
-/* Immediately after a function call, return the saved ip.
-   Can't always go through the frames for this because on some machines
-   the new frame is not set up until the new function
-   executes some instructions.  */
-
-#define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))
-extern CORE_ADDR saved_pc_after_call ();
-
-/* Stack grows upward */
-
-#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-#define NUM_REGS 40
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-
-#define REGISTER_NAMES { \
-	/*  0 */ "pfp", "sp",  "rip", "r3",  "r4",  "r5",  "r6",  "r7", \
-	/*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",\
-	/* 16 */ "g0",  "g1",  "g2",  "g3",  "g4",  "g5",  "g6",  "g7", \
-	/* 24 */ "g8",  "g9",  "g10", "g11", "g12", "g13", "g14", "fp", \
-	/* 32 */ "pcw", "ac",  "tc",  "ip",  "fp0", "fp1", "fp2", "fp3",\
-}
-
-/* Register numbers of various important registers (used to index
-   into arrays of register names and register values).  */
-
-#define R0_REGNUM   0		/* First local register           */
-#define SP_REGNUM   1		/* Contains address of top of stack */
-#define RIP_REGNUM  2		/* Return instruction pointer (local r2) */
-#define R15_REGNUM 15		/* Last local register            */
-#define G0_REGNUM  16		/* First global register  */
-#define G13_REGNUM 29		/* g13 - holds struct return address */
-#define G14_REGNUM 30		/* g14 - ptr to arg block / leafproc return address */
-#define FP_REGNUM  31		/* Contains address of executing stack frame */
-#define	PCW_REGNUM 32		/* process control word */
-#define	ACW_REGNUM 33		/* arithmetic control word */
-#define	TCW_REGNUM 34		/* trace control word */
-#define IP_REGNUM  35		/* instruction pointer */
-#define FP0_REGNUM 36		/* First floating point register */
-
-/* Some registers have more than one name */
-
-#define PC_REGNUM  IP_REGNUM	/* GDB refers to ip as the Program Counter */
-#define PFP_REGNUM R0_REGNUM	/* Previous frame pointer */
-
-/* Total amount of space needed to store our copies of the machine's
-   register state, the array `registers'.  */
-#define REGISTER_BYTES ((36*4) + (4*10))
-
-/* Index within `registers' of the first byte of the space for register N.  */
-
-#define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \
-				(4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )
-
-/* The i960 has register windows, sort of.  */
-
-extern void i960_get_saved_register (char *raw_buffer,
-				     int *optimized,
-				     CORE_ADDR *addrp,
-				     struct frame_info *frame,
-				     int regnum,
-				     enum lval_type *lval);
-
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-  i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
-
-
-/* Number of bytes of storage in the actual machine representation
-   for register N.  On the i960, all regs are 4 bytes except for floating
-   point, which are 10.  NINDY only sends us 8 byte values for these,
-   which is a pain, but VxWorks handles this correctly, so we must.  */
-
-#define REGISTER_RAW_SIZE(N)		( (N) < FP0_REGNUM ? 4 : 10 )
-
-/* Number of bytes of storage in the program's representation for register N. */
-
-#define REGISTER_VIRTUAL_SIZE(N)	( (N) < FP0_REGNUM ? 4 : 8 )
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define MAX_REGISTER_RAW_SIZE 10
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 8
-
-#include "floatformat.h"
-
-#define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
-
-/* Return the GDB type object for the "standard" data type
-   of data in register N.  */
-
-struct type *i960_register_type (int regnum);
-#define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
-
-/* Macros for understanding function return values... */
-
-/* Does the specified function use the "struct returning" convention
-   or the "value returning" convention?  The "value returning" convention
-   almost invariably returns the entire value in registers.  The
-   "struct returning" convention often returns the entire value in
-   memory, and passes a pointer (out of or into the function) saying
-   where the value (is or should go).
-
-   Since this sometimes depends on whether it was compiled with GCC,
-   this is also an argument.  This is used in call_function to build a
-   stack, and in value_being_returned to print return values.
-
-   On i960, a structure is returned in registers g0-g3, if it will fit.
-   If it's more than 16 bytes long, g13 pointed to it on entry.  */
-
-extern use_struct_convention_fn i960_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) i960_use_struct_convention (gcc_p, type)
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  This is only called if USE_STRUCT_CONVENTION for this
-   type is 0.
-
-   On the i960 we just take as many bytes as we need from G0 through G3.  */
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-	memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
-
-/* If USE_STRUCT_CONVENTION produces a 1, 
-   extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one).
-
-   Address of where to put structure was passed in in global
-   register g13 on entry.  God knows what's in g13 now.  The
-   (..., 0) below is to make it appear to return a value, though
-   actually all it does is call error().  */
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-   (error("Don't know where large structure is returned on i960"), 0)
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format, for "value returning" functions.
-
-   For 'return' command:  not (yet) implemented for i960.  */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-    error ("Returning values from functions is not implemented in i960 gdb")
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-    error ("Returning values from functions is not implemented in i960 gdb")
-
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* FRAME_CHAIN takes a frame's nominal address
-   and produces the frame's chain-pointer.
-
-   However, if FRAME_CHAIN_VALID returns zero,
-   it means the given frame is the outermost one and has no caller.  */
-
-/* We cache information about saved registers in the frame structure,
-   to save us from having to re-scan function prologues every time
-   a register in a non-current frame is accessed.  */
-
-#define EXTRA_FRAME_INFO 	\
-	struct frame_saved_regs *fsr;	\
-	CORE_ADDR arg_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
-   so that FRAME_FIND_SAVED_REGS () will know to allocate and
-   initialize a frame_saved_regs struct the first time it is called.
-   Set the arg_pointer to -1, which is not valid; 0 and other values
-   indicate real, cached values.  */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
-	((fi)->fsr = 0, (fi)->arg_pointer = -1)
-
-/* On the i960, we get the chain pointer by reading the PFP saved
-   on the stack and clearing the status bits.  */
-
-#define FRAME_CHAIN(thisframe) \
-  (read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
-
-/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
-   and has no caller.
-
-   On the i960, each various target system type must define FRAME_CHAIN_VALID,
-   since it differs between NINDY and VxWorks, the two currently supported
-   targets types.  We leave it undefined here.  */
-
-
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-
-CORE_ADDR leafproc_return (CORE_ADDR ip);
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
-  (leafproc_return ((FI)->pc) != 0)
-
-/* Note that in the i960 architecture the return pointer is saved in the
-   *caller's* stack frame.
-
-   Make sure to zero low-order bits because of bug in 960CA A-step part
-   (instruction addresses should always be word-aligned anyway).  */
-
-#define FRAME_SAVED_PC(frame) \
-			((read_memory_integer(FRAME_CHAIN(frame)+8,4)) & ~3)
-
-/* On the i960, FRAME_ARGS_ADDRESS should return the value of
-   g14 as passed into the frame, if known.  We need a function for this.
-   We cache this value in the frame info if we've already looked it up.  */
-
-#define FRAME_ARGS_ADDRESS(fi) 	\
-  (((fi)->arg_pointer != -1)? (fi)->arg_pointer: frame_args_address (fi, 0))
-extern CORE_ADDR frame_args_address ();		/* i960-tdep.c */
-
-/* This is the same except it should return 0 when
-   it does not really know where the args are, rather than guessing.
-   This value is not cached since it is only used infrequently.  */
-
-#define	FRAME_ARGS_ADDRESS_CORRECT(fi)	(frame_args_address (fi, 1))
-
-#define FRAME_LOCALS_ADDRESS(fi)	(fi)->frame
-
-/* Set NUMARGS to the number of args passed to a frame.
-   Can return -1, meaning no way to tell.  */
-
-#define FRAME_NUM_ARGS(fi)	(-1)
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Produce the positions of the saved registers in a stack frame.  */
-
-#define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
-	frame_find_saved_regs (frame_info_addr, &sr)
-extern void frame_find_saved_regs ();	/* See i960-tdep.c */
-
-/* Things needed for making calls to functions in the inferior process */
-
-/* Push an empty stack frame, to record the current ip, etc.
-
-   Not (yet?) implemented for i960.  */
-
-#define PUSH_DUMMY_FRAME	\
-error("Function calls into the inferior process are not supported on the i960")
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-
-
-void i960_pop_frame (void);
-#define POP_FRAME \
-	i960_pop_frame ()
-
-
-/* This sequence of words is the instructions
-
-   callx 0x00000000
-   fmark
- */
-
-/* #define CALL_DUMMY { 0x86003000, 0x00000000, 0x66003e00 } */
-
-																			    /* #define CALL_DUMMY_START_OFFSET 0 *//* Start execution at beginning of dummy */
-
-/* Indicate that we don't support calling inferior child functions.  */
-
-#undef CALL_DUMMY
-
-/* Insert the specified number of args and function address
-   into a call sequence of the above form stored at 'dummyname'.
-
-   Ignore arg count on i960.  */
-
-/* #define FIX_CALL_DUMMY(dummyname, fun, nargs) *(((int *)dummyname)+1) = fun */
-
-#undef FIX_CALL_DUMMY
-
-
-/* Interface definitions for kernel debugger KDB */
-/* (Not relevant to i960.) */
+// OBSOLETE /* Parameters for target machine Intel 960, for GDB, the GNU debugger.
+// OBSOLETE 
+// OBSOLETE    Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free
+// OBSOLETE    Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    Contributed by Intel Corporation.
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* Definitions to target GDB to any i960.  */
+// OBSOLETE 
+// OBSOLETE #ifndef I80960
+// OBSOLETE #define I80960
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include "doublest.h"
+// OBSOLETE 
+// OBSOLETE /* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol
+// OBSOLETE    information.  In the i960, parameters can be stored as locals or as
+// OBSOLETE    args, depending on the type of the debug record.
+// OBSOLETE 
+// OBSOLETE    From empirical observation, gcc960 uses N_LSYM to indicate
+// OBSOLETE    arguments passed in registers and then copied immediately
+// OBSOLETE    to the frame, and N_PSYM to indicate arguments passed in a
+// OBSOLETE    g14-relative argument block.  */
+// OBSOLETE 
+// OBSOLETE #define	DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)
+// OBSOLETE 
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE    Zero on most machines.  */
+// OBSOLETE 
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE 
+// OBSOLETE /* Advance ip across any function entry prologue instructions
+// OBSOLETE    to reach some "real" code.  */
+// OBSOLETE 
+// OBSOLETE #define SKIP_PROLOGUE(ip)	(i960_skip_prologue (ip))
+// OBSOLETE extern CORE_ADDR i960_skip_prologue ();
+// OBSOLETE 
+// OBSOLETE /* Immediately after a function call, return the saved ip.
+// OBSOLETE    Can't always go through the frames for this because on some machines
+// OBSOLETE    the new frame is not set up until the new function
+// OBSOLETE    executes some instructions.  */
+// OBSOLETE 
+// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))
+// OBSOLETE extern CORE_ADDR saved_pc_after_call ();
+// OBSOLETE 
+// OBSOLETE /* Stack grows upward */
+// OBSOLETE 
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
+// OBSOLETE 
+// OBSOLETE /* Say how long (ordinary) registers are.  This is a piece of bogosity
+// OBSOLETE    used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE    real way to know how big a register is.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE 
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE #define NUM_REGS 40
+// OBSOLETE 
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE    There should be NUM_REGS strings in this initializer.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_NAMES { \
+// OBSOLETE 	/*  0 */ "pfp", "sp",  "rip", "r3",  "r4",  "r5",  "r6",  "r7", \
+// OBSOLETE 	/*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",\
+// OBSOLETE 	/* 16 */ "g0",  "g1",  "g2",  "g3",  "g4",  "g5",  "g6",  "g7", \
+// OBSOLETE 	/* 24 */ "g8",  "g9",  "g10", "g11", "g12", "g13", "g14", "fp", \
+// OBSOLETE 	/* 32 */ "pcw", "ac",  "tc",  "ip",  "fp0", "fp1", "fp2", "fp3",\
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Register numbers of various important registers (used to index
+// OBSOLETE    into arrays of register names and register values).  */
+// OBSOLETE 
+// OBSOLETE #define R0_REGNUM   0		/* First local register           */
+// OBSOLETE #define SP_REGNUM   1		/* Contains address of top of stack */
+// OBSOLETE #define RIP_REGNUM  2		/* Return instruction pointer (local r2) */
+// OBSOLETE #define R15_REGNUM 15		/* Last local register            */
+// OBSOLETE #define G0_REGNUM  16		/* First global register  */
+// OBSOLETE #define G13_REGNUM 29		/* g13 - holds struct return address */
+// OBSOLETE #define G14_REGNUM 30		/* g14 - ptr to arg block / leafproc return address */
+// OBSOLETE #define FP_REGNUM  31		/* Contains address of executing stack frame */
+// OBSOLETE #define	PCW_REGNUM 32		/* process control word */
+// OBSOLETE #define	ACW_REGNUM 33		/* arithmetic control word */
+// OBSOLETE #define	TCW_REGNUM 34		/* trace control word */
+// OBSOLETE #define IP_REGNUM  35		/* instruction pointer */
+// OBSOLETE #define FP0_REGNUM 36		/* First floating point register */
+// OBSOLETE 
+// OBSOLETE /* Some registers have more than one name */
+// OBSOLETE 
+// OBSOLETE #define PC_REGNUM  IP_REGNUM	/* GDB refers to ip as the Program Counter */
+// OBSOLETE #define PFP_REGNUM R0_REGNUM	/* Previous frame pointer */
+// OBSOLETE 
+// OBSOLETE /* Total amount of space needed to store our copies of the machine's
+// OBSOLETE    register state, the array `registers'.  */
+// OBSOLETE #define REGISTER_BYTES ((36*4) + (4*10))
+// OBSOLETE 
+// OBSOLETE /* Index within `registers' of the first byte of the space for register N.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \
+// OBSOLETE 				(4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )
+// OBSOLETE 
+// OBSOLETE /* The i960 has register windows, sort of.  */
+// OBSOLETE 
+// OBSOLETE extern void i960_get_saved_register (char *raw_buffer,
+// OBSOLETE 				     int *optimized,
+// OBSOLETE 				     CORE_ADDR *addrp,
+// OBSOLETE 				     struct frame_info *frame,
+// OBSOLETE 				     int regnum,
+// OBSOLETE 				     enum lval_type *lval);
+// OBSOLETE 
+// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
+// OBSOLETE   i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the actual machine representation
+// OBSOLETE    for register N.  On the i960, all regs are 4 bytes except for floating
+// OBSOLETE    point, which are 10.  NINDY only sends us 8 byte values for these,
+// OBSOLETE    which is a pain, but VxWorks handles this correctly, so we must.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_RAW_SIZE(N)		( (N) < FP0_REGNUM ? 4 : 10 )
+// OBSOLETE 
+// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N)	( (N) < FP0_REGNUM ? 4 : 8 )
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  */
+// OBSOLETE 
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE 10
+// OBSOLETE 
+// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  */
+// OBSOLETE 
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8
+// OBSOLETE 
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE 
+// OBSOLETE #define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext
+// OBSOLETE 
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE    of data in register N.  */
+// OBSOLETE 
+// OBSOLETE struct type *i960_register_type (int regnum);
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)
+// OBSOLETE 
+// OBSOLETE /* Macros for understanding function return values... */
+// OBSOLETE 
+// OBSOLETE /* Does the specified function use the "struct returning" convention
+// OBSOLETE    or the "value returning" convention?  The "value returning" convention
+// OBSOLETE    almost invariably returns the entire value in registers.  The
+// OBSOLETE    "struct returning" convention often returns the entire value in
+// OBSOLETE    memory, and passes a pointer (out of or into the function) saying
+// OBSOLETE    where the value (is or should go).
+// OBSOLETE 
+// OBSOLETE    Since this sometimes depends on whether it was compiled with GCC,
+// OBSOLETE    this is also an argument.  This is used in call_function to build a
+// OBSOLETE    stack, and in value_being_returned to print return values.
+// OBSOLETE 
+// OBSOLETE    On i960, a structure is returned in registers g0-g3, if it will fit.
+// OBSOLETE    If it's more than 16 bytes long, g13 pointed to it on entry.  */
+// OBSOLETE 
+// OBSOLETE extern use_struct_convention_fn i960_use_struct_convention;
+// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) i960_use_struct_convention (gcc_p, type)
+// OBSOLETE 
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE    into VALBUF.  This is only called if USE_STRUCT_CONVENTION for this
+// OBSOLETE    type is 0.
+// OBSOLETE 
+// OBSOLETE    On the i960 we just take as many bytes as we need from G0 through G3.  */
+// OBSOLETE 
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE 	memcpy(VALBUF, REGBUF+REGISTER_BYTE(G0_REGNUM), TYPE_LENGTH (TYPE))
+// OBSOLETE 
+// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1, 
+// OBSOLETE    extract from an array REGBUF containing the (raw) register state
+// OBSOLETE    the address in which a function should return its structure value,
+// OBSOLETE    as a CORE_ADDR (or an expression that can be used as one).
+// OBSOLETE 
+// OBSOLETE    Address of where to put structure was passed in in global
+// OBSOLETE    register g13 on entry.  God knows what's in g13 now.  The
+// OBSOLETE    (..., 0) below is to make it appear to return a value, though
+// OBSOLETE    actually all it does is call error().  */
+// OBSOLETE 
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+// OBSOLETE    (error("Don't know where large structure is returned on i960"), 0)
+// OBSOLETE 
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE    of type TYPE, given in virtual format, for "value returning" functions.
+// OBSOLETE 
+// OBSOLETE    For 'return' command:  not (yet) implemented for i960.  */
+// OBSOLETE 
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE     error ("Returning values from functions is not implemented in i960 gdb")
+// OBSOLETE 
+// OBSOLETE /* Store the address of the place in which to copy the structure the
+// OBSOLETE    subroutine will return.  This is called from call_function. */
+// OBSOLETE 
+// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
+// OBSOLETE     error ("Returning values from functions is not implemented in i960 gdb")
+// OBSOLETE 
+// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
+// OBSOLETE    (its caller).  */
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
+// OBSOLETE    and produces the frame's chain-pointer.
+// OBSOLETE 
+// OBSOLETE    However, if FRAME_CHAIN_VALID returns zero,
+// OBSOLETE    it means the given frame is the outermost one and has no caller.  */
+// OBSOLETE 
+// OBSOLETE /* We cache information about saved registers in the frame structure,
+// OBSOLETE    to save us from having to re-scan function prologues every time
+// OBSOLETE    a register in a non-current frame is accessed.  */
+// OBSOLETE 
+// OBSOLETE #define EXTRA_FRAME_INFO 	\
+// OBSOLETE 	struct frame_saved_regs *fsr;	\
+// OBSOLETE 	CORE_ADDR arg_pointer;
+// OBSOLETE 
+// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
+// OBSOLETE    so that FRAME_FIND_SAVED_REGS () will know to allocate and
+// OBSOLETE    initialize a frame_saved_regs struct the first time it is called.
+// OBSOLETE    Set the arg_pointer to -1, which is not valid; 0 and other values
+// OBSOLETE    indicate real, cached values.  */
+// OBSOLETE 
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+// OBSOLETE 	((fi)->fsr = 0, (fi)->arg_pointer = -1)
+// OBSOLETE 
+// OBSOLETE /* On the i960, we get the chain pointer by reading the PFP saved
+// OBSOLETE    on the stack and clearing the status bits.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_CHAIN(thisframe) \
+// OBSOLETE   (read_memory_integer (FRAME_FP(thisframe), 4) & ~0xf)
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
+// OBSOLETE    and has no caller.
+// OBSOLETE 
+// OBSOLETE    On the i960, each various target system type must define FRAME_CHAIN_VALID,
+// OBSOLETE    since it differs between NINDY and VxWorks, the two currently supported
+// OBSOLETE    targets types.  We leave it undefined here.  */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* A macro that tells us whether the function invocation represented
+// OBSOLETE    by FI does not have a frame on the stack associated with it.  If it
+// OBSOLETE    does not, FRAMELESS is set to 1, else 0.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR leafproc_return (CORE_ADDR ip);
+// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
+// OBSOLETE   (leafproc_return ((FI)->pc) != 0)
+// OBSOLETE 
+// OBSOLETE /* Note that in the i960 architecture the return pointer is saved in the
+// OBSOLETE    *caller's* stack frame.
+// OBSOLETE 
+// OBSOLETE    Make sure to zero low-order bits because of bug in 960CA A-step part
+// OBSOLETE    (instruction addresses should always be word-aligned anyway).  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_SAVED_PC(frame) \
+// OBSOLETE 			((read_memory_integer(FRAME_CHAIN(frame)+8,4)) & ~3)
+// OBSOLETE 
+// OBSOLETE /* On the i960, FRAME_ARGS_ADDRESS should return the value of
+// OBSOLETE    g14 as passed into the frame, if known.  We need a function for this.
+// OBSOLETE    We cache this value in the frame info if we've already looked it up.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) 	\
+// OBSOLETE   (((fi)->arg_pointer != -1)? (fi)->arg_pointer: frame_args_address (fi, 0))
+// OBSOLETE extern CORE_ADDR frame_args_address ();		/* i960-tdep.c */
+// OBSOLETE 
+// OBSOLETE /* This is the same except it should return 0 when
+// OBSOLETE    it does not really know where the args are, rather than guessing.
+// OBSOLETE    This value is not cached since it is only used infrequently.  */
+// OBSOLETE 
+// OBSOLETE #define	FRAME_ARGS_ADDRESS_CORRECT(fi)	(frame_args_address (fi, 1))
+// OBSOLETE 
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi)	(fi)->frame
+// OBSOLETE 
+// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
+// OBSOLETE    Can return -1, meaning no way to tell.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_NUM_ARGS(fi)	(-1)
+// OBSOLETE 
+// OBSOLETE /* Return number of bytes at start of arglist that are not really args.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE 
+// OBSOLETE /* Produce the positions of the saved registers in a stack frame.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
+// OBSOLETE 	frame_find_saved_regs (frame_info_addr, &sr)
+// OBSOLETE extern void frame_find_saved_regs ();	/* See i960-tdep.c */
+// OBSOLETE 
+// OBSOLETE /* Things needed for making calls to functions in the inferior process */
+// OBSOLETE 
+// OBSOLETE /* Push an empty stack frame, to record the current ip, etc.
+// OBSOLETE 
+// OBSOLETE    Not (yet?) implemented for i960.  */
+// OBSOLETE 
+// OBSOLETE #define PUSH_DUMMY_FRAME	\
+// OBSOLETE error("Function calls into the inferior process are not supported on the i960")
+// OBSOLETE 
+// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers.  */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE void i960_pop_frame (void);
+// OBSOLETE #define POP_FRAME \
+// OBSOLETE 	i960_pop_frame ()
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* This sequence of words is the instructions
+// OBSOLETE 
+// OBSOLETE    callx 0x00000000
+// OBSOLETE    fmark
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /* #define CALL_DUMMY { 0x86003000, 0x00000000, 0x66003e00 } */
+// OBSOLETE 
+// OBSOLETE 																			    /* #define CALL_DUMMY_START_OFFSET 0 *//* Start execution at beginning of dummy */
+// OBSOLETE 
+// OBSOLETE /* Indicate that we don't support calling inferior child functions.  */
+// OBSOLETE 
+// OBSOLETE #undef CALL_DUMMY
+// OBSOLETE 
+// OBSOLETE /* Insert the specified number of args and function address
+// OBSOLETE    into a call sequence of the above form stored at 'dummyname'.
+// OBSOLETE 
+// OBSOLETE    Ignore arg count on i960.  */
+// OBSOLETE 
+// OBSOLETE /* #define FIX_CALL_DUMMY(dummyname, fun, nargs) *(((int *)dummyname)+1) = fun */
+// OBSOLETE 
+// OBSOLETE #undef FIX_CALL_DUMMY
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Interface definitions for kernel debugger KDB */
+// OBSOLETE /* (Not relevant to i960.) */
diff --git a/gdb/config/i960/tm-mon960.h b/gdb/config/i960/tm-mon960.h
index 98c03b1..dedce0e 100644
--- a/gdb/config/i960/tm-mon960.h
+++ b/gdb/config/i960/tm-mon960.h
@@ -1,69 +1,69 @@
-/* Parameters for Intel 960 running MON960 monitor, for GDB, the GNU debugger.
-   Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
-   Contributed by Intel Corporation and Cygnus Support.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*****************************************************************************
- * Definitions to target GDB to an i960 debugged over a serial line.
- ******************************************************************************/
-
-#include "i960/tm-i960.h"
-
-/* forward declarations */
-struct frame_info;
-
-/* redefined from tm-i960.h */
-/* Number of machine registers */
-#undef NUM_REGS
-#define NUM_REGS 40
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-#undef REGISTER_NAMES
-#define REGISTER_NAMES { \
-	/*  0 */ "pfp", "sp",  "rip", "r3",  "r4",  "r5",  "r6",  "r7", \
-	/*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",\
-	/* 16 */ "g0",  "g1",  "g2",  "g3",  "g4",  "g5",  "g6",  "g7", \
-	/* 24 */ "g8",  "g9",  "g10", "g11", "g12", "g13", "g14", "fp", \
-	/* 32 */ "pc",  "ac",  "tc",  "ip",  "fp0", "fp1", "fp2", "fp3",\
-}
-
-/* Override the standard gdb prompt when compiled for this target.  */
-
-#define	DEFAULT_PROMPT	"(gdb960) "
-
-/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
-   and has no caller.
-
-   On the i960, each various target system type defines FRAME_CHAIN_VALID,
-   since it differs between Nindy, Mon960 and VxWorks, the currently supported
-   target types.  */
-
-extern int mon960_frame_chain_valid (CORE_ADDR, struct frame_info *);
-#define	FRAME_CHAIN_VALID(chain, thisframe) mon960_frame_chain_valid (chain, thisframe)
-
-/* Sequence of bytes for breakpoint instruction */
-
-#define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
-
-/* Amount ip must be decremented by after a breakpoint.
- * This is often the number of bytes in BREAKPOINT but not always.
- */
-
-#define DECR_PC_AFTER_BREAK 4
+// OBSOLETE /* Parameters for Intel 960 running MON960 monitor, for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Intel Corporation and Cygnus Support.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /*****************************************************************************
+// OBSOLETE  * Definitions to target GDB to an i960 debugged over a serial line.
+// OBSOLETE  ******************************************************************************/
+// OBSOLETE 
+// OBSOLETE #include "i960/tm-i960.h"
+// OBSOLETE 
+// OBSOLETE /* forward declarations */
+// OBSOLETE struct frame_info;
+// OBSOLETE 
+// OBSOLETE /* redefined from tm-i960.h */
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE #undef NUM_REGS
+// OBSOLETE #define NUM_REGS 40
+// OBSOLETE 
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE    There should be NUM_REGS strings in this initializer.  */
+// OBSOLETE #undef REGISTER_NAMES
+// OBSOLETE #define REGISTER_NAMES { \
+// OBSOLETE 	/*  0 */ "pfp", "sp",  "rip", "r3",  "r4",  "r5",  "r6",  "r7", \
+// OBSOLETE 	/*  8 */ "r8",  "r9",  "r10", "r11", "r12", "r13", "r14", "r15",\
+// OBSOLETE 	/* 16 */ "g0",  "g1",  "g2",  "g3",  "g4",  "g5",  "g6",  "g7", \
+// OBSOLETE 	/* 24 */ "g8",  "g9",  "g10", "g11", "g12", "g13", "g14", "fp", \
+// OBSOLETE 	/* 32 */ "pc",  "ac",  "tc",  "ip",  "fp0", "fp1", "fp2", "fp3",\
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Override the standard gdb prompt when compiled for this target.  */
+// OBSOLETE 
+// OBSOLETE #define	DEFAULT_PROMPT	"(gdb960) "
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
+// OBSOLETE    and has no caller.
+// OBSOLETE 
+// OBSOLETE    On the i960, each various target system type defines FRAME_CHAIN_VALID,
+// OBSOLETE    since it differs between Nindy, Mon960 and VxWorks, the currently supported
+// OBSOLETE    target types.  */
+// OBSOLETE 
+// OBSOLETE extern int mon960_frame_chain_valid (CORE_ADDR, struct frame_info *);
+// OBSOLETE #define	FRAME_CHAIN_VALID(chain, thisframe) mon960_frame_chain_valid (chain, thisframe)
+// OBSOLETE 
+// OBSOLETE /* Sequence of bytes for breakpoint instruction */
+// OBSOLETE 
+// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
+// OBSOLETE 
+// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
+// OBSOLETE  * This is often the number of bytes in BREAKPOINT but not always.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #define DECR_PC_AFTER_BREAK 4
diff --git a/gdb/config/i960/tm-nindy960.h b/gdb/config/i960/tm-nindy960.h
index e9cb99c..6a6dca2 100644
--- a/gdb/config/i960/tm-nindy960.h
+++ b/gdb/config/i960/tm-nindy960.h
@@ -1,106 +1,106 @@
-/* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger.
-   Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
-   Contributed by Intel Corporation and Cygnus Support.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*****************************************************************************
- * Definitions to target GDB to an i960 debugged over a serial line.
- ******************************************************************************/
-
-#include "i960/tm-i960.h"
-
-/* forward declarations */
-struct frame_info;
-
-/* Override the standard gdb prompt when compiled for this target.  */
-
-#define	DEFAULT_PROMPT	"(gdb960) "
-
-/* Additional command line options accepted by nindy gdb's, for handling
-   the remote-nindy.c interface.  These should really be target-specific
-   rather than architecture-specific.  */
-
-extern int nindy_old_protocol;	/* nonzero if old NINDY serial protocol */
-extern int nindy_initial_brk;	/* Send a BREAK to reset board first */
-extern char *nindy_ttyname;	/* Name of serial port to talk to nindy */
-
-#define	ADDITIONAL_OPTIONS \
-	{"O", no_argument, &nindy_old_protocol, 1},	\
-	{"brk", no_argument, &nindy_initial_brk, 1},	\
-	{"ser", required_argument, 0, 1004},	/* 1004 is magic cookie for ADDL_CASES */
-
-#define	ADDITIONAL_OPTION_CASES	\
-	case 1004:	/* -ser option:  remote nindy auto-start */	\
-	  nindy_ttyname = optarg;	\
-	  break;
-
-#define	ADDITIONAL_OPTION_HELP \
-	"\
-  -O                Use old protocol to talk to a Nindy target\n\
-  -brk              Send a break to a Nindy target to reset it.\n\
-  -ser SERIAL       Open remote Nindy session to SERIAL port.\n\
-"
-
-/* If specified on the command line, open tty for talking to nindy,
-   and download the executable file if one was specified.  */
-
-extern void nindy_open (char *name, int from_tty);
-#define	ADDITIONAL_OPTION_HANDLER					\
-	if (nindy_ttyname != NULL)					\
-          {								\
-            if (catch_command_errors (nindy_open, nindy_ttyname,	\
-				      !batch, RETURN_MASK_ALL))		\
-	      {								\
-                if (execarg != NULL)					\
-                  catch_command_errors (target_load, execarg, !batch,	\
-					RETURN_MASK_ALL);		\
-	      }								\
-	  }
-
-/* If configured for i960 target, we take control before main loop
-   and demand that we configure for a nindy target.  */
-
-#define	BEFORE_MAIN_LOOP_HOOK	\
-  nindy_before_main_loop();
-
-extern void
-  nindy_before_main_loop ();	/* In remote-nindy.c */
-
-/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
-   and has no caller.
-
-   On the i960, each various target system type defines FRAME_CHAIN_VALID,
-   since it differs between NINDY and VxWorks, the two currently supported
-   targets types.  */
-
-extern int nindy_frame_chain_valid (CORE_ADDR, struct frame_info *);
-#define	FRAME_CHAIN_VALID(chain, thisframe) nindy_frame_chain_valid (chain, thisframe)
-
-extern int
-  nindy_frame_chain_valid ();	/* See nindy-tdep.c */
-
-/* Sequence of bytes for breakpoint instruction */
-
-#define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
-
-/* Amount ip must be decremented by after a breakpoint.
- * This is often the number of bytes in BREAKPOINT but not always.
- */
-
-#define DECR_PC_AFTER_BREAK 0
+// OBSOLETE /* Parameters for Intel 960 running NINDY monitor, for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1990, 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Intel Corporation and Cygnus Support.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /*****************************************************************************
+// OBSOLETE  * Definitions to target GDB to an i960 debugged over a serial line.
+// OBSOLETE  ******************************************************************************/
+// OBSOLETE 
+// OBSOLETE #include "i960/tm-i960.h"
+// OBSOLETE 
+// OBSOLETE /* forward declarations */
+// OBSOLETE struct frame_info;
+// OBSOLETE 
+// OBSOLETE /* Override the standard gdb prompt when compiled for this target.  */
+// OBSOLETE 
+// OBSOLETE #define	DEFAULT_PROMPT	"(gdb960) "
+// OBSOLETE 
+// OBSOLETE /* Additional command line options accepted by nindy gdb's, for handling
+// OBSOLETE    the remote-nindy.c interface.  These should really be target-specific
+// OBSOLETE    rather than architecture-specific.  */
+// OBSOLETE 
+// OBSOLETE extern int nindy_old_protocol;	/* nonzero if old NINDY serial protocol */
+// OBSOLETE extern int nindy_initial_brk;	/* Send a BREAK to reset board first */
+// OBSOLETE extern char *nindy_ttyname;	/* Name of serial port to talk to nindy */
+// OBSOLETE 
+// OBSOLETE #define	ADDITIONAL_OPTIONS \
+// OBSOLETE 	{"O", no_argument, &nindy_old_protocol, 1},	\
+// OBSOLETE 	{"brk", no_argument, &nindy_initial_brk, 1},	\
+// OBSOLETE 	{"ser", required_argument, 0, 1004},	/* 1004 is magic cookie for ADDL_CASES */
+// OBSOLETE 
+// OBSOLETE #define	ADDITIONAL_OPTION_CASES	\
+// OBSOLETE 	case 1004:	/* -ser option:  remote nindy auto-start */	\
+// OBSOLETE 	  nindy_ttyname = optarg;	\
+// OBSOLETE 	  break;
+// OBSOLETE 
+// OBSOLETE #define	ADDITIONAL_OPTION_HELP \
+// OBSOLETE 	"\
+// OBSOLETE   -O                Use old protocol to talk to a Nindy target\n\
+// OBSOLETE   -brk              Send a break to a Nindy target to reset it.\n\
+// OBSOLETE   -ser SERIAL       Open remote Nindy session to SERIAL port.\n\
+// OBSOLETE "
+// OBSOLETE 
+// OBSOLETE /* If specified on the command line, open tty for talking to nindy,
+// OBSOLETE    and download the executable file if one was specified.  */
+// OBSOLETE 
+// OBSOLETE extern void nindy_open (char *name, int from_tty);
+// OBSOLETE #define	ADDITIONAL_OPTION_HANDLER					\
+// OBSOLETE 	if (nindy_ttyname != NULL)					\
+// OBSOLETE           {								\
+// OBSOLETE             if (catch_command_errors (nindy_open, nindy_ttyname,	\
+// OBSOLETE 				      !batch, RETURN_MASK_ALL))		\
+// OBSOLETE 	      {								\
+// OBSOLETE                 if (execarg != NULL)					\
+// OBSOLETE                   catch_command_errors (target_load, execarg, !batch,	\
+// OBSOLETE 					RETURN_MASK_ALL);		\
+// OBSOLETE 	      }								\
+// OBSOLETE 	  }
+// OBSOLETE 
+// OBSOLETE /* If configured for i960 target, we take control before main loop
+// OBSOLETE    and demand that we configure for a nindy target.  */
+// OBSOLETE 
+// OBSOLETE #define	BEFORE_MAIN_LOOP_HOOK	\
+// OBSOLETE   nindy_before_main_loop();
+// OBSOLETE 
+// OBSOLETE extern void
+// OBSOLETE   nindy_before_main_loop ();	/* In remote-nindy.c */
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
+// OBSOLETE    and has no caller.
+// OBSOLETE 
+// OBSOLETE    On the i960, each various target system type defines FRAME_CHAIN_VALID,
+// OBSOLETE    since it differs between NINDY and VxWorks, the two currently supported
+// OBSOLETE    targets types.  */
+// OBSOLETE 
+// OBSOLETE extern int nindy_frame_chain_valid (CORE_ADDR, struct frame_info *);
+// OBSOLETE #define	FRAME_CHAIN_VALID(chain, thisframe) nindy_frame_chain_valid (chain, thisframe)
+// OBSOLETE 
+// OBSOLETE extern int
+// OBSOLETE   nindy_frame_chain_valid ();	/* See nindy-tdep.c */
+// OBSOLETE 
+// OBSOLETE /* Sequence of bytes for breakpoint instruction */
+// OBSOLETE 
+// OBSOLETE #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66}
+// OBSOLETE 
+// OBSOLETE /* Amount ip must be decremented by after a breakpoint.
+// OBSOLETE  * This is often the number of bytes in BREAKPOINT but not always.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
diff --git a/gdb/config/i960/tm-vx960.h b/gdb/config/i960/tm-vx960.h
index 16fc62a..44ff627 100644
--- a/gdb/config/i960/tm-vx960.h
+++ b/gdb/config/i960/tm-vx960.h
@@ -1,52 +1,52 @@
-/* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 1999
-   Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-   This file is part of GDB.
-
-   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 "i960/tm-i960.h"
-#include "tm-vxworks.h"
-
-/* Under VxWorks the IP isn't filled in.  Skip it, go with RIP, which has
-   the real value.  */
-#undef PC_REGNUM
-#define PC_REGNUM RIP_REGNUM
-
-/* We have more complex, useful breakpoints on the target.
-   Amount ip must be decremented by after a breakpoint.  */
-
-#define	DECR_PC_AFTER_BREAK	0
-
-/* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
-
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
-/* Breakpoint patching is handled at the target end in VxWorks.  */
-/* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (16 + 16 + 3)
-
-/* Number of registers in a ptrace_getfpregs call. */
-
-    /* @@ Can't use this -- the rdb library for the 960 target
-       doesn't support setting or retrieving FP regs.  KR  */
-
-/* #define VX_SIZE_FPREGS (REGISTER_RAW_SIZE (FP0_REGNUM) * 4) */
+// OBSOLETE /* Parameters for VxWorks Intel 960's, for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 1999
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Support.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "i960/tm-i960.h"
+// OBSOLETE #include "config/tm-vxworks.h"
+// OBSOLETE 
+// OBSOLETE /* Under VxWorks the IP isn't filled in.  Skip it, go with RIP, which has
+// OBSOLETE    the real value.  */
+// OBSOLETE #undef PC_REGNUM
+// OBSOLETE #define PC_REGNUM RIP_REGNUM
+// OBSOLETE 
+// OBSOLETE /* We have more complex, useful breakpoints on the target.
+// OBSOLETE    Amount ip must be decremented by after a breakpoint.  */
+// OBSOLETE 
+// OBSOLETE #define	DECR_PC_AFTER_BREAK	0
+// OBSOLETE 
+// OBSOLETE /* We are guaranteed to have a zero frame pointer at bottom of stack, too. */
+// OBSOLETE 
+// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
+// OBSOLETE 
+// OBSOLETE /* Breakpoint patching is handled at the target end in VxWorks.  */
+// OBSOLETE /* #define BREAKPOINT {0x00, 0x3e, 0x00, 0x66} */
+// OBSOLETE 
+// OBSOLETE /* Number of registers in a ptrace_getregs call. */
+// OBSOLETE 
+// OBSOLETE #define VX_NUM_REGS (16 + 16 + 3)
+// OBSOLETE 
+// OBSOLETE /* Number of registers in a ptrace_getfpregs call. */
+// OBSOLETE 
+// OBSOLETE     /* @@ Can't use this -- the rdb library for the 960 target
+// OBSOLETE        doesn't support setting or retrieving FP regs.  KR  */
+// OBSOLETE 
+// OBSOLETE /* #define VX_SIZE_FPREGS (REGISTER_RAW_SIZE (FP0_REGNUM) * 4) */
diff --git a/gdb/config/i960/vxworks960.mt b/gdb/config/i960/vxworks960.mt
index ad32934..e7f04c4 100644
--- a/gdb/config/i960/vxworks960.mt
+++ b/gdb/config/i960/vxworks960.mt
@@ -1,6 +1,6 @@
-# Target: VxWorks running on an Intel 960
-TDEPFILES= i960-tdep.o remote-vx.o remote-vx960.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
-TM_FILE= tm-vx960.h
-
-# Define this for the vx-share routines, which don't see param.h.
-MT_CFLAGS= -DI80960
+# OBSOLETE # Target: VxWorks running on an Intel 960
+# OBSOLETE TDEPFILES= i960-tdep.o remote-vx.o remote-vx960.o xdr_ld.o xdr_ptrace.o xdr_rdb.o
+# OBSOLETE TM_FILE= tm-vx960.h
+# OBSOLETE 
+# OBSOLETE # Define this for the vx-share routines, which don't see param.h.
+# OBSOLETE MT_CFLAGS= -DI80960
diff --git a/gdb/config/ia64/ia64.mt b/gdb/config/ia64/ia64.mt
new file mode 100644
index 0000000..c0f85a4
--- /dev/null
+++ b/gdb/config/ia64/ia64.mt
@@ -0,0 +1,2 @@
+TDEPFILES= ia64-tdep.o
+TM_FILE= tm-ia64.h
diff --git a/gdb/config/ia64/nm-aix.h b/gdb/config/ia64/nm-aix.h
index 3f6764c..8a2d66f 100644
--- a/gdb/config/ia64/nm-aix.h
+++ b/gdb/config/ia64/nm-aix.h
@@ -21,7 +21,7 @@
 #ifndef NM_AIX_H
 #define NM_AIX_H
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
 
 #ifndef AIX5
 #define AIX5 1
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index 2c980c0..e00d561 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -22,7 +22,7 @@
 #ifndef NM_LINUX_H
 #define NM_LINUX_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* Note:  It seems likely that we'll have to eventually define
    FETCH_INFERIOR_REGISTERS.  But until that time, we'll make do
diff --git a/gdb/config/ia64/tm-aix.h b/gdb/config/ia64/tm-aix.h
index 0160140..b59d6dd 100644
--- a/gdb/config/ia64/tm-aix.h
+++ b/gdb/config/ia64/tm-aix.h
@@ -22,7 +22,7 @@
 #define TM_AIX_H
 
 #include "ia64/tm-ia64.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 
 #define TARGET_ELF64
 
diff --git a/gdb/config/ia64/tm-linux.h b/gdb/config/ia64/tm-linux.h
index f716d83..6051752 100644
--- a/gdb/config/ia64/tm-linux.h
+++ b/gdb/config/ia64/tm-linux.h
@@ -24,7 +24,7 @@
 #define IA64_GNULINUX_TARGET
 
 #include "ia64/tm-ia64.h"
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 #define TARGET_ELF64
 
diff --git a/gdb/config/ia64/xm-aix.h b/gdb/config/ia64/xm-aix.h
index 6ca026d..ad717d5 100644
--- a/gdb/config/ia64/xm-aix.h
+++ b/gdb/config/ia64/xm-aix.h
@@ -23,6 +23,6 @@
 
 /* Pick up more stuff from the generic SVR4 host include file. */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
 
 #endif /* #ifndef XM_AIX_H */
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index 75bc7b2..648ff01 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -137,15 +137,15 @@
 /* mvs_check  FRAME_SAVED_PC */
 #define FRAME_SAVED_PC(fi)		m32r_frame_saved_pc (fi)
 
-/* mvs_check  EXTRACT_RETURN_VALUE */
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+/* mvs_check  DEPRECATED_EXTRACT_RETURN_VALUE */
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
   memcpy ((VALBUF), \
 	  (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \
 	  ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \
 	  TYPE_LENGTH (TYPE))
 
-/* mvs_check  STORE_RETURN_VALUE */
-#define STORE_RETURN_VALUE(TYPE, VALBUF) \
+/* mvs_check  DEPRECATED_STORE_RETURN_VALUE */
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
   write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
 		       ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
 		       (VALBUF), TYPE_LENGTH (TYPE));
@@ -181,7 +181,7 @@
 extern use_struct_convention_fn m32r_use_struct_convention;
 #define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE)
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
   extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
 		   REGISTER_RAW_SIZE (V0_REGNUM))
 
diff --git a/gdb/config/m68k/apollo68b.mh b/gdb/config/m68k/apollo68b.mh
index cf2770b..99d034b 100644
--- a/gdb/config/m68k/apollo68b.mh
+++ b/gdb/config/m68k/apollo68b.mh
@@ -1,5 +1,5 @@
-# Host: Apollo m68k, BSD mode.
-
-XM_FILE= xm-apollo68b.h
-NAT_FILE= nm-apollo68b.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
+# OBSOLETE # Host: Apollo m68k, BSD mode.
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-apollo68b.h
+# OBSOLETE NAT_FILE= nm-apollo68b.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
diff --git a/gdb/config/m68k/apollo68b.mt b/gdb/config/m68k/apollo68b.mt
index 2383d3b..11c0c02 100644
--- a/gdb/config/m68k/apollo68b.mt
+++ b/gdb/config/m68k/apollo68b.mt
@@ -1,3 +1,3 @@
-# Target: Apollo m68k in BSD mode
-TDEPFILES= m68k-tdep.o dstread.o
-TM_FILE= tm-apollo68b.h
+# OBSOLETE # Target: Apollo m68k in BSD mode
+# OBSOLETE TDEPFILES= m68k-tdep.o dstread.o
+# OBSOLETE TM_FILE= tm-apollo68b.h
diff --git a/gdb/config/m68k/apollo68v.mh b/gdb/config/m68k/apollo68v.mh
index 6610e66..4ab84f0 100644
--- a/gdb/config/m68k/apollo68v.mh
+++ b/gdb/config/m68k/apollo68v.mh
@@ -1,10 +1,10 @@
-# Host: Apollo, System V mode (?)
-
-XM_FILE= xm-apollo68v.h
-XM_CLIBS= -lPW
-
-NAT_FILE= nm-apollo68v.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
-
-RANLIB=echo >/dev/null
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE
+# OBSOLETE # Host: Apollo, System V mode (?)
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-apollo68v.h
+# OBSOLETE XM_CLIBS= -lPW
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-apollo68v.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o a68v-nat.o
+# OBSOLETE 
+# OBSOLETE RANLIB=echo >/dev/null
+# OBSOLETE CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_SYS_FILE
diff --git a/gdb/config/m68k/hp300bsd.mh b/gdb/config/m68k/hp300bsd.mh
index b0b186d..76aa9a5 100644
--- a/gdb/config/m68k/hp300bsd.mh
+++ b/gdb/config/m68k/hp300bsd.mh
@@ -1,6 +1,6 @@
-# Host: Hewlett-Packard 9000 series 300, running BSD
-
-XM_FILE= xm-hp300bsd.h
-
-NAT_FILE= nm-hp300bsd.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
+# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running BSD
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-hp300bsd.h
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-hp300bsd.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o core-aout.o
diff --git a/gdb/config/m68k/hp300bsd.mt b/gdb/config/m68k/hp300bsd.mt
index cbcc5ed..c3225e9 100644
--- a/gdb/config/m68k/hp300bsd.mt
+++ b/gdb/config/m68k/hp300bsd.mt
@@ -1,3 +1,3 @@
-# Target: Hewlett-Packard 9000 series 300, running BSD
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-hp300bsd.h
+# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running BSD
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-hp300bsd.h
diff --git a/gdb/config/m68k/hp300hpux.mh b/gdb/config/m68k/hp300hpux.mh
index 8ceb187..410c03c 100644
--- a/gdb/config/m68k/hp300hpux.mh
+++ b/gdb/config/m68k/hp300hpux.mh
@@ -1,8 +1,8 @@
-# Host: Hewlett-Packard 9000 series 300, running HPUX
-# The following is true because gcc uses a different .o file format
-# than the native HPUX compiler
-
-XM_FILE= xm-hp300hpux.h
-
-NAT_FILE= nm-hp300hpux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o
+# OBSOLETE # Host: Hewlett-Packard 9000 series 300, running HPUX
+# OBSOLETE # The following is true because gcc uses a different .o file format
+# OBSOLETE # than the native HPUX compiler
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-hp300hpux.h
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-hp300hpux.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o corelow.o core-aout.o
diff --git a/gdb/config/m68k/hp300hpux.mt b/gdb/config/m68k/hp300hpux.mt
index 0fa801d..a1848af 100644
--- a/gdb/config/m68k/hp300hpux.mt
+++ b/gdb/config/m68k/hp300hpux.mt
@@ -1,8 +1,8 @@
-# Target: Hewlett-Packard 9000 series 300, running HPUX
-
-#msg Note that GDB can only read symbols from programs that were
-#msg compiled with GCC using GAS.
-#msg
-
-TDEPFILES= m68k-tdep.o
-TM_FILE= tm-hp300hpux.h
+# OBSOLETE # Target: Hewlett-Packard 9000 series 300, running HPUX
+# OBSOLETE 
+# OBSOLETE #msg Note that GDB can only read symbols from programs that were
+# OBSOLETE #msg compiled with GCC using GAS.
+# OBSOLETE #msg
+# OBSOLETE 
+# OBSOLETE TDEPFILES= m68k-tdep.o
+# OBSOLETE TM_FILE= tm-hp300hpux.h
diff --git a/gdb/config/m68k/nm-linux.h b/gdb/config/m68k/nm-linux.h
index 5c37af9..26aa197 100644
--- a/gdb/config/m68k/nm-linux.h
+++ b/gdb/config/m68k/nm-linux.h
@@ -21,7 +21,7 @@
 #ifndef NM_LINUX_H
 #define NM_LINUX_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* Return sizeof user struct to callers in less machine dependent routines */
 
diff --git a/gdb/config/m68k/nm-m68klynx.h b/gdb/config/m68k/nm-m68klynx.h
index 49114fc..9d95d37 100644
--- a/gdb/config/m68k/nm-m68klynx.h
+++ b/gdb/config/m68k/nm-m68klynx.h
@@ -21,6 +21,6 @@
 #ifndef NM_M68KLYNX_H
 #define NM_M68KLYNX_H
 
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
 
 #endif /* NM_M68KLYNX_H */
diff --git a/gdb/config/m68k/nm-sysv4.h b/gdb/config/m68k/nm-sysv4.h
index a7d0bdd..b9cb591 100644
--- a/gdb/config/m68k/nm-sysv4.h
+++ b/gdb/config/m68k/nm-sysv4.h
@@ -20,4 +20,4 @@
 
 /* Include the generic SVR4 definitions.  */
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index a38baea..269d134 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -45,7 +45,7 @@
 /* When it returns a float/double value, use fp0 in sysV68.  */
 /* When it returns a pointer value, use a0 in sysV68.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)			\
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)		\
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)				\
     REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE,			\
 				 &REGBUF[REGISTER_BYTE (FP0_REGNUM)],	\
@@ -63,7 +63,7 @@
 /* When it returns a float/double value, use fp0 in sysV68.  */
 /* When it returns a pointer value, use a0 in sysV68.  */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)				\
       {									\
 	char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)];			\
@@ -91,8 +91,8 @@
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#undef EXTRACT_STRUCT_VALUE_ADDRESS
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
+#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF)\
 	(*(CORE_ADDR *)((char*)(REGBUF) + 8 * 4))
 
 extern int delta68_in_sigtramp (CORE_ADDR pc, char *name);
diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h
index 94b2c2c..e2889ec 100644
--- a/gdb/config/m68k/tm-linux.h
+++ b/gdb/config/m68k/tm-linux.h
@@ -36,7 +36,7 @@
    function return value of type TYPE, and copy that, in virtual
    format, into VALBUF.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
 {									\
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)				\
     {									\
@@ -58,7 +58,7 @@
 /* Write into appropriate registers a function return value of type
    TYPE, given in virtual format.  */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
 {									\
   if (TYPE_CODE (TYPE) == TYPE_CODE_FLT)				\
     {									\
@@ -76,15 +76,15 @@
     }									\
 }
 
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 #include "m68k/tm-m68k.h"
 
 /* Extract from an array REGBUF containing the (raw) register state
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#undef EXTRACT_STRUCT_VALUE_ADDRESS
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#undef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
   (*(CORE_ADDR *)((char *) (REGBUF) + REGISTER_BYTE (A0_REGNUM)))
 
 /* Offsets (in target ints) into jmp_buf.  */
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index 5b23df0..8b92281 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -21,348 +21,13 @@
 
 #include "regcache.h"
 
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+
 /* Generic 68000 stuff, to be included by other tm-*.h files.  */
 
-#define TARGET_LONG_DOUBLE_FORMAT &floatformat_m68881_ext
-
-#define TARGET_LONG_DOUBLE_BIT 96
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
-   to reach some "real" code.  */
-
-#if !defined(SKIP_PROLOGUE)
-#define SKIP_PROLOGUE(ip) (m68k_skip_prologue (ip))
-#endif
-extern CORE_ADDR m68k_skip_prologue (CORE_ADDR ip);
-
-/* Immediately after a function call, return the saved pc.
-   Can't always go through the frames for this because on some machines
-   the new frame is not set up until the new function executes
-   some instructions.  */
-
-struct frame_info;
-struct frame_saved_regs;
-
-extern CORE_ADDR m68k_saved_pc_after_call (struct frame_info *);
-extern void m68k_find_saved_regs (struct frame_info *,
-				  struct frame_saved_regs *);
-
-#define SAVED_PC_AFTER_CALL(frame) \
-  m68k_saved_pc_after_call(frame)
-
-/* Stack grows downward.  */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Stack must be kept short aligned when doing function calls.  */
-
-#define STACK_ALIGN(ADDR) (((ADDR) + 1) & ~1)
-
-/* Sequence of bytes for breakpoint instruction.
-   This is a TRAP instruction.  The last 4 bits (0xf below) is the
-   vector.  Systems which don't use 0xf should define BPT_VECTOR
-   themselves before including this file.  */
-
-#if !defined (BPT_VECTOR)
-#define BPT_VECTOR 0xf
-#endif
-
-#if !defined (BREAKPOINT)
-#define BREAKPOINT {0x4e, (0x40 | BPT_VECTOR)}
-#endif
-
-/* We default to vector 1 for the "remote" target, but allow targets
-   to override.  */
-#if !defined (REMOTE_BPT_VECTOR)
-#define REMOTE_BPT_VECTOR 1
-#endif
-
-#if !defined (REMOTE_BREAKPOINT)
-#define REMOTE_BREAKPOINT {0x4e, (0x40 | REMOTE_BPT_VECTOR)}
-#endif
-
-/* If your kernel resets the pc after the trap happens you may need to
-   define this before including this file.  */
-
-#if !defined (DECR_PC_AFTER_BREAK)
-#define DECR_PC_AFTER_BREAK 2
-#endif
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-
-#define REGISTER_SIZE 4
-
-#define REGISTER_BYTES_FP (16*4 + 8 + 8*12 + 3*4)
-#define REGISTER_BYTES_NOFP (16*4 + 8)
-
-#ifndef NUM_REGS
-#define NUM_REGS 29
-#endif
-
-#define NUM_FREGS (NUM_REGS-24)
-
-#ifndef REGISTER_BYTES_OK
-#define REGISTER_BYTES_OK(b) \
-   ((b) == REGISTER_BYTES_FP \
-    || (b) == REGISTER_BYTES_NOFP)
-#endif
-
-#ifndef REGISTER_BYTES
-#define REGISTER_BYTES (16*4 + 8 + 8*12 + 3*4)
-#endif
-
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-
-#define REGISTER_BYTE(N)  \
- ((N) >= FPC_REGNUM ? (((N) - FPC_REGNUM) * 4) + 168	\
-  : (N) >= FP0_REGNUM ? (((N) - FP0_REGNUM) * 12) + 72	\
-  : (N) * 4)
-
-/* Number of bytes of storage in the actual machine representation
-   for register N.  On the 68000, all regs are 4 bytes
-   except the floating point regs which are 12 bytes.  */
-/* Note that the unsigned cast here forces the result of the
-   subtraction to very high positive values if N < FP0_REGNUM */
-
-#define REGISTER_RAW_SIZE(N) (((unsigned)(N) - FP0_REGNUM) < 8 ? 12 : 4)
-
-/* Number of bytes of storage in the program's representation
-   for register N.  On the 68000, all regs are 4 bytes
-   except the floating point regs which are 12-byte long doubles.  */
-
-#define REGISTER_VIRTUAL_SIZE(N) (((unsigned)(N) - FP0_REGNUM) < 8 ? 12 : 4)
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define MAX_REGISTER_RAW_SIZE 12
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 12
-
-/* Return the GDB type object for the "standard" data type of data 
-   in register N.  This should be int for D0-D7, long double for FP0-FP7,
-   and void pointer for all others (A0-A7, PC, SR, FPCONTROL etc).
-   Note, for registers which contain addresses return pointer to void, 
-   not pointer to char, because we don't want to attempt to print 
-   the string after printing the address.  */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
-  ((unsigned) (N) >= FPC_REGNUM ? lookup_pointer_type (builtin_type_void) : \
-   (unsigned) (N) >= FP0_REGNUM ? builtin_type_long_double :                \
-   (unsigned) (N) >=  A0_REGNUM ? lookup_pointer_type (builtin_type_void) : \
-   builtin_type_int)
-
-/* Initializer for an array of names of registers.
-   Entries beyond the first NUM_REGS are ignored.  */
-
-#define REGISTER_NAMES  \
- {"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", \
-  "a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp", \
-  "ps", "pc",  \
-  "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7", \
-  "fpcontrol", "fpstatus", "fpiaddr", "fpcode", "fpflags" }
-
-/* Register numbers of various important registers.
-   Note that some of these values are "real" register numbers,
-   and correspond to the general registers of the machine,
-   and some are "phony" register numbers which are too large
-   to be actual register numbers as far as the user is concerned
-   but do serve to get the desired values when passed to read_register.  */
+/* D0_REGNM and A0_REGNUM must be defined here because they are
+   used by the monitor.  */
 
 #define D0_REGNUM 0
 #define A0_REGNUM 8
-#define A1_REGNUM 9
-#define FP_REGNUM 14		/* Contains address of executing stack frame */
-#define SP_REGNUM 15		/* Contains address of top of stack */
-#define PS_REGNUM 16		/* Contains processor status */
-#define PC_REGNUM 17		/* Contains program counter */
-#define FP0_REGNUM 18		/* Floating point register 0 */
-#define FPC_REGNUM 26		/* 68881 control register */
-#define FPS_REGNUM 27		/* 68881 status register */
-#define FPI_REGNUM 28		/* 68881 iaddr register */
 
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(ADDR, SP) \
-  { write_register (A1_REGNUM, (ADDR)); }
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  This is assuming that floating point values are returned
-   as doubles in d0/d1.  */
-
-#if !defined (EXTRACT_RETURN_VALUE)
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-  memcpy ((VALBUF),							\
-	  (char *)(REGBUF) +						\
-	         (TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)),	\
-	  TYPE_LENGTH(TYPE))
-#endif
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  Assumes floats are passed
-   in d0/d1.  */
-
-#if !defined (STORE_RETURN_VALUE)
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
-#endif
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one).  */
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
-   chain-pointer.
-   In the case of the 68000, the frame's nominal address
-   is the address of a 4-byte word containing the calling frame's address.  */
-
-/* If we are chaining from sigtramp, then manufacture a sigtramp frame
-   (which isn't really on the stack.  I'm not sure this is right for anything
-   but BSD4.3 on an hp300.  */
-#define FRAME_CHAIN(thisframe)  \
-  (thisframe->signal_handler_caller \
-   ? thisframe->frame \
-   : (!inside_entry_file ((thisframe)->pc) \
-      ? read_memory_integer ((thisframe)->frame, 4) \
-      : 0))
-
-/* Define other aspects of the stack frame.  */
-
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
-     (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue(FI))
-
-/* This was determined by experimentation on hp300 BSD 4.3.  Perhaps
-   it corresponds to some offset in /usr/include/sys/user.h or
-   something like that.  Using some system include file would
-   have the advantage of probably being more robust in the face
-   of OS upgrades, but the disadvantage of being wrong for
-   cross-debugging.  */
-
-#define SIG_PC_FP_OFFSET 530
-
-#define FRAME_SAVED_PC(FRAME) \
-  (((FRAME)->signal_handler_caller \
-    ? ((FRAME)->next \
-       ? read_memory_integer ((FRAME)->next->frame + SIG_PC_FP_OFFSET, 4) \
-       : read_memory_integer (read_register (SP_REGNUM) \
-			      + SIG_PC_FP_OFFSET - 8, 4) \
-       ) \
-    : read_memory_integer ((FRAME)->frame + 4, 4)) \
-   )
-
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Set VAL to the number of args passed to frame described by FI.
-   Can set VAL to -1, meaning no way to tell.  */
-
-/* We can't tell how many args there are
-   now that the C compiler delays popping them.  */
-#if !defined (FRAME_NUM_ARGS)
-#define FRAME_NUM_ARGS(fi) (-1)
-#endif
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 8
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-
-#if !defined (FRAME_FIND_SAVED_REGS)
-#define FRAME_FIND_SAVED_REGS(fi,fsr) m68k_find_saved_regs ((fi), &(fsr))
-#endif /* no FIND_FRAME_SAVED_REGS.  */
-
-
-/* Things needed for making the inferior call functions.  */
-
-/* The CALL_DUMMY macro is the sequence of instructions, as disassembled
-   by gdb itself:
-
-   These instructions exist only so that m68k_find_saved_regs can parse
-   them as a "prologue"; they are never executed.
-
-   fmovemx fp0-fp7,sp@-                 0xf227 0xe0ff
-   moveml d0-a5,sp@-                    0x48e7 0xfffc
-   clrw sp@-                            0x4267
-   movew ccr,sp@-                               0x42e7
-
-   The arguments are pushed at this point by GDB; no code is needed in
-   the dummy for this.  The CALL_DUMMY_START_OFFSET gives the position
-   of the following jsr instruction.  That is where we start
-   executing.
-
-   jsr @#0x32323232                     0x4eb9 0x3232 0x3232
-   addal #0x69696969,sp                 0xdffc 0x6969 0x6969
-   trap #<your BPT_VECTOR number here>  0x4e4?
-   nop                                  0x4e71
-
-   Note this is CALL_DUMMY_LENGTH bytes (28 for the above example).
-
-   The dummy frame always saves the floating-point registers, whether they
-   actually exist on this target or not.  */
-
-/* FIXME: Wrong to hardwire this as BPT_VECTOR when sometimes it
-   should be REMOTE_BPT_VECTOR.  Best way to fix it would be to define
-   CALL_DUMMY_BREAKPOINT_OFFSET.  */
-
-#define CALL_DUMMY {0xf227e0ff, 0x48e7fffc, 0x426742e7, 0x4eb93232, 0x3232dffc, 0x69696969, (0x4e404e71 | (BPT_VECTOR << 16))}
-#define CALL_DUMMY_LENGTH 28	/* Size of CALL_DUMMY */
-#define CALL_DUMMY_START_OFFSET 12	/* Offset to jsr instruction */
-#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 12)
-
-/* Insert the specified number of args and function address
-   into a call sequence of the above form stored at DUMMYNAME.
-   We use the BFD routines to store a big-endian value of known size.  */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p)     \
-{ bfd_putb32 (fun,     (unsigned char *) dummyname + CALL_DUMMY_START_OFFSET + 2);  \
-  bfd_putb32 (nargs*4, (unsigned char *) dummyname + CALL_DUMMY_START_OFFSET + 8); }
-
-/* Push an empty stack frame, to record the current PC, etc.  */
-
-#define PUSH_DUMMY_FRAME	{ m68k_push_dummy_frame (); }
-
-extern void m68k_push_dummy_frame (void);
-
-extern void m68k_pop_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-
-#define POP_FRAME		{ m68k_pop_frame (); }
-
-/* Offset from SP to first arg on stack at first instruction of a function */
-
-#define SP_ARG0 (1 * 4)
-
-#define TARGET_M68K
-
-/* Figure out where the longjmp will land.  Slurp the args out of the stack.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into ADDR.
-   This routine returns true on success */
-
-extern int m68k_get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
index cfc462f..ed1f6f0 100644
--- a/gdb/config/m68k/tm-m68klynx.h
+++ b/gdb/config/m68k/tm-m68klynx.h
@@ -21,7 +21,7 @@
 #ifndef TM_M68KLYNX_H
 #define TM_M68KLYNX_H
 
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
 
 /* If PC-2 contains this instruction, then we know what we are in a system
    call stub, and the return PC is is at SP+4, instead of SP. */
diff --git a/gdb/config/m68k/tm-m68kv4.h b/gdb/config/m68k/tm-m68kv4.h
index 18bf5a2..275ab62 100644
--- a/gdb/config/m68k/tm-m68kv4.h
+++ b/gdb/config/m68k/tm-m68kv4.h
@@ -34,7 +34,7 @@
 
 #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
 
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 #include "m68k/tm-m68k.h"
 
 /* Offsets (in target ints) into jmp_buf.  Not defined in any system header
diff --git a/gdb/config/m68k/tm-sun2os4.h b/gdb/config/m68k/tm-sun2os4.h
index 496c329..d5fe531 100644
--- a/gdb/config/m68k/tm-sun2os4.h
+++ b/gdb/config/m68k/tm-sun2os4.h
@@ -18,4 +18,4 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "m68k/tm-sun2.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-sun3os4.h b/gdb/config/m68k/tm-sun3os4.h
index d4bc74f..ced4376 100644
--- a/gdb/config/m68k/tm-sun3os4.h
+++ b/gdb/config/m68k/tm-sun3os4.h
@@ -19,4 +19,4 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "m68k/tm-sun3.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 988b4bb..ea27ac4 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -30,7 +30,7 @@
 #define	DECR_PC_AFTER_BREAK	0
 
 #include "m68k/tm-m68k.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
 
 /* Takes the current frame-struct pointer and returns the chain-pointer
    to get to the calling frame.
diff --git a/gdb/config/m68k/xm-m68kv4.h b/gdb/config/m68k/xm-m68kv4.h
index 11679a9..542cd10 100644
--- a/gdb/config/m68k/xm-m68kv4.h
+++ b/gdb/config/m68k/xm-m68kv4.h
@@ -26,4 +26,4 @@
 
 /* Pick up more stuff from the generic SVR4 host include file. */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
diff --git a/gdb/config/m68k/xm-nbsd.h b/gdb/config/m68k/xm-nbsd.h
index c266a99..6c735fa 100644
--- a/gdb/config/m68k/xm-nbsd.h
+++ b/gdb/config/m68k/xm-nbsd.h
@@ -19,4 +19,4 @@
    Boston, MA 02111-1307, USA.  */
 
 /* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
diff --git a/gdb/config/m88k/delta88.mh b/gdb/config/m88k/delta88.mh
index 13dc6c2..3c079fe 100644
--- a/gdb/config/m88k/delta88.mh
+++ b/gdb/config/m88k/delta88.mh
@@ -1,6 +1,6 @@
-# Host: Motorola 88k running SVR3
-
-XM_FILE= xm-delta88.h
-
-NAT_FILE= nm-m88k.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o
+# OBSOLETE # Host: Motorola 88k running SVR3
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-delta88.h
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-m88k.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o
diff --git a/gdb/config/m88k/delta88.mt b/gdb/config/m88k/delta88.mt
index c8e669b..83d4ad1 100644
--- a/gdb/config/m88k/delta88.mt
+++ b/gdb/config/m88k/delta88.mt
@@ -1,3 +1,3 @@
-# Target: Motorola 88k running SVR3
-TDEPFILES= m88k-tdep.o
-TM_FILE= tm-delta88.h
+# OBSOLETE # Target: Motorola 88k running SVR3
+# OBSOLETE TDEPFILES= m88k-tdep.o
+# OBSOLETE TM_FILE= tm-delta88.h
diff --git a/gdb/config/m88k/delta88v4.mh b/gdb/config/m88k/delta88v4.mh
index ba3dd7b..bc2abc5 100644
--- a/gdb/config/m88k/delta88v4.mh
+++ b/gdb/config/m88k/delta88v4.mh
@@ -1,8 +1,8 @@
-# Host: Motorola 88k running SVR4
-
-XM_FILE= xm-delta88v4.h
-
-NAT_FILE= nm-delta88v4.h
-NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o \
-	solib.o solib-svr4.o solib-legacy.o \
-	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+# OBSOLETE # Host: Motorola 88k running SVR4
+# OBSOLETE 
+# OBSOLETE XM_FILE= xm-delta88v4.h
+# OBSOLETE 
+# OBSOLETE NAT_FILE= nm-delta88v4.h
+# OBSOLETE NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o \
+# OBSOLETE 	solib.o solib-svr4.o solib-legacy.o \
+# OBSOLETE 	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
diff --git a/gdb/config/m88k/delta88v4.mt b/gdb/config/m88k/delta88v4.mt
index 7797d4b..c8f9df2 100644
--- a/gdb/config/m88k/delta88v4.mt
+++ b/gdb/config/m88k/delta88v4.mt
@@ -1,3 +1,3 @@
-# Target: Motorola 88k running SVR4
-TDEPFILES= m88k-tdep.o
-TM_FILE= tm-delta88v4.h
+# OBSOLETE # Target: Motorola 88k running SVR4
+# OBSOLETE TDEPFILES= m88k-tdep.o
+# OBSOLETE TM_FILE= tm-delta88v4.h
diff --git a/gdb/config/m88k/m88k.mh b/gdb/config/m88k/m88k.mh
index 5d4350b..a09e7a1 100644
--- a/gdb/config/m88k/m88k.mh
+++ b/gdb/config/m88k/m88k.mh
@@ -1,4 +1,4 @@
-# Host: Motorola 88000 running DGUX
-XM_FILE= xm-dgux.h
-NAT_FILE= nm-m88k.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o
+# OBSOLETE # Host: Motorola 88000 running DGUX
+# OBSOLETE XM_FILE= xm-dgux.h
+# OBSOLETE NAT_FILE= nm-m88k.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o
diff --git a/gdb/config/m88k/m88k.mt b/gdb/config/m88k/m88k.mt
index ca3fab4..c4068e0 100644
--- a/gdb/config/m88k/m88k.mt
+++ b/gdb/config/m88k/m88k.mt
@@ -1,3 +1,3 @@
-# Target: Motorola 88k Binary Compatibility Standard
-TDEPFILES= m88k-tdep.o remote-bug.o
-TM_FILE= tm-m88k.h
+# OBSOLETE # Target: Motorola 88k Binary Compatibility Standard
+# OBSOLETE TDEPFILES= m88k-tdep.o remote-bug.o
+# OBSOLETE TM_FILE= tm-m88k.h
diff --git a/gdb/config/m88k/nm-delta88v4.h b/gdb/config/m88k/nm-delta88v4.h
index 90ee391..976cfa0 100644
--- a/gdb/config/m88k/nm-delta88v4.h
+++ b/gdb/config/m88k/nm-delta88v4.h
@@ -1,23 +1,23 @@
-/* Native machine description for Motorola Delta 88 box, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "m88k/nm-m88k.h"
-#include "nm-sysv4.h"
+// OBSOLETE /* Native machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "m88k/nm-m88k.h"
+// OBSOLETE #include "config/nm-sysv4.h"
diff --git a/gdb/config/m88k/nm-m88k.h b/gdb/config/m88k/nm-m88k.h
index 4c402bd..6521a2a 100644
--- a/gdb/config/m88k/nm-m88k.h
+++ b/gdb/config/m88k/nm-m88k.h
@@ -1,25 +1,25 @@
-/* Native support macros for m88k, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#define FETCH_INFERIOR_REGISTERS
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-        (addr) = m88k_register_u_addr ((blockend),(regno));
+// OBSOLETE /* Native support macros for m88k, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE 
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE         (addr) = m88k_register_u_addr ((blockend),(regno));
diff --git a/gdb/config/m88k/tm-delta88.h b/gdb/config/m88k/tm-delta88.h
index f44b1f7..f63fca3 100644
--- a/gdb/config/m88k/tm-delta88.h
+++ b/gdb/config/m88k/tm-delta88.h
@@ -1,28 +1,28 @@
-/* Target machine description for Motorola Delta 88 box, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "m88k/tm-m88k.h"
-
-#define DELTA88
-
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name)))
-#define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20
-#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4)
+// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "m88k/tm-m88k.h"
+// OBSOLETE 
+// OBSOLETE #define DELTA88
+// OBSOLETE 
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name)))
+// OBSOLETE #define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20
+// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4)
diff --git a/gdb/config/m88k/tm-delta88v4.h b/gdb/config/m88k/tm-delta88v4.h
index 35a605d..e343a05 100644
--- a/gdb/config/m88k/tm-delta88v4.h
+++ b/gdb/config/m88k/tm-delta88v4.h
@@ -1,32 +1,32 @@
-/* Target machine description for Motorola Delta 88 box, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1998, 1999
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#define DELTA88
-
-#include "m88k/tm-m88k.h"
-#include "tm-sysv4.h"
-
-/* If we don't define this, backtraces go on forever.  */
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-#define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \
-                                          || STREQ("sigacthandler", (name))))
-#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4)
+// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1998, 1999
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #define DELTA88
+// OBSOLETE 
+// OBSOLETE #include "m88k/tm-m88k.h"
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE 
+// OBSOLETE /* If we don't define this, backtraces go on forever.  */
+// OBSOLETE #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
+// OBSOLETE 
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \
+// OBSOLETE                                           || STREQ("sigacthandler", (name))))
+// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4)
diff --git a/gdb/config/m88k/tm-m88k.h b/gdb/config/m88k/tm-m88k.h
index 7405c12..2f08f1a 100644
--- a/gdb/config/m88k/tm-m88k.h
+++ b/gdb/config/m88k/tm-m88k.h
@@ -1,587 +1,587 @@
-/* Target machine description for generic Motorola 88000, for GDB.
-
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1996,
-   1998, 1999, 2000, 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "doublest.h"
-#include "regcache.h"
-
-/* g++ support is not yet included.  */
-
-/* We cache information about saved registers in the frame structure,
-   to save us from having to re-scan function prologues every time
-   a register in a non-current frame is accessed.  */
-
-#define EXTRA_FRAME_INFO 	\
-	struct frame_saved_regs *fsr;	\
-	CORE_ADDR locals_pointer;	\
-	CORE_ADDR args_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
-   so that FRAME_FIND_SAVED_REGS () will know to allocate and
-   initialize a frame_saved_regs struct the first time it is called.
-   Set the arg_pointer to -1, which is not valid; 0 and other values
-   indicate real, cached values.  */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
-	init_extra_frame_info (fromleaf, fi)
-extern void init_extra_frame_info ();
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
-   to reach some "real" code.  */
-
-extern CORE_ADDR m88k_skip_prologue (CORE_ADDR);
-#define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries.  The
-   kernel also uses the least significant two bits for its own hocus
-   pocus.  When gdb receives an address from the kernel, it needs to
-   preserve those right-most two bits, but gdb also needs to be careful
-   to realize that those two bits are not really a part of the address
-   of an instruction.  Shrug.  */
-
-extern CORE_ADDR m88k_addr_bits_remove (CORE_ADDR);
-#define ADDR_BITS_REMOVE(addr) m88k_addr_bits_remove (addr)
-
-/* Immediately after a function call, return the saved pc.
-   Can't always go through the frames for this because on some machines
-   the new frame is not set up until the new function executes
-   some instructions.  */
-
-#define SAVED_PC_AFTER_CALL(frame) \
-  (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
-
-/* Stack grows downward.  */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction.  */
-
-/* instruction 0xF000D1FF is 'tb0 0,r0,511'
-   If Bit bit 0 of r0 is clear (always true),
-   initiate exception processing (trap).
- */
-#define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
-
-/* Amount PC must be decremented by after a breakpoint.
-   This is often the number of bytes in BREAKPOINT
-   but not always.  */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Say how long (ordinary) registers are.  This is a piece of bogosity
-   used in push_word and a few other places; REGISTER_RAW_SIZE is the
-   real way to know how big a register is.  */
-
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-
-#define GP_REGS (38)
-#define FP_REGS (32)
-#define NUM_REGS (GP_REGS + FP_REGS)
-
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.  */
-
-#define REGISTER_NAMES {\
-			  "r0",\
-			  "r1",\
-			  "r2",\
-			  "r3",\
-			  "r4",\
-			  "r5",\
-			  "r6",\
-			  "r7",\
-			  "r8",\
-			  "r9",\
-			  "r10",\
-			  "r11",\
-			  "r12",\
-			  "r13",\
-			  "r14",\
-			  "r15",\
-			  "r16",\
-			  "r17",\
-			  "r18",\
-			  "r19",\
-			  "r20",\
-			  "r21",\
-			  "r22",\
-			  "r23",\
-			  "r24",\
-			  "r25",\
-			  "r26",\
-			  "r27",\
-			  "r28",\
-			  "r29",\
-			  "r30",\
-			  "r31",\
-			  "psr",\
-			  "fpsr",\
-			  "fpcr",\
-			  "sxip",\
-			  "snip",\
-			  "sfip",\
-			  "x0",\
-			  "x1",\
-			  "x2",\
-			  "x3",\
-			  "x4",\
-			  "x5",\
-			  "x6",\
-			  "x7",\
-			  "x8",\
-			  "x9",\
-			  "x10",\
-			  "x11",\
-			  "x12",\
-			  "x13",\
-			  "x14",\
-			  "x15",\
-			  "x16",\
-			  "x17",\
-			  "x18",\
-			  "x19",\
-			  "x20",\
-			  "x21",\
-			  "x22",\
-			  "x23",\
-			  "x24",\
-			  "x25",\
-			  "x26",\
-			  "x27",\
-			  "x28",\
-			  "x29",\
-			  "x30",\
-			  "x31",\
-			  "vbr",\
-			  "dmt0",\
-			  "dmd0",\
-			  "dma0",\
-			  "dmt1",\
-			  "dmd1",\
-			  "dma1",\
-			  "dmt2",\
-			  "dmd2",\
-			  "dma2",\
-			  "sr0",\
-			  "sr1",\
-			  "sr2",\
-			  "sr3",\
-			  "fpecr",\
-			  "fphs1",\
-			  "fpls1",\
-			  "fphs2",\
-			  "fpls2",\
-			  "fppt",\
-			  "fprh",\
-			  "fprl",\
-			  "fpit",\
-			  "fpsr",\
-			  "fpcr",\
-		      }
-
-
-/* Register numbers of various important registers.
-   Note that some of these values are "real" register numbers,
-   and correspond to the general registers of the machine,
-   and some are "phony" register numbers which are too large
-   to be actual register numbers as far as the user is concerned
-   but do serve to get the desired values when passed to read_register.  */
-
-#define R0_REGNUM 0		/* Contains the constant zero */
-#define SRP_REGNUM 1		/* Contains subroutine return pointer */
-#define RV_REGNUM 2		/* Contains simple return values */
-#define SRA_REGNUM 12		/* Contains address of struct return values */
-#define SP_REGNUM 31		/* Contains address of top of stack */
-
-/* Instruction pointer notes...
-
-   On the m88100:
-
-   * cr04 = sxip.  On exception, contains the excepting pc (probably).
-   On rte, is ignored.
-
-   * cr05 = snip.  On exception, contains the NPC (next pc).  On rte,
-   pc is loaded from here.
-
-   * cr06 = sfip.  On exception, contains the NNPC (next next pc).  On
-   rte, the NPC is loaded from here.
-
-   * lower two bits of each are flag bits.  Bit 1 is V means address
-   is valid.  If address is not valid, bit 0 is ignored.  Otherwise,
-   bit 0 is E and asks for an exception to be taken if this
-   instruction is executed.
-
-   On the m88110:
-
-   * cr04 = exip.  On exception, contains the address of the excepting
-   pc (always).  On rte, pc is loaded from here.  Bit 0, aka the D
-   bit, is a flag saying that the offending instruction was in a
-   branch delay slot.  If set, then cr05 contains the NPC.
-
-   * cr05 = enip.  On exception, if the instruction pointed to by cr04
-   was in a delay slot as indicated by the bit 0 of cr04, aka the D
-   bit, the cr05 contains the NPC.  Otherwise ignored.
-
-   * cr06 is invalid  */
-
-/* Note that the Harris Unix kernels emulate the m88100's behavior on
-   the m88110.  */
-
-#define SXIP_REGNUM 35		/* On m88100, Contains Shadow Execute
-				   Instruction Pointer.  */
-#define SNIP_REGNUM 36		/* On m88100, Contains Shadow Next
-				   Instruction Pointer.  */
-#define SFIP_REGNUM 37		/* On m88100, Contains Shadow Fetched
-				   Intruction pointer.  */
-
-#define EXIP_REGNUM 35		/* On m88110, Contains Exception
-				   Executing Instruction Pointer.  */
-#define ENIP_REGNUM 36		/* On m88110, Contains the Exception
-				   Next Instruction Pointer.  */
-
-#define PC_REGNUM SXIP_REGNUM	/* Program Counter */
-#define NPC_REGNUM SNIP_REGNUM	/* Next Program Counter */
-#define M88K_NNPC_REGNUM SFIP_REGNUM        /* Next Next Program Counter */
-
-
-#define PSR_REGNUM 32		/* Processor Status Register */
-#define FPSR_REGNUM 33		/* Floating Point Status Register */
-#define FPCR_REGNUM 34		/* Floating Point Control Register */
-#define XFP_REGNUM 38		/* First Extended Float Register */
-#define X0_REGNUM XFP_REGNUM	/* Which also contains the constant zero */
-
-/* This is rather a confusing lie.  Our m88k port using a stack pointer value
-   for the frame address.  Hence, the frame address and the frame pointer are
-   only indirectly related.  The value of this macro is the register number
-   fetched by the machine "independent" portions of gdb when they want to know
-   about a frame address.  Thus, we lie here and claim that FP_REGNUM is
-   SP_REGNUM.  */
-#define FP_REGNUM SP_REGNUM	/* Reg fetched to locate frame when pgm stops */
-#define ACTUAL_FP_REGNUM 30
-
-/* PSR status bit definitions.  */
-
-#define PSR_MODE		0x80000000
-#define PSR_BYTE_ORDER		0x40000000
-#define PSR_SERIAL_MODE		0x20000000
-#define PSR_CARRY		0x10000000
-#define PSR_SFU_DISABLE		0x000003f0
-#define PSR_SFU1_DISABLE	0x00000008
-#define PSR_MXM			0x00000004
-#define PSR_IND			0x00000002
-#define PSR_SFRZ		0x00000001
-
-
-
-/* The following two comments come from the days prior to the m88110
-   port.  The m88110 handles the instruction pointers differently.  I
-   do not know what any m88110 kernels do as the m88110 port I'm
-   working with is for an embedded system.  rich@cygnus.com
-   13-sept-93.  */
-
-/* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the
-   address of the next instr to be executed when a breakpoint occurs.
-   Because the kernel gets the next instr (SNIP_REGNUM), the instr in
-   SNIP needs to be put back into SFIP, and the instr in SXIP should
-   be shifted to SNIP */
-
-/* Are you sitting down?  It turns out that the 88K BCS (binary
-   compatibility standard) folks originally felt that the debugger
-   should be responsible for backing up the IPs, not the kernel (as is
-   usually done).  Well, they have reversed their decision, and in
-   future releases our kernel will be handling the backing up of the
-   IPs.  So, eventually, we won't need to do the SHIFT_INST_REGS
-   stuff.  But, for now, since there are 88K systems out there that do
-   need the debugger to do the IP shifting, and since there will be
-   systems where the kernel does the shifting, the code is a little
-   more complex than perhaps it needs to be (we still go inside
-   SHIFT_INST_REGS, and if the shifting hasn't occurred then gdb goes
-   ahead and shifts).  */
-
-extern int target_is_m88110;
-#define SHIFT_INST_REGS() \
-if (!target_is_m88110) \
-{ \
-    CORE_ADDR pc = read_register (PC_REGNUM); \
-    CORE_ADDR npc = read_register (NPC_REGNUM); \
-    if (pc != npc) \
-    { \
-	write_register (M88K_NNPC_REGNUM, npc); \
-	write_register (NPC_REGNUM, pc); \
-    } \
-}
-
-    /* Storing the following registers is a no-op. */
-#define CANNOT_STORE_REGISTER(regno)	(((regno) == R0_REGNUM) \
-					 || ((regno) == X0_REGNUM))
-
-  /* Number of bytes of storage in the actual machine representation
-     for register N.  On the m88k,  the general purpose registers are 4
-     bytes and the 88110 extended registers are 10 bytes. */
-
-#define REGISTER_RAW_SIZE(N) ((N) < XFP_REGNUM ? 4 : 10)
-
-  /* Total amount of space needed to store our copies of the machine's
-     register state, the array `registers'.  */
-
-#define REGISTER_BYTES ((GP_REGS * REGISTER_RAW_SIZE(0)) \
-			+ (FP_REGS * REGISTER_RAW_SIZE(XFP_REGNUM)))
-
-  /* Index within `registers' of the first byte of the space for
-     register N.  */
-
-#define REGISTER_BYTE(N) (((N) * REGISTER_RAW_SIZE(0)) \
-			  + ((N) >= XFP_REGNUM \
-			     ? (((N) - XFP_REGNUM) \
-				* REGISTER_RAW_SIZE(XFP_REGNUM)) \
-			     : 0))
-
-  /* Number of bytes of storage in the program's representation for
-     register N.  On the m88k, all registers are 4 bytes excepting the
-     m88110 extended registers which are 8 byte doubles. */
-
-#define REGISTER_VIRTUAL_SIZE(N) ((N) < XFP_REGNUM ? 4 : 8)
-
-  /* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define MAX_REGISTER_RAW_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
-
-  /* Largest value REGISTER_VIRTUAL_SIZE can have.
-     Are FPS1, FPS2, FPR "virtual" regisers? */
-
-#define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
-
-/* Return the GDB type object for the "standard" data type
-   of data in register N.  */
-
-struct type *m88k_register_type (int regnum);
-#define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
-
-/* The 88k call/return conventions call for "small" values to be returned
-   into consecutive registers starting from r2.  */
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-  memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  write_register_bytes (2*REGISTER_RAW_SIZE(0), (VALBUF), TYPE_LENGTH (TYPE))
-
-/* In COFF, if PCC says a parameter is a short or a char, do not
-   change it to int (it seems the convention is to change it). */
-
-#define BELIEVE_PCC_PROMOTION 1
-
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* FRAME_CHAIN takes a frame's nominal address
-   and produces the frame's chain-pointer.
-
-   However, if FRAME_CHAIN_VALID returns zero,
-   it means the given frame is the outermost one and has no caller.  */
-
-extern CORE_ADDR frame_chain ();
-extern int frame_chain_valid ();
-extern int frameless_function_invocation ();
-
-#define FRAME_CHAIN(thisframe) \
-	frame_chain (thisframe)
-
-#define	FRAMELESS_FUNCTION_INVOCATION(frame)	\
-	(frameless_function_invocation (frame))
-
-/* Define other aspects of the stack frame.  */
-
-#define FRAME_SAVED_PC(FRAME)	\
-	frame_saved_pc (FRAME)
-extern CORE_ADDR frame_saved_pc ();
-
-#define FRAME_ARGS_ADDRESS(fi)	\
-	frame_args_address (fi)
-extern CORE_ADDR frame_args_address ();
-
-#define FRAME_LOCALS_ADDRESS(fi) \
-	frame_locals_address (fi)
-extern CORE_ADDR frame_locals_address ();
-
-/* Return number of args passed to a frame.
-   Can return -1, meaning no way to tell.  */
-
-#define FRAME_NUM_ARGS(fi)  (-1)
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-
-/* On the 88k, parameter registers get stored into the so called "homing"
-   area.  This *always* happens when you compiled with GCC and use -g.
-   Also, (with GCC and -g) the saving of the parameter register values
-   always happens right within the function prologue code, so these register
-   values can generally be relied upon to be already copied into their
-   respective homing slots by the time you will normally try to look at
-   them (we hope).
-
-   Note that homing area stack slots are always at *positive* offsets from
-   the frame pointer.  Thus, the homing area stack slots for the parameter
-   registers (passed values) for a given function are actually part of the
-   frame area of the caller.  This is unusual, but it should not present
-   any special problems for GDB.
-
-   Note also that on the 88k, we are only interested in finding the
-   registers that might have been saved in memory.  This is a subset of
-   the whole set of registers because the standard calling sequence allows
-   the called routine to clobber many registers.
-
-   We could manage to locate values for all of the so called "preserved"
-   registers (some of which may get saved within any particular frame) but
-   that would require decoding all of the tdesc information.  That would be
-   nice information for GDB to have, but it is not strictly manditory if we
-   can live without the ability to look at values within (or backup to)
-   previous frames.
- */
-
-struct frame_saved_regs;
-struct frame_info;
-
-void frame_find_saved_regs (struct frame_info *fi,
-			    struct frame_saved_regs *fsr);
-
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
-        frame_find_saved_regs (frame_info, &frame_saved_regs)
-
-
-#define POP_FRAME pop_frame ()
-extern void pop_frame ();
-
-/* Call function stuff contributed by Kevin Buettner of Motorola.  */
-
-#define CALL_DUMMY_LOCATION AFTER_TEXT_END
-
-extern void m88k_push_dummy_frame ();
-#define PUSH_DUMMY_FRAME	m88k_push_dummy_frame()
-
-#define CALL_DUMMY { 				\
-0x67ff00c0,	/*   0:   subu	#sp,#sp,0xc0 */ \
-0x243f0004,	/*   4:   st	#r1,#sp,0x4 */ \
-0x245f0008,	/*   8:   st	#r2,#sp,0x8 */ \
-0x247f000c,	/*   c:   st	#r3,#sp,0xc */ \
-0x249f0010,	/*  10:   st	#r4,#sp,0x10 */ \
-0x24bf0014,	/*  14:   st	#r5,#sp,0x14 */ \
-0x24df0018,	/*  18:   st	#r6,#sp,0x18 */ \
-0x24ff001c,	/*  1c:   st	#r7,#sp,0x1c */ \
-0x251f0020,	/*  20:   st	#r8,#sp,0x20 */ \
-0x253f0024,	/*  24:   st	#r9,#sp,0x24 */ \
-0x255f0028,	/*  28:   st	#r10,#sp,0x28 */ \
-0x257f002c,	/*  2c:   st	#r11,#sp,0x2c */ \
-0x259f0030,	/*  30:   st	#r12,#sp,0x30 */ \
-0x25bf0034,	/*  34:   st	#r13,#sp,0x34 */ \
-0x25df0038,	/*  38:   st	#r14,#sp,0x38 */ \
-0x25ff003c,	/*  3c:   st	#r15,#sp,0x3c */ \
-0x261f0040,	/*  40:   st	#r16,#sp,0x40 */ \
-0x263f0044,	/*  44:   st	#r17,#sp,0x44 */ \
-0x265f0048,	/*  48:   st	#r18,#sp,0x48 */ \
-0x267f004c,	/*  4c:   st	#r19,#sp,0x4c */ \
-0x269f0050,	/*  50:   st	#r20,#sp,0x50 */ \
-0x26bf0054,	/*  54:   st	#r21,#sp,0x54 */ \
-0x26df0058,	/*  58:   st	#r22,#sp,0x58 */ \
-0x26ff005c,	/*  5c:   st	#r23,#sp,0x5c */ \
-0x271f0060,	/*  60:   st	#r24,#sp,0x60 */ \
-0x273f0064,	/*  64:   st	#r25,#sp,0x64 */ \
-0x275f0068,	/*  68:   st	#r26,#sp,0x68 */ \
-0x277f006c,	/*  6c:   st	#r27,#sp,0x6c */ \
-0x279f0070,	/*  70:   st	#r28,#sp,0x70 */ \
-0x27bf0074,	/*  74:   st	#r29,#sp,0x74 */ \
-0x27df0078,	/*  78:   st	#r30,#sp,0x78 */ \
-0x63df0000,	/*  7c:   addu	#r30,#sp,0x0 */ \
-0x145f0000,	/*  80:   ld	#r2,#sp,0x0 */ \
-0x147f0004,	/*  84:   ld	#r3,#sp,0x4 */ \
-0x149f0008,	/*  88:   ld	#r4,#sp,0x8 */ \
-0x14bf000c,	/*  8c:   ld	#r5,#sp,0xc */ \
-0x14df0010,	/*  90:   ld	#r6,#sp,0x10 */ \
-0x14ff0014,	/*  94:   ld	#r7,#sp,0x14 */ \
-0x151f0018,	/*  98:   ld	#r8,#sp,0x18 */ \
-0x153f001c,	/*  9c:   ld	#r9,#sp,0x1c */ \
-0x5c200000,	/*  a0:   or.u	#r1,#r0,0x0 */ \
-0x58210000,	/*  a4:   or	#r1,#r1,0x0 */ \
-0xf400c801,	/*  a8:   jsr	#r1 */ \
-0xf000d1ff	/*  ac:   tb0	0x0,#r0,0x1ff */ \
-}
-
-#define CALL_DUMMY_START_OFFSET 0x80
-#define CALL_DUMMY_LENGTH 0xb0
-
-/* FIXME: byteswapping.  */
-#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)	\
-{ 									\
-  *(unsigned long *)((char *) (dummy) + 0xa0) |=			\
-	(((unsigned long) (fun)) >> 16);				\
-  *(unsigned long *)((char *) (dummy) + 0xa4) |=			\
-	(((unsigned long) (fun)) & 0xffff);				\
-}
-
-/* Stack must be aligned on 64-bit boundaries when synthesizing
-   function calls. */
-
-#define STACK_ALIGN(addr) (((addr) + 7) & -8)
-
-#define STORE_STRUCT_RETURN(addr, sp) \
-    write_register (SRA_REGNUM, (addr))
-
-#define NEED_TEXT_START_END 1
-
-/* According to the MC88100 RISC Microprocessor User's Manual, section
-   6.4.3.1.2:
-
-   ... can be made to return to a particular instruction by placing a
-   valid instruction address in the SNIP and the next sequential
-   instruction address in the SFIP (with V bits set and E bits clear).
-   The rte resumes execution at the instruction pointed to by the 
-   SNIP, then the SFIP.
-
-   The E bit is the least significant bit (bit 0).  The V (valid) bit is
-   bit 1.  This is why we logical or 2 into the values we are writing
-   below.  It turns out that SXIP plays no role when returning from an
-   exception so nothing special has to be done with it.  We could even
-   (presumably) give it a totally bogus value.
-
-   -- Kevin Buettner
- */
-
-extern void m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid);
-#define TARGET_WRITE_PC(VAL, PID) m88k_target_write_pc (VAL, PID)
+// OBSOLETE /* Target machine description for generic Motorola 88000, for GDB.
+// OBSOLETE 
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1996,
+// OBSOLETE    1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "doublest.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE /* g++ support is not yet included.  */
+// OBSOLETE 
+// OBSOLETE /* We cache information about saved registers in the frame structure,
+// OBSOLETE    to save us from having to re-scan function prologues every time
+// OBSOLETE    a register in a non-current frame is accessed.  */
+// OBSOLETE 
+// OBSOLETE #define EXTRA_FRAME_INFO 	\
+// OBSOLETE 	struct frame_saved_regs *fsr;	\
+// OBSOLETE 	CORE_ADDR locals_pointer;	\
+// OBSOLETE 	CORE_ADDR args_pointer;
+// OBSOLETE 
+// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
+// OBSOLETE    so that FRAME_FIND_SAVED_REGS () will know to allocate and
+// OBSOLETE    initialize a frame_saved_regs struct the first time it is called.
+// OBSOLETE    Set the arg_pointer to -1, which is not valid; 0 and other values
+// OBSOLETE    indicate real, cached values.  */
+// OBSOLETE 
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+// OBSOLETE 	init_extra_frame_info (fromleaf, fi)
+// OBSOLETE extern void init_extra_frame_info ();
+// OBSOLETE 
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE    Zero on most machines.  */
+// OBSOLETE 
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE 
+// OBSOLETE /* Advance PC across any function entry prologue instructions
+// OBSOLETE    to reach some "real" code.  */
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR m88k_skip_prologue (CORE_ADDR);
+// OBSOLETE #define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
+// OBSOLETE 
+// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries.  The
+// OBSOLETE    kernel also uses the least significant two bits for its own hocus
+// OBSOLETE    pocus.  When gdb receives an address from the kernel, it needs to
+// OBSOLETE    preserve those right-most two bits, but gdb also needs to be careful
+// OBSOLETE    to realize that those two bits are not really a part of the address
+// OBSOLETE    of an instruction.  Shrug.  */
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR m88k_addr_bits_remove (CORE_ADDR);
+// OBSOLETE #define ADDR_BITS_REMOVE(addr) m88k_addr_bits_remove (addr)
+// OBSOLETE 
+// OBSOLETE /* Immediately after a function call, return the saved pc.
+// OBSOLETE    Can't always go through the frames for this because on some machines
+// OBSOLETE    the new frame is not set up until the new function executes
+// OBSOLETE    some instructions.  */
+// OBSOLETE 
+// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
+// OBSOLETE   (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
+// OBSOLETE 
+// OBSOLETE /* Stack grows downward.  */
+// OBSOLETE 
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE 
+// OBSOLETE /* Sequence of bytes for breakpoint instruction.  */
+// OBSOLETE 
+// OBSOLETE /* instruction 0xF000D1FF is 'tb0 0,r0,511'
+// OBSOLETE    If Bit bit 0 of r0 is clear (always true),
+// OBSOLETE    initiate exception processing (trap).
+// OBSOLETE  */
+// OBSOLETE #define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
+// OBSOLETE 
+// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
+// OBSOLETE    This is often the number of bytes in BREAKPOINT
+// OBSOLETE    but not always.  */
+// OBSOLETE 
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE 
+// OBSOLETE /* Say how long (ordinary) registers are.  This is a piece of bogosity
+// OBSOLETE    used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE    real way to know how big a register is.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE 
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE 
+// OBSOLETE #define GP_REGS (38)
+// OBSOLETE #define FP_REGS (32)
+// OBSOLETE #define NUM_REGS (GP_REGS + FP_REGS)
+// OBSOLETE 
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE    There should be NUM_REGS strings in this initializer.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_NAMES {\
+// OBSOLETE 			  "r0",\
+// OBSOLETE 			  "r1",\
+// OBSOLETE 			  "r2",\
+// OBSOLETE 			  "r3",\
+// OBSOLETE 			  "r4",\
+// OBSOLETE 			  "r5",\
+// OBSOLETE 			  "r6",\
+// OBSOLETE 			  "r7",\
+// OBSOLETE 			  "r8",\
+// OBSOLETE 			  "r9",\
+// OBSOLETE 			  "r10",\
+// OBSOLETE 			  "r11",\
+// OBSOLETE 			  "r12",\
+// OBSOLETE 			  "r13",\
+// OBSOLETE 			  "r14",\
+// OBSOLETE 			  "r15",\
+// OBSOLETE 			  "r16",\
+// OBSOLETE 			  "r17",\
+// OBSOLETE 			  "r18",\
+// OBSOLETE 			  "r19",\
+// OBSOLETE 			  "r20",\
+// OBSOLETE 			  "r21",\
+// OBSOLETE 			  "r22",\
+// OBSOLETE 			  "r23",\
+// OBSOLETE 			  "r24",\
+// OBSOLETE 			  "r25",\
+// OBSOLETE 			  "r26",\
+// OBSOLETE 			  "r27",\
+// OBSOLETE 			  "r28",\
+// OBSOLETE 			  "r29",\
+// OBSOLETE 			  "r30",\
+// OBSOLETE 			  "r31",\
+// OBSOLETE 			  "psr",\
+// OBSOLETE 			  "fpsr",\
+// OBSOLETE 			  "fpcr",\
+// OBSOLETE 			  "sxip",\
+// OBSOLETE 			  "snip",\
+// OBSOLETE 			  "sfip",\
+// OBSOLETE 			  "x0",\
+// OBSOLETE 			  "x1",\
+// OBSOLETE 			  "x2",\
+// OBSOLETE 			  "x3",\
+// OBSOLETE 			  "x4",\
+// OBSOLETE 			  "x5",\
+// OBSOLETE 			  "x6",\
+// OBSOLETE 			  "x7",\
+// OBSOLETE 			  "x8",\
+// OBSOLETE 			  "x9",\
+// OBSOLETE 			  "x10",\
+// OBSOLETE 			  "x11",\
+// OBSOLETE 			  "x12",\
+// OBSOLETE 			  "x13",\
+// OBSOLETE 			  "x14",\
+// OBSOLETE 			  "x15",\
+// OBSOLETE 			  "x16",\
+// OBSOLETE 			  "x17",\
+// OBSOLETE 			  "x18",\
+// OBSOLETE 			  "x19",\
+// OBSOLETE 			  "x20",\
+// OBSOLETE 			  "x21",\
+// OBSOLETE 			  "x22",\
+// OBSOLETE 			  "x23",\
+// OBSOLETE 			  "x24",\
+// OBSOLETE 			  "x25",\
+// OBSOLETE 			  "x26",\
+// OBSOLETE 			  "x27",\
+// OBSOLETE 			  "x28",\
+// OBSOLETE 			  "x29",\
+// OBSOLETE 			  "x30",\
+// OBSOLETE 			  "x31",\
+// OBSOLETE 			  "vbr",\
+// OBSOLETE 			  "dmt0",\
+// OBSOLETE 			  "dmd0",\
+// OBSOLETE 			  "dma0",\
+// OBSOLETE 			  "dmt1",\
+// OBSOLETE 			  "dmd1",\
+// OBSOLETE 			  "dma1",\
+// OBSOLETE 			  "dmt2",\
+// OBSOLETE 			  "dmd2",\
+// OBSOLETE 			  "dma2",\
+// OBSOLETE 			  "sr0",\
+// OBSOLETE 			  "sr1",\
+// OBSOLETE 			  "sr2",\
+// OBSOLETE 			  "sr3",\
+// OBSOLETE 			  "fpecr",\
+// OBSOLETE 			  "fphs1",\
+// OBSOLETE 			  "fpls1",\
+// OBSOLETE 			  "fphs2",\
+// OBSOLETE 			  "fpls2",\
+// OBSOLETE 			  "fppt",\
+// OBSOLETE 			  "fprh",\
+// OBSOLETE 			  "fprl",\
+// OBSOLETE 			  "fpit",\
+// OBSOLETE 			  "fpsr",\
+// OBSOLETE 			  "fpcr",\
+// OBSOLETE 		      }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Register numbers of various important registers.
+// OBSOLETE    Note that some of these values are "real" register numbers,
+// OBSOLETE    and correspond to the general registers of the machine,
+// OBSOLETE    and some are "phony" register numbers which are too large
+// OBSOLETE    to be actual register numbers as far as the user is concerned
+// OBSOLETE    but do serve to get the desired values when passed to read_register.  */
+// OBSOLETE 
+// OBSOLETE #define R0_REGNUM 0		/* Contains the constant zero */
+// OBSOLETE #define SRP_REGNUM 1		/* Contains subroutine return pointer */
+// OBSOLETE #define RV_REGNUM 2		/* Contains simple return values */
+// OBSOLETE #define SRA_REGNUM 12		/* Contains address of struct return values */
+// OBSOLETE #define SP_REGNUM 31		/* Contains address of top of stack */
+// OBSOLETE 
+// OBSOLETE /* Instruction pointer notes...
+// OBSOLETE 
+// OBSOLETE    On the m88100:
+// OBSOLETE 
+// OBSOLETE    * cr04 = sxip.  On exception, contains the excepting pc (probably).
+// OBSOLETE    On rte, is ignored.
+// OBSOLETE 
+// OBSOLETE    * cr05 = snip.  On exception, contains the NPC (next pc).  On rte,
+// OBSOLETE    pc is loaded from here.
+// OBSOLETE 
+// OBSOLETE    * cr06 = sfip.  On exception, contains the NNPC (next next pc).  On
+// OBSOLETE    rte, the NPC is loaded from here.
+// OBSOLETE 
+// OBSOLETE    * lower two bits of each are flag bits.  Bit 1 is V means address
+// OBSOLETE    is valid.  If address is not valid, bit 0 is ignored.  Otherwise,
+// OBSOLETE    bit 0 is E and asks for an exception to be taken if this
+// OBSOLETE    instruction is executed.
+// OBSOLETE 
+// OBSOLETE    On the m88110:
+// OBSOLETE 
+// OBSOLETE    * cr04 = exip.  On exception, contains the address of the excepting
+// OBSOLETE    pc (always).  On rte, pc is loaded from here.  Bit 0, aka the D
+// OBSOLETE    bit, is a flag saying that the offending instruction was in a
+// OBSOLETE    branch delay slot.  If set, then cr05 contains the NPC.
+// OBSOLETE 
+// OBSOLETE    * cr05 = enip.  On exception, if the instruction pointed to by cr04
+// OBSOLETE    was in a delay slot as indicated by the bit 0 of cr04, aka the D
+// OBSOLETE    bit, the cr05 contains the NPC.  Otherwise ignored.
+// OBSOLETE 
+// OBSOLETE    * cr06 is invalid  */
+// OBSOLETE 
+// OBSOLETE /* Note that the Harris Unix kernels emulate the m88100's behavior on
+// OBSOLETE    the m88110.  */
+// OBSOLETE 
+// OBSOLETE #define SXIP_REGNUM 35		/* On m88100, Contains Shadow Execute
+// OBSOLETE 				   Instruction Pointer.  */
+// OBSOLETE #define SNIP_REGNUM 36		/* On m88100, Contains Shadow Next
+// OBSOLETE 				   Instruction Pointer.  */
+// OBSOLETE #define SFIP_REGNUM 37		/* On m88100, Contains Shadow Fetched
+// OBSOLETE 				   Intruction pointer.  */
+// OBSOLETE 
+// OBSOLETE #define EXIP_REGNUM 35		/* On m88110, Contains Exception
+// OBSOLETE 				   Executing Instruction Pointer.  */
+// OBSOLETE #define ENIP_REGNUM 36		/* On m88110, Contains the Exception
+// OBSOLETE 				   Next Instruction Pointer.  */
+// OBSOLETE 
+// OBSOLETE #define PC_REGNUM SXIP_REGNUM	/* Program Counter */
+// OBSOLETE #define NPC_REGNUM SNIP_REGNUM	/* Next Program Counter */
+// OBSOLETE #define M88K_NNPC_REGNUM SFIP_REGNUM        /* Next Next Program Counter */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE #define PSR_REGNUM 32		/* Processor Status Register */
+// OBSOLETE #define FPSR_REGNUM 33		/* Floating Point Status Register */
+// OBSOLETE #define FPCR_REGNUM 34		/* Floating Point Control Register */
+// OBSOLETE #define XFP_REGNUM 38		/* First Extended Float Register */
+// OBSOLETE #define X0_REGNUM XFP_REGNUM	/* Which also contains the constant zero */
+// OBSOLETE 
+// OBSOLETE /* This is rather a confusing lie.  Our m88k port using a stack pointer value
+// OBSOLETE    for the frame address.  Hence, the frame address and the frame pointer are
+// OBSOLETE    only indirectly related.  The value of this macro is the register number
+// OBSOLETE    fetched by the machine "independent" portions of gdb when they want to know
+// OBSOLETE    about a frame address.  Thus, we lie here and claim that FP_REGNUM is
+// OBSOLETE    SP_REGNUM.  */
+// OBSOLETE #define FP_REGNUM SP_REGNUM	/* Reg fetched to locate frame when pgm stops */
+// OBSOLETE #define ACTUAL_FP_REGNUM 30
+// OBSOLETE 
+// OBSOLETE /* PSR status bit definitions.  */
+// OBSOLETE 
+// OBSOLETE #define PSR_MODE		0x80000000
+// OBSOLETE #define PSR_BYTE_ORDER		0x40000000
+// OBSOLETE #define PSR_SERIAL_MODE		0x20000000
+// OBSOLETE #define PSR_CARRY		0x10000000
+// OBSOLETE #define PSR_SFU_DISABLE		0x000003f0
+// OBSOLETE #define PSR_SFU1_DISABLE	0x00000008
+// OBSOLETE #define PSR_MXM			0x00000004
+// OBSOLETE #define PSR_IND			0x00000002
+// OBSOLETE #define PSR_SFRZ		0x00000001
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* The following two comments come from the days prior to the m88110
+// OBSOLETE    port.  The m88110 handles the instruction pointers differently.  I
+// OBSOLETE    do not know what any m88110 kernels do as the m88110 port I'm
+// OBSOLETE    working with is for an embedded system.  rich@cygnus.com
+// OBSOLETE    13-sept-93.  */
+// OBSOLETE 
+// OBSOLETE /* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the
+// OBSOLETE    address of the next instr to be executed when a breakpoint occurs.
+// OBSOLETE    Because the kernel gets the next instr (SNIP_REGNUM), the instr in
+// OBSOLETE    SNIP needs to be put back into SFIP, and the instr in SXIP should
+// OBSOLETE    be shifted to SNIP */
+// OBSOLETE 
+// OBSOLETE /* Are you sitting down?  It turns out that the 88K BCS (binary
+// OBSOLETE    compatibility standard) folks originally felt that the debugger
+// OBSOLETE    should be responsible for backing up the IPs, not the kernel (as is
+// OBSOLETE    usually done).  Well, they have reversed their decision, and in
+// OBSOLETE    future releases our kernel will be handling the backing up of the
+// OBSOLETE    IPs.  So, eventually, we won't need to do the SHIFT_INST_REGS
+// OBSOLETE    stuff.  But, for now, since there are 88K systems out there that do
+// OBSOLETE    need the debugger to do the IP shifting, and since there will be
+// OBSOLETE    systems where the kernel does the shifting, the code is a little
+// OBSOLETE    more complex than perhaps it needs to be (we still go inside
+// OBSOLETE    SHIFT_INST_REGS, and if the shifting hasn't occurred then gdb goes
+// OBSOLETE    ahead and shifts).  */
+// OBSOLETE 
+// OBSOLETE extern int target_is_m88110;
+// OBSOLETE #define SHIFT_INST_REGS() \
+// OBSOLETE if (!target_is_m88110) \
+// OBSOLETE { \
+// OBSOLETE     CORE_ADDR pc = read_register (PC_REGNUM); \
+// OBSOLETE     CORE_ADDR npc = read_register (NPC_REGNUM); \
+// OBSOLETE     if (pc != npc) \
+// OBSOLETE     { \
+// OBSOLETE 	write_register (M88K_NNPC_REGNUM, npc); \
+// OBSOLETE 	write_register (NPC_REGNUM, pc); \
+// OBSOLETE     } \
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE     /* Storing the following registers is a no-op. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno)	(((regno) == R0_REGNUM) \
+// OBSOLETE 					 || ((regno) == X0_REGNUM))
+// OBSOLETE 
+// OBSOLETE   /* Number of bytes of storage in the actual machine representation
+// OBSOLETE      for register N.  On the m88k,  the general purpose registers are 4
+// OBSOLETE      bytes and the 88110 extended registers are 10 bytes. */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < XFP_REGNUM ? 4 : 10)
+// OBSOLETE 
+// OBSOLETE   /* Total amount of space needed to store our copies of the machine's
+// OBSOLETE      register state, the array `registers'.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_BYTES ((GP_REGS * REGISTER_RAW_SIZE(0)) \
+// OBSOLETE 			+ (FP_REGS * REGISTER_RAW_SIZE(XFP_REGNUM)))
+// OBSOLETE 
+// OBSOLETE   /* Index within `registers' of the first byte of the space for
+// OBSOLETE      register N.  */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_BYTE(N) (((N) * REGISTER_RAW_SIZE(0)) \
+// OBSOLETE 			  + ((N) >= XFP_REGNUM \
+// OBSOLETE 			     ? (((N) - XFP_REGNUM) \
+// OBSOLETE 				* REGISTER_RAW_SIZE(XFP_REGNUM)) \
+// OBSOLETE 			     : 0))
+// OBSOLETE 
+// OBSOLETE   /* Number of bytes of storage in the program's representation for
+// OBSOLETE      register N.  On the m88k, all registers are 4 bytes excepting the
+// OBSOLETE      m88110 extended registers which are 8 byte doubles. */
+// OBSOLETE 
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ((N) < XFP_REGNUM ? 4 : 8)
+// OBSOLETE 
+// OBSOLETE   /* Largest value REGISTER_RAW_SIZE can have.  */
+// OBSOLETE 
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
+// OBSOLETE 
+// OBSOLETE   /* Largest value REGISTER_VIRTUAL_SIZE can have.
+// OBSOLETE      Are FPS1, FPS2, FPR "virtual" regisers? */
+// OBSOLETE 
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
+// OBSOLETE 
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE    of data in register N.  */
+// OBSOLETE 
+// OBSOLETE struct type *m88k_register_type (int regnum);
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
+// OBSOLETE 
+// OBSOLETE /* The 88k call/return conventions call for "small" values to be returned
+// OBSOLETE    into consecutive registers starting from r2.  */
+// OBSOLETE 
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE   memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
+// OBSOLETE 
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
+// OBSOLETE 
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE    of type TYPE, given in virtual format.  */
+// OBSOLETE 
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE   write_register_bytes (2*REGISTER_RAW_SIZE(0), (VALBUF), TYPE_LENGTH (TYPE))
+// OBSOLETE 
+// OBSOLETE /* In COFF, if PCC says a parameter is a short or a char, do not
+// OBSOLETE    change it to int (it seems the convention is to change it). */
+// OBSOLETE 
+// OBSOLETE #define BELIEVE_PCC_PROMOTION 1
+// OBSOLETE 
+// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
+// OBSOLETE    (its caller).  */
+// OBSOLETE 
+// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
+// OBSOLETE    and produces the frame's chain-pointer.
+// OBSOLETE 
+// OBSOLETE    However, if FRAME_CHAIN_VALID returns zero,
+// OBSOLETE    it means the given frame is the outermost one and has no caller.  */
+// OBSOLETE 
+// OBSOLETE extern CORE_ADDR frame_chain ();
+// OBSOLETE extern int frame_chain_valid ();
+// OBSOLETE extern int frameless_function_invocation ();
+// OBSOLETE 
+// OBSOLETE #define FRAME_CHAIN(thisframe) \
+// OBSOLETE 	frame_chain (thisframe)
+// OBSOLETE 
+// OBSOLETE #define	FRAMELESS_FUNCTION_INVOCATION(frame)	\
+// OBSOLETE 	(frameless_function_invocation (frame))
+// OBSOLETE 
+// OBSOLETE /* Define other aspects of the stack frame.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_SAVED_PC(FRAME)	\
+// OBSOLETE 	frame_saved_pc (FRAME)
+// OBSOLETE extern CORE_ADDR frame_saved_pc ();
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi)	\
+// OBSOLETE 	frame_args_address (fi)
+// OBSOLETE extern CORE_ADDR frame_args_address ();
+// OBSOLETE 
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \
+// OBSOLETE 	frame_locals_address (fi)
+// OBSOLETE extern CORE_ADDR frame_locals_address ();
+// OBSOLETE 
+// OBSOLETE /* Return number of args passed to a frame.
+// OBSOLETE    Can return -1, meaning no way to tell.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_NUM_ARGS(fi)  (-1)
+// OBSOLETE 
+// OBSOLETE /* Return number of bytes at start of arglist that are not really args.  */
+// OBSOLETE 
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE 
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE    This includes special registers such as pc and fp saved in special
+// OBSOLETE    ways in the stack frame.  sp is even more special:
+// OBSOLETE    the address we return for it IS the sp for the next frame.  */
+// OBSOLETE 
+// OBSOLETE /* On the 88k, parameter registers get stored into the so called "homing"
+// OBSOLETE    area.  This *always* happens when you compiled with GCC and use -g.
+// OBSOLETE    Also, (with GCC and -g) the saving of the parameter register values
+// OBSOLETE    always happens right within the function prologue code, so these register
+// OBSOLETE    values can generally be relied upon to be already copied into their
+// OBSOLETE    respective homing slots by the time you will normally try to look at
+// OBSOLETE    them (we hope).
+// OBSOLETE 
+// OBSOLETE    Note that homing area stack slots are always at *positive* offsets from
+// OBSOLETE    the frame pointer.  Thus, the homing area stack slots for the parameter
+// OBSOLETE    registers (passed values) for a given function are actually part of the
+// OBSOLETE    frame area of the caller.  This is unusual, but it should not present
+// OBSOLETE    any special problems for GDB.
+// OBSOLETE 
+// OBSOLETE    Note also that on the 88k, we are only interested in finding the
+// OBSOLETE    registers that might have been saved in memory.  This is a subset of
+// OBSOLETE    the whole set of registers because the standard calling sequence allows
+// OBSOLETE    the called routine to clobber many registers.
+// OBSOLETE 
+// OBSOLETE    We could manage to locate values for all of the so called "preserved"
+// OBSOLETE    registers (some of which may get saved within any particular frame) but
+// OBSOLETE    that would require decoding all of the tdesc information.  That would be
+// OBSOLETE    nice information for GDB to have, but it is not strictly manditory if we
+// OBSOLETE    can live without the ability to look at values within (or backup to)
+// OBSOLETE    previous frames.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE struct frame_saved_regs;
+// OBSOLETE struct frame_info;
+// OBSOLETE 
+// OBSOLETE void frame_find_saved_regs (struct frame_info *fi,
+// OBSOLETE 			    struct frame_saved_regs *fsr);
+// OBSOLETE 
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
+// OBSOLETE         frame_find_saved_regs (frame_info, &frame_saved_regs)
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE #define POP_FRAME pop_frame ()
+// OBSOLETE extern void pop_frame ();
+// OBSOLETE 
+// OBSOLETE /* Call function stuff contributed by Kevin Buettner of Motorola.  */
+// OBSOLETE 
+// OBSOLETE #define CALL_DUMMY_LOCATION AFTER_TEXT_END
+// OBSOLETE 
+// OBSOLETE extern void m88k_push_dummy_frame ();
+// OBSOLETE #define PUSH_DUMMY_FRAME	m88k_push_dummy_frame()
+// OBSOLETE 
+// OBSOLETE #define CALL_DUMMY { 				\
+// OBSOLETE 0x67ff00c0,	/*   0:   subu	#sp,#sp,0xc0 */ \
+// OBSOLETE 0x243f0004,	/*   4:   st	#r1,#sp,0x4 */ \
+// OBSOLETE 0x245f0008,	/*   8:   st	#r2,#sp,0x8 */ \
+// OBSOLETE 0x247f000c,	/*   c:   st	#r3,#sp,0xc */ \
+// OBSOLETE 0x249f0010,	/*  10:   st	#r4,#sp,0x10 */ \
+// OBSOLETE 0x24bf0014,	/*  14:   st	#r5,#sp,0x14 */ \
+// OBSOLETE 0x24df0018,	/*  18:   st	#r6,#sp,0x18 */ \
+// OBSOLETE 0x24ff001c,	/*  1c:   st	#r7,#sp,0x1c */ \
+// OBSOLETE 0x251f0020,	/*  20:   st	#r8,#sp,0x20 */ \
+// OBSOLETE 0x253f0024,	/*  24:   st	#r9,#sp,0x24 */ \
+// OBSOLETE 0x255f0028,	/*  28:   st	#r10,#sp,0x28 */ \
+// OBSOLETE 0x257f002c,	/*  2c:   st	#r11,#sp,0x2c */ \
+// OBSOLETE 0x259f0030,	/*  30:   st	#r12,#sp,0x30 */ \
+// OBSOLETE 0x25bf0034,	/*  34:   st	#r13,#sp,0x34 */ \
+// OBSOLETE 0x25df0038,	/*  38:   st	#r14,#sp,0x38 */ \
+// OBSOLETE 0x25ff003c,	/*  3c:   st	#r15,#sp,0x3c */ \
+// OBSOLETE 0x261f0040,	/*  40:   st	#r16,#sp,0x40 */ \
+// OBSOLETE 0x263f0044,	/*  44:   st	#r17,#sp,0x44 */ \
+// OBSOLETE 0x265f0048,	/*  48:   st	#r18,#sp,0x48 */ \
+// OBSOLETE 0x267f004c,	/*  4c:   st	#r19,#sp,0x4c */ \
+// OBSOLETE 0x269f0050,	/*  50:   st	#r20,#sp,0x50 */ \
+// OBSOLETE 0x26bf0054,	/*  54:   st	#r21,#sp,0x54 */ \
+// OBSOLETE 0x26df0058,	/*  58:   st	#r22,#sp,0x58 */ \
+// OBSOLETE 0x26ff005c,	/*  5c:   st	#r23,#sp,0x5c */ \
+// OBSOLETE 0x271f0060,	/*  60:   st	#r24,#sp,0x60 */ \
+// OBSOLETE 0x273f0064,	/*  64:   st	#r25,#sp,0x64 */ \
+// OBSOLETE 0x275f0068,	/*  68:   st	#r26,#sp,0x68 */ \
+// OBSOLETE 0x277f006c,	/*  6c:   st	#r27,#sp,0x6c */ \
+// OBSOLETE 0x279f0070,	/*  70:   st	#r28,#sp,0x70 */ \
+// OBSOLETE 0x27bf0074,	/*  74:   st	#r29,#sp,0x74 */ \
+// OBSOLETE 0x27df0078,	/*  78:   st	#r30,#sp,0x78 */ \
+// OBSOLETE 0x63df0000,	/*  7c:   addu	#r30,#sp,0x0 */ \
+// OBSOLETE 0x145f0000,	/*  80:   ld	#r2,#sp,0x0 */ \
+// OBSOLETE 0x147f0004,	/*  84:   ld	#r3,#sp,0x4 */ \
+// OBSOLETE 0x149f0008,	/*  88:   ld	#r4,#sp,0x8 */ \
+// OBSOLETE 0x14bf000c,	/*  8c:   ld	#r5,#sp,0xc */ \
+// OBSOLETE 0x14df0010,	/*  90:   ld	#r6,#sp,0x10 */ \
+// OBSOLETE 0x14ff0014,	/*  94:   ld	#r7,#sp,0x14 */ \
+// OBSOLETE 0x151f0018,	/*  98:   ld	#r8,#sp,0x18 */ \
+// OBSOLETE 0x153f001c,	/*  9c:   ld	#r9,#sp,0x1c */ \
+// OBSOLETE 0x5c200000,	/*  a0:   or.u	#r1,#r0,0x0 */ \
+// OBSOLETE 0x58210000,	/*  a4:   or	#r1,#r1,0x0 */ \
+// OBSOLETE 0xf400c801,	/*  a8:   jsr	#r1 */ \
+// OBSOLETE 0xf000d1ff	/*  ac:   tb0	0x0,#r0,0x1ff */ \
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #define CALL_DUMMY_START_OFFSET 0x80
+// OBSOLETE #define CALL_DUMMY_LENGTH 0xb0
+// OBSOLETE 
+// OBSOLETE /* FIXME: byteswapping.  */
+// OBSOLETE #define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)	\
+// OBSOLETE { 									\
+// OBSOLETE   *(unsigned long *)((char *) (dummy) + 0xa0) |=			\
+// OBSOLETE 	(((unsigned long) (fun)) >> 16);				\
+// OBSOLETE   *(unsigned long *)((char *) (dummy) + 0xa4) |=			\
+// OBSOLETE 	(((unsigned long) (fun)) & 0xffff);				\
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Stack must be aligned on 64-bit boundaries when synthesizing
+// OBSOLETE    function calls. */
+// OBSOLETE 
+// OBSOLETE #define STACK_ALIGN(addr) (((addr) + 7) & -8)
+// OBSOLETE 
+// OBSOLETE #define STORE_STRUCT_RETURN(addr, sp) \
+// OBSOLETE     write_register (SRA_REGNUM, (addr))
+// OBSOLETE 
+// OBSOLETE #define NEED_TEXT_START_END 1
+// OBSOLETE 
+// OBSOLETE /* According to the MC88100 RISC Microprocessor User's Manual, section
+// OBSOLETE    6.4.3.1.2:
+// OBSOLETE 
+// OBSOLETE    ... can be made to return to a particular instruction by placing a
+// OBSOLETE    valid instruction address in the SNIP and the next sequential
+// OBSOLETE    instruction address in the SFIP (with V bits set and E bits clear).
+// OBSOLETE    The rte resumes execution at the instruction pointed to by the 
+// OBSOLETE    SNIP, then the SFIP.
+// OBSOLETE 
+// OBSOLETE    The E bit is the least significant bit (bit 0).  The V (valid) bit is
+// OBSOLETE    bit 1.  This is why we logical or 2 into the values we are writing
+// OBSOLETE    below.  It turns out that SXIP plays no role when returning from an
+// OBSOLETE    exception so nothing special has to be done with it.  We could even
+// OBSOLETE    (presumably) give it a totally bogus value.
+// OBSOLETE 
+// OBSOLETE    -- Kevin Buettner
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE extern void m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid);
+// OBSOLETE #define TARGET_WRITE_PC(VAL, PID) m88k_target_write_pc (VAL, PID)
diff --git a/gdb/config/m88k/xm-delta88.h b/gdb/config/m88k/xm-delta88.h
index 27c8fe2..df2b8e6 100644
--- a/gdb/config/m88k/xm-delta88.h
+++ b/gdb/config/m88k/xm-delta88.h
@@ -1,44 +1,44 @@
-/* Host machine description for Motorola Delta 88 system, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#if !defined (USG)
-#define USG 1
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-
-#define HAVE_TERMIO
-
-/*#define USIZE 2048 */
-/*#define NBPG NBPC */
-/* Might be defined in <sys/param.h>.  I suspect this define was a relic
-   from before when BFD did core files.  */
-/* #define UPAGES USIZE */
-
-/* This is the amount to subtract from u.u_ar0
-   to get the offset in the core file of the register values.  */
-
-/* Since registers r0 through r31 are stored directly in the struct ptrace_user,
-   (for m88k BCS)
-   the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
-
-#define KERNEL_U_ADDR 0
+// OBSOLETE /* Host machine description for Motorola Delta 88 system, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #if !defined (USG)
+// OBSOLETE #define USG 1
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/time.h>
+// OBSOLETE 
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE 
+// OBSOLETE /*#define USIZE 2048 */
+// OBSOLETE /*#define NBPG NBPC */
+// OBSOLETE /* Might be defined in <sys/param.h>.  I suspect this define was a relic
+// OBSOLETE    from before when BFD did core files.  */
+// OBSOLETE /* #define UPAGES USIZE */
+// OBSOLETE 
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE    to get the offset in the core file of the register values.  */
+// OBSOLETE 
+// OBSOLETE /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
+// OBSOLETE    (for m88k BCS)
+// OBSOLETE    the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
+// OBSOLETE 
+// OBSOLETE #define KERNEL_U_ADDR 0
diff --git a/gdb/config/m88k/xm-delta88v4.h b/gdb/config/m88k/xm-delta88v4.h
index b09a02d..932b902 100644
--- a/gdb/config/m88k/xm-delta88v4.h
+++ b/gdb/config/m88k/xm-delta88v4.h
@@ -19,4 +19,4 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
diff --git a/gdb/config/m88k/xm-dgux.h b/gdb/config/m88k/xm-dgux.h
index b6f7f99..dc99f97 100644
--- a/gdb/config/m88k/xm-dgux.h
+++ b/gdb/config/m88k/xm-dgux.h
@@ -1,55 +1,55 @@
-/* Host-machine dependent parameters for Motorola 88000, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-#if !defined (USG)
-#define USG 1
-#endif
-
-#include <sys/param.h>
-
-#ifdef __GNUC__
-#define memcpy __builtin_memcpy
-/* gcc doesn't have this, at least not gcc 1.92.  */
-/* #define memset __builtin_memset */
-#define strcmp __builtin_strcmp
-#endif
-
-#define x_foff _x_x._x_offset
-#define x_fname _x_name
-#define USER ptrace_user
-#define _BSD_WAIT_FLAVOR
-
-#define HAVE_TERMIO
-
-#ifndef USIZE
-#define USIZE 2048
-#endif
-#define NBPG NBPC
-#define UPAGES USIZE
-
-/* This is the amount to subtract from u.u_ar0
-   to get the offset in the core file of the register values.  */
-
-/* Since registers r0 through r31 are stored directly in the struct ptrace_user,
-   (for m88k BCS)
-   the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
-
-#define KERNEL_U_ADDR 0
+// OBSOLETE /* Host-machine dependent parameters for Motorola 88000, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #if !defined (USG)
+// OBSOLETE #define USG 1
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE 
+// OBSOLETE #ifdef __GNUC__
+// OBSOLETE #define memcpy __builtin_memcpy
+// OBSOLETE /* gcc doesn't have this, at least not gcc 1.92.  */
+// OBSOLETE /* #define memset __builtin_memset */
+// OBSOLETE #define strcmp __builtin_strcmp
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #define x_foff _x_x._x_offset
+// OBSOLETE #define x_fname _x_name
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #define _BSD_WAIT_FLAVOR
+// OBSOLETE 
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE 
+// OBSOLETE #ifndef USIZE
+// OBSOLETE #define USIZE 2048
+// OBSOLETE #endif
+// OBSOLETE #define NBPG NBPC
+// OBSOLETE #define UPAGES USIZE
+// OBSOLETE 
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE    to get the offset in the core file of the register values.  */
+// OBSOLETE 
+// OBSOLETE /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
+// OBSOLETE    (for m88k BCS)
+// OBSOLETE    the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
+// OBSOLETE 
+// OBSOLETE #define KERNEL_U_ADDR 0
diff --git a/gdb/config/mcore/mcore.mt b/gdb/config/mcore/mcore.mt
index ed9a923..01b59d1 100644
--- a/gdb/config/mcore/mcore.mt
+++ b/gdb/config/mcore/mcore.mt
@@ -1,5 +1,4 @@
 # Target: Motorola MCore processor
 TDEPFILES= mcore-tdep.o  mcore-rom.o monitor.o dsrec.o
-TM_FILE= tm-mcore.h
 SIM_OBS = remote-sim.o
 SIM = ../sim/mcore/libsim.a
diff --git a/gdb/config/mcore/tm-mcore.h b/gdb/config/mcore/tm-mcore.h
deleted file mode 100644
index 1da21b7..0000000
--- a/gdb/config/mcore/tm-mcore.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Parameters for execution on a Motorola MCore.
-
-   Copyright 1995, 1999, 2000, 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "regcache.h"
-#include "symtab.h"		/* For namespace_enum.  */
-#include "symfile.h"		/* For entry_point_address().  */
-
-/* All registers are 32 bits */
-#define REGISTER_SIZE 4
-#define MAX_REGISTER_RAW_SIZE 4
-
-#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
-
-#define REGISTER_BYTE(REG) ((REG) * REGISTER_SIZE)
-#define REGISTER_VIRTUAL_SIZE(REG) 4
-#define REGISTER_RAW_SIZE(REG) 4
-
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-#define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
-
-extern char *mcore_register_names[];
-#define REGISTER_NAME(I) mcore_register_names[I]
-
-/* Registers. The Motorola MCore contains:
-
-   16 32-bit general purpose registers (r0-r15)
-   16 32-bit alternate file registers (ar0-ar15)
-   32 32-bit control registers (cr0-cr31)
-   + 1 pc
-   ------
-   65 registers */
-#define NUM_REGS 65
-#define PC_REGNUM 64
-#define SP_REGNUM 0
-#define FP_REGNUM (SP_REGNUM)
-#define PR_REGNUM 15
-#define FIRST_ARGREG 2
-#define LAST_ARGREG 7
-#define RETVAL_REGNUM 2
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-#define FUNCTION_START_OFFSET 0
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* BREAKPOINT_FROM_PC uses the program counter value to determine
-   the breakpoint that should be used. */
-extern const unsigned char *mcore_breakpoint_from_pc (CORE_ADDR *pcptr,
-						      int *lenptr);
-#define BREAKPOINT_FROM_PC(PCPTR, LENPTR) mcore_breakpoint_from_pc (PCPTR, LENPTR)
-
-#define INNER_THAN(LHS,RHS) ((LHS) < (RHS))
-
-#define SAVED_PC_AFTER_CALL(FRAME)  read_register (PR_REGNUM)
-
-struct frame_info;
-struct type;
-struct value;
-
-extern void mcore_init_extra_frame_info (struct frame_info *fi);
-#define INIT_EXTRA_FRAME_INFO(FROMLEAF, FI) mcore_init_extra_frame_info ((FI))
-#define INIT_FRAME_PC		/* Not necessary */
-#define FRAME_INIT_SAVED_REGS(FI)	/* handled by init_extra_frame_info */
-
-extern CORE_ADDR mcore_frame_chain (struct frame_info *fi);
-#define FRAME_CHAIN(FI) mcore_frame_chain ((FI))
-#define FRAME_CHAIN_VALID(FP, FI) generic_file_frame_chain_valid ((FP), (FI))
-
-extern CORE_ADDR mcore_frame_saved_pc (struct frame_info *);
-#define FRAME_SAVED_PC(FI) (mcore_frame_saved_pc ((FI)))
-
-/* Extracting/storing return values. */
-extern void mcore_store_return_value (struct type *type, char *valbuf);
-#define STORE_RETURN_VALUE(TYPE, VALBUF) mcore_store_return_value ((TYPE), (VALBUF))
-
-extern void mcore_extract_return_value (struct type *type, char *regbut, char *valbuf);
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-    mcore_extract_return_value ((TYPE), (REGBUF), (VALBUF));
-
-#define STORE_STRUCT_RETURN(ADDR, SP)	/* handled by mcore_push_arguments */
-
-extern CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-    mcore_extract_struct_value_address (REGBUF)
-
-extern CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
-#define SKIP_PROLOGUE(PC) mcore_skip_prologue (PC)
-
-#define FRAME_ARGS_SKIP 0
-extern CORE_ADDR mcore_frame_args_address (struct frame_info *fi);
-#define FRAME_ARGS_ADDRESS(FI) mcore_frame_args_address ((FI))
-extern CORE_ADDR mcore_frame_locals_address (struct frame_info *fi);
-#define FRAME_LOCALS_ADDRESS(FI) mcore_frame_locals_address ((FI))
-#define FRAME_NUM_ARGS(FI) (-1)
-
-
-extern void mcore_pop_frame (struct frame_info *fi);
-#define POP_FRAME mcore_pop_frame (get_current_frame ())
-
-#define USE_GENERIC_DUMMY_FRAMES 1
-#define CALL_DUMMY                   {0}
-#define CALL_DUMMY_START_OFFSET      (0)
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-#define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
-#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-#define CALL_DUMMY_ADDRESS()         entry_point_address ()
-#define SIZEOF_CALL_DUMMY_WORDS      0
-#define SAVE_DUMMY_FRAME_TOS(SP)     generic_save_dummy_frame_tos (SP)
-
-extern CORE_ADDR mcore_push_return_address (CORE_ADDR, CORE_ADDR);
-#define PUSH_RETURN_ADDRESS(PC, SP)  mcore_push_return_address (PC, SP)
-
-#define PUSH_DUMMY_FRAME	generic_push_dummy_frame ()
-
-extern CORE_ADDR mcore_push_arguments (int, struct value **, CORE_ADDR,
-				       unsigned char, CORE_ADDR);
-#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-  (SP) = mcore_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
-
-#define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-
-/* MCore will never pass a sturcture by reference. It will always be split
-   between registers and stack. */
-#define REG_STRUCT_HAS_ADDR(GCC_P, TYPE) 0
-
-extern use_struct_convention_fn mcore_use_struct_convention;
-#define USE_STRUCT_CONVENTION(GCC_P, TYPE) mcore_use_struct_convention (GCC_P, TYPE)
-
-/* override the default get_saved_register function with
-   one that takes account of generic CALL_DUMMY frames */
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-    generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
-
-/* Cons up virtual frame pointer for trace */
-extern void mcore_virtual_frame_pointer (CORE_ADDR, int *, LONGEST *);
-#define TARGET_VIRTUAL_FRAME_POINTER(PC, REGP, OFFP) \
-	mcore_virtual_frame_pointer ((PC), (REGP), (OFFP))
-
-/* For PE, gcc will tell us what th real type of
-   arguments are when it promotes arguments. */
-#define BELIEVE_PCC_PROMOTION 1
diff --git a/gdb/config/mips/irix5.mt b/gdb/config/mips/irix5.mt
index 5b17bcd..81e0f15 100644
--- a/gdb/config/mips/irix5.mt
+++ b/gdb/config/mips/irix5.mt
@@ -1,3 +1,3 @@
 # Target: MIPS SGI running Irix 5
-TDEPFILES= mips-tdep.o
+TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
 TM_FILE= tm-irix5.h
diff --git a/gdb/config/mips/irix6.mh b/gdb/config/mips/irix6.mh
index 99b4737..8075f0d 100644
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,7 +1,7 @@
 # Host: SGI Iris running irix 6.x
 XM_FILE= xm-irix6.h
 NAT_FILE= nm-irix6.h
-NATDEPFILES= fork-child.o solib.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
 	proc-api.o proc-events.o proc-flags.o proc-why.o
 
 XM_CLIBS=-lbsd
diff --git a/gdb/config/mips/irix6.mt b/gdb/config/mips/irix6.mt
index c5c5cce..3a5a774 100644
--- a/gdb/config/mips/irix6.mt
+++ b/gdb/config/mips/irix6.mt
@@ -1,3 +1,3 @@
 # Target: MIPS SGI running Irix 6.x
-TDEPFILES= mips-tdep.o
+TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
 TM_FILE= tm-irix6.h
diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h
index bed3144..59749f6 100644
--- a/gdb/config/mips/nm-irix5.h
+++ b/gdb/config/mips/nm-irix5.h
@@ -19,12 +19,14 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "nm-sysv4.h"
+#include "config/nm-sysv4.h"
 #undef IN_SOLIB_DYNSYM_RESOLVE_CODE
 
 #define TARGET_HAS_HARDWARE_WATCHPOINTS
 
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
+/* TARGET_CAN_USE_HARDWARE_WATCHPOINT is now defined to go through
+   the target vector.  For Irix5, procfs_can_use_hw_watchpoint()
+   should be invoked.  */
 
 /* When a hardware watchpoint fires off the PC will be left at the
    instruction which caused the watchpoint.  It will be necessary for
diff --git a/gdb/config/mips/nm-linux.h b/gdb/config/mips/nm-linux.h
index c43ecd6..426dd55 100644
--- a/gdb/config/mips/nm-linux.h
+++ b/gdb/config/mips/nm-linux.h
@@ -24,7 +24,7 @@
 
 #define MIPS_GNULINUX_TARGET
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 /* Return sizeof user struct to callers in less machine dependent
    routines.  Hard coded for cross-compilation friendliness. */
diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h
index 300e549..7482a77 100644
--- a/gdb/config/mips/tm-embed.h
+++ b/gdb/config/mips/tm-embed.h
@@ -19,9 +19,6 @@
 
 #include "mips/tm-bigmips.h"
 
-#undef DEFAULT_MIPS_TYPE
-#define DEFAULT_MIPS_TYPE "r3051"
-
 /* Watchpoint support */
 
 #define TARGET_HAS_HARDWARE_WATCHPOINTS
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index 49b842f..2a1af87 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -48,21 +48,6 @@
 	 : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
 	 : builtin_type_int)
 
-#undef  MIPS_LAST_ARG_REGNUM
-#define MIPS_LAST_ARG_REGNUM 11	/* N32 uses R4 through R11 for args */
-
-/* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
-   up on the stack? For the n32 ABI, eight bytes are reserved for each
-   register. Like MIPS_SAVED_REGSIZE but different. */
-#define MIPS_DEFAULT_STACK_ARGSIZE 8
-
-/* N32 does not reserve home space for registers used to carry
-   parameters. */
-#define MIPS_REGS_HAVE_HOME_P 0
-
-/* Force N32 ABI as the default. */
-#define MIPS_DEFAULT_ABI MIPS_ABI_N32
-
 #endif /* N32 */
 
 
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 2d90b2e..ac710a4 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -19,7 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "mips/tm-bigmips.h"
+#include "mips/tm-bigmips64.h"
 
 /* SGI's assembler doesn't grok dollar signs in identifiers.
    So we use dots instead.  This item must be coordinated with G++. */
@@ -88,29 +88,6 @@
       ((N) - FP0_REGNUM) * sizeof(double) : \
       32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
 
-#undef  REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
-	(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
-	 : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
-	 : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
-	 : builtin_type_int)
-
-#undef  MIPS_LAST_ARG_REGNUM
-#define MIPS_LAST_ARG_REGNUM 11	/* N32 uses R4 through R11 for args */
-
-/* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
-   up on the stack? For the n32 ABI, eight bytes are reserved for each
-   register. Like MIPS_SAVED_REGSIZE but different. */
-#define MIPS_DEFAULT_STACK_ARGSIZE 8
-
-/* N32 does not reserve home space for registers used to carry
-   parameters. */
-#define MIPS_REGS_HAVE_HOME_P 0
-
-/* Force N32 ABI as the default. */
-#define MIPS_DEFAULT_ABI MIPS_ABI_N32
-
-
 /* The signal handler trampoline is called _sigtramp.  */
 #undef IN_SIGTRAMP
 #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
@@ -137,3 +114,6 @@
 /* Select the disassembler */
 #undef TM_PRINT_INSN_MACH
 #define TM_PRINT_INSN_MACH bfd_mach_mips8000
+
+/* Undefine those methods which have been multiarched.  */
+#undef REGISTER_VIRTUAL_TYPE
diff --git a/gdb/config/mips/tm-linux.h b/gdb/config/mips/tm-linux.h
index 0e9de3c..60e9bee 100644
--- a/gdb/config/mips/tm-linux.h
+++ b/gdb/config/mips/tm-linux.h
@@ -33,15 +33,12 @@
 
 /* GNU/Linux MIPS has __SIGRTMAX == 127.  */
 
+#ifndef REALTIME_LO
 #define REALTIME_LO 32
 #define REALTIME_HI 128
+#endif
 
-#include "tm-linux.h"
-
-/* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
-   fact, using it may violate the o32 ABI.  */
-
-#define MIPS_DEFAULT_ABI MIPS_ABI_O32
+#include "config/tm-linux.h"
 
 /* Use target_specific function to define link map offsets.  */
 
@@ -51,8 +48,8 @@
 
 /* Details about jmp_buf.  */
 
-#define JB_ELEMENT_SIZE 4
-#define JB_PC 0
+#define MIPS_LINUX_JB_ELEMENT_SIZE 4
+#define MIPS_LINUX_JB_PC 0
 
 /* Figure out where the longjmp will land.  Slurp the arguments out of the
    stack.  We expect the first arg to be a pointer to the jmp_buf structure
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 8403ef8..d87c4a7 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -38,10 +38,6 @@
 #include "coff/sym.h"		/* Needed for PDR below.  */
 #include "coff/symconst.h"
 
-#if !defined (MIPS_EABI)
-#define MIPS_EABI 0
-#endif
-
 /* PC should be masked to remove possible MIPS16 flag */
 #if !defined (GDB_TARGET_MASK_DISAS_PC)
 #define GDB_TARGET_MASK_DISAS_PC(addr) UNMAKE_MIPS16_ADDR(addr)
@@ -50,31 +46,12 @@
 #define GDB_TARGET_UNMASK_DISAS_PC(addr) MAKE_MIPS16_ADDR(addr)
 #endif
 
-/* The name of the usual type of MIPS processor that is in the target
-   system.  */
-
-#define DEFAULT_MIPS_TYPE "generic"
-
-/* Remove useless bits from the stack pointer.  */
-
-#define TARGET_READ_SP() ADDR_BITS_REMOVE (read_register (SP_REGNUM))
-
-/* Offset from address of function to start of its code.
-   Zero on most machines.  */
-
-#define FUNCTION_START_OFFSET 0
-
 /* Return non-zero if PC points to an instruction which will cause a step
    to execute both the instruction at PC and an instruction at PC+4.  */
 extern int mips_step_skips_delay (CORE_ADDR);
 #define STEP_SKIPS_DELAY_P (1)
 #define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
 
-/* Are we currently handling a signal */
-
-extern int in_sigtramp (CORE_ADDR, char *);
-#define IN_SIGTRAMP(pc, name)	in_sigtramp(pc, name)
-
 /* Say how long (ordinary) registers are.  This is a piece of bogosity
    used in push_word and a few other places; REGISTER_RAW_SIZE is the
    real way to know how big a register is.  */
@@ -95,11 +72,6 @@
 #define NUM_REGS 90
 #endif
 
-/* Given the register index, return the name of the corresponding
-   register. */
-extern char *mips_register_name (int regnr);
-#define REGISTER_NAME(i) mips_register_name (i)
-
 /* Initializer for an array of names of registers.
    There should be NUM_REGS strings in this initializer.  */
 
@@ -130,11 +102,6 @@
 #define ZERO_REGNUM 0		/* read-only register, always 0 */
 #define V0_REGNUM 2		/* Function integer return value */
 #define A0_REGNUM 4		/* Loc of first arg during a subr call */
-#if MIPS_EABI
-#define MIPS_LAST_ARG_REGNUM 11	/* EABI uses R4 through R11 for args */
-#else
-#define MIPS_LAST_ARG_REGNUM 7	/* old ABI uses R4 through R7 for args */
-#endif
 #define T9_REGNUM 25		/* Contains address of callee in PIC */
 #define SP_REGNUM 29		/* Contains address of top of stack */
 #define RA_REGNUM 31		/* Contains return address value */
@@ -146,11 +113,6 @@
 #define PC_REGNUM 37		/* Contains program counter */
 #define FP0_REGNUM 38		/* Floating point register 0 (single float) */
 #define FPA0_REGNUM (FP0_REGNUM+12)	/* First float argument register */
-#if MIPS_EABI			/* EABI uses F12 through F19 for args */
-#define MIPS_LAST_FP_ARG_REGNUM (FP0_REGNUM+19)
-#else /* old ABI uses F12 through F15 for args */
-#define MIPS_LAST_FP_ARG_REGNUM (FP0_REGNUM+15)
-#endif
 #define FCRCS_REGNUM 70		/* FP control/status */
 #define FCRIR_REGNUM 71		/* FP implementation/revision */
 #define FP_REGNUM 72		/* Pseudo register that contains true address of executing stack frame */
@@ -159,12 +121,6 @@
 #define	PRID_REGNUM 89		/* Processor ID */
 #define	LAST_EMBED_REGNUM 89	/* Last one */
 
-/* Define DO_REGISTERS_INFO() to do machine-specific formatting
-   of register dumps. */
-
-#define DO_REGISTERS_INFO(_regnum, fp) mips_do_registers_info(_regnum, fp)
-extern void mips_do_registers_info (int, int);
-
 /* Total amount of space needed to store our copies of the machine's
    register state, the array `registers'.  */
 
@@ -175,39 +131,6 @@
 
 #define REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
 
-/* Covert between the RAW and VIRTUAL registers.
-
-   Some MIPS (SR, FSR, FIR) have a `raw' size of MIPS_REGSIZE but are
-   really 32 bit registers.  This is a legacy of the 64 bit MIPS GDB
-   protocol which transfers 64 bits for 32 bit registers. */
-
-extern int mips_register_convertible (int reg_nr);
-#define REGISTER_CONVERTIBLE(N) (mips_register_convertible ((N)))
-     
-
-void mips_register_convert_to_virtual (int reg_nr, struct type *virtual_type,
-				       char *raw_buf, char *virt_buf);
-#define REGISTER_CONVERT_TO_VIRTUAL(N,VIRTUAL_TYPE,RAW_BUF,VIRT_BUF) \
-  mips_register_convert_to_virtual (N,VIRTUAL_TYPE,RAW_BUF,VIRT_BUF)
-
-void mips_register_convert_to_raw (struct type *virtual_type, int reg_nr,
-				   char *virt_buf, char *raw_buf);
-#define REGISTER_CONVERT_TO_RAW(VIRTUAL_TYPE,N,VIRT_BUF,RAW_BUF) \
-  mips_register_convert_to_raw (VIRTUAL_TYPE,N,VIRT_BUF,RAW_BUF)
-
-/* Number of bytes of storage in the program's representation
-   for register N. */
-
-#define REGISTER_VIRTUAL_SIZE(N) TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (N))
-
-/* Largest value REGISTER_RAW_SIZE can have.  */
-
-#define MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have.  */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 8
-
 /* Return the GDB type object for the "standard" data type of data in
    register N.  */
 
@@ -224,155 +147,20 @@
    If the target is big endian, double register values need conversion
    between memory and register formats.  */
 
-#define REGISTER_CONVERT_TO_TYPE(n, type, buffer)			\
-  do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG				\
-	  && REGISTER_RAW_SIZE (n) == 4					\
-	  && (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32			\
-	  && TYPE_CODE(type) == TYPE_CODE_FLT				\
-	  && TYPE_LENGTH(type) == 8) {					\
-        char __temp[4];							\
-	memcpy (__temp, ((char *)(buffer))+4, 4);			\
-	memcpy (((char *)(buffer))+4, (buffer), 4); 			\
-	memcpy (((char *)(buffer)), __temp, 4); }} while (0)
+extern void mips_register_convert_to_type (int regnum, 
+					   struct type *type,
+					   char *buffer);
+extern void mips_register_convert_from_type (int regnum, 
+					     struct type *type,
+					     char *buffer);
 
-#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer)			\
-  do {if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG				\
-	  && REGISTER_RAW_SIZE (n) == 4					\
-	  && (n) >= FP0_REGNUM && (n) < FP0_REGNUM + 32			\
-	  && TYPE_CODE(type) == TYPE_CODE_FLT				\
-	  && TYPE_LENGTH(type) == 8) {					\
-        char __temp[4];							\
-	memcpy (__temp, ((char *)(buffer))+4, 4);			\
-	memcpy (((char *)(buffer))+4, (buffer), 4); 			\
-	memcpy (((char *)(buffer)), __temp, 4); }} while (0)
+#define REGISTER_CONVERT_TO_TYPE(n, type, buffer)	\
+  mips_register_convert_to_type ((n), (type), (buffer))
 
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  Handled by mips_push_arguments.  */
+#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer)	\
+  mips_register_convert_from_type ((n), (type), (buffer))
 
-#define STORE_STRUCT_RETURN(addr, sp)
-/**/
-
-/* Extract from an array REGBUF containing the (raw) register state
-   a function return value of type TYPE, and copy that, in virtual format,
-   into VALBUF.  XXX floats */
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-  mips_extract_return_value(TYPE, REGBUF, VALBUF)
-extern void mips_extract_return_value (struct type *, char[], char *);
-
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
-  mips_store_return_value(TYPE, VALBUF)
-extern void mips_store_return_value (struct type *, char *);
-
-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one).  */
-/* The address is passed in a0 upon entry to the function, but when
-   the function exits, the compiler has copied the value to v0.  This
-   convention is specified by the System V ABI, so I think we can rely
-   on it.  */
-
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-  (extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
-		    REGISTER_RAW_SIZE (V0_REGNUM)))
-
-extern use_struct_convention_fn mips_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) mips_use_struct_convention (gcc_p, type)
 
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* FRAME_CHAIN takes a frame's nominal address
-   and produces the frame's chain-pointer. */
-
-#define FRAME_CHAIN(thisframe) (CORE_ADDR) mips_frame_chain (thisframe)
-extern CORE_ADDR mips_frame_chain (struct frame_info *);
-
-/* Define other aspects of the stack frame.  */
-
-
-/* A macro that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  If it
-   does not, FRAMELESS is set to 1, else 0.  */
-/* We handle this differently for mips, and maybe we should not */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)
-
-/* Saved Pc.  */
-
-#define FRAME_SAVED_PC(FRAME)	(mips_frame_saved_pc(FRAME))
-extern CORE_ADDR mips_frame_saved_pc (struct frame_info *);
-
-#define FRAME_ARGS_ADDRESS(fi)	(fi)->frame
-
-#define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
-
-/* Return number of args passed to a frame.
-   Can return -1, meaning no way to tell.  */
-
-#define FRAME_NUM_ARGS(fi)	(mips_frame_num_args(fi))
-extern int mips_frame_num_args (struct frame_info *);
-
-/* Return number of bytes at start of arglist that are not really args.  */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
-
-#define FRAME_INIT_SAVED_REGS(frame_info) \
-  do { \
-    if ((frame_info)->saved_regs == NULL) \
-      mips_find_saved_regs (frame_info); \
-    (frame_info)->saved_regs[SP_REGNUM] = (frame_info)->frame; \
-  } while (0)
-extern void mips_find_saved_regs (struct frame_info *);
-
-
-/* Things needed for making the inferior call functions.  */
-
-/* Stack must be aligned on 32-bit boundaries when synthesizing
-   function calls.  We don't need STACK_ALIGN, PUSH_ARGUMENTS will
-   handle it. */
-
-extern CORE_ADDR mips_push_arguments (int, struct value **, CORE_ADDR, int,
-				      CORE_ADDR);
-#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \
-  (mips_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))
-
-extern CORE_ADDR mips_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
-#define PUSH_RETURN_ADDRESS(PC, SP) (mips_push_return_address ((PC), (SP)))
-
-/* Push an empty stack frame, to record the current PC, etc.  */
-
-#define PUSH_DUMMY_FRAME 	mips_push_dummy_frame()
-extern void mips_push_dummy_frame (void);
-
-/* Discard from the stack the innermost frame, restoring all registers.  */
-
-#define POP_FRAME		mips_pop_frame()
-extern void mips_pop_frame (void);
-
-#define CALL_DUMMY_START_OFFSET (0)
-
-#define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-
-/* When calling functions on Irix 5 (or any MIPS SVR4 ABI compliant
-   platform), $t9 ($25) (Dest_Reg) contains the address of the callee
-   (used for PIC).  It doesn't hurt to do this on other systems; $t9
-   will be ignored.  */
-#define FIX_CALL_DUMMY(dummyname, start_sp, fun, nargs, args, rettype, gcc_p) \
-    write_register(T9_REGNUM, fun)
-
-#define CALL_DUMMY_ADDRESS() (mips_call_dummy_address ())
-extern CORE_ADDR mips_call_dummy_address (void);
-
 /* Special symbol found in blocks associated with routines.  We can hang
    mips_extra_func_info_t's off of this.  */
 
@@ -392,10 +180,6 @@
   }
  *mips_extra_func_info_t;
 
-extern void mips_init_extra_frame_info (int fromleaf, struct frame_info *);
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
-  mips_init_extra_frame_info(fromleaf, fci)
-
 extern void mips_print_extra_frame_info (struct frame_info *frame);
 #define	PRINT_EXTRA_FRAME_INFO(fi) \
   mips_print_extra_frame_info (fi)
@@ -420,7 +204,6 @@
 
 #define TM_PRINT_INSN_MACH 0
 
-
 /* These are defined in mdebugread.c and are used in mips-tdep.c  */
 extern CORE_ADDR sigtramp_address, sigtramp_end;
 extern void fixup_sigtramp (void);
@@ -429,13 +212,7 @@
 extern char *mips_read_processor_type (void);
 
 /* Functions for dealing with MIPS16 call and return stubs.  */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name)	mips_in_call_stub (pc, name)
-#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name)	mips_in_return_stub (pc, name)
-#define SKIP_TRAMPOLINE_CODE(pc)		mips_skip_stub (pc)
 #define IGNORE_HELPER_CALL(pc)			mips_ignore_helper (pc)
-extern int mips_in_call_stub (CORE_ADDR pc, char *name);
-extern int mips_in_return_stub (CORE_ADDR pc, char *name);
-extern CORE_ADDR mips_skip_stub (CORE_ADDR pc);
 extern int mips_ignore_helper (CORE_ADDR pc);
 
 #ifndef TARGET_MIPS
@@ -456,38 +233,8 @@
 
 #endif /* TM_MIPS_H */
 
-/* Macros for setting and testing a bit in a minimal symbol that
-   marks it as 16-bit function.  The MSB of the minimal symbol's
-   "info" field is used for this purpose. This field is already
-   being used to store the symbol size, so the assumption is
-   that the symbol size cannot exceed 2^31.
-
-   ELF_MAKE_MSYMBOL_SPECIAL
-   tests whether an ELF symbol is "special", i.e. refers
-   to a 16-bit function, and sets a "special" bit in a 
-   minimal symbol to mark it as a 16-bit function
-   MSYMBOL_IS_SPECIAL   tests the "special" bit in a minimal symbol
-   MSYMBOL_SIZE         returns the size of the minimal symbol, i.e.
-   the "info" field with the "special" bit masked out
- */
-
-#define ELF_MAKE_MSYMBOL_SPECIAL(sym,msym) \
- { \
-  if (((elf_symbol_type *)(sym))->internal_elf_sym.st_other == STO_MIPS16) { \
-    MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) | 0x80000000); \
-    SYMBOL_VALUE_ADDRESS (msym) |= 1; \
-  } \
- }
-
-#define MSYMBOL_IS_SPECIAL(msym) \
-  (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-#define MSYMBOL_SIZE(msym) \
-  ((long) MSYMBOL_INFO (msym) & 0x7fffffff)
-
-
 /* Command to set the processor type. */
 extern void mips_set_processor_type_command (char *, int);
 
-
 /* Single step based on where the current instruction will take us.  */
 extern void mips_software_single_step (enum target_signal, int);
diff --git a/gdb/config/mips/tm-mips64.h b/gdb/config/mips/tm-mips64.h
index 510ad05..13e62d2 100644
--- a/gdb/config/mips/tm-mips64.h
+++ b/gdb/config/mips/tm-mips64.h
@@ -34,4 +34,4 @@
 #define OP_LDGPR 067		/* ld */
 
 /* Get the basic MIPS definitions.  */
-#include "tm-mips.h"
+#include "mips/tm-mips.h"
diff --git a/gdb/config/mips/tm-mipsm3.h b/gdb/config/mips/tm-mipsm3.h
index 19ae028..9e2f490 100644
--- a/gdb/config/mips/tm-mipsm3.h
+++ b/gdb/config/mips/tm-mipsm3.h
@@ -25,7 +25,7 @@
  */
 
 /* Include common definitions for Mach3 systems */
-#include "nm-m3.h"
+#include "config/nm-m3.h"
 
 /* Define offsets to access CPROC stack when it does not have
  * a kernel thread.
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
index d1cc21c..ebf671b 100644
--- a/gdb/config/mips/tm-mipsv4.h
+++ b/gdb/config/mips/tm-mipsv4.h
@@ -19,7 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "mips/tm-bigmips.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 
 /* The signal handler trampoline is called _sigtramp.  */
 #undef IN_SIGTRAMP
@@ -33,8 +33,5 @@
 #define SIGFRAME_PC_OFF		(SIGFRAME_BASE + 40 + 35 * 4)
 #define SIGFRAME_FPREGSAVE_OFF	(SIGFRAME_BASE + 40 + 36 * 4)
 
-/* Use the alternate method of determining valid frame chains. */
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
 /* Convert a DWARF register number to a gdb REGNUM.  */
 #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
diff --git a/gdb/config/mips/tm-nbsd.h b/gdb/config/mips/tm-nbsd.h
index fc74486..143f3a4 100644
--- a/gdb/config/mips/tm-nbsd.h
+++ b/gdb/config/mips/tm-nbsd.h
@@ -28,11 +28,6 @@
 #include "mips/tm-mips.h"
 #include "solib.h"
 
-/* There's an E_MIPS_ABI_O32 flag in e_flags, but we don't use it - in
-   fact, using it may violate the o32 ABI.  */
-
-#define MIPS_DEFAULT_ABI MIPS_ABI_O32
-
 /* We don't want to inherit tm-mips.h's shared library trampoline code.  */
 #undef IN_SOLIB_CALL_TRAMPOLINE
 #undef IN_SOLIB_RETURN_TRAMPOLINE
diff --git a/gdb/config/mips/tm-vxmips.h b/gdb/config/mips/tm-vxmips.h
index e4ef2b6..5475fb5 100644
--- a/gdb/config/mips/tm-vxmips.h
+++ b/gdb/config/mips/tm-vxmips.h
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "mips/tm-mips.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
 
 /* FIXME: These are almost certainly wrong. */
 
diff --git a/gdb/config/mips/xm-irix5.h b/gdb/config/mips/xm-irix5.h
index 78c3a07..7d61ff0 100644
--- a/gdb/config/mips/xm-irix5.h
+++ b/gdb/config/mips/xm-irix5.h
@@ -19,7 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
 
 /* Override register locations in upage for SGI machines */
 #undef REGISTER_U_ADDR
diff --git a/gdb/config/mips/xm-mipsv4.h b/gdb/config/mips/xm-mipsv4.h
index 76fa5da..eccb296 100644
--- a/gdb/config/mips/xm-mipsv4.h
+++ b/gdb/config/mips/xm-mipsv4.h
@@ -19,4 +19,4 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index 4402b78..bd2e66c 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -125,7 +125,7 @@
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
   { \
     if (TYPE_LENGTH (TYPE) > 8) \
       internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
@@ -144,11 +144,11 @@
       } \
   }
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
   extract_address (REGBUF + REGISTER_BYTE (4), \
 		   REGISTER_RAW_SIZE (4))
 
-#define STORE_RETURN_VALUE(TYPE, VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
   { \
     if (TYPE_LENGTH (TYPE) > 8) \
       internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
@@ -197,9 +197,8 @@
 
 #define PUSH_DUMMY_FRAME	generic_push_dummy_frame ()
 
-extern CORE_ADDR
-mn10200_push_arguments (int, struct value **, CORE_ADDR,
-			unsigned char, CORE_ADDR);
+extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
+					 unsigned char, CORE_ADDR);
 #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
   (mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
 
@@ -214,7 +213,7 @@
 /* Override the default get_saved_register function with
    one that takes account of generic CALL_DUMMY frames.  */
 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-      generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+      generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
 
 /* Define this for Wingdb */
 #define TARGET_MN10200
diff --git a/gdb/config/ns32k/xm-nbsd.h b/gdb/config/ns32k/xm-nbsd.h
index 23a0650..962664b 100644
--- a/gdb/config/ns32k/xm-nbsd.h
+++ b/gdb/config/ns32k/xm-nbsd.h
@@ -19,4 +19,4 @@
    Boston, MA 02111-1307, USA.  */
 
 /* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
+#include "config/xm-nbsd.h"
diff --git a/gdb/config/pa/hppa.mt b/gdb/config/pa/hppa.mt
new file mode 100644
index 0000000..be77892
--- /dev/null
+++ b/gdb/config/pa/hppa.mt
@@ -0,0 +1,2 @@
+TDEPFILES= hppa-tdep.o
+TM_FILE= tm-hppa.h
diff --git a/gdb/config/pa/nm-hppao.h b/gdb/config/pa/nm-hppao.h
index 11e13e7..6650a4b 100644
--- a/gdb/config/pa/nm-hppao.h
+++ b/gdb/config/pa/nm-hppao.h
@@ -18,7 +18,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "nm-m3.h"
+#include "config/nm-m3.h"
 #define U_REGS_OFFSET 0
 
 #define KERNEL_U_ADDR 0
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 227108f..6fd8c03 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -310,7 +310,8 @@
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+void hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf);
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   hppa_extract_return_value (TYPE, REGBUF, VALBUF);
 
  /* elz: decide whether the function returning a value of type type
@@ -330,27 +331,30 @@
 /* Write into appropriate registers a function return value
    of type TYPE, given in virtual format.  */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+
+extern void hppa_store_return_value (struct type *type, char *valbuf);
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   hppa_store_return_value (TYPE, VALBUF);
 
 /* Extract from an array REGBUF containing the (raw) register state
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
   (*(int *)((REGBUF) + REGISTER_BYTE (28)))
 
 /* elz: Return a large value, which is stored on the stack at addr.
-   This is defined only for the hppa, at this moment. 
-   The above macro EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
-   because it assumes that on exit from a called function which returns
-   a large structure on the stack, the address of the ret structure is 
-   still in register 28. Unfortunately this register is usually overwritten
-   by the called function itself, on hppa. This is specified in the calling
-   convention doc. As far as I know, the only way to get the return value
-   is to have the caller tell us where it told the callee to put it, rather
-   than have the callee tell us.
- */
+   This is defined only for the hppa, at this moment.  The above macro
+   DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore,
+   because it assumes that on exit from a called function which
+   returns a large structure on the stack, the address of the ret
+   structure is still in register 28. Unfortunately this register is
+   usually overwritten by the called function itself, on hppa. This is
+   specified in the calling convention doc. As far as I know, the only
+   way to get the return value is to have the caller tell us where it
+   told the callee to put it, rather than have the callee tell us.  */
+struct value *hppa_value_returned_from_stack (register struct type *valtype,
+					      CORE_ADDR addr);
 #define VALUE_RETURNED_FROM_STACK(valtype,addr) \
   hppa_value_returned_from_stack (valtype, addr)
 
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 10fdeed..7e6e45a 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -221,13 +221,13 @@
 
 #undef REG_STRUCT_HAS_ADDR
 
-#undef EXTRACT_RETURN_VALUE
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
 /* RM: floats are returned in FR4R, doubles in FR4
  *     integral values are in r28, padded on the left 
  *     aggregates less that 65 bits are in r28, right padded 
  *     aggregates upto 128 bits are in r28 and r29, right padded
  */ 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   { \
     if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \
       memcpy ((VALBUF), \
@@ -260,8 +260,8 @@
   (TYPE_LENGTH (value_type) > 16)                
 
 /* RM: for return command */
-#undef STORE_RETURN_VALUE
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#undef DEPRECATED_STORE_RETURN_VALUE
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   { \
     if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \
       write_register_bytes \
diff --git a/gdb/config/powerpc/aix.mt b/gdb/config/powerpc/aix.mt
index 706129a..d7ba624 100644
--- a/gdb/config/powerpc/aix.mt
+++ b/gdb/config/powerpc/aix.mt
@@ -1,3 +1,3 @@
 # Target: PowerPC running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-ppc-aix.h
diff --git a/gdb/config/powerpc/aix432.mh b/gdb/config/powerpc/aix432.mh
new file mode 100644
index 0000000..fc74eb7
--- /dev/null
+++ b/gdb/config/powerpc/aix432.mh
@@ -0,0 +1,19 @@
+# Host: IBM PowerPC running AIX 4.3.2+
+
+XM_FILE= xm-aix.h
+
+NAT_FILE= nm-aix.h
+NATDEPFILES= aix-thread.o fork-child.o infptrace.o inftarg.o corelow.o \
+	     rs6000-nat.o xcoffread.o xcoffsolib.o
+
+# When compiled with cc, for debugging, this argument should be passed.
+# We have no idea who our current compiler is though, so we skip it.
+# MH_CFLAGS = -bnodelcsect
+
+# gdb is too big for all of its external symbols to fit in a small TOC
+# It looks like the GNU linker doesn't understand the -bbigtoc switch.
+# This switch may be needed for some vendor compilers.
+# MH_LDFLAGS = -Wl,-bbigtoc
+
+# pthread debugging support
+NAT_CLIBS = -lpthdebug
diff --git a/gdb/config/powerpc/linux.mh b/gdb/config/powerpc/linux.mh
index 0e3c2a6..d0a2104 100644
--- a/gdb/config/powerpc/linux.mh
+++ b/gdb/config/powerpc/linux.mh
@@ -4,8 +4,8 @@
 XM_CLIBS=
 
 NAT_FILE= nm-linux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \
-	core-regset.o ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
+NATDEPFILES= infptrace.o inftarg.o fork-child.o linux-proc.o \
+	ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
 	gcore.o
 
 LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/powerpc/linux.mt b/gdb/config/powerpc/linux.mt
index 01160b9..1fb6fd8 100644
--- a/gdb/config/powerpc/linux.mt
+++ b/gdb/config/powerpc/linux.mt
@@ -1,5 +1,6 @@
 # Target: Motorola PPC on Linux
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o solib.o \
+	solib-svr4.o solib-legacy.o corelow.o
 TM_FILE= tm-linux.h
 
 SIM_OBS = remote-sim.o
diff --git a/gdb/config/powerpc/nbsd.mh b/gdb/config/powerpc/nbsd.mh
index 9d29986..26ba24d 100644
--- a/gdb/config/powerpc/nbsd.mh
+++ b/gdb/config/powerpc/nbsd.mh
@@ -1,3 +1,3 @@
 # Host: PowerPC, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o ppcnbsd-nat.o solib-legacy.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o ppcnbsd-nat.o
 NAT_FILE= nm-nbsd.h
diff --git a/gdb/config/powerpc/nbsd.mt b/gdb/config/powerpc/nbsd.mt
index cbf559b..d492f9d 100644
--- a/gdb/config/powerpc/nbsd.mt
+++ b/gdb/config/powerpc/nbsd.mt
@@ -1,5 +1,5 @@
 # Target: PowerPC, running NetBSD
-TDEPFILES= rs6000-tdep.o ppcnbsd-tdep.o nbsd-tdep.o ppc-linux-tdep.o corelow.o \
+TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o ppcnbsd-tdep.o nbsd-tdep.o corelow.o \
 	solib.o solib-svr4.o
 TM_FILE= tm-nbsd.h
 
diff --git a/gdb/config/powerpc/nm-linux.h b/gdb/config/powerpc/nm-linux.h
index dee39b4..6e3f3a0 100644
--- a/gdb/config/powerpc/nm-linux.h
+++ b/gdb/config/powerpc/nm-linux.h
@@ -19,7 +19,7 @@
 
 #ifndef NM_LINUX_H
 
-#include "nm-linux.h"
+#include "config/nm-linux.h"
 
 #define NM_LINUX_H
 
diff --git a/gdb/config/powerpc/ppc-eabi.mt b/gdb/config/powerpc/ppc-eabi.mt
index 2d4a77f..5ef8cd9 100644
--- a/gdb/config/powerpc/ppc-eabi.mt
+++ b/gdb/config/powerpc/ppc-eabi.mt
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-ppc-eabi.h
diff --git a/gdb/config/powerpc/ppc-sim.mt b/gdb/config/powerpc/ppc-sim.mt
index f2ad1f0..187bf39 100644
--- a/gdb/config/powerpc/ppc-sim.mt
+++ b/gdb/config/powerpc/ppc-sim.mt
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi and including the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o dink32-rom.o ppc-bdm.o ocd.o remote-sds.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-ppc-eabi.h
 
 SIM_OBS = remote-sim.o
diff --git a/gdb/config/powerpc/ppcle-eabi.mt b/gdb/config/powerpc/ppcle-eabi.mt
index e748097..ee05f16 100644
--- a/gdb/config/powerpc/ppcle-eabi.mt
+++ b/gdb/config/powerpc/ppcle-eabi.mt
@@ -1,3 +1,3 @@
 # Target: PowerPC running eabi in little endian mode
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-ppcle-eabi.h
diff --git a/gdb/config/powerpc/ppcle-sim.mt b/gdb/config/powerpc/ppcle-sim.mt
index 558c0dc..31cb900 100644
--- a/gdb/config/powerpc/ppcle-sim.mt
+++ b/gdb/config/powerpc/ppcle-sim.mt
@@ -1,5 +1,5 @@
 # Target: PowerPC running eabi in little endian mode under the simulator
-TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o monitor.o dsrec.o ppcbug-rom.o ppc-bdm.o ocd.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-ppcle-eabi.h
 
 SIM_OBS = remote-sim.o
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index 5fe8d76..d69dfc1 100644
--- a/gdb/config/powerpc/tm-linux.h
+++ b/gdb/config/powerpc/tm-linux.h
@@ -24,7 +24,7 @@
 #include "powerpc/tm-ppc-eabi.h"
 /* Avoid warning from redefinition in tm-sysv4.h (included from tm-linux.h) */
 #undef SKIP_TRAMPOLINE_CODE
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 /* We can single step on linux */
 #undef  SOFTWARE_SINGLE_STEP
diff --git a/gdb/config/powerpc/tm-vxworks.h b/gdb/config/powerpc/tm-vxworks.h
index a31846a..69e2dde 100644
--- a/gdb/config/powerpc/tm-vxworks.h
+++ b/gdb/config/powerpc/tm-vxworks.h
@@ -23,6 +23,6 @@
 #define TM_VXWORKS_H
 
 #include "powerpc/tm-ppc-eabi.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
 
 #endif /* ifndef TM_VXWORKS_H */
diff --git a/gdb/config/powerpc/vxworks.mt b/gdb/config/powerpc/vxworks.mt
index ba6e17b..eca028f 100644
--- a/gdb/config/powerpc/vxworks.mt
+++ b/gdb/config/powerpc/vxworks.mt
@@ -1,3 +1,3 @@
 # Target: Powerpc running VxWorks
-TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-vxworks.h
diff --git a/gdb/config/powerpc/xm-aix.h b/gdb/config/powerpc/xm-aix.h
index cc98650..e663453 100644
--- a/gdb/config/powerpc/xm-aix.h
+++ b/gdb/config/powerpc/xm-aix.h
@@ -19,7 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "xm-aix4.h"
+#include "config/xm-aix4.h"
 
 /* This doesn't seem to be declared in any header file I can find.  */
 char *termdef (int, int);
diff --git a/gdb/config/romp/rtbsd.mh b/gdb/config/romp/rtbsd.mh
deleted file mode 100644
index 1efa116..0000000
--- a/gdb/config/romp/rtbsd.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# IBM RT/PC running BSD unix. 
-# This file contributed at NYU, where we are using the RT to remote
-# debug an a29k running unix.  No attempt, as of 7/16/91, has been made
-# to support debugging of RT executables.
-NATDEPFILES corelow.o core-aout.o infptrace.o inftarg.o fork-child.o
-MH_CFLAGS=-DHOSTING_ONLY	# No debugging of RT executables 
-XM_FILE= xm-rtbsd.h
-CC=gcc -traditional		# hc/pcc just can't cut it.
diff --git a/gdb/config/romp/xm-rtbsd.h b/gdb/config/romp/xm-rtbsd.h
deleted file mode 100644
index e791816..0000000
--- a/gdb/config/romp/xm-rtbsd.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Definitions to host GDB on an IBM RT/PC running BSD Unix. 
-   Copyright 1986, 1987, 1989, 1991, 1992  Free Software Foundation, Inc.
-   Contributed by David Wood @ New York University (wood@lab.ultra.nyu.edu).
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This OS has the wait structure */
-#define HAVE_WAIT_STRUCT
-
-#ifdef HOSTING_ONLY
-/*
- * This next two defines are to get GDB up and running as a host to
- * do remote debugging.  I know there is a gdb for the RT, but there wasn't
- * an xconfig/rt* file.  
- */
-#define KERNEL_U_ADDR_BSD	/* This may be correct, but hasn't been tested */
-#define REGISTER_U_ADDR(a,b,c)	   \
-	(printf("GDB can not debug IBM RT/PC BSD executables (yet)\n"),\
-	quit(),0)
-#else
-#include	"GDB for the RT is not included in the distribution"
-#endif
diff --git a/gdb/config/rs6000/aix4.mt b/gdb/config/rs6000/aix4.mt
index fb9d003..388c4f23 100644
--- a/gdb/config/rs6000/aix4.mt
+++ b/gdb/config/rs6000/aix4.mt
@@ -1,3 +1,3 @@
 # Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-rs6000-aix4.h
diff --git a/gdb/config/rs6000/nm-rs6000ly.h b/gdb/config/rs6000/nm-rs6000ly.h
index 7bc1267..51d12f8 100644
--- a/gdb/config/rs6000/nm-rs6000ly.h
+++ b/gdb/config/rs6000/nm-rs6000ly.h
@@ -21,6 +21,6 @@
 #ifndef NM_RS6000LYNX_H
 #define NM_RS6000LYNX_H
 
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
 
 #endif /* NM_RS6000LYNX_H */
diff --git a/gdb/config/rs6000/rs6000.mt b/gdb/config/rs6000/rs6000.mt
index 5ffcc01..86b4c58 100644
--- a/gdb/config/rs6000/rs6000.mt
+++ b/gdb/config/rs6000/rs6000.mt
@@ -1,3 +1,3 @@
 # Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-rs6000.h
diff --git a/gdb/config/rs6000/rs6000lynx.mt b/gdb/config/rs6000/rs6000lynx.mt
index 69aeb60..89ed7a2 100644
--- a/gdb/config/rs6000/rs6000lynx.mt
+++ b/gdb/config/rs6000/rs6000lynx.mt
@@ -1,3 +1,3 @@
 # Target: IBM RS6000 running LynxOS
-TDEPFILES= coff-solib.o rs6000-tdep.o ppc-linux-tdep.o solib.o solib-svr4.o
+TDEPFILES= coff-solib.o rs6000-tdep.o ppc-sysv-tdep.o solib.o solib-svr4.o
 TM_FILE= tm-rs6000ly.h
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 202ac77..ea0c073 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -81,11 +81,6 @@
 #define FP0_REGNUM 32		/* Floating point register 0 */
 #define FPLAST_REGNUM 63	/* Last floating point register */
 
-/* These #defines are used to parse core files and talk to ptrace, so they
-   must remain fixed.  */
-#define	FIRST_UISA_SP_REGNUM 64	/* first special register number */
-#define LAST_UISA_SP_REGNUM  70	/* last special register number */
-
 /* Define other aspects of the stack frame.  */
 
 #define INIT_FRAME_PC_FIRST(fromleaf, prev) \
diff --git a/gdb/config/rs6000/tm-rs6000ly.h b/gdb/config/rs6000/tm-rs6000ly.h
index ca7dc0d..73ef7f0 100644
--- a/gdb/config/rs6000/tm-rs6000ly.h
+++ b/gdb/config/rs6000/tm-rs6000ly.h
@@ -21,7 +21,7 @@
 #ifndef TM_RS6000LYNX_H
 #define TM_RS6000LYNX_H
 
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
 
 /* Use generic RS6000 definitions. */
 #include "rs6000/tm-rs6000.h"
diff --git a/gdb/config/rs6000/xm-aix4.h b/gdb/config/rs6000/xm-aix4.h
index 5f7aa77..4ca0abb 100644
--- a/gdb/config/rs6000/xm-aix4.h
+++ b/gdb/config/rs6000/xm-aix4.h
@@ -20,7 +20,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "xm-aix4.h"
+#include "config/xm-aix4.h"
 
 /* AIX 4.x uses nonstandard "int *" as type of third argument to ptrace() */
 
diff --git a/gdb/config/sh/tm-linux.h b/gdb/config/sh/tm-linux.h
index ab1d4d8..e8272d0 100644
--- a/gdb/config/sh/tm-linux.h
+++ b/gdb/config/sh/tm-linux.h
@@ -21,7 +21,7 @@
    Boston, MA 02111-1307, USA.  */
 
 /* Pull in GNU/Linux generic defs.  */
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 /* Pull in sh-target defs */
 #include "sh/tm-sh.h"
diff --git a/gdb/config/sparc/nbsdaout.mh b/gdb/config/sparc/nbsdaout.mh
index ecb69e4..4520899 100644
--- a/gdb/config/sparc/nbsdaout.mh
+++ b/gdb/config/sparc/nbsdaout.mh
@@ -1,6 +1,4 @@
 # Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
-	solib.o solib-sunos.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o solib-sunos.o
 XM_FILE= xm-nbsd.h
 NAT_FILE= nm-nbsdaout.h
-HOST_IPC=-DBSD_IPC
diff --git a/gdb/config/sparc/nbsdaout.mt b/gdb/config/sparc/nbsdaout.mt
deleted file mode 100644
index c603f36..0000000
--- a/gdb/config/sparc/nbsdaout.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sun 4 or Sparcstation, running NetBSD
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-nbsdaout.h
diff --git a/gdb/config/sparc/nbsdelf.mh b/gdb/config/sparc/nbsdelf.mh
index 8581c1b..1042d91 100644
--- a/gdb/config/sparc/nbsdelf.mh
+++ b/gdb/config/sparc/nbsdelf.mh
@@ -1,6 +1,4 @@
 # Host: Sun 4 or Sparcstation, running NetBSD
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
-	solib.o solib-svr4.o solib-legacy.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparcnbsd-nat.o
 XM_FILE= xm-nbsd.h
 NAT_FILE= nm-nbsd.h
-HOST_IPC=-DBSD_IPC
diff --git a/gdb/config/sparc/nbsdelf.mt b/gdb/config/sparc/nbsdelf.mt
deleted file mode 100644
index 5c89318..0000000
--- a/gdb/config/sparc/nbsdelf.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Sun 4 or Sparcstation, running NetBSD
-TDEPFILES= sparc-tdep.o
-TM_FILE= tm-nbsd.h
diff --git a/gdb/config/sparc/nm-linux.h b/gdb/config/sparc/nm-linux.h
index 80ab042..a156eba 100644
--- a/gdb/config/sparc/nm-linux.h
+++ b/gdb/config/sparc/nm-linux.h
@@ -20,8 +20,8 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <nm-sysv4.h>
-#include "nm-linux.h"
+#include "config/nm-sysv4.h"
+#include "config/nm-linux.h"
 #include "solib.h"
 
 #define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/sparc/nm-nbsd.h b/gdb/config/sparc/nm-nbsd.h
index 653be85..957a34e 100644
--- a/gdb/config/sparc/nm-nbsd.h
+++ b/gdb/config/sparc/nm-nbsd.h
@@ -1,5 +1,5 @@
 /* Native-dependent definitions for Sparc running NetBSD, for GDB.
-   Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000
+   Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -32,30 +32,4 @@
 
 #define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
 
-/* Make things match up with what is expected in sparc-nat.c.  */
-
-#define regs		trapframe
-#define fp_status	fpstate
-
-#define r_g1		tf_global[1]
-#define r_ps		tf_psr
-#define r_pc		tf_pc
-#define r_npc		tf_npc
-#define r_y		tf_y
-
-#define fpu		fpstate
-#define fpu_regs	fs_regs
-#define fpu_fsr		fs_fsr
-#define fpu_fr		fs_regs
-#define Fpu_fsr		fs_fsr
-#define FPU_FSR_TYPE	int
-
-#define PTRACE_GETREGS	 PT_GETREGS
-#define PTRACE_GETFPREGS PT_GETFPREGS
-#define PTRACE_SETREGS	 PT_SETREGS
-#define PTRACE_SETFPREGS PT_SETFPREGS
-
-#define GDB_GREGSET_T	struct reg
-#define GDB_FPREGSET_T	struct fpreg
-
 #endif /* NM_NBSD_H */
diff --git a/gdb/config/sparc/nm-sparclynx.h b/gdb/config/sparc/nm-sparclynx.h
index 74304be..a231ba4 100644
--- a/gdb/config/sparc/nm-sparclynx.h
+++ b/gdb/config/sparc/nm-sparclynx.h
@@ -21,6 +21,6 @@
 #ifndef NM_SPARCLYNX_H
 #define NM_SPARCLYNX_H
 
-#include "nm-lynx.h"
+#include "config/nm-lynx.h"
 
 #endif /* NM_SPARCLYNX_H */
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h
index adc8231..f8aeda0 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sun4sol2.h
@@ -22,7 +22,7 @@
 
 /* Include the generic SVR4 definitions.  */
 
-#include <nm-sysv4.h>
+#include "config/nm-sysv4.h"
 
 /* Before storing, we need to read all the registers.  */
 
diff --git a/gdb/config/sparc/tm-linux.h b/gdb/config/sparc/tm-linux.h
index 34d901f..31eeff9 100644
--- a/gdb/config/sparc/tm-linux.h
+++ b/gdb/config/sparc/tm-linux.h
@@ -29,6 +29,6 @@
 
 #define SIGCONTEXT_PC_OFFSET 12
 
-#include "tm-linux.h"
+#include "config/tm-linux.h"
 
 #endif /* TM_SPARCLINUX_H */
diff --git a/gdb/config/sparc/tm-nbsd.h b/gdb/config/sparc/tm-nbsd.h
index 289e705..bd98450 100644
--- a/gdb/config/sparc/tm-nbsd.h
+++ b/gdb/config/sparc/tm-nbsd.h
@@ -1,5 +1,5 @@
 /* Macro definitions for Sparc running under NetBSD.
-   Copyright 1994 Free Software Foundation, Inc.
+   Copyright 1994, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,9 @@
 #ifndef TM_NBSD_H
 #define TM_NBSD_H
 
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+
 #include "sparc/tm-sparc.h"
+#include "solib.h"
 
 #endif /* TM_NBSD_H */
diff --git a/gdb/config/sparc/tm-nbsdaout.h b/gdb/config/sparc/tm-nbsdaout.h
deleted file mode 100644
index a62e535..0000000
--- a/gdb/config/sparc/tm-nbsdaout.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Macro definitions for Sparc running under NetBSD.
-   Copyright 1994, 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 TM_NBSDAOUT_H
-#define TM_NBSDAOUT_H
-
-#include "sparc/tm-nbsd.h"
-
-/* Return non-zero if we are in a shared library trampoline code stub. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \
-  (name && !strcmp(name, "_DYNAMIC"))
-
-#endif /* TM_NBSDAOUT_H */
diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h
index 8486c86..4c07f1f 100644
--- a/gdb/config/sparc/tm-sp64.h
+++ b/gdb/config/sparc/tm-sp64.h
@@ -273,8 +273,8 @@
 #define TARGET_READ_FP() (sparc64_read_fp ())
 #define TARGET_WRITE_SP(X) (sparc64_write_sp (X))
 
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
      sp64_extract_return_value(TYPE, REGBUF, VALBUF, 0)
 extern void sp64_extract_return_value (struct type *, char[], char *, int);
 
diff --git a/gdb/config/sparc/tm-sp64linux.h b/gdb/config/sparc/tm-sp64linux.h
index 56b5620..17bdd8a 100644
--- a/gdb/config/sparc/tm-sp64linux.h
+++ b/gdb/config/sparc/tm-sp64linux.h
@@ -31,6 +31,6 @@
 
 #define GDB_PTRACE_REGS64
 
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 
-#endif TM_SPARC_LIN64_H
+#endif /* TM_SPARC_LIN64_H */
diff --git a/gdb/config/sparc/tm-sp64sim.h b/gdb/config/sparc/tm-sp64sim.h
index c8d115c..bb1263b 100644
--- a/gdb/config/sparc/tm-sp64sim.h
+++ b/gdb/config/sparc/tm-sp64sim.h
@@ -22,7 +22,7 @@
    but it's a good start.  */
 
 #include "sparc/tm-sp64.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
 
 /* Offsets into jmp_buf.  Not defined by Sun, but at least documented in a
    comment in <machine/setjmp.h>! */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 4a53580..8cac258 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -267,7 +267,7 @@
 /* Write into appropriate registers a function return value of type
    TYPE, given in virtual format.  */
 
-#define STORE_RETURN_VALUE(TYPE, VALBUF) \
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
      sparc_store_return_value (TYPE, VALBUF)
 extern void sparc_store_return_value (struct type *, char *);
 
@@ -275,7 +275,7 @@
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
      sparc_extract_struct_value_address (REGBUF)
 
 extern CORE_ADDR sparc_extract_struct_value_address (char *);
@@ -717,7 +717,7 @@
    function return value of type TYPE, and copy that, in virtual
    format, into VALBUF.  */
 
-#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
      sparc32_extract_return_value (TYPE, REGBUF, VALBUF)
 extern void sparc32_extract_return_value (struct type *, char[], char *);
 
diff --git a/gdb/config/sparc/tm-sparclet.h b/gdb/config/sparc/tm-sparclet.h
index cc52d5a..fd25f5b 100644
--- a/gdb/config/sparc/tm-sparclet.h
+++ b/gdb/config/sparc/tm-sparclet.h
@@ -108,8 +108,8 @@
 /* sparclet register numbers */
 #define CCSR_REGNUM 72
 
-#undef EXTRACT_RETURN_VALUE
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)                       \
+#undef DEPRECATED_EXTRACT_RETURN_VALUE
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF)            \
   {                                                                    \
     memcpy ((VALBUF),                                                  \
 	    (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 +     \
@@ -117,8 +117,8 @@
 	     ? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \
 	    TYPE_LENGTH(TYPE));                                        \
   }
-#undef STORE_RETURN_VALUE
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
+#undef DEPRECATED_STORE_RETURN_VALUE
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
   {                                                                    \
     /* Other values are returned in register %o0.  */                  \
     write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF),         \
diff --git a/gdb/config/sparc/tm-sparclynx.h b/gdb/config/sparc/tm-sparclynx.h
index 1a28621..3d19653 100644
--- a/gdb/config/sparc/tm-sparclynx.h
+++ b/gdb/config/sparc/tm-sparclynx.h
@@ -21,7 +21,7 @@
 #ifndef TM_SPARCLYNX_H
 #define TM_SPARCLYNX_H
 
-#include "tm-lynx.h"
+#include "config/tm-lynx.h"
 
 /* Use generic Sparc definitions. */
 #include "sparc/tm-sparc.h"
diff --git a/gdb/config/sparc/tm-sun4os4.h b/gdb/config/sparc/tm-sun4os4.h
index b561b13..e080904 100644
--- a/gdb/config/sparc/tm-sun4os4.h
+++ b/gdb/config/sparc/tm-sun4os4.h
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "sparc/tm-sparc.h"
-#include "tm-sunos.h"
+#include "config/tm-sunos.h"
 
 /* Redefine SKIP_TRAMPOLINE_CODE to handle PIC compiled modules
    in main executables.  */
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index e3c59f6..eb253b1 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -22,7 +22,7 @@
 #define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
 
 #include "sparc/tm-sparc.h"
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 
 /* With Sol2 it is no longer necessary to enable software single-step,
    since the /proc interface can take care of it for us in hardware.  */
diff --git a/gdb/config/sparc/tm-vxsparc.h b/gdb/config/sparc/tm-vxsparc.h
index b6529f75..f32f70d 100644
--- a/gdb/config/sparc/tm-vxsparc.h
+++ b/gdb/config/sparc/tm-vxsparc.h
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "sparc/tm-spc-em.h"
-#include "tm-vxworks.h"
+#include "config/tm-vxworks.h"
 
 /* FIXME: These are almost certainly wrong. */
 
diff --git a/gdb/config/sparc/xm-nbsd.h b/gdb/config/sparc/xm-nbsd.h
deleted file mode 100644
index e469aab..0000000
--- a/gdb/config/sparc/xm-nbsd.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Parameters for execution on a Sparc running NetBSD, for GDB.
-   Copyright 1994 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/* Get generic NetBSD host definitions. */
-#include "xm-nbsd.h"
diff --git a/gdb/config/sparc/xm-sun4sol2.h b/gdb/config/sparc/xm-sun4sol2.h
index b775f7c..490962d 100644
--- a/gdb/config/sparc/xm-sun4sol2.h
+++ b/gdb/config/sparc/xm-sun4sol2.h
@@ -21,7 +21,7 @@
 
 /* Pick up more stuff from the generic SVR4 host include file. */
 
-#include "xm-sysv4.h"
+#include "config/xm-sysv4.h"
 
 /* These are not currently used in SVR4 (but should be, FIXME!).  */
 #undef	DO_DEFERRED_STORES
diff --git a/gdb/config/tm-linux.h b/gdb/config/tm-linux.h
index 9389872..caf008a 100644
--- a/gdb/config/tm-linux.h
+++ b/gdb/config/tm-linux.h
@@ -30,7 +30,7 @@
 
 /* We need this file for the SOLIB_TRAMPOLINE stuff. */
 
-#include "tm-sysv4.h"
+#include "config/tm-sysv4.h"
 
 /* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
    link.h is available on all linux platforms.  For I386 and SH3/4, 
diff --git a/gdb/config/vax/nm-vax.h b/gdb/config/vax/nm-vax.h
index c2baef1..efebd6b 100644
--- a/gdb/config/vax/nm-vax.h
+++ b/gdb/config/vax/nm-vax.h
@@ -18,6 +18,8 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#define AP_REGNUM 12	/* XXXJRT */
+
 #define REGISTER_U_ADDR(addr, blockend, regno)		\
 { addr = blockend - 0110 + regno * 4;			\
   if (regno == PC_REGNUM) addr = blockend - 8;		\
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index 204d155..22e60a0 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -1,4 +1,4 @@
-/* Definitions to make GDB run on a vax under 4.2bsd.
+/* Target definitions for VAX systems for GDB.
    Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
    Free Software Foundation, Inc.
 
@@ -19,30 +19,13 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef TM_VAX_H
+#define TM_VAX_H
+
 #define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
 
-#define TARGET_UPAGES 14
-#define TARGET_NBPG 512
-#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
-
-/* On the VAX, sigtramp is in the u area.  Can't check the exact
-   addresses because for cross-debugging we don't have VAX include
-   files around.  This should be close enough.  */
-#define SIGTRAMP_START(pc)	STACK_END_ADDR
-#define SIGTRAMP_END(pc)	0x80000000
-
-/* Sequence of bytes for breakpoint instruction.  */
-#define BREAKPOINT {3}
-
-#define AP_REGNUM 12	/* XXXJRT */
-
-/* Offset to saved PC in sigcontext, from <sys/signal.h>.  */
-/* XXXJRT should go away */
-#define SIGCONTEXT_PC_OFFSET 12
-
 /* XXXJRT not yet under gdbarch control */
 #define FRAME_ARGS_ADDRESS_CORRECT(fi) vax_frame_args_address_correct ((fi))
 extern CORE_ADDR vax_frame_args_address_correct (struct frame_info *);
 
-/* If vax pcc says CHAR or SHORT, it provides the correct address.  */
-#define BELIEVE_PCC_PROMOTION 1
+#endif /* TM_VAX_H */
diff --git a/gdb/config/vax/tm-vaxbsd.h b/gdb/config/vax/tm-vaxbsd.h
new file mode 100644
index 0000000..e24049a
--- /dev/null
+++ b/gdb/config/vax/tm-vaxbsd.h
@@ -0,0 +1,41 @@
+/* Definitions to make GDB run on a vax under 4.2bsd.
+   Copyright 1986, 1987, 1989, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002
+   Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 TM_VAXBSD_H
+#define TM_VAXBSD_H
+
+#include "vax/tm-vax.h"
+
+#define TARGET_UPAGES 14
+#define TARGET_NBPG 512
+#define STACK_END_ADDR (0x80000000 - (TARGET_UPAGES * TARGET_NBPG))
+
+/* On the VAX, sigtramp is in the u area.  Can't check the exact
+   addresses because for cross-debugging we don't have VAX include
+   files around.  This should be close enough.  */
+#define SIGTRAMP_START(pc)	STACK_END_ADDR
+#define SIGTRAMP_END(pc)	0x80000000
+
+/* Offset to saved PC in sigcontext, from <sys/signal.h>.  */
+/* XXXJRT should go away */
+#define SIGCONTEXT_PC_OFFSET 12
+
+#endif /* TM_VAXBSD_H */
diff --git a/gdb/config/vax/vax.mt b/gdb/config/vax/vax.mt
index ebdf942..06ab9b2 100644
--- a/gdb/config/vax/vax.mt
+++ b/gdb/config/vax/vax.mt
@@ -1,3 +1,3 @@
 # Target: DEC VAX running BSD or Ultrix
 TDEPFILES= vax-tdep.o
-TM_FILE= tm-vax.h
+TM_FILE= tm-vaxbsd.h
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
index 4405855..eb96eda 100644
--- a/gdb/config/z8k/tm-z8k.h
+++ b/gdb/config/z8k/tm-z8k.h
@@ -142,19 +142,19 @@
    as doubles in d0/d1.  */
 
 
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
   memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE));
 
 /* Write into appropriate registers a function return value
    of type TYPE, given in virtual format. */
 
-#define STORE_RETURN_VALUE(TYPE,VALBUF) internal_error (__FILE__, __LINE__, "failed internal consistency check");
+#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) internal_error (__FILE__, __LINE__, "failed internal consistency check");
 
 /* Extract from an array REGBUF containing the (raw) register state
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
 
 /* Describe the pointer in each stack frame to the previous stack frame
    (its caller).  */
diff --git a/gdb/configure b/gdb/configure
index d8493a9..9befcab 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -79,6 +79,7 @@
 program_transform_name=s,x,x,
 silent=
 site=
+sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -193,6 +194,7 @@
   --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
@@ -363,6 +365,11 @@
   -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=*)
@@ -528,12 +535,16 @@
 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
@@ -574,7 +585,7 @@
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:589: 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"
@@ -600,7 +611,7 @@
 # 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:604: checking for $ac_word" >&5
+echo "configure:615: 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
@@ -630,7 +641,7 @@
   # 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:634: checking for $ac_word" >&5
+echo "configure:645: 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
@@ -681,7 +692,7 @@
       # 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:685: checking for $ac_word" >&5
+echo "configure:696: 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
@@ -713,7 +724,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:728: 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.
@@ -724,12 +735,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 728 "configure"
+#line 739 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:744: \"$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
@@ -755,12 +766,12 @@
   { 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:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:770: 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:764: checking whether we are using GNU C" >&5
+echo "configure:775: 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
@@ -769,7 +780,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$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:784: \"$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
@@ -788,7 +799,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:803: 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
@@ -820,7 +831,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:824: checking how to run the C preprocessor" >&5
+echo "configure:835: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -835,13 +846,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 839 "configure"
+#line 850 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:856: \"$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
   :
@@ -852,13 +863,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 856 "configure"
+#line 867 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:873: \"$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
   :
@@ -869,13 +880,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 873 "configure"
+#line 884 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:890: \"$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
   :
@@ -900,9 +911,9 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:904: checking for AIX" >&5
+echo "configure:915: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 906 "configure"
+#line 917 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -924,7 +935,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:928: checking for POSIXized ISC" >&5
+echo "configure:939: 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
@@ -948,7 +959,7 @@
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:952: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -965,7 +976,7 @@
 do
   CC="$ac_save_CC $ac_arg"
   cat > conftest.$ac_ext <<EOF
-#line 969 "configure"
+#line 980 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -1002,7 +1013,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
@@ -1073,7 +1084,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1077: checking host system type" >&5
+echo "configure:1088: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1094,7 +1105,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1098: checking target system type" >&5
+echo "configure:1109: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1112,7 +1123,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1116: checking build system type" >&5
+echo "configure:1127: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1137,7 +1148,7 @@
 
 ALL_LINGUAS=
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1141: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1152: 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
@@ -1166,7 +1177,7 @@
 # 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:1170: checking for $ac_word" >&5
+echo "configure:1181: 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
@@ -1194,12 +1205,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1198: checking for ANSI C header files" >&5
+echo "configure:1209: 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 <<EOF
-#line 1203 "configure"
+#line 1214 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1207,7 +1218,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1222: \"$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*
@@ -1224,7 +1235,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1228 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1242,7 +1253,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1246 "configure"
+#line 1257 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1263,7 +1274,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1267 "configure"
+#line 1278 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1274,7 +1285,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1298,12 +1309,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1302: checking for working const" >&5
+echo "configure:1313: 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 <<EOF
-#line 1307 "configure"
+#line 1318 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1352,7 +1363,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1373,21 +1384,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1377: checking for inline" >&5
+echo "configure:1388: 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 <<EOF
-#line 1384 "configure"
+#line 1395 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1413,12 +1424,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1417: checking for off_t" >&5
+echo "configure:1428: 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 <<EOF
-#line 1422 "configure"
+#line 1433 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1446,12 +1457,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1450: checking for size_t" >&5
+echo "configure:1461: 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 <<EOF
-#line 1455 "configure"
+#line 1466 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1481,19 +1492,19 @@
 # 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:1485: checking for working alloca.h" >&5
+echo "configure:1496: 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 <<EOF
-#line 1490 "configure"
+#line 1501 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1508: \"$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
@@ -1514,12 +1525,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1518: checking for alloca" >&5
+echo "configure:1529: 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 <<EOF
-#line 1523 "configure"
+#line 1534 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1547,7 +1558,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1562: \"$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
@@ -1579,12 +1590,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1583: checking whether alloca needs Cray hooks" >&5
+echo "configure:1594: 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 <<EOF
-#line 1588 "configure"
+#line 1599 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1609,12 +1620,12 @@
 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:1613: checking for $ac_func" >&5
+echo "configure:1624: 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 <<EOF
-#line 1618 "configure"
+#line 1629 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1637,7 +1648,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1652: \"$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
@@ -1664,7 +1675,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1668: checking stack direction for C alloca" >&5
+echo "configure:1679: 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
@@ -1672,7 +1683,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1676 "configure"
+#line 1687 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1691,7 +1702,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1706: \"$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
@@ -1716,17 +1727,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1720: checking for $ac_hdr" >&5
+echo "configure:1731: 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
-#line 1725 "configure"
+#line 1736 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1741: \"$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*
@@ -1755,12 +1766,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1759: checking for $ac_func" >&5
+echo "configure:1770: 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 <<EOF
-#line 1764 "configure"
+#line 1775 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1783,7 +1794,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1798: \"$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
@@ -1808,7 +1819,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1812: checking for working mmap" >&5
+echo "configure:1823: 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
@@ -1816,7 +1827,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1820 "configure"
+#line 1831 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1956,7 +1967,7 @@
 }
 
 EOF
-if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1971: \"$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
@@ -1984,17 +1995,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1988: checking for $ac_hdr" >&5
+echo "configure:1999: 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
-#line 1993 "configure"
+#line 2004 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2009: \"$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*
@@ -2024,12 +2035,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2028: checking for $ac_func" >&5
+echo "configure:2039: 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 <<EOF
-#line 2033 "configure"
+#line 2044 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2052,7 +2063,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2067: \"$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
@@ -2081,12 +2092,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2085: checking for $ac_func" >&5
+echo "configure:2096: 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 <<EOF
-#line 2090 "configure"
+#line 2101 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2109,7 +2120,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2124: \"$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
@@ -2143,19 +2154,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2147: checking for LC_MESSAGES" >&5
+echo "configure:2158: 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 <<EOF
-#line 2152 "configure"
+#line 2163 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2170: \"$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
@@ -2176,7 +2187,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2180: checking whether NLS is requested" >&5
+echo "configure:2191: 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"
@@ -2196,7 +2207,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2200: checking whether included gettext is requested" >&5
+echo "configure:2211: 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"
@@ -2215,17 +2226,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2219: checking for libintl.h" >&5
+echo "configure:2230: 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
-#line 2224 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2240: \"$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*
@@ -2242,19 +2253,19 @@
 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:2246: checking for gettext in libc" >&5
+echo "configure:2257: 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 <<EOF
-#line 2251 "configure"
+#line 2262 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2269: \"$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
@@ -2270,7 +2281,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2274: checking for bindtextdomain in -lintl" >&5
+echo "configure:2285: 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
@@ -2278,7 +2289,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2282 "configure"
+#line 2293 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2289,7 +2300,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$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
@@ -2305,19 +2316,19 @@
 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:2309: checking for gettext in libintl" >&5
+echo "configure:2320: 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 <<EOF
-#line 2314 "configure"
+#line 2325 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2332: \"$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
@@ -2345,7 +2356,7 @@
 	      # 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:2349: checking for $ac_word" >&5
+echo "configure:2360: 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
@@ -2379,12 +2390,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2383: checking for $ac_func" >&5
+echo "configure:2394: 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 <<EOF
-#line 2388 "configure"
+#line 2399 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2407,7 +2418,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2422: \"$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
@@ -2434,7 +2445,7 @@
 		# 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:2438: checking for $ac_word" >&5
+echo "configure:2449: 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
@@ -2470,7 +2481,7 @@
 		# 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:2474: checking for $ac_word" >&5
+echo "configure:2485: 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
@@ -2502,7 +2513,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2506 "configure"
+#line 2517 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2510,7 +2521,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2542,7 +2553,7 @@
         # 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:2546: checking for $ac_word" >&5
+echo "configure:2557: 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
@@ -2576,7 +2587,7 @@
         # 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:2580: checking for $ac_word" >&5
+echo "configure:2591: 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
@@ -2612,7 +2623,7 @@
         # 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:2616: checking for $ac_word" >&5
+echo "configure:2627: 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
@@ -2702,7 +2713,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2706: checking for catalogs to be installed" >&5
+echo "configure:2717: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2730,17 +2741,17 @@
       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:2734: checking for linux/version.h" >&5
+echo "configure:2745: 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
-#line 2739 "configure"
+#line 2750 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2755: \"$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*
@@ -2801,6 +2812,11 @@
 	 < $srcdir/po/POTFILES.in > po/POTFILES
    fi
   
+cat >> confdefs.h <<\EOF
+#define PACKAGE "gdb"
+EOF
+
+
 
 
 CONFIG_OBS=
@@ -2814,6 +2830,7 @@
 CONFIG_INSTALL=
 CONFIG_UNINSTALL=
 
+SUBDIRS="doc testsuite nlm"
 configdirs="doc testsuite"
 
 # Check whether --enable-multi-ice or --disable-multi-ice was given.
@@ -2863,7 +2880,7 @@
 # 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:2867: checking for $ac_word" >&5
+echo "configure:2884: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2904,7 +2921,7 @@
 # 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:2908: checking for a BSD compatible install" >&5
+echo "configure:2925: 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
@@ -2965,7 +2982,7 @@
 # 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:2969: checking for $ac_word" >&5
+echo "configure:2986: 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
@@ -2997,7 +3014,7 @@
 # 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:3001: checking for $ac_word" >&5
+echo "configure:3018: 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
@@ -3029,7 +3046,7 @@
   # 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:3033: checking for $ac_word" >&5
+echo "configure:3050: 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
@@ -3064,7 +3081,7 @@
 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3068: checking for $ac_word" >&5
+echo "configure:3085: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3096,7 +3113,7 @@
 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ac_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3100: checking for $ac_word" >&5
+echo "configure:3117: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3130,7 +3147,7 @@
 # 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:3134: checking for $ac_word" >&5
+echo "configure:3151: 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
@@ -3164,7 +3181,7 @@
 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mig; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3168: checking for $ac_word" >&5
+echo "configure:3185: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3215,12 +3232,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3219: checking return type of signal handlers" >&5
+echo "configure:3236: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3224 "configure"
+#line 3241 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3237,7 +3254,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3257,12 +3274,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3261: checking for ANSI C header files" >&5
+echo "configure:3278: 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 <<EOF
-#line 3266 "configure"
+#line 3283 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3270,7 +3287,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3291: \"$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*
@@ -3287,7 +3304,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3291 "configure"
+#line 3308 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3305,7 +3322,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3309 "configure"
+#line 3326 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3326,7 +3343,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3330 "configure"
+#line 3347 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3337,7 +3354,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3371,7 +3388,7 @@
 
 for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
 	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
-	string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
+	string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
 	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
 	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
 	time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
@@ -3381,17 +3398,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3385: checking for $ac_hdr" >&5
+echo "configure:3402: 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
-#line 3390 "configure"
+#line 3407 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3412: \"$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*
@@ -3418,12 +3435,12 @@
 done
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3422: checking whether stat file-mode macros are broken" >&5
+echo "configure:3439: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3427 "configure"
+#line 3444 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3475,12 +3492,12 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3479: checking for working const" >&5
+echo "configure:3496: 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 <<EOF
-#line 3484 "configure"
+#line 3501 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3529,7 +3546,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3550,21 +3567,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3554: checking for inline" >&5
+echo "configure:3571: 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 <<EOF
-#line 3561 "configure"
+#line 3578 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -3594,12 +3611,12 @@
 	realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3598: checking for $ac_func" >&5
+echo "configure:3615: 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 <<EOF
-#line 3603 "configure"
+#line 3620 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3622,7 +3639,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3643: \"$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
@@ -3649,19 +3666,19 @@
 # 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:3653: checking for working alloca.h" >&5
+echo "configure:3670: 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 <<EOF
-#line 3658 "configure"
+#line 3675 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3682: \"$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
@@ -3682,12 +3699,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3686: checking for alloca" >&5
+echo "configure:3703: 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 <<EOF
-#line 3691 "configure"
+#line 3708 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -3715,7 +3732,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3736: \"$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
@@ -3747,12 +3764,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3751: checking whether alloca needs Cray hooks" >&5
+echo "configure:3768: 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 <<EOF
-#line 3756 "configure"
+#line 3773 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -3777,12 +3794,12 @@
 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:3781: checking for $ac_func" >&5
+echo "configure:3798: 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 <<EOF
-#line 3786 "configure"
+#line 3803 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3805,7 +3822,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3826: \"$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
@@ -3832,7 +3849,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3836: checking stack direction for C alloca" >&5
+echo "configure:3853: 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
@@ -3840,7 +3857,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 3844 "configure"
+#line 3861 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -3859,7 +3876,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3880: \"$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
@@ -3881,12 +3898,12 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3885: checking for pid_t" >&5
+echo "configure:3902: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3890 "configure"
+#line 3907 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3915,17 +3932,17 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3919: checking for vfork.h" >&5
+echo "configure:3936: checking for vfork.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
-#line 3924 "configure"
+#line 3941 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3946: \"$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*
@@ -3950,18 +3967,18 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3954: checking for working vfork" >&5
+echo "configure:3971: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3960: checking for vfork" >&5
+echo "configure:3977: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3965 "configure"
+#line 3982 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -3984,7 +4001,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -4006,7 +4023,7 @@
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 4010 "configure"
+#line 4027 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -4101,7 +4118,7 @@
   }
 }
 EOF
-if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -4125,7 +4142,7 @@
 
 if test "$cross_compiling" = no; then
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4129: checking whether setpgrp takes no argument" >&5
+echo "configure:4146: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4133,7 +4150,7 @@
   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4137 "configure"
+#line 4154 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4153,7 +4170,7 @@
 }
 
 EOF
-if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setpgrp_void=no
 else
@@ -4178,12 +4195,12 @@
 
 else
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:4182: checking whether setpgrp takes no argument" >&5
+echo "configure:4199: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4187 "configure"
+#line 4204 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -4197,7 +4214,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_func_setpgrp_void=no
 else
@@ -4221,12 +4238,12 @@
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:4225: checking for sigsetjmp" >&5
+echo "configure:4242: checking for sigsetjmp" >&5
 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4230 "configure"
+#line 4247 "configure"
 #include "confdefs.h"
 
 #include <setjmp.h>
@@ -4235,7 +4252,7 @@
 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
 ; return 0; }
 EOF
-if { (eval echo configure:4239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_func_sigsetjmp=yes
 else
@@ -4258,19 +4275,19 @@
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:4262: checking for r_fs in struct reg" >&5
+echo "configure:4279: checking for r_fs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4267 "configure"
+#line 4284 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_fs;
 ; return 0; }
 EOF
-if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_fs=yes
 else
@@ -4290,19 +4307,19 @@
 
 fi
 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:4294: checking for r_gs in struct reg" >&5
+echo "configure:4311: checking for r_gs in struct reg" >&5
 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4299 "configure"
+#line 4316 "configure"
 #include "confdefs.h"
 #include <machine/reg.h>
 int main() {
 struct reg r; r.r_gs;
 ; return 0; }
 EOF
-if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_struct_reg_r_gs=yes
 else
@@ -4324,19 +4341,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:4328: checking for PTRACE_GETREGS" >&5
+echo "configure:4345: checking for PTRACE_GETREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4350 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getregs=yes
 else
@@ -4358,19 +4375,19 @@
 
 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:4362: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:4379: checking for PTRACE_GETFPXREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4367 "configure"
+#line 4384 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETFPXREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_ptrace_getfpxregs=yes
 else
@@ -4392,12 +4409,12 @@
 
 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:4396: checking for PT_GETDBREGS" >&5
+echo "configure:4413: checking for PT_GETDBREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4401 "configure"
+#line 4418 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -4405,7 +4422,7 @@
 PT_GETDBREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_pt_getdbregs=yes
 else
@@ -4427,12 +4444,12 @@
 
 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:4431: checking for PT_GETXMMREGS" >&5
+echo "configure:4448: checking for PT_GETXMMREGS" >&5
 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4436 "configure"
+#line 4453 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ptrace.h>
@@ -4440,7 +4457,7 @@
 PT_GETXMMREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:4444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_pt_getxmmregs=yes
 else
@@ -4462,7 +4479,7 @@
 
 
 echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
-echo "configure:4466: checking for socketpair in -lsocket" >&5
+echo "configure:4483: checking for socketpair in -lsocket" >&5
 ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4470,7 +4487,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4474 "configure"
+#line 4491 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4481,7 +4498,7 @@
 socketpair()
 ; return 0; }
 EOF
-if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4502: \"$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
@@ -4511,12 +4528,12 @@
 for ac_func in socketpair
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4515: checking for $ac_func" >&5
+echo "configure:4532: 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 <<EOF
-#line 4520 "configure"
+#line 4537 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4539,7 +4556,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4560: \"$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
@@ -4566,12 +4583,12 @@
 
 
 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4570: checking whether malloc must be declared" >&5
+echo "configure:4587: 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 <<EOF
-#line 4575 "configure"
+#line 4592 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4592,7 +4609,7 @@
 char *(*pfn) = (char *(*)) malloc
 ; return 0; }
 EOF
-if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_malloc=no
 else
@@ -4613,12 +4630,12 @@
 fi
 
 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4617: checking whether realloc must be declared" >&5
+echo "configure:4634: 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 <<EOF
-#line 4622 "configure"
+#line 4639 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4639,7 +4656,7 @@
 char *(*pfn) = (char *(*)) realloc
 ; return 0; }
 EOF
-if { (eval echo configure:4643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_realloc=no
 else
@@ -4660,12 +4677,12 @@
 fi
 
 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4664: checking whether free must be declared" >&5
+echo "configure:4681: 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 <<EOF
-#line 4669 "configure"
+#line 4686 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4686,7 +4703,7 @@
 char *(*pfn) = (char *(*)) free
 ; return 0; }
 EOF
-if { (eval echo configure:4690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_free=no
 else
@@ -4707,12 +4724,12 @@
 fi
 
 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:4711: checking whether strerror must be declared" >&5
+echo "configure:4728: checking whether strerror must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4716 "configure"
+#line 4733 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4733,7 +4750,7 @@
 char *(*pfn) = (char *(*)) strerror
 ; return 0; }
 EOF
-if { (eval echo configure:4737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strerror=no
 else
@@ -4754,12 +4771,12 @@
 fi
 
 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:4758: checking whether strdup must be declared" >&5
+echo "configure:4775: checking whether strdup must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4763 "configure"
+#line 4780 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4780,7 +4797,7 @@
 char *(*pfn) = (char *(*)) strdup
 ; return 0; }
 EOF
-if { (eval echo configure:4784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strdup=no
 else
@@ -4801,12 +4818,12 @@
 fi
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4805: checking whether strstr must be declared" >&5
+echo "configure:4822: 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 <<EOF
-#line 4810 "configure"
+#line 4827 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4827,7 +4844,7 @@
 char *(*pfn) = (char *(*)) strstr
 ; return 0; }
 EOF
-if { (eval echo configure:4831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
 else
@@ -4848,12 +4865,12 @@
 fi
 
 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:4852: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:4869: checking whether canonicalize_file_name must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4857 "configure"
+#line 4874 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4874,7 +4891,7 @@
 char *(*pfn) = (char *(*)) canonicalize_file_name
 ; return 0; }
 EOF
-if { (eval echo configure:4878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_canonicalize_file_name=no
 else
@@ -4900,9 +4917,9 @@
 # could be expunged. --jsm 1999-03-22
 
 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:4904: checking for HPUX save_state structure" >&5
+echo "configure:4921: checking for HPUX save_state structure" >&5
 cat > conftest.$ac_ext <<EOF
-#line 4906 "configure"
+#line 4923 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -4917,7 +4934,7 @@
 rm -f conftest*
 
 cat > conftest.$ac_ext <<EOF
-#line 4921 "configure"
+#line 4938 "configure"
 #include "confdefs.h"
 #include <machine/save_state.h>
 EOF
@@ -4987,12 +5004,12 @@
 
 if test "$ac_cv_header_sys_procfs_h" = yes; then
   echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:4991: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5008: 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 <<EOF
-#line 4996 "configure"
+#line 5013 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5001,7 +5018,7 @@
 pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
@@ -5023,12 +5040,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
 
   echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5027: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:5044: checking for prrun_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5032 "configure"
+#line 5049 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5037,7 +5054,7 @@
 prrun_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prrun_t=yes
 else
@@ -5059,12 +5076,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
 
   echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5063: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:5080: checking for gregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5068 "configure"
+#line 5085 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5073,7 +5090,7 @@
 gregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_gregset_t=yes
 else
@@ -5095,12 +5112,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
 
   echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5099: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:5116: checking for fpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5104 "configure"
+#line 5121 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5109,7 +5126,7 @@
 fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_fpregset_t=yes
 else
@@ -5131,12 +5148,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5135: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:5152: checking for prgregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5140 "configure"
+#line 5157 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5145,7 +5162,7 @@
 prgregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset_t=yes
 else
@@ -5167,12 +5184,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
 
   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5171: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:5188: checking for prfpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5176 "configure"
+#line 5193 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5181,7 +5198,7 @@
 prfpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
 else
@@ -5203,12 +5220,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
 
   echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5207: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:5224: checking for prgregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5212 "configure"
+#line 5229 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5217,7 +5234,7 @@
 prgregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
 else
@@ -5239,12 +5256,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
 
   echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5243: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:5260: checking for prfpregset32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5248 "configure"
+#line 5265 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5253,7 +5270,7 @@
 prfpregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
 else
@@ -5275,12 +5292,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
 
   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5279: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:5296: checking for lwpid_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5284 "configure"
+#line 5301 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5289,7 +5306,7 @@
 lwpid_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpid_t=yes
 else
@@ -5311,12 +5328,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
 
   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5315: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:5332: checking for psaddr_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5320 "configure"
+#line 5337 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5325,7 +5342,7 @@
 psaddr_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psaddr_t=yes
 else
@@ -5347,12 +5364,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
 
   echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5351: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:5368: checking for prsysent_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5356 "configure"
+#line 5373 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5361,7 +5378,7 @@
 prsysent_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prsysent_t=yes
 else
@@ -5383,12 +5400,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
 
   echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5387: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:5404: checking for pr_sigset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5392 "configure"
+#line 5409 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5397,7 +5414,7 @@
 pr_sigset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
 else
@@ -5419,12 +5436,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
 
   echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5423: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:5440: checking for pr_sigaction64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5428 "configure"
+#line 5445 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5433,7 +5450,7 @@
 pr_sigaction64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
 else
@@ -5455,12 +5472,12 @@
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
 
   echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5459: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:5476: checking for pr_siginfo64_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5464 "configure"
+#line 5481 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -5469,7 +5486,7 @@
 pr_siginfo64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
 else
@@ -5496,7 +5513,7 @@
         
   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:5500: checking whether prfpregset_t type is broken" >&5
+echo "configure:5517: checking whether prfpregset_t type is broken" >&5
     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5504,7 +5521,7 @@
   gdb_cv_prfpregset_t_broken=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 5508 "configure"
+#line 5525 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
        int main ()
@@ -5514,7 +5531,7 @@
          return 0;
        }
 EOF
-if { (eval echo configure:5518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_prfpregset_t_broken=no
 else
@@ -5539,12 +5556,12 @@
 
   
   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5543: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:5560: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5548 "configure"
+#line 5565 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 #include <sys/types.h>
@@ -5557,7 +5574,7 @@
   
 ; return 0; }
 EOF
-if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_procfs_piocset=yes
 else
@@ -5581,19 +5598,19 @@
 if test ${host} = ${target} ; then
     
   echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5585: checking for member l_addr in struct link_map" >&5
+echo "configure:5602: checking for member l_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5590 "configure"
+#line 5607 "configure"
 #include "confdefs.h"
 #include <link.h>
 int main() {
 struct link_map lm; (void) lm.l_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_l_members=yes
 else
@@ -5615,12 +5632,12 @@
 
     
   echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:5619: checking for member lm_addr in struct link_map" >&5
+echo "configure:5636: checking for member lm_addr in struct link_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5624 "configure"
+#line 5641 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <link.h>
@@ -5628,7 +5645,7 @@
 struct link_map lm; (void) lm.lm_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map_with_lm_members=yes
 else
@@ -5650,12 +5667,12 @@
 
     
   echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:5654: checking for member som_addr in struct so_map" >&5
+echo "configure:5671: checking for member som_addr in struct so_map" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5659 "configure"
+#line 5676 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_NLIST_H
@@ -5666,7 +5683,7 @@
 struct so_map lm; (void) lm.som_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_so_map_with_som_members=yes
 else
@@ -5688,12 +5705,12 @@
 
     
   echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:5692: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:5709: checking for struct link_map32 in sys/link.h" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5697 "configure"
+#line 5714 "configure"
 #include "confdefs.h"
 #define _SYSCALL32
 #include <sys/link.h>
@@ -5701,7 +5718,7 @@
 struct link_map32 l;
 ; return 0; }
 EOF
-if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_struct_link_map32=yes
 else
@@ -5727,7 +5744,7 @@
 fi
 
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5731: checking for main in -lm" >&5
+echo "configure:5748: 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
@@ -5735,14 +5752,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5739 "configure"
+#line 5756 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5763: \"$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
@@ -5771,7 +5788,7 @@
 
 
 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
-echo "configure:5775: checking for wctype in -lc" >&5
+echo "configure:5792: checking for wctype in -lc" >&5
 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5779,7 +5796,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5783 "configure"
+#line 5800 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5790,7 +5807,7 @@
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5811: \"$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
@@ -5809,7 +5826,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:5813: checking for wctype in -lw" >&5
+echo "configure:5830: checking for wctype in -lw" >&5
 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5817,7 +5834,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5821 "configure"
+#line 5838 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5828,7 +5845,7 @@
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5849: \"$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
@@ -5860,12 +5877,12 @@
 
 
 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:5864: checking for long long support in compiler" >&5
+echo "configure:5881: checking for long long support in compiler" >&5
 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5869 "configure"
+#line 5886 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5875,7 +5892,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_c_long_long=yes
 else
@@ -5897,7 +5914,7 @@
 
 
 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:5901: checking for long long support in printf" >&5
+echo "configure:5918: checking for long long support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5905,7 +5922,7 @@
   gdb_cv_printf_has_long_long=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5909 "configure"
+#line 5926 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -5919,7 +5936,7 @@
   return (strcmp ("0x0123456789abcdef", buf));
 }
 EOF
-if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_long=yes
 else
@@ -5943,19 +5960,19 @@
 
 
 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:5947: checking for long double support in compiler" >&5
+echo "configure:5964: checking for long double support in compiler" >&5
 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5952 "configure"
+#line 5969 "configure"
 #include "confdefs.h"
 
 int main() {
 long double foo;
 ; return 0; }
 EOF
-if { (eval echo configure:5959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_long_double=yes
 else
@@ -5977,7 +5994,7 @@
 
 
 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:5981: checking for long double support in printf" >&5
+echo "configure:5998: checking for long double support in printf" >&5
 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5985,7 +6002,7 @@
   gdb_cv_printf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5989 "configure"
+#line 6006 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -5995,7 +6012,7 @@
   return (strncmp ("3.14159", buf, 7));
 }
 EOF
-if { (eval echo configure:5999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_printf_has_long_double=yes
 else
@@ -6019,7 +6036,7 @@
 
 
 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:6023: checking for long double support in scanf" >&5
+echo "configure:6040: checking for long double support in scanf" >&5
 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6027,7 +6044,7 @@
   gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6031 "configure"
+#line 6048 "configure"
 #include "confdefs.h"
 
 int main () {
@@ -6037,7 +6054,7 @@
   return !(f > 3.14159 && f < 3.14160);
 }
 EOF
-if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_scanf_has_long_double=yes
 else
@@ -6063,17 +6080,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6067: checking for $ac_hdr" >&5
+echo "configure:6084: 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
-#line 6072 "configure"
+#line 6089 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6094: \"$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*
@@ -6102,12 +6119,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6106: checking for $ac_func" >&5
+echo "configure:6123: 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 <<EOF
-#line 6111 "configure"
+#line 6128 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6130,7 +6147,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6151: \"$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
@@ -6155,7 +6172,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6159: checking for working mmap" >&5
+echo "configure:6176: 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
@@ -6163,7 +6180,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6167 "configure"
+#line 6184 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6303,7 +6320,7 @@
 }
 
 EOF
-if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6324: \"$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
@@ -6329,7 +6346,7 @@
 case ${host_os} in
 aix*)
   echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:6333: checking for -bbigtoc option" >&5
+echo "configure:6350: checking for -bbigtoc option" >&5
 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6343,14 +6360,14 @@
 
     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
     cat > conftest.$ac_ext <<EOF
-#line 6347 "configure"
+#line 6364 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:6354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   :
 else
   echo "configure: failed program was:" >&5
@@ -6373,7 +6390,7 @@
    case ${host_os} in
    hpux*)
       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:6377: checking for HPUX/OSF thread support" >&5
+echo "configure:6394: checking for HPUX/OSF thread support" >&5
       if test -f /usr/include/dce/cma_config.h ; then
          if test "$GCC" = "yes" ; then
             echo "$ac_t""yes" 1>&6
@@ -6392,7 +6409,7 @@
       ;;
    solaris*)
       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:6396: checking for Solaris thread debugging library" >&5
+echo "configure:6413: checking for Solaris thread debugging library" >&5
       if test -f /usr/lib/libthread_db.so.1 ; then
          echo "$ac_t""yes" 1>&6
          cat >> confdefs.h <<\EOF
@@ -6402,7 +6419,7 @@
          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:6406: checking for dlopen in -ldl" >&5
+echo "configure:6423: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6410,7 +6427,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6414 "configure"
+#line 6431 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6421,7 +6438,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6442: \"$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
@@ -6453,17 +6470,17 @@
             # all symbols visible in the dynamic symbol table.
             hold_ldflags=$LDFLAGS
             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:6457: checking for the ld -export-dynamic flag" >&5
+echo "configure:6474: checking for the ld -export-dynamic flag" >&5
             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
             cat > conftest.$ac_ext <<EOF
-#line 6460 "configure"
+#line 6477 "configure"
 #include "confdefs.h"
 
 int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   found=yes
 else
@@ -6482,13 +6499,13 @@
 	 # Sun randomly tweaked the prototypes in <proc_service.h>
 	 # at one point.
 	 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:6486: checking if <proc_service.h> is old" >&5
+echo "configure:6503: checking if <proc_service.h> is old" >&5
 	 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	    cat > conftest.$ac_ext <<EOF
-#line 6492 "configure"
+#line 6509 "configure"
 #include "confdefs.h"
 
 		#include <proc_service.h>
@@ -6499,7 +6516,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_proc_service_is_old=no
 else
@@ -6718,7 +6735,7 @@
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:6722: checking compiler warning flags" >&5
+echo "configure:6739: checking compiler warning flags" >&5
     # Separate out the -Werror flag as some files just cannot be
     # compiled with it enabled.
     for w in ${build_warnings}; do
@@ -6728,14 +6745,14 @@
 	    saved_CFLAGS="$CFLAGS"
 	    CFLAGS="$CFLAGS $w"
 	    cat > conftest.$ac_ext <<EOF
-#line 6732 "configure"
+#line 6749 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
@@ -6795,12 +6812,12 @@
 
 if test $want_included_regex = false; then
   echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6799: checking for GNU regex" >&5
+echo "configure:6816: checking for GNU regex" >&5
   if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6804 "configure"
+#line 6821 "configure"
 #include "confdefs.h"
 #include <gnu-versions.h>
 #include <sys/types.h>
@@ -6812,7 +6829,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_have_gnu_regex=yes
 else
@@ -6841,12 +6858,12 @@
 
 # In the Cygwin environment, we need some additional flags.
 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6845: checking for cygwin" >&5
+echo "configure:6862: checking for cygwin" >&5
 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6850 "configure"
+#line 6867 "configure"
 #include "confdefs.h"
 
 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6884,7 +6901,7 @@
 else
   TERM_LIB=
   echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6888: checking for tgetent in -lncurses" >&5
+echo "configure:6905: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6892,7 +6909,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6896 "configure"
+#line 6913 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6903,7 +6920,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6924: \"$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
@@ -6922,7 +6939,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6926: checking for tgetent in -lHcurses" >&5
+echo "configure:6943: checking for tgetent in -lHcurses" >&5
 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6930,7 +6947,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6934 "configure"
+#line 6951 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6941,7 +6958,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6962: \"$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
@@ -6960,7 +6977,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6964: checking for tgetent in -ltermlib" >&5
+echo "configure:6981: checking for tgetent in -ltermlib" >&5
 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6968,7 +6985,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6972 "configure"
+#line 6989 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6979,7 +6996,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:6983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7000: \"$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
@@ -6998,7 +7015,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7002: checking for tgetent in -ltermcap" >&5
+echo "configure:7019: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7006,7 +7023,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7010 "configure"
+#line 7027 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7017,7 +7034,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7038: \"$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
@@ -7036,7 +7053,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7040: checking for tgetent in -lcurses" >&5
+echo "configure:7057: checking for tgetent in -lcurses" >&5
 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7044,7 +7061,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7048 "configure"
+#line 7065 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7055,7 +7072,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7076: \"$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
@@ -7074,7 +7091,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7078: checking for tgetent in -lterminfo" >&5
+echo "configure:7095: checking for tgetent in -lterminfo" >&5
 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7082,7 +7099,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lterminfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7086 "configure"
+#line 7103 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7093,7 +7110,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7114: \"$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
@@ -7258,7 +7275,7 @@
 fi
 
   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7262: checking for Tcl configuration" >&5
+echo "configure:7279: checking for Tcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7366,7 +7383,7 @@
 fi
 
   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7370: checking for Tk configuration" >&5
+echo "configure:7387: checking for Tk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7475,7 +7492,7 @@
 
 no_tcl=true
 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7479: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7496: checking for Tcl private headers. dir=${configdir}" >&5
 # Check whether --with-tclinclude or --without-tclinclude was given.
 if test "${with_tclinclude+set}" = set; then
   withval="$with_tclinclude"
@@ -7541,17 +7558,17 @@
 if test x"${ac_cv_c_tclh}" = x ; then
    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:7545: checking for tclInt.h" >&5
+echo "configure:7562: checking for tclInt.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
-#line 7550 "configure"
+#line 7567 "configure"
 #include "confdefs.h"
 #include <tclInt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7572: \"$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*
@@ -7611,7 +7628,7 @@
 #
 no_tk=true
 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7615: checking for Tk private headers" >&5
+echo "configure:7632: checking for Tk private headers" >&5
 # Check whether --with-tkinclude or --without-tkinclude was given.
 if test "${with_tkinclude+set}" = set; then
   withval="$with_tkinclude"
@@ -7677,17 +7694,17 @@
 if test x"${ac_cv_c_tkh}" = x ; then
    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:7681: checking for tk.h" >&5
+echo "configure:7698: checking for tk.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
-#line 7686 "configure"
+#line 7703 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7708: \"$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*
@@ -7733,7 +7750,7 @@
 
 	   
 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7737: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7754: checking for Itcl private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
     if test -f $i/generic/itcl.h ; then
@@ -7756,7 +7773,7 @@
 
 	   
 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7760: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7777: checking for Itk private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itkh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
     if test -f $i/generic/itk.h ; then
@@ -7779,7 +7796,7 @@
 
 	   
 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7783: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7800: checking for Tix private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_tixh}" = x ; then
   for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
     if test -f $i/generic/tix.h ; then
@@ -7831,7 +7848,7 @@
 fi
 
   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7835: checking for Itcl configuration" >&5
+echo "configure:7852: checking for Itcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7934,7 +7951,7 @@
 fi
 
   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7938: checking for Itk configuration" >&5
+echo "configure:7955: checking for Itk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8037,7 +8054,7 @@
 fi
 
   echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:8041: checking for Tix configuration" >&5
+echo "configure:8058: checking for Tix configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8158,6 +8175,9 @@
 	   fi
 	fi
     fi
+
+    SUBDIRS="${SUBDIRS} gdbtk"
+    configdirs="${configdirs} gdbtk"
 fi
 
 
@@ -8180,7 +8200,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:8184: checking for X" >&5
+echo "configure:8204: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -8242,12 +8262,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 8246 "configure"
+#line 8266 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8271: \"$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*
@@ -8316,14 +8336,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8320 "configure"
+#line 8340 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -8608,7 +8628,6 @@
     *)  { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
 esac
 
-SUBDIRS="doc testsuite nlm"
 if test "${enable_multi_ice}" = "yes"; then
   SUBDIRS="${SUBDIRS} multi-ice"
 fi
@@ -8616,7 +8635,7 @@
 # ``gdbserver'' can only be built in a native configuration.
 if test x"${target}" = x"${host}"; then
     echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8620: checking whether gdbserver is supported on this host" >&5
+echo "configure:8639: checking whether gdbserver is supported on this host" >&5
     if test x"${build_gdbserver}" = xyes ; then
 	configdirs="${configdirs} gdbserver"
 	SUBDIRS="${SUBDIRS} gdbserver"
@@ -8678,7 +8697,7 @@
 
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8682: checking whether ln -s works" >&5
+echo "configure:8701: 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
@@ -8702,12 +8721,12 @@
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8706: checking for Cygwin environment" >&5
+echo "configure:8725: 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 <<EOF
-#line 8711 "configure"
+#line 8730 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -8718,7 +8737,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:8722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -8735,19 +8754,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:8739: checking for mingw32 environment" >&5
+echo "configure:8758: 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 <<EOF
-#line 8744 "configure"
+#line 8763 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:8751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -8766,7 +8785,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8770: checking for executable suffix" >&5
+echo "configure:8789: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8776,10 +8795,10 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:8799: \"$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
@@ -9087,7 +9106,7 @@
 
 # Split the substitutions into bite-sized pieces for seds with
 # small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
 ac_file=1 # Number of current file.
 ac_beg=1 # First line for current file.
 ac_end=$ac_max_sed_cmds # Line after last line for current file.
diff --git a/gdb/configure.host b/gdb/configure.host
index 16f6a52..883538d 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -15,7 +15,7 @@
 hppa*)			gdb_host_cpu=pa ;;
 i[3456]86*)		gdb_host_cpu=i386 ;;
 m68*)			gdb_host_cpu=m68k ;;
-m88*)			gdb_host_cpu=m88k ;;
+# OBSOLETE m88*)			gdb_host_cpu=m88k ;;
 mips*)			gdb_host_cpu=mips ;;
 powerpc*)		gdb_host_cpu=powerpc ;;
 sparcv9 | sparc64)	gdb_host_cpu=sparc ;;
@@ -54,7 +54,7 @@
 i[3456]86-sequent-bsd*)	gdb_host=symmetry ;;  # dynix
 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
-i[3456]86-*-aix*)	gdb_host=i386aix ;;
+# OBSOLETE i[3456]86-*-aix*)	gdb_host=i386aix ;;
 i[3456]86-*-bsd*)	gdb_host=i386bsd ;;
 i[3456]86-*-dgux*)	gdb_host=i386dgux ;;
 i[3456]86-*-freebsd*)	gdb_host=fbsd ;;
@@ -65,11 +65,11 @@
 i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
 i[3456]86-*-linux*)	gdb_host=linux ;;
 i[3456]86-*-lynxos*)	gdb_host=i386lynx ;;
-i[3456]86-*-mach3*)	gdb_host=i386m3 ;;
-i[3456]86-*-mach*)	gdb_host=i386mach ;;
+# OBSOLETE i[3456]86-*-mach3*)	gdb_host=i386m3 ;;
+# OBSOLETE i[3456]86-*-mach*)	gdb_host=i386mach ;;
 i[3456]86-*-gnu*)	gdb_host=i386gnu ;;
 i[3456]86-*-openbsd*)	gdb_host=obsd ;;
-i[3456]86-*-osf1mk*)	gdb_host=i386mk ;;
+# OBSOLETE i[3456]86-*-osf1mk*)	gdb_host=i386mk ;;
 i[3456]86-*-sco3.2v5*)	gdb_host=i386sco5 ;;
 i[3456]86-*-sco3.2v4*)	gdb_host=i386sco4 ;;
 i[3456]86-*-sco*)	gdb_host=i386sco ;;
@@ -91,12 +91,12 @@
 m680[01]0-sun-sunos3*)	gdb_host=sun2os3 ;;
 m680[01]0-sun-sunos4*)	gdb_host=sun2os4 ;;
 
-m68*-apollo*-sysv*)	gdb_host=apollo68v ;;
-m68*-apollo*-bsd*)	gdb_host=apollo68b ;;
+# OBSOLETE m68*-apollo*-sysv*)	gdb_host=apollo68v ;;
+# OBSOLETE m68*-apollo*-bsd*)	gdb_host=apollo68b ;;
 m68*-att-*)		gdb_host=3b1 ;;
 m68*-bull*-sysv*)	gdb_host=dpx2 ;;
-m68*-hp-bsd*)		gdb_host=hp300bsd ;;
-m68*-hp-hpux*)		gdb_host=hp300hpux ;;
+# OBSOLETE m68*-hp-bsd*)		gdb_host=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*)		gdb_host=hp300hpux ;;
 m68*-*-linux*)		gdb_host=linux ;;
 m68*-*-lynxos*)		gdb_host=m68klynx ;;
 m68*-*-netbsd*)		gdb_host=nbsdaout ;;
@@ -106,9 +106,9 @@
 m68*-sun-sunos4*)	gdb_host=sun3os4 ;;
 m68*-sun-*)		gdb_host=sun3os4 ;;
 
-m88*-motorola-sysv4*)	gdb_host=delta88v4 ;;
-m88*-motorola-sysv*)	gdb_host=delta88 ;;
-m88*-*-*)		gdb_host=m88k ;;
+# OBSOLETE m88*-motorola-sysv4*)	gdb_host=delta88v4 ;;
+# OBSOLETE m88*-motorola-sysv*)	gdb_host=delta88 ;;
+# OBSOLETE m88*-*-*)		gdb_host=m88k ;;
 
 mips-dec-mach3*)	gdb_host=mipsm3 ;;
 mips-dec-*)		gdb_host=decstation ;;
@@ -129,7 +129,10 @@
 
 ns32k-*-netbsd*)	gdb_host=nbsdaout ;;
 
-powerpc-*-aix*)		gdb_host=aix ;;
+powerpc-*-aix3*)	gdb_host=aix ;;
+powerpc-*-aix4.[0-2]*)	gdb_host=aix ;;
+powerpc-*-aix4.3.[0-1]*)	gdb_host=aix ;;
+powerpc-*-aix*)		gdb_host=aix432 ;;
 powerpc-*-linux*)	gdb_host=linux ;;
 powerpc-*-netbsd*)	gdb_host=nbsd ;;
 
@@ -153,6 +156,7 @@
 sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
 			gdb_host=fbsd ;;
 sparc64-*-linux*)	gdb_host=linux ;;
+sparc64-*-netbsd*)	gdb_host=nbsd64 ;;
 sparcv9-*-* | sparc64-*-*) gdb_host=sun4sol2 ;;
 
 strongarm-*-*)		gdb_host=arm ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 8d30459..edc72c3 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -33,10 +33,11 @@
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
 AC_CANONICAL_SYSTEM
 
-dnl gdb doesn't use gettext, but bfd does.  We call this to ensure we
-dnl link with the correct libraries.
+dnl Set up for gettext.  PACKAGE is used when we call bindtextdomain.
 ALL_LINGUAS=
 CY_GNU_GETTEXT
+AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+
 
 dnl List of object files added by configure.
 
@@ -51,6 +52,7 @@
 CONFIG_INSTALL=
 CONFIG_UNINSTALL=
 
+SUBDIRS="doc testsuite nlm"
 configdirs="doc testsuite"
 
 AC_ARG_ENABLE(multi-ice,
@@ -120,7 +122,7 @@
 
 AC_CHECK_HEADERS(ctype.h nlist.h link.h thread_db.h proc_service.h \
 	memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
-	string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
+	string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
 	term.h termio.h termios.h unistd.h wait.h sys/wait.h \
 	wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
 	time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
@@ -1086,6 +1088,9 @@
 	   fi
 	fi
     fi
+
+    SUBDIRS="${SUBDIRS} gdbtk"
+    configdirs="${configdirs} gdbtk"
 fi
 
 AC_SUBST(X_CFLAGS)
@@ -1292,7 +1297,6 @@
     *)  AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
 esac
 
-SUBDIRS="doc testsuite nlm"
 if test "${enable_multi_ice}" = "yes"; then
   SUBDIRS="${SUBDIRS} multi-ice"
 fi
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 8861967..385dbd0 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -19,7 +19,7 @@
 i[3456]86*)		gdb_target_cpu=i386 ;;
 m68hc11*|m6811*)	gdb_target_cpu=m68hc11 ;;
 m68*)			gdb_target_cpu=m68k ;;
-m88*)			gdb_target_cpu=m88k ;;
+# OBSOLETE m88*)			gdb_target_cpu=m88k ;;
 mips*)			gdb_target_cpu=mips ;;
 powerpc*)		gdb_target_cpu=powerpc ;;
 sparc*)			gdb_target_cpu=sparc ;;
@@ -42,8 +42,9 @@
 alpha*-*-linux*)	gdb_target=alpha-linux ;;
 alpha*-*-freebsd*)	gdb_target=fbsd ;;
 alpha*-*-netbsd*)	gdb_target=nbsd ;;
+alpha*-*-*)		gdb_target=alpha ;;
 
-arc-*-*)		gdb_target=arc ;;
+# OBSOLETE arc-*-*)		gdb_target=arc ;;
 
 arm*-wince-pe)		gdb_target=wince ;;
 arm*-*-linux*)		gdb_target=linux
@@ -66,14 +67,15 @@
 cris*)                  gdb_target=cris ;;
 
 d10v-*-*)		gdb_target=d10v ;;
-d30v-*-*)		gdb_target=d30v ;;
+# OBSOLETE d30v-*-*)		gdb_target=d30v ;;
 
 h8300-*-*)		gdb_target=h8300 ;;
 h8500-*-*)		gdb_target=h8500 ;;
 
 
-fr30-*-elf*)		gdb_target=fr30 ;;
+# OBSOLETE fr30-*-elf*)		gdb_target=fr30 ;;
 
+frv-*-*)		gdb_target=frv ;;
 
 hppa*-*-bsd*)		gdb_target=hppabsd ;;
 hppa*-*-pro*)		gdb_target=hppapro ;;
@@ -81,24 +83,22 @@
 hppa*-*-hpux*)		gdb_target=hppahpux ;;
 hppa*-*-hiux*)		gdb_target=hppahpux ;;
 hppa*-*-osf*)		gdb_target=hppaosf ;;
+hppa*-*-*)		gdb_target=hppa ;;
 
 i[3456]86-sequent-bsd*)	gdb_target=symmetry ;;
 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
 i[3456]86-ncr-*)	gdb_target=ncr3000 ;;
-i[3456]86-*-aout*)	gdb_target=embed ;;
-i[3456]86-*-coff*)	gdb_target=embed ;;
-i[3456]86-*-elf*)	gdb_target=embed ;;
-i[3456]86-*-aix*)	gdb_target=i386aix ;;
+# OBSOLETE i[3456]86-*-aix*)	gdb_target=i386aix ;;
 i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
 i[3456]86-*-freebsd*)	gdb_target=fbsd ;;
 i[3456]86-*-netbsdelf*)	gdb_target=nbsdelf ;;
-i[3456]86-*-netbsd*)	gdb_target=nbsdaout ;;
-i[3456]86-*-os9k)	gdb_target=i386os9k ;;
+i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
+			gdb_target=nbsdaout ;;
+# OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
 i[3456]86-*-go32*)	gdb_target=i386aout ;;
 i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
 i[3456]86-*-lynxos*)	gdb_target=i386lynx ;;
-i[3456]86-*-openbsd*)	gdb_target=obsd ;;
 i[3456]86-*-solaris*)	gdb_target=i386sol2 ;;
 i[3456]86-*-sysv4.2*)	gdb_target=i386v42mp ;;
 i[3456]86-*-sysv4*)	gdb_target=i386v4 ;;
@@ -111,27 +111,28 @@
 			build_gdbserver=yes
 			;;
 i[3456]86-*-isc*)	gdb_target=i386v ;;
-i[3456]86-*-mach3*)	gdb_target=i386m3 ;;
+# OBSOLETE i[3456]86-*-mach3*)	gdb_target=i386m3 ;;
 i[3456]86-*-gnu*)	gdb_target=i386gnu ;;
 i[3456]86-*-netware*)	gdb_target=i386nw
 		configdirs="${configdirs} nlm" ;;
-i[3456]86-*-osf1mk*)	gdb_target=i386mk ;;
+# OBSOLETE i[3456]86-*-osf1mk*)	gdb_target=i386mk ;;
 i[3456]86-*-cygwin*)	gdb_target=cygwin  ;;
-i[3456]86-*-pe*)	gdb_target=embed  ;;
 i[3456]86-*-vxworks*)	gdb_target=vxworks ;;
+i[3456]86-*-*)		gdb_target=embed ;;
 
-i960-*-bout*)		gdb_target=vxworks960 ;;
-i960-nindy-coff*)	gdb_target=nindy960 ;;
-i960-*-coff*)		gdb_target=mon960 ;;
-i960-nindy-elf*)	gdb_target=nindy960 ;;
-i960-*-elf*)		gdb_target=mon960 ;;
-i960-*-nindy*)		gdb_target=nindy960 ;;
-i960-*-vxworks*)	gdb_target=vxworks960 ;;
+# OBSOLETE i960-*-bout*)		gdb_target=vxworks960 ;;
+# OBSOLETE i960-nindy-coff*)	gdb_target=nindy960 ;;
+# OBSOLETE i960-*-coff*)		gdb_target=mon960 ;;
+# OBSOLETE i960-nindy-elf*)	gdb_target=nindy960 ;;
+# OBSOLETE i960-*-elf*)		gdb_target=mon960 ;;
+# OBSOLETE i960-*-nindy*)		gdb_target=nindy960 ;;
+# OBSOLETE i960-*-vxworks*)	gdb_target=vxworks960 ;;
 
 ia64-*-aix*)		gdb_target=aix ;;
 ia64-*-linux*)		gdb_target=linux
 			build_gdbserver=yes
 			;;
+ia64*-*-*)		gdb_target=ia64 ;;
 
 m32r-*-elf*)		gdb_target=m32r ;;
 
@@ -140,10 +141,10 @@
 m68000-*-sunos3*)	gdb_target=sun2os3 ;;
 m68000-*-sunos4*)	gdb_target=sun2os4 ;;
 
-m68*-apollo*-bsd*)	gdb_target=apollo68b ;;
+# OBSOLETE m68*-apollo*-bsd*)	gdb_target=apollo68b ;;
 m68*-bull-sysv*)	gdb_target=dpx2 ;;
-m68*-hp-bsd*)		gdb_target=hp300bsd ;;
-m68*-hp-hpux*)		gdb_target=hp300hpux ;;
+# OBSOLETE m68*-hp-bsd*)		gdb_target=hp300bsd ;;
+# OBSOLETE m68*-hp-hpux*)		gdb_target=hp300hpux ;;
 m68*-att-*)		gdb_target=3b1 ;;
 m68*-cisco*-*)		gdb_target=cisco ;;
 m68*-ericsson-*)	gdb_target=es1800 ;;
@@ -164,9 +165,9 @@
 m68*-*-sysv4*)		gdb_target=m68kv4 ;;
 m68*-*-vxworks*)	gdb_target=vxworks68 ;;
 
-m88*-motorola-sysv4*)	gdb_target=delta88v4 ;;
-m88*-motorola-*)	gdb_target=delta88 ;;
-m88*-*-*)		gdb_target=m88k ;;
+# OBSOLETE m88*-motorola-sysv4*)	gdb_target=delta88v4 ;;
+# OBSOLETE m88*-motorola-*)	gdb_target=delta88 ;;
+# OBSOLETE m88*-*-*)		gdb_target=m88k ;;
 
 mcore*-*-*)		gdb_target=mcore ;;
 mips64*-big-*)		gdb_target=bigmips64 ;;
@@ -207,6 +208,7 @@
 mips*-*-sysv*)		gdb_target=bigmips ;;
 mips*-*-riscos*)	gdb_target=bigmips ;;
 mips*-*-vxworks*)       gdb_target=vxmips ;;
+mips*-*-*)		gdb_target=embed ;;
 
 mn10200-*-*)		gdb_target=mn10200 ;;
 mn10300-*-*)		gdb_target=mn10300 ;;
@@ -217,22 +219,15 @@
 
 powerpc-*-netbsd*)	gdb_target=nbsd ;;
 powerpc-*-aix*)		gdb_target=aix ;;
-powerpc-*-eabi* | powerpc-*-sysv* | powerpc-*-elf*)
-			if test -f ../sim/ppc/Makefile; then
-			  gdb_target=ppc-sim
-			else
-			  gdb_target=ppc-eabi
-			fi ;;
-powerpcle-*-eabi* | powerpcle-*-sysv* | powerpcle-*-elf*)
-			if test -f ../sim/ppc/Makefile; then
-			  gdb_target=ppcle-sim
-			else
-			  gdb_target=ppcle-eabi
-			fi ;;
 powerpc-*-linux*)	gdb_target=linux
 			build_gdbserver=yes
 			;;
 powerpc-*-vxworks*)	gdb_target=vxworks ;;
+powerpc*-*-*)		if test -f ../sim/ppc/Makefile; then
+			  gdb_target=ppc-sim
+			else
+			  gdb_target=ppc-eabi
+			fi ;;
 
 rs6000-*-lynxos*)	gdb_target=rs6000lynx ;;
 rs6000-*-aix4*)		gdb_target=aix4 ;;
@@ -259,8 +254,7 @@
 sparc-*-elf*)		gdb_target=sparc-em ;;
 sparc-*-linux*)		gdb_target=linux ;;
 sparc-*-lynxos*)	gdb_target=sparclynx ;;
-sparc-*-netbsdelf*)	gdb_target=nbsdelf ;;
-sparc-*-netbsd*)	gdb_target=nbsdaout ;;
+sparc-*-netbsd*)	gdb_target=nbsd ;;
 sparc-*-solaris2*)	gdb_target=sun4sol2 ;;
 sparc-*-sunos4*)	gdb_target=sun4os4 ;;
 sparc-*-sunos5*)	gdb_target=sun4sol2 ;;
@@ -278,14 +272,15 @@
 sparc64-*-freebsd*|ultrasparc-*-freebsd*|sparcv9-*-freebsd*)
 			gdb_target=fbsd ;;
 sparc64-*-linux*)	gdb_target=sp64linux ;;
+sparc64-*-netbsd*)	gdb_target=nbsd64 ;;
 sparcv9-*-* | sparc64-*-*) gdb_target=sp64 ;;
 
 xstormy16-*-*)          gdb_target=xstormy16 ;;
 
 vax-*-*)		gdb_target=vax ;;
 
-fr30-*-*)		gdb_target=fr30
-			;;
+# OBSOLETE fr30-*-*)		gdb_target=fr30
+# OBSOLETE 			;;
 
 v850*-*-*)		gdb_target=v850
 			case ${gdb_host} in
@@ -314,4 +309,5 @@
 x86-64linux)    gdb_multi_arch=yes ;;
 v850)           gdb_multi_arch=yes ;;
 xstormy16)      gdb_multi_arch=yes ;;
+mcore)		gdb_multi_arch=yes ;;
 esac
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 29eeac8..4f6eef2 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -260,7 +260,10 @@
   print_address (addr, info->stream);
 }
 
-/* Read an integer from debugged memory, given address and number of bytes.  */
+/* Argument / return result struct for use with
+   do_captured_read_memory_integer().  MEMADDR and LEN are filled in
+   by gdb_read_memory_integer().  RESULT is the contents that were
+   successfully read from MEMADDR of length LEN.  */
 
 struct captured_read_memory_integer_arguments
 {
@@ -269,6 +272,13 @@
   LONGEST result;
 };
 
+/* Helper function for gdb_read_memory_integer().  DATA must be a
+   pointer to a captured_read_memory_integer_arguments struct. 
+   Return 1 if successful.  Note that the catch_errors() interface
+   will return 0 if an error occurred while reading memory.  This
+   choice of return code is so that we can distinguish between
+   success and failure.  */
+
 static int
 do_captured_read_memory_integer (void *data)
 {
@@ -278,9 +288,13 @@
 
   args->result = read_memory_integer (memaddr, len);
 
-  return 0;
+  return 1;
 }
 
+/* Read memory at MEMADDR of length LEN and put the contents in
+   RETURN_VALUE.  Return 0 if MEMADDR couldn't be read and non-zero
+   if successful.  */
+
 int
 safe_read_memory_integer (CORE_ADDR memaddr, int len, LONGEST *return_value)
 {
@@ -291,7 +305,7 @@
 
   status = catch_errors (do_captured_read_memory_integer, &args,
                         "", RETURN_MASK_ALL);
-  if (!status)
+  if (status)
     *return_value = args.result;
 
   return status;
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 7ea9f3f..b7922da 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -21,7 +21,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c
index 2801be9..efaf89a 100644
--- a/gdb/cpu32bug-rom.c
+++ b/gdb/cpu32bug-rom.c
@@ -74,12 +74,22 @@
  * registers either. So, typing "info reg sp" becomes an "A7".
  */
 
-static char *cpu32bug_regnames[NUM_REGS] =
+static const char *
+cpu32bug_regname (int index)
 {
-  "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-  "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
-  "SR", "PC",
-};
+  static char *regnames[] =
+  {
+    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
+    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
+    "SR", "PC"
+  };
+
+  if ((index >= (sizeof (regnames) / sizeof (regnames[0]))) 
+       || (index < 0) || (index >= NUM_REGS))
+    return NULL;
+  else
+    return regnames[index];
+}
 
 /*
  * Define the monitor command strings. Since these are passed directly
@@ -139,7 +149,8 @@
   cpu32bug_cmds.cmd_end = NULL;	/* optional command terminator */
   cpu32bug_cmds.target = &cpu32bug_ops;		/* target operations */
   cpu32bug_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  cpu32bug_cmds.regnames = cpu32bug_regnames;	/* registers names */
+  cpu32bug_cmds.regnames = NULL;	/* registers names */
+  cpu32bug_cmds.regname = cpu32bug_regname;
   cpu32bug_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
 };				/* init_cpu32bug_cmds */
 
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index e85ac12..c53c7ea 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -762,7 +762,7 @@
    adjusts pcptr (if necessary) to point to the actual memory location where
    the breakpoint should be inserted.  */
 
-unsigned char *
+const unsigned char *
 cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
 {
   static unsigned char break_insn[] = {0x38, 0xe9};
@@ -774,8 +774,8 @@
 /* Returns the register SRP (subroutine return pointer) which must contain 
    the content of the register PC after a function call.  */
 
-CORE_ADDR
-cris_saved_pc_after_call ()
+static CORE_ADDR
+cris_saved_pc_after_call (struct frame_info *frame)
 {
   return read_register (SRP_REGNUM);
 }
@@ -995,7 +995,7 @@
 /* Return the name of register regno as a string. Return NULL for an invalid or
    unimplemented register.  */
 
-char *
+const char *
 cris_register_name (int regno)
 {
   static char *cris_genreg_names[] =
@@ -1155,7 +1155,7 @@
   CORE_ADDR ip;
   struct symtab_and_line sal;
   int best_limit;
-  char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   
   /* Examine the entire prologue.  */
   register int frameless_p = 0; 
@@ -1520,7 +1520,7 @@
    all saved registers.  */
 
 void 
-cris_pop_frame ()
+cris_pop_frame (void)
 {
   register struct frame_info *fi = get_current_frame ();
   register int regno;
@@ -4161,9 +4161,9 @@
     {
       set_gdbarch_double_bit (gdbarch, 32);
       set_gdbarch_push_arguments (gdbarch, cris_abi_original_push_arguments);
-      set_gdbarch_store_return_value (gdbarch, 
+      set_gdbarch_deprecated_store_return_value (gdbarch, 
                                       cris_abi_original_store_return_value);
-      set_gdbarch_extract_return_value 
+      set_gdbarch_deprecated_extract_return_value 
         (gdbarch, cris_abi_original_extract_return_value);
       set_gdbarch_reg_struct_has_addr 
         (gdbarch, cris_abi_original_reg_struct_has_addr);
@@ -4172,9 +4172,9 @@
     {
       set_gdbarch_double_bit (gdbarch, 64);
       set_gdbarch_push_arguments (gdbarch, cris_abi_v2_push_arguments);
-      set_gdbarch_store_return_value (gdbarch, cris_abi_v2_store_return_value);
-      set_gdbarch_extract_return_value (gdbarch, 
-                                        cris_abi_v2_extract_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, cris_abi_v2_store_return_value);
+      set_gdbarch_deprecated_extract_return_value
+	(gdbarch, cris_abi_v2_extract_return_value);
       set_gdbarch_reg_struct_has_addr (gdbarch, 
                                        cris_abi_v2_reg_struct_has_addr);
     }
@@ -4297,8 +4297,8 @@
   set_gdbarch_pop_frame (gdbarch, cris_pop_frame);
 
   set_gdbarch_store_struct_return (gdbarch, cris_store_struct_return);
-  set_gdbarch_extract_struct_value_address (gdbarch, 
-                                            cris_extract_struct_value_address);
+  set_gdbarch_deprecated_extract_struct_value_address
+    (gdbarch, cris_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
diff --git a/gdb/cxux-nat.c b/gdb/cxux-nat.c
index 742f89c..e8f35a3 100644
--- a/gdb/cxux-nat.c
+++ b/gdb/cxux-nat.c
@@ -1,537 +1,537 @@
-/* Native support for Motorola 88k running Harris CX/UX.
-   Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
-   2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "symtab.h"
-#include "regcache.h"
-
-#ifndef USER			/* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#include <sys/ptrace.h>
-
-/* CX/UX provides them already, but as word offsets instead of char offsets */
-#define SXIP_OFFSET (PT_SXIP * 4)
-#define SNIP_OFFSET (PT_SNIP * 4)
-#define SFIP_OFFSET (PT_SFIP * 4)
-#define PSR_OFFSET  (PT_PSR  * sizeof(int))
-#define FPSR_OFFSET (PT_FPSR * sizeof(int))
-#define FPCR_OFFSET (PT_FPCR * sizeof(int))
-
-#define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
-                     ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
-  register unsigned int regaddr;
-  char buf[MAX_REGISTER_RAW_SIZE];
-  register int i;
-
-  struct USER u;
-  unsigned int offset;
-
-  offset = (char *) &u.pt_r0 - (char *) &u;
-  regaddr = offset;		/* byte offset to r0; */
-
-/*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
-  for (regno = 0; regno < PC_REGNUM; regno++)
-    {
-      /*regaddr = register_addr (regno, offset); */
-      /* 88k enhancement  */
-
-      for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
-	{
-	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
-				     (PTRACE_ARG3_TYPE) regaddr, 0);
-	  regaddr += sizeof (int);
-	}
-      supply_register (regno, buf);
-    }
-  /* now load up registers 32-37; special pc registers */
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
-  supply_register (PSR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
-  supply_register (FPSR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
-  supply_register (FPCR_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
-  supply_register (SXIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
-  supply_register (SNIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
-  supply_register (SFIP_REGNUM, buf);
-
-  if (target_is_m88110)
-    {
-      for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
-	   regno < NUM_REGS;
-	   regno++, regaddr += 16)
-	{
-	  X_REGISTER_RAW_TYPE xval;
-
-	  *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
-				      (PTRACE_ARG3_TYPE) regaddr, 0);
-	  *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
-				      (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
-	  *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
-				      (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
-	  *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
-				      (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
-	  supply_register (regno, (void *) &xval);
-	}
-    }
-}
-
-/* Store our register values back into the inferior.
-   If REGNO is -1, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-
-void
-store_inferior_registers (int regno)
-{
-  register unsigned int regaddr;
-  char buf[80];
-
-  struct USER u;
-
-  unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
-  regaddr = offset;
-
-  /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
-     svr3 doesn't run on an 88110, or the kernel isolates the different (not
-     completely sure this is true, but seems to be.  */
-  if (regno >= 0)
-    {
-      /*      regaddr = register_addr (regno, offset); */
-      if (regno < PC_REGNUM)
-	{
-	  regaddr = offset + regno * sizeof (int);
-	  errno = 0;
-	  ptrace (6, PIDGET (inferior_ptid),
-		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
-	  if (errno != 0)
-	    {
-	      sprintf (buf, "writing register number %d", regno);
-	      perror_with_name (buf);
-	    }
-	}
-      else if (regno == PSR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
-      else if (regno == FPSR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
-      else if (regno == FPCR_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
-      else if (regno == SXIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
-      else if (regno == SNIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
-      else if (regno == SFIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
-      else if (target_is_m88110 && regno < NUM_REGS)
-	{
-	  X_REGISTER_RAW_TYPE xval;
-
-	  read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
-			       sizeof (X_REGISTER_RAW_TYPE));
-	  regaddr = XREGADDR (regno);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
-	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
-	}
-      else
-	printf_unfiltered ("Bad register number for store_inferior routine\n");
-    }
-  else
-    {
-      for (regno = 0; regno < PC_REGNUM; regno++)
-	{
-	  /*      regaddr = register_addr (regno, offset); */
-	  errno = 0;
-	  regaddr = offset + regno * sizeof (int);
-	  ptrace (6, PIDGET (inferior_ptid),
-		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
-	  if (errno != 0)
-	    {
-	      sprintf (buf, "writing register number %d", regno);
-	      perror_with_name (buf);
-	    }
-	}
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
-      if (target_is_m88110)
-	{
-	  for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
-	    {
-	      X_REGISTER_RAW_TYPE xval;
-
-	      read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
-				   sizeof (X_REGISTER_RAW_TYPE));
-	      regaddr = XREGADDR (regno);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
-	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
-	    }
-	}
-    }
-}
-
-/* blockend is the address of the end of the user structure */
-
-m88k_register_u_addr (int blockend, int regnum)
-{
-  struct USER u;
-  int ustart = blockend - sizeof (struct USER);
-
-  if (regnum < PSR_REGNUM)
-    return (ustart + ((int) &u.pt_r0 - (int) &u) +
-	    REGISTER_SIZE * regnum);
-  else if (regnum == PSR_REGNUM)
-    return (ustart + ((int) &u.pt_psr) - (int) &u);
-  else if (regnum == FPSR_REGNUM)
-    return (ustart + ((int) &u.pt_fpsr) - (int) &u);
-  else if (regnum == FPCR_REGNUM)
-    return (ustart + ((int) &u.pt_fpcr) - (int) &u);
-  else if (regnum == SXIP_REGNUM)
-    return (ustart + SXIP_OFFSET);
-  else if (regnum == SNIP_REGNUM)
-    return (ustart + SNIP_OFFSET);
-  else if (regnum == SFIP_REGNUM)
-    return (ustart + SFIP_OFFSET);
-  else if (target_is_m88110)
-    return (ustart + ((int) &u.pt_x0 - (int) &u) +	/* Must be X register */
-	    sizeof (u.pt_x0) * (regnum - X0_REGNUM));
-  else
-    return (blockend + REGISTER_SIZE * regnum);
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/*  Given a pointer to a general register set in /proc format (gregset_t *),
-   unpack the register contents and supply them as gdb's idea of the current
-   register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
-  register int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-
-  for (regi = 0; regi <= SP_REGNUM; regi++)
-    supply_register (regi, (char *) (regp + regi));
-
-  supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
-  supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
-  supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
-  supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
-  supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
-  supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
-  int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-
-  for (regi = 0; regi <= R_R31; regi++)
-    if ((regno == -1) || (regno == regi))
-      *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
-
-  if ((regno == -1) || (regno == SXIP_REGNUM))
-    *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
-  if ((regno == -1) || (regno == SNIP_REGNUM))
-    *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
-  if ((regno == -1) || (regno == SFIP_REGNUM))
-    *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
-  if ((regno == -1) || (regno == PSR_REGNUM))
-    *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
-  if ((regno == -1) || (regno == FPSR_REGNUM))
-    *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
-  if ((regno == -1) || (regno == FPCR_REGNUM))
-    *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
-
-/* This support adds the equivalent of adb's % command.  When
-   the `add-shared-symbol-files' command is given, this routine scans 
-   the dynamic linker's link map and reads the minimal symbols
-   from each shared object file listed in the map. */
-
-struct link_map
-{
-  unsigned long l_addr;		/* address at which object is mapped */
-  char *l_name;			/* full name of loaded object */
-  void *l_ld;			/* dynamic structure of object */
-  struct link_map *l_next;	/* next link object */
-  struct link_map *l_prev;	/* previous link object */
-};
-
-#define LINKS_MAP_POINTER "_ld_tail"
-#define LIBC_FILE "/usr/lib/libc.so.1"
-#define SHARED_OFFSET 0xf0001000
-
-#ifndef PATH_MAX
-#define PATH_MAX 1023		/* maximum size of path name on OS */
-#endif
-
-void
-add_shared_symbol_files (void)
-{
-  void *desc;
-  struct link_map *ld_map, *lm, lms;
-  struct minimal_symbol *minsym;
-  struct objfile *objfile;
-  char *path_name;
-
-  if (ptid_equal (inferior_ptid, null_ptid))
-    {
-      warning ("The program has not yet been started.");
-      return;
-    }
-
-  objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
-  minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
-
-  ld_map = (struct link_map *)
-    read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
-  lm = ld_map;
-  while (lm)
-    {
-      int local_errno = 0;
-
-      read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
-      if (lms.l_name)
-	{
-	  if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
-				  PATH_MAX, &local_errno))
-	    {
-	      struct section_addr_info section_addrs;
-	      memset (&section_addrs, 0, sizeof (section_addrs));
-	      section_addrs.other[0].addr = lms.l_addr;
-              section_addrs.other[0].name = ".text";
-	      symbol_file_add (path_name, 1, &section_addrs, 0, 0);
-	      xfree (path_name);
-	    }
-	}
-      /* traverse links in reverse order so that we get the
-         the symbols the user actually gets. */
-      lm = lms.l_prev;
-    }
-
-  /* Getting new symbols may change our opinion about what is
-     frameless.  */
-  reinit_frame_cache ();
-}
-
-#if defined(_ES_MP)
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
-  unsigned int word_offset;
-
-  switch (regno)
-    {
-    case PSR_REGNUM:
-      word_offset = R_EPSR;
-      break;
-    case FPSR_REGNUM:
-      word_offset = R_FPSR;
-      break;
-    case FPCR_REGNUM:
-      word_offset = R_FPCR;
-      break;
-    case SXIP_REGNUM:
-      word_offset = R_EXIP;
-      break;
-    case SNIP_REGNUM:
-      word_offset = R_ENIP;
-      break;
-    case SFIP_REGNUM:
-      word_offset = R_EFIP;
-      break;
-    default:
-      if (regno <= FP_REGNUM)
-	word_offset = regno;
-      else
-	word_offset = ((regno - X0_REGNUM) * 4);
-    }
-  return (word_offset * 4);
-}
-
-#endif /* _ES_MP */
-
-void
-_initialize_m88k_nat (void)
-{
-#ifdef _ES_MP
-  /* Enable 88110 support, as we don't support the 88100 under ES/MP.  */
-
-  target_is_m88110 = 1;
-#elif defined(_CX_UX)
-  /* Determine whether we're running on an 88100 or an 88110.  */
-  target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
-#endif /* _CX_UX */
-}
-
-#ifdef _ES_MP
-/* Given a pointer to a general register set in /proc format (gregset_t *),
-   unpack the register contents and supply them as gdb's idea of the current
-   register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
-  register int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-
-  for (regi = 0; regi < R_R31; regi++)
-    {
-      supply_register (regi, (char *) (regp + regi));
-    }
-  supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
-  supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
-  supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-  supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
-  supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
-  supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
-}
-
-/* Given a pointer to a floating point register set in /proc format
-   (fpregset_t *), unpack the register contents and supply them as gdb's
-   idea of the current floating point register values.  */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
-  register int regi;
-  char *from;
-
-  for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
-    {
-      from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
-      supply_register (regi, from);
-    }
-}
-
-#endif /* _ES_MP */
-
-#ifdef _CX_UX
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
-  unsigned int word_offset;
-
-  switch (regno)
-    {
-    case PSR_REGNUM:
-      word_offset = R_PSR;
-      break;
-    case FPSR_REGNUM:
-      word_offset = R_FPSR;
-      break;
-    case FPCR_REGNUM:
-      word_offset = R_FPCR;
-      break;
-    case SXIP_REGNUM:
-      word_offset = R_XIP;
-      break;
-    case SNIP_REGNUM:
-      word_offset = R_NIP;
-      break;
-    case SFIP_REGNUM:
-      word_offset = R_FIP;
-      break;
-    default:
-      if (regno <= FP_REGNUM)
-	word_offset = regno;
-      else
-	word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
-    }
-  return (word_offset * 4);
-}
-
-#endif /* _CX_UX */
+// OBSOLETE /* Native support for Motorola 88k running Harris CX/UX.
+// OBSOLETE    Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
+// OBSOLETE    2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE 
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE 
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #ifndef USER			/* added to support BCS ptrace_user */
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #endif
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE 
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE 
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE 
+// OBSOLETE /* CX/UX provides them already, but as word offsets instead of char offsets */
+// OBSOLETE #define SXIP_OFFSET (PT_SXIP * 4)
+// OBSOLETE #define SNIP_OFFSET (PT_SNIP * 4)
+// OBSOLETE #define SFIP_OFFSET (PT_SFIP * 4)
+// OBSOLETE #define PSR_OFFSET  (PT_PSR  * sizeof(int))
+// OBSOLETE #define FPSR_OFFSET (PT_FPSR * sizeof(int))
+// OBSOLETE #define FPCR_OFFSET (PT_FPCR * sizeof(int))
+// OBSOLETE 
+// OBSOLETE #define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
+// OBSOLETE                      ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
+// OBSOLETE 
+// OBSOLETE extern int have_symbol_file_p ();
+// OBSOLETE 
+// OBSOLETE extern jmp_buf stack_jmp;
+// OBSOLETE 
+// OBSOLETE extern int errno;
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   register unsigned int regaddr;
+// OBSOLETE   char buf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE   register int i;
+// OBSOLETE 
+// OBSOLETE   struct USER u;
+// OBSOLETE   unsigned int offset;
+// OBSOLETE 
+// OBSOLETE   offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE   regaddr = offset;		/* byte offset to r0; */
+// OBSOLETE 
+// OBSOLETE /*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+// OBSOLETE   for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE     {
+// OBSOLETE       /*regaddr = register_addr (regno, offset); */
+// OBSOLETE       /* 88k enhancement  */
+// OBSOLETE 
+// OBSOLETE       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+// OBSOLETE 	{
+// OBSOLETE 	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				     (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE 	  regaddr += sizeof (int);
+// OBSOLETE 	}
+// OBSOLETE       supply_register (regno, buf);
+// OBSOLETE     }
+// OBSOLETE   /* now load up registers 32-37; special pc registers */
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
+// OBSOLETE   supply_register (PSR_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
+// OBSOLETE   supply_register (FPSR_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
+// OBSOLETE   supply_register (FPCR_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
+// OBSOLETE   supply_register (SXIP_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
+// OBSOLETE   supply_register (SNIP_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
+// OBSOLETE   supply_register (SFIP_REGNUM, buf);
+// OBSOLETE 
+// OBSOLETE   if (target_is_m88110)
+// OBSOLETE     {
+// OBSOLETE       for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
+// OBSOLETE 	   regno < NUM_REGS;
+// OBSOLETE 	   regno++, regaddr += 16)
+// OBSOLETE 	{
+// OBSOLETE 	  X_REGISTER_RAW_TYPE xval;
+// OBSOLETE 
+// OBSOLETE 	  *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				      (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE 	  *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				      (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
+// OBSOLETE 	  *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				      (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
+// OBSOLETE 	  *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				      (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
+// OBSOLETE 	  supply_register (regno, (void *) &xval);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE    If REGNO is -1, do this for all registers.
+// OBSOLETE    Otherwise, REGNO specifies which register (so we can save time).  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   register unsigned int regaddr;
+// OBSOLETE   char buf[80];
+// OBSOLETE 
+// OBSOLETE   struct USER u;
+// OBSOLETE 
+// OBSOLETE   unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE 
+// OBSOLETE   regaddr = offset;
+// OBSOLETE 
+// OBSOLETE   /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
+// OBSOLETE      svr3 doesn't run on an 88110, or the kernel isolates the different (not
+// OBSOLETE      completely sure this is true, but seems to be.  */
+// OBSOLETE   if (regno >= 0)
+// OBSOLETE     {
+// OBSOLETE       /*      regaddr = register_addr (regno, offset); */
+// OBSOLETE       if (regno < PC_REGNUM)
+// OBSOLETE 	{
+// OBSOLETE 	  regaddr = offset + regno * sizeof (int);
+// OBSOLETE 	  errno = 0;
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE 	  if (errno != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      sprintf (buf, "writing register number %d", regno);
+// OBSOLETE 	      perror_with_name (buf);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else if (regno == PSR_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == FPSR_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == FPCR_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == SXIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == SNIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == SFIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
+// OBSOLETE       else if (target_is_m88110 && regno < NUM_REGS)
+// OBSOLETE 	{
+// OBSOLETE 	  X_REGISTER_RAW_TYPE xval;
+// OBSOLETE 
+// OBSOLETE 	  read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
+// OBSOLETE 			       sizeof (X_REGISTER_RAW_TYPE));
+// OBSOLETE 	  regaddr = XREGADDR (regno);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	printf_unfiltered ("Bad register number for store_inferior routine\n");
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE 	{
+// OBSOLETE 	  /*      regaddr = register_addr (regno, offset); */
+// OBSOLETE 	  errno = 0;
+// OBSOLETE 	  regaddr = offset + regno * sizeof (int);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE 	  if (errno != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      sprintf (buf, "writing register number %d", regno);
+// OBSOLETE 	      perror_with_name (buf);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
+// OBSOLETE       if (target_is_m88110)
+// OBSOLETE 	{
+// OBSOLETE 	  for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
+// OBSOLETE 	    {
+// OBSOLETE 	      X_REGISTER_RAW_TYPE xval;
+// OBSOLETE 
+// OBSOLETE 	      read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
+// OBSOLETE 				   sizeof (X_REGISTER_RAW_TYPE));
+// OBSOLETE 	      regaddr = XREGADDR (regno);
+// OBSOLETE 	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+// OBSOLETE 	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
+// OBSOLETE 	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
+// OBSOLETE 	      ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* blockend is the address of the end of the user structure */
+// OBSOLETE 
+// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
+// OBSOLETE {
+// OBSOLETE   struct USER u;
+// OBSOLETE   int ustart = blockend - sizeof (struct USER);
+// OBSOLETE 
+// OBSOLETE   if (regnum < PSR_REGNUM)
+// OBSOLETE     return (ustart + ((int) &u.pt_r0 - (int) &u) +
+// OBSOLETE 	    REGISTER_SIZE * regnum);
+// OBSOLETE   else if (regnum == PSR_REGNUM)
+// OBSOLETE     return (ustart + ((int) &u.pt_psr) - (int) &u);
+// OBSOLETE   else if (regnum == FPSR_REGNUM)
+// OBSOLETE     return (ustart + ((int) &u.pt_fpsr) - (int) &u);
+// OBSOLETE   else if (regnum == FPCR_REGNUM)
+// OBSOLETE     return (ustart + ((int) &u.pt_fpcr) - (int) &u);
+// OBSOLETE   else if (regnum == SXIP_REGNUM)
+// OBSOLETE     return (ustart + SXIP_OFFSET);
+// OBSOLETE   else if (regnum == SNIP_REGNUM)
+// OBSOLETE     return (ustart + SNIP_OFFSET);
+// OBSOLETE   else if (regnum == SFIP_REGNUM)
+// OBSOLETE     return (ustart + SFIP_OFFSET);
+// OBSOLETE   else if (target_is_m88110)
+// OBSOLETE     return (ustart + ((int) &u.pt_x0 - (int) &u) +	/* Must be X register */
+// OBSOLETE 	    sizeof (u.pt_x0) * (regnum - X0_REGNUM));
+// OBSOLETE   else
+// OBSOLETE     return (blockend + REGISTER_SIZE * regnum);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #ifdef USE_PROC_FS
+// OBSOLETE 
+// OBSOLETE #include <sys/procfs.h>
+// OBSOLETE 
+// OBSOLETE /* Prototypes for supply_gregset etc. */
+// OBSOLETE #include "gregset.h"
+// OBSOLETE 
+// OBSOLETE /*  Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE    unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE    register values. */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE   register int regi;
+// OBSOLETE   register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE 
+// OBSOLETE   for (regi = 0; regi <= SP_REGNUM; regi++)
+// OBSOLETE     supply_register (regi, (char *) (regp + regi));
+// OBSOLETE 
+// OBSOLETE   supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
+// OBSOLETE   supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
+// OBSOLETE   supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
+// OBSOLETE   supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
+// OBSOLETE   supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE   supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
+// OBSOLETE {
+// OBSOLETE   int regi;
+// OBSOLETE   register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE 
+// OBSOLETE   for (regi = 0; regi <= R_R31; regi++)
+// OBSOLETE     if ((regno == -1) || (regno == regi))
+// OBSOLETE       *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
+// OBSOLETE 
+// OBSOLETE   if ((regno == -1) || (regno == SXIP_REGNUM))
+// OBSOLETE     *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == SNIP_REGNUM))
+// OBSOLETE     *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == SFIP_REGNUM))
+// OBSOLETE     *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == PSR_REGNUM))
+// OBSOLETE     *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == FPSR_REGNUM))
+// OBSOLETE     *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == FPCR_REGNUM))
+// OBSOLETE     *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* USE_PROC_FS */
+// OBSOLETE 
+// OBSOLETE /* This support adds the equivalent of adb's % command.  When
+// OBSOLETE    the `add-shared-symbol-files' command is given, this routine scans 
+// OBSOLETE    the dynamic linker's link map and reads the minimal symbols
+// OBSOLETE    from each shared object file listed in the map. */
+// OBSOLETE 
+// OBSOLETE struct link_map
+// OBSOLETE {
+// OBSOLETE   unsigned long l_addr;		/* address at which object is mapped */
+// OBSOLETE   char *l_name;			/* full name of loaded object */
+// OBSOLETE   void *l_ld;			/* dynamic structure of object */
+// OBSOLETE   struct link_map *l_next;	/* next link object */
+// OBSOLETE   struct link_map *l_prev;	/* previous link object */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE #define LINKS_MAP_POINTER "_ld_tail"
+// OBSOLETE #define LIBC_FILE "/usr/lib/libc.so.1"
+// OBSOLETE #define SHARED_OFFSET 0xf0001000
+// OBSOLETE 
+// OBSOLETE #ifndef PATH_MAX
+// OBSOLETE #define PATH_MAX 1023		/* maximum size of path name on OS */
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE add_shared_symbol_files (void)
+// OBSOLETE {
+// OBSOLETE   void *desc;
+// OBSOLETE   struct link_map *ld_map, *lm, lms;
+// OBSOLETE   struct minimal_symbol *minsym;
+// OBSOLETE   struct objfile *objfile;
+// OBSOLETE   char *path_name;
+// OBSOLETE 
+// OBSOLETE   if (ptid_equal (inferior_ptid, null_ptid))
+// OBSOLETE     {
+// OBSOLETE       warning ("The program has not yet been started.");
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
+// OBSOLETE   minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
+// OBSOLETE 
+// OBSOLETE   ld_map = (struct link_map *)
+// OBSOLETE     read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
+// OBSOLETE   lm = ld_map;
+// OBSOLETE   while (lm)
+// OBSOLETE     {
+// OBSOLETE       int local_errno = 0;
+// OBSOLETE 
+// OBSOLETE       read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
+// OBSOLETE       if (lms.l_name)
+// OBSOLETE 	{
+// OBSOLETE 	  if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
+// OBSOLETE 				  PATH_MAX, &local_errno))
+// OBSOLETE 	    {
+// OBSOLETE 	      struct section_addr_info section_addrs;
+// OBSOLETE 	      memset (&section_addrs, 0, sizeof (section_addrs));
+// OBSOLETE 	      section_addrs.other[0].addr = lms.l_addr;
+// OBSOLETE               section_addrs.other[0].name = ".text";
+// OBSOLETE 	      symbol_file_add (path_name, 1, &section_addrs, 0, 0);
+// OBSOLETE 	      xfree (path_name);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       /* traverse links in reverse order so that we get the
+// OBSOLETE          the symbols the user actually gets. */
+// OBSOLETE       lm = lms.l_prev;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Getting new symbols may change our opinion about what is
+// OBSOLETE      frameless.  */
+// OBSOLETE   reinit_frame_cache ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if defined(_ES_MP)
+// OBSOLETE 
+// OBSOLETE #include <sys/regset.h>
+// OBSOLETE 
+// OBSOLETE unsigned int
+// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
+// OBSOLETE {
+// OBSOLETE   unsigned int word_offset;
+// OBSOLETE 
+// OBSOLETE   switch (regno)
+// OBSOLETE     {
+// OBSOLETE     case PSR_REGNUM:
+// OBSOLETE       word_offset = R_EPSR;
+// OBSOLETE       break;
+// OBSOLETE     case FPSR_REGNUM:
+// OBSOLETE       word_offset = R_FPSR;
+// OBSOLETE       break;
+// OBSOLETE     case FPCR_REGNUM:
+// OBSOLETE       word_offset = R_FPCR;
+// OBSOLETE       break;
+// OBSOLETE     case SXIP_REGNUM:
+// OBSOLETE       word_offset = R_EXIP;
+// OBSOLETE       break;
+// OBSOLETE     case SNIP_REGNUM:
+// OBSOLETE       word_offset = R_ENIP;
+// OBSOLETE       break;
+// OBSOLETE     case SFIP_REGNUM:
+// OBSOLETE       word_offset = R_EFIP;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       if (regno <= FP_REGNUM)
+// OBSOLETE 	word_offset = regno;
+// OBSOLETE       else
+// OBSOLETE 	word_offset = ((regno - X0_REGNUM) * 4);
+// OBSOLETE     }
+// OBSOLETE   return (word_offset * 4);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* _ES_MP */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_m88k_nat (void)
+// OBSOLETE {
+// OBSOLETE #ifdef _ES_MP
+// OBSOLETE   /* Enable 88110 support, as we don't support the 88100 under ES/MP.  */
+// OBSOLETE 
+// OBSOLETE   target_is_m88110 = 1;
+// OBSOLETE #elif defined(_CX_UX)
+// OBSOLETE   /* Determine whether we're running on an 88100 or an 88110.  */
+// OBSOLETE   target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
+// OBSOLETE #endif /* _CX_UX */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #ifdef _ES_MP
+// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE    unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE    register values. */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE   register int regi;
+// OBSOLETE   register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE 
+// OBSOLETE   for (regi = 0; regi < R_R31; regi++)
+// OBSOLETE     {
+// OBSOLETE       supply_register (regi, (char *) (regp + regi));
+// OBSOLETE     }
+// OBSOLETE   supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
+// OBSOLETE   supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE   supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE   supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
+// OBSOLETE   supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
+// OBSOLETE   supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given a pointer to a floating point register set in /proc format
+// OBSOLETE    (fpregset_t *), unpack the register contents and supply them as gdb's
+// OBSOLETE    idea of the current floating point register values.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE supply_fpregset (fpregset_t *fpregsetp)
+// OBSOLETE {
+// OBSOLETE   register int regi;
+// OBSOLETE   char *from;
+// OBSOLETE 
+// OBSOLETE   for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
+// OBSOLETE     {
+// OBSOLETE       from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
+// OBSOLETE       supply_register (regi, from);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* _ES_MP */
+// OBSOLETE 
+// OBSOLETE #ifdef _CX_UX
+// OBSOLETE 
+// OBSOLETE #include <sys/regset.h>
+// OBSOLETE 
+// OBSOLETE unsigned int
+// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
+// OBSOLETE {
+// OBSOLETE   unsigned int word_offset;
+// OBSOLETE 
+// OBSOLETE   switch (regno)
+// OBSOLETE     {
+// OBSOLETE     case PSR_REGNUM:
+// OBSOLETE       word_offset = R_PSR;
+// OBSOLETE       break;
+// OBSOLETE     case FPSR_REGNUM:
+// OBSOLETE       word_offset = R_FPSR;
+// OBSOLETE       break;
+// OBSOLETE     case FPCR_REGNUM:
+// OBSOLETE       word_offset = R_FPCR;
+// OBSOLETE       break;
+// OBSOLETE     case SXIP_REGNUM:
+// OBSOLETE       word_offset = R_XIP;
+// OBSOLETE       break;
+// OBSOLETE     case SNIP_REGNUM:
+// OBSOLETE       word_offset = R_NIP;
+// OBSOLETE       break;
+// OBSOLETE     case SFIP_REGNUM:
+// OBSOLETE       word_offset = R_FIP;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       if (regno <= FP_REGNUM)
+// OBSOLETE 	word_offset = regno;
+// OBSOLETE       else
+// OBSOLETE 	word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
+// OBSOLETE     }
+// OBSOLETE   return (word_offset * 4);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* _CX_UX */
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index cd260da..4e02106 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -24,7 +24,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
@@ -41,6 +40,7 @@
 
 #include "floatformat.h"
 #include "gdb/sim-d10v.h"
+#include "sim-regno.h"
 
 struct frame_extra_info
   {
@@ -94,6 +94,10 @@
 
 extern void _initialize_d10v_tdep (void);
 
+static CORE_ADDR d10v_read_sp (void);
+
+static CORE_ADDR d10v_read_fp (void);
+
 static void d10v_eva_prepare_to_trace (void);
 
 static void d10v_eva_get_trace_data (void);
@@ -182,7 +186,7 @@
     TS2_A0_REGNUM = 35
   };
 
-static char *
+static const char *
 d10v_ts2_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -208,7 +212,7 @@
     TS3_A0_REGNUM = 32
   };
 
-static char *
+static const char *
 d10v_ts3_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -296,6 +300,8 @@
 static int
 d10v_ts2_register_sim_regno (int nr)
 {
+  if (legacy_register_sim_regno (nr) < 0)
+    return legacy_register_sim_regno (nr);
   if (nr >= TS2_IMAP0_REGNUM
       && nr < TS2_IMAP0_REGNUM + NR_IMAP_REGS)
     return nr - TS2_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
@@ -310,6 +316,8 @@
 static int
 d10v_ts3_register_sim_regno (int nr)
 {
+  if (legacy_register_sim_regno (nr) < 0)
+    return legacy_register_sim_regno (nr);
   if (nr >= TS3_IMAP0_REGNUM
       && nr < TS3_IMAP0_REGNUM + NR_IMAP_REGS)
     return nr - TS3_IMAP0_REGNUM + SIM_D10V_IMAP0_REGNUM;
@@ -361,6 +369,8 @@
 {
   if (reg_nr == PC_REGNUM)
     return builtin_type_void_func_ptr;
+  if (reg_nr == _SP_REGNUM || reg_nr == _FP_REGNUM)
+    return builtin_type_void_data_ptr;
   else if (reg_nr >= A0_REGNUM
       && reg_nr < (A0_REGNUM + NR_A_REGS))
     return builtin_type_int64;
@@ -439,20 +449,16 @@
     return d10v_make_daddr (addr);
 }
 
+/* Don't do anything if we have an integer, this way users can type 'x
+   <addr>' w/o having gdb outsmart them.  The internal gdb conversions
+   to the correct space are taken care of in the pointer_to_address
+   function.  If we don't do this, 'x $fp' wouldn't work.  */
 static CORE_ADDR
 d10v_integer_to_address (struct type *type, void *buf)
 {
   LONGEST val;
   val = unpack_long (type, buf);
-  if (TYPE_CODE (type) == TYPE_CODE_INT
-      && TYPE_LENGTH (type) <= TYPE_LENGTH (builtin_type_void_data_ptr))
-    /* Convert small integers that would would be directly copied into
-       a pointer variable into an address pointing into data space.  */
-    return d10v_make_daddr (val & 0xffff);
-  else
-    /* The value is too large to fit in a pointer.  Assume this was
-       intentional and that the user in fact specified a raw address.  */
-    return val;
+  return val;
 }
 
 /* Store the address of the place in which to copy the structure the
@@ -475,9 +481,20 @@
 static void
 d10v_store_return_value (struct type *type, char *valbuf)
 {
-  write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
-			valbuf,
-			TYPE_LENGTH (type));
+  char tmp = 0;
+  /* Only char return values need to be shifted right within R0.  */
+  if (TYPE_LENGTH (type) == 1
+      && TYPE_CODE (type) == TYPE_CODE_INT)
+    {
+      write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+			    &tmp, 1);	/* zero the high byte */
+      write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
+			    valbuf, 1);	/* copy the low byte */
+    }
+  else
+    write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+			  valbuf,
+			  TYPE_LENGTH (type));
 }
 
 /* Extract from an array REGBUF containing the (raw) register state
@@ -843,7 +860,7 @@
   fi->extra_info->size = -next_addr;
 
   if (!(fp & 0xffff))
-    fp = d10v_make_daddr (read_register (SP_REGNUM));
+    fp = d10v_read_sp ();
 
   for (i = 0; i < NUM_REGS - 1; i++)
     if (fi->saved_regs[i])
@@ -870,7 +887,7 @@
       /* otherwise, it isn't being used, so we use the SP instead */
       if (uses_frame)
 	fi->saved_regs[SP_REGNUM] 
-	  = read_register (FP_REGNUM) + fi->extra_info->size;
+	  = d10v_read_fp () + fi->extra_info->size;
       else
 	{
 	  fi->saved_regs[SP_REGNUM] = fp + fi->extra_info->size;
@@ -1068,6 +1085,15 @@
   int i;
   int regnum = ARG1_REGNUM;
   struct stack_item *si = NULL;
+  long val;
+
+  /* If struct_return is true, then the struct return address will
+     consume one argument-passing register.  No need to actually 
+     write the value to the register -- that's done by 
+     d10v_store_struct_return().  */
+
+  if (struct_return)
+    regnum++;
 
   /* Fill in registers and arg lists */
   for (i = 0; i < nargs; i++)
@@ -1076,38 +1102,37 @@
       struct type *type = check_typedef (VALUE_TYPE (arg));
       char *contents = VALUE_CONTENTS (arg);
       int len = TYPE_LENGTH (type);
+      int aligned_regnum = (regnum + 1) & ~1;
+
       /* printf ("push: type=%d len=%d\n", TYPE_CODE (type), len); */
+      if (len <= 2 && regnum <= ARGN_REGNUM)
+	/* fits in a single register, do not align */
 	{
-	  int aligned_regnum = (regnum + 1) & ~1;
-	  if (len <= 2 && regnum <= ARGN_REGNUM)
-	    /* fits in a single register, do not align */
+	  val = extract_unsigned_integer (contents, len);
+	  write_register (regnum++, val);
+	}
+      else if (len <= (ARGN_REGNUM - aligned_regnum + 1) * 2)
+	/* value fits in remaining registers, store keeping left
+	   aligned */
+	{
+	  int b;
+	  regnum = aligned_regnum;
+	  for (b = 0; b < (len & ~1); b += 2)
 	    {
-	      long val = extract_unsigned_integer (contents, len);
+	      val = extract_unsigned_integer (&contents[b], 2);
 	      write_register (regnum++, val);
 	    }
-	  else if (len <= (ARGN_REGNUM - aligned_regnum + 1) * 2)
-	    /* value fits in remaining registers, store keeping left
-	       aligned */
+	  if (b < len)
 	    {
-	      int b;
-	      regnum = aligned_regnum;
-	      for (b = 0; b < (len & ~1); b += 2)
-		{
-		  long val = extract_unsigned_integer (&contents[b], 2);
-		  write_register (regnum++, val);
-		}
-	      if (b < len)
-		{
-		  long val = extract_unsigned_integer (&contents[b], 1);
-		  write_register (regnum++, (val << 8));
-		}
+	      val = extract_unsigned_integer (&contents[b], 1);
+	      write_register (regnum++, (val << 8));
 	    }
-	  else
-	    {
-	      /* arg will go onto stack */
-	      regnum = ARGN_REGNUM + 1;
-	      si = push_stack_item (si, contents, len);
-	    }
+	}
+      else
+	{
+	  /* arg will go onto stack */
+	  regnum = ARGN_REGNUM + 1;
+	  si = push_stack_item (si, contents, len);
 	}
     }
 
@@ -1130,25 +1155,31 @@
 			   char *valbuf)
 {
   int len;
-  /*    printf("RET: TYPE=%d len=%d r%d=0x%x\n", TYPE_CODE (type), TYPE_LENGTH (type), RET1_REGNUM - R0_REGNUM, (int) extract_unsigned_integer (regbuf + REGISTER_BYTE(RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM)));  */
+#if 0
+  printf("RET: TYPE=%d len=%d r%d=0x%x\n", TYPE_CODE (type), 
+	 TYPE_LENGTH (type), RET1_REGNUM - R0_REGNUM, 
+	 (int) extract_unsigned_integer (regbuf + REGISTER_BYTE(RET1_REGNUM), 
+					 REGISTER_RAW_SIZE (RET1_REGNUM)));
+#endif
+  len = TYPE_LENGTH (type);
+  if (len == 1)
     {
-      len = TYPE_LENGTH (type);
-      if (len == 1)
-	{
-	  unsigned short c = extract_unsigned_integer (regbuf + REGISTER_BYTE (RET1_REGNUM), REGISTER_RAW_SIZE (RET1_REGNUM));
-	  store_unsigned_integer (valbuf, 1, c);
-	}
-      else if ((len & 1) == 0)
-	memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM), len);
-      else
-	{
-	  /* For return values of odd size, the first byte is in the
-	     least significant part of the first register.  The
-	     remaining bytes in remaining registers. Interestingly,
-	     when such values are passed in, the last byte is in the
-	     most significant byte of that same register - wierd. */
-	  memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM) + 1, len);
-	}
+      unsigned short c;
+
+      c = extract_unsigned_integer (regbuf + REGISTER_BYTE (RET1_REGNUM), 
+				    REGISTER_RAW_SIZE (RET1_REGNUM));
+      store_unsigned_integer (valbuf, 1, c);
+    }
+  else if ((len & 1) == 0)
+    memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM), len);
+  else
+    {
+      /* For return values of odd size, the first byte is in the
+	 least significant part of the first register.  The
+	 remaining bytes in remaining registers. Interestingly,
+	 when such values are passed in, the last byte is in the
+	 most significant byte of that same register - wierd. */
+      memcpy (valbuf, regbuf + REGISTER_BYTE (RET1_REGNUM) + 1, len);
     }
 }
 
@@ -1572,17 +1603,17 @@
   set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (d10v_call_dummy_words));
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
-  set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, d10v_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
 
   set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, d10v_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention);
 
   set_gdbarch_frame_init_saved_regs (gdbarch, d10v_frame_init_saved_regs);
diff --git a/gdb/d30v-tdep.c b/gdb/d30v-tdep.c
index b5d3a3b..0891370 100644
--- a/gdb/d30v-tdep.c
+++ b/gdb/d30v-tdep.c
@@ -1,1365 +1,1365 @@
-/* Target-dependent code for Mitsubishi D30V, for GDB.
-
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
-
-   This file is part of GDB.
-
-   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.  */
-
-/*  Contributed by Martin Hunt, hunt@cygnus.com */
-
-#include "defs.h"
-#include "frame.h"
-#include "obstack.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "gdbcmd.h"
-#include "gdbcore.h"
-#include "gdb_string.h"
-#include "value.h"
-#include "inferior.h"
-#include "dis-asm.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "regcache.h"
-
-#include "language.h" /* For local_hex_string() */
-
-void d30v_frame_find_saved_regs (struct frame_info *fi,
-				 struct frame_saved_regs *fsr);
-void d30v_frame_find_saved_regs_offsets (struct frame_info *fi,
-					 struct frame_saved_regs *fsr);
-static void d30v_pop_dummy_frame (struct frame_info *fi);
-static void d30v_print_flags (void);
-static void print_flags_command (char *, int);
-
-/* the following defines assume:
-   fp is r61, lr is r62, sp is r63, and ?? is r22
-   if that changes, they will need to be updated */
-
-#define OP_MASK_ALL_BUT_RA	0x0ffc0fff	/* throw away Ra, keep the rest */
-
-#define OP_STW_SPM		0x054c0fc0	/* stw Ra, @(sp-) */
-#define OP_STW_SP_R0		0x05400fc0	/* stw Ra, @(sp,r0) */
-#define OP_STW_SP_IMM0		0x05480fc0	/* st Ra, @(sp, 0x0) */
-#define OP_STW_R22P_R0		0x05440580	/* stw Ra, @(r22+,r0) */
-
-#define OP_ST2W_SPM		0x056c0fc0	/* st2w Ra, @(sp-) */
-#define OP_ST2W_SP_R0		0x05600fc0	/* st2w Ra, @(sp, r0) */
-#define OP_ST2W_SP_IMM0		0x05680fc0	/* st2w Ra, @(sp, 0x0) */
-#define OP_ST2W_R22P_R0		0x05640580	/* st2w Ra, @(r22+, r0) */
-
-#define OP_MASK_OPCODE		0x0ffc0000	/* just the opcode, ign operands */
-#define OP_NOP			0x00f00000	/* nop */
-
-#define OP_MASK_ALL_BUT_IMM	0x0fffffc0	/* throw away imm, keep the rest */
-#define OP_SUB_SP_IMM		0x082bffc0	/* sub sp,sp,imm */
-#define OP_ADD_SP_IMM		0x080bffc0	/* add sp,sp,imm */
-#define OP_ADD_R22_SP_IMM	0x08096fc0	/* add r22,sp,imm */
-#define OP_STW_FP_SP_IMM	0x054bdfc0	/* stw fp,@(sp,imm) */
-#define OP_OR_SP_R0_IMM		0x03abf000	/* or sp,r0,imm */
-
-/* no mask */
-#define OP_OR_FP_R0_SP		0x03a3d03f	/* or fp,r0,sp */
-#define OP_OR_FP_SP_R0		0x03a3dfc0	/* or fp,sp,r0 */
-#define OP_OR_FP_IMM0_SP	0x03abd03f	/* or fp,0x0,sp */
-#define OP_STW_FP_R22P_R0	0x0547d580	/* stw fp,@(r22+,r0) */
-#define OP_STW_LR_R22P_R0	0x0547e580	/* stw lr,@(r22+,r0) */
-
-#define OP_MASK_OP_AND_RB	0x0ff80fc0	/* keep op and rb,throw away rest */
-#define OP_STW_SP_IMM		0x05480fc0	/* stw Ra,@(sp,imm) */
-#define OP_ST2W_SP_IMM		0x05680fc0	/* st2w Ra,@(sp,imm) */
-#define OP_STW_FP_IMM		0x05480f40	/* stw Ra,@(fp,imm) */
-#define OP_STW_FP_R0		0x05400f40	/* stw Ra,@(fp,r0) */
-
-#define OP_MASK_FM_BIT		0x80000000
-#define OP_MASK_CC_BITS		0x70000000
-#define OP_MASK_SUB_INST	0x0fffffff
-
-#define EXTRACT_RA(op)		(((op) >> 12) & 0x3f)
-#define EXTRACT_RB(op)		(((op) >> 6) & 0x3f)
-#define EXTRACT_RC(op)		(((op) & 0x3f)
-#define EXTRACT_UIMM6(op)	((op) & 0x3f)
-#define EXTRACT_IMM6(op)	((((int)EXTRACT_UIMM6(op)) << 26) >> 26)
-#define EXTRACT_IMM26(op)	((((op)&0x0ff00000) >> 2) | ((op)&0x0003ffff))
-#define EXTRACT_IMM32(opl, opr)	((EXTRACT_UIMM6(opl) << 26)|EXTRACT_IMM26(opr))
-
-
-int
-d30v_frame_chain_valid (CORE_ADDR chain, struct frame_info *fi)
-{
-#if 0
-  return ((chain) != 0 && (fi) != 0 && (fi)->return_pc != 0);
-#else
-  return ((chain) != 0 && (fi) != 0 && (fi)->frame <= chain);
-#endif
-}
-
-/* Discard from the stack the innermost frame, restoring all saved
-   registers.  */
-
-void
-d30v_pop_frame (void)
-{
-  struct frame_info *frame = get_current_frame ();
-  CORE_ADDR fp;
-  int regnum;
-  struct frame_saved_regs fsr;
-  char raw_buffer[8];
-
-  fp = FRAME_FP (frame);
-  if (frame->dummy)
-    {
-      d30v_pop_dummy_frame (frame);
-      return;
-    }
-
-  /* fill out fsr with the address of where each */
-  /* register was stored in the frame */
-  get_frame_saved_regs (frame, &fsr);
-
-  /* now update the current registers with the old values */
-  for (regnum = A0_REGNUM; regnum < A0_REGNUM + 2; regnum++)
-    {
-      if (fsr.regs[regnum])
-	{
-	  read_memory (fsr.regs[regnum], raw_buffer, 8);
-	  write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 8);
-	}
-    }
-  for (regnum = 0; regnum < SP_REGNUM; regnum++)
-    {
-      if (fsr.regs[regnum])
-	{
-	  write_register (regnum, read_memory_unsigned_integer (fsr.regs[regnum], 4));
-	}
-    }
-  if (fsr.regs[PSW_REGNUM])
-    {
-      write_register (PSW_REGNUM, read_memory_unsigned_integer (fsr.regs[PSW_REGNUM], 4));
-    }
-
-  write_register (PC_REGNUM, read_register (LR_REGNUM));
-  write_register (SP_REGNUM, fp + frame->size);
-  target_store_registers (-1);
-  flush_cached_frames ();
-}
-
-static int
-check_prologue (unsigned long op)
-{
-  /* add sp,sp,imm -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM)
-    return 1;
-
-  /* add r22,sp,imm -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM)
-    return 1;
-
-  /* or  fp,r0,sp -- observed */
-  if (op == OP_OR_FP_R0_SP)
-    return 1;
-
-  /* nop */
-  if ((op & OP_MASK_OPCODE) == OP_NOP)
-    return 1;
-
-  /* stw  Ra,@(sp,r0) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0)
-    return 1;
-
-  /* stw  Ra,@(sp,0x0) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0)
-    return 1;
-
-  /* st2w  Ra,@(sp,r0) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0)
-    return 1;
-
-  /* st2w  Ra,@(sp,0x0) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0)
-    return 1;
-
-  /* stw fp, @(r22+,r0) -- observed */
-  if (op == OP_STW_FP_R22P_R0)
-    return 1;
-
-  /* stw r62, @(r22+,r0) -- observed */
-  if (op == OP_STW_LR_R22P_R0)
-    return 1;
-
-  /* stw Ra, @(fp,r0) -- observed */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0)
-    return 1;			/* first arg */
-
-  /* stw Ra, @(fp,imm) -- observed */
-  if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM)
-    return 1;			/* second and subsequent args */
-
-  /* stw fp,@(sp,imm) -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM)
-    return 1;
-
-  /* st2w Ra,@(r22+,r0) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0)
-    return 1;
-
-  /* stw  Ra, @(sp-) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM)
-    return 1;
-
-  /* st2w  Ra, @(sp-) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM)
-    return 1;
-
-  /* sub.?  sp,sp,imm */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM)
-    return 1;
-
-  return 0;
-}
-
-CORE_ADDR
-d30v_skip_prologue (CORE_ADDR pc)
-{
-  unsigned long op[2];
-  unsigned long opl, opr;	/* left / right sub operations */
-  unsigned long fm0, fm1;	/* left / right mode bits */
-  unsigned long cc0, cc1;
-  unsigned long op1, op2;
-  CORE_ADDR func_addr, func_end;
-  struct symtab_and_line sal;
-
-  /* If we have line debugging information, then the end of the */
-  /* prologue should the first assembly instruction of  the first source line */
-  if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
-    {
-      sal = find_pc_line (func_addr, 0);
-      if (sal.end && sal.end < func_end)
-	return sal.end;
-    }
-
-  if (target_read_memory (pc, (char *) &op[0], 8))
-    return pc;			/* Can't access it -- assume no prologue. */
-
-  while (1)
-    {
-      opl = (unsigned long) read_memory_integer (pc, 4);
-      opr = (unsigned long) read_memory_integer (pc + 4, 4);
-
-      fm0 = (opl & OP_MASK_FM_BIT);
-      fm1 = (opr & OP_MASK_FM_BIT);
-
-      cc0 = (opl & OP_MASK_CC_BITS);
-      cc1 = (opr & OP_MASK_CC_BITS);
-
-      opl = (opl & OP_MASK_SUB_INST);
-      opr = (opr & OP_MASK_SUB_INST);
-
-      if (fm0 && fm1)
-	{
-	  /* long instruction (opl contains the opcode) */
-	  if (((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_SP_IMM) &&		/* add sp,sp,imm */
-	      ((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_R22_SP_IMM) &&	/* add r22,sp,imm */
-	      ((opl & OP_MASK_OP_AND_RB) != OP_STW_SP_IMM) &&	/* stw Ra, @(sp,imm) */
-	      ((opl & OP_MASK_OP_AND_RB) != OP_ST2W_SP_IMM))	/* st2w Ra, @(sp,imm) */
-	    break;
-	}
-      else
-	{
-	  /* short instructions */
-	  if (fm0 && !fm1)
-	    {
-	      op1 = opr;
-	      op2 = opl;
-	    }
-	  else
-	    {
-	      op1 = opl;
-	      op2 = opr;
-	    }
-	  if (check_prologue (op1))
-	    {
-	      if (!check_prologue (op2))
-		{
-		  /* if the previous opcode was really part of the prologue */
-		  /* and not just a NOP, then we want to break after both instructions */
-		  if ((op1 & OP_MASK_OPCODE) != OP_NOP)
-		    pc += 8;
-		  break;
-		}
-	    }
-	  else
-	    break;
-	}
-      pc += 8;
-    }
-  return pc;
-}
-
-static int end_of_stack;
-
-/* Given a GDB frame, determine the address of the calling function's frame.
-   This will be used to create a new GDB frame struct, and then
-   INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
- */
-
-CORE_ADDR
-d30v_frame_chain (struct frame_info *frame)
-{
-  struct frame_saved_regs fsr;
-
-  d30v_frame_find_saved_regs (frame, &fsr);
-
-  if (end_of_stack)
-    return (CORE_ADDR) 0;
-
-  if (frame->return_pc == IMEM_START)
-    return (CORE_ADDR) 0;
-
-  if (!fsr.regs[FP_REGNUM])
-    {
-      if (!fsr.regs[SP_REGNUM] || fsr.regs[SP_REGNUM] == STACK_START)
-	return (CORE_ADDR) 0;
-
-      return fsr.regs[SP_REGNUM];
-    }
-
-  if (!read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4))
-    return (CORE_ADDR) 0;
-
-  return read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4);
-}
-
-static int next_addr, uses_frame;
-static int frame_size;
-
-static int
-prologue_find_regs (unsigned long op, struct frame_saved_regs *fsr,
-		    CORE_ADDR addr)
-{
-  int n;
-  int offset;
-
-  /* add sp,sp,imm -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM)
-    {
-      offset = EXTRACT_IMM6 (op);
-      /*next_addr += offset; */
-      frame_size += -offset;
-      return 1;
-    }
-
-  /* add r22,sp,imm -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM)
-    {
-      offset = EXTRACT_IMM6 (op);
-      next_addr = (offset - frame_size);
-      return 1;
-    }
-
-  /* stw Ra, @(fp, offset) -- observed */
-  if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM)
-    {
-      n = EXTRACT_RA (op);
-      offset = EXTRACT_IMM6 (op);
-      fsr->regs[n] = (offset - frame_size);
-      return 1;
-    }
-
-  /* stw Ra, @(fp, r0) -- observed */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0)
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = (-frame_size);
-      return 1;
-    }
-
-  /* or  fp,0,sp -- observed */
-  if ((op == OP_OR_FP_R0_SP) ||
-      (op == OP_OR_FP_SP_R0) ||
-      (op == OP_OR_FP_IMM0_SP))
-    {
-      uses_frame = 1;
-      return 1;
-    }
-
-  /* nop */
-  if ((op & OP_MASK_OPCODE) == OP_NOP)
-    return 1;
-
-  /* stw Ra,@(r22+,r0) -- observed */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_R22P_R0)
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = next_addr;
-      next_addr += 4;
-      return 1;
-    }
-#if 0				/* subsumed in pattern above */
-  /* stw fp,@(r22+,r0) -- observed */
-  if (op == OP_STW_FP_R22P_R0)
-    {
-      fsr->regs[FP_REGNUM] = next_addr;		/* XXX */
-      next_addr += 4;
-      return 1;
-    }
-
-  /* stw r62,@(r22+,r0) -- observed */
-  if (op == OP_STW_LR_R22P_R0)
-    {
-      fsr->regs[LR_REGNUM] = next_addr;
-      next_addr += 4;
-      return 1;
-    }
-#endif
-  /* st2w Ra,@(r22+,r0) -- observed */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0)
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = next_addr;
-      fsr->regs[n + 1] = next_addr + 4;
-      next_addr += 8;
-      return 1;
-    }
-
-  /* stw  rn, @(sp-) */
-  if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM)
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = next_addr;
-      next_addr -= 4;
-      return 1;
-    }
-
-  /* st2w  Ra, @(sp-) */
-  else if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM)
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = next_addr;
-      fsr->regs[n + 1] = next_addr + 4;
-      next_addr -= 8;
-      return 1;
-    }
-
-  /* sub  sp,sp,imm */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM)
-    {
-      offset = EXTRACT_IMM6 (op);
-      frame_size += -offset;
-      return 1;
-    }
-
-  /* st  rn, @(sp,0) -- observed */
-  if (((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0) ||
-      ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0))
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = (-frame_size);
-      return 1;
-    }
-
-  /* st2w  rn, @(sp,0) */
-  if (((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0) ||
-      ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0))
-    {
-      n = EXTRACT_RA (op);
-      fsr->regs[n] = (-frame_size);
-      fsr->regs[n + 1] = (-frame_size) + 4;
-      return 1;
-    }
-
-  /* stw fp,@(sp,imm) -- observed */
-  if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM)
-    {
-      offset = EXTRACT_IMM6 (op);
-      fsr->regs[FP_REGNUM] = (offset - frame_size);
-      return 1;
-    }
-  return 0;
-}
-
-/* Put here the code to store, into a struct frame_saved_regs, the
-   addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special: the address we
-   return for it IS the sp for the next frame. */
-void
-d30v_frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
-  CORE_ADDR fp, pc;
-  unsigned long opl, opr;
-  unsigned long op1, op2;
-  unsigned long fm0, fm1;
-  int i;
-
-  fp = fi->frame;
-  memset (fsr, 0, sizeof (*fsr));
-  next_addr = 0;
-  frame_size = 0;
-  end_of_stack = 0;
-
-  uses_frame = 0;
-
-  d30v_frame_find_saved_regs_offsets (fi, fsr);
-
-  fi->size = frame_size;
-
-  if (!fp)
-    fp = read_register (SP_REGNUM);
-
-  for (i = 0; i < NUM_REGS - 1; i++)
-    if (fsr->regs[i])
-      {
-	fsr->regs[i] = fsr->regs[i] + fp + frame_size;
-      }
-
-  if (fsr->regs[LR_REGNUM])
-    fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4);
-  else
-    fi->return_pc = read_register (LR_REGNUM);
-
-  /* the SP is not normally (ever?) saved, but check anyway */
-  if (!fsr->regs[SP_REGNUM])
-    {
-      /* if the FP was saved, that means the current FP is valid, */
-      /* otherwise, it isn't being used, so we use the SP instead */
-      if (uses_frame)
-	fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size;
-      else
-	{
-	  fsr->regs[SP_REGNUM] = fp + fi->size;
-	  fi->frameless = 1;
-	  fsr->regs[FP_REGNUM] = 0;
-	}
-    }
-}
-
-void
-d30v_frame_find_saved_regs_offsets (struct frame_info *fi,
-				    struct frame_saved_regs *fsr)
-{
-  CORE_ADDR fp, pc;
-  unsigned long opl, opr;
-  unsigned long op1, op2;
-  unsigned long fm0, fm1;
-  int i;
-
-  fp = fi->frame;
-  memset (fsr, 0, sizeof (*fsr));
-  next_addr = 0;
-  frame_size = 0;
-  end_of_stack = 0;
-
-  pc = get_pc_function_start (fi->pc);
-
-  uses_frame = 0;
-  while (pc < fi->pc)
-    {
-      opl = (unsigned long) read_memory_integer (pc, 4);
-      opr = (unsigned long) read_memory_integer (pc + 4, 4);
-
-      fm0 = (opl & OP_MASK_FM_BIT);
-      fm1 = (opr & OP_MASK_FM_BIT);
-
-      opl = (opl & OP_MASK_SUB_INST);
-      opr = (opr & OP_MASK_SUB_INST);
-
-      if (fm0 && fm1)
-	{
-	  /* long instruction */
-	  if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM)
-	    {
-	      /* add sp,sp,n */
-	      long offset = EXTRACT_IMM32 (opl, opr);
-	      frame_size += -offset;
-	    }
-	  else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM)
-	    {
-	      /* add r22,sp,offset */
-	      long offset = EXTRACT_IMM32 (opl, opr);
-	      next_addr = (offset - frame_size);
-	    }
-	  else if ((opl & OP_MASK_OP_AND_RB) == OP_STW_SP_IMM)
-	    {
-	      /* st Ra, @(sp,imm) */
-	      long offset = EXTRACT_IMM32 (opl, opr);
-	      short n = EXTRACT_RA (opl);
-	      fsr->regs[n] = (offset - frame_size);
-	    }
-	  else if ((opl & OP_MASK_OP_AND_RB) == OP_ST2W_SP_IMM)
-	    {
-	      /* st2w Ra, @(sp,offset) */
-	      long offset = EXTRACT_IMM32 (opl, opr);
-	      short n = EXTRACT_RA (opl);
-	      fsr->regs[n] = (offset - frame_size);
-	      fsr->regs[n + 1] = (offset - frame_size) + 4;
-	    }
-	  else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_OR_SP_R0_IMM)
-	    {
-	      end_of_stack = 1;
-	    }
-	  else
-	    break;
-	}
-      else
-	{
-	  /* short instructions */
-	  if (fm0 && !fm1)
-	    {
-	      op2 = opl;
-	      op1 = opr;
-	    }
-	  else
-	    {
-	      op1 = opl;
-	      op2 = opr;
-	    }
-	  if (!prologue_find_regs (op1, fsr, pc) || !prologue_find_regs (op2, fsr, pc))
-	    break;
-	}
-      pc += 8;
-    }
-
-#if 0
-  fi->size = frame_size;
-
-  if (!fp)
-    fp = read_register (SP_REGNUM);
-
-  for (i = 0; i < NUM_REGS - 1; i++)
-    if (fsr->regs[i])
-      {
-	fsr->regs[i] = fsr->regs[i] + fp + frame_size;
-      }
-
-  if (fsr->regs[LR_REGNUM])
-    fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4);
-  else
-    fi->return_pc = read_register (LR_REGNUM);
-
-  /* the SP is not normally (ever?) saved, but check anyway */
-  if (!fsr->regs[SP_REGNUM])
-    {
-      /* if the FP was saved, that means the current FP is valid, */
-      /* otherwise, it isn't being used, so we use the SP instead */
-      if (uses_frame)
-	fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size;
-      else
-	{
-	  fsr->regs[SP_REGNUM] = fp + fi->size;
-	  fi->frameless = 1;
-	  fsr->regs[FP_REGNUM] = 0;
-	}
-    }
-#endif
-}
-
-void
-d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
-{
-  struct frame_saved_regs dummy;
-
-  if (fi->next && (fi->pc == 0))
-    fi->pc = fi->next->return_pc;
-
-  d30v_frame_find_saved_regs_offsets (fi, &dummy);
-
-  if (uses_frame == 0)
-    fi->frameless = 1;
-  else
-    fi->frameless = 0;
-
-  if ((fi->next == 0) && (uses_frame == 0))
-    /* innermost frame and it's "frameless",
-       so the fi->frame field is wrong, fix it! */
-    fi->frame = read_sp ();
-
-  if (dummy.regs[LR_REGNUM])
-    {
-      /* it was saved, grab it! */
-      dummy.regs[LR_REGNUM] += (fi->frame + frame_size);
-      fi->return_pc = read_memory_unsigned_integer (dummy.regs[LR_REGNUM], 4);
-    }
-  else
-    fi->return_pc = read_register (LR_REGNUM);
-}
-
-void
-d30v_init_frame_pc (int fromleaf, struct frame_info *prev)
-{
-  /* default value, put here so we can breakpoint on it and
-     see if the default value is really the right thing to use */
-  prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \
-	      prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
-}
-
-static void d30v_print_register (int regnum, int tabular);
-
-static void
-d30v_print_register (int regnum, int tabular)
-{
-  if (regnum < A0_REGNUM)
-    {
-      if (tabular)
-	printf_filtered ("%08lx", (long) read_register (regnum));
-      else
-	printf_filtered ("0x%lx	%ld",
-			 (long) read_register (regnum),
-			 (long) read_register (regnum));
-    }
-  else
-    {
-      char regbuf[MAX_REGISTER_RAW_SIZE];
-
-      frame_register_read (selected_frame, regnum, regbuf);
-
-      val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0,
-		 gdb_stdout, 'x', 1, 0, Val_pretty_default);
-
-      if (!tabular)
-	{
-	  printf_filtered ("	");
-	  val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0,
-		     gdb_stdout, 'd', 1, 0, Val_pretty_default);
-	}
-    }
-}
-
-static void
-d30v_print_flags (void)
-{
-  long psw = read_register (PSW_REGNUM);
-  printf_filtered ("flags #1");
-  printf_filtered ("   (sm) %d", (psw & PSW_SM) != 0);
-  printf_filtered ("   (ea) %d", (psw & PSW_EA) != 0);
-  printf_filtered ("   (db) %d", (psw & PSW_DB) != 0);
-  printf_filtered ("   (ds) %d", (psw & PSW_DS) != 0);
-  printf_filtered ("   (ie) %d", (psw & PSW_IE) != 0);
-  printf_filtered ("   (rp) %d", (psw & PSW_RP) != 0);
-  printf_filtered ("   (md) %d\n", (psw & PSW_MD) != 0);
-
-  printf_filtered ("flags #2");
-  printf_filtered ("   (f0) %d", (psw & PSW_F0) != 0);
-  printf_filtered ("   (f1) %d", (psw & PSW_F1) != 0);
-  printf_filtered ("   (f2) %d", (psw & PSW_F2) != 0);
-  printf_filtered ("   (f3) %d", (psw & PSW_F3) != 0);
-  printf_filtered ("    (s) %d", (psw & PSW_S) != 0);
-  printf_filtered ("    (v) %d", (psw & PSW_V) != 0);
-  printf_filtered ("   (va) %d", (psw & PSW_VA) != 0);
-  printf_filtered ("    (c) %d\n", (psw & PSW_C) != 0);
-}
-
-static void
-print_flags_command (char *args, int from_tty)
-{
-  d30v_print_flags ();
-}
-
-void
-d30v_do_registers_info (int regnum, int fpregs)
-{
-  long long num1, num2;
-  long psw;
-
-  if (regnum != -1)
-    {
-      if (REGISTER_NAME (0) == NULL || REGISTER_NAME (0)[0] == '\000')
-	return;
-
-      printf_filtered ("%s ", REGISTER_NAME (regnum));
-      d30v_print_register (regnum, 0);
-
-      printf_filtered ("\n");
-      return;
-    }
-
-  /* Have to print all the registers.  Format them nicely.  */
-
-  printf_filtered ("PC=");
-  print_address (read_pc (), gdb_stdout);
-
-  printf_filtered (" PSW=");
-  d30v_print_register (PSW_REGNUM, 1);
-
-  printf_filtered (" BPC=");
-  print_address (read_register (BPC_REGNUM), gdb_stdout);
-
-  printf_filtered (" BPSW=");
-  d30v_print_register (BPSW_REGNUM, 1);
-  printf_filtered ("\n");
-
-  printf_filtered ("DPC=");
-  print_address (read_register (DPC_REGNUM), gdb_stdout);
-
-  printf_filtered (" DPSW=");
-  d30v_print_register (DPSW_REGNUM, 1);
-
-  printf_filtered (" IBA=");
-  print_address (read_register (IBA_REGNUM), gdb_stdout);
-  printf_filtered ("\n");
-
-  printf_filtered ("RPT_C=");
-  d30v_print_register (RPT_C_REGNUM, 1);
-
-  printf_filtered (" RPT_S=");
-  print_address (read_register (RPT_S_REGNUM), gdb_stdout);
-
-  printf_filtered (" RPT_E=");
-  print_address (read_register (RPT_E_REGNUM), gdb_stdout);
-  printf_filtered ("\n");
-
-  printf_filtered ("MOD_S=");
-  print_address (read_register (MOD_S_REGNUM), gdb_stdout);
-
-  printf_filtered (" MOD_E=");
-  print_address (read_register (MOD_E_REGNUM), gdb_stdout);
-  printf_filtered ("\n");
-
-  printf_filtered ("EIT_VB=");
-  print_address (read_register (EIT_VB_REGNUM), gdb_stdout);
-
-  printf_filtered (" INT_S=");
-  d30v_print_register (INT_S_REGNUM, 1);
-
-  printf_filtered (" INT_M=");
-  d30v_print_register (INT_M_REGNUM, 1);
-  printf_filtered ("\n");
-
-  d30v_print_flags ();
-  for (regnum = 0; regnum <= 63;)
-    {
-      int i;
-
-      printf_filtered ("R%d-R%d ", regnum, regnum + 7);
-      if (regnum < 10)
-	printf_filtered (" ");
-      if (regnum + 7 < 10)
-	printf_filtered (" ");
-
-      for (i = 0; i < 8; i++)
-	{
-	  printf_filtered (" ");
-	  d30v_print_register (regnum++, 1);
-	}
-
-      printf_filtered ("\n");
-    }
-
-  printf_filtered ("A0-A1    ");
-
-  d30v_print_register (A0_REGNUM, 1);
-  printf_filtered ("    ");
-  d30v_print_register (A1_REGNUM, 1);
-  printf_filtered ("\n");
-}
-
-CORE_ADDR
-d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun,
-		     int nargs, struct value **args,
-		     struct type *type, int gcc_p)
-{
-  int regnum;
-  CORE_ADDR sp;
-  char buffer[MAX_REGISTER_RAW_SIZE];
-  struct frame_info *frame = get_current_frame ();
-  frame->dummy = start_sp;
-  /*start_sp |= DMEM_START; */
-
-  sp = start_sp;
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    {
-      sp -= REGISTER_RAW_SIZE (regnum);
-      store_address (buffer, REGISTER_RAW_SIZE (regnum), read_register (regnum));
-      write_memory (sp, buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  write_register (SP_REGNUM, (LONGEST) sp);
-  /* now we need to load LR with the return address */
-  write_register (LR_REGNUM, (LONGEST) d30v_call_dummy_address ());
-  return sp;
-}
-
-static void
-d30v_pop_dummy_frame (struct frame_info *fi)
-{
-  CORE_ADDR sp = fi->dummy;
-  int regnum;
-
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    {
-      sp -= REGISTER_RAW_SIZE (regnum);
-      write_register (regnum, read_memory_unsigned_integer (sp, REGISTER_RAW_SIZE (regnum)));
-    }
-  flush_cached_frames ();	/* needed? */
-}
-
-
-CORE_ADDR
-d30v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-		     int struct_return, CORE_ADDR struct_addr)
-{
-  int i, len, index = 0, regnum = 2;
-  char buffer[4], *contents;
-  LONGEST val;
-  CORE_ADDR ptrs[10];
-
-#if 0
-  /* Pass 1. Put all large args on stack */
-  for (i = 0; i < nargs; i++)
-    {
-      struct value *arg = args[i];
-      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
-      len = TYPE_LENGTH (arg_type);
-      contents = VALUE_CONTENTS (arg);
-      val = extract_signed_integer (contents, len);
-      if (len > 4)
-	{
-	  /* put on stack and pass pointers */
-	  sp -= len;
-	  write_memory (sp, contents, len);
-	  ptrs[index++] = sp;
-	}
-    }
-#endif
-  index = 0;
-
-  for (i = 0; i < nargs; i++)
-    {
-      struct value *arg = args[i];
-      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
-      len = TYPE_LENGTH (arg_type);
-      contents = VALUE_CONTENTS (arg);
-      if (len > 4)
-	{
-	  /* we need multiple registers */
-	  int ndx;
-
-	  for (ndx = 0; len > 0; ndx += 8, len -= 8)
-	    {
-	      if (regnum & 1)
-		regnum++;	/* all args > 4 bytes start in even register */
-
-	      if (regnum < 18)
-		{
-		  val = extract_signed_integer (&contents[ndx], 4);
-		  write_register (regnum++, val);
-
-		  if (len >= 8)
-		    val = extract_signed_integer (&contents[ndx + 4], 4);
-		  else
-		    val = extract_signed_integer (&contents[ndx + 4], len - 4);
-		  write_register (regnum++, val);
-		}
-	      else
-		{
-		  /* no more registers available.  put it on the stack */
-
-		  /* all args > 4 bytes are padded to a multiple of 8 bytes
-		     and start on an 8 byte boundary */
-		  if (sp & 7)
-		    sp -= (sp & 7);	/* align it */
-
-		  sp -= ((len + 7) & ~7);	/* allocate space */
-		  write_memory (sp, &contents[ndx], len);
-		  break;
-		}
-	    }
-	}
-      else
-	{
-	  if (regnum < 18)
-	    {
-	      val = extract_signed_integer (contents, len);
-	      write_register (regnum++, val);
-	    }
-	  else
-	    {
-	      /* all args are padded to a multiple of 4 bytes (at least) */
-	      sp -= ((len + 3) & ~3);
-	      write_memory (sp, contents, len);
-	    }
-	}
-    }
-  if (sp & 7)
-    /* stack pointer is not on an 8 byte boundary -- align it */
-    sp -= (sp & 7);
-  return sp;
-}
-
-
-/* pick an out-of-the-way place to set the return value */
-/* for an inferior function call.  The link register is set to this  */
-/* value and a momentary breakpoint is set there.  When the breakpoint */
-/* is hit, the dummy frame is popped and the previous environment is */
-/* restored. */
-
-CORE_ADDR
-d30v_call_dummy_address (void)
-{
-  CORE_ADDR entry;
-  struct minimal_symbol *sym;
-
-  entry = entry_point_address ();
-
-  if (entry != 0)
-    return entry;
-
-  sym = lookup_minimal_symbol ("_start", NULL, symfile_objfile);
-
-  if (!sym || MSYMBOL_TYPE (sym) != mst_text)
-    return 0;
-  else
-    return SYMBOL_VALUE_ADDRESS (sym);
-}
-
-/* Given a return value in `regbuf' with a type `valtype', 
-   extract and copy its value into `valbuf'.  */
-
-void
-d30v_extract_return_value (struct type *valtype, char regbuf[REGISTER_BYTES],
-			   char *valbuf)
-{
-  memcpy (valbuf, regbuf + REGISTER_BYTE (2), TYPE_LENGTH (valtype));
-}
-
-/* The following code implements access to, and display of, the D30V's
-   instruction trace buffer.  The buffer consists of 64K or more
-   4-byte words of data, of which each words includes an 8-bit count,
-   an 8-bit segment number, and a 16-bit instruction address.
-
-   In theory, the trace buffer is continuously capturing instruction
-   data that the CPU presents on its "debug bus", but in practice, the
-   ROMified GDB stub only enables tracing when it continues or steps
-   the program, and stops tracing when the program stops; so it
-   actually works for GDB to read the buffer counter out of memory and
-   then read each trace word.  The counter records where the tracing
-   stops, but there is no record of where it started, so we remember
-   the PC when we resumed and then search backwards in the trace
-   buffer for a word that includes that address.  This is not perfect,
-   because you will miss trace data if the resumption PC is the target
-   of a branch.  (The value of the buffer counter is semi-random, any
-   trace data from a previous program stop is gone.)  */
-
-/* The address of the last word recorded in the trace buffer.  */
-
-#define DBBC_ADDR (0xd80000)
-
-/* The base of the trace buffer, at least for the "Board_0".  */
-
-#define TRACE_BUFFER_BASE (0xf40000)
-
-static void trace_command (char *, int);
-
-static void untrace_command (char *, int);
-
-static void trace_info (char *, int);
-
-static void tdisassemble_command (char *, int);
-
-static void display_trace (int, int);
-
-/* True when instruction traces are being collected.  */
-
-static int tracing;
-
-/* Remembered PC.  */
-
-static CORE_ADDR last_pc;
-
-/* True when trace output should be displayed whenever program stops.  */
-
-static int trace_display;
-
-/* True when trace listing should include source lines.  */
-
-static int default_trace_show_source = 1;
-
-struct trace_buffer
-  {
-    int size;
-    short *counts;
-    CORE_ADDR *addrs;
-  }
-trace_data;
-
-static void
-trace_command (char *args, int from_tty)
-{
-  /* Clear the host-side trace buffer, allocating space if needed.  */
-  trace_data.size = 0;
-  if (trace_data.counts == NULL)
-    trace_data.counts = (short *) xmalloc (65536 * sizeof (short));
-  if (trace_data.addrs == NULL)
-    trace_data.addrs = (CORE_ADDR *) xmalloc (65536 * sizeof (CORE_ADDR));
-
-  tracing = 1;
-
-  printf_filtered ("Tracing is now on.\n");
-}
-
-static void
-untrace_command (char *args, int from_tty)
-{
-  tracing = 0;
-
-  printf_filtered ("Tracing is now off.\n");
-}
-
-static void
-trace_info (char *args, int from_tty)
-{
-  int i;
-
-  if (trace_data.size)
-    {
-      printf_filtered ("%d entries in trace buffer:\n", trace_data.size);
-
-      for (i = 0; i < trace_data.size; ++i)
-	{
-	  printf_filtered ("%d: %d instruction%s at 0x%s\n",
-			   i, trace_data.counts[i],
-			   (trace_data.counts[i] == 1 ? "" : "s"),
-			   paddr_nz (trace_data.addrs[i]));
-	}
-    }
-  else
-    printf_filtered ("No entries in trace buffer.\n");
-
-  printf_filtered ("Tracing is currently %s.\n", (tracing ? "on" : "off"));
-}
-
-/* Print the instruction at address MEMADDR in debugged memory,
-   on STREAM.  Returns length of the instruction, in bytes.  */
-
-static int
-print_insn (CORE_ADDR memaddr, struct ui_file *stream)
-{
-  /* If there's no disassembler, something is very wrong.  */
-  if (tm_print_insn == NULL)
-    internal_error (__FILE__, __LINE__,
-		    "print_insn: no disassembler");
-
-  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-    tm_print_insn_info.endian = BFD_ENDIAN_BIG;
-  else
-    tm_print_insn_info.endian = BFD_ENDIAN_LITTLE;
-  return TARGET_PRINT_INSN (memaddr, &tm_print_insn_info);
-}
-
-void
-d30v_eva_prepare_to_trace (void)
-{
-  if (!tracing)
-    return;
-
-  last_pc = read_register (PC_REGNUM);
-}
-
-/* Collect trace data from the target board and format it into a form
-   more useful for display.  */
-
-void
-d30v_eva_get_trace_data (void)
-{
-  int count, i, j, oldsize;
-  int trace_addr, trace_seg, trace_cnt, next_cnt;
-  unsigned int last_trace, trace_word, next_word;
-  unsigned int *tmpspace;
-
-  if (!tracing)
-    return;
-
-  tmpspace = xmalloc (65536 * sizeof (unsigned int));
-
-  last_trace = read_memory_unsigned_integer (DBBC_ADDR, 2) << 2;
-
-  /* Collect buffer contents from the target, stopping when we reach
-     the word recorded when execution resumed.  */
-
-  count = 0;
-  while (last_trace > 0)
-    {
-      QUIT;
-      trace_word =
-	read_memory_unsigned_integer (TRACE_BUFFER_BASE + last_trace, 4);
-      trace_addr = trace_word & 0xffff;
-      last_trace -= 4;
-      /* Ignore an apparently nonsensical entry.  */
-      if (trace_addr == 0xffd5)
-	continue;
-      tmpspace[count++] = trace_word;
-      if (trace_addr == last_pc)
-	break;
-      if (count > 65535)
-	break;
-    }
-
-  /* Move the data to the host-side trace buffer, adjusting counts to
-     include the last instruction executed and transforming the address
-     into something that GDB likes.  */
-
-  for (i = 0; i < count; ++i)
-    {
-      trace_word = tmpspace[i];
-      next_word = ((i == 0) ? 0 : tmpspace[i - 1]);
-      trace_addr = trace_word & 0xffff;
-      next_cnt = (next_word >> 24) & 0xff;
-      j = trace_data.size + count - i - 1;
-      trace_data.addrs[j] = (trace_addr << 2) + 0x1000000;
-      trace_data.counts[j] = next_cnt + 1;
-    }
-
-  oldsize = trace_data.size;
-  trace_data.size += count;
-
-  xfree (tmpspace);
-
-  if (trace_display)
-    display_trace (oldsize, trace_data.size);
-}
-
-static void
-tdisassemble_command (char *arg, int from_tty)
-{
-  int i, count;
-  CORE_ADDR low, high;
-  char *space_index;
-
-  if (!arg)
-    {
-      low = 0;
-      high = trace_data.size;
-    }
-  else if (!(space_index = (char *) strchr (arg, ' ')))
-    {
-      low = parse_and_eval_address (arg);
-      high = low + 5;
-    }
-  else
-    {
-      /* Two arguments.  */
-      *space_index = '\0';
-      low = parse_and_eval_address (arg);
-      high = parse_and_eval_address (space_index + 1);
-      if (high < low)
-	high = low;
-    }
-
-  printf_filtered ("Dump of trace from %s to %s:\n",
-		   paddr_u (low),
-		   paddr_u (high));
-
-  display_trace (low, high);
-
-  printf_filtered ("End of trace dump.\n");
-  gdb_flush (gdb_stdout);
-}
-
-static void
-display_trace (int low, int high)
-{
-  int i, count, trace_show_source, first, suppress;
-  CORE_ADDR next_address;
-
-  trace_show_source = default_trace_show_source;
-  if (!have_full_symbols () && !have_partial_symbols ())
-    {
-      trace_show_source = 0;
-      printf_filtered ("No symbol table is loaded.  Use the \"file\" command.\n");
-      printf_filtered ("Trace will not display any source.\n");
-    }
-
-  first = 1;
-  suppress = 0;
-  for (i = low; i < high; ++i)
-    {
-      next_address = trace_data.addrs[i];
-      count = trace_data.counts[i];
-      while (count-- > 0)
-	{
-	  QUIT;
-	  if (trace_show_source)
-	    {
-	      struct symtab_and_line sal, sal_prev;
-
-	      sal_prev = find_pc_line (next_address - 4, 0);
-	      sal = find_pc_line (next_address, 0);
-
-	      if (sal.symtab)
-		{
-		  if (first || sal.line != sal_prev.line)
-		    print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
-		  suppress = 0;
-		}
-	      else
-		{
-		  if (!suppress)
-		    /* FIXME-32x64--assumes sal.pc fits in long.  */
-		    printf_filtered ("No source file for address %s.\n",
-				 local_hex_string ((unsigned long) sal.pc));
-		  suppress = 1;
-		}
-	    }
-	  first = 0;
-	  print_address (next_address, gdb_stdout);
-	  printf_filtered (":");
-	  printf_filtered ("\t");
-	  wrap_here ("    ");
-	  next_address = next_address + print_insn (next_address, gdb_stdout);
-	  printf_filtered ("\n");
-	  gdb_flush (gdb_stdout);
-	}
-    }
-}
-
-extern void (*target_resume_hook) (void);
-extern void (*target_wait_loop_hook) (void);
-
-void
-_initialize_d30v_tdep (void)
-{
-  tm_print_insn = print_insn_d30v;
-
-  target_resume_hook = d30v_eva_prepare_to_trace;
-  target_wait_loop_hook = d30v_eva_get_trace_data;
-
-  add_info ("flags", print_flags_command, "Print d30v flags.");
-
-  add_com ("trace", class_support, trace_command,
-	   "Enable tracing of instruction execution.");
-
-  add_com ("untrace", class_support, untrace_command,
-	   "Disable tracing of instruction execution.");
-
-  add_com ("tdisassemble", class_vars, tdisassemble_command,
-	   "Disassemble the trace buffer.\n\
-Two optional arguments specify a range of trace buffer entries\n\
-as reported by info trace (NOT addresses!).");
-
-  add_info ("trace", trace_info,
-	    "Display info about the trace data buffer.");
-
-  add_show_from_set (add_set_cmd ("tracedisplay", no_class,
-				  var_integer, (char *) &trace_display,
-			     "Set automatic display of trace.\n", &setlist),
-		     &showlist);
-  add_show_from_set (add_set_cmd ("tracesource", no_class,
-			   var_integer, (char *) &default_trace_show_source,
-		      "Set display of source code with trace.\n", &setlist),
-		     &showlist);
-
-}
+/* OBSOLETE /* Target-dependent code for Mitsubishi D30V, for GDB. */
+/* OBSOLETE  */
+/* OBSOLETE    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software */
+/* OBSOLETE    Foundation, Inc. */
+/* OBSOLETE  */
+/* OBSOLETE    This file is part of GDB. */
+/* OBSOLETE  */
+/* OBSOLETE    This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE    it under the terms of the GNU General Public License as published by */
+/* OBSOLETE    the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE    (at your option) any later version. */
+/* OBSOLETE  */
+/* OBSOLETE    This program is distributed in the hope that it will be useful, */
+/* OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE    GNU General Public License for more details. */
+/* OBSOLETE  */
+/* OBSOLETE    You should have received a copy of the GNU General Public License */
+/* OBSOLETE    along with this program; if not, write to the Free Software */
+/* OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330, */
+/* OBSOLETE    Boston, MA 02111-1307, USA.  */ */
+/* OBSOLETE  */
+/* OBSOLETE /*  Contributed by Martin Hunt, hunt@cygnus.com */ */
+/* OBSOLETE  */
+/* OBSOLETE #include "defs.h" */
+/* OBSOLETE #include "frame.h" */
+/* OBSOLETE #include "obstack.h" */
+/* OBSOLETE #include "symtab.h" */
+/* OBSOLETE #include "gdbtypes.h" */
+/* OBSOLETE #include "gdbcmd.h" */
+/* OBSOLETE #include "gdbcore.h" */
+/* OBSOLETE #include "gdb_string.h" */
+/* OBSOLETE #include "value.h" */
+/* OBSOLETE #include "inferior.h" */
+/* OBSOLETE #include "dis-asm.h" */
+/* OBSOLETE #include "symfile.h" */
+/* OBSOLETE #include "objfiles.h" */
+/* OBSOLETE #include "regcache.h" */
+/* OBSOLETE  */
+/* OBSOLETE #include "language.h" /* For local_hex_string() */ */
+/* OBSOLETE  */
+/* OBSOLETE void d30v_frame_find_saved_regs (struct frame_info *fi, */
+/* OBSOLETE 				 struct frame_saved_regs *fsr); */
+/* OBSOLETE void d30v_frame_find_saved_regs_offsets (struct frame_info *fi, */
+/* OBSOLETE 					 struct frame_saved_regs *fsr); */
+/* OBSOLETE static void d30v_pop_dummy_frame (struct frame_info *fi); */
+/* OBSOLETE static void d30v_print_flags (void); */
+/* OBSOLETE static void print_flags_command (char *, int); */
+/* OBSOLETE  */
+/* OBSOLETE /* the following defines assume: */
+/* OBSOLETE    fp is r61, lr is r62, sp is r63, and ?? is r22 */
+/* OBSOLETE    if that changes, they will need to be updated */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_MASK_ALL_BUT_RA	0x0ffc0fff	/* throw away Ra, keep the rest */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_STW_SPM		0x054c0fc0	/* stw Ra, @(sp-) */ */
+/* OBSOLETE #define OP_STW_SP_R0		0x05400fc0	/* stw Ra, @(sp,r0) */ */
+/* OBSOLETE #define OP_STW_SP_IMM0		0x05480fc0	/* st Ra, @(sp, 0x0) */ */
+/* OBSOLETE #define OP_STW_R22P_R0		0x05440580	/* stw Ra, @(r22+,r0) */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_ST2W_SPM		0x056c0fc0	/* st2w Ra, @(sp-) */ */
+/* OBSOLETE #define OP_ST2W_SP_R0		0x05600fc0	/* st2w Ra, @(sp, r0) */ */
+/* OBSOLETE #define OP_ST2W_SP_IMM0		0x05680fc0	/* st2w Ra, @(sp, 0x0) */ */
+/* OBSOLETE #define OP_ST2W_R22P_R0		0x05640580	/* st2w Ra, @(r22+, r0) */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_MASK_OPCODE		0x0ffc0000	/* just the opcode, ign operands */ */
+/* OBSOLETE #define OP_NOP			0x00f00000	/* nop */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_MASK_ALL_BUT_IMM	0x0fffffc0	/* throw away imm, keep the rest */ */
+/* OBSOLETE #define OP_SUB_SP_IMM		0x082bffc0	/* sub sp,sp,imm */ */
+/* OBSOLETE #define OP_ADD_SP_IMM		0x080bffc0	/* add sp,sp,imm */ */
+/* OBSOLETE #define OP_ADD_R22_SP_IMM	0x08096fc0	/* add r22,sp,imm */ */
+/* OBSOLETE #define OP_STW_FP_SP_IMM	0x054bdfc0	/* stw fp,@(sp,imm) */ */
+/* OBSOLETE #define OP_OR_SP_R0_IMM		0x03abf000	/* or sp,r0,imm */ */
+/* OBSOLETE  */
+/* OBSOLETE /* no mask */ */
+/* OBSOLETE #define OP_OR_FP_R0_SP		0x03a3d03f	/* or fp,r0,sp */ */
+/* OBSOLETE #define OP_OR_FP_SP_R0		0x03a3dfc0	/* or fp,sp,r0 */ */
+/* OBSOLETE #define OP_OR_FP_IMM0_SP	0x03abd03f	/* or fp,0x0,sp */ */
+/* OBSOLETE #define OP_STW_FP_R22P_R0	0x0547d580	/* stw fp,@(r22+,r0) */ */
+/* OBSOLETE #define OP_STW_LR_R22P_R0	0x0547e580	/* stw lr,@(r22+,r0) */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_MASK_OP_AND_RB	0x0ff80fc0	/* keep op and rb,throw away rest */ */
+/* OBSOLETE #define OP_STW_SP_IMM		0x05480fc0	/* stw Ra,@(sp,imm) */ */
+/* OBSOLETE #define OP_ST2W_SP_IMM		0x05680fc0	/* st2w Ra,@(sp,imm) */ */
+/* OBSOLETE #define OP_STW_FP_IMM		0x05480f40	/* stw Ra,@(fp,imm) */ */
+/* OBSOLETE #define OP_STW_FP_R0		0x05400f40	/* stw Ra,@(fp,r0) */ */
+/* OBSOLETE  */
+/* OBSOLETE #define OP_MASK_FM_BIT		0x80000000 */
+/* OBSOLETE #define OP_MASK_CC_BITS		0x70000000 */
+/* OBSOLETE #define OP_MASK_SUB_INST	0x0fffffff */
+/* OBSOLETE  */
+/* OBSOLETE #define EXTRACT_RA(op)		(((op) >> 12) & 0x3f) */
+/* OBSOLETE #define EXTRACT_RB(op)		(((op) >> 6) & 0x3f) */
+/* OBSOLETE #define EXTRACT_RC(op)		(((op) & 0x3f) */
+/* OBSOLETE #define EXTRACT_UIMM6(op)	((op) & 0x3f) */
+/* OBSOLETE #define EXTRACT_IMM6(op)	((((int)EXTRACT_UIMM6(op)) << 26) >> 26) */
+/* OBSOLETE #define EXTRACT_IMM26(op)	((((op)&0x0ff00000) >> 2) | ((op)&0x0003ffff)) */
+/* OBSOLETE #define EXTRACT_IMM32(opl, opr)	((EXTRACT_UIMM6(opl) << 26)|EXTRACT_IMM26(opr)) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE d30v_frame_chain_valid (CORE_ADDR chain, struct frame_info *fi) */
+/* OBSOLETE { */
+/* OBSOLETE #if 0 */
+/* OBSOLETE   return ((chain) != 0 && (fi) != 0 && (fi)->return_pc != 0); */
+/* OBSOLETE #else */
+/* OBSOLETE   return ((chain) != 0 && (fi) != 0 && (fi)->frame <= chain); */
+/* OBSOLETE #endif */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Discard from the stack the innermost frame, restoring all saved */
+/* OBSOLETE    registers.  */ */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_pop_frame (void) */
+/* OBSOLETE { */
+/* OBSOLETE   struct frame_info *frame = get_current_frame (); */
+/* OBSOLETE   CORE_ADDR fp; */
+/* OBSOLETE   int regnum; */
+/* OBSOLETE   struct frame_saved_regs fsr; */
+/* OBSOLETE   char raw_buffer[8]; */
+/* OBSOLETE  */
+/* OBSOLETE   fp = FRAME_FP (frame); */
+/* OBSOLETE   if (frame->dummy) */
+/* OBSOLETE     { */
+/* OBSOLETE       d30v_pop_dummy_frame (frame); */
+/* OBSOLETE       return; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* fill out fsr with the address of where each */ */
+/* OBSOLETE   /* register was stored in the frame */ */
+/* OBSOLETE   get_frame_saved_regs (frame, &fsr); */
+/* OBSOLETE  */
+/* OBSOLETE   /* now update the current registers with the old values */ */
+/* OBSOLETE   for (regnum = A0_REGNUM; regnum < A0_REGNUM + 2; regnum++) */
+/* OBSOLETE     { */
+/* OBSOLETE       if (fsr.regs[regnum]) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  read_memory (fsr.regs[regnum], raw_buffer, 8); */
+/* OBSOLETE 	  write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 8); */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE   for (regnum = 0; regnum < SP_REGNUM; regnum++) */
+/* OBSOLETE     { */
+/* OBSOLETE       if (fsr.regs[regnum]) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  write_register (regnum, read_memory_unsigned_integer (fsr.regs[regnum], 4)); */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE   if (fsr.regs[PSW_REGNUM]) */
+/* OBSOLETE     { */
+/* OBSOLETE       write_register (PSW_REGNUM, read_memory_unsigned_integer (fsr.regs[PSW_REGNUM], 4)); */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   write_register (PC_REGNUM, read_register (LR_REGNUM)); */
+/* OBSOLETE   write_register (SP_REGNUM, fp + frame->size); */
+/* OBSOLETE   target_store_registers (-1); */
+/* OBSOLETE   flush_cached_frames (); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static int */
+/* OBSOLETE check_prologue (unsigned long op) */
+/* OBSOLETE { */
+/* OBSOLETE   /* add sp,sp,imm -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* add r22,sp,imm -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* or  fp,r0,sp -- observed */ */
+/* OBSOLETE   if (op == OP_OR_FP_R0_SP) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* nop */ */
+/* OBSOLETE   if ((op & OP_MASK_OPCODE) == OP_NOP) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw  Ra,@(sp,r0) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw  Ra,@(sp,0x0) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w  Ra,@(sp,r0) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w  Ra,@(sp,0x0) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw fp, @(r22+,r0) -- observed */ */
+/* OBSOLETE   if (op == OP_STW_FP_R22P_R0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw r62, @(r22+,r0) -- observed */ */
+/* OBSOLETE   if (op == OP_STW_LR_R22P_R0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw Ra, @(fp,r0) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0) */
+/* OBSOLETE     return 1;			/* first arg */ */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw Ra, @(fp,imm) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM) */
+/* OBSOLETE     return 1;			/* second and subsequent args */ */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw fp,@(sp,imm) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w Ra,@(r22+,r0) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw  Ra, @(sp-) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w  Ra, @(sp-) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* sub.?  sp,sp,imm */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   return 0; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR */
+/* OBSOLETE d30v_skip_prologue (CORE_ADDR pc) */
+/* OBSOLETE { */
+/* OBSOLETE   unsigned long op[2]; */
+/* OBSOLETE   unsigned long opl, opr;	/* left / right sub operations */ */
+/* OBSOLETE   unsigned long fm0, fm1;	/* left / right mode bits */ */
+/* OBSOLETE   unsigned long cc0, cc1; */
+/* OBSOLETE   unsigned long op1, op2; */
+/* OBSOLETE   CORE_ADDR func_addr, func_end; */
+/* OBSOLETE   struct symtab_and_line sal; */
+/* OBSOLETE  */
+/* OBSOLETE   /* If we have line debugging information, then the end of the */ */
+/* OBSOLETE   /* prologue should the first assembly instruction of  the first source line */ */
+/* OBSOLETE   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end)) */
+/* OBSOLETE     { */
+/* OBSOLETE       sal = find_pc_line (func_addr, 0); */
+/* OBSOLETE       if (sal.end && sal.end < func_end) */
+/* OBSOLETE 	return sal.end; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   if (target_read_memory (pc, (char *) &op[0], 8)) */
+/* OBSOLETE     return pc;			/* Can't access it -- assume no prologue. */ */
+/* OBSOLETE  */
+/* OBSOLETE   while (1) */
+/* OBSOLETE     { */
+/* OBSOLETE       opl = (unsigned long) read_memory_integer (pc, 4); */
+/* OBSOLETE       opr = (unsigned long) read_memory_integer (pc + 4, 4); */
+/* OBSOLETE  */
+/* OBSOLETE       fm0 = (opl & OP_MASK_FM_BIT); */
+/* OBSOLETE       fm1 = (opr & OP_MASK_FM_BIT); */
+/* OBSOLETE  */
+/* OBSOLETE       cc0 = (opl & OP_MASK_CC_BITS); */
+/* OBSOLETE       cc1 = (opr & OP_MASK_CC_BITS); */
+/* OBSOLETE  */
+/* OBSOLETE       opl = (opl & OP_MASK_SUB_INST); */
+/* OBSOLETE       opr = (opr & OP_MASK_SUB_INST); */
+/* OBSOLETE  */
+/* OBSOLETE       if (fm0 && fm1) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* long instruction (opl contains the opcode) */ */
+/* OBSOLETE 	  if (((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_SP_IMM) &&		/* add sp,sp,imm */ */
+/* OBSOLETE 	      ((opl & OP_MASK_ALL_BUT_IMM) != OP_ADD_R22_SP_IMM) &&	/* add r22,sp,imm */ */
+/* OBSOLETE 	      ((opl & OP_MASK_OP_AND_RB) != OP_STW_SP_IMM) &&	/* stw Ra, @(sp,imm) */ */
+/* OBSOLETE 	      ((opl & OP_MASK_OP_AND_RB) != OP_ST2W_SP_IMM))	/* st2w Ra, @(sp,imm) */ */
+/* OBSOLETE 	    break; */
+/* OBSOLETE 	} */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* short instructions */ */
+/* OBSOLETE 	  if (fm0 && !fm1) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      op1 = opr; */
+/* OBSOLETE 	      op2 = opl; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      op1 = opl; */
+/* OBSOLETE 	      op2 = opr; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  if (check_prologue (op1)) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      if (!check_prologue (op2)) */
+/* OBSOLETE 		{ */
+/* OBSOLETE 		  /* if the previous opcode was really part of the prologue */ */
+/* OBSOLETE 		  /* and not just a NOP, then we want to break after both instructions */ */
+/* OBSOLETE 		  if ((op1 & OP_MASK_OPCODE) != OP_NOP) */
+/* OBSOLETE 		    pc += 8; */
+/* OBSOLETE 		  break; */
+/* OBSOLETE 		} */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else */
+/* OBSOLETE 	    break; */
+/* OBSOLETE 	} */
+/* OBSOLETE       pc += 8; */
+/* OBSOLETE     } */
+/* OBSOLETE   return pc; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static int end_of_stack; */
+/* OBSOLETE  */
+/* OBSOLETE /* Given a GDB frame, determine the address of the calling function's frame. */
+/* OBSOLETE    This will be used to create a new GDB frame struct, and then */
+/* OBSOLETE    INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame. */
+/* OBSOLETE  */ */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR */
+/* OBSOLETE d30v_frame_chain (struct frame_info *frame) */
+/* OBSOLETE { */
+/* OBSOLETE   struct frame_saved_regs fsr; */
+/* OBSOLETE  */
+/* OBSOLETE   d30v_frame_find_saved_regs (frame, &fsr); */
+/* OBSOLETE  */
+/* OBSOLETE   if (end_of_stack) */
+/* OBSOLETE     return (CORE_ADDR) 0; */
+/* OBSOLETE  */
+/* OBSOLETE   if (frame->return_pc == IMEM_START) */
+/* OBSOLETE     return (CORE_ADDR) 0; */
+/* OBSOLETE  */
+/* OBSOLETE   if (!fsr.regs[FP_REGNUM]) */
+/* OBSOLETE     { */
+/* OBSOLETE       if (!fsr.regs[SP_REGNUM] || fsr.regs[SP_REGNUM] == STACK_START) */
+/* OBSOLETE 	return (CORE_ADDR) 0; */
+/* OBSOLETE  */
+/* OBSOLETE       return fsr.regs[SP_REGNUM]; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   if (!read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4)) */
+/* OBSOLETE     return (CORE_ADDR) 0; */
+/* OBSOLETE  */
+/* OBSOLETE   return read_memory_unsigned_integer (fsr.regs[FP_REGNUM], 4); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static int next_addr, uses_frame; */
+/* OBSOLETE static int frame_size; */
+/* OBSOLETE  */
+/* OBSOLETE static int */
+/* OBSOLETE prologue_find_regs (unsigned long op, struct frame_saved_regs *fsr, */
+/* OBSOLETE 		    CORE_ADDR addr) */
+/* OBSOLETE { */
+/* OBSOLETE   int n; */
+/* OBSOLETE   int offset; */
+/* OBSOLETE  */
+/* OBSOLETE   /* add sp,sp,imm -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
+/* OBSOLETE     { */
+/* OBSOLETE       offset = EXTRACT_IMM6 (op); */
+/* OBSOLETE       /*next_addr += offset; */ */
+/* OBSOLETE       frame_size += -offset; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* add r22,sp,imm -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
+/* OBSOLETE     { */
+/* OBSOLETE       offset = EXTRACT_IMM6 (op); */
+/* OBSOLETE       next_addr = (offset - frame_size); */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw Ra, @(fp, offset) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_OP_AND_RB) == OP_STW_FP_IMM) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       offset = EXTRACT_IMM6 (op); */
+/* OBSOLETE       fsr->regs[n] = (offset - frame_size); */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw Ra, @(fp, r0) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_FP_R0) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = (-frame_size); */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* or  fp,0,sp -- observed */ */
+/* OBSOLETE   if ((op == OP_OR_FP_R0_SP) || */
+/* OBSOLETE       (op == OP_OR_FP_SP_R0) || */
+/* OBSOLETE       (op == OP_OR_FP_IMM0_SP)) */
+/* OBSOLETE     { */
+/* OBSOLETE       uses_frame = 1; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* nop */ */
+/* OBSOLETE   if ((op & OP_MASK_OPCODE) == OP_NOP) */
+/* OBSOLETE     return 1; */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw Ra,@(r22+,r0) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_R22P_R0) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = next_addr; */
+/* OBSOLETE       next_addr += 4; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE #if 0				/* subsumed in pattern above */ */
+/* OBSOLETE   /* stw fp,@(r22+,r0) -- observed */ */
+/* OBSOLETE   if (op == OP_STW_FP_R22P_R0) */
+/* OBSOLETE     { */
+/* OBSOLETE       fsr->regs[FP_REGNUM] = next_addr;		/* XXX */ */
+/* OBSOLETE       next_addr += 4; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw r62,@(r22+,r0) -- observed */ */
+/* OBSOLETE   if (op == OP_STW_LR_R22P_R0) */
+/* OBSOLETE     { */
+/* OBSOLETE       fsr->regs[LR_REGNUM] = next_addr; */
+/* OBSOLETE       next_addr += 4; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE #endif */
+/* OBSOLETE   /* st2w Ra,@(r22+,r0) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_R22P_R0) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = next_addr; */
+/* OBSOLETE       fsr->regs[n + 1] = next_addr + 4; */
+/* OBSOLETE       next_addr += 8; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw  rn, @(sp-) */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SPM) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = next_addr; */
+/* OBSOLETE       next_addr -= 4; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w  Ra, @(sp-) */ */
+/* OBSOLETE   else if ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SPM) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = next_addr; */
+/* OBSOLETE       fsr->regs[n + 1] = next_addr + 4; */
+/* OBSOLETE       next_addr -= 8; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* sub  sp,sp,imm */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_SUB_SP_IMM) */
+/* OBSOLETE     { */
+/* OBSOLETE       offset = EXTRACT_IMM6 (op); */
+/* OBSOLETE       frame_size += -offset; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* st  rn, @(sp,0) -- observed */ */
+/* OBSOLETE   if (((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_R0) || */
+/* OBSOLETE       ((op & OP_MASK_ALL_BUT_RA) == OP_STW_SP_IMM0)) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = (-frame_size); */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* st2w  rn, @(sp,0) */ */
+/* OBSOLETE   if (((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_R0) || */
+/* OBSOLETE       ((op & OP_MASK_ALL_BUT_RA) == OP_ST2W_SP_IMM0)) */
+/* OBSOLETE     { */
+/* OBSOLETE       n = EXTRACT_RA (op); */
+/* OBSOLETE       fsr->regs[n] = (-frame_size); */
+/* OBSOLETE       fsr->regs[n + 1] = (-frame_size) + 4; */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* stw fp,@(sp,imm) -- observed */ */
+/* OBSOLETE   if ((op & OP_MASK_ALL_BUT_IMM) == OP_STW_FP_SP_IMM) */
+/* OBSOLETE     { */
+/* OBSOLETE       offset = EXTRACT_IMM6 (op); */
+/* OBSOLETE       fsr->regs[FP_REGNUM] = (offset - frame_size); */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     } */
+/* OBSOLETE   return 0; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, the */
+/* OBSOLETE    addresses of the saved registers of frame described by FRAME_INFO. */
+/* OBSOLETE    This includes special registers such as pc and fp saved in special */
+/* OBSOLETE    ways in the stack frame.  sp is even more special: the address we */
+/* OBSOLETE    return for it IS the sp for the next frame. */ */
+/* OBSOLETE void */
+/* OBSOLETE d30v_frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr) */
+/* OBSOLETE { */
+/* OBSOLETE   CORE_ADDR fp, pc; */
+/* OBSOLETE   unsigned long opl, opr; */
+/* OBSOLETE   unsigned long op1, op2; */
+/* OBSOLETE   unsigned long fm0, fm1; */
+/* OBSOLETE   int i; */
+/* OBSOLETE  */
+/* OBSOLETE   fp = fi->frame; */
+/* OBSOLETE   memset (fsr, 0, sizeof (*fsr)); */
+/* OBSOLETE   next_addr = 0; */
+/* OBSOLETE   frame_size = 0; */
+/* OBSOLETE   end_of_stack = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   uses_frame = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   d30v_frame_find_saved_regs_offsets (fi, fsr); */
+/* OBSOLETE  */
+/* OBSOLETE   fi->size = frame_size; */
+/* OBSOLETE  */
+/* OBSOLETE   if (!fp) */
+/* OBSOLETE     fp = read_register (SP_REGNUM); */
+/* OBSOLETE  */
+/* OBSOLETE   for (i = 0; i < NUM_REGS - 1; i++) */
+/* OBSOLETE     if (fsr->regs[i]) */
+/* OBSOLETE       { */
+/* OBSOLETE 	fsr->regs[i] = fsr->regs[i] + fp + frame_size; */
+/* OBSOLETE       } */
+/* OBSOLETE  */
+/* OBSOLETE   if (fsr->regs[LR_REGNUM]) */
+/* OBSOLETE     fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4); */
+/* OBSOLETE   else */
+/* OBSOLETE     fi->return_pc = read_register (LR_REGNUM); */
+/* OBSOLETE  */
+/* OBSOLETE   /* the SP is not normally (ever?) saved, but check anyway */ */
+/* OBSOLETE   if (!fsr->regs[SP_REGNUM]) */
+/* OBSOLETE     { */
+/* OBSOLETE       /* if the FP was saved, that means the current FP is valid, */ */
+/* OBSOLETE       /* otherwise, it isn't being used, so we use the SP instead */ */
+/* OBSOLETE       if (uses_frame) */
+/* OBSOLETE 	fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size; */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  fsr->regs[SP_REGNUM] = fp + fi->size; */
+/* OBSOLETE 	  fi->frameless = 1; */
+/* OBSOLETE 	  fsr->regs[FP_REGNUM] = 0; */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_frame_find_saved_regs_offsets (struct frame_info *fi, */
+/* OBSOLETE 				    struct frame_saved_regs *fsr) */
+/* OBSOLETE { */
+/* OBSOLETE   CORE_ADDR fp, pc; */
+/* OBSOLETE   unsigned long opl, opr; */
+/* OBSOLETE   unsigned long op1, op2; */
+/* OBSOLETE   unsigned long fm0, fm1; */
+/* OBSOLETE   int i; */
+/* OBSOLETE  */
+/* OBSOLETE   fp = fi->frame; */
+/* OBSOLETE   memset (fsr, 0, sizeof (*fsr)); */
+/* OBSOLETE   next_addr = 0; */
+/* OBSOLETE   frame_size = 0; */
+/* OBSOLETE   end_of_stack = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   pc = get_pc_function_start (fi->pc); */
+/* OBSOLETE  */
+/* OBSOLETE   uses_frame = 0; */
+/* OBSOLETE   while (pc < fi->pc) */
+/* OBSOLETE     { */
+/* OBSOLETE       opl = (unsigned long) read_memory_integer (pc, 4); */
+/* OBSOLETE       opr = (unsigned long) read_memory_integer (pc + 4, 4); */
+/* OBSOLETE  */
+/* OBSOLETE       fm0 = (opl & OP_MASK_FM_BIT); */
+/* OBSOLETE       fm1 = (opr & OP_MASK_FM_BIT); */
+/* OBSOLETE  */
+/* OBSOLETE       opl = (opl & OP_MASK_SUB_INST); */
+/* OBSOLETE       opr = (opr & OP_MASK_SUB_INST); */
+/* OBSOLETE  */
+/* OBSOLETE       if (fm0 && fm1) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* long instruction */ */
+/* OBSOLETE 	  if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_SP_IMM) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* add sp,sp,n */ */
+/* OBSOLETE 	      long offset = EXTRACT_IMM32 (opl, opr); */
+/* OBSOLETE 	      frame_size += -offset; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_ADD_R22_SP_IMM) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* add r22,sp,offset */ */
+/* OBSOLETE 	      long offset = EXTRACT_IMM32 (opl, opr); */
+/* OBSOLETE 	      next_addr = (offset - frame_size); */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else if ((opl & OP_MASK_OP_AND_RB) == OP_STW_SP_IMM) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* st Ra, @(sp,imm) */ */
+/* OBSOLETE 	      long offset = EXTRACT_IMM32 (opl, opr); */
+/* OBSOLETE 	      short n = EXTRACT_RA (opl); */
+/* OBSOLETE 	      fsr->regs[n] = (offset - frame_size); */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else if ((opl & OP_MASK_OP_AND_RB) == OP_ST2W_SP_IMM) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* st2w Ra, @(sp,offset) */ */
+/* OBSOLETE 	      long offset = EXTRACT_IMM32 (opl, opr); */
+/* OBSOLETE 	      short n = EXTRACT_RA (opl); */
+/* OBSOLETE 	      fsr->regs[n] = (offset - frame_size); */
+/* OBSOLETE 	      fsr->regs[n + 1] = (offset - frame_size) + 4; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else if ((opl & OP_MASK_ALL_BUT_IMM) == OP_OR_SP_R0_IMM) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      end_of_stack = 1; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else */
+/* OBSOLETE 	    break; */
+/* OBSOLETE 	} */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* short instructions */ */
+/* OBSOLETE 	  if (fm0 && !fm1) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      op2 = opl; */
+/* OBSOLETE 	      op1 = opr; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      op1 = opl; */
+/* OBSOLETE 	      op2 = opr; */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  if (!prologue_find_regs (op1, fsr, pc) || !prologue_find_regs (op2, fsr, pc)) */
+/* OBSOLETE 	    break; */
+/* OBSOLETE 	} */
+/* OBSOLETE       pc += 8; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE #if 0 */
+/* OBSOLETE   fi->size = frame_size; */
+/* OBSOLETE  */
+/* OBSOLETE   if (!fp) */
+/* OBSOLETE     fp = read_register (SP_REGNUM); */
+/* OBSOLETE  */
+/* OBSOLETE   for (i = 0; i < NUM_REGS - 1; i++) */
+/* OBSOLETE     if (fsr->regs[i]) */
+/* OBSOLETE       { */
+/* OBSOLETE 	fsr->regs[i] = fsr->regs[i] + fp + frame_size; */
+/* OBSOLETE       } */
+/* OBSOLETE  */
+/* OBSOLETE   if (fsr->regs[LR_REGNUM]) */
+/* OBSOLETE     fi->return_pc = read_memory_unsigned_integer (fsr->regs[LR_REGNUM], 4); */
+/* OBSOLETE   else */
+/* OBSOLETE     fi->return_pc = read_register (LR_REGNUM); */
+/* OBSOLETE  */
+/* OBSOLETE   /* the SP is not normally (ever?) saved, but check anyway */ */
+/* OBSOLETE   if (!fsr->regs[SP_REGNUM]) */
+/* OBSOLETE     { */
+/* OBSOLETE       /* if the FP was saved, that means the current FP is valid, */ */
+/* OBSOLETE       /* otherwise, it isn't being used, so we use the SP instead */ */
+/* OBSOLETE       if (uses_frame) */
+/* OBSOLETE 	fsr->regs[SP_REGNUM] = read_register (FP_REGNUM) + fi->size; */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  fsr->regs[SP_REGNUM] = fp + fi->size; */
+/* OBSOLETE 	  fi->frameless = 1; */
+/* OBSOLETE 	  fsr->regs[FP_REGNUM] = 0; */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE #endif */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_init_extra_frame_info (int fromleaf, struct frame_info *fi) */
+/* OBSOLETE { */
+/* OBSOLETE   struct frame_saved_regs dummy; */
+/* OBSOLETE  */
+/* OBSOLETE   if (fi->next && (fi->pc == 0)) */
+/* OBSOLETE     fi->pc = fi->next->return_pc; */
+/* OBSOLETE  */
+/* OBSOLETE   d30v_frame_find_saved_regs_offsets (fi, &dummy); */
+/* OBSOLETE  */
+/* OBSOLETE   if (uses_frame == 0) */
+/* OBSOLETE     fi->frameless = 1; */
+/* OBSOLETE   else */
+/* OBSOLETE     fi->frameless = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   if ((fi->next == 0) && (uses_frame == 0)) */
+/* OBSOLETE     /* innermost frame and it's "frameless", */
+/* OBSOLETE        so the fi->frame field is wrong, fix it! */ */
+/* OBSOLETE     fi->frame = read_sp (); */
+/* OBSOLETE  */
+/* OBSOLETE   if (dummy.regs[LR_REGNUM]) */
+/* OBSOLETE     { */
+/* OBSOLETE       /* it was saved, grab it! */ */
+/* OBSOLETE       dummy.regs[LR_REGNUM] += (fi->frame + frame_size); */
+/* OBSOLETE       fi->return_pc = read_memory_unsigned_integer (dummy.regs[LR_REGNUM], 4); */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     fi->return_pc = read_register (LR_REGNUM); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_init_frame_pc (int fromleaf, struct frame_info *prev) */
+/* OBSOLETE { */
+/* OBSOLETE   /* default value, put here so we can breakpoint on it and */
+/* OBSOLETE      see if the default value is really the right thing to use */ */
+/* OBSOLETE   prev->pc = (fromleaf ? SAVED_PC_AFTER_CALL (prev->next) : \ */
+/* OBSOLETE 	      prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ()); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void d30v_print_register (int regnum, int tabular); */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE d30v_print_register (int regnum, int tabular) */
+/* OBSOLETE { */
+/* OBSOLETE   if (regnum < A0_REGNUM) */
+/* OBSOLETE     { */
+/* OBSOLETE       if (tabular) */
+/* OBSOLETE 	printf_filtered ("%08lx", (long) read_register (regnum)); */
+/* OBSOLETE       else */
+/* OBSOLETE 	printf_filtered ("0x%lx	%ld", */
+/* OBSOLETE 			 (long) read_register (regnum), */
+/* OBSOLETE 			 (long) read_register (regnum)); */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     { */
+/* OBSOLETE       char regbuf[MAX_REGISTER_RAW_SIZE]; */
+/* OBSOLETE  */
+/* OBSOLETE       frame_register_read (selected_frame, regnum, regbuf); */
+/* OBSOLETE  */
+/* OBSOLETE       val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0, */
+/* OBSOLETE 		 gdb_stdout, 'x', 1, 0, Val_pretty_default); */
+/* OBSOLETE  */
+/* OBSOLETE       if (!tabular) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  printf_filtered ("	"); */
+/* OBSOLETE 	  val_print (REGISTER_VIRTUAL_TYPE (regnum), regbuf, 0, 0, */
+/* OBSOLETE 		     gdb_stdout, 'd', 1, 0, Val_pretty_default); */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE d30v_print_flags (void) */
+/* OBSOLETE { */
+/* OBSOLETE   long psw = read_register (PSW_REGNUM); */
+/* OBSOLETE   printf_filtered ("flags #1"); */
+/* OBSOLETE   printf_filtered ("   (sm) %d", (psw & PSW_SM) != 0); */
+/* OBSOLETE   printf_filtered ("   (ea) %d", (psw & PSW_EA) != 0); */
+/* OBSOLETE   printf_filtered ("   (db) %d", (psw & PSW_DB) != 0); */
+/* OBSOLETE   printf_filtered ("   (ds) %d", (psw & PSW_DS) != 0); */
+/* OBSOLETE   printf_filtered ("   (ie) %d", (psw & PSW_IE) != 0); */
+/* OBSOLETE   printf_filtered ("   (rp) %d", (psw & PSW_RP) != 0); */
+/* OBSOLETE   printf_filtered ("   (md) %d\n", (psw & PSW_MD) != 0); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("flags #2"); */
+/* OBSOLETE   printf_filtered ("   (f0) %d", (psw & PSW_F0) != 0); */
+/* OBSOLETE   printf_filtered ("   (f1) %d", (psw & PSW_F1) != 0); */
+/* OBSOLETE   printf_filtered ("   (f2) %d", (psw & PSW_F2) != 0); */
+/* OBSOLETE   printf_filtered ("   (f3) %d", (psw & PSW_F3) != 0); */
+/* OBSOLETE   printf_filtered ("    (s) %d", (psw & PSW_S) != 0); */
+/* OBSOLETE   printf_filtered ("    (v) %d", (psw & PSW_V) != 0); */
+/* OBSOLETE   printf_filtered ("   (va) %d", (psw & PSW_VA) != 0); */
+/* OBSOLETE   printf_filtered ("    (c) %d\n", (psw & PSW_C) != 0); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE print_flags_command (char *args, int from_tty) */
+/* OBSOLETE { */
+/* OBSOLETE   d30v_print_flags (); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_do_registers_info (int regnum, int fpregs) */
+/* OBSOLETE { */
+/* OBSOLETE   long long num1, num2; */
+/* OBSOLETE   long psw; */
+/* OBSOLETE  */
+/* OBSOLETE   if (regnum != -1) */
+/* OBSOLETE     { */
+/* OBSOLETE       if (REGISTER_NAME (0) == NULL || REGISTER_NAME (0)[0] == '\000') */
+/* OBSOLETE 	return; */
+/* OBSOLETE  */
+/* OBSOLETE       printf_filtered ("%s ", REGISTER_NAME (regnum)); */
+/* OBSOLETE       d30v_print_register (regnum, 0); */
+/* OBSOLETE  */
+/* OBSOLETE       printf_filtered ("\n"); */
+/* OBSOLETE       return; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* Have to print all the registers.  Format them nicely.  */ */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("PC="); */
+/* OBSOLETE   print_address (read_pc (), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" PSW="); */
+/* OBSOLETE   d30v_print_register (PSW_REGNUM, 1); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" BPC="); */
+/* OBSOLETE   print_address (read_register (BPC_REGNUM), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" BPSW="); */
+/* OBSOLETE   d30v_print_register (BPSW_REGNUM, 1); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("DPC="); */
+/* OBSOLETE   print_address (read_register (DPC_REGNUM), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" DPSW="); */
+/* OBSOLETE   d30v_print_register (DPSW_REGNUM, 1); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" IBA="); */
+/* OBSOLETE   print_address (read_register (IBA_REGNUM), gdb_stdout); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("RPT_C="); */
+/* OBSOLETE   d30v_print_register (RPT_C_REGNUM, 1); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" RPT_S="); */
+/* OBSOLETE   print_address (read_register (RPT_S_REGNUM), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" RPT_E="); */
+/* OBSOLETE   print_address (read_register (RPT_E_REGNUM), gdb_stdout); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("MOD_S="); */
+/* OBSOLETE   print_address (read_register (MOD_S_REGNUM), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" MOD_E="); */
+/* OBSOLETE   print_address (read_register (MOD_E_REGNUM), gdb_stdout); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("EIT_VB="); */
+/* OBSOLETE   print_address (read_register (EIT_VB_REGNUM), gdb_stdout); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" INT_S="); */
+/* OBSOLETE   d30v_print_register (INT_S_REGNUM, 1); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered (" INT_M="); */
+/* OBSOLETE   d30v_print_register (INT_M_REGNUM, 1); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   d30v_print_flags (); */
+/* OBSOLETE   for (regnum = 0; regnum <= 63;) */
+/* OBSOLETE     { */
+/* OBSOLETE       int i; */
+/* OBSOLETE  */
+/* OBSOLETE       printf_filtered ("R%d-R%d ", regnum, regnum + 7); */
+/* OBSOLETE       if (regnum < 10) */
+/* OBSOLETE 	printf_filtered (" "); */
+/* OBSOLETE       if (regnum + 7 < 10) */
+/* OBSOLETE 	printf_filtered (" "); */
+/* OBSOLETE  */
+/* OBSOLETE       for (i = 0; i < 8; i++) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  printf_filtered (" "); */
+/* OBSOLETE 	  d30v_print_register (regnum++, 1); */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       printf_filtered ("\n"); */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("A0-A1    "); */
+/* OBSOLETE  */
+/* OBSOLETE   d30v_print_register (A0_REGNUM, 1); */
+/* OBSOLETE   printf_filtered ("    "); */
+/* OBSOLETE   d30v_print_register (A1_REGNUM, 1); */
+/* OBSOLETE   printf_filtered ("\n"); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR */
+/* OBSOLETE d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun, */
+/* OBSOLETE 		     int nargs, struct value **args, */
+/* OBSOLETE 		     struct type *type, int gcc_p) */
+/* OBSOLETE { */
+/* OBSOLETE   int regnum; */
+/* OBSOLETE   CORE_ADDR sp; */
+/* OBSOLETE   char buffer[MAX_REGISTER_RAW_SIZE]; */
+/* OBSOLETE   struct frame_info *frame = get_current_frame (); */
+/* OBSOLETE   frame->dummy = start_sp; */
+/* OBSOLETE   /*start_sp |= DMEM_START; */ */
+/* OBSOLETE  */
+/* OBSOLETE   sp = start_sp; */
+/* OBSOLETE   for (regnum = 0; regnum < NUM_REGS; regnum++) */
+/* OBSOLETE     { */
+/* OBSOLETE       sp -= REGISTER_RAW_SIZE (regnum); */
+/* OBSOLETE       store_address (buffer, REGISTER_RAW_SIZE (regnum), read_register (regnum)); */
+/* OBSOLETE       write_memory (sp, buffer, REGISTER_RAW_SIZE (regnum)); */
+/* OBSOLETE     } */
+/* OBSOLETE   write_register (SP_REGNUM, (LONGEST) sp); */
+/* OBSOLETE   /* now we need to load LR with the return address */ */
+/* OBSOLETE   write_register (LR_REGNUM, (LONGEST) d30v_call_dummy_address ()); */
+/* OBSOLETE   return sp; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE d30v_pop_dummy_frame (struct frame_info *fi) */
+/* OBSOLETE { */
+/* OBSOLETE   CORE_ADDR sp = fi->dummy; */
+/* OBSOLETE   int regnum; */
+/* OBSOLETE  */
+/* OBSOLETE   for (regnum = 0; regnum < NUM_REGS; regnum++) */
+/* OBSOLETE     { */
+/* OBSOLETE       sp -= REGISTER_RAW_SIZE (regnum); */
+/* OBSOLETE       write_register (regnum, read_memory_unsigned_integer (sp, REGISTER_RAW_SIZE (regnum))); */
+/* OBSOLETE     } */
+/* OBSOLETE   flush_cached_frames ();	/* needed? */ */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR */
+/* OBSOLETE d30v_push_arguments (int nargs, struct value **args, CORE_ADDR sp, */
+/* OBSOLETE 		     int struct_return, CORE_ADDR struct_addr) */
+/* OBSOLETE { */
+/* OBSOLETE   int i, len, index = 0, regnum = 2; */
+/* OBSOLETE   char buffer[4], *contents; */
+/* OBSOLETE   LONGEST val; */
+/* OBSOLETE   CORE_ADDR ptrs[10]; */
+/* OBSOLETE  */
+/* OBSOLETE #if 0 */
+/* OBSOLETE   /* Pass 1. Put all large args on stack */ */
+/* OBSOLETE   for (i = 0; i < nargs; i++) */
+/* OBSOLETE     { */
+/* OBSOLETE       struct value *arg = args[i]; */
+/* OBSOLETE       struct type *arg_type = check_typedef (VALUE_TYPE (arg)); */
+/* OBSOLETE       len = TYPE_LENGTH (arg_type); */
+/* OBSOLETE       contents = VALUE_CONTENTS (arg); */
+/* OBSOLETE       val = extract_signed_integer (contents, len); */
+/* OBSOLETE       if (len > 4) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* put on stack and pass pointers */ */
+/* OBSOLETE 	  sp -= len; */
+/* OBSOLETE 	  write_memory (sp, contents, len); */
+/* OBSOLETE 	  ptrs[index++] = sp; */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE #endif */
+/* OBSOLETE   index = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   for (i = 0; i < nargs; i++) */
+/* OBSOLETE     { */
+/* OBSOLETE       struct value *arg = args[i]; */
+/* OBSOLETE       struct type *arg_type = check_typedef (VALUE_TYPE (arg)); */
+/* OBSOLETE       len = TYPE_LENGTH (arg_type); */
+/* OBSOLETE       contents = VALUE_CONTENTS (arg); */
+/* OBSOLETE       if (len > 4) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  /* we need multiple registers */ */
+/* OBSOLETE 	  int ndx; */
+/* OBSOLETE  */
+/* OBSOLETE 	  for (ndx = 0; len > 0; ndx += 8, len -= 8) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      if (regnum & 1) */
+/* OBSOLETE 		regnum++;	/* all args > 4 bytes start in even register */ */
+/* OBSOLETE  */
+/* OBSOLETE 	      if (regnum < 18) */
+/* OBSOLETE 		{ */
+/* OBSOLETE 		  val = extract_signed_integer (&contents[ndx], 4); */
+/* OBSOLETE 		  write_register (regnum++, val); */
+/* OBSOLETE  */
+/* OBSOLETE 		  if (len >= 8) */
+/* OBSOLETE 		    val = extract_signed_integer (&contents[ndx + 4], 4); */
+/* OBSOLETE 		  else */
+/* OBSOLETE 		    val = extract_signed_integer (&contents[ndx + 4], len - 4); */
+/* OBSOLETE 		  write_register (regnum++, val); */
+/* OBSOLETE 		} */
+/* OBSOLETE 	      else */
+/* OBSOLETE 		{ */
+/* OBSOLETE 		  /* no more registers available.  put it on the stack */ */
+/* OBSOLETE  */
+/* OBSOLETE 		  /* all args > 4 bytes are padded to a multiple of 8 bytes */
+/* OBSOLETE 		     and start on an 8 byte boundary */ */
+/* OBSOLETE 		  if (sp & 7) */
+/* OBSOLETE 		    sp -= (sp & 7);	/* align it */ */
+/* OBSOLETE  */
+/* OBSOLETE 		  sp -= ((len + 7) & ~7);	/* allocate space */ */
+/* OBSOLETE 		  write_memory (sp, &contents[ndx], len); */
+/* OBSOLETE 		  break; */
+/* OBSOLETE 		} */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	} */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  if (regnum < 18) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      val = extract_signed_integer (contents, len); */
+/* OBSOLETE 	      write_register (regnum++, val); */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  else */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* all args are padded to a multiple of 4 bytes (at least) */ */
+/* OBSOLETE 	      sp -= ((len + 3) & ~3); */
+/* OBSOLETE 	      write_memory (sp, contents, len); */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE   if (sp & 7) */
+/* OBSOLETE     /* stack pointer is not on an 8 byte boundary -- align it */ */
+/* OBSOLETE     sp -= (sp & 7); */
+/* OBSOLETE   return sp; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* pick an out-of-the-way place to set the return value */ */
+/* OBSOLETE /* for an inferior function call.  The link register is set to this  */ */
+/* OBSOLETE /* value and a momentary breakpoint is set there.  When the breakpoint */ */
+/* OBSOLETE /* is hit, the dummy frame is popped and the previous environment is */ */
+/* OBSOLETE /* restored. */ */
+/* OBSOLETE  */
+/* OBSOLETE CORE_ADDR */
+/* OBSOLETE d30v_call_dummy_address (void) */
+/* OBSOLETE { */
+/* OBSOLETE   CORE_ADDR entry; */
+/* OBSOLETE   struct minimal_symbol *sym; */
+/* OBSOLETE  */
+/* OBSOLETE   entry = entry_point_address (); */
+/* OBSOLETE  */
+/* OBSOLETE   if (entry != 0) */
+/* OBSOLETE     return entry; */
+/* OBSOLETE  */
+/* OBSOLETE   sym = lookup_minimal_symbol ("_start", NULL, symfile_objfile); */
+/* OBSOLETE  */
+/* OBSOLETE   if (!sym || MSYMBOL_TYPE (sym) != mst_text) */
+/* OBSOLETE     return 0; */
+/* OBSOLETE   else */
+/* OBSOLETE     return SYMBOL_VALUE_ADDRESS (sym); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Given a return value in `regbuf' with a type `valtype',  */
+/* OBSOLETE    extract and copy its value into `valbuf'.  */ */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_extract_return_value (struct type *valtype, char regbuf[REGISTER_BYTES], */
+/* OBSOLETE 			   char *valbuf) */
+/* OBSOLETE { */
+/* OBSOLETE   memcpy (valbuf, regbuf + REGISTER_BYTE (2), TYPE_LENGTH (valtype)); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* The following code implements access to, and display of, the D30V's */
+/* OBSOLETE    instruction trace buffer.  The buffer consists of 64K or more */
+/* OBSOLETE    4-byte words of data, of which each words includes an 8-bit count, */
+/* OBSOLETE    an 8-bit segment number, and a 16-bit instruction address. */
+/* OBSOLETE  */
+/* OBSOLETE    In theory, the trace buffer is continuously capturing instruction */
+/* OBSOLETE    data that the CPU presents on its "debug bus", but in practice, the */
+/* OBSOLETE    ROMified GDB stub only enables tracing when it continues or steps */
+/* OBSOLETE    the program, and stops tracing when the program stops; so it */
+/* OBSOLETE    actually works for GDB to read the buffer counter out of memory and */
+/* OBSOLETE    then read each trace word.  The counter records where the tracing */
+/* OBSOLETE    stops, but there is no record of where it started, so we remember */
+/* OBSOLETE    the PC when we resumed and then search backwards in the trace */
+/* OBSOLETE    buffer for a word that includes that address.  This is not perfect, */
+/* OBSOLETE    because you will miss trace data if the resumption PC is the target */
+/* OBSOLETE    of a branch.  (The value of the buffer counter is semi-random, any */
+/* OBSOLETE    trace data from a previous program stop is gone.)  */ */
+/* OBSOLETE  */
+/* OBSOLETE /* The address of the last word recorded in the trace buffer.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define DBBC_ADDR (0xd80000) */
+/* OBSOLETE  */
+/* OBSOLETE /* The base of the trace buffer, at least for the "Board_0".  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define TRACE_BUFFER_BASE (0xf40000) */
+/* OBSOLETE  */
+/* OBSOLETE static void trace_command (char *, int); */
+/* OBSOLETE  */
+/* OBSOLETE static void untrace_command (char *, int); */
+/* OBSOLETE  */
+/* OBSOLETE static void trace_info (char *, int); */
+/* OBSOLETE  */
+/* OBSOLETE static void tdisassemble_command (char *, int); */
+/* OBSOLETE  */
+/* OBSOLETE static void display_trace (int, int); */
+/* OBSOLETE  */
+/* OBSOLETE /* True when instruction traces are being collected.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static int tracing; */
+/* OBSOLETE  */
+/* OBSOLETE /* Remembered PC.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static CORE_ADDR last_pc; */
+/* OBSOLETE  */
+/* OBSOLETE /* True when trace output should be displayed whenever program stops.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static int trace_display; */
+/* OBSOLETE  */
+/* OBSOLETE /* True when trace listing should include source lines.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static int default_trace_show_source = 1; */
+/* OBSOLETE  */
+/* OBSOLETE struct trace_buffer */
+/* OBSOLETE   { */
+/* OBSOLETE     int size; */
+/* OBSOLETE     short *counts; */
+/* OBSOLETE     CORE_ADDR *addrs; */
+/* OBSOLETE   } */
+/* OBSOLETE trace_data; */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE trace_command (char *args, int from_tty) */
+/* OBSOLETE { */
+/* OBSOLETE   /* Clear the host-side trace buffer, allocating space if needed.  */ */
+/* OBSOLETE   trace_data.size = 0; */
+/* OBSOLETE   if (trace_data.counts == NULL) */
+/* OBSOLETE     trace_data.counts = (short *) xmalloc (65536 * sizeof (short)); */
+/* OBSOLETE   if (trace_data.addrs == NULL) */
+/* OBSOLETE     trace_data.addrs = (CORE_ADDR *) xmalloc (65536 * sizeof (CORE_ADDR)); */
+/* OBSOLETE  */
+/* OBSOLETE   tracing = 1; */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("Tracing is now on.\n"); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE untrace_command (char *args, int from_tty) */
+/* OBSOLETE { */
+/* OBSOLETE   tracing = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("Tracing is now off.\n"); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE trace_info (char *args, int from_tty) */
+/* OBSOLETE { */
+/* OBSOLETE   int i; */
+/* OBSOLETE  */
+/* OBSOLETE   if (trace_data.size) */
+/* OBSOLETE     { */
+/* OBSOLETE       printf_filtered ("%d entries in trace buffer:\n", trace_data.size); */
+/* OBSOLETE  */
+/* OBSOLETE       for (i = 0; i < trace_data.size; ++i) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  printf_filtered ("%d: %d instruction%s at 0x%s\n", */
+/* OBSOLETE 			   i, trace_data.counts[i], */
+/* OBSOLETE 			   (trace_data.counts[i] == 1 ? "" : "s"), */
+/* OBSOLETE 			   paddr_nz (trace_data.addrs[i])); */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     printf_filtered ("No entries in trace buffer.\n"); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("Tracing is currently %s.\n", (tracing ? "on" : "off")); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Print the instruction at address MEMADDR in debugged memory, */
+/* OBSOLETE    on STREAM.  Returns length of the instruction, in bytes.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static int */
+/* OBSOLETE print_insn (CORE_ADDR memaddr, struct ui_file *stream) */
+/* OBSOLETE { */
+/* OBSOLETE   /* If there's no disassembler, something is very wrong.  */ */
+/* OBSOLETE   if (tm_print_insn == NULL) */
+/* OBSOLETE     internal_error (__FILE__, __LINE__, */
+/* OBSOLETE 		    "print_insn: no disassembler"); */
+/* OBSOLETE  */
+/* OBSOLETE   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) */
+/* OBSOLETE     tm_print_insn_info.endian = BFD_ENDIAN_BIG; */
+/* OBSOLETE   else */
+/* OBSOLETE     tm_print_insn_info.endian = BFD_ENDIAN_LITTLE; */
+/* OBSOLETE   return TARGET_PRINT_INSN (memaddr, &tm_print_insn_info); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_eva_prepare_to_trace (void) */
+/* OBSOLETE { */
+/* OBSOLETE   if (!tracing) */
+/* OBSOLETE     return; */
+/* OBSOLETE  */
+/* OBSOLETE   last_pc = read_register (PC_REGNUM); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Collect trace data from the target board and format it into a form */
+/* OBSOLETE    more useful for display.  */ */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_eva_get_trace_data (void) */
+/* OBSOLETE { */
+/* OBSOLETE   int count, i, j, oldsize; */
+/* OBSOLETE   int trace_addr, trace_seg, trace_cnt, next_cnt; */
+/* OBSOLETE   unsigned int last_trace, trace_word, next_word; */
+/* OBSOLETE   unsigned int *tmpspace; */
+/* OBSOLETE  */
+/* OBSOLETE   if (!tracing) */
+/* OBSOLETE     return; */
+/* OBSOLETE  */
+/* OBSOLETE   tmpspace = xmalloc (65536 * sizeof (unsigned int)); */
+/* OBSOLETE  */
+/* OBSOLETE   last_trace = read_memory_unsigned_integer (DBBC_ADDR, 2) << 2; */
+/* OBSOLETE  */
+/* OBSOLETE   /* Collect buffer contents from the target, stopping when we reach */
+/* OBSOLETE      the word recorded when execution resumed.  */ */
+/* OBSOLETE  */
+/* OBSOLETE   count = 0; */
+/* OBSOLETE   while (last_trace > 0) */
+/* OBSOLETE     { */
+/* OBSOLETE       QUIT; */
+/* OBSOLETE       trace_word = */
+/* OBSOLETE 	read_memory_unsigned_integer (TRACE_BUFFER_BASE + last_trace, 4); */
+/* OBSOLETE       trace_addr = trace_word & 0xffff; */
+/* OBSOLETE       last_trace -= 4; */
+/* OBSOLETE       /* Ignore an apparently nonsensical entry.  */ */
+/* OBSOLETE       if (trace_addr == 0xffd5) */
+/* OBSOLETE 	continue; */
+/* OBSOLETE       tmpspace[count++] = trace_word; */
+/* OBSOLETE       if (trace_addr == last_pc) */
+/* OBSOLETE 	break; */
+/* OBSOLETE       if (count > 65535) */
+/* OBSOLETE 	break; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* Move the data to the host-side trace buffer, adjusting counts to */
+/* OBSOLETE      include the last instruction executed and transforming the address */
+/* OBSOLETE      into something that GDB likes.  */ */
+/* OBSOLETE  */
+/* OBSOLETE   for (i = 0; i < count; ++i) */
+/* OBSOLETE     { */
+/* OBSOLETE       trace_word = tmpspace[i]; */
+/* OBSOLETE       next_word = ((i == 0) ? 0 : tmpspace[i - 1]); */
+/* OBSOLETE       trace_addr = trace_word & 0xffff; */
+/* OBSOLETE       next_cnt = (next_word >> 24) & 0xff; */
+/* OBSOLETE       j = trace_data.size + count - i - 1; */
+/* OBSOLETE       trace_data.addrs[j] = (trace_addr << 2) + 0x1000000; */
+/* OBSOLETE       trace_data.counts[j] = next_cnt + 1; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   oldsize = trace_data.size; */
+/* OBSOLETE   trace_data.size += count; */
+/* OBSOLETE  */
+/* OBSOLETE   xfree (tmpspace); */
+/* OBSOLETE  */
+/* OBSOLETE   if (trace_display) */
+/* OBSOLETE     display_trace (oldsize, trace_data.size); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE tdisassemble_command (char *arg, int from_tty) */
+/* OBSOLETE { */
+/* OBSOLETE   int i, count; */
+/* OBSOLETE   CORE_ADDR low, high; */
+/* OBSOLETE   char *space_index; */
+/* OBSOLETE  */
+/* OBSOLETE   if (!arg) */
+/* OBSOLETE     { */
+/* OBSOLETE       low = 0; */
+/* OBSOLETE       high = trace_data.size; */
+/* OBSOLETE     } */
+/* OBSOLETE   else if (!(space_index = (char *) strchr (arg, ' '))) */
+/* OBSOLETE     { */
+/* OBSOLETE       low = parse_and_eval_address (arg); */
+/* OBSOLETE       high = low + 5; */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     { */
+/* OBSOLETE       /* Two arguments.  */ */
+/* OBSOLETE       *space_index = '\0'; */
+/* OBSOLETE       low = parse_and_eval_address (arg); */
+/* OBSOLETE       high = parse_and_eval_address (space_index + 1); */
+/* OBSOLETE       if (high < low) */
+/* OBSOLETE 	high = low; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("Dump of trace from %s to %s:\n", */
+/* OBSOLETE 		   paddr_u (low), */
+/* OBSOLETE 		   paddr_u (high)); */
+/* OBSOLETE  */
+/* OBSOLETE   display_trace (low, high); */
+/* OBSOLETE  */
+/* OBSOLETE   printf_filtered ("End of trace dump.\n"); */
+/* OBSOLETE   gdb_flush (gdb_stdout); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE display_trace (int low, int high) */
+/* OBSOLETE { */
+/* OBSOLETE   int i, count, trace_show_source, first, suppress; */
+/* OBSOLETE   CORE_ADDR next_address; */
+/* OBSOLETE  */
+/* OBSOLETE   trace_show_source = default_trace_show_source; */
+/* OBSOLETE   if (!have_full_symbols () && !have_partial_symbols ()) */
+/* OBSOLETE     { */
+/* OBSOLETE       trace_show_source = 0; */
+/* OBSOLETE       printf_filtered ("No symbol table is loaded.  Use the \"file\" command.\n"); */
+/* OBSOLETE       printf_filtered ("Trace will not display any source.\n"); */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   first = 1; */
+/* OBSOLETE   suppress = 0; */
+/* OBSOLETE   for (i = low; i < high; ++i) */
+/* OBSOLETE     { */
+/* OBSOLETE       next_address = trace_data.addrs[i]; */
+/* OBSOLETE       count = trace_data.counts[i]; */
+/* OBSOLETE       while (count-- > 0) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  QUIT; */
+/* OBSOLETE 	  if (trace_show_source) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      struct symtab_and_line sal, sal_prev; */
+/* OBSOLETE  */
+/* OBSOLETE 	      sal_prev = find_pc_line (next_address - 4, 0); */
+/* OBSOLETE 	      sal = find_pc_line (next_address, 0); */
+/* OBSOLETE  */
+/* OBSOLETE 	      if (sal.symtab) */
+/* OBSOLETE 		{ */
+/* OBSOLETE 		  if (first || sal.line != sal_prev.line) */
+/* OBSOLETE 		    print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); */
+/* OBSOLETE 		  suppress = 0; */
+/* OBSOLETE 		} */
+/* OBSOLETE 	      else */
+/* OBSOLETE 		{ */
+/* OBSOLETE 		  if (!suppress) */
+/* OBSOLETE 		    /* FIXME-32x64--assumes sal.pc fits in long.  */ */
+/* OBSOLETE 		    printf_filtered ("No source file for address %s.\n", */
+/* OBSOLETE 				 local_hex_string ((unsigned long) sal.pc)); */
+/* OBSOLETE 		  suppress = 1; */
+/* OBSOLETE 		} */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	  first = 0; */
+/* OBSOLETE 	  print_address (next_address, gdb_stdout); */
+/* OBSOLETE 	  printf_filtered (":"); */
+/* OBSOLETE 	  printf_filtered ("\t"); */
+/* OBSOLETE 	  wrap_here ("    "); */
+/* OBSOLETE 	  next_address = next_address + print_insn (next_address, gdb_stdout); */
+/* OBSOLETE 	  printf_filtered ("\n"); */
+/* OBSOLETE 	  gdb_flush (gdb_stdout); */
+/* OBSOLETE 	} */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE extern void (*target_resume_hook) (void); */
+/* OBSOLETE extern void (*target_wait_loop_hook) (void); */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE _initialize_d30v_tdep (void) */
+/* OBSOLETE { */
+/* OBSOLETE   tm_print_insn = print_insn_d30v; */
+/* OBSOLETE  */
+/* OBSOLETE   target_resume_hook = d30v_eva_prepare_to_trace; */
+/* OBSOLETE   target_wait_loop_hook = d30v_eva_get_trace_data; */
+/* OBSOLETE  */
+/* OBSOLETE   add_info ("flags", print_flags_command, "Print d30v flags."); */
+/* OBSOLETE  */
+/* OBSOLETE   add_com ("trace", class_support, trace_command, */
+/* OBSOLETE 	   "Enable tracing of instruction execution."); */
+/* OBSOLETE  */
+/* OBSOLETE   add_com ("untrace", class_support, untrace_command, */
+/* OBSOLETE 	   "Disable tracing of instruction execution."); */
+/* OBSOLETE  */
+/* OBSOLETE   add_com ("tdisassemble", class_vars, tdisassemble_command, */
+/* OBSOLETE 	   "Disassemble the trace buffer.\n\ */
+/* OBSOLETE Two optional arguments specify a range of trace buffer entries\n\ */
+/* OBSOLETE as reported by info trace (NOT addresses!)."); */
+/* OBSOLETE  */
+/* OBSOLETE   add_info ("trace", trace_info, */
+/* OBSOLETE 	    "Display info about the trace data buffer."); */
+/* OBSOLETE  */
+/* OBSOLETE   add_show_from_set (add_set_cmd ("tracedisplay", no_class, */
+/* OBSOLETE 				  var_integer, (char *) &trace_display, */
+/* OBSOLETE 			     "Set automatic display of trace.\n", &setlist), */
+/* OBSOLETE 		     &showlist); */
+/* OBSOLETE   add_show_from_set (add_set_cmd ("tracesource", no_class, */
+/* OBSOLETE 			   var_integer, (char *) &default_trace_show_source, */
+/* OBSOLETE 		      "Set display of source code with trace.\n", &setlist), */
+/* OBSOLETE 		     &showlist); */
+/* OBSOLETE  */
+/* OBSOLETE } */
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index f315557..bd20184 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -76,13 +76,25 @@
    different names than GDB does, and don't support all the registers
    either. So, typing "info reg sp" becomes an "A7". */
 
-static char *dbug_regnames[NUM_REGS] =
+static const char *
+dbug_regname (int index)
 {
-  "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-  "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
-  "SR", "PC"
-  /* no float registers */
-};
+  static char *regnames[] =
+  {
+    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
+    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
+    "SR", "PC"
+    /* no float registers */
+  };
+
+  if ((index >= (sizeof (regnames) / sizeof (regnames[0]))) 
+      || (index < 0) || (index >= NUM_REGS))
+    return NULL;
+  else
+    return regnames[index];
+
+}
+
 static struct target_ops dbug_ops;
 static struct monitor_ops dbug_cmds;
 
@@ -135,7 +147,8 @@
   dbug_cmds.cmd_end = NULL;	/* optional command terminator */
   dbug_cmds.target = &dbug_ops;	/* target operations */
   dbug_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  dbug_cmds.regnames = dbug_regnames;	/* registers names */
+  dbug_cmds.regnames = NULL;	/* registers names */
+  dbug_cmds.regname = dbug_regname;
   dbug_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
 }				/* init_debug_ops */
 
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 430e3f5..1d6024a 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -42,7 +42,7 @@
 #include <fcntl.h>
 #endif
 
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "gdb_stat.h"
 #include "symtab.h"
 #include "breakpoint.h"
diff --git a/gdb/defs.h b/gdb/defs.h
index a83b6e9..89a90d6 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -39,6 +39,8 @@
 #include <unistd.h>
 #endif
 
+#include "gdb_locale.h"
+
 /* For ``enum target_signal''.  */
 #include "gdb/signals.h"
 
@@ -207,7 +209,7 @@
     language_c,			/* C */
     language_cplus,		/* C++ */
     language_java,		/* Java */
-    language_chill,		/* Chill */
+    /* OBSOLETE language_chill,	*/	/* Chill */
     language_fortran,		/* Fortran */
     language_m2,		/* Modula-2 */
     language_asm,		/* Assembly language */
@@ -222,6 +224,14 @@
     unspecified_precision
   };
 
+/* A generic, not quite boolean, enumeration.  */
+enum auto_boolean
+{
+  AUTO_BOOLEAN_TRUE,
+  AUTO_BOOLEAN_FALSE,
+  AUTO_BOOLEAN_AUTO
+};
+
 /* the cleanup list records things that have to be undone
    if an error happens (descriptors to be closed, memory to be freed, etc.)
    Each link in the chain records a function to call and an
@@ -290,9 +300,9 @@
 
 extern int inside_main_func (CORE_ADDR pc);
 
-/* From ch-lang.c, for the moment. (FIXME) */
+/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
 
-extern char *chill_demangle (const char *);
+/* OBSOLETE extern char *chill_demangle (const char *); */
 
 /* From utils.c */
 
@@ -525,6 +535,8 @@
 
 extern char *gdb_readline (char *);
 
+extern char *gdb_readline_wrapper (char *);
+
 extern char *command_line_input (char *, int, char *);
 
 extern void print_prompt (void);
@@ -836,10 +848,11 @@
    "libiberty.h". */
 extern void xfree (void *);
 
-/* Utility macro to allocate typed memory.  Avoids errors like
+/* Utility macros to allocate typed memory.  Avoids errors like
    ``struct foo *foo = xmalloc (sizeof bar)'' and ``struct foo *foo =
    (struct foo *) xmalloc (sizeof bar)''.  */
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
+#define XCALLOC(NMEMB, TYPE) ((TYPE*) xcalloc ((NMEMB), sizeof (TYPE)))
 
 /* Like asprintf/vasprintf but get an internal_error if the call
    fails. */
@@ -1058,9 +1071,9 @@
 
 /* In findvar.c.  */
 
-extern LONGEST extract_signed_integer (void *, int);
+extern LONGEST extract_signed_integer (const void *, int);
 
-extern ULONGEST extract_unsigned_integer (void *, int);
+extern ULONGEST extract_unsigned_integer (const void *, int);
 
 extern int extract_long_unsigned_integer (void *, int, LONGEST *);
 
@@ -1143,7 +1156,6 @@
 
 extern int (*ui_load_progress_hook) (const char *section, unsigned long num);
 
-extern void (*selected_frame_level_changed_hook) (int level);
 
 /* Inhibit window interface if non-zero. */
 
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 577ddb1..4693072 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,121 @@
+2002-08-23  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbint.texinfo (Target Architecture Definition): Update
+	STORE_RETURN_VALUE, mention regcache.
+
+2002-08-21  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Target Architecture Definition): Document
+	print_registers_info.  Note that DO_REGISTERS_INFO is deprecated.
+
+2002-08-19  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.texinfo (Remote Protocol): Reformat.  Use cross references.
+	Fix minor typos.  Add index entries.
+
+2002-08-18  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.texinfo (Data): Add ``Vector Unit'' to menu.
+
+2002-08-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Target Architecture Definition): Document
+	PRINT_VECTOR_INFO.
+	* gdb.texinfo (Vector Unit): Document "info vectors" command.
+
+2002-08-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.texinfo (Maintenance Commands): Document "maint print
+	registers", "maint print raw-registers" and "maint print
+	cooked-registers".
+
+2002-08-08  Grace Sainsbury  <graces@redhat.com>
+
+	From Mark Salter:            
+	* gdb.texinfo (Protocol): Document T packet extension to
+	allow watchpoint address reporting.
+
+2002-08-03  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.texinfo (Dump/Restore Files): Move `[]' to outside of @var.
+
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
+	to CHILL.
+
+2002-08-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Coding): Revise section "Include Files".
+
+2002-07-24  Andrew Cagney  <cagney@redhat.com>
+
+	* gdbint.texinfo: Obsolete references to m88k.
+	* gdb.texinfo: Ditto.
+
+2002-07-10  Joel Brobecker  <brobecker@gnat.com>
+
+	* gdbint.texinfo (Create a release candiate): Add the location
+	where the proper version of autoconf can be retrieved.
+
+2002-07-09  Don Howard  <dhoward@redhat.com>
+
+	* gdb.texinfo (Command Files): Further describe the behavior of
+	sourced command files.
+
+2002-06-27  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (User Interface): ISO C rather than ISO-C.
+	(Coding): Clarify ISO C version that GDB assumes.
+
+2002-06-26  Tom Tromey  <tromey@redhat.com>
+
+	* gdbint.texinfo (User Interface): Mention add_setshow_cmd and
+	add_setshow_cmd_full.
+
+2002-06-25  Don Howard  <dhoward@redhat.com>
+
+	* gdb.texinfo (Memory Region Attributes): Document new behavior
+	for 'mem' command.
+
+2002-06-11  Jim Blandy  <jimb@redhat.com>
+
+	* gdb.texinfo (Symbols): Update documentation for `info source'
+	command.
+
+	* gdb.texinfo (Macros): Call the command `info macro', not
+	`show macro'.
+
+2002-06-09  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Coding): Add section ``Per-architecture module
+	data''.
+
+2002-06-09  Mark Kettenis  <kettenis@gnu.org>
+
+	* gdbint.texinfo (Target Architecture Definition): Document
+	GDB_OSABI_GO32 and GDB_OSABI_NETWARE.
+
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Releasing GDB): Fix typos in @itemize @bullet
+	lists.
+
+2002-06-08  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Releasing GDB): Revise the section ``Cut the
+	Branch''.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Target Architecture Definition): Add section
+	``Converting an existing Target Architecture to Multi-arch''.
+
+2002-05-30  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdbint.texinfo (Releasing GDB): Rename ``Obsoleting any code''
+	to ``Obsoleting code''.  Revise.
+
 2002-05-17  Jim Blandy  <jimb@redhat.com>
 
 	* gdb.texinfo (C Preprocessor Macros): New chapter.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5d84047..84ed89e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -194,10 +194,12 @@
 For more information, see @ref{Support,,Supported languages}.
 For more information, see @ref{C,,C and C++}.
 
-@cindex Chill
+@c OBSOLETE @cindex Chill
 @cindex Modula-2
-Support for Modula-2 and Chill is partial.  For information on Modula-2,
-see @ref{Modula-2,,Modula-2}.  For information on Chill, see @ref{Chill}.
+Support for Modula-2
+@c OBSOLETE and Chill
+is partial.  For information on Modula-2, see @ref{Modula-2,,Modula-2}.
+@c OBSOLETE For information on Chill, see @ref{Chill}.
 
 @cindex Pascal
 Debugging Pascal programs which use sets, subranges, file variables, or
@@ -4416,6 +4418,7 @@
 * Convenience Vars::            Convenience variables
 * Registers::                   Registers
 * Floating Point Hardware::     Floating point hardware
+* Vector Unit::                 Vector Unit
 * Memory Region Attributes::    Memory region attributes
 * Dump/Restore Files::          Copy between memory and a file
 @end menu
@@ -5581,6 +5584,20 @@
 the ARM and x86 machines.
 @end table
 
+@node Vector Unit
+@section Vector Unit
+@cindex vector unit
+
+Depending on the configuration, @value{GDBN} may be able to give you
+more information about the status of the vector unit.
+
+@table @code
+@kindex info vector
+@item info vector
+Display information about the vector unit.  The exact contents and
+layout vary depending on the hardware.
+@end table
+
 @node Memory Region Attributes
 @section Memory region attributes 
 @cindex memory region attributes
@@ -5601,9 +5618,11 @@
 
 @table @code
 @kindex mem
-@item mem @var{address1} @var{address2} @var{attributes}@dots{}
-Define memory region bounded by @var{address1} and @var{address2}
-with attributes @var{attributes}@dots{}.
+@item mem @var{lower} @var{upper} @var{attributes}@dots{}
+Define memory region bounded by @var{lower} and @var{upper} with
+attributes @var{attributes}@dots{}.  Note that @var{upper} == 0 is a
+special case: it is treated as the the target's maximum memory address.
+(0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.)
 
 @kindex delete mem
 @item delete mem @var{nums}@dots{}
@@ -5769,7 +5788,7 @@
 @item dump tekhex value @var{filename} @var{expression}
 Dump value of @var{expression} into tekhex format file @var{filename}.
 
-@item restore @var{filename} @var{[binary]} @var{bias} @var{start} @var{end}
+@item restore @var{filename} [@var{binary}] @var{bias} @var{start} @var{end}
 Restore the contents of file @var{filename} into memory.  The @code{restore}
 command can automatically recognize any known bfd file format, except for
 raw binary.  To restore a raw binary file you must use the optional argument
@@ -5843,10 +5862,10 @@
 parse the result, @var{expression} need not be a valid expression; it
 can be any string of tokens.
 
-@kindex show macro
+@kindex info macro
 @cindex macro definition, showing
 @cindex definition, showing a macro's
-@item show macro @var{macro}
+@item info macro @var{macro}
 Show the definition of the macro named @var{macro}, and describe the
 source location where that definition was established.
 
@@ -5941,10 +5960,10 @@
 10        printf ("Hello, world!\n");
 11      #undef N
 12        printf ("We're so creative.\n");
-(gdb) show macro ADD
+(gdb) info macro ADD
 Defined at /home/jimb/gdb/macros/play/sample.c:5
 #define ADD(x) (M + x)
-(gdb) show macro Q
+(gdb) info macro Q
 Defined at /home/jimb/gdb/macros/play/sample.h:1
   included at /home/jimb/gdb/macros/play/sample.c:2
 #define Q <
@@ -5977,7 +5996,7 @@
 At line 10, the definition of the macro @code{N} at line 9 is in force:
 
 @smallexample
-(gdb) show macro N
+(gdb) info macro N
 Defined at /home/jimb/gdb/macros/play/sample.c:9
 #define N 28
 (gdb) macro expand N Q M
@@ -5995,13 +6014,13 @@
 (gdb) next
 Hello, world!
 12        printf ("We're so creative.\n");
-(gdb) show macro N
+(gdb) info macro N
 The symbol `N' has no definition as a C/C++ preprocessor macro
 at /home/jimb/gdb/macros/play/sample.c:12
 (gdb) next
 We're so creative.
 14        printf ("Goodbye, world!\n");
-(gdb) show macro N
+(gdb) info macro N
 Defined at /home/jimb/gdb/macros/play/sample.c:13
 #define N 1729
 (gdb) macro expand N Q M
@@ -7112,10 +7131,10 @@
 @itemx .F
 Fortran source file
 
-@item .ch
-@itemx .c186
-@itemx .c286
-CHILL source file
+@c OBSOLETE @item .ch
+@c OBSOLETE @itemx .c186
+@c OBSOLETE @itemx .c286
+@c OBSOLETE CHILL source file
 
 @item .mod
 Modula-2 source file
@@ -7388,7 +7407,9 @@
 @node Support
 @section Supported languages
 
-@value{GDBN} supports C, C@t{++}, Fortran, Java, Chill, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Fortran, Java, 
+@c OBSOLETE Chill,
+assembly, and Modula-2.
 @c This is false ...
 Some @value{GDBN} features may be used in expressions regardless of the
 language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7407,7 +7428,7 @@
 @menu
 * C::           C and C@t{++}
 * Modula-2::    Modula-2
-* Chill::        Chill
+@c OBSOLETE * Chill::        Chill
 @end menu
 
 @node C
@@ -8373,504 +8394,504 @@
 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
 interpreted as the beginning of a comment.  Use @code{<>} instead.
 
-@node Chill
-@subsection Chill
-
-The extensions made to @value{GDBN} to support Chill only support output
-from the @sc{gnu} Chill compiler.  Other Chill compilers are not currently
-supported, and attempting to debug executables produced by them is most
-likely to give an error as @value{GDBN} reads in the executable's symbol
-table.
-
-@c This used to say "... following Chill related topics ...", but since
-@c menus are not shown in the printed manual, it would look awkward.
-This section covers the Chill related topics and the features
-of @value{GDBN} which support these topics.
-
-@menu
-* How modes are displayed::        How modes are displayed
-* Locations::                        Locations and their accesses
-* Values and their Operations:: Values and their Operations
-* Chill type and range checks::
-* Chill defaults::
-@end menu
-
-@node How modes are displayed
-@subsubsection How modes are displayed
-
-The Chill Datatype- (Mode) support of @value{GDBN} is directly related
-with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
-slightly from the standard specification of the Chill language. The
-provided modes are:
-
-@c FIXME: this @table's contents effectively disable @code by using @r
-@c on every @item.  So why does it need @code?
-@table @code
-@item @r{@emph{Discrete modes:}}
-@itemize @bullet
-@item
-@emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
-UINT, LONG, ULONG},
-@item
-@emph{Boolean Mode} which is predefined by @code{BOOL},
-@item
-@emph{Character Mode} which is predefined by @code{CHAR},
-@item
-@emph{Set Mode} which is displayed by the keyword @code{SET}.
-@smallexample
-(@value{GDBP}) ptype x
-type = SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-If the type is an unnumbered set the set element values are omitted.
-@item
-@emph{Range Mode} which is displayed by
-@smallexample
-@code{type = <basemode>(<lower bound> : <upper bound>)}
-@end smallexample
-where @code{<lower bound>, <upper bound>} can be of any discrete literal
-expression (e.g. set element names).
-@end itemize
-
-@item @r{@emph{Powerset Mode:}}
-A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
-the member mode of the powerset.  The member mode can be any discrete mode.
-@smallexample
-(@value{GDBP}) ptype x
-type = POWERSET SET (egon, hugo, otto)
-@end smallexample
-
-@item @r{@emph{Reference Modes:}}
-@itemize @bullet
-@item
-@emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
-followed by the mode name to which the reference is bound.
-@item
-@emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
-@end itemize
-
-@item @r{@emph{Procedure mode}}
-The procedure mode is displayed by @code{type = PROC(<parameter list>)
-<return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
-list>} is a list of the parameter modes.  @code{<return mode>} indicates
-the mode of the result of the procedure if any.  The exceptionlist lists
-all possible exceptions which can be raised by the procedure.
-
-@ignore
-@item @r{@emph{Instance mode}}
-The instance mode is represented by a structure, which has a static
-type, and is therefore not really of interest.
-@end ignore
-
-@item @r{@emph{Synchronization Modes:}}
-@itemize @bullet
-@item
-@emph{Event Mode} which is displayed by
-@smallexample
-@code{EVENT (<event length>)}
-@end smallexample
-where @code{(<event length>)} is optional.
-@item
-@emph{Buffer Mode} which is displayed by
-@smallexample
-@code{BUFFER (<buffer length>)<buffer element mode>}
-@end smallexample
-where @code{(<buffer length>)} is optional.
-@end itemize
-
-@item @r{@emph{Timing Modes:}}
-@itemize @bullet
-@item
-@emph{Duration Mode} which is predefined by @code{DURATION}
-@item
-@emph{Absolute Time Mode} which is predefined by @code{TIME}
-@end itemize
-
-@item @r{@emph{Real Modes:}}
-Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
-
-@item @r{@emph{String Modes:}}
-@itemize @bullet
-@item
-@emph{Character String Mode} which is displayed by
-@smallexample
-@code{CHARS(<string length>)}
-@end smallexample
-followed by the keyword @code{VARYING} if the String Mode is a varying
-mode
-@item
-@emph{Bit String Mode} which is displayed by
-@smallexample
-@code{BOOLS(<string
-length>)}
-@end smallexample
-@end itemize
-
-@item @r{@emph{Array Mode:}}
-The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
-followed by the element mode (which may in turn be an array mode).
-@smallexample
-(@value{GDBP}) ptype x
-type = ARRAY (1:42)
-          ARRAY (1:20)
-             SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-
-@item @r{@emph{Structure Mode}}
-The Structure mode is displayed by the keyword @code{STRUCT(<field
-list>)}.  The @code{<field list>} consists of names and modes of fields
-of the structure.  Variant structures have the keyword @code{CASE <field>
-OF <variant fields> ESAC} in their field list.  Since the current version
-of the GNU Chill compiler doesn't implement tag processing (no runtime
-checks of variant fields, and therefore no debugging info), the output
-always displays all variant fields.
-@smallexample
-(@value{GDBP}) ptype str
-type = STRUCT (
-    as x,
-    bs x,
-    CASE bs OF
-    (karli):
-        cs a
-    (ott):
-        ds x
-    ESAC
-)
-@end smallexample
-@end table
-
-@node Locations
-@subsubsection Locations and their accesses
-
-A location in Chill is an object which can contain values.
-
-A value of a location is generally accessed by the (declared) name of
-the location.  The output conforms to the specification of values in
-Chill programs.  How values are specified
-is the topic of the next section, @ref{Values and their Operations}.
-
-The pseudo-location @code{RESULT} (or @code{result}) can be used to
-display or change the result of a currently-active procedure:
-
-@smallexample
-set result := EXPR
-@end smallexample
-
-@noindent
-This does the same as the Chill action @code{RESULT EXPR} (which
-is not available in @value{GDBN}).
-
-Values of reference mode locations are printed by @code{PTR(<hex
-value>)} in case of a free reference mode, and by @code{(REF <reference
-mode>) (<hex-value>)} in case of a bound reference.  @code{<hex value>}
-represents the address where the reference points to.  To access the
-value of the location referenced by the pointer, use the dereference
-operator @samp{->}.
-
-Values of procedure mode locations are displayed by
-@smallexample
-@code{@{ PROC
-(<argument modes> ) <return mode> @} <address> <name of procedure
-location>}
-@end smallexample
-@code{<argument modes>} is a list of modes according to the parameter
-specification of the procedure and @code{<address>} shows the address of
-the entry point.
-
-@ignore
-Locations of instance modes are displayed just like a structure with two
-fields specifying the @emph{process type} and the @emph{copy number} of
-the investigated instance location@footnote{This comes from the current
-implementation of instances.  They are implemented as a structure (no
-na).  The output should be something like @code{[<name of the process>;
-<instance number>]}.}.  The field names are @code{__proc_type} and
-@code{__proc_copy}.
-
-Locations of synchronization modes are displayed like a structure with
-the field name @code{__event_data} in case of a event mode location, and
-like a structure with the field @code{__buffer_data} in case of a buffer
-mode location (refer to previous paragraph).
-
-Structure Mode locations are printed by @code{[.<field name>: <value>,
-...]}.  The @code{<field name>} corresponds to the structure mode
-definition and the layout of @code{<value>} varies depending of the mode
-of the field.  If the investigated structure mode location is of variant
-structure mode, the variant parts of the structure are enclosed in curled
-braces (@samp{@{@}}).  Fields enclosed by @samp{@{,@}} are residing
-on the same memory location and represent the current values of the
-memory location in their specific modes.  Since no tag processing is done
-all variants are displayed. A variant field is printed by
-@code{(<variant name>) = .<field name>: <value>}.  (who implements the
-stuff ???)
-@smallexample
-(@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
-[.cs: []], (susi) = [.ds: susi]}]
-@end smallexample
-@end ignore
-
-Substructures of string mode-, array mode- or structure mode-values
-(e.g. array slices, fields of structure locations) are accessed using
-certain operations which are described in the next section, @ref{Values
-and their Operations}.
-
-A location value may be interpreted as having a different mode using the
-location conversion.  This mode conversion is written as @code{<mode
-name>(<location>)}.  The user has to consider that the sizes of the modes
-have to be equal otherwise an error occurs.  Furthermore, no range
-checking of the location against the destination mode is performed, and
-therefore the result can be quite confusing.
-
-@smallexample
-(@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
-@end smallexample
-
-@node Values and their Operations
-@subsubsection Values and their Operations
-
-Values are used to alter locations, to investigate complex structures in
-more detail or to filter relevant information out of a large amount of
-data.  There are several (mode dependent) operations defined which enable
-such investigations.  These operations are not only applicable to
-constant values but also to locations, which can become quite useful
-when debugging complex structures.  During parsing the command line
-(e.g. evaluating an expression) @value{GDBN} treats location names as
-the values behind these locations.
-
-This section describes how values have to be specified and which
-operations are legal to be used with such values.
-
-@table @code
-@item Literal Values
-Literal values are specified in the same manner as in @sc{gnu} Chill programs.
-For detailed specification refer to the @sc{gnu} Chill implementation Manual
-chapter 1.5.
-@c FIXME: if the Chill Manual is a Texinfo documents, the above should
-@c be converted to a @ref.
-
-@ignore
-@itemize @bullet
-@item
-@emph{Integer Literals} are specified in the same manner as in Chill
-programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
-@item
-@emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
-@item
-@emph{Character Literals} are defined by @code{'<character>'}. (e.g.
-@code{'M'})
-@item
-@emph{Set Literals} are defined by a name which was specified in a set
-mode.  The value delivered by a Set Literal is the set value.  This is
-comparable to an enumeration in C/C@t{++} language.
-@item
-@emph{Emptiness Literal} is predefined by @code{NULL}.  The value of the
-emptiness literal delivers either the empty reference value, the empty
-procedure value or the empty instance value.
-
-@item
-@emph{Character String Literals} are defined by a sequence of characters
-enclosed in single- or double quotes.  If a single- or double quote has
-to be part of the string literal it has to be stuffed (specified twice).
-@item
-@emph{Bitstring Literals} are specified in the same manner as in Chill
-programs (refer z200/88 chpt 5.2.4.8).
-@item
-@emph{Floating point literals} are specified in the same manner as in
-(gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
-@end itemize
-@end ignore
-
-@item Tuple Values
-A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
-name>} can be omitted if the mode of the tuple is unambiguous.  This
-unambiguity is derived from the context of a evaluated expression.
-@code{<tuple>} can be one of the following:
-
-@itemize @bullet
-@item @emph{Powerset Tuple}
-@item @emph{Array Tuple}
-@item @emph{Structure Tuple}
-Powerset tuples, array tuples and structure tuples are specified in the
-same manner as in Chill programs refer to z200/88 chpt 5.2.5.
-@end itemize
-
-@item String Element Value
-A string element value is specified by
-@smallexample
-@code{<string value>(<index>)}
-@end smallexample
-where @code{<index>} is a integer expression.  It delivers a character
-value which is equivalent to the character indexed by @code{<index>} in
-the string.
-
-@item String Slice Value
-A string slice value is specified by @code{<string value>(<slice
-spec>)}, where @code{<slice spec>} can be either a range of integer
-expressions or specified by @code{<start expr> up <size>}.
-@code{<size>} denotes the number of elements which the slice contains.
-The delivered value is a string value, which is part of the specified
-string.
-
-@item Array Element Values
-An array element value is specified by @code{<array value>(<expr>)} and
-delivers a array element value of the mode of the specified array.
-
-@item Array Slice Values
-An array slice is specified by @code{<array value>(<slice spec>)}, where
-@code{<slice spec>} can be either a range specified by expressions or by
-@code{<start expr> up <size>}.  @code{<size>} denotes the number of
-arrayelements the slice contains.  The delivered value is an array value
-which is part of the specified array.
-
-@item Structure Field Values
-A structure field value is derived by @code{<structure value>.<field
-name>}, where @code{<field name>} indicates the name of a field specified
-in the mode definition of the structure.  The mode of the delivered value
-corresponds to this mode definition in the structure definition.
-
-@item Procedure Call Value
-The procedure call value is derived from the return value of the
-procedure@footnote{If a procedure call is used for instance in an
-expression, then this procedure is called with all its side
-effects.  This can lead to confusing results if used carelessly.}.
-
-Values of duration mode locations are represented by @code{ULONG} literals.
-
-Values of time mode locations appear as
-@smallexample
-@code{TIME(<secs>:<nsecs>)}
-@end smallexample
-
-
-@ignore
-This is not implemented yet:
-@item Built-in Value
-@noindent
-The following built in functions are provided:
-
-@table @code
-@item @code{ADDR()}
-@item @code{NUM()}
-@item @code{PRED()}
-@item @code{SUCC()}
-@item @code{ABS()}
-@item @code{CARD()}
-@item @code{MAX()}
-@item @code{MIN()}
-@item @code{SIZE()}
-@item @code{UPPER()}
-@item @code{LOWER()}
-@item @code{LENGTH()}
-@item @code{SIN()}
-@item @code{COS()}
-@item @code{TAN()}
-@item @code{ARCSIN()}
-@item @code{ARCCOS()}
-@item @code{ARCTAN()}
-@item @code{EXP()}
-@item @code{LN()}
-@item @code{LOG()}
-@item @code{SQRT()}
-@end table
-
-For a detailed description refer to the GNU Chill implementation manual
-chapter 1.6.
-@end ignore
-
-@item Zero-adic Operator Value
-The zero-adic operator value is derived from the instance value for the
-current active process.
-
-@item Expression Values
-The value delivered by an expression is the result of the evaluation of
-the specified expression.  If there are error conditions (mode
-incompatibility, etc.) the evaluation of expressions is aborted with a
-corresponding error message.  Expressions may be parenthesised which
-causes the evaluation of this expression before any other expression
-which uses the result of the parenthesised expression.  The following
-operators are supported by @value{GDBN}:
-
-@table @code
-@item @code{OR, ORIF, XOR}
-@itemx @code{AND, ANDIF}
-@itemx @code{NOT}
-Logical operators defined over operands of boolean mode.
-
-@item @code{=, /=}
-Equality and inequality operators defined over all modes.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Relational operators defined over predefined modes.
-
-@item @code{+, -}
-@itemx @code{*, /, MOD, REM}
-Arithmetic operators defined over predefined modes.
-
-@item @code{-}
-Change sign operator.
-
-@item @code{//}
-String concatenation operator.
-
-@item @code{()}
-String repetition operator.
-
-@item @code{->}
-Referenced location operator which can be used either to take the
-address of a location (@code{->loc}), or to dereference a reference
-location (@code{loc->}).
-
-@item @code{OR, XOR}
-@itemx @code{AND}
-@itemx @code{NOT}
-Powerset and bitstring operators.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Powerset inclusion operators.
-
-@item @code{IN}
-Membership operator.
-@end table
-@end table
-
-@node Chill type and range checks
-@subsubsection Chill type and range checks
-
-@value{GDBN} considers two Chill variables mode equivalent if the sizes
-of the two modes are equal.  This rule applies recursively to more
-complex datatypes which means that complex modes are treated
-equivalent if all element modes (which also can be complex modes like
-structures, arrays, etc.) have the same size.
-
-Range checking is done on all mathematical operations, assignment, array
-index bounds and all built in procedures.
-
-Strong type checks are forced using the @value{GDBN} command @code{set
-check strong}.  This enforces strong type and range checks on all
-operations where Chill constructs are used (expressions, built in
-functions, etc.) in respect to the semantics as defined in the z.200
-language specification.
-
-All checks can be disabled by the @value{GDBN} command @code{set check
-off}.
-
-@ignore
-@c Deviations from the Chill Standard Z200/88
-see last paragraph ?
-@end ignore
-
-@node Chill defaults
-@subsubsection Chill defaults
-
-If type and range checking are set automatically by @value{GDBN}, they
-both default to @code{on} whenever the working language changes to
-Chill.  This happens regardless of whether you or @value{GDBN}
-selected the working language.
-
-If you allow @value{GDBN} to set the language automatically, then entering
-code compiled from a file whose name ends with @file{.ch} sets the
-working language to Chill.  @xref{Automatically, ,Having @value{GDBN} set
-the language automatically}, for further details.
+@c OBSOLETE @node Chill
+@c OBSOLETE @subsection Chill
+@c OBSOLETE 
+@c OBSOLETE The extensions made to @value{GDBN} to support Chill only support output
+@c OBSOLETE from the @sc{gnu} Chill compiler.  Other Chill compilers are not currently
+@c OBSOLETE supported, and attempting to debug executables produced by them is most
+@c OBSOLETE likely to give an error as @value{GDBN} reads in the executable's symbol
+@c OBSOLETE table.
+@c OBSOLETE 
+@c OBSOLETE @c This used to say "... following Chill related topics ...", but since
+@c OBSOLETE @c menus are not shown in the printed manual, it would look awkward.
+@c OBSOLETE This section covers the Chill related topics and the features
+@c OBSOLETE of @value{GDBN} which support these topics.
+@c OBSOLETE 
+@c OBSOLETE @menu
+@c OBSOLETE * How modes are displayed::        How modes are displayed
+@c OBSOLETE * Locations::                        Locations and their accesses
+@c OBSOLETE * Values and their Operations:: Values and their Operations
+@c OBSOLETE * Chill type and range checks::
+@c OBSOLETE * Chill defaults::
+@c OBSOLETE @end menu
+@c OBSOLETE 
+@c OBSOLETE @node How modes are displayed
+@c OBSOLETE @subsubsection How modes are displayed
+@c OBSOLETE 
+@c OBSOLETE The Chill Datatype- (Mode) support of @value{GDBN} is directly related
+@c OBSOLETE with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
+@c OBSOLETE slightly from the standard specification of the Chill language. The
+@c OBSOLETE provided modes are:
+@c OBSOLETE 
+@c OBSOLETE @c FIXME: this @table's contents effectively disable @code by using @r
+@c OBSOLETE @c on every @item.  So why does it need @code?
+@c OBSOLETE @table @code
+@c OBSOLETE @item @r{@emph{Discrete modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
+@c OBSOLETE UINT, LONG, ULONG},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Mode} which is predefined by @code{BOOL},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Mode} which is predefined by @code{CHAR},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Mode} which is displayed by the keyword @code{SET}.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE If the type is an unnumbered set the set element values are omitted.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Range Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{type = <basemode>(<lower bound> : <upper bound>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<lower bound>, <upper bound>} can be of any discrete literal
+@c OBSOLETE expression (e.g. set element names).
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Powerset Mode:}}
+@c OBSOLETE A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
+@c OBSOLETE the member mode of the powerset.  The member mode can be any discrete mode.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = POWERSET SET (egon, hugo, otto)
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Reference Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
+@c OBSOLETE followed by the mode name to which the reference is bound.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Procedure mode}}
+@c OBSOLETE The procedure mode is displayed by @code{type = PROC(<parameter list>)
+@c OBSOLETE <return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
+@c OBSOLETE list>} is a list of the parameter modes.  @code{<return mode>} indicates
+@c OBSOLETE the mode of the result of the procedure if any.  The exceptionlist lists
+@c OBSOLETE all possible exceptions which can be raised by the procedure.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @item @r{@emph{Instance mode}}
+@c OBSOLETE The instance mode is represented by a structure, which has a static
+@c OBSOLETE type, and is therefore not really of interest.
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Synchronization Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Event Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{EVENT (<event length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<event length>)} is optional.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Buffer Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BUFFER (<buffer length>)<buffer element mode>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<buffer length>)} is optional.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Timing Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Duration Mode} which is predefined by @code{DURATION}
+@c OBSOLETE @item
+@c OBSOLETE @emph{Absolute Time Mode} which is predefined by @code{TIME}
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Real Modes:}}
+@c OBSOLETE Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{String Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{CHARS(<string length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE followed by the keyword @code{VARYING} if the String Mode is a varying
+@c OBSOLETE mode
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bit String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BOOLS(<string
+@c OBSOLETE length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Array Mode:}}
+@c OBSOLETE The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
+@c OBSOLETE followed by the element mode (which may in turn be an array mode).
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = ARRAY (1:42)
+@c OBSOLETE           ARRAY (1:20)
+@c OBSOLETE              SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @item @r{@emph{Structure Mode}}
+@c OBSOLETE The Structure mode is displayed by the keyword @code{STRUCT(<field
+@c OBSOLETE list>)}.  The @code{<field list>} consists of names and modes of fields
+@c OBSOLETE of the structure.  Variant structures have the keyword @code{CASE <field>
+@c OBSOLETE OF <variant fields> ESAC} in their field list.  Since the current version
+@c OBSOLETE of the GNU Chill compiler doesn't implement tag processing (no runtime
+@c OBSOLETE checks of variant fields, and therefore no debugging info), the output
+@c OBSOLETE always displays all variant fields.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype str
+@c OBSOLETE type = STRUCT (
+@c OBSOLETE     as x,
+@c OBSOLETE     bs x,
+@c OBSOLETE     CASE bs OF
+@c OBSOLETE     (karli):
+@c OBSOLETE         cs a
+@c OBSOLETE     (ott):
+@c OBSOLETE         ds x
+@c OBSOLETE     ESAC
+@c OBSOLETE )
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE @node Locations
+@c OBSOLETE @subsubsection Locations and their accesses
+@c OBSOLETE 
+@c OBSOLETE A location in Chill is an object which can contain values.
+@c OBSOLETE 
+@c OBSOLETE A value of a location is generally accessed by the (declared) name of
+@c OBSOLETE the location.  The output conforms to the specification of values in
+@c OBSOLETE Chill programs.  How values are specified
+@c OBSOLETE is the topic of the next section, @ref{Values and their Operations}.
+@c OBSOLETE 
+@c OBSOLETE The pseudo-location @code{RESULT} (or @code{result}) can be used to
+@c OBSOLETE display or change the result of a currently-active procedure:
+@c OBSOLETE 
+@c OBSOLETE @smallexample
+@c OBSOLETE set result := EXPR
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @noindent
+@c OBSOLETE This does the same as the Chill action @code{RESULT EXPR} (which
+@c OBSOLETE is not available in @value{GDBN}).
+@c OBSOLETE 
+@c OBSOLETE Values of reference mode locations are printed by @code{PTR(<hex
+@c OBSOLETE value>)} in case of a free reference mode, and by @code{(REF <reference
+@c OBSOLETE mode>) (<hex-value>)} in case of a bound reference.  @code{<hex value>}
+@c OBSOLETE represents the address where the reference points to.  To access the
+@c OBSOLETE value of the location referenced by the pointer, use the dereference
+@c OBSOLETE operator @samp{->}.
+@c OBSOLETE 
+@c OBSOLETE Values of procedure mode locations are displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{@{ PROC
+@c OBSOLETE (<argument modes> ) <return mode> @} <address> <name of procedure
+@c OBSOLETE location>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @code{<argument modes>} is a list of modes according to the parameter
+@c OBSOLETE specification of the procedure and @code{<address>} shows the address of
+@c OBSOLETE the entry point.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE Locations of instance modes are displayed just like a structure with two
+@c OBSOLETE fields specifying the @emph{process type} and the @emph{copy number} of
+@c OBSOLETE the investigated instance location@footnote{This comes from the current
+@c OBSOLETE implementation of instances.  They are implemented as a structure (no
+@c OBSOLETE na).  The output should be something like @code{[<name of the process>;
+@c OBSOLETE <instance number>]}.}.  The field names are @code{__proc_type} and
+@c OBSOLETE @code{__proc_copy}.
+@c OBSOLETE 
+@c OBSOLETE Locations of synchronization modes are displayed like a structure with
+@c OBSOLETE the field name @code{__event_data} in case of a event mode location, and
+@c OBSOLETE like a structure with the field @code{__buffer_data} in case of a buffer
+@c OBSOLETE mode location (refer to previous paragraph).
+@c OBSOLETE 
+@c OBSOLETE Structure Mode locations are printed by @code{[.<field name>: <value>,
+@c OBSOLETE ...]}.  The @code{<field name>} corresponds to the structure mode
+@c OBSOLETE definition and the layout of @code{<value>} varies depending of the mode
+@c OBSOLETE of the field.  If the investigated structure mode location is of variant
+@c OBSOLETE structure mode, the variant parts of the structure are enclosed in curled
+@c OBSOLETE braces (@samp{@{@}}).  Fields enclosed by @samp{@{,@}} are residing
+@c OBSOLETE on the same memory location and represent the current values of the
+@c OBSOLETE memory location in their specific modes.  Since no tag processing is done
+@c OBSOLETE all variants are displayed. A variant field is printed by
+@c OBSOLETE @code{(<variant name>) = .<field name>: <value>}.  (who implements the
+@c OBSOLETE stuff ???)
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
+@c OBSOLETE [.cs: []], (susi) = [.ds: susi]}]
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE Substructures of string mode-, array mode- or structure mode-values
+@c OBSOLETE (e.g. array slices, fields of structure locations) are accessed using
+@c OBSOLETE certain operations which are described in the next section, @ref{Values
+@c OBSOLETE and their Operations}.
+@c OBSOLETE 
+@c OBSOLETE A location value may be interpreted as having a different mode using the
+@c OBSOLETE location conversion.  This mode conversion is written as @code{<mode
+@c OBSOLETE name>(<location>)}.  The user has to consider that the sizes of the modes
+@c OBSOLETE have to be equal otherwise an error occurs.  Furthermore, no range
+@c OBSOLETE checking of the location against the destination mode is performed, and
+@c OBSOLETE therefore the result can be quite confusing.
+@c OBSOLETE 
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE @node Values and their Operations
+@c OBSOLETE @subsubsection Values and their Operations
+@c OBSOLETE 
+@c OBSOLETE Values are used to alter locations, to investigate complex structures in
+@c OBSOLETE more detail or to filter relevant information out of a large amount of
+@c OBSOLETE data.  There are several (mode dependent) operations defined which enable
+@c OBSOLETE such investigations.  These operations are not only applicable to
+@c OBSOLETE constant values but also to locations, which can become quite useful
+@c OBSOLETE when debugging complex structures.  During parsing the command line
+@c OBSOLETE (e.g. evaluating an expression) @value{GDBN} treats location names as
+@c OBSOLETE the values behind these locations.
+@c OBSOLETE 
+@c OBSOLETE This section describes how values have to be specified and which
+@c OBSOLETE operations are legal to be used with such values.
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item Literal Values
+@c OBSOLETE Literal values are specified in the same manner as in @sc{gnu} Chill programs.
+@c OBSOLETE For detailed specification refer to the @sc{gnu} Chill implementation Manual
+@c OBSOLETE chapter 1.5.
+@c OBSOLETE @c FIXME: if the Chill Manual is a Texinfo documents, the above should
+@c OBSOLETE @c be converted to a @ref.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Literals} are defined by @code{'<character>'}. (e.g.
+@c OBSOLETE @code{'M'})
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Literals} are defined by a name which was specified in a set
+@c OBSOLETE mode.  The value delivered by a Set Literal is the set value.  This is
+@c OBSOLETE comparable to an enumeration in C/C@t{++} language.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Emptiness Literal} is predefined by @code{NULL}.  The value of the
+@c OBSOLETE emptiness literal delivers either the empty reference value, the empty
+@c OBSOLETE procedure value or the empty instance value.
+@c OBSOLETE 
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Literals} are defined by a sequence of characters
+@c OBSOLETE enclosed in single- or double quotes.  If a single- or double quote has
+@c OBSOLETE to be part of the string literal it has to be stuffed (specified twice).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bitstring Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer z200/88 chpt 5.2.4.8).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Floating point literals} are specified in the same manner as in
+@c OBSOLETE (gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
+@c OBSOLETE @end itemize
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item Tuple Values
+@c OBSOLETE A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
+@c OBSOLETE name>} can be omitted if the mode of the tuple is unambiguous.  This
+@c OBSOLETE unambiguity is derived from the context of a evaluated expression.
+@c OBSOLETE @code{<tuple>} can be one of the following:
+@c OBSOLETE 
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item @emph{Powerset Tuple}
+@c OBSOLETE @item @emph{Array Tuple}
+@c OBSOLETE @item @emph{Structure Tuple}
+@c OBSOLETE Powerset tuples, array tuples and structure tuples are specified in the
+@c OBSOLETE same manner as in Chill programs refer to z200/88 chpt 5.2.5.
+@c OBSOLETE @end itemize
+@c OBSOLETE 
+@c OBSOLETE @item String Element Value
+@c OBSOLETE A string element value is specified by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{<string value>(<index>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<index>} is a integer expression.  It delivers a character
+@c OBSOLETE value which is equivalent to the character indexed by @code{<index>} in
+@c OBSOLETE the string.
+@c OBSOLETE 
+@c OBSOLETE @item String Slice Value
+@c OBSOLETE A string slice value is specified by @code{<string value>(<slice
+@c OBSOLETE spec>)}, where @code{<slice spec>} can be either a range of integer
+@c OBSOLETE expressions or specified by @code{<start expr> up <size>}.
+@c OBSOLETE @code{<size>} denotes the number of elements which the slice contains.
+@c OBSOLETE The delivered value is a string value, which is part of the specified
+@c OBSOLETE string.
+@c OBSOLETE 
+@c OBSOLETE @item Array Element Values
+@c OBSOLETE An array element value is specified by @code{<array value>(<expr>)} and
+@c OBSOLETE delivers a array element value of the mode of the specified array.
+@c OBSOLETE 
+@c OBSOLETE @item Array Slice Values
+@c OBSOLETE An array slice is specified by @code{<array value>(<slice spec>)}, where
+@c OBSOLETE @code{<slice spec>} can be either a range specified by expressions or by
+@c OBSOLETE @code{<start expr> up <size>}.  @code{<size>} denotes the number of
+@c OBSOLETE arrayelements the slice contains.  The delivered value is an array value
+@c OBSOLETE which is part of the specified array.
+@c OBSOLETE 
+@c OBSOLETE @item Structure Field Values
+@c OBSOLETE A structure field value is derived by @code{<structure value>.<field
+@c OBSOLETE name>}, where @code{<field name>} indicates the name of a field specified
+@c OBSOLETE in the mode definition of the structure.  The mode of the delivered value
+@c OBSOLETE corresponds to this mode definition in the structure definition.
+@c OBSOLETE 
+@c OBSOLETE @item Procedure Call Value
+@c OBSOLETE The procedure call value is derived from the return value of the
+@c OBSOLETE procedure@footnote{If a procedure call is used for instance in an
+@c OBSOLETE expression, then this procedure is called with all its side
+@c OBSOLETE effects.  This can lead to confusing results if used carelessly.}.
+@c OBSOLETE 
+@c OBSOLETE Values of duration mode locations are represented by @code{ULONG} literals.
+@c OBSOLETE 
+@c OBSOLETE Values of time mode locations appear as
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{TIME(<secs>:<nsecs>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE 
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE This is not implemented yet:
+@c OBSOLETE @item Built-in Value
+@c OBSOLETE @noindent
+@c OBSOLETE The following built in functions are provided:
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{ADDR()}
+@c OBSOLETE @item @code{NUM()}
+@c OBSOLETE @item @code{PRED()}
+@c OBSOLETE @item @code{SUCC()}
+@c OBSOLETE @item @code{ABS()}
+@c OBSOLETE @item @code{CARD()}
+@c OBSOLETE @item @code{MAX()}
+@c OBSOLETE @item @code{MIN()}
+@c OBSOLETE @item @code{SIZE()}
+@c OBSOLETE @item @code{UPPER()}
+@c OBSOLETE @item @code{LOWER()}
+@c OBSOLETE @item @code{LENGTH()}
+@c OBSOLETE @item @code{SIN()}
+@c OBSOLETE @item @code{COS()}
+@c OBSOLETE @item @code{TAN()}
+@c OBSOLETE @item @code{ARCSIN()}
+@c OBSOLETE @item @code{ARCCOS()}
+@c OBSOLETE @item @code{ARCTAN()}
+@c OBSOLETE @item @code{EXP()}
+@c OBSOLETE @item @code{LN()}
+@c OBSOLETE @item @code{LOG()}
+@c OBSOLETE @item @code{SQRT()}
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE For a detailed description refer to the GNU Chill implementation manual
+@c OBSOLETE chapter 1.6.
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @item Zero-adic Operator Value
+@c OBSOLETE The zero-adic operator value is derived from the instance value for the
+@c OBSOLETE current active process.
+@c OBSOLETE 
+@c OBSOLETE @item Expression Values
+@c OBSOLETE The value delivered by an expression is the result of the evaluation of
+@c OBSOLETE the specified expression.  If there are error conditions (mode
+@c OBSOLETE incompatibility, etc.) the evaluation of expressions is aborted with a
+@c OBSOLETE corresponding error message.  Expressions may be parenthesised which
+@c OBSOLETE causes the evaluation of this expression before any other expression
+@c OBSOLETE which uses the result of the parenthesised expression.  The following
+@c OBSOLETE operators are supported by @value{GDBN}:
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{OR, ORIF, XOR}
+@c OBSOLETE @itemx @code{AND, ANDIF}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Logical operators defined over operands of boolean mode.
+@c OBSOLETE 
+@c OBSOLETE @item @code{=, /=}
+@c OBSOLETE Equality and inequality operators defined over all modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Relational operators defined over predefined modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{+, -}
+@c OBSOLETE @itemx @code{*, /, MOD, REM}
+@c OBSOLETE Arithmetic operators defined over predefined modes.
+@c OBSOLETE 
+@c OBSOLETE @item @code{-}
+@c OBSOLETE Change sign operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{//}
+@c OBSOLETE String concatenation operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{()}
+@c OBSOLETE String repetition operator.
+@c OBSOLETE 
+@c OBSOLETE @item @code{->}
+@c OBSOLETE Referenced location operator which can be used either to take the
+@c OBSOLETE address of a location (@code{->loc}), or to dereference a reference
+@c OBSOLETE location (@code{loc->}).
+@c OBSOLETE 
+@c OBSOLETE @item @code{OR, XOR}
+@c OBSOLETE @itemx @code{AND}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Powerset and bitstring operators.
+@c OBSOLETE 
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Powerset inclusion operators.
+@c OBSOLETE 
+@c OBSOLETE @item @code{IN}
+@c OBSOLETE Membership operator.
+@c OBSOLETE @end table
+@c OBSOLETE @end table
+@c OBSOLETE 
+@c OBSOLETE @node Chill type and range checks
+@c OBSOLETE @subsubsection Chill type and range checks
+@c OBSOLETE 
+@c OBSOLETE @value{GDBN} considers two Chill variables mode equivalent if the sizes
+@c OBSOLETE of the two modes are equal.  This rule applies recursively to more
+@c OBSOLETE complex datatypes which means that complex modes are treated
+@c OBSOLETE equivalent if all element modes (which also can be complex modes like
+@c OBSOLETE structures, arrays, etc.) have the same size.
+@c OBSOLETE 
+@c OBSOLETE Range checking is done on all mathematical operations, assignment, array
+@c OBSOLETE index bounds and all built in procedures.
+@c OBSOLETE 
+@c OBSOLETE Strong type checks are forced using the @value{GDBN} command @code{set
+@c OBSOLETE check strong}.  This enforces strong type and range checks on all
+@c OBSOLETE operations where Chill constructs are used (expressions, built in
+@c OBSOLETE functions, etc.) in respect to the semantics as defined in the z.200
+@c OBSOLETE language specification.
+@c OBSOLETE 
+@c OBSOLETE All checks can be disabled by the @value{GDBN} command @code{set check
+@c OBSOLETE off}.
+@c OBSOLETE 
+@c OBSOLETE @ignore
+@c OBSOLETE @c Deviations from the Chill Standard Z200/88
+@c OBSOLETE see last paragraph ?
+@c OBSOLETE @end ignore
+@c OBSOLETE 
+@c OBSOLETE @node Chill defaults
+@c OBSOLETE @subsubsection Chill defaults
+@c OBSOLETE 
+@c OBSOLETE If type and range checking are set automatically by @value{GDBN}, they
+@c OBSOLETE both default to @code{on} whenever the working language changes to
+@c OBSOLETE Chill.  This happens regardless of whether you or @value{GDBN}
+@c OBSOLETE selected the working language.
+@c OBSOLETE 
+@c OBSOLETE If you allow @value{GDBN} to set the language automatically, then entering
+@c OBSOLETE code compiled from a file whose name ends with @file{.ch} sets the
+@c OBSOLETE working language to Chill.  @xref{Automatically, ,Having @value{GDBN} set
+@c OBSOLETE the language automatically}, for further details.
 
 @node Symbols
 @chapter Examining the Symbol Table
@@ -9020,9 +9041,25 @@
 
 @kindex info source
 @item info source
-Show the name of the current source file---that is, the source file for
-the function containing the current point of execution---and the language
-it was written in.
+Show information about the current source file---that is, the source file for
+the function containing the current point of execution:
+@itemize @bullet
+@item
+the name of the source file, and the directory containing it,
+@item
+the directory it was compiled in,
+@item
+its length, in lines,
+@item
+which programming language it is written in,
+@item
+whether the executable includes debugging information for that file, and
+if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and
+@item
+whether the debugging information includes information about
+preprocessor macros.
+@end itemize
+
 
 @kindex info sources
 @item info sources
@@ -11289,7 +11326,7 @@
 * i960::                        Intel i960
 * M32R/D::                      Mitsubishi M32R/D
 * M68K::                        Motorola M68K
-* M88K::                        Motorola M88K
+@c OBSOLETE * M88K::                        Motorola M88K
 * MIPS Embedded::               MIPS Embedded
 * PA::                          HP PA Embedded
 * PowerPC:                      PowerPC
@@ -11724,16 +11761,16 @@
 
 @end table
 
-@node M88K
-@subsection M88K
-
-@table @code
-
-@kindex target bug
-@item target bug @var{dev}
-BUG monitor, running on a MVME187 (m88k) board.
-
-@end table
+@c OBSOLETE @node M88K
+@c OBSOLETE @subsection M88K
+@c OBSOLETE 
+@c OBSOLETE @table @code
+@c OBSOLETE 
+@c OBSOLETE @kindex target bug
+@c OBSOLETE @item target bug @var{dev}
+@c OBSOLETE BUG monitor, running on a MVME187 (m88k) board.
+@c OBSOLETE 
+@c OBSOLETE @end table
 
 @node MIPS Embedded
 @subsection MIPS Embedded
@@ -12955,8 +12992,8 @@
 @end table
 
 The lines in a command file are executed sequentially.  They are not
-printed as they are executed.  An error in any command terminates execution
-of the command file.
+printed as they are executed.  An error in any command terminates
+execution of the command file and control is returned to the console.
 
 Commands that would ask for confirmation if used interactively proceed
 without asking when used in a command file.  Many @value{GDBN} commands that
@@ -14173,12 +14210,39 @@
 
 @end table
 
+@kindex maint print registers
+@kindex maint print raw-registers
+@kindex maint print cooked-registers
+@item maint print registers
+@itemx maint print raw-registers
+@itemx maint print cooked-registers
+Print @value{GDBN}'s internal register data structures.
+
+The command @samp{maint print raw-registers} includes the contents of
+the raw register cache; and the command @samp{maint print
+cooked-registers} includes the (cooked) value of all registers.
+@xref{Registers,, Registers, gdbint, @value{GDBN} Internals}.
+
+Takes an optional file parameter.
+
 @end table
 
 
 @node Remote Protocol
 @appendix @value{GDBN} Remote Serial Protocol
 
+@menu
+* Overview::
+* Packets::
+* Stop Reply Packets::
+* General Query Packets::
+* Register Packet Format::
+* Examples::
+@end menu
+
+@node Overview
+@section Overview
+
 There may be occasions when you need to know something about the
 protocol---for example, if there is only one serial port to your target
 machine, you might want your program to do something special if it
@@ -14241,8 +14305,9 @@
 exceptions).
 
 Fields within the packet should be separated using @samp{,} @samp{;} or
+@cindex remote protocol, field separator
 @samp{:}.  Except where otherwise noted all numbers are represented in
-HEX with leading zeros suppressed.
+@sc{hex} with leading zeros suppressed.
 
 Implementors should note that prior to @value{GDBN} 5.0, the character
 @samp{:} could not appear as the third character in a packet (as it
@@ -14279,166 +14344,179 @@
 @samp{c}, and @samp{s} @var{command}s.  All other @var{command}s are 
 optional.
 
-Below is a complete list of all currently defined @var{command}s and
-their corresponding response @var{data}:
-@page
-@multitable @columnfractions .30 .30 .40
-@item Packet
-@tab Request
-@tab Description
+@node Packets
+@section Packets
 
-@item extended mode
-@tab @code{!}
-@tab
+The following table provides a complete list of all currently defined
+@var{command}s and their corresponding response @var{data}.
+
+@table @r
+
+@item @code{!} --- extended mode
+@cindex @code{!} packet
+
 Enable extended mode.  In extended mode, the remote server is made
 persistent.  The @samp{R} packet is used to restart the program being
 debugged.
-@item
-@tab reply @samp{OK}
-@tab
+
+Reply:
+@table @samp
+@item OK
 The remote target both supports and has enabled extended mode.
+@end table
 
-@item last signal
-@tab @code{?}
-@tab
-Indicate the reason the target halted.  The reply is the same as for step
-and continue.
-@item
-@tab reply
-@tab see below
+@item @code{?} --- last signal
+@cindex @code{?} packet
 
+Indicate the reason the target halted.  The reply is the same as for
+step and continue.
 
-@item reserved
-@tab @code{a}
-@tab Reserved for future use
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@item set program arguments @strong{(reserved)}
-@tab @code{A}@var{arglen}@code{,}@var{argnum}@code{,}@var{arg}@code{,...}
-@tab
-@item
-@tab
-@tab
+@item @code{a} --- reserved
+
+Reserved for future use.
+
+@item @code{A}@var{arglen}@code{,}@var{argnum}@code{,}@var{arg}@code{,@dots{}} ---  set program arguments @strong{(reserved)}
+@cindex @code{A} packet
+
 Initialized @samp{argv[]} array passed into program. @var{arglen}
 specifies the number of bytes in the hex encoded byte stream @var{arg}.
-See @file{gdbserver} for more details.
-@item
-@tab reply @code{OK}
-@item
-@tab reply @code{E}@var{NN}
+See @code{gdbserver} for more details.
 
-@item set baud @strong{(deprecated)}
-@tab @code{b}@var{baud}
-@tab
-Change the serial line speed to @var{baud}.  JTC: @emph{When does the
-transport layer state change?  When it's received, or after the ACK is
-transmitted.  In either case, there are problems if the command or the
-acknowledgment packet is dropped.} Stan: @emph{If people really wanted
-to add something like this, and get it working for the first time, they
-ought to modify ser-unix.c to send some kind of out-of-band message to a
-specially-setup stub and have the switch happen "in between" packets, so
-that from remote protocol's point of view, nothing actually
-happened.}
+Reply:
+@table @samp
+@item OK
+@item E@var{NN}
+@end table
 
-@item set breakpoint @strong{(deprecated)}
-@tab @code{B}@var{addr},@var{mode}
-@tab
+@item @code{b}@var{baud} --- set baud @strong{(deprecated)}
+@cindex @code{b} packet
+
+Change the serial line speed to @var{baud}.
+
+JTC: @emph{When does the transport layer state change?  When it's
+received, or after the ACK is transmitted.  In either case, there are
+problems if the command or the acknowledgment packet is dropped.}
+
+Stan: @emph{If people really wanted to add something like this, and get
+it working for the first time, they ought to modify ser-unix.c to send
+some kind of out-of-band message to a specially-setup stub and have the
+switch happen "in between" packets, so that from remote protocol's point
+of view, nothing actually happened.}
+
+@item @code{B}@var{addr},@var{mode} --- set breakpoint @strong{(deprecated)}
+@cindex @code{B} packet
+
 Set (@var{mode} is @samp{S}) or clear (@var{mode} is @samp{C}) a
-breakpoint at @var{addr}.  @emph{This has been replaced by the @samp{Z} and
-@samp{z} packets.}
+breakpoint at @var{addr}.  @emph{This has been replaced by the @samp{Z}
+and @samp{z} packets.}
 
-@item continue
-@tab @code{c}@var{addr}
-@tab
-@var{addr} is address to resume. If @var{addr} is omitted, resume at
+@item @code{c}@var{addr} --- continue
+@cindex @code{c} packet
+
+@var{addr} is address to resume.  If @var{addr} is omitted, resume at
 current address.
-@item
-@tab reply
-@tab see below
 
-@item continue with signal
-@tab @code{C}@var{sig}@code{;}@var{addr}
-@tab
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{C}@var{sig}@code{;}@var{addr} --- continue with signal
+@cindex @code{C} packet
+
 Continue with signal @var{sig} (hex signal number).  If
 @code{;}@var{addr} is omitted, resume at same address.
-@item
-@tab reply
-@tab see below
 
-@item toggle debug @strong{(deprecated)}
-@tab @code{d}
-@tab
-toggle debug flag.
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@item detach
-@tab @code{D}
-@tab
-Detach @value{GDBN} from the remote system.  Sent to the remote target before
-@value{GDBN} disconnects.
-@item
-@tab reply @emph{no response}
-@tab
+@item @code{d} --- toggle debug @strong{(deprecated)}
+@cindex @code{d} packet
+
+Toggle debug flag.
+
+@item @code{D} --- detach
+@cindex @code{D} packet
+
+Detach @value{GDBN} from the remote system.  Sent to the remote target
+before @value{GDBN} disconnects.
+
+Reply:
+@table @samp
+@item @emph{no response}
 @value{GDBN} does not check for any response after sending this packet.
+@end table
 
-@item reserved
-@tab @code{e}
-@tab Reserved for future use
+@item @code{e} --- reserved
 
-@item reserved
-@tab @code{E}
-@tab Reserved for future use
+Reserved for future use.
 
-@item reserved
-@tab @code{f}
-@tab Reserved for future use
+@item @code{E} --- reserved
 
-@item reserved
-@tab @code{F}
-@tab Reserved for future use
+Reserved for future use.
 
-@item read registers
-@tab @code{g}
-@tab Read general registers.
-@item
-@tab reply @var{XX...}
-@tab
+@item @code{f} --- reserved
+
+Reserved for future use.
+
+@item @code{F} --- reserved
+
+Reserved for future use.
+
+@item @code{g} --- read registers
+@anchor{read registers packet}
+@cindex @code{g} packet
+
+Read general registers.
+
+Reply:
+@table @samp
+@item @var{XX@dots{}}
 Each byte of register data is described by two hex digits.  The bytes
 with the register are transmitted in target byte order.  The size of
 each register and their position within the @samp{g} @var{packet} are
-determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE} and
-@var{REGISTER_NAME} macros.  The specification of several standard
+determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE}
+and @var{REGISTER_NAME} macros.  The specification of several standard
 @code{g} packets is specified below.
-@item
-@tab @code{E}@var{NN}
-@tab for an error.
+@item E@var{NN}
+for an error.
+@end table
 
-@item write regs
-@tab @code{G}@var{XX...}
-@tab
-See @samp{g} for a description of the @var{XX...} data.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+@item @code{G}@var{XX@dots{}} --- write regs
+@cindex @code{G} packet
 
-@item reserved
-@tab @code{h}
-@tab Reserved for future use
+@xref{read registers packet}, for a description of the @var{XX@dots{}}
+data.
 
-@item set thread 
-@tab @code{H}@var{c}@var{t...}
-@tab
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
+
+@item @code{h} --- reserved
+
+Reserved for future use.
+
+@item @code{H}@var{c}@var{t@dots{}} --- set thread 
+@cindex @code{H} packet
+
 Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
-@samp{G}, et.al.).  @var{c} = @samp{c} for thread used in step and
-continue; @var{t...} can be -1 for all threads.  @var{c} = @samp{g} for
-thread used in other operations.  If zero, pick a thread, any thread.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+@samp{G}, et.al.).  @var{c} depends on the operation to be performed: it
+should be @samp{c} for step and continue operations, @samp{g} for other
+operations.  The thread designator @var{t@dots{}} may be -1, meaning all
+the threads, a thread number, or zero which means pick any thread.
+
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
 
 @c FIXME: JTC:
 @c   'H': How restrictive (or permissive) is the thread model.  If a
@@ -14455,262 +14533,289 @@
 @c                selected, sets the registers of the register block of
 @c                that thread; otherwise sets current registers.
 
-@item cycle step @strong{(draft)}
-@tab @code{i}@var{addr}@code{,}@var{nnn}
-@tab
+@item @code{i}@var{addr}@code{,}@var{nnn} --- cycle step @strong{(draft)}
+@anchor{cycle step packet}
+@cindex @code{i} packet
+
 Step the remote target by a single clock cycle.  If @code{,}@var{nnn} is
 present, cycle step @var{nnn} cycles.  If @var{addr} is present, cycle
 step starting at that address.
 
-@item signal then cycle step @strong{(reserved)}
-@tab @code{I}
-@tab
-See @samp{i} and @samp{S} for likely syntax and semantics.
+@item @code{I} --- signal then cycle step @strong{(reserved)}
+@cindex @code{I} packet
 
-@item reserved
-@tab @code{j}
-@tab Reserved for future use
+@xref{step with signal packet}.  @xref{cycle step packet}.
 
-@item reserved
-@tab @code{J}
-@tab Reserved for future use
+@item @code{j} --- reserved
 
-@item kill request
-@tab @code{k}
-@tab
+Reserved for future use.
+
+@item @code{J} --- reserved
+
+Reserved for future use.
+
+@item @code{k} --- kill request
+@cindex @code{k} packet
+
 FIXME: @emph{There is no description of how to operate when a specific
-thread context has been selected (i.e.@: does 'k' kill only that thread?)}.
+thread context has been selected (i.e.@: does 'k' kill only that
+thread?)}.
 
-@item reserved
-@tab @code{l}
-@tab Reserved for future use
+@item @code{K} --- reserved
 
-@item reserved
-@tab @code{L}
-@tab Reserved for future use
+Reserved for future use.
 
-@item read memory
-@tab @code{m}@var{addr}@code{,}@var{length}
-@tab
+@item @code{l} --- reserved
+
+Reserved for future use.
+
+@item @code{L} --- reserved
+
+Reserved for future use.
+
+@item @code{m}@var{addr}@code{,}@var{length} --- read memory
+@cindex @code{m} packet
+
 Read @var{length} bytes of memory starting at address @var{addr}.
-Neither @value{GDBN} nor the stub assume that sized memory transfers are assumed
-using word alligned accesses. FIXME: @emph{A word aligned memory
+Neither @value{GDBN} nor the stub assume that sized memory transfers are
+assumed using word alligned accesses. FIXME: @emph{A word aligned memory
 transfer mechanism is needed.}
-@item
-@tab reply @var{XX...}
-@tab
-@var{XX...} is mem contents. Can be fewer bytes than requested if able
-to read only part of the data.  Neither @value{GDBN} nor the stub assume that
-sized memory transfers are assumed using word alligned accesses. FIXME:
-@emph{A word aligned memory transfer mechanism is needed.}
-@item
-@tab reply @code{E}@var{NN}
-@tab @var{NN} is errno
 
-@item write mem
-@tab @code{M}@var{addr},@var{length}@code{:}@var{XX...}
-@tab
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+@var{XX@dots{}} is mem contents. Can be fewer bytes than requested if able
+to read only part of the data.  Neither @value{GDBN} nor the stub assume
+that sized memory transfers are assumed using word alligned
+accesses. FIXME: @emph{A word aligned memory transfer mechanism is
+needed.}
+@item E@var{NN}
+@var{NN} is errno
+@end table
+
+@item @code{M}@var{addr},@var{length}@code{:}@var{XX@dots{}} --- write mem
+@cindex @code{M} packet
+
 Write @var{length} bytes of memory starting at address @var{addr}.
-@var{XX...} is the data.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab
+@var{XX@dots{}} is the data.
+
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
 for an error (this includes the case where only part of the data was
 written).
+@end table
 
-@item reserved
-@tab @code{n}
-@tab Reserved for future use
+@item @code{n} --- reserved
 
-@item reserved
-@tab @code{N}
-@tab Reserved for future use
+Reserved for future use.
 
-@item reserved
-@tab @code{o}
-@tab Reserved for future use
+@item @code{N} --- reserved
 
-@item reserved
-@tab @code{O}
-@tab Reserved for future use
+Reserved for future use.
 
-@item read reg @strong{(reserved)}
-@tab @code{p}@var{n...}
-@tab
-See write register.
-@item
-@tab return @var{r....}
-@tab The hex encoded value of the register in target byte order.
+@item @code{o} --- reserved
 
-@item write reg
-@tab @code{P}@var{n...}@code{=}@var{r...}
-@tab
-Write register @var{n...} with value @var{r...}, which contains two hex
+Reserved for future use.
+
+@item @code{O} --- reserved
+
+Reserved for future use.
+
+@item @code{p}@var{n@dots{}} --- read reg @strong{(reserved)}
+@cindex @code{p} packet
+
+@xref{write register packet}.
+
+Reply:
+@table @samp
+@item @var{r@dots{}.}
+The hex encoded value of the register in target byte order.
+@end table
+
+@item @code{P}@var{n@dots{}}@code{=}@var{r@dots{}} --- write register
+@anchor{write register packet}
+@cindex @code{P} packet
+
+Write register @var{n@dots{}} with value @var{r@dots{}}, which contains two hex
 digits for each byte in the register (target byte order).
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
 
-@item general query
-@tab @code{q}@var{query}
-@tab
-Request info about @var{query}.  In general @value{GDBN} queries
-have a leading upper case letter.  Custom vendor queries should use a
-company prefix (in lower case) ex: @samp{qfsf.var}.  @var{query} may
-optionally be followed by a @samp{,} or @samp{;} separated list.  Stubs
-must ensure that they match the full @var{query} name.
-@item
-@tab reply @code{XX...}
-@tab Hex encoded data from query.  The reply can not be empty.
-@item
-@tab reply @code{E}@var{NN}
-@tab error reply
-@item
-@tab reply @samp{}
-@tab Indicating an unrecognized @var{query}.
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
 
-@item general set
-@tab @code{Q}@var{var}@code{=}@var{val}
-@tab
-Set value of @var{var} to @var{val}.  See @samp{q} for a discussing of
-naming conventions.
+@item @code{q}@var{query} --- general query
+@anchor{general query packet}
+@cindex @code{q} packet
 
-@item reset @strong{(deprecated)}
-@tab @code{r}
-@tab
+Request info about @var{query}.  In general @value{GDBN} queries have a
+leading upper case letter.  Custom vendor queries should use a company
+prefix (in lower case) ex: @samp{qfsf.var}.  @var{query} may optionally
+be followed by a @samp{,} or @samp{;} separated list.  Stubs must ensure
+that they match the full @var{query} name.
+
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+Hex encoded data from query.  The reply can not be empty.
+@item E@var{NN}
+error reply
+@item
+Indicating an unrecognized @var{query}.
+@end table
+
+@item @code{Q}@var{var}@code{=}@var{val} --- general set
+@cindex @code{Q} packet
+
+Set value of @var{var} to @var{val}.
+
+@xref{general query packet}, for a discussion of naming conventions.
+
+@item @code{r} --- reset @strong{(deprecated)}
+@cindex @code{r} packet
+
 Reset the entire system.
 
-@item remote restart
-@tab @code{R}@var{XX}
-@tab
+@item @code{R}@var{XX} --- remote restart
+@cindex @code{R} packet
+
 Restart the program being debugged.  @var{XX}, while needed, is ignored.
 This packet is only available in extended mode.
-@item
-@tab
-no reply
-@tab
-The @samp{R} packet has no reply.
 
-@item step
-@tab @code{s}@var{addr}
-@tab
+Reply:
+@table @samp
+@item @emph{no reply}
+The @samp{R} packet has no reply.
+@end table
+
+@item @code{s}@var{addr} --- step
+@cindex @code{s} packet
+
 @var{addr} is address to resume.  If @var{addr} is omitted, resume at
 same address.
-@item
-@tab reply
-@tab see below
 
-@item step with signal
-@tab @code{S}@var{sig}@code{;}@var{addr}
-@tab
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{S}@var{sig}@code{;}@var{addr} --- step with signal
+@anchor{step with signal packet}
+@cindex @code{S} packet
+
 Like @samp{C} but step not continue.
-@item
-@tab reply
-@tab see below
 
-@item search 
-@tab @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM}
-@tab
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search 
+@cindex @code{t} packet
+
 Search backwards starting at address @var{addr} for a match with pattern
-@var{PP} and mask @var{MM}.  @var{PP} and @var{MM} are 4
-bytes.  @var{addr} must be at least 3 digits.
+@var{PP} and mask @var{MM}.  @var{PP} and @var{MM} are 4 bytes.
+@var{addr} must be at least 3 digits.
 
-@item thread alive
-@tab @code{T}@var{XX}
-@tab Find out if the thread XX is alive.
-@item
-@tab reply @code{OK}
-@tab thread is still alive
-@item
-@tab reply @code{E}@var{NN}
-@tab thread is dead
+@item @code{T}@var{XX} --- thread alive
+@cindex @code{T} packet
 
-@item reserved
-@tab @code{u}
-@tab Reserved for future use
+Find out if the thread XX is alive.
 
-@item reserved
-@tab @code{U}
-@tab Reserved for future use
+Reply:
+@table @samp
+@item OK
+thread is still alive
+@item E@var{NN}
+thread is dead
+@end table
 
-@item reserved
-@tab @code{v}
-@tab Reserved for future use
+@item @code{u} --- reserved
 
-@item reserved
-@tab @code{V}
-@tab Reserved for future use
+Reserved for future use.
 
-@item reserved
-@tab @code{w}
-@tab Reserved for future use
+@item @code{U} --- reserved
 
-@item reserved
-@tab @code{W}
-@tab Reserved for future use
+Reserved for future use.
 
-@item reserved
-@tab @code{x}
-@tab Reserved for future use
+@item @code{v} --- reserved
 
-@item write mem (binary)
-@tab @code{X}@var{addr}@code{,}@var{length}@var{:}@var{XX...}
-@tab
-@var{addr} is address, @var{length} is number of bytes, @var{XX...} is
-binary data.  The characters @code{$}, @code{#}, and @code{0x7d} are
+Reserved for future use.
+
+@item @code{V} --- reserved
+
+Reserved for future use.
+
+@item @code{w} --- reserved
+
+Reserved for future use.
+
+@item @code{W} --- reserved
+
+Reserved for future use.
+
+@item @code{x} --- reserved
+
+Reserved for future use.
+
+@item @code{X}@var{addr}@code{,}@var{length}@var{:}@var{XX@dots{}} --- write mem (binary)
+@cindex @code{X} packet
+
+@var{addr} is address, @var{length} is number of bytes, @var{XX@dots{}}
+is binary data.  The characters @code{$}, @code{#}, and @code{0x7d} are
 escaped using @code{0x7d}.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
 
-@item reserved
-@tab @code{y}
-@tab Reserved for future use
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
 
-@item reserved
-@tab @code{Y}
-@tab Reserved for future use
+@item @code{y} --- reserved
 
-@item remove break or watchpoint @strong{(draft)}
-@tab @code{z}@var{t}@code{,}@var{addr}@code{,}@var{length}
-@tab
-See @samp{Z}.
+Reserved for future use.
 
-@item insert break or watchpoint @strong{(draft)}
-@tab @code{Z}@var{t}@code{,}@var{addr}@code{,}@var{length}
-@tab
+@item @code{Y} reserved
+
+Reserved for future use.
+
+@item @code{z}@var{t}@code{,}@var{addr}@code{,}@var{length} --- remove break or watchpoint @strong{(draft)}
+@cindex @code{z} packet
+
+@xref{insert breakpoint or watchpoint packet}.
+
+@item @code{Z}@var{t}@code{,}@var{addr}@code{,}@var{length} --- insert break or watchpoint @strong{(draft)}
+@anchor{insert breakpoint or watchpoint packet}
+@cindex @code{Z} packet
+
 @var{t} is type: @samp{0} - software breakpoint, @samp{1} - hardware
-breakpoint, @samp{2} - write watchpoint, @samp{3} - read watchpoint,
+breakpoint, @samp{2} --- write watchpoint, @samp{3} - read watchpoint,
 @samp{4} - access watchpoint; @var{addr} is address; @var{length} is in
 bytes.  For a software breakpoint, @var{length} specifies the size of
 the instruction to be patched.  For hardware breakpoints and watchpoints
 @var{length} specifies the memory region to be monitored.  To avoid
 potential problems with duplicate packets, the operations should be
 implemented in an idempotent way.
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab @samp{}
-@tab If not supported.
 
-@item reserved
-@tab <other>
-@tab Reserved for future use
+Reply:
+@table @samp
+@item E@var{NN}
+for an error
+@item OK
+for success
+@item @samp{}
+If not supported.
+@end table
 
-@end multitable
+@end table
+
+@node Stop Reply Packets
+@section Stop Reply Packets
+@cindex stop reply packets
 
 The @samp{C}, @samp{c}, @samp{S}, @samp{s} and @samp{?} packets can
 receive any of the below as a reply.  In the case of the @samp{C},
@@ -14719,282 +14824,259 @@
 number} is poorly defined.  In general one of the UNIX signal numbering
 conventions is used.
 
-@multitable @columnfractions .4 .6
+@table @samp
 
-@item @code{S}@var{AA}
-@tab @var{AA} is the signal number
+@item S@var{AA}
+@var{AA} is the signal number
 
 @item @code{T}@var{AA}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}
-@tab
+@cindex @code{T} packet reply
+
 @var{AA} = two hex digit signal number; @var{n...} = register number
 (hex), @var{r...}  = target byte ordered register contents, size defined
 by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
-thread process ID, this is a hex integer; @var{n...} = other string not
-starting with valid hex digit.  @value{GDBN} should ignore this
-@var{n...}, @var{r...} pair and go on to the next.  This way we can
-extend the protocol.
+thread process ID, this is a hex integer; @var{n...} = (@samp{watch} | 
+@samp{rwatch} | @samp{awatch}, @var{r...} = data address, this is a hex
+integer; @var{n...} = other string not starting with valid hex digit.
+@value{GDBN} should ignore this @var{n...}, @var{r...} pair and go on
+to the next.  This way we can extend the protocol.
 
-@item @code{W}@var{AA}
-@tab
+@item W@var{AA}
+
 The process exited, and @var{AA} is the exit status.  This is only
-applicable for certains sorts of targets.
+applicable to certain targets.
 
-@item @code{X}@var{AA}
-@tab
+@item X@var{AA}
+
 The process terminated with signal @var{AA}.
 
-@item @code{N}@var{AA}@code{;}@var{t...}@code{;}@var{d...}@code{;}@var{b...} @strong{(obsolete)}
-@tab
-@var{AA} = signal number; @var{t...} = address of symbol "_start";
-@var{d...} = base of data section; @var{b...} = base of bss section.
-@emph{Note: only used by Cisco Systems targets.  The difference between
-this reply and the "qOffsets" query is that the 'N' packet may arrive
-spontaneously whereas the 'qOffsets' is a query initiated by the host
-debugger.}
+@item N@var{AA};@var{t@dots{}};@var{d@dots{}};@var{b@dots{}} @strong{(obsolete)}
 
-@item @code{O}@var{XX...}
-@tab
-@var{XX...} is hex encoding of @sc{ascii} data.  This can happen at any time
-while the program is running and the debugger should continue to wait
-for 'W', 'T', etc.
+@var{AA} = signal number; @var{t@dots{}} = address of symbol
+@code{_start}; @var{d@dots{}} = base of data section; @var{b@dots{}} =
+base of bss section.  @emph{Note: only used by Cisco Systems targets.
+The difference between this reply and the @samp{qOffsets} query is that
+the @samp{N} packet may arrive spontaneously whereas the @samp{qOffsets}
+is a query initiated by the host debugger.}
 
-@end multitable
+@item O@var{XX@dots{}}
+
+@var{XX@dots{}} is hex encoding of @sc{ascii} data.  This can happen at
+any time while the program is running and the debugger should continue
+to wait for @samp{W}, @samp{T}, etc.
+
+@end table
+
+@node General Query Packets
+@section General Query Packets
 
 The following set and query packets have already been defined.
 
-@multitable @columnfractions .2 .2 .6
+@table @r
 
-@item current thread
-@tab @code{q}@code{C}
-@tab Return the current thread id.
-@item
-@tab reply @code{QC}@var{pid}
-@tab
+@item @code{q}@code{C} --- current thread
+
+Return the current thread id.
+
+Reply:
+@table @samp
+@item @code{QC}@var{pid}
 Where @var{pid} is a HEX encoded 16 bit process id.
-@item
-@tab reply *
-@tab Any other reply implies the old pid.
+@item *
+Any other reply implies the old pid.
+@end table
 
-@item all thread ids
-@tab @code{q}@code{fThreadInfo}
-@item
-@tab @code{q}@code{sThreadInfo}
-@tab
+@item @code{q}@code{fThreadInfo} -- all thread ids
+
+@code{q}@code{sThreadInfo}
+
 Obtain a list of active thread ids from the target (OS).  Since there
 may be too many active threads to fit into one reply packet, this query
 works iteratively: it may require more than one query/reply sequence to
 obtain the entire list of threads.  The first query of the sequence will
 be the @code{qf}@code{ThreadInfo} query; subsequent queries in the
 sequence will be the @code{qs}@code{ThreadInfo} query.
-@item
-@tab
-@tab NOTE: replaces the @code{qL} query (see below).
-@item
-@tab reply @code{m}@var{<id>}
-@tab A single thread id
-@item
-@tab reply @code{m}@var{<id>},@var{<id>...}
-@tab a comma-separated list of thread ids
-@item
-@tab reply @code{l}
-@tab (lower case 'el') denotes end of list.
-@item
-@tab
-@tab
-In response to each query, the target will reply with a list of one
-or more thread ids, in big-endian hex, separated by commas.  GDB will
-respond to each reply with a request for more thread ids (using the
+
+NOTE: replaces the @code{qL} query (see below).
+
+Reply:
+@table @samp
+@item @code{m}@var{id}
+A single thread id
+@item @code{m}@var{id},@var{id}@dots{}
+a comma-separated list of thread ids
+@item @code{l}
+(lower case 'el') denotes end of list.
+@end table
+
+In response to each query, the target will reply with a list of one or
+more thread ids, in big-endian hex, separated by commas.  @value{GDBN}
+will respond to each reply with a request for more thread ids (using the
 @code{qs} form of the query), until the target responds with @code{l}
 (lower-case el, for @code{'last'}).
 
-@item extra thread info
-@tab @code{q}@code{ThreadExtraInfo}@code{,}@var{id}
-@tab
-@item
-@tab
-@tab
-Where @var{<id>} is a thread-id in big-endian hex.
-Obtain a printable string description of a thread's attributes from
-the target OS.  This string may contain anything that the target OS
-thinks is interesting for @value{GDBN} to tell the user about the thread.
-The string is displayed in @value{GDBN}'s @samp{info threads} display.
-Some examples of possible thread extra info strings are "Runnable", or
-"Blocked on Mutex".
-@item
-@tab reply @var{XX...}
-@tab
-Where @var{XX...} is a hex encoding of @sc{ascii} data, comprising the
-printable string containing the extra information about the thread's
-attributes.
+@item @code{q}@code{ThreadExtraInfo}@code{,}@var{id} --- extra thread info
 
-@item query @var{LIST} or @var{threadLIST} @strong{(deprecated)}
-@tab @code{q}@code{L}@var{startflag}@var{threadcount}@var{nextthread}
-@tab
-@item
-@tab
-@tab
+Where @var{id} is a thread-id in big-endian hex.  Obtain a printable
+string description of a thread's attributes from the target OS.  This
+string may contain anything that the target OS thinks is interesting for
+@value{GDBN} to tell the user about the thread.  The string is displayed
+in @value{GDBN}'s @samp{info threads} display.  Some examples of
+possible thread extra info strings are ``Runnable'', or ``Blocked on
+Mutex''.
+
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+Where @var{XX@dots{}} is a hex encoding of @sc{ascii} data, comprising
+the printable string containing the extra information about the thread's
+attributes.
+@end table
+
+@item @code{q}@code{L}@var{startflag}@var{threadcount}@var{nextthread} --- query @var{LIST} or @var{threadLIST} @strong{(deprecated)}
+
 Obtain thread information from RTOS.  Where: @var{startflag} (one hex
 digit) is one to indicate the first query and zero to indicate a
 subsequent query; @var{threadcount} (two hex digits) is the maximum
 number of threads the response packet can contain; and @var{nextthread}
 (eight hex digits), for subsequent queries (@var{startflag} is zero), is
 returned in the response as @var{argthread}.
-@item
-@tab
-@tab NOTE: this query is replaced by the @code{q}@code{fThreadInfo}
-query (see above).
-@item
-@tab reply @code{q}@code{M}@var{count}@var{done}@var{argthread}@var{thread...}
-@tab
-@item
-@tab
-@tab
+
+NOTE: this query is replaced by the @code{q}@code{fThreadInfo} query
+(see above).
+
+Reply:
+@table @samp
+@item @code{q}@code{M}@var{count}@var{done}@var{argthread}@var{thread@dots{}}
 Where: @var{count} (two hex digits) is the number of threads being
 returned; @var{done} (one hex digit) is zero to indicate more threads
 and one indicates no further threads; @var{argthreadid} (eight hex
-digits) is @var{nextthread} from the request packet; @var{thread...} is
-a sequence of thread IDs from the target.  @var{threadid} (eight hex
+digits) is @var{nextthread} from the request packet; @var{thread@dots{}}
+is a sequence of thread IDs from the target.  @var{threadid} (eight hex
 digits).  See @code{remote.c:parse_threadlist_response()}.
+@end table
 
-@item compute CRC of memory block
-@tab @code{q}@code{CRC:}@var{addr}@code{,}@var{length}
-@tab
-@item
-@tab reply @code{E}@var{NN}
-@tab An error (such as memory fault)
-@item
-@tab reply @code{C}@var{CRC32}
-@tab A 32 bit cyclic redundancy check of the specified memory region.
+@item @code{q}@code{CRC:}@var{addr}@code{,}@var{length} --- compute CRC of memory block
 
-@item query sect offs
-@tab @code{q}@code{Offsets}
-@tab
+Reply:
+@table @samp
+@item @code{E}@var{NN}
+An error (such as memory fault)
+@item @code{C}@var{CRC32}
+A 32 bit cyclic redundancy check of the specified memory region.
+@end table
+
+@item @code{q}@code{Offsets} --- query sect offs
+
 Get section offsets that the target used when re-locating the downloaded
 image.  @emph{Note: while a @code{Bss} offset is included in the
 response, @value{GDBN} ignores this and instead applies the @code{Data}
 offset to the @code{Bss} section.}
-@item
-@tab reply @code{Text=}@var{xxx}@code{;Data=}@var{yyy}@code{;Bss=}@var{zzz}
 
-@item thread info request
-@tab @code{q}@code{P}@var{mode}@var{threadid}
-@tab
-@item
-@tab
-@tab
+Reply:
+@table @samp
+@item @code{Text=}@var{xxx}@code{;Data=}@var{yyy}@code{;Bss=}@var{zzz}
+@end table
+
+@item @code{q}@code{P}@var{mode}@var{threadid} --- thread info request
+
 Returns information on @var{threadid}.  Where: @var{mode} is a hex
 encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
-@item
-@tab reply *
-@tab
+
+Reply:
+@table @samp
+@item *
+@end table
+
 See @code{remote.c:remote_unpack_thread_info_response()}.
 
-@item remote command
-@tab @code{q}@code{Rcmd,}@var{COMMAND}
-@tab
-@item
-@tab
-@tab
-@var{COMMAND} (hex encoded) is passed to the local interpreter for
+@item @code{q}@code{Rcmd,}@var{command} --- remote command
+
+@var{command} (hex encoded) is passed to the local interpreter for
 execution.  Invalid commands should be reported using the output string.
 Before the final result packet, the target may also respond with a
-number of intermediate @code{O}@var{OUTPUT} console output
-packets.  @emph{Implementors should note that providing access to a
-stubs's interpreter may have security implications}.
-@item
-@tab reply @code{OK}
-@tab
+number of intermediate @code{O}@var{output} console output packets.
+@emph{Implementors should note that providing access to a stubs's
+interpreter may have security implications}.
+
+Reply:
+@table @samp
+@item OK
 A command response with no output.
-@item
-@tab reply @var{OUTPUT}
-@tab
+@item @var{OUTPUT}
 A command response with the hex encoded output string @var{OUTPUT}.
-@item
-@tab reply @code{E}@var{NN}
-@tab
+@item @code{E}@var{NN}
 Indicate a badly formed request.
-
-@item
-@tab reply @samp{}
-@tab
+@item @samp{}
 When @samp{q}@samp{Rcmd} is not recognized.
+@end table
 
-@item symbol lookup
-@tab @code{qSymbol::}
-@tab
+@item @code{qSymbol::} --- symbol lookup
+
 Notify the target that @value{GDBN} is prepared to serve symbol lookup
 requests.  Accept requests from the target for the values of symbols.
-@item
-@tab
-@tab
-@item
-@tab reply @code{OK}
-@tab
-The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-@sp 2
-@noindent
-The target requests the value of symbol @var{sym_name} (hex encoded).  
-@value{GDBN} may provide the value by using the 
-@code{qSymbol:}@var{sym_value}:@var{sym_name}
-message, described below.
 
-@item symbol value
-@tab @code{qSymbol:}@var{sym_value}:@var{sym_name}
-@tab
-@sp 1
-@noindent
-Set the value of SYM_NAME to SYM_VALUE.
-@item
-@tab
-@tab
-@var{sym_name} (hex encoded) is the name of a symbol whose value
-the target has previously requested.
-@item
-@tab
-@tab
-@var{sym_value} (hex) is the value for symbol @var{sym_name}.
-If @value{GDBN} cannot supply a value for @var{sym_name}, then this
-field will be empty.
-@item
-@tab reply @code{OK}
-@tab
+Reply:
+@table @samp
+@item @code{OK}
 The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-@sp 2
-@noindent
-The target requests the value of a new symbol @var{sym_name} (hex encoded).
-@value{GDBN} will continue to supply the values of symbols (if available),
-until the target ceases to request them.
+@item @code{qSymbol:}@var{sym_name}
+The target requests the value of symbol @var{sym_name} (hex encoded).
+@value{GDBN} may provide the value by using the
+@code{qSymbol:}@var{sym_value}:@var{sym_name} message, described below.
+@end table
 
-@end multitable
+@item @code{qSymbol:}@var{sym_value}:@var{sym_name} --- symbol value
+
+Set the value of @var{sym_name} to @var{sym_value}.
+
+@var{sym_name} (hex encoded) is the name of a symbol whose value the
+target has previously requested.
+
+@var{sym_value} (hex) is the value for symbol @var{sym_name}.  If
+@value{GDBN} cannot supply a value for @var{sym_name}, then this field
+will be empty.
+
+Reply:
+@table @samp
+@item @code{OK}
+The target does not need to look up any (more) symbols.
+@item @code{qSymbol:}@var{sym_name}
+The target requests the value of a new symbol @var{sym_name} (hex
+encoded).  @value{GDBN} will continue to supply the values of symbols
+(if available), until the target ceases to request them.
+@end table
+
+@end table
+
+@node Register Packet Format
+@section Register Packet Format
 
 The following @samp{g}/@samp{G} packets have previously been defined.
-In the below, some thirty-two bit registers are transferred as sixty-four
-bits.  Those registers should be zero/sign extended (which?) to fill the
-space allocated.  Register bytes are transfered in target byte order.
-The two nibbles within a register byte are transfered most-significant -
-least-significant.
+In the below, some thirty-two bit registers are transferred as
+sixty-four bits.  Those registers should be zero/sign extended (which?)
+to fill the space allocated.  Register bytes are transfered in target
+byte order.  The two nibbles within a register byte are transfered
+most-significant - least-significant.
 
-@multitable @columnfractions .5 .5
+@table @r
 
 @item MIPS32
-@tab
+
 All registers are transfered as thirty-two bit quantities in the order:
 32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point
 registers; fsr; fir; fp.
 
 @item MIPS64
-@tab
+
 All registers are transfered as sixty-four bit quantities (including
 thirty-two bit registers such as @code{sr}).  The ordering is the same
 as @code{MIPS32}.
 
-@end multitable
+@end table
+
+@node Examples
+@section Examples
 
 Example sequence of a target being re-started.  Notice how the restart
 does not get any direct output:
@@ -15012,7 +15094,7 @@
 Example sequence of a target being stepped by a single instruction:
 
 @smallexample
-<- @code{G1445...}
+<- @code{G1445@dots{}}
 -> @code{+}
 <- @code{s}
 -> @code{+}
@@ -15021,7 +15103,7 @@
 <- @code{+}
 <- @code{g}
 -> @code{+}
--> @code{1455...}
+-> @code{1455@dots{}}
 <- @code{+}
 @end smallexample
 
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 4f76f5f..a5f4de5 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -50,7 +50,7 @@
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001
+Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001, 2002
    Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -722,6 +722,14 @@
 place to add commands is in the @code{_initialize_@var{xyz}} routines at
 the ends of most source files.
 
+@findex add_setshow_cmd
+@findex add_setshow_cmd_full
+To add paired @samp{set} and @samp{show} commands, use
+@code{add_setshow_cmd} or @code{add_setshow_cmd_full}.  The former is
+a slightly simpler interface which is useful when you don't need to
+further modify the new command structures, while the latter returns
+the new command structures for manipulation.
+
 @cindex deprecating commands
 @findex deprecate_cmd
 Before removing commands from the command set it is a good idea to
@@ -946,7 +954,7 @@
 This function first opens the tuple and then establishes a cleanup
 (@pxref{Coding, Cleanups}) to close the tuple.  It provides a convenient
 and correct implementation of the non-portable@footnote{The function
-cast is not portable ISO-C.} code sequence:
+cast is not portable ISO C.} code sequence:
 @smallexample
 struct cleanup *old_cleanup;
 ui_out_tuple_begin (uiout, "...");
@@ -1826,7 +1834,7 @@
 DWARF 1 is a debugging format that was originally designed to be
 used with ELF in SVR4 systems.
 
-@c CHILL_PRODUCER
+@c OBSOLETE CHILL_PRODUCER
 @c GCC_PRODUCER
 @c GPLUS_PRODUCER
 @c LCC_PRODUCER
@@ -2386,6 +2394,14 @@
 @item GDB_OSABI_WINCE
 Windows CE
 
+@findex GDB_OSABI_GO32
+@item GDB_OSABI_GO32
+DJGPP
+
+@findex GDB_OSABI_NETWARE
+@item GDB_OSABI_NETWARE
+Novell NetWare
+
 @findex GDB_OSABI_ARM_EABI_V1
 @item GDB_OSABI_ARM_EABI_V1
 ARM Embedded ABI version 1
@@ -3078,11 +3094,31 @@
 @findex DO_REGISTERS_INFO
 If defined, use this to print the value of a register or all registers.
 
+This method is deprecated.
+
 @item PRINT_FLOAT_INFO()
-#findex PRINT_FLOAT_INFO
+@findex PRINT_FLOAT_INFO
 If defined, then the @samp{info float} command will print information about
 the processor's floating point unit.
 
+@item print_registers_info (@var{gdbarch}, @var{frame}, @var{regnum}, @var{all})
+@findex print_registers_info
+If defined, pretty print the value of the register @var{regnum} for the
+specified @var{frame}.  If the value of @var{regnum} is -1, pretty print
+either all registers (@var{all} is non zero) or a select subset of
+registers (@var{all} is zero).
+
+The default method prints one register per line, and if @var{all} is
+zero omits floating-point registers.
+
+@item PRINT_VECTOR_INFO()
+@findex PRINT_VECTOR_INFO
+If defined, then the @samp{info vector} command will call this function
+to print information about the processor's vector unit.
+
+By default, the @samp{info vector} command will print all vector
+registers (the register's type having the vector attribute).
+
 @item DWARF_REG_TO_REGNUM
 @findex DWARF_REG_TO_REGNUM
 Convert DWARF register number into @value{GDBN} regnum.  If not defined,
@@ -3613,9 +3649,9 @@
 Define this to convert sdb register numbers into @value{GDBN} regnums.  If not
 defined, no conversion will be done.
 
-@item SHIFT_INST_REGS
-@findex SHIFT_INST_REGS
-(Only used for m88k targets.)
+@c OBSOLETE @item SHIFT_INST_REGS
+@c OBSOLETE @findex SHIFT_INST_REGS
+@c OBSOLETE (Only used for m88k targets.)
 
 @item SKIP_PERMANENT_BREAKPOINT
 @findex SKIP_PERMANENT_BREAKPOINT
@@ -3665,10 +3701,11 @@
 slot, @value{GDBN} will single-step over that instruction before resuming
 normally.  Currently only defined for the Mips.
 
-@item STORE_RETURN_VALUE (@var{type}, @var{valbuf})
+@item STORE_RETURN_VALUE (@var{type}, @var{regcache}, @var{valbuf})
 @findex STORE_RETURN_VALUE
-A C expression that stores a function return value of type @var{type},
-where @var{valbuf} is the address of the value to be stored.
+A C expression that writes the function return value, found in
+@var{valbuf}, into the @var{regcache}.  @var{type} is the type of the
+value that is to be returned.
 
 @item SUN_FIXED_LBRAC_BUG
 @findex SUN_FIXED_LBRAC_BUG
@@ -3885,6 +3922,168 @@
 @file{config/tm-@var{os}.h}.
 
 
+@section Converting an existing Target Architecture to Multi-arch
+@cindex converting targets to multi-arch
+
+This section describes the current accepted best practice for converting
+an existing target architecture to the multi-arch framework.
+
+The process consists of generating, testing, posting and committing a
+sequence of patches.  Each patch must contain a single change, for
+instance:
+
+@itemize @bullet
+
+@item
+Directly convert a group of functions into macros (the conversion does
+not change the behavior of any of the functions).
+
+@item
+Replace a non-multi-arch with a multi-arch mechanism (e.g.,
+@code{FRAME_INFO}).
+
+@item
+Enable multi-arch level one.
+
+@item
+Delete one or more files.
+
+@end itemize
+
+@noindent
+There isn't a size limit on a patch, however, a developer is strongly
+encouraged to keep the patch size down.
+
+Since each patch is well defined, and since each change has been tested
+and shows no regressions, the patches are considered @emph{fairly}
+obvious.  Such patches, when submitted by developers listed in the
+@file{MAINTAINERS} file, do not need approval.  Occasional steps in the
+process may be more complicated and less clear.  The developer is
+expected to use their judgment and is encouraged to seek advice as
+needed.
+
+@subsection Preparation
+
+The first step is to establish control.  Build (with @option{-Werror}
+enabled) and test the target so that there is a baseline against which
+the debugger can be compared.
+
+At no stage can the test results regress or @value{GDBN} stop compiling
+with @option{-Werror}.
+
+@subsection Add the multi-arch initialization code
+
+The objective of this step is to establish the basic multi-arch
+framework.  It involves
+
+@itemize @bullet
+
+@item
+The addition of a @code{@var{arch}_gdbarch_init} function@footnote{The
+above is from the original example and uses K&R C.  @value{GDBN}
+has since converted to ISO C but lets ignore that.} that creates
+the architecture:
+@smallexample
+static struct gdbarch *
+d10v_gdbarch_init (info, arches)
+     struct gdbarch_info info;
+     struct gdbarch_list *arches;
+@{
+  struct gdbarch *gdbarch;
+  /* there is only one d10v architecture */
+  if (arches != NULL)
+    return arches->gdbarch;
+  gdbarch = gdbarch_alloc (&info, NULL);
+  return gdbarch;
+@}
+@end smallexample
+@noindent
+@emph{}
+
+@item
+A per-architecture dump function to print any architecture specific
+information:
+@smallexample
+static void
+mips_dump_tdep (struct gdbarch *current_gdbarch,
+                struct ui_file *file)
+@{
+   @dots{} code to print architecture specific info @dots{}
+@}
+@end smallexample
+
+@item
+A change to @code{_initialize_@var{arch}_tdep} to register this new
+architecture:
+@smallexample
+void
+_initialize_mips_tdep (void)
+@{
+  gdbarch_register (bfd_arch_mips, mips_gdbarch_init,
+                    mips_dump_tdep);
+@end smallexample
+
+@item
+Add the macro @code{GDB_MULTI_ARCH}, defined as 0 (zero), to the file@*
+@file{config/@var{arch}/tm-@var{arch}.h}.
+
+@end itemize
+
+@subsection Update multi-arch incompatible mechanisms
+
+Some mechanisms do not work with multi-arch.  They include:
+
+@table @code
+@item EXTRA_FRAME_INFO
+Delete.
+@item FRAME_FIND_SAVED_REGS
+Replaced with @code{FRAME_INIT_SAVED_REGS}
+@end table
+
+@noindent
+At this stage you could also consider converting the macros into
+functions.
+
+@subsection Prepare for multi-arch level to one
+
+Temporally set @code{GDB_MULTI_ARCH} to @code{GDB_MULTI_ARCH_PARTIAL}
+and then build and start @value{GDBN} (the change should not be
+committed).  @value{GDBN} may not build, and once built, it may die with
+an internal error listing the architecture methods that must be
+provided.
+
+Fix any build problems (patch(es)).
+
+Convert all the architecture methods listed, which are only macros, into
+functions (patch(es)).
+
+Update @code{@var{arch}_gdbarch_init} to set all the missing
+architecture methods and wrap the corresponding macros in @code{#if
+!GDB_MULTI_ARCH} (patch(es)).
+
+@subsection Set multi-arch level one
+
+Change the value of @code{GDB_MULTI_ARCH} to GDB_MULTI_ARCH_PARTIAL (a
+single patch).
+
+Any problems with throwing ``the switch'' should have been fixed
+already.
+
+@subsection Convert remaining macros
+
+Suggest converting macros into functions (and setting the corresponding
+architecture method) in small batches.
+
+@subsection Set multi-arch level to two
+
+This should go smoothly.
+
+@subsection Delete the TM file
+
+The @file{tm-@var{arch}.h} can be deleted.  @file{@var{arch}.mt} and
+@file{configure.in} updated.
+
+
 @node Target Vector Definition
 
 @chapter Target Vector Definition
@@ -4446,6 +4645,143 @@
 functions, since they might never return to your code (they
 @samp{longjmp} instead).
 
+@section Per-architecture module data
+@cindex per-architecture module data
+@cindex multi-arch data
+@cindex data-pointer, per-architecture/per-module
+
+The multi-arch framework includes a mechanism for adding module specific
+per-architecture data-pointers to the @code{struct gdbarch} architecture
+object.
+
+A module registers one or more per-architecture data-pointers using the
+function @code{register_gdbarch_data}:
+
+@deftypefun struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *@var{init}, gdbarch_data_free_ftype *@var{free})
+
+The @var{init} function is used to obtain an initial value for a
+per-architecture data-pointer.  The function is called, after the
+architecture has been created, when the data-pointer is still
+uninitialized (@code{NULL}) and its value has been requested via a call
+to @code{gdbarch_data}.  A data-pointer can also be initialize
+explicitly using @code{set_gdbarch_data}.
+
+The @var{free} function is called when a data-pointer needs to be
+destroyed.  This occurs when either the corresponding @code{struct
+gdbarch} object is being destroyed or when @code{set_gdbarch_data} is
+overriding a non-@code{NULL} data-pointer value.
+
+The function @code{register_gdbarch_data} returns a @code{struct
+gdbarch_data} that is used to identify the data-pointer that was added
+to the module.
+
+@end deftypefun
+
+A typical module has @code{init} and @code{free} functions of the form:
+
+@smallexample
+static struct gdbarch_data *nozel_handle;
+static void *
+nozel_init (struct gdbarch *gdbarch)
+@{
+  struct nozel *data = XMALLOC (struct nozel);
+  @dots{}
+  return data;
+@}
+@dots{}
+static void
+nozel_free (struct gdbarch *gdbarch, void *data)
+@{
+  xfree (data);
+@}
+@end smallexample
+
+Since uninitialized (@code{NULL}) data-pointers are initialized
+on-demand, an @code{init} function is free to call other modules that
+use data-pointers.  Those modules data-pointers will be initialized as
+needed.  Care should be taken to ensure that the @code{init} call graph
+does not contain cycles.
+
+The data-pointer is registered with the call:
+
+@smallexample
+void
+_initialize_nozel (void)
+@{
+  nozel_handle = register_gdbarch_data (nozel_init, nozel_free);
+@dots{}
+@end smallexample
+
+The per-architecture data-pointer is accessed using the function:
+
+@deftypefun void *gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{data_handle})
+Given the architecture @var{arch} and module data handle
+@var{data_handle} (returned by @code{register_gdbarch_data}, this
+function returns the current value of the per-architecture data-pointer.
+@end deftypefun
+
+The non-@code{NULL} data-pointer returned by @code{gdbarch_data} should
+be saved in a local variable and then used directly:
+
+@smallexample
+int
+nozel_total (struct gdbarch *gdbarch)
+@{
+  int total;
+  struct nozel *data = gdbarch_data (gdbarch, nozel_handle);
+  @dots{}
+  return total;
+@}
+@end smallexample
+
+It is also possible to directly initialize the data-pointer using:
+
+@deftypefun void set_gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *handle, void *@var{pointer})
+Update the data-pointer corresponding to @var{handle} with the value of
+@var{pointer}.  If the previous data-pointer value is non-NULL, then it
+is freed using data-pointers @var{free} function.
+@end deftypefun
+
+This function is used by modules that require a mechanism for explicitly
+setting the per-architecture data-pointer during architecture creation:
+
+@smallexample
+/* Called during architecture creation.  */
+extern void
+set_gdbarch_nozel (struct gdbarch *gdbarch,
+                   int total)
+@{
+  struct nozel *data = XMALLOC (struct nozel);
+  @dots{}
+  set_gdbarch_data (gdbarch, nozel_handle, nozel);
+@}
+@end smallexample
+
+@smallexample
+/* Default, called when nozel not set by set_gdbarch_nozel().  */
+static void *
+nozel_init (struct gdbarch *gdbarch)
+@{
+  struct nozel *default_nozel = XMALLOC (struc nozel);
+  @dots{}
+  return default_nozel;
+@}
+@end smallexample
+
+@smallexample
+void
+_initialize_nozel (void)
+@{
+  nozel_handle = register_gdbarch_data (nozel_init, NULL);
+  @dots{}
+@end smallexample
+
+@noindent
+Note that an @code{init} function still needs to be registered.  It is
+used to initialize the data-pointer when the architecture creation phase
+fail to set an initial value.
+
+
 @section Wrapping Output Lines
 @cindex line wrap in output
 
@@ -4486,11 +4822,12 @@
 @value{GDBN}, as described in the following sections.
 
 
-@subsection ISO-C
+@subsection ISO C
 
-@value{GDBN} assumes an ISO-C compliant compiler.
+@value{GDBN} assumes an ISO/IEC 9899:1990 (a.k.a.@: ISO C90) compliant
+compiler.
 
-@value{GDBN} does not assume an ISO-C or POSIX compliant C library.
+@value{GDBN} does not assume an ISO C or POSIX compliant C library.
 
 
 @subsection Memory Management
@@ -4749,19 +5086,30 @@
 
 @subsection Include Files
 
-All @file{.c} files should include @file{defs.h} first.
+A @file{.c} file should include @file{defs.h} first.
 
-All @file{.c} files should explicitly include the headers for any
-declarations they refer to.  They should not rely on files being
-included indirectly.
+A @file{.c} file should directly include the @code{.h} file of every
+declaration and/or definition it directly refers to.  It cannot rely on
+indirect inclusion.
 
-With the exception of the global definitions supplied by @file{defs.h},
-a header file should explicitly include the header declaring any
-@code{typedefs} et.al.@: it refers to.
+A @file{.h} file should directly include the @code{.h} file of every
+declaration and/or definition it directly refers to.  It cannot rely on
+indirect inclusion.  Exception: The file @file{defs.h} does not need to
+be directly included.
 
-@code{extern} declarations should never appear in @code{.c} files.
+An external declaration should only appear in one include file.
 
-All include files should be wrapped in:
+An external declaration should never appear in a @code{.c} file.
+Exception: a declaration for the @code{_initialize} function that
+pacifies @option{-Wmissing-declaration}.
+
+A @code{typedef} definition should only appear in one include file.
+
+An opaque @code{struct} declaration can appear in multiple @file{.h}
+files.  Where possible, a @file{.h} file should use an opaque
+@code{struct} declaration instead of an include.
+
+All @file{.h} files should be wrapped in:
 
 @smallexample
 #ifndef INCLUDE_FILE_NAME_H
@@ -5158,41 +5506,50 @@
 reason) support for a new host are considered acceptable.}
 
 
-@section Obsolete any code
+@section Obsoleting code
 
 Before anything else, poke the other developers (and around the source
 code) to see if there is anything that can be removed from @value{GDBN}
 (an old target, an unused file).
 
 Obsolete code is identified by adding an @code{OBSOLETE} prefix to every
-line.  Doing this means that it is easy to identify obsolete code when
-grepping through the sources.
+line.  Doing this means that it is easy to identify something that has
+been obsoleted when greping through the sources.
 
-The process has a number of steps and is intentionally slow --- this is
-to mainly ensure that people have had a reasonable chance to respond.
-Remember, everything on the internet takes a week.
+The process is done in stages --- this is mainly to ensure that the
+wider @value{GDBN} community has a reasonable opportunity to respond.
+Remember, everything on the Internet takes a week.
 
-@itemize @bullet
+@enumerate
 @item
-announce the change on @email{gdb@@sources.redhat.com, GDB mailing list}
+Post the proposal on @email{gdb@@sources.redhat.com, the GDB mailing
+list} Creating a bug report to track the task's state, is also highly
+recommended.
 @item
-wait a week or so
+Wait a week or so.
 @item
-announce the change on @email{gdb-announce@@sources.redhat.com, GDB
-Announcement mailing list}
+Post the proposal on @email{gdb-announce@@sources.redhat.com, the GDB
+Announcement mailing list}.
 @item
-wait a week or so
+Wait a week or so.
 @item
-go through and edit all relevant files and lines (e.g., in
-@file{configure.tgt}) so that they are prefixed with the word
-@code{OBSOLETE}.
-@end itemize
+Go through and edit all relevant files and lines so that they are
+prefixed with the word @code{OBSOLETE}.
+@item
+Wait until the next GDB version, containing this obsolete code, has been
+released.
+@item
+Remove the obsolete code.
+@end enumerate
 
-@emph{Maintainer note: Removing old code, while regrettable, is a good
-thing.  Firstly it helps the developers by removing code that is either
-no longer relevant or simply wrong.  Secondly since it removes any
-history associated with the file (effectively clearing the slate) the
-developer has a much freer hand when it comes to fixing broken files.}
+@noindent
+@emph{Maintainer note: While removing old code is regrettable it is
+hopefully better for @value{GDBN}'s long term development.  Firstly it
+helps the developers by removing code that is either no longer relevant
+or simply wrong.  Secondly since it removes any history associated with
+the file (effectively clearing the slate) the developer has a much freer
+hand when it comes to fixing broken files.}
+
 
 
 @section Before the Branch
@@ -5246,38 +5603,142 @@
 The targets are listed in @file{gdb/MAINTAINERS}.
 
 
-@section Cut the branch
+@section Cut the Branch
 
-@subheading The dirty work
-
-I think something like the below was used:
+@subheading Create the branch
 
 @smallexample
-$  d=`date -u +%Y-%m-%d`
-$  echo $d
-2002-01-24
-$  cvs -f -d /cvs/src rtag -D $d-gmt \
-gdb_5_1-$d-branchpoint insight+dejagnu
-$  cvs -f -d /cvs/src rtag -b -r gdb_V_V-$d-branchpoint \
-gdb_5_1-$d-branch insight+dejagnu
+$  u=5.1
+$  v=5.2
+$  V=`echo $v | sed 's/\./_/g'`
+$  D=`date -u +%Y-%m-%d`
+$  echo $u $V $D
+5.1 5_2 2002-03-03
+$  echo cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-D $D-gmt gdb_$V-$D-branchpoint insight+dejagnu
+cvs -f -d :ext:sources.redhat.com:/cvs/src rtag
+-D 2002-03-03-gmt gdb_5_2-2002-03-03-branchpoint insight+dejagnu
+$  ^echo ^^
+...
+$  echo cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-b -r gdb_$V-$D-branchpoint gdb_$V-branch insight+dejagnu
+cvs -f -d :ext:sources.redhat.com:/cvs/src rtag \
+-b -r gdb_5_2-2002-03-03-branchpoint gdb_5_2-branch insight+dejagnu
+$  ^echo ^^
+...
 $
 @end smallexample
 
 @itemize @bullet
 @item
-the @kbd{-D YYYY-MM-DD-gmt} forces the branch to an exact date/time.
+by using @kbd{-D YYYY-MM-DD-gmt} the branch is forced to an exact
+date/time.
 @item
-the trunk is first tagged so that the branch point can easily be found
+the trunk is first taged so that the branch point can easily be found
 @item
-Insight (which includes GDB) and dejagnu are tagged at the same time
+Insight (which includes GDB) and dejagnu are all tagged at the same time
+@item
+@file{version.in} gets bumped to avoid version number conflicts
+@item
+the reading of @file{.cvsrc} is disabled using @file{-f}
 @end itemize
 
-@subheading Post the branch info
+@subheading Update @file{version.in}
+
+@smallexample
+$  u=5.1
+$  v=5.2
+$  V=`echo $v | sed 's/\./_/g'`
+$  echo $u $v$V
+5.1 5_2
+$  cd /tmp
+$  echo cvs -f -d :ext:sources.redhat.com:/cvs/src co \
+-r gdb_$V-branch src/gdb/version.in
+cvs -f -d :ext:sources.redhat.com:/cvs/src co
+ -r gdb_5_2-branch src/gdb/version.in
+$  ^echo ^^
+U src/gdb/version.in
+$  cd src/gdb
+$  echo $u.90-0000-00-00-cvs > version.in
+$  cat version.in
+5.1.90-0000-00-00-cvs
+$  cvs -f commit version.in
+@end smallexample
+
+@itemize @bullet
+@item
+@file{0000-00-00} is used as a date to pump prime the version.in update
+mechanism
+@item
+@file{.90} and the previous branch version are used as fairly arbitrary
+initial branch version number
+@end itemize
+
 
 @subheading Update the web and news pages
 
+Something?
+
 @subheading Tweak cron to track the new branch
 
+The file @file{gdbadmin/cron/crontab} contains gdbadmin's cron table.
+This file needs to be updated so that:
+
+@itemize @bullet
+@item
+a daily timestamp is added to the file @file{version.in}
+@item
+the new branch is included in the snapshot process
+@end itemize
+
+@noindent
+See the file @file{gdbadmin/cron/README} for how to install the updated
+cron table.
+
+The file @file{gdbadmin/ss/README} should also be reviewed to reflect
+any changes.  That file is copied to both the branch/ and current/
+snapshot directories.
+
+
+@subheading Update the NEWS and README files
+
+The @file{NEWS} file needs to be updated so that on the branch it refers
+to @emph{changes in the current release} while on the trunk it also
+refers to @emph{changes since the current release}.
+
+The @file{README} file needs to be updated so that it refers to the
+current release.
+
+@subheading Post the branch info
+
+Send an announcement to the mailing lists:
+
+@itemize @bullet
+@item
+@email{gdb-announce@@sources.redhat.com, GDB Announcement mailing list}
+@item
+@email{gdb@@sources.redhat.com, GDB Discsussion mailing list} and
+@email{gdb-testers@@sources.redhat.com, GDB Discsussion mailing list}
+@end itemize
+
+@emph{Pragmatics: The branch creation is sent to the announce list to
+ensure that people people not subscribed to the higher volume discussion
+list are alerted.}
+
+The announcement should include:
+
+@itemize @bullet
+@item
+the branch tag
+@item
+how to check out the branch using CVS
+@item
+the date/number of weeks until the release
+@item
+the branch commit policy
+still holds.
+@end itemize
+
 @section Stabilize the branch
 
 Something goes here.
@@ -5325,7 +5786,8 @@
 @itemize @bullet
 @item
 Check the @code{autoconf} version carefully.  You want to be using the
-version taken from the @file{binutils} snapshot directory.  It is very
+version taken from the @file{binutils} snapshot directory, which can be
+found at @uref{ftp://sources.redhat.com/pub/binutils/}. It is very
 unlikely that a system installed version of @code{autoconf} (e.g.,
 @file{/usr/bin/autoconf}) is correct.
 @end itemize
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index 52b88b4..6b4c3dc 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -1754,7 +1754,8 @@
 enumeration or a subrange, and the type is a bitmask whose length is
 specified by the number of elements in @var{type-information}.
 
-In CHILL, if it is a bitstring instead of a set, also use the @samp{S}
+In CHILL, @c OBSOLETE
+if it is a bitstring instead of a set, also use the @samp{S}
 type attribute (@pxref{String Field}).
 
 @item * @var{type-information}
@@ -1955,7 +1956,8 @@
 Pascal Stringptr.  What is this?  This is an AIX feature.
 @end table
 
-Languages, such as CHILL which have a string type which is basically
+Languages, such as CHILL @c OBSOLETE
+which have a string type which is basically
 just an array of characters use the @samp{S} type attribute
 (@pxref{String Field}).
 
diff --git a/gdb/doublest.c b/gdb/doublest.c
index a4b4b76..6e96d78 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -681,6 +681,7 @@
     {
       warning ("Can't store a floating-point number of %d bytes.", len);
       memset (addr, 0, len);
+      return;
     }
 
   floatformat_from_doublest (fmt, &val, addr);
diff --git a/gdb/dst.h b/gdb/dst.h
index b72c58c..89ad9ec 100644
--- a/gdb/dst.h
+++ b/gdb/dst.h
@@ -1,1671 +1,1671 @@
-/* <apollo/dst.h> */
-/* Apollo object module DST (debug symbol table) description */
-
-#ifndef apollo_dst_h
-#define apollo_dst_h
-
-#if defined(apollo) && !defined(__GNUC__)
-#define ALIGNED1  __attribute( (aligned(1)) )
-#else
-/* Remove attribute directives from non-Apollo code: */
-#define ALIGNED1		/* nil */
-#endif
-
-
-
-/* Identification of this version of the debug symbol table.  Producers of the
-   debug symbol table must write these values into the version number field of
-   the compilation unit record in .blocks .
- */
-#define dst_version_major    1
-#define dst_version_minor    3
-
-
-/*
-   ** Enumeration of debug record types appearing in .blocks and .symbols ...
- */
-typedef enum
-  {
-    dst_typ_pad,		/*  0 */
-    dst_typ_comp_unit,		/*  1 */
-    dst_typ_section_tab,	/*  2 */
-    dst_typ_file_tab,		/*  3 */
-    dst_typ_block,		/*  4 */
-    dst_typ_5,
-    dst_typ_var,
-    dst_typ_pointer,		/*  7 */
-    dst_typ_array,		/*  8 */
-    dst_typ_subrange,		/*  9 */
-    dst_typ_set,		/* 10 */
-    dst_typ_implicit_enum,	/* 11 */
-    dst_typ_explicit_enum,	/* 12 */
-    dst_typ_short_rec,		/* 13 */
-    dst_typ_old_record,
-    dst_typ_short_union,	/* 15 */
-    dst_typ_old_union,
-    dst_typ_file,		/* 17 */
-    dst_typ_offset,		/* 18 */
-    dst_typ_alias,		/* 19 */
-    dst_typ_signature,		/* 20 */
-    dst_typ_21,
-    dst_typ_old_label,		/* 22 */
-    dst_typ_scope,		/* 23 */
-    dst_typ_end_scope,		/* 24 */
-    dst_typ_25,
-    dst_typ_26,
-    dst_typ_string_tab,		/* 27 */
-    dst_typ_global_name_tab,	/* 28 */
-    dst_typ_forward,		/* 29 */
-    dst_typ_aux_size,		/* 30 */
-    dst_typ_aux_align,		/* 31 */
-    dst_typ_aux_field_size,	/* 32 */
-    dst_typ_aux_field_off,	/* 33 */
-    dst_typ_aux_field_align,	/* 34 */
-    dst_typ_aux_qual,		/* 35 */
-    dst_typ_aux_var_bound,	/* 36 */
-    dst_typ_extension,		/* 37 */
-    dst_typ_string,		/* 38 */
-    dst_typ_old_entry,
-    dst_typ_const,		/* 40 */
-    dst_typ_reference,		/* 41 */
-    dst_typ_record,		/* 42 */
-    dst_typ_union,		/* 43 */
-    dst_typ_aux_type_deriv,	/* 44 */
-    dst_typ_locpool,		/* 45 */
-    dst_typ_variable,		/* 46 */
-    dst_typ_label,		/* 47 */
-    dst_typ_entry,		/* 48 */
-    dst_typ_aux_lifetime,	/* 49 */
-    dst_typ_aux_ptr_base,	/* 50 */
-    dst_typ_aux_src_range,	/* 51 */
-    dst_typ_aux_reg_val,	/* 52 */
-    dst_typ_aux_unit_names,	/* 53 */
-    dst_typ_aux_sect_info,	/* 54 */
-    dst_typ_END_OF_ENUM
-  }
-dst_rec_type_t;
-
-
-/*
-   ** Dummy bounds for variably dimensioned arrays:
- */
-#define dst_dummy_array_size  100
-
-
-/*
-   ** Reference to another item in the symbol table.
-   **
-   ** The value of a dst_rel_offset_t is the relative offset from the start of the
-   ** referencing record to the start of the referenced record, string, etc. 
-   **
-   ** The value of a NIL dst_rel_offset_t is zero.
- */
-
-typedef long dst_rel_offset_t ALIGNED1;
-
-
-/* FIXME: Here and many places we make assumptions about sizes of host
-   data types, structure layout, etc.  Only needs to be fixed if we care
-   about cross-debugging, though.  */
-
-/*
-   ** Section-relative reference. 
-   **
-   ** The section index field is an index into the local compilation unit's
-   ** section table (see dst_rec_section_tab_t)--NOT into the object module
-   ** section table!
-   **
-   ** The sect_offset field is the offset in bytes into the section.
-   **
-   ** A NIL dst_sect_ref_t has a sect_index field of zero.  Indexes originate
-   ** at one.
- */
-
-typedef struct
-  {
-    unsigned short sect_index;
-    unsigned long sect_offset ALIGNED1;
-  }
-dst_sect_ref_t;
-
-#define dst_sect_index_nil    0
-#define dst_sect_index_origin 1
-
-
-/*
-   ** Source location descriptor.
-   **
-   ** The file_index field is an index into the local compilation unit's
-   ** file table (see dst_rec_file_tab_t).
-   **
-   ** A NIL dst_src_loc_t has a file_index field of zero.  Indexes originate
-   ** at one.
- */
-
-typedef struct
-  {
-    boolean reserved:1;		/* reserved for future use */
-    int file_index:11;		/* index into .blocks source file list */
-    int line_number:20;		/* source line number */
-  }
-dst_src_loc_t;
-
-#define dst_file_index_nil    0
-#define dst_file_index_origin 1
-
-
-/*
-   ** Standard (primitive) type codes.
- */
-
-typedef enum
-  {
-    dst_non_std_type,
-    dst_int8_type,		/* 8 bit integer */
-    dst_int16_type,		/* 16 bit integer */
-    dst_int32_type,		/* 32 bit integer */
-    dst_uint8_type,		/* 8 bit unsigned integer */
-    dst_uint16_type,		/* 16 bit unsigned integer */
-    dst_uint32_type,		/* 32 bit unsigned integer */
-    dst_real32_type,		/* single precision ieee floatining point */
-    dst_real64_type,		/* double precision ieee floatining point */
-    dst_complex_type,		/* single precision complex */
-    dst_dcomplex_type,		/* double precision complex */
-    dst_bool8_type,		/* boolean =logical*1 */
-    dst_bool16_type,		/* boolean =logical*2 */
-    dst_bool32_type,		/* boolean =logical*4 */
-    dst_char_type,		/* 8 bit ascii character */
-    dst_string_type,		/* string of 8 bit ascii characters */
-    dst_ptr_type,		/* univ_pointer */
-    dst_set_type,		/* generic 256 bit set */
-    dst_proc_type,		/* generic procedure (signature not specified) */
-    dst_func_type,		/* generic function (signature not specified) */
-    dst_void_type,		/* c void type */
-    dst_uchar_type,		/* c unsigned char */
-    dst_std_type_END_OF_ENUM
-  }
-dst_std_type_t;
-
-
-/*
-   ** General data type descriptor
-   **
-   ** If the user_defined_type bit is clear, then the type is a standard type, and
-   ** the remaining bits contain the dst_std_type_t of the type.  If the bit is
-   ** set, then the type is defined in a separate dst record, which is referenced
-   ** by the remaining bits as a dst_rel_offset_t.
- */
-
-typedef union
-  {
-    struct
-      {
-	boolean user_defined_type:1;	/* tag field */
-	int must_be_zero:23;	/* 23 bits of pad */
-	dst_std_type_t dtc:8;	/* 8 bit primitive data */
-      }
-    std_type;
-
-    struct
-      {
-	boolean user_defined_type:1;	/* tag field */
-	int doffset:31;		/* offset to type record */
-      }
-    user_type;
-  }
-dst_type_t ALIGNED1;
-
-/* The user_type.doffset field is a 31-bit signed value.  Some versions of C
-   do not support signed bit fields.  The following macro will extract that
-   field as a signed value:
- */
-#define dst_user_type_offset(type_rec) \
-    ( ((int) ((type_rec).user_type.doffset << 1)) >> 1 )
-
-
-/*================================================*/
-/*========== RECORDS IN .blocks SECTION ==========*/
-/*================================================*/
-
-/*-----------------------
-  COMPILATION UNIT record 
-  -----------------------
-  This must be the first record in each .blocks section.
-  Provides a set of information describing the output of a single compilation
-  and pointers to additional information for the compilation unit.
-*/
-
-typedef enum
-  {
-    dst_pc_code_locs,		/* ranges in loc strings are pc ranges */
-    dst_comp_unit_END_OF_ENUM
-  }
-dst_comp_unit_flag_t;
-
-typedef enum
-  {
-    dst_lang_unk,		/* unknown language */
-    dst_lang_pas,		/* Pascal */
-    dst_lang_ftn,		/* FORTRAN */
-    dst_lang_c,			/* C */
-    dst_lang_mod2,		/* Modula-2 */
-    dst_lang_asm_m68k,		/* 68K assembly language */
-    dst_lang_asm_a88k,		/* AT assembly language */
-    dst_lang_ada,		/* Ada */
-    dst_lang_cxx,		/* C++ */
-    dst_lang_END_OF_ENUM
-  }
-dst_lang_type_t;
-
-typedef struct
-  {
-    struct
-      {
-	unsigned char major_part;	/* = dst_version_major */
-	unsigned char minor_part;	/* = dst_version_minor */
-      }
-    version;			/* version of dst */
-    unsigned short flags;	/* mask of dst_comp_unit_flag_t */
-    unsigned short lang_type;	/* source language */
-    unsigned short number_of_blocks;	/* number of blocks records */
-    dst_rel_offset_t root_block_offset;		/* offset to root block (module?) */
-    dst_rel_offset_t section_table /* offset to section table record */ ;
-    dst_rel_offset_t file_table;	/* offset to file table record */
-    unsigned long data_size;	/* total size of .blocks data */
-  }
-dst_rec_comp_unit_t ALIGNED1;
-
-
-/*--------------------
-  SECTION TABLE record
-  --------------------
-  There must be one section table associated with each compilation unit.
-  Other debug records refer to sections via their index in this table.  The
-  section base addresses in the table are virtual addresses of the sections,
-  relocated by the linker.
-*/
-
-typedef struct
-  {
-    unsigned short number_of_sections;	/* size of array: */
-    unsigned long section_base[dst_dummy_array_size] ALIGNED1;
-  }
-dst_rec_section_tab_t ALIGNED1;
-
-
-/*-----------------
-  FILE TABLE record
-  -----------------
-  There must be one file table associated with each compilation unit describing
-  the source (and include) files used by each compilation unit.  Other debug 
-  records refer to files via their index in this table.  The first entry is the
-  primary source file.
-*/
-
-typedef struct
-  {
-    long dtm;			/* time last modified (time_$clock_t) */
-    dst_rel_offset_t noffset;	/* offset to name string for source file */
-  }
-dst_file_desc_t;
-
-typedef struct
-  {
-    unsigned short number_of_files;	/* size of array: */
-    dst_file_desc_t files[dst_dummy_array_size] ALIGNED1;
-  }
-dst_rec_file_tab_t ALIGNED1;
-
-
-/*-----------------
-  NAME TABLE record
-  -----------------
-  A name table record may appear as an auxiliary record to the file table,
-  providing additional qualification of the file indexes for languages that 
-  need it (i.e. Ada).  Name table entries parallel file table entries of the
-  same file index.
-*/
-
-typedef struct
-  {
-    unsigned short number_of_names;	/* size of array: */
-    dst_rel_offset_t names[dst_dummy_array_size] ALIGNED1;
-  }
-dst_rec_name_tab_t ALIGNED1;
-
-
-/*--------------
-  BLOCK record
-  --------------
-  Describes a lexical program block--a procedure, function, module, etc.
-*/
-
-/* Block types.  These may be used in any way desired by the compiler writers. 
-   The debugger uses them only to give a description to the user of the type of
-   a block.  The debugger makes no other assumptions about the meaning of any
-   of these.  For example, the fact that a block is executable (e.g., program)
-   or not (e.g., module) is expressed in block attributes (see below), not
-   guessed at from the block type.
- */
-typedef enum
-  {
-    dst_block_module,		/* some pascal = modula = ada types */
-    dst_block_program,
-    dst_block_procedure,
-    dst_block_function,		/* C function */
-    dst_block_subroutine,	/* some fortran block types */
-    dst_block_block_data,
-    dst_block_stmt_function,
-    dst_block_package,		/* a few particular to Ada */
-    dst_block_package_body,
-    dst_block_subunit,
-    dst_block_task,
-    dst_block_file,		/* a C outer scope? */
-    dst_block_class,		/* C++ or Simula */
-    dst_block_END_OF_ENUM
-  }
-dst_block_type_t;
-
-/* Block attributes.  This is the information used by the debugger to represent
-   the semantics of blocks.
- */
-typedef enum
-  {
-    dst_block_main_entry,	/* the block's entry point is a main entry into
-				   the compilation unit */
-    dst_block_executable,	/* the block has an entry point */
-    dst_block_attr_END_OF_ENUM
-  }
-dst_block_attr_t;
-
-/* Code range.  Each block has associated with it one or more code ranges. An
-   individual code range is identified by a range of source (possibly nil) and
-   a range of executable code.  For example, a block which has its executable
-   code spread over multiple sections will have one code range per section.
- */
-typedef struct
-  {
-    unsigned long code_size;	/* size of executable code (in bytes ) */
-    dst_sect_ref_t code_start;	/* starting address of executable code */
-    dst_sect_ref_t lines_start;	/* start of line number tables */
-  }
-dst_code_range_t;
-
-typedef struct
-  {
-    dst_block_type_t block_type:8;
-    unsigned short flags:8;	/* mask of dst_block_attr_t flags */
-    dst_rel_offset_t sibling_block_off;		/* offset to next sibling block */
-    dst_rel_offset_t child_block_off;	/* offset to first contained block */
-    dst_rel_offset_t noffset;	/* offset to block name string */
-    dst_sect_ref_t symbols_start;	/* start of debug symbols  */
-    unsigned short n_of_code_ranges;	/* size of array... */
-    dst_code_range_t code_ranges[dst_dummy_array_size] ALIGNED1;
-  }
-dst_rec_block_t ALIGNED1;
-
-
-/*--------------------------
-  AUX SECT INFO TABLE record
-  --------------------------
-  Appears as an auxiliary to a block record.  Expands code range information
-  by providing references into additional, language-dependent sections for 
-  information related to specific code ranges of the block.  Sect info table
-  entries parallel code range array entries of the same index.
-*/
-
-typedef struct
-  {
-    unsigned char tag;		/* currently can only be zero */
-    unsigned char number_of_refs;	/* size of array: */
-    dst_sect_ref_t refs[dst_dummy_array_size] ALIGNED1;
-  }
-dst_rec_sect_info_tab_t ALIGNED1;
-
-/*=================================================*/
-/*========== RECORDS IN .symbols SECTION ==========*/
-/*=================================================*/
-
-/*-----------------
-  CONSTANT record
-  -----------------
-  Describes a symbolic constant.
-*/
-
-typedef struct
-  {
-    float r;			/* real part */
-    float i;			/* imaginary part */
-  }
-dst_complex_t;
-
-typedef struct
-  {
-    double dr;			/* real part */
-    double di;			/* imaginary part */
-  }
-dst_double_complex_t;
-
-/* The following record provides a way of describing constant values with 
-   non-standard type and no limit on size. 
- */
-typedef union
-  {
-    char char_data[dst_dummy_array_size];
-    short int_data[dst_dummy_array_size];
-    long long_data[dst_dummy_array_size];
-  }
-dst_big_kon_t;
-
-/* Representation of the value of a general constant.
- */
-typedef struct
-  {
-    unsigned short length;	/* size of constant value (bytes) */
-
-    union
-      {
-	unsigned short kon_int8;
-	short kon_int16;
-	long kon_int32 ALIGNED1;
-	float kon_real ALIGNED1;
-	double kon_dbl ALIGNED1;
-	dst_complex_t kon_cplx ALIGNED1;
-	dst_double_complex_t kon_dcplx ALIGNED1;
-	char kon_char;
-	dst_big_kon_t kon ALIGNED1;
-      }
-    val;			/* value data of constant */
-  }
-dst_const_t ALIGNED1;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of const definition */
-    dst_type_t type_desc;	/* type of this (manifest) constant */
-    dst_const_t value;
-  }
-dst_rec_const_t ALIGNED1;
-
-/*----------------
-  VARIABLE record
-  ----------------
-  Describes a program variable.
-*/
-
-/* Variable attributes.  These define certain variable semantics to the
-   debugger.
- */
-typedef enum
-  {
-    dst_var_attr_read_only,	/* is read-only (a program literal) */
-    dst_var_attr_volatile,	/* same as compiler's VOLATILE attribute */
-    dst_var_attr_global,	/* is a global definition or reference */
-    dst_var_attr_compiler_gen,	/* is compiler-generated */
-    dst_var_attr_static,	/* has static location */
-    dst_var_attr_END_OF_ENUM
-  }
-dst_var_attr_t;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_rel_offset_t loffset;	/* offset to loc string */
-    dst_src_loc_t src_loc;	/* file/line of variable definition */
-    dst_type_t type_desc;	/* type descriptor */
-    unsigned short attributes;	/* mask of dst_var_attr_t flags */
-  }
-dst_rec_variable_t ALIGNED1;
-
-
-/*----------------
-  old VAR record
- -----------------
- Used by older compilers to describe a variable
-*/
-
-typedef enum
-  {
-    dst_var_loc_unknown,	/* Actually defined as "unknown" */
-    dst_var_loc_abs,		/* Absolute address */
-    dst_var_loc_sect_off,	/* Absolute address as a section offset */
-    dst_var_loc_ind_sect_off,	/* An indexed section offset ???? */
-    dst_var_loc_reg,		/* register */
-    dst_var_loc_reg_rel,	/* register relative - usually fp */
-    dst_var_loc_ind_reg_rel,	/* Indexed register relative */
-    dst_var_loc_ftn_ptr_based,	/* Fortran pointer based */
-    dst_var_loc_pc_rel,		/* PC relative. Really. */
-    dst_var_loc_external,	/* External */
-    dst_var_loc_END_OF_ENUM
-  }
-dst_var_loc_t;
-
-/* Locations come in two versions. The short, and the long. The difference
- * between the short and the long is the addition of a statement number
- * field to the start andend of the range of the long, and and unkown
- * purpose field in the middle. Also, loc_type and loc_index aren't
- * bitfields in the long version.
- */
-
-typedef struct
-  {
-    unsigned short loc_type:4;
-    unsigned short loc_index:12;
-    long location;
-    short start_line;		/* start_line and end_line? */
-    short end_line;		/* I'm guessing here.       */
-  }
-dst_var_loc_short_t;
-
-typedef struct
-  {
-    unsigned short loc_type;
-    unsigned short loc_index;
-    long location;
-    short unknown;		/* Always 0003 or 3b3c. Why? */
-    short start_statement;
-    short start_line;
-    short end_statement;
-    short end_line;
-  }
-dst_var_loc_long_t;
-
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of description */
-    dst_type_t type_desc;	/* Type description */
-    unsigned short attributes;	/* mask of dst_var_attr_t flags */
-    unsigned short no_of_locs:15;	/* Number of locations */
-    unsigned short short_locs:1;	/* True if short locations. */
-    union
-      {
-	dst_var_loc_short_t shorts[dst_dummy_array_size];
-	dst_var_loc_long_t longs[dst_dummy_array_size];
-      }
-    locs;
-  }
-dst_rec_var_t;
-
-/*----------------
-  old LABEL record
- -----------------
- Used by older compilers to describe a label
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of description */
-    char location[12];		/* location string */
-  }
-dst_rec_old_label_t ALIGNED1;
-
-/*----------------
-  POINTER record
-  ----------------
-  Describes a pointer type.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to the name string for this type */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_type_t type_desc;	/* base type of this pointer */
-  }
-dst_rec_pointer_t ALIGNED1;
-
-
-/*-------------
-  ARRAY record
-  -------------
-  Describes an array type.
-
-  Multidimensional arrays are described with a number of dst_rec_array_t 
-  records, one per array dimension, each linked to the next through the
-  elem_type_desc.doffset field.  Each record must have its multi_dim flag
-  set.
-
-  If column_major is true (as with FORTRAN arrays) then the last array bound in
-  the declaration is the first array index in memory, which is the opposite of
-  the usual case (as with Pascal and C arrays).
-
-  Variable array bounds are described by auxiliary records; if aux_var_bound
-  records are present, the lo_bound and hi_bound fields of this record are
-  ignored by the debugger.
-
-  span_comp identifies one of the language-dependent ways in which the distance
-  between successive array elements (span) is calculated.  
-     dst_use_span_field    -- the span is the value of span field.
-     dst_compute_from_prev -- the span is the size of the previous dimension.
-     dst_compute_from_next -- the span is the size of the next dimension.
-  In the latter two cases, the span field contains an amount of padding to add
-  to the size of the appropriate dimension to calculate the span.
-*/
-
-typedef enum
-  {
-    dst_use_span_field,
-    dst_compute_from_prev,
-    dst_compute_from_next,
-    dst_span_comp_END_OF_ENUM
-  }
-dst_span_comp_t;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_type_t elem_type_desc;	/* array element type */
-    dst_type_t indx_type_desc;	/* array index type */
-    long lo_bound;		/* lower bound of index */
-    long hi_bound;		/* upper bound of index */
-    unsigned long span;		/* see above */
-    unsigned long size;		/* total array size (bytes) */
-    boolean multi_dim:1;
-    boolean is_packed:1;	/* true if packed array */
-    boolean is_signed:1;	/* true if packed elements are signed */
-    dst_span_comp_t span_comp:2;	/* how to compute span */
-    boolean column_major:1;
-    unsigned short reserved:2;	/* must be zero */
-    unsigned short elem_size:8;	/* element size if packed (bits) */
-  }
-dst_rec_array_t ALIGNED1;
-
-
-/*-----------------
-  SUBRANGE record
-  -----------------
-  Describes a subrange type.
-*/
-
-/* Variable subrange bounds are described by auxiliary records; if aux_var_bound
-   records are present, the lo_bound and hi_bound fields of this record are
-   ignored by the debugger.
- */
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of subrange definition */
-    dst_type_t type_desc;	/* parent type */
-    long lo_bound;		/* lower bound of subrange */
-    long hi_bound;		/* upper bound of subrange */
-    unsigned short size;	/* storage size (bytes) */
-  }
-dst_rec_subrange_t ALIGNED1;
-
-
-/*---------------
-  STRING record 
-  ---------------
-  Describes a string type.
-*/
-
-/* Variable subrange bounds are described by auxiliary records; if aux_var_bound
-   records are present, the lo_bound and hi_bound fields of this record are
-   ignored by the debugger.
- */
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of string definition */
-    dst_type_t elem_type_desc;	/* element type */
-    dst_type_t indx_type_desc;	/* index type */
-    long lo_bound;		/* lower bound */
-    long hi_bound;		/* upper bound */
-    unsigned long size;		/* total string size (bytes) if fixed */
-  }
-dst_rec_string_t ALIGNED1;
-
-
-/*---------------
-  SET record 
-  ---------------
-  Describes a set type.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_type_t type_desc;	/* element type */
-    unsigned short nbits;	/* number of bits in set */
-    unsigned short size;	/* storage size (bytes) */
-  }
-dst_rec_set_t ALIGNED1;
-
-
-/*-----------------------------
-  IMPLICIT ENUMERATION record 
-  -----------------------------
-  Describes an enumeration type with implicit element values = 0, 1, 2, ...
-  (Pascal-style).
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    unsigned short nelems;	/* number of elements in enumeration */
-    unsigned short size;	/* storage size (bytes) */
-    /* offsets to name strings of elements 0, 1, 2, ... */
-    dst_rel_offset_t elem_noffsets[dst_dummy_array_size];
-  }
-dst_rec_implicit_enum_t ALIGNED1;
-
-
-/*-----------------------------
-  EXPLICIT ENUMERATION record 
-  -----------------------------
-  Describes an enumeration type with explicitly assigned element values
-  (C-style).
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to element name string */
-    long value;			/* element value */
-  }
-dst_enum_elem_t;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    unsigned short nelems;	/* number of elements in enumeration */
-    unsigned short size;	/* storage size (bytes) */
-    /* name/value pairs, one describing each enumeration value: */
-    dst_enum_elem_t elems[dst_dummy_array_size];
-  }
-dst_rec_explicit_enum_t ALIGNED1;
-
-
-/*-----------------------
-  RECORD / UNION record 
-  -----------------------
-  Describes a record (struct) or union.
-
-  If the record is larger than 2**16 bytes then an attached aux record
-  specifies its size.  Also, if the record is stored in short form then
-  attached records specify field offsets larger than 2**16 bytes.
-
-  Whether the fields[] array or sfields[] array is used is selected by
-  the dst_rec_type_t of the overall dst record.
-*/
-
-/*
-   Record field descriptor, short form.  This form handles only fields which
-   are an even number of bytes long, located some number of bytes from the
-   start of the record.
- */
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to field name string */
-    dst_type_t type_desc;	/* field type */
-    unsigned short foffset;	/* field offset from start of record (bytes) */
-  }
-dst_short_field_t ALIGNED1;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_type_t type_desc;	/* field type */
-    unsigned short foffset;	/* byte offset */
-    unsigned short is_packed:1;	/* True if field is packed */
-    unsigned short bit_offset:6;	/* Bit offset */
-    unsigned short size:6;	/* Size in bits */
-    unsigned short sign:1;	/* True if signed */
-    unsigned short pad:2;	/* Padding. Must be 0 */
-  }
-dst_old_field_t ALIGNED1;
-
-/* Tag enumeration for long record field descriptor:
- */
-typedef enum
-  {
-    dst_field_byte,
-    dst_field_bit,
-    dst_field_loc,
-    dst_field_END_OF_ENUM
-  }
-dst_field_format_t;
-
-/*
-   Record field descriptor, long form.  The format of the field information
-   is identified by the format_tag, which contains one of the above values.
-   The field_byte variant is equivalent to the short form of field descriptor.
-   The field_bit variant handles fields which are any number of bits long,
-   located some number of bits from the start of the record.  The field_loc
-   variant allows the location of the field to be described by a general loc
-   string.
- */
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name of field */
-    dst_type_t type_desc;	/* type of field */
-    union
-      {
-	struct
-	  {
-	    dst_field_format_t format_tag:2;	/* dst_field_byte */
-	    unsigned long offset:30;	/* offset of field in bytes */
-	  }
-	field_byte ALIGNED1;
-	struct
-	  {
-	    dst_field_format_t format_tag:2;	/* dst_field_bit */
-	    unsigned long nbits:6;	/* bit size of field */
-	    unsigned long is_signed:1;	/* signed/unsigned attribute */
-	    unsigned long bit_offset:3;		/* bit offset from byte boundary */
-	    int pad:4;		/* must be zero */
-	    unsigned short byte_offset;		/* offset of byte boundary */
-	  }
-	field_bit ALIGNED1;
-	struct
-	  {
-	    dst_field_format_t format_tag:2;	/* dst_field_loc */
-	    int loffset:30;	/* dst_rel_offset_t to loc string */
-	  }
-	field_loc ALIGNED1;
-      }
-    f ALIGNED1;
-  }
-dst_field_t;
-
-/* The field_loc.loffset field is a 30-bit signed value.  Some versions of C do
-   not support signed bit fields.  The following macro will extract that field
-   as a signed value:
- */
-#define dst_field_loffset(field_rec) \
-    ( ((int) ((field_rec).f.field_loc.loffset << 2)) >> 2 )
-
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to record name string */
-    dst_src_loc_t src_loc;	/* file/line where this record is defined */
-    unsigned short size;	/* storage size (bytes) */
-    unsigned short nfields;	/* number of fields in this record */
-    union
-      {
-	dst_field_t fields[dst_dummy_array_size];
-	dst_short_field_t sfields[dst_dummy_array_size];
-	dst_old_field_t ofields[dst_dummy_array_size];
-      }
-    f;				/* array of fields */
-  }
-dst_rec_record_t ALIGNED1;
-
-
-/*-------------
-  FILE record
-  -------------
-  Describes a file type.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line where type was defined */
-    dst_type_t type_desc;	/* file element type */
-  }
-dst_rec_file_t ALIGNED1;
-
-
-/*---------------
-  OFFSET record 
-  ---------------
-   Describes a Pascal offset type.
-   (This type, an undocumented Domain Pascal extension, is currently not
-   supported by the debugger)
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to the name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_type_t area_type_desc;	/* area type */
-    dst_type_t base_type_desc;	/* base type */
-    long lo_bound;		/* low bound of the offset range */
-    long hi_bound;		/* high bound of the offset range */
-    long bias;			/* bias */
-    unsigned short scale;	/* scale factor */
-    unsigned short size;	/* storage size (bytes) */
-  }
-dst_rec_offset_t ALIGNED1;
-
-
-/*--------------
-  ALIAS record 
-  --------------
-  Describes a type alias (e.g., typedef).
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_type_t type_desc;	/* parent type */
-  }
-dst_rec_alias_t ALIGNED1;
-
-
-/*------------------
-  SIGNATURE record
-  ------------------
-  Describes a procedure/function type.
-*/
-
-/* Enumeration of argument semantics.  Note that most are mutually
-   exclusive.
- */
-typedef enum
-  {
-    dst_arg_attr_val,		/* passed by value */
-    dst_arg_attr_ref,		/* passed by reference */
-    dst_arg_attr_name,		/* passed by name */
-    dst_arg_attr_in,		/* readable in the callee */
-    dst_arg_attr_out,		/* writable in the callee */
-    dst_arg_attr_hidden,	/* not visible in the caller */
-    dst_arg_attr_END_OF_ENUM
-  }
-dst_arg_attr_t;
-
-/* Argument descriptor.  Actually points to a variable record for most of the
-   information.
- */
-typedef struct
-  {
-    dst_rel_offset_t var_offset;	/* offset to variable record */
-    unsigned short attributes;	/* a mask of dst_arg_attr_t flags */
-  }
-dst_arg_t ALIGNED1;
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to name string */
-    dst_src_loc_t src_loc;	/* file/line of function definition */
-    dst_rel_offset_t result;	/* offset to function result variable record */
-    unsigned short nargs;	/* number of arguments */
-    dst_arg_t args[dst_dummy_array_size];
-  }
-dst_rec_signature_t ALIGNED1;
-
-/*--------------
-  SCOPE record
-  --------------
-  Obsolete. Use the new ENTRY type instead.
-  Old compilers may put this in as the first entry in a function,
-  terminated by an end of scope entry.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* Name offset */
-    dst_src_loc_t start_line;	/* Starting line */
-    dst_src_loc_t end_line;	/* Ending line */
-  }
-dst_rec_scope_t ALIGNED1;
-
-/*--------------
-  ENTRY record
-  --------------
-  Describes a procedure/function entry point.  An entry record is to a
-  signature record roughly as a variable record is to a type descriptor record.
-
-  The entry_number field is keyed to the entry numbers in .lines -- the 
-  debugger locates the code location of an entry by searching the line
-  number table for an entry numbered with the value of entry_number.  The
-  main entry is numbered zero.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to entry name string */
-    dst_rel_offset_t loffset;	/* where to jump to call this entry */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-    dst_rel_offset_t sig_desc;	/* offset to signature descriptor */
-    unsigned int entry_number:8;
-    int pad:8;			/* must be zero */
-  }
-dst_rec_entry_t ALIGNED1;
-
-/*-----------------------
-  Old format ENTRY record
-  -----------------------
-  Supposedly obsolete but still used by some compilers.
- */
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* Offset to entry name string */
-    dst_src_loc_t src_loc;	/* Location in source */
-    dst_rel_offset_t sig_desc;	/* Signature description */
-    char unknown[36];
-  }
-dst_rec_old_entry_t ALIGNED1;
-
-/*--------------
-  LABEL record 
-  --------------
-  Describes a program label.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t noffset;	/* offset to label string */
-    dst_rel_offset_t loffset;	/* offset to loc string */
-    dst_src_loc_t src_loc;	/* file/line of definition */
-  }
-dst_rec_label_t ALIGNED1;
-
-
-/*-----------------------
-  AUXILIARY SIZE record
-  -----------------------
-  May appear in the auxiliary record list of any type or variable record to
-  modify the default size of the type or variable.
-*/
-
-typedef struct
-  {
-    unsigned long size;		/* size (bytes) */
-  }
-dst_rec_aux_size_t ALIGNED1;
-
-
-/*-----------------------
-  AUXILIARY ALIGN record
-  -----------------------
-  May appear in the auxiliary record list of any type or variable record to
-  modify the default alignment of the type or variable.
-*/
-
-typedef struct
-  {
-    unsigned short alignment;	/* # of low order zero bits */
-  }
-dst_rec_aux_align_t ALIGNED1;
-
-
-/*-----------------------------
-  AUXILIARY FIELD SIZE record
-  -----------------------------
-  May appear in the auxiliary record list of any RECORD/UNION record to 
-  modify the default size of a field.
-*/
-
-typedef struct
-  {
-    unsigned short field_no;	/* field number */
-    unsigned long size;		/* size (bits) */
-  }
-dst_rec_aux_field_size_t ALIGNED1;
-
-
-
-/*-----------------------------
-  AUXILIARY FIELD OFFSET record
-  -----------------------------
-  May appear in the auxiliary record list of any RECORD/UNION record to 
-  specify a field offset larger than 2**16.
-*/
-
-typedef struct
-  {
-    unsigned short field_no;	/* field number */
-    unsigned long foffset;	/* offset */
-  }
-dst_rec_aux_field_off_t ALIGNED1;
-
-
-/*-----------------------------
-  AUXILIARY FIELD ALIGN record
-  -----------------------------
-  May appear in the auxiliary record list of any RECORD/UNION record to 
-  modify the default alignment of a field.
-*/
-
-typedef struct
-  {
-    unsigned short field_no;	/* field number */
-    unsigned short alignment;	/* number of low order zero bits */
-  }
-dst_rec_aux_field_align_t ALIGNED1;
-
-
-/*----------------------------
-  AUXILIARY VAR BOUND record
-  ----------------------------
-  May appear in the auxiliary record list of any ARRAY, SUBRANGE or STRING
-  record to describe a variable bound for the range of the type.
-*/
-
-typedef enum
-  {
-    dst_low_bound,		/* the low bound is variable */
-    dst_high_bound,		/* the high bound is variable */
-    dst_var_bound_END_OF_ENUM
-  }
-dst_var_bound_t;
-
-typedef struct
-  {
-    unsigned short which;	/* which bound */
-    dst_rel_offset_t voffset ALIGNED1;	/* variable that defines bound */
-  }
-dst_rec_aux_var_bound_t ALIGNED1;
-
-
-/*----------------------------------
-  AUXILIARY TYPE DERIVATION record 
-  ----------------------------------
-  May appear in the auxiliary record list of any RECORD/UNION record to denote
-  class inheritance of that type from a parent type.
-
-  Inheritance implies that it is possible to convert the inheritor type to the
-  inherited type, retaining those fields which were inherited.  To allow this,
-  orig_field_no, a field number into the record type, is provided.  If 
-  orig_is_pointer is false, then the start of the inherited record is located
-  at the location of the field indexed by orig_field_no.  If orig_is_pointer
-  is true, then it is located at the address contained in the field indexed
-  by orig_field_no (assumed to be a pointer).
-*/
-
-typedef struct
-  {
-    dst_type_t parent_type;	/* reference to inherited type */
-    unsigned short orig_field_no;
-    boolean orig_is_pointer:1;
-    int unused:15;		/* must be zero */
-  }
-dst_rec_aux_type_deriv_t ALIGNED1;
-
-
-/*------------------------------------
-  AUXILIARY VARIABLE LIFETIME record
-  ------------------------------------
-  May appear in the auxiliary record list of a VARIABLE record to add location
-  information for an additional variable lifetime.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t loffset;
-  }
-dst_rec_aux_lifetime_t ALIGNED1;
-
-
-/*-------------------------------
-  AUXILIARY POINTER BASE record 
-  -------------------------------
-  May appear in the auxiliary record list of a VARIABLE record to provide a
-  pointer base to substitute for references to any such bases in the location
-  string of the variable.  A pointer base is another VARIABLE record.  When
-  the variable is evaluated by the debugger, it uses the current value of the
-  pointer base variable in computing its location.
-
-  This is useful for representing FORTRAN pointer-based variables.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t voffset;
-  }
-dst_rec_aux_ptr_base_t ALIGNED1;
-
-
-/*---------------------------------
-  AUXILIARY REGISTER VALUE record 
-  ---------------------------------
-  May appear in the auxiliary record list of an ENTRY record to specify
-  a register that must be set to a specific value before jumping to the entry
-  point in a debugger "call".  The debugger must set the debuggee register,
-  specified by the register code, to the value of the *address* to which the
-  location string resolves.  If the address is register-relative, then the
-  call cannot be made unless the current stack frame is the lexical parent
-  of the entry.  An example of this is when a (Pascal) nested procedure
-  contains references to its parent's variables, which it accesses through
-  a static link register.  The static link register must be set to some
-  address relative to the parent's stack base register.
-*/
-
-typedef struct
-  {
-    unsigned short reg;		/* identifies register to set (isp enum) */
-    dst_rel_offset_t loffset;	/* references a location string */
-  }
-dst_rec_aux_reg_val_t ALIGNED1;
-
-
-/*==========================================================*/
-/*========== RECORDS USED IN .blocks AND .symbols ==========*/
-/*==========================================================*/
-
-/*---------------------
-  STRING TABLE record
-  ---------------------
-  A string table record contains any number of null-terminated, variable length
-  strings.   The length field gives the size in bytes of the text field, which
-  can be any size.
-
-  The global name table shares this format.  This record appears in the
-  .blocks section.  Each string in the table identifies a global defined in
-  the current compilation unit.
-
-  The loc pool record shares this format as well.  Loc strings are described
-  elsewhere.
-*/
-
-typedef struct
-  {
-    unsigned long length;
-    char text[dst_dummy_array_size];
-  }
-dst_rec_string_tab_t ALIGNED1;
-
-
-/*-----------------------
-  AUXILIARY QUAL record 
-  -----------------------
-  May appear in the auxiliary record list of any BLOCK, VARIABLE, or type record
-  to provide it with a fully-qualified, language-dependent name.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t lang_qual_name;
-  }
-dst_rec_aux_qual_t ALIGNED1;
-
-
-/*----------------
-  FORWARD record
-  ----------------
-  Reference to a record somewhere else.  This allows identical definitions in
-  different scopes to share data.
-*/
-
-typedef struct
-  {
-    dst_rel_offset_t rec_off;
-  }
-dst_rec_forward_t ALIGNED1;
-
-
-/*-------------------------------
-  AUXILIARY SOURCE RANGE record
-  -------------------------------
-  May appear in the auxiliary record list of any BLOCK record to specify a
-  range of source lines over which the block is active.
-*/
-
-typedef struct
-  {
-    dst_src_loc_t first_line;	/* first source line */
-    dst_src_loc_t last_line;	/* last source line */
-  }
-dst_rec_aux_src_range_t ALIGNED1;
-
-
-/*------------------
-  EXTENSION record 
-  ------------------
-  Provision for "foreign" records, such as might be generated by a non-Apollo
-  compiler.  Apollo software will ignore these.
-*/
-
-typedef struct
-  {
-    unsigned short rec_size;	/* record size (bytes) */
-    unsigned short ext_type;	/* defined by whoever generates it */
-    unsigned short ext_data;	/* place-holder for arbitrary amount of data */
-  }
-dst_rec_extension_t ALIGNED1;
-
-
-/*
-   ** DEBUG SYMBOL record -- The wrapper for all .blocks and .symbols records.
-   **
-   ** This record ties together all previous .blocks and .symbols records 
-   ** together in a union with a common header.  The rec_type field of the
-   ** header identifies the record type.  The rec_flags field currently only
-   ** defines auxiliary record lists. 
-   **
-   ** If a record carries with it a non-null auxiliary record list, its
-   ** dst_flag_has_aux_recs flag is set, and each of the records that follow
-   ** it are treated as its auxiliary records, until the end of the compilation
-   ** unit or scope is reached, or until an auxiliary record with its
-   ** dst_flag_last_aux_rec flag set is reached.
- */
-
-typedef enum
-  {
-    dst_flag_has_aux_recs,
-    dst_flag_last_aux_rec,
-    dst_rec_flag_END_OF_ENUM
-  }
-dst_rec_flags_t;
-
-typedef struct
-  {
-    dst_rec_type_t rec_type:8;	/* record type */
-    int rec_flags:8;		/* mask of dst_rec_flags_t */
-    union			/* switched on rec_type field above */
-      {
-	/* dst_typ_pad requires no additional fields */
-	dst_rec_comp_unit_t comp_unit_;
-	dst_rec_section_tab_t section_tab_;
-	dst_rec_file_tab_t file_tab_;
-	dst_rec_block_t block_;
-	dst_rec_var_t var_;
-	dst_rec_pointer_t pointer_;
-	dst_rec_array_t array_;
-	dst_rec_subrange_t subrange_;
-	dst_rec_set_t set_;
-	dst_rec_implicit_enum_t implicit_enum_;
-	dst_rec_explicit_enum_t explicit_enum_;
-	/* dst_typ_short_{rec,union} are represented by 'rec' (below) */
-	dst_rec_file_t file_;
-	dst_rec_offset_t offset_;
-	dst_rec_alias_t alias_;
-	dst_rec_signature_t signature_;
-	dst_rec_old_label_t old_label_;
-	dst_rec_scope_t scope_;
-	/* dst_typ_end_scope requires no additional fields */
-	dst_rec_string_tab_t string_tab_;
-	/* dst_typ_global_name_tab is represented by 'string_tab' (above) */
-	dst_rec_forward_t forward_;
-	dst_rec_aux_size_t aux_size_;
-	dst_rec_aux_align_t aux_align_;
-	dst_rec_aux_field_size_t aux_field_size_;
-	dst_rec_aux_field_off_t aux_field_off_;
-	dst_rec_aux_field_align_t aux_field_align_;
-	dst_rec_aux_qual_t aux_qual_;
-	dst_rec_aux_var_bound_t aux_var_bound_;
-	dst_rec_extension_t extension_;
-	dst_rec_string_t string_;
-	dst_rec_const_t const_;
-	/* dst_typ_reference is represented by 'pointer' (above) */
-	dst_rec_record_t record_;
-	/* dst_typ_union is represented by 'record' (above) */
-	dst_rec_aux_type_deriv_t aux_type_deriv_;
-	/* dst_typ_locpool is represented by 'string_tab' (above) */
-	dst_rec_variable_t variable_;
-	dst_rec_label_t label_;
-	dst_rec_entry_t entry_;
-	dst_rec_aux_lifetime_t aux_lifetime_;
-	dst_rec_aux_ptr_base_t aux_ptr_base_;
-	dst_rec_aux_src_range_t aux_src_range_;
-	dst_rec_aux_reg_val_t aux_reg_val_;
-	dst_rec_name_tab_t aux_unit_names_;
-	dst_rec_sect_info_tab_t aux_sect_info_;
-      }
-    rec_data ALIGNED1;
-  }
-dst_rec_t, *dst_rec_ptr_t;
-
-
-/*===============================================*/
-/*========== .lines SECTION DEFINITIONS =========*/
-/*===============================================*/
-/*
-   The .lines section contains a sequence of line number tables.  There is no
-   record structure within the section.  The start of the table for a routine
-   is pointed to by the block record, and the end of the table is signaled by
-   an escape code.
-
-   A line number table is a sequence of bytes.  The default entry contains a line
-   number delta (-7..+7) in the high 4 bits and a pc delta (0..15) in the low 4 
-   bits. Special cases, including when one or both of the values is too large
-   to fit in 4 bits and other special cases are handled through escape entries.
-   Escape entries are identified by the value 0x8 in the high 4 bits.  The low 4
-   bits are occupied by a function code.  Some escape entries are followed by
-   additional arguments, which may be bytes, words, or longwords.  This data is
-   not aligned. 
-
-   The initial PC offset, file number and line number are zero.  Normally, the
-   table begins with a dst_ln_file escape which establishes the initial file
-   and line number.  All PC deltas are unsigned (thus the table is ordered by
-   increasing PC); line number deltas are signed.  The table ends with a 
-   dst_ln_end escape, which is followed by a final table entry whose PC delta
-   gives the code size of the last statement.
-
-   Escape     Semantic
-   ---------  ------------------------------------------------------------
-   file       Changes file state.  The current source file remains constant
-   until another file escape.  Though the line number state is
-   also updated by a file escape, a file escape does NOT 
-   constitute a line table entry.
-
-   statement  Alters the statement number of the next table entry.  By 
-   default, all table entries refer to the first statement on a
-   line.  Statement number one is the second statement, and so on.
-
-   entry      Identifies the next table entry as the position of an entry 
-   point for the current block.  The PC position should follow 
-   any procedure prologue code.  An argument specifies the entry
-   number, which is keyed to the entry number of the corresponding
-   .symbols ENTRY record.
-
-   exit       Identifies the next table entry as the last position within 
-   the current block before a procedure epiloge and subsequent
-   procedure exit.
-
-   gap        By default, the executable code corresponding to a table entry 
-   is assumed to extend to the beginning of the next table entry.
-   If this is not the case--there is a "hole" in the table--then
-   a gap escape should follow the first table entry to specify
-   where the code for that entry ends.
- */
-
-#define dst_ln_escape_flag    -8
-
-/*
-   Escape function codes:
- */
-typedef enum
-  {
-    dst_ln_pad,			/* pad byte */
-    dst_ln_file,		/* file escape.  Next 4 bytes are a dst_src_loc_t */
-    dst_ln_dln1_dpc1,		/* 1 byte line delta, 1 byte pc delta */
-    dst_ln_dln2_dpc2,		/* 2 bytes line delta, 2 bytes pc delta */
-    dst_ln_ln4_pc4,		/* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
-    dst_ln_dln1_dpc0,		/* 1 byte line delta, pc delta = 0 */
-    dst_ln_ln_off_1,		/* statement escape, stmt # = 1 (2nd stmt on line) */
-    dst_ln_ln_off,		/* statement escape, stmt # = next byte */
-    dst_ln_entry,		/* entry escape, next byte is entry number */
-    dst_ln_exit,		/* exit escape */
-    dst_ln_stmt_end,		/* gap escape, 4 bytes pc delta */
-    dst_ln_escape_11,		/* reserved */
-    dst_ln_escape_12,		/* reserved */
-    dst_ln_escape_13,		/* reserved */
-    dst_ln_nxt_byte,		/* next byte contains the real escape code */
-    dst_ln_end,			/* end escape, final entry follows */
-    dst_ln_escape_END_OF_ENUM
-  }
-dst_ln_escape_t;
-
-/*
-   Line number table entry
- */
-typedef union
-  {
-    struct
-      {
-	unsigned int ln_delta:4;	/* 4 bit line number delta */
-	unsigned int pc_delta:4;	/* 4 bit pc delta */
-      }
-    delta;
-
-    struct
-      {
-	unsigned int esc_flag:4;	/* alias for ln_delta */
-	dst_ln_escape_t esc_code:4;	/* escape function code */
-      }
-    esc;
-
-    char sdata;			/* signed data byte */
-    unsigned char udata;	/* unsigned data byte */
-  }
-dst_ln_entry_t,
- *dst_ln_entry_ptr_t,
-  dst_ln_table_t[dst_dummy_array_size];
-
-/* The following macro will extract the ln_delta field as a signed value:
- */
-#define dst_ln_ln_delta(ln_rec) \
-    ( ((short) ((ln_rec).delta.ln_delta << 12)) >> 12 )
-
-
-
-
-typedef struct dst_sec_struct
-  {
-    char *buffer;
-    long position;
-    long size;
-    long base;
-  }
-dst_sec;
-
-
-/* Macros for access to the data */
-
-#define DST_comp_unit(x) 	((x)->rec_data.comp_unit_)
-#define DST_section_tab(x) 	((x)->rec_data.section_tab_)
-#define DST_file_tab(x) 	((x)->rec_data.file_tab_)
-#define DST_block(x) 		((x)->rec_data.block_)
-#define	DST_var(x)		((x)->rec_data.var_)
-#define DST_pointer(x) 		((x)->rec_data.pointer_)
-#define DST_array(x) 		((x)->rec_data.array_)
-#define DST_subrange(x) 	((x)->rec_data.subrange_)
-#define DST_set(x)	 	((x)->rec_data.set_)
-#define DST_implicit_enum(x) 	((x)->rec_data.implicit_enum_)
-#define DST_explicit_enum(x) 	((x)->rec_data.explicit_enum_)
-#define DST_short_rec(x) 	((x)->rec_data.record_)
-#define DST_short_union(x) 	((x)->rec_data.record_)
-#define DST_file(x) 		((x)->rec_data.file_)
-#define DST_offset(x) 		((x)->rec_data.offset_)
-#define DST_alias(x)	 	((x)->rec_data.alias_)
-#define DST_signature(x) 	((x)->rec_data.signature_)
-#define DST_old_label(x) 	((x)->rec_data.old_label_)
-#define DST_scope(x) 		((x)->rec_data.scope_)
-#define DST_string_tab(x) 	((x)->rec_data.string_tab_)
-#define DST_global_name_tab(x) 	((x)->rec_data.string_tab_)
-#define DST_forward(x) 		((x)->rec_data.forward_)
-#define DST_aux_size(x) 	((x)->rec_data.aux_size_)
-#define DST_aux_align(x) 	((x)->rec_data.aux_align_)
-#define DST_aux_field_size(x) 	((x)->rec_data.aux_field_size_)
-#define DST_aux_field_off(x) 	((x)->rec_data.aux_field_off_)
-#define DST_aux_field_align(x) 	((x)->rec_data.aux_field_align_)
-#define DST_aux_qual(x) 	((x)->rec_data.aux_qual_)
-#define DST_aux_var_bound(x) 	((x)->rec_data.aux_var_bound_)
-#define DST_extension(x) 	((x)->rec_data.extension_)
-#define DST_string(x) 		((x)->rec_data.string_)
-#define DST_const(x) 		((x)->rec_data.const_)
-#define DST_reference(x) 	((x)->rec_data.pointer_)
-#define DST_record(x) 		((x)->rec_data.record_)
-#define DST_union(x) 		((x)->rec_data.record_)
-#define DST_aux_type_deriv(x) 	((x)->rec_data.aux_type_deriv_)
-#define DST_locpool(x) 		((x)->rec_data.string_tab_)
-#define DST_variable(x) 	((x)->rec_data.variable_)
-#define DST_label(x) 		((x)->rec_data.label_)
-#define DST_entry(x) 		((x)->rec_data.entry_)
-#define DST_aux_lifetime(x) 	((x)->rec_data.aux_lifetime_)
-#define DST_aux_ptr_base(x) 	((x)->rec_data.aux_ptr_base_)
-#define DST_aux_src_range(x) 	((x)->rec_data.aux_src_range_)
-#define DST_aux_reg_val(x) 	((x)->rec_data.aux_reg_val_)
-#define DST_aux_unit_names(x) 	((x)->rec_data.aux_unit_names_)
-#define DST_aux_sect_info(x) 	((x)->rec_data.aux_sect_info_)
-
-
-/*
- * Type codes for loc strings. I'm not entirely certain about all of
- * these, but they seem to work.
- *                              troy@cbme.unsw.EDU.AU
- * If you find a variable whose location can't be decoded, you should
- * find out it's code using "dstdump -s filename". It will record an
- * entry for the variable, and give a text representation of what
- * the locstring means. Before that explaination there will be a
- * number. In the LOCSTRING table, that number will appear before
- * the start of the location string. Location string codes are
- * five bit codes with a 3 bit argument. Check the high 5 bits of
- * the one byte code, and figure out where it goes in here.
- * Then figure out exactly what the meaning is and code it in
- * dstread.c
- *
- * Note that ranged locs mean that the variable is in different locations
- * depending on the current PC. We ignore these because (a) gcc can't handle
- * them, and (b), If you don't use high levels of optimisation they won't
- * occur.
- */
-typedef enum
-  {
-    dst_lsc_end,		/* End of string */
-    dst_lsc_indirect,		/* Indirect through previous. Arg == 6 */
-    /* Or register ax (x=arg) */
-    dst_lsc_dreg,		/* register dx (x=arg) */
-    dst_lsc_03,
-    dst_lsc_section,		/* Section (arg+1) */
-    dst_lsc_05,
-    dst_lsc_06,
-    dst_lsc_add,		/* Add (arg+1)*2 */
-    dst_lsc_sub,		/* Subtract (arg+1)*2 */
-    dst_lsc_09,
-    dst_lsc_0a,
-    dst_lsc_sec_byte,		/* Section of next byte+1 */
-    dst_lsc_add_byte,		/* Add next byte (arg == 5) or next word
-				 * (arg == 6)
-				 */
-    dst_lsc_sub_byte,		/* Subtract next byte. (arg == 1) or next
-				 * word (arg == 6 ?)
-				 */
-    dst_lsc_sbreg,		/* Stack base register (frame pointer). Arg==0 */
-    dst_lsc_0f,
-    dst_lsc_ranged,		/* location is pc dependent */
-    dst_lsc_11,
-    dst_lsc_12,
-    dst_lsc_13,
-    dst_lsc_14,
-    dst_lsc_15,
-    dst_lsc_16,
-    dst_lsc_17,
-    dst_lsc_18,
-    dst_lsc_19,
-    dst_lsc_1a,
-    dst_lsc_1b,
-    dst_lsc_1c,
-    dst_lsc_1d,
-    dst_lsc_1e,
-    dst_lsc_1f
-  }
-dst_loc_string_code_t;
-
-/* If the following occurs after an addition/subtraction, that addition
- * or subtraction should be multiplied by 256. It's a complete byte, not
- * a code.
- */
-
-#define	dst_multiply_256	((char) 0x73)
-
-typedef struct
-  {
-    char code:5;
-    char arg:3;
-  }
-dst_loc_header_t ALIGNED1;
-
-typedef union
-  {
-    dst_loc_header_t header;
-    char data;
-  }
-dst_loc_entry_t ALIGNED1;
-
-#undef ALIGNED1
-#endif /* apollo_dst_h */
+// OBSOLETE /* <apollo/dst.h> */
+// OBSOLETE /* Apollo object module DST (debug symbol table) description */
+// OBSOLETE 
+// OBSOLETE #ifndef apollo_dst_h
+// OBSOLETE #define apollo_dst_h
+// OBSOLETE 
+// OBSOLETE #if defined(apollo) && !defined(__GNUC__)
+// OBSOLETE #define ALIGNED1  __attribute( (aligned(1)) )
+// OBSOLETE #else
+// OBSOLETE /* Remove attribute directives from non-Apollo code: */
+// OBSOLETE #define ALIGNED1		/* nil */
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Identification of this version of the debug symbol table.  Producers of the
+// OBSOLETE    debug symbol table must write these values into the version number field of
+// OBSOLETE    the compilation unit record in .blocks .
+// OBSOLETE  */
+// OBSOLETE #define dst_version_major    1
+// OBSOLETE #define dst_version_minor    3
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Enumeration of debug record types appearing in .blocks and .symbols ...
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_typ_pad,		/*  0 */
+// OBSOLETE     dst_typ_comp_unit,		/*  1 */
+// OBSOLETE     dst_typ_section_tab,	/*  2 */
+// OBSOLETE     dst_typ_file_tab,		/*  3 */
+// OBSOLETE     dst_typ_block,		/*  4 */
+// OBSOLETE     dst_typ_5,
+// OBSOLETE     dst_typ_var,
+// OBSOLETE     dst_typ_pointer,		/*  7 */
+// OBSOLETE     dst_typ_array,		/*  8 */
+// OBSOLETE     dst_typ_subrange,		/*  9 */
+// OBSOLETE     dst_typ_set,		/* 10 */
+// OBSOLETE     dst_typ_implicit_enum,	/* 11 */
+// OBSOLETE     dst_typ_explicit_enum,	/* 12 */
+// OBSOLETE     dst_typ_short_rec,		/* 13 */
+// OBSOLETE     dst_typ_old_record,
+// OBSOLETE     dst_typ_short_union,	/* 15 */
+// OBSOLETE     dst_typ_old_union,
+// OBSOLETE     dst_typ_file,		/* 17 */
+// OBSOLETE     dst_typ_offset,		/* 18 */
+// OBSOLETE     dst_typ_alias,		/* 19 */
+// OBSOLETE     dst_typ_signature,		/* 20 */
+// OBSOLETE     dst_typ_21,
+// OBSOLETE     dst_typ_old_label,		/* 22 */
+// OBSOLETE     dst_typ_scope,		/* 23 */
+// OBSOLETE     dst_typ_end_scope,		/* 24 */
+// OBSOLETE     dst_typ_25,
+// OBSOLETE     dst_typ_26,
+// OBSOLETE     dst_typ_string_tab,		/* 27 */
+// OBSOLETE     dst_typ_global_name_tab,	/* 28 */
+// OBSOLETE     dst_typ_forward,		/* 29 */
+// OBSOLETE     dst_typ_aux_size,		/* 30 */
+// OBSOLETE     dst_typ_aux_align,		/* 31 */
+// OBSOLETE     dst_typ_aux_field_size,	/* 32 */
+// OBSOLETE     dst_typ_aux_field_off,	/* 33 */
+// OBSOLETE     dst_typ_aux_field_align,	/* 34 */
+// OBSOLETE     dst_typ_aux_qual,		/* 35 */
+// OBSOLETE     dst_typ_aux_var_bound,	/* 36 */
+// OBSOLETE     dst_typ_extension,		/* 37 */
+// OBSOLETE     dst_typ_string,		/* 38 */
+// OBSOLETE     dst_typ_old_entry,
+// OBSOLETE     dst_typ_const,		/* 40 */
+// OBSOLETE     dst_typ_reference,		/* 41 */
+// OBSOLETE     dst_typ_record,		/* 42 */
+// OBSOLETE     dst_typ_union,		/* 43 */
+// OBSOLETE     dst_typ_aux_type_deriv,	/* 44 */
+// OBSOLETE     dst_typ_locpool,		/* 45 */
+// OBSOLETE     dst_typ_variable,		/* 46 */
+// OBSOLETE     dst_typ_label,		/* 47 */
+// OBSOLETE     dst_typ_entry,		/* 48 */
+// OBSOLETE     dst_typ_aux_lifetime,	/* 49 */
+// OBSOLETE     dst_typ_aux_ptr_base,	/* 50 */
+// OBSOLETE     dst_typ_aux_src_range,	/* 51 */
+// OBSOLETE     dst_typ_aux_reg_val,	/* 52 */
+// OBSOLETE     dst_typ_aux_unit_names,	/* 53 */
+// OBSOLETE     dst_typ_aux_sect_info,	/* 54 */
+// OBSOLETE     dst_typ_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_rec_type_t;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Dummy bounds for variably dimensioned arrays:
+// OBSOLETE  */
+// OBSOLETE #define dst_dummy_array_size  100
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Reference to another item in the symbol table.
+// OBSOLETE    **
+// OBSOLETE    ** The value of a dst_rel_offset_t is the relative offset from the start of the
+// OBSOLETE    ** referencing record to the start of the referenced record, string, etc. 
+// OBSOLETE    **
+// OBSOLETE    ** The value of a NIL dst_rel_offset_t is zero.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef long dst_rel_offset_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* FIXME: Here and many places we make assumptions about sizes of host
+// OBSOLETE    data types, structure layout, etc.  Only needs to be fixed if we care
+// OBSOLETE    about cross-debugging, though.  */
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Section-relative reference. 
+// OBSOLETE    **
+// OBSOLETE    ** The section index field is an index into the local compilation unit's
+// OBSOLETE    ** section table (see dst_rec_section_tab_t)--NOT into the object module
+// OBSOLETE    ** section table!
+// OBSOLETE    **
+// OBSOLETE    ** The sect_offset field is the offset in bytes into the section.
+// OBSOLETE    **
+// OBSOLETE    ** A NIL dst_sect_ref_t has a sect_index field of zero.  Indexes originate
+// OBSOLETE    ** at one.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short sect_index;
+// OBSOLETE     unsigned long sect_offset ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_sect_ref_t;
+// OBSOLETE 
+// OBSOLETE #define dst_sect_index_nil    0
+// OBSOLETE #define dst_sect_index_origin 1
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Source location descriptor.
+// OBSOLETE    **
+// OBSOLETE    ** The file_index field is an index into the local compilation unit's
+// OBSOLETE    ** file table (see dst_rec_file_tab_t).
+// OBSOLETE    **
+// OBSOLETE    ** A NIL dst_src_loc_t has a file_index field of zero.  Indexes originate
+// OBSOLETE    ** at one.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     boolean reserved:1;		/* reserved for future use */
+// OBSOLETE     int file_index:11;		/* index into .blocks source file list */
+// OBSOLETE     int line_number:20;		/* source line number */
+// OBSOLETE   }
+// OBSOLETE dst_src_loc_t;
+// OBSOLETE 
+// OBSOLETE #define dst_file_index_nil    0
+// OBSOLETE #define dst_file_index_origin 1
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** Standard (primitive) type codes.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_non_std_type,
+// OBSOLETE     dst_int8_type,		/* 8 bit integer */
+// OBSOLETE     dst_int16_type,		/* 16 bit integer */
+// OBSOLETE     dst_int32_type,		/* 32 bit integer */
+// OBSOLETE     dst_uint8_type,		/* 8 bit unsigned integer */
+// OBSOLETE     dst_uint16_type,		/* 16 bit unsigned integer */
+// OBSOLETE     dst_uint32_type,		/* 32 bit unsigned integer */
+// OBSOLETE     dst_real32_type,		/* single precision ieee floatining point */
+// OBSOLETE     dst_real64_type,		/* double precision ieee floatining point */
+// OBSOLETE     dst_complex_type,		/* single precision complex */
+// OBSOLETE     dst_dcomplex_type,		/* double precision complex */
+// OBSOLETE     dst_bool8_type,		/* boolean =logical*1 */
+// OBSOLETE     dst_bool16_type,		/* boolean =logical*2 */
+// OBSOLETE     dst_bool32_type,		/* boolean =logical*4 */
+// OBSOLETE     dst_char_type,		/* 8 bit ascii character */
+// OBSOLETE     dst_string_type,		/* string of 8 bit ascii characters */
+// OBSOLETE     dst_ptr_type,		/* univ_pointer */
+// OBSOLETE     dst_set_type,		/* generic 256 bit set */
+// OBSOLETE     dst_proc_type,		/* generic procedure (signature not specified) */
+// OBSOLETE     dst_func_type,		/* generic function (signature not specified) */
+// OBSOLETE     dst_void_type,		/* c void type */
+// OBSOLETE     dst_uchar_type,		/* c unsigned char */
+// OBSOLETE     dst_std_type_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_std_type_t;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** General data type descriptor
+// OBSOLETE    **
+// OBSOLETE    ** If the user_defined_type bit is clear, then the type is a standard type, and
+// OBSOLETE    ** the remaining bits contain the dst_std_type_t of the type.  If the bit is
+// OBSOLETE    ** set, then the type is defined in a separate dst record, which is referenced
+// OBSOLETE    ** by the remaining bits as a dst_rel_offset_t.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef union
+// OBSOLETE   {
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	boolean user_defined_type:1;	/* tag field */
+// OBSOLETE 	int must_be_zero:23;	/* 23 bits of pad */
+// OBSOLETE 	dst_std_type_t dtc:8;	/* 8 bit primitive data */
+// OBSOLETE       }
+// OBSOLETE     std_type;
+// OBSOLETE 
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	boolean user_defined_type:1;	/* tag field */
+// OBSOLETE 	int doffset:31;		/* offset to type record */
+// OBSOLETE       }
+// OBSOLETE     user_type;
+// OBSOLETE   }
+// OBSOLETE dst_type_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /* The user_type.doffset field is a 31-bit signed value.  Some versions of C
+// OBSOLETE    do not support signed bit fields.  The following macro will extract that
+// OBSOLETE    field as a signed value:
+// OBSOLETE  */
+// OBSOLETE #define dst_user_type_offset(type_rec) \
+// OBSOLETE     ( ((int) ((type_rec).user_type.doffset << 1)) >> 1 )
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*================================================*/
+// OBSOLETE /*========== RECORDS IN .blocks SECTION ==========*/
+// OBSOLETE /*================================================*/
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   COMPILATION UNIT record 
+// OBSOLETE   -----------------------
+// OBSOLETE   This must be the first record in each .blocks section.
+// OBSOLETE   Provides a set of information describing the output of a single compilation
+// OBSOLETE   and pointers to additional information for the compilation unit.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_pc_code_locs,		/* ranges in loc strings are pc ranges */
+// OBSOLETE     dst_comp_unit_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_comp_unit_flag_t;
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_lang_unk,		/* unknown language */
+// OBSOLETE     dst_lang_pas,		/* Pascal */
+// OBSOLETE     dst_lang_ftn,		/* FORTRAN */
+// OBSOLETE     dst_lang_c,			/* C */
+// OBSOLETE     dst_lang_mod2,		/* Modula-2 */
+// OBSOLETE     dst_lang_asm_m68k,		/* 68K assembly language */
+// OBSOLETE     dst_lang_asm_a88k,		/* AT assembly language */
+// OBSOLETE     dst_lang_ada,		/* Ada */
+// OBSOLETE     dst_lang_cxx,		/* C++ */
+// OBSOLETE     dst_lang_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_lang_type_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	unsigned char major_part;	/* = dst_version_major */
+// OBSOLETE 	unsigned char minor_part;	/* = dst_version_minor */
+// OBSOLETE       }
+// OBSOLETE     version;			/* version of dst */
+// OBSOLETE     unsigned short flags;	/* mask of dst_comp_unit_flag_t */
+// OBSOLETE     unsigned short lang_type;	/* source language */
+// OBSOLETE     unsigned short number_of_blocks;	/* number of blocks records */
+// OBSOLETE     dst_rel_offset_t root_block_offset;		/* offset to root block (module?) */
+// OBSOLETE     dst_rel_offset_t section_table /* offset to section table record */ ;
+// OBSOLETE     dst_rel_offset_t file_table;	/* offset to file table record */
+// OBSOLETE     unsigned long data_size;	/* total size of .blocks data */
+// OBSOLETE   }
+// OBSOLETE dst_rec_comp_unit_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*--------------------
+// OBSOLETE   SECTION TABLE record
+// OBSOLETE   --------------------
+// OBSOLETE   There must be one section table associated with each compilation unit.
+// OBSOLETE   Other debug records refer to sections via their index in this table.  The
+// OBSOLETE   section base addresses in the table are virtual addresses of the sections,
+// OBSOLETE   relocated by the linker.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short number_of_sections;	/* size of array: */
+// OBSOLETE     unsigned long section_base[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_section_tab_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------
+// OBSOLETE   FILE TABLE record
+// OBSOLETE   -----------------
+// OBSOLETE   There must be one file table associated with each compilation unit describing
+// OBSOLETE   the source (and include) files used by each compilation unit.  Other debug 
+// OBSOLETE   records refer to files via their index in this table.  The first entry is the
+// OBSOLETE   primary source file.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     long dtm;			/* time last modified (time_$clock_t) */
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string for source file */
+// OBSOLETE   }
+// OBSOLETE dst_file_desc_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short number_of_files;	/* size of array: */
+// OBSOLETE     dst_file_desc_t files[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_file_tab_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------
+// OBSOLETE   NAME TABLE record
+// OBSOLETE   -----------------
+// OBSOLETE   A name table record may appear as an auxiliary record to the file table,
+// OBSOLETE   providing additional qualification of the file indexes for languages that 
+// OBSOLETE   need it (i.e. Ada).  Name table entries parallel file table entries of the
+// OBSOLETE   same file index.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short number_of_names;	/* size of array: */
+// OBSOLETE     dst_rel_offset_t names[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_name_tab_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*--------------
+// OBSOLETE   BLOCK record
+// OBSOLETE   --------------
+// OBSOLETE   Describes a lexical program block--a procedure, function, module, etc.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /* Block types.  These may be used in any way desired by the compiler writers. 
+// OBSOLETE    The debugger uses them only to give a description to the user of the type of
+// OBSOLETE    a block.  The debugger makes no other assumptions about the meaning of any
+// OBSOLETE    of these.  For example, the fact that a block is executable (e.g., program)
+// OBSOLETE    or not (e.g., module) is expressed in block attributes (see below), not
+// OBSOLETE    guessed at from the block type.
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_block_module,		/* some pascal = modula = ada types */
+// OBSOLETE     dst_block_program,
+// OBSOLETE     dst_block_procedure,
+// OBSOLETE     dst_block_function,		/* C function */
+// OBSOLETE     dst_block_subroutine,	/* some fortran block types */
+// OBSOLETE     dst_block_block_data,
+// OBSOLETE     dst_block_stmt_function,
+// OBSOLETE     dst_block_package,		/* a few particular to Ada */
+// OBSOLETE     dst_block_package_body,
+// OBSOLETE     dst_block_subunit,
+// OBSOLETE     dst_block_task,
+// OBSOLETE     dst_block_file,		/* a C outer scope? */
+// OBSOLETE     dst_block_class,		/* C++ or Simula */
+// OBSOLETE     dst_block_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_block_type_t;
+// OBSOLETE 
+// OBSOLETE /* Block attributes.  This is the information used by the debugger to represent
+// OBSOLETE    the semantics of blocks.
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_block_main_entry,	/* the block's entry point is a main entry into
+// OBSOLETE 				   the compilation unit */
+// OBSOLETE     dst_block_executable,	/* the block has an entry point */
+// OBSOLETE     dst_block_attr_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_block_attr_t;
+// OBSOLETE 
+// OBSOLETE /* Code range.  Each block has associated with it one or more code ranges. An
+// OBSOLETE    individual code range is identified by a range of source (possibly nil) and
+// OBSOLETE    a range of executable code.  For example, a block which has its executable
+// OBSOLETE    code spread over multiple sections will have one code range per section.
+// OBSOLETE  */
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned long code_size;	/* size of executable code (in bytes ) */
+// OBSOLETE     dst_sect_ref_t code_start;	/* starting address of executable code */
+// OBSOLETE     dst_sect_ref_t lines_start;	/* start of line number tables */
+// OBSOLETE   }
+// OBSOLETE dst_code_range_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_block_type_t block_type:8;
+// OBSOLETE     unsigned short flags:8;	/* mask of dst_block_attr_t flags */
+// OBSOLETE     dst_rel_offset_t sibling_block_off;		/* offset to next sibling block */
+// OBSOLETE     dst_rel_offset_t child_block_off;	/* offset to first contained block */
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to block name string */
+// OBSOLETE     dst_sect_ref_t symbols_start;	/* start of debug symbols  */
+// OBSOLETE     unsigned short n_of_code_ranges;	/* size of array... */
+// OBSOLETE     dst_code_range_t code_ranges[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_block_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*--------------------------
+// OBSOLETE   AUX SECT INFO TABLE record
+// OBSOLETE   --------------------------
+// OBSOLETE   Appears as an auxiliary to a block record.  Expands code range information
+// OBSOLETE   by providing references into additional, language-dependent sections for 
+// OBSOLETE   information related to specific code ranges of the block.  Sect info table
+// OBSOLETE   entries parallel code range array entries of the same index.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned char tag;		/* currently can only be zero */
+// OBSOLETE     unsigned char number_of_refs;	/* size of array: */
+// OBSOLETE     dst_sect_ref_t refs[dst_dummy_array_size] ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_sect_info_tab_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*=================================================*/
+// OBSOLETE /*========== RECORDS IN .symbols SECTION ==========*/
+// OBSOLETE /*=================================================*/
+// OBSOLETE 
+// OBSOLETE /*-----------------
+// OBSOLETE   CONSTANT record
+// OBSOLETE   -----------------
+// OBSOLETE   Describes a symbolic constant.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     float r;			/* real part */
+// OBSOLETE     float i;			/* imaginary part */
+// OBSOLETE   }
+// OBSOLETE dst_complex_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     double dr;			/* real part */
+// OBSOLETE     double di;			/* imaginary part */
+// OBSOLETE   }
+// OBSOLETE dst_double_complex_t;
+// OBSOLETE 
+// OBSOLETE /* The following record provides a way of describing constant values with 
+// OBSOLETE    non-standard type and no limit on size. 
+// OBSOLETE  */
+// OBSOLETE typedef union
+// OBSOLETE   {
+// OBSOLETE     char char_data[dst_dummy_array_size];
+// OBSOLETE     short int_data[dst_dummy_array_size];
+// OBSOLETE     long long_data[dst_dummy_array_size];
+// OBSOLETE   }
+// OBSOLETE dst_big_kon_t;
+// OBSOLETE 
+// OBSOLETE /* Representation of the value of a general constant.
+// OBSOLETE  */
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short length;	/* size of constant value (bytes) */
+// OBSOLETE 
+// OBSOLETE     union
+// OBSOLETE       {
+// OBSOLETE 	unsigned short kon_int8;
+// OBSOLETE 	short kon_int16;
+// OBSOLETE 	long kon_int32 ALIGNED1;
+// OBSOLETE 	float kon_real ALIGNED1;
+// OBSOLETE 	double kon_dbl ALIGNED1;
+// OBSOLETE 	dst_complex_t kon_cplx ALIGNED1;
+// OBSOLETE 	dst_double_complex_t kon_dcplx ALIGNED1;
+// OBSOLETE 	char kon_char;
+// OBSOLETE 	dst_big_kon_t kon ALIGNED1;
+// OBSOLETE       }
+// OBSOLETE     val;			/* value data of constant */
+// OBSOLETE   }
+// OBSOLETE dst_const_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of const definition */
+// OBSOLETE     dst_type_t type_desc;	/* type of this (manifest) constant */
+// OBSOLETE     dst_const_t value;
+// OBSOLETE   }
+// OBSOLETE dst_rec_const_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*----------------
+// OBSOLETE   VARIABLE record
+// OBSOLETE   ----------------
+// OBSOLETE   Describes a program variable.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /* Variable attributes.  These define certain variable semantics to the
+// OBSOLETE    debugger.
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_var_attr_read_only,	/* is read-only (a program literal) */
+// OBSOLETE     dst_var_attr_volatile,	/* same as compiler's VOLATILE attribute */
+// OBSOLETE     dst_var_attr_global,	/* is a global definition or reference */
+// OBSOLETE     dst_var_attr_compiler_gen,	/* is compiler-generated */
+// OBSOLETE     dst_var_attr_static,	/* has static location */
+// OBSOLETE     dst_var_attr_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_var_attr_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_rel_offset_t loffset;	/* offset to loc string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of variable definition */
+// OBSOLETE     dst_type_t type_desc;	/* type descriptor */
+// OBSOLETE     unsigned short attributes;	/* mask of dst_var_attr_t flags */
+// OBSOLETE   }
+// OBSOLETE dst_rec_variable_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*----------------
+// OBSOLETE   old VAR record
+// OBSOLETE  -----------------
+// OBSOLETE  Used by older compilers to describe a variable
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_var_loc_unknown,	/* Actually defined as "unknown" */
+// OBSOLETE     dst_var_loc_abs,		/* Absolute address */
+// OBSOLETE     dst_var_loc_sect_off,	/* Absolute address as a section offset */
+// OBSOLETE     dst_var_loc_ind_sect_off,	/* An indexed section offset ???? */
+// OBSOLETE     dst_var_loc_reg,		/* register */
+// OBSOLETE     dst_var_loc_reg_rel,	/* register relative - usually fp */
+// OBSOLETE     dst_var_loc_ind_reg_rel,	/* Indexed register relative */
+// OBSOLETE     dst_var_loc_ftn_ptr_based,	/* Fortran pointer based */
+// OBSOLETE     dst_var_loc_pc_rel,		/* PC relative. Really. */
+// OBSOLETE     dst_var_loc_external,	/* External */
+// OBSOLETE     dst_var_loc_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_var_loc_t;
+// OBSOLETE 
+// OBSOLETE /* Locations come in two versions. The short, and the long. The difference
+// OBSOLETE  * between the short and the long is the addition of a statement number
+// OBSOLETE  * field to the start andend of the range of the long, and and unkown
+// OBSOLETE  * purpose field in the middle. Also, loc_type and loc_index aren't
+// OBSOLETE  * bitfields in the long version.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short loc_type:4;
+// OBSOLETE     unsigned short loc_index:12;
+// OBSOLETE     long location;
+// OBSOLETE     short start_line;		/* start_line and end_line? */
+// OBSOLETE     short end_line;		/* I'm guessing here.       */
+// OBSOLETE   }
+// OBSOLETE dst_var_loc_short_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short loc_type;
+// OBSOLETE     unsigned short loc_index;
+// OBSOLETE     long location;
+// OBSOLETE     short unknown;		/* Always 0003 or 3b3c. Why? */
+// OBSOLETE     short start_statement;
+// OBSOLETE     short start_line;
+// OBSOLETE     short end_statement;
+// OBSOLETE     short end_line;
+// OBSOLETE   }
+// OBSOLETE dst_var_loc_long_t;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of description */
+// OBSOLETE     dst_type_t type_desc;	/* Type description */
+// OBSOLETE     unsigned short attributes;	/* mask of dst_var_attr_t flags */
+// OBSOLETE     unsigned short no_of_locs:15;	/* Number of locations */
+// OBSOLETE     unsigned short short_locs:1;	/* True if short locations. */
+// OBSOLETE     union
+// OBSOLETE       {
+// OBSOLETE 	dst_var_loc_short_t shorts[dst_dummy_array_size];
+// OBSOLETE 	dst_var_loc_long_t longs[dst_dummy_array_size];
+// OBSOLETE       }
+// OBSOLETE     locs;
+// OBSOLETE   }
+// OBSOLETE dst_rec_var_t;
+// OBSOLETE 
+// OBSOLETE /*----------------
+// OBSOLETE   old LABEL record
+// OBSOLETE  -----------------
+// OBSOLETE  Used by older compilers to describe a label
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of description */
+// OBSOLETE     char location[12];		/* location string */
+// OBSOLETE   }
+// OBSOLETE dst_rec_old_label_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*----------------
+// OBSOLETE   POINTER record
+// OBSOLETE   ----------------
+// OBSOLETE   Describes a pointer type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to the name string for this type */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_type_t type_desc;	/* base type of this pointer */
+// OBSOLETE   }
+// OBSOLETE dst_rec_pointer_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-------------
+// OBSOLETE   ARRAY record
+// OBSOLETE   -------------
+// OBSOLETE   Describes an array type.
+// OBSOLETE 
+// OBSOLETE   Multidimensional arrays are described with a number of dst_rec_array_t 
+// OBSOLETE   records, one per array dimension, each linked to the next through the
+// OBSOLETE   elem_type_desc.doffset field.  Each record must have its multi_dim flag
+// OBSOLETE   set.
+// OBSOLETE 
+// OBSOLETE   If column_major is true (as with FORTRAN arrays) then the last array bound in
+// OBSOLETE   the declaration is the first array index in memory, which is the opposite of
+// OBSOLETE   the usual case (as with Pascal and C arrays).
+// OBSOLETE 
+// OBSOLETE   Variable array bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE   records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE   ignored by the debugger.
+// OBSOLETE 
+// OBSOLETE   span_comp identifies one of the language-dependent ways in which the distance
+// OBSOLETE   between successive array elements (span) is calculated.  
+// OBSOLETE      dst_use_span_field    -- the span is the value of span field.
+// OBSOLETE      dst_compute_from_prev -- the span is the size of the previous dimension.
+// OBSOLETE      dst_compute_from_next -- the span is the size of the next dimension.
+// OBSOLETE   In the latter two cases, the span field contains an amount of padding to add
+// OBSOLETE   to the size of the appropriate dimension to calculate the span.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_use_span_field,
+// OBSOLETE     dst_compute_from_prev,
+// OBSOLETE     dst_compute_from_next,
+// OBSOLETE     dst_span_comp_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_span_comp_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_type_t elem_type_desc;	/* array element type */
+// OBSOLETE     dst_type_t indx_type_desc;	/* array index type */
+// OBSOLETE     long lo_bound;		/* lower bound of index */
+// OBSOLETE     long hi_bound;		/* upper bound of index */
+// OBSOLETE     unsigned long span;		/* see above */
+// OBSOLETE     unsigned long size;		/* total array size (bytes) */
+// OBSOLETE     boolean multi_dim:1;
+// OBSOLETE     boolean is_packed:1;	/* true if packed array */
+// OBSOLETE     boolean is_signed:1;	/* true if packed elements are signed */
+// OBSOLETE     dst_span_comp_t span_comp:2;	/* how to compute span */
+// OBSOLETE     boolean column_major:1;
+// OBSOLETE     unsigned short reserved:2;	/* must be zero */
+// OBSOLETE     unsigned short elem_size:8;	/* element size if packed (bits) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_array_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------
+// OBSOLETE   SUBRANGE record
+// OBSOLETE   -----------------
+// OBSOLETE   Describes a subrange type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE    records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE    ignored by the debugger.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of subrange definition */
+// OBSOLETE     dst_type_t type_desc;	/* parent type */
+// OBSOLETE     long lo_bound;		/* lower bound of subrange */
+// OBSOLETE     long hi_bound;		/* upper bound of subrange */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_subrange_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*---------------
+// OBSOLETE   STRING record 
+// OBSOLETE   ---------------
+// OBSOLETE   Describes a string type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /* Variable subrange bounds are described by auxiliary records; if aux_var_bound
+// OBSOLETE    records are present, the lo_bound and hi_bound fields of this record are
+// OBSOLETE    ignored by the debugger.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of string definition */
+// OBSOLETE     dst_type_t elem_type_desc;	/* element type */
+// OBSOLETE     dst_type_t indx_type_desc;	/* index type */
+// OBSOLETE     long lo_bound;		/* lower bound */
+// OBSOLETE     long hi_bound;		/* upper bound */
+// OBSOLETE     unsigned long size;		/* total string size (bytes) if fixed */
+// OBSOLETE   }
+// OBSOLETE dst_rec_string_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*---------------
+// OBSOLETE   SET record 
+// OBSOLETE   ---------------
+// OBSOLETE   Describes a set type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_type_t type_desc;	/* element type */
+// OBSOLETE     unsigned short nbits;	/* number of bits in set */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_set_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------------
+// OBSOLETE   IMPLICIT ENUMERATION record 
+// OBSOLETE   -----------------------------
+// OBSOLETE   Describes an enumeration type with implicit element values = 0, 1, 2, ...
+// OBSOLETE   (Pascal-style).
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     unsigned short nelems;	/* number of elements in enumeration */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE     /* offsets to name strings of elements 0, 1, 2, ... */
+// OBSOLETE     dst_rel_offset_t elem_noffsets[dst_dummy_array_size];
+// OBSOLETE   }
+// OBSOLETE dst_rec_implicit_enum_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------------
+// OBSOLETE   EXPLICIT ENUMERATION record 
+// OBSOLETE   -----------------------------
+// OBSOLETE   Describes an enumeration type with explicitly assigned element values
+// OBSOLETE   (C-style).
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to element name string */
+// OBSOLETE     long value;			/* element value */
+// OBSOLETE   }
+// OBSOLETE dst_enum_elem_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     unsigned short nelems;	/* number of elements in enumeration */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE     /* name/value pairs, one describing each enumeration value: */
+// OBSOLETE     dst_enum_elem_t elems[dst_dummy_array_size];
+// OBSOLETE   }
+// OBSOLETE dst_rec_explicit_enum_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   RECORD / UNION record 
+// OBSOLETE   -----------------------
+// OBSOLETE   Describes a record (struct) or union.
+// OBSOLETE 
+// OBSOLETE   If the record is larger than 2**16 bytes then an attached aux record
+// OBSOLETE   specifies its size.  Also, if the record is stored in short form then
+// OBSOLETE   attached records specify field offsets larger than 2**16 bytes.
+// OBSOLETE 
+// OBSOLETE   Whether the fields[] array or sfields[] array is used is selected by
+// OBSOLETE   the dst_rec_type_t of the overall dst record.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    Record field descriptor, short form.  This form handles only fields which
+// OBSOLETE    are an even number of bytes long, located some number of bytes from the
+// OBSOLETE    start of the record.
+// OBSOLETE  */
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to field name string */
+// OBSOLETE     dst_type_t type_desc;	/* field type */
+// OBSOLETE     unsigned short foffset;	/* field offset from start of record (bytes) */
+// OBSOLETE   }
+// OBSOLETE dst_short_field_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_type_t type_desc;	/* field type */
+// OBSOLETE     unsigned short foffset;	/* byte offset */
+// OBSOLETE     unsigned short is_packed:1;	/* True if field is packed */
+// OBSOLETE     unsigned short bit_offset:6;	/* Bit offset */
+// OBSOLETE     unsigned short size:6;	/* Size in bits */
+// OBSOLETE     unsigned short sign:1;	/* True if signed */
+// OBSOLETE     unsigned short pad:2;	/* Padding. Must be 0 */
+// OBSOLETE   }
+// OBSOLETE dst_old_field_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /* Tag enumeration for long record field descriptor:
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_field_byte,
+// OBSOLETE     dst_field_bit,
+// OBSOLETE     dst_field_loc,
+// OBSOLETE     dst_field_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_field_format_t;
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    Record field descriptor, long form.  The format of the field information
+// OBSOLETE    is identified by the format_tag, which contains one of the above values.
+// OBSOLETE    The field_byte variant is equivalent to the short form of field descriptor.
+// OBSOLETE    The field_bit variant handles fields which are any number of bits long,
+// OBSOLETE    located some number of bits from the start of the record.  The field_loc
+// OBSOLETE    variant allows the location of the field to be described by a general loc
+// OBSOLETE    string.
+// OBSOLETE  */
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name of field */
+// OBSOLETE     dst_type_t type_desc;	/* type of field */
+// OBSOLETE     union
+// OBSOLETE       {
+// OBSOLETE 	struct
+// OBSOLETE 	  {
+// OBSOLETE 	    dst_field_format_t format_tag:2;	/* dst_field_byte */
+// OBSOLETE 	    unsigned long offset:30;	/* offset of field in bytes */
+// OBSOLETE 	  }
+// OBSOLETE 	field_byte ALIGNED1;
+// OBSOLETE 	struct
+// OBSOLETE 	  {
+// OBSOLETE 	    dst_field_format_t format_tag:2;	/* dst_field_bit */
+// OBSOLETE 	    unsigned long nbits:6;	/* bit size of field */
+// OBSOLETE 	    unsigned long is_signed:1;	/* signed/unsigned attribute */
+// OBSOLETE 	    unsigned long bit_offset:3;		/* bit offset from byte boundary */
+// OBSOLETE 	    int pad:4;		/* must be zero */
+// OBSOLETE 	    unsigned short byte_offset;		/* offset of byte boundary */
+// OBSOLETE 	  }
+// OBSOLETE 	field_bit ALIGNED1;
+// OBSOLETE 	struct
+// OBSOLETE 	  {
+// OBSOLETE 	    dst_field_format_t format_tag:2;	/* dst_field_loc */
+// OBSOLETE 	    int loffset:30;	/* dst_rel_offset_t to loc string */
+// OBSOLETE 	  }
+// OBSOLETE 	field_loc ALIGNED1;
+// OBSOLETE       }
+// OBSOLETE     f ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_field_t;
+// OBSOLETE 
+// OBSOLETE /* The field_loc.loffset field is a 30-bit signed value.  Some versions of C do
+// OBSOLETE    not support signed bit fields.  The following macro will extract that field
+// OBSOLETE    as a signed value:
+// OBSOLETE  */
+// OBSOLETE #define dst_field_loffset(field_rec) \
+// OBSOLETE     ( ((int) ((field_rec).f.field_loc.loffset << 2)) >> 2 )
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to record name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line where this record is defined */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE     unsigned short nfields;	/* number of fields in this record */
+// OBSOLETE     union
+// OBSOLETE       {
+// OBSOLETE 	dst_field_t fields[dst_dummy_array_size];
+// OBSOLETE 	dst_short_field_t sfields[dst_dummy_array_size];
+// OBSOLETE 	dst_old_field_t ofields[dst_dummy_array_size];
+// OBSOLETE       }
+// OBSOLETE     f;				/* array of fields */
+// OBSOLETE   }
+// OBSOLETE dst_rec_record_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-------------
+// OBSOLETE   FILE record
+// OBSOLETE   -------------
+// OBSOLETE   Describes a file type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line where type was defined */
+// OBSOLETE     dst_type_t type_desc;	/* file element type */
+// OBSOLETE   }
+// OBSOLETE dst_rec_file_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*---------------
+// OBSOLETE   OFFSET record 
+// OBSOLETE   ---------------
+// OBSOLETE    Describes a Pascal offset type.
+// OBSOLETE    (This type, an undocumented Domain Pascal extension, is currently not
+// OBSOLETE    supported by the debugger)
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to the name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_type_t area_type_desc;	/* area type */
+// OBSOLETE     dst_type_t base_type_desc;	/* base type */
+// OBSOLETE     long lo_bound;		/* low bound of the offset range */
+// OBSOLETE     long hi_bound;		/* high bound of the offset range */
+// OBSOLETE     long bias;			/* bias */
+// OBSOLETE     unsigned short scale;	/* scale factor */
+// OBSOLETE     unsigned short size;	/* storage size (bytes) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_offset_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*--------------
+// OBSOLETE   ALIAS record 
+// OBSOLETE   --------------
+// OBSOLETE   Describes a type alias (e.g., typedef).
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_type_t type_desc;	/* parent type */
+// OBSOLETE   }
+// OBSOLETE dst_rec_alias_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*------------------
+// OBSOLETE   SIGNATURE record
+// OBSOLETE   ------------------
+// OBSOLETE   Describes a procedure/function type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE /* Enumeration of argument semantics.  Note that most are mutually
+// OBSOLETE    exclusive.
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_arg_attr_val,		/* passed by value */
+// OBSOLETE     dst_arg_attr_ref,		/* passed by reference */
+// OBSOLETE     dst_arg_attr_name,		/* passed by name */
+// OBSOLETE     dst_arg_attr_in,		/* readable in the callee */
+// OBSOLETE     dst_arg_attr_out,		/* writable in the callee */
+// OBSOLETE     dst_arg_attr_hidden,	/* not visible in the caller */
+// OBSOLETE     dst_arg_attr_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_arg_attr_t;
+// OBSOLETE 
+// OBSOLETE /* Argument descriptor.  Actually points to a variable record for most of the
+// OBSOLETE    information.
+// OBSOLETE  */
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t var_offset;	/* offset to variable record */
+// OBSOLETE     unsigned short attributes;	/* a mask of dst_arg_attr_t flags */
+// OBSOLETE   }
+// OBSOLETE dst_arg_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of function definition */
+// OBSOLETE     dst_rel_offset_t result;	/* offset to function result variable record */
+// OBSOLETE     unsigned short nargs;	/* number of arguments */
+// OBSOLETE     dst_arg_t args[dst_dummy_array_size];
+// OBSOLETE   }
+// OBSOLETE dst_rec_signature_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*--------------
+// OBSOLETE   SCOPE record
+// OBSOLETE   --------------
+// OBSOLETE   Obsolete. Use the new ENTRY type instead.
+// OBSOLETE   Old compilers may put this in as the first entry in a function,
+// OBSOLETE   terminated by an end of scope entry.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* Name offset */
+// OBSOLETE     dst_src_loc_t start_line;	/* Starting line */
+// OBSOLETE     dst_src_loc_t end_line;	/* Ending line */
+// OBSOLETE   }
+// OBSOLETE dst_rec_scope_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*--------------
+// OBSOLETE   ENTRY record
+// OBSOLETE   --------------
+// OBSOLETE   Describes a procedure/function entry point.  An entry record is to a
+// OBSOLETE   signature record roughly as a variable record is to a type descriptor record.
+// OBSOLETE 
+// OBSOLETE   The entry_number field is keyed to the entry numbers in .lines -- the 
+// OBSOLETE   debugger locates the code location of an entry by searching the line
+// OBSOLETE   number table for an entry numbered with the value of entry_number.  The
+// OBSOLETE   main entry is numbered zero.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to entry name string */
+// OBSOLETE     dst_rel_offset_t loffset;	/* where to jump to call this entry */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE     dst_rel_offset_t sig_desc;	/* offset to signature descriptor */
+// OBSOLETE     unsigned int entry_number:8;
+// OBSOLETE     int pad:8;			/* must be zero */
+// OBSOLETE   }
+// OBSOLETE dst_rec_entry_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   Old format ENTRY record
+// OBSOLETE   -----------------------
+// OBSOLETE   Supposedly obsolete but still used by some compilers.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* Offset to entry name string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* Location in source */
+// OBSOLETE     dst_rel_offset_t sig_desc;	/* Signature description */
+// OBSOLETE     char unknown[36];
+// OBSOLETE   }
+// OBSOLETE dst_rec_old_entry_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE /*--------------
+// OBSOLETE   LABEL record 
+// OBSOLETE   --------------
+// OBSOLETE   Describes a program label.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t noffset;	/* offset to label string */
+// OBSOLETE     dst_rel_offset_t loffset;	/* offset to loc string */
+// OBSOLETE     dst_src_loc_t src_loc;	/* file/line of definition */
+// OBSOLETE   }
+// OBSOLETE dst_rec_label_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   AUXILIARY SIZE record
+// OBSOLETE   -----------------------
+// OBSOLETE   May appear in the auxiliary record list of any type or variable record to
+// OBSOLETE   modify the default size of the type or variable.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned long size;		/* size (bytes) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_size_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   AUXILIARY ALIGN record
+// OBSOLETE   -----------------------
+// OBSOLETE   May appear in the auxiliary record list of any type or variable record to
+// OBSOLETE   modify the default alignment of the type or variable.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short alignment;	/* # of low order zero bits */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_align_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------------
+// OBSOLETE   AUXILIARY FIELD SIZE record
+// OBSOLETE   -----------------------------
+// OBSOLETE   May appear in the auxiliary record list of any RECORD/UNION record to 
+// OBSOLETE   modify the default size of a field.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short field_no;	/* field number */
+// OBSOLETE     unsigned long size;		/* size (bits) */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_field_size_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------------
+// OBSOLETE   AUXILIARY FIELD OFFSET record
+// OBSOLETE   -----------------------------
+// OBSOLETE   May appear in the auxiliary record list of any RECORD/UNION record to 
+// OBSOLETE   specify a field offset larger than 2**16.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short field_no;	/* field number */
+// OBSOLETE     unsigned long foffset;	/* offset */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_field_off_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------------
+// OBSOLETE   AUXILIARY FIELD ALIGN record
+// OBSOLETE   -----------------------------
+// OBSOLETE   May appear in the auxiliary record list of any RECORD/UNION record to 
+// OBSOLETE   modify the default alignment of a field.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short field_no;	/* field number */
+// OBSOLETE     unsigned short alignment;	/* number of low order zero bits */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_field_align_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*----------------------------
+// OBSOLETE   AUXILIARY VAR BOUND record
+// OBSOLETE   ----------------------------
+// OBSOLETE   May appear in the auxiliary record list of any ARRAY, SUBRANGE or STRING
+// OBSOLETE   record to describe a variable bound for the range of the type.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_low_bound,		/* the low bound is variable */
+// OBSOLETE     dst_high_bound,		/* the high bound is variable */
+// OBSOLETE     dst_var_bound_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_var_bound_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short which;	/* which bound */
+// OBSOLETE     dst_rel_offset_t voffset ALIGNED1;	/* variable that defines bound */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_var_bound_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*----------------------------------
+// OBSOLETE   AUXILIARY TYPE DERIVATION record 
+// OBSOLETE   ----------------------------------
+// OBSOLETE   May appear in the auxiliary record list of any RECORD/UNION record to denote
+// OBSOLETE   class inheritance of that type from a parent type.
+// OBSOLETE 
+// OBSOLETE   Inheritance implies that it is possible to convert the inheritor type to the
+// OBSOLETE   inherited type, retaining those fields which were inherited.  To allow this,
+// OBSOLETE   orig_field_no, a field number into the record type, is provided.  If 
+// OBSOLETE   orig_is_pointer is false, then the start of the inherited record is located
+// OBSOLETE   at the location of the field indexed by orig_field_no.  If orig_is_pointer
+// OBSOLETE   is true, then it is located at the address contained in the field indexed
+// OBSOLETE   by orig_field_no (assumed to be a pointer).
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_type_t parent_type;	/* reference to inherited type */
+// OBSOLETE     unsigned short orig_field_no;
+// OBSOLETE     boolean orig_is_pointer:1;
+// OBSOLETE     int unused:15;		/* must be zero */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_type_deriv_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*------------------------------------
+// OBSOLETE   AUXILIARY VARIABLE LIFETIME record
+// OBSOLETE   ------------------------------------
+// OBSOLETE   May appear in the auxiliary record list of a VARIABLE record to add location
+// OBSOLETE   information for an additional variable lifetime.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t loffset;
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_lifetime_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-------------------------------
+// OBSOLETE   AUXILIARY POINTER BASE record 
+// OBSOLETE   -------------------------------
+// OBSOLETE   May appear in the auxiliary record list of a VARIABLE record to provide a
+// OBSOLETE   pointer base to substitute for references to any such bases in the location
+// OBSOLETE   string of the variable.  A pointer base is another VARIABLE record.  When
+// OBSOLETE   the variable is evaluated by the debugger, it uses the current value of the
+// OBSOLETE   pointer base variable in computing its location.
+// OBSOLETE 
+// OBSOLETE   This is useful for representing FORTRAN pointer-based variables.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t voffset;
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_ptr_base_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*---------------------------------
+// OBSOLETE   AUXILIARY REGISTER VALUE record 
+// OBSOLETE   ---------------------------------
+// OBSOLETE   May appear in the auxiliary record list of an ENTRY record to specify
+// OBSOLETE   a register that must be set to a specific value before jumping to the entry
+// OBSOLETE   point in a debugger "call".  The debugger must set the debuggee register,
+// OBSOLETE   specified by the register code, to the value of the *address* to which the
+// OBSOLETE   location string resolves.  If the address is register-relative, then the
+// OBSOLETE   call cannot be made unless the current stack frame is the lexical parent
+// OBSOLETE   of the entry.  An example of this is when a (Pascal) nested procedure
+// OBSOLETE   contains references to its parent's variables, which it accesses through
+// OBSOLETE   a static link register.  The static link register must be set to some
+// OBSOLETE   address relative to the parent's stack base register.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short reg;		/* identifies register to set (isp enum) */
+// OBSOLETE     dst_rel_offset_t loffset;	/* references a location string */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_reg_val_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*==========================================================*/
+// OBSOLETE /*========== RECORDS USED IN .blocks AND .symbols ==========*/
+// OBSOLETE /*==========================================================*/
+// OBSOLETE 
+// OBSOLETE /*---------------------
+// OBSOLETE   STRING TABLE record
+// OBSOLETE   ---------------------
+// OBSOLETE   A string table record contains any number of null-terminated, variable length
+// OBSOLETE   strings.   The length field gives the size in bytes of the text field, which
+// OBSOLETE   can be any size.
+// OBSOLETE 
+// OBSOLETE   The global name table shares this format.  This record appears in the
+// OBSOLETE   .blocks section.  Each string in the table identifies a global defined in
+// OBSOLETE   the current compilation unit.
+// OBSOLETE 
+// OBSOLETE   The loc pool record shares this format as well.  Loc strings are described
+// OBSOLETE   elsewhere.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned long length;
+// OBSOLETE     char text[dst_dummy_array_size];
+// OBSOLETE   }
+// OBSOLETE dst_rec_string_tab_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-----------------------
+// OBSOLETE   AUXILIARY QUAL record 
+// OBSOLETE   -----------------------
+// OBSOLETE   May appear in the auxiliary record list of any BLOCK, VARIABLE, or type record
+// OBSOLETE   to provide it with a fully-qualified, language-dependent name.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t lang_qual_name;
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_qual_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*----------------
+// OBSOLETE   FORWARD record
+// OBSOLETE   ----------------
+// OBSOLETE   Reference to a record somewhere else.  This allows identical definitions in
+// OBSOLETE   different scopes to share data.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rel_offset_t rec_off;
+// OBSOLETE   }
+// OBSOLETE dst_rec_forward_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*-------------------------------
+// OBSOLETE   AUXILIARY SOURCE RANGE record
+// OBSOLETE   -------------------------------
+// OBSOLETE   May appear in the auxiliary record list of any BLOCK record to specify a
+// OBSOLETE   range of source lines over which the block is active.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_src_loc_t first_line;	/* first source line */
+// OBSOLETE     dst_src_loc_t last_line;	/* last source line */
+// OBSOLETE   }
+// OBSOLETE dst_rec_aux_src_range_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*------------------
+// OBSOLETE   EXTENSION record 
+// OBSOLETE   ------------------
+// OBSOLETE   Provision for "foreign" records, such as might be generated by a non-Apollo
+// OBSOLETE   compiler.  Apollo software will ignore these.
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     unsigned short rec_size;	/* record size (bytes) */
+// OBSOLETE     unsigned short ext_type;	/* defined by whoever generates it */
+// OBSOLETE     unsigned short ext_data;	/* place-holder for arbitrary amount of data */
+// OBSOLETE   }
+// OBSOLETE dst_rec_extension_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    ** DEBUG SYMBOL record -- The wrapper for all .blocks and .symbols records.
+// OBSOLETE    **
+// OBSOLETE    ** This record ties together all previous .blocks and .symbols records 
+// OBSOLETE    ** together in a union with a common header.  The rec_type field of the
+// OBSOLETE    ** header identifies the record type.  The rec_flags field currently only
+// OBSOLETE    ** defines auxiliary record lists. 
+// OBSOLETE    **
+// OBSOLETE    ** If a record carries with it a non-null auxiliary record list, its
+// OBSOLETE    ** dst_flag_has_aux_recs flag is set, and each of the records that follow
+// OBSOLETE    ** it are treated as its auxiliary records, until the end of the compilation
+// OBSOLETE    ** unit or scope is reached, or until an auxiliary record with its
+// OBSOLETE    ** dst_flag_last_aux_rec flag set is reached.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_flag_has_aux_recs,
+// OBSOLETE     dst_flag_last_aux_rec,
+// OBSOLETE     dst_rec_flag_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_rec_flags_t;
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     dst_rec_type_t rec_type:8;	/* record type */
+// OBSOLETE     int rec_flags:8;		/* mask of dst_rec_flags_t */
+// OBSOLETE     union			/* switched on rec_type field above */
+// OBSOLETE       {
+// OBSOLETE 	/* dst_typ_pad requires no additional fields */
+// OBSOLETE 	dst_rec_comp_unit_t comp_unit_;
+// OBSOLETE 	dst_rec_section_tab_t section_tab_;
+// OBSOLETE 	dst_rec_file_tab_t file_tab_;
+// OBSOLETE 	dst_rec_block_t block_;
+// OBSOLETE 	dst_rec_var_t var_;
+// OBSOLETE 	dst_rec_pointer_t pointer_;
+// OBSOLETE 	dst_rec_array_t array_;
+// OBSOLETE 	dst_rec_subrange_t subrange_;
+// OBSOLETE 	dst_rec_set_t set_;
+// OBSOLETE 	dst_rec_implicit_enum_t implicit_enum_;
+// OBSOLETE 	dst_rec_explicit_enum_t explicit_enum_;
+// OBSOLETE 	/* dst_typ_short_{rec,union} are represented by 'rec' (below) */
+// OBSOLETE 	dst_rec_file_t file_;
+// OBSOLETE 	dst_rec_offset_t offset_;
+// OBSOLETE 	dst_rec_alias_t alias_;
+// OBSOLETE 	dst_rec_signature_t signature_;
+// OBSOLETE 	dst_rec_old_label_t old_label_;
+// OBSOLETE 	dst_rec_scope_t scope_;
+// OBSOLETE 	/* dst_typ_end_scope requires no additional fields */
+// OBSOLETE 	dst_rec_string_tab_t string_tab_;
+// OBSOLETE 	/* dst_typ_global_name_tab is represented by 'string_tab' (above) */
+// OBSOLETE 	dst_rec_forward_t forward_;
+// OBSOLETE 	dst_rec_aux_size_t aux_size_;
+// OBSOLETE 	dst_rec_aux_align_t aux_align_;
+// OBSOLETE 	dst_rec_aux_field_size_t aux_field_size_;
+// OBSOLETE 	dst_rec_aux_field_off_t aux_field_off_;
+// OBSOLETE 	dst_rec_aux_field_align_t aux_field_align_;
+// OBSOLETE 	dst_rec_aux_qual_t aux_qual_;
+// OBSOLETE 	dst_rec_aux_var_bound_t aux_var_bound_;
+// OBSOLETE 	dst_rec_extension_t extension_;
+// OBSOLETE 	dst_rec_string_t string_;
+// OBSOLETE 	dst_rec_const_t const_;
+// OBSOLETE 	/* dst_typ_reference is represented by 'pointer' (above) */
+// OBSOLETE 	dst_rec_record_t record_;
+// OBSOLETE 	/* dst_typ_union is represented by 'record' (above) */
+// OBSOLETE 	dst_rec_aux_type_deriv_t aux_type_deriv_;
+// OBSOLETE 	/* dst_typ_locpool is represented by 'string_tab' (above) */
+// OBSOLETE 	dst_rec_variable_t variable_;
+// OBSOLETE 	dst_rec_label_t label_;
+// OBSOLETE 	dst_rec_entry_t entry_;
+// OBSOLETE 	dst_rec_aux_lifetime_t aux_lifetime_;
+// OBSOLETE 	dst_rec_aux_ptr_base_t aux_ptr_base_;
+// OBSOLETE 	dst_rec_aux_src_range_t aux_src_range_;
+// OBSOLETE 	dst_rec_aux_reg_val_t aux_reg_val_;
+// OBSOLETE 	dst_rec_name_tab_t aux_unit_names_;
+// OBSOLETE 	dst_rec_sect_info_tab_t aux_sect_info_;
+// OBSOLETE       }
+// OBSOLETE     rec_data ALIGNED1;
+// OBSOLETE   }
+// OBSOLETE dst_rec_t, *dst_rec_ptr_t;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*===============================================*/
+// OBSOLETE /*========== .lines SECTION DEFINITIONS =========*/
+// OBSOLETE /*===============================================*/
+// OBSOLETE /*
+// OBSOLETE    The .lines section contains a sequence of line number tables.  There is no
+// OBSOLETE    record structure within the section.  The start of the table for a routine
+// OBSOLETE    is pointed to by the block record, and the end of the table is signaled by
+// OBSOLETE    an escape code.
+// OBSOLETE 
+// OBSOLETE    A line number table is a sequence of bytes.  The default entry contains a line
+// OBSOLETE    number delta (-7..+7) in the high 4 bits and a pc delta (0..15) in the low 4 
+// OBSOLETE    bits. Special cases, including when one or both of the values is too large
+// OBSOLETE    to fit in 4 bits and other special cases are handled through escape entries.
+// OBSOLETE    Escape entries are identified by the value 0x8 in the high 4 bits.  The low 4
+// OBSOLETE    bits are occupied by a function code.  Some escape entries are followed by
+// OBSOLETE    additional arguments, which may be bytes, words, or longwords.  This data is
+// OBSOLETE    not aligned. 
+// OBSOLETE 
+// OBSOLETE    The initial PC offset, file number and line number are zero.  Normally, the
+// OBSOLETE    table begins with a dst_ln_file escape which establishes the initial file
+// OBSOLETE    and line number.  All PC deltas are unsigned (thus the table is ordered by
+// OBSOLETE    increasing PC); line number deltas are signed.  The table ends with a 
+// OBSOLETE    dst_ln_end escape, which is followed by a final table entry whose PC delta
+// OBSOLETE    gives the code size of the last statement.
+// OBSOLETE 
+// OBSOLETE    Escape     Semantic
+// OBSOLETE    ---------  ------------------------------------------------------------
+// OBSOLETE    file       Changes file state.  The current source file remains constant
+// OBSOLETE    until another file escape.  Though the line number state is
+// OBSOLETE    also updated by a file escape, a file escape does NOT 
+// OBSOLETE    constitute a line table entry.
+// OBSOLETE 
+// OBSOLETE    statement  Alters the statement number of the next table entry.  By 
+// OBSOLETE    default, all table entries refer to the first statement on a
+// OBSOLETE    line.  Statement number one is the second statement, and so on.
+// OBSOLETE 
+// OBSOLETE    entry      Identifies the next table entry as the position of an entry 
+// OBSOLETE    point for the current block.  The PC position should follow 
+// OBSOLETE    any procedure prologue code.  An argument specifies the entry
+// OBSOLETE    number, which is keyed to the entry number of the corresponding
+// OBSOLETE    .symbols ENTRY record.
+// OBSOLETE 
+// OBSOLETE    exit       Identifies the next table entry as the last position within 
+// OBSOLETE    the current block before a procedure epiloge and subsequent
+// OBSOLETE    procedure exit.
+// OBSOLETE 
+// OBSOLETE    gap        By default, the executable code corresponding to a table entry 
+// OBSOLETE    is assumed to extend to the beginning of the next table entry.
+// OBSOLETE    If this is not the case--there is a "hole" in the table--then
+// OBSOLETE    a gap escape should follow the first table entry to specify
+// OBSOLETE    where the code for that entry ends.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #define dst_ln_escape_flag    -8
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    Escape function codes:
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_ln_pad,			/* pad byte */
+// OBSOLETE     dst_ln_file,		/* file escape.  Next 4 bytes are a dst_src_loc_t */
+// OBSOLETE     dst_ln_dln1_dpc1,		/* 1 byte line delta, 1 byte pc delta */
+// OBSOLETE     dst_ln_dln2_dpc2,		/* 2 bytes line delta, 2 bytes pc delta */
+// OBSOLETE     dst_ln_ln4_pc4,		/* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
+// OBSOLETE     dst_ln_dln1_dpc0,		/* 1 byte line delta, pc delta = 0 */
+// OBSOLETE     dst_ln_ln_off_1,		/* statement escape, stmt # = 1 (2nd stmt on line) */
+// OBSOLETE     dst_ln_ln_off,		/* statement escape, stmt # = next byte */
+// OBSOLETE     dst_ln_entry,		/* entry escape, next byte is entry number */
+// OBSOLETE     dst_ln_exit,		/* exit escape */
+// OBSOLETE     dst_ln_stmt_end,		/* gap escape, 4 bytes pc delta */
+// OBSOLETE     dst_ln_escape_11,		/* reserved */
+// OBSOLETE     dst_ln_escape_12,		/* reserved */
+// OBSOLETE     dst_ln_escape_13,		/* reserved */
+// OBSOLETE     dst_ln_nxt_byte,		/* next byte contains the real escape code */
+// OBSOLETE     dst_ln_end,			/* end escape, final entry follows */
+// OBSOLETE     dst_ln_escape_END_OF_ENUM
+// OBSOLETE   }
+// OBSOLETE dst_ln_escape_t;
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    Line number table entry
+// OBSOLETE  */
+// OBSOLETE typedef union
+// OBSOLETE   {
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	unsigned int ln_delta:4;	/* 4 bit line number delta */
+// OBSOLETE 	unsigned int pc_delta:4;	/* 4 bit pc delta */
+// OBSOLETE       }
+// OBSOLETE     delta;
+// OBSOLETE 
+// OBSOLETE     struct
+// OBSOLETE       {
+// OBSOLETE 	unsigned int esc_flag:4;	/* alias for ln_delta */
+// OBSOLETE 	dst_ln_escape_t esc_code:4;	/* escape function code */
+// OBSOLETE       }
+// OBSOLETE     esc;
+// OBSOLETE 
+// OBSOLETE     char sdata;			/* signed data byte */
+// OBSOLETE     unsigned char udata;	/* unsigned data byte */
+// OBSOLETE   }
+// OBSOLETE dst_ln_entry_t,
+// OBSOLETE  *dst_ln_entry_ptr_t,
+// OBSOLETE   dst_ln_table_t[dst_dummy_array_size];
+// OBSOLETE 
+// OBSOLETE /* The following macro will extract the ln_delta field as a signed value:
+// OBSOLETE  */
+// OBSOLETE #define dst_ln_ln_delta(ln_rec) \
+// OBSOLETE     ( ((short) ((ln_rec).delta.ln_delta << 12)) >> 12 )
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE typedef struct dst_sec_struct
+// OBSOLETE   {
+// OBSOLETE     char *buffer;
+// OBSOLETE     long position;
+// OBSOLETE     long size;
+// OBSOLETE     long base;
+// OBSOLETE   }
+// OBSOLETE dst_sec;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Macros for access to the data */
+// OBSOLETE 
+// OBSOLETE #define DST_comp_unit(x) 	((x)->rec_data.comp_unit_)
+// OBSOLETE #define DST_section_tab(x) 	((x)->rec_data.section_tab_)
+// OBSOLETE #define DST_file_tab(x) 	((x)->rec_data.file_tab_)
+// OBSOLETE #define DST_block(x) 		((x)->rec_data.block_)
+// OBSOLETE #define	DST_var(x)		((x)->rec_data.var_)
+// OBSOLETE #define DST_pointer(x) 		((x)->rec_data.pointer_)
+// OBSOLETE #define DST_array(x) 		((x)->rec_data.array_)
+// OBSOLETE #define DST_subrange(x) 	((x)->rec_data.subrange_)
+// OBSOLETE #define DST_set(x)	 	((x)->rec_data.set_)
+// OBSOLETE #define DST_implicit_enum(x) 	((x)->rec_data.implicit_enum_)
+// OBSOLETE #define DST_explicit_enum(x) 	((x)->rec_data.explicit_enum_)
+// OBSOLETE #define DST_short_rec(x) 	((x)->rec_data.record_)
+// OBSOLETE #define DST_short_union(x) 	((x)->rec_data.record_)
+// OBSOLETE #define DST_file(x) 		((x)->rec_data.file_)
+// OBSOLETE #define DST_offset(x) 		((x)->rec_data.offset_)
+// OBSOLETE #define DST_alias(x)	 	((x)->rec_data.alias_)
+// OBSOLETE #define DST_signature(x) 	((x)->rec_data.signature_)
+// OBSOLETE #define DST_old_label(x) 	((x)->rec_data.old_label_)
+// OBSOLETE #define DST_scope(x) 		((x)->rec_data.scope_)
+// OBSOLETE #define DST_string_tab(x) 	((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_global_name_tab(x) 	((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_forward(x) 		((x)->rec_data.forward_)
+// OBSOLETE #define DST_aux_size(x) 	((x)->rec_data.aux_size_)
+// OBSOLETE #define DST_aux_align(x) 	((x)->rec_data.aux_align_)
+// OBSOLETE #define DST_aux_field_size(x) 	((x)->rec_data.aux_field_size_)
+// OBSOLETE #define DST_aux_field_off(x) 	((x)->rec_data.aux_field_off_)
+// OBSOLETE #define DST_aux_field_align(x) 	((x)->rec_data.aux_field_align_)
+// OBSOLETE #define DST_aux_qual(x) 	((x)->rec_data.aux_qual_)
+// OBSOLETE #define DST_aux_var_bound(x) 	((x)->rec_data.aux_var_bound_)
+// OBSOLETE #define DST_extension(x) 	((x)->rec_data.extension_)
+// OBSOLETE #define DST_string(x) 		((x)->rec_data.string_)
+// OBSOLETE #define DST_const(x) 		((x)->rec_data.const_)
+// OBSOLETE #define DST_reference(x) 	((x)->rec_data.pointer_)
+// OBSOLETE #define DST_record(x) 		((x)->rec_data.record_)
+// OBSOLETE #define DST_union(x) 		((x)->rec_data.record_)
+// OBSOLETE #define DST_aux_type_deriv(x) 	((x)->rec_data.aux_type_deriv_)
+// OBSOLETE #define DST_locpool(x) 		((x)->rec_data.string_tab_)
+// OBSOLETE #define DST_variable(x) 	((x)->rec_data.variable_)
+// OBSOLETE #define DST_label(x) 		((x)->rec_data.label_)
+// OBSOLETE #define DST_entry(x) 		((x)->rec_data.entry_)
+// OBSOLETE #define DST_aux_lifetime(x) 	((x)->rec_data.aux_lifetime_)
+// OBSOLETE #define DST_aux_ptr_base(x) 	((x)->rec_data.aux_ptr_base_)
+// OBSOLETE #define DST_aux_src_range(x) 	((x)->rec_data.aux_src_range_)
+// OBSOLETE #define DST_aux_reg_val(x) 	((x)->rec_data.aux_reg_val_)
+// OBSOLETE #define DST_aux_unit_names(x) 	((x)->rec_data.aux_unit_names_)
+// OBSOLETE #define DST_aux_sect_info(x) 	((x)->rec_data.aux_sect_info_)
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Type codes for loc strings. I'm not entirely certain about all of
+// OBSOLETE  * these, but they seem to work.
+// OBSOLETE  *                              troy@cbme.unsw.EDU.AU
+// OBSOLETE  * If you find a variable whose location can't be decoded, you should
+// OBSOLETE  * find out it's code using "dstdump -s filename". It will record an
+// OBSOLETE  * entry for the variable, and give a text representation of what
+// OBSOLETE  * the locstring means. Before that explaination there will be a
+// OBSOLETE  * number. In the LOCSTRING table, that number will appear before
+// OBSOLETE  * the start of the location string. Location string codes are
+// OBSOLETE  * five bit codes with a 3 bit argument. Check the high 5 bits of
+// OBSOLETE  * the one byte code, and figure out where it goes in here.
+// OBSOLETE  * Then figure out exactly what the meaning is and code it in
+// OBSOLETE  * dstread.c
+// OBSOLETE  *
+// OBSOLETE  * Note that ranged locs mean that the variable is in different locations
+// OBSOLETE  * depending on the current PC. We ignore these because (a) gcc can't handle
+// OBSOLETE  * them, and (b), If you don't use high levels of optimisation they won't
+// OBSOLETE  * occur.
+// OBSOLETE  */
+// OBSOLETE typedef enum
+// OBSOLETE   {
+// OBSOLETE     dst_lsc_end,		/* End of string */
+// OBSOLETE     dst_lsc_indirect,		/* Indirect through previous. Arg == 6 */
+// OBSOLETE     /* Or register ax (x=arg) */
+// OBSOLETE     dst_lsc_dreg,		/* register dx (x=arg) */
+// OBSOLETE     dst_lsc_03,
+// OBSOLETE     dst_lsc_section,		/* Section (arg+1) */
+// OBSOLETE     dst_lsc_05,
+// OBSOLETE     dst_lsc_06,
+// OBSOLETE     dst_lsc_add,		/* Add (arg+1)*2 */
+// OBSOLETE     dst_lsc_sub,		/* Subtract (arg+1)*2 */
+// OBSOLETE     dst_lsc_09,
+// OBSOLETE     dst_lsc_0a,
+// OBSOLETE     dst_lsc_sec_byte,		/* Section of next byte+1 */
+// OBSOLETE     dst_lsc_add_byte,		/* Add next byte (arg == 5) or next word
+// OBSOLETE 				 * (arg == 6)
+// OBSOLETE 				 */
+// OBSOLETE     dst_lsc_sub_byte,		/* Subtract next byte. (arg == 1) or next
+// OBSOLETE 				 * word (arg == 6 ?)
+// OBSOLETE 				 */
+// OBSOLETE     dst_lsc_sbreg,		/* Stack base register (frame pointer). Arg==0 */
+// OBSOLETE     dst_lsc_0f,
+// OBSOLETE     dst_lsc_ranged,		/* location is pc dependent */
+// OBSOLETE     dst_lsc_11,
+// OBSOLETE     dst_lsc_12,
+// OBSOLETE     dst_lsc_13,
+// OBSOLETE     dst_lsc_14,
+// OBSOLETE     dst_lsc_15,
+// OBSOLETE     dst_lsc_16,
+// OBSOLETE     dst_lsc_17,
+// OBSOLETE     dst_lsc_18,
+// OBSOLETE     dst_lsc_19,
+// OBSOLETE     dst_lsc_1a,
+// OBSOLETE     dst_lsc_1b,
+// OBSOLETE     dst_lsc_1c,
+// OBSOLETE     dst_lsc_1d,
+// OBSOLETE     dst_lsc_1e,
+// OBSOLETE     dst_lsc_1f
+// OBSOLETE   }
+// OBSOLETE dst_loc_string_code_t;
+// OBSOLETE 
+// OBSOLETE /* If the following occurs after an addition/subtraction, that addition
+// OBSOLETE  * or subtraction should be multiplied by 256. It's a complete byte, not
+// OBSOLETE  * a code.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #define	dst_multiply_256	((char) 0x73)
+// OBSOLETE 
+// OBSOLETE typedef struct
+// OBSOLETE   {
+// OBSOLETE     char code:5;
+// OBSOLETE     char arg:3;
+// OBSOLETE   }
+// OBSOLETE dst_loc_header_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE typedef union
+// OBSOLETE   {
+// OBSOLETE     dst_loc_header_t header;
+// OBSOLETE     char data;
+// OBSOLETE   }
+// OBSOLETE dst_loc_entry_t ALIGNED1;
+// OBSOLETE 
+// OBSOLETE #undef ALIGNED1
+// OBSOLETE #endif /* apollo_dst_h */
diff --git a/gdb/dstread.c b/gdb/dstread.c
index abcce09..8692c98 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -1,1596 +1,1598 @@
-/* Read apollo DST symbol tables and convert to internal format, for GDB.
-   Contributed by Troy Rollo, University of NSW (troy@cbme.unsw.edu.au).
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "breakpoint.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "obstack.h"
-
-#include "gdb_string.h"
-
-#include "dst.h"
-
-CORE_ADDR cur_src_start_addr, cur_src_end_addr;
-dst_sec blocks_info, lines_info, symbols_info;
-
-/* Vector of line number information.  */
-
-static struct linetable *line_vector;
-
-/* Index of next entry to go in line_vector_index.  */
-
-static int line_vector_index;
-
-/* Last line number recorded in the line vector.  */
-
-static int prev_line_number;
-
-/* Number of elements allocated for line_vector currently.  */
-
-static int line_vector_length;
-
-static int init_dst_sections (int);
-
-static void read_dst_symtab (struct objfile *);
-
-static void find_dst_sections (bfd *, sec_ptr, PTR);
-
-static void dst_symfile_init (struct objfile *);
-
-static void dst_new_init (struct objfile *);
-
-static void dst_symfile_read (struct objfile *, int);
-
-static void dst_symfile_finish (struct objfile *);
-
-static void dst_end_symtab (struct objfile *);
-
-static void complete_symtab (char *, CORE_ADDR, unsigned int);
-
-static void dst_start_symtab (void);
-
-static void dst_record_line (int, CORE_ADDR);
-
-/* Manage the vector of line numbers.  */
-/* FIXME: Use record_line instead.  */
-
-static void
-dst_record_line (int line, CORE_ADDR pc)
-{
-  struct linetable_entry *e;
-  /* Make sure line vector is big enough.  */
-
-  if (line_vector_index + 2 >= line_vector_length)
-    {
-      line_vector_length *= 2;
-      line_vector = (struct linetable *)
-	xrealloc ((char *) line_vector, sizeof (struct linetable)
-		  + (line_vector_length
-		     * sizeof (struct linetable_entry)));
-    }
-
-  e = line_vector->item + line_vector_index++;
-  e->line = line;
-  e->pc = pc;
-}
-
-/* Start a new symtab for a new source file.
-   It indicates the start of data for one original source file.  */
-/* FIXME: use start_symtab, like coffread.c now does.  */
-
-static void
-dst_start_symtab (void)
-{
-  /* Initialize the source file line number information for this file.  */
-
-  if (line_vector)		/* Unlikely, but maybe possible? */
-    xfree (line_vector);
-  line_vector_index = 0;
-  line_vector_length = 1000;
-  prev_line_number = -2;	/* Force first line number to be explicit */
-  line_vector = (struct linetable *)
-    xmalloc (sizeof (struct linetable)
-	     + line_vector_length * sizeof (struct linetable_entry));
-}
-
-/* Save the vital information from when starting to read a file,
-   for use when closing off the current file.
-   NAME is the file name the symbols came from, START_ADDR is the first
-   text address for the file, and SIZE is the number of bytes of text.  */
-
-static void
-complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
-{
-  last_source_file = savestring (name, strlen (name));
-  cur_src_start_addr = start_addr;
-  cur_src_end_addr = start_addr + size;
-
-  if (current_objfile->ei.entry_point >= cur_src_start_addr &&
-      current_objfile->ei.entry_point < cur_src_end_addr)
-    {
-      current_objfile->ei.entry_file_lowpc = cur_src_start_addr;
-      current_objfile->ei.entry_file_highpc = cur_src_end_addr;
-    }
-}
-
-/* Finish the symbol definitions for one main source file,
-   close off all the lexical contexts for that file
-   (creating struct block's for them), then make the
-   struct symtab for that file and put it in the list of all such. */
-/* FIXME: Use end_symtab, like coffread.c now does.  */
-
-static void
-dst_end_symtab (struct objfile *objfile)
-{
-  register struct symtab *symtab;
-  register struct blockvector *blockvector;
-  register struct linetable *lv;
-
-  /* Create the blockvector that points to all the file's blocks.  */
-
-  blockvector = make_blockvector (objfile);
-
-  /* Now create the symtab object for this source file.  */
-  symtab = allocate_symtab (last_source_file, objfile);
-
-  /* Fill in its components.  */
-  symtab->blockvector = blockvector;
-  symtab->free_code = free_linetable;
-  symtab->free_ptr = 0;
-  symtab->filename = last_source_file;
-  symtab->dirname = NULL;
-  symtab->debugformat = obsavestring ("Apollo DST", 10,
-				      &objfile->symbol_obstack);
-  lv = line_vector;
-  lv->nitems = line_vector_index;
-  symtab->linetable = (struct linetable *)
-    xrealloc ((char *) lv, (sizeof (struct linetable)
-			    + lv->nitems * sizeof (struct linetable_entry)));
-
-  free_named_symtabs (symtab->filename);
-
-  /* Reinitialize for beginning of new file. */
-  line_vector = 0;
-  line_vector_length = -1;
-  last_source_file = NULL;
-}
-
-/* dst_symfile_init ()
-   is the dst-specific initialization routine for reading symbols.
-
-   We will only be called if this is a DST or DST-like file.
-   BFD handles figuring out the format of the file, and code in symtab.c
-   uses BFD's determination to vector to us.
-
-   The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
-
-static void
-dst_symfile_init (struct objfile *objfile)
-{
-  asection *section;
-  bfd *abfd = objfile->obfd;
-
-  init_entry_point_info (objfile);
-
-}
-
-/* This function is called for every section; it finds the outer limits
-   of the line table (minimum and maximum file offset) so that the
-   mainline code can read the whole thing for efficiency.  */
-
-/* ARGSUSED */
-static void
-find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
-{
-  int size, count;
-  long base;
-  file_ptr offset, maxoff;
-  dst_sec *section;
-
-/* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
-  size = asect->_raw_size;
-  offset = asect->filepos;
-  base = asect->vma;
-/* End of warning */
-
-  section = NULL;
-  if (!strcmp (asect->name, ".blocks"))
-    section = &blocks_info;
-  else if (!strcmp (asect->name, ".lines"))
-    section = &lines_info;
-  else if (!strcmp (asect->name, ".symbols"))
-    section = &symbols_info;
-  if (!section)
-    return;
-  section->size = size;
-  section->position = offset;
-  section->base = base;
-}
-
-
-/* The BFD for this file -- only good while we're actively reading
-   symbols into a psymtab or a symtab.  */
-
-static bfd *symfile_bfd;
-
-/* Read a symbol file, after initialization by dst_symfile_init.  */
-/* FIXME!  Addr and Mainline are not used yet -- this will not work for
-   shared libraries or add_file!  */
-
-/* ARGSUSED */
-static void
-dst_symfile_read (struct objfile *objfile, int mainline)
-{
-  bfd *abfd = objfile->obfd;
-  char *name = bfd_get_filename (abfd);
-  int desc;
-  register int val;
-  int num_symbols;
-  int symtab_offset;
-  int stringtab_offset;
-
-  symfile_bfd = abfd;		/* Kludge for swap routines */
-
-/* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
-  desc = fileno ((FILE *) (abfd->iostream));	/* File descriptor */
-
-  /* Read the line number table, all at once.  */
-  bfd_map_over_sections (abfd, find_dst_sections, (PTR) NULL);
-
-  val = init_dst_sections (desc);
-  if (val < 0)
-    error ("\"%s\": error reading debugging symbol tables\n", name);
-
-  init_minimal_symbol_collection ();
-  make_cleanup_discard_minimal_symbols ();
-
-  /* Now that the executable file is positioned at symbol table,
-     process it and define symbols accordingly.  */
-
-  read_dst_symtab (objfile);
-
-  /* Sort symbols alphabetically within each block.  */
-
-  {
-    struct symtab *s;
-    for (s = objfile->symtabs; s != NULL; s = s->next)
-      {
-	sort_symtab_syms (s);
-      }
-  }
-
-  /* Install any minimal symbols that have been collected as the current
-     minimal symbols for this objfile. */
-
-  install_minimal_symbols (objfile);
-}
-
-static void
-dst_new_init (struct objfile *ignore)
-{
-  /* Nothin' to do */
-}
-
-/* Perform any local cleanups required when we are done with a particular
-   objfile.  I.E, we are in the process of discarding all symbol information
-   for an objfile, freeing up all memory held for it, and unlinking the
-   objfile struct from the global list of known objfiles. */
-
-static void
-dst_symfile_finish (struct objfile *objfile)
-{
-  /* Nothing to do */
-}
-
-
-/* Get the next line number from the DST. Returns 0 when we hit an
- * end directive or cannot continue for any other reason.
- *
- * Note that ordinary pc deltas are multiplied by two. Apparently
- * this is what was really intended.
- */
-static int
-get_dst_line (signed char **buffer, long *pc)
-{
-  static last_pc = 0;
-  static long last_line = 0;
-  static int last_file = 0;
-  dst_ln_entry_ptr_t entry;
-  int size;
-  dst_src_loc_t *src_loc;
-
-  if (*pc != -1)
-    {
-      last_pc = *pc;
-      *pc = -1;
-    }
-  entry = (dst_ln_entry_ptr_t) * buffer;
-
-  while (dst_ln_ln_delta (*entry) == dst_ln_escape_flag)
-    {
-      switch (entry->esc.esc_code)
-	{
-	case dst_ln_pad:
-	  size = 1;		/* pad byte */
-	  break;
-	case dst_ln_file:
-	  /* file escape.  Next 4 bytes are a dst_src_loc_t */
-	  size = 5;
-	  src_loc = (dst_src_loc_t *) (*buffer + 1);
-	  last_line = src_loc->line_number;
-	  last_file = src_loc->file_index;
-	  break;
-	case dst_ln_dln1_dpc1:
-	  /* 1 byte line delta, 1 byte pc delta */
-	  last_line += (*buffer)[1];
-	  last_pc += 2 * (unsigned char) (*buffer)[2];
-	  dst_record_line (last_line, last_pc);
-	  size = 3;
-	  break;
-	case dst_ln_dln2_dpc2:
-	  /* 2 bytes line delta, 2 bytes pc delta */
-	  last_line += *(short *) (*buffer + 1);
-	  last_pc += 2 * (*(short *) (*buffer + 3));
-	  size = 5;
-	  dst_record_line (last_line, last_pc);
-	  break;
-	case dst_ln_ln4_pc4:
-	  /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
-	  last_line = *(unsigned long *) (*buffer + 1);
-	  last_pc = *(unsigned long *) (*buffer + 5);
-	  size = 9;
-	  dst_record_line (last_line, last_pc);
-	  break;
-	case dst_ln_dln1_dpc0:
-	  /* 1 byte line delta, pc delta = 0 */
-	  size = 2;
-	  last_line += (*buffer)[1];
-	  break;
-	case dst_ln_ln_off_1:
-	  /* statement escape, stmt # = 1 (2nd stmt on line) */
-	  size = 1;
-	  break;
-	case dst_ln_ln_off:
-	  /* statement escape, stmt # = next byte */
-	  size = 2;
-	  break;
-	case dst_ln_entry:
-	  /* entry escape, next byte is entry number */
-	  size = 2;
-	  break;
-	case dst_ln_exit:
-	  /* exit escape */
-	  size = 1;
-	  break;
-	case dst_ln_stmt_end:
-	  /* gap escape, 4 bytes pc delta */
-	  size = 5;
-	  /* last_pc += 2 * (*(long *) (*buffer + 1)); */
-	  /* Apparently this isn't supposed to actually modify
-	   * the pc value. Totally weird.
-	   */
-	  break;
-	case dst_ln_escape_11:
-	case dst_ln_escape_12:
-	case dst_ln_escape_13:
-	  size = 1;
-	  break;
-	case dst_ln_nxt_byte:
-	  /* This shouldn't happen. If it does, we're SOL */
-	  return 0;
-	  break;
-	case dst_ln_end:
-	  /* end escape, final entry follows */
-	  return 0;
-	}
-      *buffer += (size < 0) ? -size : size;
-      entry = (dst_ln_entry_ptr_t) * buffer;
-    }
-  last_line += dst_ln_ln_delta (*entry);
-  last_pc += entry->delta.pc_delta * 2;
-  (*buffer)++;
-  dst_record_line (last_line, last_pc);
-  return 1;
-}
-
-static void
-enter_all_lines (char *buffer, long address)
-{
-  if (buffer)
-    while (get_dst_line (&buffer, &address));
-}
-
-static int
-get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
-{
-  int size;
-  dst_rec_ptr_t entry;
-  static int last_type;
-  int ar_size;
-  static unsigned lu3;
-
-  entry = (dst_rec_ptr_t) buffer;
-  switch (entry->rec_type)
-    {
-    case dst_typ_pad:
-      size = 0;
-      break;
-    case dst_typ_comp_unit:
-      size = sizeof (DST_comp_unit (entry));
-      break;
-    case dst_typ_section_tab:
-      size = sizeof (DST_section_tab (entry))
-	+ ((int) DST_section_tab (entry).number_of_sections
-	   - dst_dummy_array_size) * sizeof (long);
-      break;
-    case dst_typ_file_tab:
-      size = sizeof (DST_file_tab (entry))
-	+ ((int) DST_file_tab (entry).number_of_files
-	   - dst_dummy_array_size) * sizeof (dst_file_desc_t);
-      break;
-    case dst_typ_block:
-      size = sizeof (DST_block (entry))
-	+ ((int) DST_block (entry).n_of_code_ranges
-	   - dst_dummy_array_size) * sizeof (dst_code_range_t);
-      break;
-    case dst_typ_5:
-      size = -1;
-      break;
-    case dst_typ_var:
-      size = sizeof (DST_var (entry)) -
-	sizeof (dst_var_loc_long_t) * dst_dummy_array_size +
-	DST_var (entry).no_of_locs *
-	(DST_var (entry).short_locs ?
-	 sizeof (dst_var_loc_short_t) :
-	 sizeof (dst_var_loc_long_t));
-      break;
-    case dst_typ_pointer:
-      size = sizeof (DST_pointer (entry));
-      break;
-    case dst_typ_array:
-      size = sizeof (DST_array (entry));
-      break;
-    case dst_typ_subrange:
-      size = sizeof (DST_subrange (entry));
-      break;
-    case dst_typ_set:
-      size = sizeof (DST_set (entry));
-      break;
-    case dst_typ_implicit_enum:
-      size = sizeof (DST_implicit_enum (entry))
-	+ ((int) DST_implicit_enum (entry).nelems
-	   - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
-      break;
-    case dst_typ_explicit_enum:
-      size = sizeof (DST_explicit_enum (entry))
-	+ ((int) DST_explicit_enum (entry).nelems
-	   - dst_dummy_array_size) * sizeof (dst_enum_elem_t);
-      break;
-    case dst_typ_short_rec:
-      size = sizeof (DST_short_rec (entry))
-	+ DST_short_rec (entry).nfields * sizeof (dst_short_field_t)
-	- dst_dummy_array_size * sizeof (dst_field_t);
-      break;
-    case dst_typ_short_union:
-      size = sizeof (DST_short_union (entry))
-	+ DST_short_union (entry).nfields * sizeof (dst_short_field_t)
-	- dst_dummy_array_size * sizeof (dst_field_t);
-      break;
-    case dst_typ_file:
-      size = sizeof (DST_file (entry));
-      break;
-    case dst_typ_offset:
-      size = sizeof (DST_offset (entry));
-      break;
-    case dst_typ_alias:
-      size = sizeof (DST_alias (entry));
-      break;
-    case dst_typ_signature:
-      size = sizeof (DST_signature (entry)) +
-	((int) DST_signature (entry).nargs -
-	 dst_dummy_array_size) * sizeof (dst_arg_t);
-      break;
-    case dst_typ_21:
-      size = -1;
-      break;
-    case dst_typ_old_label:
-      size = sizeof (DST_old_label (entry));
-      break;
-    case dst_typ_scope:
-      size = sizeof (DST_scope (entry));
-      break;
-    case dst_typ_end_scope:
-      size = 0;
-      break;
-    case dst_typ_25:
-    case dst_typ_26:
-      size = -1;
-      break;
-    case dst_typ_string_tab:
-    case dst_typ_global_name_tab:
-      size = sizeof (DST_string_tab (entry))
-	+ DST_string_tab (entry).length
-	- dst_dummy_array_size;
-      break;
-    case dst_typ_forward:
-      size = sizeof (DST_forward (entry));
-      get_dst_entry ((char *) entry + DST_forward (entry).rec_off, &entry);
-      break;
-    case dst_typ_aux_size:
-      size = sizeof (DST_aux_size (entry));
-      break;
-    case dst_typ_aux_align:
-      size = sizeof (DST_aux_align (entry));
-      break;
-    case dst_typ_aux_field_size:
-      size = sizeof (DST_aux_field_size (entry));
-      break;
-    case dst_typ_aux_field_off:
-      size = sizeof (DST_aux_field_off (entry));
-      break;
-    case dst_typ_aux_field_align:
-      size = sizeof (DST_aux_field_align (entry));
-      break;
-    case dst_typ_aux_qual:
-      size = sizeof (DST_aux_qual (entry));
-      break;
-    case dst_typ_aux_var_bound:
-      size = sizeof (DST_aux_var_bound (entry));
-      break;
-    case dst_typ_extension:
-      size = DST_extension (entry).rec_size;
-      break;
-    case dst_typ_string:
-      size = sizeof (DST_string (entry));
-      break;
-    case dst_typ_old_entry:
-      size = 48;		/* Obsolete entry type */
-      break;
-    case dst_typ_const:
-      size = sizeof (DST_const (entry))
-	+ DST_const (entry).value.length
-	- sizeof (DST_const (entry).value.val);
-      break;
-    case dst_typ_reference:
-      size = sizeof (DST_reference (entry));
-      break;
-    case dst_typ_old_record:
-    case dst_typ_old_union:
-    case dst_typ_record:
-    case dst_typ_union:
-      size = sizeof (DST_record (entry))
-	+ ((int) DST_record (entry).nfields
-	   - dst_dummy_array_size) * sizeof (dst_field_t);
-      break;
-    case dst_typ_aux_type_deriv:
-      size = sizeof (DST_aux_type_deriv (entry));
-      break;
-    case dst_typ_locpool:
-      size = sizeof (DST_locpool (entry))
-	+ ((int) DST_locpool (entry).length -
-	   dst_dummy_array_size);
-      break;
-    case dst_typ_variable:
-      size = sizeof (DST_variable (entry));
-      break;
-    case dst_typ_label:
-      size = sizeof (DST_label (entry));
-      break;
-    case dst_typ_entry:
-      size = sizeof (DST_entry (entry));
-      break;
-    case dst_typ_aux_lifetime:
-      size = sizeof (DST_aux_lifetime (entry));
-      break;
-    case dst_typ_aux_ptr_base:
-      size = sizeof (DST_aux_ptr_base (entry));
-      break;
-    case dst_typ_aux_src_range:
-      size = sizeof (DST_aux_src_range (entry));
-      break;
-    case dst_typ_aux_reg_val:
-      size = sizeof (DST_aux_reg_val (entry));
-      break;
-    case dst_typ_aux_unit_names:
-      size = sizeof (DST_aux_unit_names (entry))
-	+ ((int) DST_aux_unit_names (entry).number_of_names
-	   - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
-      break;
-    case dst_typ_aux_sect_info:
-      size = sizeof (DST_aux_sect_info (entry))
-	+ ((int) DST_aux_sect_info (entry).number_of_refs
-	   - dst_dummy_array_size) * sizeof (dst_sect_ref_t);
-      break;
-    default:
-      size = -1;
-      break;
-    }
-  if (size == -1)
-    {
-      fprintf_unfiltered (gdb_stderr, "Warning: unexpected DST entry type (%d) found\nLast valid entry was of type: %d\n",
-			  (int) entry->rec_type,
-			  last_type);
-      fprintf_unfiltered (gdb_stderr, "Last unknown_3 value: %d\n", lu3);
-      size = 0;
-    }
-  else
-    last_type = entry->rec_type;
-  if (size & 1)			/* Align on a word boundary */
-    size++;
-  size += 2;
-  *ret_entry = entry;
-  return size;
-}
-
-static int
-next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
-{
-  if (*buffer - table->buffer >= table->size)
-    {
-      *entry = NULL;
-      return 0;
-    }
-  *buffer += get_dst_entry (*buffer, entry);
-  return 1;
-}
-
-#define NEXT_BLK(a, b) next_dst_entry(a, b, &blocks_info)
-#define NEXT_SYM(a, b) next_dst_entry(a, b, &symbols_info)
-#define	DST_OFFSET(a, b) ((char *) (a) + (b))
-
-static dst_rec_ptr_t section_table = NULL;
-
-char *
-get_sec_ref (dst_sect_ref_t *ref)
-{
-  dst_sec *section = NULL;
-  long offset;
-
-  if (!section_table || !ref->sect_index)
-    return NULL;
-  offset = DST_section_tab (section_table).section_base[ref->sect_index - 1]
-    + ref->sect_offset;
-  if (offset >= blocks_info.base &&
-      offset < blocks_info.base + blocks_info.size)
-    section = &blocks_info;
-  else if (offset >= symbols_info.base &&
-	   offset < symbols_info.base + symbols_info.size)
-    section = &symbols_info;
-  else if (offset >= lines_info.base &&
-	   offset < lines_info.base + lines_info.size)
-    section = &lines_info;
-  if (!section)
-    return NULL;
-  return section->buffer + (offset - section->base);
-}
-
-CORE_ADDR
-dst_get_addr (int section, long offset)
-{
-  if (!section_table || !section)
-    return 0;
-  return DST_section_tab (section_table).section_base[section - 1] + offset;
-}
-
-CORE_ADDR
-dst_sym_addr (dst_sect_ref_t *ref)
-{
-  if (!section_table || !ref->sect_index)
-    return 0;
-  return DST_section_tab (section_table).section_base[ref->sect_index - 1]
-    + ref->sect_offset;
-}
-
-static struct symbol *
-create_new_symbol (struct objfile *objfile, char *name)
-{
-  struct symbol *sym = (struct symbol *)
-  obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
-  memset (sym, 0, sizeof (struct symbol));
-  SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
-				    &objfile->symbol_obstack);
-  SYMBOL_VALUE (sym) = 0;
-  SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
-
-  SYMBOL_CLASS (sym) = LOC_BLOCK;
-  return sym;
-};
-
-static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
-
-static struct type *
-decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
-		  dst_rec_ptr_t base)
-{
-  struct type *type;
-  dst_rec_ptr_t entry;
-  if (type_desc->std_type.user_defined_type)
-    {
-      entry = (dst_rec_ptr_t) DST_OFFSET (base,
-					  dst_user_type_offset (*type_desc));
-      type = decode_dst_type (objfile, entry);
-    }
-  else
-    {
-      switch (type_desc->std_type.dtc)
-	{
-	case dst_int8_type:
-	  type = builtin_type_signed_char;
-	  break;
-	case dst_int16_type:
-	  type = builtin_type_short;
-	  break;
-	case dst_int32_type:
-	  type = builtin_type_long;
-	  break;
-	case dst_uint8_type:
-	  type = builtin_type_unsigned_char;
-	  break;
-	case dst_uint16_type:
-	  type = builtin_type_unsigned_short;
-	  break;
-	case dst_uint32_type:
-	  type = builtin_type_unsigned_long;
-	  break;
-	case dst_real32_type:
-	  type = builtin_type_float;
-	  break;
-	case dst_real64_type:
-	  type = builtin_type_double;
-	  break;
-	case dst_complex_type:
-	  type = builtin_type_complex;
-	  break;
-	case dst_dcomplex_type:
-	  type = builtin_type_double_complex;
-	  break;
-	case dst_bool8_type:
-	  type = builtin_type_char;
-	  break;
-	case dst_bool16_type:
-	  type = builtin_type_short;
-	  break;
-	case dst_bool32_type:
-	  type = builtin_type_long;
-	  break;
-	case dst_char_type:
-	  type = builtin_type_char;
-	  break;
-	  /* The next few are more complex. I will take care
-	   * of them properly at a later point.
-	   */
-	case dst_string_type:
-	  type = builtin_type_void;
-	  break;
-	case dst_ptr_type:
-	  type = builtin_type_void;
-	  break;
-	case dst_set_type:
-	  type = builtin_type_void;
-	  break;
-	case dst_proc_type:
-	  type = builtin_type_void;
-	  break;
-	case dst_func_type:
-	  type = builtin_type_void;
-	  break;
-	  /* Back tto some ordinary ones */
-	case dst_void_type:
-	  type = builtin_type_void;
-	  break;
-	case dst_uchar_type:
-	  type = builtin_type_unsigned_char;
-	  break;
-	default:
-	  type = builtin_type_void;
-	  break;
-	}
-    }
-  return type;
-}
-
-struct structure_list
-{
-  struct structure_list *next;
-  struct type *type;
-};
-
-static struct structure_list *struct_list = NULL;
-
-static struct type *
-find_dst_structure (char *name)
-{
-  struct structure_list *element;
-
-  for (element = struct_list; element; element = element->next)
-    if (!strcmp (name, TYPE_NAME (element->type)))
-      return element->type;
-  return NULL;
-}
-
-
-static struct type *
-decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
-		      int version)
-{
-  struct type *type, *child_type;
-  char *struct_name;
-  char *name, *field_name;
-  int i;
-  int fieldoffset, fieldsize;
-  dst_type_t type_desc;
-  struct structure_list *element;
-
-  struct_name = DST_OFFSET (entry, DST_record (entry).noffset);
-  name = concat ((code == TYPE_CODE_UNION) ? "union " : "struct ",
-		 struct_name, NULL);
-  type = find_dst_structure (name);
-  if (type)
-    {
-      xfree (name);
-      return type;
-    }
-  type = alloc_type (objfile);
-  TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
-				    name, strlen (name));
-  xfree (name);
-  TYPE_CODE (type) = code;
-  TYPE_LENGTH (type) = DST_record (entry).size;
-  TYPE_NFIELDS (type) = DST_record (entry).nfields;
-  TYPE_FIELDS (type) = (struct field *)
-    obstack_alloc (&objfile->symbol_obstack, sizeof (struct field) *
-		   DST_record (entry).nfields);
-  fieldoffset = fieldsize = 0;
-  INIT_CPLUS_SPECIFIC (type);
-  element = (struct structure_list *)
-    xmalloc (sizeof (struct structure_list));
-  element->type = type;
-  element->next = struct_list;
-  struct_list = element;
-  for (i = 0; i < DST_record (entry).nfields; i++)
-    {
-      switch (version)
-	{
-	case 2:
-	  field_name = DST_OFFSET (entry,
-				   DST_record (entry).f.ofields[i].noffset);
-	  fieldoffset = DST_record (entry).f.ofields[i].foffset * 8 +
-	    DST_record (entry).f.ofields[i].bit_offset;
-	  fieldsize = DST_record (entry).f.ofields[i].size;
-	  type_desc = DST_record (entry).f.ofields[i].type_desc;
-	  break;
-	case 1:
-	  field_name = DST_OFFSET (entry,
-				   DST_record (entry).f.fields[i].noffset);
-	  type_desc = DST_record (entry).f.fields[i].type_desc;
-	  switch (DST_record (entry).f.fields[i].f.field_loc.format_tag)
-	    {
-	    case dst_field_byte:
-	      fieldoffset = DST_record (entry).f.
-		fields[i].f.field_byte.offset * 8;
-	      fieldsize = -1;
-	      break;
-	    case dst_field_bit:
-	      fieldoffset = DST_record (entry).f.
-		fields[i].f.field_bit.byte_offset * 8 +
-		DST_record (entry).f.
-		fields[i].f.field_bit.bit_offset;
-	      fieldsize = DST_record (entry).f.
-		fields[i].f.field_bit.nbits;
-	      break;
-	    case dst_field_loc:
-	      fieldoffset += fieldsize;
-	      fieldsize = -1;
-	      break;
-	    }
-	  break;
-	case 0:
-	  field_name = DST_OFFSET (entry,
-				   DST_record (entry).f.sfields[i].noffset);
-	  fieldoffset = DST_record (entry).f.sfields[i].foffset;
-	  type_desc = DST_record (entry).f.sfields[i].type_desc;
-	  if (i < DST_record (entry).nfields - 1)
-	    fieldsize = DST_record (entry).f.sfields[i + 1].foffset;
-	  else
-	    fieldsize = DST_record (entry).size;
-	  fieldsize -= fieldoffset;
-	  fieldoffset *= 8;
-	  fieldsize *= 8;
-	}
-      TYPE_FIELDS (type)[i].name =
-	obstack_copy0 (&objfile->symbol_obstack,
-		       field_name, strlen (field_name));
-      TYPE_FIELDS (type)[i].type = decode_type_desc (objfile,
-						     &type_desc,
-						     entry);
-      if (fieldsize == -1)
-	fieldsize = TYPE_LENGTH (TYPE_FIELDS (type)[i].type) *
-	  8;
-      TYPE_FIELDS (type)[i].bitsize = fieldsize;
-      TYPE_FIELDS (type)[i].bitpos = fieldoffset;
-    }
-  return type;
-}
-
-static struct type *
-decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
-{
-  struct type *child_type, *type, *range_type, *index_type;
-
-  switch (entry->rec_type)
-    {
-    case dst_typ_var:
-      return decode_type_desc (objfile,
-			       &DST_var (entry).type_desc,
-			       entry);
-      break;
-    case dst_typ_variable:
-      return decode_type_desc (objfile,
-			       &DST_variable (entry).type_desc,
-			       entry);
-      break;
-    case dst_typ_short_rec:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 0);
-    case dst_typ_short_union:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 0);
-    case dst_typ_union:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 1);
-    case dst_typ_record:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 1);
-    case dst_typ_old_union:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 2);
-    case dst_typ_old_record:
-      return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 2);
-    case dst_typ_pointer:
-      return make_pointer_type (
-				 decode_type_desc (objfile,
-					     &DST_pointer (entry).type_desc,
-						   entry),
-				 NULL);
-    case dst_typ_array:
-      child_type = decode_type_desc (objfile,
-				     &DST_pointer (entry).type_desc,
-				     entry);
-      index_type = lookup_fundamental_type (objfile,
-					    FT_INTEGER);
-      range_type = create_range_type ((struct type *) NULL,
-				      index_type, DST_array (entry).lo_bound,
-				      DST_array (entry).hi_bound);
-      return create_array_type ((struct type *) NULL, child_type,
-				range_type);
-    case dst_typ_alias:
-      return decode_type_desc (objfile,
-			       &DST_alias (entry).type_desc,
-			       entry);
-    default:
-      return builtin_type_int;
-    }
-}
-
-struct symbol_list
-{
-  struct symbol_list *next;
-  struct symbol *symbol;
-};
-
-static struct symbol_list *dst_global_symbols = NULL;
-static int total_globals = 0;
-
-static void
-decode_dst_locstring (char *locstr, struct symbol *sym)
-{
-  dst_loc_entry_t *entry, *next_entry;
-  CORE_ADDR temp;
-  int count = 0;
-
-  while (1)
-    {
-      if (count++ == 100)
-	{
-	  fprintf_unfiltered (gdb_stderr, "Error reading locstring\n");
-	  break;
-	}
-      entry = (dst_loc_entry_t *) locstr;
-      next_entry = (dst_loc_entry_t *) (locstr + 1);
-      switch (entry->header.code)
-	{
-	case dst_lsc_end:	/* End of string */
-	  return;
-	case dst_lsc_indirect:	/* Indirect through previous. Arg == 6 */
-	  /* Or register ax x == arg */
-	  if (entry->header.arg < 6)
-	    {
-	      SYMBOL_CLASS (sym) = LOC_REGISTER;
-	      SYMBOL_VALUE (sym) = entry->header.arg + 8;
-	    }
-	  /* We predict indirects */
-	  locstr++;
-	  break;
-	case dst_lsc_dreg:
-	  SYMBOL_CLASS (sym) = LOC_REGISTER;
-	  SYMBOL_VALUE (sym) = entry->header.arg;
-	  locstr++;
-	  break;
-	case dst_lsc_section:	/* Section (arg+1) */
-	  SYMBOL_VALUE (sym) = dst_get_addr (entry->header.arg + 1, 0);
-	  locstr++;
-	  break;
-	case dst_lsc_sec_byte:	/* Section (next_byte+1) */
-	  SYMBOL_VALUE (sym) = dst_get_addr (locstr[1] + 1, 0);
-	  locstr += 2;
-	  break;
-	case dst_lsc_add:	/* Add (arg+1)*2 */
-	case dst_lsc_sub:	/* Subtract (arg+1)*2 */
-	  temp = (entry->header.arg + 1) * 2;
-	  locstr++;
-	  if (*locstr == dst_multiply_256)
-	    {
-	      temp <<= 8;
-	      locstr++;
-	    }
-	  switch (entry->header.code)
-	    {
-	    case dst_lsc_add:
-	      if (SYMBOL_CLASS (sym) == LOC_LOCAL)
-		SYMBOL_CLASS (sym) = LOC_ARG;
-	      SYMBOL_VALUE (sym) += temp;
-	      break;
-	    case dst_lsc_sub:
-	      SYMBOL_VALUE (sym) -= temp;
-	      break;
-	    }
-	  break;
-	case dst_lsc_add_byte:
-	case dst_lsc_sub_byte:
-	  switch (entry->header.arg & 0x03)
-	    {
-	    case 1:
-	      temp = (unsigned char) locstr[1];
-	      locstr += 2;
-	      break;
-	    case 2:
-	      temp = *(unsigned short *) (locstr + 1);
-	      locstr += 3;
-	      break;
-	    case 3:
-	      temp = *(unsigned long *) (locstr + 1);
-	      locstr += 5;
-	      break;
-	    }
-	  if (*locstr == dst_multiply_256)
-	    {
-	      temp <<= 8;
-	      locstr++;
-	    }
-	  switch (entry->header.code)
-	    {
-	    case dst_lsc_add_byte:
-	      if (SYMBOL_CLASS (sym) == LOC_LOCAL)
-		SYMBOL_CLASS (sym) = LOC_ARG;
-	      SYMBOL_VALUE (sym) += temp;
-	      break;
-	    case dst_lsc_sub_byte:
-	      SYMBOL_VALUE (sym) -= temp;
-	      break;
-	    }
-	  break;
-	case dst_lsc_sbreg:	/* Stack base register (frame pointer). Arg==0 */
-	  if (next_entry->header.code != dst_lsc_indirect)
-	    {
-	      SYMBOL_VALUE (sym) = 0;
-	      SYMBOL_CLASS (sym) = LOC_STATIC;
-	      return;
-	    }
-	  SYMBOL_VALUE (sym) = 0;
-	  SYMBOL_CLASS (sym) = LOC_LOCAL;
-	  locstr++;
-	  break;
-	default:
-	  SYMBOL_VALUE (sym) = 0;
-	  SYMBOL_CLASS (sym) = LOC_STATIC;
-	  return;
-	}
-    }
-}
-
-static struct symbol_list *
-process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
-		     int *nsyms_ret)
-{
-  struct symbol_list *list = NULL, *element;
-  struct symbol *sym;
-  char *symname;
-  int nsyms = 0;
-  char *location;
-  long line;
-  dst_type_t symtype;
-  struct type *type;
-  dst_var_attr_t attr;
-  dst_var_loc_t loc_type;
-  unsigned loc_index;
-  long loc_value;
-
-  if (!entry)
-    {
-      *nsyms_ret = 0;
-      return NULL;
-    }
-  location = (char *) entry;
-  while (NEXT_SYM (&location, &entry) &&
-	 entry->rec_type != dst_typ_end_scope)
-    {
-      if (entry->rec_type == dst_typ_var)
-	{
-	  if (DST_var (entry).short_locs)
-	    {
-	      loc_type = DST_var (entry).locs.shorts[0].loc_type;
-	      loc_index = DST_var (entry).locs.shorts[0].loc_index;
-	      loc_value = DST_var (entry).locs.shorts[0].location;
-	    }
-	  else
-	    {
-	      loc_type = DST_var (entry).locs.longs[0].loc_type;
-	      loc_index = DST_var (entry).locs.longs[0].loc_index;
-	      loc_value = DST_var (entry).locs.longs[0].location;
-	    }
-	  if (loc_type == dst_var_loc_external)
-	    continue;
-	  symname = DST_OFFSET (entry, DST_var (entry).noffset);
-	  line = DST_var (entry).src_loc.line_number;
-	  symtype = DST_var (entry).type_desc;
-	  attr = DST_var (entry).attributes;
-	}
-      else if (entry->rec_type == dst_typ_variable)
-	{
-	  symname = DST_OFFSET (entry,
-				DST_variable (entry).noffset);
-	  line = DST_variable (entry).src_loc.line_number;
-	  symtype = DST_variable (entry).type_desc;
-	  attr = DST_variable (entry).attributes;
-	}
-      else
-	{
-	  continue;
-	}
-      if (symname && name && !strcmp (symname, name))
-	/* It's the function return value */
-	continue;
-      sym = create_new_symbol (objfile, symname);
-
-      if ((attr & (1 << dst_var_attr_global)) ||
-	  (attr & (1 << dst_var_attr_static)))
-	SYMBOL_CLASS (sym) = LOC_STATIC;
-      else
-	SYMBOL_CLASS (sym) = LOC_LOCAL;
-      SYMBOL_LINE (sym) = line;
-      SYMBOL_TYPE (sym) = decode_type_desc (objfile, &symtype,
-					    entry);
-      SYMBOL_VALUE (sym) = 0;
-      switch (entry->rec_type)
-	{
-	case dst_typ_var:
-	  switch (loc_type)
-	    {
-	    case dst_var_loc_abs:
-	      SYMBOL_VALUE_ADDRESS (sym) = loc_value;
-	      break;
-	    case dst_var_loc_sect_off:
-	    case dst_var_loc_ind_sect_off:	/* What is this? */
-	      SYMBOL_VALUE_ADDRESS (sym) = dst_get_addr (
-							  loc_index,
-							  loc_value);
-	      break;
-	    case dst_var_loc_ind_reg_rel:	/* What is this? */
-	    case dst_var_loc_reg_rel:
-	      /* If it isn't fp relative, specify the
-	       * register it's relative to.
-	       */
-	      if (loc_index)
-		{
-		  sym->aux_value.basereg = loc_index;
-		}
-	      SYMBOL_VALUE (sym) = loc_value;
-	      if (loc_value > 0 &&
-		  SYMBOL_CLASS (sym) == LOC_BASEREG)
-		SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
-	      break;
-	    case dst_var_loc_reg:
-	      SYMBOL_VALUE (sym) = loc_index;
-	      SYMBOL_CLASS (sym) = LOC_REGISTER;
-	      break;
-	    }
-	  break;
-	case dst_typ_variable:
-	  /* External variable..... don't try to interpret
-	   * its nonexistant locstring.
-	   */
-	  if (DST_variable (entry).loffset == -1)
-	    continue;
-	  decode_dst_locstring (DST_OFFSET (entry,
-					    DST_variable (entry).loffset),
-				sym);
-	}
-      element = (struct symbol_list *)
-	xmalloc (sizeof (struct symbol_list));
-
-      if (attr & (1 << dst_var_attr_global))
-	{
-	  element->next = dst_global_symbols;
-	  dst_global_symbols = element;
-	  total_globals++;
-	}
-      else
-	{
-	  element->next = list;
-	  list = element;
-	  nsyms++;
-	}
-      element->symbol = sym;
-    }
-  *nsyms_ret = nsyms;
-  return list;
-}
-
-
-static struct symbol *
-process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
-		      CORE_ADDR address)
-{
-  struct symbol *sym;
-  struct type *type, *ftype;
-  dst_rec_ptr_t sym_entry, typ_entry;
-  char *location;
-  struct symbol_list *element;
-
-  type = builtin_type_int;
-  sym = create_new_symbol (objfile, name);
-  SYMBOL_CLASS (sym) = LOC_BLOCK;
-
-  if (entry)
-    {
-      location = (char *) entry;
-      do
-	{
-	  NEXT_SYM (&location, &sym_entry);
-	}
-      while (sym_entry && sym_entry->rec_type != dst_typ_signature);
-
-      if (sym_entry)
-	{
-	  SYMBOL_LINE (sym) =
-	    DST_signature (sym_entry).src_loc.line_number;
-	  if (DST_signature (sym_entry).result)
-	    {
-	      typ_entry = (dst_rec_ptr_t)
-		DST_OFFSET (sym_entry,
-			    DST_signature (sym_entry).result);
-	      type = decode_dst_type (objfile, typ_entry);
-	    }
-	}
-    }
-
-  if (!type->function_type)
-    {
-      ftype = alloc_type (objfile);
-      type->function_type = ftype;
-      TYPE_TARGET_TYPE (ftype) = type;
-      TYPE_CODE (ftype) = TYPE_CODE_FUNC;
-    }
-  SYMBOL_TYPE (sym) = type->function_type;
-
-  /* Now add ourselves to the global symbols list */
-  element = (struct symbol_list *)
-    xmalloc (sizeof (struct symbol_list));
-
-  element->next = dst_global_symbols;
-  dst_global_symbols = element;
-  total_globals++;
-  element->symbol = sym;
-
-  return sym;
-}
-
-static struct block *
-process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
-{
-  struct block *block;
-  struct symbol *function = NULL;
-  CORE_ADDR address;
-  long size;
-  char *name;
-  dst_rec_ptr_t child_entry, symbol_entry;
-  struct block *child_block;
-  int total_symbols = 0;
-  char fake_name[20];
-  static long fake_seq = 0;
-  struct symbol_list *symlist, *nextsym;
-  int symnum;
-
-  if (DST_block (entry).noffset)
-    name = DST_OFFSET (entry, DST_block (entry).noffset);
-  else
-    name = NULL;
-  if (DST_block (entry).n_of_code_ranges)
-    {
-      address = dst_sym_addr (
-			       &DST_block (entry).code_ranges[0].code_start);
-      size = DST_block (entry).code_ranges[0].code_size;
-    }
-  else
-    {
-      address = -1;
-      size = 0;
-    }
-  symbol_entry = (dst_rec_ptr_t) get_sec_ref (&DST_block (entry).symbols_start);
-  switch (DST_block (entry).block_type)
-    {
-      /* These are all really functions. Even the "program" type.
-       * This is because the Apollo OS was written in Pascal, and
-       * in Pascal, the main procedure is described as the Program.
-       * Cute, huh?
-       */
-    case dst_block_procedure:
-    case dst_block_function:
-    case dst_block_subroutine:
-    case dst_block_program:
-      prim_record_minimal_symbol (name, address, mst_text, objfile);
-      function = process_dst_function (
-					objfile,
-					symbol_entry,
-					name,
-					address);
-      enter_all_lines (get_sec_ref (&DST_block (entry).code_ranges[0].lines_start), address);
-      break;
-    case dst_block_block_data:
-      break;
-
-    default:
-      /* GDB has to call it something, and the module name
-       * won't cut it
-       */
-      sprintf (fake_name, "block_%08lx", fake_seq++);
-      function = process_dst_function (
-					objfile, NULL, fake_name, address);
-      break;
-    }
-  symlist = process_dst_symbols (objfile, symbol_entry,
-				 name, &total_symbols);
-  block = (struct block *)
-    obstack_alloc (&objfile->symbol_obstack,
-		   sizeof (struct block) +
-		     (total_symbols - 1) * sizeof (struct symbol *));
-
-  symnum = 0;
-  while (symlist)
-    {
-      nextsym = symlist->next;
-
-      block->sym[symnum] = symlist->symbol;
-
-      xfree (symlist);
-      symlist = nextsym;
-      symnum++;
-    }
-  BLOCK_NSYMS (block) = total_symbols;
-  BLOCK_START (block) = address;
-  BLOCK_END (block) = address + size;
-  BLOCK_SUPERBLOCK (block) = 0;
-  if (function)
-    {
-      SYMBOL_BLOCK_VALUE (function) = block;
-      BLOCK_FUNCTION (block) = function;
-    }
-  else
-    BLOCK_FUNCTION (block) = 0;
-
-  if (DST_block (entry).child_block_off)
-    {
-      child_entry = (dst_rec_ptr_t) DST_OFFSET (entry,
-					 DST_block (entry).child_block_off);
-      while (child_entry)
-	{
-	  child_block = process_dst_block (objfile, child_entry);
-	  if (child_block)
-	    {
-	      if (BLOCK_START (child_block) <
-		  BLOCK_START (block) ||
-		  BLOCK_START (block) == -1)
-		BLOCK_START (block) =
-		  BLOCK_START (child_block);
-	      if (BLOCK_END (child_block) >
-		  BLOCK_END (block) ||
-		  BLOCK_END (block) == -1)
-		BLOCK_END (block) =
-		  BLOCK_END (child_block);
-	      BLOCK_SUPERBLOCK (child_block) = block;
-	    }
-	  if (DST_block (child_entry).sibling_block_off)
-	    child_entry = (dst_rec_ptr_t) DST_OFFSET (
-						       child_entry,
-				 DST_block (child_entry).sibling_block_off);
-	  else
-	    child_entry = NULL;
-	}
-    }
-  record_pending_block (objfile, block, NULL);
-  return block;
-}
-
-
-static void
-read_dst_symtab (struct objfile *objfile)
-{
-  char *buffer;
-  dst_rec_ptr_t entry, file_table, root_block;
-  char *source_file;
-  struct block *block, *global_block;
-  int symnum;
-  struct symbol_list *nextsym;
-  int module_num = 0;
-  struct structure_list *element;
-
-  current_objfile = objfile;
-  buffer = blocks_info.buffer;
-  while (NEXT_BLK (&buffer, &entry))
-    {
-      if (entry->rec_type == dst_typ_comp_unit)
-	{
-	  file_table = (dst_rec_ptr_t) DST_OFFSET (entry,
-					  DST_comp_unit (entry).file_table);
-	  section_table = (dst_rec_ptr_t) DST_OFFSET (entry,
-				       DST_comp_unit (entry).section_table);
-	  root_block = (dst_rec_ptr_t) DST_OFFSET (entry,
-				   DST_comp_unit (entry).root_block_offset);
-	  source_file = DST_OFFSET (file_table,
-				DST_file_tab (file_table).files[0].noffset);
-	  /* Point buffer to the start of the next comp_unit */
-	  buffer = DST_OFFSET (entry,
-			       DST_comp_unit (entry).data_size);
-	  dst_start_symtab ();
-
-	  block = process_dst_block (objfile, root_block);
-
-	  global_block = (struct block *)
-	    obstack_alloc (&objfile->symbol_obstack,
-			   sizeof (struct block) +
-			     (total_globals - 1) *
-			   sizeof (struct symbol *));
-	  BLOCK_NSYMS (global_block) = total_globals;
-	  for (symnum = 0; symnum < total_globals; symnum++)
-	    {
-	      nextsym = dst_global_symbols->next;
-
-	      global_block->sym[symnum] =
-		dst_global_symbols->symbol;
-
-	      xfree (dst_global_symbols);
-	      dst_global_symbols = nextsym;
-	    }
-	  dst_global_symbols = NULL;
-	  total_globals = 0;
-	  BLOCK_FUNCTION (global_block) = 0;
-	  BLOCK_START (global_block) = BLOCK_START (block);
-	  BLOCK_END (global_block) = BLOCK_END (block);
-	  BLOCK_SUPERBLOCK (global_block) = 0;
-	  BLOCK_SUPERBLOCK (block) = global_block;
-	  record_pending_block (objfile, global_block, NULL);
-
-	  complete_symtab (source_file,
-			   BLOCK_START (block),
-			   BLOCK_END (block) - BLOCK_START (block));
-	  module_num++;
-	  dst_end_symtab (objfile);
-	}
-    }
-  if (module_num)
-    prim_record_minimal_symbol ("<end_of_program>",
-				BLOCK_END (block), mst_text, objfile);
-  /* One more faked symbol to make sure nothing can ever run off the
-   * end of the symbol table. This one represents the end of the
-   * text space. It used to be (CORE_ADDR) -1 (effectively the highest
-   * int possible), but some parts of gdb treated it as a signed
-   * number and failed comparisons. We could equally use 7fffffff,
-   * but no functions are ever mapped to an address higher than
-   * 40000000
-   */
-  prim_record_minimal_symbol ("<end_of_text>",
-			      (CORE_ADDR) 0x40000000,
-			      mst_text, objfile);
-  while (struct_list)
-    {
-      element = struct_list;
-      struct_list = element->next;
-      xfree (element);
-    }
-}
-
-
-/* Support for line number handling */
-static char *linetab = NULL;
-static long linetab_offset;
-static unsigned long linetab_size;
-
-/* Read in all the line numbers for fast lookups later.  Leave them in
-   external (unswapped) format in memory; we'll swap them as we enter
-   them into GDB's data structures.  */
-static int
-init_one_section (int chan, dst_sec *secinfo)
-{
-  if (secinfo->size == 0
-      || lseek (chan, secinfo->position, 0) == -1
-      || (secinfo->buffer = xmalloc (secinfo->size)) == NULL
-      || myread (chan, secinfo->buffer, secinfo->size) == -1)
-    return 0;
-  else
-    return 1;
-}
-
-static int
-init_dst_sections (int chan)
-{
-
-  if (!init_one_section (chan, &blocks_info) ||
-      !init_one_section (chan, &lines_info) ||
-      !init_one_section (chan, &symbols_info))
-    return -1;
-  else
-    return 0;
-}
-
-/* Fake up support for relocating symbol addresses.  FIXME.  */
-
-struct section_offsets dst_symfile_faker =
-{0};
-
-void
-dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
-{
-  objfile->num_sections = 1;
-  objfile->section_offsets = &dst_symfile_faker;
-}
-
-/* Register our ability to parse symbols for DST BFD files */
-
-static struct sym_fns dst_sym_fns =
-{
-  /* FIXME: Can this be integrated with coffread.c?  If not, should it be
-     a separate flavour like ecoff?  */
-  (enum bfd_flavour) -2,
-
-  dst_new_init,			/* sym_new_init: init anything gbl to entire symtab */
-  dst_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
-  dst_symfile_read,		/* sym_read: read a symbol file into symtab */
-  dst_symfile_finish,		/* sym_finish: finished with file, cleanup */
-  dst_symfile_offsets,		/* sym_offsets:  xlate external to internal form */
-  NULL				/* next: pointer to next struct sym_fns */
-};
-
-void
-_initialize_dstread (void)
-{
-  add_symtab_fns (&dst_sym_fns);
-}
+// OBSOLETE /* Read apollo DST symbol tables and convert to internal format, for GDB.
+// OBSOLETE    Contributed by Troy Rollo, University of NSW (troy@cbme.unsw.edu.au).
+// OBSOLETE    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "breakpoint.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "buildsym.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE 
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE 
+// OBSOLETE #include "dst.h"
+// OBSOLETE 
+// OBSOLETE CORE_ADDR cur_src_start_addr, cur_src_end_addr;
+// OBSOLETE dst_sec blocks_info, lines_info, symbols_info;
+// OBSOLETE 
+// OBSOLETE /* Vector of line number information.  */
+// OBSOLETE 
+// OBSOLETE static struct linetable *line_vector;
+// OBSOLETE 
+// OBSOLETE /* Index of next entry to go in line_vector_index.  */
+// OBSOLETE 
+// OBSOLETE static int line_vector_index;
+// OBSOLETE 
+// OBSOLETE /* Last line number recorded in the line vector.  */
+// OBSOLETE 
+// OBSOLETE static int prev_line_number;
+// OBSOLETE 
+// OBSOLETE /* Number of elements allocated for line_vector currently.  */
+// OBSOLETE 
+// OBSOLETE static int line_vector_length;
+// OBSOLETE 
+// OBSOLETE static int init_dst_sections (int);
+// OBSOLETE 
+// OBSOLETE static void read_dst_symtab (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void find_dst_sections (bfd *, sec_ptr, PTR);
+// OBSOLETE 
+// OBSOLETE static void dst_symfile_init (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void dst_new_init (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void dst_symfile_read (struct objfile *, int);
+// OBSOLETE 
+// OBSOLETE static void dst_symfile_finish (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void dst_end_symtab (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void complete_symtab (char *, CORE_ADDR, unsigned int);
+// OBSOLETE 
+// OBSOLETE static void dst_start_symtab (void);
+// OBSOLETE 
+// OBSOLETE static void dst_record_line (int, CORE_ADDR);
+// OBSOLETE 
+// OBSOLETE /* Manage the vector of line numbers.  */
+// OBSOLETE /* FIXME: Use record_line instead.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_record_line (int line, CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE   struct linetable_entry *e;
+// OBSOLETE   /* Make sure line vector is big enough.  */
+// OBSOLETE 
+// OBSOLETE   if (line_vector_index + 2 >= line_vector_length)
+// OBSOLETE     {
+// OBSOLETE       line_vector_length *= 2;
+// OBSOLETE       line_vector = (struct linetable *)
+// OBSOLETE 	xrealloc ((char *) line_vector, sizeof (struct linetable)
+// OBSOLETE 		  + (line_vector_length
+// OBSOLETE 		     * sizeof (struct linetable_entry)));
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   e = line_vector->item + line_vector_index++;
+// OBSOLETE   e->line = line;
+// OBSOLETE   e->pc = pc;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Start a new symtab for a new source file.
+// OBSOLETE    It indicates the start of data for one original source file.  */
+// OBSOLETE /* FIXME: use start_symtab, like coffread.c now does.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_start_symtab (void)
+// OBSOLETE {
+// OBSOLETE   /* Initialize the source file line number information for this file.  */
+// OBSOLETE 
+// OBSOLETE   if (line_vector)		/* Unlikely, but maybe possible? */
+// OBSOLETE     xfree (line_vector);
+// OBSOLETE   line_vector_index = 0;
+// OBSOLETE   line_vector_length = 1000;
+// OBSOLETE   prev_line_number = -2;	/* Force first line number to be explicit */
+// OBSOLETE   line_vector = (struct linetable *)
+// OBSOLETE     xmalloc (sizeof (struct linetable)
+// OBSOLETE 	     + line_vector_length * sizeof (struct linetable_entry));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Save the vital information from when starting to read a file,
+// OBSOLETE    for use when closing off the current file.
+// OBSOLETE    NAME is the file name the symbols came from, START_ADDR is the first
+// OBSOLETE    text address for the file, and SIZE is the number of bytes of text.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size)
+// OBSOLETE {
+// OBSOLETE   last_source_file = savestring (name, strlen (name));
+// OBSOLETE   cur_src_start_addr = start_addr;
+// OBSOLETE   cur_src_end_addr = start_addr + size;
+// OBSOLETE 
+// OBSOLETE   if (current_objfile->ei.entry_point >= cur_src_start_addr &&
+// OBSOLETE       current_objfile->ei.entry_point < cur_src_end_addr)
+// OBSOLETE     {
+// OBSOLETE       current_objfile->ei.entry_file_lowpc = cur_src_start_addr;
+// OBSOLETE       current_objfile->ei.entry_file_highpc = cur_src_end_addr;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Finish the symbol definitions for one main source file,
+// OBSOLETE    close off all the lexical contexts for that file
+// OBSOLETE    (creating struct block's for them), then make the
+// OBSOLETE    struct symtab for that file and put it in the list of all such. */
+// OBSOLETE /* FIXME: Use end_symtab, like coffread.c now does.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_end_symtab (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   register struct symtab *symtab;
+// OBSOLETE   register struct blockvector *blockvector;
+// OBSOLETE   register struct linetable *lv;
+// OBSOLETE 
+// OBSOLETE   /* Create the blockvector that points to all the file's blocks.  */
+// OBSOLETE 
+// OBSOLETE   blockvector = make_blockvector (objfile);
+// OBSOLETE 
+// OBSOLETE   /* Now create the symtab object for this source file.  */
+// OBSOLETE   symtab = allocate_symtab (last_source_file, objfile);
+// OBSOLETE 
+// OBSOLETE   /* Fill in its components.  */
+// OBSOLETE   symtab->blockvector = blockvector;
+// OBSOLETE   symtab->free_code = free_linetable;
+// OBSOLETE   symtab->free_ptr = 0;
+// OBSOLETE   symtab->filename = last_source_file;
+// OBSOLETE   symtab->dirname = NULL;
+// OBSOLETE   symtab->debugformat = obsavestring ("Apollo DST", 10,
+// OBSOLETE 				      &objfile->symbol_obstack);
+// OBSOLETE   lv = line_vector;
+// OBSOLETE   lv->nitems = line_vector_index;
+// OBSOLETE   symtab->linetable = (struct linetable *)
+// OBSOLETE     xrealloc ((char *) lv, (sizeof (struct linetable)
+// OBSOLETE 			    + lv->nitems * sizeof (struct linetable_entry)));
+// OBSOLETE 
+// OBSOLETE   free_named_symtabs (symtab->filename);
+// OBSOLETE 
+// OBSOLETE   /* Reinitialize for beginning of new file. */
+// OBSOLETE   line_vector = 0;
+// OBSOLETE   line_vector_length = -1;
+// OBSOLETE   last_source_file = NULL;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dst_symfile_init ()
+// OBSOLETE    is the dst-specific initialization routine for reading symbols.
+// OBSOLETE 
+// OBSOLETE    We will only be called if this is a DST or DST-like file.
+// OBSOLETE    BFD handles figuring out the format of the file, and code in symtab.c
+// OBSOLETE    uses BFD's determination to vector to us.
+// OBSOLETE 
+// OBSOLETE    The ultimate result is a new symtab (or, FIXME, eventually a psymtab).  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_symfile_init (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   asection *section;
+// OBSOLETE   bfd *abfd = objfile->obfd;
+// OBSOLETE 
+// OBSOLETE   init_entry_point_info (objfile);
+// OBSOLETE 
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* This function is called for every section; it finds the outer limits
+// OBSOLETE    of the line table (minimum and maximum file offset) so that the
+// OBSOLETE    mainline code can read the whole thing for efficiency.  */
+// OBSOLETE 
+// OBSOLETE /* ARGSUSED */
+// OBSOLETE static void
+// OBSOLETE find_dst_sections (bfd *abfd, sec_ptr asect, PTR vpinfo)
+// OBSOLETE {
+// OBSOLETE   int size, count;
+// OBSOLETE   long base;
+// OBSOLETE   file_ptr offset, maxoff;
+// OBSOLETE   dst_sec *section;
+// OBSOLETE 
+// OBSOLETE /* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
+// OBSOLETE   size = asect->_raw_size;
+// OBSOLETE   offset = asect->filepos;
+// OBSOLETE   base = asect->vma;
+// OBSOLETE /* End of warning */
+// OBSOLETE 
+// OBSOLETE   section = NULL;
+// OBSOLETE   if (!strcmp (asect->name, ".blocks"))
+// OBSOLETE     section = &blocks_info;
+// OBSOLETE   else if (!strcmp (asect->name, ".lines"))
+// OBSOLETE     section = &lines_info;
+// OBSOLETE   else if (!strcmp (asect->name, ".symbols"))
+// OBSOLETE     section = &symbols_info;
+// OBSOLETE   if (!section)
+// OBSOLETE     return;
+// OBSOLETE   section->size = size;
+// OBSOLETE   section->position = offset;
+// OBSOLETE   section->base = base;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* The BFD for this file -- only good while we're actively reading
+// OBSOLETE    symbols into a psymtab or a symtab.  */
+// OBSOLETE 
+// OBSOLETE static bfd *symfile_bfd;
+// OBSOLETE 
+// OBSOLETE /* Read a symbol file, after initialization by dst_symfile_init.  */
+// OBSOLETE /* FIXME!  Addr and Mainline are not used yet -- this will not work for
+// OBSOLETE    shared libraries or add_file!  */
+// OBSOLETE 
+// OBSOLETE /* ARGSUSED */
+// OBSOLETE static void
+// OBSOLETE dst_symfile_read (struct objfile *objfile, int mainline)
+// OBSOLETE {
+// OBSOLETE   bfd *abfd = objfile->obfd;
+// OBSOLETE   char *name = bfd_get_filename (abfd);
+// OBSOLETE   int desc;
+// OBSOLETE   register int val;
+// OBSOLETE   int num_symbols;
+// OBSOLETE   int symtab_offset;
+// OBSOLETE   int stringtab_offset;
+// OBSOLETE 
+// OBSOLETE   symfile_bfd = abfd;		/* Kludge for swap routines */
+// OBSOLETE 
+// OBSOLETE /* WARNING WILL ROBINSON!  ACCESSING BFD-PRIVATE DATA HERE!  FIXME!  */
+// OBSOLETE   desc = fileno ((FILE *) (abfd->iostream));	/* File descriptor */
+// OBSOLETE 
+// OBSOLETE   /* Read the line number table, all at once.  */
+// OBSOLETE   bfd_map_over_sections (abfd, find_dst_sections, (PTR) NULL);
+// OBSOLETE 
+// OBSOLETE   val = init_dst_sections (desc);
+// OBSOLETE   if (val < 0)
+// OBSOLETE     error ("\"%s\": error reading debugging symbol tables\n", name);
+// OBSOLETE 
+// OBSOLETE   init_minimal_symbol_collection ();
+// OBSOLETE   make_cleanup_discard_minimal_symbols ();
+// OBSOLETE 
+// OBSOLETE   /* Now that the executable file is positioned at symbol table,
+// OBSOLETE      process it and define symbols accordingly.  */
+// OBSOLETE 
+// OBSOLETE   read_dst_symtab (objfile);
+// OBSOLETE 
+// OBSOLETE   /* Sort symbols alphabetically within each block.  */
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     struct symtab *s;
+// OBSOLETE     for (s = objfile->symtabs; s != NULL; s = s->next)
+// OBSOLETE       {
+// OBSOLETE 	sort_symtab_syms (s);
+// OBSOLETE       }
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   /* Install any minimal symbols that have been collected as the current
+// OBSOLETE      minimal symbols for this objfile. */
+// OBSOLETE 
+// OBSOLETE   install_minimal_symbols (objfile);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_new_init (struct objfile *ignore)
+// OBSOLETE {
+// OBSOLETE   /* Nothin' to do */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Perform any local cleanups required when we are done with a particular
+// OBSOLETE    objfile.  I.E, we are in the process of discarding all symbol information
+// OBSOLETE    for an objfile, freeing up all memory held for it, and unlinking the
+// OBSOLETE    objfile struct from the global list of known objfiles. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE dst_symfile_finish (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   /* Nothing to do */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Get the next line number from the DST. Returns 0 when we hit an
+// OBSOLETE  * end directive or cannot continue for any other reason.
+// OBSOLETE  *
+// OBSOLETE  * Note that ordinary pc deltas are multiplied by two. Apparently
+// OBSOLETE  * this is what was really intended.
+// OBSOLETE  */
+// OBSOLETE static int
+// OBSOLETE get_dst_line (signed char **buffer, long *pc)
+// OBSOLETE {
+// OBSOLETE   static last_pc = 0;
+// OBSOLETE   static long last_line = 0;
+// OBSOLETE   static int last_file = 0;
+// OBSOLETE   dst_ln_entry_ptr_t entry;
+// OBSOLETE   int size;
+// OBSOLETE   dst_src_loc_t *src_loc;
+// OBSOLETE 
+// OBSOLETE   if (*pc != -1)
+// OBSOLETE     {
+// OBSOLETE       last_pc = *pc;
+// OBSOLETE       *pc = -1;
+// OBSOLETE     }
+// OBSOLETE   entry = (dst_ln_entry_ptr_t) * buffer;
+// OBSOLETE 
+// OBSOLETE   while (dst_ln_ln_delta (*entry) == dst_ln_escape_flag)
+// OBSOLETE     {
+// OBSOLETE       switch (entry->esc.esc_code)
+// OBSOLETE 	{
+// OBSOLETE 	case dst_ln_pad:
+// OBSOLETE 	  size = 1;		/* pad byte */
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_file:
+// OBSOLETE 	  /* file escape.  Next 4 bytes are a dst_src_loc_t */
+// OBSOLETE 	  size = 5;
+// OBSOLETE 	  src_loc = (dst_src_loc_t *) (*buffer + 1);
+// OBSOLETE 	  last_line = src_loc->line_number;
+// OBSOLETE 	  last_file = src_loc->file_index;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_dln1_dpc1:
+// OBSOLETE 	  /* 1 byte line delta, 1 byte pc delta */
+// OBSOLETE 	  last_line += (*buffer)[1];
+// OBSOLETE 	  last_pc += 2 * (unsigned char) (*buffer)[2];
+// OBSOLETE 	  dst_record_line (last_line, last_pc);
+// OBSOLETE 	  size = 3;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_dln2_dpc2:
+// OBSOLETE 	  /* 2 bytes line delta, 2 bytes pc delta */
+// OBSOLETE 	  last_line += *(short *) (*buffer + 1);
+// OBSOLETE 	  last_pc += 2 * (*(short *) (*buffer + 3));
+// OBSOLETE 	  size = 5;
+// OBSOLETE 	  dst_record_line (last_line, last_pc);
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_ln4_pc4:
+// OBSOLETE 	  /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
+// OBSOLETE 	  last_line = *(unsigned long *) (*buffer + 1);
+// OBSOLETE 	  last_pc = *(unsigned long *) (*buffer + 5);
+// OBSOLETE 	  size = 9;
+// OBSOLETE 	  dst_record_line (last_line, last_pc);
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_dln1_dpc0:
+// OBSOLETE 	  /* 1 byte line delta, pc delta = 0 */
+// OBSOLETE 	  size = 2;
+// OBSOLETE 	  last_line += (*buffer)[1];
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_ln_off_1:
+// OBSOLETE 	  /* statement escape, stmt # = 1 (2nd stmt on line) */
+// OBSOLETE 	  size = 1;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_ln_off:
+// OBSOLETE 	  /* statement escape, stmt # = next byte */
+// OBSOLETE 	  size = 2;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_entry:
+// OBSOLETE 	  /* entry escape, next byte is entry number */
+// OBSOLETE 	  size = 2;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_exit:
+// OBSOLETE 	  /* exit escape */
+// OBSOLETE 	  size = 1;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_stmt_end:
+// OBSOLETE 	  /* gap escape, 4 bytes pc delta */
+// OBSOLETE 	  size = 5;
+// OBSOLETE 	  /* last_pc += 2 * (*(long *) (*buffer + 1)); */
+// OBSOLETE 	  /* Apparently this isn't supposed to actually modify
+// OBSOLETE 	   * the pc value. Totally weird.
+// OBSOLETE 	   */
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_escape_11:
+// OBSOLETE 	case dst_ln_escape_12:
+// OBSOLETE 	case dst_ln_escape_13:
+// OBSOLETE 	  size = 1;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_nxt_byte:
+// OBSOLETE 	  /* This shouldn't happen. If it does, we're SOL */
+// OBSOLETE 	  return 0;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ln_end:
+// OBSOLETE 	  /* end escape, final entry follows */
+// OBSOLETE 	  return 0;
+// OBSOLETE 	}
+// OBSOLETE       *buffer += (size < 0) ? -size : size;
+// OBSOLETE       entry = (dst_ln_entry_ptr_t) * buffer;
+// OBSOLETE     }
+// OBSOLETE   last_line += dst_ln_ln_delta (*entry);
+// OBSOLETE   last_pc += entry->delta.pc_delta * 2;
+// OBSOLETE   (*buffer)++;
+// OBSOLETE   dst_record_line (last_line, last_pc);
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE enter_all_lines (char *buffer, long address)
+// OBSOLETE {
+// OBSOLETE   if (buffer)
+// OBSOLETE     while (get_dst_line (&buffer, &address));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE get_dst_entry (char *buffer, dst_rec_ptr_t *ret_entry)
+// OBSOLETE {
+// OBSOLETE   int size;
+// OBSOLETE   dst_rec_ptr_t entry;
+// OBSOLETE   static int last_type;
+// OBSOLETE   int ar_size;
+// OBSOLETE   static unsigned lu3;
+// OBSOLETE 
+// OBSOLETE   entry = (dst_rec_ptr_t) buffer;
+// OBSOLETE   switch (entry->rec_type)
+// OBSOLETE     {
+// OBSOLETE     case dst_typ_pad:
+// OBSOLETE       size = 0;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_comp_unit:
+// OBSOLETE       size = sizeof (DST_comp_unit (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_section_tab:
+// OBSOLETE       size = sizeof (DST_section_tab (entry))
+// OBSOLETE 	+ ((int) DST_section_tab (entry).number_of_sections
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (long);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_file_tab:
+// OBSOLETE       size = sizeof (DST_file_tab (entry))
+// OBSOLETE 	+ ((int) DST_file_tab (entry).number_of_files
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_file_desc_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_block:
+// OBSOLETE       size = sizeof (DST_block (entry))
+// OBSOLETE 	+ ((int) DST_block (entry).n_of_code_ranges
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_code_range_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_5:
+// OBSOLETE       size = -1;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_var:
+// OBSOLETE       size = sizeof (DST_var (entry)) -
+// OBSOLETE 	sizeof (dst_var_loc_long_t) * dst_dummy_array_size +
+// OBSOLETE 	DST_var (entry).no_of_locs *
+// OBSOLETE 	(DST_var (entry).short_locs ?
+// OBSOLETE 	 sizeof (dst_var_loc_short_t) :
+// OBSOLETE 	 sizeof (dst_var_loc_long_t));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_pointer:
+// OBSOLETE       size = sizeof (DST_pointer (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_array:
+// OBSOLETE       size = sizeof (DST_array (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_subrange:
+// OBSOLETE       size = sizeof (DST_subrange (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_set:
+// OBSOLETE       size = sizeof (DST_set (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_implicit_enum:
+// OBSOLETE       size = sizeof (DST_implicit_enum (entry))
+// OBSOLETE 	+ ((int) DST_implicit_enum (entry).nelems
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_explicit_enum:
+// OBSOLETE       size = sizeof (DST_explicit_enum (entry))
+// OBSOLETE 	+ ((int) DST_explicit_enum (entry).nelems
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_enum_elem_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_short_rec:
+// OBSOLETE       size = sizeof (DST_short_rec (entry))
+// OBSOLETE 	+ DST_short_rec (entry).nfields * sizeof (dst_short_field_t)
+// OBSOLETE 	- dst_dummy_array_size * sizeof (dst_field_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_short_union:
+// OBSOLETE       size = sizeof (DST_short_union (entry))
+// OBSOLETE 	+ DST_short_union (entry).nfields * sizeof (dst_short_field_t)
+// OBSOLETE 	- dst_dummy_array_size * sizeof (dst_field_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_file:
+// OBSOLETE       size = sizeof (DST_file (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_offset:
+// OBSOLETE       size = sizeof (DST_offset (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_alias:
+// OBSOLETE       size = sizeof (DST_alias (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_signature:
+// OBSOLETE       size = sizeof (DST_signature (entry)) +
+// OBSOLETE 	((int) DST_signature (entry).nargs -
+// OBSOLETE 	 dst_dummy_array_size) * sizeof (dst_arg_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_21:
+// OBSOLETE       size = -1;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_old_label:
+// OBSOLETE       size = sizeof (DST_old_label (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_scope:
+// OBSOLETE       size = sizeof (DST_scope (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_end_scope:
+// OBSOLETE       size = 0;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_25:
+// OBSOLETE     case dst_typ_26:
+// OBSOLETE       size = -1;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_string_tab:
+// OBSOLETE     case dst_typ_global_name_tab:
+// OBSOLETE       size = sizeof (DST_string_tab (entry))
+// OBSOLETE 	+ DST_string_tab (entry).length
+// OBSOLETE 	- dst_dummy_array_size;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_forward:
+// OBSOLETE       size = sizeof (DST_forward (entry));
+// OBSOLETE       get_dst_entry ((char *) entry + DST_forward (entry).rec_off, &entry);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_size:
+// OBSOLETE       size = sizeof (DST_aux_size (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_align:
+// OBSOLETE       size = sizeof (DST_aux_align (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_field_size:
+// OBSOLETE       size = sizeof (DST_aux_field_size (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_field_off:
+// OBSOLETE       size = sizeof (DST_aux_field_off (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_field_align:
+// OBSOLETE       size = sizeof (DST_aux_field_align (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_qual:
+// OBSOLETE       size = sizeof (DST_aux_qual (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_var_bound:
+// OBSOLETE       size = sizeof (DST_aux_var_bound (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_extension:
+// OBSOLETE       size = DST_extension (entry).rec_size;
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_string:
+// OBSOLETE       size = sizeof (DST_string (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_old_entry:
+// OBSOLETE       size = 48;		/* Obsolete entry type */
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_const:
+// OBSOLETE       size = sizeof (DST_const (entry))
+// OBSOLETE 	+ DST_const (entry).value.length
+// OBSOLETE 	- sizeof (DST_const (entry).value.val);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_reference:
+// OBSOLETE       size = sizeof (DST_reference (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_old_record:
+// OBSOLETE     case dst_typ_old_union:
+// OBSOLETE     case dst_typ_record:
+// OBSOLETE     case dst_typ_union:
+// OBSOLETE       size = sizeof (DST_record (entry))
+// OBSOLETE 	+ ((int) DST_record (entry).nfields
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_field_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_type_deriv:
+// OBSOLETE       size = sizeof (DST_aux_type_deriv (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_locpool:
+// OBSOLETE       size = sizeof (DST_locpool (entry))
+// OBSOLETE 	+ ((int) DST_locpool (entry).length -
+// OBSOLETE 	   dst_dummy_array_size);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_variable:
+// OBSOLETE       size = sizeof (DST_variable (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_label:
+// OBSOLETE       size = sizeof (DST_label (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_entry:
+// OBSOLETE       size = sizeof (DST_entry (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_lifetime:
+// OBSOLETE       size = sizeof (DST_aux_lifetime (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_ptr_base:
+// OBSOLETE       size = sizeof (DST_aux_ptr_base (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_src_range:
+// OBSOLETE       size = sizeof (DST_aux_src_range (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_reg_val:
+// OBSOLETE       size = sizeof (DST_aux_reg_val (entry));
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_unit_names:
+// OBSOLETE       size = sizeof (DST_aux_unit_names (entry))
+// OBSOLETE 	+ ((int) DST_aux_unit_names (entry).number_of_names
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_rel_offset_t);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_aux_sect_info:
+// OBSOLETE       size = sizeof (DST_aux_sect_info (entry))
+// OBSOLETE 	+ ((int) DST_aux_sect_info (entry).number_of_refs
+// OBSOLETE 	   - dst_dummy_array_size) * sizeof (dst_sect_ref_t);
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       size = -1;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   if (size == -1)
+// OBSOLETE     {
+// OBSOLETE       fprintf_unfiltered (gdb_stderr, "Warning: unexpected DST entry type (%d) found\nLast valid entry was of type: %d\n",
+// OBSOLETE 			  (int) entry->rec_type,
+// OBSOLETE 			  last_type);
+// OBSOLETE       fprintf_unfiltered (gdb_stderr, "Last unknown_3 value: %d\n", lu3);
+// OBSOLETE       size = 0;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     last_type = entry->rec_type;
+// OBSOLETE   if (size & 1)			/* Align on a word boundary */
+// OBSOLETE     size++;
+// OBSOLETE   size += 2;
+// OBSOLETE   *ret_entry = entry;
+// OBSOLETE   return size;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE next_dst_entry (char **buffer, dst_rec_ptr_t *entry, dst_sec *table)
+// OBSOLETE {
+// OBSOLETE   if (*buffer - table->buffer >= table->size)
+// OBSOLETE     {
+// OBSOLETE       *entry = NULL;
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE   *buffer += get_dst_entry (*buffer, entry);
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #define NEXT_BLK(a, b) next_dst_entry(a, b, &blocks_info)
+// OBSOLETE #define NEXT_SYM(a, b) next_dst_entry(a, b, &symbols_info)
+// OBSOLETE #define	DST_OFFSET(a, b) ((char *) (a) + (b))
+// OBSOLETE 
+// OBSOLETE static dst_rec_ptr_t section_table = NULL;
+// OBSOLETE 
+// OBSOLETE char *
+// OBSOLETE get_sec_ref (dst_sect_ref_t *ref)
+// OBSOLETE {
+// OBSOLETE   dst_sec *section = NULL;
+// OBSOLETE   long offset;
+// OBSOLETE 
+// OBSOLETE   if (!section_table || !ref->sect_index)
+// OBSOLETE     return NULL;
+// OBSOLETE   offset = DST_section_tab (section_table).section_base[ref->sect_index - 1]
+// OBSOLETE     + ref->sect_offset;
+// OBSOLETE   if (offset >= blocks_info.base &&
+// OBSOLETE       offset < blocks_info.base + blocks_info.size)
+// OBSOLETE     section = &blocks_info;
+// OBSOLETE   else if (offset >= symbols_info.base &&
+// OBSOLETE 	   offset < symbols_info.base + symbols_info.size)
+// OBSOLETE     section = &symbols_info;
+// OBSOLETE   else if (offset >= lines_info.base &&
+// OBSOLETE 	   offset < lines_info.base + lines_info.size)
+// OBSOLETE     section = &lines_info;
+// OBSOLETE   if (!section)
+// OBSOLETE     return NULL;
+// OBSOLETE   return section->buffer + (offset - section->base);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE dst_get_addr (int section, long offset)
+// OBSOLETE {
+// OBSOLETE   if (!section_table || !section)
+// OBSOLETE     return 0;
+// OBSOLETE   return DST_section_tab (section_table).section_base[section - 1] + offset;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE dst_sym_addr (dst_sect_ref_t *ref)
+// OBSOLETE {
+// OBSOLETE   if (!section_table || !ref->sect_index)
+// OBSOLETE     return 0;
+// OBSOLETE   return DST_section_tab (section_table).section_base[ref->sect_index - 1]
+// OBSOLETE     + ref->sect_offset;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct symbol *
+// OBSOLETE create_new_symbol (struct objfile *objfile, char *name)
+// OBSOLETE {
+// OBSOLETE   struct symbol *sym = (struct symbol *)
+// OBSOLETE   obstack_alloc (&objfile->symbol_obstack, sizeof (struct symbol));
+// OBSOLETE   memset (sym, 0, sizeof (struct symbol));
+// OBSOLETE   SYMBOL_NAME (sym) = obsavestring (name, strlen (name),
+// OBSOLETE 				    &objfile->symbol_obstack);
+// OBSOLETE   SYMBOL_VALUE (sym) = 0;
+// OBSOLETE   SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
+// OBSOLETE 
+// OBSOLETE   SYMBOL_CLASS (sym) = LOC_BLOCK;
+// OBSOLETE   return sym;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static struct type *decode_dst_type (struct objfile *, dst_rec_ptr_t);
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE decode_type_desc (struct objfile *objfile, dst_type_t *type_desc,
+// OBSOLETE 		  dst_rec_ptr_t base)
+// OBSOLETE {
+// OBSOLETE   struct type *type;
+// OBSOLETE   dst_rec_ptr_t entry;
+// OBSOLETE   if (type_desc->std_type.user_defined_type)
+// OBSOLETE     {
+// OBSOLETE       entry = (dst_rec_ptr_t) DST_OFFSET (base,
+// OBSOLETE 					  dst_user_type_offset (*type_desc));
+// OBSOLETE       type = decode_dst_type (objfile, entry);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       switch (type_desc->std_type.dtc)
+// OBSOLETE 	{
+// OBSOLETE 	case dst_int8_type:
+// OBSOLETE 	  type = builtin_type_signed_char;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_int16_type:
+// OBSOLETE 	  type = builtin_type_short;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_int32_type:
+// OBSOLETE 	  type = builtin_type_long;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_uint8_type:
+// OBSOLETE 	  type = builtin_type_unsigned_char;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_uint16_type:
+// OBSOLETE 	  type = builtin_type_unsigned_short;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_uint32_type:
+// OBSOLETE 	  type = builtin_type_unsigned_long;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_real32_type:
+// OBSOLETE 	  type = builtin_type_float;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_real64_type:
+// OBSOLETE 	  type = builtin_type_double;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_complex_type:
+// OBSOLETE 	  type = builtin_type_complex;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_dcomplex_type:
+// OBSOLETE 	  type = builtin_type_double_complex;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_bool8_type:
+// OBSOLETE 	  type = builtin_type_char;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_bool16_type:
+// OBSOLETE 	  type = builtin_type_short;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_bool32_type:
+// OBSOLETE 	  type = builtin_type_long;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_char_type:
+// OBSOLETE 	  type = builtin_type_char;
+// OBSOLETE 	  break;
+// OBSOLETE 	  /* The next few are more complex. I will take care
+// OBSOLETE 	   * of them properly at a later point.
+// OBSOLETE 	   */
+// OBSOLETE 	case dst_string_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_ptr_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_set_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_proc_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_func_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	  /* Back tto some ordinary ones */
+// OBSOLETE 	case dst_void_type:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_uchar_type:
+// OBSOLETE 	  type = builtin_type_unsigned_char;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  type = builtin_type_void;
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   return type;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE struct structure_list
+// OBSOLETE {
+// OBSOLETE   struct structure_list *next;
+// OBSOLETE   struct type *type;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static struct structure_list *struct_list = NULL;
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE find_dst_structure (char *name)
+// OBSOLETE {
+// OBSOLETE   struct structure_list *element;
+// OBSOLETE 
+// OBSOLETE   for (element = struct_list; element; element = element->next)
+// OBSOLETE     if (!strcmp (name, TYPE_NAME (element->type)))
+// OBSOLETE       return element->type;
+// OBSOLETE   return NULL;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
+// OBSOLETE 		      int version)
+// OBSOLETE {
+// OBSOLETE   struct type *type, *child_type;
+// OBSOLETE   char *struct_name;
+// OBSOLETE   char *name, *field_name;
+// OBSOLETE   int i;
+// OBSOLETE   int fieldoffset, fieldsize;
+// OBSOLETE   dst_type_t type_desc;
+// OBSOLETE   struct structure_list *element;
+// OBSOLETE 
+// OBSOLETE   struct_name = DST_OFFSET (entry, DST_record (entry).noffset);
+// OBSOLETE   name = concat ((code == TYPE_CODE_UNION) ? "union " : "struct ",
+// OBSOLETE 		 struct_name, NULL);
+// OBSOLETE   type = find_dst_structure (name);
+// OBSOLETE   if (type)
+// OBSOLETE     {
+// OBSOLETE       xfree (name);
+// OBSOLETE       return type;
+// OBSOLETE     }
+// OBSOLETE   type = alloc_type (objfile);
+// OBSOLETE   TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
+// OBSOLETE 				    name, strlen (name));
+// OBSOLETE   xfree (name);
+// OBSOLETE   TYPE_CODE (type) = code;
+// OBSOLETE   TYPE_LENGTH (type) = DST_record (entry).size;
+// OBSOLETE   TYPE_NFIELDS (type) = DST_record (entry).nfields;
+// OBSOLETE   TYPE_FIELDS (type) = (struct field *)
+// OBSOLETE     obstack_alloc (&objfile->symbol_obstack, sizeof (struct field) *
+// OBSOLETE 		   DST_record (entry).nfields);
+// OBSOLETE   fieldoffset = fieldsize = 0;
+// OBSOLETE   INIT_CPLUS_SPECIFIC (type);
+// OBSOLETE   element = (struct structure_list *)
+// OBSOLETE     xmalloc (sizeof (struct structure_list));
+// OBSOLETE   element->type = type;
+// OBSOLETE   element->next = struct_list;
+// OBSOLETE   struct_list = element;
+// OBSOLETE   for (i = 0; i < DST_record (entry).nfields; i++)
+// OBSOLETE     {
+// OBSOLETE       switch (version)
+// OBSOLETE 	{
+// OBSOLETE 	case 2:
+// OBSOLETE 	  field_name = DST_OFFSET (entry,
+// OBSOLETE 				   DST_record (entry).f.ofields[i].noffset);
+// OBSOLETE 	  fieldoffset = DST_record (entry).f.ofields[i].foffset * 8 +
+// OBSOLETE 	    DST_record (entry).f.ofields[i].bit_offset;
+// OBSOLETE 	  fieldsize = DST_record (entry).f.ofields[i].size;
+// OBSOLETE 	  type_desc = DST_record (entry).f.ofields[i].type_desc;
+// OBSOLETE 	  break;
+// OBSOLETE 	case 1:
+// OBSOLETE 	  field_name = DST_OFFSET (entry,
+// OBSOLETE 				   DST_record (entry).f.fields[i].noffset);
+// OBSOLETE 	  type_desc = DST_record (entry).f.fields[i].type_desc;
+// OBSOLETE 	  switch (DST_record (entry).f.fields[i].f.field_loc.format_tag)
+// OBSOLETE 	    {
+// OBSOLETE 	    case dst_field_byte:
+// OBSOLETE 	      fieldoffset = DST_record (entry).f.
+// OBSOLETE 		fields[i].f.field_byte.offset * 8;
+// OBSOLETE 	      fieldsize = -1;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_field_bit:
+// OBSOLETE 	      fieldoffset = DST_record (entry).f.
+// OBSOLETE 		fields[i].f.field_bit.byte_offset * 8 +
+// OBSOLETE 		DST_record (entry).f.
+// OBSOLETE 		fields[i].f.field_bit.bit_offset;
+// OBSOLETE 	      fieldsize = DST_record (entry).f.
+// OBSOLETE 		fields[i].f.field_bit.nbits;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_field_loc:
+// OBSOLETE 	      fieldoffset += fieldsize;
+// OBSOLETE 	      fieldsize = -1;
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	  break;
+// OBSOLETE 	case 0:
+// OBSOLETE 	  field_name = DST_OFFSET (entry,
+// OBSOLETE 				   DST_record (entry).f.sfields[i].noffset);
+// OBSOLETE 	  fieldoffset = DST_record (entry).f.sfields[i].foffset;
+// OBSOLETE 	  type_desc = DST_record (entry).f.sfields[i].type_desc;
+// OBSOLETE 	  if (i < DST_record (entry).nfields - 1)
+// OBSOLETE 	    fieldsize = DST_record (entry).f.sfields[i + 1].foffset;
+// OBSOLETE 	  else
+// OBSOLETE 	    fieldsize = DST_record (entry).size;
+// OBSOLETE 	  fieldsize -= fieldoffset;
+// OBSOLETE 	  fieldoffset *= 8;
+// OBSOLETE 	  fieldsize *= 8;
+// OBSOLETE 	}
+// OBSOLETE       TYPE_FIELDS (type)[i].name =
+// OBSOLETE 	obstack_copy0 (&objfile->symbol_obstack,
+// OBSOLETE 		       field_name, strlen (field_name));
+// OBSOLETE       TYPE_FIELDS (type)[i].type = decode_type_desc (objfile,
+// OBSOLETE 						     &type_desc,
+// OBSOLETE 						     entry);
+// OBSOLETE       if (fieldsize == -1)
+// OBSOLETE 	fieldsize = TYPE_LENGTH (TYPE_FIELDS (type)[i].type) *
+// OBSOLETE 	  8;
+// OBSOLETE       TYPE_FIELDS (type)[i].bitsize = fieldsize;
+// OBSOLETE       TYPE_FIELDS (type)[i].bitpos = fieldoffset;
+// OBSOLETE     }
+// OBSOLETE   return type;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct type *
+// OBSOLETE decode_dst_type (struct objfile *objfile, dst_rec_ptr_t entry)
+// OBSOLETE {
+// OBSOLETE   struct type *child_type, *type, *range_type, *index_type;
+// OBSOLETE 
+// OBSOLETE   switch (entry->rec_type)
+// OBSOLETE     {
+// OBSOLETE     case dst_typ_var:
+// OBSOLETE       return decode_type_desc (objfile,
+// OBSOLETE 			       &DST_var (entry).type_desc,
+// OBSOLETE 			       entry);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_variable:
+// OBSOLETE       return decode_type_desc (objfile,
+// OBSOLETE 			       &DST_variable (entry).type_desc,
+// OBSOLETE 			       entry);
+// OBSOLETE       break;
+// OBSOLETE     case dst_typ_short_rec:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 0);
+// OBSOLETE     case dst_typ_short_union:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 0);
+// OBSOLETE     case dst_typ_union:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 1);
+// OBSOLETE     case dst_typ_record:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 1);
+// OBSOLETE     case dst_typ_old_union:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_UNION, 2);
+// OBSOLETE     case dst_typ_old_record:
+// OBSOLETE       return decode_dst_structure (objfile, entry, TYPE_CODE_STRUCT, 2);
+// OBSOLETE     case dst_typ_pointer:
+// OBSOLETE       return make_pointer_type (
+// OBSOLETE 				 decode_type_desc (objfile,
+// OBSOLETE 					     &DST_pointer (entry).type_desc,
+// OBSOLETE 						   entry),
+// OBSOLETE 				 NULL);
+// OBSOLETE     case dst_typ_array:
+// OBSOLETE       child_type = decode_type_desc (objfile,
+// OBSOLETE 				     &DST_pointer (entry).type_desc,
+// OBSOLETE 				     entry);
+// OBSOLETE       index_type = lookup_fundamental_type (objfile,
+// OBSOLETE 					    FT_INTEGER);
+// OBSOLETE       range_type = create_range_type ((struct type *) NULL,
+// OBSOLETE 				      index_type, DST_array (entry).lo_bound,
+// OBSOLETE 				      DST_array (entry).hi_bound);
+// OBSOLETE       return create_array_type ((struct type *) NULL, child_type,
+// OBSOLETE 				range_type);
+// OBSOLETE     case dst_typ_alias:
+// OBSOLETE       return decode_type_desc (objfile,
+// OBSOLETE 			       &DST_alias (entry).type_desc,
+// OBSOLETE 			       entry);
+// OBSOLETE     default:
+// OBSOLETE       return builtin_type_int;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE struct symbol_list
+// OBSOLETE {
+// OBSOLETE   struct symbol_list *next;
+// OBSOLETE   struct symbol *symbol;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static struct symbol_list *dst_global_symbols = NULL;
+// OBSOLETE static int total_globals = 0;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE decode_dst_locstring (char *locstr, struct symbol *sym)
+// OBSOLETE {
+// OBSOLETE   dst_loc_entry_t *entry, *next_entry;
+// OBSOLETE   CORE_ADDR temp;
+// OBSOLETE   int count = 0;
+// OBSOLETE 
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       if (count++ == 100)
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_unfiltered (gdb_stderr, "Error reading locstring\n");
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       entry = (dst_loc_entry_t *) locstr;
+// OBSOLETE       next_entry = (dst_loc_entry_t *) (locstr + 1);
+// OBSOLETE       switch (entry->header.code)
+// OBSOLETE 	{
+// OBSOLETE 	case dst_lsc_end:	/* End of string */
+// OBSOLETE 	  return;
+// OBSOLETE 	case dst_lsc_indirect:	/* Indirect through previous. Arg == 6 */
+// OBSOLETE 	  /* Or register ax x == arg */
+// OBSOLETE 	  if (entry->header.arg < 6)
+// OBSOLETE 	    {
+// OBSOLETE 	      SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE 	      SYMBOL_VALUE (sym) = entry->header.arg + 8;
+// OBSOLETE 	    }
+// OBSOLETE 	  /* We predict indirects */
+// OBSOLETE 	  locstr++;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_dreg:
+// OBSOLETE 	  SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE 	  SYMBOL_VALUE (sym) = entry->header.arg;
+// OBSOLETE 	  locstr++;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_section:	/* Section (arg+1) */
+// OBSOLETE 	  SYMBOL_VALUE (sym) = dst_get_addr (entry->header.arg + 1, 0);
+// OBSOLETE 	  locstr++;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_sec_byte:	/* Section (next_byte+1) */
+// OBSOLETE 	  SYMBOL_VALUE (sym) = dst_get_addr (locstr[1] + 1, 0);
+// OBSOLETE 	  locstr += 2;
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_add:	/* Add (arg+1)*2 */
+// OBSOLETE 	case dst_lsc_sub:	/* Subtract (arg+1)*2 */
+// OBSOLETE 	  temp = (entry->header.arg + 1) * 2;
+// OBSOLETE 	  locstr++;
+// OBSOLETE 	  if (*locstr == dst_multiply_256)
+// OBSOLETE 	    {
+// OBSOLETE 	      temp <<= 8;
+// OBSOLETE 	      locstr++;
+// OBSOLETE 	    }
+// OBSOLETE 	  switch (entry->header.code)
+// OBSOLETE 	    {
+// OBSOLETE 	    case dst_lsc_add:
+// OBSOLETE 	      if (SYMBOL_CLASS (sym) == LOC_LOCAL)
+// OBSOLETE 		SYMBOL_CLASS (sym) = LOC_ARG;
+// OBSOLETE 	      SYMBOL_VALUE (sym) += temp;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_lsc_sub:
+// OBSOLETE 	      SYMBOL_VALUE (sym) -= temp;
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_add_byte:
+// OBSOLETE 	case dst_lsc_sub_byte:
+// OBSOLETE 	  switch (entry->header.arg & 0x03)
+// OBSOLETE 	    {
+// OBSOLETE 	    case 1:
+// OBSOLETE 	      temp = (unsigned char) locstr[1];
+// OBSOLETE 	      locstr += 2;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case 2:
+// OBSOLETE 	      temp = *(unsigned short *) (locstr + 1);
+// OBSOLETE 	      locstr += 3;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case 3:
+// OBSOLETE 	      temp = *(unsigned long *) (locstr + 1);
+// OBSOLETE 	      locstr += 5;
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	  if (*locstr == dst_multiply_256)
+// OBSOLETE 	    {
+// OBSOLETE 	      temp <<= 8;
+// OBSOLETE 	      locstr++;
+// OBSOLETE 	    }
+// OBSOLETE 	  switch (entry->header.code)
+// OBSOLETE 	    {
+// OBSOLETE 	    case dst_lsc_add_byte:
+// OBSOLETE 	      if (SYMBOL_CLASS (sym) == LOC_LOCAL)
+// OBSOLETE 		SYMBOL_CLASS (sym) = LOC_ARG;
+// OBSOLETE 	      SYMBOL_VALUE (sym) += temp;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_lsc_sub_byte:
+// OBSOLETE 	      SYMBOL_VALUE (sym) -= temp;
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_lsc_sbreg:	/* Stack base register (frame pointer). Arg==0 */
+// OBSOLETE 	  if (next_entry->header.code != dst_lsc_indirect)
+// OBSOLETE 	    {
+// OBSOLETE 	      SYMBOL_VALUE (sym) = 0;
+// OBSOLETE 	      SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE 	      return;
+// OBSOLETE 	    }
+// OBSOLETE 	  SYMBOL_VALUE (sym) = 0;
+// OBSOLETE 	  SYMBOL_CLASS (sym) = LOC_LOCAL;
+// OBSOLETE 	  locstr++;
+// OBSOLETE 	  break;
+// OBSOLETE 	default:
+// OBSOLETE 	  SYMBOL_VALUE (sym) = 0;
+// OBSOLETE 	  SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct symbol_list *
+// OBSOLETE process_dst_symbols (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+// OBSOLETE 		     int *nsyms_ret)
+// OBSOLETE {
+// OBSOLETE   struct symbol_list *list = NULL, *element;
+// OBSOLETE   struct symbol *sym;
+// OBSOLETE   char *symname;
+// OBSOLETE   int nsyms = 0;
+// OBSOLETE   char *location;
+// OBSOLETE   long line;
+// OBSOLETE   dst_type_t symtype;
+// OBSOLETE   struct type *type;
+// OBSOLETE   dst_var_attr_t attr;
+// OBSOLETE   dst_var_loc_t loc_type;
+// OBSOLETE   unsigned loc_index;
+// OBSOLETE   long loc_value;
+// OBSOLETE 
+// OBSOLETE   if (!entry)
+// OBSOLETE     {
+// OBSOLETE       *nsyms_ret = 0;
+// OBSOLETE       return NULL;
+// OBSOLETE     }
+// OBSOLETE   location = (char *) entry;
+// OBSOLETE   while (NEXT_SYM (&location, &entry) &&
+// OBSOLETE 	 entry->rec_type != dst_typ_end_scope)
+// OBSOLETE     {
+// OBSOLETE       if (entry->rec_type == dst_typ_var)
+// OBSOLETE 	{
+// OBSOLETE 	  if (DST_var (entry).short_locs)
+// OBSOLETE 	    {
+// OBSOLETE 	      loc_type = DST_var (entry).locs.shorts[0].loc_type;
+// OBSOLETE 	      loc_index = DST_var (entry).locs.shorts[0].loc_index;
+// OBSOLETE 	      loc_value = DST_var (entry).locs.shorts[0].location;
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      loc_type = DST_var (entry).locs.longs[0].loc_type;
+// OBSOLETE 	      loc_index = DST_var (entry).locs.longs[0].loc_index;
+// OBSOLETE 	      loc_value = DST_var (entry).locs.longs[0].location;
+// OBSOLETE 	    }
+// OBSOLETE 	  if (loc_type == dst_var_loc_external)
+// OBSOLETE 	    continue;
+// OBSOLETE 	  symname = DST_OFFSET (entry, DST_var (entry).noffset);
+// OBSOLETE 	  line = DST_var (entry).src_loc.line_number;
+// OBSOLETE 	  symtype = DST_var (entry).type_desc;
+// OBSOLETE 	  attr = DST_var (entry).attributes;
+// OBSOLETE 	}
+// OBSOLETE       else if (entry->rec_type == dst_typ_variable)
+// OBSOLETE 	{
+// OBSOLETE 	  symname = DST_OFFSET (entry,
+// OBSOLETE 				DST_variable (entry).noffset);
+// OBSOLETE 	  line = DST_variable (entry).src_loc.line_number;
+// OBSOLETE 	  symtype = DST_variable (entry).type_desc;
+// OBSOLETE 	  attr = DST_variable (entry).attributes;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  continue;
+// OBSOLETE 	}
+// OBSOLETE       if (symname && name && !strcmp (symname, name))
+// OBSOLETE 	/* It's the function return value */
+// OBSOLETE 	continue;
+// OBSOLETE       sym = create_new_symbol (objfile, symname);
+// OBSOLETE 
+// OBSOLETE       if ((attr & (1 << dst_var_attr_global)) ||
+// OBSOLETE 	  (attr & (1 << dst_var_attr_static)))
+// OBSOLETE 	SYMBOL_CLASS (sym) = LOC_STATIC;
+// OBSOLETE       else
+// OBSOLETE 	SYMBOL_CLASS (sym) = LOC_LOCAL;
+// OBSOLETE       SYMBOL_LINE (sym) = line;
+// OBSOLETE       SYMBOL_TYPE (sym) = decode_type_desc (objfile, &symtype,
+// OBSOLETE 					    entry);
+// OBSOLETE       SYMBOL_VALUE (sym) = 0;
+// OBSOLETE       switch (entry->rec_type)
+// OBSOLETE 	{
+// OBSOLETE 	case dst_typ_var:
+// OBSOLETE 	  switch (loc_type)
+// OBSOLETE 	    {
+// OBSOLETE 	    case dst_var_loc_abs:
+// OBSOLETE 	      SYMBOL_VALUE_ADDRESS (sym) = loc_value;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_var_loc_sect_off:
+// OBSOLETE 	    case dst_var_loc_ind_sect_off:	/* What is this? */
+// OBSOLETE 	      SYMBOL_VALUE_ADDRESS (sym) = dst_get_addr (
+// OBSOLETE 							  loc_index,
+// OBSOLETE 							  loc_value);
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_var_loc_ind_reg_rel:	/* What is this? */
+// OBSOLETE 	    case dst_var_loc_reg_rel:
+// OBSOLETE 	      /* If it isn't fp relative, specify the
+// OBSOLETE 	       * register it's relative to.
+// OBSOLETE 	       */
+// OBSOLETE 	      if (loc_index)
+// OBSOLETE 		{
+// OBSOLETE 		  sym->aux_value.basereg = loc_index;
+// OBSOLETE 		}
+// OBSOLETE 	      SYMBOL_VALUE (sym) = loc_value;
+// OBSOLETE 	      if (loc_value > 0 &&
+// OBSOLETE 		  SYMBOL_CLASS (sym) == LOC_BASEREG)
+// OBSOLETE 		SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case dst_var_loc_reg:
+// OBSOLETE 	      SYMBOL_VALUE (sym) = loc_index;
+// OBSOLETE 	      SYMBOL_CLASS (sym) = LOC_REGISTER;
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	  break;
+// OBSOLETE 	case dst_typ_variable:
+// OBSOLETE 	  /* External variable..... don't try to interpret
+// OBSOLETE 	   * its nonexistant locstring.
+// OBSOLETE 	   */
+// OBSOLETE 	  if (DST_variable (entry).loffset == -1)
+// OBSOLETE 	    continue;
+// OBSOLETE 	  decode_dst_locstring (DST_OFFSET (entry,
+// OBSOLETE 					    DST_variable (entry).loffset),
+// OBSOLETE 				sym);
+// OBSOLETE 	}
+// OBSOLETE       element = (struct symbol_list *)
+// OBSOLETE 	xmalloc (sizeof (struct symbol_list));
+// OBSOLETE 
+// OBSOLETE       if (attr & (1 << dst_var_attr_global))
+// OBSOLETE 	{
+// OBSOLETE 	  element->next = dst_global_symbols;
+// OBSOLETE 	  dst_global_symbols = element;
+// OBSOLETE 	  total_globals++;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  element->next = list;
+// OBSOLETE 	  list = element;
+// OBSOLETE 	  nsyms++;
+// OBSOLETE 	}
+// OBSOLETE       element->symbol = sym;
+// OBSOLETE     }
+// OBSOLETE   *nsyms_ret = nsyms;
+// OBSOLETE   return list;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE static struct symbol *
+// OBSOLETE process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
+// OBSOLETE 		      CORE_ADDR address)
+// OBSOLETE {
+// OBSOLETE   struct symbol *sym;
+// OBSOLETE   struct type *type, *ftype;
+// OBSOLETE   dst_rec_ptr_t sym_entry, typ_entry;
+// OBSOLETE   char *location;
+// OBSOLETE   struct symbol_list *element;
+// OBSOLETE 
+// OBSOLETE   type = builtin_type_int;
+// OBSOLETE   sym = create_new_symbol (objfile, name);
+// OBSOLETE   SYMBOL_CLASS (sym) = LOC_BLOCK;
+// OBSOLETE 
+// OBSOLETE   if (entry)
+// OBSOLETE     {
+// OBSOLETE       location = (char *) entry;
+// OBSOLETE       do
+// OBSOLETE 	{
+// OBSOLETE 	  NEXT_SYM (&location, &sym_entry);
+// OBSOLETE 	}
+// OBSOLETE       while (sym_entry && sym_entry->rec_type != dst_typ_signature);
+// OBSOLETE 
+// OBSOLETE       if (sym_entry)
+// OBSOLETE 	{
+// OBSOLETE 	  SYMBOL_LINE (sym) =
+// OBSOLETE 	    DST_signature (sym_entry).src_loc.line_number;
+// OBSOLETE 	  if (DST_signature (sym_entry).result)
+// OBSOLETE 	    {
+// OBSOLETE 	      typ_entry = (dst_rec_ptr_t)
+// OBSOLETE 		DST_OFFSET (sym_entry,
+// OBSOLETE 			    DST_signature (sym_entry).result);
+// OBSOLETE 	      type = decode_dst_type (objfile, typ_entry);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (!type->function_type)
+// OBSOLETE     {
+// OBSOLETE       ftype = alloc_type (objfile);
+// OBSOLETE       type->function_type = ftype;
+// OBSOLETE       TYPE_TARGET_TYPE (ftype) = type;
+// OBSOLETE       TYPE_CODE (ftype) = TYPE_CODE_FUNC;
+// OBSOLETE     }
+// OBSOLETE   SYMBOL_TYPE (sym) = type->function_type;
+// OBSOLETE 
+// OBSOLETE   /* Now add ourselves to the global symbols list */
+// OBSOLETE   element = (struct symbol_list *)
+// OBSOLETE     xmalloc (sizeof (struct symbol_list));
+// OBSOLETE 
+// OBSOLETE   element->next = dst_global_symbols;
+// OBSOLETE   dst_global_symbols = element;
+// OBSOLETE   total_globals++;
+// OBSOLETE   element->symbol = sym;
+// OBSOLETE 
+// OBSOLETE   return sym;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct block *
+// OBSOLETE process_dst_block (struct objfile *objfile, dst_rec_ptr_t entry)
+// OBSOLETE {
+// OBSOLETE   struct block *block;
+// OBSOLETE   struct symbol *function = NULL;
+// OBSOLETE   CORE_ADDR address;
+// OBSOLETE   long size;
+// OBSOLETE   char *name;
+// OBSOLETE   dst_rec_ptr_t child_entry, symbol_entry;
+// OBSOLETE   struct block *child_block;
+// OBSOLETE   int total_symbols = 0;
+// OBSOLETE   char fake_name[20];
+// OBSOLETE   static long fake_seq = 0;
+// OBSOLETE   struct symbol_list *symlist, *nextsym;
+// OBSOLETE   int symnum;
+// OBSOLETE 
+// OBSOLETE   if (DST_block (entry).noffset)
+// OBSOLETE     name = DST_OFFSET (entry, DST_block (entry).noffset);
+// OBSOLETE   else
+// OBSOLETE     name = NULL;
+// OBSOLETE   if (DST_block (entry).n_of_code_ranges)
+// OBSOLETE     {
+// OBSOLETE       address = dst_sym_addr (
+// OBSOLETE 			       &DST_block (entry).code_ranges[0].code_start);
+// OBSOLETE       size = DST_block (entry).code_ranges[0].code_size;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       address = -1;
+// OBSOLETE       size = 0;
+// OBSOLETE     }
+// OBSOLETE   symbol_entry = (dst_rec_ptr_t) get_sec_ref (&DST_block (entry).symbols_start);
+// OBSOLETE   switch (DST_block (entry).block_type)
+// OBSOLETE     {
+// OBSOLETE       /* These are all really functions. Even the "program" type.
+// OBSOLETE        * This is because the Apollo OS was written in Pascal, and
+// OBSOLETE        * in Pascal, the main procedure is described as the Program.
+// OBSOLETE        * Cute, huh?
+// OBSOLETE        */
+// OBSOLETE     case dst_block_procedure:
+// OBSOLETE     case dst_block_function:
+// OBSOLETE     case dst_block_subroutine:
+// OBSOLETE     case dst_block_program:
+// OBSOLETE       prim_record_minimal_symbol (name, address, mst_text, objfile);
+// OBSOLETE       function = process_dst_function (
+// OBSOLETE 					objfile,
+// OBSOLETE 					symbol_entry,
+// OBSOLETE 					name,
+// OBSOLETE 					address);
+// OBSOLETE       enter_all_lines (get_sec_ref (&DST_block (entry).code_ranges[0].lines_start), address);
+// OBSOLETE       break;
+// OBSOLETE     case dst_block_block_data:
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE       /* GDB has to call it something, and the module name
+// OBSOLETE        * won't cut it
+// OBSOLETE        */
+// OBSOLETE       sprintf (fake_name, "block_%08lx", fake_seq++);
+// OBSOLETE       function = process_dst_function (
+// OBSOLETE 					objfile, NULL, fake_name, address);
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   symlist = process_dst_symbols (objfile, symbol_entry,
+// OBSOLETE 				 name, &total_symbols);
+// OBSOLETE   block = (struct block *)
+// OBSOLETE     obstack_alloc (&objfile->symbol_obstack,
+// OBSOLETE 		   sizeof (struct block) +
+// OBSOLETE 		     (total_symbols - 1) * sizeof (struct symbol *));
+// OBSOLETE 
+// OBSOLETE   symnum = 0;
+// OBSOLETE   while (symlist)
+// OBSOLETE     {
+// OBSOLETE       nextsym = symlist->next;
+// OBSOLETE 
+// OBSOLETE       block->sym[symnum] = symlist->symbol;
+// OBSOLETE 
+// OBSOLETE       xfree (symlist);
+// OBSOLETE       symlist = nextsym;
+// OBSOLETE       symnum++;
+// OBSOLETE     }
+// OBSOLETE   BLOCK_NSYMS (block) = total_symbols;
+// OBSOLETE   BLOCK_HASHTABLE (block) = 0;
+// OBSOLETE   BLOCK_START (block) = address;
+// OBSOLETE   BLOCK_END (block) = address + size;
+// OBSOLETE   BLOCK_SUPERBLOCK (block) = 0;
+// OBSOLETE   if (function)
+// OBSOLETE     {
+// OBSOLETE       SYMBOL_BLOCK_VALUE (function) = block;
+// OBSOLETE       BLOCK_FUNCTION (block) = function;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     BLOCK_FUNCTION (block) = 0;
+// OBSOLETE 
+// OBSOLETE   if (DST_block (entry).child_block_off)
+// OBSOLETE     {
+// OBSOLETE       child_entry = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE 					 DST_block (entry).child_block_off);
+// OBSOLETE       while (child_entry)
+// OBSOLETE 	{
+// OBSOLETE 	  child_block = process_dst_block (objfile, child_entry);
+// OBSOLETE 	  if (child_block)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (BLOCK_START (child_block) <
+// OBSOLETE 		  BLOCK_START (block) ||
+// OBSOLETE 		  BLOCK_START (block) == -1)
+// OBSOLETE 		BLOCK_START (block) =
+// OBSOLETE 		  BLOCK_START (child_block);
+// OBSOLETE 	      if (BLOCK_END (child_block) >
+// OBSOLETE 		  BLOCK_END (block) ||
+// OBSOLETE 		  BLOCK_END (block) == -1)
+// OBSOLETE 		BLOCK_END (block) =
+// OBSOLETE 		  BLOCK_END (child_block);
+// OBSOLETE 	      BLOCK_SUPERBLOCK (child_block) = block;
+// OBSOLETE 	    }
+// OBSOLETE 	  if (DST_block (child_entry).sibling_block_off)
+// OBSOLETE 	    child_entry = (dst_rec_ptr_t) DST_OFFSET (
+// OBSOLETE 						       child_entry,
+// OBSOLETE 				 DST_block (child_entry).sibling_block_off);
+// OBSOLETE 	  else
+// OBSOLETE 	    child_entry = NULL;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   record_pending_block (objfile, block, NULL);
+// OBSOLETE   return block;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE read_dst_symtab (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   char *buffer;
+// OBSOLETE   dst_rec_ptr_t entry, file_table, root_block;
+// OBSOLETE   char *source_file;
+// OBSOLETE   struct block *block, *global_block;
+// OBSOLETE   int symnum;
+// OBSOLETE   struct symbol_list *nextsym;
+// OBSOLETE   int module_num = 0;
+// OBSOLETE   struct structure_list *element;
+// OBSOLETE 
+// OBSOLETE   current_objfile = objfile;
+// OBSOLETE   buffer = blocks_info.buffer;
+// OBSOLETE   while (NEXT_BLK (&buffer, &entry))
+// OBSOLETE     {
+// OBSOLETE       if (entry->rec_type == dst_typ_comp_unit)
+// OBSOLETE 	{
+// OBSOLETE 	  file_table = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE 					  DST_comp_unit (entry).file_table);
+// OBSOLETE 	  section_table = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE 				       DST_comp_unit (entry).section_table);
+// OBSOLETE 	  root_block = (dst_rec_ptr_t) DST_OFFSET (entry,
+// OBSOLETE 				   DST_comp_unit (entry).root_block_offset);
+// OBSOLETE 	  source_file = DST_OFFSET (file_table,
+// OBSOLETE 				DST_file_tab (file_table).files[0].noffset);
+// OBSOLETE 	  /* Point buffer to the start of the next comp_unit */
+// OBSOLETE 	  buffer = DST_OFFSET (entry,
+// OBSOLETE 			       DST_comp_unit (entry).data_size);
+// OBSOLETE 	  dst_start_symtab ();
+// OBSOLETE 
+// OBSOLETE 	  block = process_dst_block (objfile, root_block);
+// OBSOLETE 
+// OBSOLETE 	  global_block = (struct block *)
+// OBSOLETE 	    obstack_alloc (&objfile->symbol_obstack,
+// OBSOLETE 			   sizeof (struct block) +
+// OBSOLETE 			     (total_globals - 1) *
+// OBSOLETE 			   sizeof (struct symbol *));
+// OBSOLETE 	  BLOCK_NSYMS (global_block) = total_globals;
+// OBSOLETE 	  BLOCK_HASHTABLE (global_block) = 0;
+// OBSOLETE 	  for (symnum = 0; symnum < total_globals; symnum++)
+// OBSOLETE 	    {
+// OBSOLETE 	      nextsym = dst_global_symbols->next;
+// OBSOLETE 
+// OBSOLETE 	      global_block->sym[symnum] =
+// OBSOLETE 		dst_global_symbols->symbol;
+// OBSOLETE 
+// OBSOLETE 	      xfree (dst_global_symbols);
+// OBSOLETE 	      dst_global_symbols = nextsym;
+// OBSOLETE 	    }
+// OBSOLETE 	  dst_global_symbols = NULL;
+// OBSOLETE 	  total_globals = 0;
+// OBSOLETE 	  BLOCK_FUNCTION (global_block) = 0;
+// OBSOLETE 	  BLOCK_START (global_block) = BLOCK_START (block);
+// OBSOLETE 	  BLOCK_END (global_block) = BLOCK_END (block);
+// OBSOLETE 	  BLOCK_SUPERBLOCK (global_block) = 0;
+// OBSOLETE 	  BLOCK_SUPERBLOCK (block) = global_block;
+// OBSOLETE 	  record_pending_block (objfile, global_block, NULL);
+// OBSOLETE 
+// OBSOLETE 	  complete_symtab (source_file,
+// OBSOLETE 			   BLOCK_START (block),
+// OBSOLETE 			   BLOCK_END (block) - BLOCK_START (block));
+// OBSOLETE 	  module_num++;
+// OBSOLETE 	  dst_end_symtab (objfile);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   if (module_num)
+// OBSOLETE     prim_record_minimal_symbol ("<end_of_program>",
+// OBSOLETE 				BLOCK_END (block), mst_text, objfile);
+// OBSOLETE   /* One more faked symbol to make sure nothing can ever run off the
+// OBSOLETE    * end of the symbol table. This one represents the end of the
+// OBSOLETE    * text space. It used to be (CORE_ADDR) -1 (effectively the highest
+// OBSOLETE    * int possible), but some parts of gdb treated it as a signed
+// OBSOLETE    * number and failed comparisons. We could equally use 7fffffff,
+// OBSOLETE    * but no functions are ever mapped to an address higher than
+// OBSOLETE    * 40000000
+// OBSOLETE    */
+// OBSOLETE   prim_record_minimal_symbol ("<end_of_text>",
+// OBSOLETE 			      (CORE_ADDR) 0x40000000,
+// OBSOLETE 			      mst_text, objfile);
+// OBSOLETE   while (struct_list)
+// OBSOLETE     {
+// OBSOLETE       element = struct_list;
+// OBSOLETE       struct_list = element->next;
+// OBSOLETE       xfree (element);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Support for line number handling */
+// OBSOLETE static char *linetab = NULL;
+// OBSOLETE static long linetab_offset;
+// OBSOLETE static unsigned long linetab_size;
+// OBSOLETE 
+// OBSOLETE /* Read in all the line numbers for fast lookups later.  Leave them in
+// OBSOLETE    external (unswapped) format in memory; we'll swap them as we enter
+// OBSOLETE    them into GDB's data structures.  */
+// OBSOLETE static int
+// OBSOLETE init_one_section (int chan, dst_sec *secinfo)
+// OBSOLETE {
+// OBSOLETE   if (secinfo->size == 0
+// OBSOLETE       || lseek (chan, secinfo->position, 0) == -1
+// OBSOLETE       || (secinfo->buffer = xmalloc (secinfo->size)) == NULL
+// OBSOLETE       || myread (chan, secinfo->buffer, secinfo->size) == -1)
+// OBSOLETE     return 0;
+// OBSOLETE   else
+// OBSOLETE     return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE init_dst_sections (int chan)
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE   if (!init_one_section (chan, &blocks_info) ||
+// OBSOLETE       !init_one_section (chan, &lines_info) ||
+// OBSOLETE       !init_one_section (chan, &symbols_info))
+// OBSOLETE     return -1;
+// OBSOLETE   else
+// OBSOLETE     return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Fake up support for relocating symbol addresses.  FIXME.  */
+// OBSOLETE 
+// OBSOLETE struct section_offsets dst_symfile_faker =
+// OBSOLETE {0};
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE dst_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
+// OBSOLETE {
+// OBSOLETE   objfile->num_sections = 1;
+// OBSOLETE   objfile->section_offsets = &dst_symfile_faker;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Register our ability to parse symbols for DST BFD files */
+// OBSOLETE 
+// OBSOLETE static struct sym_fns dst_sym_fns =
+// OBSOLETE {
+// OBSOLETE   /* FIXME: Can this be integrated with coffread.c?  If not, should it be
+// OBSOLETE      a separate flavour like ecoff?  */
+// OBSOLETE   (enum bfd_flavour) -2,
+// OBSOLETE 
+// OBSOLETE   dst_new_init,			/* sym_new_init: init anything gbl to entire symtab */
+// OBSOLETE   dst_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
+// OBSOLETE   dst_symfile_read,		/* sym_read: read a symbol file into symtab */
+// OBSOLETE   dst_symfile_finish,		/* sym_finish: finished with file, cleanup */
+// OBSOLETE   dst_symfile_offsets,		/* sym_offsets:  xlate external to internal form */
+// OBSOLETE   NULL				/* next: pointer to next struct sym_fns */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_dstread (void)
+// OBSOLETE {
+// OBSOLETE   add_symtab_fns (&dst_sym_fns);
+// OBSOLETE }
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 783d1c0..18782b1 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -21,6 +21,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "gdbcore.h"
 #include "symtab.h"
 #include "symfile.h"
 #include "objfiles.h"
@@ -29,12 +30,13 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "dwarf2cfi.h"
+#include "gdb_assert.h"
 
 /* Common Information Entry - holds information that is shared among many
    Frame Descriptors.  */
 struct cie_unit
 {
-  /* Offset of this unit in dwarf_frame_buffer.  */
+  /* Offset of this unit in .debug_frame or .eh_frame.  */
   ULONGEST offset;
 
   /* A null-terminated string that identifies the augmentation to this CIE or
@@ -176,6 +178,15 @@
   struct objfile *objfile;
 };
 
+enum ptr_encoding
+{
+  PE_absptr = DW_EH_PE_absptr,
+  PE_pcrel = DW_EH_PE_pcrel,
+  PE_textrel = DW_EH_PE_textrel,
+  PE_datarel = DW_EH_PE_datarel,
+  PE_funcrel = DW_EH_PE_funcrel
+};
+
 #define UNWIND_CONTEXT(fi) ((struct context *) (fi->context))
 
 
@@ -188,8 +199,6 @@
 extern unsigned int dwarf_frame_size;
 extern file_ptr dwarf_eh_frame_offset;
 extern unsigned int dwarf_eh_frame_size;
-
-static char *dwarf_frame_buffer;
 
 
 extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
@@ -201,26 +210,28 @@
 
 static struct context *context_alloc ();
 static struct frame_state *frame_state_alloc ();
+static void unwind_tmp_obstack_init ();
 static void unwind_tmp_obstack_free ();
 static void context_cpy (struct context *dst, struct context *src);
 
-static unsigned int read_1u (bfd *abfd, char **p);
-static int read_1s (bfd *abfd, char **p);
-static unsigned int read_2u (bfd *abfd, char **p);
-static int read_2s (bfd *abfd, char **p);
-static unsigned int read_4u (bfd *abfd, char **p);
-static int read_4s (bfd *abfd, char **p);
-static ULONGEST read_8u (bfd *abfd, char **p);
-static LONGEST read_8s (bfd *abfd, char **p);
+static unsigned int read_1u (bfd * abfd, char **p);
+static int read_1s (bfd * abfd, char **p);
+static unsigned int read_2u (bfd * abfd, char **p);
+static int read_2s (bfd * abfd, char **p);
+static unsigned int read_4u (bfd * abfd, char **p);
+static int read_4s (bfd * abfd, char **p);
+static ULONGEST read_8u (bfd * abfd, char **p);
+static LONGEST read_8s (bfd * abfd, char **p);
 
-static ULONGEST read_uleb128 (bfd *abfd, char **p);
-static LONGEST read_sleb128 (bfd *abfd, char **p);
-static CORE_ADDR read_pointer (bfd *abfd, char **p);
-static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
+static ULONGEST read_uleb128 (bfd * abfd, char **p);
+static LONGEST read_sleb128 (bfd * abfd, char **p);
+static CORE_ADDR read_pointer (bfd * abfd, char **p);
+static CORE_ADDR read_encoded_pointer (bfd * abfd, char **p,
 				       unsigned char encoding);
+static enum ptr_encoding pointer_encoding (unsigned char encoding);
 
-static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
-static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
+static LONGEST read_initial_length (bfd * abfd, char *buf, int *bytes_read);
+static ULONGEST read_length (bfd * abfd, char *buf, int *bytes_read,
 			     int dwarf64);
 
 static int is_cie (ULONGEST cie_id, int dwarf64);
@@ -235,11 +246,12 @@
 static void get_reg (char *reg, struct context *context, int regnum);
 static CORE_ADDR execute_stack_op (struct objfile *objfile,
 				   char *op_ptr, char *op_end,
-				   struct context *context, CORE_ADDR initial);
+				   struct context *context,
+				   CORE_ADDR initial);
 static void update_context (struct context *context, struct frame_state *fs,
 			    int chain);
-
 
+
 /* Memory allocation functions.  */
 static struct fde_unit *
 fde_unit_alloc (void)
@@ -262,7 +274,7 @@
 }
 
 static void
-fde_chunks_need_space ()
+fde_chunks_need_space (void)
 {
   if (fde_chunks.elems < fde_chunks.array_size)
     return;
@@ -275,7 +287,7 @@
 
 /* Alocate a new `struct context' on temporary obstack.  */
 static struct context *
-context_alloc ()
+context_alloc (void)
 {
   struct context *context;
 
@@ -292,7 +304,7 @@
 
 /* Alocate a new `struct frame_state' on temporary obstack.  */
 static struct frame_state *
-frame_state_alloc ()
+frame_state_alloc (void)
 {
   struct frame_state *fs;
 
@@ -301,17 +313,23 @@
   fs = (struct frame_state *) obstack_alloc (&unwind_tmp_obstack,
 					     sizeof (struct frame_state));
   memset (fs, 0, sizeof (struct frame_state));
-  fs->regs.reg = (struct frame_state_reg *)  obstack_alloc (&unwind_tmp_obstack,
-							    regs_size);
+  fs->regs.reg =
+    (struct frame_state_reg *) obstack_alloc (&unwind_tmp_obstack, regs_size);
   memset (fs->regs.reg, 0, regs_size);
   return fs;
 }
 
 static void
-unwind_tmp_obstack_free ()
+unwind_tmp_obstack_init (void)
+{
+  obstack_init (&unwind_tmp_obstack);
+}
+
+static void
+unwind_tmp_obstack_free (void)
 {
   obstack_free (&unwind_tmp_obstack, NULL);
-  obstack_init (&unwind_tmp_obstack);
+  unwind_tmp_obstack_init ();
 }
 
 static void
@@ -334,92 +352,92 @@
   dreg = dst->reg;
   *dst = *src;
   dst->reg = dreg;
-  
+
   memcpy (dst->reg, src->reg, regs_size);
 }
 
 static unsigned int
-read_1u (bfd *abfd, char **p)
+read_1u (bfd * abfd, char **p)
 {
   unsigned ret;
 
-  ret= bfd_get_8 (abfd, (bfd_byte *) *p);
-  (*p) ++;
+  ret = bfd_get_8 (abfd, (bfd_byte *) * p);
+  (*p)++;
   return ret;
 }
 
 static int
-read_1s (bfd *abfd, char **p)
+read_1s (bfd * abfd, char **p)
 {
   int ret;
 
-  ret= bfd_get_signed_8 (abfd, (bfd_byte *) *p);
-  (*p) ++;
+  ret = bfd_get_signed_8 (abfd, (bfd_byte *) * p);
+  (*p)++;
   return ret;
 }
 
 static unsigned int
-read_2u (bfd *abfd, char **p)
+read_2u (bfd * abfd, char **p)
 {
   unsigned ret;
 
-  ret= bfd_get_16 (abfd, (bfd_byte *) *p);
-  (*p) ++;
+  ret = bfd_get_16 (abfd, (bfd_byte *) * p);
+  (*p)++;
   return ret;
 }
 
 static int
-read_2s (bfd *abfd, char **p)
+read_2s (bfd * abfd, char **p)
 {
   int ret;
 
-  ret= bfd_get_signed_16 (abfd, (bfd_byte *) *p);
+  ret = bfd_get_signed_16 (abfd, (bfd_byte *) * p);
   (*p) += 2;
   return ret;
 }
 
 static unsigned int
-read_4u (bfd *abfd, char **p)
+read_4u (bfd * abfd, char **p)
 {
   unsigned int ret;
 
-  ret= bfd_get_32 (abfd, (bfd_byte *) *p);
+  ret = bfd_get_32 (abfd, (bfd_byte *) * p);
   (*p) += 4;
   return ret;
 }
 
 static int
-read_4s (bfd *abfd, char **p)
+read_4s (bfd * abfd, char **p)
 {
   int ret;
 
-  ret= bfd_get_signed_32 (abfd, (bfd_byte *) *p);
+  ret = bfd_get_signed_32 (abfd, (bfd_byte *) * p);
   (*p) += 4;
   return ret;
 }
 
 static ULONGEST
-read_8u (bfd *abfd, char **p)
+read_8u (bfd * abfd, char **p)
 {
   ULONGEST ret;
 
-  ret = bfd_get_64 (abfd, (bfd_byte *) *p);
+  ret = bfd_get_64 (abfd, (bfd_byte *) * p);
   (*p) += 8;
   return ret;
 }
 
 static LONGEST
-read_8s (bfd *abfd, char **p)
+read_8s (bfd * abfd, char **p)
 {
   LONGEST ret;
 
-  ret = bfd_get_signed_64 (abfd, (bfd_byte *) *p);
+  ret = bfd_get_signed_64 (abfd, (bfd_byte *) * p);
   (*p) += 8;
   return ret;
 }
 
 static ULONGEST
-read_uleb128 (bfd *abfd, char **p)
+read_uleb128 (bfd * abfd, char **p)
 {
   ULONGEST ret;
   int i, shift;
@@ -430,8 +448,8 @@
   i = 0;
   while (1)
     {
-      byte = bfd_get_8 (abfd, (bfd_byte *) *p);
-      (*p) ++;
+      byte = bfd_get_8 (abfd, (bfd_byte *) * p);
+      (*p)++;
       ret |= ((unsigned long) (byte & 127) << shift);
       if ((byte & 128) == 0)
 	{
@@ -443,7 +461,7 @@
 }
 
 static LONGEST
-read_sleb128 (bfd *abfd, char **p)
+read_sleb128 (bfd * abfd, char **p)
 {
   LONGEST ret;
   int i, shift, size, num_read;
@@ -456,8 +474,8 @@
   i = 0;
   while (1)
     {
-      byte = bfd_get_8 (abfd, (bfd_byte *) *p);
-      (*p) ++;
+      byte = bfd_get_8 (abfd, (bfd_byte *) * p);
+      (*p)++;
       ret |= ((long) (byte & 127) << shift);
       shift += 7;
       if ((byte & 128) == 0)
@@ -473,7 +491,7 @@
 }
 
 static CORE_ADDR
-read_pointer (bfd *abfd, char **p)
+read_pointer (bfd * abfd, char **p)
 {
   switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
     {
@@ -486,8 +504,11 @@
     }
 }
 
+/* This functions only reads appropriate amount of data from *p 
+ * and returns the resulting value. Calling function must handle
+ * different encoding possibilities itself!  */
 static CORE_ADDR
-read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
+read_encoded_pointer (bfd * abfd, char **p, unsigned char encoding)
 {
   CORE_ADDR ret;
 
@@ -529,22 +550,33 @@
 		      "read_encoded_pointer: unknown pointer encoding");
     }
 
-  if (ret != 0)
-    switch (encoding & 0xf0)
-      {
-      case DW_EH_PE_absptr:
-	break;
-      case DW_EH_PE_pcrel:
-	ret += (CORE_ADDR) *p;
-	break;
-      case DW_EH_PE_textrel:
-      case DW_EH_PE_datarel:
-      case DW_EH_PE_funcrel:
-      default:
-	internal_error (__FILE__, __LINE__,
-			"read_encoded_pointer: unknown pointer encoding");
-      }
+  return ret;
+}
 
+/* Variable 'encoding' carries 3 different flags:
+ * - encoding & 0x0f : size of the address (handled in read_encoded_pointer())
+ * - encoding & 0x70 : type (absolute, relative, ...)
+ * - encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80).  */
+enum ptr_encoding
+pointer_encoding (unsigned char encoding)
+{
+  int ret;
+
+  if (encoding & DW_EH_PE_indirect)
+    warning ("CFI: Unsupported pointer encoding: DW_EH_PE_indirect");
+
+  switch (encoding & 0x70)
+    {
+    case DW_EH_PE_absptr:
+    case DW_EH_PE_pcrel:
+    case DW_EH_PE_textrel:
+    case DW_EH_PE_datarel:
+    case DW_EH_PE_funcrel:
+      ret = encoding & 0x70;
+      break;
+    default:
+      internal_error (__FILE__, __LINE__, "CFI: unknown pointer encoding");
+    }
   return ret;
 }
 
@@ -584,8 +616,8 @@
 }
 
 static void
-execute_cfa_program ( struct objfile *objfile, char *insn_ptr, char *insn_end,
-		      struct context *context, struct frame_state *fs)
+execute_cfa_program (struct objfile *objfile, char *insn_ptr, char *insn_end,
+		     struct context *context, struct frame_state *fs)
 {
   struct frame_state_regs *unused_rs = NULL;
 
@@ -604,7 +636,7 @@
 	{
 	  reg = insn & 0x3f;
 	  uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
-	  offset = (long) uoffset * fs->data_align;
+	  offset = (long) uoffset *fs->data_align;
 	  fs->regs.reg[reg].how = REG_SAVED_OFFSET;
 	  fs->regs.reg[reg].loc.offset = offset;
 	}
@@ -619,6 +651,10 @@
 	  case DW_CFA_set_loc:
 	    fs->pc = read_encoded_pointer (objfile->obfd, &insn_ptr,
 					   fs->addr_encoding);
+
+	    if (pointer_encoding (fs->addr_encoding) != PE_absptr)
+	      warning ("CFI: DW_CFA_set_loc uses relative addressing");
+
 	    break;
 
 	  case DW_CFA_advance_loc1:
@@ -806,28 +842,23 @@
 
   if (fde == NULL)
     return;
-  
+
   fs->pc = fde->initial_location;
 
-  if (fde->cie_ptr)
-  {
-      cie = fde->cie_ptr;
-      
-      fs->code_align = cie->code_align;
-      fs->data_align = cie->data_align;
-      fs->retaddr_column = cie->ra;
-      fs->addr_encoding = cie->addr_encoding;
-      fs->objfile = cie->objfile;
+  gdb_assert (fde->cie_ptr != NULL);
 
-      execute_cfa_program (cie->objfile, cie->data,
-			   cie->data + cie->data_length, context, fs);
-      execute_cfa_program (cie->objfile, fde->data,
-			   fde->data + fde->data_length, context, fs);
-  }
-  else
-	internal_error (__FILE__, __LINE__,
-		"%s(): Internal error: fde->cie_ptr==NULL !", 
-		__func__);
+  cie = fde->cie_ptr;
+  
+  fs->code_align = cie->code_align;
+  fs->data_align = cie->data_align;
+  fs->retaddr_column = cie->ra;
+  fs->addr_encoding = cie->addr_encoding;
+  fs->objfile = cie->objfile;
+  
+  execute_cfa_program (cie->objfile, cie->data,
+		       cie->data + cie->data_length, context, fs);
+  execute_cfa_program (cie->objfile, fde->data,
+		       fde->data + fde->data_length, context, fs);
 }
 
 static void
@@ -854,8 +885,7 @@
 	      REGISTER_RAW_SIZE (regnum));
       break;
     default:
-      internal_error (__FILE__, __LINE__,
-		      "get_reg: unknown register rule");
+      internal_error (__FILE__, __LINE__, "get_reg: unknown register rule");
     }
 }
 
@@ -1087,32 +1117,21 @@
 	    {
 	    case DW_OP_deref:
 	      {
-		char *ptr = (char *) result;
-		result = read_pointer (objfile->obfd, &ptr);
+		int len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
+		if (len != 4 && len != 8)
+		  internal_error (__FILE__, __LINE__,
+				  "execute_stack_op error");
+		result = read_memory_unsigned_integer (result, len);
 	      }
 	      break;
 
 	    case DW_OP_deref_size:
 	      {
-		char *ptr = (char *) result;
-		switch (*op_ptr++)
-		  {
-		  case 1:
-		    result = read_1u (objfile->obfd, &ptr);
-		    break;
-		  case 2:
-		    result = read_2u (objfile->obfd, &ptr);
-		    break;
-		  case 4:
-		    result = read_4u (objfile->obfd, &ptr);
-		    break;
-		  case 8:
-		    result = read_8u (objfile->obfd, &ptr);
-		    break;
-		  default:
-		    internal_error (__FILE__, __LINE__,
-				    "execute_stack_op error");
-		  }
+		int len = *op_ptr++;
+		if (len != 1 && len != 2 && len != 4 && len !=8)
+		  internal_error (__FILE__, __LINE__,
+				  "execute_stack_op error");
+		result = read_memory_unsigned_integer (result, len);
 	      }
 	      break;
 
@@ -1208,8 +1227,9 @@
 	      case DW_OP_ne:
 		result = (LONGEST) first != (LONGEST) second;
 		break;
-	      default:	/* This label is here just to avoid warning.  */
-	        break; 
+	      default:
+		error ("execute_stack_op: Unknown DW_OP_ value");
+		break;
 	      }
 	  }
 	  break;
@@ -1252,11 +1272,14 @@
 update_context (struct context *context, struct frame_state *fs, int chain)
 {
   struct context *orig_context;
-  CORE_ADDR cfa;
+  CORE_ADDR cfa = 0;
   long i;
 
+  unwind_tmp_obstack_init ();
+
   orig_context = context_alloc ();
   context_cpy (orig_context, context);
+
   /* Compute this frame's CFA.  */
   switch (fs->cfa_how)
     {
@@ -1267,9 +1290,9 @@
 
     case CFA_EXP:
       /* ??? No way of knowing what register number is the stack pointer
-	 to do the same sort of handling as above.  Assume that if the
-	 CFA calculation is so complicated as to require a stack program
-	 that this will not be a problem.  */
+         to do the same sort of handling as above.  Assume that if the
+         CFA calculation is so complicated as to require a stack program
+         that this will not be a problem.  */
       {
 	char *exp = fs->cfa_exp;
 	ULONGEST len;
@@ -1324,9 +1347,9 @@
 	    context->reg[i].how = REG_CTX_SAVED_ADDR;
 	    context->reg[i].loc.addr =
 	      orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
+	    break;
 	  default:
-	    internal_error (__FILE__, __LINE__,
-			    "%s: unknown register rule", __func__);
+	    internal_error (__FILE__, __LINE__, "bad switch");
 	  }
 	break;
       case REG_SAVED_EXP:
@@ -1343,8 +1366,7 @@
 	}
 	break;
       default:
-	internal_error (__FILE__, __LINE__,
-			"%s: unknown register rule", __func__);
+	internal_error (__FILE__, __LINE__, "bad switch");
       }
   get_reg ((char *) &context->ra, context, fs->retaddr_column);
   unwind_tmp_obstack_free ();
@@ -1371,39 +1393,46 @@
 }
 
 /*  Build the cie_chunks and fde_chunks tables from informations
-    in .debug_frame section.  */
-void
-dwarf2_build_frame_info (struct objfile *objfile)
+    found in .debug_frame and .eh_frame sections.  */
+/* We can handle both of these sections almost in the same way, however there
+   are some exceptions:
+   - CIE ID is -1 in debug_frame, but 0 in eh_frame
+   - eh_frame may contain some more information that are used only by gcc 
+     (eg. personality pointer, LSDA pointer, ...). Most of them we can ignore.
+   - In debug_frame FDE's item cie_id contains offset of it's parent CIE.
+     In eh_frame FDE's item cie_id is a relative pointer to the parent CIE.
+     Anyway we don't need to bother with this, because we are smart enough 
+     to keep the pointer to the parent CIE of oncomming FDEs in 'last_cie'.
+   - Although debug_frame items can contain Augmentation as well as 
+     eh_frame ones, I have never seen them non-empty. Thus only in eh_frame 
+     we can encounter for example non-absolute pointers (Aug. 'R').  
+                                                              -- mludvig  */
+static void
+parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
+		  unsigned int frame_size, int eh_frame)
 {
   bfd *abfd = objfile->obfd;
+  asection *curr_section_ptr;
   char *start = NULL;
   char *end = NULL;
-  int from_eh = 0;
+  char *frame_buffer = NULL;
+  char *curr_section_name, *aug_data;
+  struct cie_unit *last_cie = NULL;
+  int last_dup_fde = 0;
+  int aug_len, i;
+  CORE_ADDR curr_section_vma = 0;
 
-  obstack_init (&unwind_tmp_obstack);
+  unwind_tmp_obstack_init ();
 
-  dwarf_frame_buffer = 0;
+  frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size);
 
-  if (dwarf_frame_offset)
-    {
-      dwarf_frame_buffer = dwarf2_read_section (objfile,
-						dwarf_frame_offset,
-						dwarf_frame_size);
+  start = frame_buffer;
+  end = frame_buffer + frame_size;
 
-      start = dwarf_frame_buffer;
-      end = dwarf_frame_buffer + dwarf_frame_size;
-    }
-  else if (dwarf_eh_frame_offset)
-    {
-      dwarf_frame_buffer = dwarf2_read_section (objfile,
-						dwarf_eh_frame_offset,
-						dwarf_eh_frame_size);
-
-      start = dwarf_frame_buffer;
-      end = dwarf_frame_buffer + dwarf_eh_frame_size;
-
-      from_eh = 1;
-    }
+  curr_section_name = eh_frame ? ".eh_frame" : ".debug_frame";
+  curr_section_ptr = bfd_get_section_by_name (abfd, curr_section_name);
+  if (curr_section_ptr)
+    curr_section_vma = curr_section_ptr->vma;
 
   if (start)
     {
@@ -1411,9 +1440,8 @@
 	{
 	  unsigned long length;
 	  ULONGEST cie_id;
-	  ULONGEST unit_offset = start - dwarf_frame_buffer;
-	  int bytes_read;
-	  int dwarf64;
+	  ULONGEST unit_offset = start - frame_buffer;
+	  int bytes_read, dwarf64;
 	  char *block_end;
 
 	  length = read_initial_length (abfd, start, &bytes_read);
@@ -1421,10 +1449,16 @@
 	  dwarf64 = (bytes_read == 12);
 	  block_end = start + length;
 
+	  if (length == 0)
+	    {
+	      start = block_end;
+	      continue;
+	    }
+
 	  cie_id = read_length (abfd, start, &bytes_read, dwarf64);
 	  start += bytes_read;
 
-	  if ((from_eh && cie_id == 0) || is_cie (cie_id, dwarf64))
+	  if ((eh_frame && cie_id == 0) || is_cie (cie_id, dwarf64))
 	    {
 	      struct cie_unit *cie = cie_unit_alloc ();
 	      char *aug;
@@ -1440,84 +1474,186 @@
 	      start++;		/* version */
 
 	      cie->augmentation = aug = start;
-	      while (*start)
-		start++;
-	      start++;		/* skip past NUL */
+	      while (*start++);	/* Skips last NULL as well */
 
 	      cie->code_align = read_uleb128 (abfd, &start);
 	      cie->data_align = read_sleb128 (abfd, &start);
 	      cie->ra = read_1u (abfd, &start);
 
+	      /* Augmentation:
+	         z      Indicates that a uleb128 is present to size the
+	         augmentation section.
+	         L      Indicates the encoding (and thus presence) of
+	         an LSDA pointer in the FDE augmentation.
+	         R      Indicates a non-default pointer encoding for
+	         FDE code pointers.
+	         P      Indicates the presence of an encoding + language
+	         personality routine in the CIE augmentation.
+
+	         [This info comes from GCC's dwarf2out.c]
+	       */
 	      if (*aug == 'z')
 		{
-		  int xtra = read_uleb128 (abfd, &start);
-		  start += xtra;
+		  aug_len = read_uleb128 (abfd, &start);
+		  aug_data = start;
+		  start += aug_len;
 		  ++aug;
 		}
 
+	      cie->data = start;
+	      cie->data_length = block_end - cie->data;
+
 	      while (*aug != '\0')
 		{
 		  if (aug[0] == 'e' && aug[1] == 'h')
 		    {
-		      start += sizeof (void *);
-		      aug += 2;
+		      aug_data += sizeof (void *);
+		      aug++;
 		    }
 		  else if (aug[0] == 'R')
-		    {
-		      cie->addr_encoding = *start++;
-		      aug += 1;
-		    }
+		    cie->addr_encoding = *aug_data++;
 		  else if (aug[0] == 'P')
 		    {
-		      CORE_ADDR ptr;
-		      ptr = read_encoded_pointer (abfd, &start,
-						  cie->addr_encoding);
-		      aug += 1;
+		      CORE_ADDR pers_addr;
+		      int pers_addr_enc;
+
+		      pers_addr_enc = *aug_data++;
+		      /* We don't need pers_addr value and so we 
+		         don't care about it's encoding.  */
+		      pers_addr = read_encoded_pointer (abfd, &aug_data,
+							pers_addr_enc);
+		    }
+		  else if (aug[0] == 'L' && eh_frame)
+		    {
+		      int lsda_addr_enc;
+
+		      /* Perhaps we should save this to CIE for later use?
+		         Do we need it for something in GDB?  */
+		      lsda_addr_enc = *aug_data++;
 		    }
 		  else
-		    warning ("%s(): unknown augmentation", __func__);
+		    warning ("CFI warning: unknown augmentation \"%c\""
+			     " in \"%s\" of\n"
+			     "\t%s", aug[0], curr_section_name,
+			     objfile->name);
+		  aug++;
 		}
 
-	      cie->data = start;
-	      cie->data_length = block_end - start;
+	      last_cie = cie;
 	    }
 	  else
 	    {
 	      struct fde_unit *fde;
 	      struct cie_unit *cie;
+	      int dup = 0;
+	      CORE_ADDR init_loc;
 
-	      fde_chunks_need_space ();
-	      fde = fde_unit_alloc ();
-
-	      fde_chunks.array[fde_chunks.elems++] = fde;
-	      
-	      fde->initial_location = read_pointer (abfd, &start)
-	        + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-	      fde->address_range = read_pointer (abfd, &start);
-
-	      cie = cie_chunks;
-	      while(cie)
-	      {
-	        if (cie->objfile == objfile)
+	      /* We assume that debug_frame is in order 
+	         CIE,FDE,CIE,FDE,FDE,...  and thus the CIE for this FDE
+	         should be stored in last_cie pointer. If not, we'll 
+	         try to find it by the older way.  */
+	      if (last_cie)
+		cie = last_cie;
+	      else
 		{
-		  if (from_eh && (cie->offset == (unit_offset + bytes_read - cie_id)))
-		      break;
-		  if (!from_eh && (cie->offset == cie_id))
-		    break;
+		  warning ("CFI: last_cie == NULL. "
+			   "Perhaps a malformed %s section in '%s'...?\n",
+			   curr_section_name, objfile->name);
+
+		  cie = cie_chunks;
+		  while (cie)
+		    {
+		      if (cie->objfile == objfile)
+			{
+			  if (eh_frame &&
+			      (cie->offset ==
+			       (unit_offset + bytes_read - cie_id)))
+			    break;
+			  if (!eh_frame && (cie->offset == cie_id))
+			    break;
+			}
+
+		      cie = cie->next;
+		    }
+		  if (!cie)
+		    error ("CFI: can't find CIE pointer");
 		}
 
-		cie = cie->next;
-	      }
-	    
-	      if (!cie)
-		error ("%s(): can't find CIE pointer", __func__);
-	      fde->cie_ptr = cie;
+	      init_loc = read_encoded_pointer (abfd, &start,
+					       cie->addr_encoding);
 
-	      if (cie->augmentation[0] == 'z')
-		  read_uleb128 (abfd, &start);
+	      switch (pointer_encoding (cie->addr_encoding))
+		{
+		case PE_absptr:
+		  break;
+		case PE_pcrel:
+		  /* start-frame_buffer gives offset from 
+		     the beginning of actual section.  */
+		  init_loc += curr_section_vma + start - frame_buffer;
+		  break;
+		default:
+		  warning ("CFI: Unsupported pointer encoding\n");
+		}
 
-	      fde->data = start;
-	      fde->data_length = block_end - start;
+	      /* For relocatable objects we must add an offset telling
+	         where the section is actually mapped in the memory.  */
+	      init_loc += ANOFFSET (objfile->section_offsets,
+				    SECT_OFF_TEXT (objfile));
+
+	      /* If we have both .debug_frame and .eh_frame present in 
+	         a file, we must eliminate duplicate FDEs. For now we'll 
+	         run through all entries in fde_chunks and check it one 
+	         by one. Perhaps in the future we can implement a faster 
+	         searching algorithm.  */
+	      /* eh_frame==2 indicates, that this file has an already 
+	         parsed .debug_frame too. When eh_frame==1 it means, that no
+	         .debug_frame is present and thus we don't need to check for
+	         duplicities. eh_frame==0 means, that we parse .debug_frame
+	         and don't need to care about duplicate FDEs, because
+	         .debug_frame is parsed first.  */
+	      if (eh_frame == 2)
+		for (i = 0; eh_frame == 2 && i < fde_chunks.elems; i++)
+		  {
+		    /* We assume that FDEs in .debug_frame and .eh_frame 
+		       have the same order (if they are present, of course).
+		       If we find a duplicate entry for one FDE and save
+		       it's index to last_dup_fde it's very likely, that 
+		       we'll find an entry for the following FDE right after 
+		       the previous one. Thus in many cases we'll run this 
+		       loop only once.  */
+		    last_dup_fde = (last_dup_fde + i) % fde_chunks.elems;
+		    if (fde_chunks.array[last_dup_fde]->initial_location
+			== init_loc)
+		      {
+			dup = 1;
+			break;
+		      }
+		  }
+
+	      /* Allocate a new entry only if this FDE isn't a duplicate of
+	         something we have already seen.   */
+	      if (!dup)
+		{
+		  fde_chunks_need_space ();
+		  fde = fde_unit_alloc ();
+
+		  fde_chunks.array[fde_chunks.elems++] = fde;
+
+		  fde->initial_location = init_loc;
+		  fde->address_range = read_encoded_pointer (abfd, &start,
+							     cie->
+							     addr_encoding);
+
+		  fde->cie_ptr = cie;
+
+		  /* Here we intentionally ignore augmentation data
+		     from FDE, because we don't need them.  */
+		  if (cie->augmentation[0] == 'z')
+		    start += read_uleb128 (abfd, &start);
+
+		  fde->data = start;
+		  fde->data_length = block_end - start;
+		}
 	    }
 	  start = block_end;
 	}
@@ -1525,16 +1661,41 @@
 	     sizeof (struct fde_unit *), compare_fde_unit);
     }
 }
-
+
+/* We must parse both .debug_frame section and .eh_frame because 
+ * not all frames must be present in both of these sections. */
+void
+dwarf2_build_frame_info (struct objfile *objfile)
+{
+  int after_debug_frame = 0;
+
+  /* If we have .debug_frame then the parser is called with 
+     eh_frame==0 for .debug_frame and eh_frame==2 for .eh_frame, 
+     otherwise it's only called once for .eh_frame with argument 
+     eh_frame==1.  */
+
+  if (dwarf_frame_offset)
+    {
+      parse_frame_info (objfile, dwarf_frame_offset,
+			dwarf_frame_size, 0 /* = debug_frame */ );
+      after_debug_frame = 1;
+    }
+
+  if (dwarf_eh_frame_offset)
+    parse_frame_info (objfile, dwarf_eh_frame_offset, dwarf_eh_frame_size,
+		      1 /* = eh_frame */  + after_debug_frame);
+}
 
 /* Return the frame address.  */
 CORE_ADDR
-cfi_read_fp ()
+cfi_read_fp (void)
 {
   struct context *context;
   struct frame_state *fs;
   CORE_ADDR cfa;
 
+  unwind_tmp_obstack_init ();
+
   context = context_alloc ();
   fs = frame_state_alloc ();
 
@@ -1544,7 +1705,9 @@
   update_context (context, fs, 0);
 
   cfa = context->cfa;
+
   unwind_tmp_obstack_free ();
+
   return cfa;
 }
 
@@ -1556,6 +1719,8 @@
   struct context *context;
   struct frame_state *fs;
 
+  unwind_tmp_obstack_init ();
+
   context = context_alloc ();
   fs = frame_state_alloc ();
 
@@ -1579,11 +1744,9 @@
 void
 cfi_pop_frame (struct frame_info *fi)
 {
-  char regbuf[MAX_REGISTER_RAW_SIZE];
+  char *regbuf = alloca (MAX_REGISTER_RAW_SIZE);
   int regnum;
 
-  fi = get_current_frame ();
-
   for (regnum = 0; regnum < NUM_REGS; regnum++)
     {
       get_reg (regbuf, UNWIND_CONTEXT (fi), regnum);
@@ -1603,6 +1766,8 @@
   struct frame_state *fs;
   CORE_ADDR cfa;
 
+  unwind_tmp_obstack_init ();
+
   context = context_alloc ();
   fs = frame_state_alloc ();
   context_cpy (context, UNWIND_CONTEXT (fi));
@@ -1619,7 +1784,7 @@
 
   cfa = context->cfa;
   unwind_tmp_obstack_free ();
-  
+
   return cfa;
 }
 
@@ -1639,6 +1804,8 @@
 {
   struct frame_state *fs;
 
+  unwind_tmp_obstack_init ();
+
   fs = frame_state_alloc ();
   fi->context = frame_obstack_alloc (sizeof (struct context));
   UNWIND_CONTEXT (fi)->reg =
@@ -1658,6 +1825,7 @@
       frame_state_for (UNWIND_CONTEXT (fi), fs);
       update_context (UNWIND_CONTEXT (fi), fs, 0);
     }
+
   unwind_tmp_obstack_free ();
 }
 
@@ -1678,7 +1846,7 @@
 void
 cfi_get_saved_register (char *raw_buffer,
 			int *optimized,
-			CORE_ADDR * addrp,
+			CORE_ADDR *addrp,
 			struct frame_info *frame,
 			int regnum, enum lval_type *lval)
 {
@@ -1765,6 +1933,8 @@
   struct context *context;
   struct frame_state *fs;
 
+  unwind_tmp_obstack_init ();
+
   context = context_alloc ();
   fs = frame_state_alloc ();
 
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6c2b542..0d96e1f 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -658,6 +658,10 @@
 {
   "macro definition contains spaces in formal argument list:\n`%s'", 0, 0
 };
+static struct complaint dwarf2_invalid_attrib_class =
+{
+  "invalid attribute class or form for '%s' in '%s'", 0, 0
+};
 
 /* local function prototypes */
 
@@ -799,8 +803,7 @@
 					  struct type *, struct objfile *);
 
 static void dwarf2_add_member_fn (struct field_info *,
-				  struct die_info *, struct type *,
-				  struct objfile *objfile,
+				  struct die_info *, struct objfile *objfile,
 				  const struct comp_unit_head *);
 
 static void dwarf2_attach_fn_fields_to_type (struct field_info *,
@@ -907,6 +910,8 @@
                                  char *, bfd *, const struct comp_unit_head *,
                                  struct objfile *);
 
+static int attr_form_is_block (struct attribute *);
+
 /* Try to locate the sections we need for DWARF 2 debugging
    information and return true if we have enough to do something.  */
 
@@ -1004,9 +1009,13 @@
   dwarf_abbrev_buffer = dwarf2_read_section (objfile,
 					     dwarf_abbrev_offset,
 					     dwarf_abbrev_size);
-  dwarf_line_buffer = dwarf2_read_section (objfile,
-					   dwarf_line_offset,
-					   dwarf_line_size);
+
+  if (dwarf_line_offset)
+    dwarf_line_buffer = dwarf2_read_section (objfile,
+					     dwarf_line_offset,
+					     dwarf_line_size);
+  else
+    dwarf_line_buffer = NULL;
 
   if (dwarf_str_offset)
     dwarf_str_buffer = dwarf2_read_section (objfile,
@@ -1803,7 +1812,7 @@
      header, so we can only read it if we've read the header
      successfully.  */
   attr = dwarf_attr (die, DW_AT_macro_info);
-  if (attr)
+  if (attr && line_header)
     {
       unsigned int macro_offset = DW_UNSND (attr);
       dwarf_decode_macros (line_header, macro_offset,
@@ -1871,7 +1880,24 @@
   attr = dwarf_attr (die, DW_AT_frame_base);
   if (attr)
     {
-      CORE_ADDR addr = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+      CORE_ADDR addr;
+
+      /* Support the .debug_loc offsets */
+      if (attr_form_is_block (attr))
+        {
+          addr = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+        }
+      else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
+        {
+          complain (&dwarf2_complex_location_expr);
+          addr = 0;
+        }
+      else
+        {
+          complain (&dwarf2_invalid_attrib_class, "DW_AT_frame_base", name);
+          addr = 0;
+        }
+    
       if (isderef)
 	complain (&dwarf2_unsupported_at_frame_base, name);
       else if (isreg)
@@ -2233,7 +2259,7 @@
 
 static void
 dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
-		      struct type *type, struct objfile *objfile,
+		      struct objfile *objfile,
 		      const struct comp_unit_head *cu_header)
 {
   struct attribute *attr;
@@ -2299,23 +2325,13 @@
   if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC)
     {
       struct type *return_type = TYPE_TARGET_TYPE (die->type);
-      struct type **arg_types;
       int nparams = TYPE_NFIELDS (die->type);
-      int iparams;
 
-      /* Copy argument types from the subroutine type.  */
-      arg_types = (struct type **)
-	TYPE_ALLOC (fnp->type, (nparams + 1) * sizeof (struct type *));
-      for (iparams = 0; iparams < nparams; iparams++)
-	arg_types[iparams] = TYPE_FIELD_TYPE (die->type, iparams);
-
-      /* Set last entry in argument type vector.  */
-      if (TYPE_VARARGS (die->type))
-	arg_types[nparams] = NULL;
-      else
-	arg_types[nparams] = dwarf2_fundamental_type (objfile, FT_VOID);
-
-      smash_to_method_type (fnp->type, type, return_type, arg_types);
+      smash_to_method_type (fnp->type, die->type,
+			    TYPE_TARGET_TYPE (die->type),
+			    TYPE_FIELDS (die->type),
+			    TYPE_NFIELDS (die->type),
+			    TYPE_VARARGS (die->type));
 
       /* Handle static member functions.
          Dwarf2 has no clean way to discern C++ static and non-static
@@ -2359,7 +2375,22 @@
   /* Get index in virtual function table if it is a virtual member function.  */
   attr = dwarf_attr (die, DW_AT_vtable_elem_location);
   if (attr)
-    fnp->voffset = decode_locdesc (DW_BLOCK (attr), objfile, cu_header) + 2;
+    {
+      /* Support the .debug_loc offsets */
+      if (attr_form_is_block (attr))
+        {
+          fnp->voffset = decode_locdesc (DW_BLOCK (attr), objfile, cu_header) + 2;
+        }
+      else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
+        {
+          complain (&dwarf2_complex_location_expr);
+        }
+      else
+        {
+          complain (&dwarf2_invalid_attrib_class, "DW_AT_vtable_elem_location",
+                    fieldname);
+        }
+   }
 }
 
 /* Create the vector of member function fields, and attach it to the type.  */
@@ -2485,7 +2516,7 @@
 	    {
 	      /* C++ member function. */
 	      process_die (child_die, objfile, cu_header);
-	      dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header);
+	      dwarf2_add_member_fn (&fi, child_die, objfile, cu_header);
 	    }
 	  else if (child_die->tag == DW_TAG_inheritance)
 	    {
@@ -2823,7 +2854,20 @@
   attr = dwarf_attr (die, DW_AT_location);
   if (attr)
     {
-      base = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+      /* Support the .debug_loc offsets */
+      if (attr_form_is_block (attr))
+        {
+          base = decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+        }
+      else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8)
+        {
+          complain (&dwarf2_complex_location_expr);
+        }
+      else
+        {
+          complain (&dwarf2_invalid_attrib_class, "DW_AT_location",
+                    "common block member");
+        }
     }
   if (die->has_children)
     {
@@ -3469,7 +3513,20 @@
 	  part_die->highpc = DW_ADDR (&attr);
 	  break;
 	case DW_AT_location:
-	  part_die->locdesc = DW_BLOCK (&attr);
+          /* Support the .debug_loc offsets */
+          if (attr_form_is_block (&attr))
+            {
+	       part_die->locdesc = DW_BLOCK (&attr);
+            }
+          else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8)
+            {
+              complain (&dwarf2_complex_location_expr);
+            }
+          else
+            {
+              complain (&dwarf2_invalid_attrib_class, "DW_AT_location",
+                        "partial symbol information");
+            }
 	  break;
 	case DW_AT_language:
 	  part_die->language = DW_UNSND (&attr);
@@ -3810,12 +3867,25 @@
   return retval;
 }
 
-/* Reads the initial length from a section.  The (draft) DWARF 2.1
+/* Read the initial length from a section.  The (draft) DWARF 3
    specification allows the initial length to take up either 4 bytes
    or 12 bytes.  If the first 4 bytes are 0xffffffff, then the next 8
    bytes describe the length and all offsets will be 8 bytes in length
    instead of 4.
 
+   An older, non-standard 64-bit format is also handled by this
+   function.  The older format in question stores the initial length
+   as an 8-byte quantity without an escape value.  Lengths greater
+   than 2^32 aren't very common which means that the initial 4 bytes
+   is almost always zero.  Since a length value of zero doesn't make
+   sense for the 32-bit format, this initial zero can be considered to
+   be an escape value which indicates the presence of the older 64-bit
+   format.  As written, the code can't detect (old format) lengths
+   greater than 4GB.  If it becomes necessary to handle lengths somewhat
+   larger than 4GB, we could allow other small values (such as the
+   non-sensical values of 1, 2, and 3) to also be used as escape values
+   indicating the presence of the old format.
+
    The value returned via bytes_read should be used to increment
    the relevant pointer after calling read_initial_length().
    
@@ -3826,14 +3896,18 @@
    
    [ Note:  read_initial_length() and read_offset() are based on the
      document entitled "DWARF Debugging Information Format", revision
-     2.1, draft 4, dated July 20, 2000.  This document was obtained
+     3, draft 8, dated November 19, 2001.  This document was obtained
      from:
 
-	http://reality.sgi.com/dehnert_engr/dwarf/dwarf2p1-draft4-000720.pdf
+	http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf
      
      This document is only a draft and is subject to change.  (So beware.)
 
-     - Kevin, Aug 4, 2000
+     Details regarding the older, non-standard 64-bit format were
+     determined empirically by examining 64-bit ELF files produced
+     by the SGI toolchain on an IRIX 6.5 machine.
+
+     - Kevin, July 16, 2002
    ] */
 
 static LONGEST
@@ -3854,6 +3928,18 @@
 	  cu_header->offset_size = 8;
 	}
     }
+  else if (retval == 0)
+    {
+      /* Handle (non-standard) 64-bit DWARF2 formats such as that used
+         by IRIX.  */
+      retval = bfd_get_64 (abfd, (bfd_byte *) buf);
+      *bytes_read = 8;
+      if (cu_header != NULL)
+	{
+	  cu_header->initial_length_size = 8;
+	  cu_header->offset_size = 8;
+	}
+    }
   else
     {
       *bytes_read = 4;
@@ -4028,6 +4114,7 @@
       cu_language = language_java;
       break;
     case DW_LANG_Ada83:
+    case DW_LANG_Ada95:
     case DW_LANG_Cobol74:
     case DW_LANG_Cobol85:
     case DW_LANG_Pascal83:
@@ -4533,7 +4620,7 @@
   char *name;
   struct attribute *attr = NULL;
   struct attribute *attr2 = NULL;
-  CORE_ADDR addr;
+  CORE_ADDR addr = 0;
 
   name = dwarf2_linkage_name (die);
   if (name)
@@ -4617,8 +4704,22 @@
 	      attr2 = dwarf_attr (die, DW_AT_external);
 	      if (attr2 && (DW_UNSND (attr2) != 0))
 		{
-		  SYMBOL_VALUE_ADDRESS (sym) =
-		    decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+                  /* Support the .debug_loc offsets */
+                  if (attr_form_is_block (attr))
+                    {
+		      SYMBOL_VALUE_ADDRESS (sym) =
+		        decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+                    }
+                  else if (attr->form == DW_FORM_data4
+                           || attr->form == DW_FORM_data8)
+                    {
+                      complain (&dwarf2_complex_location_expr);
+                    }
+                  else
+                    {
+                      complain (&dwarf2_invalid_attrib_class, "DW_AT_location",
+                                "external variable");
+                    }
 		  add_symbol_to_list (sym, &global_symbols);
 
 		  /* In shared libraries the address of the variable
@@ -4641,8 +4742,23 @@
 		}
 	      else
 		{
-		  SYMBOL_VALUE (sym) = addr =
-		    decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+                  /* Support the .debug_loc offsets */
+                  if (attr_form_is_block (attr))
+                    {
+		      SYMBOL_VALUE (sym) = addr =
+		        decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
+                    }
+                  else if (attr->form == DW_FORM_data4
+                           || attr->form == DW_FORM_data8)
+                    {
+                      complain (&dwarf2_complex_location_expr);
+                    }
+                  else
+                    {
+                      complain (&dwarf2_invalid_attrib_class, "DW_AT_location",
+                                "external variable");
+                      addr = 0;
+                    }
 		  add_symbol_to_list (sym, list_in_scope);
 		  if (optimized_out)
 		    {
@@ -6246,12 +6362,6 @@
 	  isreg = 1;
 	  unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read);
 	  i += bytes_read;
-#if defined(HARRIS_TARGET) && defined(_M88K)
-	  /* The Harris 88110 gdb ports have long kept their special reg
-	     numbers between their gp-regs and their x-regs.  This is
-	     not how our dwarf is generated.  Punt. */
-	  unsnd += 6;
-#endif
 	  stack[++stacki] = unsnd;
 	  break;
 
@@ -6493,7 +6603,7 @@
      at all until we actually get a filename.  */
   if (! pending_macros)
     pending_macros = new_macro_table (&objfile->symbol_obstack,
-                                      &objfile->macro_cache);
+                                      objfile->macro_cache);
 
   if (! current_file)
     /* If we have no current file, then this must be the start_file
@@ -6811,3 +6921,15 @@
         }
     }
 }
+
+/* Check if the attribute's form is a DW_FORM_block*
+   if so return true else false. */
+static int
+attr_form_is_block (struct attribute *attr)
+{
+  return (attr == NULL ? 0 :
+      attr->form == DW_FORM_block1
+      || attr->form == DW_FORM_block2
+      || attr->form == DW_FORM_block4
+      || attr->form == DW_FORM_block);
+}
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index dc72f87..9c4201d 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -186,9 +186,9 @@
 #define LCC_PRODUCER "NCR C/C++"
 #endif
 
-#ifndef CHILL_PRODUCER
-#define CHILL_PRODUCER "GNU Chill "
-#endif
+/* OBSOLETE #ifndef CHILL_PRODUCER */
+/* OBSOLETE #define CHILL_PRODUCER "GNU Chill " */
+/* OBSOLETE #endif */
 
 /* Flags to target_to_host() that tell whether or not the data object is
    expected to be signed.  Used, for example, when fetching a signed
@@ -621,9 +621,9 @@
     case LANG_C_PLUS_PLUS:
       cu_language = language_cplus;
       break;
-    case LANG_CHILL:
-      cu_language = language_chill;
-      break;
+      /* OBSOLETE case LANG_CHILL: */
+      /* OBSOLETE   cu_language = language_chill; */
+      /* OBSOLETE   break; */
     case LANG_MODULA2:
       cu_language = language_m2;
       break;
@@ -1822,8 +1822,8 @@
   else
     {
       processing_gcc_compilation =
-	STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))
-	|| STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER));
+	STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER));
+      /* OBSOLETE || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER)); */
     }
 
   /* Select a demangling style if we can identify the producer and if
diff --git a/gdb/elfread.c b/gdb/elfread.c
index e76cd0d..7d37297 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -357,24 +357,14 @@
 			   || ((sym->flags & BSF_LOCAL)
 			       && sym->name[0] == '$'
 			       && sym->name[1] == 'L'))
-		    /* Looks like a compiler-generated label.  Skip it.
-		       The assembler should be skipping these (to keep
-		       executables small), but apparently with gcc on the
-		       delta m88k SVR4, it loses.  So to have us check too
-		       should be harmless (but I encourage people to fix this
-		       in the assembler instead of adding checks here).  */
+		    /* Looks like a compiler-generated label.  Skip
+		       it.  The assembler should be skipping these (to
+		       keep executables small), but apparently with
+		       gcc on the (OBSOLETE) delta m88k SVR4, it
+		       loses.  So to have us check too should be
+		       harmless (but I encourage people to fix this in
+		       the assembler instead of adding checks here).  */
 		    continue;
-#ifdef HARRIS_TARGET
-		  else if (sym->name[0] == '.' && sym->name[1] == '.')
-		    {
-		      /* Looks like a Harris compiler generated label for the
-		         purpose of marking instructions that are relevant to
-		         DWARF dies.  The assembler can't get rid of these 
-		         because they are relocatable addresses that the
-		         linker needs to resolve. */
-		      continue;
-		    }
-#endif
 		  else
 		    {
 		      ms_type = mst_file_text;
diff --git a/gdb/eval.c b/gdb/eval.c
index 4ff210b..33ec943 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -186,8 +186,8 @@
     return NULL;
 }
 
-/* This function evaluates tuples (in Chill) or brace-initializers
-   (in C/C++) for structure types.  */
+/* This function evaluates tuples (in (OBSOLETE) Chill) or
+   brace-initializers (in C/C++) for structure types.  */
 
 static struct value *
 evaluate_struct_tuple (struct value *struct_val,
@@ -325,13 +325,11 @@
   return struct_val;
 }
 
-/* Recursive helper function for setting elements of array tuples for Chill.
-   The target is ARRAY (which has bounds LOW_BOUND to HIGH_BOUND);
-   the element value is ELEMENT;
-   EXP, POS and NOSIDE are as usual.
-   Evaluates index expresions and sets the specified element(s) of
-   ARRAY to ELEMENT.
-   Returns last index value.  */
+/* Recursive helper function for setting elements of array tuples for
+   (OBSOLETE) Chill.  The target is ARRAY (which has bounds LOW_BOUND
+   to HIGH_BOUND); the element value is ELEMENT; EXP, POS and NOSIDE
+   are as usual.  Evaluates index expresions and sets the specified
+   element(s) of ARRAY to ELEMENT.  Returns last index value.  */
 
 static LONGEST
 init_array_element (struct value *array, struct value *element,
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index f098487..4e42d7e 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -22,7 +22,6 @@
 #include "defs.h"
 #include "event-loop.h"
 #include "event-top.h"
-#include "interps.h"
 
 #ifdef HAVE_POLL
 #if defined (HAVE_POLL_H)
@@ -394,23 +393,10 @@
      longer any event sources registered. */
   while (1)
     {
-      int gdb_result, interp_result;
-
-      gdb_result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
-      if (gdb_result < 0)
+      int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
+      if (result < 0)
 	break;
-
-      interp_result = catch_errors (interpreter_do_one_event, 0, "", RETURN_MASK_ALL);
-      if (interp_result < 0)
-        {
-          /* FIXME - kill the interpreter */
-        }
-
-      /* If we long-jumped out of do_one_event, we probably
-         didn't get around to resetting the prompt, which leaves
-         readline in a messed-up state. Reset it here. */
-
-      if (gdb_result == 0)
+      if (result == 0)
 	{
 	  /* FIXME: this should really be a call to a hook that is
 	     interface specific, because interfaces can display the
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 878e769..86c658d 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -26,7 +26,6 @@
 #include "terminal.h"		/* for job_control */
 #include "event-loop.h"
 #include "event-top.h"
-#include "interps.h"
 #include <signal.h>
 
 /* For dont_repeat() */
@@ -253,7 +252,7 @@
 
   /* When an alternative interpreter has been installed, do not
      display the comand prompt. */
-  if (gdb_interpreter_display_prompt (new_prompt))
+  if (interpreter_p)
     return;
 
   if (target_executing && sync_execution)
@@ -515,8 +514,10 @@
 	(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
       arg1->next = arg2;
       arg2->next = NULL;
-      arg1->data.integer = time_at_cmd_start;
-      arg2->data.integer = space_at_cmd_start;
+      arg1->data.longint = time_at_cmd_start;
+#ifdef HAVE_SBRK
+      arg2->data.longint = space_at_cmd_start;
+#endif
       add_continuation (command_line_handler_continuation, arg1);
     }
 
@@ -682,7 +683,7 @@
 
   xfree (rl);			/* Allocated in readline.  */
 
-  if (*(p - 1) == '\\')
+  if (p > linebuffer && *(p - 1) == '\\')
     {
       p--;			/* Put on top of '\'.  */
 
@@ -1112,31 +1113,14 @@
   PROMPT (0) = savestring (new_async_prompt, strlen (new_async_prompt));
 }
 
-void
-_initialize_event_loop (void)
-{
-  /* Tell gdb to use the cli_command_loop as the main loop. */
-  if (event_loop_p && command_loop_hook == NULL)
-    command_loop_hook = cli_command_loop;
-}
-
 /* Set things up for readline to be invoked via the alternate
    interface, i.e. via a callback function (rl_callback_read_char),
    and hook up instream to the event loop. */
 void
-gdb_setup_readline (void)
+_initialize_event_loop (void)
 {
-  /* This function is a noop for the async case.  The assumption is that
-     the async setup is ALL done in gdb_init, and we would only mess it up
-     here.  The async stuff should really go away over time. */
-
   if (event_loop_p)
     {
-      gdb_stdout = stdio_fileopen (stdout);
-      gdb_stderr = stdio_fileopen (stderr);
-      gdb_stdlog = gdb_stderr;  /* for moment */
-      gdb_stdtarg = gdb_stderr; /* for moment */
-
       /* If the input stream is connected to a terminal, turn on
          editing.  */
       if (ISATTY (instream))
@@ -1169,6 +1153,9 @@
          register it with the event loop. */
       input_fd = fileno (instream);
 
+      /* Tell gdb to use the cli_command_loop as the main loop. */
+      command_loop_hook = cli_command_loop;
+
       /* Now we need to create the event sources for the input file
          descriptor. */
       /* At this point in time, this is the only event source that we
@@ -1179,31 +1166,3 @@
       add_file_handler (input_fd, stdin_event_handler, 0);
     }
 }
-
-/* Disable command input through the standard CLI channels.  Used in
-   the suspend proc for interpreters that use the standard gdb readline
-   interface, like the cli & the mi. */
-
-void
-gdb_disable_readline (void)
-{
-  if (event_loop_p)
-    {
-      /* FIXME - It is too heavyweight to delete and remake these
-         every time you run an interpreter that needs readline.
-         It is probably better to have the interpreters cache these,
-         which in turn means that this needs to be moved into interpreter
-         specific code. */
-
-#if 0
-      ui_file_delete (gdb_stdout);
-      ui_file_delete (gdb_stderr);
-      gdb_stdlog = NULL;
-      gdb_stdtarg = NULL;
-#endif
-
-      rl_callback_handler_remove ();
-      delete_file_handler (input_fd);
-    }
-}
-
diff --git a/gdb/event-top.h b/gdb/event-top.h
index d8c0a96..24044a5 100644
--- a/gdb/event-top.h
+++ b/gdb/event-top.h
@@ -71,8 +71,6 @@
    FIXME: these should really go into top.h.  */
 
 extern void display_gdb_prompt (char *new_prompt);
-void gdb_setup_readline (void);
-void gdb_disable_readline (void);
 extern void async_init_signals (void);
 extern void set_async_editing_command (char *args, int from_tty,
 				       struct cmd_list_element *c);
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 09e7db6..9f3f171 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -217,8 +217,9 @@
 	}
       else
 	{
-	  int is_chill = exp->language_defn->la_language == language_chill;
-	  fputs_filtered (is_chill ? " [" : " {", stream);
+	  /* OBSOLETE int is_chill = exp->language_defn->la_language == language_chill; */
+	  /* OBSOLETE fputs_filtered (is_chill ? " [" : " {", stream); */
+	  fputs_filtered (" {", stream);
 	  for (tem = 0; tem < nargs; tem++)
 	    {
 	      if (tem != 0)
@@ -227,7 +228,8 @@
 		}
 	      print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
 	    }
-	  fputs_filtered (is_chill ? "]" : "}", stream);
+	  /* OBSOLETE fputs_filtered (is_chill ? "]" : "}", stream); */
+	  fputs_filtered ("}", stream);
 	}
       return;
 
@@ -235,15 +237,17 @@
       tem = longest_to_int (exp->elts[pc + 1].longconst);
       (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
 
-      if (exp->language_defn->la_language == language_chill)
-	{
-	  fputs_filtered (".", stream);
-	  fputs_filtered (&exp->elts[pc + 2].string, stream);
-	  fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", "
-			  : ": ",
-			  stream);
-	}
-      else
+#if 0
+      if (0 /* OBSOLETE exp->language_defn->la_language == language_chill */)
+	{ /* OBSOLETE */
+	  fputs_filtered (".", stream); /* OBSOLETE */
+	  fputs_filtered (&exp->elts[pc + 2].string, stream); /* OBSOLETE */
+	  fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", " /* OBSOLETE */
+			  : ": ", /* OBSOLETE */
+			  stream); /* OBSOLETE */
+	} /* OBSOLETE */
+      else /* OBSOLETE */
+#endif
 	{
 	  /* Gcc support both these syntaxes.  Unsure which is preferred.  */
 #if 1
diff --git a/gdb/expression.h b/gdb/expression.h
index 0fbab03..34e002f 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -109,10 +109,11 @@
        the second operand with itself that many times. */
     BINOP_CONCAT,
 
-    /* For Chill and Pascal. */
+    /* For (OBSOLETE) Chill (OBSOLETE) and Pascal. */
     BINOP_IN,			/* Returns 1 iff ARG1 IN ARG2. */
 
-    /* This is the "colon operator" used various places in Chill. */
+    /* This is the "colon operator" used various places in (OBSOLETE)
+       Chill (OBSOLETE). */
     BINOP_RANGE,
 
     /* This must be the highest BINOP_ value, for expprint.c.  */
@@ -121,12 +122,13 @@
     /* Operates on three values computed by following subexpressions.  */
     TERNOP_COND,		/* ?: */
 
-    /* A sub-string/sub-array.  Chill syntax:  OP1(OP2:OP3).
-       Return elements OP2 through OP3 of OP1.  */
+    /* A sub-string/sub-array.  (OBSOLETE) Chill (OBSOLETE) syntax:
+       OP1(OP2:OP3).  Return elements OP2 through OP3 of OP1.  */
     TERNOP_SLICE,
 
-    /* A sub-string/sub-array.  Chill syntax:  OP1(OP2 UP OP3).
-       Return OP3 elements of OP1, starting with element OP2. */
+    /* A sub-string/sub-array.  (OBSOLETE) Chill (OBSOLETE) syntax:
+       OP1(OP2 UP OP3).  Return OP3 elements of OP1, starting with
+       element OP2. */
     TERNOP_SLICE_COUNT,
 
     /* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
@@ -251,7 +253,7 @@
     UNOP_ODD,
     UNOP_TRUNC,
 
-    /* Chill builtin functions. */
+    /* (OBSOLETE) Chill (OBSOLETE) builtin functions. */
     UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN,
 
     OP_BOOL,			/* Modula-2 builtin BOOLEAN type */
@@ -281,12 +283,15 @@
        a string, which, of course, is variable length.  */
     OP_SCOPE,
 
-    /* Used to represent named structure field values in brace initializers
-       (or tuples as they are called in Chill).
-       The gcc C syntax is NAME:VALUE or .NAME=VALUE, the Chill syntax is
-       .NAME:VALUE.  Multiple labels (as in the Chill syntax
-       .NAME1,.NAME2:VALUE) is represented as if it were
-       .NAME1:(.NAME2:VALUE) (though that is not valid Chill syntax).
+    /* Used to represent named structure field values in brace
+       initializers (or tuples as they are called in (OBSOLETE) Chill
+       (OBSOLETE)).
+
+       The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (OBSOLETE)
+       Chill (OBSOLETE) syntax is .NAME:VALUE.  Multiple labels (as in
+       the (OBSOLETE) Chill (OBSOLETE) syntax .NAME1,.NAME2:VALUE) is
+       represented as if it were .NAME1:(.NAME2:VALUE) (though that is
+       not valid (OBSOLETE) Chill (OBSOLETE) syntax).
 
        The NAME is represented as for STRUCTOP_STRUCT;  VALUE follows. */
     OP_LABELED,
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index e1168772..a26f019 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -102,9 +102,11 @@
 #define yycheck	 f_yycheck
 
 #ifndef YYDEBUG
-#define	YYDEBUG	1		/* Default to no yydebug support */
+#define	YYDEBUG	1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index 2beae0f..2eba391 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -23,7 +23,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bfd.h"
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/fbsd-proc.c b/gdb/fbsd-proc.c
index c68238d..6c47979 100644
--- a/gdb/fbsd-proc.c
+++ b/gdb/fbsd-proc.c
@@ -21,6 +21,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
+#include "gdb_string.h"
 
 #include <sys/procfs.h>
 #include <sys/types.h>
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 831ae4b..d259132 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -47,12 +47,12 @@
 #endif
 
 LONGEST
-extract_signed_integer (void *addr, int len)
+extract_signed_integer (const void *addr, int len)
 {
   LONGEST retval;
-  unsigned char *p;
-  unsigned char *startaddr = (unsigned char *) addr;
-  unsigned char *endaddr = startaddr + len;
+  const unsigned char *p;
+  const unsigned char *startaddr = addr;
+  const unsigned char *endaddr = startaddr + len;
 
   if (len > (int) sizeof (LONGEST))
     error ("\
@@ -81,12 +81,12 @@
 }
 
 ULONGEST
-extract_unsigned_integer (void *addr, int len)
+extract_unsigned_integer (const void *addr, int len)
 {
   ULONGEST retval;
-  unsigned char *p;
-  unsigned char *startaddr = (unsigned char *) addr;
-  unsigned char *endaddr = startaddr + len;
+  const unsigned char *p;
+  const unsigned char *startaddr = addr;
+  const unsigned char *endaddr = startaddr + len;
 
   if (len > (int) sizeof (ULONGEST))
     error ("\
diff --git a/gdb/fr30-tdep.c b/gdb/fr30-tdep.c
index 09f886f..12e9f7e 100644
--- a/gdb/fr30-tdep.c
+++ b/gdb/fr30-tdep.c
@@ -1,601 +1,601 @@
-/* Target-dependent code for the Fujitsu FR30.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "obstack.h"
-#include "target.h"
-#include "value.h"
-#include "bfd.h"
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "symfile.h"
-#include "regcache.h"
-
-/* An expression that tells us whether the function invocation represented
-   by FI does not have a frame on the stack associated with it.  */
-int
-fr30_frameless_function_invocation (struct frame_info *fi)
-{
-  int frameless;
-  CORE_ADDR func_start, after_prologue;
-  func_start = (get_pc_function_start ((fi)->pc) +
-		FUNCTION_START_OFFSET);
-  after_prologue = func_start;
-  after_prologue = SKIP_PROLOGUE (after_prologue);
-  frameless = (after_prologue == func_start);
-  return frameless;
-}
-
-/* Function: pop_frame
-   This routine gets called when either the user uses the `return'
-   command, or the call dummy breakpoint gets hit.  */
-
-void
-fr30_pop_frame (void)
-{
-  struct frame_info *frame = get_current_frame ();
-  int regnum;
-  CORE_ADDR sp = read_register (SP_REGNUM);
-
-  if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
-    generic_pop_dummy_frame ();
-  else
-    {
-      write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-
-      for (regnum = 0; regnum < NUM_REGS; regnum++)
-	if (frame->fsr.regs[regnum] != 0)
-	  {
-	    write_register (regnum,
-		      read_memory_unsigned_integer (frame->fsr.regs[regnum],
-					       REGISTER_RAW_SIZE (regnum)));
-	  }
-      write_register (SP_REGNUM, sp + frame->framesize);
-    }
-  flush_cached_frames ();
-}
-
-
-/* Function: fr30_store_return_value
-   Put a value where a caller expects to see it.  Used by the 'return'
-   command.  */
-void
-fr30_store_return_value (struct type *type,
-			 char *valbuf)
-{
-  /* Here's how the FR30 returns values (gleaned from gcc/config/
-     fr30/fr30.h):
-
-     If the return value is 32 bits long or less, it goes in r4.
-
-     If the return value is 64 bits long or less, it goes in r4 (most
-     significant word) and r5 (least significant word.
-
-     If the function returns a structure, of any size, the caller
-     passes the function an invisible first argument where the callee
-     should store the value.  But GDB doesn't let you do that anyway.
-
-     If you're returning a value smaller than a word, it's not really
-     necessary to zero the upper bytes of the register; the caller is
-     supposed to ignore them.  However, the FR30 typically keeps its
-     values extended to the full register width, so we should emulate
-     that.  */
-
-  /* The FR30 is big-endian, so if we return a small value (like a
-     short or a char), we need to position it correctly within the
-     register.  We round the size up to a register boundary, and then
-     adjust the offset so as to place the value at the right end.  */
-  int value_size = TYPE_LENGTH (type);
-  int returned_size = (value_size + FR30_REGSIZE - 1) & ~(FR30_REGSIZE - 1);
-  int offset = (REGISTER_BYTE (RETVAL_REG)
-		+ (returned_size - value_size));
-  char *zeros = alloca (returned_size);
-  memset (zeros, 0, returned_size);
-
-  write_register_bytes (REGISTER_BYTE (RETVAL_REG), zeros, returned_size);
-  write_register_bytes (offset, valbuf, value_size);
-}
-
-
-/* Function: skip_prologue
-   Return the address of the first code past the prologue of the function.  */
-
-CORE_ADDR
-fr30_skip_prologue (CORE_ADDR pc)
-{
-  CORE_ADDR func_addr, func_end;
-
-  /* See what the symbol table says */
-
-  if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
-    {
-      struct symtab_and_line sal;
-
-      sal = find_pc_line (func_addr, 0);
-
-      if (sal.line != 0 && sal.end < func_end)
-	{
-	  return sal.end;
-	}
-    }
-
-/* Either we didn't find the start of this function (nothing we can do),
-   or there's no line info, or the line after the prologue is after
-   the end of the function (there probably isn't a prologue). */
-
-  return pc;
-}
-
-
-/* Function: push_arguments
-   Setup arguments and RP for a call to the target.  First four args
-   go in FIRST_ARGREG -> LAST_ARGREG, subsequent args go on stack...
-   Structs are passed by reference.  XXX not right now Z.R.
-   64 bit quantities (doubles and long longs) may be split between
-   the regs and the stack.
-   When calling a function that returns a struct, a pointer to the struct
-   is passed in as a secret first argument (always in FIRST_ARGREG).
-
-   Stack space for the args has NOT been allocated: that job is up to us.
- */
-
-CORE_ADDR
-fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-		     int struct_return, CORE_ADDR struct_addr)
-{
-  int argreg;
-  int argnum;
-  int stack_offset;
-  struct stack_arg
-    {
-      char *val;
-      int len;
-      int offset;
-    };
-  struct stack_arg *stack_args =
-  (struct stack_arg *) alloca (nargs * sizeof (struct stack_arg));
-  int nstack_args = 0;
-
-  argreg = FIRST_ARGREG;
-
-  /* the struct_return pointer occupies the first parameter-passing reg */
-  if (struct_return)
-    write_register (argreg++, struct_addr);
-
-  stack_offset = 0;
-
-  /* Process args from left to right.  Store as many as allowed in
-     registers, save the rest to be pushed on the stack */
-  for (argnum = 0; argnum < nargs; argnum++)
-    {
-      char *val;
-      struct value *arg = args[argnum];
-      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
-      struct type *target_type = TYPE_TARGET_TYPE (arg_type);
-      int len = TYPE_LENGTH (arg_type);
-      enum type_code typecode = TYPE_CODE (arg_type);
-      CORE_ADDR regval;
-      int newarg;
-
-      val = (char *) VALUE_CONTENTS (arg);
-
-      {
-	/* Copy the argument to general registers or the stack in
-	   register-sized pieces.  Large arguments are split between
-	   registers and stack.  */
-	while (len > 0)
-	  {
-	    if (argreg <= LAST_ARGREG)
-	      {
-		int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
-		regval = extract_address (val, partial_len);
-
-		/* It's a simple argument being passed in a general
-		   register.  */
-		write_register (argreg, regval);
-		argreg++;
-		len -= partial_len;
-		val += partial_len;
-	      }
-	    else
-	      {
-		/* keep for later pushing */
-		stack_args[nstack_args].val = val;
-		stack_args[nstack_args++].len = len;
-		break;
-	      }
-	  }
-      }
-    }
-  /* now do the real stack pushing, process args right to left */
-  while (nstack_args--)
-    {
-      sp -= stack_args[nstack_args].len;
-      write_memory (sp, stack_args[nstack_args].val,
-		    stack_args[nstack_args].len);
-    }
-
-  /* Return adjusted stack pointer.  */
-  return sp;
-}
-
-void _initialize_fr30_tdep (void);
-
-void
-_initialize_fr30_tdep (void)
-{
-  extern int print_insn_fr30 (bfd_vma, disassemble_info *);
-  tm_print_insn = print_insn_fr30;
-}
-
-/* Function: check_prologue_cache
-   Check if prologue for this frame's PC has already been scanned.
-   If it has, copy the relevant information about that prologue and
-   return non-zero.  Otherwise do not copy anything and return zero.
-
-   The information saved in the cache includes:
-   * the frame register number;
-   * the size of the stack frame;
-   * the offsets of saved regs (relative to the old SP); and
-   * the offset from the stack pointer to the frame pointer
-
-   The cache contains only one entry, since this is adequate
-   for the typical sequence of prologue scan requests we get.
-   When performing a backtrace, GDB will usually ask to scan
-   the same function twice in a row (once to get the frame chain,
-   and once to fill in the extra frame information).
- */
-
-static struct frame_info prologue_cache;
-
-static int
-check_prologue_cache (struct frame_info *fi)
-{
-  int i;
-
-  if (fi->pc == prologue_cache.pc)
-    {
-      fi->framereg = prologue_cache.framereg;
-      fi->framesize = prologue_cache.framesize;
-      fi->frameoffset = prologue_cache.frameoffset;
-      for (i = 0; i <= NUM_REGS; i++)
-	fi->fsr.regs[i] = prologue_cache.fsr.regs[i];
-      return 1;
-    }
-  else
-    return 0;
-}
-
-
-/* Function: save_prologue_cache
-   Copy the prologue information from fi to the prologue cache.
- */
-
-static void
-save_prologue_cache (struct frame_info *fi)
-{
-  int i;
-
-  prologue_cache.pc = fi->pc;
-  prologue_cache.framereg = fi->framereg;
-  prologue_cache.framesize = fi->framesize;
-  prologue_cache.frameoffset = fi->frameoffset;
-
-  for (i = 0; i <= NUM_REGS; i++)
-    {
-      prologue_cache.fsr.regs[i] = fi->fsr.regs[i];
-    }
-}
-
-
-/* Function: scan_prologue
-   Scan the prologue of the function that contains PC, and record what
-   we find in PI.  PI->fsr must be zeroed by the called.  Returns the
-   pc after the prologue.  Note that the addresses saved in pi->fsr
-   are actually just frame relative (negative offsets from the frame
-   pointer).  This is because we don't know the actual value of the
-   frame pointer yet.  In some circumstances, the frame pointer can't
-   be determined till after we have scanned the prologue.  */
-
-static void
-fr30_scan_prologue (struct frame_info *fi)
-{
-  int sp_offset, fp_offset;
-  CORE_ADDR prologue_start, prologue_end, current_pc;
-
-  /* Check if this function is already in the cache of frame information. */
-  if (check_prologue_cache (fi))
-    return;
-
-  /* Assume there is no frame until proven otherwise.  */
-  fi->framereg = SP_REGNUM;
-  fi->framesize = 0;
-  fi->frameoffset = 0;
-
-  /* Find the function prologue.  If we can't find the function in
-     the symbol table, peek in the stack frame to find the PC.  */
-  if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
-    {
-      /* Assume the prologue is everything between the first instruction
-         in the function and the first source line.  */
-      struct symtab_and_line sal = find_pc_line (prologue_start, 0);
-
-      if (sal.line == 0)	/* no line info, use current PC */
-	prologue_end = fi->pc;
-      else if (sal.end < prologue_end)	/* next line begins after fn end */
-	prologue_end = sal.end;	/* (probably means no prologue)  */
-    }
-  else
-    {
-      /* XXX Z.R. What now??? The following is entirely bogus */
-      prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
-      prologue_end = prologue_start + 40;
-    }
-
-  /* Now search the prologue looking for instructions that set up the
-     frame pointer, adjust the stack pointer, and save registers.  */
-
-  sp_offset = fp_offset = 0;
-  for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 2)
-    {
-      unsigned int insn;
-
-      insn = read_memory_unsigned_integer (current_pc, 2);
-
-      if ((insn & 0xfe00) == 0x8e00)	/* stm0 or stm1 */
-	{
-	  int reg, mask = insn & 0xff;
-
-	  /* scan in one sweep - create virtual 16-bit mask from either insn's mask */
-	  if ((insn & 0x0100) == 0)
-	    {
-	      mask <<= 8;	/* stm0 - move to upper byte in virtual mask */
-	    }
-
-	  /* Calculate offsets of saved registers (to be turned later into addresses). */
-	  for (reg = R4_REGNUM; reg <= R11_REGNUM; reg++)
-	    if (mask & (1 << (15 - reg)))
-	      {
-		sp_offset -= 4;
-		fi->fsr.regs[reg] = sp_offset;
-	      }
-	}
-      else if ((insn & 0xfff0) == 0x1700)	/* st rx,@-r15 */
-	{
-	  int reg = insn & 0xf;
-
-	  sp_offset -= 4;
-	  fi->fsr.regs[reg] = sp_offset;
-	}
-      else if ((insn & 0xff00) == 0x0f00)	/* enter */
-	{
-	  fp_offset = fi->fsr.regs[FP_REGNUM] = sp_offset - 4;
-	  sp_offset -= 4 * (insn & 0xff);
-	  fi->framereg = FP_REGNUM;
-	}
-      else if (insn == 0x1781)	/* st rp,@-sp */
-	{
-	  sp_offset -= 4;
-	  fi->fsr.regs[RP_REGNUM] = sp_offset;
-	}
-      else if (insn == 0x170e)	/* st fp,@-sp */
-	{
-	  sp_offset -= 4;
-	  fi->fsr.regs[FP_REGNUM] = sp_offset;
-	}
-      else if (insn == 0x8bfe)	/* mov sp,fp */
-	{
-	  fi->framereg = FP_REGNUM;
-	}
-      else if ((insn & 0xff00) == 0xa300)	/* addsp xx */
-	{
-	  sp_offset += 4 * (signed char) (insn & 0xff);
-	}
-      else if ((insn & 0xff0f) == 0x9b00 &&	/* ldi:20 xx,r0 */
-	       read_memory_unsigned_integer (current_pc + 4, 2)
-	       == 0xac0f)	/* sub r0,sp */
-	{
-	  /* large stack adjustment */
-	  sp_offset -= (((insn & 0xf0) << 12) | read_memory_unsigned_integer (current_pc + 2, 2));
-	  current_pc += 4;
-	}
-      else if (insn == 0x9f80 &&	/* ldi:32 xx,r0 */
-	       read_memory_unsigned_integer (current_pc + 6, 2)
-	       == 0xac0f)	/* sub r0,sp */
-	{
-	  /* large stack adjustment */
-	  sp_offset -=
-	    (read_memory_unsigned_integer (current_pc + 2, 2) << 16 |
-	     read_memory_unsigned_integer (current_pc + 4, 2));
-	  current_pc += 6;
-	}
-    }
-
-  /* The frame size is just the negative of the offset (from the original SP)
-     of the last thing thing we pushed on the stack.  The frame offset is
-     [new FP] - [new SP].  */
-  fi->framesize = -sp_offset;
-  fi->frameoffset = fp_offset - sp_offset;
-
-  save_prologue_cache (fi);
-}
-
-/* Function: init_extra_frame_info
-   Setup the frame's frame pointer, pc, and frame addresses for saved
-   registers.  Most of the work is done in scan_prologue().
-
-   Note that when we are called for the last frame (currently active frame),
-   that fi->pc and fi->frame will already be setup.  However, fi->frame will
-   be valid only if this routine uses FP.  For previous frames, fi-frame will
-   always be correct (since that is derived from fr30_frame_chain ()).
-
-   We can be called with the PC in the call dummy under two circumstances.
-   First, during normal backtracing, second, while figuring out the frame
-   pointer just prior to calling the target function (see run_stack_dummy).  */
-
-void
-fr30_init_extra_frame_info (struct frame_info *fi)
-{
-  int reg;
-
-  if (fi->next)
-    fi->pc = FRAME_SAVED_PC (fi->next);
-
-  memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
-
-  if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-    {
-      /* We need to setup fi->frame here because run_stack_dummy gets it wrong
-         by assuming it's always FP.  */
-      fi->frame = generic_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
-      fi->framesize = 0;
-      fi->frameoffset = 0;
-      return;
-    }
-  fr30_scan_prologue (fi);
-
-  if (!fi->next)		/* this is the innermost frame? */
-    fi->frame = read_register (fi->framereg);
-  else
-    /* not the innermost frame */
-    /* If we have an FP,  the callee saved it. */
-    if (fi->framereg == FP_REGNUM)
-      if (fi->next->fsr.regs[fi->framereg] != 0)
-	fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg], 4);
-
-  /* Calculate actual addresses of saved registers using offsets determined
-     by fr30_scan_prologue.  */
-  for (reg = 0; reg < NUM_REGS; reg++)
-    if (fi->fsr.regs[reg] != 0)
-      {
-	fi->fsr.regs[reg] += fi->frame + fi->framesize - fi->frameoffset;
-      }
-}
-
-/* Function: find_callers_reg
-   Find REGNUM on the stack.  Otherwise, it's in an active register.
-   One thing we might want to do here is to check REGNUM against the
-   clobber mask, and somehow flag it as invalid if it isn't saved on
-   the stack somewhere.  This would provide a graceful failure mode
-   when trying to get the value of caller-saves registers for an inner
-   frame.  */
-
-CORE_ADDR
-fr30_find_callers_reg (struct frame_info *fi, int regnum)
-{
-  for (; fi; fi = fi->next)
-    if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-      return generic_read_register_dummy (fi->pc, fi->frame, regnum);
-    else if (fi->fsr.regs[regnum] != 0)
-      return read_memory_unsigned_integer (fi->fsr.regs[regnum],
-					   REGISTER_RAW_SIZE (regnum));
-
-  return read_register (regnum);
-}
-
-
-/* Function: frame_chain
-   Figure out the frame prior to FI.  Unfortunately, this involves
-   scanning the prologue of the caller, which will also be done
-   shortly by fr30_init_extra_frame_info.  For the dummy frame, we
-   just return the stack pointer that was in use at the time the
-   function call was made.  */
-
-
-CORE_ADDR
-fr30_frame_chain (struct frame_info *fi)
-{
-  CORE_ADDR fn_start, callers_pc, fp;
-  struct frame_info caller_fi;
-  int framereg;
-
-  /* is this a dummy frame? */
-  if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-    return fi->frame;		/* dummy frame same as caller's frame */
-
-  /* is caller-of-this a dummy frame? */
-  callers_pc = FRAME_SAVED_PC (fi);	/* find out who called us: */
-  fp = fr30_find_callers_reg (fi, FP_REGNUM);
-  if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
-    return fp;			/* dummy frame's frame may bear no relation to ours */
-
-  if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
-    if (fn_start == entry_point_address ())
-      return 0;			/* in _start fn, don't chain further */
-
-  framereg = fi->framereg;
-
-  /* If the caller is the startup code, we're at the end of the chain.  */
-  if (find_pc_partial_function (callers_pc, 0, &fn_start, 0))
-    if (fn_start == entry_point_address ())
-      return 0;
-
-  memset (&caller_fi, 0, sizeof (caller_fi));
-  caller_fi.pc = callers_pc;
-  fr30_scan_prologue (&caller_fi);
-  framereg = caller_fi.framereg;
-
-  /* If the caller used a frame register, return its value.
-     Otherwise, return the caller's stack pointer.  */
-  if (framereg == FP_REGNUM)
-    return fr30_find_callers_reg (fi, framereg);
-  else
-    return fi->frame + fi->framesize;
-}
-
-/* Function: frame_saved_pc 
-   Find the caller of this frame.  We do this by seeing if RP_REGNUM
-   is saved in the stack anywhere, otherwise we get it from the
-   registers.  If the inner frame is a dummy frame, return its PC
-   instead of RP, because that's where "caller" of the dummy-frame
-   will be found.  */
-
-CORE_ADDR
-fr30_frame_saved_pc (struct frame_info *fi)
-{
-  if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-    return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
-  else
-    return fr30_find_callers_reg (fi, RP_REGNUM);
-}
-
-/* Function: fix_call_dummy
-   Pokes the callee function's address into the CALL_DUMMY assembly stub.
-   Assumes that the CALL_DUMMY looks like this:
-   jarl <offset24>, r31
-   trap
- */
-
-int
-fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
-		     struct value **args, struct type *type, int gcc_p)
-{
-  long offset24;
-
-  offset24 = (long) fun - (long) entry_point_address ();
-  offset24 &= 0x3fffff;
-  offset24 |= 0xff800000;	/* jarl <offset24>, r31 */
-
-  store_unsigned_integer ((unsigned int *) &dummy[2], 2, offset24 & 0xffff);
-  store_unsigned_integer ((unsigned int *) &dummy[0], 2, offset24 >> 16);
-  return 0;
-}
+// OBSOLETE /* Target-dependent code for the Fujitsu FR30.
+// OBSOLETE    Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "obstack.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE /* An expression that tells us whether the function invocation represented
+// OBSOLETE    by FI does not have a frame on the stack associated with it.  */
+// OBSOLETE int
+// OBSOLETE fr30_frameless_function_invocation (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   int frameless;
+// OBSOLETE   CORE_ADDR func_start, after_prologue;
+// OBSOLETE   func_start = (get_pc_function_start ((fi)->pc) +
+// OBSOLETE 		FUNCTION_START_OFFSET);
+// OBSOLETE   after_prologue = func_start;
+// OBSOLETE   after_prologue = SKIP_PROLOGUE (after_prologue);
+// OBSOLETE   frameless = (after_prologue == func_start);
+// OBSOLETE   return frameless;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: pop_frame
+// OBSOLETE    This routine gets called when either the user uses the `return'
+// OBSOLETE    command, or the call dummy breakpoint gets hit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30_pop_frame (void)
+// OBSOLETE {
+// OBSOLETE   struct frame_info *frame = get_current_frame ();
+// OBSOLETE   int regnum;
+// OBSOLETE   CORE_ADDR sp = read_register (SP_REGNUM);
+// OBSOLETE 
+// OBSOLETE   if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+// OBSOLETE     generic_pop_dummy_frame ();
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
+// OBSOLETE 
+// OBSOLETE       for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE 	if (frame->fsr.regs[regnum] != 0)
+// OBSOLETE 	  {
+// OBSOLETE 	    write_register (regnum,
+// OBSOLETE 		      read_memory_unsigned_integer (frame->fsr.regs[regnum],
+// OBSOLETE 					       REGISTER_RAW_SIZE (regnum)));
+// OBSOLETE 	  }
+// OBSOLETE       write_register (SP_REGNUM, sp + frame->framesize);
+// OBSOLETE     }
+// OBSOLETE   flush_cached_frames ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: fr30_store_return_value
+// OBSOLETE    Put a value where a caller expects to see it.  Used by the 'return'
+// OBSOLETE    command.  */
+// OBSOLETE void
+// OBSOLETE fr30_store_return_value (struct type *type,
+// OBSOLETE 			 char *valbuf)
+// OBSOLETE {
+// OBSOLETE   /* Here's how the FR30 returns values (gleaned from gcc/config/
+// OBSOLETE      fr30/fr30.h):
+// OBSOLETE 
+// OBSOLETE      If the return value is 32 bits long or less, it goes in r4.
+// OBSOLETE 
+// OBSOLETE      If the return value is 64 bits long or less, it goes in r4 (most
+// OBSOLETE      significant word) and r5 (least significant word.
+// OBSOLETE 
+// OBSOLETE      If the function returns a structure, of any size, the caller
+// OBSOLETE      passes the function an invisible first argument where the callee
+// OBSOLETE      should store the value.  But GDB doesn't let you do that anyway.
+// OBSOLETE 
+// OBSOLETE      If you're returning a value smaller than a word, it's not really
+// OBSOLETE      necessary to zero the upper bytes of the register; the caller is
+// OBSOLETE      supposed to ignore them.  However, the FR30 typically keeps its
+// OBSOLETE      values extended to the full register width, so we should emulate
+// OBSOLETE      that.  */
+// OBSOLETE 
+// OBSOLETE   /* The FR30 is big-endian, so if we return a small value (like a
+// OBSOLETE      short or a char), we need to position it correctly within the
+// OBSOLETE      register.  We round the size up to a register boundary, and then
+// OBSOLETE      adjust the offset so as to place the value at the right end.  */
+// OBSOLETE   int value_size = TYPE_LENGTH (type);
+// OBSOLETE   int returned_size = (value_size + FR30_REGSIZE - 1) & ~(FR30_REGSIZE - 1);
+// OBSOLETE   int offset = (REGISTER_BYTE (RETVAL_REG)
+// OBSOLETE 		+ (returned_size - value_size));
+// OBSOLETE   char *zeros = alloca (returned_size);
+// OBSOLETE   memset (zeros, 0, returned_size);
+// OBSOLETE 
+// OBSOLETE   write_register_bytes (REGISTER_BYTE (RETVAL_REG), zeros, returned_size);
+// OBSOLETE   write_register_bytes (offset, valbuf, value_size);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: skip_prologue
+// OBSOLETE    Return the address of the first code past the prologue of the function.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE fr30_skip_prologue (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR func_addr, func_end;
+// OBSOLETE 
+// OBSOLETE   /* See what the symbol table says */
+// OBSOLETE 
+// OBSOLETE   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+// OBSOLETE     {
+// OBSOLETE       struct symtab_and_line sal;
+// OBSOLETE 
+// OBSOLETE       sal = find_pc_line (func_addr, 0);
+// OBSOLETE 
+// OBSOLETE       if (sal.line != 0 && sal.end < func_end)
+// OBSOLETE 	{
+// OBSOLETE 	  return sal.end;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE /* Either we didn't find the start of this function (nothing we can do),
+// OBSOLETE    or there's no line info, or the line after the prologue is after
+// OBSOLETE    the end of the function (there probably isn't a prologue). */
+// OBSOLETE 
+// OBSOLETE   return pc;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: push_arguments
+// OBSOLETE    Setup arguments and RP for a call to the target.  First four args
+// OBSOLETE    go in FIRST_ARGREG -> LAST_ARGREG, subsequent args go on stack...
+// OBSOLETE    Structs are passed by reference.  XXX not right now Z.R.
+// OBSOLETE    64 bit quantities (doubles and long longs) may be split between
+// OBSOLETE    the regs and the stack.
+// OBSOLETE    When calling a function that returns a struct, a pointer to the struct
+// OBSOLETE    is passed in as a secret first argument (always in FIRST_ARGREG).
+// OBSOLETE 
+// OBSOLETE    Stack space for the args has NOT been allocated: that job is up to us.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+// OBSOLETE 		     int struct_return, CORE_ADDR struct_addr)
+// OBSOLETE {
+// OBSOLETE   int argreg;
+// OBSOLETE   int argnum;
+// OBSOLETE   int stack_offset;
+// OBSOLETE   struct stack_arg
+// OBSOLETE     {
+// OBSOLETE       char *val;
+// OBSOLETE       int len;
+// OBSOLETE       int offset;
+// OBSOLETE     };
+// OBSOLETE   struct stack_arg *stack_args =
+// OBSOLETE   (struct stack_arg *) alloca (nargs * sizeof (struct stack_arg));
+// OBSOLETE   int nstack_args = 0;
+// OBSOLETE 
+// OBSOLETE   argreg = FIRST_ARGREG;
+// OBSOLETE 
+// OBSOLETE   /* the struct_return pointer occupies the first parameter-passing reg */
+// OBSOLETE   if (struct_return)
+// OBSOLETE     write_register (argreg++, struct_addr);
+// OBSOLETE 
+// OBSOLETE   stack_offset = 0;
+// OBSOLETE 
+// OBSOLETE   /* Process args from left to right.  Store as many as allowed in
+// OBSOLETE      registers, save the rest to be pushed on the stack */
+// OBSOLETE   for (argnum = 0; argnum < nargs; argnum++)
+// OBSOLETE     {
+// OBSOLETE       char *val;
+// OBSOLETE       struct value *arg = args[argnum];
+// OBSOLETE       struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+// OBSOLETE       struct type *target_type = TYPE_TARGET_TYPE (arg_type);
+// OBSOLETE       int len = TYPE_LENGTH (arg_type);
+// OBSOLETE       enum type_code typecode = TYPE_CODE (arg_type);
+// OBSOLETE       CORE_ADDR regval;
+// OBSOLETE       int newarg;
+// OBSOLETE 
+// OBSOLETE       val = (char *) VALUE_CONTENTS (arg);
+// OBSOLETE 
+// OBSOLETE       {
+// OBSOLETE 	/* Copy the argument to general registers or the stack in
+// OBSOLETE 	   register-sized pieces.  Large arguments are split between
+// OBSOLETE 	   registers and stack.  */
+// OBSOLETE 	while (len > 0)
+// OBSOLETE 	  {
+// OBSOLETE 	    if (argreg <= LAST_ARGREG)
+// OBSOLETE 	      {
+// OBSOLETE 		int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE;
+// OBSOLETE 		regval = extract_address (val, partial_len);
+// OBSOLETE 
+// OBSOLETE 		/* It's a simple argument being passed in a general
+// OBSOLETE 		   register.  */
+// OBSOLETE 		write_register (argreg, regval);
+// OBSOLETE 		argreg++;
+// OBSOLETE 		len -= partial_len;
+// OBSOLETE 		val += partial_len;
+// OBSOLETE 	      }
+// OBSOLETE 	    else
+// OBSOLETE 	      {
+// OBSOLETE 		/* keep for later pushing */
+// OBSOLETE 		stack_args[nstack_args].val = val;
+// OBSOLETE 		stack_args[nstack_args++].len = len;
+// OBSOLETE 		break;
+// OBSOLETE 	      }
+// OBSOLETE 	  }
+// OBSOLETE       }
+// OBSOLETE     }
+// OBSOLETE   /* now do the real stack pushing, process args right to left */
+// OBSOLETE   while (nstack_args--)
+// OBSOLETE     {
+// OBSOLETE       sp -= stack_args[nstack_args].len;
+// OBSOLETE       write_memory (sp, stack_args[nstack_args].val,
+// OBSOLETE 		    stack_args[nstack_args].len);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Return adjusted stack pointer.  */
+// OBSOLETE   return sp;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void _initialize_fr30_tdep (void);
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_fr30_tdep (void)
+// OBSOLETE {
+// OBSOLETE   extern int print_insn_fr30 (bfd_vma, disassemble_info *);
+// OBSOLETE   tm_print_insn = print_insn_fr30;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: check_prologue_cache
+// OBSOLETE    Check if prologue for this frame's PC has already been scanned.
+// OBSOLETE    If it has, copy the relevant information about that prologue and
+// OBSOLETE    return non-zero.  Otherwise do not copy anything and return zero.
+// OBSOLETE 
+// OBSOLETE    The information saved in the cache includes:
+// OBSOLETE    * the frame register number;
+// OBSOLETE    * the size of the stack frame;
+// OBSOLETE    * the offsets of saved regs (relative to the old SP); and
+// OBSOLETE    * the offset from the stack pointer to the frame pointer
+// OBSOLETE 
+// OBSOLETE    The cache contains only one entry, since this is adequate
+// OBSOLETE    for the typical sequence of prologue scan requests we get.
+// OBSOLETE    When performing a backtrace, GDB will usually ask to scan
+// OBSOLETE    the same function twice in a row (once to get the frame chain,
+// OBSOLETE    and once to fill in the extra frame information).
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static struct frame_info prologue_cache;
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE check_prologue_cache (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   if (fi->pc == prologue_cache.pc)
+// OBSOLETE     {
+// OBSOLETE       fi->framereg = prologue_cache.framereg;
+// OBSOLETE       fi->framesize = prologue_cache.framesize;
+// OBSOLETE       fi->frameoffset = prologue_cache.frameoffset;
+// OBSOLETE       for (i = 0; i <= NUM_REGS; i++)
+// OBSOLETE 	fi->fsr.regs[i] = prologue_cache.fsr.regs[i];
+// OBSOLETE       return 1;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: save_prologue_cache
+// OBSOLETE    Copy the prologue information from fi to the prologue cache.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE save_prologue_cache (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   prologue_cache.pc = fi->pc;
+// OBSOLETE   prologue_cache.framereg = fi->framereg;
+// OBSOLETE   prologue_cache.framesize = fi->framesize;
+// OBSOLETE   prologue_cache.frameoffset = fi->frameoffset;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i <= NUM_REGS; i++)
+// OBSOLETE     {
+// OBSOLETE       prologue_cache.fsr.regs[i] = fi->fsr.regs[i];
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: scan_prologue
+// OBSOLETE    Scan the prologue of the function that contains PC, and record what
+// OBSOLETE    we find in PI.  PI->fsr must be zeroed by the called.  Returns the
+// OBSOLETE    pc after the prologue.  Note that the addresses saved in pi->fsr
+// OBSOLETE    are actually just frame relative (negative offsets from the frame
+// OBSOLETE    pointer).  This is because we don't know the actual value of the
+// OBSOLETE    frame pointer yet.  In some circumstances, the frame pointer can't
+// OBSOLETE    be determined till after we have scanned the prologue.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fr30_scan_prologue (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   int sp_offset, fp_offset;
+// OBSOLETE   CORE_ADDR prologue_start, prologue_end, current_pc;
+// OBSOLETE 
+// OBSOLETE   /* Check if this function is already in the cache of frame information. */
+// OBSOLETE   if (check_prologue_cache (fi))
+// OBSOLETE     return;
+// OBSOLETE 
+// OBSOLETE   /* Assume there is no frame until proven otherwise.  */
+// OBSOLETE   fi->framereg = SP_REGNUM;
+// OBSOLETE   fi->framesize = 0;
+// OBSOLETE   fi->frameoffset = 0;
+// OBSOLETE 
+// OBSOLETE   /* Find the function prologue.  If we can't find the function in
+// OBSOLETE      the symbol table, peek in the stack frame to find the PC.  */
+// OBSOLETE   if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
+// OBSOLETE     {
+// OBSOLETE       /* Assume the prologue is everything between the first instruction
+// OBSOLETE          in the function and the first source line.  */
+// OBSOLETE       struct symtab_and_line sal = find_pc_line (prologue_start, 0);
+// OBSOLETE 
+// OBSOLETE       if (sal.line == 0)	/* no line info, use current PC */
+// OBSOLETE 	prologue_end = fi->pc;
+// OBSOLETE       else if (sal.end < prologue_end)	/* next line begins after fn end */
+// OBSOLETE 	prologue_end = sal.end;	/* (probably means no prologue)  */
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* XXX Z.R. What now??? The following is entirely bogus */
+// OBSOLETE       prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
+// OBSOLETE       prologue_end = prologue_start + 40;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Now search the prologue looking for instructions that set up the
+// OBSOLETE      frame pointer, adjust the stack pointer, and save registers.  */
+// OBSOLETE 
+// OBSOLETE   sp_offset = fp_offset = 0;
+// OBSOLETE   for (current_pc = prologue_start; current_pc < prologue_end; current_pc += 2)
+// OBSOLETE     {
+// OBSOLETE       unsigned int insn;
+// OBSOLETE 
+// OBSOLETE       insn = read_memory_unsigned_integer (current_pc, 2);
+// OBSOLETE 
+// OBSOLETE       if ((insn & 0xfe00) == 0x8e00)	/* stm0 or stm1 */
+// OBSOLETE 	{
+// OBSOLETE 	  int reg, mask = insn & 0xff;
+// OBSOLETE 
+// OBSOLETE 	  /* scan in one sweep - create virtual 16-bit mask from either insn's mask */
+// OBSOLETE 	  if ((insn & 0x0100) == 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      mask <<= 8;	/* stm0 - move to upper byte in virtual mask */
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	  /* Calculate offsets of saved registers (to be turned later into addresses). */
+// OBSOLETE 	  for (reg = R4_REGNUM; reg <= R11_REGNUM; reg++)
+// OBSOLETE 	    if (mask & (1 << (15 - reg)))
+// OBSOLETE 	      {
+// OBSOLETE 		sp_offset -= 4;
+// OBSOLETE 		fi->fsr.regs[reg] = sp_offset;
+// OBSOLETE 	      }
+// OBSOLETE 	}
+// OBSOLETE       else if ((insn & 0xfff0) == 0x1700)	/* st rx,@-r15 */
+// OBSOLETE 	{
+// OBSOLETE 	  int reg = insn & 0xf;
+// OBSOLETE 
+// OBSOLETE 	  sp_offset -= 4;
+// OBSOLETE 	  fi->fsr.regs[reg] = sp_offset;
+// OBSOLETE 	}
+// OBSOLETE       else if ((insn & 0xff00) == 0x0f00)	/* enter */
+// OBSOLETE 	{
+// OBSOLETE 	  fp_offset = fi->fsr.regs[FP_REGNUM] = sp_offset - 4;
+// OBSOLETE 	  sp_offset -= 4 * (insn & 0xff);
+// OBSOLETE 	  fi->framereg = FP_REGNUM;
+// OBSOLETE 	}
+// OBSOLETE       else if (insn == 0x1781)	/* st rp,@-sp */
+// OBSOLETE 	{
+// OBSOLETE 	  sp_offset -= 4;
+// OBSOLETE 	  fi->fsr.regs[RP_REGNUM] = sp_offset;
+// OBSOLETE 	}
+// OBSOLETE       else if (insn == 0x170e)	/* st fp,@-sp */
+// OBSOLETE 	{
+// OBSOLETE 	  sp_offset -= 4;
+// OBSOLETE 	  fi->fsr.regs[FP_REGNUM] = sp_offset;
+// OBSOLETE 	}
+// OBSOLETE       else if (insn == 0x8bfe)	/* mov sp,fp */
+// OBSOLETE 	{
+// OBSOLETE 	  fi->framereg = FP_REGNUM;
+// OBSOLETE 	}
+// OBSOLETE       else if ((insn & 0xff00) == 0xa300)	/* addsp xx */
+// OBSOLETE 	{
+// OBSOLETE 	  sp_offset += 4 * (signed char) (insn & 0xff);
+// OBSOLETE 	}
+// OBSOLETE       else if ((insn & 0xff0f) == 0x9b00 &&	/* ldi:20 xx,r0 */
+// OBSOLETE 	       read_memory_unsigned_integer (current_pc + 4, 2)
+// OBSOLETE 	       == 0xac0f)	/* sub r0,sp */
+// OBSOLETE 	{
+// OBSOLETE 	  /* large stack adjustment */
+// OBSOLETE 	  sp_offset -= (((insn & 0xf0) << 12) | read_memory_unsigned_integer (current_pc + 2, 2));
+// OBSOLETE 	  current_pc += 4;
+// OBSOLETE 	}
+// OBSOLETE       else if (insn == 0x9f80 &&	/* ldi:32 xx,r0 */
+// OBSOLETE 	       read_memory_unsigned_integer (current_pc + 6, 2)
+// OBSOLETE 	       == 0xac0f)	/* sub r0,sp */
+// OBSOLETE 	{
+// OBSOLETE 	  /* large stack adjustment */
+// OBSOLETE 	  sp_offset -=
+// OBSOLETE 	    (read_memory_unsigned_integer (current_pc + 2, 2) << 16 |
+// OBSOLETE 	     read_memory_unsigned_integer (current_pc + 4, 2));
+// OBSOLETE 	  current_pc += 6;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* The frame size is just the negative of the offset (from the original SP)
+// OBSOLETE      of the last thing thing we pushed on the stack.  The frame offset is
+// OBSOLETE      [new FP] - [new SP].  */
+// OBSOLETE   fi->framesize = -sp_offset;
+// OBSOLETE   fi->frameoffset = fp_offset - sp_offset;
+// OBSOLETE 
+// OBSOLETE   save_prologue_cache (fi);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: init_extra_frame_info
+// OBSOLETE    Setup the frame's frame pointer, pc, and frame addresses for saved
+// OBSOLETE    registers.  Most of the work is done in scan_prologue().
+// OBSOLETE 
+// OBSOLETE    Note that when we are called for the last frame (currently active frame),
+// OBSOLETE    that fi->pc and fi->frame will already be setup.  However, fi->frame will
+// OBSOLETE    be valid only if this routine uses FP.  For previous frames, fi-frame will
+// OBSOLETE    always be correct (since that is derived from fr30_frame_chain ()).
+// OBSOLETE 
+// OBSOLETE    We can be called with the PC in the call dummy under two circumstances.
+// OBSOLETE    First, during normal backtracing, second, while figuring out the frame
+// OBSOLETE    pointer just prior to calling the target function (see run_stack_dummy).  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30_init_extra_frame_info (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   int reg;
+// OBSOLETE 
+// OBSOLETE   if (fi->next)
+// OBSOLETE     fi->pc = FRAME_SAVED_PC (fi->next);
+// OBSOLETE 
+// OBSOLETE   memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
+// OBSOLETE 
+// OBSOLETE   if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE     {
+// OBSOLETE       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
+// OBSOLETE          by assuming it's always FP.  */
+// OBSOLETE       fi->frame = generic_read_register_dummy (fi->pc, fi->frame, SP_REGNUM);
+// OBSOLETE       fi->framesize = 0;
+// OBSOLETE       fi->frameoffset = 0;
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE   fr30_scan_prologue (fi);
+// OBSOLETE 
+// OBSOLETE   if (!fi->next)		/* this is the innermost frame? */
+// OBSOLETE     fi->frame = read_register (fi->framereg);
+// OBSOLETE   else
+// OBSOLETE     /* not the innermost frame */
+// OBSOLETE     /* If we have an FP,  the callee saved it. */
+// OBSOLETE     if (fi->framereg == FP_REGNUM)
+// OBSOLETE       if (fi->next->fsr.regs[fi->framereg] != 0)
+// OBSOLETE 	fi->frame = read_memory_integer (fi->next->fsr.regs[fi->framereg], 4);
+// OBSOLETE 
+// OBSOLETE   /* Calculate actual addresses of saved registers using offsets determined
+// OBSOLETE      by fr30_scan_prologue.  */
+// OBSOLETE   for (reg = 0; reg < NUM_REGS; reg++)
+// OBSOLETE     if (fi->fsr.regs[reg] != 0)
+// OBSOLETE       {
+// OBSOLETE 	fi->fsr.regs[reg] += fi->frame + fi->framesize - fi->frameoffset;
+// OBSOLETE       }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: find_callers_reg
+// OBSOLETE    Find REGNUM on the stack.  Otherwise, it's in an active register.
+// OBSOLETE    One thing we might want to do here is to check REGNUM against the
+// OBSOLETE    clobber mask, and somehow flag it as invalid if it isn't saved on
+// OBSOLETE    the stack somewhere.  This would provide a graceful failure mode
+// OBSOLETE    when trying to get the value of caller-saves registers for an inner
+// OBSOLETE    frame.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE fr30_find_callers_reg (struct frame_info *fi, int regnum)
+// OBSOLETE {
+// OBSOLETE   for (; fi; fi = fi->next)
+// OBSOLETE     if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE       return generic_read_register_dummy (fi->pc, fi->frame, regnum);
+// OBSOLETE     else if (fi->fsr.regs[regnum] != 0)
+// OBSOLETE       return read_memory_unsigned_integer (fi->fsr.regs[regnum],
+// OBSOLETE 					   REGISTER_RAW_SIZE (regnum));
+// OBSOLETE 
+// OBSOLETE   return read_register (regnum);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Function: frame_chain
+// OBSOLETE    Figure out the frame prior to FI.  Unfortunately, this involves
+// OBSOLETE    scanning the prologue of the caller, which will also be done
+// OBSOLETE    shortly by fr30_init_extra_frame_info.  For the dummy frame, we
+// OBSOLETE    just return the stack pointer that was in use at the time the
+// OBSOLETE    function call was made.  */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE fr30_frame_chain (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR fn_start, callers_pc, fp;
+// OBSOLETE   struct frame_info caller_fi;
+// OBSOLETE   int framereg;
+// OBSOLETE 
+// OBSOLETE   /* is this a dummy frame? */
+// OBSOLETE   if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE     return fi->frame;		/* dummy frame same as caller's frame */
+// OBSOLETE 
+// OBSOLETE   /* is caller-of-this a dummy frame? */
+// OBSOLETE   callers_pc = FRAME_SAVED_PC (fi);	/* find out who called us: */
+// OBSOLETE   fp = fr30_find_callers_reg (fi, FP_REGNUM);
+// OBSOLETE   if (PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+// OBSOLETE     return fp;			/* dummy frame's frame may bear no relation to ours */
+// OBSOLETE 
+// OBSOLETE   if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
+// OBSOLETE     if (fn_start == entry_point_address ())
+// OBSOLETE       return 0;			/* in _start fn, don't chain further */
+// OBSOLETE 
+// OBSOLETE   framereg = fi->framereg;
+// OBSOLETE 
+// OBSOLETE   /* If the caller is the startup code, we're at the end of the chain.  */
+// OBSOLETE   if (find_pc_partial_function (callers_pc, 0, &fn_start, 0))
+// OBSOLETE     if (fn_start == entry_point_address ())
+// OBSOLETE       return 0;
+// OBSOLETE 
+// OBSOLETE   memset (&caller_fi, 0, sizeof (caller_fi));
+// OBSOLETE   caller_fi.pc = callers_pc;
+// OBSOLETE   fr30_scan_prologue (&caller_fi);
+// OBSOLETE   framereg = caller_fi.framereg;
+// OBSOLETE 
+// OBSOLETE   /* If the caller used a frame register, return its value.
+// OBSOLETE      Otherwise, return the caller's stack pointer.  */
+// OBSOLETE   if (framereg == FP_REGNUM)
+// OBSOLETE     return fr30_find_callers_reg (fi, framereg);
+// OBSOLETE   else
+// OBSOLETE     return fi->frame + fi->framesize;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: frame_saved_pc 
+// OBSOLETE    Find the caller of this frame.  We do this by seeing if RP_REGNUM
+// OBSOLETE    is saved in the stack anywhere, otherwise we get it from the
+// OBSOLETE    registers.  If the inner frame is a dummy frame, return its PC
+// OBSOLETE    instead of RP, because that's where "caller" of the dummy-frame
+// OBSOLETE    will be found.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE fr30_frame_saved_pc (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
+// OBSOLETE     return generic_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
+// OBSOLETE   else
+// OBSOLETE     return fr30_find_callers_reg (fi, RP_REGNUM);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Function: fix_call_dummy
+// OBSOLETE    Pokes the callee function's address into the CALL_DUMMY assembly stub.
+// OBSOLETE    Assumes that the CALL_DUMMY looks like this:
+// OBSOLETE    jarl <offset24>, r31
+// OBSOLETE    trap
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
+// OBSOLETE 		     struct value **args, struct type *type, int gcc_p)
+// OBSOLETE {
+// OBSOLETE   long offset24;
+// OBSOLETE 
+// OBSOLETE   offset24 = (long) fun - (long) entry_point_address ();
+// OBSOLETE   offset24 &= 0x3fffff;
+// OBSOLETE   offset24 |= 0xff800000;	/* jarl <offset24>, r31 */
+// OBSOLETE 
+// OBSOLETE   store_unsigned_integer ((unsigned int *) &dummy[2], 2, offset24 & 0xffff);
+// OBSOLETE   store_unsigned_integer ((unsigned int *) &dummy[0], 2, offset24 >> 16);
+// OBSOLETE   return 0;
+// OBSOLETE }
diff --git a/gdb/frame.c b/gdb/frame.c
index 24cd907..3b17bf5 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1,4 +1,4 @@
-/* Cache and manage the values of registers for GDB, the GNU debugger.
+/* Cache and manage frames for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
    2001, 2002 Free Software Foundation, Inc.
@@ -26,6 +26,57 @@
 #include "value.h"
 #include "inferior.h"	/* for inferior_ptid */
 #include "regcache.h"
+#include "gdb_assert.h"
+
+/* Return a frame uniq ID that can be used to, later re-find the
+   frame.  */
+
+void
+get_frame_id (struct frame_info *fi, struct frame_id *id)
+{
+  if (fi == NULL)
+    {
+      id->base = 0;
+      id->pc = 0;
+    }
+  else
+    {
+      id->base = FRAME_FP (fi);
+      id->pc = fi->pc;
+    }
+}
+
+struct frame_info *
+frame_find_by_id (struct frame_id id)
+{
+  struct frame_info *frame;
+
+  /* ZERO denotes the null frame, let the caller decide what to do
+     about it.  Should it instead return get_current_frame()?  */
+  if (id.base == 0 && id.pc == 0)
+    return NULL;
+
+  for (frame = get_current_frame ();
+       frame != NULL;
+       frame = get_prev_frame (frame))
+    {
+      if (INNER_THAN (FRAME_FP (frame), id.base))
+	/* ``inner/current < frame < id.base''.  Keep looking along
+           the frame chain.  */
+	continue;
+      if (INNER_THAN (id.base, FRAME_FP (frame)))
+	/* ``inner/current < id.base < frame''.  Oops, gone past it.
+           Just give up.  */
+	return NULL;
+      /* FIXME: cagney/2002-04-21: This isn't sufficient.  It should
+	 use id.pc to check that the two frames belong to the same
+	 function.  Otherwise we'll do things like match dummy frames
+	 or mis-match frameless functions.  However, until someone
+	 notices, stick with the existing behavour.  */
+      return frame;
+    }
+  return NULL;
+}
 
 /* FIND_SAVED_REGISTER ()
 
@@ -43,10 +94,9 @@
   if (frame == NULL)		/* No regs saved if want current frame */
     return 0;
 
-  /* Note that this next routine assumes that registers used in
-     frame x will be saved only in the frame that x calls and
-     frames interior to it.  This is not true on the sparc, but the
-     above macro takes care of it, so we should be all right. */
+  /* Note that the following loop assumes that registers used in
+     frame x will be saved only in the frame that x calls and frames
+     interior to it.  */
   while (1)
     {
       QUIT;
@@ -56,81 +106,105 @@
       frame = frame1;
       FRAME_INIT_SAVED_REGS (frame1);
       if (frame1->saved_regs[regnum])
-	addr = frame1->saved_regs[regnum];
+	{
+	  addr = frame1->saved_regs[regnum];
+	  break;
+	}
     }
 
   return addr;
 }
 
-/* DEFAULT_GET_SAVED_REGISTER ()
-
-   Find register number REGNUM relative to FRAME and put its (raw,
-   target format) contents in *RAW_BUFFER.  Set *OPTIMIZED if the
-   variable was optimized out (and thus can't be fetched).  Set *LVAL
-   to lval_memory, lval_register, or not_lval, depending on whether
-   the value was fetched from memory, from a register, or in a strange
-   and non-modifiable way (e.g. a frame pointer which was calculated
-   rather than fetched).  Set *ADDRP to the address, either in memory
-   on as a REGISTER_BYTE offset into the registers array.
-
-   Note that this implementation never sets *LVAL to not_lval.  But
-   it can be replaced by defining GET_SAVED_REGISTER and supplying
-   your own.
-
-   The argument RAW_BUFFER must point to aligned memory.  */
-
-static void
-default_get_saved_register (char *raw_buffer,
-			    int *optimized,
-			    CORE_ADDR *addrp,
-			    struct frame_info *frame,
-			    int regnum,
-			    enum lval_type *lval)
+void
+frame_register_unwind (struct frame_info *frame, int regnum,
+		       int *optimizedp, enum lval_type *lvalp,
+		       CORE_ADDR *addrp, int *realnump, void *bufferp)
 {
-  CORE_ADDR addr;
+  struct frame_unwind_cache *cache;
+
+  /* Require all but BUFFERP to be valid.  A NULL BUFFERP indicates
+     that the value proper does not need to be fetched.  */
+  gdb_assert (optimizedp != NULL);
+  gdb_assert (lvalp != NULL);
+  gdb_assert (addrp != NULL);
+  gdb_assert (realnump != NULL);
+  /* gdb_assert (bufferp != NULL); */
+
+  /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
+     special case, there was always an inner frame dedicated to the
+     hardware registers.  Unfortunatly, there is too much unwind code
+     around that looks up/down the frame chain while making the
+     assumption that each frame level is using the same unwind code.  */
+
+  if (frame == NULL)
+    {
+      /* We're in the inner-most frame, get the value direct from the
+	 register cache.  */
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      /* ULGH!  Code uses the offset into the raw register byte array
+         as a way of identifying a register.  */
+      *addrp = REGISTER_BYTE (regnum);
+      /* Should this code test ``register_cached (regnum) < 0'' and do
+         something like set realnum to -1 when the register isn't
+         available?  */
+      *realnump = regnum;
+      if (bufferp)
+	read_register_gen (regnum, bufferp);
+      return;
+    }
+
+  /* Ask this frame to unwind its register.  */
+  frame->register_unwind (frame, &frame->register_unwind_cache, regnum,
+			  optimizedp, lvalp, addrp, realnump, bufferp);
+}
+
+
+void
+generic_unwind_get_saved_register (char *raw_buffer,
+				   int *optimizedp,
+				   CORE_ADDR *addrp,
+				   struct frame_info *frame,
+				   int regnum,
+				   enum lval_type *lvalp)
+{
+  int optimizedx;
+  CORE_ADDR addrx;
+  int realnumx;
+  enum lval_type lvalx;
 
   if (!target_has_registers)
     error ("No registers.");
 
-  /* Normal systems don't optimize out things with register numbers.  */
-  if (optimized != NULL)
-    *optimized = 0;
-  addr = find_saved_register (frame, regnum);
-  if (addr != 0)
-    {
-      if (lval != NULL)
-	*lval = lval_memory;
-      if (regnum == SP_REGNUM)
-	{
-	  if (raw_buffer != NULL)
-	    {
-	      /* Put it back in target format.  */
-	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			     (LONGEST) addr);
-	    }
-	  if (addrp != NULL)
-	    *addrp = 0;
-	  return;
-	}
-      if (raw_buffer != NULL)
-	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  else
-    {
-      if (lval != NULL)
-	*lval = lval_register;
-      addr = REGISTER_BYTE (regnum);
-      if (raw_buffer != NULL)
-	read_register_gen (regnum, raw_buffer);
-    }
-  if (addrp != NULL)
-    *addrp = addr;
-}
+  /* Keep things simple, ensure that all the pointers (except valuep)
+     are non NULL.  */
+  if (optimizedp == NULL)
+    optimizedp = &optimizedx;
+  if (lvalp == NULL)
+    lvalp = &lvalx;
+  if (addrp == NULL)
+    addrp = &addrx;
 
-#if !defined (GET_SAVED_REGISTER)
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-  default_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)
-#endif
+  /* Reached the the bottom (youngest, inner most) of the frame chain
+     (youngest, inner most) frame, go direct to the hardware register
+     cache (do not pass go, do not try to cache the value, ...).  The
+     unwound value would have been cached in frame->next but that
+     doesn't exist.  This doesn't matter as the hardware register
+     cache is stopping any unnecessary accesses to the target.  */
+
+  /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
+     special case, there was always an inner frame dedicated to the
+     hardware registers.  Unfortunatly, there is too much unwind code
+     around that looks up/down the frame chain while making the
+     assumption that each frame level is using the same unwind code.  */
+
+  if (frame == NULL)
+    frame_register_unwind (NULL, regnum, optimizedp, lvalp, addrp, &realnumx,
+			   raw_buffer);
+  else
+    frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+			   &realnumx, raw_buffer);
+}
 
 void
 get_saved_register (char *raw_buffer,
diff --git a/gdb/frame.h b/gdb/frame.h
index f0631b0..20ffff0 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -23,6 +23,29 @@
 #if !defined (FRAME_H)
 #define FRAME_H 1
 
+/* Return the location (and possibly value) of REGNUM for the previous
+   (older, up) frame.  All parameters except VALUEP can be assumed to
+   be non NULL.  When VALUEP is NULL, just the location of the
+   register should be returned.
+
+   UNWIND_CACHE is provided as mechanism for implementing a per-frame
+   local cache.  It's initial value being NULL.  Memory for that cache
+   should be allocated using frame_obstack_alloc().
+
+   Register window architectures (eg SPARC) should note that REGNUM
+   identifies the register for the previous frame.  For instance, a
+   request for the value of "o1" for the previous frame would be found
+   in the register "i1" in this FRAME.  */
+
+typedef void (frame_register_unwind_ftype) (struct frame_info *frame,
+					    void **unwind_cache,
+					    int regnum,
+					    int *optimized,
+					    enum lval_type *lvalp,
+					    CORE_ADDR *addrp,
+					    int *realnump,
+					    void *valuep);
+
 /* Describe the saved registers of a frame.  */
 
 #if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS)
@@ -110,7 +133,12 @@
 
     /* If dwarf2 unwind frame informations is used, this structure holds all
        related unwind data.  */
-    struct unwind_contect *context;
+    struct context *context;
+
+    /* See description above.  Return the register value for the
+       previous frame.  */
+    frame_register_unwind_ftype *register_unwind;
+    void *register_unwind_cache;
 
     /* Pointers to the next (down, inner) and previous (up, outer)
        frame_info's in the frame cache.  */
@@ -222,6 +250,8 @@
 
 extern CORE_ADDR get_frame_pc (struct frame_info *);
 
+extern CORE_ADDR frame_address_in_block (struct frame_info *);
+
 extern CORE_ADDR get_pc_function_start (CORE_ADDR);
 
 extern struct block *block_for_pc (CORE_ADDR);
@@ -246,7 +276,21 @@
 
 extern void select_frame (struct frame_info *);
 
-extern void record_selected_frame (CORE_ADDR *, int *);
+/* Return an ID that can be used to re-find a frame.  */
+
+struct frame_id
+{
+  /* The frame's address.  This should be constant through out the
+     lifetime of a frame.  */
+  CORE_ADDR base;
+  /* The frame's current PC.  While this changes, the function that
+     the PC falls into, does not.  */
+  CORE_ADDR pc;
+};
+
+extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
+
+extern struct frame_info *frame_find_by_id (struct frame_id id);
 
 extern void print_frame_info (struct frame_info *, int, int, int);
 
@@ -268,7 +312,13 @@
 
 extern int generic_pc_in_call_dummy (CORE_ADDR pc,
 				     CORE_ADDR sp, CORE_ADDR fp);
-extern char *generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
+
+/* NOTE: cagney/2002-06-26: Targets should no longer use this
+   function.  Instead, the contents of a dummy frames registers can be
+   obtained by applying: frame_register_unwind to the dummy frame; or
+   get_saved_register to the next outer frame.  */
+
+extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
 
 extern void generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
 				    int nargs, struct value **args,
@@ -278,6 +328,22 @@
 					struct frame_info *, int,
 					enum lval_type *);
 
+extern void generic_unwind_get_saved_register (char *raw_buffer,
+					       int *optimized,
+					       CORE_ADDR * addrp,
+					       struct frame_info *frame,
+					       int regnum,
+					       enum lval_type *lval);
+
+/* Unwind the stack frame so that the value of REGNUM, in the previous
+   frame is returned.  If VALUEP is NULL, don't fetch/compute the
+   value.  Instead just return the location of the value.  */
+
+extern void frame_register_unwind (struct frame_info *frame, int regnum,
+				   int *optimizedp, enum lval_type *lvalp,
+				   CORE_ADDR *addrp, int *realnump,
+				   void *valuep);
+
 extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
 
 extern void get_saved_register (char *raw_buffer, int *optimized,
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
new file mode 100644
index 0000000..933faa1
--- /dev/null
+++ b/gdb/frv-tdep.c
@@ -0,0 +1,1173 @@
+/* Target-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 "defs.h"
+#include "inferior.h"
+#include "symfile.h"		/* for entry_point_address */
+#include "gdbcore.h"
+#include "arch-utils.h"
+#include "regcache.h"
+
+extern void _initialize_frv_tdep (void);
+
+static gdbarch_init_ftype frv_gdbarch_init;
+
+static gdbarch_register_name_ftype frv_register_name;
+static gdbarch_register_raw_size_ftype frv_register_raw_size;
+static gdbarch_register_virtual_size_ftype frv_register_virtual_size;
+static gdbarch_register_virtual_type_ftype frv_register_virtual_type;
+static gdbarch_register_byte_ftype frv_register_byte;
+static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc;
+static gdbarch_frame_chain_ftype frv_frame_chain;
+static gdbarch_frame_saved_pc_ftype frv_frame_saved_pc;
+static gdbarch_skip_prologue_ftype frv_skip_prologue;
+static gdbarch_frame_init_saved_regs_ftype frv_frame_init_saved_regs;
+static gdbarch_deprecated_extract_return_value_ftype frv_extract_return_value;
+static gdbarch_deprecated_extract_struct_value_address_ftype frv_extract_struct_value_address;
+static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
+static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
+static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
+static gdbarch_store_struct_return_ftype frv_store_struct_return;
+static gdbarch_push_arguments_ftype frv_push_arguments;
+static gdbarch_push_return_address_ftype frv_push_return_address;
+static gdbarch_pop_frame_ftype frv_pop_frame;
+static gdbarch_saved_pc_after_call_ftype frv_saved_pc_after_call;
+
+static void frv_pop_frame_regular (struct frame_info *frame);
+
+/* Register numbers.  You can change these as needed, but don't forget
+   to update the simulator accordingly.  */
+enum {
+  /* The total number of registers we know exist.  */
+  frv_num_regs = 147,
+
+  /* Register numbers 0 -- 63 are always reserved for general-purpose
+     registers.  The chip at hand may have less.  */
+  first_gpr_regnum = 0,
+  sp_regnum = 1,
+  fp_regnum = 2,
+  struct_return_regnum = 3,
+  last_gpr_regnum = 63,
+
+  /* Register numbers 64 -- 127 are always reserved for floating-point
+     registers.  The chip at hand may have less.  */
+  first_fpr_regnum = 64,
+  last_fpr_regnum = 127,
+
+  /* Register numbers 128 on up are always reserved for special-purpose
+     registers.  */
+  first_spr_regnum = 128,
+  pc_regnum = 128,
+  psr_regnum = 129,
+  ccr_regnum = 130,
+  cccr_regnum = 131,
+  tbr_regnum = 135,
+  brr_regnum = 136,
+  dbar0_regnum = 137,
+  dbar1_regnum = 138,
+  dbar2_regnum = 139,
+  dbar3_regnum = 140,
+  lr_regnum = 145,
+  lcr_regnum = 146,
+  last_spr_regnum = 146
+};
+
+static LONGEST frv_call_dummy_words[] =
+{0};
+
+
+/* The contents of this structure can only be trusted after we've
+   frv_frame_init_saved_regs on the frame.  */
+struct frame_extra_info
+  {
+    /* The offset from our frame pointer to our caller's stack
+       pointer.  */
+    int fp_to_callers_sp_offset;
+
+    /* Non-zero if we've saved our return address on the stack yet.
+       Zero if it's still sitting in the link register.  */
+    int lr_saved_on_stack;
+  };
+
+
+/* A structure describing a particular variant of the FRV.
+   We allocate and initialize one of these structures when we create
+   the gdbarch object for a variant.
+
+   At the moment, all the FR variants we support differ only in which
+   registers are present; the portable code of GDB knows that
+   registers whose names are the empty string don't exist, so the
+   `register_names' array captures all the per-variant information we
+   need.
+
+   in the future, if we need to have per-variant maps for raw size,
+   virtual type, etc., we should replace register_names with an array
+   of structures, each of which gives all the necessary info for one
+   register.  Don't stick parallel arrays in here --- that's so
+   Fortran.  */
+struct gdbarch_tdep
+{
+  /* How many general-purpose registers does this variant have?  */
+  int num_gprs;
+
+  /* How many floating-point registers does this variant have?  */
+  int num_fprs;
+
+  /* How many hardware watchpoints can it support?  */
+  int num_hw_watchpoints;
+
+  /* How many hardware breakpoints can it support?  */
+  int num_hw_breakpoints;
+
+  /* Register names.  */
+  char **register_names;
+};
+
+#define CURRENT_VARIANT (gdbarch_tdep (current_gdbarch))
+
+
+/* Allocate a new variant structure, and set up default values for all
+   the fields.  */
+static struct gdbarch_tdep *
+new_variant (void)
+{
+  struct gdbarch_tdep *var;
+  int r;
+  char buf[20];
+
+  var = xmalloc (sizeof (*var));
+  memset (var, 0, sizeof (*var));
+  
+  var->num_gprs = 64;
+  var->num_fprs = 64;
+  var->num_hw_watchpoints = 0;
+  var->num_hw_breakpoints = 0;
+
+  /* By default, don't supply any general-purpose or floating-point
+     register names.  */
+  var->register_names = (char **) xmalloc (frv_num_regs * sizeof (char *));
+  for (r = 0; r < frv_num_regs; r++)
+    var->register_names[r] = "";
+
+  /* Do, however, supply default names for the special-purpose
+     registers.  */
+  for (r = first_spr_regnum; r <= last_spr_regnum; ++r)
+    {
+      sprintf (buf, "x%d", r);
+      var->register_names[r] = xstrdup (buf);
+    }
+
+  var->register_names[pc_regnum] = "pc";
+  var->register_names[lr_regnum] = "lr";
+  var->register_names[lcr_regnum] = "lcr";
+     
+  var->register_names[psr_regnum] = "psr";
+  var->register_names[ccr_regnum] = "ccr";
+  var->register_names[cccr_regnum] = "cccr";
+  var->register_names[tbr_regnum] = "tbr";
+
+  /* Debug registers.  */
+  var->register_names[brr_regnum] = "brr";
+  var->register_names[dbar0_regnum] = "dbar0";
+  var->register_names[dbar1_regnum] = "dbar1";
+  var->register_names[dbar2_regnum] = "dbar2";
+  var->register_names[dbar3_regnum] = "dbar3";
+
+  return var;
+}
+
+
+/* Indicate that the variant VAR has NUM_GPRS general-purpose
+   registers, and fill in the names array appropriately.  */
+static void
+set_variant_num_gprs (struct gdbarch_tdep *var, int num_gprs)
+{
+  int r;
+
+  var->num_gprs = num_gprs;
+
+  for (r = 0; r < num_gprs; ++r)
+    {
+      char buf[20];
+
+      sprintf (buf, "gr%d", r);
+      var->register_names[first_gpr_regnum + r] = xstrdup (buf);
+    }
+}
+
+
+/* Indicate that the variant VAR has NUM_FPRS floating-point
+   registers, and fill in the names array appropriately.  */
+static void
+set_variant_num_fprs (struct gdbarch_tdep *var, int num_fprs)
+{
+  int r;
+
+  var->num_fprs = num_fprs;
+
+  for (r = 0; r < num_fprs; ++r)
+    {
+      char buf[20];
+
+      sprintf (buf, "fr%d", r);
+      var->register_names[first_fpr_regnum + r] = xstrdup (buf);
+    }
+}
+
+
+static const char *
+frv_register_name (int reg)
+{
+  if (reg < 0)
+    return "?toosmall?";
+  if (reg >= frv_num_regs)
+    return "?toolarge?";
+
+  return CURRENT_VARIANT->register_names[reg];
+}
+
+
+static int
+frv_register_raw_size (int reg)
+{
+  return 4;
+}
+
+static int
+frv_register_virtual_size (int reg)
+{
+  return 4;
+}
+
+static struct type *
+frv_register_virtual_type (int reg)
+{
+  if (reg >= 64 && reg <= 127)
+    return builtin_type_float;
+  else
+    return builtin_type_int;
+}
+
+static int
+frv_register_byte (int reg)
+{
+  return (reg * 4);
+}
+
+static const unsigned char *
+frv_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenp)
+{
+  static unsigned char breakpoint[] = {0xc0, 0x70, 0x00, 0x01};
+  *lenp = sizeof (breakpoint);
+  return breakpoint;
+}
+
+static CORE_ADDR
+frv_frame_chain (struct frame_info *frame)
+{
+  CORE_ADDR saved_fp_addr;
+
+  if (frame->saved_regs && frame->saved_regs[fp_regnum] != 0)
+    saved_fp_addr = frame->saved_regs[fp_regnum];
+  else
+    /* Just assume it was saved in the usual place.  */
+    saved_fp_addr = frame->frame;
+
+  return read_memory_integer (saved_fp_addr, 4);
+}
+
+static CORE_ADDR
+frv_frame_saved_pc (struct frame_info *frame)
+{
+  frv_frame_init_saved_regs (frame);
+
+  /* Perhaps the prologue analyzer recorded where it was stored.
+     (As of 14 Oct 2001, it never does.)  */
+  if (frame->saved_regs && frame->saved_regs[pc_regnum] != 0)
+    return read_memory_integer (frame->saved_regs[pc_regnum], 4);
+
+  /* If the prologue analyzer tells us the link register was saved on
+     the stack, get it from there.  */
+  if (frame->extra_info->lr_saved_on_stack)
+    return read_memory_integer (frame->frame + 8, 4);
+
+  /* Otherwise, it's still in LR.
+     However, if FRAME isn't the youngest frame, this is kind of
+     suspicious --- if this frame called somebody else, then its LR
+     has certainly been overwritten.  */
+  if (! frame->next)
+    return read_register (lr_regnum);
+
+  /* By default, assume it's saved in the standard place, relative to
+     the frame pointer.  */
+  return read_memory_integer (frame->frame + 8, 4);
+}
+
+
+/* Return true if REG is a caller-saves ("scratch") register,
+   false otherwise.  */
+static int
+is_caller_saves_reg (int reg)
+{
+  return ((4 <= reg && reg <= 7)
+          || (14 <= reg && reg <= 15)
+          || (32 <= reg && reg <= 47));
+}
+
+
+/* Return true if REG is a callee-saves register, false otherwise.  */
+static int
+is_callee_saves_reg (int reg)
+{
+  return ((16 <= reg && reg <= 31)
+          || (48 <= reg && reg <= 63));
+}
+
+
+/* Return true if REG is an argument register, false otherwise.  */
+static int
+is_argument_reg (int reg)
+{
+  return (8 <= reg && reg <= 13);
+}
+
+
+/* Scan an FR-V prologue, starting at PC, until frame->PC.
+   If FRAME is non-zero, fill in its saved_regs with appropriate addresses.
+   We assume FRAME's saved_regs array has already been allocated and cleared.
+   Return the first PC value after the prologue.
+
+   Note that, for unoptimized code, we almost don't need this function
+   at all; all arguments and locals live on the stack, so we just need
+   the FP to find everything.  The catch: structures passed by value
+   have their addresses living in registers; they're never spilled to
+   the stack.  So if you ever want to be able to get to these
+   arguments in any frame but the top, you'll need to do this serious
+   prologue analysis.  */
+static CORE_ADDR
+frv_analyze_prologue (CORE_ADDR pc, struct frame_info *frame)
+{
+  /* When writing out instruction bitpatterns, we use the following
+     letters to label instruction fields:
+     P - The parallel bit.  We don't use this.
+     J - The register number of GRj in the instruction description.
+     K - The register number of GRk in the instruction description.
+     I - The register number of GRi.
+     S - a signed imediate offset.
+     U - an unsigned immediate offset.
+
+     The dots below the numbers indicate where hex digit boundaries
+     fall, to make it easier to check the numbers.  */
+
+  /* Non-zero iff we've seen the instruction that initializes the
+     frame pointer for this function's frame.  */
+  int fp_set = 0;
+
+  /* If fp_set is non_zero, then this is the distance from
+     the stack pointer to frame pointer: fp = sp + fp_offset.  */
+  int fp_offset = 0;
+
+  /* Total size of frame prior to any alloca operations. */
+  int framesize = 0;
+
+  /* The number of the general-purpose register we saved the return
+     address ("link register") in, or -1 if we haven't moved it yet.  */
+  int lr_save_reg = -1;
+
+  /* Non-zero iff we've saved the LR onto the stack.  */
+  int lr_saved_on_stack = 0;
+
+  /* If gr_saved[i] is non-zero, then we've noticed that general
+     register i has been saved at gr_sp_offset[i] from the stack
+     pointer.  */
+  char gr_saved[64];
+  int gr_sp_offset[64];
+
+  memset (gr_saved, 0, sizeof (gr_saved));
+
+  while (! frame || pc < frame->pc)
+    {
+      LONGEST op = read_memory_integer (pc, 4);
+
+      /* The tests in this chain of ifs should be in order of
+	 decreasing selectivity, so that more particular patterns get
+	 to fire before less particular patterns.  */
+
+      /* Setting the FP from the SP:
+	 ori sp, 0, fp
+	 P 000010 0100010 000001 000000000000 = 0x04881000
+	 0 111111 1111111 111111 111111111111 = 0x7fffffff
+             .    .   .    .   .    .   .   .
+	 We treat this as part of the prologue.  */
+      if ((op & 0x7fffffff) == 0x04881000)
+	{
+	  fp_set = 1;
+	  fp_offset = 0;
+	}
+
+      /* Move the link register to the scratch register grJ, before saving:
+         movsg lr, grJ
+         P 000100 0000011 010000 000111 JJJJJJ = 0x080d01c0
+         0 111111 1111111 111111 111111 000000 = 0x7fffffc0
+             .    .   .    .   .    .    .   .
+	 We treat this as part of the prologue.  */
+      else if ((op & 0x7fffffc0) == 0x080d01c0)
+        {
+          int gr_j = op & 0x3f;
+
+          /* If we're moving it to a scratch register, that's fine.  */
+          if (is_caller_saves_reg (gr_j))
+            lr_save_reg = gr_j;
+          /* Otherwise it's not a prologue instruction that we
+             recognize.  */
+          else
+            break;
+        }
+
+      /* To save multiple callee-saves registers on the stack, at
+         offset zero:
+
+	 std grK,@(sp,gr0)
+	 P KKKKKK 0000011 000001 000011 000000 = 0x000c10c0
+	 0 000000 1111111 111111 111111 111111 = 0x01ffffff
+
+	 stq grK,@(sp,gr0)
+	 P KKKKKK 0000011 000001 000100 000000 = 0x000c1100
+	 0 000000 1111111 111111 111111 111111 = 0x01ffffff
+             .    .   .    .   .    .    .   .
+         We treat this as part of the prologue, and record the register's
+	 saved address in the frame structure.  */
+      else if ((op & 0x01ffffff) == 0x000c10c0
+            || (op & 0x01ffffff) == 0x000c1100)
+	{
+	  int gr_k = ((op >> 25) & 0x3f);
+	  int ope  = ((op >> 6)  & 0x3f);
+          int count;
+	  int i;
+
+          /* Is it an std or an stq?  */
+          if (ope == 0x03)
+            count = 2;
+          else
+            count = 4;
+
+	  /* Is it really a callee-saves register?  */
+	  if (is_callee_saves_reg (gr_k))
+	    {
+	      for (i = 0; i < count; i++)
+	        {
+		  gr_saved[gr_k + i] = 1;
+		  gr_sp_offset[gr_k + i] = 4 * i;
+		}
+	    }
+	  else
+	    /* It's not a prologue instruction.  */
+	    break;
+	}
+
+      /* Adjusting the stack pointer.  (The stack pointer is GR1.)
+	 addi sp, S, sp
+         P 000001 0010000 000001 SSSSSSSSSSSS = 0x02401000
+         0 111111 1111111 111111 000000000000 = 0x7ffff000
+             .    .   .    .   .    .   .   .
+	 We treat this as part of the prologue.  */
+      else if ((op & 0x7ffff000) == 0x02401000)
+        {
+	  /* Sign-extend the twelve-bit field.
+	     (Isn't there a better way to do this?)  */
+	  int s = (((op & 0xfff) - 0x800) & 0xfff) - 0x800;
+
+	  framesize -= s;
+	}
+
+      /* Setting the FP to a constant distance from the SP:
+	 addi sp, S, fp
+         P 000010 0010000 000001 SSSSSSSSSSSS = 0x04401000
+         0 111111 1111111 111111 000000000000 = 0x7ffff000
+             .    .   .    .   .    .   .   .
+	 We treat this as part of the prologue.  */
+      else if ((op & 0x7ffff000) == 0x04401000)
+	{
+	  /* Sign-extend the twelve-bit field.
+	     (Isn't there a better way to do this?)  */
+	  int s = (((op & 0xfff) - 0x800) & 0xfff) - 0x800;
+	  fp_set = 1;
+	  fp_offset = s;
+	}
+
+      /* To spill an argument register to a scratch register:
+	    ori GRi, 0, GRk
+	 P KKKKKK 0100010 IIIIII 000000000000 = 0x00880000
+	 0 000000 1111111 000000 111111111111 = 0x01fc0fff
+	     .    .   .    .   .    .   .   .
+	 For the time being, we treat this as a prologue instruction,
+	 assuming that GRi is an argument register.  This one's kind
+	 of suspicious, because it seems like it could be part of a
+	 legitimate body instruction.  But we only come here when the
+	 source info wasn't helpful, so we have to do the best we can.
+	 Hopefully once GCC and GDB agree on how to emit line number
+	 info for prologues, then this code will never come into play.  */
+      else if ((op & 0x01fc0fff) == 0x00880000)
+	{
+	  int gr_i = ((op >> 12) & 0x3f);
+
+          /* If the source isn't an arg register, then this isn't a
+             prologue instruction.  */
+	  if (! is_argument_reg (gr_i))
+	    break;
+	}
+
+      /* To spill 16-bit values to the stack:
+	     sthi GRk, @(fp, s)
+	 P KKKKKK 1010001 000010 SSSSSSSSSSSS = 0x01442000
+	 0 000000 1111111 111111 000000000000 = 0x01fff000
+             .    .   .    .   .    .   .   . 
+         And for 8-bit values, we use STB instructions.
+	     stbi GRk, @(fp, s)
+	 P KKKKKK 1010000 000010 SSSSSSSSSSSS = 0x01402000
+	 0 000000 1111111 111111 000000000000 = 0x01fff000
+	     .    .   .    .   .    .   .   .
+         We check that GRk is really an argument register, and treat
+         all such as part of the prologue.  */
+      else if (   (op & 0x01fff000) == 0x01442000
+	       || (op & 0x01fff000) == 0x01402000)
+	{
+	  int gr_k = ((op >> 25) & 0x3f);
+
+	  if (! is_argument_reg (gr_k))
+	    break;		/* Source isn't an arg register.  */
+	}
+
+      /* To save multiple callee-saves register on the stack, at a
+         non-zero offset:
+
+	 stdi GRk, @(sp, s)
+	 P KKKKKK 1010011 000001 SSSSSSSSSSSS = 0x014c1000
+	 0 000000 1111111 111111 000000000000 = 0x01fff000
+             .    .   .    .   .    .   .   .
+	 stqi GRk, @(sp, s)
+	 P KKKKKK 1010100 000001 SSSSSSSSSSSS = 0x01501000
+	 0 000000 1111111 111111 000000000000 = 0x01fff000
+	     .    .   .    .   .    .   .   .
+         We treat this as part of the prologue, and record the register's
+	 saved address in the frame structure.  */
+      else if ((op & 0x01fff000) == 0x014c1000
+            || (op & 0x01fff000) == 0x01501000)
+	{
+	  int gr_k = ((op >> 25) & 0x3f);
+          int count;
+	  int i;
+
+          /* Is it a stdi or a stqi?  */
+          if ((op & 0x01fff000) == 0x014c1000)
+            count = 2;
+          else
+            count = 4;
+
+	  /* Is it really a callee-saves register?  */
+	  if (is_callee_saves_reg (gr_k))
+	    {
+	      /* Sign-extend the twelve-bit field.
+		 (Isn't there a better way to do this?)  */
+	      int s = (((op & 0xfff) - 0x800) & 0xfff) - 0x800;
+
+	      for (i = 0; i < count; i++)
+		{
+		  gr_saved[gr_k + i] = 1;
+		  gr_sp_offset[gr_k + i] = s + (4 * i);
+		}
+	    }
+	  else
+	    /* It's not a prologue instruction.  */
+	    break;
+	}
+
+      /* Storing any kind of integer register at any constant offset
+         from any other register.
+
+	 st GRk, @(GRi, gr0)
+         P KKKKKK 0000011 IIIIII 000010 000000 = 0x000c0080
+         0 000000 1111111 000000 111111 111111 = 0x01fc0fff
+             .    .   .    .   .    .    .   .
+	 sti GRk, @(GRi, d12)
+	 P KKKKKK 1010010 IIIIII SSSSSSSSSSSS = 0x01480000
+	 0 000000 1111111 000000 000000000000 = 0x01fc0000
+             .    .   .    .   .    .   .   .
+         These could be almost anything, but a lot of prologue
+         instructions fall into this pattern, so let's decode the
+         instruction once, and then work at a higher level.  */
+      else if (((op & 0x01fc0fff) == 0x000c0080)
+            || ((op & 0x01fc0000) == 0x01480000))
+        {
+          int gr_k = ((op >> 25) & 0x3f);
+          int gr_i = ((op >> 12) & 0x3f);
+          int offset;
+
+          /* Are we storing with gr0 as an offset, or using an
+             immediate value?  */
+          if ((op & 0x01fc0fff) == 0x000c0080)
+            offset = 0;
+          else
+            offset = (((op & 0xfff) - 0x800) & 0xfff) - 0x800;
+
+          /* If the address isn't relative to the SP or FP, it's not a
+             prologue instruction.  */
+          if (gr_i != sp_regnum && gr_i != fp_regnum)
+            break;
+
+          /* Saving the old FP in the new frame (relative to the SP).  */
+          if (gr_k == fp_regnum && gr_i == sp_regnum)
+            ;
+
+          /* Saving callee-saves register(s) on the stack, relative to
+             the SP.  */
+          else if (gr_i == sp_regnum
+                   && is_callee_saves_reg (gr_k))
+            {
+              gr_saved[gr_k] = 1;
+              gr_sp_offset[gr_k] = offset;
+            }
+
+          /* Saving the scratch register holding the return address.  */
+          else if (lr_save_reg != -1
+                   && gr_k == lr_save_reg)
+            lr_saved_on_stack = 1;
+
+          /* Spilling int-sized arguments to the stack.  */
+          else if (is_argument_reg (gr_k))
+            ;
+
+          /* It's not a store instruction we recognize, so this must
+             be the end of the prologue.  */
+          else
+            break;
+        }
+
+      /* It's not any instruction we recognize, so this must be the end
+         of the prologue.  */
+      else
+	break;
+
+      pc += 4;
+    }
+
+  if (frame)
+    {
+      frame->extra_info->lr_saved_on_stack = lr_saved_on_stack;
+
+      /* If we know the relationship between the stack and frame
+         pointers, record the addresses of the registers we noticed.
+         Note that we have to do this as a separate step at the end,
+         because instructions may save relative to the SP, but we need
+         their addresses relative to the FP.  */
+      if (fp_set)
+        {
+          int i;
+
+          for (i = 0; i < 64; i++)
+            if (gr_saved[i])
+              frame->saved_regs[i] = (frame->frame
+                                      - fp_offset + gr_sp_offset[i]);
+
+          frame->extra_info->fp_to_callers_sp_offset = framesize - fp_offset;
+        }
+    }
+
+  return pc;
+}
+
+
+static CORE_ADDR
+frv_skip_prologue (CORE_ADDR pc)
+{
+  CORE_ADDR func_addr, func_end, new_pc;
+
+  new_pc = pc;
+
+  /* If the line table has entry for a line *within* the function
+     (i.e., not in the prologue, and not past the end), then that's
+     our location.  */
+  if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+    {
+      struct symtab_and_line sal;
+
+      sal = find_pc_line (func_addr, 0);
+
+      if (sal.line != 0 && sal.end < func_end)
+	{
+	  new_pc = sal.end;
+	}
+    }
+
+  /* The FR-V prologue is at least five instructions long (twenty bytes).
+     If we didn't find a real source location past that, then
+     do a full analysis of the prologue.  */
+  if (new_pc < pc + 20)
+    new_pc = frv_analyze_prologue (pc, 0);
+
+  return new_pc;
+}
+
+static void
+frv_frame_init_saved_regs (struct frame_info *frame)
+{
+  if (frame->saved_regs)
+    return;
+
+  frame_saved_regs_zalloc (frame);
+  frame->saved_regs[fp_regnum] = frame->frame;
+
+  /* Find the beginning of this function, so we can analyze its
+     prologue.  */     
+  {
+    CORE_ADDR func_addr, func_end;
+
+    if (find_pc_partial_function (frame->pc, NULL, &func_addr, &func_end))
+      frv_analyze_prologue (func_addr, frame);
+  }
+}
+
+/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
+   EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc
+   and TYPE is the type (which is known to be struct, union or array).
+
+   The frv returns all structs in memory.  */
+
+static int
+frv_use_struct_convention (int gcc_p, struct type *type)
+{
+  return 1;
+}
+
+static void
+frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+{
+  memcpy (valbuf, (regbuf
+		   + frv_register_byte (8)
+		   + (TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0)),
+		   TYPE_LENGTH (type));
+}
+
+static CORE_ADDR
+frv_extract_struct_value_address (char *regbuf)
+{
+  return extract_address (regbuf + frv_register_byte (struct_return_regnum),
+			  4);
+}
+
+static void
+frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+  write_register (struct_return_regnum, addr);
+}
+
+static int
+frv_frameless_function_invocation (struct frame_info *frame)
+{
+  return frameless_look_for_prologue (frame);
+}
+
+static CORE_ADDR
+frv_saved_pc_after_call (struct frame_info *frame)
+{
+  return read_register (lr_regnum);
+}
+
+static void
+frv_init_extra_frame_info (int fromleaf, struct frame_info *frame)
+{
+  frame->extra_info = (struct frame_extra_info *)
+    frame_obstack_alloc (sizeof (struct frame_extra_info));
+  frame->extra_info->fp_to_callers_sp_offset = 0;
+  frame->extra_info->lr_saved_on_stack = 0;
+}
+
+#define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1))
+#define ROUND_DOWN(n,a) ((n) & ~((a)-1))
+
+static CORE_ADDR
+frv_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+		    int struct_return, CORE_ADDR struct_addr)
+{
+  int argreg;
+  int argnum;
+  char *val;
+  char valbuf[4];
+  struct value *arg;
+  struct type *arg_type;
+  int len;
+  enum type_code typecode;
+  CORE_ADDR regval;
+  int stack_space;
+  int stack_offset;
+
+#if 0
+  printf("Push %d args at sp = %x, struct_return=%d (%x)\n",
+	 nargs, (int) sp, struct_return, struct_addr);
+#endif
+
+  stack_space = 0;
+  for (argnum = 0; argnum < nargs; ++argnum)
+    stack_space += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 4);
+
+  stack_space -= (6 * 4);
+  if (stack_space > 0)
+    sp -= stack_space;
+
+  /* Make sure stack is dword aligned. */
+  sp = ROUND_DOWN (sp, 8);
+
+  stack_offset = 0;
+
+  argreg = 8;
+
+  if (struct_return)
+    write_register (struct_return_regnum, struct_addr);
+
+  for (argnum = 0; argnum < nargs; ++argnum)
+    {
+      arg = args[argnum];
+      arg_type = check_typedef (VALUE_TYPE (arg));
+      len = TYPE_LENGTH (arg_type);
+      typecode = TYPE_CODE (arg_type);
+
+      if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
+	{
+	  store_address (valbuf, 4, VALUE_ADDRESS (arg));
+	  typecode = TYPE_CODE_PTR;
+	  len = 4;
+	  val = valbuf;
+	}
+      else
+	{
+	  val = (char *) VALUE_CONTENTS (arg);
+	}
+
+      while (len > 0)
+	{
+	  int partial_len = (len < 4 ? len : 4);
+
+	  if (argreg < 14)
+	    {
+	      regval = extract_address (val, partial_len);
+#if 0
+	      printf("  Argnum %d data %x -> reg %d\n",
+		     argnum, (int) regval, argreg);
+#endif
+	      write_register (argreg, regval);
+	      ++argreg;
+	    }
+	  else
+	    {
+#if 0
+	      printf("  Argnum %d data %x -> offset %d (%x)\n",
+		     argnum, *((int *)val), stack_offset, (int) (sp + stack_offset));
+#endif
+	      write_memory (sp + stack_offset, val, partial_len);
+	      stack_offset += ROUND_UP(partial_len, 4);
+	    }
+	  len -= partial_len;
+	  val += partial_len;
+	}
+    }
+  return sp;
+}
+
+static CORE_ADDR
+frv_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+{
+  write_register (lr_regnum, CALL_DUMMY_ADDRESS ());
+  return sp;
+}
+
+static void
+frv_store_return_value (struct type *type, char *valbuf)
+{
+  int length = TYPE_LENGTH (type);
+  int reg8_offset = frv_register_byte (8);
+
+  if (length <= 4)
+    write_register_bytes (reg8_offset + (4 - length), valbuf, length);
+  else if (length == 8)
+    write_register_bytes (reg8_offset, valbuf, length);
+  else
+    internal_error (__FILE__, __LINE__,
+                    "Don't know how to return a %d-byte value.", length);
+}
+
+static void
+frv_pop_frame (void)
+{
+  generic_pop_current_frame (frv_pop_frame_regular);
+}
+
+static void
+frv_pop_frame_regular (struct frame_info *frame)
+{
+  CORE_ADDR fp;
+  int regno;
+
+  fp = frame->frame;
+
+  frv_frame_init_saved_regs (frame);
+
+  write_register (pc_regnum, frv_frame_saved_pc (frame));
+  for (regno = 0; regno < frv_num_regs; ++regno)
+    {
+      if (frame->saved_regs[regno]
+	  && regno != pc_regnum
+	  && regno != sp_regnum)
+	{
+	  write_register (regno,
+			  read_memory_integer (frame->saved_regs[regno], 4));
+	}
+    }
+  write_register (sp_regnum, fp + frame->extra_info->fp_to_callers_sp_offset);
+  flush_cached_frames ();
+}
+
+
+static void
+frv_remote_translate_xfer_address (CORE_ADDR memaddr, int nr_bytes,
+				   CORE_ADDR *targ_addr, int *targ_len)
+{
+  *targ_addr = memaddr;
+  *targ_len  = nr_bytes;
+}
+
+
+/* Hardware watchpoint / breakpoint support for the FR500
+   and FR400.  */
+
+int
+frv_check_watch_resources (int type, int cnt, int ot)
+{
+  struct gdbarch_tdep *var = CURRENT_VARIANT;
+
+  /* Watchpoints not supported on simulator.  */
+  if (strcmp (target_shortname, "sim") == 0)
+    return 0;
+
+  if (type == bp_hardware_breakpoint)
+    {
+      if (var->num_hw_breakpoints == 0)
+	return 0;
+      else if (cnt <= var->num_hw_breakpoints)
+	return 1;
+    }
+  else
+    {
+      if (var->num_hw_watchpoints == 0)
+	return 0;
+      else if (ot)
+	return -1;
+      else if (cnt <= var->num_hw_watchpoints)
+	return 1;
+    }
+  return -1;
+}
+
+
+CORE_ADDR
+frv_stopped_data_address (void)
+{
+  CORE_ADDR brr, dbar0, dbar1, dbar2, dbar3;
+
+  brr = read_register (brr_regnum);
+  dbar0 = read_register (dbar0_regnum);
+  dbar1 = read_register (dbar1_regnum);
+  dbar2 = read_register (dbar2_regnum);
+  dbar3 = read_register (dbar3_regnum);
+
+  if (brr & (1<<11))
+    return dbar0;
+  else if (brr & (1<<10))
+    return dbar1;
+  else if (brr & (1<<9))
+    return dbar2;
+  else if (brr & (1<<8))
+    return dbar3;
+  else
+    return 0;
+}
+
+static struct gdbarch *
+frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  struct gdbarch *gdbarch;
+  struct gdbarch_tdep *var;
+
+  /* Check to see if we've already built an appropriate architecture
+     object for this executable.  */
+  arches = gdbarch_list_lookup_by_info (arches, &info);
+  if (arches)
+    return arches->gdbarch;
+
+  /* Select the right tdep structure for this variant.  */
+  var = new_variant ();
+  switch (info.bfd_arch_info->mach)
+    {
+    case bfd_mach_frv:
+    case bfd_mach_frvsimple:
+    case bfd_mach_fr500:
+    case bfd_mach_frvtomcat:
+      set_variant_num_gprs (var, 64);
+      set_variant_num_fprs (var, 64);
+      break;
+
+    case bfd_mach_fr400:
+      set_variant_num_gprs (var, 32);
+      set_variant_num_fprs (var, 32);
+      break;
+
+    default:
+      /* Never heard of this variant.  */
+      return 0;
+    }
+  
+  gdbarch = gdbarch_alloc (&info, var);
+
+  set_gdbarch_short_bit (gdbarch, 16);
+  set_gdbarch_int_bit (gdbarch, 32);
+  set_gdbarch_long_bit (gdbarch, 32);
+  set_gdbarch_long_long_bit (gdbarch, 64);
+  set_gdbarch_float_bit (gdbarch, 32);
+  set_gdbarch_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_ptr_bit (gdbarch, 32);
+
+  set_gdbarch_num_regs (gdbarch, frv_num_regs);
+  set_gdbarch_sp_regnum (gdbarch, sp_regnum);
+  set_gdbarch_fp_regnum (gdbarch, fp_regnum);
+  set_gdbarch_pc_regnum (gdbarch, pc_regnum);
+
+  set_gdbarch_register_name (gdbarch, frv_register_name);
+  set_gdbarch_register_size (gdbarch, 4);
+  set_gdbarch_register_bytes (gdbarch, frv_num_regs * 4);
+  set_gdbarch_register_byte (gdbarch, frv_register_byte);
+  set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size);
+  set_gdbarch_max_register_raw_size (gdbarch, 4);
+  set_gdbarch_register_virtual_size (gdbarch, frv_register_virtual_size);
+  set_gdbarch_max_register_virtual_size (gdbarch, 4);
+  set_gdbarch_register_virtual_type (gdbarch, frv_register_virtual_type);
+
+  set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
+  set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
+
+  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+  set_gdbarch_frame_args_skip (gdbarch, 0);
+  set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
+
+  set_gdbarch_saved_pc_after_call (gdbarch, frv_saved_pc_after_call);
+
+  set_gdbarch_frame_chain (gdbarch, frv_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
+  set_gdbarch_frame_saved_pc (gdbarch, frv_frame_saved_pc);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+
+  set_gdbarch_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
+
+  set_gdbarch_use_struct_convention (gdbarch, frv_use_struct_convention);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
+
+  set_gdbarch_store_struct_return (gdbarch, frv_store_struct_return);
+  set_gdbarch_deprecated_store_return_value (gdbarch, frv_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
+
+  /* Settings for calling functions in the inferior.  */
+  set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
+  set_gdbarch_call_dummy_length (gdbarch, 0);
+  set_gdbarch_coerce_float_to_double (gdbarch, 
+				      standard_coerce_float_to_double);
+  set_gdbarch_push_arguments (gdbarch, frv_push_arguments);
+  set_gdbarch_push_return_address (gdbarch, frv_push_return_address);
+  set_gdbarch_pop_frame (gdbarch, frv_pop_frame);
+
+  set_gdbarch_call_dummy_p (gdbarch, 1);
+  set_gdbarch_call_dummy_words (gdbarch, frv_call_dummy_words);
+  set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words));
+  set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+  set_gdbarch_init_extra_frame_info (gdbarch, frv_init_extra_frame_info);
+
+  /* Settings that should be unnecessary.  */
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+  set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
+  set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+  set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
+  set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
+  set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
+
+  set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
+  set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
+  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
+  set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+  set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
+  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+  set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
+
+  set_gdbarch_decr_pc_after_break (gdbarch, 0);
+  set_gdbarch_function_start_offset (gdbarch, 0);
+  set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
+
+  set_gdbarch_remote_translate_xfer_address
+    (gdbarch, frv_remote_translate_xfer_address);
+
+  /* Hardware watchpoint / breakpoint support.  */
+  switch (info.bfd_arch_info->mach)
+    {
+    case bfd_mach_frv:
+    case bfd_mach_frvsimple:
+    case bfd_mach_fr500:
+    case bfd_mach_frvtomcat:
+      /* fr500-style hardware debugging support.  */
+      var->num_hw_watchpoints = 4;
+      var->num_hw_breakpoints = 4;
+      break;
+
+    case bfd_mach_fr400:
+      /* fr400-style hardware debugging support.  */
+      var->num_hw_watchpoints = 2;
+      var->num_hw_breakpoints = 4;
+      break;
+
+    default:
+      /* Otherwise, assume we don't have hardware debugging support.  */
+      var->num_hw_watchpoints = 0;
+      var->num_hw_breakpoints = 0;
+      break;
+    }
+
+  return gdbarch;
+}
+
+void
+_initialize_frv_tdep (void)
+{
+  register_gdbarch_init (bfd_arch_frv, frv_gdbarch_init);
+
+  tm_print_insn = print_insn_frv;
+}
+
+
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 25d1ed7..155ebe0 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -23,7 +23,6 @@
 #include "inferior.h"
 #include "gdbcore.h"
 #include "elf-bfd.h"
-#include <sys/procfs.h>
 #include "symfile.h"
 #include "objfiles.h"
 
@@ -158,25 +157,14 @@
     return bfd_get_target (exec_bfd);
 }
 
-/*
- * Default method for stack segment (preemptable by target).
- */
+/* Function: derive_stack_segment
 
-static int (*override_derive_stack_segment) (bfd_vma *, bfd_vma *);
-
-extern void
-preempt_derive_stack_segment (int (*override_func) (bfd_vma *, bfd_vma *))
-{
-  override_derive_stack_segment = override_func;
-}
-
-/* Function: default_derive_stack_segment
    Derive a reasonable stack segment by unwinding the target stack. 
    
    Returns 0 for failure, 1 for success.  */
 
 static int 
-default_derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
+derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
 {
   bfd_vma tmp_vma;
   struct frame_info *fi, *tmp_fi;
@@ -215,36 +203,15 @@
   return 1;	/* success */
 }
 
-static int
-derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
-{
-  if (override_derive_stack_segment)
-    return override_derive_stack_segment (bottom, top);
-  else
-    return default_derive_stack_segment (bottom, top);
-}
+/* Function: derive_heap_segment
 
-/*
- * Default method for heap segment (preemptable by target).
- */
-
-static int (*override_derive_heap_segment) (bfd *, bfd_vma *, bfd_vma *);
-
-extern void
-preempt_derive_heap_segment (int (*override_func) (bfd *, 
-						   bfd_vma *, bfd_vma *))
-{
-  override_derive_heap_segment = override_func;
-}
-
-/* Function: default_derive_heap_segment
    Derive a reasonable heap segment by looking at sbrk and
    the static data sections.
    
    Returns 0 for failure, 1 for success.  */
 
 static int 
-default_derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
+derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
 {
   bfd_vma top_of_data_memory = 0;
   bfd_vma top_of_heap = 0;
@@ -308,15 +275,6 @@
     return 0;	/* No additional heap space needs to be saved. */
 }
 
-static int
-derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
-{
-  if (override_derive_heap_segment)
-    return override_derive_heap_segment (abfd, bottom, top);
-  else
-    return default_derive_heap_segment (abfd, bottom, top);
-}
-
 /* ARGSUSED */
 static void
 make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index ada30a3..3acccf1 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -119,6 +119,16 @@
   current_event_hooks->architecture_changed ();
 }
 
+void
+target_changed_event (void)
+{
+  if (gdb_events_debug)
+    fprintf_unfiltered (gdb_stdlog, "target_changed_event\n");
+  if (!current_event_hooks->target_changed)
+    return;
+  current_event_hooks->target_changed ();
+}
+
 #endif
 
 #if WITH_GDB_EVENTS
@@ -134,6 +144,14 @@
 }
 #endif
 
+#if WITH_GDB_EVENTS
+void
+clear_gdb_event_hooks (void)
+{
+  set_gdb_event_hooks (&null_event_hooks);
+}
+#endif
+
 enum gdb_event
 {
   breakpoint_create,
@@ -143,6 +161,7 @@
   tracepoint_delete,
   tracepoint_modify,
   architecture_changed,
+  target_changed,
   nr_gdb_events
 };
 
@@ -266,6 +285,14 @@
   append (event);
 }
 
+static void
+queue_target_changed (void)
+{
+  struct event *event = XMALLOC (struct event);
+  event->type = target_changed;
+  append (event);
+}
+
 void
 gdb_events_deliver (struct gdb_events *vector)
 {
@@ -314,6 +341,9 @@
 	case architecture_changed:
 	  vector->architecture_changed ();
 	  break;
+	case target_changed:
+	  vector->target_changed ();
+	  break;
 	}
       delivering_events = event->next;
       xfree (event);
@@ -333,6 +363,7 @@
   queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
   queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
   queue_event_hooks.architecture_changed = queue_architecture_changed;
+  queue_event_hooks.target_changed = queue_target_changed;
 #endif
 
   c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
diff --git a/gdb/gdb-events.h b/gdb/gdb-events.h
index 5f7fc6b..daba6a4 100644
--- a/gdb/gdb-events.h
+++ b/gdb/gdb-events.h
@@ -59,6 +59,7 @@
 typedef void (gdb_events_tracepoint_delete_ftype) (int number);
 typedef void (gdb_events_tracepoint_modify_ftype) (int number);
 typedef void (gdb_events_architecture_changed_ftype) (void);
+typedef void (gdb_events_target_changed_ftype) (void);
 
 
 /* gdb-events: object. */
@@ -72,6 +73,7 @@
     gdb_events_tracepoint_delete_ftype *tracepoint_delete;
     gdb_events_tracepoint_modify_ftype *tracepoint_modify;
     gdb_events_architecture_changed_ftype *architecture_changed;
+    gdb_events_target_changed_ftype *target_changed;
   };
 
 
@@ -85,6 +87,7 @@
 extern void tracepoint_delete_event (int number);
 extern void tracepoint_modify_event (int number);
 extern void architecture_changed_event (void);
+extern void target_changed_event (void);
 
 
 /* When GDB_EVENTS are not being used, completly disable them. */
@@ -97,6 +100,7 @@
 #define tracepoint_delete_event(number) 0
 #define tracepoint_modify_event(number) 0
 #define architecture_changed_event() 0
+#define target_changed_event() 0
 #endif
 
 /* Install custom gdb-events hooks. */
@@ -105,6 +109,9 @@
 /* Deliver any pending events. */
 extern void gdb_events_deliver (struct gdb_events *vector);
 
+/* Clear event handlers */
+extern void clear_gdb_event_hooks (void);
+
 #if !WITH_GDB_EVENTS
 #define set_gdb_events(x) 0
 #define set_gdb_event_hooks(x) 0
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index 9965f05..e92a714 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -65,6 +65,7 @@
 f:void:tracepoint_delete:int number:number
 f:void:tracepoint_modify:int number:number
 f:void:architecture_changed:void
+f:void:target_changed:void
 #*:void:annotate_starting_hook:void
 #*:void:annotate_stopped_hook:void
 #*:void:annotate_signalled_hook:void
@@ -87,8 +88,6 @@
 #*:void:readline_begin_hook:char *format, ...:format
 #*:char *:readline_hook:char *prompt:prompt
 #*:void:readline_end_hook:void
-#*:void:register_changed_hook:int regno:regno
-#*:void:memory_changed_hook:CORE_ADDR addr, int len:addr, len
 #*:void:context_hook:int num:num
 #*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status
 #*:void:call_command_hook:struct cmd_list_element *c, char *cmd, int from_tty:c, cmd, from_tty
@@ -267,6 +266,9 @@
 /* Deliver any pending events. */
 extern void gdb_events_deliver (struct gdb_events *vector);
 
+/* Clear event handlers */
+extern void clear_gdb_event_hooks (void);
+
 #if !WITH_GDB_EVENTS
 #define set_gdb_events(x) 0
 #define set_gdb_event_hooks(x) 0
@@ -393,6 +395,18 @@
 #endif
 EOF
 
+# Clear hooks function
+echo ""
+cat <<EOF
+#if WITH_GDB_EVENTS
+void
+clear_gdb_event_hooks (void)
+{
+  set_gdb_event_hooks (&null_event_hooks);
+}
+#endif
+EOF
+
 # event type
 echo ""
 cat <<EOF
diff --git a/gdb/gdb_indent.sh b/gdb/gdb_indent.sh
index 1e727fe..0d0829a 100755
--- a/gdb/gdb_indent.sh
+++ b/gdb/gdb_indent.sh
@@ -54,7 +54,10 @@
 
 # Run indent per GDB specs
 
-types="-T FILE `cat *.h | sed -n \
+types="\
+-T FILE \
+-T prgregset_t -T fpregset_t -T gregset_t \
+`cat *.h | sed -n \
     -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_ftype\).*$/-T \1/p' \
     -e 's/^.*[^a-z0-9_]\([a-z0-9_]*_func\).*$/-T \1/p' \
     -e 's/^typedef.*[^a-zA-Z0-9_]\([a-zA-Z0-9_]*[a-zA-Z0-9_]\);$/-T \1/p' \
diff --git a/gdb/gdb_locale.h b/gdb/gdb_locale.h
new file mode 100644
index 0000000..0d89092
--- /dev/null
+++ b/gdb/gdb_locale.h
@@ -0,0 +1,46 @@
+/* GDB-friendly replacement for <locale.h>.
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 GDB_LOCALE_H
+#define GDB_LOCALE_H
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+#  define N_(String) gettext_noop (String)
+# else
+#  define N_(String) (String)
+# endif
+#else
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) while (0) /* nothing */
+# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
+# define _(String) (String)
+# define N_(String) (String)
+#endif
+
+#endif /* GDB_LOCALE_H */
diff --git a/gdb/config/i386/xm-i386gnu.h b/gdb/gdb_obstack.h
similarity index 69%
rename from gdb/config/i386/xm-i386gnu.h
rename to gdb/gdb_obstack.h
index 711aeeb..237830e 100644
--- a/gdb/config/i386/xm-i386gnu.h
+++ b/gdb/gdb_obstack.h
@@ -1,6 +1,6 @@
-/* Definitions to make GDB run on the GNU Hurd on an Intel 386
-   Copyright 1986, 1987, 1989, 1991, 1996, 2000
-   Free Software Foundation, Inc.
+/* Obstack wrapper for GDB.
+
+   Copyright 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,7 +19,14 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define HOST_LONG_DOUBLE_FORMAT &floatformat_i387_ext
+#if !defined (GDB_OBSTACK_H)
+#define GDB_OBSTACK_H 1
 
-/* Do implement the attach and detach commands.  */
-#define ATTACH_DETACH	1
+#include "obstack.h"
+
+/* Unless explicitly specified, GDB obstacks always use xmalloc() and
+   xfree().  */
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free xfree
+
+#endif
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 6990953..e930642 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -62,13 +62,13 @@
 #include "floatformat.h"
 
 #include "gdb_assert.h"
+#include "gdb_string.h"
 #include "gdb-events.h"
 
 /* Static function declarations */
 
 static void verify_gdbarch (struct gdbarch *gdbarch);
 static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_data (struct gdbarch *);
 static void free_gdbarch_data (struct gdbarch *);
 static void init_gdbarch_swap (struct gdbarch *);
 static void clear_gdbarch_swap (struct gdbarch *);
@@ -87,6 +87,8 @@
 
 struct gdbarch
 {
+  /* Has this architecture been fully initialized?  */
+  int initialized_p;
   /* basic architectural information */
   const struct bfd_arch_info * bfd_arch_info;
   int byte_order;
@@ -145,8 +147,8 @@
   gdbarch_read_sp_ftype *read_sp;
   gdbarch_write_sp_ftype *write_sp;
   gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
-  gdbarch_register_read_ftype *register_read;
-  gdbarch_register_write_ftype *register_write;
+  gdbarch_pseudo_register_read_ftype *pseudo_register_read;
+  gdbarch_pseudo_register_write_ftype *pseudo_register_write;
   int num_regs;
   int num_pseudo_regs;
   int sp_regnum;
@@ -170,7 +172,9 @@
   int max_register_virtual_size;
   gdbarch_register_virtual_type_ftype *register_virtual_type;
   gdbarch_do_registers_info_ftype *do_registers_info;
+  gdbarch_print_registers_info_ftype *print_registers_info;
   gdbarch_print_float_info_ftype *print_float_info;
+  gdbarch_print_vector_info_ftype *print_vector_info;
   gdbarch_register_sim_regno_ftype *register_sim_regno;
   gdbarch_register_bytes_ok_ftype *register_bytes_ok;
   gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
@@ -202,20 +206,21 @@
   gdbarch_convert_register_p_ftype *convert_register_p;
   gdbarch_register_to_value_ftype *register_to_value;
   gdbarch_value_to_register_ftype *value_to_register;
-  gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
-  gdbarch_store_pseudo_register_ftype *store_pseudo_register;
   gdbarch_pointer_to_address_ftype *pointer_to_address;
   gdbarch_address_to_pointer_ftype *address_to_pointer;
   gdbarch_integer_to_address_ftype *integer_to_address;
   gdbarch_return_value_on_stack_ftype *return_value_on_stack;
-  gdbarch_extract_return_value_ftype *extract_return_value;
   gdbarch_push_arguments_ftype *push_arguments;
   gdbarch_push_dummy_frame_ftype *push_dummy_frame;
   gdbarch_push_return_address_ftype *push_return_address;
   gdbarch_pop_frame_ftype *pop_frame;
   gdbarch_store_struct_return_ftype *store_struct_return;
+  gdbarch_extract_return_value_ftype *extract_return_value;
   gdbarch_store_return_value_ftype *store_return_value;
+  gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
+  gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
   gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
+  gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
   gdbarch_use_struct_convention_ftype *use_struct_convention;
   gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
   gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
@@ -253,6 +258,7 @@
   gdbarch_print_insn_ftype *print_insn;
   gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
   gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
+  gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
   gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
   gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
@@ -269,6 +275,7 @@
 
 struct gdbarch startup_gdbarch =
 {
+  1, /* Always initialized.  */
   /* basic architecture information */
   &bfd_default_arch_struct,
   BFD_ENDIAN_BIG,
@@ -312,13 +319,14 @@
   0,
   0,
   0,
-  0,
+  generic_register_byte,
   generic_register_size,
   0,
   generic_register_size,
   0,
   0,
   0,
+  default_print_registers_info,
   0,
   0,
   0,
@@ -344,7 +352,10 @@
   0,
   0,
   0,
-  generic_get_saved_register,
+  0,
+  0,
+  0,
+  0,
   0,
   0,
   0,
@@ -416,14 +427,13 @@
 /* Do any initialization needed for a non-multiarch configuration
    after the _initialize_MODULE functions have been run.  */
 void
-initialize_non_multiarch ()
+initialize_non_multiarch (void)
 {
   alloc_gdbarch_data (&startup_gdbarch);
   /* Ensure that all swap areas are zeroed so that they again think
      they are starting from scratch.  */
   clear_gdbarch_swap (&startup_gdbarch);
   init_gdbarch_swap (&startup_gdbarch);
-  init_gdbarch_data (&startup_gdbarch);
 }
 
 
@@ -482,13 +492,13 @@
   current_gdbarch->register_name = legacy_register_name;
   current_gdbarch->register_size = -1;
   current_gdbarch->register_bytes = -1;
+  current_gdbarch->register_byte = generic_register_byte;
   current_gdbarch->register_raw_size = generic_register_size;
   current_gdbarch->max_register_raw_size = -1;
   current_gdbarch->register_virtual_size = generic_register_size;
   current_gdbarch->max_register_virtual_size = -1;
-  current_gdbarch->do_registers_info = do_registers_info;
-  current_gdbarch->print_float_info = default_print_float_info;
-  current_gdbarch->register_sim_regno = default_register_sim_regno;
+  current_gdbarch->print_registers_info = default_print_registers_info;
+  current_gdbarch->register_sim_regno = legacy_register_sim_regno;
   current_gdbarch->cannot_fetch_register = cannot_register_not;
   current_gdbarch->cannot_store_register = cannot_register_not;
   current_gdbarch->use_generic_dummy_frames = -1;
@@ -503,6 +513,7 @@
   current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
   current_gdbarch->init_frame_pc = init_frame_pc_default;
   current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
+  current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
   current_gdbarch->register_convertible = generic_register_convertible_not;
   current_gdbarch->convert_register_p = legacy_convert_register_p;
   current_gdbarch->register_to_value = legacy_register_to_value;
@@ -511,6 +522,8 @@
   current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
   current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
   current_gdbarch->push_arguments = default_push_arguments;
+  current_gdbarch->extract_return_value = legacy_extract_return_value;
+  current_gdbarch->store_return_value = legacy_store_return_value;
   current_gdbarch->use_struct_convention = generic_use_struct_convention;
   current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
   current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
@@ -522,7 +535,7 @@
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   current_gdbarch->frame_args_skip = -1;
   current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
-  current_gdbarch->frame_chain_valid = func_frame_chain_valid;
+  current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
   current_gdbarch->extra_stack_alignment_needed = 1;
   current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
   current_gdbarch->addr_bits_remove = core_addr_identity;
@@ -530,6 +543,7 @@
   current_gdbarch->print_insn = legacy_print_insn;
   current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
   current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
+  current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
   current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
   current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
   current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
@@ -595,8 +609,8 @@
   /* Skip verify of read_sp, invalid_p == 0 */
   /* Skip verify of write_sp, invalid_p == 0 */
   /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
-  /* Skip verify of register_read, has predicate */
-  /* Skip verify of register_write, has predicate */
+  /* Skip verify of pseudo_register_read, has predicate */
+  /* Skip verify of pseudo_register_write, has predicate */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->num_regs == -1))
     fprintf_unfiltered (log, "\n\tnum_regs");
@@ -619,9 +633,7 @@
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->register_bytes == -1))
     fprintf_unfiltered (log, "\n\tregister_bytes");
-  if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
-      && (gdbarch->register_byte == 0))
-    fprintf_unfiltered (log, "\n\tregister_byte");
+  /* Skip verify of register_byte, invalid_p == 0 */
   /* Skip verify of register_raw_size, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->max_register_raw_size == -1))
@@ -633,8 +645,10 @@
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->register_virtual_type == 0))
     fprintf_unfiltered (log, "\n\tregister_virtual_type");
-  /* Skip verify of do_registers_info, invalid_p == 0 */
-  /* Skip verify of print_float_info, invalid_p == 0 */
+  /* Skip verify of do_registers_info, has predicate */
+  /* Skip verify of print_registers_info, invalid_p == 0 */
+  /* Skip verify of print_float_info, has predicate */
+  /* Skip verify of print_vector_info, has predicate */
   /* Skip verify of register_sim_regno, invalid_p == 0 */
   /* Skip verify of register_bytes_ok, has predicate */
   /* Skip verify of cannot_fetch_register, invalid_p == 0 */
@@ -681,24 +695,17 @@
   /* Skip verify of init_frame_pc_first, invalid_p == 0 */
   /* Skip verify of init_frame_pc, invalid_p == 0 */
   /* Skip verify of coerce_float_to_double, invalid_p == 0 */
-  if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
-      && (gdbarch->get_saved_register == 0))
-    fprintf_unfiltered (log, "\n\tget_saved_register");
+  /* Skip verify of get_saved_register, invalid_p == 0 */
   /* Skip verify of register_convertible, invalid_p == 0 */
   /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
   /* Skip verify of register_convert_to_raw, invalid_p == 0 */
   /* Skip verify of convert_register_p, invalid_p == 0 */
   /* Skip verify of register_to_value, invalid_p == 0 */
   /* Skip verify of value_to_register, invalid_p == 0 */
-  /* Skip verify of fetch_pseudo_register, has predicate */
-  /* Skip verify of store_pseudo_register, has predicate */
   /* Skip verify of pointer_to_address, invalid_p == 0 */
   /* Skip verify of address_to_pointer, invalid_p == 0 */
   /* Skip verify of integer_to_address, has predicate */
   /* Skip verify of return_value_on_stack, invalid_p == 0 */
-  if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
-      && (gdbarch->extract_return_value == 0))
-    fprintf_unfiltered (log, "\n\textract_return_value");
   /* Skip verify of push_arguments, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->push_dummy_frame == 0))
@@ -710,10 +717,10 @@
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->store_struct_return == 0))
     fprintf_unfiltered (log, "\n\tstore_struct_return");
-  if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
-      && (gdbarch->store_return_value == 0))
-    fprintf_unfiltered (log, "\n\tstore_return_value");
+  /* Skip verify of extract_return_value, invalid_p == 0 */
+  /* Skip verify of store_return_value, invalid_p == 0 */
   /* Skip verify of extract_struct_value_address, has predicate */
+  /* Skip verify of deprecated_extract_struct_value_address, has predicate */
   /* Skip verify of use_struct_convention, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->frame_init_saved_regs == 0))
@@ -777,6 +784,7 @@
   /* Skip verify of print_insn, invalid_p == 0 */
   /* Skip verify of skip_trampoline_code, invalid_p == 0 */
   /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
+  /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
   /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
@@ -813,12 +821,12 @@
                         (long) current_gdbarch->in_function_epilogue_p);
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
-                        "gdbarch_dump: register_read = 0x%08lx\n",
-                        (long) current_gdbarch->register_read);
+                        "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
+                        (long) current_gdbarch->pseudo_register_read);
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
-                        "gdbarch_dump: register_write = 0x%08lx\n",
-                        (long) current_gdbarch->register_write);
+                        "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
+                        (long) current_gdbarch->pseudo_register_write);
 #ifdef ADDRESS_TO_POINTER
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
@@ -1038,6 +1046,45 @@
                       "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
                       (long) DECR_PC_AFTER_BREAK);
 #endif
+#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
+#if GDB_MULTI_ARCH
+  /* Macro might contain `[{}]' when not multi-arch */
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
+                      XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
+#endif
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
+                        (long) current_gdbarch->deprecated_extract_return_value
+                        /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
+#endif
+#ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
+                      XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
+                        (long) current_gdbarch->deprecated_extract_struct_value_address
+                        /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
+#endif
+#ifdef DEPRECATED_STORE_RETURN_VALUE
+#if GDB_MULTI_ARCH
+  /* Macro might contain `[{}]' when not multi-arch */
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
+                      XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
+#endif
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
+                        (long) current_gdbarch->deprecated_store_return_value
+                        /*DEPRECATED_STORE_RETURN_VALUE ()*/);
+#endif
 #ifdef DO_REGISTERS_INFO
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
@@ -1118,8 +1165,8 @@
   /* Macro might contain `[{}]' when not multi-arch */
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
-                      "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
-                      XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
+                      "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
+                      XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
 #endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
@@ -1130,8 +1177,8 @@
 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
-                      "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
-                      XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
+                      "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
+                      XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
                         "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
@@ -1146,20 +1193,6 @@
                       "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
                       EXTRA_STACK_ALIGNMENT_NEEDED);
 #endif
-#ifdef FETCH_PSEUDO_REGISTER
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "FETCH_PSEUDO_REGISTER(regnum)",
-                      XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
-                        (long) current_gdbarch->fetch_pseudo_register
-                        /*FETCH_PSEUDO_REGISTER ()*/);
-#endif
 #ifdef FIX_CALL_DUMMY
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
@@ -1397,6 +1430,17 @@
                         (long) current_gdbarch->in_solib_call_trampoline
                         /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
 #endif
+#ifdef IN_SOLIB_RETURN_TRAMPOLINE
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
+                      XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
+                        (long) current_gdbarch->in_solib_return_trampoline
+                        /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
+#endif
 #ifdef MAX_REGISTER_RAW_SIZE
   fprintf_unfiltered (file,
                       "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
@@ -1533,20 +1577,18 @@
                         (long) current_gdbarch->prepare_to_proceed
                         /*PREPARE_TO_PROCEED ()*/);
 #endif
-#ifdef PRINT_FLOAT_INFO
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "PRINT_FLOAT_INFO()",
-                      XSTRING (PRINT_FLOAT_INFO ()));
-#endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
-                        "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
-                        (long) current_gdbarch->print_float_info
-                        /*PRINT_FLOAT_INFO ()*/);
-#endif
+                        "gdbarch_dump: print_float_info = 0x%08lx\n",
+                        (long) current_gdbarch->print_float_info);
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: print_registers_info = 0x%08lx\n",
+                        (long) current_gdbarch->print_registers_info);
+  if (GDB_MULTI_ARCH)
+    fprintf_unfiltered (file,
+                        "gdbarch_dump: print_vector_info = 0x%08lx\n",
+                        (long) current_gdbarch->print_vector_info);
 #ifdef PROLOGUE_FRAMELESS_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -1905,27 +1947,13 @@
                         (long) current_gdbarch->stack_align
                         /*STACK_ALIGN ()*/);
 #endif
-#ifdef STORE_PSEUDO_REGISTER
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "STORE_PSEUDO_REGISTER(regnum)",
-                      XSTRING (STORE_PSEUDO_REGISTER (regnum)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
-                        (long) current_gdbarch->store_pseudo_register
-                        /*STORE_PSEUDO_REGISTER ()*/);
-#endif
 #ifdef STORE_RETURN_VALUE
 #if GDB_MULTI_ARCH
   /* Macro might contain `[{}]' when not multi-arch */
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
-                      "STORE_RETURN_VALUE(type, valbuf)",
-                      XSTRING (STORE_RETURN_VALUE (type, valbuf)));
+                      "STORE_RETURN_VALUE(type, regcache, valbuf)",
+                      XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
 #endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
@@ -2532,55 +2560,55 @@
 }
 
 int
-gdbarch_register_read_p (struct gdbarch *gdbarch)
+gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->register_read != 0;
+  return gdbarch->pseudo_register_read != 0;
 }
 
 void
-gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
+gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_read == 0)
+  if (gdbarch->pseudo_register_read == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_read invalid");
+                    "gdbarch: gdbarch_pseudo_register_read invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
-  gdbarch->register_read (gdbarch, regnum, buf);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
+  gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
 }
 
 void
-set_gdbarch_register_read (struct gdbarch *gdbarch,
-                           gdbarch_register_read_ftype register_read)
+set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
+                                  gdbarch_pseudo_register_read_ftype pseudo_register_read)
 {
-  gdbarch->register_read = register_read;
+  gdbarch->pseudo_register_read = pseudo_register_read;
 }
 
 int
-gdbarch_register_write_p (struct gdbarch *gdbarch)
+gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->register_write != 0;
+  return gdbarch->pseudo_register_write != 0;
 }
 
 void
-gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
+gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_write == 0)
+  if (gdbarch->pseudo_register_write == 0)
     internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_write invalid");
+                    "gdbarch: gdbarch_pseudo_register_write invalid");
   if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
-  gdbarch->register_write (gdbarch, regnum, buf);
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
+  gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
 }
 
 void
-set_gdbarch_register_write (struct gdbarch *gdbarch,
-                            gdbarch_register_write_ftype register_write)
+set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
+                                   gdbarch_pseudo_register_write_ftype pseudo_register_write)
 {
-  gdbarch->register_write = register_write;
+  gdbarch->pseudo_register_write = pseudo_register_write;
 }
 
 int
@@ -2816,7 +2844,7 @@
   gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
 }
 
-char *
+const char *
 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
 {
   gdb_assert (gdbarch != NULL);
@@ -2987,6 +3015,13 @@
   gdbarch->register_virtual_type = register_virtual_type;
 }
 
+int
+gdbarch_do_registers_info_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->do_registers_info != 0;
+}
+
 void
 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
 {
@@ -3007,7 +3042,33 @@
 }
 
 void
-gdbarch_print_float_info (struct gdbarch *gdbarch)
+gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->print_registers_info == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_print_registers_info invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
+  gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
+}
+
+void
+set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
+                                  gdbarch_print_registers_info_ftype print_registers_info)
+{
+  gdbarch->print_registers_info = print_registers_info;
+}
+
+int
+gdbarch_print_float_info_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->print_float_info != 0;
+}
+
+void
+gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->print_float_info == 0)
@@ -3015,7 +3076,7 @@
                     "gdbarch: gdbarch_print_float_info invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
-  gdbarch->print_float_info ();
+  gdbarch->print_float_info (gdbarch, file, frame, args);
 }
 
 void
@@ -3026,6 +3087,32 @@
 }
 
 int
+gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->print_vector_info != 0;
+}
+
+void
+gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->print_vector_info == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_print_vector_info invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
+  gdbarch->print_vector_info (gdbarch, file, frame, args);
+}
+
+void
+set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
+                               gdbarch_print_vector_info_ftype print_vector_info)
+{
+  gdbarch->print_vector_info = print_vector_info;
+}
+
+int
 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
@@ -3618,58 +3705,6 @@
   gdbarch->value_to_register = value_to_register;
 }
 
-int
-gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->fetch_pseudo_register != 0;
-}
-
-void
-gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch->fetch_pseudo_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_fetch_pseudo_register invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
-  gdbarch->fetch_pseudo_register (regnum);
-}
-
-void
-set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
-                                   gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
-{
-  gdbarch->fetch_pseudo_register = fetch_pseudo_register;
-}
-
-int
-gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->store_pseudo_register != 0;
-}
-
-void
-gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch->store_pseudo_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_store_pseudo_register invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
-  gdbarch->store_pseudo_register (regnum);
-}
-
-void
-set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
-                                   gdbarch_store_pseudo_register_ftype store_pseudo_register)
-{
-  gdbarch->store_pseudo_register = store_pseudo_register;
-}
-
 CORE_ADDR
 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
 {
@@ -3753,25 +3788,6 @@
   gdbarch->return_value_on_stack = return_value_on_stack;
 }
 
-void
-gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch->extract_return_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_extract_return_value invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
-  gdbarch->extract_return_value (type, regbuf, valbuf);
-}
-
-void
-set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
-                                  gdbarch_extract_return_value_ftype extract_return_value)
-{
-  gdbarch->extract_return_value = extract_return_value;
-}
-
 CORE_ADDR
 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
 {
@@ -3875,7 +3891,26 @@
 }
 
 void
-gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
+gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->extract_return_value == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_extract_return_value invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
+  gdbarch->extract_return_value (type, regcache, valbuf);
+}
+
+void
+set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
+                                  gdbarch_extract_return_value_ftype extract_return_value)
+{
+  gdbarch->extract_return_value = extract_return_value;
+}
+
+void
+gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->store_return_value == 0)
@@ -3883,7 +3918,7 @@
                     "gdbarch: gdbarch_store_return_value invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
-  gdbarch->store_return_value (type, valbuf);
+  gdbarch->store_return_value (type, regcache, valbuf);
 }
 
 void
@@ -3893,6 +3928,44 @@
   gdbarch->store_return_value = store_return_value;
 }
 
+void
+gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->deprecated_extract_return_value == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_deprecated_extract_return_value invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
+  gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
+}
+
+void
+set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
+                                             gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
+{
+  gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
+}
+
+void
+gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->deprecated_store_return_value == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_deprecated_store_return_value invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
+  gdbarch->deprecated_store_return_value (type, valbuf);
+}
+
+void
+set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
+                                           gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
+{
+  gdbarch->deprecated_store_return_value = deprecated_store_return_value;
+}
+
 int
 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
 {
@@ -3901,7 +3974,7 @@
 }
 
 CORE_ADDR
-gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
+gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->extract_struct_value_address == 0)
@@ -3909,7 +3982,7 @@
                     "gdbarch: gdbarch_extract_struct_value_address invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
-  return gdbarch->extract_struct_value_address (regbuf);
+  return gdbarch->extract_struct_value_address (regcache);
 }
 
 void
@@ -3920,6 +3993,32 @@
 }
 
 int
+gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_extract_struct_value_address != 0;
+}
+
+CORE_ADDR
+gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->deprecated_extract_struct_value_address == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
+  return gdbarch->deprecated_extract_struct_value_address (regbuf);
+}
+
+void
+set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
+                                                     gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
+{
+  gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
+}
+
+int
 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
 {
   gdb_assert (gdbarch != NULL);
@@ -4644,6 +4743,25 @@
 }
 
 int
+gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
+{
+  gdb_assert (gdbarch != NULL);
+  if (gdbarch->in_solib_return_trampoline == 0)
+    internal_error (__FILE__, __LINE__,
+                    "gdbarch: gdbarch_in_solib_return_trampoline invalid");
+  if (gdbarch_debug >= 2)
+    fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
+  return gdbarch->in_solib_return_trampoline (pc, name);
+}
+
+void
+set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
+                                        gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
+{
+  gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
+}
+
+int
 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
 {
   gdb_assert (gdbarch != NULL);
@@ -4771,6 +4889,7 @@
 struct gdbarch_data
 {
   unsigned index;
+  int init_p;
   gdbarch_data_init_ftype *init;
   gdbarch_data_free_ftype *free;
 };
@@ -4797,6 +4916,7 @@
                        gdbarch_data_free_ftype *free)
 {
   struct gdbarch_data_registration **curr;
+  /* Append the new registraration.  */
   for (curr = &gdbarch_data_registry.registrations;
        (*curr) != NULL;
        curr = &(*curr)->next);
@@ -4805,31 +4925,12 @@
   (*curr)->data = XMALLOC (struct gdbarch_data);
   (*curr)->data->index = gdbarch_data_registry.nr++;
   (*curr)->data->init = init;
+  (*curr)->data->init_p = 1;
   (*curr)->data->free = free;
   return (*curr)->data;
 }
 
 
-/* Walk through all the registered users initializing each in turn. */
-
-static void
-init_gdbarch_data (struct gdbarch *gdbarch)
-{
-  struct gdbarch_data_registration *rego;
-  for (rego = gdbarch_data_registry.registrations;
-       rego != NULL;
-       rego = rego->next)
-    {
-      struct gdbarch_data *data = rego->data;
-      gdb_assert (data->index < gdbarch->nr_data);
-      if (data->init != NULL)
-        {
-          void *pointer = data->init (gdbarch);
-          set_gdbarch_data (gdbarch, data, pointer);
-        }
-    }
-}
-
 /* Create/delete the gdbarch data vector. */
 
 static void
@@ -4862,7 +4963,7 @@
 }
 
 
-/* Initialize the current value of thee specified per-architecture
+/* Initialize the current value of the specified per-architecture
    data-pointer. */
 
 void
@@ -4871,8 +4972,11 @@
                   void *pointer)
 {
   gdb_assert (data->index < gdbarch->nr_data);
-  if (data->free != NULL && gdbarch->data[data->index] != NULL)
-    data->free (gdbarch, gdbarch->data[data->index]);
+  if (gdbarch->data[data->index] != NULL)
+    {
+      gdb_assert (data->free != NULL);
+      data->free (gdbarch, gdbarch->data[data->index]);
+    }
   gdbarch->data[data->index] = pointer;
 }
 
@@ -4883,6 +4987,20 @@
 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
 {
   gdb_assert (data->index < gdbarch->nr_data);
+  /* The data-pointer isn't initialized, call init() to get a value but
+     only if the architecture initializaiton has completed.  Otherwise
+     punt - hope that the caller knows what they are doing.  */
+  if (gdbarch->data[data->index] == NULL
+      && gdbarch->initialized_p)
+    {
+      /* Be careful to detect an initialization cycle.  */
+      gdb_assert (data->init_p);
+      data->init_p = 0;
+      gdb_assert (data->init != NULL);
+      gdbarch->data[data->index] = data->init (gdbarch);
+      data->init_p = 1;
+      gdb_assert (gdbarch->data[data->index] != NULL);
+    }
   return gdbarch->data[data->index];
 }
 
@@ -5276,8 +5394,9 @@
     rego->arches = this;
   }    
 
-  /* Switch to this new architecture.  Dump it out. */
+  /* Switch to this new architecture marking it initialized.  */
   current_gdbarch = new_gdbarch;
+  current_gdbarch->initialized_p = 1;
   if (gdbarch_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
@@ -5296,10 +5415,8 @@
      called. */
   init_gdbarch_swap (new_gdbarch);
   
-  /* Initialize the per-architecture data-pointer of all parties that
-     registered an interest in this architecture.  CURRENT_GDBARCH
+  /* Initialize the per-architecture data.  CURRENT_GDBARCH
      must be updated before these modules are called. */
-  init_gdbarch_data (new_gdbarch);
   architecture_changed_event ();
 
   if (gdbarch_debug)
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 9f45459..b76bf4a 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -46,6 +46,7 @@
 struct value;
 struct objfile;
 struct minimal_symbol;
+struct regcache;
 
 extern struct gdbarch *current_gdbarch;
 
@@ -414,17 +415,17 @@
 #endif
 #endif
 
-extern int gdbarch_register_read_p (struct gdbarch *gdbarch);
+extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
 
-typedef void (gdbarch_register_read_ftype) (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void set_gdbarch_register_read (struct gdbarch *gdbarch, gdbarch_register_read_ftype *register_read);
+typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
+extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
+extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
 
-extern int gdbarch_register_write_p (struct gdbarch *gdbarch);
+extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
 
-typedef void (gdbarch_register_write_ftype) (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void set_gdbarch_register_write (struct gdbarch *gdbarch, gdbarch_register_write_ftype *register_write);
+typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
+extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
+extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
 
 extern int gdbarch_num_regs (struct gdbarch *gdbarch);
 extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
@@ -658,8 +659,8 @@
 #define REGISTER_NAME(regnr) (legacy_register_name (regnr))
 #endif
 
-typedef char * (gdbarch_register_name_ftype) (int regnr);
-extern char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
+typedef const char * (gdbarch_register_name_ftype) (int regnr);
+extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
 #error "Non multi-arch definition of REGISTER_NAME"
@@ -692,6 +693,11 @@
 #endif
 #endif
 
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTE)
+#define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
+#endif
+
 typedef int (gdbarch_register_byte_ftype) (int reg_nr);
 extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
 extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
@@ -772,9 +778,29 @@
 #endif
 #endif
 
+#if defined (DO_REGISTERS_INFO)
+/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */
+#if !defined (DO_REGISTERS_INFO_P)
+#define DO_REGISTERS_INFO_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO_P)
+#define DO_REGISTERS_INFO_P() (0)
+#endif
+
+extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P)
+#error "Non multi-arch definition of DO_REGISTERS_INFO"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DO_REGISTERS_INFO_P)
+#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch))
+#endif
+
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (DO_REGISTERS_INFO)
-#define DO_REGISTERS_INFO(reg_nr, fpregs) (do_registers_info (reg_nr, fpregs))
+#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0)
 #endif
 
 typedef void (gdbarch_do_registers_info_ftype) (int reg_nr, int fpregs);
@@ -789,29 +815,28 @@
 #endif
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PRINT_FLOAT_INFO)
-#define PRINT_FLOAT_INFO() (default_print_float_info ())
-#endif
+typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
+extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
+extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
 
-typedef void (gdbarch_print_float_info_ftype) (void);
-extern void gdbarch_print_float_info (struct gdbarch *gdbarch);
+extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
 extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PRINT_FLOAT_INFO)
-#error "Non multi-arch definition of PRINT_FLOAT_INFO"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PRINT_FLOAT_INFO)
-#define PRINT_FLOAT_INFO() (gdbarch_print_float_info (current_gdbarch))
-#endif
-#endif
+
+extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
 
 /* MAP a GDB RAW register number onto a simulator register number.  See
    also include/...-sim.h. */
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
-#define REGISTER_SIM_REGNO(reg_nr) (default_register_sim_regno (reg_nr))
+#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
 #endif
 
 typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
@@ -1184,18 +1209,19 @@
 #endif
 #endif
 
-/* GET_SAVED_REGISTER is like DUMMY_FRAMES.  It is at level one as the
-   old code has strange #ifdef interaction.  So far no one has found
-   that default_get_saved_register() is the default they are after. */
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
+#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval))
+#endif
 
 typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
 extern void gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
 extern void set_gdbarch_get_saved_register (struct gdbarch *gdbarch, gdbarch_get_saved_register_ftype *get_saved_register);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER)
 #error "Non multi-arch definition of GET_SAVED_REGISTER"
 #endif
 #if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER)
 #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
 #endif
 #endif
@@ -1302,88 +1328,6 @@
 #endif
 #endif
 
-/* This function is called when the value of a pseudo-register needs to
-   be updated.  Typically it will be defined on a per-architecture
-   basis. */
-
-#if defined (FETCH_PSEUDO_REGISTER)
-/* Legacy for systems yet to multi-arch FETCH_PSEUDO_REGISTER */
-#if !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (0)
-#endif
-
-extern int gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER_P)
-#error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (gdbarch_fetch_pseudo_register_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER)
-#define FETCH_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "FETCH_PSEUDO_REGISTER"), 0)
-#endif
-
-typedef void (gdbarch_fetch_pseudo_register_ftype) (int regnum);
-extern void gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER)
-#error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER)
-#define FETCH_PSEUDO_REGISTER(regnum) (gdbarch_fetch_pseudo_register (current_gdbarch, regnum))
-#endif
-#endif
-
-/* This function is called when the value of a pseudo-register needs to
-   be set or stored.  Typically it will be defined on a
-   per-architecture basis. */
-
-#if defined (STORE_PSEUDO_REGISTER)
-/* Legacy for systems yet to multi-arch STORE_PSEUDO_REGISTER */
-#if !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (0)
-#endif
-
-extern int gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER_P)
-#error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (gdbarch_store_pseudo_register_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER)
-#define STORE_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "STORE_PSEUDO_REGISTER"), 0)
-#endif
-
-typedef void (gdbarch_store_pseudo_register_ftype) (int regnum);
-extern void gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, gdbarch_store_pseudo_register_ftype *store_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER)
-#error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER)
-#define STORE_PSEUDO_REGISTER(regnum) (gdbarch_store_pseudo_register (current_gdbarch, regnum))
-#endif
-#endif
-
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
 #define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
@@ -1472,18 +1416,6 @@
 #endif
 #endif
 
-typedef void (gdbarch_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
-extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
-extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
-#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
-#define EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regbuf, valbuf))
-#endif
-#endif
-
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS)
 #define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr))
@@ -1574,15 +1506,61 @@
 #endif
 #endif
 
-typedef void (gdbarch_store_return_value_ftype) (struct type *type, char *valbuf);
-extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
+#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (legacy_extract_return_value (type, regcache, valbuf))
+#endif
+
+typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, void *valbuf);
+extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf);
+extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
+#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
+#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
+#endif
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
+#define STORE_RETURN_VALUE(type, regcache, valbuf) (legacy_store_return_value (type, regcache, valbuf))
+#endif
+
+typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const void *valbuf);
+extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf);
 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
 #error "Non multi-arch definition of STORE_RETURN_VALUE"
 #endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
-#define STORE_RETURN_VALUE(type, valbuf) (gdbarch_store_return_value (current_gdbarch, type, valbuf))
+#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
+#endif
+#endif
+
+typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
+extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
+extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
+#endif
+#endif
+
+typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
+extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
+extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
+#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_RETURN_VALUE)
+#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
 #endif
 #endif
 
@@ -1608,18 +1586,55 @@
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (internal_error (__FILE__, __LINE__, "EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
 #endif
 
-typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (char *regbuf);
-extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
+typedef CORE_ADDR (gdbarch_extract_struct_value_address_ftype) (struct regcache *regcache);
+extern CORE_ADDR gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache);
 extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_extract_struct_value_address_ftype *extract_struct_value_address);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
 #error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
 #endif
 #if GDB_MULTI_ARCH
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
-#define EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_extract_struct_value_address (current_gdbarch, regbuf))
+#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
+#endif
+#endif
+
+#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
+#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (0)
+#endif
+
+extern int gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() (gdbarch_deprecated_extract_struct_value_address_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (internal_error (__FILE__, __LINE__, "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"), 0)
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_extract_struct_value_address_ftype) (char *regbuf);
+extern CORE_ADDR gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf);
+extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
 #endif
 #endif
 
@@ -1887,7 +1902,7 @@
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
-#define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe))
+#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
 #endif
 
 typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
@@ -2294,7 +2309,7 @@
 
 /* For SVR4 shared libraries, each call goes through a small piece of
    trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
-   to nonzero if we are current stopped in one of these. */
+   to nonzero if we are currently stopped in one of these. */
 
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_CALL_TRAMPOLINE)
@@ -2313,6 +2328,25 @@
 #endif
 #endif
 
+/* Some systems also have trampoline code for returning from shared libs. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (generic_in_solib_return_trampoline (pc, name))
+#endif
+
+typedef int (gdbarch_in_solib_return_trampoline_ftype) (CORE_ADDR pc, char *name);
+extern int gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name);
+extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
+#endif
+#endif
+
 /* Sigtramp is a routine that the kernel calls (which then calls the
    signal handler).  On most machines it is a library routine that is
    linked into the executable.
@@ -2591,20 +2625,15 @@
    for the reserved data-pointer is returned.  That identifer should
    be saved in a local static variable.
 
-   The per-architecture data-pointer can be initialized in one of two
-   ways: The value can be set explicitly using a call to
-   set_gdbarch_data(); the value can be set implicitly using the value
-   returned by a non-NULL INIT() callback.  INIT(), when non-NULL is
-   called after the basic architecture vector has been created.
+   The per-architecture data-pointer is either initialized explicitly
+   (set_gdbarch_data()) or implicitly (by INIT() via a call to
+   gdbarch_data()).  FREE() is called to delete either an existing
+   data-pointer overridden by set_gdbarch_data() or when the
+   architecture object is being deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
-   restored.  INIT() is not called.
-
-   During initialization, multiple assignments of the data-pointer are
-   allowed, non-NULL values are deleted by calling FREE().  If the
-   architecture is deleted using gdbarch_free() all non-NULL data
-   pointers are also deleted using FREE().
+   restored.  INIT() is not re-called.
 
    Multiple registrarants for any architecture are allowed (and
    strongly encouraged).  */
@@ -2701,7 +2730,7 @@
 /* For non-multiarched targets, do any initialization of the default
    gdbarch object necessary after the _initialize_MODULE functions
    have run.  */
-extern void initialize_non_multiarch ();
+extern void initialize_non_multiarch (void);
 
 /* gdbarch trace variable */
 extern int gdbarch_debug;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index ebcb423..1ce71af 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -428,8 +428,8 @@
 # serious shakedown.
 f::TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
 #
-M:::void:register_read:int regnum, char *buf:regnum, buf:
-M:::void:register_write:int regnum, char *buf:regnum, buf:
+M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf:
+M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf:
 #
 v:2:NUM_REGS:int:num_regs::::0:-1
 # This macro gives the number of pseudo-registers that live in the
@@ -458,20 +458,23 @@
 # to map one to one onto the sdb register numbers.
 f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
 f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
-f:2:REGISTER_NAME:char *:register_name:int regnr:regnr:::legacy_register_name::0
+f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
 v:2:REGISTER_SIZE:int:register_size::::0:-1
 v:2:REGISTER_BYTES:int:register_bytes::::0:-1
-f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0
+f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte::0
 f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
 v:2:MAX_REGISTER_RAW_SIZE:int:max_register_raw_size::::0:-1
 f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
 v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
 f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
-f:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs:::do_registers_info::0
-f:2:PRINT_FLOAT_INFO:void:print_float_info:void::::default_print_float_info::0
+#
+F:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
+m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
+M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
+M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
 # MAP a GDB RAW register number onto a simulator register number.  See
 # also include/...-sim.h.
-f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::default_register_sim_regno::0
+f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::legacy_register_sim_regno::0
 F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes::0:0
 f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_register_not::0
 f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
@@ -505,10 +508,7 @@
 v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
 v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
 f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double::0
-# GET_SAVED_REGISTER is like DUMMY_FRAMES.  It is at level one as the
-# old code has strange #ifdef interaction.  So far no one has found
-# that default_get_saved_register() is the default they are after.
-f:1:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval::generic_get_saved_register:0
+f:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval:::generic_unwind_get_saved_register::0
 #
 f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
 f:2:REGISTER_CONVERT_TO_VIRTUAL:void:register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
@@ -517,29 +517,26 @@
 f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_convert_register_p::0
 f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
 f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0
-# This function is called when the value of a pseudo-register needs to
-# be updated.  Typically it will be defined on a per-architecture
-# basis.
-F:2:FETCH_PSEUDO_REGISTER:void:fetch_pseudo_register:int regnum:regnum:
-# This function is called when the value of a pseudo-register needs to
-# be set or stored.  Typically it will be defined on a
-# per-architecture basis.
-F:2:STORE_PSEUDO_REGISTER:void:store_pseudo_register:int regnum:regnum:
 #
 f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, void *buf:type, buf:::unsigned_pointer_to_address::0
 f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
 F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
 #
 f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0
 f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr:::default_push_arguments::0
 f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0
 F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
 f:2:POP_FRAME:void:pop_frame:void:-:::0
 #
 f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
-f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0
-F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0
+#
+f::EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
+f::STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0
+f::DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf
+f::DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf
+#
+F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache:::0
+F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf:::0
 f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0
 #
 f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
@@ -567,7 +564,7 @@
 # XXXX - both default and alternate frame_chain_valid functions are
 # deprecated.  New code should use dummy frames and one of the generic
 # functions.
-f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::func_frame_chain_valid::0
+f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
 f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
 f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
 f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0
@@ -608,10 +605,16 @@
 F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
 f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
 f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
+
+
 # For SVR4 shared libraries, each call goes through a small piece of
 # trampoline code in the ".plt" section.  IN_SOLIB_CALL_TRAMPOLINE evaluates
-# to nonzero if we are current stopped in one of these.
+# to nonzero if we are currently stopped in one of these.
 f:2:IN_SOLIB_CALL_TRAMPOLINE:int:in_solib_call_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_call_trampoline::0
+
+# Some systems also have trampoline code for returning from shared libs.
+f:2:IN_SOLIB_RETURN_TRAMPOLINE:int:in_solib_return_trampoline:CORE_ADDR pc, char *name:pc, name:::generic_in_solib_return_trampoline::0
+
 # Sigtramp is a routine that the kernel calls (which then calls the
 # signal handler).  On most machines it is a library routine that is
 # linked into the executable.
@@ -765,6 +768,7 @@
 struct value;
 struct objfile;
 struct minimal_symbol;
+struct regcache;
 
 extern struct gdbarch *current_gdbarch;
 
@@ -1082,20 +1086,15 @@
    for the reserved data-pointer is returned.  That identifer should
    be saved in a local static variable.
 
-   The per-architecture data-pointer can be initialized in one of two
-   ways: The value can be set explicitly using a call to
-   set_gdbarch_data(); the value can be set implicitly using the value
-   returned by a non-NULL INIT() callback.  INIT(), when non-NULL is
-   called after the basic architecture vector has been created.
+   The per-architecture data-pointer is either initialized explicitly
+   (set_gdbarch_data()) or implicitly (by INIT() via a call to
+   gdbarch_data()).  FREE() is called to delete either an existing
+   data-pointer overridden by set_gdbarch_data() or when the
+   architecture object is being deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
-   restored.  INIT() is not called.
-
-   During initialization, multiple assignments of the data-pointer are
-   allowed, non-NULL values are deleted by calling FREE().  If the
-   architecture is deleted using gdbarch_free() all non-NULL data
-   pointers are also deleted using FREE().
+   restored.  INIT() is not re-called.
 
    Multiple registrarants for any architecture are allowed (and
    strongly encouraged).  */
@@ -1192,7 +1191,7 @@
 /* For non-multiarched targets, do any initialization of the default
    gdbarch object necessary after the _initialize_MODULE functions
    have run.  */
-extern void initialize_non_multiarch ();
+extern void initialize_non_multiarch (void);
 
 /* gdbarch trace variable */
 extern int gdbarch_debug;
@@ -1243,13 +1242,13 @@
 #include "floatformat.h"
 
 #include "gdb_assert.h"
+#include "gdb_string.h"
 #include "gdb-events.h"
 
 /* Static function declarations */
 
 static void verify_gdbarch (struct gdbarch *gdbarch);
 static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_data (struct gdbarch *);
 static void free_gdbarch_data (struct gdbarch *);
 static void init_gdbarch_swap (struct gdbarch *);
 static void clear_gdbarch_swap (struct gdbarch *);
@@ -1271,6 +1270,8 @@
 printf "\n"
 printf "struct gdbarch\n"
 printf "{\n"
+printf "  /* Has this architecture been fully initialized?  */\n"
+printf "  int initialized_p;\n"
 printf "  /* basic architectural information */\n"
 function_list | while do_read
 do
@@ -1343,6 +1344,7 @@
 printf "\n"
 printf "struct gdbarch startup_gdbarch =\n"
 printf "{\n"
+printf "  1, /* Always initialized.  */\n"
 printf "  /* basic architecture information */\n"
 function_list | while do_read
 do
@@ -1374,14 +1376,13 @@
 /* Do any initialization needed for a non-multiarch configuration
    after the _initialize_MODULE functions have been run.  */
 void
-initialize_non_multiarch ()
+initialize_non_multiarch (void)
 {
   alloc_gdbarch_data (&startup_gdbarch);
   /* Ensure that all swap areas are zeroed so that they again think
      they are starting from scratch.  */
   clear_gdbarch_swap (&startup_gdbarch);
   init_gdbarch_swap (&startup_gdbarch);
-  init_gdbarch_data (&startup_gdbarch);
 }
 EOF
 
@@ -1747,6 +1748,7 @@
 struct gdbarch_data
 {
   unsigned index;
+  int init_p;
   gdbarch_data_init_ftype *init;
   gdbarch_data_free_ftype *free;
 };
@@ -1773,6 +1775,7 @@
                        gdbarch_data_free_ftype *free)
 {
   struct gdbarch_data_registration **curr;
+  /* Append the new registraration.  */
   for (curr = &gdbarch_data_registry.registrations;
        (*curr) != NULL;
        curr = &(*curr)->next);
@@ -1781,31 +1784,12 @@
   (*curr)->data = XMALLOC (struct gdbarch_data);
   (*curr)->data->index = gdbarch_data_registry.nr++;
   (*curr)->data->init = init;
+  (*curr)->data->init_p = 1;
   (*curr)->data->free = free;
   return (*curr)->data;
 }
 
 
-/* Walk through all the registered users initializing each in turn. */
-
-static void
-init_gdbarch_data (struct gdbarch *gdbarch)
-{
-  struct gdbarch_data_registration *rego;
-  for (rego = gdbarch_data_registry.registrations;
-       rego != NULL;
-       rego = rego->next)
-    {
-      struct gdbarch_data *data = rego->data;
-      gdb_assert (data->index < gdbarch->nr_data);
-      if (data->init != NULL)
-        {
-          void *pointer = data->init (gdbarch);
-          set_gdbarch_data (gdbarch, data, pointer);
-        }
-    }
-}
-
 /* Create/delete the gdbarch data vector. */
 
 static void
@@ -1838,7 +1822,7 @@
 }
 
 
-/* Initialize the current value of thee specified per-architecture
+/* Initialize the current value of the specified per-architecture
    data-pointer. */
 
 void
@@ -1847,8 +1831,11 @@
                   void *pointer)
 {
   gdb_assert (data->index < gdbarch->nr_data);
-  if (data->free != NULL && gdbarch->data[data->index] != NULL)
-    data->free (gdbarch, gdbarch->data[data->index]);
+  if (gdbarch->data[data->index] != NULL)
+    {
+      gdb_assert (data->free != NULL);
+      data->free (gdbarch, gdbarch->data[data->index]);
+    }
   gdbarch->data[data->index] = pointer;
 }
 
@@ -1859,6 +1846,20 @@
 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
 {
   gdb_assert (data->index < gdbarch->nr_data);
+  /* The data-pointer isn't initialized, call init() to get a value but
+     only if the architecture initializaiton has completed.  Otherwise
+     punt - hope that the caller knows what they are doing.  */
+  if (gdbarch->data[data->index] == NULL
+      && gdbarch->initialized_p)
+    {
+      /* Be careful to detect an initialization cycle.  */
+      gdb_assert (data->init_p);
+      data->init_p = 0;
+      gdb_assert (data->init != NULL);
+      gdbarch->data[data->index] = data->init (gdbarch);
+      data->init_p = 1;
+      gdb_assert (gdbarch->data[data->index] != NULL);
+    }
   return gdbarch->data[data->index];
 }
 
@@ -2252,8 +2253,9 @@
     rego->arches = this;
   }    
 
-  /* Switch to this new architecture.  Dump it out. */
+  /* Switch to this new architecture marking it initialized.  */
   current_gdbarch = new_gdbarch;
+  current_gdbarch->initialized_p = 1;
   if (gdbarch_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
@@ -2272,10 +2274,8 @@
      called. */
   init_gdbarch_swap (new_gdbarch);
   
-  /* Initialize the per-architecture data-pointer of all parties that
-     registered an interest in this architecture.  CURRENT_GDBARCH
+  /* Initialize the per-architecture data.  CURRENT_GDBARCH
      must be updated before these modules are called. */
-  init_gdbarch_data (new_gdbarch);
   architecture_changed_event ();
 
   if (gdbarch_debug)
diff --git a/gdb/gdbinit.in b/gdb/gdbinit.in
index b6a32db..56881c9 100644
--- a/gdb/gdbinit.in
+++ b/gdb/gdbinit.in
@@ -10,9 +10,9 @@
 	return
 end
 
-dir @srcdir@
-dir .
 dir @srcdir@/../mmalloc
 dir @srcdir@/../libiberty
 dir @srcdir@/../bfd
+dir @srcdir@
+dir .
 set prompt (top-gdb) 
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
new file mode 100644
index 0000000..c5365cf
--- /dev/null
+++ b/gdb/gdbserver/ChangeLog
@@ -0,0 +1,412 @@
+2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
+
+	* ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
+
+2002-08-20  Jim Blandy  <jimb@redhat.com>
+
+	* Makefile.in (LDFLAGS): Allow the configure script to establish a
+	default for this.
+
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in: Make chill references obsolete.
+
+2002-07-24  Kevin Buettner  <kevinb@redhat.com>
+
+	* configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
+	* configure: Regenerate.
+	* config.in: Regenerate.
+
+2002-07-09  David O'Brien  <obrien@FreeBSD.org>
+
+	* gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
+	(perror_with_name, remote_close, remote_open, expect, play): Static.
+
+2002-07-04  Michal Ludvig  <mludvig@suse.cz>
+
+	* linux-x86-64-low.c (x86_64_regmap): Make it an array of 
+	byte offsets instead of an array of indexes.
+	(x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
+
+2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
+
+	* regcache.c: Add comment.
+
+2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
+
+	* thread-db.c: New file.
+	* proc-service.c: New file.
+	* acinclude.m4: New file.
+	* Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
+	proc-service.o, and thread-db.o.
+	(linux-low.o): Add USE_THREAD_DB.
+	* acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
+	HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
+	* aclocal.m4: Regenerated.
+	* config.in: Regenerated.
+	* configure: Regenerated.
+	* configure.in: Check for proc_service.h, sys/procfs.h,
+	thread_db.h, and linux/elf.h headrs.
+	Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
+	PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
+	Check for -lthread_db and thread support.
+	* configure.srv: Enable thread_db support for ARM, i386, MIPS,
+	PowerPC, and SuperH.
+	* i387-fp.c: Constify arguments.
+	* i387-fp.h: Likewise.
+	* inferiors.c: (struct thread_info): Renamed from
+	`struct inferior_info'.  Remove PID member.  Use generic inferior
+	list header.  All uses updated.
+	(inferiors, signal_pid): Removed.
+	(all_threads): New variable.
+	(get_thread): Define.
+	(add_inferior_to_list): New function.
+	(for_each_inferior): New function.
+	(change_inferior_id): New function.
+	(add_inferior): Removed.
+	(remove_inferior): New function.
+	(add_thread): New function.
+	(free_one_thread): New function.
+	(remove_thread): New function.
+	(clear_inferiors): Use for_each_inferior and free_one_thread.
+	(find_inferior): New function.
+	(find_inferior_id): New function.
+	(inferior_target_data): Update argument type.
+	(set_inferior_target_data): Likewise.
+	(inferior_regcache_data): Likewise.
+	(set_inferior_regcache_data): Likewise.
+	* linux-low.c (linux_bp_reinsert): Remove.
+	(all_processes, stopping_threads, using_thrads)
+	(struct pending_signals, debug_threads, pid_of): New.
+	(inferior_pid): Replace with macro.
+	(struct inferior_linux_data): Remove.
+	(get_stop_pc, add_process): New functions.
+	(linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
+	Use add_process and add_thread.
+	(linux_attach_lwp): New function, based on old linux_attach.  Use
+	add_process and add_thread.  Set stop_expected for new threads.
+	(linux_attach): New function.
+	(linux_kill_one_process): New function.
+	(linux_kill): Kill all LWPs.
+	(linux_thread_alive): Use find_inferior_id.
+	(check_removed_breakpoints, status_pending_p): New functions.
+	(linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
+	Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
+	struct for the found process.
+	(linux_wait_for_event): New function.
+	(linux_wait): Use it.  Support LWPs.
+	(send_sigstop, wait_for_sigstop, stop_all_processes)
+	(linux_resume_one_process, linux_continue_one_process): New functions.
+	(linux_resume): Support LWPs.
+	(REGISTER_RAW_SIZE): Remove.
+	(fetch_register): Use register_size instead.  Call supply_register.
+	(usr_store_inferior_registers): Likewise.  Call collect_register.
+	Fix recursive case.
+	(regsets_fetch_inferior_registers): Improve error message.
+	(regsets_store_inferior_registers): Add debugging.
+	(linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
+	(unstopped_p, linux_signal_pid): New functions.
+	(linux_target_ops): Add linux_signal_pid.
+	(linux_init_signals): New function.
+	(initialize_low): Call it.  Initialize using_threads.
+	* regcache.c (inferior_regcache_data): Add valid
+	flag.
+	(get_regcache): Fetch registers lazily.  Add fetch argument
+	and update all callers.
+	(regcache_invalidate_one, regcache_invalidate): New
+	functions.
+	(new_register_cache): Renamed from create_register_cache.
+	Return the new regcache.
+	(free_register_cache): Change argument to a void *.
+	(registers_to_string, registers_from_string): Call get_regcache
+	with fetch flag set.
+	(register_data): Make static.  Pass fetch flag to get_regcache.
+	(supply_register): Call get_regcache with fetch flag clear.
+	(collect_register): Call get_regcache with fetch flag set.
+	(collect_register_as_string): New function.
+	* regcache.h: Update.
+	* remote-utils.c (putpkt): Flush after debug output and use
+	stderr.
+	Handle input interrupts while waiting for an ACK.
+	(input_interrupt): Use signal_pid method.
+	(getpkt): Flush after debug output and use stderr.
+	(outreg): Use collect_register_as_string.
+	(new_thread_notify, dead_thread_notify): New functions.
+	(prepare_resume_reply): Check using_threads.  Set thread_from_wait
+	and general_thread.
+	(look_up_one_symbol): Flush after debug output.
+	* server.c (step_thread, server_waiting): New variables.
+	(start_inferior): Don't use signal_pid.  Update call to mywait.
+	(attach_inferior): Update call to mywait.
+	(handle_query): Handle qfThreadInfo and qsThreadInfo.
+	(main): Don't fetch/store registers explicitly.  Use
+	set_desired_inferior.  Support proposed ``Hs'' packet.  Update
+	calls to mywait.
+	* server.h: Update.
+	(struct inferior_list, struct_inferior_list_entry): New.
+	* target.c (set_desired_inferior): New.
+	(write_inferior_memory): Constify.
+	(mywait): New function.
+	* target.h: Update.
+	(struct target_ops): New signal_pid method.
+	(mywait): Removed macro, added prototype.
+
+	* linux-low.h (regset_func): Removed.
+	(regset_fill_func, regset_store_func): New.
+	(enum regset_type): New.
+	(struct regset_info): Add type field.  Use new operation types.
+	(struct linux_target_ops): stop_pc renamed to get_pc.
+	Add decr_pc_after_break and breakpoint_at.
+	(get_process, get_thread_proess, get_process_thread)
+	(strut process_info, all_processes, linux_attach_lwp)
+	(thread_db_init): New.
+
+	* linux-arm-low.c (arm_get_pc, arm_set_pc,
+	arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
+	(the_low_target): Add new members.
+	* linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
+	(i386_store_fpxregset): Constify.
+	(target_regsets): Add new kind identifier.
+	(i386_get_pc): Renamed from i386_stop_pc.  Simplify.
+	(i386_set_pc): Add debugging.
+	(i386_breakpoint_at): New function.
+	(the_low_target): Add new members.
+	* linux-mips-low.c (mips_get_pc, mips_set_pc)
+	(mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
+	(mips_breakpoint_at): New.
+	(the_low_target): Add new members.
+	* linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
+	(ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
+	(the_low_target): Add new members.
+	* linux-sh-low.c (sh_get_pc, sh_set_pc)
+	(sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
+	(the_low_target): Add new members.
+	* linux-x86-64-low.c (target_regsets): Add new kind
+	identifier.
+
+2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
+
+	From Martin Pool <mbp@samba.org>:
+	* server.c (gdbserver_usage): New function.
+	(main): Call it.
+
+2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mem-break.c (reinsert_breakpoint_by_bp): Correct typo
+	stop_at -> stop_pc.
+
+2002-05-04  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in: Remove obsolete code.
+
+2002-04-24  Michal Ludvig  <mludvig@suse.cz>
+
+	* linux-low.c (regsets_fetch_inferior_registers),
+	(regsets_store_inferior_registers): Removed cast to int from
+	ptrace() calls.
+	* regcache.h: Added declaration of struct inferior_info.
+
+2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
+
+	* inferiors.c (struct inferior_info): Add regcache_data.
+	(add_inferior): Call create_register_cache.
+	(clear_inferiors): Call free_register_cache.
+	(inferior_regcache_data, set_inferior_regcache_data): New functions.
+	* regcache.c (struct inferior_regcache_data): New.
+	(registers): Remove.
+	(get_regcache): New function.
+	(create_register_cache, free_register_cache): New functions.
+	(set_register_cache): Don't initialize the register cache here.
+	(registers_to_string, registers_from_string, register_data): Call
+	get_regcache.
+	* regcache.h: Add prototypes.
+	* server.h: Likewise.
+
+2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
+
+	* mem-break.c: New file.
+	* mem-break.h: New file.
+	* Makefile.in: Add mem-break.o rule; update server.h
+	dependencies.
+	* inferiors.c (struct inferior_info): Add target_data
+	member.
+	(clear_inferiors): Free target_data member if set.
+	(inferior_target_data, set_inferior_target_data): New functions.
+	* linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
+	(i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
+	* linux-low.c (linux_bp_reinsert): New variable.
+	(struct inferior_linux_data): New.
+	(linux_create_inferior): Use set_inferior_target_data.
+	(linux_attach): Likewise.  Call add_inferior.
+	(linux_wait_for_one_inferior): New function.
+	(linux_wait): Call it.
+	(linux_write_memory): Add const.
+	(initialize_low): Call set_breakpoint_data.
+	* linux-low.h (struct linux_target_ops): Add breakpoint
+	handling members.
+	* server.c (attach_inferior): Remove extra add_inferior
+	call.
+	* server.h: Include mem-break.h.  Update inferior.c
+	prototypes.
+	* target.c (read_inferior_memory)
+	(write_inferior_memory): New functions.
+	* target.h (read_inferior_memory)
+	(write_inferior_memory): Change macros to prototypes.
+	(struct target_ops): Update comments.  Add const to write_memory
+	definition.
+
+2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
+
+	* linux-low.c (usr_store_inferior_registers): Support
+	registers which are allowed to fail to store.
+	* linux-low.h (linux_target_ops): Likewise.
+	* linux-ppc-low.c (ppc_regmap): Support FPSCR.
+	(ppc_cannot_store_register): FPSCR may not be storable.
+
+2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* server.h: Include <string.h> if HAVE_STRING_H.
+	* ChangeLog: Correct paths in last ChangeLog entry.
+
+2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* linux-low.h: Remove obsolete prototypes.
+	(struct linux_target_ops): New.
+	(extern the_low_target): New.
+	* linux-low.c (num_regs, regmap): Remove declarations.
+	(register_addr): Use the_low_target explicitly.
+	(fetch_register): Likewise.
+	(usr_fetch_inferior_registers): Likewise.
+	(usr_store_inferior_registers): Likewise.
+	* linux-arm-low.c (num_regs): Remove.
+	(arm_num_regs): Define.
+	(arm_regmap): Renamed from regmap, made static.
+	(arm_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(arm_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-i386-low.c (num_regs): Remove.
+	(i386_num_regs): Define.
+	(i386_regmap): Renamed from regmap, made static.
+	(i386_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(i386_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-ia64-low.c (num_regs): Remove.
+	(ia64_num_regs): Define.
+	(ia64_regmap): Renamed from regmap, made static.
+	(ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(ia64_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-m68k-low.c (num_regs): Remove.
+	(m68k_num_regs): Define.
+	(m68k_regmap): Renamed from regmap, made static.
+	(m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(m68k_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-mips-low.c (num_regs): Remove.
+	(mips_num_regs): Define.
+	(mips_regmap): Renamed from regmap, made static.
+	(mips_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(mips_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-ppc-low.c (num_regs): Remove.
+	(ppc_num_regs): Define.
+	(ppc_regmap): Renamed from regmap, made static.
+	(ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(ppc_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-s390-low.c (num_regs): Remove.
+	(s390_num_regs): Define.
+	(s390_regmap): Renamed from regmap, made static.
+	(s390_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(s390_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-sh-low.c (num_regs): Remove.
+	(sh_num_regs): Define.
+	(sh_regmap): Renamed from regmap, made static.
+	(sh_cannot_fetch_register): Renamed from cannot_fetch_register,
+	made static.
+	(sh_cannot_store_register): Renamed from cannot_store_register,
+	made static.
+	(the_low_target): New.
+	* linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
+	(the_low_target): New.
+
+2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* Makefile.in: Add stamp-h target.
+	* configure.in: Create stamp-h.
+	* configure: Regenerated.
+
+2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* inferiors.c: New file.
+	* target.c: New file.
+	* target.h: New file.
+	* Makefile.in:  Add target.o and inferiors.o.  Update
+	dependencies.
+	* linux-low.c (inferior_pid): New static variable,
+	moved from server.c.
+	(linux_create_inferior): Renamed from create_inferior.
+	Call add_inferior.  Return 0 on success instead of a PID.
+	(linux_attach): Renamed from myattach.
+	(linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
+	(linux_thread_alive): Renamed from mythread_alive.
+	(linux_wait): Renamed from mywait.  Call clear_inferiors () if the
+	child dies.
+	(linux_resume): Renamed from myresume.  Add missing ``return 0''.
+	(regsets_store_inferior_registers): Correct error message.
+	Add missing ``return 0''.
+	(linux_fetch_registers): Renamed from fetch_inferior_registers.
+	(linux_store_registers): Renamed from store_inferior_registers.
+	(linux_read_memory): Renamed from read_inferior_memory.
+	(linux_write_memory): Renamed from write_inferior_memory.
+	(linux_target_ops): New structure.
+	(initialize_low): Call set_target_ops ().
+	* remote-utils.c (unhexify): New function.
+	(hexify): New function.
+	(input_interrupt): Send signals to ``signal_pid''.
+	* server.c (inferior_pid): Remove.
+	(start_inferior): Update create_inferior call.
+	(attach_inferior): Call add_inferior.
+	(handle_query): New function.
+	(main): Call handle_query for `q' packets.
+	* server.h: Include "target.h".  Remove obsolete prototypes.
+	Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
+
+2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
+
+	* Makefile.in: Add WARN_CFLAGS.  Update configury
+	dependencies.
+	* configure.in: Check for <string.h>
+	* configure: Regenerate.
+	* config.in: Regenerate.
+	* gdbreplay.c: Include needed system headers.
+	(remote_open): Remove strchr prototype.
+	* linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
+	* regcache.c (supply_register): Change buf argument to const void *.
+	(supply_register_by_name): Likewise.
+	(collect_register): Change buf argument to void *.
+	(collect_register_by_name): Likewise.
+	* regcache.h: Add missing prototypes.
+	* remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
+	* server.c (handle_query): New function.
+	(attached): New static variable, moved out of main.
+	(main): Quiet longjmp clobber warnings.
+	* server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
+	* utils.c (error): Remove NORETURN.
+	(fatal): Likewise.
+
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 2c8cd33..46168d6 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -102,6 +102,7 @@
 
 # LDFLAGS is specifically reserved for setting from the command line
 # when running make.
+LDFLAGS = @LDFLAGS@
 
 # Perhaps should come from parent Makefile
 VERSION = gdbserver-4.12.3
@@ -126,6 +127,7 @@
 	utils.o \
 	mem-break.o \
 	$(DEPFILES)
+GDBSERVER_LIBS = @GDBSERVER_LIBS@
 
 # Prevent Sun make from putting in the machine type.  Setting
 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
@@ -229,8 +231,9 @@
 ## This is ugly, but I don't want GNU make to put these variables in
 ## the environment.  Older makes will see this as a set of targets
 ## with no dependencies and no actions.
-unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
 
+gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
 regdat_sh = $(srcdir)/../regformats/regdat.sh
 regdef_h = $(srcdir)/../regformats/regdef.h
 regcache_h = $(srcdir)/regcache.h
@@ -239,10 +242,12 @@
 
 inferiors.o: inferiors.c $(server_h)
 mem-break.o: mem-break.c $(server_h)
+proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h)
 regcache.o: regcache.c $(server_h) $(regdef_h)
 remote-utils.o: remote-utils.c terminal.h $(server_h)
 server.o: server.c $(server_h)
 target.o: target.c $(server_h)
+thread-db.o: thread-db.c $(server_h) $(gdb_proc_service_h)
 utils.o: utils.c $(server_h)
 
 signals.o: ../signals/signals.c $(server_h)
@@ -253,6 +258,8 @@
 linux_low_h = $(srcdir)/linux-low.h
 
 linux-low.o: linux-low.c $(linux_low_h) $(server_h)
+	$(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
+
 linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
 linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
 linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
diff --git a/gdb/gdbserver/acconfig.h b/gdb/gdbserver/acconfig.h
index 968feb8..f0464b0 100644
--- a/gdb/gdbserver/acconfig.h
+++ b/gdb/gdbserver/acconfig.h
@@ -7,3 +7,18 @@
 /* Define if the target supports PTRACE_GETFPXREGS for extended
    register access.  */
 #undef HAVE_PTRACE_GETFPXREGS
+
+/* Define if <sys/procfs.h> has prgregset_t. */
+#undef HAVE_PRGREGSET_T
+
+/* Define if <sys/procfs.h> has prfpregset_t. */
+#undef HAVE_PRFPREGSET_T
+
+/* Define if <sys/procfs.h> has lwpid_t. */
+#undef HAVE_LWPID_T
+
+/* Define if <sys/procfs.h> has psaddr_t. */
+#undef HAVE_PSADDR_T
+
+/* Define if the prfpregset_t type is broken. */
+#undef PRFPREGSET_T_BROKEN
diff --git a/gdb/gdbserver/aclocal.m4 b/gdb/gdbserver/aclocal.m4
index 24b9ced..2fc6cf8 100644
--- a/gdb/gdbserver/aclocal.m4
+++ b/gdb/gdbserver/aclocal.m4
@@ -10,91 +10,45 @@
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
+dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
+sinclude(../../bfd/acinclude.m4)
 
-# serial 1
+AC_DEFUN([SRV_CHECK_THREAD_DB],
+[AC_CACHE_CHECK([for libthread_db],[srv_cv_thread_db],
+ [old_LIBS="$LIBS"
+  LIBS="$LIBS -lthread_db"
+  AC_TRY_LINK(
+  [void ps_pglobal_lookup() {}
+   void ps_pdread() {}
+   void ps_pdwrite() {}
+   void ps_lgetregs() {}
+   void ps_lsetregs() {}
+   void ps_lgetfpregs() {}
+   void ps_lsetfpregs() {}
+   void ps_getpid() {}],
+  [td_ta_new();],
+  [srv_cv_thread_db="-lthread_db"],
+  [srv_cv_thread_db=no
 
-# @defmac AC_PROG_CC_STDC
-# @maindex PROG_CC_STDC
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so.  This macro tries various
-# options that select ANSI C on some system or another.  It considers the
-# compiler to be in ANSI C mode if it handles function prototypes correctly.
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN(AM_PROG_CC_STDC,
-[AC_REQUIRE([AC_PROG_CC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_BEFORE([$0], [AC_C_CONST])
-dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
-dnl a magic option to avoid problems with ANSI preprocessor commands
-dnl like #elif.
-dnl FIXME: can't do this because then AC_AIX won't work due to a
-dnl circular dependency.
-dnl AC_BEFORE([$0], [AC_PROG_CPP])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX			-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  AC_TRY_COMPILE(
-[#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-], [
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
-])
-if test -z "$am_cv_prog_cc_stdc"; then
-  AC_MSG_RESULT([none needed])
-else
-  AC_MSG_RESULT($am_cv_prog_cc_stdc)
-fi
-case "x$am_cv_prog_cc_stdc" in
-  x|xno) ;;
-  *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
+ if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
+  thread_db="/lib/libthread_db.so.1"
+ else
+  thread_db='$prefix/lib/libthread_db.so.1'
+ fi
+ LIBS="$old_LIBS `eval echo "$thread_db"`"
+ AC_TRY_LINK(
+  [void ps_pglobal_lookup() {}
+   void ps_pdread() {}
+   void ps_pdwrite() {}
+   void ps_lgetregs() {}
+   void ps_lsetregs() {}
+   void ps_lgetfpregs() {}
+   void ps_lsetfpregs() {}
+   void ps_getpid() {}],
+  [td_ta_new();],
+  [srv_cv_thread_db="$thread_db"],
+  [srv_cv_thread_db=no])
+ LIBS="$old_LIBS"
+ ]])
+)])
 
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 9d553f2..e5cb0a7 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -1,4 +1,4 @@
-/* config.in.  Generated automatically from configure.in by autoheader 2.13.  */
+/* config.in.  Generated automatically from configure.in by autoheader.  */
 
 /* Define if you have the ANSI C header files.  */
 #undef STDC_HEADERS
@@ -13,12 +13,24 @@
    register access.  */
 #undef HAVE_PTRACE_GETFPXREGS
 
+/* Define if the prfpregset_t type is broken. */
+#undef PRFPREGSET_T_BROKEN
+
+/* Define if you have the <linux/elf.h> header file.  */
+#undef HAVE_LINUX_ELF_H
+
+/* Define if you have the <proc_service.h> header file.  */
+#undef HAVE_PROC_SERVICE_H
+
 /* Define if you have the <sgtty.h> header file.  */
 #undef HAVE_SGTTY_H
 
 /* Define if you have the <string.h> header file.  */
 #undef HAVE_STRING_H
 
+/* Define if you have the <sys/procfs.h> header file.  */
+#undef HAVE_SYS_PROCFS_H
+
 /* Define if you have the <sys/reg.h> header file.  */
 #undef HAVE_SYS_REG_H
 
@@ -27,3 +39,25 @@
 
 /* Define if you have the <termios.h> header file.  */
 #undef HAVE_TERMIOS_H
+
+/* Define if you have the <thread_db.h> header file.  */
+#undef HAVE_THREAD_DB_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
+/* Define if <sys/procfs.h> has lwpid_t. */
+#undef HAVE_LWPID_T
+
+/* Define if <sys/procfs.h> has psaddr_t. */
+#undef HAVE_PSADDR_T
+
+/* Define if <sys/procfs.h> has prgregset_t. */
+#undef HAVE_PRGREGSET_T
+
+/* Define if <sys/procfs.h> has prfpregset_t. */
+#undef HAVE_PRFPREGSET_T
+
+/* Define if <sys/procfs.h> has elf_fpregset_t. */
+#undef HAVE_ELF_FPREGSET_T
+
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 758d483..f88f4ac 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -1105,7 +1105,7 @@
 fi
 
 
-for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h
+for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h 		 proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -1223,7 +1223,328 @@
   fi
 fi
 
-GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj"
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+  echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1229: checking for lwpid_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1234 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+lwpid_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_lwpid_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_lwpid_t=no
+   
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_LWPID_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
+
+  echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1265: checking for psaddr_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1270 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+psaddr_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_psaddr_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_psaddr_t=no
+   
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PSADDR_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
+
+  echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1301: checking for prgregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1306 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prgregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_prgregset_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_prgregset_t=no
+   
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRGREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
+
+  echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1337: checking for prfpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1342 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+prfpregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_prfpregset_t=no
+   
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
+
+
+  
+        
+  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+    echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
+echo "configure:1377: checking whether prfpregset_t type is broken" >&5
+    if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  gdb_cv_prfpregset_t_broken=yes
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1385 "configure"
+#include "confdefs.h"
+#include <sys/procfs.h>
+       int main ()
+       {
+         if (sizeof (prfpregset_t) == sizeof (void *))
+           return 1;
+         return 0;
+       }
+EOF
+if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  gdb_cv_prfpregset_t_broken=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  gdb_cv_prfpregset_t_broken=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+
+    echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
+    if test $gdb_cv_prfpregset_t_broken = yes; then
+      cat >> confdefs.h <<\EOF
+#define PRFPREGSET_T_BROKEN 1
+EOF
+
+    fi
+  fi
+
+  echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:1419: checking for elf_fpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1424 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+elf_fpregset_t avar
+; return 0; }
+EOF
+if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
+   
+fi
+rm -f conftest*
+fi
+
+ if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_ELF_FPREGSET_T 1
+EOF
+
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_elf_fpregset_t" 1>&6
+
+fi
+
+srv_thread_depfiles=
+srv_libs=
+USE_THREAD_DB=
+
+if test "$srv_linux_thread_db" = "yes"; then
+  echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
+echo "configure:1462: checking for libthread_db" >&5
+if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  old_LIBS="$LIBS"
+  LIBS="$LIBS -lthread_db"
+  cat > conftest.$ac_ext <<EOF
+#line 1469 "configure"
+#include "confdefs.h"
+void ps_pglobal_lookup() {}
+   void ps_pdread() {}
+   void ps_pdwrite() {}
+   void ps_lgetregs() {}
+   void ps_lsetregs() {}
+   void ps_lgetfpregs() {}
+   void ps_lsetfpregs() {}
+   void ps_getpid() {}
+int main() {
+td_ta_new();
+; return 0; }
+EOF
+if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  srv_cv_thread_db="-lthread_db"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  srv_cv_thread_db=no
+
+ if test "$prefix" = "/usr" || test "$prefix" = "NONE"; then
+  thread_db="/lib/libthread_db.so.1"
+ else
+  thread_db='$prefix/lib/libthread_db.so.1'
+ fi
+ LIBS="$old_LIBS `eval echo "$thread_db"`"
+ cat > conftest.$ac_ext <<EOF
+#line 1499 "configure"
+#include "confdefs.h"
+void ps_pglobal_lookup() {}
+   void ps_pdread() {}
+   void ps_pdwrite() {}
+   void ps_lgetregs() {}
+   void ps_lsetregs() {}
+   void ps_lgetfpregs() {}
+   void ps_lsetfpregs() {}
+   void ps_getpid() {}
+int main() {
+td_ta_new();
+; return 0; }
+EOF
+if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  srv_cv_thread_db="$thread_db"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  srv_cv_thread_db=no
+fi
+rm -f conftest*
+ LIBS="$old_LIBS"
+ 
+fi
+
+echo "$ac_t""$srv_cv_thread_db" 1>&6
+
+fi
+rm -f conftest*
+  if test "$srv_cv_thread_db" = no; then
+    echo "configure: warning: Could not find libthread_db." 1>&2
+    echo "configure: warning: Disabling thread support in gdbserver." 1>&2
+    srv_linux_thread_db=no
+  else
+    srv_libs="$srv_cv_thread_db"
+  fi
+fi
+
+if test "$srv_linux_thread_db" = "yes"; then
+  srv_thread_depfiles="thread-db.o proc-service.o"
+  USE_THREAD_DB="-DUSE_THREAD_DB"
+fi
+
+GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
+GDBSERVER_LIBS="$srv_libs"
+
+
 
 
 
@@ -1381,6 +1702,8 @@
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@CPP@%$CPP%g
 s%@GDBSERVER_DEPFILES@%$GDBSERVER_DEPFILES%g
+s%@GDBSERVER_LIBS@%$GDBSERVER_LIBS%g
+s%@USE_THREAD_DB@%$USE_THREAD_DB%g
 
 CEOF
 EOF
diff --git a/gdb/gdbserver/configure.in b/gdb/gdbserver/configure.in
index db7e301..cb6feed 100644
--- a/gdb/gdbserver/configure.in
+++ b/gdb/gdbserver/configure.in
@@ -30,7 +30,8 @@
 
 AC_HEADER_STDC
 
-AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h)
+AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
+		 proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h)
 
 . ${srcdir}/configure.srv
 
@@ -62,9 +63,67 @@
   fi
 fi
 
-GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj"
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+  BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
+  BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
+  BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
+  BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
+
+  dnl Check for broken prfpregset_t type
+
+  dnl For Linux/i386, glibc 2.1.3 was released with a bogus
+  dnl prfpregset_t type (it's a typedef for the pointer to a struct
+  dnl instead of the struct itself).  We detect this here, and work
+  dnl around it in gdb_proc_service.h.
+
+  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+    AC_MSG_CHECKING(whether prfpregset_t type is broken)
+    AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
+      [AC_TRY_RUN([#include <sys/procfs.h>
+       int main ()
+       {
+         if (sizeof (prfpregset_t) == sizeof (void *))
+           return 1;
+         return 0;
+       }],
+       gdb_cv_prfpregset_t_broken=no,
+       gdb_cv_prfpregset_t_broken=yes,
+       gdb_cv_prfpregset_t_broken=yes)])
+    AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
+    if test $gdb_cv_prfpregset_t_broken = yes; then
+      AC_DEFINE(PRFPREGSET_T_BROKEN)
+    fi
+  fi
+
+  BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
+fi
+
+srv_thread_depfiles=
+srv_libs=
+USE_THREAD_DB=
+
+if test "$srv_linux_thread_db" = "yes"; then
+  SRV_CHECK_THREAD_DB
+  if test "$srv_cv_thread_db" = no; then
+    AC_WARN([Could not find libthread_db.])
+    AC_WARN([Disabling thread support in gdbserver.])
+    srv_linux_thread_db=no
+  else
+    srv_libs="$srv_cv_thread_db"
+  fi
+fi
+
+if test "$srv_linux_thread_db" = "yes"; then
+  srv_thread_depfiles="thread-db.o proc-service.o"
+  USE_THREAD_DB="-DUSE_THREAD_DB"
+fi
+
+GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles"
+GDBSERVER_LIBS="$srv_libs"
 
 AC_SUBST(GDBSERVER_DEPFILES)
+AC_SUBST(GDBSERVER_LIBS)
+AC_SUBST(USE_THREAD_DB)
 
 AC_OUTPUT(Makefile,
 [case x$CONFIG_HEADERS in
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 3268cd7..28dc2aa 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -21,11 +21,13 @@
   arm*-*-linux*)	srv_regobj=reg-arm.o
 			srv_tgtobj="linux-low.o linux-arm-low.o"
 			srv_linux_usrregs=yes
+			srv_linux_thread_db=yes
 			;;
   i[3456]86-*-linux*)	srv_regobj=reg-i386-linux.o
 			srv_tgtobj="linux-low.o linux-i386-low.o i387-fp.o"
 			srv_linux_usrregs=yes
 			srv_linux_regsets=yes
+			srv_linux_thread_db=yes
 			;;
   ia64-*-linux*)	srv_regobj=reg-ia64.o
 			srv_tgtobj="linux-low.o linux-ia64-low.o"
@@ -38,10 +40,12 @@
   mips*-*-linux*)	srv_regobj=reg-mips.o
 			srv_tgtobj="linux-low.o linux-mips-low.o"
 			srv_linux_usrregs=yes
+			srv_linux_thread_db=yes
 			;;
   powerpc*-*-linux*)	srv_regobj=reg-ppc.o
 			srv_tgtobj="linux-low.o linux-ppc-low.o"
 			srv_linux_usrregs=yes
+			srv_linux_thread_db=yes
 			;;
   s390-*-linux*)	srv_regobj=reg-s390.o
 			srv_tgtobj="linux-low.o linux-s390-low.o"
@@ -54,6 +58,7 @@
   sh*-*-linux*)		srv_regobj=reg-sh.o
 			srv_tgtobj="linux-low.o linux-sh-low.o"
 			srv_linux_usrregs=yes
+			srv_linux_thread_db=yes
 			;;
   x86_64-*-linux*)	srv_regobj=reg-x86-64.o
 			srv_tgtobj="linux-low.o linux-x86-64-low.o i387-fp.o"
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 65831b1..4524274 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -30,12 +30,16 @@
 #include <ctype.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
 
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /* Sort of a hack... */
 #define EOL (EOF - 1)
@@ -46,7 +50,7 @@
    as the file name for which the error was encountered.
    Then return to command level.  */
 
-void
+static void
 perror_with_name (char *string)
 {
 #ifndef STDC_HEADERS
@@ -77,7 +81,7 @@
   exit (1);
 }
 
-void
+static void
 remote_close (void)
 {
   close (remote_desc);
@@ -86,7 +90,7 @@
 /* Open a connection to a remote debugger.
    NAME is the filename used for communication.  */
 
-void
+static void
 remote_open (char *name)
 {
   if (!strchr (name, ':'))
@@ -234,7 +238,7 @@
 /* Accept input from gdb and match with chars from fp (after skipping one
    blank) up until a \n is read from fp (which is not matched) */
 
-void
+static void
 expect (FILE *fp)
 {
   int fromlog;
@@ -265,7 +269,7 @@
 /* Play data back to gdb from fp (after skipping leading blank) up until a
    \n is read from fp (which is discarded and not sent to gdb). */
 
-void
+static void
 play (FILE *fp)
 {
   int fromlog;
diff --git a/gdb/gdbserver/i387-fp.c b/gdb/gdbserver/i387-fp.c
index 3d1d6a6..19a9929 100644
--- a/gdb/gdbserver/i387-fp.c
+++ b/gdb/gdbserver/i387-fp.c
@@ -20,6 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "server.h"
+#include "i387-fp.h"
 
 int num_xmm_registers = 8;
 
@@ -108,7 +109,7 @@
 }
 
 void
-i387_fsave_to_cache (void *buf)
+i387_fsave_to_cache (const void *buf)
 {
   struct i387_fsave *fp = (struct i387_fsave *) buf;
   int i;
@@ -240,7 +241,7 @@
 }
 
 void
-i387_fxsave_to_cache (void *buf)
+i387_fxsave_to_cache (const void *buf)
 {
   struct i387_fxsave *fp = (struct i387_fxsave *) buf;
   int i, top;
@@ -287,4 +288,3 @@
   val = (fp->fop) & 0x7FF;
   supply_register_by_name ("fop", &val);
 }
-
diff --git a/gdb/gdbserver/i387-fp.h b/gdb/gdbserver/i387-fp.h
index 90fe4ca..d28c422 100644
--- a/gdb/gdbserver/i387-fp.h
+++ b/gdb/gdbserver/i387-fp.h
@@ -23,10 +23,10 @@
 #define I387_FP_H
 
 void i387_cache_to_fsave (void *buf);
-void i387_fsave_to_cache (void *buf);
+void i387_fsave_to_cache (const void *buf);
 
 void i387_cache_to_fxsave (void *buf);
-void i387_fxsave_to_cache (void *buf);
+void i387_fxsave_to_cache (const void *buf);
 
 extern int num_xmm_registers;
 
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index 774798d..68c91c4 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -25,81 +25,175 @@
 
 #include "server.h"
 
-struct inferior_info
+struct thread_info
 {
-  int pid;
+  struct inferior_list_entry entry;
   void *target_data;
   void *regcache_data;
-  struct inferior_info *next;
 };
 
-static struct inferior_info *inferiors;
-struct inferior_info *current_inferior;
-int signal_pid;
+struct inferior_list all_threads;
+
+struct thread_info *current_inferior;
+
+#define get_thread(inf) ((struct thread_info *)(inf))
 
 void
-add_inferior (int pid)
+add_inferior_to_list (struct inferior_list *list,
+		      struct inferior_list_entry *new_inferior)
 {
-  struct inferior_info *new_inferior
-    = (struct inferior_info *) malloc (sizeof (*new_inferior));
+  new_inferior->next = NULL;
+  if (list->tail != NULL)
+    list->tail->next = new_inferior;
+  else
+    list->head = new_inferior;
+  list->tail = new_inferior;
+}
 
-  memset (new_inferior, 0, sizeof (*new_inferior));
+void
+for_each_inferior (struct inferior_list *list,
+		   void (*action) (struct inferior_list_entry *))
+{
+  struct inferior_list_entry *cur = list->head, *next;
 
-  new_inferior->pid = pid;
+  while (cur != NULL)
+    {
+      next = cur->next;
+      (*action) (cur);
+      cur = next;
+    }
+}
 
-  new_inferior->next = inferiors;
-  inferiors = new_inferior;
+void
+change_inferior_id (struct inferior_list *list,
+		    int new_id)
+{
+  if (list->head != list->tail)
+    error ("tried to change thread ID after multiple threads are created");
 
+  list->head->id = new_id;
+}
+
+void
+remove_inferior (struct inferior_list *list,
+		 struct inferior_list_entry *entry)
+{
+  struct inferior_list_entry **cur;
+
+  if (list->head == entry)
+    {
+      list->head = entry->next;
+      if (list->tail == entry)
+	list->tail = list->head;
+      return;
+    }
+
+  cur = &list->head;
+  while (*cur && (*cur)->next != entry)
+    cur = &(*cur)->next;
+
+  if (*cur == NULL)
+    return;
+
+  (*cur)->next = entry->next;
+
+  if (list->tail == entry)
+    list->tail = *cur;
+}
+
+void
+add_thread (int thread_id, void *target_data)
+{
+  struct thread_info *new_thread
+    = (struct thread_info *) malloc (sizeof (*new_thread));
+
+  memset (new_thread, 0, sizeof (*new_thread));
+
+  new_thread->entry.id = thread_id;
+
+  add_inferior_to_list (&all_threads, & new_thread->entry);
+  
   if (current_inferior == NULL)
-    current_inferior = inferiors;
+    current_inferior = new_thread;
 
-  create_register_cache (new_inferior);
+  new_thread->target_data = target_data;
+  set_inferior_regcache_data (new_thread, new_register_cache ());
+}
 
-  if (signal_pid == 0)
-    signal_pid = pid;
+static void
+free_one_thread (struct inferior_list_entry *inf)
+{
+  struct thread_info *thread = get_thread (inf);
+  free_register_cache (inferior_regcache_data (thread));
+  free (thread);
+}
+
+void
+remove_thread (struct thread_info *thread)
+{
+  remove_inferior (&all_threads, (struct inferior_list_entry *) thread);
+  free_one_thread (&thread->entry);
 }
 
 void
 clear_inferiors (void)
 {
-  struct inferior_info *inf = inferiors, *next_inf;
+  for_each_inferior (&all_threads, free_one_thread);
 
-  while (inf)
+  all_threads.head = all_threads.tail = NULL;
+}
+
+struct inferior_list_entry *
+find_inferior (struct inferior_list *list,
+	       int (*func) (struct inferior_list_entry *, void *), void *arg)
+{
+  struct inferior_list_entry *inf = list->head;
+
+  while (inf != NULL)
     {
-      next_inf = inf->next;
-
-      if (inf->target_data)
-	free (inf->target_data);
-      if (inf->regcache_data)
-	free_register_cache (inf);
-
-      free (inf);
-      inf = next_inf;
+      if ((*func) (inf, arg))
+	return inf;
+      inf = inf->next;
     }
 
-  inferiors = NULL;
+  return NULL;
+}
+
+struct inferior_list_entry *
+find_inferior_id (struct inferior_list *list, int id)
+{
+  struct inferior_list_entry *inf = list->head;
+
+  while (inf != NULL)
+    {
+      if (inf->id == id)
+	return inf;
+      inf = inf->next;
+    }
+
+  return NULL;
 }
 
 void *
-inferior_target_data (struct inferior_info *inferior)
+inferior_target_data (struct thread_info *inferior)
 {
   return inferior->target_data;
 }
 
 void
-set_inferior_target_data (struct inferior_info *inferior, void *data)
+set_inferior_target_data (struct thread_info *inferior, void *data)
 {
   inferior->target_data = data;
 }
 
 void *
-inferior_regcache_data (struct inferior_info *inferior)
+inferior_regcache_data (struct thread_info *inferior)
 {
   return inferior->regcache_data;
 }
 
 void
-set_inferior_regcache_data (struct inferior_info *inferior, void *data)
+set_inferior_regcache_data (struct thread_info *inferior, void *data)
 {
   inferior->regcache_data = data;
 }
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index 2958fdf..07e2792 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -45,9 +45,49 @@
   return (regno >= arm_num_regs);
 }
 
+static CORE_ADDR
+arm_get_pc ()
+{
+  unsigned long pc;
+  collect_register_by_name ("pc", &pc);
+  return pc;
+}
+
+static void
+arm_set_pc (CORE_ADDR pc)
+{
+  unsigned long newpc = pc;
+  supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness.  We do not support Thumb yet.  */
+static const unsigned long arm_breakpoint = 0xef9f0001;
+#define arm_breakpoint_len 4
+
+static int
+arm_breakpoint_at (CORE_ADDR where)
+{
+  unsigned long insn;
+
+  (*the_target->read_memory) (where, (char *) &insn, 4);
+  if (insn == arm_breakpoint)
+    return 1;
+
+  /* If necessary, recognize more trap instructions here.  GDB only uses the
+     one.  */
+  return 0;
+}
+
 struct linux_target_ops the_low_target = {
   arm_num_regs,
   arm_regmap,
   arm_cannot_fetch_register,
   arm_cannot_store_register,
+  arm_get_pc,
+  arm_set_pc,
+  (const char *) &arm_breakpoint,
+  arm_breakpoint_len,
+  NULL,
+  0,
+  arm_breakpoint_at,
 };
diff --git a/gdb/gdbserver/linux-i386-low.c b/gdb/gdbserver/linux-i386-low.c
index 7126432..b79b601 100644
--- a/gdb/gdbserver/linux-i386-low.c
+++ b/gdb/gdbserver/linux-i386-low.c
@@ -72,7 +72,7 @@
 }
 
 static void
-i386_store_gregset (void *buf)
+i386_store_gregset (const void *buf)
 {
   int i;
 
@@ -89,7 +89,7 @@
 }
 
 static void
-i386_store_fpregset (void *buf)
+i386_store_fpregset (const void *buf)
 {
   i387_fsave_to_cache (buf);
 }
@@ -101,7 +101,7 @@
 }
 
 static void
-i386_store_fpxregset (void *buf)
+i386_store_fpxregset (const void *buf)
 {
   i387_fxsave_to_cache (buf);
 }
@@ -109,14 +109,17 @@
 
 struct regset_info target_regsets[] = {
   { PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
+    GENERAL_REGS,
     i386_fill_gregset, i386_store_gregset },
 #ifdef HAVE_PTRACE_GETFPXREGS
   { PTRACE_GETFPXREGS, PTRACE_SETFPXREGS, sizeof (elf_fpxregset_t),
+    EXTENDED_REGS,
     i386_fill_fpxregset, i386_store_fpxregset },
 #endif
   { PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof (elf_fpregset_t),
+    FP_REGS,
     i386_fill_fpregset, i386_store_fpregset },
-  { 0, 0, -1, NULL, NULL }
+  { 0, 0, -1, -1, NULL, NULL }
 };
 
 #endif /* HAVE_LINUX_REGSETS */
@@ -124,25 +127,38 @@
 static const char i386_breakpoint[] = { 0xCC };
 #define i386_breakpoint_len 1
 
+extern int debug_threads;
+
 static CORE_ADDR
-i386_stop_pc ()
+i386_get_pc ()
 {
   unsigned long pc;
 
-  /* Overkill */
-  fetch_inferior_registers (0);
-
   collect_register_by_name ("eip", &pc);
-  return pc - 1;
+
+  if (debug_threads)
+    fprintf (stderr, "stop pc (before any decrement) is %08lx\n", pc);
+  return pc;
 }
 
 static void
 i386_set_pc (CORE_ADDR newpc)
 {
+  if (debug_threads)
+    fprintf (stderr, "set pc to %08lx\n", (long) newpc);
   supply_register_by_name ("eip", &newpc);
+}
 
-  /* Overkill */
-  store_inferior_registers (0);
+static int
+i386_breakpoint_at (CORE_ADDR pc)
+{
+  unsigned char c;
+
+  read_inferior_memory (pc, &c, 1);
+  if (c == 0xCC)
+    return 1;
+
+  return 0;
 }
 
 struct linux_target_ops the_low_target = {
@@ -150,8 +166,11 @@
   i386_regmap,
   i386_cannot_fetch_register,
   i386_cannot_store_register,
-  i386_stop_pc,
+  i386_get_pc,
   i386_set_pc,
   i386_breakpoint,
   i386_breakpoint_len,
+  NULL,
+  1,
+  i386_breakpoint_at,
 };
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 6cfe0d5..7048daf 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -35,9 +35,32 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-static CORE_ADDR linux_bp_reinsert;
+/* ``all_threads'' is keyed by the LWP ID - it should be the thread ID instead,
+   however.  This requires changing the ID in place when we go from !using_threads
+   to using_threads, immediately.
 
+   ``all_processes'' is keyed by the process ID - which on Linux is (presently)
+   the same as the LWP ID.  */
+
+struct inferior_list all_processes;
+
+/* FIXME this is a bit of a hack, and could be removed.  */
+int stopping_threads;
+
+/* FIXME make into a target method?  */
+int using_threads;
+
+static void linux_resume_one_process (struct inferior_list_entry *entry,
+				      int step, int signal);
 static void linux_resume (int step, int signal);
+static void stop_all_processes (void);
+static int linux_wait_for_event (struct thread_info *child);
+
+struct pending_signals
+{
+  int signal;
+  struct pending_signals *prev;
+};
 
 #define PTRACE_ARG3_TYPE long
 #define PTRACE_XFER_TYPE long
@@ -48,12 +71,64 @@
 
 extern int errno;
 
-static int inferior_pid;
+int debug_threads = 0;
 
-struct inferior_linux_data
+#define pid_of(proc) ((proc)->head.id)
+
+/* FIXME: Delete eventually.  */
+#define inferior_pid (pid_of (get_thread_process (current_inferior)))
+
+/* This function should only be called if the process got a SIGTRAP.
+   The SIGTRAP could mean several things.
+
+   On i386, where decr_pc_after_break is non-zero:
+   If we were single-stepping this process using PTRACE_SINGLESTEP,
+   we will get only the one SIGTRAP (even if the instruction we
+   stepped over was a breakpoint).  The value of $eip will be the
+   next instruction.
+   If we continue the process using PTRACE_CONT, we will get a
+   SIGTRAP when we hit a breakpoint.  The value of $eip will be
+   the instruction after the breakpoint (i.e. needs to be
+   decremented).  If we report the SIGTRAP to GDB, we must also
+   report the undecremented PC.  If we cancel the SIGTRAP, we
+   must resume at the decremented PC.
+
+   (Presumably, not yet tested) On a non-decr_pc_after_break machine
+   with hardware or kernel single-step:
+   If we single-step over a breakpoint instruction, our PC will
+   point at the following instruction.  If we continue and hit a
+   breakpoint instruction, our PC will point at the breakpoint
+   instruction.  */
+
+static CORE_ADDR
+get_stop_pc (void)
 {
-  int pid;
-};
+  CORE_ADDR stop_pc = (*the_low_target.get_pc) ();
+
+  if (get_thread_process (current_inferior)->stepping)
+    return stop_pc;
+  else
+    return stop_pc - the_low_target.decr_pc_after_break;
+}
+
+static void *
+add_process (int pid)
+{
+  struct process_info *process;
+
+  process = (struct process_info *) malloc (sizeof (*process));
+  memset (process, 0, sizeof (*process));
+
+  process->head.id = pid;
+
+  /* Default to tid == lwpid == pid.  */
+  process->tid = pid;
+  process->lwpid = pid;
+
+  add_inferior_to_list (&all_processes, &process->head);
+
+  return process;
+}
 
 /* Start an inferior process and returns its pid.
    ALLARGS is a vector of program-name and args. */
@@ -61,7 +136,7 @@
 static int
 linux_create_inferior (char *program, char **allargs)
 {
-  struct inferior_linux_data *tdata;
+  void *new_process;
   int pid;
 
   pid = fork ();
@@ -72,6 +147,8 @@
     {
       ptrace (PTRACE_TRACEME, 0, 0, 0);
 
+      signal (SIGRTMIN + 1, SIG_DFL);
+
       execv (program, allargs);
 
       fprintf (stderr, "Cannot exec %s: %s.\n", program,
@@ -80,22 +157,18 @@
       _exit (0177);
     }
 
-  add_inferior (pid);
-  tdata = (struct inferior_linux_data *) malloc (sizeof (*tdata));
-  tdata->pid = pid;
-  set_inferior_target_data (current_inferior, tdata);
+  new_process = add_process (pid);
+  add_thread (pid, new_process);
 
-  /* FIXME remove */
-  inferior_pid = pid;
   return 0;
 }
 
 /* Attach to an inferior process.  */
 
-static int
-linux_attach (int pid)
+void
+linux_attach_lwp (int pid, int tid)
 {
-  struct inferior_linux_data *tdata;
+  struct process_info *new_process;
 
   if (ptrace (PTRACE_ATTACH, pid, 0, 0) != 0)
     {
@@ -103,144 +176,713 @@
 	       errno < sys_nerr ? sys_errlist[errno] : "unknown error",
 	       errno);
       fflush (stderr);
-      _exit (0177);
+
+      /* If we fail to attach to an LWP, just return.  */
+      if (!using_threads)
+	_exit (0177);
+      return;
     }
 
-  add_inferior (pid);
-  tdata = (struct inferior_linux_data *) malloc (sizeof (*tdata));
-  tdata->pid = pid;
-  set_inferior_target_data (current_inferior, tdata);
+  new_process = (struct process_info *) add_process (pid);
+  add_thread (tid, new_process);
+
+  /* The next time we wait for this LWP we'll see a SIGSTOP as PTRACE_ATTACH
+     brings it to a halt.  We should ignore that SIGSTOP and resume the process
+     (unless this is the first process, in which case the flag will be cleared
+     in linux_attach).
+
+     On the other hand, if we are currently trying to stop all threads, we
+     should treat the new thread as if we had sent it a SIGSTOP.  This works
+     because we are guaranteed that add_process added us to the end of the
+     list, and so the new thread has not yet reached wait_for_sigstop (but
+     will).  */
+  if (! stopping_threads)
+    new_process->stop_expected = 1;
+}
+
+int
+linux_attach (int pid)
+{
+  struct process_info *process;
+
+  linux_attach_lwp (pid, pid);
+
+  /* Don't ignore the initial SIGSTOP if we just attached to this process.  */
+  process = (struct process_info *) find_inferior_id (&all_processes, pid);
+  process->stop_expected = 0;
+
   return 0;
 }
 
 /* Kill the inferior process.  Make us have no inferior.  */
 
 static void
-linux_kill (void)
+linux_kill_one_process (struct inferior_list_entry *entry)
 {
-  if (inferior_pid == 0)
-    return;
-  ptrace (PTRACE_KILL, inferior_pid, 0, 0);
-  wait (0);
-  clear_inferiors ();
+  struct thread_info *thread = (struct thread_info *) entry;
+  struct process_info *process = get_thread_process (thread);
+  int wstat;
+
+  do
+    {
+      ptrace (PTRACE_KILL, pid_of (process), 0, 0);
+
+      /* Make sure it died.  The loop is most likely unnecessary.  */
+      wstat = linux_wait_for_event (thread);
+    } while (WIFSTOPPED (wstat));
 }
 
 /* Return nonzero if the given thread is still alive.  */
-static int
-linux_thread_alive (int pid)
+static void
+linux_kill (void)
 {
-  return 1;
+  for_each_inferior (&all_threads, linux_kill_one_process);
 }
 
 static int
-linux_wait_for_one_inferior (struct inferior_info *child)
+linux_thread_alive (int tid)
 {
-  struct inferior_linux_data *child_data = inferior_target_data (child);
-  int pid, wstat;
+  if (find_inferior_id (&all_threads, tid) != NULL)
+    return 1;
+  else
+    return 0;
+}
+
+/* Return nonzero if this process stopped at a breakpoint which
+   no longer appears to be inserted.  Also adjust the PC
+   appropriately to resume where the breakpoint used to be.  */
+static int
+check_removed_breakpoint (struct process_info *event_child)
+{
+  CORE_ADDR stop_pc;
+  struct thread_info *saved_inferior;
+
+  if (event_child->pending_is_breakpoint == 0)
+    return 0;
+
+  if (debug_threads)
+    fprintf (stderr, "Checking for breakpoint.\n");
+
+  saved_inferior = current_inferior;
+  current_inferior = get_process_thread (event_child);
+
+  stop_pc = get_stop_pc ();
+
+  /* If the PC has changed since we stopped, then we shouldn't do
+     anything.  This happens if, for instance, GDB handled the
+     decr_pc_after_break subtraction itself.  */
+  if (stop_pc != event_child->pending_stop_pc)
+    {
+      if (debug_threads)
+	fprintf (stderr, "Ignoring, PC was changed.\n");
+
+      event_child->pending_is_breakpoint = 0;
+      current_inferior = saved_inferior;
+      return 0;
+    }
+
+  /* If the breakpoint is still there, we will report hitting it.  */
+  if ((*the_low_target.breakpoint_at) (stop_pc))
+    {
+      if (debug_threads)
+	fprintf (stderr, "Ignoring, breakpoint is still present.\n");
+      current_inferior = saved_inferior;
+      return 0;
+    }
+
+  if (debug_threads)
+    fprintf (stderr, "Removed breakpoint.\n");
+
+  /* For decr_pc_after_break targets, here is where we perform the
+     decrement.  We go immediately from this function to resuming,
+     and can not safely call get_stop_pc () again.  */
+  if (the_low_target.set_pc != NULL)
+    (*the_low_target.set_pc) (stop_pc);
+
+  /* We consumed the pending SIGTRAP.  */
+  event_child->status_pending_p = 0;
+  event_child->status_pending = 0;
+
+  current_inferior = saved_inferior;
+  return 1;
+}
+
+/* Return 1 if this process has an interesting status pending.  This function
+   may silently resume an inferior process.  */
+static int
+status_pending_p (struct inferior_list_entry *entry, void *dummy)
+{
+  struct process_info *process = (struct process_info *) entry;
+
+  if (process->status_pending_p)
+    if (check_removed_breakpoint (process))
+      {
+	/* This thread was stopped at a breakpoint, and the breakpoint
+	   is now gone.  We were told to continue (or step...) all threads,
+	   so GDB isn't trying to single-step past this breakpoint.
+	   So instead of reporting the old SIGTRAP, pretend we got to
+	   the breakpoint just after it was removed instead of just
+	   before; resume the process.  */
+	linux_resume_one_process (&process->head, 0, 0);
+	return 0;
+      }
+
+  return process->status_pending_p;
+}
+
+static void
+linux_wait_for_process (struct process_info **childp, int *wstatp)
+{
+  int ret;
+  int to_wait_for = -1;
+
+  if (*childp != NULL)
+    to_wait_for = (*childp)->lwpid;
 
   while (1)
     {
-      pid = waitpid (child_data->pid, &wstat, 0);
+      ret = waitpid (to_wait_for, wstatp, WNOHANG);
 
-      if (pid != child_data->pid)
-	perror_with_name ("wait");
-
-      /* If this target supports breakpoints, see if we hit one.  */
-      if (the_low_target.stop_pc != NULL
-	  && WIFSTOPPED (wstat)
-	  && WSTOPSIG (wstat) == SIGTRAP)
+      if (ret == -1)
 	{
-	  CORE_ADDR stop_pc;
+	  if (errno != ECHILD)
+	    perror_with_name ("waitpid");
+	}
+      else if (ret > 0)
+	break;
 
-	  if (linux_bp_reinsert != 0)
+      ret = waitpid (to_wait_for, wstatp, WNOHANG | __WCLONE);
+
+      if (ret == -1)
+	{
+	  if (errno != ECHILD)
+	    perror_with_name ("waitpid (WCLONE)");
+	}
+      else if (ret > 0)
+	break;
+
+      usleep (1000);
+    }
+
+  if (debug_threads
+      && (!WIFSTOPPED (*wstatp)
+	  || (WSTOPSIG (*wstatp) != 32
+	      && WSTOPSIG (*wstatp) != 33)))
+    fprintf (stderr, "Got an event from %d (%x)\n", ret, *wstatp);
+
+  if (to_wait_for == -1)
+    *childp = (struct process_info *) find_inferior_id (&all_processes, ret);
+
+  (*childp)->stopped = 1;
+  (*childp)->pending_is_breakpoint = 0;
+
+  if (debug_threads
+      && WIFSTOPPED (*wstatp))
+    {
+      current_inferior = (struct thread_info *)
+	find_inferior_id (&all_threads, (*childp)->tid);
+      /* For testing only; i386_stop_pc prints out a diagnostic.  */
+      if (the_low_target.get_pc != NULL)
+	get_stop_pc ();
+    }
+}
+
+static int
+linux_wait_for_event (struct thread_info *child)
+{
+  CORE_ADDR stop_pc;
+  struct process_info *event_child;
+  int wstat;
+
+  /* Check for a process with a pending status.  */
+  /* It is possible that the user changed the pending task's registers since
+     it stopped.  We correctly handle the change of PC if we hit a breakpoint
+     (in check_removed_breakpoints); signals should be reported anyway.  */
+  if (child == NULL)
+    {
+      event_child = (struct process_info *)
+	find_inferior (&all_processes, status_pending_p, NULL);
+      if (debug_threads && event_child)
+	fprintf (stderr, "Got a pending child %d\n", event_child->lwpid);
+    }
+  else
+    {
+      event_child = get_thread_process (child);
+      if (event_child->status_pending_p
+	  && check_removed_breakpoint (event_child))
+	event_child = NULL;
+    }
+
+  if (event_child != NULL)
+    {
+      if (event_child->status_pending_p)
+	{
+	  if (debug_threads)
+	    fprintf (stderr, "Got an event from pending child %d (%04x)\n",
+		     event_child->lwpid, event_child->status_pending);
+	  wstat = event_child->status_pending;
+	  event_child->status_pending_p = 0;
+	  event_child->status_pending = 0;
+	  current_inferior = get_process_thread (event_child);
+	  return wstat;
+	}
+    }
+
+  /* We only enter this loop if no process has a pending wait status.  Thus
+     any action taken in response to a wait status inside this loop is
+     responding as soon as we detect the status, not after any pending
+     events.  */
+  while (1)
+    {
+      if (child == NULL)
+	event_child = NULL;
+      else
+	event_child = get_thread_process (child);
+
+      linux_wait_for_process (&event_child, &wstat);
+
+      if (event_child == NULL)
+	error ("event from unknown child");
+
+      current_inferior = (struct thread_info *)
+	find_inferior_id (&all_threads, event_child->tid);
+
+      if (using_threads)
+	{
+	  /* Check for thread exit.  */
+	  if (! WIFSTOPPED (wstat))
 	    {
-	      reinsert_breakpoint (linux_bp_reinsert);
-	      linux_bp_reinsert = 0;
-	      linux_resume (0, 0);
+	      if (debug_threads)
+		fprintf (stderr, "Thread %d (LWP %d) exiting\n",
+			 event_child->tid, event_child->head.id);
+
+	      /* If the last thread is exiting, just return.  */
+	      if (all_threads.head == all_threads.tail)
+		return wstat;
+
+	      dead_thread_notify (event_child->tid);
+
+	      remove_inferior (&all_processes, &event_child->head);
+	      free (event_child);
+	      remove_thread (current_inferior);
+	      current_inferior = (struct thread_info *) all_threads.head;
+
+	      /* If we were waiting for this particular child to do something...
+		 well, it did something.  */
+	      if (child != NULL)
+		return wstat;
+
+	      /* Wait for a more interesting event.  */
 	      continue;
 	    }
 
-	  fetch_inferior_registers (0);
-	  stop_pc = (*the_low_target.stop_pc) ();
-
-	  if (check_breakpoints (stop_pc) != 0)
+	  if (WIFSTOPPED (wstat)
+	      && WSTOPSIG (wstat) == SIGSTOP
+	      && event_child->stop_expected)
 	    {
-	      if (the_low_target.set_pc != NULL)
-		(*the_low_target.set_pc) (stop_pc);
+	      if (debug_threads)
+		fprintf (stderr, "Expected stop.\n");
+	      event_child->stop_expected = 0;
+	      linux_resume_one_process (&event_child->head,
+					event_child->stepping, 0);
+	      continue;
+	    }
 
-	      if (the_low_target.breakpoint_reinsert_addr == NULL)
-		{
-		  linux_bp_reinsert = stop_pc;
-		  uninsert_breakpoint (stop_pc);
-		  linux_resume (1, 0);
-		}
-	      else
-		{
-		  reinsert_breakpoint_by_bp
-		    (stop_pc, (*the_low_target.breakpoint_reinsert_addr) ());
-		  linux_resume (0, 0);
-		}
-
+	  /* FIXME drow/2002-06-09: Get signal numbers from the inferior's
+	     thread library?  */
+	  if (WIFSTOPPED (wstat)
+	      && (WSTOPSIG (wstat) == SIGRTMIN
+		  || WSTOPSIG (wstat) == SIGRTMIN + 1))
+	    {
+	      if (debug_threads)
+		fprintf (stderr, "Ignored signal %d for %d (LWP %d).\n",
+			 WSTOPSIG (wstat), event_child->tid,
+			 event_child->head.id);
+	      linux_resume_one_process (&event_child->head,
+					event_child->stepping,
+					WSTOPSIG (wstat));
 	      continue;
 	    }
 	}
 
+      /* If this event was not handled above, and is not a SIGTRAP, report
+	 it.  */
+      if (!WIFSTOPPED (wstat) || WSTOPSIG (wstat) != SIGTRAP)
+	return wstat;
+
+      /* If this target does not support breakpoints, we simply report the
+	 SIGTRAP; it's of no concern to us.  */
+      if (the_low_target.get_pc == NULL)
+	return wstat;
+
+      stop_pc = get_stop_pc ();
+
+      /* bp_reinsert will only be set if we were single-stepping.
+	 Notice that we will resume the process after hitting
+	 a gdbserver breakpoint; single-stepping to/over one
+	 is not supported (yet).  */
+      if (event_child->bp_reinsert != 0)
+	{
+	  if (debug_threads)
+	    fprintf (stderr, "Reinserted breakpoint.\n");
+	  reinsert_breakpoint (event_child->bp_reinsert);
+	  event_child->bp_reinsert = 0;
+
+	  /* Clear the single-stepping flag and SIGTRAP as we resume.  */
+	  linux_resume_one_process (&event_child->head, 0, 0);
+	  continue;
+	}
+
+      if (debug_threads)
+	fprintf (stderr, "Hit a (non-reinsert) breakpoint.\n");
+
+      if (check_breakpoints (stop_pc) != 0)
+	{
+	  /* We hit one of our own breakpoints.  We mark it as a pending
+	     breakpoint, so that check_removed_breakpoints () will do the PC
+	     adjustment for us at the appropriate time.  */
+	  event_child->pending_is_breakpoint = 1;
+	  event_child->pending_stop_pc = stop_pc;
+
+	  /* Now we need to put the breakpoint back.  We continue in the event
+	     loop instead of simply replacing the breakpoint right away,
+	     in order to not lose signals sent to the thread that hit the
+	     breakpoint.  Unfortunately this increases the window where another
+	     thread could sneak past the removed breakpoint.  For the current
+	     use of server-side breakpoints (thread creation) this is
+	     acceptable; but it needs to be considered before this breakpoint
+	     mechanism can be used in more general ways.  For some breakpoints
+	     it may be necessary to stop all other threads, but that should
+	     be avoided where possible.
+
+	     If breakpoint_reinsert_addr is NULL, that means that we can
+	     use PTRACE_SINGLESTEP on this platform.  Uninsert the breakpoint,
+	     mark it for reinsertion, and single-step.
+
+	     Otherwise, call the target function to figure out where we need
+	     our temporary breakpoint, create it, and continue executing this
+	     process.  */
+	  if (the_low_target.breakpoint_reinsert_addr == NULL)
+	    {
+	      event_child->bp_reinsert = stop_pc;
+	      uninsert_breakpoint (stop_pc);
+	      linux_resume_one_process (&event_child->head, 1, 0);
+	    }
+	  else
+	    {
+	      reinsert_breakpoint_by_bp
+		(stop_pc, (*the_low_target.breakpoint_reinsert_addr) ());
+	      linux_resume_one_process (&event_child->head, 0, 0);
+	    }
+
+	  continue;
+	}
+
+      /* If we were single-stepping, we definitely want to report the
+	 SIGTRAP.  The single-step operation has completed, so also
+         clear the stepping flag; in general this does not matter, 
+	 because the SIGTRAP will be reported to the client, which
+	 will give us a new action for this thread, but clear it for
+	 consistency anyway.  It's safe to clear the stepping flag
+         because the only consumer of get_stop_pc () after this point
+	 is check_removed_breakpoints, and pending_is_breakpoint is not
+	 set.  It might be wiser to use a step_completed flag instead.  */
+      if (event_child->stepping)
+	{
+	  event_child->stepping = 0;
+	  return wstat;
+	}
+
+      /* A SIGTRAP that we can't explain.  It may have been a breakpoint.
+	 Check if it is a breakpoint, and if so mark the process information
+	 accordingly.  This will handle both the necessary fiddling with the
+	 PC on decr_pc_after_break targets and suppressing extra threads
+	 hitting a breakpoint if two hit it at once and then GDB removes it
+	 after the first is reported.  Arguably it would be better to report
+	 multiple threads hitting breakpoints simultaneously, but the current
+	 remote protocol does not allow this.  */
+      if ((*the_low_target.breakpoint_at) (stop_pc))
+	{
+	  event_child->pending_is_breakpoint = 1;
+	  event_child->pending_stop_pc = stop_pc;
+	}
+
       return wstat;
     }
+
   /* NOTREACHED */
   return 0;
 }
 
-/* Wait for process, returns status */
+/* Wait for process, returns status.  */
 
 static unsigned char
 linux_wait (char *status)
 {
   int w;
+  struct thread_info *child = NULL;
+
+retry:
+  /* If we were only supposed to resume one thread, only wait for
+     that thread - if it's still alive.  If it died, however - which
+     can happen if we're coming from the thread death case below -
+     then we need to make sure we restart the other threads.  We could
+     pick a thread at random or restart all; restarting all is less
+     arbitrary.  */
+  if (cont_thread > 0)
+    {
+      child = (struct thread_info *) find_inferior_id (&all_threads,
+						       cont_thread);
+
+      /* No stepping, no signal - unless one is pending already, of course.  */
+      if (child == NULL)
+	linux_resume (0, 0);
+    }
 
   enable_async_io ();
-  w = linux_wait_for_one_inferior (current_inferior);
+  w = linux_wait_for_event (child);
+  stop_all_processes ();
   disable_async_io ();
 
-  if (WIFEXITED (w))
-    {
-      fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
-      *status = 'W';
-      clear_inferiors ();
-      return ((unsigned char) WEXITSTATUS (w));
-    }
-  else if (!WIFSTOPPED (w))
-    {
-      fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
-      clear_inferiors ();
-      *status = 'X';
-      return ((unsigned char) WTERMSIG (w));
-    }
+  /* If we are waiting for a particular child, and it exited,
+     linux_wait_for_event will return its exit status.  Similarly if
+     the last child exited.  If this is not the last child, however,
+     do not report it as exited until there is a 'thread exited' response
+     available in the remote protocol.  Instead, just wait for another event.
+     This should be safe, because if the thread crashed we will already
+     have reported the termination signal to GDB; that should stop any
+     in-progress stepping operations, etc.
 
-  fetch_inferior_registers (0);
+     Report the exit status of the last thread to exit.  This matches
+     LinuxThreads' behavior.  */
+
+  if (all_threads.head == all_threads.tail)
+    {
+      if (WIFEXITED (w))
+	{
+	  fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
+	  *status = 'W';
+	  clear_inferiors ();
+	  return ((unsigned char) WEXITSTATUS (w));
+	}
+      else if (!WIFSTOPPED (w))
+	{
+	  fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
+	  clear_inferiors ();
+	  *status = 'X';
+	  return ((unsigned char) WTERMSIG (w));
+	}
+    }
+  else
+    {
+      if (!WIFSTOPPED (w))
+	goto retry;
+    }
 
   *status = 'T';
   return ((unsigned char) WSTOPSIG (w));
 }
 
+static void
+send_sigstop (struct inferior_list_entry *entry)
+{
+  struct process_info *process = (struct process_info *) entry;
+
+  if (process->stopped)
+    return;
+
+  /* If we already have a pending stop signal for this process, don't
+     send another.  */
+  if (process->stop_expected)
+    {
+      process->stop_expected = 0;
+      return;
+    }
+
+  if (debug_threads)
+    fprintf (stderr, "Sending sigstop to process %d\n", process->head.id);
+
+  kill (process->head.id, SIGSTOP);
+  process->sigstop_sent = 1;
+}
+
+static void
+wait_for_sigstop (struct inferior_list_entry *entry)
+{
+  struct process_info *process = (struct process_info *) entry;
+  struct thread_info *saved_inferior, *thread;
+  int wstat, saved_tid;
+
+  if (process->stopped)
+    return;
+
+  saved_inferior = current_inferior;
+  saved_tid = ((struct inferior_list_entry *) saved_inferior)->id;
+  thread = (struct thread_info *) find_inferior_id (&all_threads,
+						    process->tid);
+  wstat = linux_wait_for_event (thread);
+
+  /* If we stopped with a non-SIGSTOP signal, save it for later
+     and record the pending SIGSTOP.  If the process exited, just
+     return.  */
+  if (WIFSTOPPED (wstat)
+      && WSTOPSIG (wstat) != SIGSTOP)
+    {
+      if (debug_threads)
+	fprintf (stderr, "Stopped with non-sigstop signal\n");
+      process->status_pending_p = 1;
+      process->status_pending = wstat;
+      process->stop_expected = 1;
+    }
+
+  if (linux_thread_alive (saved_tid))
+    current_inferior = saved_inferior;
+  else
+    {
+      if (debug_threads)
+	fprintf (stderr, "Previously current thread died.\n");
+
+      /* Set a valid thread as current.  */
+      set_desired_inferior (0);
+    }
+}
+
+static void
+stop_all_processes (void)
+{
+  stopping_threads = 1;
+  for_each_inferior (&all_processes, send_sigstop);
+  for_each_inferior (&all_processes, wait_for_sigstop);
+  stopping_threads = 0;
+}
+
 /* Resume execution of the inferior process.
    If STEP is nonzero, single-step it.
    If SIGNAL is nonzero, give it that signal.  */
 
 static void
-linux_resume (int step, int signal)
+linux_resume_one_process (struct inferior_list_entry *entry,
+			  int step, int signal)
 {
+  struct process_info *process = (struct process_info *) entry;
+  struct thread_info *saved_inferior;
+
+  if (process->stopped == 0)
+    return;
+
+  /* If we have pending signals or status, and a new signal, enqueue the
+     signal.  Also enqueue the signal if we are waiting to reinsert a
+     breakpoint; it will be picked up again below.  */
+  if (signal != 0
+      && (process->status_pending_p || process->pending_signals != NULL
+	  || process->bp_reinsert != 0))
+    {
+      struct pending_signals *p_sig;
+      p_sig = malloc (sizeof (*p_sig));
+      p_sig->prev = process->pending_signals;
+      p_sig->signal = signal;
+      process->pending_signals = p_sig;
+    }
+
+  if (process->status_pending_p)
+    return;
+
+  saved_inferior = current_inferior;
+  current_inferior = get_process_thread (process);
+
+  if (debug_threads)
+    fprintf (stderr, "Resuming process %d (%s, signal %d, stop %s)\n", inferior_pid,
+	     step ? "step" : "continue", signal,
+	     process->stop_expected ? "expected" : "not expected");
+
+  /* This bit needs some thinking about.  If we get a signal that
+     we must report while a single-step reinsert is still pending,
+     we often end up resuming the thread.  It might be better to
+     (ew) allow a stack of pending events; then we could be sure that
+     the reinsert happened right away and not lose any signals.
+
+     Making this stack would also shrink the window in which breakpoints are
+     uninserted (see comment in linux_wait_for_process) but not enough for
+     complete correctness, so it won't solve that problem.  It may be
+     worthwhile just to solve this one, however.  */
+  if (process->bp_reinsert != 0)
+    {
+      if (debug_threads)
+	fprintf (stderr, "  pending reinsert at %08lx", (long)process->bp_reinsert);
+      if (step == 0)
+	fprintf (stderr, "BAD - reinserting but not stepping.\n");
+      step = 1;
+
+      /* Postpone any pending signal.  It was enqueued above.  */
+      signal = 0;
+    }
+
+  check_removed_breakpoint (process);
+
+  if (debug_threads && the_low_target.get_pc != NULL) 
+    {
+      fprintf (stderr, "  ");
+      (long) (*the_low_target.get_pc) ();
+    }
+
+  /* If we have pending signals, consume one unless we are trying to reinsert
+     a breakpoint.  */
+  if (process->pending_signals != NULL && process->bp_reinsert == 0)
+    {
+      struct pending_signals **p_sig;
+
+      p_sig = &process->pending_signals;
+      while ((*p_sig)->prev != NULL)
+	p_sig = &(*p_sig)->prev;
+
+      signal = (*p_sig)->signal;
+      free (*p_sig);
+      *p_sig = NULL;
+    }
+
+  regcache_invalidate_one ((struct inferior_list_entry *)
+			   get_process_thread (process));
   errno = 0;
-  ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
+  process->stopped = 0;
+  process->stepping = step;
+  ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, process->lwpid, 0, signal);
+
+  current_inferior = saved_inferior;
   if (errno)
     perror_with_name ("ptrace");
 }
 
+/* This function is called once per process other than the first
+   one.  The first process we are told the signal to continue
+   with, and whether to step or continue; for all others, any
+   existing signals will be marked in status_pending_p to be
+   reported momentarily, and we preserve the stepping flag.  */
+static void
+linux_continue_one_process (struct inferior_list_entry *entry)
+{
+  struct process_info *process;
+
+  process = (struct process_info *) entry;
+  linux_resume_one_process (entry, process->stepping, 0);
+}
+
+static void
+linux_resume (int step, int signal)
+{
+  struct process_info *process;
+
+  process = get_thread_process (current_inferior);
+
+  /* If the current process has a status pending, this signal will
+     be enqueued and sent later.  */
+  linux_resume_one_process (&process->head, step, signal);
+
+  if (cont_thread == 0 || cont_thread == -1)
+    for_each_inferior (&all_processes, linux_continue_one_process);
+}
 
 #ifdef HAVE_LINUX_USRREGS
 
-#define REGISTER_RAW_SIZE(regno) register_size((regno))
-
 int
 register_addr (int regnum)
 {
@@ -262,6 +904,7 @@
 {
   CORE_ADDR regaddr;
   register int i;
+  char *buf;
 
   if (regno >= the_low_target.num_regs)
     return;
@@ -271,10 +914,11 @@
   regaddr = register_addr (regno);
   if (regaddr == -1)
     return;
-  for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+  buf = alloca (register_size (regno));
+  for (i = 0; i < register_size (regno); i += sizeof (PTRACE_XFER_TYPE))
     {
       errno = 0;
-      *(PTRACE_XFER_TYPE *) (register_data (regno) + i) =
+      *(PTRACE_XFER_TYPE *) (buf + i) =
 	ptrace (PTRACE_PEEKUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, 0);
       regaddr += sizeof (PTRACE_XFER_TYPE);
       if (errno != 0)
@@ -288,6 +932,8 @@
 	  goto error_exit;
 	}
     }
+  supply_register (regno, buf);
+
 error_exit:;
 }
 
@@ -310,6 +956,7 @@
 {
   CORE_ADDR regaddr;
   int i;
+  char *buf;
 
   if (regno >= 0)
     {
@@ -323,11 +970,13 @@
       if (regaddr == -1)
 	return;
       errno = 0;
-      for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+      buf = alloca (register_size (regno));
+      collect_register (regno, buf);
+      for (i = 0; i < register_size (regno); i += sizeof (PTRACE_XFER_TYPE))
 	{
 	  errno = 0;
 	  ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
-		  *(int *) (register_data (regno) + i));
+		  *(int *) (buf + i));
 	  if (errno != 0)
 	    {
 	      if ((*the_low_target.cannot_store_register) (regno) == 0)
@@ -345,7 +994,7 @@
     }
   else
     for (regno = 0; regno < the_low_target.num_regs; regno++)
-      store_inferior_registers (regno);
+      usr_store_inferior_registers (regno);
 }
 #endif /* HAVE_LINUX_USRREGS */
 
@@ -354,7 +1003,7 @@
 #ifdef HAVE_LINUX_REGSETS
 
 static int
-regsets_fetch_inferior_registers (void)
+regsets_fetch_inferior_registers ()
 {
   struct regset_info *regset;
 
@@ -392,7 +1041,10 @@
 	    }
 	  else
 	    {
-	      perror ("Warning: ptrace(regsets_fetch_inferior_registers)");
+	      char s[256];
+	      sprintf (s, "ptrace(regsets_fetch_inferior_registers) PID=%d",
+		       inferior_pid);
+	      perror (s);
 	    }
 	}
       regset->store_function (buf);
@@ -402,7 +1054,7 @@
 }
 
 static int
-regsets_store_inferior_registers (void)
+regsets_store_inferior_registers ()
 {
   struct regset_info *regset;
 
@@ -445,6 +1097,7 @@
 	    }
 	}
       regset ++;
+      free (buf);
     }
   return 0;
 }
@@ -528,6 +1181,11 @@
   register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
   extern int errno;
 
+  if (debug_threads)
+    {
+      fprintf (stderr, "Writing %02x to %08lx\n", (unsigned)myaddr[0], (long)memaddr);
+    }
+
   /* Fill start and end extra bytes of buffer with existing memory data.  */
 
   buffer[0] = ptrace (PTRACE_PEEKTEXT, inferior_pid,
@@ -562,7 +1220,40 @@
 static void
 linux_look_up_symbols (void)
 {
-  /* Don't need to look up any symbols yet.  */
+#ifdef USE_THREAD_DB
+  if (using_threads)
+    return;
+
+  using_threads = thread_db_init ();
+#endif
+}
+
+/* Return 1 if this process is not stopped.  */
+static int
+unstopped_p (struct inferior_list_entry *entry, void *dummy)
+{
+  struct process_info *process = (struct process_info *) entry;
+
+  if (process->stopped)
+    return 0;
+
+  return 1;
+}
+
+static int
+linux_signal_pid ()
+{
+  struct inferior_list_entry *process;
+
+  process = find_inferior (&all_processes, unstopped_p, NULL);
+
+  if (process == NULL)
+    {
+      warning ("no unstopped process");
+      return inferior_pid;
+    }
+
+  return pid_of ((struct process_info *) process);
 }
 
 
@@ -578,13 +1269,24 @@
   linux_read_memory,
   linux_write_memory,
   linux_look_up_symbols,
+  linux_signal_pid,
 };
 
+static void
+linux_init_signals ()
+{
+  /* FIXME drow/2002-06-09: As above, we should check with LinuxThreads
+     to find what the cancel signal actually is.  */
+  signal (SIGRTMIN+1, SIG_IGN);
+}
+
 void
 initialize_low (void)
 {
+  using_threads = 0;
   set_target_ops (&linux_target_ops);
   set_breakpoint_data (the_low_target.breakpoint,
 		       the_low_target.breakpoint_len);
   init_registers ();
+  linux_init_signals ();
 }
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index b484982..bae76b7 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -19,12 +19,21 @@
    Boston, MA 02111-1307, USA.  */
 
 #ifdef HAVE_LINUX_REGSETS
-typedef void (*regset_func) (void *);
+typedef void (*regset_fill_func) (void *);
+typedef void (*regset_store_func) (const void *);
+enum regset_type {
+  GENERAL_REGS,
+  FP_REGS,
+  EXTENDED_REGS,
+};
+
 struct regset_info
 {
   int get_request, set_request;
   int size;
-  regset_func fill_function, store_function;
+  enum regset_type type;
+  regset_fill_func fill_function;
+  regset_store_func store_function;
 };
 extern struct regset_info target_regsets[];
 #endif
@@ -39,11 +48,67 @@
      store the register, and 2 if failure to store the register
      is acceptable.  */
   int (*cannot_store_register) (int);
-  CORE_ADDR (*stop_pc) (void);
+  CORE_ADDR (*get_pc) (void);
   void (*set_pc) (CORE_ADDR newpc);
   const char *breakpoint;
   int breakpoint_len;
   CORE_ADDR (*breakpoint_reinsert_addr) (void);
+
+
+  int decr_pc_after_break;
+  int (*breakpoint_at) (CORE_ADDR pc);
 };
 
 extern struct linux_target_ops the_low_target;
+
+#define get_process(inf) ((struct process_info *)(inf))
+#define get_thread_process(thr) (get_process (inferior_target_data (thr)))
+#define get_process_thread(proc) ((struct thread_info *) \
+				  find_inferior_id (&all_threads, \
+				  get_process (proc)->tid))
+
+struct process_info
+{
+  struct inferior_list_entry head;
+  int thread_known;
+  int lwpid;
+  int tid;
+
+  /* If this flag is set, the next SIGSTOP will be ignored (the process will
+     be immediately resumed).  */
+  int stop_expected;
+
+  /* If this flag is set, the process is known to be stopped right now (stop
+     event already received in a wait()).  */
+  int stopped;
+
+  /* If this flag is set, we have sent a SIGSTOP to this process and are
+     waiting for it to stop.  */
+  int sigstop_sent;
+
+  /* If this flag is set, STATUS_PENDING is a waitstatus that has not yet
+     been reported.  */
+  int status_pending_p;
+  int status_pending;
+
+  /* If this flag is set, the pending status is a (GDB-placed) breakpoint.  */
+  int pending_is_breakpoint;
+  CORE_ADDR pending_stop_pc;
+
+  /* If this is non-zero, it is a breakpoint to be reinserted at our next
+     stop (SIGTRAP stops only).  */
+  CORE_ADDR bp_reinsert;
+
+  /* If this flag is set, the last continue operation on this process
+     was a single-step.  */
+  int stepping;
+
+  /* If this is non-zero, it points to a chain of signals which need to
+     be delivered to this process.  */
+  struct pending_signals *pending_signals;
+};
+extern struct inferior_list all_processes;
+
+void linux_attach_lwp (int pid, int tid);
+
+int thread_db_init (void);
diff --git a/gdb/gdbserver/linux-mips-low.c b/gdb/gdbserver/linux-mips-low.c
index f721ec9..51e74ce 100644
--- a/gdb/gdbserver/linux-mips-low.c
+++ b/gdb/gdbserver/linux-mips-low.c
@@ -96,9 +96,60 @@
   return 0;
 }
 
+static CORE_ADDR
+mips_get_pc ()
+{
+  unsigned long pc;
+  collect_register_by_name ("pc", &pc);
+  return pc;
+}
+
+static void
+mips_set_pc (CORE_ADDR pc)
+{
+  unsigned long newpc = pc;
+  supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness.  */
+static const unsigned long mips_breakpoint = 0x0005000d;
+#define mips_breakpoint_len 4
+
+/* We only place breakpoints in empty marker functions, and thread locking
+   is outside of the function.  So rather than importing software single-step,
+   we can just run until exit.  */
+static CORE_ADDR
+mips_reinsert_addr ()
+{
+  unsigned long pc;
+  collect_register_by_name ("ra", &pc);
+  return pc;
+}
+
+static int
+mips_breakpoint_at (CORE_ADDR where)
+{
+  unsigned long insn;
+
+  (*the_target->read_memory) (where, (char *) &insn, 4);
+  if (insn == mips_breakpoint)
+    return 1;
+
+  /* If necessary, recognize more trap instructions here.  GDB only uses the
+     one.  */
+  return 0;
+}
+
 struct linux_target_ops the_low_target = {
   mips_num_regs,
   mips_regmap,
   mips_cannot_fetch_register,
   mips_cannot_store_register,
+  mips_get_pc,
+  mips_set_pc,
+  (const char *) &mips_breakpoint,
+  mips_breakpoint_len,
+  mips_reinsert_addr,
+  0,
+  mips_breakpoint_at,
 };
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 7cb315a..2bb0f50 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -64,9 +64,53 @@
   return 0;
 }
 
+static CORE_ADDR
+ppc_get_pc (void)
+{
+  unsigned long pc;
+
+  collect_register_by_name ("pc", &pc);
+  return (CORE_ADDR) pc;
+}
+
+static void
+ppc_set_pc (CORE_ADDR pc)
+{
+  unsigned long newpc = pc;
+
+  supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness.  Note that this file is
+   for PowerPC only, not PowerPC64.
+   This instruction is "twge r2, r2", which GDB uses as a software
+   breakpoint.  */
+static const unsigned long ppc_breakpoint = 0x7d821008;
+#define ppc_breakpoint_len 4
+
+static int
+ppc_breakpoint_at (CORE_ADDR where)
+{
+  unsigned long insn;
+
+  (*the_target->read_memory) (where, (char *) &insn, 4);
+  if (insn == ppc_breakpoint)
+    return 1;
+  /* If necessary, recognize more trap instructions here.  GDB only uses the
+     one.  */
+  return 0;
+}
+
 struct linux_target_ops the_low_target = {
   ppc_num_regs,
   ppc_regmap,
   ppc_cannot_fetch_register,
   ppc_cannot_store_register,
+  ppc_get_pc,
+  ppc_set_pc,
+  (const char *) &ppc_breakpoint,
+  ppc_breakpoint_len,
+  NULL,
+  0,
+  ppc_breakpoint_at,
 };
diff --git a/gdb/gdbserver/linux-sh-low.c b/gdb/gdbserver/linux-sh-low.c
index cdc390d..ee84561 100644
--- a/gdb/gdbserver/linux-sh-low.c
+++ b/gdb/gdbserver/linux-sh-low.c
@@ -57,9 +57,49 @@
   return 0;
 }
 
+static CORE_ADDR
+sh_get_pc ()
+{
+  unsigned long pc;
+  collect_register_by_name ("pc", &pc);
+  return pc;
+}
+
+static void
+sh_set_pc (CORE_ADDR pc)
+{
+  unsigned long newpc = pc;
+  supply_register_by_name ("pc", &newpc);
+}
+
+/* Correct in either endianness, obviously.  */
+static const unsigned short sh_breakpoint = 0xc3c3;
+#define sh_breakpoint_len 2
+
+static int
+sh_breakpoint_at (CORE_ADDR where)
+{
+  unsigned short insn;
+
+  (*the_target->read_memory) (where, (char *) &insn, 2);
+  if (insn == sh_breakpoint)
+    return 1;
+
+  /* If necessary, recognize more trap instructions here.  GDB only uses the
+     one.  */
+  return 0;
+}
+
 struct linux_target_ops the_low_target = {
   sh_num_regs,
   sh_regmap,
   sh_cannot_fetch_register,
   sh_cannot_store_register,
+  sh_get_pc,
+  sh_set_pc,
+  (const char *) &sh_breakpoint,
+  sh_breakpoint_len,
+  NULL,
+  0,
+  sh_breakpoint_at,
 };
diff --git a/gdb/gdbserver/linux-x86-64-low.c b/gdb/gdbserver/linux-x86-64-low.c
index e124890..4ee1ae4 100644
--- a/gdb/gdbserver/linux-x86-64-low.c
+++ b/gdb/gdbserver/linux-x86-64-low.c
@@ -28,17 +28,17 @@
 #include <sys/procfs.h>
 #include <sys/ptrace.h>
 
-#define	X86_64_NUM_GREGS 22
-
-static int x86_64_regmap[X86_64_NUM_GREGS] = {
-  RAX, RBX, RCX, RDX,
-  RSI, RDI, RBP, RSP,
-  R8, R9, R10, R11,
-  R12, R13, R14, R15,
-  RIP, EFLAGS,
-  DS, ES, FS, GS
+static int x86_64_regmap[] = {
+  RAX * 8, RBX * 8, RCX * 8, RDX * 8,
+  RSI * 8, RDI * 8, RBP * 8, RSP * 8,
+  R8 * 8, R9 * 8, R10 * 8, R11 * 8,
+  R12 * 8, R13 * 8, R14 * 8, R15 * 8,
+  RIP * 8, EFLAGS * 8, CS * 8, SS * 8, 
+  DS * 8, ES * 8, FS * 8, GS * 8
 };
 
+#define X86_64_NUM_GREGS (sizeof(x86_64_regmap)/sizeof(int))
+
 static void
 x86_64_fill_gregset (void *buf)
 {
@@ -49,7 +49,7 @@
 }
 
 static void
-x86_64_store_gregset (void *buf)
+x86_64_store_gregset (const void *buf)
 {
   int i;
 
@@ -64,17 +64,19 @@
 }
 
 static void
-x86_64_store_fpregset (void *buf)
+x86_64_store_fpregset (const void *buf)
 {
   i387_fxsave_to_cache (buf);
 }
 
 struct regset_info target_regsets[] = {
   { PTRACE_GETREGS, PTRACE_SETREGS, sizeof (elf_gregset_t),
+    GENERAL_REGS,
     x86_64_fill_gregset, x86_64_store_gregset },
   { PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof (elf_fpregset_t),
+    FP_REGS,
     x86_64_fill_fpregset, x86_64_store_fpregset },
-  { 0, 0, -1, NULL, NULL }
+  { 0, 0, -1, -1, NULL, NULL }
 };
 
 struct linux_target_ops the_low_target = {
diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
index 701d092..be3b3a7 100644
--- a/gdb/gdbserver/regcache.c
+++ b/gdb/gdbserver/regcache.c
@@ -25,8 +25,13 @@
 #include <stdlib.h>
 #include <string.h>
 
+/* The private data for the register cache.  Note that we have one
+   per inferior; this is primarily for simplicity, as the performance
+   benefit is minimal.  */
+
 struct inferior_regcache_data
 {
+  int registers_valid;
   char *registers;
 };
 
@@ -38,7 +43,7 @@
 const char **gdbserver_expedite_regs;
 
 static struct inferior_regcache_data *
-get_regcache (struct inferior_info *inf)
+get_regcache (struct thread_info *inf, int fetch)
 {
   struct inferior_regcache_data *regcache;
 
@@ -47,17 +52,50 @@
   if (regcache == NULL)
     fatal ("no register cache");
 
+  /* FIXME - fetch registers for INF */
+  if (fetch && regcache->registers_valid == 0)
+    {
+      fetch_inferior_registers (0);
+      regcache->registers_valid = 1;
+    }
+
   return regcache;
 }
 
+void
+regcache_invalidate_one (struct inferior_list_entry *entry)
+{
+  struct thread_info *thread = (struct thread_info *) entry;
+  struct inferior_regcache_data *regcache;
+
+  regcache = (struct inferior_regcache_data *) inferior_regcache_data (thread);
+
+  if (regcache->registers_valid)
+    {
+      struct thread_info *saved_inferior = current_inferior;
+
+      current_inferior = thread;
+      store_inferior_registers (-1);
+      current_inferior = saved_inferior;
+    }
+
+  regcache->registers_valid = 0;
+}
+
+void
+regcache_invalidate ()
+{
+  for_each_inferior (&all_threads, regcache_invalidate_one);
+}
+
 int
 registers_length (void)
 {
   return 2 * register_bytes;
 }
 
-void
-create_register_cache (struct inferior_info *inferior)
+void *
+new_register_cache (void)
 {
   struct inferior_regcache_data *regcache;
 
@@ -67,15 +105,19 @@
   if (regcache->registers == NULL)
     fatal ("Could not allocate register cache.");
 
-  set_inferior_regcache_data (inferior, regcache);
+  regcache->registers_valid = 0;
+
+  return regcache;
 }
 
 void
-free_register_cache (struct inferior_info *inferior)
+free_register_cache (void *regcache_p)
 {
-  free (get_regcache (current_inferior)->registers);
-  free (get_regcache (current_inferior));
-  set_inferior_regcache_data (inferior, NULL);
+  struct inferior_regcache_data *regcache
+    = (struct inferior_regcache_data *) regcache_p;
+
+  free (regcache->registers);
+  free (regcache);
 }
 
 void
@@ -99,7 +141,7 @@
 void
 registers_to_string (char *buf)
 {
-  char *registers = get_regcache (current_inferior)->registers;
+  char *registers = get_regcache (current_inferior, 1)->registers;
 
   convert_int_to_ascii (registers, buf, register_bytes);
 }
@@ -108,7 +150,7 @@
 registers_from_string (char *buf)
 {
   int len = strlen (buf);
-  char *registers = get_regcache (current_inferior)->registers;
+  char *registers = get_regcache (current_inferior, 1)->registers;
 
   if (len != register_bytes * 2)
     {
@@ -155,10 +197,10 @@
   return reg_defs[n].size / 8;
 }
 
-char *
-register_data (int n)
+static char *
+register_data (int n, int fetch)
 {
-  char *registers = get_regcache (current_inferior)->registers;
+  char *registers = get_regcache (current_inferior, fetch)->registers;
 
   return registers + (reg_defs[n].offset / 8);
 }
@@ -166,7 +208,7 @@
 void
 supply_register (int n, const void *buf)
 {
-  memcpy (register_data (n), buf, register_size (n));
+  memcpy (register_data (n, 0), buf, register_size (n));
 }
 
 void
@@ -178,7 +220,13 @@
 void
 collect_register (int n, void *buf)
 {
-  memcpy (buf, register_data (n), register_size (n));
+  memcpy (buf, register_data (n, 1), register_size (n));
+}
+
+void
+collect_register_as_string (int n, char *buf)
+{
+  convert_int_to_ascii (register_data (n, 1), buf, register_size (n));
 }
 
 void
diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h
index 362288e..930bd9c 100644
--- a/gdb/gdbserver/regcache.h
+++ b/gdb/gdbserver/regcache.h
@@ -21,15 +21,20 @@
 #ifndef REGCACHE_H
 #define REGCACHE_H
 
-struct inferior_info;
+struct inferior_list_entry;
 
 /* Create a new register cache for INFERIOR.  */
 
-void create_register_cache (struct inferior_info *inferior);
+void *new_register_cache (void);
 
 /* Release all memory associated with the register cache for INFERIOR.  */
 
-void free_register_cache (struct inferior_info *inferior);
+void free_register_cache (void *regcache);
+
+/* Invalidate cached registers for one or all threads.  */
+
+void regcache_invalidate_one (struct inferior_list_entry *);
+void regcache_invalidate (void);
 
 /* Convert all registers to a string in the currently specified remote
    format.  */
@@ -48,8 +53,6 @@
 
 struct reg *find_register_by_number (int n);
 
-char *register_data (int n);
-
 int register_size (int n);
 
 int find_regno (const char *name);
@@ -62,6 +65,8 @@
 
 void collect_register (int n, void *buf);
 
+void collect_register_as_string (int n, char *buf);
+
 void collect_register_by_name (const char *name, void *buf);
 
 #endif /* REGCACHE_H */
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 14734f1..c610c4c 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -42,6 +42,10 @@
 
 static int remote_desc;
 
+/* FIXME headerize? */
+extern int using_threads;
+extern int debug_threads;
+
 /* Open a connection to a remote debugger.
    NAME is the filename used for communication.  */
 
@@ -296,10 +300,17 @@
 	}
 
       if (remote_debug)
-	printf ("putpkt (\"%s\"); [looking for ack]\n", buf2);
+	{
+	  fprintf (stderr, "putpkt (\"%s\"); [looking for ack]\n", buf2);
+	  fflush (stderr);
+	}
       cc = read (remote_desc, buf3, 1);
       if (remote_debug)
-	printf ("[received '%c' (0x%x)]\n", buf3[0], buf3[0]);
+	{
+	  fprintf (stderr, "[received '%c' (0x%x)]\n", buf3[0], buf3[0]);
+	  fflush (stderr);
+	}
+
       if (cc <= 0)
 	{
 	  if (cc == 0)
@@ -310,6 +321,10 @@
 	  free (buf2);
 	  return -1;
 	}
+
+      /* Check for an input interrupt while we're here.  */
+      if (buf3[0] == '\003')
+	kill ((*the_target->signal_pid) (), SIGINT);
     }
   while (buf3[0] != '+');
 
@@ -346,7 +361,7 @@
 	  return;
 	}
       
-      kill (signal_pid, SIGINT);
+      kill ((*the_target->signal_pid) (), SIGINT);
     }
 }
 
@@ -411,7 +426,11 @@
 	  if (c == '$')
 	    break;
 	  if (remote_debug)
-	    printf ("[getpkt: discarding char '%c']\n", c);
+	    {
+	      fprintf (stderr, "[getpkt: discarding char '%c']\n", c);
+	      fflush (stderr);
+	    }
+
 	  if (c < 0)
 	    return -1;
 	}
@@ -441,12 +460,19 @@
     }
 
   if (remote_debug)
-    printf ("getpkt (\"%s\");  [sending ack] \n", buf);
+    {
+      fprintf (stderr, "getpkt (\"%s\");  [sending ack] \n", buf);
+      fflush (stderr);
+    }
 
   write (remote_desc, "+", 1);
 
   if (remote_debug)
-    printf ("[sent ack]\n");
+    {
+      fprintf (stderr, "[sent ack]\n");
+      fflush (stderr);
+    }
+
   return bp - buf;
 }
 
@@ -499,8 +525,6 @@
 static char *
 outreg (int regno, char *buf)
 {
-  int regsize = register_size (regno);
-
   if ((regno >> 12) != 0)
     *buf++ = tohex ((regno >> 12) & 0xf);
   if ((regno >> 8) != 0)
@@ -508,14 +532,47 @@
   *buf++ = tohex ((regno >> 4) & 0xf);
   *buf++ = tohex (regno & 0xf);
   *buf++ = ':';
-  convert_int_to_ascii (register_data (regno), buf, regsize);
-  buf += 2 * regsize;
+  collect_register_as_string (regno, buf);
+  buf += 2 * register_size (regno);
   *buf++ = ';';
 
   return buf;
 }
 
 void
+new_thread_notify (int id)
+{
+  char own_buf[256];
+
+  /* The `n' response is not yet part of the remote protocol.  Do nothing.  */
+  if (1)
+    return;
+
+  if (server_waiting == 0)
+    return;
+
+  sprintf (own_buf, "n%x", id);
+  disable_async_io ();
+  putpkt (own_buf);
+  enable_async_io ();
+}
+
+void
+dead_thread_notify (int id)
+{
+  char own_buf[256];
+
+  /* The `x' response is not yet part of the remote protocol.  Do nothing.  */
+  if (1)
+    return;
+
+  sprintf (own_buf, "x%x", id);
+  disable_async_io ();
+  putpkt (own_buf);
+  enable_async_io ();
+}
+
+void
 prepare_resume_reply (char *buf, char status, unsigned char signo)
 {
   int nib, sig;
@@ -538,12 +595,23 @@
 	  regp ++;
 	}
 
-      /* If the debugger hasn't used any thread features, don't burden it with
-	 threads.  If we didn't check this, GDB 4.13 and older would choke.  */
-      if (cont_thread != 0)
+      /* Formerly, if the debugger had not used any thread features we would not
+	 burden it with a thread status response.  This was for the benefit of
+	 GDB 4.13 and older.  However, in recent GDB versions the check
+	 (``if (cont_thread != 0)'') does not have the desired effect because of
+	 sillyness in the way that the remote protocol handles specifying a thread.
+	 Since thread support relies on qSymbol support anyway, assume GDB can handle
+	 threads.  */
+
+      if (using_threads)
 	{
+	  /* FIXME right place to set this? */
+	  thread_from_wait = ((struct inferior_list_entry *)current_inferior)->id;
+	  if (debug_threads)
+	    fprintf (stderr, "Writing resume reply for %d\n\n", thread_from_wait);
 	  if (old_thread_from_wait != thread_from_wait)
 	    {
+	      general_thread = thread_from_wait;
 	      sprintf (buf, "thread:%x;", thread_from_wait);
 	      buf += strlen (buf);
 	      old_thread_from_wait = thread_from_wait;
@@ -620,7 +688,11 @@
     {
       /* Malformed response.  */
       if (remote_debug)
-	fprintf (stderr, "Malformed response to qSymbol, ignoring.\n");
+	{
+	  fprintf (stderr, "Malformed response to qSymbol, ignoring.\n");
+	  fflush (stderr);
+	}
+
       return -1;
     }
 
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index a31547c..b674ed0 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -23,9 +23,12 @@
 
 int cont_thread;
 int general_thread;
+int step_thread;
 int thread_from_wait;
 int old_thread_from_wait;
 int extended_protocol;
+int server_waiting;
+
 jmp_buf toplevel;
 
 static unsigned char
@@ -33,11 +36,12 @@
 {
   /* FIXME Check error? Or turn to void.  */
   create_inferior (argv[0], argv);
-  /* FIXME Print pid properly.  */
-  fprintf (stderr, "Process %s created; pid = %d\n", argv[0], signal_pid);
+
+  fprintf (stderr, "Process %s created; pid = %d\n", argv[0],
+	   all_threads.head->id);
 
   /* Wait till we are at 1st instruction in program, return signal number.  */
-  return mywait (statusptr);
+  return mywait (statusptr, 0);
 }
 
 static int
@@ -48,7 +52,7 @@
   if (myattach (pid) != 0)
     return -1;
 
-  *sigptr = mywait (statusptr);
+  *sigptr = mywait (statusptr, 0);
 
   return 0;
 }
@@ -59,6 +63,8 @@
 void
 handle_query (char *own_buf)
 {
+  static struct inferior_list_entry *thread_ptr;
+
   if (strcmp ("qSymbol::", own_buf) == 0)
     {
       if (the_target->look_up_symbols != NULL)
@@ -68,6 +74,29 @@
       return;
     }
 
+  if (strcmp ("qfThreadInfo", own_buf) == 0)
+    {
+      thread_ptr = all_threads.head;
+      sprintf (own_buf, "m%x", thread_ptr->id);
+      thread_ptr = thread_ptr->next;
+      return;
+    }
+  
+  if (strcmp ("qsThreadInfo", own_buf) == 0)
+    {
+      if (thread_ptr != NULL)
+	{
+	  sprintf (own_buf, "m%x", thread_ptr->id);
+	  thread_ptr = thread_ptr->next;
+	  return;
+	}
+      else
+	{
+	  sprintf (own_buf, "l");
+	  return;
+	}
+    }
+      
   /* Otherwise we didn't know what packet it was.  Say we didn't
      understand it.  */
   own_buf[0] = 0;
@@ -188,12 +217,16 @@
 		case 'g':
 		  general_thread = strtol (&own_buf[2], NULL, 16);
 		  write_ok (own_buf);
-		  fetch_inferior_registers (0);
+		  set_desired_inferior (1);
 		  break;
 		case 'c':
 		  cont_thread = strtol (&own_buf[2], NULL, 16);
 		  write_ok (own_buf);
 		  break;
+		case 's':
+		  step_thread = strtol (&own_buf[2], NULL, 16);
+		  write_ok (own_buf);
+		  break;
 		default:
 		  /* Silently ignore it so that gdb can extend the protocol
 		     without compatibility headaches.  */
@@ -202,11 +235,12 @@
 		}
 	      break;
 	    case 'g':
+	      set_desired_inferior (1);
 	      registers_to_string (own_buf);
 	      break;
 	    case 'G':
+	      set_desired_inferior (1);
 	      registers_from_string (&own_buf[1]);
-	      store_inferior_registers (-1);
 	      write_ok (own_buf);
 	      break;
 	    case 'm':
@@ -227,8 +261,9 @@
 		signal = target_signal_to_host (sig);
 	      else
 		signal = 0;
+	      set_desired_inferior (0);
 	      myresume (0, signal);
-	      signal = mywait (&status);
+	      signal = mywait (&status, 1);
 	      prepare_resume_reply (own_buf, status, signal);
 	      break;
 	    case 'S':
@@ -237,18 +272,21 @@
 		signal = target_signal_to_host (sig);
 	      else
 		signal = 0;
+	      set_desired_inferior (0);
 	      myresume (1, signal);
-	      signal = mywait (&status);
+	      signal = mywait (&status, 1);
 	      prepare_resume_reply (own_buf, status, signal);
 	      break;
 	    case 'c':
+	      set_desired_inferior (0);
 	      myresume (0, 0);
-	      signal = mywait (&status);
+	      signal = mywait (&status, 1);
 	      prepare_resume_reply (own_buf, status, signal);
 	      break;
 	    case 's':
+	      set_desired_inferior (0);
 	      myresume (1, 0);
-	      signal = mywait (&status);
+	      signal = mywait (&status, 1);
 	      prepare_resume_reply (own_buf, status, signal);
 	      break;
 	    case 'k':
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 32b90b5..746502b 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -54,8 +54,21 @@
    least the size of a (void *).  */
 typedef long long CORE_ADDR;
 
-/* Opaque inferior process information.  */
-struct inferior_info;
+/* Generic information for tracking a list of ``inferiors'' - threads,
+   processes, etc.  */
+struct inferior_list
+{
+  struct inferior_list_entry *head;
+  struct inferior_list_entry *tail;
+};
+struct inferior_list_entry
+{
+  int id;
+  struct inferior_list_entry *next;
+};
+
+/* Opaque type for user-visible threads.  */
+struct thread_info;
 
 #include "regcache.h"
 #include "gdb/signals.h"
@@ -67,27 +80,41 @@
 
 void initialize_low ();
 
-/* Target-specific variables */
-
-extern char *registers;
-
 /* From inferiors.c.  */
 
-extern struct inferior_info *current_inferior;
-extern int signal_pid;
-void add_inferior (int pid);
+extern struct inferior_list all_threads;
+void add_inferior_to_list (struct inferior_list *list,
+			   struct inferior_list_entry *new_inferior);
+void for_each_inferior (struct inferior_list *list,
+			void (*action) (struct inferior_list_entry *));
+extern struct thread_info *current_inferior;
+void remove_inferior (struct inferior_list *list,
+		      struct inferior_list_entry *entry);
+void remove_thread (struct thread_info *thread);
+void add_thread (int thread_id, void *target_data);
 void clear_inferiors (void);
-void *inferior_target_data (struct inferior_info *);
-void set_inferior_target_data (struct inferior_info *, void *);
-void *inferior_regcache_data (struct inferior_info *);
-void set_inferior_regcache_data (struct inferior_info *, void *);
+struct inferior_list_entry *find_inferior
+     (struct inferior_list *,
+      int (*func) (struct inferior_list_entry *,
+		   void *),
+      void *arg);
+struct inferior_list_entry *find_inferior_id (struct inferior_list *list,
+					      int id);
+void *inferior_target_data (struct thread_info *);
+void set_inferior_target_data (struct thread_info *, void *);
+void *inferior_regcache_data (struct thread_info *);
+void set_inferior_regcache_data (struct thread_info *, void *);
+void change_inferior_id (struct inferior_list *list,
+			 int new_id);
 
 /* Public variables in server.c */
 
 extern int cont_thread;
 extern int general_thread;
+extern int step_thread;
 extern int thread_from_wait;
 extern int old_thread_from_wait;
+extern int server_waiting;
 
 extern jmp_buf toplevel;
 
@@ -103,6 +130,8 @@
 void disable_async_io (void);
 void convert_ascii_to_int (char *from, char *to, int n);
 void convert_int_to_ascii (char *from, char *to, int n);
+void new_thread_notify (int id);
+void dead_thread_notify (int id);
 void prepare_resume_reply (char *buf, char status, unsigned char sig);
 
 void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c
index 53a4c1e..1c2860a 100644
--- a/gdb/gdbserver/target.c
+++ b/gdb/gdbserver/target.c
@@ -26,6 +26,38 @@
 struct target_ops *the_target;
 
 void
+set_desired_inferior (int use_general)
+{
+  struct thread_info *found;
+
+  if (use_general == 1)
+    {
+      found = (struct thread_info *) find_inferior_id (&all_threads,
+						       general_thread);
+    }
+  else
+    {
+      found = NULL;
+
+      /* If we are continuing any (all) thread(s), use step_thread
+	 to decide which thread to step and/or send the specified
+	 signal to.  */
+      if (step_thread > 0 && (cont_thread == 0 || cont_thread == -1))
+	found = (struct thread_info *) find_inferior_id (&all_threads,
+							 step_thread);
+
+      if (found == NULL)
+	found = (struct thread_info *) find_inferior_id (&all_threads,
+							 cont_thread);
+    }
+
+  if (found == NULL)
+    current_inferior = (struct thread_info *) all_threads.head;
+  else
+    current_inferior = found;
+}
+
+void
 read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
 {
   (*the_target->read_memory) (memaddr, myaddr, len);
@@ -33,10 +65,41 @@
 }
 
 int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
+write_inferior_memory (CORE_ADDR memaddr, const char *myaddr, int len)
 {
-  check_mem_write (memaddr, myaddr, len);
-  return (*the_target->write_memory) (memaddr, myaddr, len);
+  /* Lacking cleanups, there is some potential for a memory leak if the
+     write fails and we go through error().  Make sure that no more than
+     one buffer is ever pending by making BUFFER static.  */
+  static char *buffer = 0;
+  int res;
+
+  if (buffer != NULL)
+    free (buffer);
+
+  buffer = malloc (len);
+  memcpy (buffer, myaddr, len);
+  check_mem_write (memaddr, buffer, len);
+  res = (*the_target->write_memory) (memaddr, buffer, len);
+  free (buffer);
+  buffer = NULL;
+
+  return res;
+}
+
+unsigned char
+mywait (char *statusp, int connected_wait)
+{
+  unsigned char ret;
+
+  if (connected_wait)
+    server_waiting = 1;
+
+  ret = (*the_target->wait) (statusp);
+
+  if (connected_wait)
+    server_waiting = 0;
+
+  return ret;
 }
 
 void
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 6d06b9f..c6aeee6 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -104,6 +104,11 @@
      symbols.  */
 
   void (*look_up_symbols) (void);
+
+  /* Return the PID we should send a signal to.  Used for asynchronous
+     interrupts (user hitting Control-C).  */
+
+  int (*signal_pid) (void);
 };
 
 extern struct target_ops *the_target;
@@ -125,17 +130,18 @@
 #define myresume(step,signo) \
   (*the_target->resume) (step, signo)
 
-#define mywait(statusp) \
-  (*the_target->wait) (statusp)
-
 #define fetch_inferior_registers(regno) \
   (*the_target->fetch_registers) (regno)
 
 #define store_inferior_registers(regno) \
   (*the_target->store_registers) (regno)
 
+unsigned char mywait (char *statusp, int connected_wait);
+
 void read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
 
-int write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
+int write_inferior_memory (CORE_ADDR memaddr, const char *myaddr, int len);
+
+void set_desired_inferior (int id);
 
 #endif /* TARGET_H */
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 0f757f5..6ebbf2d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -92,6 +92,8 @@
 struct type *builtin_type_v8hi;
 struct type *builtin_type_v4hi;
 struct type *builtin_type_v2si;
+struct type *builtin_type_vec64;
+struct type *builtin_type_vec64i;
 struct type *builtin_type_vec128;
 struct type *builtin_type_vec128i;
 struct type *builtin_type_ieee_single_big;
@@ -130,7 +132,7 @@
 static void cfront_mangle_name (struct type *, int, int);
 #endif
 static void print_bit_vector (B_TYPE *, int);
-static void print_arg_types (struct type **, int);
+static void print_arg_types (struct field *, int, int);
 static void dump_fn_fieldlists (struct type *, int);
 static void print_cplus_stuff (struct type *, int);
 static void virtual_base_list_aux (struct type *dclass);
@@ -579,7 +581,6 @@
 		     TYPE_OBJFILE (type));
   TYPE_TARGET_TYPE (mtype) = type;
   /*  _DOMAIN_TYPE (mtype) = unknown yet */
-  /*  _ARG_TYPES (mtype) = unknown yet */
   return (mtype);
 }
 
@@ -820,6 +821,64 @@
 }
 
 static struct type *
+build_builtin_type_vec64 (void)
+{
+  /* Construct a type for the 64 bit registers.  The type we're
+     building is this: */
+#if 0
+  union __gdb_builtin_type_vec64
+  {
+    int64_t uint64;
+    float v2_float[2];
+    int32_t v2_int32[2];
+    int16_t v4_int16[4];
+    int8_t v8_int8[8];
+  };
+#endif
+
+  struct type *t;
+
+  t = init_composite_type ("__gdb_builtin_type_vec64", TYPE_CODE_UNION);
+  append_composite_type_field (t, "uint64", builtin_type_int64);
+  append_composite_type_field (t, "v2_float", builtin_type_v2_float);
+  append_composite_type_field (t, "v2_int32", builtin_type_v2_int32);
+  append_composite_type_field (t, "v4_int16", builtin_type_v4_int16);
+  append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
+
+  TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec64";
+  return t;
+}
+
+static struct type *
+build_builtin_type_vec64i (void)
+{
+  /* Construct a type for the 64 bit registers.  The type we're
+     building is this: */
+#if 0
+  union __gdb_builtin_type_vec64i 
+  {
+    int64_t uint64;
+    int32_t v2_int32[2];
+    int16_t v4_int16[4];
+    int8_t v8_int8[8];
+  };
+#endif
+
+  struct type *t;
+
+  t = init_composite_type ("__gdb_builtin_type_vec64i", TYPE_CODE_UNION);
+  append_composite_type_field (t, "uint64", builtin_type_int64);
+  append_composite_type_field (t, "v2_int32", builtin_type_v2_int32);
+  append_composite_type_field (t, "v4_int16", builtin_type_v4_int16);
+  append_composite_type_field (t, "v8_int8", builtin_type_v8_int8);
+
+  TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec64i";
+  return t;
+}
+
+static struct type *
 build_builtin_type_vec128 (void)
 {
   /* Construct a type for the 128 bit registers.  The type we're
@@ -844,6 +903,8 @@
   append_composite_type_field (t, "v8_int16", builtin_type_v8_int16);
   append_composite_type_field (t, "v16_int8", builtin_type_v16_int8);
 
+  TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec128";
   return t;
 }
 
@@ -862,6 +923,8 @@
   append_composite_type_field (t, "v2_int64", builtin_type_v2_int64);
   append_composite_type_field (t, "uint128", builtin_type_int128);
 
+  TYPE_FLAGS (t) |= TYPE_FLAG_VECTOR;
+  TYPE_NAME (t) = "builtin_type_vec128i";
   return t;
 }
 
@@ -900,7 +963,8 @@
 
 void
 smash_to_method_type (struct type *type, struct type *domain,
-		      struct type *to_type, struct type **args)
+		      struct type *to_type, struct field *args,
+		      int nargs, int varargs)
 {
   struct objfile *objfile;
 
@@ -910,7 +974,10 @@
   TYPE_OBJFILE (type) = objfile;
   TYPE_TARGET_TYPE (type) = to_type;
   TYPE_DOMAIN_TYPE (type) = domain;
-  TYPE_ARG_TYPES (type) = args;
+  TYPE_FIELDS (type) = args;
+  TYPE_NFIELDS (type) = nargs;
+  if (varargs)
+    TYPE_FLAGS (type) |= TYPE_FLAG_VARARGS;
   TYPE_LENGTH (type) = 1;	/* In practice, this is never needed.  */
   TYPE_CODE (type) = TYPE_CODE_METHOD;
 }
@@ -1614,7 +1681,7 @@
 					 DMGL_PARAMS | DMGL_ANSI);
   char *argtypetext, *p;
   int depth = 0, argcount = 1;
-  struct type **argtypes;
+  struct field *argtypes;
   struct type *mtype;
 
   /* Make sure we got back a function string that we can use.  */
@@ -1647,11 +1714,14 @@
       p += 1;
     }
 
-  /* We need two more slots: one for the THIS pointer, and one for the
-     NULL [...] or void [end of arglist].  */
+  /* If we read one argument and it was ``void'', don't count it.  */
+  if (strncmp (argtypetext, "(void)", 6) == 0)
+    argcount -= 1;
 
-  argtypes = (struct type **)
-    TYPE_ALLOC (type, (argcount + 2) * sizeof (struct type *));
+  /* We need one extra slot, for the THIS pointer.  */
+
+  argtypes = (struct field *)
+    TYPE_ALLOC (type, (argcount + 1) * sizeof (struct field));
   p = argtypetext;
 
   /* Add THIS pointer for non-static methods.  */
@@ -1660,7 +1730,7 @@
     argcount = 0;
   else
     {
-      argtypes[0] = lookup_pointer_type (type);
+      argtypes[0].type = lookup_pointer_type (type);
       argcount = 1;
     }
 
@@ -1671,10 +1741,12 @@
 	{
 	  if (depth <= 0 && (*p == ',' || *p == ')'))
 	    {
-	      /* Avoid parsing of ellipsis, they will be handled below.  */
-	      if (strncmp (argtypetext, "...", p - argtypetext) != 0)
+	      /* Avoid parsing of ellipsis, they will be handled below.
+	         Also avoid ``void'' as above.  */
+	      if (strncmp (argtypetext, "...", p - argtypetext) != 0
+		  && strncmp (argtypetext, "void", p - argtypetext) != 0)
 		{
-		  argtypes[argcount] =
+		  argtypes[argcount].type =
 		    safe_parse_type (argtypetext, p - argtypetext);
 		  argcount += 1;
 		}
@@ -1694,25 +1766,19 @@
 	}
     }
 
-  if (p[-2] != '.')		/* Not '...' */
-    {
-      argtypes[argcount] = builtin_type_void;	/* List terminator */
-    }
-  else
-    {
-      argtypes[argcount] = NULL;	/* Ellist terminator */
-    }
-
-  xfree (demangled_name);
-
   TYPE_FN_FIELD_PHYSNAME (f, signature_id) = mangled_name;
 
   /* Now update the old "stub" type into a real type.  */
   mtype = TYPE_FN_FIELD_TYPE (f, signature_id);
   TYPE_DOMAIN_TYPE (mtype) = type;
-  TYPE_ARG_TYPES (mtype) = argtypes;
+  TYPE_FIELDS (mtype) = argtypes;
+  TYPE_NFIELDS (mtype) = argcount;
   TYPE_FLAGS (mtype) &= ~TYPE_FLAG_STUB;
   TYPE_FN_FIELD_STUB (f, signature_id) = 0;
+  if (p[-2] == '.')
+    TYPE_FLAGS (mtype) |= TYPE_FLAG_VARARGS;
+
+  xfree (demangled_name);
 }
 
 const struct cplus_struct_type cplus_struct_default;
@@ -1886,21 +1952,23 @@
 	 || (TYPE_CODE (t) == TYPE_CODE_BOOL)));
 }
 
-/* Chill varying string and arrays are represented as follows:
+/* (OBSOLETE) Chill (OBSOLETE) varying string and arrays are
+   represented as follows:
 
    struct { int __var_length; ELEMENT_TYPE[MAX_SIZE] __var_data};
 
-   Return true if TYPE is such a Chill varying type. */
+   Return true if TYPE is such a (OBSOLETE) Chill (OBSOLETE) varying
+   type. */
 
-int
-chill_varying_type (struct type *type)
-{
-  if (TYPE_CODE (type) != TYPE_CODE_STRUCT
-      || TYPE_NFIELDS (type) != 2
-      || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0)
-    return 0;
-  return 1;
-}
+/* OBSOLETE int */
+/* OBSOLETE chill_varying_type (struct type *type) */
+/* OBSOLETE { */
+/* OBSOLETE   if (TYPE_CODE (type) != TYPE_CODE_STRUCT */
+/* OBSOLETE       || TYPE_NFIELDS (type) != 2 */
+/* OBSOLETE       || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0) */
+/* OBSOLETE     return 0; */
+/* OBSOLETE   return 1; */
+/* OBSOLETE } */
 
 /* Check whether BASE is an ancestor or base class or DCLASS 
    Return 1 if so, and 0 if not.
@@ -2703,25 +2771,18 @@
     }
 }
 
-/* The args list is a strange beast.  It is either terminated by a NULL
-   pointer for varargs functions, or by a pointer to a TYPE_CODE_VOID
-   type for normal fixed argcount functions.  (FIXME someday)
-   Also note the first arg should be the "this" pointer, we may not want to
-   include it since we may get into a infinitely recursive situation. */
+/* Note the first arg should be the "this" pointer, we may not want to
+   include it since we may get into a infinitely recursive situation.  */
 
 static void
-print_arg_types (struct type **args, int spaces)
+print_arg_types (struct field *args, int nargs, int spaces)
 {
   if (args != NULL)
     {
-      while (*args != NULL)
-	{
-	  recursive_dump_type (*args, spaces + 2);
-	  if (TYPE_CODE (*args++) == TYPE_CODE_VOID)
-	    {
-	      break;
-	    }
-	}
+      int i;
+
+      for (i = 0; i < nargs; i++)
+	recursive_dump_type (args[i].type, spaces + 2);
     }
 }
 
@@ -2766,7 +2827,9 @@
 	  gdb_print_host_address (TYPE_FN_FIELD_ARGS (f, overload_idx), gdb_stdout);
 	  printf_filtered ("\n");
 
-	  print_arg_types (TYPE_FN_FIELD_ARGS (f, overload_idx), spaces);
+	  print_arg_types (TYPE_FN_FIELD_ARGS (f, overload_idx),
+			   TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (f, overload_idx)),
+			   spaces);
 	  printfi_filtered (spaces + 8, "fcontext ");
 	  gdb_print_host_address (TYPE_FN_FIELD_FCONTEXT (f, overload_idx),
 				  gdb_stdout);
@@ -3108,14 +3171,6 @@
   printfi_filtered (spaces, "vptr_fieldno %d\n", TYPE_VPTR_FIELDNO (type));
   switch (TYPE_CODE (type))
     {
-    case TYPE_CODE_METHOD:
-    case TYPE_CODE_FUNC:
-      printfi_filtered (spaces, "arg_types ");
-      gdb_print_host_address (TYPE_ARG_TYPES (type), gdb_stdout);
-      puts_filtered ("\n");
-      print_arg_types (TYPE_ARG_TYPES (type), spaces);
-      break;
-
     case TYPE_CODE_STRUCT:
       printfi_filtered (spaces, "cplus_stuff ");
       gdb_print_host_address (TYPE_CPLUS_SPECIFIC (type), gdb_stdout);
@@ -3333,7 +3388,9 @@
   builtin_type_v4_int16 = init_vector_type (builtin_type_int16, 4);
   builtin_type_v8_int8 = init_vector_type (builtin_type_int8, 8);
 
-  /* Vector types. */
+  /* Vector types.  */
+  builtin_type_vec64 = build_builtin_type_vec64 ();
+  builtin_type_vec64i = build_builtin_type_vec64i ();
   builtin_type_vec128 = build_builtin_type_vec128 ();
   builtin_type_vec128i = build_builtin_type_vec128i ();
 
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 9233bac..5c41398 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -101,13 +101,14 @@
     TYPE_CODE_RANGE,		/* Range (integers within spec'd bounds) */
 
     /* A string type which is like an array of character but prints
-       differently (at least for CHILL).  It does not contain a length
-       field as Pascal strings (for many Pascals, anyway) do; if we want
-       to deal with such strings, we should use a new type code.  */
+       differently (at least for (OBSOLETE) CHILL (OBSOLETE)).  It
+       does not contain a length field as Pascal strings (for many
+       Pascals, anyway) do; if we want to deal with such strings, we
+       should use a new type code.  */
     TYPE_CODE_STRING,
 
-    /* String of bits; like TYPE_CODE_SET but prints differently (at least
-       for CHILL).  */
+    /* String of bits; like TYPE_CODE_SET but prints differently (at
+       least for (OBSOLETE) CHILL (OBSOLETE)).  */
     TYPE_CODE_BITSTRING,
 
     /* Unknown type.  The length field is valid if we were able to
@@ -240,10 +241,8 @@
 #define TYPE_FLAG_DATA_SPACE	(1 << 10)
 #define TYPE_DATA_SPACE(t)	(TYPE_INSTANCE_FLAGS (t) & TYPE_FLAG_DATA_SPACE)
 
-/* FIXME: Kludge to mark a varargs function type for C++ member
-   function argument processing.  Currently only used in dwarf2read.c,
-   but put it here so we won't accidentally overload the bit with
-   another flag.  */
+/* FIXME drow/2002-06-03:  Only used for methods, but applies as well
+   to functions.  */
 
 #define TYPE_FLAG_VARARGS	(1 << 11)
 #define TYPE_VARARGS(t)		(TYPE_FLAGS (t) & TYPE_FLAG_VARARGS)
@@ -354,7 +353,7 @@
      For range types, there are two "fields",
      the minimum and maximum values (both inclusive).
      For enum types, each possible value is described by one "field".
-     For a function type, a "field" for each parameter type.
+     For a function or method type, a "field" for each parameter.
      For C++ classes, there is one field for each base class (if it is
      a derived class) plus one field for each class data member.  Member
      functions are recorded elsewhere.
@@ -383,7 +382,7 @@
       CORE_ADDR physaddr;
       char *physname;
 
-      /* For a function type, this is 1 if the argument is marked
+      /* For a function or member type, this is 1 if the argument is marked
 	 artificial.  Artificial arguments should not be shown to the
 	 user.  */
       int artificial;
@@ -400,13 +399,14 @@
     int bitsize;
 
     /* In a struct or union type, type of this field.
-       In a function type, type of this argument.
+       In a function or member type, type of this argument.
        In an array type, the domain-type of the array.  */
 
     struct type *type;
 
     /* Name of field, value or argument.
-       NULL for range bounds and array domains.  */
+       NULL for range bounds, array domains, and member function
+       arguments.  */
 
     char *name;
 
@@ -438,14 +438,6 @@
 
   union type_specific
   {
-    /* ARG_TYPES is for TYPE_CODE_METHOD.
-       Contains the type of each argument, ending with a void type
-       after the last argument for normal member functions or a NULL
-       pointer after the last argument for functions with variable
-       arguments.  */
-
-    struct type **arg_types;
-
     /* CPLUS_STUFF is for TYPE_CODE_STRUCT.  It is initialized to point to
        cplus_struct_default, a default static instance of a struct
        cplus_struct_type. */
@@ -785,7 +777,6 @@
 #define TYPE_NINSTANTIATIONS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->ninstantiations
 #define TYPE_DECLARED_TYPE(thistype) TYPE_CPLUS_SPECIFIC(thistype)->declared_type
 #define	TYPE_TYPE_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific
-#define TYPE_ARG_TYPES(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.arg_types
 #define TYPE_CPLUS_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.cplus_stuff
 #define TYPE_FLOATFORMAT(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.floatformat
 #define TYPE_BASECLASS(thistype,index) TYPE_MAIN_TYPE(thistype)->fields[index].type
@@ -863,7 +854,7 @@
 #define TYPE_FN_FIELD(thisfn, n) (thisfn)[n]
 #define TYPE_FN_FIELD_PHYSNAME(thisfn, n) (thisfn)[n].physname
 #define TYPE_FN_FIELD_TYPE(thisfn, n) (thisfn)[n].type
-#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_ARG_TYPES ((thisfn)[n].type)
+#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_FIELDS ((thisfn)[n].type)
 #define TYPE_FN_FIELD_CONST(thisfn, n) ((thisfn)[n].is_const)
 #define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)
 #define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)
@@ -961,6 +952,10 @@
 extern struct type *builtin_type_v4hi;
 extern struct type *builtin_type_v2si;
 
+/* Type for 64 bit vectors. */
+extern struct type *builtin_type_vec64;
+extern struct type *builtin_type_vec64i;
+
 /* Type for 128 bit vectors. */
 extern struct type *builtin_type_vec128;
 extern struct type *builtin_type_vec128i;
@@ -1004,13 +999,13 @@
 extern struct type *builtin_type_m2_real;
 extern struct type *builtin_type_m2_bool;
 
-/* Chill types */
+/* OBSOLETE Chill types */
 
-extern struct type *builtin_type_chill_bool;
-extern struct type *builtin_type_chill_char;
-extern struct type *builtin_type_chill_long;
-extern struct type *builtin_type_chill_ulong;
-extern struct type *builtin_type_chill_real;
+/* OBSOLETE extern struct type *builtin_type_chill_bool; */
+/* OBSOLETE extern struct type *builtin_type_chill_char; */
+/* OBSOLETE extern struct type *builtin_type_chill_long; */
+/* OBSOLETE extern struct type *builtin_type_chill_ulong; */
+/* OBSOLETE extern struct type *builtin_type_chill_real; */
 
 /* Fortran (F77) types */
 
@@ -1088,8 +1083,9 @@
 extern struct type *lookup_member_type (struct type *, struct type *);
 
 extern void
-smash_to_method_type (struct type *, struct type *, struct type *,
-		      struct type **);
+smash_to_method_type (struct type *type, struct type *domain,
+		      struct type *to_type, struct field *args,
+		      int nargs, int varargs);
 
 extern void
 smash_to_member_type (struct type *, struct type *, struct type *);
@@ -1118,7 +1114,7 @@
 
 extern struct type *create_set_type (struct type *, struct type *);
 
-extern int chill_varying_type (struct type *);
+/* OBSOLETE extern int chill_varying_type (struct type *); */
 
 extern struct type *lookup_unsigned_typename (char *);
 
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 2b086c5..fb31c44 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -189,7 +189,6 @@
   struct type *rtti_type;
   CORE_ADDR coreptr;
   struct value *vp;
-  int using_enclosing = 0;
   long top_offset = 0;
   char rtti_type_name[256];
   CORE_ADDR vtbl;
@@ -244,25 +243,7 @@
   if (VALUE_ADDRESS (value_field (v, TYPE_VPTR_FIELDNO (known_type))) == 0)
     return NULL;
 
-  /*
-    If we are enclosed by something that isn't us, adjust the
-    address properly and set using_enclosing.
-  */
-  if (VALUE_ENCLOSING_TYPE(v) != VALUE_TYPE(v))
-    {
-      struct value *tempval;
-      int bitpos = TYPE_BASECLASS_BITPOS (known_type,
-                                          TYPE_VPTR_FIELDNO (known_type));
-      tempval=value_field (v, TYPE_VPTR_FIELDNO(known_type));
-      VALUE_ADDRESS(tempval) += bitpos / 8;
-      vtbl=value_as_address (tempval);
-      using_enclosing=1;
-    }
-  else
-    {
-      vtbl=value_as_address(value_field(v,TYPE_VPTR_FIELDNO(known_type)));
-      using_enclosing=0;
-    }
+  vtbl=value_as_address(value_field(v,TYPE_VPTR_FIELDNO(known_type)));
 
   /* Try to find a symbol that is the vtable */
   minsym=lookup_minimal_symbol_by_pc(vtbl);
@@ -304,8 +285,6 @@
       if (full)
         *full=1;
     }
-  if (using_enc)
-    *using_enc=using_enclosing;
 
   return rtti_type;
 }
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index e86af89..fbab8af 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -25,6 +25,7 @@
 #include "cp-abi.h"
 #include "demangle.h"
 #include "gdb_assert.h"
+#include "gdb_string.h"
 
 static struct cp_abi_ops gnu_v3_abi_ops;
 
@@ -173,7 +174,7 @@
    gdb_gnu_v3_abi_vtable' object to the vtable's "address point"
    (i.e., where objects' virtual table pointers point).  */
 static int
-vtable_address_point_offset ()
+vtable_address_point_offset (void)
 {
   struct type *vtable_type = gdbarch_data (current_gdbarch,
 					   vtable_type_gdbarch_data);
@@ -374,15 +375,11 @@
 {
   struct type *vtable_type = gdbarch_data (current_gdbarch,
 					   vtable_type_gdbarch_data);
-  struct type *basetype = TYPE_BASECLASS (type, index);
-  struct value *full_object, *vbase_object, *orig_object;
-  struct value *vtable, *orig_typeinfo, *orig_base_info;
-  struct type *orig_type, *vbasetype;
+  struct value *vtable;
+  struct type *vbasetype;
   struct value *offset_val, *vbase_array;
   CORE_ADDR vtable_address;
   long int cur_base_offset, base_offset;
-  int to_top;
-  int baseclasses, i;
 
   /* If it isn't a virtual base, this is easy.  The offset is in the
      type definition.  */
@@ -405,15 +402,22 @@
     / ((int) TYPE_LENGTH (builtin_type_void_data_ptr));
 
   /* We're now looking for the cur_base_offset'th entry (negative index)
-     in the vcall_and_vbase_offsets array.  */
+     in the vcall_and_vbase_offsets array.  We used to cast the object to
+     its TYPE_VPTR_BASETYPE, and reference the vtable as TYPE_VPTR_FIELDNO;
+     however, that cast can not be done without calling baseclass_offset again
+     if the TYPE_VPTR_BASETYPE is a virtual base class, as described in the
+     v3 C++ ABI Section 2.4.I.2.b.  Fortunately the ABI guarantees that the
+     vtable pointer will be located at the beginning of the object, so we can
+     bypass the casting.  Verify that the TYPE_VPTR_FIELDNO is in fact at the
+     start of whichever baseclass it resides in, as a sanity measure.  */
 
-  orig_object = value_at_lazy (type, address, NULL);
-  vbasetype = TYPE_VPTR_BASETYPE (VALUE_TYPE (orig_object));
-  vbase_object = value_cast (vbasetype, orig_object);
+  vbasetype = TYPE_VPTR_BASETYPE (type);
+  if (TYPE_FIELD_BITPOS (vbasetype, TYPE_VPTR_FIELDNO (vbasetype)) != 0)
+    error ("Illegal vptr offset in class %s",
+	   TYPE_NAME (vbasetype) ? TYPE_NAME (vbasetype) : "<unknown>");
 
-  vtable_address
-    = value_as_address (value_field (vbase_object,
-				     TYPE_VPTR_FIELDNO (vbasetype)));
+  vtable_address = value_as_address (value_at_lazy (builtin_type_void_data_ptr,
+						    address, NULL));
   vtable = value_at_lazy (vtable_type,
                           vtable_address - vtable_address_point_offset (),
                           NULL);
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index b12897f..f992d4b 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -27,7 +27,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "dis-asm.h"
 #include "gdbcmd.h"
@@ -142,7 +141,7 @@
 }
 
 int
-gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info *info)
+gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info * info)
 {
   if (h8300smode)
     return print_insn_h8300s (memaddr, info);
@@ -227,7 +226,7 @@
    of the instruction. */
 
 CORE_ADDR
-NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, INSN_WORD *pword1)
+NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, INSN_WORD * pword1)
 {
   char buf[2];
   if (addr < lim + 8)
@@ -390,14 +389,16 @@
   /* Locals are always reffed based from the fp */
   fi->locals_pointer = after_prolog_fp;
   /* The PC is at a known place */
-  fi->from_pc = read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
+  fi->from_pc =
+    read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
 
   /* Rememeber any others too */
   in_frame[PC_REGNUM] = 0;
 
   if (have_fp)
     /* We keep the old FP in the SP spot */
-    fsr->regs[SP_REGNUM] = read_memory_unsigned_integer (fsr->regs[6], BINWORD);
+    fsr->regs[SP_REGNUM] =
+      read_memory_unsigned_integer (fsr->regs[6], BINWORD);
   else
     fsr->regs[SP_REGNUM] = after_prolog_fp + auto_depth;
 
@@ -531,8 +532,7 @@
   sp = sp & ~stack_align;
 
   /* Now make sure there's space on the stack */
-  for (argnum = 0, stack_alloc = 0;
-       argnum < nargs; argnum++)
+  for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
     stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + stack_align)
 		    & ~stack_align);
   sp -= stack_alloc;		/* make room on stack for args */
@@ -563,8 +563,9 @@
       else
 	val = (char *) VALUE_CONTENTS (args[argnum]);
 
-      if (len > (ARGLAST_REGNUM + 1 - argreg) * REGISTER_RAW_SIZE (ARG0_REGNUM) ||
-	  (len > wordsize && (len & stack_align) != 0))
+      if (len >
+	  (ARGLAST_REGNUM + 1 - argreg) * REGISTER_RAW_SIZE (ARG0_REGNUM)
+	  || (len > wordsize && (len & stack_align) != 0))
 	{			/* passed on the stack */
 	  write_memory (sp + stack_offset, val,
 			len < wordsize ? wordsize : len);
@@ -573,7 +574,8 @@
       /* NOTE WELL!!!!!  This is not an "else if" clause!!!
          That's because some *&^%$ things get passed on the stack
          AND in the registers!   */
-      if (len <= (ARGLAST_REGNUM + 1 - argreg) * REGISTER_RAW_SIZE (ARG0_REGNUM))
+      if (len <=
+	  (ARGLAST_REGNUM + 1 - argreg) * REGISTER_RAW_SIZE (ARG0_REGNUM))
 	while (len > 0)
 	  {			/* there's room in registers */
 	    regval = extract_address (val, wordsize);
@@ -805,8 +807,7 @@
 {
   add_prefix_cmd ("machine", no_class, set_machine,
 		  "set the machine type",
-		  &setmemorylist, "set machine ", 0,
-		  &setlist);
+		  &setmemorylist, "set machine ", 0, &setlist);
 
   add_cmd ("h8300", class_support, h8300_command,
 	   "Set machine to be H8/300.", &setmemorylist);
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 04ba706..0696c4e 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -27,7 +27,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 98869a8..4cc5f18 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -3959,26 +3959,9 @@
 	      /* But mark it as NULL if the method was incompletely processed
 	         We'll fix this up later when the method is fully processed */
 	      if (TYPE_INCOMPLETE (memtype))
-		{
-		  fn_p->field.fn_fields[ix].type = NULL;
-		}
+		fn_p->field.fn_fields[ix].type = NULL;
 	      else
-		{
-		  fn_p->field.fn_fields[ix].type = memtype;
-
-		  /* The argument list */
-		  TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type).arg_types
-		    = (struct type **) obstack_alloc (&objfile->type_obstack,
-						      (sizeof (struct type *)
-						       * (TYPE_NFIELDS (memtype)
-							  + 1)));
-		  for (i = 0; i < TYPE_NFIELDS (memtype); i++)
-		    TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type)
-		      .arg_types[i] = TYPE_FIELDS (memtype)[i].type;
-		  /* void termination */
-		  TYPE_TYPE_SPECIFIC (fn_p->field.fn_fields[ix].type)
-		    .arg_types[TYPE_NFIELDS (memtype)] = builtin_type_void;
-		}
+		fn_p->field.fn_fields[ix].type = memtype;
 
 	      /* For virtual functions, fill in the voffset field with the
 	       * virtual table offset. (This is just copied over from the
@@ -4055,7 +4038,6 @@
 	      list = new;
 
 	      list->field.name = VT (objfile) + fn_fieldp->dsvar.name;
-	      FIELD_BITSIZE (list->field) = -1;		/* indicates static member */
 	      SET_FIELD_PHYSNAME (list->field, 0);	/* initialize to empty */
 	      memtype = hpread_type_lookup (fn_fieldp->dsvar.type, objfile);
 
@@ -4455,14 +4437,6 @@
 	{
 	  /* Set the method type */
 	  TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j) = method;
-	  /* The argument list */
-	  TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types
-	    = (struct type **) obstack_alloc (&objfile->type_obstack,
-			    sizeof (struct type *) * (TYPE_NFIELDS (method) + 1));
-	  for (k = 0; k < TYPE_NFIELDS (method); k++)
-	    TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[k] = TYPE_FIELDS (method)[k].type;
-	  /* void termination */
-	  TYPE_TYPE_SPECIFIC (TYPE_FN_FIELD_TYPE (TYPE_FN_FIELDLIST1 (class, i), j)).arg_types[TYPE_NFIELDS (method)] = builtin_type_void;
 
 	  /* Break out of both loops -- only one method to fix up in a class */
 	  goto finish;
@@ -4916,21 +4890,18 @@
 	struct type *retvaltype;
 	int nargs;
 	int i;
-	struct type **args_type;
 	class_type = hpread_type_lookup (dn_bufp->dptrmem.pointsto,
 					 objfile);
 	functype = hpread_type_lookup (dn_bufp->dptrmem.memtype,
 				       objfile);
 	retvaltype = TYPE_TARGET_TYPE (functype);
 	nargs = TYPE_NFIELDS (functype);
-	args_type = (struct type **) xmalloc ((nargs + 1) * sizeof (struct type *));
-	for (i = 0; i < nargs; i++)
-	  {
-	    args_type[i] = TYPE_FIELD_TYPE (functype, i);
-	  }
-	args_type[nargs] = NULL;
 	ptrmemtype = alloc_type (objfile);
-	smash_to_method_type (ptrmemtype, class_type, retvaltype, args_type);
+
+	smash_to_method_type (ptrmemtype, class_type, retvaltype,
+			      TYPE_FIELDS (functype),
+			      TYPE_NFIELDS (functype),
+			      0);
 	return make_pointer_type (ptrmemtype, NULL);
       }
       break;
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index e20e894..fe61021 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -62,6 +62,9 @@
 /* Defines for XMM0_REGNUM etc. */
 #include "i386-tdep.h"
 
+/* Defines I386_LINUX_ORIG_EAX_REGNUM.  */
+#include "i386-linux-tdep.h"
+
 /* Prototypes for local functions.  */
 static void dummy_sse_values (void);
 
@@ -168,7 +171,7 @@
 #endif
 
 /* Registers we shouldn't try to fetch.  */
-#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
 
 /* Fetch one register.  */
 
@@ -234,7 +237,7 @@
 }
 
 /* Registers we shouldn't try to store.  */
-#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= NUM_GREGS)
+#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
 
 /* Store one register. */
 
@@ -308,10 +311,11 @@
   elf_greg_t *regp = (elf_greg_t *) gregsetp;
   int i;
 
-  for (i = 0; i < NUM_GREGS; i++)
+  for (i = 0; i < I386_NUM_GREGS; i++)
     supply_register (i, (char *) (regp + regmap[i]));
 
-  supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
+  if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
+    supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
 }
 
 /* Fill register REGNO (if it is a general-purpose register) in
@@ -324,11 +328,12 @@
   elf_greg_t *regp = (elf_greg_t *) gregsetp;
   int i;
 
-  for (i = 0; i < NUM_GREGS; i++)
-    if ((regno == -1 || regno == i))
+  for (i = 0; i < I386_NUM_GREGS; i++)
+    if (regno == -1 || regno == i)
       regcache_collect (i, regp + regmap[i]);
 
-  if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+  if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+      && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
     regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX);
 }
 
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 9592dec..a833fb5 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -33,9 +33,12 @@
 
 #include "solib-svr4.h"		/* For struct link_map_offsets.  */
 
+#include "i386-tdep.h"
+#include "i386-linux-tdep.h"
+
 /* Return the name of register REG.  */
 
-char *
+static const char *
 i386_linux_register_name (int reg)
 {
   /* Deal with the extra "orig_eax" pseudo register.  */
@@ -44,27 +47,6 @@
 
   return i386_register_name (reg);
 }
-
-int
-i386_linux_register_byte (int reg)
-{
-  /* Deal with the extra "orig_eax" pseudo register.  */
-  if (reg == I386_LINUX_ORIG_EAX_REGNUM)
-    return (i386_register_byte (I386_LINUX_ORIG_EAX_REGNUM - 1)
-	    + i386_register_raw_size (I386_LINUX_ORIG_EAX_REGNUM - 1));
-
-  return i386_register_byte (reg);
-}
-
-int
-i386_linux_register_raw_size (int reg)
-{
-  /* Deal with the extra "orig_eax" pseudo register.  */
-  if (reg == I386_LINUX_ORIG_EAX_REGNUM)
-    return 4;
-
-  return i386_register_raw_size (reg);
-}
 
 /* Recognizing signal handler frames.  */
 
@@ -224,8 +206,8 @@
 
 /* Return whether PC is in a GNU/Linux sigtramp routine.  */
 
-int
-i386_linux_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
 {
   if (name)
     return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
@@ -237,7 +219,7 @@
 /* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
    address of the associated sigcontext structure.  */
 
-CORE_ADDR
+static CORE_ADDR
 i386_linux_sigcontext_addr (struct frame_info *frame)
 {
   CORE_ADDR pc;
@@ -283,103 +265,9 @@
   return 0;
 }
 
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>.  */
-#define LINUX_SIGCONTEXT_PC_OFFSET (56)
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
-   saved program counter.  */
-
-static CORE_ADDR
-i386_linux_sigtramp_saved_pc (struct frame_info *frame)
-{
-  CORE_ADDR addr;
-  addr = i386_linux_sigcontext_addr (frame);
-  return read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 4);
-}
-
-/* Offset to saved SP in sigcontext, from <asm/sigcontext.h>.  */
-#define LINUX_SIGCONTEXT_SP_OFFSET (28)
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
-   saved stack pointer.  */
-
-static CORE_ADDR
-i386_linux_sigtramp_saved_sp (struct frame_info *frame)
-{
-  CORE_ADDR addr;
-  addr = i386_linux_sigcontext_addr (frame);
-  return read_memory_integer (addr + LINUX_SIGCONTEXT_SP_OFFSET, 4);
-}
-
-/* Signal trampolines don't have a meaningful frame.  As in
-   "i386/tm-i386.h", the frame pointer value we use is actually the
-   frame pointer of the calling frame -- that is, the frame which was
-   in progress when the signal trampoline was entered.  GDB mostly
-   treats this frame pointer value as a magic cookie.  We detect the
-   case of a signal trampoline by looking at the SIGNAL_HANDLER_CALLER
-   field, which is set based on PC_IN_SIGTRAMP.
-
-   When a signal trampoline is invoked from a frameless function, we
-   essentially have two frameless functions in a row.  In this case,
-   we use the same magic cookie for three frames in a row.  We detect
-   this case by seeing whether the next frame has
-   SIGNAL_HANDLER_CALLER set, and, if it does, checking whether the
-   current frame is actually frameless.  In this case, we need to get
-   the PC by looking at the SP register value stored in the signal
-   context.
-
-   This should work in most cases except in horrible situations where
-   a signal occurs just as we enter a function but before the frame
-   has been set up.  */
-
-#define FRAMELESS_SIGNAL(frame)					\
-  ((frame)->next != NULL					\
-   && (frame)->next->signal_handler_caller			\
-   && frameless_look_for_prologue (frame))
-
-CORE_ADDR
-i386_linux_frame_chain (struct frame_info *frame)
-{
-  if (frame->signal_handler_caller || FRAMELESS_SIGNAL (frame))
-    return frame->frame;
-
-  if (! inside_entry_file (frame->pc))
-    return read_memory_unsigned_integer (frame->frame, 4);
-
-  return 0;
-}
-
-/* Return the saved program counter for FRAME.  */
-
-CORE_ADDR
-i386_linux_frame_saved_pc (struct frame_info *frame)
-{
-  if (frame->signal_handler_caller)
-    return i386_linux_sigtramp_saved_pc (frame);
-
-  if (FRAMELESS_SIGNAL (frame))
-    {
-      CORE_ADDR sp = i386_linux_sigtramp_saved_sp (frame->next);
-      return read_memory_unsigned_integer (sp, 4);
-    }
-
-  return read_memory_unsigned_integer (frame->frame + 4, 4);
-}
-
-/* Immediately after a function call, return the saved pc.  */
-
-CORE_ADDR
-i386_linux_saved_pc_after_call (struct frame_info *frame)
-{
-  if (frame->signal_handler_caller)
-    return i386_linux_sigtramp_saved_pc (frame);
-
-  return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
-}
-
 /* Set the program counter for process PTID to PC.  */
 
-void
+static void
 i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
 {
   write_register_pid (PC_REGNUM, pc, ptid);
@@ -496,7 +384,7 @@
    from a GDB that was not built on an GNU/Linux x86 host (for cross
    debugging).  */
 
-struct link_map_offsets *
+static struct link_map_offsets *
 i386_linux_svr4_fetch_link_map_offsets (void)
 {
   static struct link_map_offsets lmo;
@@ -528,3 +416,50 @@
 
   return lmp;
 }
+
+
+static void
+i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* GNU/Linux uses ELF.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  /* We support the SSE registers on GNU/Linux.  */
+  tdep->num_xmm_regs = I386_NUM_XREGS - 1;
+  /* set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS); */
+
+  /* Since we have the extra "orig_eax" register on GNU/Linux, we have
+     to adjust a few things.  */
+
+  set_gdbarch_write_pc (gdbarch, i386_linux_write_pc);
+  set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
+  set_gdbarch_register_name (gdbarch, i386_linux_register_name);
+  set_gdbarch_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
+
+  tdep->jb_pc_offset = 20;	/* From <bits/setjmp.h>.  */
+
+  tdep->sigcontext_addr = i386_linux_sigcontext_addr;
+  tdep->sc_pc_offset = 14 * 4;	/* From <asm/sigcontext.h>.  */
+  tdep->sc_sp_offset = 7 * 4;
+
+  /* When the i386 Linux kernel calls a signal handler, the return
+     address points to a bit of code on the stack.  This function is
+     used to identify this bit of code as a signal trampoline in order
+     to support backtracing through calls to signal handlers.  */
+  set_gdbarch_pc_in_sigtramp (gdbarch, i386_linux_pc_in_sigtramp);
+
+  set_solib_svr4_fetch_link_map_offsets (gdbarch,
+				       i386_linux_svr4_fetch_link_map_offsets);
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern void _initialize_i386_linux_tdep (void);
+
+void
+_initialize_i386_linux_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_LINUX,
+			  i386_linux_init_abi);
+}
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index adf220b..53a81a4 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -230,6 +230,14 @@
   dr_status_mirror  = 0;
 }
 
+/* Reset all debug registers at each new startup
+   to avoid missing watchpoints after restart.  */
+void
+child_post_startup_inferior (ptid_t ptid)
+{
+  i386_cleanup_dregs ();
+}
+
 /* Print the values of the mirrored debug registers.
    This is called when maint_show_dr is non-zero.  To set that
    up, type "maint show-debug-regs" at GDB's prompt.  */
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index 206e85c..c72a7ed 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -19,6 +19,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "value.h"
 
 #include "i386-tdep.h"
 
@@ -43,8 +44,13 @@
   /* Signal trampolines are different from SVR4, in fact they're
      rather similar to BSD.  */
   set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
-  tdep->sigtramp_saved_pc = i386bsd_sigtramp_saved_pc;
+  tdep->sigcontext_addr = i386bsd_sigcontext_addr;
   tdep->sc_pc_offset = 36 + 14 * 4;
+  tdep->sc_sp_offset = 36 + 17 * 4;
+
+  /* Assume that the prototype flag can be trusted.  */
+  set_gdbarch_coerce_float_to_double (gdbarch,
+				      standard_coerce_float_to_double);
 }
 
 
@@ -65,7 +71,7 @@
 void
 _initialize_i386_sol2_tdep (void)
 {
-  /* Register and ELF OS ABI sniffer for Solaris 2 binaries.  */
+  /* Register an ELF OS ABI sniffer for Solaris 2 binaries.  */
   gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour,
 				  i386_sol2_osabi_sniffer);
 
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 54746ee..8684fce 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -25,8 +25,10 @@
 #include "frame.h"
 #include "inferior.h"
 #include "gdbcore.h"
+#include "objfiles.h"
 #include "target.h"
 #include "floatformat.h"
+#include "symfile.h"
 #include "symtab.h"
 #include "gdbcmd.h"
 #include "command.h"
@@ -36,9 +38,8 @@
 #include "value.h"
 #include "gdb_assert.h"
 
-#include "elf-bfd.h"
-
 #include "i386-tdep.h"
+#include "i387-tdep.h"
 
 /* Names of the registers.  The first 10 registers match the register
    numbering scheme used by GCC for stabs and DWARF.  */
@@ -57,69 +58,42 @@
   "mxcsr"
 };
 
-/* i386_register_offset[i] is the offset into the register file of the
-   start of register number i.  We initialize this from
-   i386_register_size.  */
-static int i386_register_offset[MAX_NUM_REGS];
+/* MMX registers.  */
 
-/* i386_register_size[i] is the number of bytes of storage in GDB's
-   register array occupied by register i.  */
-static int i386_register_size[MAX_NUM_REGS] = {
-   4,  4,  4,  4,
-   4,  4,  4,  4,
-   4,  4,  4,  4,
-   4,  4,  4,  4,
-  10, 10, 10, 10,
-  10, 10, 10, 10,
-   4,  4,  4,  4,
-   4,  4,  4,  4,
-  16, 16, 16, 16,
-  16, 16, 16, 16,
-   4
+static char *i386_mmx_names[] =
+{
+  "mm0", "mm1", "mm2", "mm3",
+  "mm4", "mm5", "mm6", "mm7"
 };
+static const int mmx_num_regs = (sizeof (i386_mmx_names)
+				 / sizeof (i386_mmx_names[0]));
+#define MM0_REGNUM (NUM_REGS)
+
+static int
+mmx_regnum_p (int reg)
+{
+  return (reg >= MM0_REGNUM && reg < MM0_REGNUM + mmx_num_regs);
+}
 
 /* Return the name of register REG.  */
 
-char *
+const char *
 i386_register_name (int reg)
 {
   if (reg < 0)
     return NULL;
+  if (mmx_regnum_p (reg))
+    return i386_mmx_names[reg - MM0_REGNUM];
   if (reg >= sizeof (i386_register_names) / sizeof (*i386_register_names))
     return NULL;
 
   return i386_register_names[reg];
 }
 
-/* Return the offset into the register array of the start of register
-   number REG.  */
-int
-i386_register_byte (int reg)
-{
-  return i386_register_offset[reg];
-}
-
-/* Return the number of bytes of storage in GDB's register array
-   occupied by register REG.  */
-
-int
-i386_register_raw_size (int reg)
-{
-  return i386_register_size[reg];
-}
-
-/* Return the size in bytes of the virtual type of register REG.  */
-
-int
-i386_register_virtual_size (int reg)
-{
-  return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg));
-}
-
 /* Convert stabs register number REG to the appropriate register
    number used by GDB.  */
 
-int
+static int
 i386_stab_reg_to_regnum (int reg)
 {
   /* This implements what GCC calls the "default" register map.  */
@@ -141,19 +115,17 @@
   else if (reg >= 29 && reg <= 36)
     {
       /* MMX registers.  */
-      /* FIXME: kettenis/2001-07-28: Should we have the MMX registers
-         as pseudo-registers?  */
-      return reg - 29 + FP0_REGNUM;
+      return reg - 29 + MM0_REGNUM;
     }
 
   /* This will hopefully provoke a warning.  */
   return NUM_REGS + NUM_PSEUDO_REGS;
 }
 
-/* Convert Dwarf register number REG to the appropriate register
+/* Convert DWARF register number REG to the appropriate register
    number used by GDB.  */
 
-int
+static int
 i386_dwarf_reg_to_regnum (int reg)
 {
   /* The DWARF register numbering includes %eip and %eflags, and
@@ -462,14 +434,54 @@
   return (-1);
 }
 
+/* Signal trampolines don't have a meaningful frame.  The frame
+   pointer value we use is actually the frame pointer of the calling
+   frame -- that is, the frame which was in progress when the signal
+   trampoline was entered.  GDB mostly treats this frame pointer value
+   as a magic cookie.  We detect the case of a signal trampoline by
+   looking at the SIGNAL_HANDLER_CALLER field, which is set based on
+   PC_IN_SIGTRAMP.
+
+   When a signal trampoline is invoked from a frameless function, we
+   essentially have two frameless functions in a row.  In this case,
+   we use the same magic cookie for three frames in a row.  We detect
+   this case by seeing whether the next frame has
+   SIGNAL_HANDLER_CALLER set, and, if it does, checking whether the
+   current frame is actually frameless.  In this case, we need to get
+   the PC by looking at the SP register value stored in the signal
+   context.
+
+   This should work in most cases except in horrible situations where
+   a signal occurs just as we enter a function but before the frame
+   has been set up.  Incidentally, that's just what happens when we
+   call a function from GDB with a signal pending (there's a test in
+   the testsuite that makes this happen).  Therefore we pretend that
+   we have a frameless function if we're stopped at the start of a
+   function.  */
+
+/* Return non-zero if we're dealing with a frameless signal, that is,
+   a signal trampoline invoked from a frameless function.  */
+
+static int
+i386_frameless_signal_p (struct frame_info *frame)
+{
+  return (frame->next && frame->next->signal_handler_caller
+	  && (frameless_look_for_prologue (frame)
+	      || frame->pc == get_pc_function_start (frame->pc)));
+}
+
 /* Return the chain-pointer for FRAME.  In the case of the i386, the
    frame's nominal address is the address of a 4-byte word containing
    the calling frame's address.  */
 
-CORE_ADDR
+static CORE_ADDR
 i386_frame_chain (struct frame_info *frame)
 {
-  if (frame->signal_handler_caller)
+  if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+    return frame->frame;
+
+  if (frame->signal_handler_caller
+      || i386_frameless_signal_p (frame))
     return frame->frame;
 
   if (! inside_entry_file (frame->pc))
@@ -482,7 +494,7 @@
    not have a from on the stack associated with it.  If it does not,
    return non-zero, otherwise return zero.  */
 
-int
+static int
 i386_frameless_function_invocation (struct frame_info *frame)
 {
   if (frame->signal_handler_caller)
@@ -491,41 +503,68 @@
   return frameless_look_for_prologue (frame);
 }
 
+/* Assuming FRAME is for a sigtramp routine, return the saved program
+   counter.  */
+
+static CORE_ADDR
+i386_sigtramp_saved_pc (struct frame_info *frame)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  CORE_ADDR addr;
+
+  addr = tdep->sigcontext_addr (frame);
+  return read_memory_unsigned_integer (addr + tdep->sc_pc_offset, 4);
+}
+
+/* Assuming FRAME is for a sigtramp routine, return the saved stack
+   pointer.  */
+
+static CORE_ADDR
+i386_sigtramp_saved_sp (struct frame_info *frame)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  CORE_ADDR addr;
+
+  addr = tdep->sigcontext_addr (frame);
+  return read_memory_unsigned_integer (addr + tdep->sc_sp_offset, 4);
+}
+
 /* Return the saved program counter for FRAME.  */
 
-CORE_ADDR
+static CORE_ADDR
 i386_frame_saved_pc (struct frame_info *frame)
 {
-  /* FIXME: kettenis/2001-05-09: Conditionalizing the next bit of code
-     on SIGCONTEXT_PC_OFFSET and I386V4_SIGTRAMP_SAVED_PC should be
-     considered a temporary hack.  I plan to come up with something
-     better when we go multi-arch.  */
-#if defined (SIGCONTEXT_PC_OFFSET) || defined (I386V4_SIGTRAMP_SAVED_PC)
+  if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+    return generic_read_register_dummy (frame->pc, frame->frame,
+					PC_REGNUM);
+
   if (frame->signal_handler_caller)
-    return sigtramp_saved_pc (frame);
-#endif
+    return i386_sigtramp_saved_pc (frame);
+
+  if (i386_frameless_signal_p (frame))
+    {
+      CORE_ADDR sp = i386_sigtramp_saved_sp (frame->next);
+      return read_memory_unsigned_integer (sp, 4);
+    }
 
   return read_memory_unsigned_integer (frame->frame + 4, 4);
 }
 
-CORE_ADDR
-i386go32_frame_saved_pc (struct frame_info *frame)
-{
-  return read_memory_integer (frame->frame + 4, 4);
-}
-
 /* Immediately after a function call, return the saved pc.  */
 
-CORE_ADDR
+static CORE_ADDR
 i386_saved_pc_after_call (struct frame_info *frame)
 {
+  if (frame->signal_handler_caller)
+    return i386_sigtramp_saved_pc (frame);
+
   return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
 }
 
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-int
+static int
 i386_frame_num_args (struct frame_info *fi)
 {
 #if 1
@@ -622,12 +661,11 @@
    If the setup sequence is at the end of the function, then the next
    instruction will be a branch back to the start.  */
 
-void
+static void
 i386_frame_init_saved_regs (struct frame_info *fip)
 {
   long locals = -1;
   unsigned char op;
-  CORE_ADDR dummy_bottom;
   CORE_ADDR addr;
   CORE_ADDR pc;
   int i;
@@ -637,23 +675,6 @@
 
   frame_saved_regs_zalloc (fip);
 
-  /* If the frame is the end of a dummy, compute where the beginning
-     would be.  */
-  dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
-
-  /* Check if the PC points in the stack, in a dummy frame.  */
-  if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
-    {
-      /* All registers were saved by push_call_dummy.  */
-      addr = fip->frame;
-      for (i = 0; i < NUM_REGS; i++)
-	{
-	  addr -= REGISTER_RAW_SIZE (i);
-	  fip->saved_regs[i] = addr;
-	}
-      return;
-    }
-
   pc = get_pc_function_start (fip->pc);
   if (pc != 0)
     locals = i386_get_frame_setup (pc);
@@ -682,8 +703,8 @@
 
 /* Return PC of first real instruction.  */
 
-int
-i386_skip_prologue (int pc)
+static CORE_ADDR
+i386_skip_prologue (CORE_ADDR pc)
 {
   unsigned char op;
   int i;
@@ -765,53 +786,43 @@
   return (codestream_tell ());
 }
 
-void
-i386_push_dummy_frame (void)
-{
-  CORE_ADDR sp = read_register (SP_REGNUM);
-  CORE_ADDR fp;
-  int regnum;
-  char regbuf[MAX_REGISTER_RAW_SIZE];
+/* Use the program counter to determine the contents and size of a
+   breakpoint instruction.  Return a pointer to a string of bytes that
+   encode a breakpoint instruction, store the length of the string in
+   *LEN and optionally adjust *PC to point to the correct memory
+   location for inserting the breakpoint.
 
-  sp = push_word (sp, read_register (PC_REGNUM));
-  sp = push_word (sp, read_register (FP_REGNUM));
-  fp = sp;
-  for (regnum = 0; regnum < NUM_REGS; regnum++)
-    {
-      read_register_gen (regnum, regbuf);
-      sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
-    }
-  write_register (SP_REGNUM, sp);
-  write_register (FP_REGNUM, fp);
+   On the i386 we have a single breakpoint that fits in a single byte
+   and can be inserted anywhere.  */
+   
+static const unsigned char *
+i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+{
+  static unsigned char break_insn[] = { 0xcc };	/* int 3 */
+  
+  *len = sizeof (break_insn);
+  return break_insn;
 }
 
-/* Insert the (relative) function address into the call sequence
-   stored at DYMMY.  */
+/* Push the return address (pointing to the call dummy) onto the stack
+   and return the new value for the stack pointer.  */
 
-void
-i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
-		     struct value **args, struct type *type, int gcc_p)
+static CORE_ADDR
+i386_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
-  int from, to, delta, loc;
+  char buf[4];
 
-  loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH);
-  from = loc + 5;
-  to = (int)(fun);
-  delta = to - from;
-
-  *((char *)(dummy) + 1) = (delta & 0xff);
-  *((char *)(dummy) + 2) = ((delta >> 8) & 0xff);
-  *((char *)(dummy) + 3) = ((delta >> 16) & 0xff);
-  *((char *)(dummy) + 4) = ((delta >> 24) & 0xff);
+  store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
+  write_memory (sp - 4, buf, 4);
+  return sp - 4;
 }
 
-void
-i386_pop_frame (void)
+static void
+i386_do_pop_frame (struct frame_info *frame)
 {
-  struct frame_info *frame = get_current_frame ();
   CORE_ADDR fp;
   int regnum;
-  char regbuf[MAX_REGISTER_RAW_SIZE];
+  char regbuf[I386_MAX_REGISTER_SIZE];
 
   fp = FRAME_FP (frame);
   i386_frame_init_saved_regs (frame);
@@ -823,8 +834,7 @@
       if (addr)
 	{
 	  read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
-	  write_register_bytes (REGISTER_BYTE (regnum), regbuf,
-				REGISTER_RAW_SIZE (regnum));
+	  write_register_gen (regnum, regbuf);
 	}
     }
   write_register (FP_REGNUM, read_memory_integer (fp, 4));
@@ -832,54 +842,46 @@
   write_register (SP_REGNUM, fp + 8);
   flush_cached_frames ();
 }
+
+static void
+i386_pop_frame (void)
+{
+  generic_pop_current_frame (i386_do_pop_frame);
+}
 
 
-#ifdef GET_LONGJMP_TARGET
-
-/* FIXME: Multi-arching does not set JB_PC and JB_ELEMENT_SIZE yet.  
-   Fill in with dummy value to enable compilation.  */
-#ifndef JB_PC
-#define JB_PC 0
-#endif /* JB_PC */
-
-#ifndef JB_ELEMENT_SIZE
-#define JB_ELEMENT_SIZE 4
-#endif /* JB_ELEMENT_SIZE */
-
 /* Figure out where the longjmp will land.  Slurp the args out of the
    stack.  We expect the first arg to be a pointer to the jmp_buf
-   structure from which we extract the pc (JB_PC) that we will land
-   at.  The pc is copied into PC.  This routine returns true on
+   structure from which we extract the address that we will land at.
+   This address is copied into PC.  This routine returns true on
    success.  */
 
-int
-get_longjmp_target (CORE_ADDR *pc)
+static int
+i386_get_longjmp_target (CORE_ADDR *pc)
 {
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+  char buf[4];
   CORE_ADDR sp, jb_addr;
+  int jb_pc_offset = gdbarch_tdep (current_gdbarch)->jb_pc_offset;
+
+  /* If JB_PC_OFFSET is -1, we have no way to find out where the
+     longjmp will land.  */
+  if (jb_pc_offset == -1)
+    return 0;
 
   sp = read_register (SP_REGNUM);
-
-  if (target_read_memory (sp + SP_ARG0,	/* Offset of first arg on stack.  */
-			  buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+  if (target_read_memory (sp + 4, buf, 4))
     return 0;
 
-  jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
-  if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+  jb_addr = extract_address (buf, 4);
+  if (target_read_memory (jb_addr + jb_pc_offset, buf, 4))
     return 0;
 
-  *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
+  *pc = extract_address (buf, 4);
   return 1;
 }
-
-#endif /* GET_LONGJMP_TARGET */
 
 
-CORE_ADDR
+static CORE_ADDR
 i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
 		     int struct_return, CORE_ADDR struct_addr)
 {
@@ -897,7 +899,7 @@
   return sp;
 }
 
-void
+static void
 i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   /* Do nothing.  Everything was already done by i386_push_arguments.  */
@@ -913,21 +915,24 @@
    function return value of TYPE, and copy that, in virtual format,
    into VALBUF.  */
 
-void
-i386_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+static void
+i386_extract_return_value (struct type *type, struct regcache *regcache,
+			   void *dst)
 {
+  bfd_byte *valbuf = dst;
   int len = TYPE_LENGTH (type);
+  char buf[I386_MAX_REGISTER_SIZE];
 
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT
       && TYPE_NFIELDS (type) == 1)
     {
-      i386_extract_return_value (TYPE_FIELD_TYPE (type, 0), regbuf, valbuf);
+      i386_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
       return;
     }
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-      if (NUM_FREGS == 0)
+      if (FP0_REGNUM == 0)
 	{
 	  warning ("Cannot find floating-point return value.");
 	  memset (valbuf, 0, len);
@@ -938,8 +943,8 @@
 	 its contents to the desired type.  This is probably not
 	 exactly how it would happen on the target itself, but it is
 	 the best we can do.  */
-      convert_typed_floating (&regbuf[REGISTER_BYTE (FP0_REGNUM)],
-			      builtin_type_i387_ext, valbuf, type);
+      regcache_raw_read (regcache, FP0_REGNUM, buf);
+      convert_typed_floating (buf, builtin_type_i387_ext, valbuf, type);
     }
   else
     {
@@ -947,13 +952,16 @@
       int high_size = REGISTER_RAW_SIZE (HIGH_RETURN_REGNUM);
 
       if (len <= low_size)
-	memcpy (valbuf, &regbuf[REGISTER_BYTE (LOW_RETURN_REGNUM)], len);
+	{
+	  regcache_raw_read (regcache, LOW_RETURN_REGNUM, buf);
+	  memcpy (valbuf, buf, len);
+	}
       else if (len <= (low_size + high_size))
 	{
-	  memcpy (valbuf,
-		  &regbuf[REGISTER_BYTE (LOW_RETURN_REGNUM)], low_size);
-	  memcpy (valbuf + low_size,
-		  &regbuf[REGISTER_BYTE (HIGH_RETURN_REGNUM)], len - low_size);
+	  regcache_raw_read (regcache, LOW_RETURN_REGNUM, buf);
+	  memcpy (valbuf, buf, low_size);
+	  regcache_raw_read (regcache, HIGH_RETURN_REGNUM, buf);
+	  memcpy (valbuf + low_size, buf, len - low_size);
 	}
       else
 	internal_error (__FILE__, __LINE__,
@@ -964,7 +972,7 @@
 /* Write into the appropriate registers a function return value stored
    in VALBUF of type TYPE, given in virtual format.  */
 
-void
+static void
 i386_store_return_value (struct type *type, char *valbuf)
 {
   int len = TYPE_LENGTH (type);
@@ -981,7 +989,7 @@
       unsigned int fstat;
       char buf[FPU_REG_RAW_SIZE];
 
-      if (NUM_FREGS == 0)
+      if (FP0_REGNUM == 0)
 	{
 	  warning ("Cannot set floating-point return value.");
 	  return;
@@ -996,8 +1004,7 @@
 	 not exactly how it would happen on the target itself, but
 	 it is the best we can do.  */
       convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
-      write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
-			    FPU_REG_RAW_SIZE);
+      write_register_gen (FP0_REGNUM, buf);
 
       /* Set the top of the floating-point register stack to 7.  The
          actual value doesn't really matter, but 7 is what a normal
@@ -1036,11 +1043,52 @@
    the address in which a function should return its structure value,
    as a CORE_ADDR.  */
 
-CORE_ADDR
-i386_extract_struct_value_address (char *regbuf)
+static CORE_ADDR
+i386_extract_struct_value_address (struct regcache *regcache)
 {
-  return extract_address (&regbuf[REGISTER_BYTE (LOW_RETURN_REGNUM)],
-			  REGISTER_RAW_SIZE (LOW_RETURN_REGNUM));
+  /* NOTE: cagney/2002-08-12: Replaced a call to
+     regcache_raw_read_as_address() with a call to
+     regcache_cooked_read_unsigned().  The old, ...as_address function
+     was eventually calling extract_unsigned_integer (via
+     extract_address) to unpack the registers value.  The below is
+     doing an unsigned extract so that it is functionally equivalent.
+     The read needs to be cooked as, otherwise, it will never
+     correctly return the value of a register in the [NUM_REGS
+     .. NUM_REGS+NUM_PSEUDO_REGS) range.  */
+  ULONGEST val;
+  regcache_cooked_read_unsigned (regcache, LOW_RETURN_REGNUM, &val);
+  return val;
+}
+
+
+/* This is the variable that is set with "set struct-convention", and
+   its legitimate values.  */
+static const char default_struct_convention[] = "default";
+static const char pcc_struct_convention[] = "pcc";
+static const char reg_struct_convention[] = "reg";
+static const char *valid_conventions[] =
+{
+  default_struct_convention,
+  pcc_struct_convention,
+  reg_struct_convention,
+  NULL
+};
+static const char *struct_convention = default_struct_convention;
+
+static int
+i386_use_struct_convention (int gcc_p, struct type *type)
+{
+  enum struct_return struct_return;
+
+  if (struct_convention == default_struct_convention)
+    struct_return = gdbarch_tdep (current_gdbarch)->struct_return;
+  else if (struct_convention == pcc_struct_convention)
+    struct_return = pcc_struct_return;
+  else
+    struct_return = reg_struct_return;
+
+  return generic_use_struct_convention (struct_return == reg_struct_return,
+					type);
 }
 
 
@@ -1048,7 +1096,7 @@
    register REGNUM.  Perhaps %esi and %edi should go here, but
    potentially they could be used for things other than address.  */
 
-struct type *
+static struct type *
 i386_register_virtual_type (int regnum)
 {
   if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
@@ -1060,16 +1108,71 @@
   if (IS_SSE_REGNUM (regnum))
     return builtin_type_vec128i;
 
+  if (mmx_regnum_p (regnum))
+    return builtin_type_vec64i;
+
   return builtin_type_int;
 }
 
+/* Map a cooked register onto a raw register or memory.  For the i386,
+   the MMX registers need to be mapped onto floating point registers.  */
+
+static int
+mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
+{
+  int mmxi;
+  ULONGEST fstat;
+  int tos;
+  int fpi;
+  mmxi = regnum - MM0_REGNUM;
+  regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
+  tos = (fstat >> 11) & 0x7;
+  fpi = (mmxi + tos) % 8;
+  return (FP0_REGNUM + fpi);
+}
+
+static void
+i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+			   int regnum, void *buf)
+{
+  if (mmx_regnum_p (regnum))
+    {
+      char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
+      int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
+      regcache_raw_read (regcache, fpnum, mmx_buf);
+      /* Extract (always little endian).  */
+      memcpy (buf, mmx_buf, REGISTER_RAW_SIZE (regnum));
+    }
+  else
+    regcache_raw_read (regcache, regnum, buf);
+}
+
+static void
+i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+			    int regnum, const void *buf)
+{
+  if (mmx_regnum_p (regnum))
+    {
+      char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
+      int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
+      /* Read ...  */
+      regcache_raw_read (regcache, fpnum, mmx_buf);
+      /* ... Modify ... (always little endian).  */
+      memcpy (mmx_buf, buf, REGISTER_RAW_SIZE (regnum));
+      /* ... Write.  */
+      regcache_raw_write (regcache, fpnum, mmx_buf);
+    }
+  else
+    regcache_raw_write (regcache, regnum, buf);
+}
+
 /* Return true iff register REGNUM's virtual format is different from
    its raw format.  Note that this definition assumes that the host
    supports IEEE 32-bit floats, since it doesn't say that SSE
    registers need conversion.  Even if we can't find a counterexample,
    this is still sloppy.  */
 
-int
+static int
 i386_register_convertible (int regnum)
 {
   return IS_FP_REGNUM (regnum);
@@ -1078,7 +1181,7 @@
 /* Convert data from raw format for register REGNUM in buffer FROM to
    virtual format with type TYPE in buffer TO.  */
 
-void
+static void
 i386_register_convert_to_virtual (int regnum, struct type *type,
 				  char *from, char *to)
 {
@@ -1101,7 +1204,7 @@
 /* Convert data from virtual format with type TYPE in buffer FROM to
    raw format for register REGNUM in buffer TO.  */
 
-void
+static void
 i386_register_convert_to_raw (struct type *type, int regnum,
 			      char *from, char *to)
 {
@@ -1122,34 +1225,6 @@
 }
      
 
-#ifdef I386V4_SIGTRAMP_SAVED_PC
-/* Get saved user PC for sigtramp from the pushed ucontext on the
-   stack for all three variants of SVR4 sigtramps.  */
-
-CORE_ADDR
-i386v4_sigtramp_saved_pc (struct frame_info *frame)
-{
-  CORE_ADDR saved_pc_offset = 4;
-  char *name = NULL;
-
-  find_pc_partial_function (frame->pc, &name, NULL, NULL);
-  if (name)
-    {
-      if (STREQ (name, "_sigreturn"))
-	saved_pc_offset = 132 + 14 * 4;
-      else if (STREQ (name, "_sigacthandler"))
-	saved_pc_offset = 80 + 14 * 4;
-      else if (STREQ (name, "sigvechandler"))
-	saved_pc_offset = 120 + 14 * 4;
-    }
-
-  if (frame->next)
-    return read_memory_integer (frame->next->frame + saved_pc_offset, 4);
-  return read_memory_integer (read_register (SP_REGNUM) + saved_pc_offset, 4);
-}
-#endif /* I386V4_SIGTRAMP_SAVED_PC */
-
-
 #ifdef STATIC_TRANSFORM_NAME
 /* SunPRO encodes the static variables.  This is not related to C++
    mangling, it is done for C too.  */
@@ -1179,7 +1254,7 @@
 /* Stuff for WIN32 PE style DLL's but is pretty generic really.  */
 
 CORE_ADDR
-skip_trampoline_code (CORE_ADDR pc, char *name)
+i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name)
 {
   if (pc && read_memory_unsigned_integer (pc, 2) == 0x25ff) /* jmp *(dest) */
     {
@@ -1199,6 +1274,16 @@
 }
 
 
+/* Return non-zero if PC and NAME show that we are in a signal
+   trampoline.  */
+
+static int
+i386_pc_in_sigtramp (CORE_ADDR pc, char *name)
+{
+  return (name && strcmp ("_sigtramp", name) == 0);
+}
+
+
 /* We have two flavours of disassembly.  The machinery on this page
    deals with switching between those.  */
 
@@ -1213,229 +1298,140 @@
      or intel_flavor.  */
   internal_error (__FILE__, __LINE__, "failed internal consistency check");
 }
-
 
-/* This table matches the indices assigned to enum i386_abi.  Keep
-   them in sync.  */
-static const char * const i386_abi_names[] =
-{
-  "<unknown>",
-  "SVR4",
-  "NetBSD",
-  "GNU/Linux",
-  "GNU/Hurd",
-  "Solaris",
-  "FreeBSD",
-  NULL
-};
 
+/* There are a few i386 architecture variants that differ only
+   slightly from the generic i386 target.  For now, we don't give them
+   their own source file, but include them here.  As a consequence,
+   they'll always be included.  */
 
-#define ABI_TAG_OS_GNU_LINUX	I386_ABI_LINUX
-#define ABI_TAG_OS_GNU_HURD	I386_ABI_HURD
-#define ABI_TAG_OS_GNU_SOLARIS	I386_ABI_INVALID
-#define ABI_TAG_OS_FREEBSD	I386_ABI_FREEBSD
-#define ABI_TAG_OS_NETBSD	I386_ABI_NETBSD
-
-static void
-process_note_sections (bfd *abfd, asection *sect, void *obj)
-{
-  int *abi = obj;
-  const char *name;
-  unsigned int sectsize;
-
-  name = bfd_get_section_name (abfd, sect);
-  sectsize = bfd_section_size (abfd, sect);
-
-  if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0)
-    {
-      unsigned int name_length, data_length, note_type;
-      char *note;
-
-      /* If the section is larger than this, it's probably not what we
-	 are looking for.  */
-      if (sectsize > 128)
-	sectsize = 128;
-
-      note = alloca (sectsize);
-
-      bfd_get_section_contents (abfd, sect, note,
-				(file_ptr) 0, (bfd_size_type) sectsize);
-
-      name_length = bfd_h_get_32 (abfd, note);
-      data_length = bfd_h_get_32 (abfd, note + 4);
-      note_type = bfd_h_get_32 (abfd, note + 8);
-
-      if (name_length == 4 && data_length == 16
-	  && note_type == NT_GNU_ABI_TAG
-	  && strcmp (note + 12, "GNU") == 0)
-	{
-	  int abi_tag_os = bfd_h_get_32 (abfd, note + 16);
-
-	  /* The case numbers are from abi-tags in glibc.  */
-	  switch (abi_tag_os)
-	    {
-	    case GNU_ABI_TAG_LINUX:
-	      *abi = ABI_TAG_OS_GNU_LINUX;
-	      break;
-
-	    case GNU_ABI_TAG_HURD:
-	      *abi = ABI_TAG_OS_GNU_HURD;
-	      break;
-
-	    case GNU_ABI_TAG_SOLARIS:
-	      *abi = ABI_TAG_OS_GNU_SOLARIS;
-	      break;
-
-	    default:
-	      internal_error
-		(__FILE__, __LINE__,
-		 "process_note_abi_sections: unknown ABI OS tag %d",
-		 abi_tag_os);
-	      break;
-	    }
-	}
-      else if (name_length == 8 && data_length == 4
-	       && note_type == NT_FREEBSD_ABI_TAG
-	       && strcmp (note + 12, "FreeBSD") == 0)
-	*abi = ABI_TAG_OS_FREEBSD;
-    }
-  /* NetBSD uses a similar trick.  */
-  else if (strcmp (name, ".note.netbsd.ident") == 0 && sectsize > 0)
-    {
-      unsigned int name_length, desc_length, note_type;
-      char *note;
-
-      /* If the section is larger than this, it's probably not what we are
-         looking for.  */
-      if (sectsize > 128)
-	sectsize = 128;
-
-      note = alloca (sectsize);
-
-      bfd_get_section_contents (abfd, sect, note,
-				(file_ptr) 0, (bfd_size_type) sectsize);
-
-      name_length = bfd_h_get_32 (abfd, note);
-      desc_length = bfd_h_get_32 (abfd, note + 4);
-      note_type = bfd_h_get_32 (abfd, note + 8);
-
-      if (name_length == 7 && desc_length == 4
-	  && note_type == NT_NETBSD_IDENT
-	  && strcmp (note + 12, "NetBSD") == 0)
-	*abi = ABI_TAG_OS_NETBSD;
-    }
-}
+/* System V Release 4 (SVR4).  */
 
 static int
-i386_elf_abi_from_note (bfd *abfd)
+i386_svr4_pc_in_sigtramp (CORE_ADDR pc, char *name)
 {
-  enum i386_abi abi = I386_ABI_UNKNOWN;
-  
-  bfd_map_over_sections (abfd, process_note_sections, &abi);
-
-  return abi;
+  return (name && (strcmp ("_sigreturn", name) == 0
+		   || strcmp ("_sigacthandler", name) == 0
+		   || strcmp ("sigvechandler", name) == 0));
 }
 
-static enum i386_abi
-i386_elf_abi (bfd *abfd)
+/* Get address of the pushed ucontext (sigcontext) on the stack for
+   all three variants of SVR4 sigtramps.  */
+
+static CORE_ADDR
+i386_svr4_sigcontext_addr (struct frame_info *frame)
 {
-  int elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
+  int sigcontext_offset = -1;
+  char *name = NULL;
 
-  /* The fact that the EI_OSABI byte is set to ELFOSABI_NONE doesn't
-     necessarily mean that this is a System V ELF binary.  To further
-     distinguish between binaries for differens operating systems,
-     check for vendor-specific note elements.  */
-  if (elfosabi == ELFOSABI_NONE)
+  find_pc_partial_function (frame->pc, &name, NULL, NULL);
+  if (name)
     {
-      enum i386_abi abi = i386_elf_abi_from_note (abfd);
-
-      if (abi != I386_ABI_UNKNOWN)
-	return abi;
-
-      /* FreeBSD folks are naughty; they stored the string "FreeBSD"
-	 in the padding of the e_ident field of the ELF header.  */
-      if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
-	return I386_ABI_FREEBSD;
+      if (strcmp (name, "_sigreturn") == 0)
+	sigcontext_offset = 132;
+      else if (strcmp (name, "_sigacthandler") == 0)
+	sigcontext_offset = 80;
+      else if (strcmp (name, "sigvechandler") == 0)
+	sigcontext_offset = 120;
     }
 
-  switch (elfosabi)
-    {
-    case ELFOSABI_NONE:
-      return I386_ABI_SVR4;
-    case ELFOSABI_FREEBSD:
-      return I386_ABI_FREEBSD;
-    }
+  gdb_assert (sigcontext_offset != -1);
 
-  return I386_ABI_UNKNOWN;
+  if (frame->next)
+    return frame->next->frame + sigcontext_offset;
+  return read_register (SP_REGNUM) + sigcontext_offset;
 }
+
 
-struct i386_abi_handler
+/* DJGPP.  */
+
+static int
+i386_go32_pc_in_sigtramp (CORE_ADDR pc, char *name)
 {
-  struct i386_abi_handler *next;
-  enum i386_abi abi;
-  void (*init_abi)(struct gdbarch_info, struct gdbarch *);
-};
+  /* DJGPP doesn't have any special frames for signal handlers.  */
+  return 0;
+}
+
 
-struct i386_abi_handler *i386_abi_handler_list = NULL;
+/* Generic ELF.  */
 
 void
-i386_gdbarch_register_os_abi (enum i386_abi abi,
-			      void (*init_abi)(struct gdbarch_info,
-					       struct gdbarch *))
+i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  struct i386_abi_handler **handler_p;
-
-  for (handler_p = &i386_abi_handler_list; *handler_p != NULL;
-       handler_p = &(*handler_p)->next)
-    {
-      if ((*handler_p)->abi == abi)
-	{
-	  internal_error
-	    (__FILE__, __LINE__,
-	     "i386_gdbarch_register_abi: A handler for this ABI variant "
-	     "(%d) has already been registered", (int) abi);
-	  /* If user wants to continue, override previous definition.  */
-	  (*handler_p)->init_abi = init_abi;
-	  return;
-	}
-    }
-  (*handler_p)
-    = (struct i386_abi_handler *) xmalloc (sizeof (struct i386_abi_handler));
-  (*handler_p)->next = NULL;
-  (*handler_p)->abi = abi;
-  (*handler_p)->init_abi = init_abi;
+  /* We typically use stabs-in-ELF with the DWARF register numbering.  */
+  set_gdbarch_stab_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
 }
 
-struct gdbarch *
+/* System V Release 4 (SVR4).  */
+
+void
+i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* System V Release 4 uses ELF.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  /* System V Release 4 has shared libraries.  */
+  set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+  set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+
+  /* FIXME: kettenis/20020511: Why do we override this function here?  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+
+  set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
+  tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
+  tdep->sc_pc_offset = 14 * 4;
+  tdep->sc_sp_offset = 7 * 4;
+
+  tdep->jb_pc_offset = 20;
+}
+
+/* DJGPP.  */
+
+static void
+i386_go32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  set_gdbarch_pc_in_sigtramp (gdbarch, i386_go32_pc_in_sigtramp);
+
+  tdep->jb_pc_offset = 36;
+}
+
+/* NetWare.  */
+
+static void
+i386_nw_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* FIXME: kettenis/20020511: Why do we override this function here?  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+
+  tdep->jb_pc_offset = 24;
+}
+
+
+static struct gdbarch *
 i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
   struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
-  enum i386_abi abi = I386_ABI_UNKNOWN;
-  struct i386_abi_handler *abi_handler;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
+  /* Try to determine the OS ABI of the object we're loading.  */
   if (info.abfd != NULL)
-    {
-      switch (bfd_get_flavour (info.abfd))
-	{
-	case bfd_target_elf_flavour:
-	  abi= i386_elf_abi (info.abfd);
-	  break;
-
-	default:
-	  /* Not sure what to do here, leave the ABI as unknown.  */
-	  break;
-	}
-    }
+    osabi = gdbarch_lookup_osabi (info.abfd);
 
   /* Find a candidate among extant architectures.  */
   for (arches = gdbarch_list_lookup_by_info (arches, &info);
        arches != NULL;
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
     {
-      /* Make sure the ABI selection matches.  */
+      /* Make sure the OS ABI selection matches.  */
       tdep = gdbarch_tdep (arches->gdbarch);
-      if (tdep && tdep->abi == abi)
+      if (tdep && tdep->osabi == osabi)
         return arches->gdbarch;
     }
 
@@ -1443,70 +1439,160 @@
   tdep = XMALLOC (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
-  tdep->abi = abi;
+  tdep->osabi = osabi;
 
-  /* FIXME: kettenis/2001-11-24: Although not all IA-32 processors
-     have the SSE registers, it's easier to set the default to 8.  */
-  tdep->num_xmm_regs = 8;
+  /* The i386 default settings don't include the SSE registers.
+     FIXME: kettenis/20020614: They do include the FPU registers for
+     now, which probably is not quite right.  */
+  tdep->num_xmm_regs = 0;
 
-  set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
+  tdep->jb_pc_offset = -1;
+  tdep->struct_return = pcc_struct_return;
+  tdep->sigtramp_start = 0;
+  tdep->sigtramp_end = 0;
+  tdep->sigcontext_addr = NULL;
+  tdep->sc_pc_offset = -1;
+  tdep->sc_sp_offset = -1;
+
+  /* The format used for `long double' on almost all i386 targets is
+     the i387 extended floating-point format.  In fact, of all targets
+     in the GCC 2.95 tree, only OSF/1 does it different, and insists
+     on having a `long double' that's not `long' at all.  */
+  set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+
+  /* Although the i386 extended floating-point has only 80 significant
+     bits, a `long double' actually takes up 96, probably to enforce
+     alignment.  */
+  set_gdbarch_long_double_bit (gdbarch, 96);
+
+  /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
+     tm-symmetry.h currently override this.  Sigh.  */
+  set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
+
+  set_gdbarch_sp_regnum (gdbarch, 4);
+  set_gdbarch_fp_regnum (gdbarch, 5);
+  set_gdbarch_pc_regnum (gdbarch, 8);
+  set_gdbarch_ps_regnum (gdbarch, 9);
+  set_gdbarch_fp0_regnum (gdbarch, 16);
+
+  /* Use the "default" register numbering scheme for stabs and COFF.  */
+  set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+  set_gdbarch_sdb_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
+
+  /* Use the DWARF register numbering scheme for DWARF and DWARF 2.  */
+  set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+  set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dwarf_reg_to_regnum);
+
+  /* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
+     be in use on any of the supported i386 targets.  */
+
+  set_gdbarch_register_name (gdbarch, i386_register_name);
+  set_gdbarch_register_size (gdbarch, 4);
+  set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
+  set_gdbarch_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
+  set_gdbarch_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
+  set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
+
+  set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
+
+  set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
+
+  set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
 
   /* Call dummy code.  */
-  set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
-  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 5);
+  set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
+  set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
+  set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+  set_gdbarch_call_dummy_length (gdbarch, 0);
   set_gdbarch_call_dummy_p (gdbarch, 1);
+  set_gdbarch_call_dummy_words (gdbarch, NULL);
+  set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
+  set_gdbarch_register_convert_to_virtual (gdbarch,
+					   i386_register_convert_to_virtual);
+  set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
+
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
 
-  set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
+  set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
 
-  /* NOTE: tm-i386nw.h and tm-i386v4.h override this.  */
-  set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+  /* "An argument's size is increased, if necessary, to make it a
+     multiple of [32-bit] words.  This may require tail padding,
+     depending on the size of the argument" -- from the x86 ABI.  */
+  set_gdbarch_parm_boundary (gdbarch, 32);
 
-  /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-linux.h,
-     tm-ptx.h, tm-symmetry.h currently override this.  Sigh.  */
-  set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SSE_REGS);
+  set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
+  set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
+  set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+  set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
+  set_gdbarch_pop_frame (gdbarch, i386_pop_frame);
+  set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+  set_gdbarch_deprecated_store_return_value (gdbarch, i386_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch,
+					    i386_extract_struct_value_address);
+  set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
+
+  set_gdbarch_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
+  set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
+
+  /* Stack grows downward.  */
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+
+  set_gdbarch_breakpoint_from_pc (gdbarch, i386_breakpoint_from_pc);
+  set_gdbarch_decr_pc_after_break (gdbarch, 1);
+  set_gdbarch_function_start_offset (gdbarch, 0);
+
+  /* The following redefines make backtracing through sigtramp work.
+     They manufacture a fake sigtramp frame and obtain the saved pc in
+     sigtramp from the sigcontext structure which is pushed by the
+     kernel on the user stack, along with a pointer to it.  */
+
+  set_gdbarch_frame_args_skip (gdbarch, 8);
+  set_gdbarch_frameless_function_invocation (gdbarch,
+                                           i386_frameless_function_invocation);
+  set_gdbarch_frame_chain (gdbarch, i386_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
+  set_gdbarch_frame_saved_pc (gdbarch, i386_frame_saved_pc);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+  set_gdbarch_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
+  set_gdbarch_frame_num_args (gdbarch, i386_frame_num_args);
+  set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
+
+  /* Wire in the MMX registers.  */
+  set_gdbarch_num_pseudo_regs (gdbarch, mmx_num_regs);
+  set_gdbarch_pseudo_register_read (gdbarch, i386_pseudo_register_read);
+  set_gdbarch_pseudo_register_write (gdbarch, i386_pseudo_register_write);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
-  if (abi == I386_ABI_UNKNOWN)
-    {
-      /* Don't complain about not knowing the ABI variant if we don't
-	 have an inferior.  */
-      if (info.abfd)
-	fprintf_filtered
-	  (gdb_stderr, "GDB doesn't recognize the ABI of the inferior.  "
-	   "Attempting to continue with the default i386 settings");
-    }
-  else
-    {
-      for (abi_handler = i386_abi_handler_list; abi_handler != NULL;
-	   abi_handler = abi_handler->next)
-	if (abi_handler->abi == abi)
-	  break;
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
-      if (abi_handler)
-	abi_handler->init_abi (info, gdbarch);
-      else
-	{
-	  /* We assume that if GDB_MULTI_ARCH is less than
-	     GDB_MULTI_ARCH_TM that an ABI variant can be supported by
-	     overriding definitions in this file.  */
-	  if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
-	    fprintf_filtered
-	      (gdb_stderr,
-	       "A handler for the ABI variant \"%s\" is not built into this "
-	       "configuration of GDB.  "
-	       "Attempting to continue with the default i386 settings",
-	       i386_abi_names[abi]);
-	}
-    }
-  
   return gdbarch;
 }
 
+static enum gdb_osabi
+i386_coff_osabi_sniffer (bfd *abfd)
+{
+  if (strcmp (bfd_get_target (abfd), "coff-go32-exe") == 0
+      || strcmp (bfd_get_target (abfd), "coff-go32") == 0)
+    return GDB_OSABI_GO32;
+
+  return GDB_OSABI_UNKNOWN;
+}
+
+static enum gdb_osabi
+i386_nlm_osabi_sniffer (bfd *abfd)
+{
+  return GDB_OSABI_NETWARE;
+}
+
+
 /* Provide a prototype to silence -Wmissing-prototypes.  */
 void _initialize_i386_tdep (void);
 
@@ -1515,19 +1601,6 @@
 {
   register_gdbarch_init (bfd_arch_i386, i386_gdbarch_init);
 
-  /* Initialize the table saying where each register starts in the
-     register file.  */
-  {
-    int i, offset;
-
-    offset = 0;
-    for (i = 0; i < MAX_NUM_REGS; i++)
-      {
-	i386_register_offset[i] = offset;
-	offset += i386_register_size[i];
-      }
-  }
-
   tm_print_insn = gdb_print_insn_i386;
   tm_print_insn_info.mach = bfd_lookup_arch (bfd_arch_i386, 0)->mach;
 
@@ -1544,4 +1617,30 @@
 				&setlist);
     add_show_from_set (new_cmd, &showlist);
   }
+
+  /* Add the variable that controls the convention for returning
+     structs.  */
+  {
+    struct cmd_list_element *new_cmd;
+
+    new_cmd = add_set_enum_cmd ("struct-convention", no_class,
+				 valid_conventions,
+				&struct_convention, "\
+Set the convention for returning small structs, valid values \
+are \"default\", \"pcc\" and \"reg\", and the default value is \"default\".",
+                                &setlist);
+    add_show_from_set (new_cmd, &showlist);
+  }
+
+  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+				  i386_coff_osabi_sniffer);
+  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_nlm_flavour,
+				  i386_nlm_osabi_sniffer);
+
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_SVR4,
+			  i386_svr4_init_abi);
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_GO32,
+			  i386_go32_init_abi);
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETWARE,
+			  i386_nw_init_abi);
 }
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 0bdbb05..30128d9 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -1,5 +1,5 @@
 /* Target-dependent code for GDB, the GNU debugger.
-   Copyright 2001
+   Copyright 2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -22,6 +22,8 @@
 #ifndef I386_TDEP_H
 #define I386_TDEP_H
 
+#include "osabi.h"
+
 /* GDB's i386 target supports both the 32-bit Intel Architecture
    (IA-32) and the 64-bit AMD x86-64 architecture.  Internally it uses
    a similar register layout for both.
@@ -40,30 +42,39 @@
    differs and is determined by the num_xmm_regs member of `struct
    gdbarch_tdep'.  */
 
-/* ABI variants that we know about.  */
-enum i386_abi
+/* Convention for returning structures.  */
+
+enum struct_return
 {
-  I386_ABI_UNKNOWN = 0,
-
-  /* ELF */
-  I386_ABI_SVR4,		/* This is the default.  */
-  I386_ABI_NETBSD,
-  I386_ABI_LINUX,
-  I386_ABI_HURD,
-  I386_ABI_SOLARIS,
-  I386_ABI_FREEBSD,
-
-  I386_ABI_INVALID = -1
+  pcc_struct_return,		/* Return "short" structures in memory.  */
+  reg_struct_return		/* Return "short" structures in registers.  */
 };
 
 /* i386 architecture specific information.  */
 struct gdbarch_tdep
 {
   /* ABI.  */
-  enum i386_abi abi;
+  enum gdb_osabi osabi;
 
   /* Number of SSE registers.  */
   int num_xmm_regs;
+
+  /* Offset of saved PC in jmp_buf.  */
+  int jb_pc_offset;
+
+  /* Convention for returning structures.  */
+  enum struct_return struct_return;
+
+  /* Address range where sigtramp lives.  */
+  CORE_ADDR sigtramp_start;
+  CORE_ADDR sigtramp_end;
+
+  /* Get address of sigcontext for sigtramp.  */
+  CORE_ADDR (*sigcontext_addr) (struct frame_info *);
+
+  /* Offset of saved PC and SP in `struct sigcontext'.  */
+  int sc_pc_offset;
+  int sc_sp_offset;
 };
 
 /* Floating-point registers.  */
@@ -103,7 +114,7 @@
 #define FOP_REGNUM	(FPC_REGNUM + 7)
 
 /* Return non-zero if N corresponds to a FPU data registers.  */
-#define FP_REGNUM_P(n)	(FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
+#define FP_REGNUM_P(n)	(FP0_REGNUM && FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
 
 /* Return non-zero if N corresponds to a FPU control register.  */
 #define FPC_REGNUM_P(n)	(FPC_REGNUM <= (n) && (n) < XMM0_REGNUM)
@@ -129,8 +140,40 @@
 #define IS_FPU_CTRL_REGNUM(n) FPC_REGNUM_P (n)
 #define IS_SSE_REGNUM(n) SSE_REGNUM_P (n)
 
-void i386_gdbarch_register_os_abi (enum i386_abi,
-				   void (*init_abi)(struct gdbarch_info,
-						    struct gdbarch *));
+#define I386_NUM_GREGS	16
+#define I386_NUM_FREGS	16
+#define I386_NUM_XREGS  9
+
+#define I386_SSE_NUM_REGS	(I386_NUM_GREGS + I386_NUM_FREGS \
+				 + I386_NUM_XREGS)
+
+/* Sizes of individual register sets.  These cover the entire register
+   file, so summing up the sizes of those portions actually present
+   yields REGISTER_BYTES.  */
+#define I386_SIZEOF_GREGS	(I386_NUM_GREGS * 4)
+#define I386_SIZEOF_FREGS	(8 * 10 + 8 * 4)
+#define I386_SIZEOF_XREGS	(8 * 16 + 4)
+
+#define I386_SSE_SIZEOF_REGS	(I386_SIZEOF_GREGS + I386_SIZEOF_FREGS \
+				 + I386_SIZEOF_XREGS)
+
+/* Size of the largest register.  */
+#define I386_MAX_REGISTER_SIZE	16
+
+/* Functions exported from i386-tdep.c.  */
+extern CORE_ADDR i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name);
+
+/* Return the name of register REG.  */
+extern char const *i386_register_name (int reg);
+
+/* Initialize a basic ELF architecture variant.  */
+extern void i386_elf_init_abi (struct gdbarch_info, struct gdbarch *);
+
+/* Initialize a SVR4 architecture variant.  */
+extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
+
+/* Functions exported from i386bsd-tdep.c.  */
+
+extern CORE_ADDR i386bsd_sigcontext_addr (struct frame_info *frame);
 
 #endif /* i386-tdep.h */
diff --git a/gdb/i386aix-nat.c b/gdb/i386aix-nat.c
index 2d8d7b9..3cca5e4 100644
--- a/gdb/i386aix-nat.c
+++ b/gdb/i386aix-nat.c
@@ -1,377 +1,377 @@
-/* Intel 386 native support.
-   Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-   2000, 2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#ifdef USG
-#include <sys/types.h>
-#endif
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/user.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include <stddef.h>
-#include <sys/ptrace.h>
-
-/* Does AIX define this in <errno.h>?  */
-extern int errno;
-
-#ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#endif
-
-#include "floatformat.h"
-
-#include "target.h"
-
-static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
-
-
-/* this table must line up with REGISTER_NAMES in tm-i386v.h */
-/* symbols like 'EAX' come from <sys/reg.h> */
-static int regmap[] =
-{
-  EAX, ECX, EDX, EBX,
-  USP, EBP, ESI, EDI,
-  EIP, EFL, CS, SS,
-  DS, ES, FS, GS,
-};
-
-/* blockend is the value of u.u_ar0, and points to the
- * place where GS is stored
- */
-
-int
-i386_register_u_addr (int blockend, int regnum)
-{
-#if 0
-  /* this will be needed if fp registers are reinstated */
-  /* for now, you can look at them with 'info float'
-   * sys5 wont let you change them with ptrace anyway
-   */
-  if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM)
-    {
-      int ubase, fpstate;
-      struct user u;
-      ubase = blockend + 4 * (SS + 1) - KSTKSZ;
-      fpstate = ubase + ((char *) &u.u_fpstate - (char *) &u);
-      return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
-    }
-  else
-#endif
-    return (blockend + 4 * regmap[regnum]);
-
-}
-
-/* The code below only work on the aix ps/2 (i386-ibm-aix) -
- * mtranle@paris - Sat Apr 11 10:34:12 1992
- */
-
-struct env387
-{
-  unsigned short control;
-  unsigned short r0;
-  unsigned short status;
-  unsigned short r1;
-  unsigned short tag;
-  unsigned short r2;
-  unsigned long eip;
-  unsigned short code_seg;
-  unsigned short opcode;
-  unsigned long operand;
-  unsigned short operand_seg;
-  unsigned short r3;
-  unsigned char regs[8][10];
-};
-
-static
-print_387_status (unsigned short status, struct env387 *ep)
-{
-  int i;
-  int bothstatus;
-  int top;
-  int fpreg;
-  unsigned char *p;
-
-  bothstatus = ((status != 0) && (ep->status != 0));
-  if (status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("u: ");
-      print_387_status_word (status);
-    }
-
-  if (ep->status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("e: ");
-      print_387_status_word (ep->status);
-    }
-
-  print_387_control_word (ep->control);
-  printf_unfiltered ("last exception: ");
-  printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
-  printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
-  printf_unfiltered ("%s; ", local_hex_string (ep->eip));
-  printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
-  printf_unfiltered (":%s\n", local_hex_string (ep->operand));
-
-  top = ((ep->status >> 11) & 7);
-
-  printf_unfiltered ("regno  tag  msb              lsb  value\n");
-  for (fpreg = 7; fpreg >= 0; fpreg--)
-    {
-      double val;
-
-      printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : "  ", fpreg);
-
-      switch ((ep->tag >> ((7 - fpreg) * 2)) & 3)
-	{
-	case 0:
-	  printf_unfiltered ("valid ");
-	  break;
-	case 1:
-	  printf_unfiltered ("zero  ");
-	  break;
-	case 2:
-	  printf_unfiltered ("trap  ");
-	  break;
-	case 3:
-	  printf_unfiltered ("empty ");
-	  break;
-	}
-      for (i = 9; i >= 0; i--)
-	printf_unfiltered ("%02x", ep->regs[fpreg][i]);
-
-      i387_to_double ((char *) ep->regs[fpreg], (char *) &val);
-      printf_unfiltered ("  %#g\n", val);
-    }
-}
-
-static struct env387 core_env387;
-
-void
-i386_float_info (void)
-{
-  struct env387 fps;
-  int fpsaved = 0;
-  /* We need to reverse the order of the registers.  Apparently AIX stores
-     the highest-numbered ones first.  */
-  struct env387 fps_fixed;
-  int i;
-
-  if (! ptid_equal (inferior_ptid, null_ptid))
-    {
-      char buf[10];
-      unsigned short status;
-
-      ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
-              offsetof (struct env387, status));
-      memcpy (&status, buf, sizeof (status));
-      fpsaved = status;
-    }
-  else
-    {
-      if ((fpsaved = core_env387.status) != 0)
-	memcpy (&fps, &core_env387, sizeof (fps));
-    }
-
-  if (fpsaved == 0)
-    {
-      printf_unfiltered ("no floating point status saved\n");
-      return;
-    }
-
-  if (! ptid_equal (inferior_ptid, null_ptid))
-    {
-      int offset;
-      for (offset = 0; offset < sizeof (fps); offset += 10)
-	{
-	  char buf[10];
-	  ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf, offset);
-	  memcpy ((char *) &fps.control + offset, buf,
-		  MIN (10, sizeof (fps) - offset));
-	}
-    }
-  fps_fixed = fps;
-  for (i = 0; i < 8; ++i)
-    memcpy (fps_fixed.regs[i], fps.regs[7 - i], 10);
-  print_387_status (0, &fps_fixed);
-}
-
-/* Fetch one register.  */
-static void
-fetch_register (int regno)
-{
-  char buf[MAX_REGISTER_RAW_SIZE];
-  if (regno < FP0_REGNUM)
-    *(int *) buf = ptrace (PT_READ_GPR, PIDGET (inferior_ptid),
-			   PT_REG (regmap[regno]), 0, 0);
-  else
-    ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
-	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
-  supply_register (regno, buf);
-}
-
-void
-fetch_inferior_registers (int regno)
-{
-  if (regno < 0)
-    for (regno = 0; regno < NUM_REGS; regno++)
-      fetch_register (regno);
-  else
-    fetch_register (regno);
-}
-
-/* store one register */
-static void
-store_register (int regno)
-{
-  char buf[80];
-  errno = 0;
-  if (regno < FP0_REGNUM)
-    ptrace (PT_WRITE_GPR, PIDGET (inferior_ptid), PT_REG (regmap[regno]),
-	    *(int *) &registers[REGISTER_BYTE (regno)], 0);
-  else
-    ptrace (PT_WRITE_FPR, PIDGET (inferior_ptid),
-            &registers[REGISTER_BYTE (regno)],
-	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
-
-  if (errno != 0)
-    {
-      sprintf (buf, "writing register number %d", regno);
-      perror_with_name (buf);
-    }
-}
-
-/* Store our register values back into the inferior.
-   If REGNO is -1, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-void
-store_inferior_registers (int regno)
-{
-  if (regno < 0)
-    for (regno = 0; regno < NUM_REGS; regno++)
-      store_register (regno);
-  else
-    store_register (regno);
-}
-
-#ifndef CD_AX			/* defined in sys/i386/coredump.h */
-#define CD_AX	0
-#define CD_BX	1
-#define CD_CX	2
-#define CD_DX	3
-#define CD_SI	4
-#define CD_DI	5
-#define CD_BP	6
-#define CD_SP	7
-#define CD_FL	8
-#define CD_IP	9
-#define CD_CS	10
-#define CD_DS	11
-#define CD_ES	12
-#define CD_FS	13
-#define CD_GS	14
-#define CD_SS	15
-#endif
-
-/*
- * The order here in core_regmap[] has to be the same as in 
- * regmap[] above.
- */
-static int core_regmap[] =
-{
-  CD_AX, CD_CX, CD_DX, CD_BX,
-  CD_SP, CD_BP, CD_SI, CD_DI,
-  CD_IP, CD_FL, CD_CS, CD_SS,
-  CD_DS, CD_ES, CD_FS, CD_GS,
-};
-
-/* Provide registers to GDB from a core file.
-
-   CORE_REG_SECT points to an array of bytes, which were obtained from
-   a core file which BFD thinks might contain register contents. 
-   CORE_REG_SIZE is its size.
-
-   WHICH says which register set corelow suspects this is:
-     0 --- the general-purpose register set
-     2 --- the floating-point register set
-
-   REG_ADDR isn't used.  */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
-		      int which, CORE_ADDR reg_addr)
-{
-
-  if (which == 0)
-    {
-      /* Integer registers */
-
-#define cd_regs(n) ((int *)core_reg_sect)[n]
-#define regs(n) *((int *) &registers[REGISTER_BYTE (n)])
-
-      int i;
-      for (i = 0; i < FP0_REGNUM; i++)
-	regs (i) = cd_regs (core_regmap[i]);
-    }
-  else if (which == 2)
-    {
-      /* Floating point registers */
-
-      if (core_reg_size >= sizeof (core_env387))
-	memcpy (&core_env387, core_reg_sect, core_reg_size);
-      else
-	fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
-    }
-}
-
-
-/* Register that we are able to handle i386aix core file formats.
-   FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns i386aix_core_fns =
-{
-  bfd_target_unknown_flavour,		/* core_flavour */
-  default_check_format,			/* check_format */
-  default_core_sniffer,			/* core_sniffer */
-  fetch_core_registers,			/* core_read_registers */
-  NULL					/* next */
-};
-
-void
-_initialize_core_i386aix (void)
-{
-  add_core_fns (&i386aix_core_fns);
-}
+// OBSOLETE /* Intel 386 native support.
+// OBSOLETE    Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+// OBSOLETE    2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #ifdef USG
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE 
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE 
+// OBSOLETE #include <stddef.h>
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE 
+// OBSOLETE /* Does AIX define this in <errno.h>?  */
+// OBSOLETE extern int errno;
+// OBSOLETE 
+// OBSOLETE #ifdef HAVE_SYS_REG_H
+// OBSOLETE #include <sys/reg.h>
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE 
+// OBSOLETE #include "target.h"
+// OBSOLETE 
+// OBSOLETE static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* this table must line up with REGISTER_NAMES in tm-i386v.h */
+// OBSOLETE /* symbols like 'EAX' come from <sys/reg.h> */
+// OBSOLETE static int regmap[] =
+// OBSOLETE {
+// OBSOLETE   EAX, ECX, EDX, EBX,
+// OBSOLETE   USP, EBP, ESI, EDI,
+// OBSOLETE   EIP, EFL, CS, SS,
+// OBSOLETE   DS, ES, FS, GS,
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* blockend is the value of u.u_ar0, and points to the
+// OBSOLETE  * place where GS is stored
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE i386_register_u_addr (int blockend, int regnum)
+// OBSOLETE {
+// OBSOLETE #if 0
+// OBSOLETE   /* this will be needed if fp registers are reinstated */
+// OBSOLETE   /* for now, you can look at them with 'info float'
+// OBSOLETE    * sys5 wont let you change them with ptrace anyway
+// OBSOLETE    */
+// OBSOLETE   if (regnum >= FP0_REGNUM && regnum <= FP7_REGNUM)
+// OBSOLETE     {
+// OBSOLETE       int ubase, fpstate;
+// OBSOLETE       struct user u;
+// OBSOLETE       ubase = blockend + 4 * (SS + 1) - KSTKSZ;
+// OBSOLETE       fpstate = ubase + ((char *) &u.u_fpstate - (char *) &u);
+// OBSOLETE       return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE #endif
+// OBSOLETE     return (blockend + 4 * regmap[regnum]);
+// OBSOLETE 
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* The code below only work on the aix ps/2 (i386-ibm-aix) -
+// OBSOLETE  * mtranle@paris - Sat Apr 11 10:34:12 1992
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE struct env387
+// OBSOLETE {
+// OBSOLETE   unsigned short control;
+// OBSOLETE   unsigned short r0;
+// OBSOLETE   unsigned short status;
+// OBSOLETE   unsigned short r1;
+// OBSOLETE   unsigned short tag;
+// OBSOLETE   unsigned short r2;
+// OBSOLETE   unsigned long eip;
+// OBSOLETE   unsigned short code_seg;
+// OBSOLETE   unsigned short opcode;
+// OBSOLETE   unsigned long operand;
+// OBSOLETE   unsigned short operand_seg;
+// OBSOLETE   unsigned short r3;
+// OBSOLETE   unsigned char regs[8][10];
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static
+// OBSOLETE print_387_status (unsigned short status, struct env387 *ep)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   int bothstatus;
+// OBSOLETE   int top;
+// OBSOLETE   int fpreg;
+// OBSOLETE   unsigned char *p;
+// OBSOLETE 
+// OBSOLETE   bothstatus = ((status != 0) && (ep->status != 0));
+// OBSOLETE   if (status != 0)
+// OBSOLETE     {
+// OBSOLETE       if (bothstatus)
+// OBSOLETE 	printf_unfiltered ("u: ");
+// OBSOLETE       print_387_status_word (status);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (ep->status != 0)
+// OBSOLETE     {
+// OBSOLETE       if (bothstatus)
+// OBSOLETE 	printf_unfiltered ("e: ");
+// OBSOLETE       print_387_status_word (ep->status);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   print_387_control_word (ep->control);
+// OBSOLETE   printf_unfiltered ("last exception: ");
+// OBSOLETE   printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
+// OBSOLETE   printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
+// OBSOLETE   printf_unfiltered ("%s; ", local_hex_string (ep->eip));
+// OBSOLETE   printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
+// OBSOLETE   printf_unfiltered (":%s\n", local_hex_string (ep->operand));
+// OBSOLETE 
+// OBSOLETE   top = ((ep->status >> 11) & 7);
+// OBSOLETE 
+// OBSOLETE   printf_unfiltered ("regno  tag  msb              lsb  value\n");
+// OBSOLETE   for (fpreg = 7; fpreg >= 0; fpreg--)
+// OBSOLETE     {
+// OBSOLETE       double val;
+// OBSOLETE 
+// OBSOLETE       printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : "  ", fpreg);
+// OBSOLETE 
+// OBSOLETE       switch ((ep->tag >> ((7 - fpreg) * 2)) & 3)
+// OBSOLETE 	{
+// OBSOLETE 	case 0:
+// OBSOLETE 	  printf_unfiltered ("valid ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 1:
+// OBSOLETE 	  printf_unfiltered ("zero  ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 2:
+// OBSOLETE 	  printf_unfiltered ("trap  ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 3:
+// OBSOLETE 	  printf_unfiltered ("empty ");
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       for (i = 9; i >= 0; i--)
+// OBSOLETE 	printf_unfiltered ("%02x", ep->regs[fpreg][i]);
+// OBSOLETE 
+// OBSOLETE       i387_to_double ((char *) ep->regs[fpreg], (char *) &val);
+// OBSOLETE       printf_unfiltered ("  %#g\n", val);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct env387 core_env387;
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE i386_float_info (void)
+// OBSOLETE {
+// OBSOLETE   struct env387 fps;
+// OBSOLETE   int fpsaved = 0;
+// OBSOLETE   /* We need to reverse the order of the registers.  Apparently AIX stores
+// OBSOLETE      the highest-numbered ones first.  */
+// OBSOLETE   struct env387 fps_fixed;
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   if (! ptid_equal (inferior_ptid, null_ptid))
+// OBSOLETE     {
+// OBSOLETE       char buf[10];
+// OBSOLETE       unsigned short status;
+// OBSOLETE 
+// OBSOLETE       ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
+// OBSOLETE               offsetof (struct env387, status));
+// OBSOLETE       memcpy (&status, buf, sizeof (status));
+// OBSOLETE       fpsaved = status;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       if ((fpsaved = core_env387.status) != 0)
+// OBSOLETE 	memcpy (&fps, &core_env387, sizeof (fps));
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (fpsaved == 0)
+// OBSOLETE     {
+// OBSOLETE       printf_unfiltered ("no floating point status saved\n");
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (! ptid_equal (inferior_ptid, null_ptid))
+// OBSOLETE     {
+// OBSOLETE       int offset;
+// OBSOLETE       for (offset = 0; offset < sizeof (fps); offset += 10)
+// OBSOLETE 	{
+// OBSOLETE 	  char buf[10];
+// OBSOLETE 	  ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf, offset);
+// OBSOLETE 	  memcpy ((char *) &fps.control + offset, buf,
+// OBSOLETE 		  MIN (10, sizeof (fps) - offset));
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   fps_fixed = fps;
+// OBSOLETE   for (i = 0; i < 8; ++i)
+// OBSOLETE     memcpy (fps_fixed.regs[i], fps.regs[7 - i], 10);
+// OBSOLETE   print_387_status (0, &fps_fixed);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Fetch one register.  */
+// OBSOLETE static void
+// OBSOLETE fetch_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char buf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE   if (regno < FP0_REGNUM)
+// OBSOLETE     *(int *) buf = ptrace (PT_READ_GPR, PIDGET (inferior_ptid),
+// OBSOLETE 			   PT_REG (regmap[regno]), 0, 0);
+// OBSOLETE   else
+// OBSOLETE     ptrace (PT_READ_FPR, PIDGET (inferior_ptid), buf,
+// OBSOLETE 	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
+// OBSOLETE   supply_register (regno, buf);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   if (regno < 0)
+// OBSOLETE     for (regno = 0; regno < NUM_REGS; regno++)
+// OBSOLETE       fetch_register (regno);
+// OBSOLETE   else
+// OBSOLETE     fetch_register (regno);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* store one register */
+// OBSOLETE static void
+// OBSOLETE store_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char buf[80];
+// OBSOLETE   errno = 0;
+// OBSOLETE   if (regno < FP0_REGNUM)
+// OBSOLETE     ptrace (PT_WRITE_GPR, PIDGET (inferior_ptid), PT_REG (regmap[regno]),
+// OBSOLETE 	    *(int *) &registers[REGISTER_BYTE (regno)], 0);
+// OBSOLETE   else
+// OBSOLETE     ptrace (PT_WRITE_FPR, PIDGET (inferior_ptid),
+// OBSOLETE             &registers[REGISTER_BYTE (regno)],
+// OBSOLETE 	    (regno - FP0_REGNUM) * 10 + offsetof (struct env387, regs));
+// OBSOLETE 
+// OBSOLETE   if (errno != 0)
+// OBSOLETE     {
+// OBSOLETE       sprintf (buf, "writing register number %d", regno);
+// OBSOLETE       perror_with_name (buf);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE    If REGNO is -1, do this for all registers.
+// OBSOLETE    Otherwise, REGNO specifies which register (so we can save time).  */
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   if (regno < 0)
+// OBSOLETE     for (regno = 0; regno < NUM_REGS; regno++)
+// OBSOLETE       store_register (regno);
+// OBSOLETE   else
+// OBSOLETE     store_register (regno);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #ifndef CD_AX			/* defined in sys/i386/coredump.h */
+// OBSOLETE #define CD_AX	0
+// OBSOLETE #define CD_BX	1
+// OBSOLETE #define CD_CX	2
+// OBSOLETE #define CD_DX	3
+// OBSOLETE #define CD_SI	4
+// OBSOLETE #define CD_DI	5
+// OBSOLETE #define CD_BP	6
+// OBSOLETE #define CD_SP	7
+// OBSOLETE #define CD_FL	8
+// OBSOLETE #define CD_IP	9
+// OBSOLETE #define CD_CS	10
+// OBSOLETE #define CD_DS	11
+// OBSOLETE #define CD_ES	12
+// OBSOLETE #define CD_FS	13
+// OBSOLETE #define CD_GS	14
+// OBSOLETE #define CD_SS	15
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * The order here in core_regmap[] has to be the same as in 
+// OBSOLETE  * regmap[] above.
+// OBSOLETE  */
+// OBSOLETE static int core_regmap[] =
+// OBSOLETE {
+// OBSOLETE   CD_AX, CD_CX, CD_DX, CD_BX,
+// OBSOLETE   CD_SP, CD_BP, CD_SI, CD_DI,
+// OBSOLETE   CD_IP, CD_FL, CD_CS, CD_SS,
+// OBSOLETE   CD_DS, CD_ES, CD_FS, CD_GS,
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Provide registers to GDB from a core file.
+// OBSOLETE 
+// OBSOLETE    CORE_REG_SECT points to an array of bytes, which were obtained from
+// OBSOLETE    a core file which BFD thinks might contain register contents. 
+// OBSOLETE    CORE_REG_SIZE is its size.
+// OBSOLETE 
+// OBSOLETE    WHICH says which register set corelow suspects this is:
+// OBSOLETE      0 --- the general-purpose register set
+// OBSOLETE      2 --- the floating-point register set
+// OBSOLETE 
+// OBSOLETE    REG_ADDR isn't used.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+// OBSOLETE 		      int which, CORE_ADDR reg_addr)
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE   if (which == 0)
+// OBSOLETE     {
+// OBSOLETE       /* Integer registers */
+// OBSOLETE 
+// OBSOLETE #define cd_regs(n) ((int *)core_reg_sect)[n]
+// OBSOLETE #define regs(n) *((int *) &registers[REGISTER_BYTE (n)])
+// OBSOLETE 
+// OBSOLETE       int i;
+// OBSOLETE       for (i = 0; i < FP0_REGNUM; i++)
+// OBSOLETE 	regs (i) = cd_regs (core_regmap[i]);
+// OBSOLETE     }
+// OBSOLETE   else if (which == 2)
+// OBSOLETE     {
+// OBSOLETE       /* Floating point registers */
+// OBSOLETE 
+// OBSOLETE       if (core_reg_size >= sizeof (core_env387))
+// OBSOLETE 	memcpy (&core_env387, core_reg_sect, core_reg_size);
+// OBSOLETE       else
+// OBSOLETE 	fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Register that we are able to handle i386aix core file formats.
+// OBSOLETE    FIXME: is this really bfd_target_unknown_flavour? */
+// OBSOLETE 
+// OBSOLETE static struct core_fns i386aix_core_fns =
+// OBSOLETE {
+// OBSOLETE   bfd_target_unknown_flavour,		/* core_flavour */
+// OBSOLETE   default_check_format,			/* check_format */
+// OBSOLETE   default_core_sniffer,			/* core_sniffer */
+// OBSOLETE   fetch_core_registers,			/* core_read_registers */
+// OBSOLETE   NULL					/* next */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_core_i386aix (void)
+// OBSOLETE {
+// OBSOLETE   add_core_fns (&i386aix_core_fns);
+// OBSOLETE }
diff --git a/gdb/i386b-nat.c b/gdb/i386b-nat.c
index be8fd45..3c8a17c 100644
--- a/gdb/i386b-nat.c
+++ b/gdb/i386b-nat.c
@@ -21,57 +21,6 @@
 
 #include "defs.h"
 
-#ifdef FETCH_INFERIOR_REGISTERS
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-#include <machine/frame.h>
-#include "inferior.h"
-#include "gdbcore.h" /* for registers_fetched() */
-#include "regcache.h"
-
-void
-fetch_inferior_registers (int regno)
-{
-  struct reg inferior_registers;
-
-  ptrace (PT_GETREGS, PIDGET (inferior_ptid),
-          (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-  memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers, 4 * NUM_REGS);
-  registers_fetched ();
-}
-
-void
-store_inferior_registers (int regno)
-{
-  struct reg inferior_registers;
-
-  memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)], 4 * NUM_REGS);
-  ptrace (PT_SETREGS, PIDGET (inferior_ptid),
-          (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-}
-
-struct md_core
-{
-  struct reg intreg;
-  struct fpreg freg;
-};
-
-void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
-		      CORE_ADDR ignore)
-{
-  struct md_core *core_reg = (struct md_core *) core_reg_sect;
-
-  /* integer registers */
-  memcpy (&registers[REGISTER_BYTE (0)], &core_reg->intreg,
-	  sizeof (struct reg));
-  /* floating point registers */
-  /* XXX */
-}
-
-#else
-
 #include <machine/reg.h>
 
 /* this table must line up with REGISTER_NAMES in tm-i386.h */
@@ -121,171 +70,3 @@
   else
     return (blockend + 4 * sregmap[regnum]);
 }
-
-#endif /* !FETCH_INFERIOR_REGISTERS */
-
-#ifdef FLOAT_INFO
-#include "expression.h"
-#include "language.h"		/* for local_hex_string */
-#include "floatformat.h"
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-
-#include <a.out.h>
-
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/uio.h>
-#define curpcb Xcurpcb		/* XXX avoid leaking declaration from pcb.h */
-#include <sys/user.h>
-#undef curpcb
-#include <sys/file.h>
-#include "gdb_stat.h"
-#include <sys/ptrace.h>
-
-extern void print_387_control_word ();	/* i387-tdep.h */
-extern void print_387_status_word ();
-
-#define	fpstate		save87
-#define	U_FPSTATE(u)	u.u_pcb.pcb_savefpu
-
-struct env387
-  {
-    unsigned short control;
-    unsigned short r0;
-    unsigned short status;
-    unsigned short r1;
-    unsigned short tag;
-    unsigned short r2;
-    unsigned long eip;
-    unsigned short code_seg;
-    unsigned short opcode;
-    unsigned long operand;
-    unsigned short operand_seg;
-    unsigned short r3;
-    unsigned char regs[8][10];
-  };
-
-static void
-print_387_status (unsigned short status, struct env387 *ep)
-{
-  int i;
-  int bothstatus;
-  int top;
-  int fpreg;
-
-  bothstatus = ((status != 0) && (ep->status != 0));
-  if (status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("u: ");
-      print_387_status_word ((unsigned int) status);
-    }
-
-  if (ep->status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("e: ");
-      print_387_status_word ((unsigned int) ep->status);
-    }
-
-  print_387_control_word ((unsigned int) ep->control);
-  printf_unfiltered ("last exception: ");
-  printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
-  printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
-  printf_unfiltered ("%s; ", local_hex_string (ep->eip));
-  printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
-  printf_unfiltered (":%s\n", local_hex_string (ep->operand));
-
-  top = (ep->status >> 11) & 7;
-
-  printf_unfiltered ("regno     tag  msb              lsb  value\n");
-  for (fpreg = 7; fpreg >= 0; fpreg--)
-    {
-      double val;
-
-      printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : "  ", fpreg);
-
-      switch ((ep->tag >> (fpreg * 2)) & 3)
-	{
-	case 0:
-	  printf_unfiltered ("valid ");
-	  break;
-	case 1:
-	  printf_unfiltered ("zero  ");
-	  break;
-	case 2:
-	  printf_unfiltered ("trap  ");
-	  break;
-	case 3:
-	  printf_unfiltered ("empty ");
-	  break;
-	}
-      for (i = 9; i >= 0; i--)
-	printf_unfiltered ("%02x", ep->regs[fpreg][i]);
-
-      floatformat_to_double (&floatformat_i387_ext, (char *) ep->regs[fpreg],
-			     &val);
-      printf_unfiltered ("  %g\n", val);
-    }
-}
-
-i386_float_info (void)
-{
-  struct user u;		/* just for address computations */
-  int i;
-  /* fpstate defined in <sys/user.h> */
-  struct fpstate *fpstatep;
-  char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
-  unsigned int uaddr;
-  char fpvalid;
-  unsigned int rounded_addr;
-  unsigned int rounded_size;
-  /*extern int corechan; */
-  int skip;
-
-  uaddr = (char *) &U_FPSTATE (u) - (char *) &u;
-  if (! ptid_equal (inferior_ptid, null_ptid))
-    {
-      int *ip;
-
-      rounded_addr = uaddr & -sizeof (int);
-      rounded_size = (((uaddr + sizeof (struct fpstate)) - uaddr) +
-		      sizeof (int) - 1) / sizeof (int);
-      skip = uaddr - rounded_addr;
-
-      ip = (int *) buf;
-      for (i = 0; i < rounded_size; i++)
-	{
-	  *ip++ = ptrace (PT_READ_U, PIDGET (inferior_ptid),
-	                  (caddr_t) rounded_addr, 0);
-	  rounded_addr += sizeof (int);
-	}
-    }
-  else
-    {
-      printf ("float info: can't do a core file (yet)\n");
-      return;
-#if 0
-      if (lseek (corechan, uaddr, 0) < 0)
-	perror_with_name ("seek on core file");
-      if (myread (corechan, buf, sizeof (struct fpstate)) < 0)
-	  perror_with_name ("read from core file");
-      skip = 0;
-#endif
-    }
-
-  print_387_status (0, (struct env387 *) buf);
-}
-
-int
-kernel_u_size (void)
-{
-  return (sizeof (struct user));
-}
-
-#endif
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index ad5a301..8a3acd4 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -43,6 +43,7 @@
 #endif
 
 #include "gregset.h"
+#include "i386-tdep.h"
 
 
 /* In older BSD versions we cannot get at some of the segment
@@ -125,7 +126,7 @@
 {
   int i;
 
-  for (i = 0; i < NUM_GREGS; i++)
+  for (i = 0; i < I386_NUM_GREGS; i++)
     {
       if (CANNOT_FETCH_REGISTER (i))
 	supply_register (i, NULL);
@@ -143,7 +144,7 @@
 {
   int i;
 
-  for (i = 0; i < NUM_GREGS; i++)
+  for (i = 0; i < I386_NUM_GREGS; i++)
     if ((regno == -1 || regno == i) && ! CANNOT_STORE_REGISTER (i))
       regcache_collect (i, REG_ADDR (gregsetp, i));
 }
@@ -382,19 +383,59 @@
   return (sizeof (struct user));
 }
 
-/* See i386bsd-tdep.c.  */
-extern int i386bsd_sigcontext_pc_offset;
-
 void
 _initialize_i386bsd_nat (void)
 {
+  int sc_pc_offset;
+  int sc_sp_offset;
+
   /* To support the recognition of signal handlers, i386bsd-tdep.c
      hardcodes some constants.  Inclusion of this file means that we
      are compiling a native debugger, which means that we can use the
      system header files and sysctl(3) to get at the relevant
      information.  */
 
+#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
+  extern int i386fbsd4_sc_pc_offset;
+  extern int i386fbsd4_sc_sp_offset;
+#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
+#define SC_SP_OFFSET i386fbsd4_sc_sp_offset
+#elif defined (NetBSD) || defined (__NetBSD_Version__) || defined (OpenBSD)
+  extern int i386nbsd_sc_pc_offset;
+  extern int i386nbsd_sc_sp_offset;
+#define SC_PC_OFFSET i386nbsd_sc_pc_offset
+#define SC_SP_OFFSET i386nbsd_sc_sp_offset
+#else
+  extern int i386bsd_sc_pc_offset;
+  extern int i386bsd_sc_sp_offset;
+#define SC_PC_OFFSET i386bsd_sc_pc_offset
+#define SC_SP_OFFSET i386bsd_sc_sp_offset
+#endif
+
   /* Override the default value for the offset of the program counter
      in the sigcontext structure.  */
-  i386bsd_sigcontext_pc_offset = offsetof (struct sigcontext, sc_pc);
+  sc_pc_offset = offsetof (struct sigcontext, sc_pc);
+
+  if (SC_PC_OFFSET != sc_pc_offset)
+    {
+      warning ("\
+offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>.",
+	       sc_pc_offset, SC_PC_OFFSET);
+    }
+
+  SC_PC_OFFSET = sc_pc_offset;
+
+  /* Likewise for the stack pointer.  */
+  sc_sp_offset = offsetof (struct sigcontext, sc_sp);
+
+  if (SC_SP_OFFSET != sc_sp_offset)
+    {
+      warning ("\
+offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>.",
+	       sc_sp_offset, SC_SP_OFFSET);
+    }
+
+  SC_SP_OFFSET = sc_sp_offset;
 }
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index a01ed6b..2edf3ea 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for i386 BSD's.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,35 +19,34 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
+#include "arch-utils.h"
 #include "frame.h"
 #include "gdbcore.h"
 #include "regcache.h"
 
+#include "gdb_string.h"
+
+#include "i386-tdep.h"
+
 /* Support for signal handlers.  */
 
-/* Range in which to find the signaltramp routine, traditionally found
-   on the use stack, just below the user area.  Initialized to values
-   that work for NetBSD and FreeBSD.  */
-
-CORE_ADDR i386bsd_sigtramp_start = 0xbfbfdf20;
-CORE_ADDR i386bsd_sigtramp_end = 0xbfbfdff0;
-
 /* Return whether PC is in a BSD sigtramp routine.  */
 
-int
-i386bsd_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
 {
-  return (pc >= i386bsd_sigtramp_start && pc < i386bsd_sigtramp_end);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
 }
 
-/* Offset in the sigcontext structure of the program counter.
-   Initialized to the value from 4.4 BSD Lite.  */
-int i386bsd_sigcontext_pc_offset = 20;
-
 /* Assuming FRAME is for a BSD sigtramp routine, return the address of
-   the associated sigcontext structure.  */
+   the associated sigcontext structure.
 
-static CORE_ADDR
+   Note: This function is used for Solaris 2 too, so don't make it
+   static.  */
+
+CORE_ADDR
 i386bsd_sigcontext_addr (struct frame_info *frame)
 {
   if (frame->next)
@@ -61,24 +60,198 @@
   return read_memory_unsigned_integer (read_register (SP_REGNUM) + 8, 4);
 }
 
-/* Assuming FRAME is for a BSD sigtramp routine, return the saved
-   program counter.  */
-
-static CORE_ADDR
-i386bsd_sigtramp_saved_pc (struct frame_info *frame)
-{
-  CORE_ADDR addr;
-  addr = i386bsd_sigcontext_addr (frame);
-  return read_memory_unsigned_integer (addr + i386bsd_sigcontext_pc_offset, 4);
-}
-
-/* Return the saved program counter for FRAME.  */
+/* Return the start address of the sigtramp routine.  */
 
 CORE_ADDR
-i386bsd_frame_saved_pc (struct frame_info *frame)
+i386bsd_sigtramp_start (CORE_ADDR pc)
 {
-  if (frame->signal_handler_caller)
-    return i386bsd_sigtramp_saved_pc (frame);
+  return gdbarch_tdep (current_gdbarch)->sigtramp_start;
+}
 
-  return read_memory_unsigned_integer (frame->frame + 4, 4);
+/* Return the end address of the sigtramp routine.  */
+
+CORE_ADDR
+i386bsd_sigtramp_end (CORE_ADDR pc)
+{
+  return gdbarch_tdep (current_gdbarch)->sigtramp_end;
+}
+
+
+/* Support for shared libraries.  */
+
+/* Return non-zero if we are in a shared library trampoline code stub.  */
+
+int
+i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+  return (name && !strcmp (name, "_DYNAMIC"));
+}
+
+/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD).  */
+
+/* From <machine/signal.h>.  */
+int i386bsd_sc_pc_offset = 20;
+int i386bsd_sc_sp_offset = 8;
+
+static void
+i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  set_gdbarch_pc_in_sigtramp (gdbarch, i386bsd_pc_in_sigtramp);
+
+  /* Assume SunOS-style shared libraries.  */
+  set_gdbarch_in_solib_call_trampoline (gdbarch,
+					i386bsd_aout_in_solib_call_trampoline);
+
+  tdep->jb_pc_offset = 0;
+
+  tdep->sigtramp_start = 0xfdbfdfc0;
+  tdep->sigtramp_end = 0xfdbfe000;
+  tdep->sigcontext_addr = i386bsd_sigcontext_addr;
+  tdep->sc_pc_offset = i386bsd_sc_pc_offset;
+  tdep->sc_sp_offset = i386bsd_sc_sp_offset;
+}
+
+/* NetBSD 1.0 or later.  */
+
+CORE_ADDR i386nbsd_sigtramp_start = 0xbfbfdf20;
+CORE_ADDR i386nbsd_sigtramp_end = 0xbfbfdff0;
+
+/* From <machine/signal.h>.  */
+int i386nbsd_sc_pc_offset = 44;
+int i386nbsd_sc_sp_offset = 56;
+
+static void
+i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Obviously NetBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+
+  /* NetBSD uses -freg-struct-return by default.  */
+  tdep->struct_return = reg_struct_return;
+
+  /* NetBSD uses a different memory layout.  */
+  tdep->sigtramp_start = i386nbsd_sigtramp_start;
+  tdep->sigtramp_end = i386nbsd_sigtramp_end;
+
+  /* NetBSD has a `struct sigcontext' that's different from the
+     origional 4.3 BSD.  */
+  tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
+  tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
+}
+
+/* NetBSD ELF.  */
+static void
+i386nbsdelf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* It's still NetBSD.  */
+  i386nbsd_init_abi (info, gdbarch);
+
+  /* But ELF-based.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  /* NetBSD ELF uses SVR4-style shared libraries.  */
+  set_gdbarch_in_solib_call_trampoline (gdbarch,
+					generic_in_solib_call_trampoline);
+
+  /* NetBSD ELF uses -fpcc-struct-return by default.  */
+  tdep->struct_return = pcc_struct_return;
+
+  /* We support the SSE registers on NetBSD ELF.  */
+  tdep->num_xmm_regs = I386_NUM_XREGS - 1;
+  set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS
+			+ I386_NUM_XREGS);
+}
+
+/* FreeBSD 3.0-RELEASE or later.  */
+
+CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
+CORE_ADDR i386fbsd_sigtramp_end = 0xbfbfdff0;
+
+static void
+i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Obviously FreeBSD is BSD-based.  */
+  i386bsd_init_abi (info, gdbarch);
+
+  /* FreeBSD uses -freg-struct-return by default.  */
+  tdep->struct_return = reg_struct_return;
+
+  /* FreeBSD uses a different memory layout.  */
+  tdep->sigtramp_start = i386fbsd_sigtramp_start;
+  tdep->sigtramp_end = i386fbsd_sigtramp_end;
+}
+
+static void
+i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  /* It's almost identical to FreeBSD a.out.  */
+  i386fbsdaout_init_abi (info, gdbarch);
+
+  /* Except that it uses ELF.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  /* FreeBSD ELF uses SVR4-style shared libraries.  */
+  set_gdbarch_in_solib_call_trampoline (gdbarch,
+					generic_in_solib_call_trampoline);
+}
+
+/* FreeBSD 4.0-RELEASE or later.  */
+
+/* From <machine/signal.h>.  */
+int i386fbsd4_sc_pc_offset = 76;
+int i386fbsd4_sc_sp_offset = 88;
+
+static void
+i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Inherit stuff from older releases.  We assume that FreeBSD
+     4.0-RELEASE always uses ELF.  */
+  i386fbsd_init_abi (info, gdbarch);
+
+  /* FreeBSD 4.0 introduced a new `struct sigcontext'.  */
+  tdep->sc_pc_offset = i386fbsd4_sc_pc_offset;
+  tdep->sc_sp_offset = i386fbsd4_sc_sp_offset;
+}
+
+
+static enum gdb_osabi
+i386bsd_aout_osabi_sniffer (bfd *abfd)
+{
+  if (strcmp (bfd_get_target (abfd), "a.out-i386-netbsd") == 0)
+    return GDB_OSABI_NETBSD_AOUT;
+
+  if (strcmp (bfd_get_target (abfd), "a.out-i386-freebsd") == 0)
+    return GDB_OSABI_FREEBSD_AOUT;
+
+  return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386bsd_tdep (void);
+
+void
+_initialize_i386bsd_tdep (void)
+{
+  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
+				  i386bsd_aout_osabi_sniffer);
+
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_AOUT,
+			  i386nbsd_init_abi);
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETBSD_ELF,
+ 			  i386nbsdelf_init_abi);
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_AOUT,
+			  i386fbsdaout_init_abi);
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_FREEBSD_ELF,
+			  i386fbsd4_init_abi);
 }
diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c
index 1c19ac8..a80d0a0 100644
--- a/gdb/i386fbsd-nat.c
+++ b/gdb/i386fbsd-nat.c
@@ -1,5 +1,5 @@
 /* Native-dependent code for FreeBSD/i386.
-   Copyright 2001 Free Software Foundation, Inc.
+   Copyright 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -79,7 +79,7 @@
 {
   /* FreeBSD provides a kern.ps_strings sysctl that we can use to
      locate the sigtramp.  That way we can still recognize a sigtramp
-     if it's location is changed in a new kernel.  Of course this is
+     if its location is changed in a new kernel.  Of course this is
      still based on the assumption that the sigtramp is placed
      directly under the location where the program arguments and
      environment can be found.  */
@@ -89,13 +89,16 @@
     int ps_strings;
     size_t len;
 
+    extern CORE_ADDR i386fbsd_sigtramp_start;
+    extern CORE_ADDR i386fbsd_sigtramp_end;
+
     mib[0] = CTL_KERN;
     mib[1] = KERN_PS_STRINGS;
     len = sizeof (ps_strings);
     if (sysctl (mib, 2, &ps_strings, &len, NULL, 0) == 0)
       {
-	i386bsd_sigtramp_start = ps_strings - 128;
-	i386bsd_sigtramp_end = ps_strings;
+	i386fbsd_sigtramp_start = ps_strings - 128;
+	i386fbsd_sigtramp_end = ps_strings;
       }
   }
 #endif
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 329ef2f..3fa99a3 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -99,7 +99,7 @@
 supply_gregset (gdb_gregset_t *gregs)
 {
   int i;
-  for (i = 0; i < NUM_GREGS; i++)
+  for (i = 0; i < I386_NUM_GREGS; i++)
     supply_register (i, REG_ADDR (gregs, i));
 }
 
@@ -124,7 +124,7 @@
     error ("Can't fetch registers from thread %d: No such thread",
 	   PIDGET (inferior_ptid));
 
-  if (regno < NUM_GREGS || regno == -1)
+  if (regno < I386_NUM_GREGS || regno == -1)
     {
       thread_state_t state;
 
@@ -143,7 +143,7 @@
 
 	  proc_debug (thread, "fetching all register");
 
-	  for (i = 0; i < NUM_GREGS; i++)
+	  for (i = 0; i < I386_NUM_GREGS; i++)
 	    supply_register (i, REG_ADDR (state, i));
 	  thread->fetched_regs = ~0;
 	}
@@ -156,7 +156,7 @@
 	}
     }
 
-  if (regno >= NUM_GREGS || regno == -1)
+  if (regno >= I386_NUM_GREGS || regno == -1)
     {
       proc_debug (thread, "fetching floating-point registers");
 
@@ -211,7 +211,7 @@
     error ("Couldn't store registers into thread %d: No such thread",
 	   PIDGET (inferior_ptid));
 
-  if (regno < NUM_GREGS || regno == -1)
+  if (regno < I386_NUM_GREGS || regno == -1)
     {
       thread_state_t state;
       thread_state_data_t old_state;
@@ -238,7 +238,7 @@
 	{
 	  int check_regno;
 
-	  for (check_regno = 0; check_regno < NUM_GREGS; check_regno++)
+	  for (check_regno = 0; check_regno < I386_NUM_GREGS; check_regno++)
 	    if ((thread->fetched_regs & (1 << check_regno))
 		&& memcpy (REG_ADDR (&old_state, check_regno),
 			   REG_ADDR (state, check_regno),
@@ -265,7 +265,7 @@
 
 	  proc_debug (thread, "storing all registers");
 
-	  for (i = 0; i < NUM_GREGS; i++)
+	  for (i = 0; i < I386_NUM_GREGS; i++)
 	    if (register_valid[i])
 	      fill (state, i);
 	}
@@ -284,7 +284,7 @@
 
 #undef fill
 
-  if (regno >= NUM_GREGS || regno == -1)
+  if (regno >= I386_NUM_GREGS || regno == -1)
     {
       proc_debug (thread, "storing floating-point registers");
 
diff --git a/gdb/i386gnu-tdep.c b/gdb/i386gnu-tdep.c
new file mode 100644
index 0000000..fa56428
--- /dev/null
+++ b/gdb/i386gnu-tdep.c
@@ -0,0 +1,43 @@
+/* Target-dependent code for the GNU Hurd.
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 "defs.h"
+
+#include "i386-tdep.h"
+
+static void
+i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* GNU uses ELF.  */
+  i386_elf_init_abi (info, gdbarch);
+
+  tdep->jb_pc_offset = 20;	/* From <bits/setjmp.h>.  */
+}
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern void _initialize_i386gnu_tdep (void);
+
+void
+_initialize_i386gnu_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_HURD, i386gnu_init_abi);
+}
diff --git a/gdb/i386ly-tdep.c b/gdb/i386ly-tdep.c
index 92b544d..69c3750 100644
--- a/gdb/i386ly-tdep.c
+++ b/gdb/i386ly-tdep.c
@@ -1,5 +1,5 @@
 /* Target-dependent code for Intel 386 running LynxOS.
-   Copyright 1993, 1996, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -19,27 +19,62 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "inferior.h"
-#include "target.h"
 #include "gdbcore.h"
+#include "inferior.h"
 #include "regcache.h"
+#include "target.h"
 
-/* Return the PC of the caller from the call frame.  Assumes the subr prologue
-   has already been executed, and the frame pointer setup.  If this is the
-   outermost frame, we check to see if we are in a system call by examining the
-   previous instruction.  If so, then the return PC is actually at SP+4 because
-   system calls use a different calling sequence.  */
+#include "i386-tdep.h"
 
-CORE_ADDR
+/* Return the PC of the caller from the call frame.  Assumes the subr
+   prologue has already been executed, and the frame pointer setup.
+   If this is the outermost frame, we check to see if we are in a
+   system call by examining the previous instruction.  If so, then the
+   return PC is actually at SP+4 because system calls use a different
+   calling sequence.  */
+
+static CORE_ADDR
 i386lynx_saved_pc_after_call (struct frame_info *frame)
 {
   char opcode[7];
   static const unsigned char call_inst[] =
-  {0x9a, 0, 0, 0, 0, 8, 0};	/* lcall 0x8,0x0 */
+  { 0x9a, 0, 0, 0, 0, 8, 0 };	/* lcall 0x8,0x0 */
 
-  read_memory (frame->pc - 7, opcode, 7);
+  read_memory_nobpt (frame->pc - 7, opcode, 7);
   if (memcmp (opcode, call_inst, 7) == 0)
-    return read_memory_integer (read_register (SP_REGNUM) + 4, 4);
+    return read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
 
-  return read_memory_integer (read_register (SP_REGNUM), 4);
+  return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
+}
+
+
+/* LynxOS.  */
+static void
+i386lynx_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+  set_gdbarch_saved_pc_after_call (gdbarch, i386lynx_saved_pc_after_call);
+}
+
+
+static enum gdb_osabi
+i386lynx_coff_osabi_sniffer (bfd *abfd)
+{
+  if (strcmp (bfd_get_target (abfd), "coff-i386-lynx") == 0)
+    return GDB_OSABI_LYNXOS;
+
+  return GDB_OSABI_UNKNOWN;
+}
+
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_i386lynx_tdep (void);
+
+void
+_initialize_i386bsd_tdep (void)
+{
+  gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
+				  i386lynx_coff_osabi_sniffer);
+
+  gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_LYNXOS,
+			  i386lynx_init_abi);
 }
diff --git a/gdb/i386m3-nat.c b/gdb/i386m3-nat.c
index 8fbd1e8..8cb51d5 100644
--- a/gdb/i386m3-nat.c
+++ b/gdb/i386m3-nat.c
@@ -1,426 +1,426 @@
-/* Low level interface to I386 running mach 3.0.
-   Copyright 1992, 1993, 1994, 1996, 2000, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "inferior.h"
-#include "floatformat.h"
-#include "regcache.h"
-
-#include <stdio.h>
-
-#include <mach.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-#include <mach_error.h>
-
-/* Hmmm... Should this not be here?
- * Now for i386_float_info() target_has_execution
- */
-#include <target.h>
-
-/* This mess is duplicated in bfd/i386mach3.h
-
- * This is an ugly way to hack around the incorrect
- * definition of UPAGES in i386/machparam.h.
- *
- * The definition should specify the size reserved
- * for "struct user" in core files in PAGES,
- * but instead it gives it in 512-byte core-clicks
- * for i386 and i860.
- */
-#include <sys/param.h>
-#if UPAGES == 16
-#define UAREA_SIZE ctob(UPAGES)
-#elif UPAGES == 2
-#define UAREA_SIZE (NBPG*UPAGES)
-#else
-FIXME ! !UPAGES is neither 2 nor 16
-#endif
-
-/* @@@ Should move print_387_status() to i387-tdep.c */
-extern void print_387_control_word ();		/* i387-tdep.h */
-extern void print_387_status_word ();
-
-#define private static
-
-
-/* Find offsets to thread states at compile time.
- * If your compiler does not grok this, calculate offsets
- * offsets yourself and use them (or get a compatible compiler :-)
- */
-
-#define  REG_OFFSET(reg) (int)(&((struct i386_thread_state *)0)->reg)
-
-/* at reg_offset[i] is the offset to the i386_thread_state
- * location where the gdb registers[i] is stored.
- */
-
-static int reg_offset[] =
-{
-  REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
-  REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
-  REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
-  REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
-};
-
-#define REG_ADDRESS(state,regnum) ((char *)(state)+reg_offset[regnum])
-
-/* Fetch COUNT contiguous registers from thread STATE starting from REGNUM
- * Caller knows that the regs handled in one transaction are of same size.
- */
-#define FETCH_REGS(state, regnum, count) \
-  memcpy (&registers[REGISTER_BYTE (regnum)], \
-	  REG_ADDRESS (state, regnum), \
-	  count*REGISTER_SIZE)
-
-/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
-#define STORE_REGS(state, regnum, count) \
-  memcpy (REG_ADDRESS (state, regnum), \
-	  &registers[REGISTER_BYTE (regnum)], \
-	  count*REGISTER_SIZE)
-
-/*
- * Fetch inferiors registers for gdb.
- * REGNO specifies which (as gdb views it) register, -1 for all.
- */
-
-void
-fetch_inferior_registers (int regno)
-{
-  kern_return_t ret;
-  thread_state_data_t state;
-  unsigned int stateCnt = i386_THREAD_STATE_COUNT;
-  int index;
-
-  if (!MACH_PORT_VALID (current_thread))
-    error ("fetch inferior registers: Invalid thread");
-
-  if (must_suspend_thread)
-    setup_thread (current_thread, 1);
-
-  ret = thread_get_state (current_thread,
-			  i386_THREAD_STATE,
-			  state,
-			  &stateCnt);
-
-  if (ret != KERN_SUCCESS)
-    warning ("fetch_inferior_registers: %s ",
-	     mach_error_string (ret));
-#if 0
-  /* It may be more effective to store validate all of them,
-   * since we fetched them all anyway
-   */
-  else if (regno != -1)
-    supply_register (regno, (char *) state + reg_offset[regno]);
-#endif
-  else
-    {
-      for (index = 0; index < NUM_REGS; index++)
-	supply_register (index, (char *) state + reg_offset[index]);
-    }
-
-  if (must_suspend_thread)
-    setup_thread (current_thread, 0);
-}
-
-/* Store our register values back into the inferior.
- * If REGNO is -1, do this for all registers.
- * Otherwise, REGNO specifies which register
- *
- * On mach3 all registers are always saved in one call.
- */
-void
-store_inferior_registers (int regno)
-{
-  kern_return_t ret;
-  thread_state_data_t state;
-  unsigned int stateCnt = i386_THREAD_STATE_COUNT;
-  register int index;
-
-  if (!MACH_PORT_VALID (current_thread))
-    error ("store inferior registers: Invalid thread");
-
-  if (must_suspend_thread)
-    setup_thread (current_thread, 1);
-
-  /* Fetch the state of the current thread */
-  ret = thread_get_state (current_thread,
-			  i386_THREAD_STATE,
-			  state,
-			  &stateCnt);
-
-  if (ret != KERN_SUCCESS)
-    {
-      warning ("store_inferior_registers (get): %s",
-	       mach_error_string (ret));
-      if (must_suspend_thread)
-	setup_thread (current_thread, 0);
-      return;
-    }
-
-  /* move gdb's registers to thread's state
-
-   * Since we save all registers anyway, save the ones
-   * that gdb thinks are valid (e.g. ignore the regno
-   * parameter)
-   */
-#if 0
-  if (regno != -1)
-    STORE_REGS (state, regno, 1);
-  else
-#endif
-    {
-      for (index = 0; index < NUM_REGS; index++)
-	STORE_REGS (state, index, 1);
-    }
-
-  /* Write gdb's current view of register to the thread
-   */
-  ret = thread_set_state (current_thread,
-			  i386_THREAD_STATE,
-			  state,
-			  i386_THREAD_STATE_COUNT);
-
-  if (ret != KERN_SUCCESS)
-    warning ("store_inferior_registers (set): %s",
-	     mach_error_string (ret));
-
-  if (must_suspend_thread)
-    setup_thread (current_thread, 0);
-}
-
-
-
-/* Return the address in the core dump or inferior of register REGNO.
- * BLOCKEND should be the address of the end of the UPAGES area read
- * in memory, but it's not?
- *
- * Currently our UX server dumps the whole thread state to the
- * core file. If your UX does something else, adapt the routine
- * below to return the offset to the given register.
- * 
- * Called by core-aout.c(fetch_core_registers)
- */
-
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
-{
-  CORE_ADDR addr;
-
-  if (regno < 0 || regno >= NUM_REGS)
-    error ("Invalid register number %d.", regno);
-
-  /* UAREA_SIZE == 8 kB in i386 */
-  addr = (unsigned int) REG_ADDRESS (UAREA_SIZE - sizeof (struct i386_thread_state), regno);
-
-  return addr;
-}
-
-/* jtv@hut.fi: I copied and modified this 387 code from
- * gdb/i386-xdep.c. Modifications for Mach 3.0.
- *
- * i387 status dumper. See also i387-tdep.c
- */
-struct env387
-{
-  unsigned short control;
-  unsigned short r0;
-  unsigned short status;
-  unsigned short r1;
-  unsigned short tag;
-  unsigned short r2;
-  unsigned long eip;
-  unsigned short code_seg;
-  unsigned short opcode;
-  unsigned long operand;
-  unsigned short operand_seg;
-  unsigned short r3;
-  unsigned char regs[8][10];
-};
-/* This routine is machine independent?
- * Should move it to i387-tdep.c but you need to export struct env387
- */
-private
-print_387_status (unsigned short status, struct env387 *ep)
-{
-  int i;
-  int bothstatus;
-  int top;
-  int fpreg;
-  unsigned char *p;
-
-  bothstatus = ((status != 0) && (ep->status != 0));
-  if (status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("u: ");
-      print_387_status_word (status);
-    }
-
-  if (ep->status != 0)
-    {
-      if (bothstatus)
-	printf_unfiltered ("e: ");
-      print_387_status_word (ep->status);
-    }
-
-  print_387_control_word (ep->control);
-  printf_unfiltered ("last exception: ");
-  printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
-  printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
-  printf_unfiltered ("%s; ", local_hex_string (ep->eip));
-  printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
-  printf_unfiltered (":%s\n", local_hex_string (ep->operand));
-
-  top = (ep->status >> 11) & 7;
-
-  printf_unfiltered ("regno  tag  msb              lsb  value\n");
-  for (fpreg = 7; fpreg >= 0; fpreg--)
-    {
-      double val;
-
-      printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : "  ", fpreg);
-
-      switch ((ep->tag >> (fpreg * 2)) & 3)
-	{
-	case 0:
-	  printf_unfiltered ("valid ");
-	  break;
-	case 1:
-	  printf_unfiltered ("zero  ");
-	  break;
-	case 2:
-	  printf_unfiltered ("trap  ");
-	  break;
-	case 3:
-	  printf_unfiltered ("empty ");
-	  break;
-	}
-      for (i = 9; i >= 0; i--)
-	printf_unfiltered ("%02x", ep->regs[fpreg][i]);
-
-      floatformat_to_double (&floatformat_i387_ext, (char *) ep->regs[fpreg],
-			     &val);
-      printf_unfiltered ("  %g\n", val);
-    }
-  if (ep->r0)
-    printf_unfiltered ("warning: reserved0 is %s\n", local_hex_string (ep->r0));
-  if (ep->r1)
-    printf_unfiltered ("warning: reserved1 is %s\n", local_hex_string (ep->r1));
-  if (ep->r2)
-    printf_unfiltered ("warning: reserved2 is %s\n", local_hex_string (ep->r2));
-  if (ep->r3)
-    printf_unfiltered ("warning: reserved3 is %s\n", local_hex_string (ep->r3));
-}
-
-/*
- * values that go into fp_kind (from <i386/fpreg.h>)
- */
-#define FP_NO   0		/* no fp chip, no emulator (no fp support)      */
-#define FP_SW   1		/* no fp chip, using software emulator          */
-#define FP_HW   2		/* chip present bit                             */
-#define FP_287  2		/* 80287 chip present                           */
-#define FP_387  3		/* 80387 chip present                           */
-
-typedef struct fpstate
-{
-#if 1
-  unsigned char state[FP_STATE_BYTES];	/* "hardware" state */
-#else
-  struct env387 state;		/* Actually this */
-#endif
-  int status;			/* Duplicate status */
-}
- *fpstate_t;
-
-/* Mach 3 specific routines.
- */
-private boolean_t
-get_i387_state (struct fpstate *fstate)
-{
-  kern_return_t ret;
-  thread_state_data_t state;
-  unsigned int fsCnt = i386_FLOAT_STATE_COUNT;
-  struct i386_float_state *fsp;
-
-  ret = thread_get_state (current_thread,
-			  i386_FLOAT_STATE,
-			  state,
-			  &fsCnt);
-
-  if (ret != KERN_SUCCESS)
-    {
-      warning ("Can not get live floating point state: %s",
-	       mach_error_string (ret));
-      return FALSE;
-    }
-
-  fsp = (struct i386_float_state *) state;
-  /* The 387 chip (also 486 counts) or a software emulator? */
-  if (!fsp->initialized || (fsp->fpkind != FP_387 && fsp->fpkind != FP_SW))
-    return FALSE;
-
-  /* Clear the target then copy thread's float state there.
-     Make a copy of the status word, for some reason?
-   */
-  memset (fstate, 0, sizeof (struct fpstate));
-
-  fstate->status = fsp->exc_status;
-
-  memcpy (fstate->state, (char *) &fsp->hw_state, FP_STATE_BYTES);
-
-  return TRUE;
-}
-
-private boolean_t
-get_i387_core_state (struct fpstate *fstate)
-{
-  /* Not implemented yet. Core files do not contain float state. */
-  return FALSE;
-}
-
-/*
- * This is called by "info float" command
- */
-void
-i386_mach3_float_info (void)
-{
-  char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
-  boolean_t valid = FALSE;
-  fpstate_t fps;
-
-  if (target_has_execution)
-    valid = get_i387_state (buf);
-#if 0
-  else if (WE HAVE CORE FILE)	/* @@@@ Core files not supported */
-    valid = get_i387_core_state (buf);
-#endif
-
-  if (!valid)
-    {
-      warning ("no floating point status saved");
-      return;
-    }
-
-  fps = (fpstate_t) buf;
-
-  print_387_status (fps->status, (struct env387 *) fps->state);
-}
+// OBSOLETE /* Low level interface to I386 running mach 3.0.
+// OBSOLETE    Copyright 1992, 1993, 1994, 1996, 2000, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #include <stdio.h>
+// OBSOLETE 
+// OBSOLETE #include <mach.h>
+// OBSOLETE #include <mach/message.h>
+// OBSOLETE #include <mach/exception.h>
+// OBSOLETE #include <mach_error.h>
+// OBSOLETE 
+// OBSOLETE /* Hmmm... Should this not be here?
+// OBSOLETE  * Now for i386_float_info() target_has_execution
+// OBSOLETE  */
+// OBSOLETE #include <target.h>
+// OBSOLETE 
+// OBSOLETE /* This mess is duplicated in bfd/i386mach3.h
+// OBSOLETE 
+// OBSOLETE  * This is an ugly way to hack around the incorrect
+// OBSOLETE  * definition of UPAGES in i386/machparam.h.
+// OBSOLETE  *
+// OBSOLETE  * The definition should specify the size reserved
+// OBSOLETE  * for "struct user" in core files in PAGES,
+// OBSOLETE  * but instead it gives it in 512-byte core-clicks
+// OBSOLETE  * for i386 and i860.
+// OBSOLETE  */
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #if UPAGES == 16
+// OBSOLETE #define UAREA_SIZE ctob(UPAGES)
+// OBSOLETE #elif UPAGES == 2
+// OBSOLETE #define UAREA_SIZE (NBPG*UPAGES)
+// OBSOLETE #else
+// OBSOLETE FIXME ! !UPAGES is neither 2 nor 16
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* @@@ Should move print_387_status() to i387-tdep.c */
+// OBSOLETE extern void print_387_control_word ();		/* i387-tdep.h */
+// OBSOLETE extern void print_387_status_word ();
+// OBSOLETE 
+// OBSOLETE #define private static
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Find offsets to thread states at compile time.
+// OBSOLETE  * If your compiler does not grok this, calculate offsets
+// OBSOLETE  * offsets yourself and use them (or get a compatible compiler :-)
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE #define  REG_OFFSET(reg) (int)(&((struct i386_thread_state *)0)->reg)
+// OBSOLETE 
+// OBSOLETE /* at reg_offset[i] is the offset to the i386_thread_state
+// OBSOLETE  * location where the gdb registers[i] is stored.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static int reg_offset[] =
+// OBSOLETE {
+// OBSOLETE   REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
+// OBSOLETE   REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
+// OBSOLETE   REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
+// OBSOLETE   REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE #define REG_ADDRESS(state,regnum) ((char *)(state)+reg_offset[regnum])
+// OBSOLETE 
+// OBSOLETE /* Fetch COUNT contiguous registers from thread STATE starting from REGNUM
+// OBSOLETE  * Caller knows that the regs handled in one transaction are of same size.
+// OBSOLETE  */
+// OBSOLETE #define FETCH_REGS(state, regnum, count) \
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (regnum)], \
+// OBSOLETE 	  REG_ADDRESS (state, regnum), \
+// OBSOLETE 	  count*REGISTER_SIZE)
+// OBSOLETE 
+// OBSOLETE /* Store COUNT contiguous registers to thread STATE starting from REGNUM */
+// OBSOLETE #define STORE_REGS(state, regnum, count) \
+// OBSOLETE   memcpy (REG_ADDRESS (state, regnum), \
+// OBSOLETE 	  &registers[REGISTER_BYTE (regnum)], \
+// OBSOLETE 	  count*REGISTER_SIZE)
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Fetch inferiors registers for gdb.
+// OBSOLETE  * REGNO specifies which (as gdb views it) register, -1 for all.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   kern_return_t ret;
+// OBSOLETE   thread_state_data_t state;
+// OBSOLETE   unsigned int stateCnt = i386_THREAD_STATE_COUNT;
+// OBSOLETE   int index;
+// OBSOLETE 
+// OBSOLETE   if (!MACH_PORT_VALID (current_thread))
+// OBSOLETE     error ("fetch inferior registers: Invalid thread");
+// OBSOLETE 
+// OBSOLETE   if (must_suspend_thread)
+// OBSOLETE     setup_thread (current_thread, 1);
+// OBSOLETE 
+// OBSOLETE   ret = thread_get_state (current_thread,
+// OBSOLETE 			  i386_THREAD_STATE,
+// OBSOLETE 			  state,
+// OBSOLETE 			  &stateCnt);
+// OBSOLETE 
+// OBSOLETE   if (ret != KERN_SUCCESS)
+// OBSOLETE     warning ("fetch_inferior_registers: %s ",
+// OBSOLETE 	     mach_error_string (ret));
+// OBSOLETE #if 0
+// OBSOLETE   /* It may be more effective to store validate all of them,
+// OBSOLETE    * since we fetched them all anyway
+// OBSOLETE    */
+// OBSOLETE   else if (regno != -1)
+// OBSOLETE     supply_register (regno, (char *) state + reg_offset[regno]);
+// OBSOLETE #endif
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       for (index = 0; index < NUM_REGS; index++)
+// OBSOLETE 	supply_register (index, (char *) state + reg_offset[index]);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (must_suspend_thread)
+// OBSOLETE     setup_thread (current_thread, 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE  * If REGNO is -1, do this for all registers.
+// OBSOLETE  * Otherwise, REGNO specifies which register
+// OBSOLETE  *
+// OBSOLETE  * On mach3 all registers are always saved in one call.
+// OBSOLETE  */
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   kern_return_t ret;
+// OBSOLETE   thread_state_data_t state;
+// OBSOLETE   unsigned int stateCnt = i386_THREAD_STATE_COUNT;
+// OBSOLETE   register int index;
+// OBSOLETE 
+// OBSOLETE   if (!MACH_PORT_VALID (current_thread))
+// OBSOLETE     error ("store inferior registers: Invalid thread");
+// OBSOLETE 
+// OBSOLETE   if (must_suspend_thread)
+// OBSOLETE     setup_thread (current_thread, 1);
+// OBSOLETE 
+// OBSOLETE   /* Fetch the state of the current thread */
+// OBSOLETE   ret = thread_get_state (current_thread,
+// OBSOLETE 			  i386_THREAD_STATE,
+// OBSOLETE 			  state,
+// OBSOLETE 			  &stateCnt);
+// OBSOLETE 
+// OBSOLETE   if (ret != KERN_SUCCESS)
+// OBSOLETE     {
+// OBSOLETE       warning ("store_inferior_registers (get): %s",
+// OBSOLETE 	       mach_error_string (ret));
+// OBSOLETE       if (must_suspend_thread)
+// OBSOLETE 	setup_thread (current_thread, 0);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* move gdb's registers to thread's state
+// OBSOLETE 
+// OBSOLETE    * Since we save all registers anyway, save the ones
+// OBSOLETE    * that gdb thinks are valid (e.g. ignore the regno
+// OBSOLETE    * parameter)
+// OBSOLETE    */
+// OBSOLETE #if 0
+// OBSOLETE   if (regno != -1)
+// OBSOLETE     STORE_REGS (state, regno, 1);
+// OBSOLETE   else
+// OBSOLETE #endif
+// OBSOLETE     {
+// OBSOLETE       for (index = 0; index < NUM_REGS; index++)
+// OBSOLETE 	STORE_REGS (state, index, 1);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Write gdb's current view of register to the thread
+// OBSOLETE    */
+// OBSOLETE   ret = thread_set_state (current_thread,
+// OBSOLETE 			  i386_THREAD_STATE,
+// OBSOLETE 			  state,
+// OBSOLETE 			  i386_THREAD_STATE_COUNT);
+// OBSOLETE 
+// OBSOLETE   if (ret != KERN_SUCCESS)
+// OBSOLETE     warning ("store_inferior_registers (set): %s",
+// OBSOLETE 	     mach_error_string (ret));
+// OBSOLETE 
+// OBSOLETE   if (must_suspend_thread)
+// OBSOLETE     setup_thread (current_thread, 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Return the address in the core dump or inferior of register REGNO.
+// OBSOLETE  * BLOCKEND should be the address of the end of the UPAGES area read
+// OBSOLETE  * in memory, but it's not?
+// OBSOLETE  *
+// OBSOLETE  * Currently our UX server dumps the whole thread state to the
+// OBSOLETE  * core file. If your UX does something else, adapt the routine
+// OBSOLETE  * below to return the offset to the given register.
+// OBSOLETE  * 
+// OBSOLETE  * Called by core-aout.c(fetch_core_registers)
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE register_addr (int regno, CORE_ADDR blockend)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR addr;
+// OBSOLETE 
+// OBSOLETE   if (regno < 0 || regno >= NUM_REGS)
+// OBSOLETE     error ("Invalid register number %d.", regno);
+// OBSOLETE 
+// OBSOLETE   /* UAREA_SIZE == 8 kB in i386 */
+// OBSOLETE   addr = (unsigned int) REG_ADDRESS (UAREA_SIZE - sizeof (struct i386_thread_state), regno);
+// OBSOLETE 
+// OBSOLETE   return addr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* jtv@hut.fi: I copied and modified this 387 code from
+// OBSOLETE  * gdb/i386-xdep.c. Modifications for Mach 3.0.
+// OBSOLETE  *
+// OBSOLETE  * i387 status dumper. See also i387-tdep.c
+// OBSOLETE  */
+// OBSOLETE struct env387
+// OBSOLETE {
+// OBSOLETE   unsigned short control;
+// OBSOLETE   unsigned short r0;
+// OBSOLETE   unsigned short status;
+// OBSOLETE   unsigned short r1;
+// OBSOLETE   unsigned short tag;
+// OBSOLETE   unsigned short r2;
+// OBSOLETE   unsigned long eip;
+// OBSOLETE   unsigned short code_seg;
+// OBSOLETE   unsigned short opcode;
+// OBSOLETE   unsigned long operand;
+// OBSOLETE   unsigned short operand_seg;
+// OBSOLETE   unsigned short r3;
+// OBSOLETE   unsigned char regs[8][10];
+// OBSOLETE };
+// OBSOLETE /* This routine is machine independent?
+// OBSOLETE  * Should move it to i387-tdep.c but you need to export struct env387
+// OBSOLETE  */
+// OBSOLETE private
+// OBSOLETE print_387_status (unsigned short status, struct env387 *ep)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   int bothstatus;
+// OBSOLETE   int top;
+// OBSOLETE   int fpreg;
+// OBSOLETE   unsigned char *p;
+// OBSOLETE 
+// OBSOLETE   bothstatus = ((status != 0) && (ep->status != 0));
+// OBSOLETE   if (status != 0)
+// OBSOLETE     {
+// OBSOLETE       if (bothstatus)
+// OBSOLETE 	printf_unfiltered ("u: ");
+// OBSOLETE       print_387_status_word (status);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (ep->status != 0)
+// OBSOLETE     {
+// OBSOLETE       if (bothstatus)
+// OBSOLETE 	printf_unfiltered ("e: ");
+// OBSOLETE       print_387_status_word (ep->status);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   print_387_control_word (ep->control);
+// OBSOLETE   printf_unfiltered ("last exception: ");
+// OBSOLETE   printf_unfiltered ("opcode %s; ", local_hex_string (ep->opcode));
+// OBSOLETE   printf_unfiltered ("pc %s:", local_hex_string (ep->code_seg));
+// OBSOLETE   printf_unfiltered ("%s; ", local_hex_string (ep->eip));
+// OBSOLETE   printf_unfiltered ("operand %s", local_hex_string (ep->operand_seg));
+// OBSOLETE   printf_unfiltered (":%s\n", local_hex_string (ep->operand));
+// OBSOLETE 
+// OBSOLETE   top = (ep->status >> 11) & 7;
+// OBSOLETE 
+// OBSOLETE   printf_unfiltered ("regno  tag  msb              lsb  value\n");
+// OBSOLETE   for (fpreg = 7; fpreg >= 0; fpreg--)
+// OBSOLETE     {
+// OBSOLETE       double val;
+// OBSOLETE 
+// OBSOLETE       printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : "  ", fpreg);
+// OBSOLETE 
+// OBSOLETE       switch ((ep->tag >> (fpreg * 2)) & 3)
+// OBSOLETE 	{
+// OBSOLETE 	case 0:
+// OBSOLETE 	  printf_unfiltered ("valid ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 1:
+// OBSOLETE 	  printf_unfiltered ("zero  ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 2:
+// OBSOLETE 	  printf_unfiltered ("trap  ");
+// OBSOLETE 	  break;
+// OBSOLETE 	case 3:
+// OBSOLETE 	  printf_unfiltered ("empty ");
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       for (i = 9; i >= 0; i--)
+// OBSOLETE 	printf_unfiltered ("%02x", ep->regs[fpreg][i]);
+// OBSOLETE 
+// OBSOLETE       floatformat_to_double (&floatformat_i387_ext, (char *) ep->regs[fpreg],
+// OBSOLETE 			     &val);
+// OBSOLETE       printf_unfiltered ("  %g\n", val);
+// OBSOLETE     }
+// OBSOLETE   if (ep->r0)
+// OBSOLETE     printf_unfiltered ("warning: reserved0 is %s\n", local_hex_string (ep->r0));
+// OBSOLETE   if (ep->r1)
+// OBSOLETE     printf_unfiltered ("warning: reserved1 is %s\n", local_hex_string (ep->r1));
+// OBSOLETE   if (ep->r2)
+// OBSOLETE     printf_unfiltered ("warning: reserved2 is %s\n", local_hex_string (ep->r2));
+// OBSOLETE   if (ep->r3)
+// OBSOLETE     printf_unfiltered ("warning: reserved3 is %s\n", local_hex_string (ep->r3));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * values that go into fp_kind (from <i386/fpreg.h>)
+// OBSOLETE  */
+// OBSOLETE #define FP_NO   0		/* no fp chip, no emulator (no fp support)      */
+// OBSOLETE #define FP_SW   1		/* no fp chip, using software emulator          */
+// OBSOLETE #define FP_HW   2		/* chip present bit                             */
+// OBSOLETE #define FP_287  2		/* 80287 chip present                           */
+// OBSOLETE #define FP_387  3		/* 80387 chip present                           */
+// OBSOLETE 
+// OBSOLETE typedef struct fpstate
+// OBSOLETE {
+// OBSOLETE #if 1
+// OBSOLETE   unsigned char state[FP_STATE_BYTES];	/* "hardware" state */
+// OBSOLETE #else
+// OBSOLETE   struct env387 state;		/* Actually this */
+// OBSOLETE #endif
+// OBSOLETE   int status;			/* Duplicate status */
+// OBSOLETE }
+// OBSOLETE  *fpstate_t;
+// OBSOLETE 
+// OBSOLETE /* Mach 3 specific routines.
+// OBSOLETE  */
+// OBSOLETE private boolean_t
+// OBSOLETE get_i387_state (struct fpstate *fstate)
+// OBSOLETE {
+// OBSOLETE   kern_return_t ret;
+// OBSOLETE   thread_state_data_t state;
+// OBSOLETE   unsigned int fsCnt = i386_FLOAT_STATE_COUNT;
+// OBSOLETE   struct i386_float_state *fsp;
+// OBSOLETE 
+// OBSOLETE   ret = thread_get_state (current_thread,
+// OBSOLETE 			  i386_FLOAT_STATE,
+// OBSOLETE 			  state,
+// OBSOLETE 			  &fsCnt);
+// OBSOLETE 
+// OBSOLETE   if (ret != KERN_SUCCESS)
+// OBSOLETE     {
+// OBSOLETE       warning ("Can not get live floating point state: %s",
+// OBSOLETE 	       mach_error_string (ret));
+// OBSOLETE       return FALSE;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   fsp = (struct i386_float_state *) state;
+// OBSOLETE   /* The 387 chip (also 486 counts) or a software emulator? */
+// OBSOLETE   if (!fsp->initialized || (fsp->fpkind != FP_387 && fsp->fpkind != FP_SW))
+// OBSOLETE     return FALSE;
+// OBSOLETE 
+// OBSOLETE   /* Clear the target then copy thread's float state there.
+// OBSOLETE      Make a copy of the status word, for some reason?
+// OBSOLETE    */
+// OBSOLETE   memset (fstate, 0, sizeof (struct fpstate));
+// OBSOLETE 
+// OBSOLETE   fstate->status = fsp->exc_status;
+// OBSOLETE 
+// OBSOLETE   memcpy (fstate->state, (char *) &fsp->hw_state, FP_STATE_BYTES);
+// OBSOLETE 
+// OBSOLETE   return TRUE;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE private boolean_t
+// OBSOLETE get_i387_core_state (struct fpstate *fstate)
+// OBSOLETE {
+// OBSOLETE   /* Not implemented yet. Core files do not contain float state. */
+// OBSOLETE   return FALSE;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * This is called by "info float" command
+// OBSOLETE  */
+// OBSOLETE void
+// OBSOLETE i386_mach3_float_info (void)
+// OBSOLETE {
+// OBSOLETE   char buf[sizeof (struct fpstate) + 2 * sizeof (int)];
+// OBSOLETE   boolean_t valid = FALSE;
+// OBSOLETE   fpstate_t fps;
+// OBSOLETE 
+// OBSOLETE   if (target_has_execution)
+// OBSOLETE     valid = get_i387_state (buf);
+// OBSOLETE #if 0
+// OBSOLETE   else if (WE HAVE CORE FILE)	/* @@@@ Core files not supported */
+// OBSOLETE     valid = get_i387_core_state (buf);
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   if (!valid)
+// OBSOLETE     {
+// OBSOLETE       warning ("no floating point status saved");
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   fps = (fpstate_t) buf;
+// OBSOLETE 
+// OBSOLETE   print_387_status (fps->status, (struct env387 *) fps->state);
+// OBSOLETE }
diff --git a/gdb/i386mach-nat.c b/gdb/i386mach-nat.c
index 6d4980b..ee696c4 100644
--- a/gdb/i386mach-nat.c
+++ b/gdb/i386mach-nat.c
@@ -1,172 +1,172 @@
-/* Native dependent code for Mach 386's for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
-   2001 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/user.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#include <sys/file.h>
-#include "gdb_stat.h"
-#include <sys/core.h>
-
-static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
-
-void
-fetch_inferior_registers (int regno)
-{
-  struct regs inferior_registers;
-  struct fp_state inferior_fp_registers;
-
-  registers_fetched ();
-
-  ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
-	  (PTRACE_ARG3_TYPE) & inferior_registers);
-  ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
-	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-
-  memcpy (registers, &inferior_registers, sizeof inferior_registers);
-
-  memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
-	  inferior_fp_registers.f_st,
-	  sizeof inferior_fp_registers.f_st);
-  memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
-	  &inferior_fp_registers.f_ctrl,
-	  sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
-}
-
-/* Store our register values back into the inferior.
-   If REGNO is -1, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-
-void
-store_inferior_registers (int regno)
-{
-  struct regs inferior_registers;
-  struct fp_state inferior_fp_registers;
-
-  memcpy (&inferior_registers, registers, 20 * 4);
-
-  memcpy (inferior_fp_registers.f_st, &registers[REGISTER_BYTE (FP0_REGNUM)],
-	  sizeof inferior_fp_registers.f_st);
-  memcpy (&inferior_fp_registers.f_ctrl,
-	  &registers[REGISTER_BYTE (FPC_REGNUM)],
-	  sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
-
-#ifdef PTRACE_FP_BUG
-  if (regno == FP_REGNUM || regno == -1)
-    /* Storing the frame pointer requires a gross hack, in which an
-       instruction that moves eax into ebp gets single-stepped.  */
-    {
-      int stack = inferior_registers.r_reg[SP_REGNUM];
-      int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid),
-			  (PTRACE_ARG3_TYPE) stack);
-      int reg = inferior_registers.r_reg[EAX];
-      inferior_registers.r_reg[EAX] =
-	inferior_registers.r_reg[FP_REGNUM];
-      ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) & inferior_registers);
-      ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, 0xc589);
-      ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, 0);
-      wait (0);
-      ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
-              (PTRACE_ARG3_TYPE) stack, stuff);
-      inferior_registers.r_reg[EAX] = reg;
-    }
-#endif
-  ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
-	  (PTRACE_ARG3_TYPE) & inferior_registers);
-  ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
-	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-}
-
-
-
-/* Provide registers to GDB from a core file.
-
-   CORE_REG_SECT points to an array of bytes, which were obtained from
-   a core file which BFD thinks might contain register contents. 
-   CORE_REG_SIZE is its size.
-
-   WHICH says which register set corelow suspects this is:
-     0 --- the general-purpose register set
-     2 --- the floating-point register set
-
-   REG_ADDR isn't used.  */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
-		      int which, CORE_ADDR reg_addr)
-{
-  int val;
-
-  switch (which)
-    {
-    case 0:
-    case 1:
-      memcpy (registers, core_reg_sect, core_reg_size);
-      break;
-
-    case 2:
-      memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
-	      core_reg_sect,
-	      core_reg_size);	/* FIXME, probably bogus */
-#ifdef FPC_REGNUM
-      memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
-	      &corestr.c_fpu.f_fpstatus.f_ctrl,
-	      sizeof corestr.c_fpu.f_fpstatus -
-	      sizeof corestr.c_fpu.f_fpstatus.f_st);
-#endif
-      break;
-    }
-}
-
-
-/* Register that we are able to handle i386mach core file formats.
-   FIXME: is this really bfd_target_unknown_flavour? */
-
-static struct core_fns i386mach_core_fns =
-{
-  bfd_target_unknown_flavour,		/* core_flavour */
-  default_check_format,			/* check_format */
-  default_core_sniffer,			/* core_sniffer */
-  fetch_core_registers,			/* core_read_registers */
-  NULL					/* next */
-};
-
-void
-_initialize_core_i386mach (void)
-{
-  add_core_fns (&i386mach_core_fns);
-}
+// OBSOLETE /* Native dependent code for Mach 386's for GDB, the GNU debugger.
+// OBSOLETE    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
+// OBSOLETE    2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE 
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE #include <machine/reg.h>
+// OBSOLETE 
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE #include <sys/core.h>
+// OBSOLETE 
+// OBSOLETE static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   struct regs inferior_registers;
+// OBSOLETE   struct fp_state inferior_fp_registers;
+// OBSOLETE 
+// OBSOLETE   registers_fetched ();
+// OBSOLETE 
+// OBSOLETE   ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
+// OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_registers);
+// OBSOLETE   ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
+// OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
+// OBSOLETE 
+// OBSOLETE   memcpy (registers, &inferior_registers, sizeof inferior_registers);
+// OBSOLETE 
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	  inferior_fp_registers.f_st,
+// OBSOLETE 	  sizeof inferior_fp_registers.f_st);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+// OBSOLETE 	  &inferior_fp_registers.f_ctrl,
+// OBSOLETE 	  sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE    If REGNO is -1, do this for all registers.
+// OBSOLETE    Otherwise, REGNO specifies which register (so we can save time).  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   struct regs inferior_registers;
+// OBSOLETE   struct fp_state inferior_fp_registers;
+// OBSOLETE 
+// OBSOLETE   memcpy (&inferior_registers, registers, 20 * 4);
+// OBSOLETE 
+// OBSOLETE   memcpy (inferior_fp_registers.f_st, &registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	  sizeof inferior_fp_registers.f_st);
+// OBSOLETE   memcpy (&inferior_fp_registers.f_ctrl,
+// OBSOLETE 	  &registers[REGISTER_BYTE (FPC_REGNUM)],
+// OBSOLETE 	  sizeof inferior_fp_registers - sizeof inferior_fp_registers.f_st);
+// OBSOLETE 
+// OBSOLETE #ifdef PTRACE_FP_BUG
+// OBSOLETE   if (regno == FP_REGNUM || regno == -1)
+// OBSOLETE     /* Storing the frame pointer requires a gross hack, in which an
+// OBSOLETE        instruction that moves eax into ebp gets single-stepped.  */
+// OBSOLETE     {
+// OBSOLETE       int stack = inferior_registers.r_reg[SP_REGNUM];
+// OBSOLETE       int stuff = ptrace (PTRACE_PEEKDATA, PIDGET (inferior_ptid),
+// OBSOLETE 			  (PTRACE_ARG3_TYPE) stack);
+// OBSOLETE       int reg = inferior_registers.r_reg[EAX];
+// OBSOLETE       inferior_registers.r_reg[EAX] =
+// OBSOLETE 	inferior_registers.r_reg[FP_REGNUM];
+// OBSOLETE       ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) & inferior_registers);
+// OBSOLETE       ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
+// OBSOLETE               (PTRACE_ARG3_TYPE) stack, 0xc589);
+// OBSOLETE       ptrace (PTRACE_SINGLESTEP, PIDGET (inferior_ptid),
+// OBSOLETE               (PTRACE_ARG3_TYPE) stack, 0);
+// OBSOLETE       wait (0);
+// OBSOLETE       ptrace (PTRACE_POKEDATA, PIDGET (inferior_ptid),
+// OBSOLETE               (PTRACE_ARG3_TYPE) stack, stuff);
+// OBSOLETE       inferior_registers.r_reg[EAX] = reg;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE   ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
+// OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_registers);
+// OBSOLETE   ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
+// OBSOLETE 	  (PTRACE_ARG3_TYPE) & inferior_fp_registers);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Provide registers to GDB from a core file.
+// OBSOLETE 
+// OBSOLETE    CORE_REG_SECT points to an array of bytes, which were obtained from
+// OBSOLETE    a core file which BFD thinks might contain register contents. 
+// OBSOLETE    CORE_REG_SIZE is its size.
+// OBSOLETE 
+// OBSOLETE    WHICH says which register set corelow suspects this is:
+// OBSOLETE      0 --- the general-purpose register set
+// OBSOLETE      2 --- the floating-point register set
+// OBSOLETE 
+// OBSOLETE    REG_ADDR isn't used.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+// OBSOLETE 		      int which, CORE_ADDR reg_addr)
+// OBSOLETE {
+// OBSOLETE   int val;
+// OBSOLETE 
+// OBSOLETE   switch (which)
+// OBSOLETE     {
+// OBSOLETE     case 0:
+// OBSOLETE     case 1:
+// OBSOLETE       memcpy (registers, core_reg_sect, core_reg_size);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case 2:
+// OBSOLETE       memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	      core_reg_sect,
+// OBSOLETE 	      core_reg_size);	/* FIXME, probably bogus */
+// OBSOLETE #ifdef FPC_REGNUM
+// OBSOLETE       memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+// OBSOLETE 	      &corestr.c_fpu.f_fpstatus.f_ctrl,
+// OBSOLETE 	      sizeof corestr.c_fpu.f_fpstatus -
+// OBSOLETE 	      sizeof corestr.c_fpu.f_fpstatus.f_st);
+// OBSOLETE #endif
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Register that we are able to handle i386mach core file formats.
+// OBSOLETE    FIXME: is this really bfd_target_unknown_flavour? */
+// OBSOLETE 
+// OBSOLETE static struct core_fns i386mach_core_fns =
+// OBSOLETE {
+// OBSOLETE   bfd_target_unknown_flavour,		/* core_flavour */
+// OBSOLETE   default_check_format,			/* check_format */
+// OBSOLETE   default_core_sniffer,			/* core_sniffer */
+// OBSOLETE   fetch_core_registers,			/* core_read_registers */
+// OBSOLETE   NULL					/* next */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_core_i386mach (void)
+// OBSOLETE {
+// OBSOLETE   add_core_fns (&i386mach_core_fns);
+// OBSOLETE }
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 02ba77c..634101a 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -86,8 +86,8 @@
 }
 
 static void
-fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, int which,
-                         CORE_ADDR ignore)
+fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
+			 int which, CORE_ADDR ignore)
 {
   switch (which)
     {
@@ -137,16 +137,6 @@
   NULL					/* next */
 };
 
-/* FIXME: should be multi-arch'd */
-int
-i386nbsd_aout_use_struct_convention (int gcc_p, struct type *type)
-{
-  return !(TYPE_LENGTH (type) == 1
-	   || TYPE_LENGTH (type) == 2
-	   || TYPE_LENGTH (type) == 4
-	   || TYPE_LENGTH (type) == 8);
-}
-
 void
 _initialize_i386nbsd_tdep (void)
 {
diff --git a/gdb/i386obsd-nat.c b/gdb/i386obsd-nat.c
new file mode 100644
index 0000000..17ef922
--- /dev/null
+++ b/gdb/i386obsd-nat.c
@@ -0,0 +1,60 @@
+/* Native-dependent code for OpenBSD/i386.
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 "defs.h"
+
+#include <sys/param.h>
+#include <sys/sysctl.h>
+
+/* Prevent warning from -Wmissing-prototypes.  */
+void _initialize_i386obsd_nat (void);
+
+void
+_initialize_i386obsd_nat (void)
+{
+  /* OpenBSD provides a vm.psstrings sysctl that we can use to locate
+     the sigtramp.  That way we can still recognize a sigtramp if its
+     location is changed in a new kernel.  This is especially
+     important for OpenBSD, since it uses a different memory layout
+     than NetBSD, yet we cannot distinguish between the two.
+
+     Of course this is still based on the assumption that the sigtramp
+     is placed directly under the location where the program arguments
+     and environment can be found.  */
+#ifdef VM_PSSTRINGS
+  {
+    struct _ps_strings _ps;
+    int mib[2];
+    size_t len;
+
+    extern CORE_ADDR i386nbsd_sigtramp_start;
+    extern CORE_ADDR i386nbsd_sigtramp_end;
+
+    mib[0] = CTL_VM;
+    mib[1] = VM_PSSTRINGS;
+    len = sizeof (_ps);
+    if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0)
+      {
+	i386nbsd_sigtramp_start = (CORE_ADDR)_ps.val - 128;
+	i386nbsd_sigtramp_end = (CORE_ADDR)_ps.val;
+      }
+  }
+#endif
+}
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 672ddfb..8180093 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -1,4 +1,4 @@
-/* Intel 386 native support for SYSV systems (pre-SVR4).
+/* Intel 386 native support for System V systems (pre-SVR4).
 
    Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
    1999, 2000, 2002 Free Software Foundation, Inc.
@@ -46,20 +46,9 @@
 #include <sys/ioctl.h>
 #include <fcntl.h>
 
-
-/* FIXME: 1998-10-21/jsm: The following used to be just "#include
-   <sys/debugreg.h>", but the the Linux kernel (version 2.1.x) and
-   glibc 2.0.x are not in sync; including <sys/debugreg.h> will result
-   in an error.  With luck, these losers will get their act together
-   and we can trash this hack in the near future.  */
-
 #ifdef TARGET_HAS_HARDWARE_WATCHPOINTS
-#ifdef HAVE_ASM_DEBUGREG_H
-#include <asm/debugreg.h>
-#else
 #include <sys/debugreg.h>
 #endif
-#endif
 
 #include <sys/file.h>
 #include "gdb_stat.h"
@@ -73,8 +62,8 @@
 #include "target.h"
 
 
-/* this table must line up with REGISTER_NAMES in tm-i386v.h */
-/* symbols like 'EAX' come from <sys/reg.h> */
+/* Mapping between the general-purpose registers in `struct user'
+   format and GDB's register array layout.  */
 static int regmap[] =
 {
   EAX, ECX, EDX, EBX,
@@ -83,37 +72,34 @@
   DS, ES, FS, GS,
 };
 
-/* blockend is the value of u.u_ar0, and points to the
- * place where GS is stored
- */
+/* Support for the user struct.  */
 
-int
-i386_register_u_addr (int blockend, int regnum)
+/* Return the address of register REGNUM.  BLOCKEND is the value of
+   u.u_ar0, and points to the place where GS is stored.  */
+
+CORE_ADDR
+register_u_addr (CORE_ADDR blockend, int regnum)
 {
   struct user u;
-  int fpstate;
-  int ubase;
+  CORE_ADDR fpstate;
 
-  ubase = blockend;
-  /* FIXME:  Should have better way to test floating point range */
-  if (regnum >= FP0_REGNUM && regnum <= (FP0_REGNUM + 7))
+  if (FP_REGNUM_P (regnum))
     {
-#ifdef KSTKSZ			/* SCO, and others? */
-      ubase += 4 * (SS + 1) - KSTKSZ;
-      fpstate = ubase + ((char *) &u.u_fps.u_fpstate - (char *) &u);
+#ifdef KSTKSZ			/* SCO, and others?  */
+      blockend += 4 * (SS + 1) - KSTKSZ;
+      fpstate = blockend + ((char *) &u.u_fps.u_fpstate - (char *) &u);
       return (fpstate + 0x1c + 10 * (regnum - FP0_REGNUM));
 #else
-      fpstate = ubase + ((char *) &u.i387.st_space - (char *) &u);
+      fpstate = blockend + ((char *) &u.i387.st_space - (char *) &u);
       return (fpstate + 10 * (regnum - FP0_REGNUM));
 #endif
     }
-  else
-    {
-      return (ubase + 4 * regmap[regnum]);
-    }
 
+  return (blockend + 4 * regmap[regnum]);
 }
-
+
+/* Return the size of the user struct.  */
+
 int
 kernel_u_size (void)
 {
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index c67f1fb..7de8c14 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -1,5 +1,6 @@
-/* Native-dependent code for SVR4 Unix running on i386's, for GDB.
-   Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001
+/* Native-dependent code for SVR4 Unix running on i386's.
+   Copyright 1988, 1989, 1991, 1992, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -27,8 +28,9 @@
 #ifdef HAVE_SYS_REG_H
 #include <sys/reg.h>
 #endif
-#include "i387-tdep.h"
 
+#include "i386-tdep.h"
+#include "i387-tdep.h"
 
 #ifdef HAVE_SYS_PROCFS_H
 
@@ -37,15 +39,16 @@
 /* Prototypes for supply_gregset etc. */
 #include "gregset.h"
 
-/*  The /proc interface divides the target machine's register set up into
-   two different sets, the general register set (gregset) and the floating
-   point register set (fpregset).  For each set, there is an ioctl to get
-   the current register set and another ioctl to set the current values.
+/* The `/proc' interface divides the target machine's register set up
+   into two different sets, the general purpose register set (gregset)
+   and the floating-point register set (fpregset).  For each set,
+   there is an ioctl to get the current register set and another ioctl
+   to set the current values.
 
-   The actual structure passed through the ioctl interface is, of course,
-   naturally machine dependent, and is different for each set of registers.
-   For the i386 for example, the general register set is typically defined
-   by:
+   The actual structure passed through the ioctl interface is, of
+   course, naturally machine dependent, and is different for each set
+   of registers.  For the i386 for example, the general-purpose
+   register set is typically defined by:
 
    typedef int gregset_t[19];           (in <sys/regset.h>)
 
@@ -55,36 +58,38 @@
    #define UESP 17
    #define SS   18
 
-   and the floating point set by:
+   and the floating-point set by:
 
-   typedef struct fpregset
-   {
-   union
-   {
-   struct fpchip_state  // fp extension state //
-   {
-   int state[27];       // 287/387 saved state //
-   int status;          // status word saved at exception //
-   } fpchip_state;
-   struct fp_emul_space // for emulators //
-   {
-   char fp_emul[246];
-   char fp_epad[2];
-   } fp_emul_space;
-   int f_fpregs[62];    // union of the above //
-   } fp_reg_set;
-   long f_wregs[33];            // saved weitek state //
+   typedef struct fpregset   {
+           union {
+                   struct fpchip_state            // fp extension state //
+                   {
+                           int     state[27];     // 287/387 saved state //
+                           int     status;        // status word saved at //
+                                                  // exception //
+                   } fpchip_state;
+                   struct fp_emul_space           // for emulators //
+                   {
+                           char    fp_emul[246];
+                           char    fp_epad[2];
+                   } fp_emul_space;
+                   int     f_fpregs[62];          // union of the above //
+           } fp_reg_set;
+           long            f_wregs[33];           // saved weitek state //
    } fpregset_t;
 
-   These routines provide the packing and unpacking of gregset_t and
-   fpregset_t formatted data.
+   Incidentally fpchip_state contains the FPU state in the same format
+   as used by the "fsave" instruction, and that's the only thing we
+   support here.  I don't know how the emulator stores it state.  The
+   Weitek stuff definitely isn't supported.
 
- */
+   The routines defined here, provide the packing and unpacking of
+   gregset_t and fpregset_t formatted data.  */
 
 #ifdef HAVE_GREGSET_T
 
-/* This is a duplicate of the table in i386-xdep.c. */
-
+/* Mapping between the general-purpose registers in `/proc'
+   format and GDB's register array layout.  */
 static int regmap[] =
 {
   EAX, ECX, EDX, EBX,
@@ -93,92 +98,63 @@
   DS, ES, FS, GS,
 };
 
-/* Prototypes for local functions */
-
-void fill_gregset (gregset_t *, int);
-
-void supply_gregset (gregset_t *);
-
-void supply_fpregset (fpregset_t *);
-
-void fill_fpregset (fpregset_t *, int);
-
-
-/*  FIXME:  These routine absolutely depends upon (NUM_REGS - NUM_FREGS)
-   being less than or equal to the number of registers that can be stored
-   in a gregset_t.  Note that with the current scheme there will typically
-   be more registers actually stored in a gregset_t that what we know
-   about.  This is bogus and should be fixed. */
-
-/*  Given a pointer to a general register set in /proc format (gregset_t *),
-   unpack the register contents and supply them as gdb's idea of the current
-   register values. */
+/* Fill GDB's register array with the general-purpose register values
+   in *GREGSETP.  */
 
 void
 supply_gregset (gregset_t *gregsetp)
 {
-  register int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-  extern int regmap[];
+  greg_t *regp = (greg_t *) gregsetp;
+  int i;
 
-  for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
-    {
-      supply_register (regi, (char *) (regp + regmap[regi]));
-    }
+  for (i = 0; i < I386_NUM_GREGS; i++)
+    supply_register (i, (char *) (regp + regmap[i]));
 }
 
+/* Fill register REGNO (if it is a general-purpose register) in
+   *GREGSETPS with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
+
 void
 fill_gregset (gregset_t *gregsetp, int regno)
 {
-  int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-  extern int regmap[];
+  greg_t *regp = (greg_t *) gregsetp;
+  int i;
 
-  for (regi = 0; regi < (NUM_REGS - NUM_FREGS); regi++)
-    {
-      if ((regno == -1) || (regno == regi))
-	{
-	  *(regp + regmap[regi]) = *(int *) &registers[REGISTER_BYTE (regi)];
-	}
-    }
+  for (i = 0; i < I386_NUM_GREGS; i++)
+    if (regno == -1 || regno == i)
+      regcache_collect (i, regp + regmap[i]);
 }
 
 #endif /* HAVE_GREGSET_T */
 
-#if defined (HAVE_FPREGSET_T)
+#ifdef HAVE_FPREGSET_T
 
-/*  Given a pointer to a floating point register set in /proc format
-   (fpregset_t *), unpack the register contents and supply them as gdb's
-   idea of the current floating point register values. */
-
-/* FIXME: Assumes that fpregsetp contains an i387 FSAVE area. */
-#if !defined(FPREGSET_FSAVE_OFFSET)
-#define FPREGSET_FSAVE_OFFSET	0
-#endif
+/* Fill GDB's register array with the floating-point register values in
+   *FPREGSETP.  */
 
 void
 supply_fpregset (fpregset_t *fpregsetp)
 {
-  if (NUM_FREGS == 0)
+  if (FP0_REGNUM == 0)
     return;
 
-  i387_supply_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET);
+  i387_supply_fsave ((char *) fpregsetp);
 }
 
-/*  Given a pointer to a floating point register set in /proc format
-   (fpregset_t *), update the register specified by REGNO from gdb's idea
-   of the current floating point register set.  If REGNO is -1, update
-   them all. */
+/* Fill register REGNO (if it is a floating-point register) in
+   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
 
 void
 fill_fpregset (fpregset_t *fpregsetp, int regno)
 {
-  if (NUM_FREGS == 0)
+  if (FP0_REGNUM == 0)
     return;
 
-  i387_fill_fsave ((char *) fpregsetp + FPREGSET_FSAVE_OFFSET, regno);
+  i387_fill_fsave ((char *) fpregsetp, regno);
 }
 
-#endif /* defined (HAVE_FPREGSET_T) */
+#endif /* HAVE_FPREGSET_T */
 
 #endif /* HAVE_SYS_PROCFS_H */
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 59b60d7..daf1c6f 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -160,7 +160,7 @@
 
 /* Print the floating point number specified by RAW.  */
 static void
-print_i387_value (char *raw)
+print_i387_value (char *raw, struct ui_file *file)
 {
   DOUBLEST value;
 
@@ -175,15 +175,15 @@
      to print the value, 1 position for the sign, 1 for the decimal
      point, 19 for the digits and 6 for the exponent adds up to 27.  */
 #ifdef PRINTF_HAS_LONG_DOUBLE
-  printf_filtered (" %-+27.19Lg", (long double) value);
+  fprintf_filtered (file, " %-+27.19Lg", (long double) value);
 #else
-  printf_filtered (" %-+27.19g", (double) value);
+  fprintf_filtered (file, " %-+27.19g", (double) value);
 #endif
 }
 
 /* Print the classification for the register contents RAW.  */
 static void
-print_i387_ext (unsigned char *raw)
+print_i387_ext (unsigned char *raw, struct ui_file *file)
 {
   int sign;
   int integer;
@@ -201,119 +201,124 @@
     {
       if (fraction[0] == 0x00000000 && fraction[1] == 0x00000000)
 	/* Infinity.  */
-	printf_filtered (" %cInf", (sign ? '-' : '+'));
+	fprintf_filtered (file, " %cInf", (sign ? '-' : '+'));
       else if (sign && fraction[0] == 0x00000000 && fraction[1] == 0x40000000)
 	/* Real Indefinite (QNaN).  */
-	puts_unfiltered (" Real Indefinite (QNaN)");
+	fputs_unfiltered (" Real Indefinite (QNaN)", file);
       else if (fraction[1] & 0x40000000)
 	/* QNaN.  */
-	puts_filtered (" QNaN");
+	fputs_filtered (" QNaN", file);
       else
 	/* SNaN.  */
-	puts_filtered (" SNaN");
+	fputs_filtered (" SNaN", file);
     }
   else if (exponent < 0x7fff && exponent > 0x0000 && integer)
     /* Normal.  */
-    print_i387_value (raw);
+    print_i387_value (raw, file);
   else if (exponent == 0x0000)
     {
       /* Denormal or zero.  */
-      print_i387_value (raw);
+      print_i387_value (raw, file);
       
       if (integer)
 	/* Pseudo-denormal.  */
-	puts_filtered (" Pseudo-denormal");
+	fputs_filtered (" Pseudo-denormal", file);
       else if (fraction[0] || fraction[1])
 	/* Denormal.  */
-	puts_filtered (" Denormal");
+	fputs_filtered (" Denormal", file);
     }
   else
     /* Unsupported.  */
-    puts_filtered (" Unsupported");
+    fputs_filtered (" Unsupported", file);
 }
 
 /* Print the status word STATUS.  */
 static void
-print_i387_status_word (unsigned int status)
+print_i387_status_word (unsigned int status, struct ui_file *file)
 {
-  printf_filtered ("Status Word:         %s",
+  fprintf_filtered (file, "Status Word:         %s",
 		   local_hex_string_custom (status, "04"));
-  puts_filtered ("  ");
-  printf_filtered (" %s", (status & 0x0001) ? "IE" : "  ");
-  printf_filtered (" %s", (status & 0x0002) ? "DE" : "  ");
-  printf_filtered (" %s", (status & 0x0004) ? "ZE" : "  ");
-  printf_filtered (" %s", (status & 0x0008) ? "OE" : "  ");
-  printf_filtered (" %s", (status & 0x0010) ? "UE" : "  ");
-  printf_filtered (" %s", (status & 0x0020) ? "PE" : "  ");
-  puts_filtered ("  ");
-  printf_filtered (" %s", (status & 0x0080) ? "ES" : "  ");
-  puts_filtered ("  ");
-  printf_filtered (" %s", (status & 0x0040) ? "SF" : "  ");
-  puts_filtered ("  ");
-  printf_filtered (" %s", (status & 0x0100) ? "C0" : "  ");
-  printf_filtered (" %s", (status & 0x0200) ? "C1" : "  ");
-  printf_filtered (" %s", (status & 0x0400) ? "C2" : "  ");
-  printf_filtered (" %s", (status & 0x4000) ? "C3" : "  ");
+  fputs_filtered ("  ", file);
+  fprintf_filtered (file, " %s", (status & 0x0001) ? "IE" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0002) ? "DE" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0004) ? "ZE" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0008) ? "OE" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0010) ? "UE" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0020) ? "PE" : "  ");
+  fputs_filtered ("  ", file);
+  fprintf_filtered (file, " %s", (status & 0x0080) ? "ES" : "  ");
+  fputs_filtered ("  ", file);
+  fprintf_filtered (file, " %s", (status & 0x0040) ? "SF" : "  ");
+  fputs_filtered ("  ", file);
+  fprintf_filtered (file, " %s", (status & 0x0100) ? "C0" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0200) ? "C1" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x0400) ? "C2" : "  ");
+  fprintf_filtered (file, " %s", (status & 0x4000) ? "C3" : "  ");
 
-  puts_filtered ("\n");
+  fputs_filtered ("\n", file);
 
-  printf_filtered ("                       TOP: %d\n", ((status >> 11) & 7));
+  fprintf_filtered (file,
+		    "                       TOP: %d\n", ((status >> 11) & 7));
 }
 
 /* Print the control word CONTROL.  */
 static void
-print_i387_control_word (unsigned int control)
+print_i387_control_word (unsigned int control, struct ui_file *file)
 {
-  printf_filtered ("Control Word:        %s",
+  fprintf_filtered (file, "Control Word:        %s",
 		   local_hex_string_custom (control, "04"));
-  puts_filtered ("  ");
-  printf_filtered (" %s", (control & 0x0001) ? "IM" : "  ");
-  printf_filtered (" %s", (control & 0x0002) ? "DM" : "  ");
-  printf_filtered (" %s", (control & 0x0004) ? "ZM" : "  ");
-  printf_filtered (" %s", (control & 0x0008) ? "OM" : "  ");
-  printf_filtered (" %s", (control & 0x0010) ? "UM" : "  ");
-  printf_filtered (" %s", (control & 0x0020) ? "PM" : "  ");
+  fputs_filtered ("  ", file);
+  fprintf_filtered (file, " %s", (control & 0x0001) ? "IM" : "  ");
+  fprintf_filtered (file, " %s", (control & 0x0002) ? "DM" : "  ");
+  fprintf_filtered (file, " %s", (control & 0x0004) ? "ZM" : "  ");
+  fprintf_filtered (file, " %s", (control & 0x0008) ? "OM" : "  ");
+  fprintf_filtered (file, " %s", (control & 0x0010) ? "UM" : "  ");
+  fprintf_filtered (file, " %s", (control & 0x0020) ? "PM" : "  ");
 
-  puts_filtered ("\n");
+  fputs_filtered ("\n", file);
 
-  puts_filtered ("                       PC: ");
+  fputs_filtered ("                       PC: ", file);
   switch ((control >> 8) & 3)
     {
     case 0:
-      puts_filtered ("Single Precision (24-bits)\n");
+      fputs_filtered ("Single Precision (24-bits)\n", file);
       break;
     case 1:
-      puts_filtered ("Reserved\n");
+      fputs_filtered ("Reserved\n", file);
       break;
     case 2:
-      puts_filtered ("Double Precision (53-bits)\n");
+      fputs_filtered ("Double Precision (53-bits)\n", file);
       break;
     case 3:
-      puts_filtered ("Extended Precision (64-bits)\n");
+      fputs_filtered ("Extended Precision (64-bits)\n", file);
       break;
     }
       
-  puts_filtered ("                       RC: ");
+  fputs_filtered ("                       RC: ", file);
   switch ((control >> 10) & 3)
     {
     case 0:
-      puts_filtered ("Round to nearest\n");
+      fputs_filtered ("Round to nearest\n", file);
       break;
     case 1:
-      puts_filtered ("Round down\n");
+      fputs_filtered ("Round down\n", file);
       break;
     case 2:
-      puts_filtered ("Round up\n");
+      fputs_filtered ("Round up\n", file);
       break;
     case 3:
-      puts_filtered ("Round toward zero\n");
+      fputs_filtered ("Round toward zero\n", file);
       break;
     }
 }
 
-/* Print out the i387 floating poin state.  */
+/* Print out the i387 floating point state.  Note that we ignore FRAME
+   in the code below.  That's OK since floating-point registers are
+   never saved on the stack.  */
+
 void
-i387_float_info (void)
+i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+		       struct frame_info *frame, const char *args)
 {
   unsigned int fctrl;
   unsigned int fstat;
@@ -343,50 +348,50 @@
       int tag = (ftag >> (fpreg * 2)) & 3;
       int i;
 
-      printf_filtered ("%sR%d: ", fpreg == top ? "=>" : "  ", fpreg);
+      fprintf_filtered (file, "%sR%d: ", fpreg == top ? "=>" : "  ", fpreg);
 
       switch (tag)
 	{
 	case 0:
-	  puts_filtered ("Valid   ");
+	  fputs_filtered ("Valid   ", file);
 	  break;
 	case 1:
-	  puts_filtered ("Zero    ");
+	  fputs_filtered ("Zero    ", file);
 	  break;
 	case 2:
-	  puts_filtered ("Special ");
+	  fputs_filtered ("Special ", file);
 	  break;
 	case 3:
-	  puts_filtered ("Empty   ");
+	  fputs_filtered ("Empty   ", file);
 	  break;
 	}
 
       read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
 
-      puts_filtered ("0x");
+      fputs_filtered ("0x", file);
       for (i = 9; i >= 0; i--)
-	printf_filtered ("%02x", raw[i]);
+	fprintf_filtered (file, "%02x", raw[i]);
 
       if (tag != 3)
-	print_i387_ext (raw);
+	print_i387_ext (raw, file);
 
-      puts_filtered ("\n");
+      fputs_filtered ("\n", file);
     }
 
   puts_filtered ("\n");
 
-  print_i387_status_word (fstat);
-  print_i387_control_word (fctrl);
-  printf_filtered ("Tag Word:            %s\n",
-		   local_hex_string_custom (ftag, "04"));
-  printf_filtered ("Instruction Pointer: %s:",
-		   local_hex_string_custom (fiseg, "02"));
-  printf_filtered ("%s\n", local_hex_string_custom (fioff, "08"));
-  printf_filtered ("Operand Pointer:     %s:",
-		   local_hex_string_custom (foseg, "02"));
-  printf_filtered ("%s\n", local_hex_string_custom (fooff, "08"));
-  printf_filtered ("Opcode:              %s\n",
-		   local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
+  print_i387_status_word (fstat, file);
+  print_i387_control_word (fctrl, file);
+  fprintf_filtered (file, "Tag Word:            %s\n",
+		    local_hex_string_custom (ftag, "04"));
+  fprintf_filtered (file, "Instruction Pointer: %s:",
+		    local_hex_string_custom (fiseg, "02"));
+  fprintf_filtered (file, "%s\n", local_hex_string_custom (fioff, "08"));
+  fprintf_filtered (file, "Operand Pointer:     %s:",
+		    local_hex_string_custom (foseg, "02"));
+  fprintf_filtered (file, "%s\n", local_hex_string_custom (fooff, "08"));
+  fprintf_filtered (file, "Opcode:              %s\n",
+		    local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
 }
 
 /* FIXME: kettenis/2000-05-21: Right now more than a few i386 targets
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index 5bfd06e..e29b198 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -21,6 +21,13 @@
 #ifndef I387_TDEP_H
 #define I387_TDEP_H
 
+/* Print out the i387 floating point state.  */
+
+extern void i387_print_float_info (struct gdbarch *gdbarch,
+				   struct ui_file *file,
+				   struct frame_info *frame,
+				   const char *args);
+
 /* Fill register REGNUM in GDB's register array with the appropriate
    value from *FSAVE.  This function masks off any of the reserved
    bits in *FSAVE.  */
diff --git a/gdb/i960-tdep.c b/gdb/i960-tdep.c
index 98718a3..d059a7b 100644
--- a/gdb/i960-tdep.c
+++ b/gdb/i960-tdep.c
@@ -1,1055 +1,1056 @@
-/* Target-machine dependent code for the Intel 960
-
-   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
-
-   Contributed by Intel Corporation.
-   examine_prologue and other parts contributed by Wind River Systems.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "symtab.h"
-#include "value.h"
-#include "frame.h"
-#include "floatformat.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "inferior.h"
-#include "regcache.h"
-
-static CORE_ADDR next_insn (CORE_ADDR memaddr,
-			    unsigned int *pword1, unsigned int *pword2);
-
-struct type *
-i960_register_type (int regnum)
-{
-  if (regnum < FP0_REGNUM)
-    return builtin_type_int32;
-  else
-    return builtin_type_i960_ext;
-}
-
-
-/* Does the specified function use the "struct returning" convention
-   or the "value returning" convention?  The "value returning" convention
-   almost invariably returns the entire value in registers.  The
-   "struct returning" convention often returns the entire value in
-   memory, and passes a pointer (out of or into the function) saying
-   where the value (is or should go).
-
-   Since this sometimes depends on whether it was compiled with GCC,
-   this is also an argument.  This is used in call_function to build a
-   stack, and in value_being_returned to print return values.
-
-   On i960, a structure is returned in registers g0-g3, if it will fit.
-   If it's more than 16 bytes long, g13 pointed to it on entry.  */
-
-int
-i960_use_struct_convention (int gcc_p, struct type *type)
-{
-  return (TYPE_LENGTH (type) > 16);
-}
-
-/* gdb960 is always running on a non-960 host.  Check its characteristics.
-   This routine must be called as part of gdb initialization.  */
-
-static void
-check_host (void)
-{
-  int i;
-
-  static struct typestruct
-    {
-      int hostsize;		/* Size of type on host         */
-      int i960size;		/* Size of type on i960         */
-      char *typename;		/* Name of type, for error msg  */
-    }
-  types[] =
-  {
-    {
-      sizeof (short), 2, "short"
-    }
-     ,
-    {
-      sizeof (int), 4, "int"
-    }
-     ,
-    {
-      sizeof (long), 4, "long"
-    }
-     ,
-    {
-      sizeof (float), 4, "float"
-    }
-     ,
-    {
-      sizeof (double), 8, "double"
-    }
-     ,
-    {
-      sizeof (char *), 4, "pointer"
-    }
-     ,
-  };
-#define TYPELEN	(sizeof(types) / sizeof(struct typestruct))
-
-  /* Make sure that host type sizes are same as i960
-   */
-  for (i = 0; i < TYPELEN; i++)
-    {
-      if (types[i].hostsize != types[i].i960size)
-	{
-	  printf_unfiltered ("sizeof(%s) != %d:  PROCEED AT YOUR OWN RISK!\n",
-			     types[i].typename, types[i].i960size);
-	}
-
-    }
-}
-
-/* Is this register part of the register window system?  A yes answer
-   implies that 1) The name of this register will not be the same in
-   other frames, and 2) This register is automatically "saved" upon
-   subroutine calls and thus there is no need to search more than one
-   stack frame for it.
-
-   On the i960, in fact, the name of this register in another frame is
-   "mud" -- there is no overlap between the windows.  Each window is
-   simply saved into the stack (true for our purposes, after having been
-   flushed; normally they reside on-chip and are restored from on-chip
-   without ever going to memory).  */
-
-static int
-register_in_window_p (int regnum)
-{
-  return regnum <= R15_REGNUM;
-}
-
-/* i960_find_saved_register ()
-
-   Return the address in which frame FRAME's value of register REGNUM
-   has been saved in memory.  Or return zero if it has not been saved.
-   If REGNUM specifies the SP, the value we return is actually the SP
-   value, not an address where it was saved.  */
-
-static CORE_ADDR
-i960_find_saved_register (struct frame_info *frame, int regnum)
-{
-  register struct frame_info *frame1 = NULL;
-  register CORE_ADDR addr = 0;
-
-  if (frame == NULL)		/* No regs saved if want current frame */
-    return 0;
-
-  /* We assume that a register in a register window will only be saved
-     in one place (since the name changes and/or disappears as you go
-     towards inner frames), so we only call get_frame_saved_regs on
-     the current frame.  This is directly in contradiction to the
-     usage below, which assumes that registers used in a frame must be
-     saved in a lower (more interior) frame.  This change is a result
-     of working on a register window machine; get_frame_saved_regs
-     always returns the registers saved within a frame, within the
-     context (register namespace) of that frame. */
-
-  /* However, note that we don't want this to return anything if
-     nothing is saved (if there's a frame inside of this one).  Also,
-     callers to this routine asking for the stack pointer want the
-     stack pointer saved for *this* frame; this is returned from the
-     next frame.  */
-
-  if (register_in_window_p (regnum))
-    {
-      frame1 = get_next_frame (frame);
-      if (!frame1)
-	return 0;		/* Registers of this frame are active.  */
-
-      /* Get the SP from the next frame in; it will be this
-         current frame.  */
-      if (regnum != SP_REGNUM)
-	frame1 = frame;
-
-      FRAME_INIT_SAVED_REGS (frame1);
-      return frame1->saved_regs[regnum];	/* ... which might be zero */
-    }
-
-  /* Note that this next routine assumes that registers used in
-     frame x will be saved only in the frame that x calls and
-     frames interior to it.  This is not true on the sparc, but the
-     above macro takes care of it, so we should be all right. */
-  while (1)
-    {
-      QUIT;
-      frame1 = get_next_frame (frame);
-      if (frame1 == 0)
-	break;
-      frame = frame1;
-      FRAME_INIT_SAVED_REGS (frame1);
-      if (frame1->saved_regs[regnum])
-	addr = frame1->saved_regs[regnum];
-    }
-
-  return addr;
-}
-
-/* i960_get_saved_register ()
-
-   Find register number REGNUM relative to FRAME and put its (raw,
-   target format) contents in *RAW_BUFFER.  Set *OPTIMIZED if the
-   variable was optimized out (and thus can't be fetched).  Set *LVAL
-   to lval_memory, lval_register, or not_lval, depending on whether
-   the value was fetched from memory, from a register, or in a strange
-   and non-modifiable way (e.g. a frame pointer which was calculated
-   rather than fetched).  Set *ADDRP to the address, either in memory
-   on as a REGISTER_BYTE offset into the registers array.
-
-   Note that this implementation never sets *LVAL to not_lval.  But it
-   can be replaced by defining GET_SAVED_REGISTER and supplying your
-   own.
-
-   The argument RAW_BUFFER must point to aligned memory.  */
-
-void
-i960_get_saved_register (char *raw_buffer,
-			 int *optimized,
-			 CORE_ADDR *addrp,
-			 struct frame_info *frame,
-			 int regnum,
-			 enum lval_type *lval)
-{
-  CORE_ADDR addr;
-
-  if (!target_has_registers)
-    error ("No registers.");
-
-  /* Normal systems don't optimize out things with register numbers.  */
-  if (optimized != NULL)
-    *optimized = 0;
-  addr = i960_find_saved_register (frame, regnum);
-  if (addr != 0)
-    {
-      if (lval != NULL)
-	*lval = lval_memory;
-      if (regnum == SP_REGNUM)
-	{
-	  if (raw_buffer != NULL)
-	    {
-	      /* Put it back in target format.  */
-	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			     (LONGEST) addr);
-	    }
-	  if (addrp != NULL)
-	    *addrp = 0;
-	  return;
-	}
-      if (raw_buffer != NULL)
-	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  else
-    {
-      if (lval != NULL)
-	*lval = lval_register;
-      addr = REGISTER_BYTE (regnum);
-      if (raw_buffer != NULL)
-	read_register_gen (regnum, raw_buffer);
-    }
-  if (addrp != NULL)
-    *addrp = addr;
-}
-
-/* Examine an i960 function prologue, recording the addresses at which
-   registers are saved explicitly by the prologue code, and returning
-   the address of the first instruction after the prologue (but not
-   after the instruction at address LIMIT, as explained below).
-
-   LIMIT places an upper bound on addresses of the instructions to be
-   examined.  If the prologue code scan reaches LIMIT, the scan is
-   aborted and LIMIT is returned.  This is used, when examining the
-   prologue for the current frame, to keep examine_prologue () from
-   claiming that a given register has been saved when in fact the
-   instruction that saves it has not yet been executed.  LIMIT is used
-   at other times to stop the scan when we hit code after the true
-   function prologue (e.g. for the first source line) which might
-   otherwise be mistaken for function prologue.
-
-   The format of the function prologue matched by this routine is
-   derived from examination of the source to gcc960 1.21, particularly
-   the routine i960_function_prologue ().  A "regular expression" for
-   the function prologue is given below:
-
-   (lda LRn, g14
-   mov g14, g[0-7]
-   (mov 0, g14) | (lda 0, g14))?
-
-   (mov[qtl]? g[0-15], r[4-15])*
-   ((addo [1-31], sp, sp) | (lda n(sp), sp))?
-   (st[qtl]? g[0-15], n(fp))*
-
-   (cmpobne 0, g14, LFn
-   mov sp, g14
-   lda 0x30(sp), sp
-   LFn: stq g0, (g14)
-   stq g4, 0x10(g14)
-   stq g8, 0x20(g14))?
-
-   (st g14, n(fp))?
-   (mov g13,r[4-15])?
- */
-
-/* Macros for extracting fields from i960 instructions.  */
-
-#define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
-#define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
-
-#define REG_SRC1(insn)    EXTRACT_FIELD (insn, 0, 5)
-#define REG_SRC2(insn)    EXTRACT_FIELD (insn, 14, 5)
-#define REG_SRCDST(insn)  EXTRACT_FIELD (insn, 19, 5)
-#define MEM_SRCDST(insn)  EXTRACT_FIELD (insn, 19, 5)
-#define MEMA_OFFSET(insn) EXTRACT_FIELD (insn, 0, 12)
-
-/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
-   is not the address of a valid instruction, the address of the next
-   instruction beyond ADDR otherwise.  *PWORD1 receives the first word
-   of the instruction, and (for two-word instructions), *PWORD2 receives
-   the second.  */
-
-#define NEXT_PROLOGUE_INSN(addr, lim, pword1, pword2) \
-  (((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0)
-
-static CORE_ADDR
-examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
-		  CORE_ADDR frame_addr, struct frame_saved_regs *fsr)
-{
-  register CORE_ADDR next_ip;
-  register int src, dst;
-  register unsigned int *pcode;
-  unsigned int insn1, insn2;
-  int size;
-  int within_leaf_prologue;
-  CORE_ADDR save_addr;
-  static unsigned int varargs_prologue_code[] =
-  {
-    0x3507a00c,			/* cmpobne 0x0, g14, LFn */
-    0x5cf01601,			/* mov sp, g14           */
-    0x8c086030,			/* lda 0x30(sp), sp      */
-    0xb2879000,			/* LFn: stq  g0, (g14)   */
-    0xb2a7a010,			/* stq g4, 0x10(g14)     */
-    0xb2c7a020			/* stq g8, 0x20(g14)     */
-  };
-
-  /* Accept a leaf procedure prologue code fragment if present.
-     Note that ip might point to either the leaf or non-leaf
-     entry point; we look for the non-leaf entry point first:  */
-
-  within_leaf_prologue = 0;
-  if ((next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2))
-      && ((insn1 & 0xfffff000) == 0x8cf00000	/* lda LRx, g14 (MEMA) */
-	  || (insn1 & 0xfffffc60) == 0x8cf03000))	/* lda LRx, g14 (MEMB) */
-    {
-      within_leaf_prologue = 1;
-      next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2);
-    }
-
-  /* Now look for the prologue code at a leaf entry point:  */
-
-  if (next_ip
-      && (insn1 & 0xff87ffff) == 0x5c80161e	/* mov g14, gx */
-      && REG_SRCDST (insn1) <= G0_REGNUM + 7)
-    {
-      within_leaf_prologue = 1;
-      if ((next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2))
-	  && (insn1 == 0x8cf00000	/* lda 0, g14 */
-	      || insn1 == 0x5cf01e00))	/* mov 0, g14 */
-	{
-	  ip = next_ip;
-	  next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-	  within_leaf_prologue = 0;
-	}
-    }
-
-  /* If something that looks like the beginning of a leaf prologue
-     has been seen, but the remainder of the prologue is missing, bail.
-     We don't know what we've got.  */
-
-  if (within_leaf_prologue)
-    return (ip);
-
-  /* Accept zero or more instances of "mov[qtl]? gx, ry", where y >= 4.
-     This may cause us to mistake the moving of a register
-     parameter to a local register for the saving of a callee-saved
-     register, but that can't be helped, since with the
-     "-fcall-saved" flag, any register can be made callee-saved.  */
-
-  while (next_ip
-	 && (insn1 & 0xfc802fb0) == 0x5c000610
-	 && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
-    {
-      src = REG_SRC1 (insn1);
-      size = EXTRACT_FIELD (insn1, 24, 2) + 1;
-      save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
-      while (size--)
-	{
-	  fsr->regs[src++] = save_addr;
-	  save_addr += 4;
-	}
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-    }
-
-  /* Accept an optional "addo n, sp, sp" or "lda n(sp), sp".  */
-
-  if (next_ip &&
-      ((insn1 & 0xffffffe0) == 0x59084800	/* addo n, sp, sp */
-       || (insn1 & 0xfffff000) == 0x8c086000	/* lda n(sp), sp (MEMA) */
-       || (insn1 & 0xfffffc60) == 0x8c087400))	/* lda n(sp), sp (MEMB) */
-    {
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-    }
-
-  /* Accept zero or more instances of "st[qtl]? gx, n(fp)".  
-     This may cause us to mistake the copying of a register
-     parameter to the frame for the saving of a callee-saved
-     register, but that can't be helped, since with the
-     "-fcall-saved" flag, any register can be made callee-saved.
-     We can, however, refuse to accept a save of register g14,
-     since that is matched explicitly below.  */
-
-  while (next_ip &&
-	 ((insn1 & 0xf787f000) == 0x9287e000	/* stl? gx, n(fp) (MEMA) */
-	  || (insn1 & 0xf787fc60) == 0x9287f400		/* stl? gx, n(fp) (MEMB) */
-	  || (insn1 & 0xef87f000) == 0xa287e000		/* st[tq] gx, n(fp) (MEMA) */
-	  || (insn1 & 0xef87fc60) == 0xa287f400)	/* st[tq] gx, n(fp) (MEMB) */
-	 && ((src = MEM_SRCDST (insn1)) != G14_REGNUM))
-    {
-      save_addr = frame_addr + ((insn1 & BITMASK (12, 1))
-				? insn2 : MEMA_OFFSET (insn1));
-      size = (insn1 & BITMASK (29, 1)) ? ((insn1 & BITMASK (28, 1)) ? 4 : 3)
-	: ((insn1 & BITMASK (27, 1)) ? 2 : 1);
-      while (size--)
-	{
-	  fsr->regs[src++] = save_addr;
-	  save_addr += 4;
-	}
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-    }
-
-  /* Accept the varargs prologue code if present.  */
-
-  size = sizeof (varargs_prologue_code) / sizeof (int);
-  pcode = varargs_prologue_code;
-  while (size-- && next_ip && *pcode++ == insn1)
-    {
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-    }
-
-  /* Accept an optional "st g14, n(fp)".  */
-
-  if (next_ip &&
-      ((insn1 & 0xfffff000) == 0x92f7e000	/* st g14, n(fp) (MEMA) */
-       || (insn1 & 0xfffffc60) == 0x92f7f400))	/* st g14, n(fp) (MEMB) */
-    {
-      fsr->regs[G14_REGNUM] = frame_addr + ((insn1 & BITMASK (12, 1))
-					    ? insn2 : MEMA_OFFSET (insn1));
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-    }
-
-  /* Accept zero or one instance of "mov g13, ry", where y >= 4.
-     This is saving the address where a struct should be returned.  */
-
-  if (next_ip
-      && (insn1 & 0xff802fbf) == 0x5c00061d
-      && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
-    {
-      save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
-      fsr->regs[G0_REGNUM + 13] = save_addr;
-      ip = next_ip;
-#if 0				/* We'll need this once there is a subsequent instruction examined. */
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
-#endif
-    }
-
-  return (ip);
-}
-
-/* Given an ip value corresponding to the start of a function,
-   return the ip of the first instruction after the function 
-   prologue.  */
-
-CORE_ADDR
-i960_skip_prologue (CORE_ADDR ip)
-{
-  struct frame_saved_regs saved_regs_dummy;
-  struct symtab_and_line sal;
-  CORE_ADDR limit;
-
-  sal = find_pc_line (ip, 0);
-  limit = (sal.end) ? sal.end : 0xffffffff;
-
-  return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy));
-}
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.
-
-   We cache the result of doing this in the frame_obstack, since it is
-   fairly expensive.  */
-
-void
-frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
-  register CORE_ADDR next_addr;
-  register CORE_ADDR *saved_regs;
-  register int regnum;
-  register struct frame_saved_regs *cache_fsr;
-  CORE_ADDR ip;
-  struct symtab_and_line sal;
-  CORE_ADDR limit;
-
-  if (!fi->fsr)
-    {
-      cache_fsr = (struct frame_saved_regs *)
-	frame_obstack_alloc (sizeof (struct frame_saved_regs));
-      memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
-      fi->fsr = cache_fsr;
-
-      /* Find the start and end of the function prologue.  If the PC
-         is in the function prologue, we only consider the part that
-         has executed already.  */
-
-      ip = get_pc_function_start (fi->pc);
-      sal = find_pc_line (ip, 0);
-      limit = (sal.end && sal.end < fi->pc) ? sal.end : fi->pc;
-
-      examine_prologue (ip, limit, fi->frame, cache_fsr);
-
-      /* Record the addresses at which the local registers are saved.
-         Strictly speaking, we should only do this for non-leaf procedures,
-         but no one will ever look at these values if it is a leaf procedure,
-         since local registers are always caller-saved.  */
-
-      next_addr = (CORE_ADDR) fi->frame;
-      saved_regs = cache_fsr->regs;
-      for (regnum = R0_REGNUM; regnum <= R15_REGNUM; regnum++)
-	{
-	  *saved_regs++ = next_addr;
-	  next_addr += 4;
-	}
-
-      cache_fsr->regs[FP_REGNUM] = cache_fsr->regs[PFP_REGNUM];
-    }
-
-  *fsr = *fi->fsr;
-
-  /* Fetch the value of the sp from memory every time, since it
-     is conceivable that it has changed since the cache was flushed.  
-     This unfortunately undoes much of the savings from caching the 
-     saved register values.  I suggest adding an argument to 
-     get_frame_saved_regs () specifying the register number we're
-     interested in (or -1 for all registers).  This would be passed
-     through to FRAME_FIND_SAVED_REGS (), permitting more efficient
-     computation of saved register addresses (e.g., on the i960,
-     we don't have to examine the prologue to find local registers). 
-     -- markf@wrs.com 
-     FIXME, we don't need to refetch this, since the cache is cleared
-     every time the child process is restarted.  If GDB itself
-     modifies SP, it has to clear the cache by hand (does it?).  -gnu */
-
-  fsr->regs[SP_REGNUM] = read_memory_integer (fsr->regs[SP_REGNUM], 4);
-}
-
-/* Return the address of the argument block for the frame
-   described by FI.  Returns 0 if the address is unknown.  */
-
-CORE_ADDR
-frame_args_address (struct frame_info *fi, int must_be_correct)
-{
-  struct frame_saved_regs fsr;
-  CORE_ADDR ap;
-
-  /* If g14 was saved in the frame by the function prologue code, return
-     the saved value.  If the frame is current and we are being sloppy,
-     return the value of g14.  Otherwise, return zero.  */
-
-  get_frame_saved_regs (fi, &fsr);
-  if (fsr.regs[G14_REGNUM])
-    ap = read_memory_integer (fsr.regs[G14_REGNUM], 4);
-  else
-    {
-      if (must_be_correct)
-	return 0;		/* Don't cache this result */
-      if (get_next_frame (fi))
-	ap = 0;
-      else
-	ap = read_register (G14_REGNUM);
-      if (ap == 0)
-	ap = fi->frame;
-    }
-  fi->arg_pointer = ap;		/* Cache it for next time */
-  return ap;
-}
-
-/* Return the address of the return struct for the frame
-   described by FI.  Returns 0 if the address is unknown.  */
-
-CORE_ADDR
-frame_struct_result_address (struct frame_info *fi)
-{
-  struct frame_saved_regs fsr;
-  CORE_ADDR ap;
-
-  /* If the frame is non-current, check to see if g14 was saved in the
-     frame by the function prologue code; return the saved value if so,
-     zero otherwise.  If the frame is current, return the value of g14.
-
-     FIXME, shouldn't this use the saved value as long as we are past
-     the function prologue, and only use the current value if we have
-     no saved value and are at TOS?   -- gnu@cygnus.com */
-
-  if (get_next_frame (fi))
-    {
-      get_frame_saved_regs (fi, &fsr);
-      if (fsr.regs[G13_REGNUM])
-	ap = read_memory_integer (fsr.regs[G13_REGNUM], 4);
-      else
-	ap = 0;
-    }
-  else
-    ap = read_register (G13_REGNUM);
-
-  return ap;
-}
-
-/* Return address to which the currently executing leafproc will return,
-   or 0 if IP, the value of the instruction pointer from the currently
-   executing function, is not in a leafproc (or if we can't tell if it
-   is).
-
-   Do this by finding the starting address of the routine in which IP lies.
-   If the instruction there is "mov g14, gx" (where x is in [0,7]), this
-   is a leafproc and the return address is in register gx.  Well, this is
-   true unless the return address points at a RET instruction in the current
-   procedure, which indicates that we have a 'dual entry' routine that
-   has been entered through the CALL entry point.  */
-
-CORE_ADDR
-leafproc_return (CORE_ADDR ip)
-{
-  register struct minimal_symbol *msymbol;
-  char *p;
-  int dst;
-  unsigned int insn1, insn2;
-  CORE_ADDR return_addr;
-
-  if ((msymbol = lookup_minimal_symbol_by_pc (ip)) != NULL)
-    {
-      if ((p = strchr (SYMBOL_NAME (msymbol), '.')) && STREQ (p, ".lf"))
-	{
-	  if (next_insn (SYMBOL_VALUE_ADDRESS (msymbol), &insn1, &insn2)
-	      && (insn1 & 0xff87ffff) == 0x5c80161e	/* mov g14, gx */
-	      && (dst = REG_SRCDST (insn1)) <= G0_REGNUM + 7)
-	    {
-	      /* Get the return address.  If the "mov g14, gx" 
-	         instruction hasn't been executed yet, read
-	         the return address from g14; otherwise, read it
-	         from the register into which g14 was moved.  */
-
-	      return_addr =
-		read_register ((ip == SYMBOL_VALUE_ADDRESS (msymbol))
-			       ? G14_REGNUM : dst);
-
-	      /* We know we are in a leaf procedure, but we don't know
-	         whether the caller actually did a "bal" to the ".lf"
-	         entry point, or a normal "call" to the non-leaf entry
-	         point one instruction before.  In the latter case, the
-	         return address will be the address of a "ret"
-	         instruction within the procedure itself.  We test for
-	         this below.  */
-
-	      if (!next_insn (return_addr, &insn1, &insn2)
-		  || (insn1 & 0xff000000) != 0xa000000	/* ret */
-		  || lookup_minimal_symbol_by_pc (return_addr) != msymbol)
-		return (return_addr);
-	    }
-	}
-    }
-
-  return (0);
-}
-
-/* Immediately after a function call, return the saved pc.
-   Can't go through the frames for this because on some machines
-   the new frame is not set up until the new function executes
-   some instructions. 
-   On the i960, the frame *is* set up immediately after the call,
-   unless the function is a leaf procedure.  */
-
-CORE_ADDR
-saved_pc_after_call (struct frame_info *frame)
-{
-  CORE_ADDR saved_pc;
-
-  saved_pc = leafproc_return (get_frame_pc (frame));
-  if (!saved_pc)
-    saved_pc = FRAME_SAVED_PC (frame);
-
-  return saved_pc;
-}
-
-/* Discard from the stack the innermost frame,
-   restoring all saved registers.  */
-
-void
-i960_pop_frame (void)
-{
-  register struct frame_info *current_fi, *prev_fi;
-  register int i;
-  CORE_ADDR save_addr;
-  CORE_ADDR leaf_return_addr;
-  struct frame_saved_regs fsr;
-  char local_regs_buf[16 * 4];
-
-  current_fi = get_current_frame ();
-
-  /* First, undo what the hardware does when we return.
-     If this is a non-leaf procedure, restore local registers from
-     the save area in the calling frame.  Otherwise, load the return
-     address obtained from leafproc_return () into the rip.  */
-
-  leaf_return_addr = leafproc_return (current_fi->pc);
-  if (!leaf_return_addr)
-    {
-      /* Non-leaf procedure.  Restore local registers, incl IP.  */
-      prev_fi = get_prev_frame (current_fi);
-      read_memory (prev_fi->frame, local_regs_buf, sizeof (local_regs_buf));
-      write_register_bytes (REGISTER_BYTE (R0_REGNUM), local_regs_buf,
-			    sizeof (local_regs_buf));
-
-      /* Restore frame pointer.  */
-      write_register (FP_REGNUM, prev_fi->frame);
-    }
-  else
-    {
-      /* Leaf procedure.  Just restore the return address into the IP.  */
-      write_register (RIP_REGNUM, leaf_return_addr);
-    }
-
-  /* Now restore any global regs that the current function had saved. */
-  get_frame_saved_regs (current_fi, &fsr);
-  for (i = G0_REGNUM; i < G14_REGNUM; i++)
-    {
-      save_addr = fsr.regs[i];
-      if (save_addr != 0)
-	write_register (i, read_memory_integer (save_addr, 4));
-    }
-
-  /* Flush the frame cache, create a frame for the new innermost frame,
-     and make it the current frame.  */
-
-  flush_cached_frames ();
-}
-
-/* Given a 960 stop code (fault or trace), return the signal which
-   corresponds.  */
-
-enum target_signal
-i960_fault_to_signal (int fault)
-{
-  switch (fault)
-    {
-    case 0:
-      return TARGET_SIGNAL_BUS;	/* parallel fault */
-    case 1:
-      return TARGET_SIGNAL_UNKNOWN;
-    case 2:
-      return TARGET_SIGNAL_ILL;	/* operation fault */
-    case 3:
-      return TARGET_SIGNAL_FPE;	/* arithmetic fault */
-    case 4:
-      return TARGET_SIGNAL_FPE;	/* floating point fault */
-
-      /* constraint fault.  This appears not to distinguish between
-         a range constraint fault (which should be SIGFPE) and a privileged
-         fault (which should be SIGILL).  */
-    case 5:
-      return TARGET_SIGNAL_ILL;
-
-    case 6:
-      return TARGET_SIGNAL_SEGV;	/* virtual memory fault */
-
-      /* protection fault.  This is for an out-of-range argument to
-         "calls".  I guess it also could be SIGILL. */
-    case 7:
-      return TARGET_SIGNAL_SEGV;
-
-    case 8:
-      return TARGET_SIGNAL_BUS;	/* machine fault */
-    case 9:
-      return TARGET_SIGNAL_BUS;	/* structural fault */
-    case 0xa:
-      return TARGET_SIGNAL_ILL;	/* type fault */
-    case 0xb:
-      return TARGET_SIGNAL_UNKNOWN;	/* reserved fault */
-    case 0xc:
-      return TARGET_SIGNAL_BUS;	/* process fault */
-    case 0xd:
-      return TARGET_SIGNAL_SEGV;	/* descriptor fault */
-    case 0xe:
-      return TARGET_SIGNAL_BUS;	/* event fault */
-    case 0xf:
-      return TARGET_SIGNAL_UNKNOWN;	/* reserved fault */
-    case 0x10:
-      return TARGET_SIGNAL_TRAP;	/* single-step trace */
-    case 0x11:
-      return TARGET_SIGNAL_TRAP;	/* branch trace */
-    case 0x12:
-      return TARGET_SIGNAL_TRAP;	/* call trace */
-    case 0x13:
-      return TARGET_SIGNAL_TRAP;	/* return trace */
-    case 0x14:
-      return TARGET_SIGNAL_TRAP;	/* pre-return trace */
-    case 0x15:
-      return TARGET_SIGNAL_TRAP;	/* supervisor call trace */
-    case 0x16:
-      return TARGET_SIGNAL_TRAP;	/* breakpoint trace */
-    default:
-      return TARGET_SIGNAL_UNKNOWN;
-    }
-}
-
-/****************************************/
-/* MEM format                           */
-/****************************************/
-
-struct tabent
-{
-  char *name;
-  char numops;
-};
-
-/* Return instruction length, either 4 or 8.  When NOPRINT is non-zero
-   (TRUE), don't output any text.  (Actually, as implemented, if NOPRINT
-   is 0, abort() is called.) */
-
-static int
-mem (unsigned long memaddr, unsigned long word1, unsigned long word2,
-     int noprint)
-{
-  int i, j;
-  int len;
-  int mode;
-  int offset;
-  const char *reg1, *reg2, *reg3;
-
-  /* This lookup table is too sparse to make it worth typing in, but not
-   * so large as to make a sparse array necessary.  We allocate the
-   * table at runtime, initialize all entries to empty, and copy the
-   * real ones in from an initialization table.
-   *
-   * NOTE: In this table, the meaning of 'numops' is:
-   *       1: single operand
-   *       2: 2 operands, load instruction
-   *      -2: 2 operands, store instruction
-   */
-  static struct tabent *mem_tab = NULL;
-/* Opcodes of 0x8X, 9X, aX, bX, and cX must be in the table.  */
-#define MEM_MIN	0x80
-#define MEM_MAX	0xcf
-#define MEM_SIZ	((MEM_MAX-MEM_MIN+1) * sizeof(struct tabent))
-
-  static struct
-    {
-      int opcode;
-      char *name;
-      char numops;
-    }
-  mem_init[] =
-  {
-    0x80, "ldob", 2,
-      0x82, "stob", -2,
-      0x84, "bx", 1,
-      0x85, "balx", 2,
-      0x86, "callx", 1,
-      0x88, "ldos", 2,
-      0x8a, "stos", -2,
-      0x8c, "lda", 2,
-      0x90, "ld", 2,
-      0x92, "st", -2,
-      0x98, "ldl", 2,
-      0x9a, "stl", -2,
-      0xa0, "ldt", 2,
-      0xa2, "stt", -2,
-      0xb0, "ldq", 2,
-      0xb2, "stq", -2,
-      0xc0, "ldib", 2,
-      0xc2, "stib", -2,
-      0xc8, "ldis", 2,
-      0xca, "stis", -2,
-      0, NULL, 0
-  };
-
-  if (mem_tab == NULL)
-    {
-      mem_tab = (struct tabent *) xmalloc (MEM_SIZ);
-      memset (mem_tab, '\0', MEM_SIZ);
-      for (i = 0; mem_init[i].opcode != 0; i++)
-	{
-	  j = mem_init[i].opcode - MEM_MIN;
-	  mem_tab[j].name = mem_init[i].name;
-	  mem_tab[j].numops = mem_init[i].numops;
-	}
-    }
-
-  i = ((word1 >> 24) & 0xff) - MEM_MIN;
-  mode = (word1 >> 10) & 0xf;
-
-  if ((mem_tab[i].name != NULL)	/* Valid instruction */
-      && ((mode == 5) || (mode >= 12)))
-    {				/* With 32-bit displacement */
-      len = 8;
-    }
-  else
-    {
-      len = 4;
-    }
-
-  if (noprint)
-    {
-      return len;
-    }
-  internal_error (__FILE__, __LINE__, "failed internal consistency check");
-}
-
-/* Read the i960 instruction at 'memaddr' and return the address of 
-   the next instruction after that, or 0 if 'memaddr' is not the
-   address of a valid instruction.  The first word of the instruction
-   is stored at 'pword1', and the second word, if any, is stored at
-   'pword2'.  */
-
-static CORE_ADDR
-next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2)
-{
-  int len;
-  char buf[8];
-
-  /* Read the two (potential) words of the instruction at once,
-     to eliminate the overhead of two calls to read_memory ().
-     FIXME: Loses if the first one is readable but the second is not
-     (e.g. last word of the segment).  */
-
-  read_memory (memaddr, buf, 8);
-  *pword1 = extract_unsigned_integer (buf, 4);
-  *pword2 = extract_unsigned_integer (buf + 4, 4);
-
-  /* Divide instruction set into classes based on high 4 bits of opcode */
-
-  switch ((*pword1 >> 28) & 0xf)
-    {
-    case 0x0:
-    case 0x1:			/* ctrl */
-
-    case 0x2:
-    case 0x3:			/* cobr */
-
-    case 0x5:
-    case 0x6:
-    case 0x7:			/* reg */
-      len = 4;
-      break;
-
-    case 0x8:
-    case 0x9:
-    case 0xa:
-    case 0xb:
-    case 0xc:
-      len = mem (memaddr, *pword1, *pword2, 1);
-      break;
-
-    default:			/* invalid instruction */
-      len = 0;
-      break;
-    }
-
-  if (len)
-    return memaddr + len;
-  else
-    return 0;
-}
-
-/* 'start_frame' is a variable in the MON960 runtime startup routine
-   that contains the frame pointer of the 'start' routine (the routine
-   that calls 'main').  By reading its contents out of remote memory,
-   we can tell where the frame chain ends:  backtraces should halt before
-   they display this frame.  */
-
-int
-mon960_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
-{
-  struct symbol *sym;
-  struct minimal_symbol *msymbol;
-
-  /* crtmon960.o is an assembler module that is assumed to be linked
-   * first in an i80960 executable.  It contains the true entry point;
-   * it performs startup up initialization and then calls 'main'.
-   *
-   * 'sf' is the name of a variable in crtmon960.o that is set
-   *      during startup to the address of the first frame.
-   *
-   * 'a' is the address of that variable in 80960 memory.
-   */
-  static char sf[] = "start_frame";
-  CORE_ADDR a;
-
-
-  chain &= ~0x3f;		/* Zero low 6 bits because previous frame pointers
-				   contain return status info in them.  */
-  if (chain == 0)
-    {
-      return 0;
-    }
-
-  sym = lookup_symbol (sf, 0, VAR_NAMESPACE, (int *) NULL,
-		       (struct symtab **) NULL);
-  if (sym != 0)
-    {
-      a = SYMBOL_VALUE (sym);
-    }
-  else
-    {
-      msymbol = lookup_minimal_symbol (sf, NULL, NULL);
-      if (msymbol == NULL)
-	return 0;
-      a = SYMBOL_VALUE_ADDRESS (msymbol);
-    }
-
-  return (chain != read_memory_integer (a, 4));
-}
-
-
-void
-_initialize_i960_tdep (void)
-{
-  check_host ();
-
-  tm_print_insn = print_insn_i960;
-}
+// OBSOLETE /* Target-machine dependent code for the Intel 960
+// OBSOLETE 
+// OBSOLETE    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+// OBSOLETE    2001, 2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    Contributed by Intel Corporation.
+// OBSOLETE    examine_prologue and other parts contributed by Wind River Systems.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR next_insn (CORE_ADDR memaddr,
+// OBSOLETE 			    unsigned int *pword1, unsigned int *pword2);
+// OBSOLETE 
+// OBSOLETE struct type *
+// OBSOLETE i960_register_type (int regnum)
+// OBSOLETE {
+// OBSOLETE   if (regnum < FP0_REGNUM)
+// OBSOLETE     return builtin_type_int32;
+// OBSOLETE   else
+// OBSOLETE     return builtin_type_i960_ext;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Does the specified function use the "struct returning" convention
+// OBSOLETE    or the "value returning" convention?  The "value returning" convention
+// OBSOLETE    almost invariably returns the entire value in registers.  The
+// OBSOLETE    "struct returning" convention often returns the entire value in
+// OBSOLETE    memory, and passes a pointer (out of or into the function) saying
+// OBSOLETE    where the value (is or should go).
+// OBSOLETE 
+// OBSOLETE    Since this sometimes depends on whether it was compiled with GCC,
+// OBSOLETE    this is also an argument.  This is used in call_function to build a
+// OBSOLETE    stack, and in value_being_returned to print return values.
+// OBSOLETE 
+// OBSOLETE    On i960, a structure is returned in registers g0-g3, if it will fit.
+// OBSOLETE    If it's more than 16 bytes long, g13 pointed to it on entry.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE i960_use_struct_convention (int gcc_p, struct type *type)
+// OBSOLETE {
+// OBSOLETE   return (TYPE_LENGTH (type) > 16);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* gdb960 is always running on a non-960 host.  Check its characteristics.
+// OBSOLETE    This routine must be called as part of gdb initialization.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE check_host (void)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   static struct typestruct
+// OBSOLETE     {
+// OBSOLETE       int hostsize;		/* Size of type on host         */
+// OBSOLETE       int i960size;		/* Size of type on i960         */
+// OBSOLETE       char *typename;		/* Name of type, for error msg  */
+// OBSOLETE     }
+// OBSOLETE   types[] =
+// OBSOLETE   {
+// OBSOLETE     {
+// OBSOLETE       sizeof (short), 2, "short"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE     {
+// OBSOLETE       sizeof (int), 4, "int"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE     {
+// OBSOLETE       sizeof (long), 4, "long"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE     {
+// OBSOLETE       sizeof (float), 4, "float"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE     {
+// OBSOLETE       sizeof (double), 8, "double"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE     {
+// OBSOLETE       sizeof (char *), 4, "pointer"
+// OBSOLETE     }
+// OBSOLETE      ,
+// OBSOLETE   };
+// OBSOLETE #define TYPELEN	(sizeof(types) / sizeof(struct typestruct))
+// OBSOLETE 
+// OBSOLETE   /* Make sure that host type sizes are same as i960
+// OBSOLETE    */
+// OBSOLETE   for (i = 0; i < TYPELEN; i++)
+// OBSOLETE     {
+// OBSOLETE       if (types[i].hostsize != types[i].i960size)
+// OBSOLETE 	{
+// OBSOLETE 	  printf_unfiltered ("sizeof(%s) != %d:  PROCEED AT YOUR OWN RISK!\n",
+// OBSOLETE 			     types[i].typename, types[i].i960size);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Is this register part of the register window system?  A yes answer
+// OBSOLETE    implies that 1) The name of this register will not be the same in
+// OBSOLETE    other frames, and 2) This register is automatically "saved" upon
+// OBSOLETE    subroutine calls and thus there is no need to search more than one
+// OBSOLETE    stack frame for it.
+// OBSOLETE 
+// OBSOLETE    On the i960, in fact, the name of this register in another frame is
+// OBSOLETE    "mud" -- there is no overlap between the windows.  Each window is
+// OBSOLETE    simply saved into the stack (true for our purposes, after having been
+// OBSOLETE    flushed; normally they reside on-chip and are restored from on-chip
+// OBSOLETE    without ever going to memory).  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE register_in_window_p (int regnum)
+// OBSOLETE {
+// OBSOLETE   return regnum <= R15_REGNUM;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* i960_find_saved_register ()
+// OBSOLETE 
+// OBSOLETE    Return the address in which frame FRAME's value of register REGNUM
+// OBSOLETE    has been saved in memory.  Or return zero if it has not been saved.
+// OBSOLETE    If REGNUM specifies the SP, the value we return is actually the SP
+// OBSOLETE    value, not an address where it was saved.  */
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR
+// OBSOLETE i960_find_saved_register (struct frame_info *frame, int regnum)
+// OBSOLETE {
+// OBSOLETE   register struct frame_info *frame1 = NULL;
+// OBSOLETE   register CORE_ADDR addr = 0;
+// OBSOLETE 
+// OBSOLETE   if (frame == NULL)		/* No regs saved if want current frame */
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   /* We assume that a register in a register window will only be saved
+// OBSOLETE      in one place (since the name changes and/or disappears as you go
+// OBSOLETE      towards inner frames), so we only call get_frame_saved_regs on
+// OBSOLETE      the current frame.  This is directly in contradiction to the
+// OBSOLETE      usage below, which assumes that registers used in a frame must be
+// OBSOLETE      saved in a lower (more interior) frame.  This change is a result
+// OBSOLETE      of working on a register window machine; get_frame_saved_regs
+// OBSOLETE      always returns the registers saved within a frame, within the
+// OBSOLETE      context (register namespace) of that frame. */
+// OBSOLETE 
+// OBSOLETE   /* However, note that we don't want this to return anything if
+// OBSOLETE      nothing is saved (if there's a frame inside of this one).  Also,
+// OBSOLETE      callers to this routine asking for the stack pointer want the
+// OBSOLETE      stack pointer saved for *this* frame; this is returned from the
+// OBSOLETE      next frame.  */
+// OBSOLETE 
+// OBSOLETE   if (register_in_window_p (regnum))
+// OBSOLETE     {
+// OBSOLETE       frame1 = get_next_frame (frame);
+// OBSOLETE       if (!frame1)
+// OBSOLETE 	return 0;		/* Registers of this frame are active.  */
+// OBSOLETE 
+// OBSOLETE       /* Get the SP from the next frame in; it will be this
+// OBSOLETE          current frame.  */
+// OBSOLETE       if (regnum != SP_REGNUM)
+// OBSOLETE 	frame1 = frame;
+// OBSOLETE 
+// OBSOLETE       FRAME_INIT_SAVED_REGS (frame1);
+// OBSOLETE       return frame1->saved_regs[regnum];	/* ... which might be zero */
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Note that this next routine assumes that registers used in
+// OBSOLETE      frame x will be saved only in the frame that x calls and
+// OBSOLETE      frames interior to it.  This is not true on the sparc, but the
+// OBSOLETE      above macro takes care of it, so we should be all right. */
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       QUIT;
+// OBSOLETE       frame1 = get_next_frame (frame);
+// OBSOLETE       if (frame1 == 0)
+// OBSOLETE 	break;
+// OBSOLETE       frame = frame1;
+// OBSOLETE       FRAME_INIT_SAVED_REGS (frame1);
+// OBSOLETE       if (frame1->saved_regs[regnum])
+// OBSOLETE 	addr = frame1->saved_regs[regnum];
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return addr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* i960_get_saved_register ()
+// OBSOLETE 
+// OBSOLETE    Find register number REGNUM relative to FRAME and put its (raw,
+// OBSOLETE    target format) contents in *RAW_BUFFER.  Set *OPTIMIZED if the
+// OBSOLETE    variable was optimized out (and thus can't be fetched).  Set *LVAL
+// OBSOLETE    to lval_memory, lval_register, or not_lval, depending on whether
+// OBSOLETE    the value was fetched from memory, from a register, or in a strange
+// OBSOLETE    and non-modifiable way (e.g. a frame pointer which was calculated
+// OBSOLETE    rather than fetched).  Set *ADDRP to the address, either in memory
+// OBSOLETE    on as a REGISTER_BYTE offset into the registers array.
+// OBSOLETE 
+// OBSOLETE    Note that this implementation never sets *LVAL to not_lval.  But it
+// OBSOLETE    can be replaced by defining GET_SAVED_REGISTER and supplying your
+// OBSOLETE    own.
+// OBSOLETE 
+// OBSOLETE    The argument RAW_BUFFER must point to aligned memory.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE i960_get_saved_register (char *raw_buffer,
+// OBSOLETE 			 int *optimized,
+// OBSOLETE 			 CORE_ADDR *addrp,
+// OBSOLETE 			 struct frame_info *frame,
+// OBSOLETE 			 int regnum,
+// OBSOLETE 			 enum lval_type *lval)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR addr;
+// OBSOLETE 
+// OBSOLETE   if (!target_has_registers)
+// OBSOLETE     error ("No registers.");
+// OBSOLETE 
+// OBSOLETE   /* Normal systems don't optimize out things with register numbers.  */
+// OBSOLETE   if (optimized != NULL)
+// OBSOLETE     *optimized = 0;
+// OBSOLETE   addr = i960_find_saved_register (frame, regnum);
+// OBSOLETE   if (addr != 0)
+// OBSOLETE     {
+// OBSOLETE       if (lval != NULL)
+// OBSOLETE 	*lval = lval_memory;
+// OBSOLETE       if (regnum == SP_REGNUM)
+// OBSOLETE 	{
+// OBSOLETE 	  if (raw_buffer != NULL)
+// OBSOLETE 	    {
+// OBSOLETE 	      /* Put it back in target format.  */
+// OBSOLETE 	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
+// OBSOLETE 			     (LONGEST) addr);
+// OBSOLETE 	    }
+// OBSOLETE 	  if (addrp != NULL)
+// OBSOLETE 	    *addrp = 0;
+// OBSOLETE 	  return;
+// OBSOLETE 	}
+// OBSOLETE       if (raw_buffer != NULL)
+// OBSOLETE 	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       if (lval != NULL)
+// OBSOLETE 	*lval = lval_register;
+// OBSOLETE       addr = REGISTER_BYTE (regnum);
+// OBSOLETE       if (raw_buffer != NULL)
+// OBSOLETE 	read_register_gen (regnum, raw_buffer);
+// OBSOLETE     }
+// OBSOLETE   if (addrp != NULL)
+// OBSOLETE     *addrp = addr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Examine an i960 function prologue, recording the addresses at which
+// OBSOLETE    registers are saved explicitly by the prologue code, and returning
+// OBSOLETE    the address of the first instruction after the prologue (but not
+// OBSOLETE    after the instruction at address LIMIT, as explained below).
+// OBSOLETE 
+// OBSOLETE    LIMIT places an upper bound on addresses of the instructions to be
+// OBSOLETE    examined.  If the prologue code scan reaches LIMIT, the scan is
+// OBSOLETE    aborted and LIMIT is returned.  This is used, when examining the
+// OBSOLETE    prologue for the current frame, to keep examine_prologue () from
+// OBSOLETE    claiming that a given register has been saved when in fact the
+// OBSOLETE    instruction that saves it has not yet been executed.  LIMIT is used
+// OBSOLETE    at other times to stop the scan when we hit code after the true
+// OBSOLETE    function prologue (e.g. for the first source line) which might
+// OBSOLETE    otherwise be mistaken for function prologue.
+// OBSOLETE 
+// OBSOLETE    The format of the function prologue matched by this routine is
+// OBSOLETE    derived from examination of the source to gcc960 1.21, particularly
+// OBSOLETE    the routine i960_function_prologue ().  A "regular expression" for
+// OBSOLETE    the function prologue is given below:
+// OBSOLETE 
+// OBSOLETE    (lda LRn, g14
+// OBSOLETE    mov g14, g[0-7]
+// OBSOLETE    (mov 0, g14) | (lda 0, g14))?
+// OBSOLETE 
+// OBSOLETE    (mov[qtl]? g[0-15], r[4-15])*
+// OBSOLETE    ((addo [1-31], sp, sp) | (lda n(sp), sp))?
+// OBSOLETE    (st[qtl]? g[0-15], n(fp))*
+// OBSOLETE 
+// OBSOLETE    (cmpobne 0, g14, LFn
+// OBSOLETE    mov sp, g14
+// OBSOLETE    lda 0x30(sp), sp
+// OBSOLETE    LFn: stq g0, (g14)
+// OBSOLETE    stq g4, 0x10(g14)
+// OBSOLETE    stq g8, 0x20(g14))?
+// OBSOLETE 
+// OBSOLETE    (st g14, n(fp))?
+// OBSOLETE    (mov g13,r[4-15])?
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /* Macros for extracting fields from i960 instructions.  */
+// OBSOLETE 
+// OBSOLETE #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
+// OBSOLETE #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
+// OBSOLETE 
+// OBSOLETE #define REG_SRC1(insn)    EXTRACT_FIELD (insn, 0, 5)
+// OBSOLETE #define REG_SRC2(insn)    EXTRACT_FIELD (insn, 14, 5)
+// OBSOLETE #define REG_SRCDST(insn)  EXTRACT_FIELD (insn, 19, 5)
+// OBSOLETE #define MEM_SRCDST(insn)  EXTRACT_FIELD (insn, 19, 5)
+// OBSOLETE #define MEMA_OFFSET(insn) EXTRACT_FIELD (insn, 0, 12)
+// OBSOLETE 
+// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
+// OBSOLETE    is not the address of a valid instruction, the address of the next
+// OBSOLETE    instruction beyond ADDR otherwise.  *PWORD1 receives the first word
+// OBSOLETE    of the instruction, and (for two-word instructions), *PWORD2 receives
+// OBSOLETE    the second.  */
+// OBSOLETE 
+// OBSOLETE #define NEXT_PROLOGUE_INSN(addr, lim, pword1, pword2) \
+// OBSOLETE   (((addr) < (lim)) ? next_insn (addr, pword1, pword2) : 0)
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR
+// OBSOLETE examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
+// OBSOLETE 		  CORE_ADDR frame_addr, struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE   register CORE_ADDR next_ip;
+// OBSOLETE   register int src, dst;
+// OBSOLETE   register unsigned int *pcode;
+// OBSOLETE   unsigned int insn1, insn2;
+// OBSOLETE   int size;
+// OBSOLETE   int within_leaf_prologue;
+// OBSOLETE   CORE_ADDR save_addr;
+// OBSOLETE   static unsigned int varargs_prologue_code[] =
+// OBSOLETE   {
+// OBSOLETE     0x3507a00c,			/* cmpobne 0x0, g14, LFn */
+// OBSOLETE     0x5cf01601,			/* mov sp, g14           */
+// OBSOLETE     0x8c086030,			/* lda 0x30(sp), sp      */
+// OBSOLETE     0xb2879000,			/* LFn: stq  g0, (g14)   */
+// OBSOLETE     0xb2a7a010,			/* stq g4, 0x10(g14)     */
+// OBSOLETE     0xb2c7a020			/* stq g8, 0x20(g14)     */
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE   /* Accept a leaf procedure prologue code fragment if present.
+// OBSOLETE      Note that ip might point to either the leaf or non-leaf
+// OBSOLETE      entry point; we look for the non-leaf entry point first:  */
+// OBSOLETE 
+// OBSOLETE   within_leaf_prologue = 0;
+// OBSOLETE   if ((next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2))
+// OBSOLETE       && ((insn1 & 0xfffff000) == 0x8cf00000	/* lda LRx, g14 (MEMA) */
+// OBSOLETE 	  || (insn1 & 0xfffffc60) == 0x8cf03000))	/* lda LRx, g14 (MEMB) */
+// OBSOLETE     {
+// OBSOLETE       within_leaf_prologue = 1;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Now look for the prologue code at a leaf entry point:  */
+// OBSOLETE 
+// OBSOLETE   if (next_ip
+// OBSOLETE       && (insn1 & 0xff87ffff) == 0x5c80161e	/* mov g14, gx */
+// OBSOLETE       && REG_SRCDST (insn1) <= G0_REGNUM + 7)
+// OBSOLETE     {
+// OBSOLETE       within_leaf_prologue = 1;
+// OBSOLETE       if ((next_ip = NEXT_PROLOGUE_INSN (next_ip, limit, &insn1, &insn2))
+// OBSOLETE 	  && (insn1 == 0x8cf00000	/* lda 0, g14 */
+// OBSOLETE 	      || insn1 == 0x5cf01e00))	/* mov 0, g14 */
+// OBSOLETE 	{
+// OBSOLETE 	  ip = next_ip;
+// OBSOLETE 	  next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE 	  within_leaf_prologue = 0;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* If something that looks like the beginning of a leaf prologue
+// OBSOLETE      has been seen, but the remainder of the prologue is missing, bail.
+// OBSOLETE      We don't know what we've got.  */
+// OBSOLETE 
+// OBSOLETE   if (within_leaf_prologue)
+// OBSOLETE     return (ip);
+// OBSOLETE 
+// OBSOLETE   /* Accept zero or more instances of "mov[qtl]? gx, ry", where y >= 4.
+// OBSOLETE      This may cause us to mistake the moving of a register
+// OBSOLETE      parameter to a local register for the saving of a callee-saved
+// OBSOLETE      register, but that can't be helped, since with the
+// OBSOLETE      "-fcall-saved" flag, any register can be made callee-saved.  */
+// OBSOLETE 
+// OBSOLETE   while (next_ip
+// OBSOLETE 	 && (insn1 & 0xfc802fb0) == 0x5c000610
+// OBSOLETE 	 && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
+// OBSOLETE     {
+// OBSOLETE       src = REG_SRC1 (insn1);
+// OBSOLETE       size = EXTRACT_FIELD (insn1, 24, 2) + 1;
+// OBSOLETE       save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
+// OBSOLETE       while (size--)
+// OBSOLETE 	{
+// OBSOLETE 	  fsr->regs[src++] = save_addr;
+// OBSOLETE 	  save_addr += 4;
+// OBSOLETE 	}
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept an optional "addo n, sp, sp" or "lda n(sp), sp".  */
+// OBSOLETE 
+// OBSOLETE   if (next_ip &&
+// OBSOLETE       ((insn1 & 0xffffffe0) == 0x59084800	/* addo n, sp, sp */
+// OBSOLETE        || (insn1 & 0xfffff000) == 0x8c086000	/* lda n(sp), sp (MEMA) */
+// OBSOLETE        || (insn1 & 0xfffffc60) == 0x8c087400))	/* lda n(sp), sp (MEMB) */
+// OBSOLETE     {
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept zero or more instances of "st[qtl]? gx, n(fp)".  
+// OBSOLETE      This may cause us to mistake the copying of a register
+// OBSOLETE      parameter to the frame for the saving of a callee-saved
+// OBSOLETE      register, but that can't be helped, since with the
+// OBSOLETE      "-fcall-saved" flag, any register can be made callee-saved.
+// OBSOLETE      We can, however, refuse to accept a save of register g14,
+// OBSOLETE      since that is matched explicitly below.  */
+// OBSOLETE 
+// OBSOLETE   while (next_ip &&
+// OBSOLETE 	 ((insn1 & 0xf787f000) == 0x9287e000	/* stl? gx, n(fp) (MEMA) */
+// OBSOLETE 	  || (insn1 & 0xf787fc60) == 0x9287f400		/* stl? gx, n(fp) (MEMB) */
+// OBSOLETE 	  || (insn1 & 0xef87f000) == 0xa287e000		/* st[tq] gx, n(fp) (MEMA) */
+// OBSOLETE 	  || (insn1 & 0xef87fc60) == 0xa287f400)	/* st[tq] gx, n(fp) (MEMB) */
+// OBSOLETE 	 && ((src = MEM_SRCDST (insn1)) != G14_REGNUM))
+// OBSOLETE     {
+// OBSOLETE       save_addr = frame_addr + ((insn1 & BITMASK (12, 1))
+// OBSOLETE 				? insn2 : MEMA_OFFSET (insn1));
+// OBSOLETE       size = (insn1 & BITMASK (29, 1)) ? ((insn1 & BITMASK (28, 1)) ? 4 : 3)
+// OBSOLETE 	: ((insn1 & BITMASK (27, 1)) ? 2 : 1);
+// OBSOLETE       while (size--)
+// OBSOLETE 	{
+// OBSOLETE 	  fsr->regs[src++] = save_addr;
+// OBSOLETE 	  save_addr += 4;
+// OBSOLETE 	}
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept the varargs prologue code if present.  */
+// OBSOLETE 
+// OBSOLETE   size = sizeof (varargs_prologue_code) / sizeof (int);
+// OBSOLETE   pcode = varargs_prologue_code;
+// OBSOLETE   while (size-- && next_ip && *pcode++ == insn1)
+// OBSOLETE     {
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept an optional "st g14, n(fp)".  */
+// OBSOLETE 
+// OBSOLETE   if (next_ip &&
+// OBSOLETE       ((insn1 & 0xfffff000) == 0x92f7e000	/* st g14, n(fp) (MEMA) */
+// OBSOLETE        || (insn1 & 0xfffffc60) == 0x92f7f400))	/* st g14, n(fp) (MEMB) */
+// OBSOLETE     {
+// OBSOLETE       fsr->regs[G14_REGNUM] = frame_addr + ((insn1 & BITMASK (12, 1))
+// OBSOLETE 					    ? insn2 : MEMA_OFFSET (insn1));
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Accept zero or one instance of "mov g13, ry", where y >= 4.
+// OBSOLETE      This is saving the address where a struct should be returned.  */
+// OBSOLETE 
+// OBSOLETE   if (next_ip
+// OBSOLETE       && (insn1 & 0xff802fbf) == 0x5c00061d
+// OBSOLETE       && (dst = REG_SRCDST (insn1)) >= (R0_REGNUM + 4))
+// OBSOLETE     {
+// OBSOLETE       save_addr = frame_addr + ((dst - R0_REGNUM) * 4);
+// OBSOLETE       fsr->regs[G0_REGNUM + 13] = save_addr;
+// OBSOLETE       ip = next_ip;
+// OBSOLETE #if 0				/* We'll need this once there is a subsequent instruction examined. */
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn1, &insn2);
+// OBSOLETE #endif
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (ip);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given an ip value corresponding to the start of a function,
+// OBSOLETE    return the ip of the first instruction after the function 
+// OBSOLETE    prologue.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE i960_skip_prologue (CORE_ADDR ip)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs saved_regs_dummy;
+// OBSOLETE   struct symtab_and_line sal;
+// OBSOLETE   CORE_ADDR limit;
+// OBSOLETE 
+// OBSOLETE   sal = find_pc_line (ip, 0);
+// OBSOLETE   limit = (sal.end) ? sal.end : 0xffffffff;
+// OBSOLETE 
+// OBSOLETE   return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE    This includes special registers such as pc and fp saved in special
+// OBSOLETE    ways in the stack frame.  sp is even more special:
+// OBSOLETE    the address we return for it IS the sp for the next frame.
+// OBSOLETE 
+// OBSOLETE    We cache the result of doing this in the frame_obstack, since it is
+// OBSOLETE    fairly expensive.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE   register CORE_ADDR next_addr;
+// OBSOLETE   register CORE_ADDR *saved_regs;
+// OBSOLETE   register int regnum;
+// OBSOLETE   register struct frame_saved_regs *cache_fsr;
+// OBSOLETE   CORE_ADDR ip;
+// OBSOLETE   struct symtab_and_line sal;
+// OBSOLETE   CORE_ADDR limit;
+// OBSOLETE 
+// OBSOLETE   if (!fi->fsr)
+// OBSOLETE     {
+// OBSOLETE       cache_fsr = (struct frame_saved_regs *)
+// OBSOLETE 	frame_obstack_alloc (sizeof (struct frame_saved_regs));
+// OBSOLETE       memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
+// OBSOLETE       fi->fsr = cache_fsr;
+// OBSOLETE 
+// OBSOLETE       /* Find the start and end of the function prologue.  If the PC
+// OBSOLETE          is in the function prologue, we only consider the part that
+// OBSOLETE          has executed already.  */
+// OBSOLETE 
+// OBSOLETE       ip = get_pc_function_start (fi->pc);
+// OBSOLETE       sal = find_pc_line (ip, 0);
+// OBSOLETE       limit = (sal.end && sal.end < fi->pc) ? sal.end : fi->pc;
+// OBSOLETE 
+// OBSOLETE       examine_prologue (ip, limit, fi->frame, cache_fsr);
+// OBSOLETE 
+// OBSOLETE       /* Record the addresses at which the local registers are saved.
+// OBSOLETE          Strictly speaking, we should only do this for non-leaf procedures,
+// OBSOLETE          but no one will ever look at these values if it is a leaf procedure,
+// OBSOLETE          since local registers are always caller-saved.  */
+// OBSOLETE 
+// OBSOLETE       next_addr = (CORE_ADDR) fi->frame;
+// OBSOLETE       saved_regs = cache_fsr->regs;
+// OBSOLETE       for (regnum = R0_REGNUM; regnum <= R15_REGNUM; regnum++)
+// OBSOLETE 	{
+// OBSOLETE 	  *saved_regs++ = next_addr;
+// OBSOLETE 	  next_addr += 4;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       cache_fsr->regs[FP_REGNUM] = cache_fsr->regs[PFP_REGNUM];
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   *fsr = *fi->fsr;
+// OBSOLETE 
+// OBSOLETE   /* Fetch the value of the sp from memory every time, since it
+// OBSOLETE      is conceivable that it has changed since the cache was flushed.  
+// OBSOLETE      This unfortunately undoes much of the savings from caching the 
+// OBSOLETE      saved register values.  I suggest adding an argument to 
+// OBSOLETE      get_frame_saved_regs () specifying the register number we're
+// OBSOLETE      interested in (or -1 for all registers).  This would be passed
+// OBSOLETE      through to FRAME_FIND_SAVED_REGS (), permitting more efficient
+// OBSOLETE      computation of saved register addresses (e.g., on the i960,
+// OBSOLETE      we don't have to examine the prologue to find local registers). 
+// OBSOLETE      -- markf@wrs.com 
+// OBSOLETE      FIXME, we don't need to refetch this, since the cache is cleared
+// OBSOLETE      every time the child process is restarted.  If GDB itself
+// OBSOLETE      modifies SP, it has to clear the cache by hand (does it?).  -gnu */
+// OBSOLETE 
+// OBSOLETE   fsr->regs[SP_REGNUM] = read_memory_integer (fsr->regs[SP_REGNUM], 4);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the address of the argument block for the frame
+// OBSOLETE    described by FI.  Returns 0 if the address is unknown.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_args_address (struct frame_info *fi, int must_be_correct)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE   CORE_ADDR ap;
+// OBSOLETE 
+// OBSOLETE   /* If g14 was saved in the frame by the function prologue code, return
+// OBSOLETE      the saved value.  If the frame is current and we are being sloppy,
+// OBSOLETE      return the value of g14.  Otherwise, return zero.  */
+// OBSOLETE 
+// OBSOLETE   get_frame_saved_regs (fi, &fsr);
+// OBSOLETE   if (fsr.regs[G14_REGNUM])
+// OBSOLETE     ap = read_memory_integer (fsr.regs[G14_REGNUM], 4);
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       if (must_be_correct)
+// OBSOLETE 	return 0;		/* Don't cache this result */
+// OBSOLETE       if (get_next_frame (fi))
+// OBSOLETE 	ap = 0;
+// OBSOLETE       else
+// OBSOLETE 	ap = read_register (G14_REGNUM);
+// OBSOLETE       if (ap == 0)
+// OBSOLETE 	ap = fi->frame;
+// OBSOLETE     }
+// OBSOLETE   fi->arg_pointer = ap;		/* Cache it for next time */
+// OBSOLETE   return ap;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the address of the return struct for the frame
+// OBSOLETE    described by FI.  Returns 0 if the address is unknown.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_struct_result_address (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE   CORE_ADDR ap;
+// OBSOLETE 
+// OBSOLETE   /* If the frame is non-current, check to see if g14 was saved in the
+// OBSOLETE      frame by the function prologue code; return the saved value if so,
+// OBSOLETE      zero otherwise.  If the frame is current, return the value of g14.
+// OBSOLETE 
+// OBSOLETE      FIXME, shouldn't this use the saved value as long as we are past
+// OBSOLETE      the function prologue, and only use the current value if we have
+// OBSOLETE      no saved value and are at TOS?   -- gnu@cygnus.com */
+// OBSOLETE 
+// OBSOLETE   if (get_next_frame (fi))
+// OBSOLETE     {
+// OBSOLETE       get_frame_saved_regs (fi, &fsr);
+// OBSOLETE       if (fsr.regs[G13_REGNUM])
+// OBSOLETE 	ap = read_memory_integer (fsr.regs[G13_REGNUM], 4);
+// OBSOLETE       else
+// OBSOLETE 	ap = 0;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     ap = read_register (G13_REGNUM);
+// OBSOLETE 
+// OBSOLETE   return ap;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return address to which the currently executing leafproc will return,
+// OBSOLETE    or 0 if IP, the value of the instruction pointer from the currently
+// OBSOLETE    executing function, is not in a leafproc (or if we can't tell if it
+// OBSOLETE    is).
+// OBSOLETE 
+// OBSOLETE    Do this by finding the starting address of the routine in which IP lies.
+// OBSOLETE    If the instruction there is "mov g14, gx" (where x is in [0,7]), this
+// OBSOLETE    is a leafproc and the return address is in register gx.  Well, this is
+// OBSOLETE    true unless the return address points at a RET instruction in the current
+// OBSOLETE    procedure, which indicates that we have a 'dual entry' routine that
+// OBSOLETE    has been entered through the CALL entry point.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE leafproc_return (CORE_ADDR ip)
+// OBSOLETE {
+// OBSOLETE   register struct minimal_symbol *msymbol;
+// OBSOLETE   char *p;
+// OBSOLETE   int dst;
+// OBSOLETE   unsigned int insn1, insn2;
+// OBSOLETE   CORE_ADDR return_addr;
+// OBSOLETE 
+// OBSOLETE   if ((msymbol = lookup_minimal_symbol_by_pc (ip)) != NULL)
+// OBSOLETE     {
+// OBSOLETE       if ((p = strchr (SYMBOL_NAME (msymbol), '.')) && STREQ (p, ".lf"))
+// OBSOLETE 	{
+// OBSOLETE 	  if (next_insn (SYMBOL_VALUE_ADDRESS (msymbol), &insn1, &insn2)
+// OBSOLETE 	      && (insn1 & 0xff87ffff) == 0x5c80161e	/* mov g14, gx */
+// OBSOLETE 	      && (dst = REG_SRCDST (insn1)) <= G0_REGNUM + 7)
+// OBSOLETE 	    {
+// OBSOLETE 	      /* Get the return address.  If the "mov g14, gx" 
+// OBSOLETE 	         instruction hasn't been executed yet, read
+// OBSOLETE 	         the return address from g14; otherwise, read it
+// OBSOLETE 	         from the register into which g14 was moved.  */
+// OBSOLETE 
+// OBSOLETE 	      return_addr =
+// OBSOLETE 		read_register ((ip == SYMBOL_VALUE_ADDRESS (msymbol))
+// OBSOLETE 			       ? G14_REGNUM : dst);
+// OBSOLETE 
+// OBSOLETE 	      /* We know we are in a leaf procedure, but we don't know
+// OBSOLETE 	         whether the caller actually did a "bal" to the ".lf"
+// OBSOLETE 	         entry point, or a normal "call" to the non-leaf entry
+// OBSOLETE 	         point one instruction before.  In the latter case, the
+// OBSOLETE 	         return address will be the address of a "ret"
+// OBSOLETE 	         instruction within the procedure itself.  We test for
+// OBSOLETE 	         this below.  */
+// OBSOLETE 
+// OBSOLETE 	      if (!next_insn (return_addr, &insn1, &insn2)
+// OBSOLETE 		  || (insn1 & 0xff000000) != 0xa000000	/* ret */
+// OBSOLETE 		  || lookup_minimal_symbol_by_pc (return_addr) != msymbol)
+// OBSOLETE 		return (return_addr);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Immediately after a function call, return the saved pc.
+// OBSOLETE    Can't go through the frames for this because on some machines
+// OBSOLETE    the new frame is not set up until the new function executes
+// OBSOLETE    some instructions. 
+// OBSOLETE    On the i960, the frame *is* set up immediately after the call,
+// OBSOLETE    unless the function is a leaf procedure.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE saved_pc_after_call (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE   CORE_ADDR saved_pc;
+// OBSOLETE 
+// OBSOLETE   saved_pc = leafproc_return (get_frame_pc (frame));
+// OBSOLETE   if (!saved_pc)
+// OBSOLETE     saved_pc = FRAME_SAVED_PC (frame);
+// OBSOLETE 
+// OBSOLETE   return saved_pc;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Discard from the stack the innermost frame,
+// OBSOLETE    restoring all saved registers.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE i960_pop_frame (void)
+// OBSOLETE {
+// OBSOLETE   register struct frame_info *current_fi, *prev_fi;
+// OBSOLETE   register int i;
+// OBSOLETE   CORE_ADDR save_addr;
+// OBSOLETE   CORE_ADDR leaf_return_addr;
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE   char local_regs_buf[16 * 4];
+// OBSOLETE 
+// OBSOLETE   current_fi = get_current_frame ();
+// OBSOLETE 
+// OBSOLETE   /* First, undo what the hardware does when we return.
+// OBSOLETE      If this is a non-leaf procedure, restore local registers from
+// OBSOLETE      the save area in the calling frame.  Otherwise, load the return
+// OBSOLETE      address obtained from leafproc_return () into the rip.  */
+// OBSOLETE 
+// OBSOLETE   leaf_return_addr = leafproc_return (current_fi->pc);
+// OBSOLETE   if (!leaf_return_addr)
+// OBSOLETE     {
+// OBSOLETE       /* Non-leaf procedure.  Restore local registers, incl IP.  */
+// OBSOLETE       prev_fi = get_prev_frame (current_fi);
+// OBSOLETE       read_memory (prev_fi->frame, local_regs_buf, sizeof (local_regs_buf));
+// OBSOLETE       write_register_bytes (REGISTER_BYTE (R0_REGNUM), local_regs_buf,
+// OBSOLETE 			    sizeof (local_regs_buf));
+// OBSOLETE 
+// OBSOLETE       /* Restore frame pointer.  */
+// OBSOLETE       write_register (FP_REGNUM, prev_fi->frame);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* Leaf procedure.  Just restore the return address into the IP.  */
+// OBSOLETE       write_register (RIP_REGNUM, leaf_return_addr);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Now restore any global regs that the current function had saved. */
+// OBSOLETE   get_frame_saved_regs (current_fi, &fsr);
+// OBSOLETE   for (i = G0_REGNUM; i < G14_REGNUM; i++)
+// OBSOLETE     {
+// OBSOLETE       save_addr = fsr.regs[i];
+// OBSOLETE       if (save_addr != 0)
+// OBSOLETE 	write_register (i, read_memory_integer (save_addr, 4));
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Flush the frame cache, create a frame for the new innermost frame,
+// OBSOLETE      and make it the current frame.  */
+// OBSOLETE 
+// OBSOLETE   flush_cached_frames ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given a 960 stop code (fault or trace), return the signal which
+// OBSOLETE    corresponds.  */
+// OBSOLETE 
+// OBSOLETE enum target_signal
+// OBSOLETE i960_fault_to_signal (int fault)
+// OBSOLETE {
+// OBSOLETE   switch (fault)
+// OBSOLETE     {
+// OBSOLETE     case 0:
+// OBSOLETE       return TARGET_SIGNAL_BUS;	/* parallel fault */
+// OBSOLETE     case 1:
+// OBSOLETE       return TARGET_SIGNAL_UNKNOWN;
+// OBSOLETE     case 2:
+// OBSOLETE       return TARGET_SIGNAL_ILL;	/* operation fault */
+// OBSOLETE     case 3:
+// OBSOLETE       return TARGET_SIGNAL_FPE;	/* arithmetic fault */
+// OBSOLETE     case 4:
+// OBSOLETE       return TARGET_SIGNAL_FPE;	/* floating point fault */
+// OBSOLETE 
+// OBSOLETE       /* constraint fault.  This appears not to distinguish between
+// OBSOLETE          a range constraint fault (which should be SIGFPE) and a privileged
+// OBSOLETE          fault (which should be SIGILL).  */
+// OBSOLETE     case 5:
+// OBSOLETE       return TARGET_SIGNAL_ILL;
+// OBSOLETE 
+// OBSOLETE     case 6:
+// OBSOLETE       return TARGET_SIGNAL_SEGV;	/* virtual memory fault */
+// OBSOLETE 
+// OBSOLETE       /* protection fault.  This is for an out-of-range argument to
+// OBSOLETE          "calls".  I guess it also could be SIGILL. */
+// OBSOLETE     case 7:
+// OBSOLETE       return TARGET_SIGNAL_SEGV;
+// OBSOLETE 
+// OBSOLETE     case 8:
+// OBSOLETE       return TARGET_SIGNAL_BUS;	/* machine fault */
+// OBSOLETE     case 9:
+// OBSOLETE       return TARGET_SIGNAL_BUS;	/* structural fault */
+// OBSOLETE     case 0xa:
+// OBSOLETE       return TARGET_SIGNAL_ILL;	/* type fault */
+// OBSOLETE     case 0xb:
+// OBSOLETE       return TARGET_SIGNAL_UNKNOWN;	/* reserved fault */
+// OBSOLETE     case 0xc:
+// OBSOLETE       return TARGET_SIGNAL_BUS;	/* process fault */
+// OBSOLETE     case 0xd:
+// OBSOLETE       return TARGET_SIGNAL_SEGV;	/* descriptor fault */
+// OBSOLETE     case 0xe:
+// OBSOLETE       return TARGET_SIGNAL_BUS;	/* event fault */
+// OBSOLETE     case 0xf:
+// OBSOLETE       return TARGET_SIGNAL_UNKNOWN;	/* reserved fault */
+// OBSOLETE     case 0x10:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* single-step trace */
+// OBSOLETE     case 0x11:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* branch trace */
+// OBSOLETE     case 0x12:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* call trace */
+// OBSOLETE     case 0x13:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* return trace */
+// OBSOLETE     case 0x14:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* pre-return trace */
+// OBSOLETE     case 0x15:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* supervisor call trace */
+// OBSOLETE     case 0x16:
+// OBSOLETE       return TARGET_SIGNAL_TRAP;	/* breakpoint trace */
+// OBSOLETE     default:
+// OBSOLETE       return TARGET_SIGNAL_UNKNOWN;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /****************************************/
+// OBSOLETE /* MEM format                           */
+// OBSOLETE /****************************************/
+// OBSOLETE 
+// OBSOLETE struct tabent
+// OBSOLETE {
+// OBSOLETE   char *name;
+// OBSOLETE   char numops;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Return instruction length, either 4 or 8.  When NOPRINT is non-zero
+// OBSOLETE    (TRUE), don't output any text.  (Actually, as implemented, if NOPRINT
+// OBSOLETE    is 0, abort() is called.) */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE mem (unsigned long memaddr, unsigned long word1, unsigned long word2,
+// OBSOLETE      int noprint)
+// OBSOLETE {
+// OBSOLETE   int i, j;
+// OBSOLETE   int len;
+// OBSOLETE   int mode;
+// OBSOLETE   int offset;
+// OBSOLETE   const char *reg1, *reg2, *reg3;
+// OBSOLETE 
+// OBSOLETE   /* This lookup table is too sparse to make it worth typing in, but not
+// OBSOLETE    * so large as to make a sparse array necessary.  We allocate the
+// OBSOLETE    * table at runtime, initialize all entries to empty, and copy the
+// OBSOLETE    * real ones in from an initialization table.
+// OBSOLETE    *
+// OBSOLETE    * NOTE: In this table, the meaning of 'numops' is:
+// OBSOLETE    *       1: single operand
+// OBSOLETE    *       2: 2 operands, load instruction
+// OBSOLETE    *      -2: 2 operands, store instruction
+// OBSOLETE    */
+// OBSOLETE   static struct tabent *mem_tab = NULL;
+// OBSOLETE /* Opcodes of 0x8X, 9X, aX, bX, and cX must be in the table.  */
+// OBSOLETE #define MEM_MIN	0x80
+// OBSOLETE #define MEM_MAX	0xcf
+// OBSOLETE #define MEM_SIZ	((MEM_MAX-MEM_MIN+1) * sizeof(struct tabent))
+// OBSOLETE 
+// OBSOLETE   static struct
+// OBSOLETE     {
+// OBSOLETE       int opcode;
+// OBSOLETE       char *name;
+// OBSOLETE       char numops;
+// OBSOLETE     }
+// OBSOLETE   mem_init[] =
+// OBSOLETE   {
+// OBSOLETE     0x80, "ldob", 2,
+// OBSOLETE       0x82, "stob", -2,
+// OBSOLETE       0x84, "bx", 1,
+// OBSOLETE       0x85, "balx", 2,
+// OBSOLETE       0x86, "callx", 1,
+// OBSOLETE       0x88, "ldos", 2,
+// OBSOLETE       0x8a, "stos", -2,
+// OBSOLETE       0x8c, "lda", 2,
+// OBSOLETE       0x90, "ld", 2,
+// OBSOLETE       0x92, "st", -2,
+// OBSOLETE       0x98, "ldl", 2,
+// OBSOLETE       0x9a, "stl", -2,
+// OBSOLETE       0xa0, "ldt", 2,
+// OBSOLETE       0xa2, "stt", -2,
+// OBSOLETE       0xb0, "ldq", 2,
+// OBSOLETE       0xb2, "stq", -2,
+// OBSOLETE       0xc0, "ldib", 2,
+// OBSOLETE       0xc2, "stib", -2,
+// OBSOLETE       0xc8, "ldis", 2,
+// OBSOLETE       0xca, "stis", -2,
+// OBSOLETE       0, NULL, 0
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE   if (mem_tab == NULL)
+// OBSOLETE     {
+// OBSOLETE       mem_tab = (struct tabent *) xmalloc (MEM_SIZ);
+// OBSOLETE       memset (mem_tab, '\0', MEM_SIZ);
+// OBSOLETE       for (i = 0; mem_init[i].opcode != 0; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  j = mem_init[i].opcode - MEM_MIN;
+// OBSOLETE 	  mem_tab[j].name = mem_init[i].name;
+// OBSOLETE 	  mem_tab[j].numops = mem_init[i].numops;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   i = ((word1 >> 24) & 0xff) - MEM_MIN;
+// OBSOLETE   mode = (word1 >> 10) & 0xf;
+// OBSOLETE 
+// OBSOLETE   if ((mem_tab[i].name != NULL)	/* Valid instruction */
+// OBSOLETE       && ((mode == 5) || (mode >= 12)))
+// OBSOLETE     {				/* With 32-bit displacement */
+// OBSOLETE       len = 8;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       len = 4;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (noprint)
+// OBSOLETE     {
+// OBSOLETE       return len;
+// OBSOLETE     }
+// OBSOLETE   internal_error (__FILE__, __LINE__, "failed internal consistency check");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read the i960 instruction at 'memaddr' and return the address of 
+// OBSOLETE    the next instruction after that, or 0 if 'memaddr' is not the
+// OBSOLETE    address of a valid instruction.  The first word of the instruction
+// OBSOLETE    is stored at 'pword1', and the second word, if any, is stored at
+// OBSOLETE    'pword2'.  */
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR
+// OBSOLETE next_insn (CORE_ADDR memaddr, unsigned int *pword1, unsigned int *pword2)
+// OBSOLETE {
+// OBSOLETE   int len;
+// OBSOLETE   char buf[8];
+// OBSOLETE 
+// OBSOLETE   /* Read the two (potential) words of the instruction at once,
+// OBSOLETE      to eliminate the overhead of two calls to read_memory ().
+// OBSOLETE      FIXME: Loses if the first one is readable but the second is not
+// OBSOLETE      (e.g. last word of the segment).  */
+// OBSOLETE 
+// OBSOLETE   read_memory (memaddr, buf, 8);
+// OBSOLETE   *pword1 = extract_unsigned_integer (buf, 4);
+// OBSOLETE   *pword2 = extract_unsigned_integer (buf + 4, 4);
+// OBSOLETE 
+// OBSOLETE   /* Divide instruction set into classes based on high 4 bits of opcode */
+// OBSOLETE 
+// OBSOLETE   switch ((*pword1 >> 28) & 0xf)
+// OBSOLETE     {
+// OBSOLETE     case 0x0:
+// OBSOLETE     case 0x1:			/* ctrl */
+// OBSOLETE 
+// OBSOLETE     case 0x2:
+// OBSOLETE     case 0x3:			/* cobr */
+// OBSOLETE 
+// OBSOLETE     case 0x5:
+// OBSOLETE     case 0x6:
+// OBSOLETE     case 0x7:			/* reg */
+// OBSOLETE       len = 4;
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case 0x8:
+// OBSOLETE     case 0x9:
+// OBSOLETE     case 0xa:
+// OBSOLETE     case 0xb:
+// OBSOLETE     case 0xc:
+// OBSOLETE       len = mem (memaddr, *pword1, *pword2, 1);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:			/* invalid instruction */
+// OBSOLETE       len = 0;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (len)
+// OBSOLETE     return memaddr + len;
+// OBSOLETE   else
+// OBSOLETE     return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* 'start_frame' is a variable in the MON960 runtime startup routine
+// OBSOLETE    that contains the frame pointer of the 'start' routine (the routine
+// OBSOLETE    that calls 'main').  By reading its contents out of remote memory,
+// OBSOLETE    we can tell where the frame chain ends:  backtraces should halt before
+// OBSOLETE    they display this frame.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE mon960_frame_chain_valid (CORE_ADDR chain, struct frame_info *curframe)
+// OBSOLETE {
+// OBSOLETE   struct symbol *sym;
+// OBSOLETE   struct minimal_symbol *msymbol;
+// OBSOLETE 
+// OBSOLETE   /* crtmon960.o is an assembler module that is assumed to be linked
+// OBSOLETE    * first in an i80960 executable.  It contains the true entry point;
+// OBSOLETE    * it performs startup up initialization and then calls 'main'.
+// OBSOLETE    *
+// OBSOLETE    * 'sf' is the name of a variable in crtmon960.o that is set
+// OBSOLETE    *      during startup to the address of the first frame.
+// OBSOLETE    *
+// OBSOLETE    * 'a' is the address of that variable in 80960 memory.
+// OBSOLETE    */
+// OBSOLETE   static char sf[] = "start_frame";
+// OBSOLETE   CORE_ADDR a;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   chain &= ~0x3f;		/* Zero low 6 bits because previous frame pointers
+// OBSOLETE 				   contain return status info in them.  */
+// OBSOLETE   if (chain == 0)
+// OBSOLETE     {
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   sym = lookup_symbol (sf, 0, VAR_NAMESPACE, (int *) NULL,
+// OBSOLETE 		       (struct symtab **) NULL);
+// OBSOLETE   if (sym != 0)
+// OBSOLETE     {
+// OBSOLETE       a = SYMBOL_VALUE (sym);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       msymbol = lookup_minimal_symbol (sf, NULL, NULL);
+// OBSOLETE       if (msymbol == NULL)
+// OBSOLETE 	return 0;
+// OBSOLETE       a = SYMBOL_VALUE_ADDRESS (msymbol);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (chain != read_memory_integer (a, 4));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_i960_tdep (void)
+// OBSOLETE {
+// OBSOLETE   check_host ();
+// OBSOLETE 
+// OBSOLETE   tm_print_insn = print_insn_i960;
+// OBSOLETE }
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index ab7e467..1874194 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -96,12 +96,11 @@
 static gdbarch_skip_prologue_ftype ia64_skip_prologue;
 static gdbarch_frame_init_saved_regs_ftype ia64_frame_init_saved_regs;
 static gdbarch_get_saved_register_ftype ia64_get_saved_register;
-static gdbarch_extract_return_value_ftype ia64_extract_return_value;
-static gdbarch_extract_struct_value_address_ftype ia64_extract_struct_value_address;
+static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
+static gdbarch_deprecated_extract_struct_value_address_ftype ia64_extract_struct_value_address;
 static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
 static gdbarch_frameless_function_invocation_ftype ia64_frameless_function_invocation;
 static gdbarch_init_extra_frame_info_ftype ia64_init_extra_frame_info;
-static gdbarch_store_return_value_ftype ia64_store_return_value;
 static gdbarch_store_struct_return_ftype ia64_store_struct_return;
 static gdbarch_push_arguments_ftype ia64_push_arguments;
 static gdbarch_push_return_address_ftype ia64_push_return_address;
@@ -243,7 +242,7 @@
 #define FIND_GLOBAL_POINTER \
   (gdbarch_tdep (current_gdbarch)->find_global_pointer)
 
-static char *
+static const char *
 ia64_register_name (int reg)
 {
   return ia64_register_names[reg];
@@ -2190,11 +2189,11 @@
   set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
 
   set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
-  set_gdbarch_extract_return_value (gdbarch, ia64_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
 
   set_gdbarch_store_struct_return (gdbarch, ia64_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, ia64_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, ia64_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
 
   set_gdbarch_memory_insert_breakpoint (gdbarch, ia64_memory_insert_breakpoint);
   set_gdbarch_memory_remove_breakpoint (gdbarch, ia64_memory_remove_breakpoint);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 400ac55..4333325 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -40,6 +40,7 @@
 #include "ui-out.h"
 #include "event-top.h"
 #include "parser-defs.h"
+#include "regcache.h"
 
 /* Functions exported for general use: */
 
@@ -969,7 +970,7 @@
    will eventually be popped when we do hit the dummy end breakpoint).  */
 
 int
-run_stack_dummy (CORE_ADDR addr, char *buffer)
+run_stack_dummy (CORE_ADDR addr, struct regcache *buffer)
 {
   struct cleanup *old_cleanups = make_cleanup (null_cleanup, 0);
   int saved_async = 0;
@@ -1042,8 +1043,7 @@
     return 2;
 
   /* On normal return, the stack dummy has been popped already.  */
-
-  memcpy (buffer, stop_registers, REGISTER_BYTES);
+  regcache_cpy_no_passthrough (buffer, stop_registers);
   return 0;
 }
 
@@ -1549,32 +1549,48 @@
 #ifdef REGISTER_NAMES
 char *gdb_register_names[] = REGISTER_NAMES;
 #endif
-/* Print out the machine register regnum. If regnum is -1,
-   print all registers (fpregs == 1) or all non-float registers
-   (fpregs == 0).
+/* Print out the machine register regnum. If regnum is -1, print all
+   registers (print_all == 1) or all non-float and non-vector
+   registers (print_all == 0).
 
    For most machines, having all_registers_info() print the
-   register(s) one per line is good enough. If a different format
-   is required, (eg, for MIPS or Pyramid 90x, which both have
-   lots of regs), or there is an existing convention for showing
-   all the registers, define the macro DO_REGISTERS_INFO(regnum, fp)
-   to provide that format.  */
+   register(s) one per line is good enough.  If a different format is
+   required, (eg, for MIPS or Pyramid 90x, which both have lots of
+   regs), or there is an existing convention for showing all the
+   registers, define the architecture method PRINT_REGISTERS_INFO to
+   provide that format.  */
 
 void
-do_registers_info (int regnum, int fpregs)
+default_print_registers_info (struct gdbarch *gdbarch,
+			      struct ui_file *file,
+			      struct frame_info *frame,
+			      int regnum, int print_all)
 {
-  register int i;
-  int numregs = NUM_REGS + NUM_PSEUDO_REGS;
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
+  int i;
+  const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+  char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+  /* FIXME: cagney/2002-03-08: This should be deprecated.  */
+  if (DO_REGISTERS_INFO_P ())
+    {
+      DO_REGISTERS_INFO (regnum, print_all);
+      return;
+    }
 
   for (i = 0; i < numregs; i++)
     {
-      /* Decide between printing all regs, nonfloat regs, or specific reg.  */
+      /* Decide between printing all regs, non-float / vector regs, or
+         specific reg.  */
       if (regnum == -1)
 	{
-	  if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT && !fpregs)
-	    continue;
+	  if (!print_all)
+	    {
+	      if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+		continue;
+	      if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+		continue;
+	    }
 	}
       else
 	{
@@ -1587,16 +1603,19 @@
       if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
 	continue;
 
-      fputs_filtered (REGISTER_NAME (i), gdb_stdout);
-      print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), gdb_stdout);
+      fputs_filtered (REGISTER_NAME (i), file);
+      print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
 
       /* Get the data in raw format.  */
-      if (! frame_register_read (selected_frame, i, raw_buffer))
+      if (! frame_register_read (frame, i, raw_buffer))
 	{
-	  printf_filtered ("*value not available*\n");
+	  fprintf_filtered (file, "*value not available*\n");
 	  continue;
 	}
 
+      /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+         The function frame_register_read() should have returned the
+         pre-cooked register so no conversion is necessary.  */
       /* Convert raw data to virtual format if necessary.  */
       if (REGISTER_CONVERTIBLE (i))
 	{
@@ -1609,31 +1628,40 @@
 		  REGISTER_VIRTUAL_SIZE (i));
 	}
 
-      /* If virtual format is floating, print it that way, and in raw hex.  */
+      /* If virtual format is floating, print it that way, and in raw
+         hex.  */
       if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
 	{
-	  register int j;
+	  int j;
 
 	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-		     gdb_stdout, 0, 1, 0, Val_pretty_default);
+		     file, 0, 1, 0, Val_pretty_default);
 
-	  printf_filtered ("\t(raw 0x");
+	  fprintf_filtered (file, "\t(raw 0x");
 	  for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
 	    {
-	      register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
-	      : REGISTER_RAW_SIZE (i) - 1 - j;
-	      printf_filtered ("%02x", (unsigned char) raw_buffer[idx]);
+	      int idx;
+	      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+		idx = j;
+	      else
+		idx = REGISTER_RAW_SIZE (i) - 1 - j;
+	      fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
 	    }
-	  printf_filtered (")");
+	  fprintf_filtered (file, ")");
 	}
-      /* Else print as integer in hex and in decimal.  */
       else
 	{
+	  /* Print the register in hex.  */
 	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
 		     gdb_stdout, 'x', 1, 0, Val_pretty_default);
-	  printf_filtered ("\t");
-	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-		     gdb_stdout, 0, 1, 0, Val_pretty_default);
+          /* If not a vector register, print it also according to its
+             natural format.  */
+	  if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+	    {
+	      printf_filtered ("\t");
+	      val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+			 gdb_stdout, 0, 1, 0, Val_pretty_default);
+	    }
 	}
 
       /* The SPARC wants to print even-numbered float regs as doubles
@@ -1642,7 +1670,7 @@
       PRINT_REGISTER_HOOK (i);
 #endif
 
-      printf_filtered ("\n");
+      fprintf_filtered (file, "\n");
     }
 }
 
@@ -1659,7 +1687,8 @@
 
   if (!addr_exp)
     {
-      DO_REGISTERS_INFO (-1, fpregs);
+      gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+				    selected_frame, -1, fpregs);
       return;
     }
 
@@ -1684,7 +1713,8 @@
 	error ("%.*s: invalid register", (int) (end - addr_exp), addr_exp);
 
     found:
-      DO_REGISTERS_INFO (regnum, fpregs);
+      gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+				    selected_frame, regnum, fpregs);
 
       addr_exp = end;
       while (*addr_exp == ' ' || *addr_exp == '\t')
@@ -1704,6 +1734,41 @@
 {
   registers_info (addr_exp, 0);
 }
+
+static void
+print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
+		   struct frame_info *frame, const char *args)
+{
+  if (gdbarch_print_vector_info_p (gdbarch))
+    gdbarch_print_vector_info (gdbarch, file, frame, args);
+  else
+    {
+      int regnum;
+      int printed_something = 0;
+
+      if (!target_has_registers)
+	error ("The program has no registers now.");
+      if (selected_frame == NULL)
+	error ("No selected frame.");
+
+      for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+	{
+	  if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (regnum)))
+	    {
+	      printed_something = 1;
+	      gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
+	    }
+	}
+      if (!printed_something)
+	fprintf_filtered (file, "No vector information\n");
+    }
+}
+
+static void
+vector_info (char *args, int from_tty)
+{
+  print_vector_info (current_gdbarch, gdb_stdout, selected_frame, args);
+}
 
 
 /*
@@ -1845,9 +1910,46 @@
 
 /* ARGSUSED */
 static void
-float_info (char *addr_exp, int from_tty)
+print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+		  struct frame_info *frame, const char *args)
 {
-  PRINT_FLOAT_INFO ();
+  if (gdbarch_print_float_info_p (gdbarch))
+    gdbarch_print_float_info (gdbarch, file, frame, args);
+  else
+    {
+#ifdef FLOAT_INFO
+#if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
+#error "FLOAT_INFO defined in multi-arch"
+#endif
+      FLOAT_INFO;
+#else
+      int regnum;
+      int printed_something = 0;
+
+      if (!target_has_registers)
+	error ("The program has no registers now.");
+      if (selected_frame == NULL)
+	error ("No selected frame.");
+
+      for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+	{
+	  if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+	    {
+	      printed_something = 1;
+	      gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
+	    }
+	}
+      if (!printed_something)
+	fprintf_filtered (file, "\
+No floating-point info available for this processor.\n");
+#endif
+    }
+}
+
+static void
+float_info (char *args, int from_tty)
+{
+  print_float_info (current_gdbarch, gdb_stdout, selected_frame, args);
 }
 
 /* ARGSUSED */
@@ -2042,6 +2144,9 @@
   add_info ("float", float_info,
 	    "Print the status of the floating point unit\n");
 
+  add_info ("vector", vector_info,
+	    "Print the status of the vector unit\n");
+
   inferior_environ = make_environ ();
   init_environ (inferior_environ);
 }
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 2c05f35..e875e9c 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -24,6 +24,7 @@
 #define INFERIOR_H 1
 
 struct gdbarch;
+struct regcache;
 
 /* For bpstat.  */
 #include "breakpoint.h"
@@ -153,7 +154,7 @@
 
 extern void terminal_ours (void);
 
-extern int run_stack_dummy (CORE_ADDR, char *);
+extern int run_stack_dummy (CORE_ADDR , struct regcache *);
 
 extern CORE_ADDR read_pc (void);
 
@@ -204,7 +205,10 @@
 
 /* From misc files */
 
-extern void do_registers_info (int, int);
+extern void default_print_registers_info (struct gdbarch *gdbarch,
+					  struct ui_file *file,
+					  struct frame_info *frame,
+					  int regnum, int all);
 
 extern void store_inferior_registers (int);
 
@@ -396,7 +400,7 @@
    Thus this contains the return value from the called function (assuming
    values are returned in a register).  */
 
-extern char *stop_registers;
+extern struct regcache *stop_registers;
 
 /* Nonzero if the child process in inferior_ptid was attached rather
    than forked.  */
diff --git a/gdb/infrun.c b/gdb/infrun.c
index e9fea2a..b6c2342 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -60,11 +60,7 @@
 static void delete_breakpoint_current_contents (void *);
 
 static void set_follow_fork_mode_command (char *arg, int from_tty,
-					  struct cmd_list_element * c);
-
-static struct inferior_status *xmalloc_inferior_status (void);
-
-static void free_inferior_status (struct inferior_status *);
+					  struct cmd_list_element *c);
 
 static int restore_selected_frame (void *);
 
@@ -78,7 +74,7 @@
 static void follow_vfork (int parent_pid, int child_pid);
 
 static void set_schedlock_func (char *args, int from_tty,
-				struct cmd_list_element * c);
+				struct cmd_list_element *c);
 
 struct execution_control_state;
 
@@ -177,13 +173,6 @@
 #define SKIP_SOLIB_RESOLVER(pc) 0
 #endif
 
-/* In some shared library schemes, the return path from a shared library
-   call may need to go through a trampoline too.  */
-
-#ifndef IN_SOLIB_RETURN_TRAMPOLINE
-#define IN_SOLIB_RETURN_TRAMPOLINE(pc,name)	0
-#endif
-
 /* This function returns TRUE if pc is the address of an instruction
    that lies within the dynamic linker (such as the event hook, or the
    dld itself).
@@ -219,7 +208,7 @@
    instruction.  This macro should expand to a pointer to a function that
    does that, or zero if we have no such function.  If we don't have a
    definition for it, we have to report an error.  */
-#ifndef SKIP_PERMANENT_BREAKPOINT 
+#ifndef SKIP_PERMANENT_BREAKPOINT
 #define SKIP_PERMANENT_BREAKPOINT (default_skip_permanent_breakpoint)
 static void
 default_skip_permanent_breakpoint (void)
@@ -230,7 +219,7 @@
 a command like `return' or `jump' to continue execution.");
 }
 #endif
-   
+
 
 /* Convert the #defines into values.  This is temporary until wfi control
    flow is completely sorted out.  */
@@ -341,7 +330,7 @@
    Thus this contains the return value from the called function (assuming
    values are returned in a register).  */
 
-char *stop_registers;
+struct regcache *stop_registers;
 
 /* Nonzero if program stopped due to error trying to insert breakpoints.  */
 
@@ -373,19 +362,19 @@
    followed at the next resume of the inferior, and not
    immediately. */
 static struct
+{
+  enum target_waitkind kind;
+  struct
   {
-    enum target_waitkind kind;
-    struct
-      {
-	int parent_pid;
-	int saw_parent_fork;
-	int child_pid;
-	int saw_child_fork;
-	int saw_child_exec;
-      }
-    fork_event;
-    char *execd_pathname;
+    int parent_pid;
+    int saw_parent_fork;
+    int child_pid;
+    int saw_child_fork;
+    int saw_child_exec;
   }
+  fork_event;
+  char *execd_pathname;
+}
 pending_follow;
 
 /* Some platforms don't allow us to do anything meaningful with a
@@ -408,8 +397,7 @@
 static const char follow_fork_mode_child[] = "child";
 static const char follow_fork_mode_parent[] = "parent";
 
-static const char *follow_fork_mode_kind_names[] =
-{
+static const char *follow_fork_mode_kind_names[] = {
   follow_fork_mode_ask,
   /* ??rehrauer: The "both" option is broken, by what may be a 10.20
      kernel problem.  It's also not terribly useful without a GUI to
@@ -516,8 +504,7 @@
          from the breakpoint package's viewpoint, that's a switch of
          "threads".  We must update the bp's notion of which thread
          it is for, or it'll be ignored when it triggers... */
-      if (step_resume_breakpoint &&
-	  (!has_vforked || !follow_vfork_when_exec))
+      if (step_resume_breakpoint && (!has_vforked || !follow_vfork_when_exec))
 	breakpoint_re_set_thread (step_resume_breakpoint);
 
       /* Reinsert all breakpoints in the child.  (The user may've set
@@ -581,9 +568,7 @@
   if (has_vforked)
     {
       target_post_follow_vfork (parent_pid,
-				followed_parent,
-				child_pid,
-				followed_child);
+				followed_parent, child_pid, followed_child);
     }
 
   pending_follow.fork_event.saw_parent_fork = 0;
@@ -634,7 +619,7 @@
     {
       pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
       follow_vfork (PIDGET (inferior_ptid),
-                    pending_follow.fork_event.child_pid);
+		    pending_follow.fork_event.child_pid);
       follow_vfork_when_exec = 0;
       saved_pid = PIDGET (inferior_ptid);
 
@@ -690,7 +675,7 @@
   gdb_flush (gdb_stdout);
   target_mourn_inferior ();
   inferior_ptid = pid_to_ptid (saved_pid);
-  			/* Because mourn_inferior resets inferior_ptid. */
+  /* Because mourn_inferior resets inferior_ptid. */
   push_target (tgt);
 
   /* That a.out is now the one to use. */
@@ -738,8 +723,7 @@
 static const char schedlock_on[] = "on";
 static const char schedlock_step[] = "step";
 static const char *scheduler_mode = schedlock_off;
-static const char *scheduler_enums[] =
-{
+static const char *scheduler_enums[] = {
   schedlock_off,
   schedlock_on,
   schedlock_step,
@@ -761,8 +745,7 @@
     if (!target_can_lock_scheduler)
       {
 	scheduler_mode = schedlock_off;
-	error ("Target '%s' cannot support this command.",
-	       target_shortname);
+	error ("Target '%s' cannot support this command.", target_shortname);
       }
 }
 
@@ -795,7 +778,7 @@
      step anyway.  */
   if (CANNOT_STEP_HW_WATCHPOINTS && step && breakpoints_inserted)
     remove_hw_watchpoints ();
-     
+
 
   /* Normally, by the time we reach `resume', the breakpoints are either
      removed or inserted, as appropriate.  The exception is if we're sitting
@@ -827,7 +810,7 @@
     case (TARGET_WAITKIND_FORKED):
       pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
       follow_fork (PIDGET (inferior_ptid),
-                   pending_follow.fork_event.child_pid);
+		   pending_follow.fork_event.child_pid);
       break;
 
     case (TARGET_WAITKIND_VFORKED):
@@ -836,7 +819,7 @@
 
 	pending_follow.kind = TARGET_WAITKIND_SPURIOUS;
 	follow_vfork (PIDGET (inferior_ptid),
-	              pending_follow.fork_event.child_pid);
+		      pending_follow.fork_event.child_pid);
 
 	/* Did we follow the child, but not yet see the child's exec event?
 	   If so, then it actually ought to be waiting for us; we respond to
@@ -866,7 +849,7 @@
     {
       ptid_t resume_ptid;
 
-      resume_ptid = RESUME_ALL;		/* Default */
+      resume_ptid = RESUME_ALL;	/* Default */
 
       if ((step || singlestep_breakpoints_inserted_p) &&
 	  !breakpoints_inserted && breakpoint_here_p (read_pc ()))
@@ -880,17 +863,17 @@
 	}
 
       if ((scheduler_mode == schedlock_on) ||
-	  (scheduler_mode == schedlock_step && 
+	  (scheduler_mode == schedlock_step &&
 	   (step || singlestep_breakpoints_inserted_p)))
 	{
 	  /* User-settable 'scheduler' mode requires solo thread resume. */
-	    resume_ptid = inferior_ptid;
+	  resume_ptid = inferior_ptid;
 	}
 
 #ifdef CANNOT_STEP_BREAKPOINT
       /* Most targets can step a breakpoint instruction, thus executing it
-	 normally.  But if this one cannot, just continue and we will hit
-	 it anyway.  */
+         normally.  But if this one cannot, just continue and we will hit
+         it anyway.  */
       if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
 	step = 0;
 #endif
@@ -1007,16 +990,9 @@
     trap_expected = 1;
   else
     {
-      int temp = insert_breakpoints ();
-      if (temp)
-	{
-	  print_sys_errmsg ("insert_breakpoints", temp);
-	  error ("Cannot insert breakpoints.\n\
-The same program may be running in another process,\n\
-or you may have requested too many hardware\n\
-breakpoints and/or watchpoints.\n");
-	}
-
+      insert_breakpoints ();
+      /* If we get here there was no call to error() in 
+	 insert breakpoints -- so they were inserted.  */
       breakpoints_inserted = 1;
     }
 
@@ -1161,36 +1137,36 @@
    locals in handle_inferior_event.  */
 
 struct execution_control_state
-  {
-    struct target_waitstatus ws;
-    struct target_waitstatus *wp;
-    int another_trap;
-    int random_signal;
-    CORE_ADDR stop_func_start;
-    CORE_ADDR stop_func_end;
-    char *stop_func_name;
-    struct symtab_and_line sal;
-    int remove_breakpoints_on_following_step;
-    int current_line;
-    struct symtab *current_symtab;
-    int handling_longjmp;	/* FIXME */
-    ptid_t ptid;
-    ptid_t saved_inferior_ptid;
-    int update_step_sp;
-    int stepping_through_solib_after_catch;
-    bpstat stepping_through_solib_catchpoints;
-    int enable_hw_watchpoints_after_wait;
-    int stepping_through_sigtramp;
-    int new_thread_event;
-    struct target_waitstatus tmpstatus;
-    enum infwait_states infwait_state;
-    ptid_t waiton_ptid;
-    int wait_some_more;
-  };
+{
+  struct target_waitstatus ws;
+  struct target_waitstatus *wp;
+  int another_trap;
+  int random_signal;
+  CORE_ADDR stop_func_start;
+  CORE_ADDR stop_func_end;
+  char *stop_func_name;
+  struct symtab_and_line sal;
+  int remove_breakpoints_on_following_step;
+  int current_line;
+  struct symtab *current_symtab;
+  int handling_longjmp;		/* FIXME */
+  ptid_t ptid;
+  ptid_t saved_inferior_ptid;
+  int update_step_sp;
+  int stepping_through_solib_after_catch;
+  bpstat stepping_through_solib_catchpoints;
+  int enable_hw_watchpoints_after_wait;
+  int stepping_through_sigtramp;
+  int new_thread_event;
+  struct target_waitstatus tmpstatus;
+  enum infwait_states infwait_state;
+  ptid_t waiton_ptid;
+  int wait_some_more;
+};
 
-void init_execution_control_state (struct execution_control_state * ecs);
+void init_execution_control_state (struct execution_control_state *ecs);
 
-void handle_inferior_event (struct execution_control_state * ecs);
+void handle_inferior_event (struct execution_control_state *ecs);
 
 static void check_sigtramp2 (struct execution_control_state *ecs);
 static void step_into_function (struct execution_control_state *ecs);
@@ -1198,7 +1174,8 @@
 static void stop_stepping (struct execution_control_state *ecs);
 static void prepare_to_wait (struct execution_control_state *ecs);
 static void keep_going (struct execution_control_state *ecs);
-static void print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info);
+static void print_stop_reason (enum inferior_stop_reason stop_reason,
+			       int stop_info);
 
 /* Wait for control to return from inferior to debugger.
    If inferior gets a signal, we may decide to start it up again
@@ -1275,7 +1252,7 @@
 
   if (!async_ecs->wait_some_more)
     {
-      old_cleanups = make_exec_cleanup (delete_step_resume_breakpoint, 
+      old_cleanups = make_exec_cleanup (delete_step_resume_breakpoint,
 					&step_resume_breakpoint);
       make_exec_cleanup (delete_breakpoint_current_contents,
 			 &through_sigtramp_breakpoint);
@@ -1298,7 +1275,8 @@
     }
 
   if (target_wait_hook)
-    async_ecs->ptid = target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
+    async_ecs->ptid =
+      target_wait_hook (async_ecs->waiton_ptid, async_ecs->wp);
   else
     async_ecs->ptid = target_wait (async_ecs->waiton_ptid, async_ecs->wp);
 
@@ -1308,8 +1286,8 @@
   if (!async_ecs->wait_some_more)
     {
       /* Do only the cleanups that have been added by this
-	 function. Let the continuations for the commands do the rest,
-	 if there are any. */
+         function. Let the continuations for the commands do the rest,
+         if there are any. */
       do_exec_cleanups (old_cleanups);
       normal_stop ();
       if (step_multi && stop_step)
@@ -1350,7 +1328,8 @@
 check_for_old_step_resume_breakpoint (void)
 {
   if (step_resume_breakpoint)
-    warning ("GDB bug: infrun.c (wait_for_inferior): dropping old step_resume breakpoint");
+    warning
+      ("GDB bug: infrun.c (wait_for_inferior): dropping old step_resume breakpoint");
 }
 
 /* Return the cached copy of the last pid/waitstatus returned by
@@ -1359,7 +1338,7 @@
    target_wait()/target_wait_hook().  */
 
 void
-get_last_target_status(ptid_t *ptidp, struct target_waitstatus *status)
+get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status)
 {
   *ptidp = target_last_wait_ptid;
   *status = target_last_waitstatus;
@@ -1377,32 +1356,30 @@
      mishandling thread creation.  */
 
   if (in_thread_list (inferior_ptid) && in_thread_list (ecs->ptid))
-    { /* Perform infrun state context switch: */
+    {				/* Perform infrun state context switch: */
       /* Save infrun state for the old thread.  */
-      save_infrun_state (inferior_ptid, prev_pc, 
-			 prev_func_start, prev_func_name, 
+      save_infrun_state (inferior_ptid, prev_pc,
+			 prev_func_start, prev_func_name,
 			 trap_expected, step_resume_breakpoint,
-			 through_sigtramp_breakpoint, step_range_start, 
-			 step_range_end, step_frame_address, 
+			 through_sigtramp_breakpoint, step_range_start,
+			 step_range_end, step_frame_address,
 			 ecs->handling_longjmp, ecs->another_trap,
 			 ecs->stepping_through_solib_after_catch,
 			 ecs->stepping_through_solib_catchpoints,
 			 ecs->stepping_through_sigtramp,
-			 ecs->current_line, ecs->current_symtab, 
-			 step_sp);
+			 ecs->current_line, ecs->current_symtab, step_sp);
 
       /* Load infrun state for the new thread.  */
-      load_infrun_state (ecs->ptid, &prev_pc, 
-			 &prev_func_start, &prev_func_name, 
+      load_infrun_state (ecs->ptid, &prev_pc,
+			 &prev_func_start, &prev_func_name,
 			 &trap_expected, &step_resume_breakpoint,
-			 &through_sigtramp_breakpoint, &step_range_start, 
-			 &step_range_end, &step_frame_address, 
+			 &through_sigtramp_breakpoint, &step_range_start,
+			 &step_range_end, &step_frame_address,
 			 &ecs->handling_longjmp, &ecs->another_trap,
 			 &ecs->stepping_through_solib_after_catch,
 			 &ecs->stepping_through_solib_catchpoints,
-			 &ecs->stepping_through_sigtramp, 
-			 &ecs->current_line, &ecs->current_symtab,
-			 &step_sp);
+			 &ecs->stepping_through_sigtramp,
+			 &ecs->current_line, &ecs->current_symtab, &step_sp);
     }
   inferior_ptid = ecs->ptid;
 }
@@ -1417,508 +1394,521 @@
 {
   CORE_ADDR tmp;
   int stepped_after_stopped_by_watchpoint;
+  int sw_single_step_trap_p = 0;
 
   /* Cache the last pid/waitstatus. */
   target_last_wait_ptid = ecs->ptid;
   target_last_waitstatus = *ecs->wp;
 
-  /* Keep this extra brace for now, minimizes diffs.  */
-  {
-    switch (ecs->infwait_state)
-      {
-      case infwait_thread_hop_state:
-	/* Cancel the waiton_ptid. */
-	ecs->waiton_ptid = pid_to_ptid (-1);
-	/* Fall thru to the normal_state case. */
+  switch (ecs->infwait_state)
+    {
+    case infwait_thread_hop_state:
+      /* Cancel the waiton_ptid. */
+      ecs->waiton_ptid = pid_to_ptid (-1);
+      /* Fall thru to the normal_state case. */
 
-      case infwait_normal_state:
-	/* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
-	   is serviced in this loop, below. */
-	if (ecs->enable_hw_watchpoints_after_wait)
-	  {
-	    TARGET_ENABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
-	    ecs->enable_hw_watchpoints_after_wait = 0;
-	  }
-	stepped_after_stopped_by_watchpoint = 0;
-	break;
+    case infwait_normal_state:
+      /* See comments where a TARGET_WAITKIND_SYSCALL_RETURN event
+         is serviced in this loop, below. */
+      if (ecs->enable_hw_watchpoints_after_wait)
+	{
+	  TARGET_ENABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
+	  ecs->enable_hw_watchpoints_after_wait = 0;
+	}
+      stepped_after_stopped_by_watchpoint = 0;
+      break;
 
-      case infwait_nullified_state:
-	break;
+    case infwait_nullified_state:
+      break;
 
-      case infwait_nonstep_watch_state:
-	insert_breakpoints ();
+    case infwait_nonstep_watch_state:
+      insert_breakpoints ();
 
-	/* FIXME-maybe: is this cleaner than setting a flag?  Does it
-	   handle things like signals arriving and other things happening
-	   in combination correctly?  */
-	stepped_after_stopped_by_watchpoint = 1;
-	break;
-      }
-    ecs->infwait_state = infwait_normal_state;
+      /* FIXME-maybe: is this cleaner than setting a flag?  Does it
+         handle things like signals arriving and other things happening
+         in combination correctly?  */
+      stepped_after_stopped_by_watchpoint = 1;
+      break;
+    }
+  ecs->infwait_state = infwait_normal_state;
 
-    flush_cached_frames ();
+  flush_cached_frames ();
 
-    /* If it's a new process, add it to the thread database */
+  /* If it's a new process, add it to the thread database */
 
-    ecs->new_thread_event = (! ptid_equal (ecs->ptid, inferior_ptid) 
-                             && ! in_thread_list (ecs->ptid));
+  ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid)
+			   && !in_thread_list (ecs->ptid));
 
-    if (ecs->ws.kind != TARGET_WAITKIND_EXITED
-	&& ecs->ws.kind != TARGET_WAITKIND_SIGNALLED
-	&& ecs->new_thread_event)
-      {
-	add_thread (ecs->ptid);
+  if (ecs->ws.kind != TARGET_WAITKIND_EXITED
+      && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && ecs->new_thread_event)
+    {
+      add_thread (ecs->ptid);
 
-	ui_out_text (uiout, "[New ");
-	ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
-	ui_out_text (uiout, "]\n");
+      ui_out_text (uiout, "[New ");
+      ui_out_text (uiout, target_pid_or_tid_to_str (ecs->ptid));
+      ui_out_text (uiout, "]\n");
 
 #if 0
-	/* NOTE: This block is ONLY meant to be invoked in case of a
-	   "thread creation event"!  If it is invoked for any other
-	   sort of event (such as a new thread landing on a breakpoint),
-	   the event will be discarded, which is almost certainly
-	   a bad thing!
+      /* NOTE: This block is ONLY meant to be invoked in case of a
+         "thread creation event"!  If it is invoked for any other
+         sort of event (such as a new thread landing on a breakpoint),
+         the event will be discarded, which is almost certainly
+         a bad thing!
 
-	   To avoid this, the low-level module (eg. target_wait)
-	   should call in_thread_list and add_thread, so that the
-	   new thread is known by the time we get here.  */
+         To avoid this, the low-level module (eg. target_wait)
+         should call in_thread_list and add_thread, so that the
+         new thread is known by the time we get here.  */
 
-	/* We may want to consider not doing a resume here in order
-	   to give the user a chance to play with the new thread.
-	   It might be good to make that a user-settable option.  */
+      /* We may want to consider not doing a resume here in order
+         to give the user a chance to play with the new thread.
+         It might be good to make that a user-settable option.  */
 
-	/* At this point, all threads are stopped (happens
-	   automatically in either the OS or the native code).
-	   Therefore we need to continue all threads in order to
-	   make progress.  */
+      /* At this point, all threads are stopped (happens
+         automatically in either the OS or the native code).
+         Therefore we need to continue all threads in order to
+         make progress.  */
 
-	target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
-	prepare_to_wait (ecs);
-	return;
+      target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
+      prepare_to_wait (ecs);
+      return;
 #endif
-      }
+    }
 
-    switch (ecs->ws.kind)
-      {
-      case TARGET_WAITKIND_LOADED:
-	/* Ignore gracefully during startup of the inferior, as it
-	   might be the shell which has just loaded some objects,
-	   otherwise add the symbols for the newly loaded objects.  */
+  switch (ecs->ws.kind)
+    {
+    case TARGET_WAITKIND_LOADED:
+      /* Ignore gracefully during startup of the inferior, as it
+         might be the shell which has just loaded some objects,
+         otherwise add the symbols for the newly loaded objects.  */
 #ifdef SOLIB_ADD
-	if (!stop_soon_quietly)
-	  {
-	    /* Remove breakpoints, SOLIB_ADD might adjust
-	       breakpoint addresses via breakpoint_re_set.  */
-	    if (breakpoints_inserted)
-	      remove_breakpoints ();
+      if (!stop_soon_quietly)
+	{
+	  /* Remove breakpoints, SOLIB_ADD might adjust
+	     breakpoint addresses via breakpoint_re_set.  */
+	  if (breakpoints_inserted)
+	    remove_breakpoints ();
 
-	    /* Check for any newly added shared libraries if we're
-	       supposed to be adding them automatically.  Switch
-	       terminal for any messages produced by
-	       breakpoint_re_set.  */
-	    target_terminal_ours_for_output ();
-	    SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
-	    target_terminal_inferior ();
+	  /* Check for any newly added shared libraries if we're
+	     supposed to be adding them automatically.  Switch
+	     terminal for any messages produced by
+	     breakpoint_re_set.  */
+	  target_terminal_ours_for_output ();
+	  SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
+	  target_terminal_inferior ();
 
-	    /* Reinsert breakpoints and continue.  */
-	    if (breakpoints_inserted)
-	      insert_breakpoints ();
-	  }
+	  /* Reinsert breakpoints and continue.  */
+	  if (breakpoints_inserted)
+	    insert_breakpoints ();
+	}
 #endif
-	resume (0, TARGET_SIGNAL_0);
-	prepare_to_wait (ecs);
-	return;
+      resume (0, TARGET_SIGNAL_0);
+      prepare_to_wait (ecs);
+      return;
 
-      case TARGET_WAITKIND_SPURIOUS:
-	resume (0, TARGET_SIGNAL_0);
-	prepare_to_wait (ecs);
-	return;
+    case TARGET_WAITKIND_SPURIOUS:
+      resume (0, TARGET_SIGNAL_0);
+      prepare_to_wait (ecs);
+      return;
 
-      case TARGET_WAITKIND_EXITED:
-	target_terminal_ours ();	/* Must do this before mourn anyway */
-	print_stop_reason (EXITED, ecs->ws.value.integer);
+    case TARGET_WAITKIND_EXITED:
+      target_terminal_ours ();	/* Must do this before mourn anyway */
+      print_stop_reason (EXITED, ecs->ws.value.integer);
 
-	/* Record the exit code in the convenience variable $_exitcode, so
-	   that the user can inspect this again later.  */
-	set_internalvar (lookup_internalvar ("_exitcode"),
-			 value_from_longest (builtin_type_int,
-					  (LONGEST) ecs->ws.value.integer));
-	gdb_flush (gdb_stdout);
-	target_mourn_inferior ();
-	singlestep_breakpoints_inserted_p = 0;	/*SOFTWARE_SINGLE_STEP_P() */
-	stop_print_frame = 0;
-	stop_stepping (ecs);
-	return;
+      /* Record the exit code in the convenience variable $_exitcode, so
+         that the user can inspect this again later.  */
+      set_internalvar (lookup_internalvar ("_exitcode"),
+		       value_from_longest (builtin_type_int,
+					   (LONGEST) ecs->ws.value.integer));
+      gdb_flush (gdb_stdout);
+      target_mourn_inferior ();
+      singlestep_breakpoints_inserted_p = 0;	/*SOFTWARE_SINGLE_STEP_P() */
+      stop_print_frame = 0;
+      stop_stepping (ecs);
+      return;
 
-      case TARGET_WAITKIND_SIGNALLED:
-	stop_print_frame = 0;
-	stop_signal = ecs->ws.value.sig;
-	target_terminal_ours ();	/* Must do this before mourn anyway */
+    case TARGET_WAITKIND_SIGNALLED:
+      stop_print_frame = 0;
+      stop_signal = ecs->ws.value.sig;
+      target_terminal_ours ();	/* Must do this before mourn anyway */
 
-	/* Note: By definition of TARGET_WAITKIND_SIGNALLED, we shouldn't
-	   reach here unless the inferior is dead.  However, for years
-	   target_kill() was called here, which hints that fatal signals aren't
-	   really fatal on some systems.  If that's true, then some changes
-	   may be needed. */
-	target_mourn_inferior ();
+      /* Note: By definition of TARGET_WAITKIND_SIGNALLED, we shouldn't
+         reach here unless the inferior is dead.  However, for years
+         target_kill() was called here, which hints that fatal signals aren't
+         really fatal on some systems.  If that's true, then some changes
+         may be needed. */
+      target_mourn_inferior ();
 
-	print_stop_reason (SIGNAL_EXITED, stop_signal);
-	singlestep_breakpoints_inserted_p = 0;	/*SOFTWARE_SINGLE_STEP_P() */
-	stop_stepping (ecs);
-	return;
+      print_stop_reason (SIGNAL_EXITED, stop_signal);
+      singlestep_breakpoints_inserted_p = 0;	/*SOFTWARE_SINGLE_STEP_P() */
+      stop_stepping (ecs);
+      return;
 
-	/* The following are the only cases in which we keep going;
-	   the above cases end in a continue or goto. */
-      case TARGET_WAITKIND_FORKED:
-	stop_signal = TARGET_SIGNAL_TRAP;
-	pending_follow.kind = ecs->ws.kind;
+      /* The following are the only cases in which we keep going;
+         the above cases end in a continue or goto. */
+    case TARGET_WAITKIND_FORKED:
+      stop_signal = TARGET_SIGNAL_TRAP;
+      pending_follow.kind = ecs->ws.kind;
 
-	/* Ignore fork events reported for the parent; we're only
-	   interested in reacting to forks of the child.  Note that
-	   we expect the child's fork event to be available if we
-	   waited for it now. */
-	if (ptid_equal (inferior_ptid, ecs->ptid))
-	  {
-	    pending_follow.fork_event.saw_parent_fork = 1;
-	    pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
-	    pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
-	    prepare_to_wait (ecs);
-	    return;
-	  }
-	else
-	  {
-	    pending_follow.fork_event.saw_child_fork = 1;
-	    pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
-	    pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
-	  }
+      /* Ignore fork events reported for the parent; we're only
+         interested in reacting to forks of the child.  Note that
+         we expect the child's fork event to be available if we
+         waited for it now. */
+      if (ptid_equal (inferior_ptid, ecs->ptid))
+	{
+	  pending_follow.fork_event.saw_parent_fork = 1;
+	  pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
+	  pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
+	  prepare_to_wait (ecs);
+	  return;
+	}
+      else
+	{
+	  pending_follow.fork_event.saw_child_fork = 1;
+	  pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
+	  pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
+	}
 
-	stop_pc = read_pc_pid (ecs->ptid);
-	ecs->saved_inferior_ptid = inferior_ptid;
-	inferior_ptid = ecs->ptid;
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc != 
-					  stop_pc - DECR_PC_AFTER_BREAK);
-	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
-	inferior_ptid = ecs->saved_inferior_ptid;
-	goto process_event_stop_test;
+      stop_pc = read_pc_pid (ecs->ptid);
+      ecs->saved_inferior_ptid = inferior_ptid;
+      inferior_ptid = ecs->ptid;
+      /* The second argument of bpstat_stop_status is meant to help
+         distinguish between a breakpoint trap and a singlestep trap.
+         This is only important on targets where DECR_PC_AFTER_BREAK
+         is non-zero.  The prev_pc test is meant to distinguish between
+         singlestepping a trap instruction, and singlestepping thru a
+         jump to the instruction following a trap instruction. */
 
-	/* If this a platform which doesn't allow a debugger to touch a
-	   vfork'd inferior until after it exec's, then we'd best keep
-	   our fingers entirely off the inferior, other than continuing
-	   it.  This has the unfortunate side-effect that catchpoints
-	   of vforks will be ignored.  But since the platform doesn't
-	   allow the inferior be touched at vfork time, there's really
-	   little choice. */
-      case TARGET_WAITKIND_VFORKED:
-	stop_signal = TARGET_SIGNAL_TRAP;
-	pending_follow.kind = ecs->ws.kind;
+      stop_bpstat = bpstat_stop_status (&stop_pc,
+					currently_stepping (ecs) &&
+					prev_pc !=
+					stop_pc - DECR_PC_AFTER_BREAK);
+      ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
+      inferior_ptid = ecs->saved_inferior_ptid;
+      goto process_event_stop_test;
 
-	/* Is this a vfork of the parent?  If so, then give any
-	   vfork catchpoints a chance to trigger now.  (It's
-	   dangerous to do so if the child canot be touched until
-	   it execs, and the child has not yet exec'd.  We probably
-	   should warn the user to that effect when the catchpoint
-	   triggers...) */
-	if (ptid_equal (ecs->ptid, inferior_ptid))
-	  {
-	    pending_follow.fork_event.saw_parent_fork = 1;
-	    pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
-	    pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
-	  }
+      /* If this a platform which doesn't allow a debugger to touch a
+         vfork'd inferior until after it exec's, then we'd best keep
+         our fingers entirely off the inferior, other than continuing
+         it.  This has the unfortunate side-effect that catchpoints
+         of vforks will be ignored.  But since the platform doesn't
+         allow the inferior be touched at vfork time, there's really
+         little choice. */
+    case TARGET_WAITKIND_VFORKED:
+      stop_signal = TARGET_SIGNAL_TRAP;
+      pending_follow.kind = ecs->ws.kind;
 
-	/* If we've seen the child's vfork event but cannot really touch
-	   the child until it execs, then we must continue the child now.
-	   Else, give any vfork catchpoints a chance to trigger now. */
-	else
-	  {
-	    pending_follow.fork_event.saw_child_fork = 1;
-	    pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
-	    pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
-	    target_post_startup_inferior (
-	      pid_to_ptid (pending_follow.fork_event.child_pid));
-	    follow_vfork_when_exec = !target_can_follow_vfork_prior_to_exec ();
-	    if (follow_vfork_when_exec)
-	      {
-		target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
-		prepare_to_wait (ecs);
-		return;
-	      }
-	  }
+      /* Is this a vfork of the parent?  If so, then give any
+         vfork catchpoints a chance to trigger now.  (It's
+         dangerous to do so if the child canot be touched until
+         it execs, and the child has not yet exec'd.  We probably
+         should warn the user to that effect when the catchpoint
+         triggers...) */
+      if (ptid_equal (ecs->ptid, inferior_ptid))
+	{
+	  pending_follow.fork_event.saw_parent_fork = 1;
+	  pending_follow.fork_event.parent_pid = PIDGET (ecs->ptid);
+	  pending_follow.fork_event.child_pid = ecs->ws.value.related_pid;
+	}
 
-	stop_pc = read_pc ();
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc !=
-					  stop_pc - DECR_PC_AFTER_BREAK);
-	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
-	goto process_event_stop_test;
+      /* If we've seen the child's vfork event but cannot really touch
+         the child until it execs, then we must continue the child now.
+         Else, give any vfork catchpoints a chance to trigger now. */
+      else
+	{
+	  pending_follow.fork_event.saw_child_fork = 1;
+	  pending_follow.fork_event.child_pid = PIDGET (ecs->ptid);
+	  pending_follow.fork_event.parent_pid = ecs->ws.value.related_pid;
+	  target_post_startup_inferior (pid_to_ptid
+					(pending_follow.fork_event.
+					 child_pid));
+	  follow_vfork_when_exec = !target_can_follow_vfork_prior_to_exec ();
+	  if (follow_vfork_when_exec)
+	    {
+	      target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
+	      prepare_to_wait (ecs);
+	      return;
+	    }
+	}
 
-      case TARGET_WAITKIND_EXECD:
-	stop_signal = TARGET_SIGNAL_TRAP;
+      stop_pc = read_pc ();
+      /* The second argument of bpstat_stop_status is meant to help
+         distinguish between a breakpoint trap and a singlestep trap.
+         This is only important on targets where DECR_PC_AFTER_BREAK
+         is non-zero.  The prev_pc test is meant to distinguish between
+         singlestepping a trap instruction, and singlestepping thru a
+         jump to the instruction following a trap instruction. */
 
-	/* Is this a target which reports multiple exec events per actual
-	   call to exec()?  (HP-UX using ptrace does, for example.)  If so,
-	   ignore all but the last one.  Just resume the exec'r, and wait
-	   for the next exec event. */
-	if (inferior_ignoring_leading_exec_events)
-	  {
-	    inferior_ignoring_leading_exec_events--;
-	    if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
-	      ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.parent_pid);
-	    target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
-	    prepare_to_wait (ecs);
-	    return;
-	  }
-	inferior_ignoring_leading_exec_events =
-	  target_reported_exec_events_per_exec_call () - 1;
+      stop_bpstat = bpstat_stop_status (&stop_pc,
+					currently_stepping (ecs) &&
+					prev_pc !=
+					stop_pc - DECR_PC_AFTER_BREAK);
+      ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
+      goto process_event_stop_test;
 
-	pending_follow.execd_pathname =
-	  savestring (ecs->ws.value.execd_pathname,
-		      strlen (ecs->ws.value.execd_pathname));
+    case TARGET_WAITKIND_EXECD:
+      stop_signal = TARGET_SIGNAL_TRAP;
 
-	/* Did inferior_ptid exec, or did a (possibly not-yet-followed)
-	   child of a vfork exec?
+      /* Is this a target which reports multiple exec events per actual
+         call to exec()?  (HP-UX using ptrace does, for example.)  If so,
+         ignore all but the last one.  Just resume the exec'r, and wait
+         for the next exec event. */
+      if (inferior_ignoring_leading_exec_events)
+	{
+	  inferior_ignoring_leading_exec_events--;
+	  if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
+	    ENSURE_VFORKING_PARENT_REMAINS_STOPPED (pending_follow.fork_event.
+						    parent_pid);
+	  target_resume (ecs->ptid, 0, TARGET_SIGNAL_0);
+	  prepare_to_wait (ecs);
+	  return;
+	}
+      inferior_ignoring_leading_exec_events =
+	target_reported_exec_events_per_exec_call () - 1;
 
-	   ??rehrauer: This is unabashedly an HP-UX specific thing.  On
-	   HP-UX, events associated with a vforking inferior come in
-	   threes: a vfork event for the child (always first), followed
-	   a vfork event for the parent and an exec event for the child.
-	   The latter two can come in either order.
+      pending_follow.execd_pathname =
+	savestring (ecs->ws.value.execd_pathname,
+		    strlen (ecs->ws.value.execd_pathname));
 
-	   If we get the parent vfork event first, life's good: We follow
-	   either the parent or child, and then the child's exec event is
-	   a "don't care".
+      /* Did inferior_ptid exec, or did a (possibly not-yet-followed)
+         child of a vfork exec?
 
-	   But if we get the child's exec event first, then we delay
-	   responding to it until we handle the parent's vfork.  Because,
-	   otherwise we can't satisfy a "catch vfork". */
-	if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
-	  {
-	    pending_follow.fork_event.saw_child_exec = 1;
+         ??rehrauer: This is unabashedly an HP-UX specific thing.  On
+         HP-UX, events associated with a vforking inferior come in
+         threes: a vfork event for the child (always first), followed
+         a vfork event for the parent and an exec event for the child.
+         The latter two can come in either order.
 
-	    /* On some targets, the child must be resumed before
-	       the parent vfork event is delivered.  A single-step
-	       suffices. */
-	    if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK ())
-	      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
-	    /* We expect the parent vfork event to be available now. */
-	    prepare_to_wait (ecs);
-	    return;
-	  }
+         If we get the parent vfork event first, life's good: We follow
+         either the parent or child, and then the child's exec event is
+         a "don't care".
 
-	/* This causes the eventpoints and symbol table to be reset.  Must
-	   do this now, before trying to determine whether to stop. */
-	follow_exec (PIDGET (inferior_ptid), pending_follow.execd_pathname);
-	xfree (pending_follow.execd_pathname);
+         But if we get the child's exec event first, then we delay
+         responding to it until we handle the parent's vfork.  Because,
+         otherwise we can't satisfy a "catch vfork". */
+      if (pending_follow.kind == TARGET_WAITKIND_VFORKED)
+	{
+	  pending_follow.fork_event.saw_child_exec = 1;
 
-	stop_pc = read_pc_pid (ecs->ptid);
-	ecs->saved_inferior_ptid = inferior_ptid;
-	inferior_ptid = ecs->ptid;
-	/* The second argument of bpstat_stop_status is meant to help
-	   distinguish between a breakpoint trap and a singlestep trap.
-	   This is only important on targets where DECR_PC_AFTER_BREAK
-	   is non-zero.  The prev_pc test is meant to distinguish between
-	   singlestepping a trap instruction, and singlestepping thru a
-	   jump to the instruction following a trap instruction. */
-	   
-	stop_bpstat = bpstat_stop_status (&stop_pc, 
-					  currently_stepping (ecs) &&
-					  prev_pc !=
-					  stop_pc - DECR_PC_AFTER_BREAK);
-	ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
-	inferior_ptid = ecs->saved_inferior_ptid;
-	goto process_event_stop_test;
+	  /* On some targets, the child must be resumed before
+	     the parent vfork event is delivered.  A single-step
+	     suffices. */
+	  if (RESUME_EXECD_VFORKING_CHILD_TO_GET_PARENT_VFORK ())
+	    target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+	  /* We expect the parent vfork event to be available now. */
+	  prepare_to_wait (ecs);
+	  return;
+	}
 
-	/* These syscall events are returned on HP-UX, as part of its
-	   implementation of page-protection-based "hardware" watchpoints.
-	   HP-UX has unfortunate interactions between page-protections and
-	   some system calls.  Our solution is to disable hardware watches
-	   when a system call is entered, and reenable them when the syscall
-	   completes.  The downside of this is that we may miss the precise
-	   point at which a watched piece of memory is modified.  "Oh well."
+      /* This causes the eventpoints and symbol table to be reset.  Must
+         do this now, before trying to determine whether to stop. */
+      follow_exec (PIDGET (inferior_ptid), pending_follow.execd_pathname);
+      xfree (pending_follow.execd_pathname);
 
-	   Note that we may have multiple threads running, which may each
-	   enter syscalls at roughly the same time.  Since we don't have a
-	   good notion currently of whether a watched piece of memory is
-	   thread-private, we'd best not have any page-protections active
-	   when any thread is in a syscall.  Thus, we only want to reenable
-	   hardware watches when no threads are in a syscall.
+      stop_pc = read_pc_pid (ecs->ptid);
+      ecs->saved_inferior_ptid = inferior_ptid;
+      inferior_ptid = ecs->ptid;
+      /* The second argument of bpstat_stop_status is meant to help
+         distinguish between a breakpoint trap and a singlestep trap.
+         This is only important on targets where DECR_PC_AFTER_BREAK
+         is non-zero.  The prev_pc test is meant to distinguish between
+         singlestepping a trap instruction, and singlestepping thru a
+         jump to the instruction following a trap instruction. */
 
-	   Also, be careful not to try to gather much state about a thread
-	   that's in a syscall.  It's frequently a losing proposition. */
-      case TARGET_WAITKIND_SYSCALL_ENTRY:
-	number_of_threads_in_syscalls++;
-	if (number_of_threads_in_syscalls == 1)
-	  {
-	    TARGET_DISABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
-	  }
-	resume (0, TARGET_SIGNAL_0);
-	prepare_to_wait (ecs);
-	return;
+      stop_bpstat = bpstat_stop_status (&stop_pc,
+					currently_stepping (ecs) &&
+					prev_pc !=
+					stop_pc - DECR_PC_AFTER_BREAK);
+      ecs->random_signal = !bpstat_explains_signal (stop_bpstat);
+      inferior_ptid = ecs->saved_inferior_ptid;
+      goto process_event_stop_test;
 
-	/* Before examining the threads further, step this thread to
-	   get it entirely out of the syscall.  (We get notice of the
-	   event when the thread is just on the verge of exiting a
-	   syscall.  Stepping one instruction seems to get it back
-	   into user code.)
+      /* These syscall events are returned on HP-UX, as part of its
+         implementation of page-protection-based "hardware" watchpoints.
+         HP-UX has unfortunate interactions between page-protections and
+         some system calls.  Our solution is to disable hardware watches
+         when a system call is entered, and reenable them when the syscall
+         completes.  The downside of this is that we may miss the precise
+         point at which a watched piece of memory is modified.  "Oh well."
 
-	   Note that although the logical place to reenable h/w watches
-	   is here, we cannot.  We cannot reenable them before stepping
-	   the thread (this causes the next wait on the thread to hang).
+         Note that we may have multiple threads running, which may each
+         enter syscalls at roughly the same time.  Since we don't have a
+         good notion currently of whether a watched piece of memory is
+         thread-private, we'd best not have any page-protections active
+         when any thread is in a syscall.  Thus, we only want to reenable
+         hardware watches when no threads are in a syscall.
 
-	   Nor can we enable them after stepping until we've done a wait.
-	   Thus, we simply set the flag ecs->enable_hw_watchpoints_after_wait
-	   here, which will be serviced immediately after the target
-	   is waited on. */
-      case TARGET_WAITKIND_SYSCALL_RETURN:
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+         Also, be careful not to try to gather much state about a thread
+         that's in a syscall.  It's frequently a losing proposition. */
+    case TARGET_WAITKIND_SYSCALL_ENTRY:
+      number_of_threads_in_syscalls++;
+      if (number_of_threads_in_syscalls == 1)
+	{
+	  TARGET_DISABLE_HW_WATCHPOINTS (PIDGET (inferior_ptid));
+	}
+      resume (0, TARGET_SIGNAL_0);
+      prepare_to_wait (ecs);
+      return;
 
-	if (number_of_threads_in_syscalls > 0)
-	  {
-	    number_of_threads_in_syscalls--;
-	    ecs->enable_hw_watchpoints_after_wait =
-	      (number_of_threads_in_syscalls == 0);
-	  }
-	prepare_to_wait (ecs);
-	return;
+      /* Before examining the threads further, step this thread to
+         get it entirely out of the syscall.  (We get notice of the
+         event when the thread is just on the verge of exiting a
+         syscall.  Stepping one instruction seems to get it back
+         into user code.)
 
-      case TARGET_WAITKIND_STOPPED:
-	stop_signal = ecs->ws.value.sig;
-	break;
+         Note that although the logical place to reenable h/w watches
+         is here, we cannot.  We cannot reenable them before stepping
+         the thread (this causes the next wait on the thread to hang).
 
-	/* We had an event in the inferior, but we are not interested
-	   in handling it at this level. The lower layers have already
-	   done what needs to be done, if anything. This case can
-	   occur only when the target is async or extended-async. One
-	   of the circumstamces for this to happen is when the
-	   inferior produces output for the console. The inferior has
-	   not stopped, and we are ignoring the event. */
-      case TARGET_WAITKIND_IGNORE:
-	ecs->wait_some_more = 1;
-	return;
-      }
+         Nor can we enable them after stepping until we've done a wait.
+         Thus, we simply set the flag ecs->enable_hw_watchpoints_after_wait
+         here, which will be serviced immediately after the target
+         is waited on. */
+    case TARGET_WAITKIND_SYSCALL_RETURN:
+      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
 
-    /* We may want to consider not doing a resume here in order to give
-       the user a chance to play with the new thread.  It might be good
-       to make that a user-settable option.  */
+      if (number_of_threads_in_syscalls > 0)
+	{
+	  number_of_threads_in_syscalls--;
+	  ecs->enable_hw_watchpoints_after_wait =
+	    (number_of_threads_in_syscalls == 0);
+	}
+      prepare_to_wait (ecs);
+      return;
 
-    /* At this point, all threads are stopped (happens automatically in
-       either the OS or the native code).  Therefore we need to continue
-       all threads in order to make progress.  */
-    if (ecs->new_thread_event)
-      {
-	target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
-	prepare_to_wait (ecs);
-	return;
-      }
+    case TARGET_WAITKIND_STOPPED:
+      stop_signal = ecs->ws.value.sig;
+      break;
 
-    stop_pc = read_pc_pid (ecs->ptid);
+      /* We had an event in the inferior, but we are not interested
+         in handling it at this level. The lower layers have already
+         done what needs to be done, if anything. This case can
+         occur only when the target is async or extended-async. One
+         of the circumstamces for this to happen is when the
+         inferior produces output for the console. The inferior has
+         not stopped, and we are ignoring the event. */
+    case TARGET_WAITKIND_IGNORE:
+      ecs->wait_some_more = 1;
+      return;
+    }
 
-    /* See if a thread hit a thread-specific breakpoint that was meant for
-       another thread.  If so, then step that thread past the breakpoint,
-       and continue it.  */
+  /* We may want to consider not doing a resume here in order to give
+     the user a chance to play with the new thread.  It might be good
+     to make that a user-settable option.  */
 
-    if (stop_signal == TARGET_SIGNAL_TRAP)
-      {
-	if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
+  /* At this point, all threads are stopped (happens automatically in
+     either the OS or the native code).  Therefore we need to continue
+     all threads in order to make progress.  */
+  if (ecs->new_thread_event)
+    {
+      target_resume (RESUME_ALL, 0, TARGET_SIGNAL_0);
+      prepare_to_wait (ecs);
+      return;
+    }
+
+  stop_pc = read_pc_pid (ecs->ptid);
+
+  /* See if a thread hit a thread-specific breakpoint that was meant for
+     another thread.  If so, then step that thread past the breakpoint,
+     and continue it.  */
+
+  if (stop_signal == TARGET_SIGNAL_TRAP)
+    {
+      /* Check if a regular breakpoint has been hit before checking
+         for a potential single step breakpoint. Otherwise, GDB will
+         not see this breakpoint hit when stepping onto breakpoints.  */
+      if (breakpoints_inserted
+          && breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK))
+	{
 	  ecs->random_signal = 0;
-	else if (breakpoints_inserted
-		 && breakpoint_here_p (stop_pc - DECR_PC_AFTER_BREAK))
-	  {
-	    ecs->random_signal = 0;
-	    if (!breakpoint_thread_match (stop_pc - DECR_PC_AFTER_BREAK,
-					  ecs->ptid))
-	      {
-		int remove_status;
+	  if (!breakpoint_thread_match (stop_pc - DECR_PC_AFTER_BREAK,
+					ecs->ptid))
+	    {
+	      int remove_status;
 
-		/* Saw a breakpoint, but it was hit by the wrong thread.
-		   Just continue. */
-		if (DECR_PC_AFTER_BREAK)
-		  write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, ecs->ptid);
+	      /* Saw a breakpoint, but it was hit by the wrong thread.
+	         Just continue. */
+	      if (DECR_PC_AFTER_BREAK)
+		write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK, ecs->ptid);
 
-		remove_status = remove_breakpoints ();
-		/* Did we fail to remove breakpoints?  If so, try
-		   to set the PC past the bp.  (There's at least
-		   one situation in which we can fail to remove
-		   the bp's: On HP-UX's that use ttrace, we can't
-		   change the address space of a vforking child
-		   process until the child exits (well, okay, not
-		   then either :-) or execs. */
-		if (remove_status != 0)
-		  {
-		    /* FIXME!  This is obviously non-portable! */
-		    write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, 
-				  ecs->ptid);
-		    /* We need to restart all the threads now,
-		     * unles we're running in scheduler-locked mode. 
-		     * Use currently_stepping to determine whether to 
-		     * step or continue.
-		     */
-		    /* FIXME MVS: is there any reason not to call resume()? */
-		    if (scheduler_mode == schedlock_on)
-		      target_resume (ecs->ptid, 
-				     currently_stepping (ecs), 
-				     TARGET_SIGNAL_0);
-		    else
-		      target_resume (RESUME_ALL, 
-				     currently_stepping (ecs), 
-				     TARGET_SIGNAL_0);
-		    prepare_to_wait (ecs);
-		    return;
-		  }
-		else
-		  {		/* Single step */
-		    breakpoints_inserted = 0;
-		    if (!ptid_equal (inferior_ptid, ecs->ptid))
-		      context_switch (ecs);
-		    ecs->waiton_ptid = ecs->ptid;
-		    ecs->wp = &(ecs->ws);
-		    ecs->another_trap = 1;
+	      remove_status = remove_breakpoints ();
+	      /* Did we fail to remove breakpoints?  If so, try
+	         to set the PC past the bp.  (There's at least
+	         one situation in which we can fail to remove
+	         the bp's: On HP-UX's that use ttrace, we can't
+	         change the address space of a vforking child
+	         process until the child exits (well, okay, not
+	         then either :-) or execs. */
+	      if (remove_status != 0)
+		{
+		  /* FIXME!  This is obviously non-portable! */
+		  write_pc_pid (stop_pc - DECR_PC_AFTER_BREAK + 4, ecs->ptid);
+		  /* We need to restart all the threads now,
+		   * unles we're running in scheduler-locked mode. 
+		   * Use currently_stepping to determine whether to 
+		   * step or continue.
+		   */
+		  /* FIXME MVS: is there any reason not to call resume()? */
+		  if (scheduler_mode == schedlock_on)
+		    target_resume (ecs->ptid,
+				   currently_stepping (ecs), TARGET_SIGNAL_0);
+		  else
+		    target_resume (RESUME_ALL,
+				   currently_stepping (ecs), TARGET_SIGNAL_0);
+		  prepare_to_wait (ecs);
+		  return;
+		}
+	      else
+		{		/* Single step */
+		  breakpoints_inserted = 0;
+		  if (!ptid_equal (inferior_ptid, ecs->ptid))
+		    context_switch (ecs);
+		  ecs->waiton_ptid = ecs->ptid;
+		  ecs->wp = &(ecs->ws);
+		  ecs->another_trap = 1;
 
-		    ecs->infwait_state = infwait_thread_hop_state;
-		    keep_going (ecs);
-		    registers_changed ();
-		    return;
-		  }
-	      }
-	  }
-      }
-    else
-      ecs->random_signal = 1;
+		  ecs->infwait_state = infwait_thread_hop_state;
+		  keep_going (ecs);
+		  registers_changed ();
+		  return;
+		}
+	    }
+	}
+      else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
+        {
+          /* Readjust the stop_pc as it is off by DECR_PC_AFTER_BREAK
+             compared to the value it would have if the system stepping
+             capability was used. This allows the rest of the code in
+             this function to use this address without having to worry
+             whether software single step is in use or not.  */
+          if (DECR_PC_AFTER_BREAK)
+            {
+              stop_pc -= DECR_PC_AFTER_BREAK;
+              write_pc_pid (stop_pc, ecs->ptid);
+            }
 
-    /* See if something interesting happened to the non-current thread.  If
-       so, then switch to that thread, and eventually give control back to
-       the user.
+          sw_single_step_trap_p = 1;
+          ecs->random_signal = 0;
+        }
+    }
+  else
+    ecs->random_signal = 1;
 
-       Note that if there's any kind of pending follow (i.e., of a fork,
-       vfork or exec), we don't want to do this now.  Rather, we'll let
-       the next resume handle it. */
-    if (! ptid_equal (ecs->ptid, inferior_ptid) &&
-	(pending_follow.kind == TARGET_WAITKIND_SPURIOUS))
-      {
-	int printed = 0;
+  /* See if something interesting happened to the non-current thread.  If
+     so, then switch to that thread, and eventually give control back to
+     the user.
 
-	/* If it's a random signal for a non-current thread, notify user
-	   if he's expressed an interest. */
-	if (ecs->random_signal
-	    && signal_print[stop_signal])
-	  {
+     Note that if there's any kind of pending follow (i.e., of a fork,
+     vfork or exec), we don't want to do this now.  Rather, we'll let
+     the next resume handle it. */
+  if (!ptid_equal (ecs->ptid, inferior_ptid) &&
+      (pending_follow.kind == TARGET_WAITKIND_SPURIOUS))
+    {
+      int printed = 0;
+
+      /* If it's a random signal for a non-current thread, notify user
+         if he's expressed an interest. */
+      if (ecs->random_signal && signal_print[stop_signal])
+	{
 /* ??rehrauer: I don't understand the rationale for this code.  If the
    inferior will stop as a result of this signal, then the act of handling
    the stop ought to print a message that's couches the stoppage in user
@@ -1930,1018 +1920,1016 @@
 
    For now, remove the message altogether. */
 #if 0
-	    printed = 1;
-	    target_terminal_ours_for_output ();
-	    printf_filtered ("\nProgram received signal %s, %s.\n",
-			     target_signal_to_name (stop_signal),
-			     target_signal_to_string (stop_signal));
-	    gdb_flush (gdb_stdout);
+	  printed = 1;
+	  target_terminal_ours_for_output ();
+	  printf_filtered ("\nProgram received signal %s, %s.\n",
+			   target_signal_to_name (stop_signal),
+			   target_signal_to_string (stop_signal));
+	  gdb_flush (gdb_stdout);
 #endif
-	  }
+	}
 
-	/* If it's not SIGTRAP and not a signal we want to stop for, then
-	   continue the thread. */
+      /* If it's not SIGTRAP and not a signal we want to stop for, then
+         continue the thread. */
 
-	if (stop_signal != TARGET_SIGNAL_TRAP
-	    && !signal_stop[stop_signal])
-	  {
-	    if (printed)
-	      target_terminal_inferior ();
+      if (stop_signal != TARGET_SIGNAL_TRAP && !signal_stop[stop_signal])
+	{
+	  if (printed)
+	    target_terminal_inferior ();
 
-	    /* Clear the signal if it should not be passed.  */
-	    if (signal_program[stop_signal] == 0)
-	      stop_signal = TARGET_SIGNAL_0;
-
-	    target_resume (ecs->ptid, 0, stop_signal);
-	    prepare_to_wait (ecs);
-	    return;
-	  }
-
-	/* It's a SIGTRAP or a signal we're interested in.  Switch threads,
-	   and fall into the rest of wait_for_inferior().  */
-
-	context_switch (ecs);
-
-	if (context_hook)
-	  context_hook (pid_to_thread_id (ecs->ptid));
-
-	flush_cached_frames ();
-      }
-
-    if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
-      {
-	/* Pull the single step breakpoints out of the target. */
-	SOFTWARE_SINGLE_STEP (0, 0);
-	singlestep_breakpoints_inserted_p = 0;
-      }
-
-    /* If PC is pointing at a nullified instruction, then step beyond
-       it so that the user won't be confused when GDB appears to be ready
-       to execute it. */
-
-    /*      if (INSTRUCTION_NULLIFIED && currently_stepping (ecs)) */
-    if (INSTRUCTION_NULLIFIED)
-      {
-	registers_changed ();
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
-
-	/* We may have received a signal that we want to pass to
-	   the inferior; therefore, we must not clobber the waitstatus
-	   in WS. */
-
-	ecs->infwait_state = infwait_nullified_state;
-	ecs->waiton_ptid = ecs->ptid;
-	ecs->wp = &(ecs->tmpstatus);
-	prepare_to_wait (ecs);
-	return;
-      }
-
-    /* It may not be necessary to disable the watchpoint to stop over
-       it.  For example, the PA can (with some kernel cooperation)
-       single step over a watchpoint without disabling the watchpoint.  */
-    if (HAVE_STEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
-      {
-	resume (1, 0);
-	prepare_to_wait (ecs);
-	return;
-      }
-
-    /* It is far more common to need to disable a watchpoint to step
-       the inferior over it.  FIXME.  What else might a debug
-       register or page protection watchpoint scheme need here?  */
-    if (HAVE_NONSTEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
-      {
-	/* At this point, we are stopped at an instruction which has
-	   attempted to write to a piece of memory under control of
-	   a watchpoint.  The instruction hasn't actually executed
-	   yet.  If we were to evaluate the watchpoint expression
-	   now, we would get the old value, and therefore no change
-	   would seem to have occurred.
-
-	   In order to make watchpoints work `right', we really need
-	   to complete the memory write, and then evaluate the
-	   watchpoint expression.  The following code does that by
-	   removing the watchpoint (actually, all watchpoints and
-	   breakpoints), single-stepping the target, re-inserting
-	   watchpoints, and then falling through to let normal
-	   single-step processing handle proceed.  Since this
-	   includes evaluating watchpoints, things will come to a
-	   stop in the correct manner.  */
-
-	if (DECR_PC_AFTER_BREAK)
-	  write_pc (stop_pc - DECR_PC_AFTER_BREAK);
-
-	remove_breakpoints ();
-	registers_changed ();
-	target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);	/* Single step */
-
-	ecs->waiton_ptid = ecs->ptid;
-	ecs->wp = &(ecs->ws);
-	ecs->infwait_state = infwait_nonstep_watch_state;
-	prepare_to_wait (ecs);
-	return;
-      }
-
-    /* It may be possible to simply continue after a watchpoint.  */
-    if (HAVE_CONTINUABLE_WATCHPOINT)
-      STOPPED_BY_WATCHPOINT (ecs->ws);
-
-    ecs->stop_func_start = 0;
-    ecs->stop_func_end = 0;
-    ecs->stop_func_name = 0;
-    /* Don't care about return value; stop_func_start and stop_func_name
-       will both be 0 if it doesn't work.  */
-    find_pc_partial_function (stop_pc, &ecs->stop_func_name,
-			      &ecs->stop_func_start, &ecs->stop_func_end);
-    ecs->stop_func_start += FUNCTION_START_OFFSET;
-    ecs->another_trap = 0;
-    bpstat_clear (&stop_bpstat);
-    stop_step = 0;
-    stop_stack_dummy = 0;
-    stop_print_frame = 1;
-    ecs->random_signal = 0;
-    stopped_by_random_signal = 0;
-    breakpoints_failed = 0;
-
-    /* Look at the cause of the stop, and decide what to do.
-       The alternatives are:
-       1) break; to really stop and return to the debugger,
-       2) drop through to start up again
-       (set ecs->another_trap to 1 to single step once)
-       3) set ecs->random_signal to 1, and the decision between 1 and 2
-       will be made according to the signal handling tables.  */
-
-    /* First, distinguish signals caused by the debugger from signals
-       that have to do with the program's own actions.
-       Note that breakpoint insns may cause SIGTRAP or SIGILL
-       or SIGEMT, depending on the operating system version.
-       Here we detect when a SIGILL or SIGEMT is really a breakpoint
-       and change it to SIGTRAP.  */
-
-    if (stop_signal == TARGET_SIGNAL_TRAP
-	|| (breakpoints_inserted &&
-	    (stop_signal == TARGET_SIGNAL_ILL
-	     || stop_signal == TARGET_SIGNAL_EMT
-	    ))
-	|| stop_soon_quietly)
-      {
-	if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
-	  {
-	    stop_print_frame = 0;
-	    stop_stepping (ecs);
-	    return;
-	  }
-	if (stop_soon_quietly)
-	  {
-	    stop_stepping (ecs);
-	    return;
-	  }
-
-	/* Don't even think about breakpoints
-	   if just proceeded over a breakpoint.
-
-	   However, if we are trying to proceed over a breakpoint
-	   and end up in sigtramp, then through_sigtramp_breakpoint
-	   will be set and we should check whether we've hit the
-	   step breakpoint.  */
-	if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected
-	    && through_sigtramp_breakpoint == NULL)
-	  bpstat_clear (&stop_bpstat);
-	else
-	  {
-	    /* See if there is a breakpoint at the current PC.  */
-
-	    /* The second argument of bpstat_stop_status is meant to help
-	       distinguish between a breakpoint trap and a singlestep trap.
-	       This is only important on targets where DECR_PC_AFTER_BREAK
-	       is non-zero.  The prev_pc test is meant to distinguish between
-	       singlestepping a trap instruction, and singlestepping thru a
-	       jump to the instruction following a trap instruction. */
-
-	    stop_bpstat = bpstat_stop_status
-	      (&stop_pc,
-	    /* Pass TRUE if our reason for stopping is something other
-	       than hitting a breakpoint.  We do this by checking that
-	       1) stepping is going on and 2) we didn't hit a breakpoint
-	       in a signal handler without an intervening stop in
-	       sigtramp, which is detected by a new stack pointer value
-	       below any usual function calling stack adjustments.  */
-		(currently_stepping (ecs)
-		 && prev_pc != stop_pc - DECR_PC_AFTER_BREAK
-		 && !(step_range_end
-		      && INNER_THAN (read_sp (), (step_sp - 16))))
-	      );
-	    /* Following in case break condition called a
-	       function.  */
-	    stop_print_frame = 1;
-	  }
-
-	if (stop_signal == TARGET_SIGNAL_TRAP)
-	  ecs->random_signal
-	    = !(bpstat_explains_signal (stop_bpstat)
-		|| trap_expected
-		|| (!CALL_DUMMY_BREAKPOINT_OFFSET_P
-		    && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
-					 FRAME_FP (get_current_frame ())))
-		|| (step_range_end && step_resume_breakpoint == NULL));
-
-	else
-	  {
-	    ecs->random_signal
-	      = !(bpstat_explains_signal (stop_bpstat)
-	    /* End of a stack dummy.  Some systems (e.g. Sony
-	       news) give another signal besides SIGTRAP, so
-	       check here as well as above.  */
-		  || (!CALL_DUMMY_BREAKPOINT_OFFSET_P
-		      && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
-					   FRAME_FP (get_current_frame ())))
-	      );
-	    if (!ecs->random_signal)
-	      stop_signal = TARGET_SIGNAL_TRAP;
-	  }
-      }
-
-    /* When we reach this point, we've pretty much decided
-       that the reason for stopping must've been a random
-       (unexpected) signal. */
-
-    else
-      ecs->random_signal = 1;
-    /* If a fork, vfork or exec event was seen, then there are two
-       possible responses we can make:
-
-       1. If a catchpoint triggers for the event (ecs->random_signal == 0),
-       then we must stop now and issue a prompt.  We will resume
-       the inferior when the user tells us to.
-       2. If no catchpoint triggers for the event (ecs->random_signal == 1),
-       then we must resume the inferior now and keep checking.
-
-       In either case, we must take appropriate steps to "follow" the
-       the fork/vfork/exec when the inferior is resumed.  For example,
-       if follow-fork-mode is "child", then we must detach from the
-       parent inferior and follow the new child inferior.
-
-       In either case, setting pending_follow causes the next resume()
-       to take the appropriate following action. */
-  process_event_stop_test:
-    if (ecs->ws.kind == TARGET_WAITKIND_FORKED)
-      {
-	if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
-	  {
-	    trap_expected = 1;
+	  /* Clear the signal if it should not be passed.  */
+	  if (signal_program[stop_signal] == 0)
 	    stop_signal = TARGET_SIGNAL_0;
-	    keep_going (ecs);
-	    return;
-	  }
-      }
-    else if (ecs->ws.kind == TARGET_WAITKIND_VFORKED)
-      {
-	if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
-	  {
-	    stop_signal = TARGET_SIGNAL_0;	
-	    keep_going (ecs);
-	    return;
-	  }
-      }
-    else if (ecs->ws.kind == TARGET_WAITKIND_EXECD)
-      {
-	pending_follow.kind = ecs->ws.kind;
-	if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
-	  {
-	    trap_expected = 1;
-	    stop_signal = TARGET_SIGNAL_0;
-	    keep_going (ecs);
-	    return;
-	  }
-      }
 
-    /* For the program's own signals, act according to
-       the signal handling tables.  */
+	  target_resume (ecs->ptid, 0, stop_signal);
+	  prepare_to_wait (ecs);
+	  return;
+	}
 
-    if (ecs->random_signal)
-      {
-	/* Signal not for debugging purposes.  */
-	int printed = 0;
+      /* It's a SIGTRAP or a signal we're interested in.  Switch threads,
+         and fall into the rest of wait_for_inferior().  */
 
-	stopped_by_random_signal = 1;
+      context_switch (ecs);
 
-	if (signal_print[stop_signal])
-	  {
-	    printed = 1;
-	    target_terminal_ours_for_output ();
-	    print_stop_reason (SIGNAL_RECEIVED, stop_signal);
-	  }
-	if (signal_stop[stop_signal])
-	  {
-	    stop_stepping (ecs);
-	    return;
-	  }
-	/* If not going to stop, give terminal back
-	   if we took it away.  */
-	else if (printed)
-	  target_terminal_inferior ();
+      if (context_hook)
+	context_hook (pid_to_thread_id (ecs->ptid));
 
-	/* Clear the signal if it should not be passed.  */
-	if (signal_program[stop_signal] == 0)
+      flush_cached_frames ();
+    }
+
+  if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p)
+    {
+      /* Pull the single step breakpoints out of the target. */
+      SOFTWARE_SINGLE_STEP (0, 0);
+      singlestep_breakpoints_inserted_p = 0;
+    }
+
+  /* If PC is pointing at a nullified instruction, then step beyond
+     it so that the user won't be confused when GDB appears to be ready
+     to execute it. */
+
+  /*      if (INSTRUCTION_NULLIFIED && currently_stepping (ecs)) */
+  if (INSTRUCTION_NULLIFIED)
+    {
+      registers_changed ();
+      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);
+
+      /* We may have received a signal that we want to pass to
+         the inferior; therefore, we must not clobber the waitstatus
+         in WS. */
+
+      ecs->infwait_state = infwait_nullified_state;
+      ecs->waiton_ptid = ecs->ptid;
+      ecs->wp = &(ecs->tmpstatus);
+      prepare_to_wait (ecs);
+      return;
+    }
+
+  /* It may not be necessary to disable the watchpoint to stop over
+     it.  For example, the PA can (with some kernel cooperation)
+     single step over a watchpoint without disabling the watchpoint.  */
+  if (HAVE_STEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
+    {
+      resume (1, 0);
+      prepare_to_wait (ecs);
+      return;
+    }
+
+  /* It is far more common to need to disable a watchpoint to step
+     the inferior over it.  FIXME.  What else might a debug
+     register or page protection watchpoint scheme need here?  */
+  if (HAVE_NONSTEPPABLE_WATCHPOINT && STOPPED_BY_WATCHPOINT (ecs->ws))
+    {
+      /* At this point, we are stopped at an instruction which has
+         attempted to write to a piece of memory under control of
+         a watchpoint.  The instruction hasn't actually executed
+         yet.  If we were to evaluate the watchpoint expression
+         now, we would get the old value, and therefore no change
+         would seem to have occurred.
+
+         In order to make watchpoints work `right', we really need
+         to complete the memory write, and then evaluate the
+         watchpoint expression.  The following code does that by
+         removing the watchpoint (actually, all watchpoints and
+         breakpoints), single-stepping the target, re-inserting
+         watchpoints, and then falling through to let normal
+         single-step processing handle proceed.  Since this
+         includes evaluating watchpoints, things will come to a
+         stop in the correct manner.  */
+
+      if (DECR_PC_AFTER_BREAK)
+	write_pc (stop_pc - DECR_PC_AFTER_BREAK);
+
+      remove_breakpoints ();
+      registers_changed ();
+      target_resume (ecs->ptid, 1, TARGET_SIGNAL_0);	/* Single step */
+
+      ecs->waiton_ptid = ecs->ptid;
+      ecs->wp = &(ecs->ws);
+      ecs->infwait_state = infwait_nonstep_watch_state;
+      prepare_to_wait (ecs);
+      return;
+    }
+
+  /* It may be possible to simply continue after a watchpoint.  */
+  if (HAVE_CONTINUABLE_WATCHPOINT)
+    STOPPED_BY_WATCHPOINT (ecs->ws);
+
+  ecs->stop_func_start = 0;
+  ecs->stop_func_end = 0;
+  ecs->stop_func_name = 0;
+  /* Don't care about return value; stop_func_start and stop_func_name
+     will both be 0 if it doesn't work.  */
+  find_pc_partial_function (stop_pc, &ecs->stop_func_name,
+			    &ecs->stop_func_start, &ecs->stop_func_end);
+  ecs->stop_func_start += FUNCTION_START_OFFSET;
+  ecs->another_trap = 0;
+  bpstat_clear (&stop_bpstat);
+  stop_step = 0;
+  stop_stack_dummy = 0;
+  stop_print_frame = 1;
+  ecs->random_signal = 0;
+  stopped_by_random_signal = 0;
+  breakpoints_failed = 0;
+
+  /* Look at the cause of the stop, and decide what to do.
+     The alternatives are:
+     1) break; to really stop and return to the debugger,
+     2) drop through to start up again
+     (set ecs->another_trap to 1 to single step once)
+     3) set ecs->random_signal to 1, and the decision between 1 and 2
+     will be made according to the signal handling tables.  */
+
+  /* First, distinguish signals caused by the debugger from signals
+     that have to do with the program's own actions.
+     Note that breakpoint insns may cause SIGTRAP or SIGILL
+     or SIGEMT, depending on the operating system version.
+     Here we detect when a SIGILL or SIGEMT is really a breakpoint
+     and change it to SIGTRAP.  */
+
+  if (stop_signal == TARGET_SIGNAL_TRAP
+      || (breakpoints_inserted &&
+	  (stop_signal == TARGET_SIGNAL_ILL
+	   || stop_signal == TARGET_SIGNAL_EMT)) || stop_soon_quietly)
+    {
+      if (stop_signal == TARGET_SIGNAL_TRAP && stop_after_trap)
+	{
+	  stop_print_frame = 0;
+	  stop_stepping (ecs);
+	  return;
+	}
+      if (stop_soon_quietly)
+	{
+	  stop_stepping (ecs);
+	  return;
+	}
+
+      /* Don't even think about breakpoints
+         if just proceeded over a breakpoint.
+
+         However, if we are trying to proceed over a breakpoint
+         and end up in sigtramp, then through_sigtramp_breakpoint
+         will be set and we should check whether we've hit the
+         step breakpoint.  */
+      if (stop_signal == TARGET_SIGNAL_TRAP && trap_expected
+	  && through_sigtramp_breakpoint == NULL)
+	bpstat_clear (&stop_bpstat);
+      else
+	{
+	  /* See if there is a breakpoint at the current PC.  */
+
+	  /* The second argument of bpstat_stop_status is meant to help
+	     distinguish between a breakpoint trap and a singlestep trap.
+	     This is only important on targets where DECR_PC_AFTER_BREAK
+	     is non-zero.  The prev_pc test is meant to distinguish between
+	     singlestepping a trap instruction, and singlestepping thru a
+	     jump to the instruction following a trap instruction.
+
+             Therefore, pass TRUE if our reason for stopping is
+             something other than hitting a breakpoint.  We do this by
+             checking that either: we detected earlier a software single
+             step trap or, 1) stepping is going on and 2) we didn't hit
+             a breakpoint in a signal handler without an intervening stop
+             in sigtramp, which is detected by a new stack pointer value
+             below any usual function calling stack adjustments.  */
+	  stop_bpstat =
+            bpstat_stop_status
+              (&stop_pc,
+               sw_single_step_trap_p
+               || (currently_stepping (ecs)
+                   && prev_pc != stop_pc - DECR_PC_AFTER_BREAK
+                   && !(step_range_end
+                        && INNER_THAN (read_sp (), (step_sp - 16)))));
+	  /* Following in case break condition called a
+	     function.  */
+	  stop_print_frame = 1;
+	}
+
+      if (stop_signal == TARGET_SIGNAL_TRAP)
+	ecs->random_signal
+	  = !(bpstat_explains_signal (stop_bpstat)
+	      || trap_expected
+	      || (!CALL_DUMMY_BREAKPOINT_OFFSET_P
+		  && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
+				       FRAME_FP (get_current_frame ())))
+	      || (step_range_end && step_resume_breakpoint == NULL));
+
+      else
+	{
+	  ecs->random_signal = !(bpstat_explains_signal (stop_bpstat)
+				 /* End of a stack dummy.  Some systems (e.g. Sony
+				    news) give another signal besides SIGTRAP, so
+				    check here as well as above.  */
+				 || (!CALL_DUMMY_BREAKPOINT_OFFSET_P
+				     && PC_IN_CALL_DUMMY (stop_pc, read_sp (),
+							  FRAME_FP
+							  (get_current_frame
+							   ()))));
+	  if (!ecs->random_signal)
+	    stop_signal = TARGET_SIGNAL_TRAP;
+	}
+    }
+
+  /* When we reach this point, we've pretty much decided
+     that the reason for stopping must've been a random
+     (unexpected) signal. */
+
+  else
+    ecs->random_signal = 1;
+  /* If a fork, vfork or exec event was seen, then there are two
+     possible responses we can make:
+
+     1. If a catchpoint triggers for the event (ecs->random_signal == 0),
+     then we must stop now and issue a prompt.  We will resume
+     the inferior when the user tells us to.
+     2. If no catchpoint triggers for the event (ecs->random_signal == 1),
+     then we must resume the inferior now and keep checking.
+
+     In either case, we must take appropriate steps to "follow" the
+     the fork/vfork/exec when the inferior is resumed.  For example,
+     if follow-fork-mode is "child", then we must detach from the
+     parent inferior and follow the new child inferior.
+
+     In either case, setting pending_follow causes the next resume()
+     to take the appropriate following action. */
+process_event_stop_test:
+  if (ecs->ws.kind == TARGET_WAITKIND_FORKED)
+    {
+      if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
+	{
+	  trap_expected = 1;
 	  stop_signal = TARGET_SIGNAL_0;
+	  keep_going (ecs);
+	  return;
+	}
+    }
+  else if (ecs->ws.kind == TARGET_WAITKIND_VFORKED)
+    {
+      if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
+	{
+	  stop_signal = TARGET_SIGNAL_0;
+	  keep_going (ecs);
+	  return;
+	}
+    }
+  else if (ecs->ws.kind == TARGET_WAITKIND_EXECD)
+    {
+      pending_follow.kind = ecs->ws.kind;
+      if (ecs->random_signal)	/* I.e., no catchpoint triggered for this. */
+	{
+	  trap_expected = 1;
+	  stop_signal = TARGET_SIGNAL_0;
+	  keep_going (ecs);
+	  return;
+	}
+    }
 
-	/* I'm not sure whether this needs to be check_sigtramp2 or
-	   whether it could/should be keep_going.
+  /* For the program's own signals, act according to
+     the signal handling tables.  */
 
-	   This used to jump to step_over_function if we are stepping,
-	   which is wrong.
+  if (ecs->random_signal)
+    {
+      /* Signal not for debugging purposes.  */
+      int printed = 0;
 
-	   Suppose the user does a `next' over a function call, and while
-	   that call is in progress, the inferior receives a signal for
-	   which GDB does not stop (i.e., signal_stop[SIG] is false).  In
-	   that case, when we reach this point, there is already a
-	   step-resume breakpoint established, right where it should be:
-	   immediately after the function call the user is "next"-ing
-	   over.  If we call step_over_function now, two bad things
-	   happen:
+      stopped_by_random_signal = 1;
 
-	   - we'll create a new breakpoint, at wherever the current
-	     frame's return address happens to be.  That could be
-	     anywhere, depending on what function call happens to be on
-	     the top of the stack at that point.  Point is, it's probably
-	     not where we need it.
+      if (signal_print[stop_signal])
+	{
+	  printed = 1;
+	  target_terminal_ours_for_output ();
+	  print_stop_reason (SIGNAL_RECEIVED, stop_signal);
+	}
+      if (signal_stop[stop_signal])
+	{
+	  stop_stepping (ecs);
+	  return;
+	}
+      /* If not going to stop, give terminal back
+         if we took it away.  */
+      else if (printed)
+	target_terminal_inferior ();
 
-           - the existing step-resume breakpoint (which is at the correct
-	     address) will get orphaned: step_resume_breakpoint will point
-	     to the new breakpoint, and the old step-resume breakpoint
-	     will never be cleaned up.
+      /* Clear the signal if it should not be passed.  */
+      if (signal_program[stop_signal] == 0)
+	stop_signal = TARGET_SIGNAL_0;
 
-           The old behavior was meant to help HP-UX single-step out of
-           sigtramps.  It would place the new breakpoint at prev_pc, which
-           was certainly wrong.  I don't know the details there, so fixing
-           this probably breaks that.  As with anything else, it's up to
-           the HP-UX maintainer to furnish a fix that doesn't break other
-           platforms.  --JimB, 20 May 1999 */
-	check_sigtramp2 (ecs);
+      /* I'm not sure whether this needs to be check_sigtramp2 or
+         whether it could/should be keep_going.
+
+         This used to jump to step_over_function if we are stepping,
+         which is wrong.
+
+         Suppose the user does a `next' over a function call, and while
+         that call is in progress, the inferior receives a signal for
+         which GDB does not stop (i.e., signal_stop[SIG] is false).  In
+         that case, when we reach this point, there is already a
+         step-resume breakpoint established, right where it should be:
+         immediately after the function call the user is "next"-ing
+         over.  If we call step_over_function now, two bad things
+         happen:
+
+         - we'll create a new breakpoint, at wherever the current
+         frame's return address happens to be.  That could be
+         anywhere, depending on what function call happens to be on
+         the top of the stack at that point.  Point is, it's probably
+         not where we need it.
+
+         - the existing step-resume breakpoint (which is at the correct
+         address) will get orphaned: step_resume_breakpoint will point
+         to the new breakpoint, and the old step-resume breakpoint
+         will never be cleaned up.
+
+         The old behavior was meant to help HP-UX single-step out of
+         sigtramps.  It would place the new breakpoint at prev_pc, which
+         was certainly wrong.  I don't know the details there, so fixing
+         this probably breaks that.  As with anything else, it's up to
+         the HP-UX maintainer to furnish a fix that doesn't break other
+         platforms.  --JimB, 20 May 1999 */
+      check_sigtramp2 (ecs);
+      keep_going (ecs);
+      return;
+    }
+
+  /* Handle cases caused by hitting a breakpoint.  */
+  {
+    CORE_ADDR jmp_buf_pc;
+    struct bpstat_what what;
+
+    what = bpstat_what (stop_bpstat);
+
+    if (what.call_dummy)
+      {
+	stop_stack_dummy = 1;
+#ifdef HP_OS_BUG
+	trap_expected_after_continue = 1;
+#endif
+      }
+
+    switch (what.main_action)
+      {
+      case BPSTAT_WHAT_SET_LONGJMP_RESUME:
+	/* If we hit the breakpoint at longjmp, disable it for the
+	   duration of this command.  Then, install a temporary
+	   breakpoint at the target of the jmp_buf. */
+	disable_longjmp_breakpoint ();
+	remove_breakpoints ();
+	breakpoints_inserted = 0;
+	if (!GET_LONGJMP_TARGET_P () || !GET_LONGJMP_TARGET (&jmp_buf_pc))
+	  {
+	    keep_going (ecs);
+	    return;
+	  }
+
+	/* Need to blow away step-resume breakpoint, as it
+	   interferes with us */
+	if (step_resume_breakpoint != NULL)
+	  {
+	    delete_step_resume_breakpoint (&step_resume_breakpoint);
+	  }
+	/* Not sure whether we need to blow this away too, but probably
+	   it is like the step-resume breakpoint.  */
+	if (through_sigtramp_breakpoint != NULL)
+	  {
+	    delete_breakpoint (through_sigtramp_breakpoint);
+	    through_sigtramp_breakpoint = NULL;
+	  }
+
+#if 0
+	/* FIXME - Need to implement nested temporary breakpoints */
+	if (step_over_calls > 0)
+	  set_longjmp_resume_breakpoint (jmp_buf_pc, get_current_frame ());
+	else
+#endif /* 0 */
+	  set_longjmp_resume_breakpoint (jmp_buf_pc, NULL);
+	ecs->handling_longjmp = 1;	/* FIXME */
 	keep_going (ecs);
 	return;
-      }
 
-    /* Handle cases caused by hitting a breakpoint.  */
-    {
-      CORE_ADDR jmp_buf_pc;
-      struct bpstat_what what;
+      case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME:
+      case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
+	remove_breakpoints ();
+	breakpoints_inserted = 0;
+#if 0
+	/* FIXME - Need to implement nested temporary breakpoints */
+	if (step_over_calls
+	    && (INNER_THAN (FRAME_FP (get_current_frame ()),
+			    step_frame_address)))
+	  {
+	    ecs->another_trap = 1;
+	    keep_going (ecs);
+	    return;
+	  }
+#endif /* 0 */
+	disable_longjmp_breakpoint ();
+	ecs->handling_longjmp = 0;	/* FIXME */
+	if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
+	  break;
+	/* else fallthrough */
 
-      what = bpstat_what (stop_bpstat);
+      case BPSTAT_WHAT_SINGLE:
+	if (breakpoints_inserted)
+	  {
+	    remove_breakpoints ();
+	  }
+	breakpoints_inserted = 0;
+	ecs->another_trap = 1;
+	/* Still need to check other stuff, at least the case
+	   where we are stepping and step out of the right range.  */
+	break;
 
-      if (what.call_dummy)
+      case BPSTAT_WHAT_STOP_NOISY:
+	stop_print_frame = 1;
+
+	/* We are about to nuke the step_resume_breakpoint and
+	   through_sigtramp_breakpoint via the cleanup chain, so
+	   no need to worry about it here.  */
+
+	stop_stepping (ecs);
+	return;
+
+      case BPSTAT_WHAT_STOP_SILENT:
+	stop_print_frame = 0;
+
+	/* We are about to nuke the step_resume_breakpoint and
+	   through_sigtramp_breakpoint via the cleanup chain, so
+	   no need to worry about it here.  */
+
+	stop_stepping (ecs);
+	return;
+
+      case BPSTAT_WHAT_STEP_RESUME:
+	/* This proably demands a more elegant solution, but, yeah
+	   right...
+
+	   This function's use of the simple variable
+	   step_resume_breakpoint doesn't seem to accomodate
+	   simultaneously active step-resume bp's, although the
+	   breakpoint list certainly can.
+
+	   If we reach here and step_resume_breakpoint is already
+	   NULL, then apparently we have multiple active
+	   step-resume bp's.  We'll just delete the breakpoint we
+	   stopped at, and carry on.  
+
+	   Correction: what the code currently does is delete a
+	   step-resume bp, but it makes no effort to ensure that
+	   the one deleted is the one currently stopped at.  MVS  */
+
+	if (step_resume_breakpoint == NULL)
+	  {
+	    step_resume_breakpoint =
+	      bpstat_find_step_resume_breakpoint (stop_bpstat);
+	  }
+	delete_step_resume_breakpoint (&step_resume_breakpoint);
+	break;
+
+      case BPSTAT_WHAT_THROUGH_SIGTRAMP:
+	if (through_sigtramp_breakpoint)
+	  delete_breakpoint (through_sigtramp_breakpoint);
+	through_sigtramp_breakpoint = NULL;
+
+	/* If were waiting for a trap, hitting the step_resume_break
+	   doesn't count as getting it.  */
+	if (trap_expected)
+	  ecs->another_trap = 1;
+	break;
+
+      case BPSTAT_WHAT_CHECK_SHLIBS:
+      case BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK:
+#ifdef SOLIB_ADD
 	{
+	  /* Remove breakpoints, we eventually want to step over the
+	     shlib event breakpoint, and SOLIB_ADD might adjust
+	     breakpoint addresses via breakpoint_re_set.  */
+	  if (breakpoints_inserted)
+	    remove_breakpoints ();
+	  breakpoints_inserted = 0;
+
+	  /* Check for any newly added shared libraries if we're
+	     supposed to be adding them automatically.  Switch
+	     terminal for any messages produced by
+	     breakpoint_re_set.  */
+	  target_terminal_ours_for_output ();
+	  SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
+	  target_terminal_inferior ();
+
+	  /* Try to reenable shared library breakpoints, additional
+	     code segments in shared libraries might be mapped in now. */
+	  re_enable_breakpoints_in_shlibs ();
+
+	  /* If requested, stop when the dynamic linker notifies
+	     gdb of events.  This allows the user to get control
+	     and place breakpoints in initializer routines for
+	     dynamically loaded objects (among other things).  */
+	  if (stop_on_solib_events)
+	    {
+	      stop_stepping (ecs);
+	      return;
+	    }
+
+	  /* If we stopped due to an explicit catchpoint, then the
+	     (see above) call to SOLIB_ADD pulled in any symbols
+	     from a newly-loaded library, if appropriate.
+
+	     We do want the inferior to stop, but not where it is
+	     now, which is in the dynamic linker callback.  Rather,
+	     we would like it stop in the user's program, just after
+	     the call that caused this catchpoint to trigger.  That
+	     gives the user a more useful vantage from which to
+	     examine their program's state. */
+	  else if (what.main_action ==
+		   BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
+	    {
+	      /* ??rehrauer: If I could figure out how to get the
+	         right return PC from here, we could just set a temp
+	         breakpoint and resume.  I'm not sure we can without
+	         cracking open the dld's shared libraries and sniffing
+	         their unwind tables and text/data ranges, and that's
+	         not a terribly portable notion.
+
+	         Until that time, we must step the inferior out of the
+	         dld callback, and also out of the dld itself (and any
+	         code or stubs in libdld.sl, such as "shl_load" and
+	         friends) until we reach non-dld code.  At that point,
+	         we can stop stepping. */
+	      bpstat_get_triggered_catchpoints (stop_bpstat,
+						&ecs->
+						stepping_through_solib_catchpoints);
+	      ecs->stepping_through_solib_after_catch = 1;
+
+	      /* Be sure to lift all breakpoints, so the inferior does
+	         actually step past this point... */
+	      ecs->another_trap = 1;
+	      break;
+	    }
+	  else
+	    {
+	      /* We want to step over this breakpoint, then keep going.  */
+	      ecs->another_trap = 1;
+	      break;
+	    }
+	}
+#endif
+	break;
+
+      case BPSTAT_WHAT_LAST:
+	/* Not a real code, but listed here to shut up gcc -Wall.  */
+
+      case BPSTAT_WHAT_KEEP_CHECKING:
+	break;
+      }
+  }
+
+  /* We come here if we hit a breakpoint but should not
+     stop for it.  Possibly we also were stepping
+     and should stop for that.  So fall through and
+     test for stepping.  But, if not stepping,
+     do not stop.  */
+
+  /* Are we stepping to get the inferior out of the dynamic
+     linker's hook (and possibly the dld itself) after catching
+     a shlib event? */
+  if (ecs->stepping_through_solib_after_catch)
+    {
+#if defined(SOLIB_ADD)
+      /* Have we reached our destination?  If not, keep going. */
+      if (SOLIB_IN_DYNAMIC_LINKER (PIDGET (ecs->ptid), stop_pc))
+	{
+	  ecs->another_trap = 1;
+	  keep_going (ecs);
+	  return;
+	}
+#endif
+      /* Else, stop and report the catchpoint(s) whose triggering
+         caused us to begin stepping. */
+      ecs->stepping_through_solib_after_catch = 0;
+      bpstat_clear (&stop_bpstat);
+      stop_bpstat = bpstat_copy (ecs->stepping_through_solib_catchpoints);
+      bpstat_clear (&ecs->stepping_through_solib_catchpoints);
+      stop_print_frame = 1;
+      stop_stepping (ecs);
+      return;
+    }
+
+  if (!CALL_DUMMY_BREAKPOINT_OFFSET_P)
+    {
+      /* This is the old way of detecting the end of the stack dummy.
+         An architecture which defines CALL_DUMMY_BREAKPOINT_OFFSET gets
+         handled above.  As soon as we can test it on all of them, all
+         architectures should define it.  */
+
+      /* If this is the breakpoint at the end of a stack dummy,
+         just stop silently, unless the user was doing an si/ni, in which
+         case she'd better know what she's doing.  */
+
+      if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (),
+				    FRAME_FP (get_current_frame ()))
+	  && !step_range_end)
+	{
+	  stop_print_frame = 0;
 	  stop_stack_dummy = 1;
 #ifdef HP_OS_BUG
 	  trap_expected_after_continue = 1;
 #endif
-	}
-
-      switch (what.main_action)
-	{
-	case BPSTAT_WHAT_SET_LONGJMP_RESUME:
-	  /* If we hit the breakpoint at longjmp, disable it for the
-	     duration of this command.  Then, install a temporary
-	     breakpoint at the target of the jmp_buf. */
-	  disable_longjmp_breakpoint ();
-	  remove_breakpoints ();
-	  breakpoints_inserted = 0;
-	  if (!GET_LONGJMP_TARGET_P ()
-	      || !GET_LONGJMP_TARGET (&jmp_buf_pc))
-	    {
-	      keep_going (ecs);
-	      return;
-	    }
-
-	  /* Need to blow away step-resume breakpoint, as it
-	     interferes with us */
-	  if (step_resume_breakpoint != NULL)
-	    {
-	      delete_step_resume_breakpoint (&step_resume_breakpoint);
-	    }
-	  /* Not sure whether we need to blow this away too, but probably
-	     it is like the step-resume breakpoint.  */
-	  if (through_sigtramp_breakpoint != NULL)
-	    {
-	      delete_breakpoint (through_sigtramp_breakpoint);
-	      through_sigtramp_breakpoint = NULL;
-	    }
-
-#if 0
-	  /* FIXME - Need to implement nested temporary breakpoints */
-	  if (step_over_calls > 0)
-	    set_longjmp_resume_breakpoint (jmp_buf_pc,
-					   get_current_frame ());
-	  else
-#endif /* 0 */
-	    set_longjmp_resume_breakpoint (jmp_buf_pc, NULL);
-	  ecs->handling_longjmp = 1;	/* FIXME */
-	  keep_going (ecs);
-	  return;
-
-	case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME:
-	case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
-	  remove_breakpoints ();
-	  breakpoints_inserted = 0;
-#if 0
-	  /* FIXME - Need to implement nested temporary breakpoints */
-	  if (step_over_calls
-	      && (INNER_THAN (FRAME_FP (get_current_frame ()),
-			      step_frame_address)))
-	    {
-	      ecs->another_trap = 1;
-	      keep_going (ecs);
-	      return;
-	    }
-#endif /* 0 */
-	  disable_longjmp_breakpoint ();
-	  ecs->handling_longjmp = 0;	/* FIXME */
-	  if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
-	    break;
-	  /* else fallthrough */
-
-	case BPSTAT_WHAT_SINGLE:
-	  if (breakpoints_inserted)
-	    {
-	      remove_breakpoints ();
-	    }
-	  breakpoints_inserted = 0;
-	  ecs->another_trap = 1;
-	  /* Still need to check other stuff, at least the case
-	     where we are stepping and step out of the right range.  */
-	  break;
-
-	case BPSTAT_WHAT_STOP_NOISY:
-	  stop_print_frame = 1;
-
-	  /* We are about to nuke the step_resume_breakpoint and
-	     through_sigtramp_breakpoint via the cleanup chain, so
-	     no need to worry about it here.  */
-
 	  stop_stepping (ecs);
 	  return;
-
-	case BPSTAT_WHAT_STOP_SILENT:
-	  stop_print_frame = 0;
-
-	  /* We are about to nuke the step_resume_breakpoint and
-	     through_sigtramp_breakpoint via the cleanup chain, so
-	     no need to worry about it here.  */
-
-	  stop_stepping (ecs);
-	  return;
-
-	case BPSTAT_WHAT_STEP_RESUME:
-	  /* This proably demands a more elegant solution, but, yeah
-	     right...
-
-	     This function's use of the simple variable
-	     step_resume_breakpoint doesn't seem to accomodate
-	     simultaneously active step-resume bp's, although the
-	     breakpoint list certainly can.
-
-	     If we reach here and step_resume_breakpoint is already
-	     NULL, then apparently we have multiple active
-	     step-resume bp's.  We'll just delete the breakpoint we
-	     stopped at, and carry on.  
-
-	     Correction: what the code currently does is delete a
-	     step-resume bp, but it makes no effort to ensure that
-	     the one deleted is the one currently stopped at.  MVS  */
-
-	  if (step_resume_breakpoint == NULL)
-	    {
-	      step_resume_breakpoint =
-		bpstat_find_step_resume_breakpoint (stop_bpstat);
-	    }
-	  delete_step_resume_breakpoint (&step_resume_breakpoint);
-	  break;
-
-	case BPSTAT_WHAT_THROUGH_SIGTRAMP:
-	  if (through_sigtramp_breakpoint)
-	    delete_breakpoint (through_sigtramp_breakpoint);
-	  through_sigtramp_breakpoint = NULL;
-
-	  /* If were waiting for a trap, hitting the step_resume_break
-	     doesn't count as getting it.  */
-	  if (trap_expected)
-	    ecs->another_trap = 1;
-	  break;
-
-	case BPSTAT_WHAT_CHECK_SHLIBS:
-	case BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK:
-#ifdef SOLIB_ADD
-	  {
-	    /* Remove breakpoints, we eventually want to step over the
-	       shlib event breakpoint, and SOLIB_ADD might adjust
-	       breakpoint addresses via breakpoint_re_set.  */
-	    if (breakpoints_inserted)
-	      remove_breakpoints ();
-	    breakpoints_inserted = 0;
-
-	    /* Check for any newly added shared libraries if we're
-	       supposed to be adding them automatically.  Switch
-	       terminal for any messages produced by
-	       breakpoint_re_set.  */
-	    target_terminal_ours_for_output ();
-	    SOLIB_ADD (NULL, 0, NULL, auto_solib_add);
-	    target_terminal_inferior ();
-
-	    /* Try to reenable shared library breakpoints, additional
-	       code segments in shared libraries might be mapped in now. */
-	    re_enable_breakpoints_in_shlibs ();
-
-	    /* If requested, stop when the dynamic linker notifies
-	       gdb of events.  This allows the user to get control
-	       and place breakpoints in initializer routines for
-	       dynamically loaded objects (among other things).  */
-	    if (stop_on_solib_events)
-	      {
-		stop_stepping (ecs);
-		return;
-	      }
-
-	    /* If we stopped due to an explicit catchpoint, then the
-	       (see above) call to SOLIB_ADD pulled in any symbols
-	       from a newly-loaded library, if appropriate.
-
-	       We do want the inferior to stop, but not where it is
-	       now, which is in the dynamic linker callback.  Rather,
-	       we would like it stop in the user's program, just after
-	       the call that caused this catchpoint to trigger.  That
-	       gives the user a more useful vantage from which to
-	       examine their program's state. */
-	    else if (what.main_action == BPSTAT_WHAT_CHECK_SHLIBS_RESUME_FROM_HOOK)
-	      {
-		/* ??rehrauer: If I could figure out how to get the
-		   right return PC from here, we could just set a temp
-		   breakpoint and resume.  I'm not sure we can without
-		   cracking open the dld's shared libraries and sniffing
-		   their unwind tables and text/data ranges, and that's
-		   not a terribly portable notion.
-
-		   Until that time, we must step the inferior out of the
-		   dld callback, and also out of the dld itself (and any
-		   code or stubs in libdld.sl, such as "shl_load" and
-		   friends) until we reach non-dld code.  At that point,
-		   we can stop stepping. */
-		bpstat_get_triggered_catchpoints (stop_bpstat,
-				  &ecs->stepping_through_solib_catchpoints);
-		ecs->stepping_through_solib_after_catch = 1;
-
-		/* Be sure to lift all breakpoints, so the inferior does
-		   actually step past this point... */
-		ecs->another_trap = 1;
-		break;
-	      }
-	    else
-	      {
-		/* We want to step over this breakpoint, then keep going.  */
-		ecs->another_trap = 1;
-		break;
-	      }
-	  }
-#endif
-	  break;
-
-	case BPSTAT_WHAT_LAST:
-	  /* Not a real code, but listed here to shut up gcc -Wall.  */
-
-	case BPSTAT_WHAT_KEEP_CHECKING:
-	  break;
 	}
     }
 
-    /* We come here if we hit a breakpoint but should not
-       stop for it.  Possibly we also were stepping
-       and should stop for that.  So fall through and
-       test for stepping.  But, if not stepping,
-       do not stop.  */
+  if (step_resume_breakpoint)
+    {
+      /* Having a step-resume breakpoint overrides anything
+         else having to do with stepping commands until
+         that breakpoint is reached.  */
+      /* I'm not sure whether this needs to be check_sigtramp2 or
+         whether it could/should be keep_going.  */
+      check_sigtramp2 (ecs);
+      keep_going (ecs);
+      return;
+    }
 
-    /* Are we stepping to get the inferior out of the dynamic
-       linker's hook (and possibly the dld itself) after catching
-       a shlib event? */
-    if (ecs->stepping_through_solib_after_catch)
+  if (step_range_end == 0)
+    {
+      /* Likewise if we aren't even stepping.  */
+      /* I'm not sure whether this needs to be check_sigtramp2 or
+         whether it could/should be keep_going.  */
+      check_sigtramp2 (ecs);
+      keep_going (ecs);
+      return;
+    }
+
+  /* If stepping through a line, keep going if still within it.
+
+     Note that step_range_end is the address of the first instruction
+     beyond the step range, and NOT the address of the last instruction
+     within it! */
+  if (stop_pc >= step_range_start && stop_pc < step_range_end)
+    {
+      /* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
+         So definately need to check for sigtramp here.  */
+      check_sigtramp2 (ecs);
+      keep_going (ecs);
+      return;
+    }
+
+  /* We stepped out of the stepping range.  */
+
+  /* If we are stepping at the source level and entered the runtime
+     loader dynamic symbol resolution code, we keep on single stepping
+     until we exit the run time loader code and reach the callee's
+     address.  */
+  if (step_over_calls == STEP_OVER_UNDEBUGGABLE
+      && IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
+    {
+      CORE_ADDR pc_after_resolver = SKIP_SOLIB_RESOLVER (stop_pc);
+
+      if (pc_after_resolver)
+	{
+	  /* Set up a step-resume breakpoint at the address
+	     indicated by SKIP_SOLIB_RESOLVER.  */
+	  struct symtab_and_line sr_sal;
+	  INIT_SAL (&sr_sal);
+	  sr_sal.pc = pc_after_resolver;
+
+	  check_for_old_step_resume_breakpoint ();
+	  step_resume_breakpoint =
+	    set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+	  if (breakpoints_inserted)
+	    insert_breakpoints ();
+	}
+
+      keep_going (ecs);
+      return;
+    }
+
+  /* We can't update step_sp every time through the loop, because
+     reading the stack pointer would slow down stepping too much.
+     But we can update it every time we leave the step range.  */
+  ecs->update_step_sp = 1;
+
+  /* Did we just take a signal?  */
+  if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+      && !PC_IN_SIGTRAMP (prev_pc, prev_func_name)
+      && INNER_THAN (read_sp (), step_sp))
+    {
+      /* We've just taken a signal; go until we are back to
+         the point where we took it and one more.  */
+
+      /* Note: The test above succeeds not only when we stepped
+         into a signal handler, but also when we step past the last
+         statement of a signal handler and end up in the return stub
+         of the signal handler trampoline.  To distinguish between
+         these two cases, check that the frame is INNER_THAN the
+         previous one below. pai/1997-09-11 */
+
+
       {
-#if defined(SOLIB_ADD)
-	/* Have we reached our destination?  If not, keep going. */
-	if (SOLIB_IN_DYNAMIC_LINKER (PIDGET (ecs->ptid), stop_pc))
+	CORE_ADDR current_frame = FRAME_FP (get_current_frame ());
+
+	if (INNER_THAN (current_frame, step_frame_address))
 	  {
-	    ecs->another_trap = 1;
-	    keep_going (ecs);
-	    return;
-	  }
-#endif
-	/* Else, stop and report the catchpoint(s) whose triggering
-	   caused us to begin stepping. */
-	ecs->stepping_through_solib_after_catch = 0;
-	bpstat_clear (&stop_bpstat);
-	stop_bpstat = bpstat_copy (ecs->stepping_through_solib_catchpoints);
-	bpstat_clear (&ecs->stepping_through_solib_catchpoints);
-	stop_print_frame = 1;
-	stop_stepping (ecs);
-	return;
-      }
+	    /* We have just taken a signal; go until we are back to
+	       the point where we took it and one more.  */
 
-    if (!CALL_DUMMY_BREAKPOINT_OFFSET_P)
-      {
-	/* This is the old way of detecting the end of the stack dummy.
-	   An architecture which defines CALL_DUMMY_BREAKPOINT_OFFSET gets
-	   handled above.  As soon as we can test it on all of them, all
-	   architectures should define it.  */
+	    /* This code is needed at least in the following case:
+	       The user types "next" and then a signal arrives (before
+	       the "next" is done).  */
 
-	/* If this is the breakpoint at the end of a stack dummy,
-	   just stop silently, unless the user was doing an si/ni, in which
-	   case she'd better know what she's doing.  */
-
-	if (CALL_DUMMY_HAS_COMPLETED (stop_pc, read_sp (),
-				      FRAME_FP (get_current_frame ()))
-	    && !step_range_end)
-	  {
-	    stop_print_frame = 0;
-	    stop_stack_dummy = 1;
-#ifdef HP_OS_BUG
-	    trap_expected_after_continue = 1;
-#endif
-	    stop_stepping (ecs);
-	    return;
-	  }
-      }
-
-    if (step_resume_breakpoint)
-      {
-	/* Having a step-resume breakpoint overrides anything
-	   else having to do with stepping commands until
-	   that breakpoint is reached.  */
-	/* I'm not sure whether this needs to be check_sigtramp2 or
-	   whether it could/should be keep_going.  */
-	check_sigtramp2 (ecs);
-	keep_going (ecs);
-	return;
-      }
-    
-    if (step_range_end == 0)
-      {
-	/* Likewise if we aren't even stepping.  */
-	/* I'm not sure whether this needs to be check_sigtramp2 or
-	   whether it could/should be keep_going.  */
-	check_sigtramp2 (ecs);
-	keep_going (ecs);
-	return;
-      }
-
-    /* If stepping through a line, keep going if still within it.
-
-       Note that step_range_end is the address of the first instruction
-       beyond the step range, and NOT the address of the last instruction
-       within it! */
-    if (stop_pc >= step_range_start
-	&& stop_pc < step_range_end)
-      {
-	/* We might be doing a BPSTAT_WHAT_SINGLE and getting a signal.
-	   So definately need to check for sigtramp here.  */
-	check_sigtramp2 (ecs);
-	keep_going (ecs);
-	return;
-      }
-
-    /* We stepped out of the stepping range.  */
-
-    /* If we are stepping at the source level and entered the runtime
-       loader dynamic symbol resolution code, we keep on single stepping
-       until we exit the run time loader code and reach the callee's
-       address.  */
-    if (step_over_calls == STEP_OVER_UNDEBUGGABLE && IN_SOLIB_DYNSYM_RESOLVE_CODE (stop_pc))
-      {
-	CORE_ADDR pc_after_resolver = SKIP_SOLIB_RESOLVER (stop_pc);
-
-	if (pc_after_resolver)
-	  {
-	    /* Set up a step-resume breakpoint at the address
-	       indicated by SKIP_SOLIB_RESOLVER.  */
+	    /* Note that if we are stopped at a breakpoint, then we need
+	       the step_resume breakpoint to override any breakpoints at
+	       the same location, so that we will still step over the
+	       breakpoint even though the signal happened.  */
 	    struct symtab_and_line sr_sal;
-	    INIT_SAL (&sr_sal);
-	    sr_sal.pc = pc_after_resolver;
 
+	    INIT_SAL (&sr_sal);
+	    sr_sal.symtab = NULL;
+	    sr_sal.line = 0;
+	    sr_sal.pc = prev_pc;
+	    /* We could probably be setting the frame to
+	       step_frame_address; I don't think anyone thought to
+	       try it.  */
 	    check_for_old_step_resume_breakpoint ();
 	    step_resume_breakpoint =
 	      set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
 	    if (breakpoints_inserted)
 	      insert_breakpoints ();
 	  }
-
-	keep_going (ecs);
-	return;
-      }
-
-    /* We can't update step_sp every time through the loop, because
-       reading the stack pointer would slow down stepping too much.
-       But we can update it every time we leave the step range.  */
-    ecs->update_step_sp = 1;
-
-    /* Did we just take a signal?  */
-    if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
-	&& !PC_IN_SIGTRAMP (prev_pc, prev_func_name)
-	&& INNER_THAN (read_sp (), step_sp))
-      {
-	/* We've just taken a signal; go until we are back to
-	   the point where we took it and one more.  */
-
-	/* Note: The test above succeeds not only when we stepped
-	   into a signal handler, but also when we step past the last
-	   statement of a signal handler and end up in the return stub
-	   of the signal handler trampoline.  To distinguish between
-	   these two cases, check that the frame is INNER_THAN the
-	   previous one below. pai/1997-09-11 */
-
-
-	{
-	  CORE_ADDR current_frame = FRAME_FP (get_current_frame ());
-
-	  if (INNER_THAN (current_frame, step_frame_address))
-	    {
-	      /* We have just taken a signal; go until we are back to
-	         the point where we took it and one more.  */
-
-	      /* This code is needed at least in the following case:
-	         The user types "next" and then a signal arrives (before
-	         the "next" is done).  */
-
-	      /* Note that if we are stopped at a breakpoint, then we need
-	         the step_resume breakpoint to override any breakpoints at
-	         the same location, so that we will still step over the
-	         breakpoint even though the signal happened.  */
-	      struct symtab_and_line sr_sal;
-
-	      INIT_SAL (&sr_sal);
-	      sr_sal.symtab = NULL;
-	      sr_sal.line = 0;
-	      sr_sal.pc = prev_pc;
-	      /* We could probably be setting the frame to
-	         step_frame_address; I don't think anyone thought to
-	         try it.  */
-	      check_for_old_step_resume_breakpoint ();
-	      step_resume_breakpoint =
-		set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
-	      if (breakpoints_inserted)
-		insert_breakpoints ();
-	    }
-	  else
-	    {
-	      /* We just stepped out of a signal handler and into
-	         its calling trampoline.
-
-	         Normally, we'd call step_over_function from
-	         here, but for some reason GDB can't unwind the
-	         stack correctly to find the real PC for the point
-	         user code where the signal trampoline will return
-	         -- FRAME_SAVED_PC fails, at least on HP-UX 10.20.
-	         But signal trampolines are pretty small stubs of
-	         code, anyway, so it's OK instead to just
-	         single-step out.  Note: assuming such trampolines
-	         don't exhibit recursion on any platform... */
-	      find_pc_partial_function (stop_pc, &ecs->stop_func_name,
-					&ecs->stop_func_start,
-					&ecs->stop_func_end);
-	      /* Readjust stepping range */
-	      step_range_start = ecs->stop_func_start;
-	      step_range_end = ecs->stop_func_end;
-	      ecs->stepping_through_sigtramp = 1;
-	    }
-	}
-
-
-	/* If this is stepi or nexti, make sure that the stepping range
-	   gets us past that instruction.  */
-	if (step_range_end == 1)
-	  /* FIXME: Does this run afoul of the code below which, if
-	     we step into the middle of a line, resets the stepping
-	     range?  */
-	  step_range_end = (step_range_start = prev_pc) + 1;
-
-	ecs->remove_breakpoints_on_following_step = 1;
-	keep_going (ecs);
-	return;
-      }
-
-    if (stop_pc == ecs->stop_func_start		/* Quick test */
-	|| (in_prologue (stop_pc, ecs->stop_func_start) &&
-	    !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
-	|| IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name)
-	|| ecs->stop_func_name == 0)
-      {
-	/* It's a subroutine call.  */
-
-	if ((step_over_calls == STEP_OVER_NONE)
-	    || ((step_range_end == 1)
-	        && in_prologue (prev_pc, ecs->stop_func_start)))
-	  {
-	    /* I presume that step_over_calls is only 0 when we're
-	       supposed to be stepping at the assembly language level
-	       ("stepi").  Just stop.  */
-	    /* Also, maybe we just did a "nexti" inside a prolog,
-               so we thought it was a subroutine call but it was not.
-               Stop as well.  FENN */
-	    stop_step = 1;
-	    print_stop_reason (END_STEPPING_RANGE, 0);
-	    stop_stepping (ecs);
-	    return;
-	  }
-
-	if (step_over_calls == STEP_OVER_ALL || IGNORE_HELPER_CALL (stop_pc))
-	  {
-	    /* We're doing a "next".  */
-
-	    if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
-		&& INNER_THAN (step_frame_address, read_sp()))
-	      /* We stepped out of a signal handler, and into its
-                 calling trampoline.  This is misdetected as a
-                 subroutine call, but stepping over the signal
-                 trampoline isn't such a bad idea.  In order to do
-                 that, we have to ignore the value in
-                 step_frame_address, since that doesn't represent the
-                 frame that'll reach when we return from the signal
-                 trampoline.  Otherwise we'll probably continue to the
-                 end of the program.  */
-	      step_frame_address = 0;
-
-	    step_over_function (ecs);
-	    keep_going (ecs);
-	    return;
-	  }
-
-	/* If we are in a function call trampoline (a stub between
-	   the calling routine and the real function), locate the real
-	   function.  That's what tells us (a) whether we want to step
-	   into it at all, and (b) what prologue we want to run to
-	   the end of, if we do step into it.  */
-	tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
-	if (tmp != 0)
-	  ecs->stop_func_start = tmp;
 	else
 	  {
-	    tmp = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
-	    if (tmp)
-	      {
-		struct symtab_and_line xxx;
-		/* Why isn't this s_a_l called "sr_sal", like all of the
-		   other s_a_l's where this code is duplicated?  */
-		INIT_SAL (&xxx);	/* initialize to zeroes */
-		xxx.pc = tmp;
-		xxx.section = find_pc_overlay (xxx.pc);
-		check_for_old_step_resume_breakpoint ();
-		step_resume_breakpoint =
-		  set_momentary_breakpoint (xxx, NULL, bp_step_resume);
-		insert_breakpoints ();
-		keep_going (ecs);
-		return;
-	      }
+	    /* We just stepped out of a signal handler and into
+	       its calling trampoline.
+
+	       Normally, we'd call step_over_function from
+	       here, but for some reason GDB can't unwind the
+	       stack correctly to find the real PC for the point
+	       user code where the signal trampoline will return
+	       -- FRAME_SAVED_PC fails, at least on HP-UX 10.20.
+	       But signal trampolines are pretty small stubs of
+	       code, anyway, so it's OK instead to just
+	       single-step out.  Note: assuming such trampolines
+	       don't exhibit recursion on any platform... */
+	    find_pc_partial_function (stop_pc, &ecs->stop_func_name,
+				      &ecs->stop_func_start,
+				      &ecs->stop_func_end);
+	    /* Readjust stepping range */
+	    step_range_start = ecs->stop_func_start;
+	    step_range_end = ecs->stop_func_end;
+	    ecs->stepping_through_sigtramp = 1;
 	  }
+      }
 
-	/* If we have line number information for the function we
-	   are thinking of stepping into, step into it.
 
-	   If there are several symtabs at that PC (e.g. with include
-	   files), just want to know whether *any* of them have line
-	   numbers.  find_pc_line handles this.  */
+      /* If this is stepi or nexti, make sure that the stepping range
+         gets us past that instruction.  */
+      if (step_range_end == 1)
+	/* FIXME: Does this run afoul of the code below which, if
+	   we step into the middle of a line, resets the stepping
+	   range?  */
+	step_range_end = (step_range_start = prev_pc) + 1;
+
+      ecs->remove_breakpoints_on_following_step = 1;
+      keep_going (ecs);
+      return;
+    }
+
+  if (stop_pc == ecs->stop_func_start	/* Quick test */
+      || (in_prologue (stop_pc, ecs->stop_func_start) &&
+	  !IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
+      || IN_SOLIB_CALL_TRAMPOLINE (stop_pc, ecs->stop_func_name)
+      || ecs->stop_func_name == 0)
+    {
+      /* It's a subroutine call.  */
+
+      if ((step_over_calls == STEP_OVER_NONE)
+	  || ((step_range_end == 1)
+	      && in_prologue (prev_pc, ecs->stop_func_start)))
 	{
-	  struct symtab_and_line tmp_sal;
+	  /* I presume that step_over_calls is only 0 when we're
+	     supposed to be stepping at the assembly language level
+	     ("stepi").  Just stop.  */
+	  /* Also, maybe we just did a "nexti" inside a prolog,
+	     so we thought it was a subroutine call but it was not.
+	     Stop as well.  FENN */
+	  stop_step = 1;
+	  print_stop_reason (END_STEPPING_RANGE, 0);
+	  stop_stepping (ecs);
+	  return;
+	}
 
-	  tmp_sal = find_pc_line (ecs->stop_func_start, 0);
-	  if (tmp_sal.line != 0)
+      if (step_over_calls == STEP_OVER_ALL || IGNORE_HELPER_CALL (stop_pc))
+	{
+	  /* We're doing a "next".  */
+
+	  if (PC_IN_SIGTRAMP (stop_pc, ecs->stop_func_name)
+	      && INNER_THAN (step_frame_address, read_sp ()))
+	    /* We stepped out of a signal handler, and into its
+	       calling trampoline.  This is misdetected as a
+	       subroutine call, but stepping over the signal
+	       trampoline isn't such a bad idea.  In order to do
+	       that, we have to ignore the value in
+	       step_frame_address, since that doesn't represent the
+	       frame that'll reach when we return from the signal
+	       trampoline.  Otherwise we'll probably continue to the
+	       end of the program.  */
+	    step_frame_address = 0;
+
+	  step_over_function (ecs);
+	  keep_going (ecs);
+	  return;
+	}
+
+      /* If we are in a function call trampoline (a stub between
+         the calling routine and the real function), locate the real
+         function.  That's what tells us (a) whether we want to step
+         into it at all, and (b) what prologue we want to run to
+         the end of, if we do step into it.  */
+      tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
+      if (tmp != 0)
+	ecs->stop_func_start = tmp;
+      else
+	{
+	  tmp = DYNAMIC_TRAMPOLINE_NEXTPC (stop_pc);
+	  if (tmp)
 	    {
-	      step_into_function (ecs);	
+	      struct symtab_and_line xxx;
+	      /* Why isn't this s_a_l called "sr_sal", like all of the
+	         other s_a_l's where this code is duplicated?  */
+	      INIT_SAL (&xxx);	/* initialize to zeroes */
+	      xxx.pc = tmp;
+	      xxx.section = find_pc_overlay (xxx.pc);
+	      check_for_old_step_resume_breakpoint ();
+	      step_resume_breakpoint =
+		set_momentary_breakpoint (xxx, NULL, bp_step_resume);
+	      insert_breakpoints ();
+	      keep_going (ecs);
 	      return;
 	    }
 	}
 
-	/* If we have no line number and the step-stop-if-no-debug
-	   is set, we stop the step so that the user has a chance to
-	   switch in assembly mode.  */
-	if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
-	  {
-	    stop_step = 1;
-	    print_stop_reason (END_STEPPING_RANGE, 0);
-	    stop_stepping (ecs);
-	    return;
-	  }
+      /* If we have line number information for the function we
+         are thinking of stepping into, step into it.
 
-	step_over_function (ecs);
-	keep_going (ecs);
-	return;
-
-      }
-
-    /* We've wandered out of the step range.  */
-
-    ecs->sal = find_pc_line (stop_pc, 0);
-
-    if (step_range_end == 1)
+         If there are several symtabs at that PC (e.g. with include
+         files), just want to know whether *any* of them have line
+         numbers.  find_pc_line handles this.  */
       {
-	/* It is stepi or nexti.  We always want to stop stepping after
-	   one instruction.  */
-	stop_step = 1;
-	print_stop_reason (END_STEPPING_RANGE, 0);
-	stop_stepping (ecs);
-	return;
-      }
+	struct symtab_and_line tmp_sal;
 
-    /* If we're in the return path from a shared library trampoline,
-       we want to proceed through the trampoline when stepping.  */
-    if (IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
-      {
-	CORE_ADDR tmp;
-
-	/* Determine where this trampoline returns.  */
-	tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
-
-	/* Only proceed through if we know where it's going.  */
-	if (tmp)
+	tmp_sal = find_pc_line (ecs->stop_func_start, 0);
+	if (tmp_sal.line != 0)
 	  {
-	    /* And put the step-breakpoint there and go until there. */
-	    struct symtab_and_line sr_sal;
-
-	    INIT_SAL (&sr_sal);	/* initialize to zeroes */
-	    sr_sal.pc = tmp;
-	    sr_sal.section = find_pc_overlay (sr_sal.pc);
-	    /* Do not specify what the fp should be when we stop
-	       since on some machines the prologue
-	       is where the new fp value is established.  */
-	    check_for_old_step_resume_breakpoint ();
-	    step_resume_breakpoint =
-	      set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
-	    if (breakpoints_inserted)
-	      insert_breakpoints ();
-
-	    /* Restart without fiddling with the step ranges or
-	       other state.  */
-	    keep_going (ecs);
+	    step_into_function (ecs);
 	    return;
 	  }
       }
 
-    if (ecs->sal.line == 0)
-      {
-	/* We have no line number information.  That means to stop
-	   stepping (does this always happen right after one instruction,
-	   when we do "s" in a function with no line numbers,
-	   or can this happen as a result of a return or longjmp?).  */
-	stop_step = 1;
-	print_stop_reason (END_STEPPING_RANGE, 0);
-	stop_stepping (ecs);
-	return;
-      }
+      /* If we have no line number and the step-stop-if-no-debug
+         is set, we stop the step so that the user has a chance to
+         switch in assembly mode.  */
+      if (step_over_calls == STEP_OVER_UNDEBUGGABLE && step_stop_if_no_debug)
+	{
+	  stop_step = 1;
+	  print_stop_reason (END_STEPPING_RANGE, 0);
+	  stop_stepping (ecs);
+	  return;
+	}
 
-    if ((stop_pc == ecs->sal.pc)
-	&& (ecs->current_line != ecs->sal.line || ecs->current_symtab != ecs->sal.symtab))
-      {
-	/* We are at the start of a different line.  So stop.  Note that
-	   we don't stop if we step into the middle of a different line.
-	   That is said to make things like for (;;) statements work
-	   better.  */
-	stop_step = 1;
-	print_stop_reason (END_STEPPING_RANGE, 0);
-	stop_stepping (ecs);
-	return;
-      }
+      step_over_function (ecs);
+      keep_going (ecs);
+      return;
 
-    /* We aren't done stepping.
-
-       Optimize by setting the stepping range to the line.
-       (We might not be in the original line, but if we entered a
-       new line in mid-statement, we continue stepping.  This makes
-       things like for(;;) statements work better.)  */
-
-    if (ecs->stop_func_end && ecs->sal.end >= ecs->stop_func_end)
-      {
-	/* If this is the last line of the function, don't keep stepping
-	   (it would probably step us out of the function).
-	   This is particularly necessary for a one-line function,
-	   in which after skipping the prologue we better stop even though
-	   we will be in mid-line.  */
-	stop_step = 1;
-	print_stop_reason (END_STEPPING_RANGE, 0);
-	stop_stepping (ecs);
-	return;
-      }
-    step_range_start = ecs->sal.pc;
-    step_range_end = ecs->sal.end;
-    step_frame_address = FRAME_FP (get_current_frame ());
-    ecs->current_line = ecs->sal.line;
-    ecs->current_symtab = ecs->sal.symtab;
-
-    /* In the case where we just stepped out of a function into the middle
-       of a line of the caller, continue stepping, but step_frame_address
-       must be modified to current frame */
-    {
-      CORE_ADDR current_frame = FRAME_FP (get_current_frame ());
-      if (!(INNER_THAN (current_frame, step_frame_address)))
-	step_frame_address = current_frame;
     }
 
-    keep_going (ecs);
+  /* We've wandered out of the step range.  */
 
-  } /* extra brace, to preserve old indentation */
+  ecs->sal = find_pc_line (stop_pc, 0);
+
+  if (step_range_end == 1)
+    {
+      /* It is stepi or nexti.  We always want to stop stepping after
+         one instruction.  */
+      stop_step = 1;
+      print_stop_reason (END_STEPPING_RANGE, 0);
+      stop_stepping (ecs);
+      return;
+    }
+
+  /* If we're in the return path from a shared library trampoline,
+     we want to proceed through the trampoline when stepping.  */
+  if (IN_SOLIB_RETURN_TRAMPOLINE (stop_pc, ecs->stop_func_name))
+    {
+      CORE_ADDR tmp;
+
+      /* Determine where this trampoline returns.  */
+      tmp = SKIP_TRAMPOLINE_CODE (stop_pc);
+
+      /* Only proceed through if we know where it's going.  */
+      if (tmp)
+	{
+	  /* And put the step-breakpoint there and go until there. */
+	  struct symtab_and_line sr_sal;
+
+	  INIT_SAL (&sr_sal);	/* initialize to zeroes */
+	  sr_sal.pc = tmp;
+	  sr_sal.section = find_pc_overlay (sr_sal.pc);
+	  /* Do not specify what the fp should be when we stop
+	     since on some machines the prologue
+	     is where the new fp value is established.  */
+	  check_for_old_step_resume_breakpoint ();
+	  step_resume_breakpoint =
+	    set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
+	  if (breakpoints_inserted)
+	    insert_breakpoints ();
+
+	  /* Restart without fiddling with the step ranges or
+	     other state.  */
+	  keep_going (ecs);
+	  return;
+	}
+    }
+
+  if (ecs->sal.line == 0)
+    {
+      /* We have no line number information.  That means to stop
+         stepping (does this always happen right after one instruction,
+         when we do "s" in a function with no line numbers,
+         or can this happen as a result of a return or longjmp?).  */
+      stop_step = 1;
+      print_stop_reason (END_STEPPING_RANGE, 0);
+      stop_stepping (ecs);
+      return;
+    }
+
+  if ((stop_pc == ecs->sal.pc)
+      && (ecs->current_line != ecs->sal.line
+	  || ecs->current_symtab != ecs->sal.symtab))
+    {
+      /* We are at the start of a different line.  So stop.  Note that
+         we don't stop if we step into the middle of a different line.
+         That is said to make things like for (;;) statements work
+         better.  */
+      stop_step = 1;
+      print_stop_reason (END_STEPPING_RANGE, 0);
+      stop_stepping (ecs);
+      return;
+    }
+
+  /* We aren't done stepping.
+
+     Optimize by setting the stepping range to the line.
+     (We might not be in the original line, but if we entered a
+     new line in mid-statement, we continue stepping.  This makes
+     things like for(;;) statements work better.)  */
+
+  if (ecs->stop_func_end && ecs->sal.end >= ecs->stop_func_end)
+    {
+      /* If this is the last line of the function, don't keep stepping
+         (it would probably step us out of the function).
+         This is particularly necessary for a one-line function,
+         in which after skipping the prologue we better stop even though
+         we will be in mid-line.  */
+      stop_step = 1;
+      print_stop_reason (END_STEPPING_RANGE, 0);
+      stop_stepping (ecs);
+      return;
+    }
+  step_range_start = ecs->sal.pc;
+  step_range_end = ecs->sal.end;
+  step_frame_address = FRAME_FP (get_current_frame ());
+  ecs->current_line = ecs->sal.line;
+  ecs->current_symtab = ecs->sal.symtab;
+
+  /* In the case where we just stepped out of a function into the middle
+     of a line of the caller, continue stepping, but step_frame_address
+     must be modified to current frame */
+  {
+    CORE_ADDR current_frame = FRAME_FP (get_current_frame ());
+    if (!(INNER_THAN (current_frame, step_frame_address)))
+      step_frame_address = current_frame;
+  }
+
+  keep_going (ecs);
 }
 
 /* Are we in the middle of stepping?  */
@@ -2966,15 +2954,15 @@
       && INNER_THAN (read_sp (), step_sp))
     {
       /* What has happened here is that we have just stepped the
-	 inferior with a signal (because it is a signal which
-	 shouldn't make us stop), thus stepping into sigtramp.
+         inferior with a signal (because it is a signal which
+         shouldn't make us stop), thus stepping into sigtramp.
 
-	 So we need to set a step_resume_break_address breakpoint and
-	 continue until we hit it, and then step.  FIXME: This should
-	 be more enduring than a step_resume breakpoint; we should
-	 know that we will later need to keep going rather than
-	 re-hitting the breakpoint here (see the testsuite,
-	 gdb.base/signals.exp where it says "exceedingly difficult").  */
+         So we need to set a step_resume_break_address breakpoint and
+         continue until we hit it, and then step.  FIXME: This should
+         be more enduring than a step_resume breakpoint; we should
+         know that we will later need to keep going rather than
+         re-hitting the breakpoint here (see the testsuite,
+         gdb.base/signals.exp where it says "exceedingly difficult").  */
 
       struct symtab_and_line sr_sal;
 
@@ -2982,7 +2970,7 @@
       sr_sal.pc = prev_pc;
       sr_sal.section = find_pc_overlay (sr_sal.pc);
       /* We perhaps could set the frame if we kept track of what the
-	 frame corresponding to prev_pc was.  But we don't, so don't.  */
+         frame corresponding to prev_pc was.  But we don't, so don't.  */
       through_sigtramp_breakpoint =
 	set_momentary_breakpoint (sr_sal, NULL, bp_through_sigtramp);
       if (breakpoints_inserted)
@@ -3027,7 +3015,7 @@
     {
       /* We are already there: stop now.  */
       stop_step = 1;
-	print_stop_reason (END_STEPPING_RANGE, 0);
+      print_stop_reason (END_STEPPING_RANGE, 0);
       stop_stepping (ecs);
       return;
     }
@@ -3038,8 +3026,8 @@
       sr_sal.pc = ecs->stop_func_start;
       sr_sal.section = find_pc_overlay (ecs->stop_func_start);
       /* Do not specify what the fp should be when we stop since on
-	 some machines the prologue is where the new fp value is
-	 established.  */
+         some machines the prologue is where the new fp value is
+         established.  */
       check_for_old_step_resume_breakpoint ();
       step_resume_breakpoint =
 	set_momentary_breakpoint (sr_sal, NULL, bp_step_resume);
@@ -3069,7 +3057,7 @@
 {
   struct symtab_and_line sr_sal;
 
-  INIT_SAL (&sr_sal);	/* initialize to zeros */
+  INIT_SAL (&sr_sal);		/* initialize to zeros */
   sr_sal.pc = ADDR_BITS_REMOVE (SAVED_PC_AFTER_CALL (get_current_frame ()));
   sr_sal.section = find_pc_overlay (sr_sal.pc);
 
@@ -3110,7 +3098,7 @@
 	      else
 		parent_ptid = target_wait (pid_to_ptid (-1), &(ecs->ws));
 	    }
-	  while (! ptid_equal (parent_ptid, inferior_ptid));
+	  while (!ptid_equal (parent_ptid, inferior_ptid));
 	}
 
       /* Assuming the inferior still exists, set these up for next
@@ -3143,7 +3131,7 @@
      target_can_follow_vfork_prior_to_exec returns 1. */
 
   /* Save the pc before execution, to compare with pc after stop.  */
-  prev_pc = read_pc ();	/* Might have been DECR_AFTER_BREAK */
+  prev_pc = read_pc ();		/* Might have been DECR_AFTER_BREAK */
   prev_func_start = ecs->stop_func_start;	/* Ok, since if DECR_PC_AFTER
 						   BREAK is defined, the
 						   original pc would not have
@@ -3161,25 +3149,25 @@
   if (trap_expected && stop_signal != TARGET_SIGNAL_TRAP)
     {
       /* We took a signal (which we are supposed to pass through to
-	 the inferior, else we'd have done a break above) and we
-	 haven't yet gotten our trap.  Simply continue.  */
+         the inferior, else we'd have done a break above) and we
+         haven't yet gotten our trap.  Simply continue.  */
       resume (currently_stepping (ecs), stop_signal);
     }
   else
     {
       /* Either the trap was not expected, but we are continuing
-	 anyway (the user asked that this signal be passed to the
-	 child)
-	 -- or --
-	 The signal was SIGTRAP, e.g. it was our signal, but we
-	 decided we should resume from it.
+         anyway (the user asked that this signal be passed to the
+         child)
+         -- or --
+         The signal was SIGTRAP, e.g. it was our signal, but we
+         decided we should resume from it.
 
-	 We're going to run this baby now!
+         We're going to run this baby now!
 
-	 Insert breakpoints now, unless we are trying to one-proceed
-	 past a breakpoint.  */
+         Insert breakpoints now, unless we are trying to one-proceed
+         past a breakpoint.  */
       /* If we've just finished a special step resume and we don't
-	 want to hit a breakpoint, pull em out.  */
+         want to hit a breakpoint, pull em out.  */
       if (step_resume_breakpoint == NULL
 	  && through_sigtramp_breakpoint == NULL
 	  && ecs->remove_breakpoints_on_following_step)
@@ -3203,38 +3191,36 @@
       trap_expected = ecs->another_trap;
 
       /* Do not deliver SIGNAL_TRAP (except when the user explicitly
-	 specifies that such a signal should be delivered to the
-	 target program).
+         specifies that such a signal should be delivered to the
+         target program).
 
-	 Typically, this would occure when a user is debugging a
-	 target monitor on a simulator: the target monitor sets a
-	 breakpoint; the simulator encounters this break-point and
-	 halts the simulation handing control to GDB; GDB, noteing
-	 that the break-point isn't valid, returns control back to the
-	 simulator; the simulator then delivers the hardware
-	 equivalent of a SIGNAL_TRAP to the program being debugged. */
+         Typically, this would occure when a user is debugging a
+         target monitor on a simulator: the target monitor sets a
+         breakpoint; the simulator encounters this break-point and
+         halts the simulation handing control to GDB; GDB, noteing
+         that the break-point isn't valid, returns control back to the
+         simulator; the simulator then delivers the hardware
+         equivalent of a SIGNAL_TRAP to the program being debugged. */
 
-      if (stop_signal == TARGET_SIGNAL_TRAP
-	  && !signal_program[stop_signal])
+      if (stop_signal == TARGET_SIGNAL_TRAP && !signal_program[stop_signal])
 	stop_signal = TARGET_SIGNAL_0;
 
 #ifdef SHIFT_INST_REGS
       /* I'm not sure when this following segment applies.  I do know,
-	 now, that we shouldn't rewrite the regs when we were stopped
-	 by a random signal from the inferior process.  */
+         now, that we shouldn't rewrite the regs when we were stopped
+         by a random signal from the inferior process.  */
       /* FIXME: Shouldn't this be based on the valid bit of the SXIP?
-	 (this is only used on the 88k).  */
+         (this is only used on the 88k).  */
 
       if (!bpstat_explains_signal (stop_bpstat)
-	  && (stop_signal != TARGET_SIGNAL_CHLD)
-	  && !stopped_by_random_signal)
+	  && (stop_signal != TARGET_SIGNAL_CHLD) && !stopped_by_random_signal)
 	SHIFT_INST_REGS ();
 #endif /* SHIFT_INST_REGS */
 
       resume (currently_stepping (ecs), stop_signal);
     }
 
-    prepare_to_wait (ecs);
+  prepare_to_wait (ecs);
 }
 
 /* This function normally comes after a resume, before
@@ -3249,10 +3235,10 @@
       overlay_cache_invalid = 1;
 
       /* We have to invalidate the registers BEFORE calling
-	 target_wait because they can be loaded from the target while
-	 in target_wait.  This makes remote debugging a bit more
-	 efficient for those targets that provide critical registers
-	 as part of their normal status mechanism. */
+         target_wait because they can be loaded from the target while
+         in target_wait.  This makes remote debugging a bit more
+         efficient for those targets that provide critical registers
+         as part of their normal status mechanism. */
 
       registers_changed ();
       ecs->waiton_ptid = pid_to_ptid (-1);
@@ -3282,7 +3268,7 @@
       /* We are done with a step/next/si/ni command. */
       /* For now print nothing. */
       /* Print a message only if not in the middle of doing a "step n"
-	 operation for n > 1 */
+         operation for n > 1 */
       if (!step_multi || !stop_step)
 	if (ui_out_is_mi_like_p (uiout))
 	  ui_out_field_string (uiout, "reason", "end-stepping-range");
@@ -3298,11 +3284,13 @@
 	ui_out_field_string (uiout, "reason", "exited-signalled");
       ui_out_text (uiout, "\nProgram terminated with signal ");
       annotate_signal_name ();
-      ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
+      ui_out_field_string (uiout, "signal-name",
+			   target_signal_to_name (stop_info));
       annotate_signal_name_end ();
       ui_out_text (uiout, ", ");
       annotate_signal_string ();
-      ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
+      ui_out_field_string (uiout, "signal-meaning",
+			   target_signal_to_string (stop_info));
       annotate_signal_string_end ();
       ui_out_text (uiout, ".\n");
       ui_out_text (uiout, "The program no longer exists.\n");
@@ -3315,7 +3303,8 @@
 	  if (ui_out_is_mi_like_p (uiout))
 	    ui_out_field_string (uiout, "reason", "exited");
 	  ui_out_text (uiout, "\nProgram exited with code ");
-	  ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
+	  ui_out_field_fmt (uiout, "exit-code", "0%o",
+			    (unsigned int) stop_info);
 	  ui_out_text (uiout, ".\n");
 	}
       else
@@ -3333,11 +3322,13 @@
       annotate_signal_name ();
       if (ui_out_is_mi_like_p (uiout))
 	ui_out_field_string (uiout, "reason", "signal-received");
-      ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
+      ui_out_field_string (uiout, "signal-name",
+			   target_signal_to_name (stop_info));
       annotate_signal_name_end ();
       ui_out_text (uiout, ", ");
       annotate_signal_string ();
-      ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
+      ui_out_field_string (uiout, "signal-meaning",
+			   target_signal_to_string (stop_info));
       annotate_signal_string_end ();
       ui_out_text (uiout, ".\n");
       break;
@@ -3366,7 +3357,7 @@
 
      (Note that there's no point in saying anything if the inferior
      has exited!) */
-  if (! ptid_equal (previous_inferior_ptid, inferior_ptid)
+  if (!ptid_equal (previous_inferior_ptid, inferior_ptid)
       && target_has_execution)
     {
       target_terminal_ours_for_output ();
@@ -3381,16 +3372,6 @@
   if (target_has_execution && get_current_frame ())
     (get_current_frame ())->pc = read_pc ();
 
-  if (breakpoints_failed)
-    {
-      target_terminal_ours_for_output ();
-      print_sys_errmsg ("While inserting breakpoints", breakpoints_failed);
-      printf_filtered ("Stopped; cannot insert breakpoints.\n\
-The same program may be running in another process,\n\
-or you may have requested too many hardware breakpoints\n\
-and/or watchpoints.\n");
-    }
-
   if (target_has_execution && breakpoints_inserted)
     {
       if (remove_breakpoints ())
@@ -3449,8 +3430,7 @@
          bpstat_print() contains the logic deciding in detail
          what to print, based on the event(s) that just occurred. */
 
-      if (stop_print_frame
-	  && selected_frame)
+      if (stop_print_frame && selected_frame)
 	{
 	  int bpstat_ret;
 	  int source_flag;
@@ -3463,32 +3443,31 @@
 	      if (stop_step
 		  && step_frame_address == FRAME_FP (get_current_frame ())
 		  && step_start_function == find_pc_function (stop_pc))
-		source_flag = SRC_LINE;   /* finished step, just print source line */
+		source_flag = SRC_LINE;	/* finished step, just print source line */
 	      else
-		source_flag = SRC_AND_LOC;    /* print location and source line */
+		source_flag = SRC_AND_LOC;	/* print location and source line */
 	      break;
 	    case PRINT_SRC_AND_LOC:
-	      source_flag = SRC_AND_LOC;    /* print location and source line */
+	      source_flag = SRC_AND_LOC;	/* print location and source line */
 	      break;
 	    case PRINT_SRC_ONLY:
 	      source_flag = SRC_LINE;
 	      break;
 	    case PRINT_NOTHING:
-	      source_flag = SRC_LINE; /* something bogus */
+	      source_flag = SRC_LINE;	/* something bogus */
 	      do_frame_printing = 0;
 	      break;
 	    default:
-	      internal_error (__FILE__, __LINE__,
-			      "Unknown value.");
+	      internal_error (__FILE__, __LINE__, "Unknown value.");
 	    }
 	  /* For mi, have the same behavior every time we stop:
-             print everything but the source line. */
+	     print everything but the source line. */
 	  if (ui_out_is_mi_like_p (uiout))
 	    source_flag = LOC_AND_ADDRESS;
 
 	  if (ui_out_is_mi_like_p (uiout))
 	    ui_out_field_int (uiout, "thread-id",
-	                      pid_to_thread_id (inferior_ptid));
+			      pid_to_thread_id (inferior_ptid));
 	  /* The behavior of this routine with respect to the source
 	     flag is:
 	     SRC_LINE: Print only source line
@@ -3505,7 +3484,9 @@
   /* Save the function value return registers, if we care.
      We might be about to restore their previous contents.  */
   if (proceed_to_finish)
-    read_register_bytes (0, stop_registers, REGISTER_BYTES);
+    /* NB: The copy goes through to the target picking up the value of
+       all the registers.  */
+    regcache_cpy (stop_registers, current_regcache);
 
   if (stop_stack_dummy)
     {
@@ -3549,7 +3530,8 @@
   return signal_program[signo];
 }
 
-int signal_stop_update (signo, state)
+int
+signal_stop_update (signo, state)
      int signo;
      int state;
 {
@@ -3558,7 +3540,8 @@
   return ret;
 }
 
-int signal_print_update (signo, state)
+int
+signal_print_update (signo, state)
      int signo;
      int state;
 {
@@ -3567,7 +3550,8 @@
   return ret;
 }
 
-int signal_pass_update (signo, state)
+int
+signal_pass_update (signo, state)
      int signo;
      int state;
 {
@@ -3593,8 +3577,7 @@
     name_padding = 0;
 
   printf_filtered ("%s", name);
-  printf_filtered ("%*.*s ", name_padding, name_padding,
-		   "                 ");
+  printf_filtered ("%*.*s ", name_padding, name_padding, "                 ");
   printf_filtered ("%s\t", signal_stop[oursig] ? "Yes" : "No");
   printf_filtered ("%s\t", signal_print[oursig] ? "Yes" : "No");
   printf_filtered ("%s\t\t", signal_program[oursig] ? "Yes" : "No");
@@ -3740,9 +3723,7 @@
 	      if (!allsigs && !sigs[signum])
 		{
 		  if (query ("%s is used by the debugger.\n\
-Are you sure you want to change it? ",
-			     target_signal_to_name
-			     ((enum target_signal) signum)))
+Are you sure you want to change it? ", target_signal_to_name ((enum target_signal) signum)))
 		    {
 		      sigs[signum] = 1;
 		    }
@@ -3886,8 +3867,7 @@
       QUIT;
 
       if (oursig != TARGET_SIGNAL_UNKNOWN
-	  && oursig != TARGET_SIGNAL_DEFAULT
-	  && oursig != TARGET_SIGNAL_0)
+	  && oursig != TARGET_SIGNAL_DEFAULT && oursig != TARGET_SIGNAL_0)
 	sig_print_info (oursig);
     }
 
@@ -3910,38 +3890,21 @@
   CORE_ADDR step_resume_break_address;
   int stop_after_trap;
   int stop_soon_quietly;
-  CORE_ADDR selected_frame_address;
-  char *stop_registers;
+  struct regcache *stop_registers;
 
   /* These are here because if call_function_by_hand has written some
      registers and then decides to call error(), we better not have changed
      any registers.  */
-  char *registers;
+  struct regcache *registers;
 
-  int selected_level;
+  /* A frame unique identifier.  */
+  struct frame_id selected_frame_id;
+
   int breakpoint_proceeded;
   int restore_stack_info;
   int proceed_to_finish;
 };
 
-static struct inferior_status *
-xmalloc_inferior_status (void)
-{
-  struct inferior_status *inf_status;
-  inf_status = xmalloc (sizeof (struct inferior_status));
-  inf_status->stop_registers = xmalloc (REGISTER_BYTES);
-  inf_status->registers = xmalloc (REGISTER_BYTES);
-  return inf_status;
-}
-
-static void
-free_inferior_status (struct inferior_status *inf_status)
-{
-  xfree (inf_status->registers);
-  xfree (inf_status->stop_registers);
-  xfree (inf_status);
-}
-
 void
 write_inferior_status_register (struct inferior_status *inf_status, int regno,
 				LONGEST val)
@@ -3949,7 +3912,7 @@
   int size = REGISTER_RAW_SIZE (regno);
   void *buf = alloca (size);
   store_signed_integer (buf, size, val);
-  memcpy (&inf_status->registers[REGISTER_BYTE (regno)], buf, size);
+  regcache_raw_write (inf_status->registers, regno, buf);
 }
 
 /* Save all of the information associated with the inferior<==>gdb
@@ -3959,7 +3922,7 @@
 struct inferior_status *
 save_inferior_status (int restore_stack_info)
 {
-  struct inferior_status *inf_status = xmalloc_inferior_status ();
+  struct inferior_status *inf_status = XMALLOC (struct inferior_status);
 
   inf_status->stop_signal = stop_signal;
   inf_status->stop_pc = stop_pc;
@@ -3983,42 +3946,25 @@
   inf_status->restore_stack_info = restore_stack_info;
   inf_status->proceed_to_finish = proceed_to_finish;
 
-  memcpy (inf_status->stop_registers, stop_registers, REGISTER_BYTES);
+  inf_status->stop_registers = regcache_dup_no_passthrough (stop_registers);
 
-  read_register_bytes (0, inf_status->registers, REGISTER_BYTES);
+  inf_status->registers = regcache_dup (current_regcache);
 
-  record_selected_frame (&(inf_status->selected_frame_address),
-			 &(inf_status->selected_level));
+  get_frame_id (selected_frame, &inf_status->selected_frame_id);
   return inf_status;
 }
 
-struct restore_selected_frame_args
-{
-  CORE_ADDR frame_address;
-  int level;
-};
-
 static int
 restore_selected_frame (void *args)
 {
-  struct restore_selected_frame_args *fr =
-  (struct restore_selected_frame_args *) args;
+  struct frame_id *fid = (struct frame_id *) args;
   struct frame_info *frame;
-  int level = fr->level;
 
-  frame = find_relative_frame (get_current_frame (), &level);
+  frame = frame_find_by_id (*fid);
 
   /* If inf_status->selected_frame_address is NULL, there was no
      previously selected frame.  */
-  if (frame == NULL ||
-  /*  FRAME_FP (frame) != fr->frame_address || */
-  /* elz: deleted this check as a quick fix to the problem that
-     for function called by hand gdb creates no internal frame
-     structure and the real stack and gdb's idea of stack are
-     different if nested calls by hands are made.
-
-     mvs: this worries me.  */
-      level != 0)
+  if (frame == NULL)
     {
       warning ("Unable to restore previously selected frame.\n");
       return 0;
@@ -4049,13 +3995,16 @@
   breakpoint_proceeded = inf_status->breakpoint_proceeded;
   proceed_to_finish = inf_status->proceed_to_finish;
 
-  /* FIXME: Is the restore of stop_registers always needed */
-  memcpy (stop_registers, inf_status->stop_registers, REGISTER_BYTES);
+  /* FIXME: Is the restore of stop_registers always needed. */
+  regcache_xfree (stop_registers);
+  stop_registers = inf_status->stop_registers;
 
   /* The inferior can be gone if the user types "print exit(0)"
      (and perhaps other times).  */
   if (target_has_execution)
-    write_register_bytes (0, inf_status->registers, REGISTER_BYTES);
+    /* NB: The register write goes through to the target.  */
+    regcache_cpy (current_regcache, inf_status->registers);
+  regcache_xfree (inf_status->registers);
 
   /* FIXME: If we are being called after stopping in a function which
      is called from gdb, we should not be trying to restore the
@@ -4066,24 +4015,20 @@
 
   if (target_has_stack && inf_status->restore_stack_info)
     {
-      struct restore_selected_frame_args fr;
-      fr.level = inf_status->selected_level;
-      fr.frame_address = inf_status->selected_frame_address;
       /* The point of catch_errors is that if the stack is clobbered,
-         walking the stack might encounter a garbage pointer and error()
-         trying to dereference it.  */
-      if (catch_errors (restore_selected_frame, &fr,
-			"Unable to restore previously selected frame:\n",
-			RETURN_MASK_ERROR) == 0)
+         walking the stack might encounter a garbage pointer and
+         error() trying to dereference it.  */
+      if (catch_errors
+	  (restore_selected_frame, &inf_status->selected_frame_id,
+	   "Unable to restore previously selected frame:\n",
+	   RETURN_MASK_ERROR) == 0)
 	/* Error in restoring the selected frame.  Select the innermost
 	   frame.  */
-
-
 	select_frame (get_current_frame ());
 
     }
 
-  free_inferior_status (inf_status);
+  xfree (inf_status);
 }
 
 static void
@@ -4103,7 +4048,9 @@
 {
   /* See save_inferior_status for info on stop_bpstat. */
   bpstat_clear (&inf_status->stop_bpstat);
-  free_inferior_status (inf_status);
+  regcache_xfree (inf_status->registers);
+  regcache_xfree (inf_status->stop_registers);
+  xfree (inf_status);
 }
 
 /* Oft used ptids */
@@ -4111,7 +4058,7 @@
 ptid_t minus_one_ptid;
 
 /* Create a ptid given the necessary PID, LWP, and TID components.  */
-   
+
 ptid_t
 ptid_build (int pid, long lwp, long tid)
 {
@@ -4161,7 +4108,7 @@
 ptid_equal (ptid_t ptid1, ptid_t ptid2)
 {
   return (ptid1.pid == ptid2.pid && ptid1.lwp == ptid2.lwp
-          && ptid1.tid == ptid2.tid);
+	  && ptid1.tid == ptid2.tid);
 }
 
 /* restore_inferior_ptid() will be used by the cleanup machinery
@@ -4189,12 +4136,12 @@
   *saved_ptid_ptr = inferior_ptid;
   return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
 }
-
 
+
 static void
 build_infrun (void)
 {
-  stop_registers = xmalloc (REGISTER_BYTES);
+  stop_registers = regcache_xmalloc (current_gdbarch);
 }
 
 void
@@ -4204,8 +4151,6 @@
   register int numsigs;
   struct cmd_list_element *c;
 
-  build_infrun ();
-
   register_gdbarch_swap (&stop_registers, sizeof (stop_registers), NULL);
   register_gdbarch_swap (NULL, 0, build_infrun);
 
@@ -4221,8 +4166,7 @@
 from 1-15 are allowed for compatibility with old versions of GDB.\n\
 Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
 The special arg \"all\" is recognized to mean all signals except those\n\
-used by the debugger, typically SIGTRAP and SIGINT.\n",
-		   "Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
+used by the debugger, typically SIGTRAP and SIGINT.\n", "Recognized actions include \"stop\", \"nostop\", \"print\", \"noprint\",\n\
 \"pass\", \"nopass\", \"ignore\", or \"noignore\".\n\
 Stop means reenter debugger if this signal happens (implies print).\n\
 Print means print a message if this signal happens.\n\
@@ -4241,8 +4185,7 @@
 from 1-15 are allowed for compatibility with old versions of GDB.\n\
 Numeric ranges may be specified with the form LOW-HIGH (e.g. 1-5).\n\
 The special arg \"all\" is recognized to mean all signals except those\n\
-used by the debugger, typically SIGTRAP and SIGINT.\n",
-		       "Recognized actions include \"s\" (toggles between stop and nostop), \n\
+used by the debugger, typically SIGTRAP and SIGINT.\n", "Recognized actions include \"s\" (toggles between stop and nostop), \n\
 \"r\" (toggles between print and noprint), \"i\" (toggles between pass and \
 nopass), \"Q\" (noprint)\n\
 Stop means reenter debugger if this signal happens (implies print).\n\
@@ -4253,14 +4196,13 @@
     }
 
   if (!dbx_commands)
-    stop_command = add_cmd ("stop", class_obscure, not_just_help_class_command,
-			    "There is no `stop' command, but you can set a hook on `stop'.\n\
+    stop_command =
+      add_cmd ("stop", class_obscure, not_just_help_class_command, "There is no `stop' command, but you can set a hook on `stop'.\n\
 This allows you to set a list of commands to be run each time execution\n\
 of the program stops.", &cmdlist);
 
   numsigs = (int) TARGET_SIGNAL_LAST;
-  signal_stop = (unsigned char *)
-    xmalloc (sizeof (signal_stop[0]) * numsigs);
+  signal_stop = (unsigned char *) xmalloc (sizeof (signal_stop[0]) * numsigs);
   signal_print = (unsigned char *)
     xmalloc (sizeof (signal_print[0]) * numsigs);
   signal_program = (unsigned char *)
@@ -4313,15 +4255,12 @@
 		  "Set stopping for shared library events.\n\
 If nonzero, gdb will give control to the user when the dynamic linker\n\
 notifies gdb of shared library events.  The most common event of interest\n\
-to the user would be loading/unloading of a new library.\n",
-		  &setlist),
-     &showlist);
+to the user would be loading/unloading of a new library.\n", &setlist), &showlist);
 #endif
 
   c = add_set_enum_cmd ("follow-fork-mode",
 			class_run,
-			follow_fork_mode_kind_names,
-			&follow_fork_mode_string,
+			follow_fork_mode_kind_names, &follow_fork_mode_string,
 /* ??rehrauer:  The "both" option is broken, by what may be a 10.20
    kernel problem.  It's also not terribly useful without a GUI to
    help the user drive two debuggers.  So for now, I'm disabling
@@ -4347,31 +4286,27 @@
   child   - the new process is debugged after a fork\n\
   ask     - the debugger will ask for one of the above choices\n\
 For \"parent\" or \"child\", the unfollowed process will run free.\n\
-By default, the debugger will follow the parent process.",
-			&setlist);
+By default, the debugger will follow the parent process.", &setlist);
   add_show_from_set (c, &showlist);
 
-  c = add_set_enum_cmd ("scheduler-locking", class_run,
-			scheduler_enums,	/* array of string names */
+  c = add_set_enum_cmd ("scheduler-locking", class_run, scheduler_enums,	/* array of string names */
 			&scheduler_mode,	/* current mode  */
 			"Set mode for locking scheduler during execution.\n\
 off  == no locking (threads may preempt at any time)\n\
 on   == full locking (no thread except the current thread may run)\n\
 step == scheduler locked during every single-step operation.\n\
 	In this mode, no other thread may run during a step command.\n\
-	Other threads may run while stepping over a function call ('next').",
-			&setlist);
+	Other threads may run while stepping over a function call ('next').", &setlist);
 
   set_cmd_sfunc (c, set_schedlock_func);	/* traps on target vector */
   add_show_from_set (c, &showlist);
 
   c = add_set_cmd ("step-mode", class_run,
-		   var_boolean, (char*) &step_stop_if_no_debug,
-"Set mode of the step operation. When set, doing a step over a\n\
+		   var_boolean, (char *) &step_stop_if_no_debug,
+		   "Set mode of the step operation. When set, doing a step over a\n\
 function without debug line information will stop at the first\n\
 instruction of that function. Otherwise, the function is skipped and\n\
-the step command stops at a different source line.",
-			&setlist);
+the step command stops at a different source line.", &setlist);
   add_show_from_set (c, &showlist);
 
   /* ptid initializations */
diff --git a/gdb/interps.c b/gdb/interps.c
deleted file mode 100644
index 4b9b901..0000000
--- a/gdb/interps.c
+++ /dev/null
@@ -1,659 +0,0 @@
-/* Manages interpreters for gdb.
-   Copyright 2000, 2002 Free Software Foundation, Inc.
-   Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA. */
-
-/* This is just a first cut at separating out the "interpreter" functions
-   of gdb into self-contained modules.  There are a couple of open areas that
-   need to be sorted out:
-
-   1) The interpreter explicitly contains a UI_OUT, and can insert itself
-   into the event loop, but it doesn't explicitly contain hooks for readline.
-   I did this because it seems to me many interpreters won't want to use
-   the readline command interface, and it is probably simpler to just let
-   them take over the input in their resume proc.  
-
-   2) The event loop insertion is probably wrong.  I just inserted a 
-   do_one_event alongside gdb's do_one_event.  This probably will lead
-   to one or the other event loop getting starved.  It would be better
-   to provide conversion functions for the gdb file handlers, and when
-   an interpreter starts up, it grabs all the gdb created file handlers
-   and inserts them into its select.  This is more complicated, however,
-   and I have run out of time for now.
-*/
-
-#include "defs.h"
-#include "gdbcmd.h"
-#include "ui-out.h"
-#include "event-loop.h"
-#include "event-top.h"
-#include "interps.h"
-#include "completer.h"
-#include "gdb_string.h"
-
-struct gdb_interpreter
-{
-  char *name;			/* This is the name in "-i=" and set interpreter. */
-  struct gdb_interpreter *next;	/* Interpreters are stored in a linked list, 
-				   this is the next one... */
-  void *data;			/* This is a cookie that the instance of the 
-				   interpreter can use, for instance to call 
-				   itself in hook functions */
-  int inited;			/* Has the init_proc been run? */
-  struct ui_out *interpreter_out;	/* This is the ui_out used to collect 
-					   results for this interpreter.  It can 
-					   be a formatter for stdout, as is the 
-					   case for the console & mi outputs, or it 
-					   might be a result formatter. */
-  struct gdb_interpreter_procs procs;
-  int quiet_p;
-};
-
-/* Functions local to this file. */
-static void initialize_interps (void);
-
-static void set_interpreter_cmd (char *args, int from_tty,
-				 struct cmd_list_element *c);
-static void list_interpreter_cmd (char *args, int from_tty);
-static void do_set_interpreter (int not_an_fd);
-static char **interpreter_completer (char *text, char *word);
-
-/* The magic initialization routine for this module. */
-
-void _initialize_interpreter (void);
-
-/* Variables local to this file: */
-
-static struct gdb_interpreter *interp_list = NULL;
-static struct gdb_interpreter *current_interpreter = NULL;
-
-static int interpreter_initialized = 0;
-
-/* gdb_new_interpreter - This allocates space for a new interpreter,
-   fills the fields from the inputs, and returns a pointer to the
-   interpreter. */
-
-struct gdb_interpreter *
-gdb_new_interpreter (char *name,
-		     void *data,
-		     struct ui_out *uiout,
-		     struct gdb_interpreter_procs *procs)
-{
-  struct gdb_interpreter *new_interp;
-
-  new_interp =
-    (struct gdb_interpreter *) xmalloc (sizeof (struct gdb_interpreter));
-
-  new_interp->name = xstrdup (name);
-  new_interp->data = data;
-  new_interp->interpreter_out = uiout;
-  new_interp->quiet_p = 0;
-  new_interp->procs.init_proc = procs->init_proc;
-  new_interp->procs.resume_proc = procs->resume_proc;
-  new_interp->procs.do_one_event_proc = procs->do_one_event_proc;
-  new_interp->procs.suspend_proc = procs->suspend_proc;
-  new_interp->procs.delete_proc = procs->delete_proc;
-  new_interp->procs.exec_proc = procs->exec_proc;
-  new_interp->procs.prompt_proc = procs->prompt_proc;
-  new_interp->inited = 0;
-
-  return new_interp;
-}
-
-/* Add interpreter INTERP to the gdb interpreter list.  If an
-   interpreter of the same name is already on the list, then
-   the new one is NOT added, and the function returns 0.  Otherwise
-   it returns 1. */
-
-int
-gdb_add_interpreter (struct gdb_interpreter *interp)
-{
-  if (!interpreter_initialized)
-    initialize_interps ();
-
-  if (gdb_lookup_interpreter (interp->name) != NULL)
-    return 0;
-
-  interp->next = interp_list;
-  interp_list = interp;
-
-  return 1;
-}
-
-/* Looks for the interpreter INTERP in the interpreter list.  If it exists,
-   runs the delete_proc, and if this is successful, the INTERP is deleted from
-   the interpreter list and the function returns 1.  If the delete_proc fails, the
-   function returns -1 and the interpreter is NOT removed from the list.  If the
-   interp is not found, 0 is returned. */
-
-int
-gdb_delete_interpreter (struct gdb_interpreter *interp)
-{
-  struct gdb_interpreter *cur_ptr, *prev_ptr;
-
-  if (!interpreter_initialized)
-    {
-      ui_out_message (uiout, 0,
-		      "You can't delete an interp before you have added one!");
-      return -1;
-    }
-
-  if (interp_list == NULL)
-    {
-      ui_out_message (uiout, 0, "No interpreters to delete.");
-      return -1;
-    }
-
-  if (interp_list->next == NULL)
-    {
-      ui_out_message (uiout, 0, "You can't delete gdb's only intepreter.");
-      return -1;
-    }
-
-  for (cur_ptr = interp_list, prev_ptr = NULL;
-       cur_ptr != NULL; prev_ptr = cur_ptr, cur_ptr = cur_ptr->next)
-    {
-      if (cur_ptr == interp)
-	{
-	  /* Can't currently delete the console interpreter... */
-	  if (strcmp (interp->name, "console") == 0)
-	    {
-	      ui_out_message (uiout, 0,
-			      "You can't delete the console interpreter.");
-	      return -1;
-	    }
-
-	  /* If the interpreter is the current interpreter, switch
-	     back to the console interpreter */
-
-	  if (interp == current_interpreter)
-	    {
-	      gdb_set_interpreter (gdb_lookup_interpreter ("console"));
-	    }
-
-	  /* Don't delete the interpreter if its delete proc fails */
-
-	  if ((interp->procs.delete_proc != NULL)
-	      && (!interp->procs.delete_proc (interp->data)))
-	    return -1;
-
-	  if (cur_ptr == interp_list)
-	    interp_list = cur_ptr->next;
-	  else
-	    prev_ptr->next = cur_ptr->next;
-
-	  break;
-	}
-    }
-
-  if (cur_ptr == NULL)
-    return 0;
-  else
-    return 1;
-}
-
-/* This sets the current interpreter to be INTERP.  If INTERP has not
-   been initialized, then this will also run the init proc.  If the
-   init proc is successful, return 1, if it fails, set the old
-   interpreter back in place and return 0.  If we can't restore the
-   old interpreter, then raise an internal error, since we are in
-   pretty bad shape at this point. */
-
-int
-gdb_set_interpreter (struct gdb_interpreter *interp)
-{
-  struct gdb_interpreter *old_interp = current_interpreter;
-  int first_time = 0;
-
-
-  char buffer[64];
-
-  if (current_interpreter != NULL)
-    {
-      do_all_continuations ();
-      ui_out_flush (uiout);
-      if (current_interpreter->procs.suspend_proc &&
-	  !current_interpreter->procs.suspend_proc (current_interpreter->data))
-	{
-	  error ("Could not suspend interpreter \"%s\"\n", current_interpreter->name);
-	}
-    }
-  else
-    {
-      first_time = 1;
-    }
-
-  current_interpreter = interp;
-
-  /* We use interpreter_p for the "set interpreter" variable, so we need
-     to make sure we have a malloc'ed copy for the set command to free. */
-  if (interpreter_p != NULL && strcmp (current_interpreter->name, interpreter_p) != 0)
-    {
-      xfree (interpreter_p);
-
-      interpreter_p = xstrdup (current_interpreter->name);
-    }
-
-  uiout = interp->interpreter_out;
-
-  /* Run the init proc.  If it fails, try to restore the old interp. */
-
-  if (!interp->inited)
-    {
-      if (interp->procs.init_proc != NULL)
-	{
-	  if (!interp->procs.init_proc (interp->data))
-	    {
-	      if (!gdb_set_interpreter (old_interp))
-		internal_error (__FILE__, __LINE__,
-				"Failed to initialize new interp \"%s\" %s",
-				interp->name,
-				"and could not restore old interp!\n");
-	      return 0;
-	    }
-	  else
-	    {
-	      interp->inited = 1;
-	    }
-	}
-      else
-	{
-	  interp->inited = 1;
-	}
-    }
-
-  if (interp->procs.resume_proc != NULL
-      && (!interp->procs.resume_proc (interp->data)))
-    {
-      if (!gdb_set_interpreter (old_interp))
-	internal_error (__FILE__, __LINE__,
-			"Failed to initialize new interp \"%s\" %s",
-			interp->name, "and could not restore old interp!\n");
-      return 0;
-    }
-
-  /* Finally, put up the new prompt to show that we are indeed here. 
-     Also, display_gdb_prompt for the console does some readline magic
-     which is needed for the console interpreter, at least... */
-
-  if (!first_time)
-    {
-      if (!gdb_interpreter_is_quiet (interp))
-	{
-	  sprintf (buffer, "Switching to interpreter \"%.24s\".\n",
-		   interp->name);
-	  ui_out_text (uiout, buffer);
-	}
-      display_gdb_prompt (NULL);
-    }
-
-  return 1;
-}
-
-/*
- * gdb_lookup_interpreter - Looks up the interpreter for NAME.  If
- * no such interpreter exists, return NULL, otherwise return a pointer
- * to the interpreter. 
- */
-
-struct gdb_interpreter *
-gdb_lookup_interpreter (char *name)
-{
-  struct gdb_interpreter *interp;
-
-  if (name == NULL || strlen (name) == 0)
-    return NULL;
-
-  for (interp = interp_list; interp != NULL; interp = interp->next)
-    {
-      if (strcmp (interp->name, name) == 0)
-	return interp;
-    }
-
-  return NULL;
-}
-
-/* Returns the current interpreter. */
-
-struct gdb_interpreter *
-gdb_current_interpreter ()
-{
-  return current_interpreter;
-}
-
-struct ui_out *
-gdb_interpreter_ui_out (struct gdb_interpreter *interp)
-{
-  if (interp != NULL)
-    return interp->interpreter_out;
-
-  return current_interpreter->interpreter_out;
-}
-
-/* Returns true if the current interp is the passed in name. */
-int
-gdb_current_interpreter_is_named (char *interp_name)
-{
-  struct gdb_interpreter *current_interp = gdb_current_interpreter ();
-
-  if (current_interp)
-    return (strcmp (current_interp->name, interp_name) == 0);
-
-  return 0;
-}
-
-/* This is called in display_gdb_prompt.
-   If the current interpreter defines a prompt_proc, then that proc is 
-   run.  If the proc returns a non-zero value, display_gdb_prompt will
-   return without itself displaying the prompt. */
-
-int
-gdb_interpreter_display_prompt (char *new_prompt)
-{
-  if (current_interpreter->procs.prompt_proc == NULL)
-    return 0;
-  else
-    return current_interpreter->procs.prompt_proc (current_interpreter->data,
-						   new_prompt);
-}
-
-int
-gdb_interpreter_is_quiet (struct gdb_interpreter *interp)
-{
-  if (interp != NULL)
-    return interp->quiet_p;
-  else
-    return current_interpreter->quiet_p;
-}
-
-int
-gdb_interpreter_set_quiet (struct gdb_interpreter *interp, int quiet)
-{
-  int old_val = interp->quiet_p;
-  interp->quiet_p = quiet;
-  return old_val;
-}
-
-/* gdb_interpreter_exec - This executes COMMAND_STR in the current 
-   interpreter. */
-
-int
-gdb_interpreter_exec (char *command_str)
-{
-  if (current_interpreter->procs.exec_proc != NULL)
-    {
-      return current_interpreter->procs.exec_proc (current_interpreter->data,
-						   command_str);
-    }
-
-  return 0;
-}
-
-struct gdb_interpreter_procs *
-gdb_interpreter_get_procs (struct gdb_interpreter *interp)
-{
-  if (interp != NULL)
-    return &interp->procs;
-
-  return &current_interpreter->procs;
-}
-
-void *
-gdb_interpreter_get_data (struct gdb_interpreter *interp)
-{
-  if (interp != NULL)
-    return interp->data;
-
-  return current_interpreter->data;
-}
-
-int
-interpreter_do_one_event ()
-{
-  if (current_interpreter->procs.do_one_event_proc == NULL)
-    return 0;
-
-  return current_interpreter->procs.do_one_event_proc (current_interpreter->data);
-}
-
-/* A convenience routine that nulls out all the
-   common command hooks.  Use it when removing your interpreter in its 
-   suspend proc. */
-
-void
-clear_interpreter_hooks ()
-{
-  init_ui_hook = 0;
-  print_frame_info_listing_hook = 0;
-  /*print_frame_more_info_hook = 0; */
-  query_hook = 0;
-  warning_hook = 0;
-  create_breakpoint_hook = 0;
-  delete_breakpoint_hook = 0;
-  modify_breakpoint_hook = 0;
-  interactive_hook = 0;
-  registers_changed_hook = 0;
-  readline_begin_hook = 0;
-  readline_hook = 0;
-  readline_end_hook = 0;
-  register_changed_hook = 0;
-  memory_changed_hook = 0;
-  context_hook = 0;
-  target_wait_hook = 0;
-  call_command_hook = 0;
-  error_hook = 0;
-  error_begin_hook = 0;
-  command_loop_hook = 0;
-}
-
-/* This is a lazy init routine, called the first time
-   the interpreter module is used.  I put it here just in case, but I haven't
-   thought of a use for it yet.  I will probably bag it soon, since I don't
-   think it will be necessary. */
-
-static void
-initialize_interps (void)
-{
-  interpreter_initialized = 1;
-  /* Don't know if anything needs to be done here... */
-}
-
-/* set_interpreter_cmd - This implements "set interpreter foo". */
-
-static void
-set_interpreter_cmd (char *args, int from_tty, struct cmd_list_element *c)
-{
-  struct gdb_interpreter *interp_ptr;
-
-  dont_repeat ();
-
-  if (cmd_type (c) != set_cmd)
-    return;
-
-  interp_ptr = gdb_lookup_interpreter (interpreter_p);
-  if (interp_ptr != NULL)
-    {
-      if (!gdb_set_interpreter (interp_ptr))
-	error ("\nCould not switch to interpreter \"%s\", %s%s\".\n",
-	       interp_ptr->name, "reverting to interpreter \"",
-	       current_interpreter->name);
-    }
-  else
-    {
-      char *bad_name = interpreter_p;
-      interpreter_p = xstrdup (current_interpreter->name);
-      error ("Could not find interpreter \"%s\".", bad_name);
-    }
-}
-
-/* list_interpreter_cmd - This implements "info interpreters". */
-
-void
-list_interpreter_cmd (char *args, int from_tty)
-{
-  struct gdb_interpreter *interp_ptr;
-
-  ui_out_list_begin (uiout, "interpreters");
-  for (interp_ptr = interp_list; interp_ptr != NULL;
-       interp_ptr = interp_ptr->next)
-    {
-      ui_out_text (uiout, "  * ");
-      ui_out_field_string (uiout, "interpreter", interp_ptr->name);
-      ui_out_text (uiout, "\n");
-    }
-  ui_out_list_end (uiout);
-}
-
-void
-interpreter_exec_cmd (char *args, int from_tty)
-{
-  struct gdb_interpreter *old_interp, *interp_to_use;
-  char **prules = NULL;
-  char **trule = NULL;
-  unsigned int nrules;
-  unsigned int i;
-  int old_quiet;
-
-  prules = buildargv (args);
-  if (prules == NULL)
-    {
-      error ("unable to parse arguments");
-    }
-
-  nrules = 0;
-  if (prules != NULL)
-    {
-      for (trule = prules; *trule != NULL; trule++)
-	{
-	  nrules++;
-	}
-    }
-
-  if (nrules < 2)
-    error ("usage: interpreter-exec <interpreter> [ <command> ... ]");
-
-  old_interp = gdb_current_interpreter ();
-
-  interp_to_use = gdb_lookup_interpreter (prules[0]);
-  if (interp_to_use == NULL)
-    error ("Could not find interpreter \"%s\".", prules[0]);
-
-  old_quiet = gdb_interpreter_set_quiet (interp_to_use, 1);
-
-  if (!gdb_set_interpreter (interp_to_use))
-    error ("Could not switch to interpreter \"%s\".", prules[0]);
-
-  for (i = 1; i < nrules; i++)
-    {
-      if (!gdb_interpreter_exec (prules[i]))
-	{
-	  gdb_set_interpreter (old_interp);
-	  gdb_interpreter_set_quiet (interp_to_use, old_quiet);
-	  error
-	    ("interpreter-exec: mi_interpreter_execute: error in command: \"%s\".",
-	     prules[i]);
-	  break;
-	}
-    }
-
-  gdb_set_interpreter (old_interp);
-  gdb_interpreter_set_quiet (interp_to_use, old_quiet);
-}
-
-/* List the possible interpreters which could complete the given text. */
-
-static char **
-interpreter_completer (char *text, char *word)
-{
-  int alloced, textlen;
-  int num_matches;
-  char **matches;
-  struct gdb_interpreter *interp;
-
-  /* We expect only a very limited number of interpreters, so just
-     allocate room for all of them. */
-  for (interp = interp_list; interp != NULL; interp = interp->next)
-    ++alloced;
-  matches = (char **) xmalloc (alloced * sizeof (char *));
-
-  num_matches = 0;
-  textlen = strlen (text);
-  for (interp = interp_list; interp != NULL; interp = interp->next)
-    {
-      if (strncmp (interp->name, text, textlen) == 0)
-	{
-	  matches[num_matches] =
-	    (char *) xmalloc (strlen (word) + strlen (interp->name) + 1);
-	  if (word == text)
-	    strcpy (matches[num_matches], interp->name);
-	  else if (word > text)
-	    {
-	      /* Return some portion of interp->name */
-	      strcpy (matches[num_matches], interp->name + (word - text));
-	    }
-	  else
-	    {
-	      /* Return some of text plus interp->name */
-	      strncpy (matches[num_matches], word, text - word);
-	      matches[num_matches][text - word] = '\0';
-	      strcat (matches[num_matches], interp->name);
-	    }
-	  ++num_matches;
-	}
-    }
-
-  if (num_matches == 0)
-    {
-      xfree (matches);
-      matches = NULL;
-    }
-  else if (num_matches < alloced)
-    {
-      matches = (char **) xrealloc ((char *) matches, ((num_matches + 1)
-						       * sizeof (char *)));
-      matches[num_matches] = NULL;
-    }
-
-  return matches;
-}
-
-/* This just adds the "set interpreter" and "info interpreters" commands. */
-
-void
-_initialize_interpreter (void)
-{
-  struct cmd_list_element *c;
-
-  c = add_set_cmd ("interpreter", class_support,
-		   var_string,
-		   &interpreter_p, "Set the interpreter for gdb.", &setlist);
-  set_cmd_sfunc (c, set_interpreter_cmd);
-  add_show_from_set (c, &showlist);
-
-  add_cmd ("interpreters", class_support,
-	   list_interpreter_cmd,
-	   "List the interpreters currently available in gdb.", &infolist);
-
-  c = add_cmd ("interpreter-exec", class_support,
-	       interpreter_exec_cmd,
-	       "Execute a command in an interpreter.  It takes two arguments:\n\
-The first argument is the name of the interpreter to use.\n\
-The second argument is the command to execute.\n", &cmdlist);
-  set_cmd_completer (c, interpreter_completer);
-}
diff --git a/gdb/interps.h b/gdb/interps.h
deleted file mode 100644
index 05420b1..0000000
--- a/gdb/interps.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Manages interpreters for gdb.
-   Copyright 2000,2002 Free Software Foundation, Inc.
-   Written by Jim Ingham <jingham@apple.com> of Apple Computer, Inc.
-
-   This file is part of GDB.
-
-   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 GDB_INTERPRETER_H
-#define GDB_INTERPRETER_H
-
-typedef int (*interp_init_ftype) (void *data);
-typedef int (*interp_resume_ftype) (void *data);
-typedef int (*interp_do_one_event_ftype) (void *data);
-typedef int (*interp_suspend_ftype) (void *data);
-typedef int (*interp_delete_ftype) (void *data);
-typedef int (*interp_prompt_ftype) (void *data, char *new_prompt);
-typedef int (*interp_exec_ftype) (void *data, char *command);
-
-struct ui_out;
-struct gdb_interpreter;
-
-struct gdb_interpreter_procs
-{
-  interp_init_ftype init_proc;
-  interp_resume_ftype resume_proc;
-  interp_do_one_event_ftype do_one_event_proc;
-  interp_suspend_ftype suspend_proc;
-  interp_delete_ftype delete_proc;
-  interp_exec_ftype exec_proc;
-  interp_prompt_ftype prompt_proc;
-};
-
-extern struct gdb_interpreter
-  *gdb_new_interpreter (char *name, void *data, struct ui_out *uiout,
-			struct gdb_interpreter_procs *procs);
-
-extern int gdb_add_interpreter (struct gdb_interpreter *interp);
-extern int gdb_delete_interpreter (struct gdb_interpreter *interp);
-extern int gdb_set_interpreter (struct gdb_interpreter *interp);
-extern struct gdb_interpreter *gdb_lookup_interpreter (char *name);
-extern struct gdb_interpreter *gdb_current_interpreter ();
-extern struct ui_out *gdb_interpreter_ui_out (struct gdb_interpreter *interp);
-extern int gdb_current_interpreter_is_named (char *interp_name);
-extern int gdb_interpreter_exec (char *command_str);
-extern int gdb_interpreter_display_prompt (char *new_prompt);
-extern int gdb_interpreter_set_quiet (struct gdb_interpreter *interp,
-				      int quiet);
-extern int gdb_interpreter_is_quiet (struct gdb_interpreter *interp);
-extern struct gdb_interpreter_procs *gdb_interpreter_get_procs (struct gdb_interpreter *interp);
-extern void *gdb_interpreter_get_data (struct gdb_interpreter *interp);
-extern int interpreter_do_one_event ();
-
-void clear_interpreter_hooks ();
-
-/* well-known interpreters */
-#define GDB_INTERPRETER_CONSOLE		"console"
-#define GDB_INTERPRETER_MI		"mi"
-#define GDB_INTERPRETER_MI0		"mi0"
-
-#endif /* GDB_INTERPRETER_H */
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 459abe3..d5b5c0c 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -1,6 +1,6 @@
 /* Native support for the SGI Iris running IRIX version 5, for GDB.
    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
    Implemented for Irix 4.x by Garrett A. Wollman.
@@ -56,8 +56,7 @@
   register int regi;
   register greg_t *regp = &(*gregsetp)[0];
   int gregoff = sizeof (greg_t) - MIPS_REGSIZE;
-  static char zerobuf[MAX_REGISTER_RAW_SIZE] =
-  {0};
+  static char zerobuf[32] = {0};
 
   for (regi = 0; regi <= CTX_RA; regi++)
     supply_register (regi, (char *) (regp + regi) + gregoff);
@@ -120,8 +119,7 @@
 supply_fpregset (fpregset_t *fpregsetp)
 {
   register int regi;
-  static char zerobuf[MAX_REGISTER_RAW_SIZE] =
-  {0};
+  static char zerobuf[32] = {0};
 
   /* FIXME, this is wrong for the N32 ABI which has 64 bit FP regs. */
 
@@ -254,1052 +252,6 @@
 
   registers_fetched ();
 }
-
-/* Irix 5 uses what appears to be a unique form of shared library
-   support.  This is a copy of solib.c modified for Irix 5.  */
-/* FIXME: Most of this code could be merged with osfsolib.c and solib.c
-   by using next_link_map_member and xfer_link_map_member in solib.c.  */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* <obj.h> includes <sym.h> and <symconst.h>, which causes conflicts
-   with our versions of those files included by tm-mips.h.  Prevent
-   <obj.h> from including them with some appropriate defines.  */
-#define __SYM_H__
-#define __SYMCONST_H__
-#include <obj.h>
-#ifdef HAVE_OBJLIST_H
-#include <objlist.h>
-#endif
-
-#ifdef NEW_OBJ_INFO_MAGIC
-#define HANDLE_NEW_OBJ_LIST
-#endif
-
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "command.h"
-#include "frame.h"
-#include "gdb_regex.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcmd.h"
-
-/* The symbol which starts off the list of shared libraries.  */
-#define DEBUG_BASE "__rld_obj_head"
-
-/* Irix 6.x introduces a new variant of object lists.
-   To be able to debug O32 executables under Irix 6, we have to handle both
-   variants.  */
-
-typedef enum
-{
-  OBJ_LIST_OLD,			/* Pre Irix 6.x object list.  */
-  OBJ_LIST_32,			/* 32 Bit Elf32_Obj_Info.  */
-  OBJ_LIST_64			/* 64 Bit Elf64_Obj_Info, FIXME not yet implemented.  */
-}
-obj_list_variant;
-
-/* Define our own link_map structure.
-   This will help to share code with osfsolib.c and solib.c.  */
-
-struct link_map
-  {
-    obj_list_variant l_variant;	/* which variant of object list */
-    CORE_ADDR l_lladdr;		/* addr in inferior list was read from */
-    CORE_ADDR l_next;		/* address of next object list entry */
-  };
-
-/* Irix 5 shared objects are pre-linked to particular addresses
-   although the dynamic linker may have to relocate them if the
-   address ranges of the libraries used by the main program clash.
-   The offset is the difference between the address where the object
-   is mapped and the binding address of the shared library.  */
-#define LM_OFFSET(so) ((so) -> offset)
-/* Loaded address of shared library.  */
-#define LM_ADDR(so) ((so) -> lmstart)
-
-char shadow_contents[BREAKPOINT_MAX];	/* Stash old bkpt addr contents */
-
-struct so_list
-  {
-    struct so_list *next;	/* next structure in linked list */
-    struct link_map lm;
-    CORE_ADDR offset;		/* prelink to load address offset */
-    char *so_name;		/* shared object lib name */
-    CORE_ADDR lmstart;		/* lower addr bound of mapped object */
-    CORE_ADDR lmend;		/* upper addr bound of mapped object */
-    char symbols_loaded;	/* flag: symbols read in yet? */
-    char from_tty;		/* flag: print msgs? */
-    struct objfile *objfile;	/* objfile for loaded lib */
-    struct section_table *sections;
-    struct section_table *sections_end;
-    struct section_table *textsection;
-    bfd *abfd;
-  };
-
-static struct so_list *so_list_head;	/* List of known shared objects */
-static CORE_ADDR debug_base;	/* Base of dynamic linker structures */
-static CORE_ADDR breakpoint_addr;	/* Address where end bkpt is set */
-
-/* Local function prototypes */
-
-static void sharedlibrary_command (char *, int);
-
-static int enable_break (void);
-
-static int disable_break (void);
-
-static void info_sharedlibrary_command (char *, int);
-
-static int symbol_add_stub (void *);
-
-static struct so_list *find_solib (struct so_list *);
-
-static struct link_map *first_link_map_member (void);
-
-static struct link_map *next_link_map_member (struct so_list *);
-
-static void xfer_link_map_member (struct so_list *, struct link_map *);
-
-static CORE_ADDR locate_base (void);
-
-static int solib_map_sections (void *);
-
-/*
-
-   LOCAL FUNCTION
-
-   solib_map_sections -- open bfd and build sections for shared lib
-
-   SYNOPSIS
-
-   static int solib_map_sections (struct so_list *so)
-
-   DESCRIPTION
-
-   Given a pointer to one of the shared objects in our list
-   of mapped objects, use the recorded name to open a bfd
-   descriptor for the object, build a section table, and then
-   relocate all the section addresses by the base address at
-   which the shared object was mapped.
-
-   FIXMES
-
-   In most (all?) cases the shared object file name recorded in the
-   dynamic linkage tables will be a fully qualified pathname.  For
-   cases where it isn't, do we really mimic the systems search
-   mechanism correctly in the below code (particularly the tilde
-   expansion stuff?).
- */
-
-static int
-solib_map_sections (void *arg)
-{
-  struct so_list *so = (struct so_list *) arg;	/* catch_errors bogon */
-  char *filename;
-  char *scratch_pathname;
-  int scratch_chan;
-  struct section_table *p;
-  struct cleanup *old_chain;
-  bfd *abfd;
-
-  filename = tilde_expand (so->so_name);
-  old_chain = make_cleanup (xfree, filename);
-
-  scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0,
-			&scratch_pathname);
-  if (scratch_chan < 0)
-    {
-      scratch_chan = openp (getenv ("LD_LIBRARY_PATH"), 1, filename,
-			    O_RDONLY, 0, &scratch_pathname);
-    }
-  if (scratch_chan < 0)
-    {
-      perror_with_name (filename);
-    }
-  /* Leave scratch_pathname allocated.  abfd->name will point to it.  */
-
-  abfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
-  if (!abfd)
-    {
-      close (scratch_chan);
-      error ("Could not open `%s' as an executable file: %s",
-	     scratch_pathname, bfd_errmsg (bfd_get_error ()));
-    }
-  /* Leave bfd open, core_xfer_memory and "info files" need it.  */
-  so->abfd = abfd;
-  abfd->cacheable = 1;
-
-  if (!bfd_check_format (abfd, bfd_object))
-    {
-      error ("\"%s\": not in executable format: %s.",
-	     scratch_pathname, bfd_errmsg (bfd_get_error ()));
-    }
-  if (build_section_table (abfd, &so->sections, &so->sections_end))
-    {
-      error ("Can't find the file sections in `%s': %s",
-	     bfd_get_filename (exec_bfd), bfd_errmsg (bfd_get_error ()));
-    }
-
-  for (p = so->sections; p < so->sections_end; p++)
-    {
-      /* Relocate the section binding addresses as recorded in the shared
-         object's file by the offset to get the address to which the
-         object was actually mapped.  */
-      p->addr += LM_OFFSET (so);
-      p->endaddr += LM_OFFSET (so);
-      so->lmend = (CORE_ADDR) max (p->endaddr, so->lmend);
-      if (STREQ (p->the_bfd_section->name, ".text"))
-	{
-	  so->textsection = p;
-	}
-    }
-
-  /* Free the file names, close the file now.  */
-  do_cleanups (old_chain);
-
-  /* must be non-zero */
-  return (1);
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   locate_base -- locate the base address of dynamic linker structs
-
-   SYNOPSIS
-
-   CORE_ADDR locate_base (void)
-
-   DESCRIPTION
-
-   For both the SunOS and SVR4 shared library implementations, if the
-   inferior executable has been linked dynamically, there is a single
-   address somewhere in the inferior's data space which is the key to
-   locating all of the dynamic linker's runtime structures.  This
-   address is the value of the symbol defined by the macro DEBUG_BASE.
-   The job of this function is to find and return that address, or to
-   return 0 if there is no such address (the executable is statically
-   linked for example).
-
-   For SunOS, the job is almost trivial, since the dynamic linker and
-   all of it's structures are statically linked to the executable at
-   link time.  Thus the symbol for the address we are looking for has
-   already been added to the minimal symbol table for the executable's
-   objfile at the time the symbol file's symbols were read, and all we
-   have to do is look it up there.  Note that we explicitly do NOT want
-   to find the copies in the shared library.
-
-   The SVR4 version is much more complicated because the dynamic linker
-   and it's structures are located in the shared C library, which gets
-   run as the executable's "interpreter" by the kernel.  We have to go
-   to a lot more work to discover the address of DEBUG_BASE.  Because
-   of this complexity, we cache the value we find and return that value
-   on subsequent invocations.  Note there is no copy in the executable
-   symbol tables.
-
-   Irix 5 is basically like SunOS.
-
-   Note that we can assume nothing about the process state at the time
-   we need to find this address.  We may be stopped on the first instruc-
-   tion of the interpreter (C shared library), the first instruction of
-   the executable itself, or somewhere else entirely (if we attached
-   to the process for example).
-
- */
-
-static CORE_ADDR
-locate_base (void)
-{
-  struct minimal_symbol *msymbol;
-  CORE_ADDR address = 0;
-
-  msymbol = lookup_minimal_symbol (DEBUG_BASE, NULL, symfile_objfile);
-  if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
-    {
-      address = SYMBOL_VALUE_ADDRESS (msymbol);
-    }
-  return (address);
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   first_link_map_member -- locate first member in dynamic linker's map
-
-   SYNOPSIS
-
-   static struct link_map *first_link_map_member (void)
-
-   DESCRIPTION
-
-   Read in a copy of the first member in the inferior's dynamic
-   link map from the inferior's dynamic linker structures, and return
-   a pointer to the link map descriptor.
- */
-
-static struct link_map *
-first_link_map_member (void)
-{
-  struct obj_list *listp;
-  struct obj_list list_old;
-  struct link_map *lm;
-  static struct link_map first_lm;
-  CORE_ADDR lladdr;
-  CORE_ADDR next_lladdr;
-
-  /* We have not already read in the dynamic linking structures
-     from the inferior, lookup the address of the base structure. */
-  debug_base = locate_base ();
-  if (debug_base == 0)
-    return NULL;
-
-  /* Get address of first list entry.  */
-  read_memory (debug_base, (char *) &listp, sizeof (struct obj_list *));
-
-  if (listp == NULL)
-    return NULL;
-
-  /* Get first list entry.  */
-  /* The MIPS Sign extends addresses. */
-  lladdr = host_pointer_to_address (listp);
-  read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
-  /* The first entry in the list is the object file we are debugging,
-     so skip it.  */
-  next_lladdr = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
-  if (list_old.data == NEW_OBJ_INFO_MAGIC)
-    {
-      Elf32_Obj_Info list_32;
-
-      read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
-      if (list_32.oi_size != sizeof (Elf32_Obj_Info))
-	return NULL;
-      next_lladdr = (CORE_ADDR) list_32.oi_next;
-    }
-#endif
-
-  if (next_lladdr == 0)
-    return NULL;
-
-  first_lm.l_lladdr = next_lladdr;
-  lm = &first_lm;
-  return lm;
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   next_link_map_member -- locate next member in dynamic linker's map
-
-   SYNOPSIS
-
-   static struct link_map *next_link_map_member (so_list_ptr)
-
-   DESCRIPTION
-
-   Read in a copy of the next member in the inferior's dynamic
-   link map from the inferior's dynamic linker structures, and return
-   a pointer to the link map descriptor.
- */
-
-static struct link_map *
-next_link_map_member (struct so_list *so_list_ptr)
-{
-  struct link_map *lm = &so_list_ptr->lm;
-  CORE_ADDR next_lladdr = lm->l_next;
-  static struct link_map next_lm;
-
-  if (next_lladdr == 0)
-    {
-      /* We have hit the end of the list, so check to see if any were
-         added, but be quiet if we can't read from the target any more. */
-      int status = 0;
-
-      if (lm->l_variant == OBJ_LIST_OLD)
-	{
-	  struct obj_list list_old;
-
-	  status = target_read_memory (lm->l_lladdr,
-				       (char *) &list_old,
-				       sizeof (struct obj_list));
-	  next_lladdr = host_pointer_to_address (list_old.next);
-	}
-#ifdef HANDLE_NEW_OBJ_LIST
-      else if (lm->l_variant == OBJ_LIST_32)
-	{
-	  Elf32_Obj_Info list_32;
-	  status = target_read_memory (lm->l_lladdr,
-				       (char *) &list_32,
-				       sizeof (Elf32_Obj_Info));
-	  next_lladdr = (CORE_ADDR) list_32.oi_next;
-	}
-#endif
-
-      if (status != 0 || next_lladdr == 0)
-	return NULL;
-    }
-
-  next_lm.l_lladdr = next_lladdr;
-  lm = &next_lm;
-  return lm;
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   xfer_link_map_member -- set local variables from dynamic linker's map
-
-   SYNOPSIS
-
-   static void xfer_link_map_member (so_list_ptr, lm)
-
-   DESCRIPTION
-
-   Read in a copy of the requested member in the inferior's dynamic
-   link map from the inferior's dynamic linker structures, and fill
-   in the necessary so_list_ptr elements.
- */
-
-static void
-xfer_link_map_member (struct so_list *so_list_ptr, struct link_map *lm)
-{
-  struct obj_list list_old;
-  CORE_ADDR lladdr = lm->l_lladdr;
-  struct link_map *new_lm = &so_list_ptr->lm;
-  int errcode;
-
-  read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
-  new_lm->l_variant = OBJ_LIST_OLD;
-  new_lm->l_lladdr = lladdr;
-  new_lm->l_next = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
-  if (list_old.data == NEW_OBJ_INFO_MAGIC)
-    {
-      Elf32_Obj_Info list_32;
-
-      read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
-      if (list_32.oi_size != sizeof (Elf32_Obj_Info))
-	return;
-      new_lm->l_variant = OBJ_LIST_32;
-      new_lm->l_next = (CORE_ADDR) list_32.oi_next;
-
-      target_read_string ((CORE_ADDR) list_32.oi_pathname,
-			  &so_list_ptr->so_name,
-			  list_32.oi_pathname_len + 1, &errcode);
-      if (errcode != 0)
-	memory_error (errcode, (CORE_ADDR) list_32.oi_pathname);
-
-      LM_ADDR (so_list_ptr) = (CORE_ADDR) list_32.oi_ehdr;
-      LM_OFFSET (so_list_ptr) =
-	(CORE_ADDR) list_32.oi_ehdr - (CORE_ADDR) list_32.oi_orig_ehdr;
-    }
-  else
-#endif
-    {
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
-      /* If we are compiling GDB under N32 ABI, the alignments in
-         the obj struct are different from the O32 ABI and we will get
-         wrong values when accessing the struct.
-         As a workaround we use fixed values which are good for
-         Irix 6.2.  */
-      char buf[432];
-
-      read_memory ((CORE_ADDR) list_old.data, buf, sizeof (buf));
-
-      target_read_string (extract_address (&buf[236], 4),
-			  &so_list_ptr->so_name,
-			  INT_MAX, &errcode);
-      if (errcode != 0)
-	memory_error (errcode, extract_address (&buf[236], 4));
-
-      LM_ADDR (so_list_ptr) = extract_address (&buf[196], 4);
-      LM_OFFSET (so_list_ptr) =
-	extract_address (&buf[196], 4) - extract_address (&buf[248], 4);
-#else
-      struct obj obj_old;
-
-      read_memory ((CORE_ADDR) list_old.data, (char *) &obj_old,
-		   sizeof (struct obj));
-
-      target_read_string ((CORE_ADDR) obj_old.o_path,
-			  &so_list_ptr->so_name,
-			  INT_MAX, &errcode);
-      if (errcode != 0)
-	memory_error (errcode, (CORE_ADDR) obj_old.o_path);
-
-      LM_ADDR (so_list_ptr) = (CORE_ADDR) obj_old.o_praw;
-      LM_OFFSET (so_list_ptr) =
-	(CORE_ADDR) obj_old.o_praw - obj_old.o_base_address;
-#endif
-    }
-
-  catch_errors (solib_map_sections, (char *) so_list_ptr,
-		"Error while mapping shared library sections:\n",
-		RETURN_MASK_ALL);
-}
-
-
-/*
-
-   LOCAL FUNCTION
-
-   find_solib -- step through list of shared objects
-
-   SYNOPSIS
-
-   struct so_list *find_solib (struct so_list *so_list_ptr)
-
-   DESCRIPTION
-
-   This module contains the routine which finds the names of any
-   loaded "images" in the current process. The argument in must be
-   NULL on the first call, and then the returned value must be passed
-   in on subsequent calls. This provides the capability to "step" down
-   the list of loaded objects. On the last object, a NULL value is
-   returned.
- */
-
-static struct so_list *
-find_solib (struct so_list *so_list_ptr)
-{
-  struct so_list *so_list_next = NULL;
-  struct link_map *lm = NULL;
-  struct so_list *new;
-
-  if (so_list_ptr == NULL)
-    {
-      /* We are setting up for a new scan through the loaded images. */
-      if ((so_list_next = so_list_head) == NULL)
-	{
-	  /* Find the first link map list member. */
-	  lm = first_link_map_member ();
-	}
-    }
-  else
-    {
-      /* We have been called before, and are in the process of walking
-         the shared library list.  Advance to the next shared object. */
-      lm = next_link_map_member (so_list_ptr);
-      so_list_next = so_list_ptr->next;
-    }
-  if ((so_list_next == NULL) && (lm != NULL))
-    {
-      new = (struct so_list *) xmalloc (sizeof (struct so_list));
-      memset ((char *) new, 0, sizeof (struct so_list));
-      /* Add the new node as the next node in the list, or as the root
-         node if this is the first one. */
-      if (so_list_ptr != NULL)
-	{
-	  so_list_ptr->next = new;
-	}
-      else
-	{
-	  so_list_head = new;
-	}
-      so_list_next = new;
-      xfer_link_map_member (new, lm);
-    }
-  return (so_list_next);
-}
-
-/* A small stub to get us past the arg-passing pinhole of catch_errors.  */
-
-static int
-symbol_add_stub (void *arg)
-{
-  register struct so_list *so = (struct so_list *) arg;		/* catch_errs bogon */
-  CORE_ADDR text_addr = 0;
-  struct section_addr_info section_addrs;
-
-  memset (&section_addrs, 0, sizeof (section_addrs));
-  if (so->textsection)
-    text_addr = so->textsection->addr;
-  else if (so->abfd != NULL)
-    {
-      asection *lowest_sect;
-
-      /* If we didn't find a mapped non zero sized .text section, set up
-         text_addr so that the relocation in symbol_file_add does no harm.  */
-
-      lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
-      if (lowest_sect == NULL)
-	bfd_map_over_sections (so->abfd, find_lowest_section,
-			       (PTR) &lowest_sect);
-      if (lowest_sect)
-	text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
-    }
-
-
-  section_addrs.other[0].name = ".text";
-  section_addrs.other[0].addr = text_addr;
-  so->objfile = symbol_file_add (so->so_name, so->from_tty,
-				 &section_addrs, 0, 0);
-  /* must be non-zero */
-  return (1);
-}
-
-/*
-
-   GLOBAL FUNCTION
-
-   solib_add -- add a shared library file to the symtab and section list
-
-   SYNOPSIS
-
-   void solib_add (char *arg_string, int from_tty,
-   struct target_ops *target, int readsyms)
-
-   DESCRIPTION
-
- */
-
-void
-solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
-{
-  register struct so_list *so = NULL;	/* link map state variable */
-
-  /* Last shared library that we read.  */
-  struct so_list *so_last = NULL;
-
-  char *re_err;
-  int count;
-  int old;
-
-  if (!readsyms)
-    return;
-
-  if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
-    {
-      error ("Invalid regexp: %s", re_err);
-    }
-
-  /* Add the shared library sections to the section table of the
-     specified target, if any.  */
-  if (target)
-    {
-      /* Count how many new section_table entries there are.  */
-      so = NULL;
-      count = 0;
-      while ((so = find_solib (so)) != NULL)
-	{
-	  if (so->so_name[0])
-	    {
-	      count += so->sections_end - so->sections;
-	    }
-	}
-
-      if (count)
-	{
-	  old = target_resize_to_sections (target, count);
-	  
-	  /* Add these section table entries to the target's table.  */
-	  while ((so = find_solib (so)) != NULL)
-	    {
-	      if (so->so_name[0])
-		{
-		  count = so->sections_end - so->sections;
-		  memcpy ((char *) (target->to_sections + old),
-			  so->sections,
-			  (sizeof (struct section_table)) * count);
-		  old += count;
-		}
-	    }
-	}
-    }
-
-  /* Now add the symbol files.  */
-  while ((so = find_solib (so)) != NULL)
-    {
-      if (so->so_name[0] && re_exec (so->so_name))
-	{
-	  so->from_tty = from_tty;
-	  if (so->symbols_loaded)
-	    {
-	      if (from_tty)
-		{
-		  printf_unfiltered ("Symbols already loaded for %s\n", so->so_name);
-		}
-	    }
-	  else if (catch_errors
-		   (symbol_add_stub, (char *) so,
-		    "Error while reading shared library symbols:\n",
-		    RETURN_MASK_ALL))
-	    {
-	      so_last = so;
-	      so->symbols_loaded = 1;
-	    }
-	}
-    }
-
-  /* Getting new symbols may change our opinion about what is
-     frameless.  */
-  if (so_last)
-    reinit_frame_cache ();
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   info_sharedlibrary_command -- code for "info sharedlibrary"
-
-   SYNOPSIS
-
-   static void info_sharedlibrary_command ()
-
-   DESCRIPTION
-
-   Walk through the shared library list and print information
-   about each attached library.
- */
-
-static void
-info_sharedlibrary_command (char *ignore, int from_tty)
-{
-  register struct so_list *so = NULL;	/* link map state variable */
-  int header_done = 0;
-
-  if (exec_bfd == NULL)
-    {
-      printf_unfiltered ("No executable file.\n");
-      return;
-    }
-  while ((so = find_solib (so)) != NULL)
-    {
-      if (so->so_name[0])
-	{
-	  if (!header_done)
-	    {
-	      printf_unfiltered ("%-12s%-12s%-12s%s\n", "From", "To", "Syms Read",
-				 "Shared Object Library");
-	      header_done++;
-	    }
-	  printf_unfiltered ("%-12s",
-		      local_hex_string_custom ((unsigned long) LM_ADDR (so),
-					       "08l"));
-	  printf_unfiltered ("%-12s",
-			 local_hex_string_custom ((unsigned long) so->lmend,
-						  "08l"));
-	  printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");
-	  printf_unfiltered ("%s\n", so->so_name);
-	}
-    }
-  if (so_list_head == NULL)
-    {
-      printf_unfiltered ("No shared libraries loaded at this time.\n");
-    }
-}
-
-/*
-
-   GLOBAL FUNCTION
-
-   solib_address -- check to see if an address is in a shared lib
-
-   SYNOPSIS
-
-   char *solib_address (CORE_ADDR address)
-
-   DESCRIPTION
-
-   Provides a hook for other gdb routines to discover whether or
-   not a particular address is within the mapped address space of
-   a shared library.  Any address between the base mapping address
-   and the first address beyond the end of the last mapping, is
-   considered to be within the shared library address space, for
-   our purposes.
-
-   For example, this routine is called at one point to disable
-   breakpoints which are in shared libraries that are not currently
-   mapped in.
- */
-
-char *
-solib_address (CORE_ADDR address)
-{
-  register struct so_list *so = 0;	/* link map state variable */
-
-  while ((so = find_solib (so)) != NULL)
-    {
-      if (so->so_name[0])
-	{
-	  if ((address >= (CORE_ADDR) LM_ADDR (so)) &&
-	      (address < (CORE_ADDR) so->lmend))
-	    return (so->so_name);
-	}
-    }
-  return (0);
-}
-
-/* Called by free_all_symtabs */
-
-void
-clear_solib (void)
-{
-  struct so_list *next;
-  char *bfd_filename;
-
-  disable_breakpoints_in_shlibs (1);
-
-  while (so_list_head)
-    {
-      if (so_list_head->sections)
-	{
-	  xfree (so_list_head->sections);
-	}
-      if (so_list_head->abfd)
-	{
-	  remove_target_sections (so_list_head->abfd);
-	  bfd_filename = bfd_get_filename (so_list_head->abfd);
-	  if (!bfd_close (so_list_head->abfd))
-	    warning ("cannot close \"%s\": %s",
-		     bfd_filename, bfd_errmsg (bfd_get_error ()));
-	}
-      else
-	/* This happens for the executable on SVR4.  */
-	bfd_filename = NULL;
-
-      next = so_list_head->next;
-      if (bfd_filename)
-	xfree (bfd_filename);
-      xfree (so_list_head->so_name);
-      xfree (so_list_head);
-      so_list_head = next;
-    }
-  debug_base = 0;
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   disable_break -- remove the "mapping changed" breakpoint
-
-   SYNOPSIS
-
-   static int disable_break ()
-
-   DESCRIPTION
-
-   Removes the breakpoint that gets hit when the dynamic linker
-   completes a mapping change.
-
- */
-
-static int
-disable_break (void)
-{
-  int status = 1;
-
-
-  /* Note that breakpoint address and original contents are in our address
-     space, so we just need to write the original contents back. */
-
-  if (memory_remove_breakpoint (breakpoint_addr, shadow_contents) != 0)
-    {
-      status = 0;
-    }
-
-  /* For the SVR4 version, we always know the breakpoint address.  For the
-     SunOS version we don't know it until the above code is executed.
-     Grumble if we are stopped anywhere besides the breakpoint address. */
-
-  if (stop_pc != breakpoint_addr)
-    {
-      warning ("stopped at unknown breakpoint while handling shared libraries");
-    }
-
-  return (status);
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   enable_break -- arrange for dynamic linker to hit breakpoint
-
-   SYNOPSIS
-
-   int enable_break (void)
-
-   DESCRIPTION
-
-   This functions inserts a breakpoint at the entry point of the
-   main executable, where all shared libraries are mapped in.
- */
-
-static int
-enable_break (void)
-{
-  if (symfile_objfile != NULL
-      && target_insert_breakpoint (symfile_objfile->ei.entry_point,
-				   shadow_contents) == 0)
-    {
-      breakpoint_addr = symfile_objfile->ei.entry_point;
-      return 1;
-    }
-
-  return 0;
-}
-
-/*
-
-   GLOBAL FUNCTION
-
-   solib_create_inferior_hook -- shared library startup support
-
-   SYNOPSIS
-
-   void solib_create_inferior_hook()
-
-   DESCRIPTION
-
-   When gdb starts up the inferior, it nurses it along (through the
-   shell) until it is ready to execute it's first instruction.  At this
-   point, this function gets called via expansion of the macro
-   SOLIB_CREATE_INFERIOR_HOOK.
-
-   For SunOS executables, this first instruction is typically the
-   one at "_start", or a similar text label, regardless of whether
-   the executable is statically or dynamically linked.  The runtime
-   startup code takes care of dynamically linking in any shared
-   libraries, once gdb allows the inferior to continue.
-
-   For SVR4 executables, this first instruction is either the first
-   instruction in the dynamic linker (for dynamically linked
-   executables) or the instruction at "start" for statically linked
-   executables.  For dynamically linked executables, the system
-   first exec's /lib/libc.so.N, which contains the dynamic linker,
-   and starts it running.  The dynamic linker maps in any needed
-   shared libraries, maps in the actual user executable, and then
-   jumps to "start" in the user executable.
-
-   For both SunOS shared libraries, and SVR4 shared libraries, we
-   can arrange to cooperate with the dynamic linker to discover the
-   names of shared libraries that are dynamically linked, and the
-   base addresses to which they are linked.
-
-   This function is responsible for discovering those names and
-   addresses, and saving sufficient information about them to allow
-   their symbols to be read at a later time.
-
-   FIXME
-
-   Between enable_break() and disable_break(), this code does not
-   properly handle hitting breakpoints which the user might have
-   set in the startup code or in the dynamic linker itself.  Proper
-   handling will probably have to wait until the implementation is
-   changed to use the "breakpoint handler function" method.
-
-   Also, what if child has exit()ed?  Must exit loop somehow.
- */
-
-void
-solib_create_inferior_hook (void)
-{
-  if (!enable_break ())
-    {
-      warning ("shared library handler failed to enable breakpoint");
-      return;
-    }
-
-  /* Now run the target.  It will eventually hit the breakpoint, at
-     which point all of the libraries will have been mapped in and we
-     can go groveling around in the dynamic linker structures to find
-     out what we need to know about them. */
-
-  clear_proceed_status ();
-  stop_soon_quietly = 1;
-  stop_signal = TARGET_SIGNAL_0;
-  do
-    {
-      target_resume (pid_to_ptid (-1), 0, stop_signal);
-      wait_for_inferior ();
-    }
-  while (stop_signal != TARGET_SIGNAL_TRAP);
-
-  /* We are now either at the "mapping complete" breakpoint (or somewhere
-     else, a condition we aren't prepared to deal with anyway), so adjust
-     the PC as necessary after a breakpoint, disable the breakpoint, and
-     add any shared libraries that were mapped in. */
-
-  if (DECR_PC_AFTER_BREAK)
-    {
-      stop_pc -= DECR_PC_AFTER_BREAK;
-      write_register (PC_REGNUM, stop_pc);
-    }
-
-  if (!disable_break ())
-    {
-      warning ("shared library handler failed to disable breakpoint");
-    }
-
-  /*  solib_add will call reinit_frame_cache.
-     But we are stopped in the startup code and we might not have symbols
-     for the startup code, so heuristic_proc_start could be called
-     and will put out an annoying warning.
-     Delaying the resetting of stop_soon_quietly until after symbol loading
-     suppresses the warning.  */
-  solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
-  stop_soon_quietly = 0;
-}
-
-/*
-
-   LOCAL FUNCTION
-
-   sharedlibrary_command -- handle command to explicitly add library
-
-   SYNOPSIS
-
-   static void sharedlibrary_command (char *args, int from_tty)
-
-   DESCRIPTION
-
- */
-
-static void
-sharedlibrary_command (char *args, int from_tty)
-{
-  dont_repeat ();
-  solib_add (args, from_tty, (struct target_ops *) 0, 1);
-}
-
-void
-_initialize_solib (void)
-{
-  add_com ("sharedlibrary", class_files, sharedlibrary_command,
-	   "Load shared object library symbols for files matching REGEXP.");
-  add_info ("sharedlibrary", info_sharedlibrary_command,
-	    "Status of loaded shared object libraries.");
-
-  add_show_from_set
-    (add_set_cmd ("auto-solib-add", class_support, var_boolean,
-		  (char *) &auto_solib_add,
-		  "Set autoloading of shared library symbols.\n\
-If \"on\", symbols from all shared object libraries will be loaded\n\
-automatically when the inferior begins execution, when the dynamic linker\n\
-informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior.  Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
-		  &setlist),
-     &showlist);
-}
-
 
 /* Register that we are able to handle irix5 core file formats.
    This really is bfd_target_unknown_flavour */
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 495bf3e..c2e5d16 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -96,9 +96,11 @@
 #define yycheck	 java_yycheck
 
 #ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
+#define	YYDEBUG 1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
@@ -388,7 +390,8 @@
 
 ClassInstanceCreationExpression:
 	NEW ClassType '(' ArgumentList_opt ')'
-		{ error ("FIXME - ClassInstanceCreationExpression"); }
+		{ internal_error (__FILE__, __LINE__,
+				  _("FIXME - ClassInstanceCreationExpression")); }
 ;
 
 ArgumentList:
@@ -406,9 +409,11 @@
 
 ArrayCreationExpression:
 	NEW PrimitiveType DimExprs Dims_opt
-		{ error ("FIXME - ArrayCreatiionExpression"); }
+		{ internal_error (__FILE__, __LINE__,
+				  _("FIXME - ArrayCreationExpression")); }
 |	NEW ClassOrInterfaceType DimExprs Dims_opt
-		{ error ("FIXME - ArrayCreatiionExpression"); }
+		{ internal_error (__FILE__, __LINE__,
+				  _("FIXME - ArrayCreationExpression")); }
 ;
 
 DimExprs:
@@ -443,11 +448,11 @@
 
 MethodInvocation:
 	Name '(' ArgumentList_opt ')'
-		{ error ("method invocation not implemented"); }
+		{ error (_("Method invocation not implemented")); }
 |	Primary '.' SimpleName '(' ArgumentList_opt ')'
-		{ error ("method invocation not implemented"); }
+		{ error (_("Method invocation not implemented")); }
 |	SUPER '.' SimpleName '(' ArgumentList_opt ')'
-		{ error ("method invocation not implemented"); }
+		{ error (_("Method invocation not implemented")); }
 ;
 
 ArrayAccess:
@@ -537,7 +542,7 @@
 		  int i;
 		  int base = expout_ptr - last_exp_size - 3;
 		  if (base < 0 || expout->elts[base+2].opcode != OP_TYPE)
-		    error ("invalid cast expression");
+		    error (_("Invalid cast expression"));
 		  type = expout->elts[base+1].type;
 		  /* Remove the 'Expression' and slide the
 		     UnaryExpressionNotPlusMinus down to replace it. */
@@ -793,7 +798,7 @@
 	return ERROR;
       if (n > limit_div_base
 	  || (n *= base) > limit - c)
-	error ("Numeric constant too large.");
+	error (_("Numeric constant too large"));
       n += c;
 	}
 
@@ -903,7 +908,7 @@
       if (c == '\\')
 	c = parse_escape (&lexptr);
       else if (c == '\'')
-	error ("Empty character constant.");
+	error (_("Empty character constant"));
 
       yylval.typed_val_int.val = c;
       yylval.typed_val_int.type = java_char_type;
@@ -916,12 +921,12 @@
 	    {
 	      lexptr = tokstart + namelen;
 	      if (lexptr[-1] != '\'')
-		error ("Unmatched single quote.");
+		error (_("Unmatched single quote"));
 	      namelen -= 2;
 	      tokstart++;
 	      goto tryname;
 	    }
-	  error ("Invalid character constant.");
+	  error (_("Invalid character constant"));
 	}
       return INTEGER_LITERAL;
 
@@ -1006,7 +1011,7 @@
 
 	    memcpy (err_copy, tokstart, p - tokstart);
 	    err_copy[p - tokstart] = 0;
-	    error ("Invalid number \"%s\".", err_copy);
+	    error (_("Invalid number \"%s\""), err_copy);
 	  }
 	lexptr = p;
 	return toktype;
@@ -1078,7 +1083,7 @@
       } while ((*tokptr != '"') && (*tokptr != '\0'));
       if (*tokptr++ != '"')
 	{
-	  error ("Unterminated string in expression.");
+	  error (_("Unterminated string in expression"));
 	}
       tempbuf[tempbufindex] = '\0';	/* See note above */
       yylval.sval.ptr = tempbuf;
@@ -1090,7 +1095,7 @@
   if (!(c == '_' || c == '$'
 	|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
     /* We must have come across a bad character (e.g. ';').  */
-    error ("Invalid character '%c' in expression.", c);
+    error (_("Invalid character '%c' in expression"), c);
 
   /* It's a name.  See how long it is.  */
   namelen = 0;
@@ -1212,7 +1217,10 @@
   if (prev_lexptr)
     lexptr = prev_lexptr;
 
-  error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
+  if (msg)
+    error (_("%s: near `%s'"), msg, lexptr);
+  else
+    error (_("error in expression, near `%s'"), lexptr);
 }
 
 static struct type *
@@ -1223,7 +1231,7 @@
   char *tmp = copy_name (name);
   struct type *typ = java_lookup_class (tmp);
   if (typ == NULL || TYPE_CODE (typ) != TYPE_CODE_STRUCT)
-    error ("No class named %s.", tmp);
+    error (_("No class named `%s'"), tmp);
   return typ;
 }
 
@@ -1366,7 +1374,7 @@
       while (dot_index < name.length && name.ptr[dot_index] != '.')
 	dot_index++;
     }
-  error ("unknown type `%.*s'", name.length, name.ptr);
+  error (_("unknown type `%.*s'"), name.length, name.ptr);
 }
 
 /* Handle Name in an expression (or LHS).
@@ -1415,9 +1423,9 @@
 			     builtin_type_int);
 	}
       else if (!have_full_symbols () && !have_partial_symbols ())
-	error ("No symbol table is loaded.  Use the \"file\" command.");
+	error (_("No symbol table is loaded.  Use the \"file\" command"));
       else
-	error ("No symbol \"%s\" in current context.", tmp);
+	error (_("No symbol \"%s\" in current context"), tmp);
     }
 
 }
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index e221105..3afdebd 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -106,6 +106,7 @@
       bl = (struct block *)
 	obstack_alloc (&objfile->symbol_obstack, sizeof (struct block));
       BLOCK_NSYMS (bl) = 0;
+      BLOCK_HASHTABLE (bl) = 0;
       BLOCK_START (bl) = 0;
       BLOCK_END (bl) = 0;
       BLOCK_FUNCTION (bl) = NULL;
diff --git a/gdb/language.c b/gdb/language.c
index 1bfba98..dc94ebd 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -484,7 +484,7 @@
 }
 
 static void
-set_case_str()
+set_case_str (void)
 {
    char *tmp = NULL, *prefix = "";
 
@@ -567,8 +567,8 @@
          not needed. */
       return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
       break;
-    case language_chill:
-      error ("Missing Chill support in function binop_result_check.");	/*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    error ("Missing Chill support in function binop_result_check.");  */	/*FIXME */
     }
   internal_error (__FILE__, __LINE__, "failed internal consistency check");
   return (struct type *) 0;	/* For lint */
@@ -791,8 +791,8 @@
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
-    case language_chill:
-      error ("Missing Chill support in function integral_type.");	/*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   error ("Missing Chill support in function integral_type.");	*//*FIXME */
     default:
       error ("Language not supported.");
     }
@@ -821,7 +821,7 @@
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
-    case language_chill:
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
@@ -843,7 +843,7 @@
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
     {
-    case language_chill:
+      /* OBSOLETE case language_chill: */
     case language_m2:
     case language_pascal:
       return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
@@ -868,8 +868,9 @@
     {
     case language_c:
     case language_cplus:
-      /* Might be more cleanly handled by having a TYPE_CODE_INT_NOT_BOOL
-         for CHILL and such languages, or a TYPE_CODE_INT_OR_BOOL for C.  */
+      /* Might be more cleanly handled by having a
+         TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
+         languages, or a TYPE_CODE_INT_OR_BOOL for C.  */
       if (TYPE_CODE (type) == TYPE_CODE_INT)
 	return 1;
     default:
@@ -915,8 +916,8 @@
       return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
 	(TYPE_CODE (type) == TYPE_CODE_SET) ||
 	(TYPE_CODE (type) == TYPE_CODE_ARRAY);
-    case language_chill:
-      error ("Missing Chill support in function structured_type.");	/*FIXME */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE     error ("Missing Chill support in function structured_type.");	*//*FIXME */
     default:
       return (0);
     }
@@ -930,8 +931,10 @@
   struct type *type;
   switch (current_language->la_language)
     {
-    case language_chill:
-      return builtin_type_chill_bool;
+#if 0
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE    return builtin_type_chill_bool; */
+#endif
     case language_fortran:
       sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL);
       if (sym)
@@ -1161,9 +1164,9 @@
 	 }
 #endif
 
-#ifdef _LANG_chill
-	case language_chill:
-	  error ("Missing Chill support in function binop_type_check.");	/*FIXME */
+#ifdef _LANG_chill /* OBSOLETE */
+	 /* OBSOLETE case language_chill: */
+	 /* OBSOLETE   error ("Missing Chill support in function binop_type_check.");	*//*FIXME */
 #endif
 
 	}
diff --git a/gdb/language.h b/gdb/language.h
index 301fefd..67a8ff2 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -35,7 +35,7 @@
 /* #include "lang_def.h" */
 #define	_LANG_c
 #define	_LANG_m2
-#define	_LANG_chill
+/* OBSOLETE #define	_LANG_chill */
 #define  _LANG_fortran
 #define  _LANG_pascal
 
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index aa3b571..f76def3 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -31,6 +31,7 @@
 #include "gdbthread.h"	/* for struct thread_info etc. */
 #include "elf-bfd.h"	/* for elfcore_write_* */
 #include "cli/cli-decode.h"	/* for add_info */
+#include "gdb_string.h"
 
 /* Function: child_pid_to_exec_file
  *
@@ -197,10 +198,12 @@
   return note_data;
 }
 
-struct linux_corefile_thread_data {
-  bfd  *obfd;
+struct linux_corefile_thread_data
+{
+  bfd *obfd;
   char *note_data;
-  int  *note_size;
+  int *note_size;
+  int num_notes;
 };
 
 /* Function: linux_corefile_thread_callback
@@ -223,6 +226,7 @@
 					       ti->ptid, 
 					       args->note_data, 
 					       args->note_size);
+  args->num_notes++;
   inferior_ptid = saved_ptid;
   registers_changed ();
   target_fetch_registers (-1);	/* FIXME should not be necessary; 
@@ -270,11 +274,12 @@
   thread_args.obfd = obfd;
   thread_args.note_data = note_data;
   thread_args.note_size = note_size;
+  thread_args.num_notes = 0;
   iterate_over_threads (linux_corefile_thread_callback, &thread_args);
-  if (thread_args.note_data == note_data)
+  if (thread_args.num_notes == 0)
     {
       /* iterate_over_threads didn't come up with any threads;
-	 just use inferior_ptid. */
+	 just use inferior_ptid.  */
       note_data = linux_do_thread_registers (obfd, inferior_ptid, 
 					     note_data, note_size);
     }
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 772c6b7..707c9e2 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -98,9 +98,11 @@
 #define yycheck	 m2_yycheck
 
 #ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
+#define	YYDEBUG 1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 4b883fb..b4ee777 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "obstack.h"
 #include "target.h"
 #include "value.h"
 #include "bfd.h"
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 6d00ab1..aa1a226 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1,6 +1,6 @@
 /* Target-dependent code for Motorola 68HC11 & 68HC12
    Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-   Contributed by Stephane Carrez, stcarrez@worldnet.fr
+   Contributed by Stephane Carrez, stcarrez@nerim.fr
 
 This file is part of GDB.
 
@@ -21,7 +21,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
@@ -37,7 +36,50 @@
 
 #include "target.h"
 #include "opcode/m68hc11.h"
+#include "elf/m68hc11.h"
+#include "elf-bfd.h"
 
+/* Macros for setting and testing a bit in a minimal symbol.
+   For 68HC11/68HC12 we have two flags that tell which return
+   type the function is using.  This is used for prologue and frame
+   analysis to compute correct stack frame layout.
+   
+   The MSB of the minimal symbol's "info" field is used for this purpose.
+   This field is already being used to store the symbol size, so the
+   assumption is that the symbol size cannot exceed 2^30.
+
+   MSYMBOL_SET_RTC	Actually sets the "RTC" bit.
+   MSYMBOL_SET_RTI	Actually sets the "RTI" bit.
+   MSYMBOL_IS_RTC       Tests the "RTC" bit in a minimal symbol.
+   MSYMBOL_IS_RTI       Tests the "RTC" bit in a minimal symbol.
+   MSYMBOL_SIZE         Returns the size of the minimal symbol,
+   			i.e. the "info" field with the "special" bit
+   			masked out.  */
+
+#define MSYMBOL_SET_RTC(msym)                                           \
+        MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym))	\
+					| 0x80000000)
+
+#define MSYMBOL_SET_RTI(msym)                                           \
+        MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym))	\
+					| 0x40000000)
+
+#define MSYMBOL_IS_RTC(msym)				\
+	(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
+
+#define MSYMBOL_IS_RTI(msym)				\
+	(((long) MSYMBOL_INFO (msym) & 0x40000000) != 0)
+
+#define MSYMBOL_SIZE(msym)				\
+	((long) MSYMBOL_INFO (msym) & 0x3fffffff)
+
+enum insn_return_kind {
+  RETURN_RTS,
+  RETURN_RTC,
+  RETURN_RTI
+};
+
+  
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
    and correspond to the general registers of the machine,
@@ -54,7 +96,14 @@
 #define HARD_A_REGNUM   5
 #define HARD_B_REGNUM   6
 #define HARD_CCR_REGNUM 7
-#define M68HC11_LAST_HARD_REG (HARD_CCR_REGNUM)
+
+/* 68HC12 page number register.
+   Note: to keep a compatibility with gcc register naming, we must
+   not have to rename FP and other soft registers.  The page register
+   is a real hard register and must therefore be counted by NUM_REGS.
+   For this it has the same number as Z register (which is not used).  */
+#define HARD_PAGE_REGNUM 8
+#define M68HC11_LAST_HARD_REG (HARD_PAGE_REGNUM)
 
 /* Z is replaced by X or Y by gcc during machine reorg.
    ??? There is no way to get it and even know whether
@@ -79,6 +128,10 @@
 
 #define M68HC11_REG_SIZE    (2)
 
+#define M68HC12_NUM_REGS        (9)
+#define M68HC12_NUM_PSEUDO_REGS ((M68HC11_MAX_SOFT_REGS+5)+1-1)
+#define M68HC12_HARD_PC_REGNUM  (SOFT_D32_REGNUM+1)
+
 struct insn_sequence;
 struct gdbarch_tdep
   {
@@ -90,18 +143,25 @@
 
     /* Description of instructions in the prologue.  */
     struct insn_sequence *prologue;
+
+    /* True if the page memory bank register is available
+       and must be used.  */
+    int use_page_register;
+
+    /* ELF flags for ABI.  */
+    int elf_flags;
   };
 
 #define M6811_TDEP gdbarch_tdep (current_gdbarch)
 #define STACK_CORRECTION (M6811_TDEP->stack_correction)
+#define USE_PAGE_REGISTER (M6811_TDEP->use_page_register)
 
 struct frame_extra_info
 {
-  int frame_reg;
   CORE_ADDR return_pc;
-  CORE_ADDR dummy;
   int frameless;
   int size;
+  enum insn_return_kind return_kind;
 };
 
 /* Table of registers for 68HC11.  This includes the hard registers
@@ -110,7 +170,7 @@
 m68hc11_register_names[] =
 {
   "x",    "d",    "y",    "sp",   "pc",   "a",    "b",
-  "ccr",  "z",    "frame","tmp",  "zs",   "xy",   0,
+  "ccr",  "page", "frame","tmp",  "zs",   "xy",   0,
   "d1",   "d2",   "d3",   "d4",   "d5",   "d6",   "d7",
   "d8",   "d9",   "d10",  "d11",  "d12",  "d13",  "d14",
   "d15",  "d16",  "d17",  "d18",  "d19",  "d20",  "d21",
@@ -219,10 +279,28 @@
 /* Fetch a pseudo register.  The 68hc11 soft registers are treated like
    pseudo registers.  They are located in memory.  Translate the register
    fetch into a memory read.  */
-void
-m68hc11_fetch_pseudo_register (int regno)
+static void
+m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
+			      struct regcache *regcache,
+			      int regno, void *buf)
 {
-  char buf[MAX_REGISTER_RAW_SIZE];
+  /* The PC is a pseudo reg only for 68HC12 with the memory bank
+     addressing mode.  */
+  if (regno == M68HC12_HARD_PC_REGNUM)
+    {
+      const int regsize = TYPE_LENGTH (builtin_type_uint32);
+      CORE_ADDR pc = read_register (HARD_PC_REGNUM);
+      int page = read_register (HARD_PAGE_REGNUM);
+
+      if (pc >= 0x8000 && pc < 0xc000)
+        {
+          pc -= 0x8000;
+          pc += (page << 14);
+          pc += 0x1000000;
+        }
+      store_unsigned_integer (buf, regsize, pc);
+      return;
+    }
 
   m68hc11_initialize_register_info ();
   
@@ -235,29 +313,57 @@
     {
       memset (buf, 0, 2);
     }
-  supply_register (regno, buf);
 }
 
 /* Store a pseudo register.  Translate the register store
    into a memory write.  */
 static void
-m68hc11_store_pseudo_register (int regno)
+m68hc11_pseudo_register_write (struct gdbarch *gdbarch,
+			       struct regcache *regcache,
+			       int regno, const void *buf)
 {
+  /* The PC is a pseudo reg only for 68HC12 with the memory bank
+     addressing mode.  */
+  if (regno == M68HC12_HARD_PC_REGNUM)
+    {
+      const int regsize = TYPE_LENGTH (builtin_type_uint32);
+      char *tmp = alloca (regsize);
+      CORE_ADDR pc;
+
+      memcpy (tmp, buf, regsize);
+      pc = extract_unsigned_integer (tmp, regsize);
+      if (pc >= 0x1000000)
+        {
+          pc -= 0x1000000;
+          write_register (HARD_PAGE_REGNUM, (pc >> 14) & 0x0ff);
+          pc &= 0x03fff;
+          write_register (HARD_PC_REGNUM, pc + 0x8000);
+        }
+      else
+        write_register (HARD_PC_REGNUM, pc);
+      return;
+    }
+  
   m68hc11_initialize_register_info ();
 
   /* Store a soft register: translate into a memory write.  */
   if (soft_regs[regno].name)
     {
-      char buf[MAX_REGISTER_RAW_SIZE];
-
-      read_register_gen (regno, buf);
-      target_write_memory (soft_regs[regno].addr, buf, 2);
+      const int regsize = 2;
+      char *tmp = alloca (regsize);
+      memcpy (tmp, buf, regsize);
+      target_write_memory (soft_regs[regno].addr, tmp, regsize);
     }
 }
 
-static char *
+static const char *
 m68hc11_register_name (int reg_nr)
 {
+  if (reg_nr == M68HC12_HARD_PC_REGNUM && USE_PAGE_REGISTER)
+    return "pc";
+  if (reg_nr == HARD_PC_REGNUM && USE_PAGE_REGISTER)
+    return "ppc";
+  
   if (reg_nr < 0)
     return NULL;
   if (reg_nr >= M68HC11_ALL_REGS)
@@ -301,7 +407,15 @@
 static CORE_ADDR
 m68hc11_frame_args_address (struct frame_info *frame)
 {
-  return frame->frame + frame->extra_info->size + STACK_CORRECTION + 2;
+  CORE_ADDR addr;
+
+  addr = frame->frame + frame->extra_info->size + STACK_CORRECTION + 2;
+  if (frame->extra_info->return_kind == RETURN_RTC)
+    addr += 1;
+  else if (frame->extra_info->return_kind == RETURN_RTI)
+    addr += 7;
+
+  return addr;
 }
 
 static CORE_ADDR
@@ -364,6 +478,8 @@
 #define M6812_PB_PSHW  (0xae)
 #define M6812_OP_STS   (0x7f)
 #define M6812_OP_LEAS  (0x1b)
+#define M6812_OP_PSHX  (0x34)
+#define M6812_OP_PSHY  (0x35)
 
 /* Operand extraction.  */
 #define OP_DIRECT      (0x100) /* 8-byte direct addressing.  */
@@ -423,6 +539,8 @@
                       OP_IMM_HIGH, OP_IMM_LOW } },
   { P_SET_FRAME, 3, { M6812_OP_STS, OP_IMM_HIGH, OP_IMM_LOW } },
   { P_LOCAL_N,   2, { M6812_OP_LEAS, OP_PBYTE } },
+  { P_LOCAL_2,   1, { M6812_OP_PSHX } },
+  { P_LOCAL_2,   1, { M6812_OP_PSHY } },
   { P_LAST, 0 }
 };
 
@@ -512,6 +630,28 @@
   return 0;
 }
 
+/* Return the instruction that the function at the PC is using.  */
+static enum insn_return_kind
+m68hc11_get_return_insn (CORE_ADDR pc)
+{
+  struct minimal_symbol *sym;
+
+  /* A flag indicating that this is a STO_M68HC12_FAR or STO_M68HC12_INTERRUPT
+     function is stored by elfread.c in the high bit of the info field.
+     Use this to decide which instruction the function uses to return.  */
+  sym = lookup_minimal_symbol_by_pc (pc);
+  if (sym == 0)
+    return RETURN_RTS;
+
+  if (MSYMBOL_IS_RTC (sym))
+    return RETURN_RTC;
+  else if (MSYMBOL_IS_RTI (sym))
+    return RETURN_RTI;
+  else
+    return RETURN_RTS;
+}
+
+
 /* Analyze the function prologue to find some information
    about the function:
     - the PC of the first line (for m68hc11_skip_prologue)
@@ -686,11 +826,6 @@
 
   addr = frame->frame + frame->extra_info->size + STACK_CORRECTION - 2;
   addr = read_memory_unsigned_integer (addr, 2) & 0x0FFFF;
-  if (addr == 0)
-    {
-      return (CORE_ADDR) 0;
-    }
-    
   return addr;
 }  
 
@@ -704,19 +839,35 @@
 {
   CORE_ADDR pc;
   CORE_ADDR addr;
-  
+
   if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
   else
     memset (fi->saved_regs, 0, sizeof (fi->saved_regs));
 
   pc = fi->pc;
+  fi->extra_info->return_kind = m68hc11_get_return_insn (pc);
   m68hc11_guess_from_prologue (pc, fi->frame, &pc, &fi->extra_info->size,
                                fi->saved_regs);
 
   addr = fi->frame + fi->extra_info->size + STACK_CORRECTION;
   if (soft_regs[SOFT_FP_REGNUM].name)
     fi->saved_regs[SOFT_FP_REGNUM] = addr - 2;
+
+  /* Take into account how the function was called/returns.  */
+  if (fi->extra_info->return_kind == RETURN_RTC)
+    {
+      fi->saved_regs[HARD_PAGE_REGNUM] = addr;
+      addr++;
+    }
+  else if (fi->extra_info->return_kind == RETURN_RTI)
+    {
+      fi->saved_regs[HARD_CCR_REGNUM] = addr;
+      fi->saved_regs[HARD_D_REGNUM] = addr + 1;
+      fi->saved_regs[HARD_X_REGNUM] = addr + 3;
+      fi->saved_regs[HARD_Y_REGNUM] = addr + 5;
+      addr += 7;
+    }
   fi->saved_regs[HARD_SP_REGNUM] = addr;
   fi->saved_regs[HARD_PC_REGNUM] = fi->saved_regs[HARD_SP_REGNUM];
 }
@@ -736,20 +887,27 @@
 
   if (fromleaf)
     {
+      fi->extra_info->return_kind = m68hc11_get_return_insn (fi->pc);
       fi->extra_info->return_pc = m68hc11_saved_pc_after_call (fi);
     }
   else
     {
-      addr = fi->frame + fi->extra_info->size + STACK_CORRECTION;
+      addr = fi->saved_regs[HARD_PC_REGNUM];
       addr = read_memory_unsigned_integer (addr, 2) & 0x0ffff;
+
+      /* Take into account the 68HC12 specific call (PC + page).  */
+      if (fi->extra_info->return_kind == RETURN_RTC
+          && addr >= 0x08000 && addr < 0x0c000
+          && USE_PAGE_REGISTER)
+        {
+          CORE_ADDR page_addr = fi->saved_regs[HARD_PAGE_REGNUM];
+
+          unsigned page = read_memory_unsigned_integer (page_addr, 1);
+          addr -= 0x08000;
+          addr += ((page & 0x0ff) << 14);
+          addr += 0x1000000;
+        }
       fi->extra_info->return_pc = addr;
-#if 0
-      printf ("Pc@0x%04x, FR 0x%04x, size %d, read ret @0x%04x -> 0x%04x\n",
-              fi->pc,
-              fi->frame, fi->size,
-              addr & 0x0ffff,
-              fi->return_pc);
-#endif
     }
 }
 
@@ -775,11 +933,18 @@
 		   ccr & M6811_V_BIT ? 'V' : '-',
 		   ccr & M6811_C_BIT ? 'C' : '-');
 
-  printf_filtered ("D=%04x IX=%04x IY=%04x\n",
+  printf_filtered ("D=%04x IX=%04x IY=%04x",
 		   (int) read_register (HARD_D_REGNUM),
 		   (int) read_register (HARD_X_REGNUM),
 		   (int) read_register (HARD_Y_REGNUM));
 
+  if (USE_PAGE_REGISTER)
+    {
+      printf_filtered (" Page=%02x",
+                       (int) read_register (HARD_PAGE_REGNUM));
+    }
+  printf_filtered ("\n");
+
   nr = 0;
   for (i = SOFT_D1_REGNUM; i < M68HC11_ALL_REGS; i++)
     {
@@ -887,7 +1052,20 @@
 static struct type *
 m68hc11_register_virtual_type (int reg_nr)
 {
-  return builtin_type_uint16;
+  switch (reg_nr)
+    {
+    case HARD_PAGE_REGNUM:
+    case HARD_A_REGNUM:
+    case HARD_B_REGNUM:
+    case HARD_CCR_REGNUM:
+      return builtin_type_uint8;
+
+    case M68HC12_HARD_PC_REGNUM:
+      return builtin_type_uint32;
+
+    default:
+      return builtin_type_uint16;
+    }
 }
 
 static void
@@ -1010,7 +1188,35 @@
 static int
 m68hc11_register_raw_size (int reg_nr)
 {
-  return M68HC11_REG_SIZE;
+  switch (reg_nr)
+    {
+    case HARD_PAGE_REGNUM:
+    case HARD_A_REGNUM:
+    case HARD_B_REGNUM:
+    case HARD_CCR_REGNUM:
+      return 1;
+
+    case M68HC12_HARD_PC_REGNUM:
+      return 4;
+
+    default:
+      return M68HC11_REG_SIZE;
+    }
+}
+
+/* Test whether the ELF symbol corresponds to a function using rtc or
+   rti to return.  */
+   
+static void
+m68hc11_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
+{
+  unsigned char flags;
+
+  flags = ((elf_symbol_type *)sym)->internal_elf_sym.st_other;
+  if (flags & STO_M68HC12_FAR)
+    MSYMBOL_SET_RTC (msym);
+  if (flags & STO_M68HC12_INTERRUPT)
+    MSYMBOL_SET_RTI (msym);
 }
 
 static int
@@ -1030,31 +1236,58 @@
   {0};
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
+  int elf_flags;
 
   soft_reg_initialized = 0;
-  
+
+  /* Extract the elf_flags if available.  */
+  if (info.abfd != NULL
+      && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+    elf_flags = elf_elfheader (info.abfd)->e_flags;
+  else
+    elf_flags = 0;
+
   /* try to find a pre-existing architecture */
   for (arches = gdbarch_list_lookup_by_info (arches, &info);
        arches != NULL;
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
     {
+      if (gdbarch_tdep (arches->gdbarch)->elf_flags != elf_flags)
+	continue;
+
       return arches->gdbarch;
     }
 
   /* Need a new architecture. Fill in a target specific vector.  */
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
+  tdep->elf_flags = elf_flags;
 
   switch (info.bfd_arch_info->arch)
     {
     case bfd_arch_m68hc11:
       tdep->stack_correction = 1;
+      tdep->use_page_register = 0;
       tdep->prologue = m6811_prologue;
+      set_gdbarch_addr_bit (gdbarch, 16);
+      set_gdbarch_num_pseudo_regs (gdbarch, M68HC11_NUM_PSEUDO_REGS);
+      set_gdbarch_pc_regnum (gdbarch, HARD_PC_REGNUM);
+      set_gdbarch_num_regs (gdbarch, M68HC11_NUM_REGS);
       break;
 
     case bfd_arch_m68hc12:
       tdep->stack_correction = 0;
+      tdep->use_page_register = elf_flags & E_M68HC12_BANKS;
       tdep->prologue = m6812_prologue;
+      set_gdbarch_addr_bit (gdbarch, elf_flags & E_M68HC12_BANKS ? 32 : 16);
+      set_gdbarch_num_pseudo_regs (gdbarch,
+                                   elf_flags & E_M68HC12_BANKS
+                                   ? M68HC12_NUM_PSEUDO_REGS
+                                   : M68HC11_NUM_PSEUDO_REGS);
+      set_gdbarch_pc_regnum (gdbarch, elf_flags & E_M68HC12_BANKS
+                             ? M68HC12_HARD_PC_REGNUM : HARD_PC_REGNUM);
+      set_gdbarch_num_regs (gdbarch, elf_flags & E_M68HC12_BANKS
+                            ? M68HC12_NUM_REGS : M68HC11_NUM_REGS);
       break;
 
     default:
@@ -1066,10 +1299,10 @@
      programs.  The size of these types should normally be set
      according to the dwarf2 debug information.  */
   set_gdbarch_short_bit (gdbarch, 16);
-  set_gdbarch_int_bit (gdbarch, 16);
+  set_gdbarch_int_bit (gdbarch, elf_flags & E_M68HC11_I32 ? 32 : 16);
   set_gdbarch_float_bit (gdbarch, 32);
-  set_gdbarch_double_bit (gdbarch, 64);
-  set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_double_bit (gdbarch, elf_flags & E_M68HC11_F64 ? 64 : 32);
+  set_gdbarch_long_double_bit (gdbarch, elf_flags & E_M68HC11_F64 ? 64 : 32);
   set_gdbarch_long_bit (gdbarch, 32);
   set_gdbarch_ptr_bit (gdbarch, 16);
   set_gdbarch_long_long_bit (gdbarch, 64);
@@ -1090,17 +1323,14 @@
   set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
   set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
 
-  set_gdbarch_num_regs (gdbarch, M68HC11_NUM_REGS);
-  set_gdbarch_num_pseudo_regs (gdbarch, M68HC11_NUM_PSEUDO_REGS);
   set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
   set_gdbarch_fp_regnum (gdbarch, SOFT_FP_REGNUM);
-  set_gdbarch_pc_regnum (gdbarch, HARD_PC_REGNUM);
   set_gdbarch_register_name (gdbarch, m68hc11_register_name);
   set_gdbarch_register_size (gdbarch, 2);
   set_gdbarch_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
   set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
-  set_gdbarch_fetch_pseudo_register (gdbarch, m68hc11_fetch_pseudo_register);
-  set_gdbarch_store_pseudo_register (gdbarch, m68hc11_store_pseudo_register);
+  set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
+  set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
 
   set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
   set_gdbarch_call_dummy_length (gdbarch, 0);
@@ -1117,16 +1347,15 @@
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
-  set_gdbarch_extract_return_value (gdbarch, m68hc11_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
   set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
 
   set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch,
-                                            m68hc11_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
   set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
 
 
@@ -1142,8 +1371,8 @@
   set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
 
   set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
-  set_gdbarch_extract_struct_value_address
+  set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, m68hc11_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, m68hc11_use_struct_convention);
   set_gdbarch_init_extra_frame_info (gdbarch, m68hc11_init_extra_frame_info);
@@ -1156,6 +1385,10 @@
   set_gdbarch_stack_align (gdbarch, m68hc11_stack_align);
   set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
 
+  /* Minsymbol frobbing.  */
+  set_gdbarch_elf_make_msymbol_special (gdbarch,
+                                        m68hc11_elf_make_msymbol_special);
+
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   return gdbarch;
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 1c4bc4d..31e8e66 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -27,6 +27,7 @@
 #include "gdb_string.h"
 #include "inferior.h"
 #include "regcache.h"
+#include "arch-utils.h"
 
 
 #define P_LINKL_FP	0x480e
@@ -41,6 +42,271 @@
 #define P_FMOVM		0xf237
 #define P_TRAP		0x4e40
 
+
+/* Register numbers of various important registers.
+   Note that some of these values are "real" register numbers,
+   and correspond to the general registers of the machine,
+   and some are "phony" register numbers which are too large
+   to be actual register numbers as far as the user is concerned
+   but do serve to get the desired values when passed to read_register.  */
+
+/* Note: Since they are used in files other than this (monitor files), 
+   D0_REGNUM and A0_REGNUM are currently defined in tm-m68k.h.  */
+
+enum
+{
+  E_A1_REGNUM = 9,
+  E_FP_REGNUM = 14,		/* Contains address of executing stack frame */
+  E_SP_REGNUM = 15,		/* Contains address of top of stack */
+  E_PS_REGNUM = 16,		/* Contains processor status */
+  E_PC_REGNUM = 17,		/* Contains program counter */
+  E_FP0_REGNUM = 18,		/* Floating point register 0 */
+  E_FPC_REGNUM = 26,		/* 68881 control register */
+  E_FPS_REGNUM = 27,		/* 68881 status register */
+  E_FPI_REGNUM = 28
+};
+
+#define REGISTER_BYTES_FP (16*4 + 8 + 8*12 + 3*4)
+#define REGISTER_BYTES_NOFP (16*4 + 8)
+
+#define NUM_FREGS (NUM_REGS-24)
+
+/* Offset from SP to first arg on stack at first instruction of a function */
+
+#define SP_ARG0 (1 * 4)
+
+/* This was determined by experimentation on hp300 BSD 4.3.  Perhaps
+   it corresponds to some offset in /usr/include/sys/user.h or
+   something like that.  Using some system include file would
+   have the advantage of probably being more robust in the face
+   of OS upgrades, but the disadvantage of being wrong for
+   cross-debugging.  */
+
+#define SIG_PC_FP_OFFSET 530
+
+#define TARGET_M68K
+
+
+#if !defined (BPT_VECTOR)
+#define BPT_VECTOR 0xf
+#endif
+
+#if !defined (REMOTE_BPT_VECTOR)
+#define REMOTE_BPT_VECTOR 1
+#endif
+
+
+void m68k_frame_init_saved_regs (struct frame_info *frame_info);
+
+
+/* gdbarch_breakpoint_from_pc is set to m68k_local_breakpoint_from_pc
+   so m68k_remote_breakpoint_from_pc is currently not used.  */
+
+const static unsigned char *
+m68k_remote_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+  static unsigned char break_insn[] = {0x4e, (0x40 | REMOTE_BPT_VECTOR)};
+  *lenptr = sizeof (break_insn);
+  return break_insn;
+}
+
+const static unsigned char *
+m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+  static unsigned char break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
+  *lenptr = sizeof (break_insn);
+  return break_insn;
+}
+
+
+static int
+m68k_register_bytes_ok (long numbytes)
+{
+  return ((numbytes == REGISTER_BYTES_FP)
+	  || (numbytes == REGISTER_BYTES_NOFP));
+}
+
+/* Number of bytes of storage in the actual machine representation
+   for register regnum.  On the 68000, all regs are 4 bytes
+   except the floating point regs which are 12 bytes.  */
+/* Note that the unsigned cast here forces the result of the
+   subtraction to very high positive values if regnum < FP0_REGNUM */
+
+static int
+m68k_register_raw_size (int regnum)
+{
+  return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
+}
+
+/* Number of bytes of storage in the program's representation
+   for register regnum.  On the 68000, all regs are 4 bytes
+   except the floating point regs which are 12-byte long doubles.  */
+
+static int
+m68k_register_virtual_size (int regnum)
+{
+  return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
+}
+
+/* Return the GDB type object for the "standard" data type of data 
+   in register N.  This should be int for D0-D7, long double for FP0-FP7,
+   and void pointer for all others (A0-A7, PC, SR, FPCONTROL etc).
+   Note, for registers which contain addresses return pointer to void, 
+   not pointer to char, because we don't want to attempt to print 
+   the string after printing the address.  */
+
+static struct type *
+m68k_register_virtual_type (int regnum)
+{
+  if ((unsigned) regnum >= E_FPC_REGNUM)
+    return lookup_pointer_type (builtin_type_void);
+  else if ((unsigned) regnum >= FP0_REGNUM)
+    return builtin_type_long_double;
+  else if ((unsigned) regnum >= A0_REGNUM)
+    return lookup_pointer_type (builtin_type_void);
+  else
+    return builtin_type_int;
+}
+
+/* Function: m68k_register_name
+   Returns the name of the standard m68k register regnum. */
+
+static const char *
+m68k_register_name (int regnum)
+{
+  static char *register_names[] = {
+    "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
+    "a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp",
+    "ps", "pc",
+    "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7",
+    "fpcontrol", "fpstatus", "fpiaddr", "fpcode", "fpflags"
+  };
+
+  if (regnum < 0 ||
+      regnum >= sizeof (register_names) / sizeof (register_names[0]))
+    internal_error (__FILE__, __LINE__,
+		    "m68k_register_name: illegal register number %d", regnum);
+  else
+    return register_names[regnum];
+}
+
+/* Stack must be kept short aligned when doing function calls.  */
+
+static CORE_ADDR
+m68k_stack_align (CORE_ADDR addr)
+{
+  return ((addr + 1) & ~1);
+}
+
+/* Index within `registers' of the first byte of the space for
+   register regnum.  */
+
+static int
+m68k_register_byte (int regnum)
+{
+  if (regnum >= E_FPC_REGNUM)
+    return (((regnum - E_FPC_REGNUM) * 4) + 168);
+  else if (regnum >= FP0_REGNUM)
+    return (((regnum - FP0_REGNUM) * 12) + 72);
+  else
+    return (regnum * 4);
+}
+
+/* Store the address of the place in which to copy the structure the
+   subroutine will return.  This is called from call_function. */
+
+static void
+m68k_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+  write_register (E_A1_REGNUM, addr);
+}
+
+/* Extract from an array regbuf containing the (raw) register state
+   a function return value of type type, and copy that, in virtual format,
+   into valbuf.  This is assuming that floating point values are returned
+   as doubles in d0/d1.  */
+
+static void
+m68k_deprecated_extract_return_value (struct type *type, char *regbuf,
+				      char *valbuf)
+{
+  int offset = 0;
+  int typeLength = TYPE_LENGTH (type);
+
+  if (typeLength < 4)
+    offset = 4 - typeLength;
+
+  memcpy (valbuf, regbuf + offset, typeLength);
+}
+
+static CORE_ADDR
+m68k_deprecated_extract_struct_value_address (char *regbuf)
+{
+  return (*(CORE_ADDR *) (regbuf));
+}
+
+/* Write into appropriate registers a function return value
+   of type TYPE, given in virtual format.  Assumes floats are passed
+   in d0/d1.  */
+
+static void
+m68k_store_return_value (struct type *type, char *valbuf)
+{
+  write_register_bytes (0, valbuf, TYPE_LENGTH (type));
+}
+
+/* Describe the pointer in each stack frame to the previous stack frame
+   (its caller).  */
+
+/* FRAME_CHAIN takes a frame's nominal address and produces the frame's
+   chain-pointer.
+   In the case of the 68000, the frame's nominal address
+   is the address of a 4-byte word containing the calling frame's address.  */
+
+/* If we are chaining from sigtramp, then manufacture a sigtramp frame
+   (which isn't really on the stack.  I'm not sure this is right for anything
+   but BSD4.3 on an hp300.  */
+
+static CORE_ADDR
+m68k_frame_chain (struct frame_info *thisframe)
+{
+  if (thisframe->signal_handler_caller)
+    return thisframe->frame;
+  else if (!inside_entry_file ((thisframe)->pc))
+    return read_memory_integer ((thisframe)->frame, 4);
+  else
+    return 0;
+}
+
+/* A function that tells us whether the function invocation represented
+   by fi does not have a frame on the stack associated with it.  If it
+   does not, FRAMELESS is set to 1, else 0.  */
+
+static int
+m68k_frameless_function_invocation (struct frame_info *fi)
+{
+  if (fi->signal_handler_caller)
+    return 0;
+  else
+    return frameless_look_for_prologue (fi);
+}
+
+static CORE_ADDR
+m68k_frame_saved_pc (struct frame_info *frame)
+{
+  if (frame->signal_handler_caller)
+    {
+      if (frame->next)
+	return read_memory_integer (frame->next->frame + SIG_PC_FP_OFFSET, 4);
+      else
+	return read_memory_integer (read_register (SP_REGNUM)
+				    + SIG_PC_FP_OFFSET - 8, 4);
+    }
+  else
+    return read_memory_integer (frame->frame + 4, 4);
+}
+
+
 /* The only reason this is here is the tm-altos.h reference below.  It
    was moved back here from tm-m68k.h.  FIXME? */
 
@@ -81,11 +347,11 @@
     return frame_info->frame + 12;
   else if (frameless_look_for_prologue (frame_info))
     {
-    /* Check for an interrupted system call */
-    if (frame_info->next && frame_info->next->signal_handler_caller)
-      return frame_info->next->frame + 16;
-    else
-      return frame_info->frame + 4;
+      /* Check for an interrupted system call */
+      if (frame_info->next && frame_info->next->signal_handler_caller)
+	return frame_info->next->frame + 16;
+      else
+	return frame_info->frame + 4;
     }
   else
     return frame_info->frame;
@@ -166,6 +432,20 @@
   return val;
 }
 
+/* Insert the specified number of args and function address
+   into a call sequence of the above form stored at DUMMYNAME.
+   We use the BFD routines to store a big-endian value of known size.  */
+
+void
+m68k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
+		     struct value **args, struct type *type, int gcc_p)
+{
+  bfd_putb32 (fun, (unsigned char *) dummy + CALL_DUMMY_START_OFFSET + 2);
+  bfd_putb32 (nargs * 4,
+	      (unsigned char *) dummy + CALL_DUMMY_START_OFFSET + 8);
+}
+
+
 /* Push an empty stack frame, to record the current PC, etc.  */
 
 void
@@ -204,29 +484,30 @@
   register struct frame_info *frame = get_current_frame ();
   register CORE_ADDR fp;
   register int regnum;
-  struct frame_saved_regs fsr;
   char raw_buffer[12];
 
   fp = FRAME_FP (frame);
-  get_frame_saved_regs (frame, &fsr);
+  m68k_frame_init_saved_regs (frame);
   for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
     {
-      if (fsr.regs[regnum])
+      if (frame->saved_regs[regnum])
 	{
-	  read_memory (fsr.regs[regnum], raw_buffer, 12);
+	  read_memory (frame->saved_regs[regnum], raw_buffer, 12);
 	  write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
 	}
     }
   for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
     {
-      if (fsr.regs[regnum])
+      if (frame->saved_regs[regnum])
 	{
-	  write_register (regnum, read_memory_integer (fsr.regs[regnum], 4));
+	  write_register (regnum,
+			  read_memory_integer (frame->saved_regs[regnum], 4));
 	}
     }
-  if (fsr.regs[PS_REGNUM])
+  if (frame->saved_regs[PS_REGNUM])
     {
-      write_register (PS_REGNUM, read_memory_integer (fsr.regs[PS_REGNUM], 4));
+      write_register (PS_REGNUM,
+		      read_memory_integer (frame->saved_regs[PS_REGNUM], 4));
     }
   write_register (FP_REGNUM, read_memory_integer (fp, 4));
   write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -278,7 +559,7 @@
      If so, ensure we don't go past it.  If not, assume "infinity". */
 
   sal = find_pc_line (ip, 0);
-  limit = (sal.end) ? sal.end : (CORE_ADDR) ~ 0;
+  limit = (sal.end) ? sal.end : (CORE_ADDR) ~0;
 
   while (ip < limit)
     {
@@ -298,14 +579,19 @@
       else if (op == P_FMOVM)
 	ip += 10;		/* Skip fmovm */
       else
-	break;		/* Found unknown code, bail out. */
+	break;			/* Found unknown code, bail out. */
     }
   return (ip);
 }
 
+/* Store the addresses of the saved registers of the frame described by 
+   FRAME_INFO in its saved_regs field.
+   This includes special registers such as pc and fp saved in special
+   ways in the stack frame.  sp is even more special:
+   the address we return for it IS the sp for the next frame.  */
+
 void
-m68k_find_saved_regs (struct frame_info *frame_info,
-		      struct frame_saved_regs *saved_regs)
+m68k_frame_init_saved_regs (struct frame_info *frame_info)
 {
   register int regnum;
   register int regmask;
@@ -314,10 +600,17 @@
 
   /* First possible address for a pc in a call dummy for this frame.  */
   CORE_ADDR possible_call_dummy_start =
-  (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4 - 8 * 12;
+    (frame_info)->frame - 28 - FP_REGNUM * 4 - 4 - 8 * 12;
 
   int nextinsn;
-  memset (saved_regs, 0, sizeof (*saved_regs));
+
+  if (frame_info->saved_regs)
+    return;
+
+  frame_saved_regs_zalloc (frame_info);
+
+  memset (frame_info->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+
   if ((frame_info)->pc >= possible_call_dummy_start
       && (frame_info)->pc <= (frame_info)->frame)
     {
@@ -367,7 +660,7 @@
 	next_addr += read_memory_integer (pc += 2, 4), pc += 4;
     }
 
-  for ( ; ; )
+  for (;;)
     {
       nextinsn = 0xffff & read_memory_integer (pc, 2);
       regmask = read_memory_integer (pc + 2, 2);
@@ -377,7 +670,7 @@
 	  /* Regmask's low bit is for register fp7, the first pushed */
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
-	      saved_regs->regs[regnum] = (next_addr -= 12);
+	      frame_info->saved_regs[regnum] = (next_addr -= 12);
 	  pc += 4;
 	}
       /* fmovemx to (fp + displacement) */
@@ -390,7 +683,7 @@
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		saved_regs->regs[regnum] = addr;
+		frame_info->saved_regs[regnum] = addr;
 		addr += 12;
 	      }
 	  pc += 6;
@@ -402,7 +695,7 @@
 	  for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		saved_regs->regs[regnum] = next_addr;
+		frame_info->saved_regs[regnum] = next_addr;
 		next_addr += 4;
 	      }
 	  pc += 4;
@@ -417,7 +710,7 @@
 	  for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		saved_regs->regs[regnum] = addr;
+		frame_info->saved_regs[regnum] = addr;
 		addr += 4;
 	      }
 	  pc += 6;
@@ -428,14 +721,14 @@
 	  /* Regmask's low bit is for register 15, the first pushed */
 	  for (regnum = 16; --regnum >= 0; regmask >>= 1)
 	    if (regmask & 1)
-	      saved_regs->regs[regnum] = (next_addr -= 4);
+	      frame_info->saved_regs[regnum] = (next_addr -= 4);
 	  pc += 4;
 	}
       /* movl r,-(sp) */
       else if (0x2f00 == (0xfff0 & nextinsn))
 	{
 	  regnum = 0xf & nextinsn;
-	  saved_regs->regs[regnum] = (next_addr -= 4);
+	  frame_info->saved_regs[regnum] = (next_addr -= 4);
 	  pc += 2;
 	}
       /* fmovemx to index of sp */
@@ -445,7 +738,7 @@
 	  for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
 	    if (regmask & 1)
 	      {
-		saved_regs->regs[regnum] = next_addr;
+		frame_info->saved_regs[regnum] = next_addr;
 		next_addr += 12;
 	      }
 	  pc += 10;
@@ -453,20 +746,21 @@
       /* clrw -(sp); movw ccr,-(sp) */
       else if (0x4267 == nextinsn && 0x42e7 == regmask)
 	{
-	  saved_regs->regs[PS_REGNUM] = (next_addr -= 4);
+	  frame_info->saved_regs[PS_REGNUM] = (next_addr -= 4);
 	  pc += 4;
 	}
       else
 	break;
     }
 lose:;
-  saved_regs->regs[SP_REGNUM] = (frame_info)->frame + 8;
-  saved_regs->regs[FP_REGNUM] = (frame_info)->frame;
-  saved_regs->regs[PC_REGNUM] = (frame_info)->frame + 4;
+  frame_info->saved_regs[SP_REGNUM] = (frame_info)->frame + 8;
+  frame_info->saved_regs[FP_REGNUM] = (frame_info)->frame;
+  frame_info->saved_regs[PC_REGNUM] = (frame_info)->frame + 4;
 #ifdef SIG_SP_FP_OFFSET
   /* Adjust saved SP_REGNUM for fake _sigtramp frames.  */
   if (frame_info->signal_handler_caller && frame_info->next)
-    saved_regs->regs[SP_REGNUM] = frame_info->next->frame + SIG_SP_FP_OFFSET;
+    frame_info->saved_regs[SP_REGNUM] =
+      frame_info->next->frame + SIG_SP_FP_OFFSET;
 #endif
 }
 
@@ -567,14 +861,14 @@
   register int regi;
   char *from;
 
-  for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++)
+  for (regi = FP0_REGNUM; regi < E_FPC_REGNUM; regi++)
     {
       from = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
       supply_register (regi, from);
     }
-  supply_register (FPC_REGNUM, (char *) &(fpregsetp->f_pcr));
-  supply_register (FPS_REGNUM, (char *) &(fpregsetp->f_psr));
-  supply_register (FPI_REGNUM, (char *) &(fpregsetp->f_fpiaddr));
+  supply_register (E_FPC_REGNUM, (char *) &(fpregsetp->f_pcr));
+  supply_register (E_FPS_REGNUM, (char *) &(fpregsetp->f_psr));
+  supply_register (E_FPI_REGNUM, (char *) &(fpregsetp->f_fpiaddr));
 }
 
 /*  Given a pointer to a floating point register set in /proc format
@@ -589,7 +883,7 @@
   char *to;
   char *from;
 
-  for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++)
+  for (regi = FP0_REGNUM; regi < E_FPC_REGNUM; regi++)
     {
       if ((regno == -1) || (regno == regi))
 	{
@@ -598,17 +892,17 @@
 	  memcpy (to, from, REGISTER_RAW_SIZE (regi));
 	}
     }
-  if ((regno == -1) || (regno == FPC_REGNUM))
+  if ((regno == -1) || (regno == E_FPC_REGNUM))
     {
-      fpregsetp->f_pcr = *(int *) &registers[REGISTER_BYTE (FPC_REGNUM)];
+      fpregsetp->f_pcr = *(int *) &registers[REGISTER_BYTE (E_FPC_REGNUM)];
     }
-  if ((regno == -1) || (regno == FPS_REGNUM))
+  if ((regno == -1) || (regno == E_FPS_REGNUM))
     {
-      fpregsetp->f_psr = *(int *) &registers[REGISTER_BYTE (FPS_REGNUM)];
+      fpregsetp->f_psr = *(int *) &registers[REGISTER_BYTE (E_FPS_REGNUM)];
     }
-  if ((regno == -1) || (regno == FPI_REGNUM))
+  if ((regno == -1) || (regno == E_FPI_REGNUM))
     {
-      fpregsetp->f_fpiaddr = *(int *) &registers[REGISTER_BYTE (FPI_REGNUM)];
+      fpregsetp->f_fpiaddr = *(int *) &registers[REGISTER_BYTE (E_FPI_REGNUM)];
     }
 }
 
@@ -636,9 +930,8 @@
   buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
   sp = read_register (SP_REGNUM);
 
-  if (target_read_memory (sp + SP_ARG0,		/* Offset of first arg on stack */
-			  buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+  if (target_read_memory (sp + SP_ARG0,	/* Offset of first arg on stack */
+			  buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
     return 0;
 
   jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
@@ -677,9 +970,112 @@
     return read_memory_integer (read_register (SP_REGNUM), 4);
 }
 
+/* Function: m68k_gdbarch_init
+   Initializer function for the m68k gdbarch vector.
+   Called by gdbarch.  Sets up the gdbarch vector(s) for this target. */
+
+static struct gdbarch *
+m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  static LONGEST call_dummy_words[7] = { 0xf227e0ff, 0x48e7fffc, 0x426742e7,
+    0x4eb93232, 0x3232dffc, 0x69696969,
+    (0x4e404e71 | (BPT_VECTOR << 16))
+  };
+  struct gdbarch_tdep *tdep = NULL;
+  struct gdbarch *gdbarch;
+
+  /* find a candidate among the list of pre-declared architectures. */
+  arches = gdbarch_list_lookup_by_info (arches, &info);
+  if (arches != NULL)
+    return (arches->gdbarch);
+
+#if 0
+  tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
+#endif
+ 
+  gdbarch = gdbarch_alloc (&info, 0);
+
+  set_gdbarch_long_double_format (gdbarch, &floatformat_m68881_ext);
+  set_gdbarch_long_double_bit (gdbarch, 96);
+
+  set_gdbarch_function_start_offset (gdbarch, 0);
+
+  set_gdbarch_skip_prologue (gdbarch, m68k_skip_prologue);
+  set_gdbarch_saved_pc_after_call (gdbarch, m68k_saved_pc_after_call);
+  set_gdbarch_breakpoint_from_pc (gdbarch, m68k_local_breakpoint_from_pc);
+
+  /* Stack grows down. */
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_stack_align (gdbarch, m68k_stack_align);
+
+
+  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+  set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
+  set_gdbarch_store_struct_return (gdbarch, m68k_store_struct_return);
+  set_gdbarch_deprecated_extract_return_value (gdbarch,
+					       m68k_deprecated_extract_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
+
+  set_gdbarch_frame_chain (gdbarch, m68k_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+  set_gdbarch_frame_saved_pc (gdbarch, m68k_frame_saved_pc);
+  set_gdbarch_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
+  set_gdbarch_frameless_function_invocation (gdbarch,
+					     m68k_frameless_function_invocation);
+  /* OK to default this value to 'unknown'. */
+  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+  set_gdbarch_frame_args_skip (gdbarch, 8);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+
+  set_gdbarch_register_raw_size (gdbarch, m68k_register_raw_size);
+  set_gdbarch_register_virtual_size (gdbarch, m68k_register_virtual_size);
+  set_gdbarch_max_register_raw_size (gdbarch, 12);
+  set_gdbarch_max_register_virtual_size (gdbarch, 12);
+  set_gdbarch_register_virtual_type (gdbarch, m68k_register_virtual_type);
+  set_gdbarch_register_name (gdbarch, m68k_register_name);
+  set_gdbarch_register_size (gdbarch, 4);
+  set_gdbarch_register_byte (gdbarch, m68k_register_byte);
+  set_gdbarch_num_regs (gdbarch, 29);
+  set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
+  set_gdbarch_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
+  set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM);
+  set_gdbarch_fp_regnum (gdbarch, E_FP_REGNUM);
+  set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
+  set_gdbarch_ps_regnum (gdbarch, E_PS_REGNUM);
+  set_gdbarch_fp0_regnum (gdbarch, E_FP0_REGNUM);
+
+  set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
+  set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
+  set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24);
+  set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
+  set_gdbarch_call_dummy_p (gdbarch, 1);
+  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_call_dummy_length (gdbarch, 28);
+  set_gdbarch_call_dummy_start_offset (gdbarch, 12);
+
+  set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
+  set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words));
+  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_fix_call_dummy (gdbarch, m68k_fix_call_dummy);
+  set_gdbarch_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
+  set_gdbarch_pop_frame (gdbarch, m68k_pop_frame);
+
+  return gdbarch;
+}
+
+
+static void
+m68k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+
+}
 
 void
 _initialize_m68k_tdep (void)
 {
+  gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
   tm_print_insn = print_insn_m68k;
 }
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 82a6124..add1490 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -704,7 +704,7 @@
 };
 
 void
-_initialize_m68k_linux_nat ()
+_initialize_m68k_linux_nat (void)
 {
   add_core_fns (&linux_elf_core_fns);
 }
diff --git a/gdb/m88k-nat.c b/gdb/m88k-nat.c
index b631cda..11bde57 100644
--- a/gdb/m88k-nat.c
+++ b/gdb/m88k-nat.c
@@ -1,290 +1,290 @@
-/* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
-   Copyright 1988, 1990, 1991, 1992, 1993, 1995, 1999, 2000, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#ifndef USER			/* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#ifdef DELTA88
-#include <sys/ptrace.h>
-
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
-#else
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
-#endif
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
-  register unsigned int regaddr;
-  char buf[MAX_REGISTER_RAW_SIZE];
-  register int i;
-
-  struct USER u;
-  unsigned int offset;
-
-  offset = (char *) &u.pt_r0 - (char *) &u;
-  regaddr = offset;		/* byte offset to r0; */
-
-/*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
-  for (regno = 0; regno < NUM_REGS; regno++)
-    {
-      /*regaddr = register_addr (regno, offset); */
-      /* 88k enhancement  */
-
-      for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
-	{
-	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
-				     (PTRACE_ARG3_TYPE) regaddr, 0);
-	  regaddr += sizeof (int);
-	}
-      supply_register (regno, buf);
-    }
-  /* now load up registers 36 - 38; special pc registers */
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
-  supply_register (SXIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
-  supply_register (SNIP_REGNUM, buf);
-  *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
-			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
-  supply_register (SFIP_REGNUM, buf);
-}
-
-/* Store our register values back into the inferior.
-   If REGNO is -1, do this for all registers.
-   Otherwise, REGNO specifies which register (so we can save time).  */
-
-void
-store_inferior_registers (int regno)
-{
-  register unsigned int regaddr;
-  char buf[80];
-
-  struct USER u;
-
-  unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
-  regaddr = offset;
-
-  /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
-     svr3 doesn't run on an 88110, or the kernel isolates the different (not
-     completely sure this is true, but seems to be.  */
-  if (regno >= 0)
-    {
-      /*      regaddr = register_addr (regno, offset); */
-      if (regno < PC_REGNUM)
-	{
-	  regaddr = offset + regno * sizeof (int);
-	  errno = 0;
-	  ptrace (6, PIDGET (inferior_ptid),
-		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
-	  if (errno != 0)
-	    {
-	      sprintf (buf, "writing register number %d", regno);
-	      perror_with_name (buf);
-	    }
-	}
-      else if (regno == SXIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
-      else if (regno == SNIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
-      else if (regno == SFIP_REGNUM)
-	ptrace (6, PIDGET (inferior_ptid),
-		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
-      else
-	printf_unfiltered ("Bad register number for store_inferior routine\n");
-    }
-  else
-    {
-      for (regno = 0; regno < PC_REGNUM; regno++)
-	{
-	  /*      regaddr = register_addr (regno, offset); */
-	  errno = 0;
-	  regaddr = offset + regno * sizeof (int);
-	  ptrace (6, PIDGET (inferior_ptid),
-		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
-	  if (errno != 0)
-	    {
-	      sprintf (buf, "writing register number %d", regno);
-	      perror_with_name (buf);
-	    }
-	}
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
-      ptrace (6, PIDGET (inferior_ptid),
-	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
-    }
-}
-
-
-/* blockend is the address of the end of the user structure */
-m88k_register_u_addr (int blockend, int regnum)
-{
-  struct USER u;
-  int ustart = blockend - sizeof (struct USER);
-  switch (regnum)
-    {
-    case 0:
-    case 1:
-    case 2:
-    case 3:
-    case 4:
-    case 5:
-    case 6:
-    case 7:
-    case 8:
-    case 9:
-    case 10:
-    case 11:
-    case 12:
-    case 13:
-    case 14:
-    case 15:
-    case 16:
-    case 17:
-    case 18:
-    case 19:
-    case 20:
-    case 21:
-    case 22:
-    case 23:
-    case 24:
-    case 25:
-    case 26:
-    case 27:
-    case 28:
-    case 29:
-    case 30:
-    case 31:
-      return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
-    case PSR_REGNUM:
-      return (ustart + ((int) &u.pt_psr - (int) &u));
-    case FPSR_REGNUM:
-      return (ustart + ((int) &u.pt_fpsr - (int) &u));
-    case FPCR_REGNUM:
-      return (ustart + ((int) &u.pt_fpcr - (int) &u));
-    case SXIP_REGNUM:
-      return (ustart + SXIP_OFFSET);
-    case SNIP_REGNUM:
-      return (ustart + SNIP_OFFSET);
-    case SFIP_REGNUM:
-      return (ustart + SFIP_OFFSET);
-    default:
-      if (regnum < NUM_REGS)
-	/* The register is one of those which is not defined...
-	   give it zero */
-	return (ustart + ((int) &u.pt_r0 - (int) &u));
-      else
-	return (blockend + REGISTER_SIZE * regnum);
-    }
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/*  Given a pointer to a general register set in /proc format (gregset_t *),
-   unpack the register contents and supply them as gdb's idea of the current
-   register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
-  register int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-
-  for (regi = 0; regi <= SP_REGNUM; regi++)
-    supply_register (regi, (char *) (regp + regi));
-
-  supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
-  supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
-  supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
-  supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
-  supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
-  supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
-  int regi;
-  register greg_t *regp = (greg_t *) gregsetp;
-
-  for (regi = 0; regi <= R_R31; regi++)
-    if ((regno == -1) || (regno == regi))
-      *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
-
-  if ((regno == -1) || (regno == SXIP_REGNUM))
-    *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
-  if ((regno == -1) || (regno == SNIP_REGNUM))
-    *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
-  if ((regno == -1) || (regno == SFIP_REGNUM))
-    *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
-  if ((regno == -1) || (regno == PSR_REGNUM))
-    *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
-  if ((regno == -1) || (regno == FPSR_REGNUM))
-    *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
-  if ((regno == -1) || (regno == FPCR_REGNUM))
-    *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
+// OBSOLETE /* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
+// OBSOLETE    Copyright 1988, 1990, 1991, 1992, 1993, 1995, 1999, 2000, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE 
+// OBSOLETE #ifndef USER			/* added to support BCS ptrace_user */
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #endif
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE 
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE 
+// OBSOLETE #ifdef DELTA88
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE 
+// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
+// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
+// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
+// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
+// OBSOLETE #else
+// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
+// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
+// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
+// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE extern int have_symbol_file_p ();
+// OBSOLETE 
+// OBSOLETE extern jmp_buf stack_jmp;
+// OBSOLETE 
+// OBSOLETE extern int errno;
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   register unsigned int regaddr;
+// OBSOLETE   char buf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE   register int i;
+// OBSOLETE 
+// OBSOLETE   struct USER u;
+// OBSOLETE   unsigned int offset;
+// OBSOLETE 
+// OBSOLETE   offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE   regaddr = offset;		/* byte offset to r0; */
+// OBSOLETE 
+// OBSOLETE /*  offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+// OBSOLETE   for (regno = 0; regno < NUM_REGS; regno++)
+// OBSOLETE     {
+// OBSOLETE       /*regaddr = register_addr (regno, offset); */
+// OBSOLETE       /* 88k enhancement  */
+// OBSOLETE 
+// OBSOLETE       for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+// OBSOLETE 	{
+// OBSOLETE 	  *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 				     (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE 	  regaddr += sizeof (int);
+// OBSOLETE 	}
+// OBSOLETE       supply_register (regno, buf);
+// OBSOLETE     }
+// OBSOLETE   /* now load up registers 36 - 38; special pc registers */
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
+// OBSOLETE   supply_register (SXIP_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
+// OBSOLETE   supply_register (SNIP_REGNUM, buf);
+// OBSOLETE   *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE 			     (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
+// OBSOLETE   supply_register (SFIP_REGNUM, buf);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE    If REGNO is -1, do this for all registers.
+// OBSOLETE    Otherwise, REGNO specifies which register (so we can save time).  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   register unsigned int regaddr;
+// OBSOLETE   char buf[80];
+// OBSOLETE 
+// OBSOLETE   struct USER u;
+// OBSOLETE 
+// OBSOLETE   unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE 
+// OBSOLETE   regaddr = offset;
+// OBSOLETE 
+// OBSOLETE   /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
+// OBSOLETE      svr3 doesn't run on an 88110, or the kernel isolates the different (not
+// OBSOLETE      completely sure this is true, but seems to be.  */
+// OBSOLETE   if (regno >= 0)
+// OBSOLETE     {
+// OBSOLETE       /*      regaddr = register_addr (regno, offset); */
+// OBSOLETE       if (regno < PC_REGNUM)
+// OBSOLETE 	{
+// OBSOLETE 	  regaddr = offset + regno * sizeof (int);
+// OBSOLETE 	  errno = 0;
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE 	  if (errno != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      sprintf (buf, "writing register number %d", regno);
+// OBSOLETE 	      perror_with_name (buf);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else if (regno == SXIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == SNIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
+// OBSOLETE       else if (regno == SFIP_REGNUM)
+// OBSOLETE 	ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		(PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
+// OBSOLETE       else
+// OBSOLETE 	printf_unfiltered ("Bad register number for store_inferior routine\n");
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE 	{
+// OBSOLETE 	  /*      regaddr = register_addr (regno, offset); */
+// OBSOLETE 	  errno = 0;
+// OBSOLETE 	  regaddr = offset + regno * sizeof (int);
+// OBSOLETE 	  ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 		  (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE 	  if (errno != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      sprintf (buf, "writing register number %d", regno);
+// OBSOLETE 	      perror_with_name (buf);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
+// OBSOLETE       ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE 	      (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* blockend is the address of the end of the user structure */
+// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
+// OBSOLETE {
+// OBSOLETE   struct USER u;
+// OBSOLETE   int ustart = blockend - sizeof (struct USER);
+// OBSOLETE   switch (regnum)
+// OBSOLETE     {
+// OBSOLETE     case 0:
+// OBSOLETE     case 1:
+// OBSOLETE     case 2:
+// OBSOLETE     case 3:
+// OBSOLETE     case 4:
+// OBSOLETE     case 5:
+// OBSOLETE     case 6:
+// OBSOLETE     case 7:
+// OBSOLETE     case 8:
+// OBSOLETE     case 9:
+// OBSOLETE     case 10:
+// OBSOLETE     case 11:
+// OBSOLETE     case 12:
+// OBSOLETE     case 13:
+// OBSOLETE     case 14:
+// OBSOLETE     case 15:
+// OBSOLETE     case 16:
+// OBSOLETE     case 17:
+// OBSOLETE     case 18:
+// OBSOLETE     case 19:
+// OBSOLETE     case 20:
+// OBSOLETE     case 21:
+// OBSOLETE     case 22:
+// OBSOLETE     case 23:
+// OBSOLETE     case 24:
+// OBSOLETE     case 25:
+// OBSOLETE     case 26:
+// OBSOLETE     case 27:
+// OBSOLETE     case 28:
+// OBSOLETE     case 29:
+// OBSOLETE     case 30:
+// OBSOLETE     case 31:
+// OBSOLETE       return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
+// OBSOLETE     case PSR_REGNUM:
+// OBSOLETE       return (ustart + ((int) &u.pt_psr - (int) &u));
+// OBSOLETE     case FPSR_REGNUM:
+// OBSOLETE       return (ustart + ((int) &u.pt_fpsr - (int) &u));
+// OBSOLETE     case FPCR_REGNUM:
+// OBSOLETE       return (ustart + ((int) &u.pt_fpcr - (int) &u));
+// OBSOLETE     case SXIP_REGNUM:
+// OBSOLETE       return (ustart + SXIP_OFFSET);
+// OBSOLETE     case SNIP_REGNUM:
+// OBSOLETE       return (ustart + SNIP_OFFSET);
+// OBSOLETE     case SFIP_REGNUM:
+// OBSOLETE       return (ustart + SFIP_OFFSET);
+// OBSOLETE     default:
+// OBSOLETE       if (regnum < NUM_REGS)
+// OBSOLETE 	/* The register is one of those which is not defined...
+// OBSOLETE 	   give it zero */
+// OBSOLETE 	return (ustart + ((int) &u.pt_r0 - (int) &u));
+// OBSOLETE       else
+// OBSOLETE 	return (blockend + REGISTER_SIZE * regnum);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #ifdef USE_PROC_FS
+// OBSOLETE 
+// OBSOLETE #include <sys/procfs.h>
+// OBSOLETE 
+// OBSOLETE /* Prototypes for supply_gregset etc. */
+// OBSOLETE #include "gregset.h"
+// OBSOLETE 
+// OBSOLETE /*  Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE    unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE    register values. */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE   register int regi;
+// OBSOLETE   register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE 
+// OBSOLETE   for (regi = 0; regi <= SP_REGNUM; regi++)
+// OBSOLETE     supply_register (regi, (char *) (regp + regi));
+// OBSOLETE 
+// OBSOLETE   supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
+// OBSOLETE   supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
+// OBSOLETE   supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
+// OBSOLETE   supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
+// OBSOLETE   supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE   supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
+// OBSOLETE {
+// OBSOLETE   int regi;
+// OBSOLETE   register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE 
+// OBSOLETE   for (regi = 0; regi <= R_R31; regi++)
+// OBSOLETE     if ((regno == -1) || (regno == regi))
+// OBSOLETE       *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
+// OBSOLETE 
+// OBSOLETE   if ((regno == -1) || (regno == SXIP_REGNUM))
+// OBSOLETE     *(regp + R_XIP) = *(int *) &registers[REGISTER_BYTE (SXIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == SNIP_REGNUM))
+// OBSOLETE     *(regp + R_NIP) = *(int *) &registers[REGISTER_BYTE (SNIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == SFIP_REGNUM))
+// OBSOLETE     *(regp + R_FIP) = *(int *) &registers[REGISTER_BYTE (SFIP_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == PSR_REGNUM))
+// OBSOLETE     *(regp + R_PSR) = *(int *) &registers[REGISTER_BYTE (PSR_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == FPSR_REGNUM))
+// OBSOLETE     *(regp + R_FPSR) = *(int *) &registers[REGISTER_BYTE (FPSR_REGNUM)];
+// OBSOLETE   if ((regno == -1) || (regno == FPCR_REGNUM))
+// OBSOLETE     *(regp + R_FPCR) = *(int *) &registers[REGISTER_BYTE (FPCR_REGNUM)];
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* USE_PROC_FS */
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 3c96d37..da0b67c 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -1,661 +1,661 @@
-/* Target-machine dependent code for Motorola 88000 series, for GDB.
-
-   Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-   2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "value.h"
-#include "gdbcore.h"
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-#include "regcache.h"
-
-/* Size of an instruction */
-#define	BYTES_PER_88K_INSN	4
-
-void frame_find_saved_regs ();
-
-/* Is this target an m88110?  Otherwise assume m88100.  This has
-   relevance for the ways in which we screw with instruction pointers.  */
-
-int target_is_m88110 = 0;
-
-void
-m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid)
-{
-  /* According to the MC88100 RISC Microprocessor User's Manual,
-     section 6.4.3.1.2:
-
-     ... can be made to return to a particular instruction by placing
-     a valid instruction address in the SNIP and the next sequential
-     instruction address in the SFIP (with V bits set and E bits
-     clear).  The rte resumes execution at the instruction pointed to
-     by the SNIP, then the SFIP.
-
-     The E bit is the least significant bit (bit 0).  The V (valid)
-     bit is bit 1.  This is why we logical or 2 into the values we are
-     writing below.  It turns out that SXIP plays no role when
-     returning from an exception so nothing special has to be done
-     with it.  We could even (presumably) give it a totally bogus
-     value.
-
-     -- Kevin Buettner */
-
-  write_register_pid (SXIP_REGNUM, pc, ptid);
-  write_register_pid (SNIP_REGNUM, (pc | 2), ptid);
-  write_register_pid (SFIP_REGNUM, (pc | 2) + 4, ptid);
-}
-
-/* The type of a register.  */
-struct type *
-m88k_register_type (int regnum)
-{
-  if (regnum >= XFP_REGNUM)
-    return builtin_type_m88110_ext;
-  else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
-    return builtin_type_void_func_ptr;
-  else
-    return builtin_type_int32;
-}
-
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries.  The
-   kernel also uses the least significant two bits for its own hocus
-   pocus.  When gdb receives an address from the kernel, it needs to
-   preserve those right-most two bits, but gdb also needs to be careful
-   to realize that those two bits are not really a part of the address
-   of an instruction.  Shrug.  */
-
-CORE_ADDR
-m88k_addr_bits_remove (CORE_ADDR addr)
-{
-  return ((addr) & ~3);
-}
-
-
-/* Given a GDB frame, determine the address of the calling function's frame.
-   This will be used to create a new GDB frame struct, and then
-   INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
-
-   For us, the frame address is its stack pointer value, so we look up
-   the function prologue to determine the caller's sp value, and return it.  */
-
-CORE_ADDR
-frame_chain (struct frame_info *thisframe)
-{
-
-  frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
-  /* NOTE:  this depends on frame_find_saved_regs returning the VALUE, not
-     the ADDRESS, of SP_REGNUM.  It also depends on the cache of
-     frame_find_saved_regs results.  */
-  if (thisframe->fsr->regs[SP_REGNUM])
-    return thisframe->fsr->regs[SP_REGNUM];
-  else
-    return thisframe->frame;	/* Leaf fn -- next frame up has same SP. */
-}
-
-int
-frameless_function_invocation (struct frame_info *frame)
-{
-
-  frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
-  /* NOTE:  this depends on frame_find_saved_regs returning the VALUE, not
-     the ADDRESS, of SP_REGNUM.  It also depends on the cache of
-     frame_find_saved_regs results.  */
-  if (frame->fsr->regs[SP_REGNUM])
-    return 0;			/* Frameful -- return addr saved somewhere */
-  else
-    return 1;			/* Frameless -- no saved return address */
-}
-
-void
-init_extra_frame_info (int fromleaf, struct frame_info *frame)
-{
-  frame->fsr = 0;		/* Not yet allocated */
-  frame->args_pointer = 0;	/* Unknown */
-  frame->locals_pointer = 0;	/* Unknown */
-}
-
-/* Examine an m88k function prologue, recording the addresses at which
-   registers are saved explicitly by the prologue code, and returning
-   the address of the first instruction after the prologue (but not
-   after the instruction at address LIMIT, as explained below).
-
-   LIMIT places an upper bound on addresses of the instructions to be
-   examined.  If the prologue code scan reaches LIMIT, the scan is
-   aborted and LIMIT is returned.  This is used, when examining the
-   prologue for the current frame, to keep examine_prologue () from
-   claiming that a given register has been saved when in fact the
-   instruction that saves it has not yet been executed.  LIMIT is used
-   at other times to stop the scan when we hit code after the true
-   function prologue (e.g. for the first source line) which might
-   otherwise be mistaken for function prologue.
-
-   The format of the function prologue matched by this routine is
-   derived from examination of the source to gcc 1.95, particularly
-   the routine output_prologue () in config/out-m88k.c.
-
-   subu r31,r31,n                       # stack pointer update
-
-   (st rn,r31,offset)?                  # save incoming regs
-   (st.d rn,r31,offset)?
-
-   (addu r30,r31,n)?                    # frame pointer update
-
-   (pic sequence)?                      # PIC code prologue
-
-   (or   rn,rm,0)?                      # Move parameters to other regs
- */
-
-/* Macros for extracting fields from instructions.  */
-
-#define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
-#define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
-#define	SUBU_OFFSET(x)	((unsigned)(x & 0xFFFF))
-#define	ST_OFFSET(x)	((unsigned)((x) & 0xFFFF))
-#define	ST_SRC(x)	EXTRACT_FIELD ((x), 21, 5)
-#define	ADDU_OFFSET(x)	((unsigned)(x & 0xFFFF))
-
-/*
- * prologue_insn_tbl is a table of instructions which may comprise a
- * function prologue.  Associated with each table entry (corresponding
- * to a single instruction or group of instructions), is an action.
- * This action is used by examine_prologue (below) to determine
- * the state of certain machine registers and where the stack frame lives.
- */
-
-enum prologue_insn_action
-{
-  PIA_SKIP,			/* don't care what the instruction does */
-  PIA_NOTE_ST,			/* note register stored and where */
-  PIA_NOTE_STD,			/* note pair of registers stored and where */
-  PIA_NOTE_SP_ADJUSTMENT,	/* note stack pointer adjustment */
-  PIA_NOTE_FP_ASSIGNMENT,	/* note frame pointer assignment */
-  PIA_NOTE_PROLOGUE_END,	/* no more prologue */
-};
-
-struct prologue_insns
-  {
-    unsigned long insn;
-    unsigned long mask;
-    enum prologue_insn_action action;
-  };
-
-struct prologue_insns prologue_insn_tbl[] =
-{
-  /* Various register move instructions */
-  {0x58000000, 0xf800ffff, PIA_SKIP},	/* or/or.u with immed of 0 */
-  {0xf4005800, 0xfc1fffe0, PIA_SKIP},	/* or rd, r0, rs */
-  {0xf4005800, 0xfc00ffff, PIA_SKIP},	/* or rd, rs, r0 */
-
-  /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
-  {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
-
-  /* Frame pointer assignment: "addu r30, r31, n" */
-  {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
-
-  /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
-  {0x241f0000, 0xfc1f0000, PIA_NOTE_ST},	/* st rx, sp, n */
-  {0x201f0000, 0xfc1f0000, PIA_NOTE_STD},	/* st.d rs, sp, n */
-
-  /* Instructions needed for setting up r25 for pic code. */
-  {0x5f200000, 0xffff0000, PIA_SKIP},	/* or.u r25, r0, offset_high */
-  {0xcc000002, 0xffffffff, PIA_SKIP},	/* bsr.n Lab */
-  {0x5b390000, 0xffff0000, PIA_SKIP},	/* or r25, r25, offset_low */
-  {0xf7396001, 0xffffffff, PIA_SKIP},	/* Lab: addu r25, r25, r1 */
-
-  /* Various branch or jump instructions which have a delay slot -- these
-     do not form part of the prologue, but the instruction in the delay
-     slot might be a store instruction which should be noted. */
-  {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
-					/* br.n, bsr.n, bb0.n, or bb1.n */
-  {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END},	/* bcnd.n */
-  {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END}	/* jmp.n or jsr.n */
-
-};
-
-
-/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
-   is not the address of a valid instruction, the address of the next
-   instruction beyond ADDR otherwise.  *PWORD1 receives the first word
-   of the instruction. */
-
-#define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
-  (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
-
-/* Read the m88k instruction at 'memaddr' and return the address of 
-   the next instruction after that, or 0 if 'memaddr' is not the
-   address of a valid instruction.  The instruction
-   is stored at 'pword1'.  */
-
-CORE_ADDR
-next_insn (CORE_ADDR memaddr, unsigned long *pword1)
-{
-  *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
-  return memaddr + BYTES_PER_88K_INSN;
-}
-
-/* Read a register from frames called by us (or from the hardware regs).  */
-
-static int
-read_next_frame_reg (struct frame_info *frame, int regno)
-{
-  for (; frame; frame = frame->next)
-    {
-      if (regno == SP_REGNUM)
-	return FRAME_FP (frame);
-      else if (frame->fsr->regs[regno])
-	return read_memory_integer (frame->fsr->regs[regno], 4);
-    }
-  return read_register (regno);
-}
-
-/* Examine the prologue of a function.  `ip' points to the first instruction.
-   `limit' is the limit of the prologue (e.g. the addr of the first 
-   linenumber, or perhaps the program counter if we're stepping through).
-   `frame_sp' is the stack pointer value in use in this frame.  
-   `fsr' is a pointer to a frame_saved_regs structure into which we put
-   info about the registers saved by this frame.  
-   `fi' is a struct frame_info pointer; we fill in various fields in it
-   to reflect the offsets of the arg pointer and the locals pointer.  */
-
-static CORE_ADDR
-examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
-		  CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
-		  struct frame_info *fi)
-{
-  register CORE_ADDR next_ip;
-  register int src;
-  unsigned long insn;
-  int size, offset;
-  char must_adjust[32];		/* If set, must adjust offsets in fsr */
-  int sp_offset = -1;		/* -1 means not set (valid must be mult of 8) */
-  int fp_offset = -1;		/* -1 means not set */
-  CORE_ADDR frame_fp;
-  CORE_ADDR prologue_end = 0;
-
-  memset (must_adjust, '\0', sizeof (must_adjust));
-  next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
-
-  while (next_ip)
-    {
-      struct prologue_insns *pip;
-
-      for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
-	if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
-	  goto end_of_prologue_found;	/* not a prologue insn */
-
-      switch (pip->action)
-	{
-	case PIA_NOTE_ST:
-	case PIA_NOTE_STD:
-	  if (sp_offset != -1)
-	    {
-	      src = ST_SRC (insn);
-	      offset = ST_OFFSET (insn);
-	      must_adjust[src] = 1;
-	      fsr->regs[src++] = offset;	/* Will be adjusted later */
-	      if (pip->action == PIA_NOTE_STD && src < 32)
-		{
-		  offset += 4;
-		  must_adjust[src] = 1;
-		  fsr->regs[src++] = offset;
-		}
-	    }
-	  else
-	    goto end_of_prologue_found;
-	  break;
-	case PIA_NOTE_SP_ADJUSTMENT:
-	  if (sp_offset == -1)
-	    sp_offset = -SUBU_OFFSET (insn);
-	  else
-	    goto end_of_prologue_found;
-	  break;
-	case PIA_NOTE_FP_ASSIGNMENT:
-	  if (fp_offset == -1)
-	    fp_offset = ADDU_OFFSET (insn);
-	  else
-	    goto end_of_prologue_found;
-	  break;
-	case PIA_NOTE_PROLOGUE_END:
-	  if (!prologue_end)
-	    prologue_end = ip;
-	  break;
-	case PIA_SKIP:
-	default:
-	  /* Do nothing */
-	  break;
-	}
-
-      ip = next_ip;
-      next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
-    }
-
-end_of_prologue_found:
-
-  if (prologue_end)
-    ip = prologue_end;
-
-  /* We're done with the prologue.  If we don't care about the stack
-     frame itself, just return.  (Note that fsr->regs has been trashed,
-     but the one caller who calls with fi==0 passes a dummy there.)  */
-
-  if (fi == 0)
-    return ip;
-
-  /*
-     OK, now we have:
-
-     sp_offset  original (before any alloca calls) displacement of SP
-     (will be negative).
-
-     fp_offset  displacement from original SP to the FP for this frame
-     or -1.
-
-     fsr->regs[0..31]   displacement from original SP to the stack
-     location where reg[0..31] is stored.
-
-     must_adjust[0..31] set if corresponding offset was set.
-
-     If alloca has been called between the function prologue and the current
-     IP, then the current SP (frame_sp) will not be the original SP as set by
-     the function prologue.  If the current SP is not the original SP, then the
-     compiler will have allocated an FP for this frame, fp_offset will be set,
-     and we can use it to calculate the original SP.
-
-     Then, we figure out where the arguments and locals are, and relocate the
-     offsets in fsr->regs to absolute addresses.  */
-
-  if (fp_offset != -1)
-    {
-      /* We have a frame pointer, so get it, and base our calc's on it.  */
-      frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
-      frame_sp = frame_fp - fp_offset;
-    }
-  else
-    {
-      /* We have no frame pointer, therefore frame_sp is still the same value
-         as set by prologue.  But where is the frame itself?  */
-      if (must_adjust[SRP_REGNUM])
-	{
-	  /* Function header saved SRP (r1), the return address.  Frame starts
-	     4 bytes down from where it was saved.  */
-	  frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
-	  fi->locals_pointer = frame_fp;
-	}
-      else
-	{
-	  /* Function header didn't save SRP (r1), so we are in a leaf fn or
-	     are otherwise confused.  */
-	  frame_fp = -1;
-	}
-    }
-
-  /* The locals are relative to the FP (whether it exists as an allocated
-     register, or just as an assumed offset from the SP) */
-  fi->locals_pointer = frame_fp;
-
-  /* The arguments are just above the SP as it was before we adjusted it
-     on entry.  */
-  fi->args_pointer = frame_sp - sp_offset;
-
-  /* Now that we know the SP value used by the prologue, we know where
-     it saved all the registers.  */
-  for (src = 0; src < 32; src++)
-    if (must_adjust[src])
-      fsr->regs[src] += frame_sp;
-
-  /* The saved value of the SP is always known.  */
-  /* (we hope...) */
-  if (fsr->regs[SP_REGNUM] != 0
-      && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
-    fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
-			fsr->regs[SP_REGNUM],
-			frame_sp - sp_offset, sp_offset);
-
-  fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
-
-  return (ip);
-}
-
-/* Given an ip value corresponding to the start of a function,
-   return the ip of the first instruction after the function 
-   prologue.  */
-
-CORE_ADDR
-m88k_skip_prologue (CORE_ADDR ip)
-{
-  struct frame_saved_regs saved_regs_dummy;
-  struct symtab_and_line sal;
-  CORE_ADDR limit;
-
-  sal = find_pc_line (ip, 0);
-  limit = (sal.end) ? sal.end : 0xffffffff;
-
-  return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
-			    (struct frame_info *) 0));
-}
-
-/* Put here the code to store, into a struct frame_saved_regs,
-   the addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.
-
-   We cache the result of doing this in the frame_obstack, since it is
-   fairly expensive.  */
-
-void
-frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
-  register struct frame_saved_regs *cache_fsr;
-  CORE_ADDR ip;
-  struct symtab_and_line sal;
-  CORE_ADDR limit;
-
-  if (!fi->fsr)
-    {
-      cache_fsr = (struct frame_saved_regs *)
-	frame_obstack_alloc (sizeof (struct frame_saved_regs));
-      memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
-      fi->fsr = cache_fsr;
-
-      /* Find the start and end of the function prologue.  If the PC
-         is in the function prologue, we only consider the part that
-         has executed already.  In the case where the PC is not in
-         the function prologue, we set limit to two instructions beyond
-         where the prologue ends in case if any of the prologue instructions
-         were moved into a delay slot of a branch instruction. */
-
-      ip = get_pc_function_start (fi->pc);
-      sal = find_pc_line (ip, 0);
-      limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
-	: fi->pc;
-
-      /* This will fill in fields in *fi as well as in cache_fsr.  */
-#ifdef SIGTRAMP_FRAME_FIXUP
-      if (fi->signal_handler_caller)
-	SIGTRAMP_FRAME_FIXUP (fi->frame);
-#endif
-      examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
-#ifdef SIGTRAMP_SP_FIXUP
-      if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
-	SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
-#endif
-    }
-
-  if (fsr)
-    *fsr = *fi->fsr;
-}
-
-/* Return the address of the locals block for the frame
-   described by FI.  Returns 0 if the address is unknown.
-   NOTE!  Frame locals are referred to by negative offsets from the
-   argument pointer, so this is the same as frame_args_address().  */
-
-CORE_ADDR
-frame_locals_address (struct frame_info *fi)
-{
-  struct frame_saved_regs fsr;
-
-  if (fi->args_pointer)		/* Cached value is likely there.  */
-    return fi->args_pointer;
-
-  /* Nope, generate it.  */
-
-  get_frame_saved_regs (fi, &fsr);
-
-  return fi->args_pointer;
-}
-
-/* Return the address of the argument block for the frame
-   described by FI.  Returns 0 if the address is unknown.  */
-
-CORE_ADDR
-frame_args_address (struct frame_info *fi)
-{
-  struct frame_saved_regs fsr;
-
-  if (fi->args_pointer)		/* Cached value is likely there.  */
-    return fi->args_pointer;
-
-  /* Nope, generate it.  */
-
-  get_frame_saved_regs (fi, &fsr);
-
-  return fi->args_pointer;
-}
-
-/* Return the saved PC from this frame.
-
-   If the frame has a memory copy of SRP_REGNUM, use that.  If not,
-   just use the register SRP_REGNUM itself.  */
-
-CORE_ADDR
-frame_saved_pc (struct frame_info *frame)
-{
-  return read_next_frame_reg (frame, SRP_REGNUM);
-}
-
-
-#define DUMMY_FRAME_SIZE 192
-
-static void
-write_word (CORE_ADDR sp, ULONGEST word)
-{
-  register int len = REGISTER_SIZE;
-  char buffer[MAX_REGISTER_RAW_SIZE];
-
-  store_unsigned_integer (buffer, len, word);
-  write_memory (sp, buffer, len);
-}
-
-void
-m88k_push_dummy_frame (void)
-{
-  register CORE_ADDR sp = read_register (SP_REGNUM);
-  register int rn;
-  int offset;
-
-  sp -= DUMMY_FRAME_SIZE;	/* allocate a bunch of space */
-
-  for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
-    write_word (sp + offset, read_register (rn));
-
-  write_word (sp + offset, read_register (SXIP_REGNUM));
-  offset += 4;
-
-  write_word (sp + offset, read_register (SNIP_REGNUM));
-  offset += 4;
-
-  write_word (sp + offset, read_register (SFIP_REGNUM));
-  offset += 4;
-
-  write_word (sp + offset, read_register (PSR_REGNUM));
-  offset += 4;
-
-  write_word (sp + offset, read_register (FPSR_REGNUM));
-  offset += 4;
-
-  write_word (sp + offset, read_register (FPCR_REGNUM));
-  offset += 4;
-
-  write_register (SP_REGNUM, sp);
-  write_register (ACTUAL_FP_REGNUM, sp);
-}
-
-void
-pop_frame (void)
-{
-  register struct frame_info *frame = get_current_frame ();
-  register int regnum;
-  struct frame_saved_regs fsr;
-
-  get_frame_saved_regs (frame, &fsr);
-
-  if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
-    {
-      /* FIXME: I think get_frame_saved_regs should be handling this so
-         that we can deal with the saved registers properly (e.g. frame
-         1 is a call dummy, the user types "frame 2" and then "print $ps").  */
-      register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
-      int offset;
-
-      for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
-	(void) write_register (regnum, read_memory_integer (sp + offset, 4));
-
-      write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-      write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-      write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-      write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-      write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-      write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
-      offset += 4;
-
-    }
-  else
-    {
-      for (regnum = FP_REGNUM; regnum > 0; regnum--)
-	if (fsr.regs[regnum])
-	  write_register (regnum,
-			  read_memory_integer (fsr.regs[regnum], 4));
-      write_pc (frame_saved_pc (frame));
-    }
-  reinit_frame_cache ();
-}
-
-void
-_initialize_m88k_tdep (void)
-{
-  tm_print_insn = print_insn_m88k;
-}
+// OBSOLETE /* Target-machine dependent code for Motorola 88000 series, for GDB.
+// OBSOLETE 
+// OBSOLETE    Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
+// OBSOLETE    2000, 2001, 2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE /* Size of an instruction */
+// OBSOLETE #define	BYTES_PER_88K_INSN	4
+// OBSOLETE 
+// OBSOLETE void frame_find_saved_regs ();
+// OBSOLETE 
+// OBSOLETE /* Is this target an m88110?  Otherwise assume m88100.  This has
+// OBSOLETE    relevance for the ways in which we screw with instruction pointers.  */
+// OBSOLETE 
+// OBSOLETE int target_is_m88110 = 0;
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid)
+// OBSOLETE {
+// OBSOLETE   /* According to the MC88100 RISC Microprocessor User's Manual,
+// OBSOLETE      section 6.4.3.1.2:
+// OBSOLETE 
+// OBSOLETE      ... can be made to return to a particular instruction by placing
+// OBSOLETE      a valid instruction address in the SNIP and the next sequential
+// OBSOLETE      instruction address in the SFIP (with V bits set and E bits
+// OBSOLETE      clear).  The rte resumes execution at the instruction pointed to
+// OBSOLETE      by the SNIP, then the SFIP.
+// OBSOLETE 
+// OBSOLETE      The E bit is the least significant bit (bit 0).  The V (valid)
+// OBSOLETE      bit is bit 1.  This is why we logical or 2 into the values we are
+// OBSOLETE      writing below.  It turns out that SXIP plays no role when
+// OBSOLETE      returning from an exception so nothing special has to be done
+// OBSOLETE      with it.  We could even (presumably) give it a totally bogus
+// OBSOLETE      value.
+// OBSOLETE 
+// OBSOLETE      -- Kevin Buettner */
+// OBSOLETE 
+// OBSOLETE   write_register_pid (SXIP_REGNUM, pc, ptid);
+// OBSOLETE   write_register_pid (SNIP_REGNUM, (pc | 2), ptid);
+// OBSOLETE   write_register_pid (SFIP_REGNUM, (pc | 2) + 4, ptid);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* The type of a register.  */
+// OBSOLETE struct type *
+// OBSOLETE m88k_register_type (int regnum)
+// OBSOLETE {
+// OBSOLETE   if (regnum >= XFP_REGNUM)
+// OBSOLETE     return builtin_type_m88110_ext;
+// OBSOLETE   else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
+// OBSOLETE     return builtin_type_void_func_ptr;
+// OBSOLETE   else
+// OBSOLETE     return builtin_type_int32;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries.  The
+// OBSOLETE    kernel also uses the least significant two bits for its own hocus
+// OBSOLETE    pocus.  When gdb receives an address from the kernel, it needs to
+// OBSOLETE    preserve those right-most two bits, but gdb also needs to be careful
+// OBSOLETE    to realize that those two bits are not really a part of the address
+// OBSOLETE    of an instruction.  Shrug.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE m88k_addr_bits_remove (CORE_ADDR addr)
+// OBSOLETE {
+// OBSOLETE   return ((addr) & ~3);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Given a GDB frame, determine the address of the calling function's frame.
+// OBSOLETE    This will be used to create a new GDB frame struct, and then
+// OBSOLETE    INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
+// OBSOLETE 
+// OBSOLETE    For us, the frame address is its stack pointer value, so we look up
+// OBSOLETE    the function prologue to determine the caller's sp value, and return it.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_chain (struct frame_info *thisframe)
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE   frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
+// OBSOLETE   /* NOTE:  this depends on frame_find_saved_regs returning the VALUE, not
+// OBSOLETE      the ADDRESS, of SP_REGNUM.  It also depends on the cache of
+// OBSOLETE      frame_find_saved_regs results.  */
+// OBSOLETE   if (thisframe->fsr->regs[SP_REGNUM])
+// OBSOLETE     return thisframe->fsr->regs[SP_REGNUM];
+// OBSOLETE   else
+// OBSOLETE     return thisframe->frame;	/* Leaf fn -- next frame up has same SP. */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE frameless_function_invocation (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE   frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
+// OBSOLETE   /* NOTE:  this depends on frame_find_saved_regs returning the VALUE, not
+// OBSOLETE      the ADDRESS, of SP_REGNUM.  It also depends on the cache of
+// OBSOLETE      frame_find_saved_regs results.  */
+// OBSOLETE   if (frame->fsr->regs[SP_REGNUM])
+// OBSOLETE     return 0;			/* Frameful -- return addr saved somewhere */
+// OBSOLETE   else
+// OBSOLETE     return 1;			/* Frameless -- no saved return address */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE init_extra_frame_info (int fromleaf, struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE   frame->fsr = 0;		/* Not yet allocated */
+// OBSOLETE   frame->args_pointer = 0;	/* Unknown */
+// OBSOLETE   frame->locals_pointer = 0;	/* Unknown */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Examine an m88k function prologue, recording the addresses at which
+// OBSOLETE    registers are saved explicitly by the prologue code, and returning
+// OBSOLETE    the address of the first instruction after the prologue (but not
+// OBSOLETE    after the instruction at address LIMIT, as explained below).
+// OBSOLETE 
+// OBSOLETE    LIMIT places an upper bound on addresses of the instructions to be
+// OBSOLETE    examined.  If the prologue code scan reaches LIMIT, the scan is
+// OBSOLETE    aborted and LIMIT is returned.  This is used, when examining the
+// OBSOLETE    prologue for the current frame, to keep examine_prologue () from
+// OBSOLETE    claiming that a given register has been saved when in fact the
+// OBSOLETE    instruction that saves it has not yet been executed.  LIMIT is used
+// OBSOLETE    at other times to stop the scan when we hit code after the true
+// OBSOLETE    function prologue (e.g. for the first source line) which might
+// OBSOLETE    otherwise be mistaken for function prologue.
+// OBSOLETE 
+// OBSOLETE    The format of the function prologue matched by this routine is
+// OBSOLETE    derived from examination of the source to gcc 1.95, particularly
+// OBSOLETE    the routine output_prologue () in config/out-m88k.c.
+// OBSOLETE 
+// OBSOLETE    subu r31,r31,n                       # stack pointer update
+// OBSOLETE 
+// OBSOLETE    (st rn,r31,offset)?                  # save incoming regs
+// OBSOLETE    (st.d rn,r31,offset)?
+// OBSOLETE 
+// OBSOLETE    (addu r30,r31,n)?                    # frame pointer update
+// OBSOLETE 
+// OBSOLETE    (pic sequence)?                      # PIC code prologue
+// OBSOLETE 
+// OBSOLETE    (or   rn,rm,0)?                      # Move parameters to other regs
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /* Macros for extracting fields from instructions.  */
+// OBSOLETE 
+// OBSOLETE #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
+// OBSOLETE #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
+// OBSOLETE #define	SUBU_OFFSET(x)	((unsigned)(x & 0xFFFF))
+// OBSOLETE #define	ST_OFFSET(x)	((unsigned)((x) & 0xFFFF))
+// OBSOLETE #define	ST_SRC(x)	EXTRACT_FIELD ((x), 21, 5)
+// OBSOLETE #define	ADDU_OFFSET(x)	((unsigned)(x & 0xFFFF))
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * prologue_insn_tbl is a table of instructions which may comprise a
+// OBSOLETE  * function prologue.  Associated with each table entry (corresponding
+// OBSOLETE  * to a single instruction or group of instructions), is an action.
+// OBSOLETE  * This action is used by examine_prologue (below) to determine
+// OBSOLETE  * the state of certain machine registers and where the stack frame lives.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE enum prologue_insn_action
+// OBSOLETE {
+// OBSOLETE   PIA_SKIP,			/* don't care what the instruction does */
+// OBSOLETE   PIA_NOTE_ST,			/* note register stored and where */
+// OBSOLETE   PIA_NOTE_STD,			/* note pair of registers stored and where */
+// OBSOLETE   PIA_NOTE_SP_ADJUSTMENT,	/* note stack pointer adjustment */
+// OBSOLETE   PIA_NOTE_FP_ASSIGNMENT,	/* note frame pointer assignment */
+// OBSOLETE   PIA_NOTE_PROLOGUE_END,	/* no more prologue */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE struct prologue_insns
+// OBSOLETE   {
+// OBSOLETE     unsigned long insn;
+// OBSOLETE     unsigned long mask;
+// OBSOLETE     enum prologue_insn_action action;
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE struct prologue_insns prologue_insn_tbl[] =
+// OBSOLETE {
+// OBSOLETE   /* Various register move instructions */
+// OBSOLETE   {0x58000000, 0xf800ffff, PIA_SKIP},	/* or/or.u with immed of 0 */
+// OBSOLETE   {0xf4005800, 0xfc1fffe0, PIA_SKIP},	/* or rd, r0, rs */
+// OBSOLETE   {0xf4005800, 0xfc00ffff, PIA_SKIP},	/* or rd, rs, r0 */
+// OBSOLETE 
+// OBSOLETE   /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
+// OBSOLETE   {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
+// OBSOLETE 
+// OBSOLETE   /* Frame pointer assignment: "addu r30, r31, n" */
+// OBSOLETE   {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
+// OBSOLETE 
+// OBSOLETE   /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
+// OBSOLETE   {0x241f0000, 0xfc1f0000, PIA_NOTE_ST},	/* st rx, sp, n */
+// OBSOLETE   {0x201f0000, 0xfc1f0000, PIA_NOTE_STD},	/* st.d rs, sp, n */
+// OBSOLETE 
+// OBSOLETE   /* Instructions needed for setting up r25 for pic code. */
+// OBSOLETE   {0x5f200000, 0xffff0000, PIA_SKIP},	/* or.u r25, r0, offset_high */
+// OBSOLETE   {0xcc000002, 0xffffffff, PIA_SKIP},	/* bsr.n Lab */
+// OBSOLETE   {0x5b390000, 0xffff0000, PIA_SKIP},	/* or r25, r25, offset_low */
+// OBSOLETE   {0xf7396001, 0xffffffff, PIA_SKIP},	/* Lab: addu r25, r25, r1 */
+// OBSOLETE 
+// OBSOLETE   /* Various branch or jump instructions which have a delay slot -- these
+// OBSOLETE      do not form part of the prologue, but the instruction in the delay
+// OBSOLETE      slot might be a store instruction which should be noted. */
+// OBSOLETE   {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
+// OBSOLETE 					/* br.n, bsr.n, bb0.n, or bb1.n */
+// OBSOLETE   {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END},	/* bcnd.n */
+// OBSOLETE   {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END}	/* jmp.n or jsr.n */
+// OBSOLETE 
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
+// OBSOLETE    is not the address of a valid instruction, the address of the next
+// OBSOLETE    instruction beyond ADDR otherwise.  *PWORD1 receives the first word
+// OBSOLETE    of the instruction. */
+// OBSOLETE 
+// OBSOLETE #define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
+// OBSOLETE   (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
+// OBSOLETE 
+// OBSOLETE /* Read the m88k instruction at 'memaddr' and return the address of 
+// OBSOLETE    the next instruction after that, or 0 if 'memaddr' is not the
+// OBSOLETE    address of a valid instruction.  The instruction
+// OBSOLETE    is stored at 'pword1'.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE next_insn (CORE_ADDR memaddr, unsigned long *pword1)
+// OBSOLETE {
+// OBSOLETE   *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
+// OBSOLETE   return memaddr + BYTES_PER_88K_INSN;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read a register from frames called by us (or from the hardware regs).  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE read_next_frame_reg (struct frame_info *frame, int regno)
+// OBSOLETE {
+// OBSOLETE   for (; frame; frame = frame->next)
+// OBSOLETE     {
+// OBSOLETE       if (regno == SP_REGNUM)
+// OBSOLETE 	return FRAME_FP (frame);
+// OBSOLETE       else if (frame->fsr->regs[regno])
+// OBSOLETE 	return read_memory_integer (frame->fsr->regs[regno], 4);
+// OBSOLETE     }
+// OBSOLETE   return read_register (regno);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Examine the prologue of a function.  `ip' points to the first instruction.
+// OBSOLETE    `limit' is the limit of the prologue (e.g. the addr of the first 
+// OBSOLETE    linenumber, or perhaps the program counter if we're stepping through).
+// OBSOLETE    `frame_sp' is the stack pointer value in use in this frame.  
+// OBSOLETE    `fsr' is a pointer to a frame_saved_regs structure into which we put
+// OBSOLETE    info about the registers saved by this frame.  
+// OBSOLETE    `fi' is a struct frame_info pointer; we fill in various fields in it
+// OBSOLETE    to reflect the offsets of the arg pointer and the locals pointer.  */
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR
+// OBSOLETE examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
+// OBSOLETE 		  CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
+// OBSOLETE 		  struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   register CORE_ADDR next_ip;
+// OBSOLETE   register int src;
+// OBSOLETE   unsigned long insn;
+// OBSOLETE   int size, offset;
+// OBSOLETE   char must_adjust[32];		/* If set, must adjust offsets in fsr */
+// OBSOLETE   int sp_offset = -1;		/* -1 means not set (valid must be mult of 8) */
+// OBSOLETE   int fp_offset = -1;		/* -1 means not set */
+// OBSOLETE   CORE_ADDR frame_fp;
+// OBSOLETE   CORE_ADDR prologue_end = 0;
+// OBSOLETE 
+// OBSOLETE   memset (must_adjust, '\0', sizeof (must_adjust));
+// OBSOLETE   next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
+// OBSOLETE 
+// OBSOLETE   while (next_ip)
+// OBSOLETE     {
+// OBSOLETE       struct prologue_insns *pip;
+// OBSOLETE 
+// OBSOLETE       for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
+// OBSOLETE 	if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
+// OBSOLETE 	  goto end_of_prologue_found;	/* not a prologue insn */
+// OBSOLETE 
+// OBSOLETE       switch (pip->action)
+// OBSOLETE 	{
+// OBSOLETE 	case PIA_NOTE_ST:
+// OBSOLETE 	case PIA_NOTE_STD:
+// OBSOLETE 	  if (sp_offset != -1)
+// OBSOLETE 	    {
+// OBSOLETE 	      src = ST_SRC (insn);
+// OBSOLETE 	      offset = ST_OFFSET (insn);
+// OBSOLETE 	      must_adjust[src] = 1;
+// OBSOLETE 	      fsr->regs[src++] = offset;	/* Will be adjusted later */
+// OBSOLETE 	      if (pip->action == PIA_NOTE_STD && src < 32)
+// OBSOLETE 		{
+// OBSOLETE 		  offset += 4;
+// OBSOLETE 		  must_adjust[src] = 1;
+// OBSOLETE 		  fsr->regs[src++] = offset;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    goto end_of_prologue_found;
+// OBSOLETE 	  break;
+// OBSOLETE 	case PIA_NOTE_SP_ADJUSTMENT:
+// OBSOLETE 	  if (sp_offset == -1)
+// OBSOLETE 	    sp_offset = -SUBU_OFFSET (insn);
+// OBSOLETE 	  else
+// OBSOLETE 	    goto end_of_prologue_found;
+// OBSOLETE 	  break;
+// OBSOLETE 	case PIA_NOTE_FP_ASSIGNMENT:
+// OBSOLETE 	  if (fp_offset == -1)
+// OBSOLETE 	    fp_offset = ADDU_OFFSET (insn);
+// OBSOLETE 	  else
+// OBSOLETE 	    goto end_of_prologue_found;
+// OBSOLETE 	  break;
+// OBSOLETE 	case PIA_NOTE_PROLOGUE_END:
+// OBSOLETE 	  if (!prologue_end)
+// OBSOLETE 	    prologue_end = ip;
+// OBSOLETE 	  break;
+// OBSOLETE 	case PIA_SKIP:
+// OBSOLETE 	default:
+// OBSOLETE 	  /* Do nothing */
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       ip = next_ip;
+// OBSOLETE       next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE end_of_prologue_found:
+// OBSOLETE 
+// OBSOLETE   if (prologue_end)
+// OBSOLETE     ip = prologue_end;
+// OBSOLETE 
+// OBSOLETE   /* We're done with the prologue.  If we don't care about the stack
+// OBSOLETE      frame itself, just return.  (Note that fsr->regs has been trashed,
+// OBSOLETE      but the one caller who calls with fi==0 passes a dummy there.)  */
+// OBSOLETE 
+// OBSOLETE   if (fi == 0)
+// OBSOLETE     return ip;
+// OBSOLETE 
+// OBSOLETE   /*
+// OBSOLETE      OK, now we have:
+// OBSOLETE 
+// OBSOLETE      sp_offset  original (before any alloca calls) displacement of SP
+// OBSOLETE      (will be negative).
+// OBSOLETE 
+// OBSOLETE      fp_offset  displacement from original SP to the FP for this frame
+// OBSOLETE      or -1.
+// OBSOLETE 
+// OBSOLETE      fsr->regs[0..31]   displacement from original SP to the stack
+// OBSOLETE      location where reg[0..31] is stored.
+// OBSOLETE 
+// OBSOLETE      must_adjust[0..31] set if corresponding offset was set.
+// OBSOLETE 
+// OBSOLETE      If alloca has been called between the function prologue and the current
+// OBSOLETE      IP, then the current SP (frame_sp) will not be the original SP as set by
+// OBSOLETE      the function prologue.  If the current SP is not the original SP, then the
+// OBSOLETE      compiler will have allocated an FP for this frame, fp_offset will be set,
+// OBSOLETE      and we can use it to calculate the original SP.
+// OBSOLETE 
+// OBSOLETE      Then, we figure out where the arguments and locals are, and relocate the
+// OBSOLETE      offsets in fsr->regs to absolute addresses.  */
+// OBSOLETE 
+// OBSOLETE   if (fp_offset != -1)
+// OBSOLETE     {
+// OBSOLETE       /* We have a frame pointer, so get it, and base our calc's on it.  */
+// OBSOLETE       frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
+// OBSOLETE       frame_sp = frame_fp - fp_offset;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* We have no frame pointer, therefore frame_sp is still the same value
+// OBSOLETE          as set by prologue.  But where is the frame itself?  */
+// OBSOLETE       if (must_adjust[SRP_REGNUM])
+// OBSOLETE 	{
+// OBSOLETE 	  /* Function header saved SRP (r1), the return address.  Frame starts
+// OBSOLETE 	     4 bytes down from where it was saved.  */
+// OBSOLETE 	  frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
+// OBSOLETE 	  fi->locals_pointer = frame_fp;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* Function header didn't save SRP (r1), so we are in a leaf fn or
+// OBSOLETE 	     are otherwise confused.  */
+// OBSOLETE 	  frame_fp = -1;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* The locals are relative to the FP (whether it exists as an allocated
+// OBSOLETE      register, or just as an assumed offset from the SP) */
+// OBSOLETE   fi->locals_pointer = frame_fp;
+// OBSOLETE 
+// OBSOLETE   /* The arguments are just above the SP as it was before we adjusted it
+// OBSOLETE      on entry.  */
+// OBSOLETE   fi->args_pointer = frame_sp - sp_offset;
+// OBSOLETE 
+// OBSOLETE   /* Now that we know the SP value used by the prologue, we know where
+// OBSOLETE      it saved all the registers.  */
+// OBSOLETE   for (src = 0; src < 32; src++)
+// OBSOLETE     if (must_adjust[src])
+// OBSOLETE       fsr->regs[src] += frame_sp;
+// OBSOLETE 
+// OBSOLETE   /* The saved value of the SP is always known.  */
+// OBSOLETE   /* (we hope...) */
+// OBSOLETE   if (fsr->regs[SP_REGNUM] != 0
+// OBSOLETE       && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
+// OBSOLETE     fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
+// OBSOLETE 			fsr->regs[SP_REGNUM],
+// OBSOLETE 			frame_sp - sp_offset, sp_offset);
+// OBSOLETE 
+// OBSOLETE   fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
+// OBSOLETE 
+// OBSOLETE   return (ip);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given an ip value corresponding to the start of a function,
+// OBSOLETE    return the ip of the first instruction after the function 
+// OBSOLETE    prologue.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE m88k_skip_prologue (CORE_ADDR ip)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs saved_regs_dummy;
+// OBSOLETE   struct symtab_and_line sal;
+// OBSOLETE   CORE_ADDR limit;
+// OBSOLETE 
+// OBSOLETE   sal = find_pc_line (ip, 0);
+// OBSOLETE   limit = (sal.end) ? sal.end : 0xffffffff;
+// OBSOLETE 
+// OBSOLETE   return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
+// OBSOLETE 			    (struct frame_info *) 0));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE    This includes special registers such as pc and fp saved in special
+// OBSOLETE    ways in the stack frame.  sp is even more special:
+// OBSOLETE    the address we return for it IS the sp for the next frame.
+// OBSOLETE 
+// OBSOLETE    We cache the result of doing this in the frame_obstack, since it is
+// OBSOLETE    fairly expensive.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE   register struct frame_saved_regs *cache_fsr;
+// OBSOLETE   CORE_ADDR ip;
+// OBSOLETE   struct symtab_and_line sal;
+// OBSOLETE   CORE_ADDR limit;
+// OBSOLETE 
+// OBSOLETE   if (!fi->fsr)
+// OBSOLETE     {
+// OBSOLETE       cache_fsr = (struct frame_saved_regs *)
+// OBSOLETE 	frame_obstack_alloc (sizeof (struct frame_saved_regs));
+// OBSOLETE       memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
+// OBSOLETE       fi->fsr = cache_fsr;
+// OBSOLETE 
+// OBSOLETE       /* Find the start and end of the function prologue.  If the PC
+// OBSOLETE          is in the function prologue, we only consider the part that
+// OBSOLETE          has executed already.  In the case where the PC is not in
+// OBSOLETE          the function prologue, we set limit to two instructions beyond
+// OBSOLETE          where the prologue ends in case if any of the prologue instructions
+// OBSOLETE          were moved into a delay slot of a branch instruction. */
+// OBSOLETE 
+// OBSOLETE       ip = get_pc_function_start (fi->pc);
+// OBSOLETE       sal = find_pc_line (ip, 0);
+// OBSOLETE       limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
+// OBSOLETE 	: fi->pc;
+// OBSOLETE 
+// OBSOLETE       /* This will fill in fields in *fi as well as in cache_fsr.  */
+// OBSOLETE #ifdef SIGTRAMP_FRAME_FIXUP
+// OBSOLETE       if (fi->signal_handler_caller)
+// OBSOLETE 	SIGTRAMP_FRAME_FIXUP (fi->frame);
+// OBSOLETE #endif
+// OBSOLETE       examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
+// OBSOLETE #ifdef SIGTRAMP_SP_FIXUP
+// OBSOLETE       if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
+// OBSOLETE 	SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
+// OBSOLETE #endif
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (fsr)
+// OBSOLETE     *fsr = *fi->fsr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the address of the locals block for the frame
+// OBSOLETE    described by FI.  Returns 0 if the address is unknown.
+// OBSOLETE    NOTE!  Frame locals are referred to by negative offsets from the
+// OBSOLETE    argument pointer, so this is the same as frame_args_address().  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_locals_address (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE 
+// OBSOLETE   if (fi->args_pointer)		/* Cached value is likely there.  */
+// OBSOLETE     return fi->args_pointer;
+// OBSOLETE 
+// OBSOLETE   /* Nope, generate it.  */
+// OBSOLETE 
+// OBSOLETE   get_frame_saved_regs (fi, &fsr);
+// OBSOLETE 
+// OBSOLETE   return fi->args_pointer;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the address of the argument block for the frame
+// OBSOLETE    described by FI.  Returns 0 if the address is unknown.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_args_address (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE 
+// OBSOLETE   if (fi->args_pointer)		/* Cached value is likely there.  */
+// OBSOLETE     return fi->args_pointer;
+// OBSOLETE 
+// OBSOLETE   /* Nope, generate it.  */
+// OBSOLETE 
+// OBSOLETE   get_frame_saved_regs (fi, &fsr);
+// OBSOLETE 
+// OBSOLETE   return fi->args_pointer;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the saved PC from this frame.
+// OBSOLETE 
+// OBSOLETE    If the frame has a memory copy of SRP_REGNUM, use that.  If not,
+// OBSOLETE    just use the register SRP_REGNUM itself.  */
+// OBSOLETE 
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_saved_pc (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE   return read_next_frame_reg (frame, SRP_REGNUM);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE #define DUMMY_FRAME_SIZE 192
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE write_word (CORE_ADDR sp, ULONGEST word)
+// OBSOLETE {
+// OBSOLETE   register int len = REGISTER_SIZE;
+// OBSOLETE   char buffer[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE 
+// OBSOLETE   store_unsigned_integer (buffer, len, word);
+// OBSOLETE   write_memory (sp, buffer, len);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE m88k_push_dummy_frame (void)
+// OBSOLETE {
+// OBSOLETE   register CORE_ADDR sp = read_register (SP_REGNUM);
+// OBSOLETE   register int rn;
+// OBSOLETE   int offset;
+// OBSOLETE 
+// OBSOLETE   sp -= DUMMY_FRAME_SIZE;	/* allocate a bunch of space */
+// OBSOLETE 
+// OBSOLETE   for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
+// OBSOLETE     write_word (sp + offset, read_register (rn));
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (SXIP_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (SNIP_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (SFIP_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (PSR_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (FPSR_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_word (sp + offset, read_register (FPCR_REGNUM));
+// OBSOLETE   offset += 4;
+// OBSOLETE 
+// OBSOLETE   write_register (SP_REGNUM, sp);
+// OBSOLETE   write_register (ACTUAL_FP_REGNUM, sp);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE pop_frame (void)
+// OBSOLETE {
+// OBSOLETE   register struct frame_info *frame = get_current_frame ();
+// OBSOLETE   register int regnum;
+// OBSOLETE   struct frame_saved_regs fsr;
+// OBSOLETE 
+// OBSOLETE   get_frame_saved_regs (frame, &fsr);
+// OBSOLETE 
+// OBSOLETE   if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
+// OBSOLETE     {
+// OBSOLETE       /* FIXME: I think get_frame_saved_regs should be handling this so
+// OBSOLETE          that we can deal with the saved registers properly (e.g. frame
+// OBSOLETE          1 is a call dummy, the user types "frame 2" and then "print $ps").  */
+// OBSOLETE       register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
+// OBSOLETE       int offset;
+// OBSOLETE 
+// OBSOLETE       for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
+// OBSOLETE 	(void) write_register (regnum, read_memory_integer (sp + offset, 4));
+// OBSOLETE 
+// OBSOLETE       write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE       write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE       write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE       write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE       write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE       write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE       offset += 4;
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       for (regnum = FP_REGNUM; regnum > 0; regnum--)
+// OBSOLETE 	if (fsr.regs[regnum])
+// OBSOLETE 	  write_register (regnum,
+// OBSOLETE 			  read_memory_integer (fsr.regs[regnum], 4));
+// OBSOLETE       write_pc (frame_saved_pc (frame));
+// OBSOLETE     }
+// OBSOLETE   reinit_frame_cache ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_m88k_tdep (void)
+// OBSOLETE {
+// OBSOLETE   tm_print_insn = print_insn_m88k;
+// OBSOLETE }
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 1d14735..02f44fc 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -135,20 +135,20 @@
 
 
 static void
-show_macro_command (char *name, int from_tty)
+info_macro_command (char *name, int from_tty)
 {
   struct macro_scope *ms = NULL;
   struct cleanup *cleanup_chain = make_cleanup (free_current_contents, &ms);
   struct macro_definition *d;
   
   if (! name || ! *name)
-    error ("You must follow the `show macro' command with the name"
+    error ("You must follow the `info macro' command with the name"
            " of the macro\n"
            "whose definition you want to see.");
 
   ms = default_macro_scope ();
   if (! ms)
-    error ("GDB has no preprocessor macro information for that code.\n");
+    error ("GDB has no preprocessor macro information for that code.");
 
   d = macro_lookup_definition (ms->file, ms->line, name);
   if (d)
@@ -257,9 +257,9 @@
   add_alias_cmd ("exp1", "expand-once", no_class, 1, &macrolist);
 
   add_cmd
-    ("macro", no_class, show_macro_command,
+    ("macro", no_class, info_macro_command,
      "Show the definition of MACRO, and its source location.",
-     &showlist);
+     &infolist);
 
   add_cmd
     ("define", no_class, macro_define_command,
diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index 061c63a..992c466 100644
--- a/gdb/macroexp.c
+++ b/gdb/macroexp.c
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bcache.h"
 #include "macrotab.h"
 #include "macroexp.h"
diff --git a/gdb/macroscope.c b/gdb/macroscope.c
index 4441be3..08ff6eb 100644
--- a/gdb/macroscope.c
+++ b/gdb/macroscope.c
@@ -58,7 +58,7 @@
 
 
 struct macro_scope *
-default_macro_scope ()
+default_macro_scope (void)
 {
   struct symtab_and_line sal;
   struct macro_source_file *main;
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index bb615a5..accaa7d 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "splay-tree.h"
 #include "symtab.h"
 #include "symfile.h"
diff --git a/gdb/macrotab.h b/gdb/macrotab.h
index cbc6d1b..df32977 100644
--- a/gdb/macrotab.h
+++ b/gdb/macrotab.h
@@ -22,8 +22,8 @@
 #ifndef MACROTAB_H
 #define MACROTAB_H
 
-#include "obstack.h"
-#include "bcache.h"
+struct obstack;
+struct bcache;
 
 /* How do we represent a source location?  I mean, how should we
    represent them within GDB; the user wants to use all sorts of
diff --git a/gdb/main.c b/gdb/main.c
index 7885211..61479e8 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -51,9 +51,7 @@
    processes UI events asynchronously. */
 int event_loop_p = 1;
 
-/* Has an interpreter been specified and if so, which.
-   This will be used as a set command variable, so it should
-   always be malloc'ed - since do_setshow_command will free it. */
+/* Has an interpreter been specified and if so, which. */
 char *interpreter_p;
 
 /* Whether this is the command line version or not */
@@ -159,6 +157,15 @@
 
   long time_at_startup = get_run_time ();
 
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+  setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+  setlocale (LC_CTYPE, "");
+#endif
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+
   START_PROGRESS (argv[0], 0);
 
 #ifdef MPW
@@ -340,7 +347,7 @@
 extern int gdbtk_test (char *);
 	      if (!gdbtk_test (optarg))
 		{
-		  fprintf_unfiltered (gdb_stderr, "%s: unable to load tclcommand file \"%s\"",
+		  fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""),
 				      argv[0], optarg);
 		  exit (1);
 		}
@@ -356,7 +363,7 @@
 	    }
 #endif /* GDBTK */
 	  case 'i':
-	    interpreter_p = xstrdup (optarg);
+	    interpreter_p = optarg;
 	    break;
 	  case 'd':
 	    dirarg[ndir++] = optarg;
@@ -386,7 +393,7 @@
 
 		fprintf_unfiltered
 		  (gdb_stderr,
-		   "warning: could not set baud rate to `%s'.\n", optarg);
+		   _("warning: could not set baud rate to `%s'.\n"), optarg);
 	      else
 		baud_rate = i;
 	    }
@@ -403,7 +410,7 @@
 
 		fprintf_unfiltered
 		  (gdb_stderr,
-		 "warning: could not set timeout limit to `%s'.\n", optarg);
+		 _("warning: could not set timeout limit to `%s'.\n"), optarg);
 	      else
 		remote_timeout = i;
 	    }
@@ -414,7 +421,7 @@
 #endif
 	  case '?':
 	    fprintf_unfiltered (gdb_stderr,
-			"Use `%s --help' for a complete list of options.\n",
+			_("Use `%s --help' for a complete list of options.\n"),
 				argv[0]);
 	    exit (1);
 	  }
@@ -445,7 +452,7 @@
 	if (optind >= argc)
 	  {
 	    fprintf_unfiltered (gdb_stderr,
-				"%s: `--args' specified but no program specified\n",
+				_("%s: `--args' specified but no program specified\n"),
 				argv[0]);
 	    exit (1);
 	  }
@@ -472,7 +479,7 @@
 	      break;
 	    case 3:
 	      fprintf_unfiltered (gdb_stderr,
-				  "Excess command line arguments ignored. (%s%s)\n",
+				  _("Excess command line arguments ignored. (%s%s)\n"),
 				  argv[optind], (optind == argc - 1) ? "" : " ...");
 	      break;
 	    }
@@ -517,7 +524,7 @@
   quit_pre_print = error_pre_print;
 
   /* We may get more than one warning, don't double space all of them... */
-  warning_pre_print = "\nwarning: ";
+  warning_pre_print = _("\nwarning: ");
 
   /* Read and execute $HOME/.gdbinit file, if it exists.  This is done
      *before* all the command line arguments are processed; it sets
@@ -585,7 +592,7 @@
     printf_filtered ("\n");
   error_pre_print = "\n";
   quit_pre_print = error_pre_print;
-  warning_pre_print = "\nwarning: ";
+  warning_pre_print = _("\nwarning: ");
 
   if (corearg != NULL)
     {
@@ -615,7 +622,7 @@
   /* Error messages should no longer be distinguished with extra output. */
   error_pre_print = NULL;
   quit_pre_print = NULL;
-  warning_pre_print = "warning: ";
+  warning_pre_print = _("warning: ");
 
   /* Read the .gdbinit file in the current directory, *if* it isn't
      the same as the $HOME/.gdbinit file (it should exist, also).  */
@@ -674,7 +681,7 @@
     {
       long init_time = get_run_time () - time_at_startup;
 
-      printf_unfiltered ("Startup time: %ld.%06ld\n",
+      printf_unfiltered (_("Startup time: %ld.%06ld\n"),
 			 init_time / 1000000, init_time % 1000000);
     }
 
@@ -684,7 +691,7 @@
       extern char **environ;
       char *lim = (char *) sbrk (0);
 
-      printf_unfiltered ("Startup size: data size %ld\n",
+      printf_unfiltered (_("Startup size: data size %ld\n"),
 			 (long) (lim - (char *) &environ));
 #endif
     }
@@ -745,69 +752,69 @@
 static void
 print_gdb_help (struct ui_file *stream)
 {
-  fputs_unfiltered ("\
+  fputs_unfiltered (_("\
 This is the GNU debugger.  Usage:\n\n\
     gdb [options] [executable-file [core-file or process-id]]\n\
     gdb [options] --args executable-file [inferior-arguments ...]\n\n\
 Options:\n\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --args             Arguments after executable-file are passed to inferior\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --[no]async        Enable (disable) asynchronous version of CLI\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   -b BAUDRATE        Set serial port baud rate used for remote debugging.\n\
   --batch            Exit after processing options.\n\
   --cd=DIR           Change current directory to DIR.\n\
   --command=FILE     Execute GDB commands from FILE.\n\
   --core=COREFILE    Analyze the core dump COREFILE.\n\
   --pid=PID          Attach to running process PID.\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --dbx              DBX compatibility mode.\n\
   --directory=DIR    Search for source files in DIR.\n\
   --epoch            Output information used by epoch emacs-GDB interface.\n\
   --exec=EXECFILE    Use EXECFILE as the executable.\n\
   --fullname         Output information used by emacs-GDB interface.\n\
   --help             Print this message.\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --interpreter=INTERP\n\
                      Select a specific interpreter / user interface\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --mapped           Use mapped symbol files if supported on this system.\n\
   --nw		     Do not use a window interface.\n\
-  --nx               Do not read ", stream);
+  --nx               Do not read "), stream);
   fputs_unfiltered (gdbinit, stream);
-  fputs_unfiltered (" file.\n\
+  fputs_unfiltered (_(" file.\n\
   --quiet            Do not print version number on startup.\n\
   --readnow          Fully read symbol files on first access.\n\
-", stream);
-  fputs_unfiltered ("\
+"), stream);
+  fputs_unfiltered (_("\
   --se=FILE          Use FILE as symbol file and executable file.\n\
   --symbols=SYMFILE  Read symbols from SYMFILE.\n\
   --tty=TTY          Use TTY for input/output by the program being debugged.\n\
-", stream);
+"), stream);
 #if defined(TUI)
-  fputs_unfiltered ("\
+  fputs_unfiltered (_("\
   --tui              Use a terminal user interface.\n\
-", stream);
+"), stream);
 #endif
-  fputs_unfiltered ("\
+  fputs_unfiltered (_("\
   --version          Print version information and then exit.\n\
   -w                 Use a window interface.\n\
   --write            Set writing into executable and core files.\n\
   --xdb              XDB compatibility mode.\n\
-", stream);
+"), stream);
 #ifdef ADDITIONAL_OPTION_HELP
   fputs_unfiltered (ADDITIONAL_OPTION_HELP, stream);
 #endif
-  fputs_unfiltered ("\n\
+  fputs_unfiltered (_("\n\
 For more information, type \"help\" from within GDB, or consult the\n\
 GDB manual (available as on-line info or a printed manual).\n\
 Report bugs to \"bug-gdb@gnu.org\".\
-", stream);
+"), stream);
 }
diff --git a/gdb/maint.c b/gdb/maint.c
index ddaa390..f09703f 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -783,16 +783,15 @@
 
 
 #ifdef NOTYET
-  /* FIXME: cagney/2001-09-24: A patch introducing a
-     add_set_boolean_cmd() is pending, the below should probably use
-     it.  A patch implementing profiling is pending, this just sets up
-     the framework.  */
-  tmpcmd = add_set_cmd ("profile", class_maintenance,
-			var_boolean, &maintenance_profile_p,
-			"Set internal profiling.\n\
-When enabled GDB is profiled.",
-			&maintenance_set_cmdlist);
-  set_cmd_sfunc (tmpcmd, maintenance_set_profile_cmd);
-  add_show_from_set (tmpcmd, &maintenance_show_cmdlist);
+  /* FIXME: cagney/2002-06-15: A patch implementing profiling is
+     pending, this just sets up the framework.  */
+  tmpcmd = add_setshow_boolean_cmd ("profile", class_maintenance,
+				    var_boolean, &maintenance_profile_p, "\
+Set internal profiling.\n\
+When enabled GDB is profiled.", "\
+Show internal profiling.\n",
+				    maintenance_set_profile_cmd, NULL,
+				    &maintenance_set_cmdlist,
+				    &maintenance_show_cmdlist);
 #endif
 }
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 0e6ffc8..a53aaa0 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -26,6 +26,7 @@
 #include "symfile.h"
 #include "gdbcore.h"
 #include "inferior.h"
+#include "arch-utils.h"
 
 /* Functions declared and used only in this file */
 
@@ -41,7 +42,7 @@
 
 void _initialize_mcore (void);
 
-void mcore_init_extra_frame_info (struct frame_info *fi);
+void mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi);
 
 CORE_ADDR mcore_frame_saved_pc (struct frame_info *fi);
 
@@ -54,9 +55,9 @@
 CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
 
 CORE_ADDR mcore_push_arguments (int nargs, struct value ** args, CORE_ADDR sp,
-			unsigned char struct_return, CORE_ADDR struct_addr);
+			int struct_return, CORE_ADDR struct_addr);
 
-void mcore_pop_frame (struct frame_info *fi);
+void mcore_pop_frame ();
 
 CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
 
@@ -76,22 +77,18 @@
 int mcore_debug = 0;
 #endif
 
-/* The registers of the Motorola MCore processors */
-/* *INDENT-OFF* */
-char *mcore_register_names[] =
-{ "r0",   "r1",  "r2",    "r3",   "r4",   "r5",   "r6",   "r7",
-  "r8",   "r9",  "r10",   "r11",  "r12",  "r13",  "r14",  "r15",
-  "ar0",  "ar1", "ar2",   "ar3",  "ar4",  "ar5",  "ar6",  "ar7",
-  "ar8",  "ar9", "ar10", "ar11",  "ar12", "ar13", "ar14", "ar15",
-  "psr",  "vbr", "epsr",  "fpsr", "epc",  "fpc",  "ss0",  "ss1",
-  "ss2",  "ss3", "ss4",   "gcr",  "gsr",  "cr13", "cr14", "cr15",
-  "cr16", "cr17", "cr18", "cr19", "cr20", "cr21", "cr22", "cr23",
-  "cr24", "cr25", "cr26", "cr27", "cr28", "cr29", "cr30", "cr31",
-  "pc" };
-/* *INDENT-ON* */
 
+/* All registers are 4 bytes long.  */
+#define MCORE_REG_SIZE 4
+#define MCORE_NUM_REGS 65
 
+/* Some useful register numbers.  */
+#define PR_REGNUM 15
+#define FIRST_ARGREG 2
+#define LAST_ARGREG 7
+#define RETVAL_REGNUM 2
 
+  
 /* Additional info that we use for managing frames */
 struct frame_extra_info
   {
@@ -175,6 +172,68 @@
 #define mcore_insn_debug(args) {}
 #endif
 
+
+static struct type *
+mcore_register_virtual_type (int regnum)
+{
+  if (regnum < 0 || regnum >= MCORE_NUM_REGS)
+    internal_error (__FILE__, __LINE__,
+		    "mcore_register_virtual_type: illegal register number %d",
+		    regnum);
+  else
+    return builtin_type_int;
+}
+
+static int
+mcore_register_byte (int regnum)
+{
+  if (regnum < 0 || regnum >= MCORE_NUM_REGS)
+    internal_error (__FILE__, __LINE__,
+		    "mcore_register_byte: illegal register number %d",
+		    regnum);
+  else 
+    return (regnum * MCORE_REG_SIZE);
+}
+
+static int
+mcore_register_size (int regnum)
+{
+  
+  if (regnum < 0 || regnum >= MCORE_NUM_REGS)
+    internal_error (__FILE__, __LINE__,
+		    "mcore_register_size: illegal register number %d",
+		    regnum);
+  else
+    return MCORE_REG_SIZE;
+}
+
+/* The registers of the Motorola MCore processors */
+
+static const char *
+mcore_register_name (int regnum)
+{
+
+  static char *register_names[] = { 
+    "r0",   "r1",  "r2",    "r3",   "r4",   "r5",   "r6",   "r7",
+    "r8",   "r9",  "r10",   "r11",  "r12",  "r13",  "r14",  "r15",
+    "ar0",  "ar1", "ar2",   "ar3",  "ar4",  "ar5",  "ar6",  "ar7",
+    "ar8",  "ar9", "ar10", "ar11",  "ar12", "ar13", "ar14", "ar15",
+    "psr",  "vbr", "epsr",  "fpsr", "epc",  "fpc",  "ss0",  "ss1",
+    "ss2",  "ss3", "ss4",   "gcr",  "gsr",  "cr13", "cr14", "cr15",
+    "cr16", "cr17", "cr18", "cr19", "cr20", "cr21", "cr22", "cr23",
+    "cr24", "cr25", "cr26", "cr27", "cr28", "cr29", "cr30", "cr31",
+    "pc" 
+  };
+
+  if (regnum < 0 ||
+      regnum >= sizeof (register_names) / sizeof (register_names[0]))
+    internal_error (__FILE__, __LINE__,
+		    "mcore_register_name: illegal register number %d",
+		    regnum);
+  else
+    return register_names[regnum];
+}
+
 /* Given the address at which to insert a breakpoint (BP_ADDR),
    what will that breakpoint be?
 
@@ -191,6 +250,33 @@
   return breakpoint;
 }
 
+static CORE_ADDR
+mcore_saved_pc_after_call (struct frame_info *frame)
+{
+  return read_register (PR_REGNUM);
+}
+
+/* This is currently handled by init_extra_frame_info.  */
+static void
+mcore_frame_init_saved_regs (struct frame_info *frame)
+{
+
+}
+
+/* This is currently handled by mcore_push_arguments  */
+static void
+mcore_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+
+}
+
+static int
+mcore_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+  return 0;
+}
+
+
 /* Helper function for several routines below.  This funtion simply
    sets up a fake, aka dummy, frame (not a _call_ dummy frame) that
    we can analyze with mcore_analyze_prologue. */
@@ -697,9 +783,10 @@
    command, or the call dummy breakpoint gets hit. */
 
 void
-mcore_pop_frame (struct frame_info *fi)
+mcore_pop_frame (void)
 {
   int rn;
+  struct frame_info *fi = get_current_frame ();
 
   if (PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
     generic_pop_dummy_frame ();
@@ -746,7 +833,7 @@
 
 CORE_ADDR
 mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-		      unsigned char struct_return, CORE_ADDR struct_addr)
+		      int struct_return, CORE_ADDR struct_addr)
 {
   int argreg;
   int argnum;
@@ -946,9 +1033,9 @@
    the prologue of this frame. */
 
 void
-mcore_init_extra_frame_info (struct frame_info *fi)
+mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
 {
-  if (fi->next)
+  if (fi && fi->next)
     fi->pc = FRAME_SAVED_PC (fi->next);
 
   frame_saved_regs_zalloc (fi);
@@ -981,10 +1068,107 @@
   return extract_unsigned_integer (buf, 2);
 }
 
+static struct gdbarch *
+mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  static LONGEST call_dummy_words[7] = { };
+  struct gdbarch_tdep *tdep = NULL;
+  struct gdbarch *gdbarch;
+
+  /* find a candidate among the list of pre-declared architectures. */
+  arches = gdbarch_list_lookup_by_info (arches, &info);
+  if (arches != NULL)
+    return (arches->gdbarch);
+
+  gdbarch = gdbarch_alloc (&info, 0);
+
+  /* Registers: */
+
+  /* All registers are 32 bits */
+  set_gdbarch_register_size (gdbarch, MCORE_REG_SIZE);
+  set_gdbarch_max_register_raw_size (gdbarch, MCORE_REG_SIZE);
+  set_gdbarch_max_register_virtual_size (gdbarch, MCORE_REG_SIZE);
+  set_gdbarch_register_name (gdbarch, mcore_register_name);
+  set_gdbarch_register_virtual_type (gdbarch, mcore_register_virtual_type);
+  set_gdbarch_register_virtual_size (gdbarch, mcore_register_size);
+  set_gdbarch_register_raw_size (gdbarch, mcore_register_size);
+  set_gdbarch_register_byte (gdbarch, mcore_register_byte);
+  set_gdbarch_register_bytes (gdbarch, MCORE_REG_SIZE * MCORE_NUM_REGS);
+  set_gdbarch_num_regs (gdbarch, MCORE_NUM_REGS);
+  set_gdbarch_pc_regnum (gdbarch, 64);
+  set_gdbarch_sp_regnum (gdbarch, 0);
+  set_gdbarch_fp_regnum (gdbarch, 0);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
+
+  /* Call Dummies:  */
+
+  set_gdbarch_call_dummy_p (gdbarch, 1);
+  set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
+  set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
+  set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
+  set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+  set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+  set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
+  set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
+  set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+  set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
+  set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+  set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy);
+  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
+  set_gdbarch_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
+  set_gdbarch_function_start_offset (gdbarch, 0);
+  set_gdbarch_decr_pc_after_break (gdbarch, 0);
+  set_gdbarch_breakpoint_from_pc (gdbarch, mcore_breakpoint_from_pc);
+  set_gdbarch_push_return_address (gdbarch, mcore_push_return_address);
+  set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
+  set_gdbarch_push_arguments (gdbarch, mcore_push_arguments);
+  set_gdbarch_call_dummy_length (gdbarch, 0);
+
+  /* Frames:  */
+
+  set_gdbarch_init_extra_frame_info (gdbarch, mcore_init_extra_frame_info);
+  set_gdbarch_frame_chain (gdbarch, mcore_frame_chain);
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
+  set_gdbarch_frame_init_saved_regs (gdbarch, mcore_frame_init_saved_regs);
+  set_gdbarch_frame_saved_pc (gdbarch, mcore_frame_saved_pc);
+  set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, 
+					       mcore_extract_return_value);
+  set_gdbarch_store_struct_return (gdbarch, mcore_store_struct_return);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 
+						       mcore_extract_struct_value_address);
+  set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
+  set_gdbarch_frame_args_skip (gdbarch, 0);
+  set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address);
+  set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address);
+  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+  set_gdbarch_pop_frame (gdbarch, mcore_pop_frame);
+  set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer);
+
+  /* Misc.:  */
+
+  /* Stack grows down.  */
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_use_struct_convention (gdbarch, mcore_use_struct_convention);
+  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+  /* MCore will never pass a sturcture by reference. It will always be split
+     between registers and stack.  */
+  set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr);
+
+  return gdbarch;
+}
+
+static void
+mcore_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+
+}
+
 void
 _initialize_mcore_tdep (void)
 {
   extern int print_insn_mcore (bfd_vma, disassemble_info *);
+  gdbarch_register (bfd_arch_mcore, mcore_gdbarch_init, mcore_dump_tdep);
   tm_print_insn = print_insn_mcore;
 
 #ifdef MCORE_DEBUG
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 14d2c0f..d920f8d 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -47,11 +47,12 @@
 #include "gdbcore.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "buildsym.h"
 #include "stabsread.h"
 #include "complaints.h"
 #include "demangle.h"
+#include "gdb_assert.h"
 
 /* These are needed if the tm.h file does not contain the necessary
    mips specific definitions.  */
@@ -4727,6 +4728,11 @@
 				    + ((BLOCK_NSYMS (b) - 1)
 				       * sizeof (struct symbol *))));
 
+  /* FIXME: Not worth hashing this block as it's built.  */
+  /* All callers should have created the block with new_block (), which
+     would mean it was not previously hashed.  Make sure.  */
+  gdb_assert (BLOCK_HASHTABLE (new) == 0);
+
   /* Should chase pointers to old one.  Fortunately, that`s just
      the block`s function and inferior blocks */
   if (BLOCK_FUNCTION (new) && SYMBOL_BLOCK_VALUE (BLOCK_FUNCTION (new)) == b)
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 8c46d7e..05ad413 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -47,7 +47,7 @@
   struct mem_region *n, *new;
 
   /* lo == hi is a useless empty region */
-  if (lo >= hi)
+  if (lo >= hi && hi != 0)
     {
       printf_unfiltered ("invalid memory region: low >= high\n");
       return NULL;
@@ -57,8 +57,9 @@
   while (n)
     {
       /* overlapping node */
-      if ((lo >= n->lo && lo < n->hi) ||
-	  (hi > n->lo && hi <= n->hi))
+      if ((lo >= n->lo && (lo < n->hi || n->hi == 0)) 
+	  || (hi > n->lo && (hi <= n->hi || n->hi == 0))
+	  || (lo <= n->lo && (hi >= n->hi || hi == 0)))
 	{
 	  printf_unfiltered ("overlapping memory region\n");
 	  return NULL;
@@ -111,7 +112,7 @@
     {
       if (m->enabled_p == 1)
 	{
-	  if (addr >= m->lo && addr < m->hi)
+	  if (addr >= m->lo && (addr < m->hi || m->hi == 0))
 	    return m;
 
 	  if (addr >= m->hi && lo < m->hi)
@@ -244,12 +245,22 @@
 	tmp = local_hex_string_custom ((unsigned long) m->lo, "016l");
       
       printf_filtered ("%s ", tmp);
-      
+
       if (TARGET_ADDR_BIT <= 32)
-	tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+	{
+	if (m->hi == 0)
+	  tmp = "0x100000000";
+	else
+	  tmp = local_hex_string_custom ((unsigned long) m->hi, "08l");
+	}
       else
-	tmp = local_hex_string_custom ((unsigned long) m->hi, "016l");
-      
+	{
+	if (m->hi == 0)
+	  tmp = "0x10000000000000000";
+	else
+	  tmp = local_hex_string_custom ((unsigned long) m->hi, "016l");
+	}
+
       printf_filtered ("%s ", tmp);
 
       /* Print a token for each attribute.
@@ -504,7 +515,7 @@
 }
 
 void
-_initialize_mem ()
+_initialize_mem (void)
 {
   add_com ("mem", class_vars, mem_command,
 	   "Define attributes for memory region.\n\
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index a750d8c..e5a162f 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-29  Andrew Cagney  <ac131313@redhat.com>
+
+
+	* mi-cmd-var.c: Include "gdb_string.h".
+	* mi-cmd-disas.c: Ditto.
+
+2002-06-17  Keith Seitz  <keiths@redhat.com>
+
+	* gdbmi.texinfo: Update command examples with real MI behavior.
+
 2002-05-20  Keith Seitz  <keiths@redhat.com>
 
 	* mi-main.c (captured_mi_execute_command): Add uiout parameter.
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index f924214..a71b702 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -8,7 +8,7 @@
 @c  @ifinfo
 @c  This file documents GDB/MI, a Machine Interface to GDB.
 
-@c  Copyright 2000, 2001 Free Software Foundation, Inc.
+@c  Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
 @c  Contributed by Cygnus Solutions.
 
 @c  Permission is granted to copy, distribute and/or modify this document
@@ -36,7 +36,7 @@
 @c  @page
 @c  @vskip 0pt plus 1filll
 
-@c  Copyright @copyright{} 2000, 2001 Free Software Foundation, Inc.
+@c  Copyright @copyright{} 2000, 2001, 2002 Free Software Foundation, Inc.
 
 @c  Permission is granted to copy, distribute and/or modify this document
 @c  under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -355,7 +355,7 @@
 the output received from @sc{gdb/mi}.
 
 @subsubheading Target Stop
-
+@c Ummm... There is no "-stop" command. This assumes async, no?
 Here's an example of stopping the inferior process:
 
 @example
@@ -378,7 +378,9 @@
 
 @example
 -> print 1+2
-<- ~3\n
+<- &"print 1+2\n"
+<- ~"$1 = 3\n"
+<- ^done
 <- (@value{GDBP})
 @end example
 
@@ -396,7 +398,7 @@
 
 @example
 -> -rubbish
-<- error,"Rubbish not found"
+<- ^error,msg="Undefined MI command: rubbish"
 <- (@value{GDBP})
 @end example
 
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 70054c6..028dc07 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -25,6 +25,7 @@
 #include "mi-cmds.h"
 #include "mi-getopt.h"
 #include "ui-out.h"
+#include "gdb_string.h"
 
 /* Disassemble functions. FIXME: these do not really belong here. We
    should get rid of all the duplicate code in gdb that does the same
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 4848a4e..cb5e939 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -28,6 +28,7 @@
 #include "varobj.h"
 #include "value.h"
 #include <ctype.h>
+#include "gdb_string.h"
 
 extern int varobjdebug;		/* defined in varobj.c */
 
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 0d50d13..233d06b 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -88,8 +88,6 @@
   {"gdb-show", "show %s", 0},
   {"gdb-source", 0, 0},
   {"gdb-version", "show version", 0},
-  {"interpreter-set", 0, 0, mi_cmd_interpreter_set},
-  {"interpreter-exec", 0, 0, mi_cmd_interpreter_exec},
   {"kod-info", 0, 0},
   {"kod-list", 0, 0},
   {"kod-list-object-types", 0, 0},
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 8c650fc..88775e6 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -27,7 +27,7 @@
 enum mi_cmd_result
   {
     /* Report the command as ``done''.  Display both the ``NNN^done''
-       message and the completion prompt. */
+       message and the completion prompt.  */
     MI_CMD_DONE = 0,
     /* The command is still running in the forground.  Main loop should
        display the completion prompt. */
@@ -75,8 +75,6 @@
 extern mi_cmd_args_ftype mi_cmd_exec_until;
 extern mi_cmd_args_ftype mi_cmd_exec_interrupt;
 extern mi_cmd_argv_ftype mi_cmd_gdb_exit;
-extern mi_cmd_argv_ftype mi_cmd_interpreter_set;
-extern mi_cmd_argv_ftype mi_cmd_interpreter_exec;
 extern mi_cmd_argv_ftype mi_cmd_stack_info_depth;
 extern mi_cmd_argv_ftype mi_cmd_stack_list_args;
 extern mi_cmd_argv_ftype mi_cmd_stack_list_frames;
@@ -124,6 +122,4 @@
 /* Raw console output - FIXME: should this be a parameter? */
 extern struct ui_file *raw_stdout;
 
-extern char *mi_error_message;
-void mi_execute_command (char *cmd, int from_tty);
 #endif
diff --git a/gdb/mi/mi-events.c b/gdb/mi/mi-events.c
deleted file mode 100644
index 1d942a4..0000000
--- a/gdb/mi/mi-events.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* MI Event Handlers
-   Copyright 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "ui-out.h"
-#include "interps.h"
-#include "gdb.h"
-#include "breakpoint.h"
-
-#include "mi.h"
-
-void 
-mi_interp_stack_changed_hook (void)
-{
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "stack_changed");
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out;
-}
-
-void 
-mi_interp_frame_changed_hook (int new_frame_number)
-{
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "frame_changed");
-  ui_out_field_int (uiout, "frame", new_frame_number);
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out;
-
-}
-
-void
-mi_interp_context_hook (int thread_id)
-{
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "thread_changed");
-  ui_out_field_int (uiout, "thread", thread_id);
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out;
-}
-
-void
-mi_interp_create_breakpoint_hook (struct breakpoint *bpt)
-{
-  CORE_ADDR unusued_addr;
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  /* This is a little inefficient, but it probably isn't worth adding
-     a gdb_breakpoint_query that takes a bpt structure... */
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "breakpoint_create");
-  gdb_breakpoint_query (uiout, bpt->number);
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out; 
-}
-
-void
-mi_interp_modify_breakpoint_hook (struct breakpoint *bpt)
-{
-
-  CORE_ADDR unusued_addr;
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  /* This is a little inefficient, but it probably isn't worth adding
-     a gdb_breakpoint_query that takes a bpt structure... */
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "breakpoint_modify");
-  gdb_breakpoint_query (uiout, bpt->number);
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out; 
-}
-
-void
-mi_interp_delete_breakpoint_hook (struct breakpoint *bpt)
-{
-  CORE_ADDR unusued_addr;
-  struct ui_out *saved_ui_out = uiout;
-  struct mi_out *tmp_mi_out;
-
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    uiout = gdb_interpreter_ui_out (mi0_interp);
-  else
-    uiout = gdb_interpreter_ui_out (mi_interp);
-
-  /* This is a little inefficient, but it probably isn't worth adding
-     a gdb_breakpoint_query that takes a bpt structure... */
-
-  ui_out_list_begin (uiout, "MI_HOOK_RESULT");
-  ui_out_field_string (uiout, "HOOK_TYPE", "breakpoint_delete");
-  ui_out_field_int (uiout, "bkptno", bpt->number);
-  ui_out_list_end (uiout);
-  uiout = saved_ui_out; 
-}
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
deleted file mode 100644
index 9a91833..0000000
--- a/gdb/mi/mi-interp.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* MI Interpreter Definitions and Commands
-   Copyright 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "interps.h"
-#include "event-top.h"
-#include "event-loop.h"
-#include "inferior.h"
-#include "ui-out.h"
-#include "top.h"
-
-#include "mi.h"
-#include "mi-cmds.h"
-#include "mi-out.h"
-#include "mi-console.h"
-
-/* MI's output channels */
-struct ui_file *mi_stdout;
-struct ui_file *mi_stderr;
-struct ui_file *mi_stdlog;
-struct ui_file *mi_stdtarg;
-
-/* This is the interpreter for the mi... */
-struct gdb_interpreter *mi0_interp;
-struct gdb_interpreter *mi_interp;
-
-/* These are the interpreter setup, etc. functions for the MI interpreter */
-static int mi_interpreter_init (void *data);
-static int mi_interpreter_resume (void *data);
-static int mi_interpreter_do_one_event (void *data);
-static int mi_interpreter_suspend (void *data);
-static int mi_interpreter_delete (void *data);
-static int mi_interpreter_prompt (void *data, char *new_prompt);
-
-static void mi_execute_command_wrapper (char *cmd);
-static void mi_command_loop (int mi_version);
-static char *mi_input (char *);
-
-/* These are hooks that we put in place while doing interpreter_exec
-   so we can report interesting things that happened "behind the mi's
-   back" in this command */
-static int mi_interp_query_hook (const char *ctlstr, va_list ap);
-static void mi_interp_stack_changed_hook (void);
-static char *mi_interp_read_one_line_hook (char *prompt, int repeat,
-					   char *anno);
-
-static void mi0_command_loop (void);
-static void mi1_command_loop (void);
-
-static void mi_insert_notify_hooks (void);
-static void mi_remove_notify_hooks (void);
-
-int
-mi_interpreter_init (void *data)
-{
-  /* Why is this a part of the mi architecture? */
-
-  mi_setup_architecture_data ();
-
-  /* HACK: We need to force stdout/stderr to point at the console.  This avoids
-     any potential side effects caused by legacy code that is still
-     using the TUI / fputs_unfiltered_hook.  So we set up output channels for
-     this now, and swap them in when we are run. */
-
-  raw_stdout = stdio_fileopen (stdout);
-  /* Route normal output through the MIx */
-  mi_stdout = mi_console_file_new (raw_stdout, "~");
-  /* Route error and log output through the MI */
-  mi_stderr = mi_console_file_new (raw_stdout, "&");
-  mi_stdlog = mi_stderr;
-  /* Route target output through the MI. */
-  mi_stdtarg = mi_console_file_new (raw_stdout, "@");
-
-  return 1;
-}
-
-int
-mi_interpreter_resume (void *data)
-{
-  /* As per hack note in mi_interpreter_init, swap in the output channels... */
-
-  gdb_setup_readline ();
-  mi_register_gdbarch_swap ();
-
-  if (event_loop_p)
-    {
-      /* These overwrite some of the initialization done in
-         _intialize_event_loop. */
-      call_readline = gdb_readline2;
-      input_handler = mi_execute_command_wrapper;
-      add_file_handler (input_fd, stdin_event_handler, 0);
-      async_command_editing_p = 0;
-      /* FIXME: This is a total hack for now.  PB's use of the MI implicitly
-         relies on a bug in the async support which allows asynchronous
-         commands to leak through the commmand loop.  The bug involves
-         (but is not limited to) the fact that sync_execution was
-         erroneously initialized to 0.  Duplicate by initializing it
-         thus here... */
-      sync_execution = 0;
-    }
-
-  gdb_stdout = mi_stdout;
-  /* Route error and log output through the MI */
-  gdb_stderr = mi_stderr;
-  gdb_stdlog = mi_stdlog;
-  /* Route target output through the MI. */
-  gdb_stdtarg = mi_stdtarg;
-
-  /* Replace all the hooks that we know about.  There really needs to be a better way
-     of doing this... */
-  clear_interpreter_hooks ();
-
-  show_load_progress = mi_load_progress;
-
-  /* If we're _the_ interpreter, take control. */
-  if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-    command_loop_hook = mi0_command_loop;
-  else if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI))
-    command_loop_hook = mi1_command_loop;
-  else
-    return 0;
-
-  return 1;
-}
-
-int
-mi_interpreter_suspend (void *data)
-{
-  gdb_disable_readline ();
-  return 1;
-}
-
-int
-mi_interpreter_delete (void *data)
-{
-  return 1;
-}
-
-int
-mi_interpreter_prompt (void *data, char *new_prompt)
-{
-  return 1;
-}
-
-int
-mi_do_one_event (void *data)
-{
-  return 1;
-}
-
-void
-mi_interpreter_exec_continuation (struct continuation_arg *arg)
-{
-  bpstat_do_actions (&stop_bpstat);
-  if (!target_executing)
-    {
-      fputs_unfiltered ("*stopped", raw_stdout);
-      mi_out_put (uiout, raw_stdout);
-      fputs_unfiltered ("\n", raw_stdout);
-      fputs_unfiltered ("(gdb) \n", raw_stdout);
-      gdb_flush (raw_stdout);
-      do_exec_cleanups (ALL_CLEANUPS);
-    }
-  else if (target_can_async_p ())
-    {
-      add_continuation (mi_interpreter_exec_continuation, NULL);
-    }
-}
-
-enum mi_cmd_result
-mi_cmd_interpreter_exec (char *command, char **argv, int argc)
-{
-  struct gdb_interpreter *old_interp, *interp_to_use;
-  enum mi_cmd_result result = MI_CMD_DONE;
-  int i, old_quiet;
-  struct gdb_interpreter_procs *procs;
-
-  if (argc < 2)
-    {
-      xasprintf (&mi_error_message,
-		 "Wrong # or arguments, should be \"%s interp cmd <cmd ...>\".",
-		 command);
-      return MI_CMD_ERROR;
-    }
-
-  old_interp = gdb_current_interpreter ();
-
-  interp_to_use = gdb_lookup_interpreter (argv[0]);
-  if (interp_to_use == NULL)
-    {
-      xasprintf (&mi_error_message,
-		 "Could not find interpreter \"%s\".", argv[0]);
-      return MI_CMD_ERROR;
-    }
-
-  procs = gdb_interpreter_get_procs (interp_to_use);
-  if (!procs->exec_proc)
-    {
-      xasprintf (&mi_error_message,
-		 "Interpreter \"%s\" does not support command execution.",
-		 argv[0]);
-      return MI_CMD_ERROR;
-    }
-  old_quiet = gdb_interpreter_set_quiet (interp_to_use, 1);
-
-  if (!gdb_set_interpreter (interp_to_use))
-    {
-      xasprintf (&mi_error_message,
-		 "Could not switch to interpreter \"%s\".", argv[0]);
-      return MI_CMD_ERROR;
-    }
-
-  /* Insert the MI out hooks, making sure to also call the interpreter's hooks
-     if it has any. */
-
-  mi_insert_notify_hooks ();
-
-  /* Now run the code... */
-
-  for (i = 1; i < argc; i++)
-    {
-      char *buff = NULL;
-      /* Do this in a cleaner way...  We want to force execution to be
-         asynchronous for commands that run the target.  */
-      if (target_can_async_p () && (strcmp (argv[0], "console") == 0))
-	{
-	  int len = strlen (argv[i]);
-	  buff = xmalloc (len + 2);
-	  memcpy (buff, argv[i], len);
-	  buff[len] = '&';
-	  buff[len + 1] = '\0';
-	}
-
-      /* We had to set sync_execution = 0 for the mi (well really for Project
-         Builder's use of the mi - particularly so interrupting would work.
-         But for console commands to work, we need to initialize it to 1 -
-         since that is what the cli expects - before running the command,
-         and then set it back to 0 when we are done. */
-      sync_execution = 1;
-      if (!procs->exec_proc (gdb_interpreter_get_data (interp_to_use), argv[i]))
-	{
-	  xasprintf (&mi_error_message,
-		     "mi_interpreter_execute: error in command: \"%s\".",
-		     argv[i]);
-
-	  result = MI_CMD_ERROR;
-	  break;
-	}
-      xfree (buff);
-      do_exec_error_cleanups (ALL_CLEANUPS);
-      sync_execution = 0;
-
-    }
-
-  /* Now do the switch... */
-
-  gdb_set_interpreter (old_interp);
-  mi_remove_notify_hooks ();
-  gdb_interpreter_set_quiet (interp_to_use, old_quiet);
-
-  /* Okay, now let's see if the command set the inferior going...
-     Tricky point - have to do this AFTER resetting the interpreter, since
-     changing the interpreter will clear out all the continuations for
-     that interpreter... */
-
-  if (target_can_async_p () && target_executing)
-    {
-      fputs_unfiltered ("^running\n", raw_stdout);
-      add_continuation (mi_interpreter_exec_continuation, NULL);
-    }
-
-  return result;
-}
-
-enum mi_cmd_result
-mi_cmd_interpreter_set (char *command, char **argv, int argc)
-{
-  struct gdb_interpreter *interp;
-  int result;
-
-  if (argc != 1)
-    {
-      xasprintf (&mi_error_message,
-		 "mi_cmd_interpreter_set: wrong #of args, should be 1 ");
-      return MI_CMD_ERROR;
-    }
-  interp = gdb_lookup_interpreter (argv[0]);
-  if (interp == NULL)
-    {
-      xasprintf (&mi_error_message,
-		 "mi_cmd_interpreter_set: could not find interpreter %s",
-		 argv[0]);
-      return MI_CMD_ERROR;
-    }
-
-  if (interp != gdb_current_interpreter ())
-    {
-      result = gdb_set_interpreter (interp);
-      if (result != 1)
-	{
-	  xasprintf (&mi_error_message,
-		     "mi_cmd_interpreter_set: error setting interpreter %s",
-		     argv[0]);
-	  return MI_CMD_ERROR;
-	}
-    }
-
-  /* We don't want to put up the "done" and whatnot here, since we
-   * are going over to another interpreter.
-   */
-  return MI_CMD_QUIET;
-}
-
-/*
- * mi_insert_notify_hooks - This inserts a number of hooks that are meant to produce
- * async-notify ("=") MI messages while running commands in another interpreter
- * using mi_interpreter_exec.  The canonical use for this is to allow access to
- * the gdb CLI interpreter from within the MI, while still producing MI style output
- * when actions in the CLI command change gdb's state.
-*/
-
-static void
-mi_insert_notify_hooks (void)
-{
-
-  create_breakpoint_hook = mi_interp_create_breakpoint_hook;
-  delete_breakpoint_hook = mi_interp_delete_breakpoint_hook;
-  modify_breakpoint_hook = mi_interp_modify_breakpoint_hook;
-  selected_frame_level_changed_hook = mi_interp_frame_changed_hook;
-  context_hook = mi_interp_context_hook;
-  query_hook = mi_interp_query_hook;
-}
-
-static void
-mi_remove_notify_hooks ()
-{
-  create_breakpoint_hook = NULL;
-  delete_breakpoint_hook = NULL;
-  modify_breakpoint_hook = NULL;
-  selected_frame_level_changed_hook = NULL;
-  context_hook = NULL;
-  query_hook = NULL;
-}
-
-int
-mi_interp_query_hook (const char *ctlstr, va_list ap)
-{
-  return 1;
-}
-
-char *
-mi_interp_read_one_line_hook (char *prompt, int repeat, char *anno)
-{
-  static char buff[256];
-  printf_unfiltered ("=read-one-line,prompt=\"%s\"\n", prompt);
-  gdb_flush (gdb_stdout);
-  (void) fgets (buff, sizeof (buff), stdin);
-  buff[(strlen (buff) - 1)] = 0;
-  return buff;
-}
-
-static void
-output_control_change_notification (char *notification)
-{
-  printf_unfiltered ("^");
-  printf_unfiltered ("%s\n", notification);
-  gdb_flush (gdb_stdout);
-}
-
-static void
-mi_execute_command_wrapper (char *cmd)
-{
-  mi_execute_command (cmd, stdin == instream);
-}
-
-static void
-mi0_command_loop (void)
-{
-  mi_command_loop (0);
-}
-
-static void
-mi1_command_loop (void)
-{
-  mi_command_loop (1);
-}
-
-static void
-mi_command_loop (int mi_version)
-{
-  /* HACK: Force stdout/stderr to point at the console.  This avoids
-     any potential side effects caused by legacy code that is still
-     using the TUI / fputs_unfiltered_hook */
-  raw_stdout = stdio_fileopen (stdout);
-  /* Route normal output through the MIx */
-  gdb_stdout = mi_console_file_new (raw_stdout, "~");
-  /* Route error and log output through the MI */
-  gdb_stderr = mi_console_file_new (raw_stdout, "&");
-  gdb_stdlog = gdb_stderr;
-  /* Route target output through the MI. */
-  gdb_stdtarg = mi_console_file_new (raw_stdout, "@");
-  /* HACK: Poke the ui_out table directly.  Should we be creating a
-     mi_out object wired up to the above gdb_stdout / gdb_stderr? */
-  uiout = mi_out_new (mi_version);
-  /* HACK: Override any other interpreter hooks.  We need to create a
-     real event table and pass in that. */
-  init_ui_hook = 0;
-  /* command_loop_hook = 0; */
-  print_frame_info_listing_hook = 0;
-  query_hook = 0;
-  warning_hook = 0;
-  create_breakpoint_hook = 0;
-  delete_breakpoint_hook = 0;
-  modify_breakpoint_hook = 0;
-  interactive_hook = 0;
-  registers_changed_hook = 0;
-  readline_begin_hook = 0;
-  readline_hook = 0;
-  readline_end_hook = 0;
-  register_changed_hook = 0;
-  memory_changed_hook = 0;
-  context_hook = 0;
-  target_wait_hook = 0;
-  call_command_hook = 0;
-  error_hook = 0;
-  error_begin_hook = 0;
-  show_load_progress = mi_load_progress;
-  /* Turn off 8 bit strings in quoted output.  Any character with the
-     high bit set is printed using C's octal format. */
-  sevenbit_strings = 1;
-  /* Tell the world that we're alive */
-  fputs_unfiltered ("(gdb) \n", raw_stdout);
-  gdb_flush (raw_stdout);
-  if (!event_loop_p)
-    simplified_command_loop (mi_input, mi_execute_command);
-  else
-    start_event_loop ();
-}
-
-static char *
-mi_input (char *buf)
-{
-  return gdb_readline (NULL);
-}
-
-void
-_initialize_mi_interp (void)
-{
-  struct gdb_interpreter_procs procs =
-    {
-      mi_interpreter_init,	/* init_proc */
-      mi_interpreter_resume,	/* resume_proc */
-      NULL,			/* do_one_event_proc */
-      mi_interpreter_suspend,	/* suspend_proc */
-      mi_interpreter_delete,	/* delete_proc */
-      NULL,			/* exec_proc */
-      mi_interpreter_prompt	/* prompt_proc */
-    };
-
-  if (mi0_interp == NULL)
-    {
-      mi0_interp =
-	gdb_new_interpreter (GDB_INTERPRETER_MI0, NULL, mi_out_new (0),
-			     &procs);
-      if (mi0_interp == NULL)
-	error
-	  ("Couldn't allocate a new interpreter for the mi0 interpreter\n");
-      if (gdb_add_interpreter (mi0_interp) != 1)
-	error ("Couldn't add the mi0 interpreter to gdb.\n");
-    }
-
-  if (mi_interp == NULL)
-    {
-      mi_interp =
-	gdb_new_interpreter (GDB_INTERPRETER_MI, NULL, mi_out_new (1),
-			     &procs);
-      if (mi_interp == NULL)
-	error
-	  ("Couldn't allocate a new interpreter for the mi interpreter\n");
-      if (gdb_add_interpreter (mi_interp) != 1)
-	error ("Couldn't add the mi interpreter to gdb.\n");
-    }
-}
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 1e9baed..bd8cd67 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -33,7 +33,6 @@
 #include "mi-console.h"
 #include "ui-out.h"
 #include "mi-out.h"
-#include "interps.h"
 #include "event-loop.h"
 #include "event-top.h"
 #include "gdbcore.h"		/* for write_memory() */
@@ -78,25 +77,27 @@
 /* The token of the last asynchronous command */
 static char *last_async_command;
 static char *previous_async_command;
-char *mi_error_message;
+static char *mi_error_message;
 static char *old_regs;
 
 extern void _initialize_mi_main (void);
-void mi_execute_command (char *cmd, int from_tty);
+static char *mi_input (char *);
+static void mi_execute_command (char *cmd, int from_tty);
 static enum mi_cmd_result mi_cmd_execute (struct mi_parse *parse);
 
 static void mi_execute_cli_command (const char *cli, char *args);
 static enum mi_cmd_result mi_execute_async_cli_command (char *mi, char *args, int from_tty);
+static void mi_execute_command_wrapper (char *cmd);
 
 void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg);
 
 static int register_changed_p (int regnum);
 static int get_register (int regnum, int format);
-void mi_load_progress (const char *section_name,
-		       unsigned long sent_so_far,
-		       unsigned long total_section,
-		       unsigned long total_sent,
-		       unsigned long grand_total);
+static void mi_load_progress (const char *section_name,
+			      unsigned long sent_so_far,
+			      unsigned long total_section,
+			      unsigned long total_sent,
+			      unsigned long grand_total);
 
 /* FIXME: these should go in some .h file, but infcmd.c doesn't have a
    corresponding .h file. These wrappers will be obsolete anyway, once
@@ -1079,12 +1080,7 @@
 
       if (!target_can_async_p () || !target_executing)
 	{
-	  /* print the result if there were no errors
-
-	     Remember that on the way out of executing a command, you have
-	     to directly use the mi_interp's uiout, since the command could 
-	     have reset the interpreter, in which case the current uiout 
-	     will most likely crash in the mi_out_* routines.  */
+	  /* print the result if there were no errors */
 	  if (args->rc == MI_CMD_DONE)
 	    {
 	      fputs_unfiltered (context->token, raw_stdout);
@@ -1132,21 +1128,15 @@
       /* FIXME: If the command string has something that looks like 
          a format spec (e.g. %s) we will get a core dump */
       mi_execute_cli_command ("%s", context->command);
-
-      /* If we changed interpreters, DON'T print out anything. */
-      if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI)
-	  || gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
-	{
-	  /* print the result */
-	  /* FIXME: Check for errors here. */
-	  fputs_unfiltered (context->token, raw_stdout);
-	  fputs_unfiltered ("^done", raw_stdout);
-	  mi_out_put (uiout, raw_stdout);
-	  mi_out_rewind (uiout);
-	  fputs_unfiltered ("\n", raw_stdout);
-	  args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
-	  args->rc = MI_CMD_DONE;
-	}
+      /* print the result */
+      /* FIXME: Check for errors here. */
+      fputs_unfiltered (context->token, raw_stdout);
+      fputs_unfiltered ("^done", raw_stdout);
+      mi_out_put (uiout, raw_stdout);
+      mi_out_rewind (uiout);
+      fputs_unfiltered ("\n", raw_stdout);
+      args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
+      args->rc = MI_CMD_DONE;
       break;
 
     }
@@ -1161,7 +1151,7 @@
   struct mi_parse *command;
   struct captured_mi_execute_command_args args;
   struct ui_out *saved_uiout = uiout;
-  int result;
+  int result, rc;
 
   /* This is to handle EOF (^D). We just quit gdb. */
   /* FIXME: we should call some API function here. */
@@ -1199,13 +1189,10 @@
       mi_parse_free (command);
     }
 
-  if (args.rc != MI_CMD_QUIET)
-    {
-      fputs_unfiltered ("(gdb) \n", raw_stdout);
-      gdb_flush (raw_stdout);
-      /* print any buffered hook code */
-      /* ..... */
-    }
+  fputs_unfiltered ("(gdb) \n", raw_stdout);
+  gdb_flush (raw_stdout);
+  /* print any buffered hook code */
+  /* ..... */
 }
 
 static enum mi_cmd_result
@@ -1272,6 +1259,12 @@
     }
 }
 
+static void
+mi_execute_command_wrapper (char *cmd)
+{
+  mi_execute_command (cmd, stdin == instream);
+}
+
 /* FIXME: This is just a hack so we can get some extra commands going.
    We don't want to channel things through the CLI, but call libgdb directly */
 /* Use only for synchronous commands */
@@ -1374,7 +1367,13 @@
   do_exec_cleanups (ALL_CLEANUPS);
 }
 
-void
+static char *
+mi_input (char *buf)
+{
+  return gdb_readline (NULL);
+}
+
+static void
 mi_load_progress (const char *section_name,
 		  unsigned long sent_so_far,
 		  unsigned long total_section,
@@ -1386,8 +1385,7 @@
   static char *previous_sect_name = NULL;
   int new_section;
 
-  if (!gdb_current_interpreter_is_named (GDB_INTERPRETER_MI)
-      && !gdb_current_interpreter_is_named (GDB_INTERPRETER_MI0))
+  if (!interpreter_p || strncmp (interpreter_p, "mi", 2) != 0)
     return;
 
   update_threshold.tv_sec = 0;
@@ -1444,17 +1442,118 @@
     }
 }
 
-void
-mi_setup_architecture_data (void)
+static void
+mi_command_loop (int mi_version)
+{
+  /* HACK: Force stdout/stderr to point at the console.  This avoids
+     any potential side effects caused by legacy code that is still
+     using the TUI / fputs_unfiltered_hook */
+  raw_stdout = stdio_fileopen (stdout);
+  /* Route normal output through the MIx */
+  gdb_stdout = mi_console_file_new (raw_stdout, "~");
+  /* Route error and log output through the MI */
+  gdb_stderr = mi_console_file_new (raw_stdout, "&");
+  gdb_stdlog = gdb_stderr;
+  /* Route target output through the MI. */
+  gdb_stdtarg = mi_console_file_new (raw_stdout, "@");
+
+  /* HACK: Poke the ui_out table directly.  Should we be creating a
+     mi_out object wired up to the above gdb_stdout / gdb_stderr? */
+  uiout = mi_out_new (mi_version);
+
+  /* HACK: Override any other interpreter hooks.  We need to create a
+     real event table and pass in that. */
+  init_ui_hook = 0;
+  /* command_loop_hook = 0; */
+  print_frame_info_listing_hook = 0;
+  query_hook = 0;
+  warning_hook = 0;
+  create_breakpoint_hook = 0;
+  delete_breakpoint_hook = 0;
+  modify_breakpoint_hook = 0;
+  interactive_hook = 0;
+  registers_changed_hook = 0;
+  readline_begin_hook = 0;
+  readline_hook = 0;
+  readline_end_hook = 0;
+  register_changed_hook = 0;
+  memory_changed_hook = 0;
+  context_hook = 0;
+  target_wait_hook = 0;
+  call_command_hook = 0;
+  error_hook = 0;
+  error_begin_hook = 0;
+  show_load_progress = mi_load_progress;
+
+  /* Turn off 8 bit strings in quoted output.  Any character with the
+     high bit set is printed using C's octal format. */
+  sevenbit_strings = 1;
+
+  /* Tell the world that we're alive */
+  fputs_unfiltered ("(gdb) \n", raw_stdout);
+  gdb_flush (raw_stdout);
+
+  if (!event_loop_p)
+    simplified_command_loop (mi_input, mi_execute_command);
+  else
+    start_event_loop ();
+}
+
+static void
+mi0_command_loop (void)
+{
+  mi_command_loop (0);
+}
+
+static void
+mi1_command_loop (void)
+{
+  mi_command_loop (1);
+}
+
+static void
+setup_architecture_data (void)
 {
   /* don't trust REGISTER_BYTES to be zero. */
   old_regs = xmalloc (REGISTER_BYTES + 1);
   memset (old_regs, 0, REGISTER_BYTES + 1);
 }
 
-void
-mi_register_gdbarch_swap (void)
+static void
+mi_init_ui (char *arg0)
 {
+  /* Eventually this will contain code that takes control of the
+     console. */
+}
+
+void
+_initialize_mi_main (void)
+{
+  if (interpreter_p == NULL)
+    return;
+
+  /* If we're _the_ interpreter, take control. */
+  if (strcmp (interpreter_p, "mi0") == 0)
+    command_loop_hook = mi0_command_loop;
+  else if (strcmp (interpreter_p, "mi") == 0
+	   || strcmp (interpreter_p, "mi1") == 0)
+    command_loop_hook = mi1_command_loop;
+  else
+    return;
+
+  init_ui_hook = mi_init_ui;
+  setup_architecture_data ();
   register_gdbarch_swap (&old_regs, sizeof (old_regs), NULL);
-  register_gdbarch_swap (NULL, 0, mi_setup_architecture_data);
+  register_gdbarch_swap (NULL, 0, setup_architecture_data);
+  if (event_loop_p)
+    {
+      /* These overwrite some of the initialization done in
+	 _intialize_event_loop. */
+      call_readline = gdb_readline2;
+      input_handler = mi_execute_command_wrapper;
+      add_file_handler (input_fd, stdin_event_handler, 0);
+      async_command_editing_p = 0;
+    }
+  /* FIXME: Should we notify main that we are here as a possible
+     interpreter? */
 }
diff --git a/gdb/mi/mi.h b/gdb/mi/mi.h
deleted file mode 100644
index cc921e7..0000000
--- a/gdb/mi/mi.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* MI Internal Functions
-   Copyright 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   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 MI_H
-#define MI_H
-/* The mi interpreters. */
-struct gdb_interpreter;
-extern struct gdb_interpreter *mi_interp;
-extern struct gdb_interpreter *mi0_interp;
-
-extern void mi_setup_architecture_data (void);
-extern void mi_register_gdbarch_swap (void);
-
-/* Events/Hooks */
-extern void mi_load_progress (const char *section_name,
-			      unsigned long sent_so_far,
-			      unsigned long total_section,
-			      unsigned long total_sent,
-			      unsigned long grand_total);
-extern void mi_interp_create_breakpoint_hook (struct breakpoint *bpt);
-extern void mi_interp_delete_breakpoint_hook (struct breakpoint *bpt);
-extern void mi_interp_modify_breakpoint_hook (struct breakpoint *bpt);
-extern void mi_interp_frame_changed_hook (int new_frame_number);
-extern void mi_interp_context_hook (int thread_id);
-
-#endif /* MI_H */
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 4fa1d91..b1ef28f 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -91,7 +91,7 @@
 	  ++string;
 	}
     }
-  return hash % MINIMAL_SYMBOL_HASH_SIZE;
+  return hash;
 }
 
 /* Compute a hash code for a string.  */
@@ -102,7 +102,7 @@
   unsigned int hash = 0;
   for (; *string; ++string)
     hash = hash * 67 + *string - 113;
-  return hash % MINIMAL_SYMBOL_HASH_SIZE;
+  return hash;
 }
 
 /* Add the minimal symbol SYM to an objfile's minsym hash table, TABLE.  */
@@ -112,7 +112,7 @@
 {
   if (sym->hash_next == NULL)
     {
-      unsigned int hash = msymbol_hash (SYMBOL_NAME (sym));
+      unsigned int hash = msymbol_hash (SYMBOL_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
       sym->hash_next = table[hash];
       table[hash] = sym;
     }
@@ -126,7 +126,7 @@
 {
   if (sym->demangled_hash_next == NULL)
     {
-      unsigned int hash = msymbol_hash_iw (SYMBOL_DEMANGLED_NAME (sym));
+      unsigned int hash = msymbol_hash_iw (SYMBOL_DEMANGLED_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
       sym->demangled_hash_next = table[hash];
       table[hash] = sym;
     }
@@ -154,8 +154,8 @@
   struct minimal_symbol *found_file_symbol = NULL;
   struct minimal_symbol *trampoline_symbol = NULL;
 
-  unsigned int hash = msymbol_hash (name);
-  unsigned int dem_hash = msymbol_hash_iw (name);
+  unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
+  unsigned int dem_hash = msymbol_hash_iw (name) % MINIMAL_SYMBOL_HASH_SIZE;
 
 #ifdef SOFUN_ADDRESS_MAYBE_MISSING
   if (sfile != NULL)
diff --git a/gdb/mips-irix-tdep.c b/gdb/mips-irix-tdep.c
new file mode 100644
index 0000000..73183ca
--- /dev/null
+++ b/gdb/mips-irix-tdep.c
@@ -0,0 +1,95 @@
+/* Target-dependent code for the MIPS architecture running on IRIX,
+   for GDB, the GNU Debugger.
+
+   Copyright 2002 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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 "defs.h"
+#include "osabi.h"
+
+#include "elf-bfd.h"
+
+static void
+mips_irix_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
+                                            void *obj)
+{
+  enum gdb_osabi *os_ident_ptr = obj;
+  const char *name;
+  unsigned int sectsize;
+
+  name = bfd_get_section_name (abfd, sect);
+  sectsize = bfd_section_size (abfd, sect);
+
+  if (strncmp (name, ".MIPS.", 6) == 0 && sectsize > 0)
+    {
+      /* The presence of a section named with a ".MIPS." prefix is
+         indicative of an IRIX binary.  */
+      *os_ident_ptr = GDB_OSABI_IRIX;
+    }
+}
+
+static enum gdb_osabi
+mips_irix_elf_osabi_sniffer (bfd *abfd)
+{
+  unsigned int elfosabi;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
+
+  /* If the generic sniffer gets a hit, return and let other sniffers
+     get a crack at it.  */
+  bfd_map_over_sections (abfd,
+			 generic_elf_osabi_sniff_abi_tag_sections,
+			 &osabi);
+  if (osabi != GDB_OSABI_UNKNOWN)
+    return GDB_OSABI_UNKNOWN;
+
+  elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
+
+  if (elfosabi == ELFOSABI_NONE)
+    {
+      /* When elfosabi is ELFOSABI_NONE (0), then the ELF structures in the
+	 file are conforming to the base specification for that machine 
+	 (there are no OS-specific extensions).  In order to determine the 
+	 real OS in use we must look for OS notes that have been added.  
+	 
+	 For IRIX, we simply look for sections named with .MIPS. as
+	 prefixes.  */
+      bfd_map_over_sections (abfd,
+			     mips_irix_elf_osabi_sniff_abi_tag_sections, 
+			     &osabi);
+    }
+  return osabi;
+}
+
+static void
+mips_irix_init_abi (struct gdbarch_info info,
+                    struct gdbarch *gdbarch)
+{
+}
+
+void
+_initialize_mips_irix_tdep (void)
+{
+  /* Register an ELF OS ABI sniffer for IRIX binaries.  */
+  gdbarch_register_osabi_sniffer (bfd_arch_mips,
+				  bfd_target_elf_flavour,
+				  mips_irix_elf_osabi_sniffer);
+
+  gdbarch_register_osabi (bfd_arch_mips, GDB_OSABI_IRIX,
+			  mips_irix_init_abi);
+}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 3706e2d..b8d41db 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -56,8 +56,8 @@
 
 /* Figure out where the longjmp will land.
    We expect the first arg to be a pointer to the jmp_buf structure from
-   which we extract the pc (JB_PC) that we will land at.  The pc is copied
-   into PC.  This routine returns 1 on success.  */
+   which we extract the pc (MIPS_LINUX_JB_PC) that we will land at.  The pc
+   is copied into PC.  This routine returns 1 on success.  */
 
 int
 mips_linux_get_longjmp_target (CORE_ADDR *pc)
@@ -67,8 +67,9 @@
 
   jb_addr = read_register (A0_REGNUM);
 
-  if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
+  if (target_read_memory (jb_addr
+			  + MIPS_LINUX_JB_PC * MIPS_LINUX_JB_ELEMENT_SIZE,
+			  buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
     return 0;
 
   *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
@@ -83,7 +84,9 @@
 {
   int regi;
   elf_greg_t *regp = *gregsetp;
-  static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
+  char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
+
+  memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
 
   for (regi = EF_REG0; regi <= EF_REG31; regi++)
     supply_register ((regi - EF_REG0), (char *)(regp + regi));
@@ -172,7 +175,9 @@
 supply_fpregset (elf_fpregset_t *fpregsetp)
 {
   register int regi;
-  static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
+  char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
+
+  memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
 
   for (regi = 0; regi < 32; regi++)
     supply_register (FP0_REGNUM + regi,
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 67409f6..58e1a8b 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -61,14 +61,29 @@
 
 enum mips_abi
   {
-    MIPS_ABI_UNKNOWN,
+    MIPS_ABI_UNKNOWN = 0,
     MIPS_ABI_N32,
     MIPS_ABI_O32,
+    MIPS_ABI_N64,
     MIPS_ABI_O64,
     MIPS_ABI_EABI32,
-    MIPS_ABI_EABI64
+    MIPS_ABI_EABI64,
+    MIPS_ABI_LAST
   };
 
+static const char *mips_abi_string;
+
+static const char *mips_abi_strings[] = {
+  "auto",
+  "n32",
+  "o32",
+  "n64",
+  "o64",
+  "eabi32",
+  "eabi64",
+  NULL
+};
+
 struct frame_extra_info
   {
     mips_extra_func_info_t proc_desc;
@@ -106,12 +121,6 @@
 #endif
 static int mips_fpu_type_auto = 1;
 static enum mips_fpu_type mips_fpu_type = MIPS_DEFAULT_FPU_TYPE;
-#define MIPS_FPU_TYPE mips_fpu_type
-
-/* Do not use "TARGET_IS_MIPS64" to test the size of floating point registers */
-#ifndef FP_REGISTER_DOUBLE
-#define FP_REGISTER_DOUBLE (REGISTER_VIRTUAL_SIZE(FP0_REGNUM) == 8)
-#endif
 
 static int mips_debug = 0;
 
@@ -123,13 +132,12 @@
 
     /* mips options */
     enum mips_abi mips_abi;
-    const char *mips_abi_string;
+    enum mips_abi found_abi;
     enum mips_fpu_type mips_fpu_type;
     int mips_last_arg_regnum;
     int mips_last_fp_arg_regnum;
     int mips_default_saved_regsize;
     int mips_fp_register_double;
-    int mips_regs_have_home_p;
     int mips_default_stack_argsize;
     int gdb_target_is_mips64;
     int default_mask_address_p;
@@ -137,35 +145,18 @@
     enum gdb_osabi osabi;
   };
 
-#if GDB_MULTI_ARCH
-#undef MIPS_EABI
 #define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
 		   || gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI64)
-#endif
 
-#if GDB_MULTI_ARCH
-#undef MIPS_LAST_FP_ARG_REGNUM
 #define MIPS_LAST_FP_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_fp_arg_regnum)
-#endif
 
-#if GDB_MULTI_ARCH
-#undef MIPS_LAST_ARG_REGNUM
 #define MIPS_LAST_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_arg_regnum)
-#endif
 
-#if GDB_MULTI_ARCH
-#undef MIPS_FPU_TYPE
 #define MIPS_FPU_TYPE (gdbarch_tdep (current_gdbarch)->mips_fpu_type)
-#endif
 
 /* Return the currently configured (or set) saved register size. */
 
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_SAVED_REGSIZE
 #define MIPS_DEFAULT_SAVED_REGSIZE (gdbarch_tdep (current_gdbarch)->mips_default_saved_regsize)
-#elif !defined (MIPS_DEFAULT_SAVED_REGSIZE)
-#define MIPS_DEFAULT_SAVED_REGSIZE MIPS_REGSIZE
-#endif
 
 static const char *mips_saved_regsize_string = size_auto;
 
@@ -182,6 +173,97 @@
     return 4;
 }
 
+/* Functions for setting and testing a bit in a minimal symbol that
+   marks it as 16-bit function.  The MSB of the minimal symbol's
+   "info" field is used for this purpose. This field is already
+   being used to store the symbol size, so the assumption is
+   that the symbol size cannot exceed 2^31.
+
+   ELF_MAKE_MSYMBOL_SPECIAL tests whether an ELF symbol is "special",
+   i.e. refers to a 16-bit function, and sets a "special" bit in a
+   minimal symbol to mark it as a 16-bit function
+
+   MSYMBOL_IS_SPECIAL   tests the "special" bit in a minimal symbol
+   MSYMBOL_SIZE         returns the size of the minimal symbol, i.e.
+   the "info" field with the "special" bit masked out */
+
+static void
+mips_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
+{
+  if (((elf_symbol_type *)(sym))->internal_elf_sym.st_other == STO_MIPS16) 
+    { 
+      MSYMBOL_INFO (msym) = (char *) 
+	(((long) MSYMBOL_INFO (msym)) | 0x80000000); 
+      SYMBOL_VALUE_ADDRESS (msym) |= 1; 
+    } 
+}
+
+static int
+msymbol_is_special (struct minimal_symbol *msym)
+{
+  return (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0);
+}
+
+static long
+msymbol_size (struct minimal_symbol *msym)
+{
+  return ((long) MSYMBOL_INFO (msym) & 0x7fffffff);
+}
+
+/* XFER a value from the big/little/left end of the register.
+   Depending on the size of the value it might occupy the entire
+   register or just part of it.  Make an allowance for this, aligning
+   things accordingly.  */
+
+static void
+mips_xfer_register (struct regcache *regcache, int reg_num, int length,
+		    enum bfd_endian endian, bfd_byte *in, const bfd_byte *out,
+		    int buf_offset)
+{
+  bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
+  int reg_offset = 0;
+  /* Need to transfer the left or right part of the register, based on
+     the targets byte order.  */
+  switch (endian)
+    {
+    case BFD_ENDIAN_BIG:
+      reg_offset = REGISTER_RAW_SIZE (reg_num) - length;
+      break;
+    case BFD_ENDIAN_LITTLE:
+      reg_offset = 0;
+      break;
+    case BFD_ENDIAN_UNKNOWN: /* Indicates no alignment.  */
+      reg_offset = 0;
+      break;
+    default:
+      internal_error (__FILE__, __LINE__, "bad switch");
+    }
+  if (mips_debug)
+    fprintf_unfiltered (gdb_stderr,
+			"xfer $%d, reg offset %d, buf offset %d, length %d, ",
+			reg_num, reg_offset, buf_offset, length);
+  if (mips_debug && out != NULL)
+    {
+      int i;
+      fprintf_unfiltered (gdb_stdlog, "out ");
+      for (i = 0; i < length; i++)
+	fprintf_unfiltered (gdb_stdlog, "%02x", out[buf_offset + i]);
+    }
+  if (in != NULL)
+    regcache_raw_read_part (regcache, reg_num, reg_offset, length, in + buf_offset);
+  if (out != NULL)
+    regcache_raw_write_part (regcache, reg_num, reg_offset, length, out + buf_offset);
+  if (mips_debug && in != NULL)
+    {
+      int i;
+      fprintf_unfiltered (gdb_stdlog, "in ");
+      for (i = 0; i < length; i++)
+	fprintf_unfiltered (gdb_stdlog, "%02x", in[buf_offset + i]);
+    }
+  if (mips_debug)
+    fprintf_unfiltered (gdb_stdlog, "\n");
+}
+
 /* Determine if a MIPS3 or later cpu is operating in MIPS{1,2} FPU
    compatiblity mode.  A return value of 1 means that we have
    physical 64-bit registers, but should treat them as 32-bit registers.  */
@@ -212,31 +294,13 @@
    form double-precision values).  Do not use "TARGET_IS_MIPS64" to
    determine if the ABI is using double-precision registers.  See also
    MIPS_FPU_TYPE. */
-#if GDB_MULTI_ARCH
-#undef FP_REGISTER_DOUBLE
 #define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
-#endif
-
-/* Does the caller allocate a ``home'' for each register used in the
-   function call?  The N32 ABI and MIPS_EABI do not, the others do. */
-
-#if GDB_MULTI_ARCH
-#undef MIPS_REGS_HAVE_HOME_P
-#define MIPS_REGS_HAVE_HOME_P (gdbarch_tdep (current_gdbarch)->mips_regs_have_home_p)
-#elif !defined (MIPS_REGS_HAVE_HOME_P)
-#define MIPS_REGS_HAVE_HOME_P (!MIPS_EABI)
-#endif
 
 /* The amount of space reserved on the stack for registers. This is
    different to MIPS_SAVED_REGSIZE as it determines the alignment of
    data allocated after the registers have run out. */
 
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_STACK_ARGSIZE
 #define MIPS_DEFAULT_STACK_ARGSIZE (gdbarch_tdep (current_gdbarch)->mips_default_stack_argsize)
-#elif !defined (MIPS_DEFAULT_STACK_ARGSIZE)
-#define MIPS_DEFAULT_STACK_ARGSIZE (MIPS_DEFAULT_SAVED_REGSIZE)
-#endif
 
 #define MIPS_STACK_ARGSIZE (mips_stack_argsize ())
 
@@ -253,17 +317,9 @@
     return 4;
 }
 
-#if GDB_MULTI_ARCH
-#undef GDB_TARGET_IS_MIPS64
 #define GDB_TARGET_IS_MIPS64 (gdbarch_tdep (current_gdbarch)->gdb_target_is_mips64 + 0)
-#endif
 
-#if GDB_MULTI_ARCH
-#undef MIPS_DEFAULT_MASK_ADDRESS_P
 #define MIPS_DEFAULT_MASK_ADDRESS_P (gdbarch_tdep (current_gdbarch)->default_mask_address_p)
-#elif !defined (MIPS_DEFAULT_MASK_ADDRESS_P)
-#define MIPS_DEFAULT_MASK_ADDRESS_P (0)
-#endif
 
 #define VM_MIN_ADDRESS (CORE_ADDR)0x400000
 
@@ -278,7 +334,7 @@
 
 static CORE_ADDR read_next_frame_reg (struct frame_info *, int);
 
-int mips_set_processor_type (char *);
+static int mips_set_processor_type (char *);
 
 static void mips_show_processor_type_command (char *, int);
 
@@ -314,7 +370,7 @@
 char *mips_generic_reg_names[] = MIPS_REGISTER_NAMES;
 char **mips_processor_reg_names = mips_generic_reg_names;
 
-char *
+static const char *
 mips_register_name (int i)
 {
   return mips_processor_reg_names[i];
@@ -425,6 +481,8 @@
 #define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
 #define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
 #define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
+/* FIXME drow/2002-06-10: If a pointer on the host is bigger than a long,
+   this will corrupt pdr.iline.  Fortunately we don't use it.  */
 #define PROC_SYMBOL(proc) (*(struct symbol**)&(proc)->pdr.isym)
 #define _PROC_MAGIC_ 0x0F0F0F0F
 #define PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym == _PROC_MAGIC_)
@@ -455,7 +513,7 @@
 
 static int mips64_transfers_32bit_regs_p = 0;
 
-int
+static int
 mips_register_raw_size (int reg_nr)
 {
   if (mips64_transfers_32bit_regs_p)
@@ -472,7 +530,7 @@
 /* Convert between RAW and VIRTUAL registers.  The RAW register size
    defines the remote-gdb packet. */
 
-int
+static int
 mips_register_convertible (int reg_nr)
 {
   if (mips64_transfers_32bit_regs_p)
@@ -481,7 +539,7 @@
     return (REGISTER_RAW_SIZE (reg_nr) > REGISTER_VIRTUAL_SIZE (reg_nr));
 }
 
-void
+static void
 mips_register_convert_to_virtual (int n, struct type *virtual_type,
 				  char *raw_buf, char *virt_buf)
 {
@@ -495,7 +553,7 @@
 	    TYPE_LENGTH (virtual_type));
 }
 
-void
+static void
 mips_register_convert_to_raw (struct type *virtual_type, int n,
 			      char *virt_buf, char *raw_buf)
 {
@@ -510,20 +568,96 @@
 	    TYPE_LENGTH (virtual_type));
 }
 
+void
+mips_register_convert_to_type (int regnum, struct type *type, char *buffer)
+{
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+      && REGISTER_RAW_SIZE (regnum) == 4
+      && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
+      && TYPE_CODE(type) == TYPE_CODE_FLT
+      && TYPE_LENGTH(type) == 8) 
+    {
+      char temp[4];
+      memcpy (temp, ((char *)(buffer))+4, 4);
+      memcpy (((char *)(buffer))+4, (buffer), 4);
+      memcpy (((char *)(buffer)), temp, 4); 
+    }
+}
+
+void
+mips_register_convert_from_type (int regnum, struct type *type, char *buffer)
+{
+if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+    && REGISTER_RAW_SIZE (regnum) == 4
+    && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
+    && TYPE_CODE(type) == TYPE_CODE_FLT
+    && TYPE_LENGTH(type) == 8) 
+  {
+    char temp[4];
+    memcpy (temp, ((char *)(buffer))+4, 4);
+    memcpy (((char *)(buffer))+4, (buffer), 4);
+    memcpy (((char *)(buffer)), temp, 4);
+  }
+}
+
+/* Return the GDB type object for the "standard" data type
+   of data in register REG.  
+   
+   Note: kevinb/2002-08-01: The definition below should faithfully
+   reproduce the behavior of each of the REGISTER_VIRTUAL_TYPE
+   definitions found in config/mips/tm-*.h.  I'm concerned about
+   the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
+   though.  In some cases FP_REGNUM is in this range, and I doubt
+   that this code is correct for the 64-bit case.  */
+
+static struct type *
+mips_register_virtual_type (int reg)
+{
+  if (FP0_REGNUM <= reg && reg < FP0_REGNUM + 32)
+    {
+      /* Floating point registers...  */
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+	return builtin_type_ieee_double_big;
+      else
+	return builtin_type_ieee_double_little;
+    }
+  else if (reg == PS_REGNUM /* CR */)
+    return builtin_type_uint32;
+  else if (FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM)
+    return builtin_type_uint32;
+  else
+    {
+      /* Everything else...
+         Return type appropriate for width of register.  */
+      if (MIPS_REGSIZE == TYPE_LENGTH (builtin_type_uint64))
+	return builtin_type_uint64;
+      else
+	return builtin_type_uint32;
+    }
+}
+
+/* TARGET_READ_SP -- Remove useless bits from the stack pointer.  */
+
+static CORE_ADDR
+mips_read_sp (void)
+{
+  return ADDR_BITS_REMOVE (read_register (SP_REGNUM));
+}
+
 /* Should the upper word of 64-bit addresses be zeroed? */
-enum cmd_auto_boolean mask_address_var = CMD_AUTO_BOOLEAN_AUTO;
+enum auto_boolean mask_address_var = AUTO_BOOLEAN_AUTO;
 
 static int
 mips_mask_address_p (void)
 {
   switch (mask_address_var)
     {
-    case CMD_AUTO_BOOLEAN_TRUE:
+    case AUTO_BOOLEAN_TRUE:
       return 1;
-    case CMD_AUTO_BOOLEAN_FALSE:
+    case AUTO_BOOLEAN_FALSE:
       return 0;
       break;
-    case CMD_AUTO_BOOLEAN_AUTO:
+    case AUTO_BOOLEAN_AUTO:
       return MIPS_DEFAULT_MASK_ADDRESS_P;
     default:
       internal_error (__FILE__, __LINE__,
@@ -533,17 +667,17 @@
 }
 
 static void
-show_mask_address (char *cmd, int from_tty)
+show_mask_address (char *cmd, int from_tty, struct cmd_list_element *c)
 {
   switch (mask_address_var)
     {
-    case CMD_AUTO_BOOLEAN_TRUE:
+    case AUTO_BOOLEAN_TRUE:
       printf_filtered ("The 32 bit mips address mask is enabled\n");
       break;
-    case CMD_AUTO_BOOLEAN_FALSE:
+    case AUTO_BOOLEAN_FALSE:
       printf_filtered ("The 32 bit mips address mask is disabled\n");
       break;
-    case CMD_AUTO_BOOLEAN_AUTO:
+    case AUTO_BOOLEAN_AUTO:
       printf_filtered ("The 32 bit address mask is set automatically.  Currently %s\n",
 		       mips_mask_address_p () ? "enabled" : "disabled");
       break;
@@ -555,13 +689,51 @@
 }
 
 /* Should call_function allocate stack space for a struct return?  */
-int
-mips_use_struct_convention (int gcc_p, struct type *type)
+
+static int
+mips_eabi_use_struct_convention (int gcc_p, struct type *type)
 {
-  if (MIPS_EABI)
-    return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
-  else
-    return 1;			/* Structures are returned by ref in extra arg0 */
+  return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
+}
+
+static int
+mips_n32n64_use_struct_convention (int gcc_p, struct type *type)
+{
+  return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
+}
+
+static int
+mips_o32_use_struct_convention (int gcc_p, struct type *type)
+{
+  return 1;	/* Structures are returned by ref in extra arg0.  */
+}
+
+/* Should call_function pass struct by reference? 
+   For each architecture, structs are passed either by
+   value or by reference, depending on their size.  */
+
+static int
+mips_eabi_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+  enum type_code typecode = TYPE_CODE (check_typedef (type));
+  int len = TYPE_LENGTH (check_typedef (type));
+
+  if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
+    return (len > MIPS_SAVED_REGSIZE);
+
+  return 0;
+}
+
+static int
+mips_n32n64_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+  return 0;	/* Assumption: N32/N64 never passes struct by ref.  */
+}
+
+static int
+mips_o32_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+  return 0;	/* Assumption: O32/O64 never passes struct by ref.  */
 }
 
 /* Tell if the program counter value in MEMADDR is in a MIPS16 function.  */
@@ -580,7 +752,7 @@
      MIPS16 or normal MIPS.  */
   sym = lookup_minimal_symbol_by_pc (memaddr);
   if (sym)
-    return MSYMBOL_IS_SPECIAL (sym);
+    return msymbol_is_special (sym);
   else
     return 0;
 }
@@ -748,7 +920,7 @@
 
 /* Determine whate to set a single step breakpoint while considering
    branch prediction */
-CORE_ADDR
+static CORE_ADDR
 mips32_next_pc (CORE_ADDR pc)
 {
   unsigned long inst;
@@ -1064,7 +1236,6 @@
 add_offset_16 (CORE_ADDR pc, int offset)
 {
   return ((offset << 2) | ((pc + 2) & (0xf0000000)));
-
 }
 
 static CORE_ADDR
@@ -1188,7 +1359,7 @@
   return pc;
 }
 
-CORE_ADDR
+static CORE_ADDR
 mips16_next_pc (CORE_ADDR pc)
 {
   unsigned int insn = fetch_mips_16 (pc);
@@ -1210,9 +1381,17 @@
 }
 
 /* Guaranteed to set fci->saved_regs to some values (it never leaves it
-   NULL).  */
+   NULL).
 
-void
+   Note: kevinb/2002-08-09: The only caller of this function is (and
+   should remain) mips_frame_init_saved_regs().  In fact,
+   aside from calling mips_find_saved_regs(), mips_frame_init_saved_regs()
+   does nothing more than set frame->saved_regs[SP_REGNUM].  These two
+   functions should really be combined and now that there is only one
+   caller, it should be straightforward.  (Watch out for multiple returns
+   though.)  */
+
+static void
 mips_find_saved_regs (struct frame_info *fci)
 {
   int ireg;
@@ -1362,9 +1541,20 @@
      were saved.  */
   reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
 
-  /* The freg_offset points to where the first *double* register
-     is saved.  So skip to the high-order word. */
-  if (!GDB_TARGET_IS_MIPS64)
+  /* Apparently, the freg_offset gives the offset to the first 64 bit
+     saved.
+
+     When the ABI specifies 64 bit saved registers, the FREG_OFFSET
+     designates the first saved 64 bit register.
+
+     When the ABI specifies 32 bit saved registers, the ``64 bit saved
+     DOUBLE'' consists of two adjacent 32 bit registers, Hence
+     FREG_OFFSET, designates the address of the lower register of the
+     register pair.  Adjust the offset so that it designates the upper
+     register of the pair -- i.e., the address of the first saved 32
+     bit register.  */
+
+  if (MIPS_SAVED_REGSIZE == 4)
     reg_position += MIPS_SAVED_REGSIZE;
 
   /* Fill in the offsets for the float registers which float_mask says
@@ -1379,6 +1569,23 @@
   fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM];
 }
 
+/* Set up the 'saved_regs' array.  This is a data structure containing
+   the addresses on the stack where each register has been saved, for
+   each stack frame.  Registers that have not been saved will have
+   zero here.  The stack pointer register is special:  rather than the
+   address where the stack register has been saved, saved_regs[SP_REGNUM]
+   will have the actual value of the previous frame's stack register.  */
+
+static void
+mips_frame_init_saved_regs (struct frame_info *frame)
+{
+  if (frame->saved_regs == NULL)
+    {
+      mips_find_saved_regs (frame);
+    }
+  frame->saved_regs[SP_REGNUM] = frame->frame;
+}
+
 static CORE_ADDR
 read_next_frame_reg (struct frame_info *fi, int regno)
 {
@@ -1391,7 +1598,7 @@
       else
 	{
 	  if (fi->saved_regs == NULL)
-	    mips_find_saved_regs (fi);
+	    FRAME_INIT_SAVED_REGS (fi);
 	  if (fi->saved_regs[regno])
 	    return read_memory_integer (ADDR_BITS_REMOVE (fi->saved_regs[regno]), MIPS_SAVED_REGSIZE);
 	}
@@ -1474,12 +1681,12 @@
 
   pc = ((fromleaf) ? SAVED_PC_AFTER_CALL (prev->next) :
 	prev->next ? FRAME_SAVED_PC (prev->next) : read_pc ());
-  tmp = mips_skip_stub (pc);
+  tmp = SKIP_TRAMPOLINE_CODE (pc);
   prev->pc = tmp ? tmp : pc;
 }
 
 
-CORE_ADDR
+static CORE_ADDR
 mips_frame_saved_pc (struct frame_info *frame)
 {
   CORE_ADDR saved_pc;
@@ -1932,6 +2139,30 @@
   return &temp_proc_desc;
 }
 
+struct mips_objfile_private
+{
+  bfd_size_type size;
+  char *contents;
+};
+
+/* Global used to communicate between non_heuristic_proc_desc and
+   compare_pdr_entries within qsort ().  */
+static bfd *the_bfd;
+
+static int
+compare_pdr_entries (const void *a, const void *b)
+{
+  CORE_ADDR lhs = bfd_get_32 (the_bfd, (bfd_byte *) a);
+  CORE_ADDR rhs = bfd_get_32 (the_bfd, (bfd_byte *) b);
+
+  if (lhs < rhs)
+    return -1;
+  else if (lhs == rhs)
+    return 0;
+  else
+    return 1;
+}
+
 static mips_extra_func_info_t
 non_heuristic_proc_desc (CORE_ADDR pc, CORE_ADDR *addrptr)
 {
@@ -1939,23 +2170,145 @@
   mips_extra_func_info_t proc_desc;
   struct block *b = block_for_pc (pc);
   struct symbol *sym;
+  struct obj_section *sec;
+  struct mips_objfile_private *priv;
+
+  if (PC_IN_CALL_DUMMY (pc, 0, 0))
+    return NULL;
 
   find_pc_partial_function (pc, NULL, &startaddr, NULL);
   if (addrptr)
     *addrptr = startaddr;
-  if (b == NULL || PC_IN_CALL_DUMMY (pc, 0, 0))
-    sym = NULL;
-  else
+
+  priv = NULL;
+
+  sec = find_pc_section (pc);
+  if (sec != NULL)
     {
-      if (startaddr > BLOCK_START (b))
-	/* This is the "pathological" case referred to in a comment in
-	   print_frame_info.  It might be better to move this check into
-	   symbol reading.  */
-	sym = NULL;
-      else
-	sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, 0, NULL);
+      priv = (struct mips_objfile_private *) sec->objfile->obj_private;
+
+      /* Search the ".pdr" section generated by GAS.  This includes most of
+	 the information normally found in ECOFF PDRs.  */
+
+      the_bfd = sec->objfile->obfd;
+      if (priv == NULL
+	  && (the_bfd->format == bfd_object
+	      && bfd_get_flavour (the_bfd) == bfd_target_elf_flavour
+	      && elf_elfheader (the_bfd)->e_ident[EI_CLASS] == ELFCLASS64))
+	{
+	  /* Right now GAS only outputs the address as a four-byte sequence.
+	     This means that we should not bother with this method on 64-bit
+	     targets (until that is fixed).  */
+
+	  priv = obstack_alloc (& sec->objfile->psymbol_obstack,
+				sizeof (struct mips_objfile_private));
+	  priv->size = 0;
+	  sec->objfile->obj_private = priv;
+	}
+      else if (priv == NULL)
+	{
+	  asection *bfdsec;
+
+	  priv = obstack_alloc (& sec->objfile->psymbol_obstack,
+				sizeof (struct mips_objfile_private));
+
+	  bfdsec = bfd_get_section_by_name (sec->objfile->obfd, ".pdr");
+	  if (bfdsec != NULL)
+	    {
+	      priv->size = bfd_section_size (sec->objfile->obfd, bfdsec);
+	      priv->contents = obstack_alloc (& sec->objfile->psymbol_obstack,
+					      priv->size);
+	      bfd_get_section_contents (sec->objfile->obfd, bfdsec,
+					priv->contents, 0, priv->size);
+
+	      /* In general, the .pdr section is sorted.  However, in the
+		 presence of multiple code sections (and other corner cases)
+		 it can become unsorted.  Sort it so that we can use a faster
+		 binary search.  */
+	      qsort (priv->contents, priv->size / 32, 32, compare_pdr_entries);
+	    }
+	  else
+	    priv->size = 0;
+
+	  sec->objfile->obj_private = priv;
+	}
+      the_bfd = NULL;
+
+      if (priv->size != 0)
+	{
+	  int low, mid, high;
+	  char *ptr;
+
+	  low = 0;
+	  high = priv->size / 32;
+
+	  do
+	    {
+	      CORE_ADDR pdr_pc;
+
+	      mid = (low + high) / 2;
+
+	      ptr = priv->contents + mid * 32;
+	      pdr_pc = bfd_get_signed_32 (sec->objfile->obfd, ptr);
+	      pdr_pc += ANOFFSET (sec->objfile->section_offsets,
+				  SECT_OFF_TEXT (sec->objfile));
+	      if (pdr_pc == startaddr)
+		break;
+	      if (pdr_pc > startaddr)
+		high = mid;
+	      else
+		low = mid + 1;
+	    }
+	  while (low != high);
+
+	  if (low != high)
+	    {
+	      struct symbol *sym = find_pc_function (pc);
+
+	      /* Fill in what we need of the proc_desc.  */
+	      proc_desc = (mips_extra_func_info_t)
+		obstack_alloc (&sec->objfile->psymbol_obstack,
+			       sizeof (struct mips_extra_func_info));
+	      PROC_LOW_ADDR (proc_desc) = startaddr;
+
+	      /* Only used for dummy frames.  */
+	      PROC_HIGH_ADDR (proc_desc) = 0;
+
+	      PROC_FRAME_OFFSET (proc_desc)
+		= bfd_get_32 (sec->objfile->obfd, ptr + 20);
+	      PROC_FRAME_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+						       ptr + 24);
+	      PROC_FRAME_ADJUST (proc_desc) = 0;
+	      PROC_REG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+						      ptr + 4);
+	      PROC_FREG_MASK (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+						       ptr + 12);
+	      PROC_REG_OFFSET (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+							ptr + 8);
+	      PROC_FREG_OFFSET (proc_desc)
+		= bfd_get_32 (sec->objfile->obfd, ptr + 16);
+	      PROC_PC_REG (proc_desc) = bfd_get_32 (sec->objfile->obfd,
+						    ptr + 28);
+	      proc_desc->pdr.isym = (long) sym;
+
+	      return proc_desc;
+	    }
+	}
     }
 
+  if (b == NULL)
+    return NULL;
+
+  if (startaddr > BLOCK_START (b))
+    {
+      /* This is the "pathological" case referred to in a comment in
+	 print_frame_info.  It might be better to move this check into
+	 symbol reading.  */
+      return NULL;
+    }
+
+  sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_NAMESPACE, 0, NULL);
+
   /* If we never found a PDR for this function in symbol reading, then
      examine prologues to find the information.  */
   if (sym)
@@ -1991,7 +2344,7 @@
 	{
 	  struct symtab_and_line val;
 	  struct symbol *proc_symbol =
-	  PROC_DESC_IS_DUMMY (proc_desc) ? 0 : PROC_SYMBOL (proc_desc);
+	    PROC_DESC_IS_DUMMY (proc_desc) ? 0 : PROC_SYMBOL (proc_desc);
 
 	  if (proc_symbol)
 	    {
@@ -2003,8 +2356,8 @@
 	  if (!proc_symbol || pc < val.pc)
 	    {
 	      mips_extra_func_info_t found_heuristic =
-	      heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
-				   pc, next_frame, cur_frame);
+		heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
+				     pc, next_frame, cur_frame);
 	      if (found_heuristic)
 		proc_desc = found_heuristic;
 	    }
@@ -2037,14 +2390,15 @@
 get_frame_pointer (struct frame_info *frame,
 		   mips_extra_func_info_t proc_desc)
 {
-  return ADDR_BITS_REMOVE (
-		   read_next_frame_reg (frame, PROC_FRAME_REG (proc_desc)) +
-	     PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
+  return ADDR_BITS_REMOVE (read_next_frame_reg (frame, 
+						PROC_FRAME_REG (proc_desc)) +
+			   PROC_FRAME_OFFSET (proc_desc) - 
+			   PROC_FRAME_ADJUST (proc_desc));
 }
 
-mips_extra_func_info_t cached_proc_desc;
+static mips_extra_func_info_t cached_proc_desc;
 
-CORE_ADDR
+static CORE_ADDR
 mips_frame_chain (struct frame_info *frame)
 {
   mips_extra_func_info_t proc_desc;
@@ -2056,7 +2410,7 @@
 
   /* Check if the PC is inside a call stub.  If it is, fetch the
      PC of the caller of that stub.  */
-  if ((tmp = mips_skip_stub (saved_pc)) != 0)
+  if ((tmp = SKIP_TRAMPOLINE_CODE (saved_pc)) != 0)
     saved_pc = tmp;
 
   /* Look up the procedure descriptor for this PC.  */
@@ -2071,22 +2425,24 @@
      we loop forever if we see a zero size frame.  */
   if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
       && PROC_FRAME_OFFSET (proc_desc) == 0
-  /* The previous frame from a sigtramp frame might be frameless
-     and have frame size zero.  */
-      && !frame->signal_handler_caller)
+      /* The previous frame from a sigtramp frame might be frameless
+	 and have frame size zero.  */
+      && !frame->signal_handler_caller
+      /* Check if this is a call dummy frame.  */
+      && frame->pc != CALL_DUMMY_ADDRESS ())
     return 0;
   else
     return get_frame_pointer (frame, proc_desc);
 }
 
-void
+static void
 mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
 {
   int regnum;
 
   /* Use proc_desc calculated in frame_chain */
   mips_extra_func_info_t proc_desc =
-  fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
+    fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
 
   fci->extra_info = (struct frame_extra_info *)
     frame_obstack_alloc (sizeof (struct frame_extra_info));
@@ -2121,6 +2477,12 @@
 	      memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
 	      fci->saved_regs[PC_REGNUM]
 		= fci->saved_regs[RA_REGNUM];
+	      /* Set value of previous frame's stack pointer.  Remember that
+	         saved_regs[SP_REGNUM] is special in that it contains the
+		 value of the stack pointer register.  The other saved_regs
+		 values are addresses (in the inferior) at which a given
+		 register's value may be found.  */
+	      fci->saved_regs[SP_REGNUM] = fci->frame;
 	    }
 	}
 
@@ -2176,7 +2538,7 @@
 	       && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
 	       && TYPE_NFIELDS (arg_type) == 1
 	       && TYPE_CODE (TYPE_FIELD_TYPE (arg_type, 0)) == TYPE_CODE_FLT))
-	   && MIPS_FPU_TYPE != MIPS_FPU_NONE);
+	  && MIPS_FPU_TYPE != MIPS_FPU_NONE);
 }
 
 /* On o32, argument passing in GPRs depends on the alignment of the type being
@@ -2208,12 +2570,18 @@
   return 0;
 }
 
-CORE_ADDR
-mips_push_arguments (int nargs,
-		     struct value **args,
-		     CORE_ADDR sp,
-		     int struct_return,
-		     CORE_ADDR struct_addr)
+/* Macros to round N up or down to the next A boundary; 
+   A must be a power of two.  */
+
+#define ROUND_DOWN(n,a) ((n) & ~((a)-1))
+#define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1))
+
+static CORE_ADDR
+mips_eabi_push_arguments (int nargs,
+			  struct value **args,
+			  CORE_ADDR sp,
+			  int struct_return,
+			  CORE_ADDR struct_addr)
 {
   int argreg;
   int float_argreg;
@@ -2221,44 +2589,40 @@
   int len = 0;
   int stack_offset = 0;
 
-  /* Macros to round N up or down to the next A boundary; A must be
-     a power of two. */
-#define ROUND_DOWN(n,a) ((n) & ~((a)-1))
-#define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1))
-
   /* First ensure that the stack and structure return address (if any)
-     are properly aligned. The stack has to be at least 64-bit aligned
-     even on 32-bit machines, because doubles must be 64-bit aligned.
-     On at least one MIPS variant, stack frames need to be 128-bit
-     aligned, so we round to this widest known alignment. */
+     are properly aligned.  The stack has to be at least 64-bit
+     aligned even on 32-bit machines, because doubles must be 64-bit
+     aligned.  For n32 and n64, stack frames need to be 128-bit
+     aligned, so we round to this widest known alignment.  */
+
   sp = ROUND_DOWN (sp, 16);
   struct_addr = ROUND_DOWN (struct_addr, 16);
 
-  /* Now make space on the stack for the args. We allocate more
+  /* Now make space on the stack for the args.  We allocate more
      than necessary for EABI, because the first few arguments are
-     passed in registers, but that's OK. */
+     passed in registers, but that's OK.  */
   for (argnum = 0; argnum < nargs; argnum++)
-    len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), MIPS_STACK_ARGSIZE);
+    len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 
+		     MIPS_STACK_ARGSIZE);
   sp -= ROUND_UP (len, 16);
 
   if (mips_debug)
-    fprintf_unfiltered (gdb_stdlog, "mips_push_arguments: sp=0x%lx allocated %d\n",
-			(long) sp, ROUND_UP (len, 16));
+    fprintf_unfiltered (gdb_stdlog, 
+			"mips_eabi_push_arguments: sp=0x%s allocated %d\n",
+			paddr_nz (sp), ROUND_UP (len, 16));
 
   /* Initialize the integer and float register pointers.  */
   argreg = A0_REGNUM;
   float_argreg = FPA0_REGNUM;
 
-  /* the struct_return pointer occupies the first parameter-passing reg */
+  /* The struct_return pointer occupies the first parameter-passing reg.  */
   if (struct_return)
     {
       if (mips_debug)
 	fprintf_unfiltered (gdb_stdlog,
-			    "mips_push_arguments: struct_return reg=%d 0x%lx\n",
-			    argreg, (long) struct_addr);
+			    "mips_eabi_push_arguments: struct_return reg=%d 0x%s\n",
+			    argreg, paddr_nz (struct_addr));
       write_register (argreg++, struct_addr);
-      if (MIPS_REGS_HAVE_HOME_P)
-	stack_offset += MIPS_STACK_ARGSIZE;
     }
 
   /* Now load as many as possible of the first arguments into
@@ -2267,7 +2631,7 @@
   for (argnum = 0; argnum < nargs; argnum++)
     {
       char *val;
-      char valbuf[MAX_REGISTER_RAW_SIZE];
+      char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
       struct value *arg = args[argnum];
       struct type *arg_type = check_typedef (VALUE_TYPE (arg));
       int len = TYPE_LENGTH (arg_type);
@@ -2275,13 +2639,12 @@
 
       if (mips_debug)
 	fprintf_unfiltered (gdb_stdlog,
-			    "mips_push_arguments: %d len=%d type=%d",
+			    "mips_eabi_push_arguments: %d len=%d type=%d",
 			    argnum + 1, len, (int) typecode);
 
       /* The EABI passes structures that do not fit in a register by
-         reference. In all other cases, pass the structure by value.  */
-      if (MIPS_EABI
-	  && len > MIPS_SAVED_REGSIZE
+         reference.  */
+      if (len > MIPS_SAVED_REGSIZE
 	  && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
 	{
 	  store_address (valbuf, MIPS_SAVED_REGSIZE, VALUE_ADDRESS (arg));
@@ -2297,8 +2660,8 @@
       /* 32-bit ABIs always start floating point arguments in an
          even-numbered floating point register.  Round the FP register
          up before the check to see if there are any FP registers
-         left. Non MIPS_EABI targets also pass the FP in the integer
-         registers so also round up normal registers. */
+         left.  Non MIPS_EABI targets also pass the FP in the integer
+         registers so also round up normal registers.  */
       if (!FP_REGISTER_DOUBLE
 	  && fp_register_arg_p (typecode, arg_type))
 	{
@@ -2317,7 +2680,7 @@
          because those registers are normally skipped.  */
       /* MIPS_EABI squeezes a struct that contains a single floating
          point value into an FP register instead of pushing it onto the
-         stack. */
+         stack.  */
       if (fp_register_arg_p (typecode, arg_type)
 	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
 	{
@@ -2332,13 +2695,6 @@
 		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
 				    float_argreg, phex (regval, 4));
 	      write_register (float_argreg++, regval);
-	      if (!MIPS_EABI)
-		{
-		  if (mips_debug)
-		    fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
-					argreg, phex (regval, 4));
-		  write_register (argreg++, regval);
-		}
 
 	      /* Write the high word of the double to the odd register(s).  */
 	      regval = extract_unsigned_integer (val + 4 - low_offset, 4);
@@ -2346,42 +2702,19 @@
 		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
 				    float_argreg, phex (regval, 4));
 	      write_register (float_argreg++, regval);
-	      if (!MIPS_EABI)
-		{
-		  if (mips_debug)
-		    fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
-					argreg, phex (regval, 4));
-		  write_register (argreg++, regval);
-		}
-
 	    }
 	  else
 	    {
 	      /* This is a floating point value that fits entirely
 	         in a single register.  */
 	      /* On 32 bit ABI's the float_argreg is further adjusted
-                 above to ensure that it is even register aligned. */
+                 above to ensure that it is even register aligned.  */
 	      LONGEST regval = extract_unsigned_integer (val, len);
 	      if (mips_debug)
 		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
 				    float_argreg, phex (regval, len));
 	      write_register (float_argreg++, regval);
-	      if (!MIPS_EABI)
-		{
-		  /* CAGNEY: 32 bit MIPS ABI's always reserve two FP
-                     registers for each argument.  The below is (my
-                     guess) to ensure that the corresponding integer
-                     register has reserved the same space. */
-		  if (mips_debug)
-		    fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
-					argreg, phex (regval, len));
-		  write_register (argreg, regval);
-		  argreg += FP_REGISTER_DOUBLE ? 1 : 2;
-		}
 	    }
-	  /* Reserve space for the FP register. */
-	  if (MIPS_REGS_HAVE_HOME_P)
-	    stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
 	}
       else
 	{
@@ -2394,21 +2727,15 @@
 	     compatibility, we will put them in both places.  */
 	  int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
 				  (len % MIPS_SAVED_REGSIZE != 0));
-	  /* Structures should be aligned to eight bytes (even arg registers)
-	     on MIPS_ABI_O32 if their first member has double precision. */
-	  if (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_O32
-	      && mips_type_needs_double_align (arg_type))
-	    {
-	      if ((argreg & 1))
-	        argreg++;
-	    }
+
 	  /* Note: Floating-point values that didn't fit into an FP
-             register are only written to memory. */
+             register are only written to memory.  */
 	  while (len > 0)
 	    {
-	      /* Rememer if the argument was written to the stack. */
+	      /* Remember if the argument was written to the stack.  */
 	      int stack_used_p = 0;
-	      int partial_len = len < MIPS_SAVED_REGSIZE ? len : MIPS_SAVED_REGSIZE;
+	      int partial_len = 
+		len < MIPS_SAVED_REGSIZE ? len : MIPS_SAVED_REGSIZE;
 
 	      if (mips_debug)
 		fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
@@ -2439,10 +2766,10 @@
 
 		  if (mips_debug)
 		    {
-		      fprintf_unfiltered (gdb_stdlog, " - stack_offset=0x%lx",
-					  (long) stack_offset);
-		      fprintf_unfiltered (gdb_stdlog, " longword_offset=0x%lx",
-					  (long) longword_offset);
+		      fprintf_unfiltered (gdb_stdlog, " - stack_offset=0x%s",
+					  paddr_nz (stack_offset));
+		      fprintf_unfiltered (gdb_stdlog, " longword_offset=0x%s",
+					  paddr_nz (longword_offset));
 		    }
 
 		  addr = sp + stack_offset + longword_offset;
@@ -2450,10 +2777,12 @@
 		  if (mips_debug)
 		    {
 		      int i;
-		      fprintf_unfiltered (gdb_stdlog, " @0x%lx ", (long) addr);
+		      fprintf_unfiltered (gdb_stdlog, " @0x%s ", 
+					  paddr_nz (addr));
 		      for (i = 0; i < partial_len; i++)
 			{
-			  fprintf_unfiltered (gdb_stdlog, "%02x", val[i] & 0xff);
+			  fprintf_unfiltered (gdb_stdlog, "%02x", 
+					      val[i] & 0xff);
 			}
 		    }
 		  write_memory (addr, val, partial_len);
@@ -2461,9 +2790,206 @@
 
 	      /* Note!!! This is NOT an else clause.  Odd sized
 	         structs may go thru BOTH paths.  Floating point
-	         arguments will not. */
+	         arguments will not.  */
 	      /* Write this portion of the argument to a general
-                 purpose register. */
+                 purpose register.  */
+	      if (argreg <= MIPS_LAST_ARG_REGNUM
+		  && !fp_register_arg_p (typecode, arg_type))
+		{
+		  LONGEST regval = extract_unsigned_integer (val, partial_len);
+
+		  if (mips_debug)
+		    fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
+				      argreg,
+				      phex (regval, MIPS_SAVED_REGSIZE));
+		  write_register (argreg, regval);
+		  argreg++;
+		}
+
+	      len -= partial_len;
+	      val += partial_len;
+
+	      /* Compute the the offset into the stack at which we
+		 will copy the next parameter.
+
+	         In the new EABI (and the NABI32), the stack_offset
+	         only needs to be adjusted when it has been used.  */
+
+	      if (stack_used_p)
+		stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+	    }
+	}
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog, "\n");
+    }
+
+  /* Return adjusted stack pointer.  */
+  return sp;
+}
+
+/* N32/N64 version of push_arguments.  */
+
+static CORE_ADDR
+mips_n32n64_push_arguments (int nargs,
+			    struct value **args,
+			    CORE_ADDR sp,
+			    int struct_return,
+			    CORE_ADDR struct_addr)
+{
+  int argreg;
+  int float_argreg;
+  int argnum;
+  int len = 0;
+  int stack_offset = 0;
+
+  /* First ensure that the stack and structure return address (if any)
+     are properly aligned.  The stack has to be at least 64-bit
+     aligned even on 32-bit machines, because doubles must be 64-bit
+     aligned.  For n32 and n64, stack frames need to be 128-bit
+     aligned, so we round to this widest known alignment.  */
+
+  sp = ROUND_DOWN (sp, 16);
+  struct_addr = ROUND_DOWN (struct_addr, 16);
+
+  /* Now make space on the stack for the args.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 
+		     MIPS_STACK_ARGSIZE);
+  sp -= ROUND_UP (len, 16);
+
+  if (mips_debug)
+    fprintf_unfiltered (gdb_stdlog, 
+			"mips_n32n64_push_arguments: sp=0x%s allocated %d\n",
+			paddr_nz (sp), ROUND_UP (len, 16));
+
+  /* Initialize the integer and float register pointers.  */
+  argreg = A0_REGNUM;
+  float_argreg = FPA0_REGNUM;
+
+  /* The struct_return pointer occupies the first parameter-passing reg.  */
+  if (struct_return)
+    {
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_n32n64_push_arguments: struct_return reg=%d 0x%s\n",
+			    argreg, paddr_nz (struct_addr));
+      write_register (argreg++, struct_addr);
+    }
+
+  /* Now load as many as possible of the first arguments into
+     registers, and push the rest onto the stack.  Loop thru args
+     from first to last.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    {
+      char *val;
+      char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
+      struct value *arg = args[argnum];
+      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+      int len = TYPE_LENGTH (arg_type);
+      enum type_code typecode = TYPE_CODE (arg_type);
+
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_n32n64_push_arguments: %d len=%d type=%d",
+			    argnum + 1, len, (int) typecode);
+
+      val = (char *) VALUE_CONTENTS (arg);
+
+      if (fp_register_arg_p (typecode, arg_type)
+	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
+	{
+	  /* This is a floating point value that fits entirely
+	     in a single register.  */
+	  /* On 32 bit ABI's the float_argreg is further adjusted
+	     above to ensure that it is even register aligned.  */
+	  LONGEST regval = extract_unsigned_integer (val, len);
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				float_argreg, phex (regval, len));
+	  write_register (float_argreg++, regval);
+
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				argreg, phex (regval, len));
+	  write_register (argreg, regval);
+	  argreg += 1;
+	}
+      else
+	{
+	  /* Copy the argument to general registers or the stack in
+	     register-sized pieces.  Large arguments are split between
+	     registers and stack.  */
+	  /* Note: structs whose size is not a multiple of MIPS_REGSIZE
+	     are treated specially: Irix cc passes them in registers
+	     where gcc sometimes puts them on the stack.  For maximum
+	     compatibility, we will put them in both places.  */
+	  int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
+				  (len % MIPS_SAVED_REGSIZE != 0));
+	  /* Note: Floating-point values that didn't fit into an FP
+             register are only written to memory.  */
+	  while (len > 0)
+	    {
+	      /* Rememer if the argument was written to the stack.  */
+	      int stack_used_p = 0;
+	      int partial_len = len < MIPS_SAVED_REGSIZE ? 
+		len : MIPS_SAVED_REGSIZE;
+
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
+				    partial_len);
+
+	      /* Write this portion of the argument to the stack.  */
+	      if (argreg > MIPS_LAST_ARG_REGNUM
+		  || odd_sized_struct
+		  || fp_register_arg_p (typecode, arg_type))
+		{
+		  /* Should shorter than int integer values be
+		     promoted to int before being stored? */
+		  int longword_offset = 0;
+		  CORE_ADDR addr;
+		  stack_used_p = 1;
+		  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+		    {
+		      if (MIPS_STACK_ARGSIZE == 8 &&
+			  (typecode == TYPE_CODE_INT ||
+			   typecode == TYPE_CODE_PTR ||
+			   typecode == TYPE_CODE_FLT) && len <= 4)
+			longword_offset = MIPS_STACK_ARGSIZE - len;
+		      else if ((typecode == TYPE_CODE_STRUCT ||
+				typecode == TYPE_CODE_UNION) &&
+			       TYPE_LENGTH (arg_type) < MIPS_STACK_ARGSIZE)
+			longword_offset = MIPS_STACK_ARGSIZE - len;
+		    }
+
+		  if (mips_debug)
+		    {
+		      fprintf_unfiltered (gdb_stdlog, " - stack_offset=0x%s",
+					  paddr_nz (stack_offset));
+		      fprintf_unfiltered (gdb_stdlog, " longword_offset=0x%s",
+					  paddr_nz (longword_offset));
+		    }
+
+		  addr = sp + stack_offset + longword_offset;
+
+		  if (mips_debug)
+		    {
+		      int i;
+		      fprintf_unfiltered (gdb_stdlog, " @0x%s ", 
+					  paddr_nz (addr));
+		      for (i = 0; i < partial_len; i++)
+			{
+			  fprintf_unfiltered (gdb_stdlog, "%02x", 
+					      val[i] & 0xff);
+			}
+		    }
+		  write_memory (addr, val, partial_len);
+		}
+
+	      /* Note!!! This is NOT an else clause.  Odd sized
+	         structs may go thru BOTH paths.  Floating point
+	         arguments will not.  */
+	      /* Write this portion of the argument to a general
+                 purpose register.  */
 	      if (argreg <= MIPS_LAST_ARG_REGNUM
 		  && !fp_register_arg_p (typecode, arg_type))
 		{
@@ -2478,8 +3004,298 @@
 		     It does not seem to be necessary to do the
 		     same for integral types.
 
-		     Also don't do this adjustment on EABI and O64
-		     binaries.
+		     cagney/2001-07-23: gdb/179: Also, GCC, when
+		     outputting LE O32 with sizeof (struct) <
+		     MIPS_SAVED_REGSIZE, generates a left shift as
+		     part of storing the argument in a register a
+		     register (the left shift isn't generated when
+		     sizeof (struct) >= MIPS_SAVED_REGSIZE).  Since it
+		     is quite possible that this is GCC contradicting
+		     the LE/O32 ABI, GDB has not been adjusted to
+		     accommodate this.  Either someone needs to
+		     demonstrate that the LE/O32 ABI specifies such a
+		     left shift OR this new ABI gets identified as
+		     such and GDB gets tweaked accordingly.  */
+
+		  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+		      && partial_len < MIPS_SAVED_REGSIZE
+		      && (typecode == TYPE_CODE_STRUCT ||
+			  typecode == TYPE_CODE_UNION))
+		    regval <<= ((MIPS_SAVED_REGSIZE - partial_len) *
+				TARGET_CHAR_BIT);
+
+		  if (mips_debug)
+		    fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
+				      argreg,
+				      phex (regval, MIPS_SAVED_REGSIZE));
+		  write_register (argreg, regval);
+		  argreg++;
+		}
+
+	      len -= partial_len;
+	      val += partial_len;
+
+	      /* Compute the the offset into the stack at which we
+		 will copy the next parameter.
+
+	         In N32 (N64?), the stack_offset only needs to be
+	         adjusted when it has been used.  */
+
+	      if (stack_used_p)
+		stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+	    }
+	}
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog, "\n");
+    }
+
+  /* Return adjusted stack pointer.  */
+  return sp;
+}
+
+/* O32 version of push_arguments.  */
+
+static CORE_ADDR
+mips_o32_push_arguments (int nargs,
+			 struct value **args,
+			 CORE_ADDR sp,
+			 int struct_return,
+			 CORE_ADDR struct_addr)
+{
+  int argreg;
+  int float_argreg;
+  int argnum;
+  int len = 0;
+  int stack_offset = 0;
+
+  /* First ensure that the stack and structure return address (if any)
+     are properly aligned.  The stack has to be at least 64-bit
+     aligned even on 32-bit machines, because doubles must be 64-bit
+     aligned.  For n32 and n64, stack frames need to be 128-bit
+     aligned, so we round to this widest known alignment.  */
+
+  sp = ROUND_DOWN (sp, 16);
+  struct_addr = ROUND_DOWN (struct_addr, 16);
+
+  /* Now make space on the stack for the args.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 
+		     MIPS_STACK_ARGSIZE);
+  sp -= ROUND_UP (len, 16);
+
+  if (mips_debug)
+    fprintf_unfiltered (gdb_stdlog, 
+			"mips_o32_push_arguments: sp=0x%s allocated %d\n",
+			paddr_nz (sp), ROUND_UP (len, 16));
+
+  /* Initialize the integer and float register pointers.  */
+  argreg = A0_REGNUM;
+  float_argreg = FPA0_REGNUM;
+
+  /* The struct_return pointer occupies the first parameter-passing reg.  */
+  if (struct_return)
+    {
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_o32_push_arguments: struct_return reg=%d 0x%s\n",
+			    argreg, paddr_nz (struct_addr));
+      write_register (argreg++, struct_addr);
+      stack_offset += MIPS_STACK_ARGSIZE;
+    }
+
+  /* Now load as many as possible of the first arguments into
+     registers, and push the rest onto the stack.  Loop thru args
+     from first to last.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    {
+      char *val;
+      char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
+      struct value *arg = args[argnum];
+      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+      int len = TYPE_LENGTH (arg_type);
+      enum type_code typecode = TYPE_CODE (arg_type);
+
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_o32_push_arguments: %d len=%d type=%d",
+			    argnum + 1, len, (int) typecode);
+
+      val = (char *) VALUE_CONTENTS (arg);
+
+      /* 32-bit ABIs always start floating point arguments in an
+         even-numbered floating point register.  Round the FP register
+         up before the check to see if there are any FP registers
+         left.  O32/O64 targets also pass the FP in the integer
+         registers so also round up normal registers.  */
+      if (!FP_REGISTER_DOUBLE
+	  && fp_register_arg_p (typecode, arg_type))
+	{
+	  if ((float_argreg & 1))
+	    float_argreg++;
+	}
+
+      /* Floating point arguments passed in registers have to be
+         treated specially.  On 32-bit architectures, doubles
+         are passed in register pairs; the even register gets
+         the low word, and the odd register gets the high word.
+         On O32/O64, the first two floating point arguments are
+         also copied to general registers, because MIPS16 functions
+         don't use float registers for arguments.  This duplication of
+         arguments in general registers can't hurt non-MIPS16 functions
+         because those registers are normally skipped.  */
+
+      if (fp_register_arg_p (typecode, arg_type)
+	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
+	{
+	  if (!FP_REGISTER_DOUBLE && len == 8)
+	    {
+	      int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
+	      unsigned long regval;
+
+	      /* Write the low word of the double to the even register(s).  */
+	      regval = extract_unsigned_integer (val + low_offset, 4);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, 4));
+	      write_register (float_argreg++, regval);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, 4));
+	      write_register (argreg++, regval);
+
+	      /* Write the high word of the double to the odd register(s).  */
+	      regval = extract_unsigned_integer (val + 4 - low_offset, 4);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, 4));
+	      write_register (float_argreg++, regval);
+
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, 4));
+	      write_register (argreg++, regval);
+	    }
+	  else
+	    {
+	      /* This is a floating point value that fits entirely
+	         in a single register.  */
+	      /* On 32 bit ABI's the float_argreg is further adjusted
+                 above to ensure that it is even register aligned.  */
+	      LONGEST regval = extract_unsigned_integer (val, len);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, len));
+	      write_register (float_argreg++, regval);
+	      /* CAGNEY: 32 bit MIPS ABI's always reserve two FP
+		 registers for each argument.  The below is (my
+		 guess) to ensure that the corresponding integer
+		 register has reserved the same space.  */
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, len));
+	      write_register (argreg, regval);
+	      argreg += FP_REGISTER_DOUBLE ? 1 : 2;
+	    }
+	  /* Reserve space for the FP register.  */
+	  stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
+	}
+      else
+	{
+	  /* Copy the argument to general registers or the stack in
+	     register-sized pieces.  Large arguments are split between
+	     registers and stack.  */
+	  /* Note: structs whose size is not a multiple of MIPS_REGSIZE
+	     are treated specially: Irix cc passes them in registers
+	     where gcc sometimes puts them on the stack.  For maximum
+	     compatibility, we will put them in both places.  */
+	  int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
+				  (len % MIPS_SAVED_REGSIZE != 0));
+	  /* Structures should be aligned to eight bytes (even arg registers)
+	     on MIPS_ABI_O32, if their first member has double precision.  */
+	  if (MIPS_SAVED_REGSIZE < 8
+	      && mips_type_needs_double_align (arg_type))
+	    {
+	      if ((argreg & 1))
+	        argreg++;
+	    }
+	  /* Note: Floating-point values that didn't fit into an FP
+             register are only written to memory.  */
+	  while (len > 0)
+	    {
+	      /* Remember if the argument was written to the stack.  */
+	      int stack_used_p = 0;
+	      int partial_len = 
+		len < MIPS_SAVED_REGSIZE ? len : MIPS_SAVED_REGSIZE;
+
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
+				    partial_len);
+
+	      /* Write this portion of the argument to the stack.  */
+	      if (argreg > MIPS_LAST_ARG_REGNUM
+		  || odd_sized_struct
+		  || fp_register_arg_p (typecode, arg_type))
+		{
+		  /* Should shorter than int integer values be
+		     promoted to int before being stored? */
+		  int longword_offset = 0;
+		  CORE_ADDR addr;
+		  stack_used_p = 1;
+		  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+		    {
+		      if (MIPS_STACK_ARGSIZE == 8 &&
+			  (typecode == TYPE_CODE_INT ||
+			   typecode == TYPE_CODE_PTR ||
+			   typecode == TYPE_CODE_FLT) && len <= 4)
+			longword_offset = MIPS_STACK_ARGSIZE - len;
+		    }
+
+		  if (mips_debug)
+		    {
+		      fprintf_unfiltered (gdb_stdlog, " - stack_offset=0x%s",
+					  paddr_nz (stack_offset));
+		      fprintf_unfiltered (gdb_stdlog, " longword_offset=0x%s",
+					  paddr_nz (longword_offset));
+		    }
+
+		  addr = sp + stack_offset + longword_offset;
+
+		  if (mips_debug)
+		    {
+		      int i;
+		      fprintf_unfiltered (gdb_stdlog, " @0x%s ", 
+					  paddr_nz (addr));
+		      for (i = 0; i < partial_len; i++)
+			{
+			  fprintf_unfiltered (gdb_stdlog, "%02x", 
+					      val[i] & 0xff);
+			}
+		    }
+		  write_memory (addr, val, partial_len);
+		}
+
+	      /* Note!!! This is NOT an else clause.  Odd sized
+	         structs may go thru BOTH paths.  Floating point
+	         arguments will not.  */
+	      /* Write this portion of the argument to a general
+                 purpose register.  */
+	      if (argreg <= MIPS_LAST_ARG_REGNUM
+		  && !fp_register_arg_p (typecode, arg_type))
+		{
+		  LONGEST regval = extract_signed_integer (val, partial_len);
+		  /* Value may need to be sign extended, because 
+		     MIPS_REGSIZE != MIPS_SAVED_REGSIZE.  */
+
+		  /* A non-floating-point argument being passed in a
+		     general register.  If a struct or union, and if
+		     the remaining length is smaller than the register
+		     size, we have to adjust the register value on
+		     big endian targets.
+
+		     It does not seem to be necessary to do the
+		     same for integral types.
+
+		     Also don't do this adjustment on O64 binaries.
 
 		     cagney/2001-07-23: gdb/179: Also, GCC, when
 		     outputting LE O32 with sizeof (struct) <
@@ -2494,8 +3310,7 @@
 		     left shift OR this new ABI gets identified as
 		     such and GDB gets tweaked accordingly.  */
 
-		  if (!MIPS_EABI
-		      && MIPS_SAVED_REGSIZE < 8
+		  if (MIPS_SAVED_REGSIZE < 8
 		      && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
 		      && partial_len < MIPS_SAVED_REGSIZE
 		      && (typecode == TYPE_CODE_STRUCT ||
@@ -2510,11 +3325,9 @@
 		  write_register (argreg, regval);
 		  argreg++;
 
-		  /* If this is the old ABI, prevent subsequent floating
-		     point arguments from being passed in floating point
-		     registers.  */
-		  if (!MIPS_EABI)
-		    float_argreg = MIPS_LAST_FP_ARG_REGNUM + 1;
+		  /* Prevent subsequent floating point arguments from
+		     being passed in floating point registers.  */
+		  float_argreg = MIPS_LAST_FP_ARG_REGNUM + 1;
 		}
 
 	      len -= partial_len;
@@ -2526,13 +3339,9 @@
 		 In older ABIs, the caller reserved space for
 		 registers that contained arguments.  This was loosely
 		 refered to as their "home".  Consequently, space is
-		 always allocated.
+		 always allocated.  */
 
-	         In the new EABI (and the NABI32), the stack_offset
-	         only needs to be adjusted when it has been used.. */
-
-	      if (MIPS_REGS_HAVE_HOME_P || stack_used_p)
-		stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+	      stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
 	    }
 	}
       if (mips_debug)
@@ -2543,7 +3352,306 @@
   return sp;
 }
 
-CORE_ADDR
+/* O64 version of push_arguments.  */
+
+static CORE_ADDR
+mips_o64_push_arguments (int nargs,
+			 struct value **args,
+			 CORE_ADDR sp,
+			 int struct_return,
+			 CORE_ADDR struct_addr)
+{
+  int argreg;
+  int float_argreg;
+  int argnum;
+  int len = 0;
+  int stack_offset = 0;
+
+  /* First ensure that the stack and structure return address (if any)
+     are properly aligned.  The stack has to be at least 64-bit
+     aligned even on 32-bit machines, because doubles must be 64-bit
+     aligned.  For n32 and n64, stack frames need to be 128-bit
+     aligned, so we round to this widest known alignment.  */
+
+  sp = ROUND_DOWN (sp, 16);
+  struct_addr = ROUND_DOWN (struct_addr, 16);
+
+  /* Now make space on the stack for the args.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 
+		     MIPS_STACK_ARGSIZE);
+  sp -= ROUND_UP (len, 16);
+
+  if (mips_debug)
+    fprintf_unfiltered (gdb_stdlog, 
+			"mips_o64_push_arguments: sp=0x%s allocated %d\n",
+			paddr_nz (sp), ROUND_UP (len, 16));
+
+  /* Initialize the integer and float register pointers.  */
+  argreg = A0_REGNUM;
+  float_argreg = FPA0_REGNUM;
+
+  /* The struct_return pointer occupies the first parameter-passing reg.  */
+  if (struct_return)
+    {
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_o64_push_arguments: struct_return reg=%d 0x%s\n",
+			    argreg, paddr_nz (struct_addr));
+      write_register (argreg++, struct_addr);
+      stack_offset += MIPS_STACK_ARGSIZE;
+    }
+
+  /* Now load as many as possible of the first arguments into
+     registers, and push the rest onto the stack.  Loop thru args
+     from first to last.  */
+  for (argnum = 0; argnum < nargs; argnum++)
+    {
+      char *val;
+      char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
+      struct value *arg = args[argnum];
+      struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+      int len = TYPE_LENGTH (arg_type);
+      enum type_code typecode = TYPE_CODE (arg_type);
+
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog,
+			    "mips_o64_push_arguments: %d len=%d type=%d",
+			    argnum + 1, len, (int) typecode);
+
+      val = (char *) VALUE_CONTENTS (arg);
+
+      /* 32-bit ABIs always start floating point arguments in an
+         even-numbered floating point register.  Round the FP register
+         up before the check to see if there are any FP registers
+         left.  O32/O64 targets also pass the FP in the integer
+         registers so also round up normal registers.  */
+      if (!FP_REGISTER_DOUBLE
+	  && fp_register_arg_p (typecode, arg_type))
+	{
+	  if ((float_argreg & 1))
+	    float_argreg++;
+	}
+
+      /* Floating point arguments passed in registers have to be
+         treated specially.  On 32-bit architectures, doubles
+         are passed in register pairs; the even register gets
+         the low word, and the odd register gets the high word.
+         On O32/O64, the first two floating point arguments are
+         also copied to general registers, because MIPS16 functions
+         don't use float registers for arguments.  This duplication of
+         arguments in general registers can't hurt non-MIPS16 functions
+         because those registers are normally skipped.  */
+
+      if (fp_register_arg_p (typecode, arg_type)
+	  && float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
+	{
+	  if (!FP_REGISTER_DOUBLE && len == 8)
+	    {
+	      int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
+	      unsigned long regval;
+
+	      /* Write the low word of the double to the even register(s).  */
+	      regval = extract_unsigned_integer (val + low_offset, 4);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, 4));
+	      write_register (float_argreg++, regval);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, 4));
+	      write_register (argreg++, regval);
+
+	      /* Write the high word of the double to the odd register(s).  */
+	      regval = extract_unsigned_integer (val + 4 - low_offset, 4);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, 4));
+	      write_register (float_argreg++, regval);
+
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, 4));
+	      write_register (argreg++, regval);
+	    }
+	  else
+	    {
+	      /* This is a floating point value that fits entirely
+	         in a single register.  */
+	      /* On 32 bit ABI's the float_argreg is further adjusted
+                 above to ensure that it is even register aligned.  */
+	      LONGEST regval = extract_unsigned_integer (val, len);
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - fpreg=%d val=%s",
+				    float_argreg, phex (regval, len));
+	      write_register (float_argreg++, regval);
+	      /* CAGNEY: 32 bit MIPS ABI's always reserve two FP
+		 registers for each argument.  The below is (my
+		 guess) to ensure that the corresponding integer
+		 register has reserved the same space.  */
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s",
+				    argreg, phex (regval, len));
+	      write_register (argreg, regval);
+	      argreg += FP_REGISTER_DOUBLE ? 1 : 2;
+	    }
+	  /* Reserve space for the FP register.  */
+	  stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
+	}
+      else
+	{
+	  /* Copy the argument to general registers or the stack in
+	     register-sized pieces.  Large arguments are split between
+	     registers and stack.  */
+	  /* Note: structs whose size is not a multiple of MIPS_REGSIZE
+	     are treated specially: Irix cc passes them in registers
+	     where gcc sometimes puts them on the stack.  For maximum
+	     compatibility, we will put them in both places.  */
+	  int odd_sized_struct = ((len > MIPS_SAVED_REGSIZE) &&
+				  (len % MIPS_SAVED_REGSIZE != 0));
+	  /* Structures should be aligned to eight bytes (even arg registers)
+	     on MIPS_ABI_O32, if their first member has double precision.  */
+	  if (MIPS_SAVED_REGSIZE < 8
+	      && mips_type_needs_double_align (arg_type))
+	    {
+	      if ((argreg & 1))
+	        argreg++;
+	    }
+	  /* Note: Floating-point values that didn't fit into an FP
+             register are only written to memory.  */
+	  while (len > 0)
+	    {
+	      /* Remember if the argument was written to the stack.  */
+	      int stack_used_p = 0;
+	      int partial_len = 
+		len < MIPS_SAVED_REGSIZE ? len : MIPS_SAVED_REGSIZE;
+
+	      if (mips_debug)
+		fprintf_unfiltered (gdb_stdlog, " -- partial=%d",
+				    partial_len);
+
+	      /* Write this portion of the argument to the stack.  */
+	      if (argreg > MIPS_LAST_ARG_REGNUM
+		  || odd_sized_struct
+		  || fp_register_arg_p (typecode, arg_type))
+		{
+		  /* Should shorter than int integer values be
+		     promoted to int before being stored? */
+		  int longword_offset = 0;
+		  CORE_ADDR addr;
+		  stack_used_p = 1;
+		  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+		    {
+		      if (MIPS_STACK_ARGSIZE == 8 &&
+			  (typecode == TYPE_CODE_INT ||
+			   typecode == TYPE_CODE_PTR ||
+			   typecode == TYPE_CODE_FLT) && len <= 4)
+			longword_offset = MIPS_STACK_ARGSIZE - len;
+		    }
+
+		  if (mips_debug)
+		    {
+		      fprintf_unfiltered (gdb_stdlog, " - stack_offset=0x%s",
+					  paddr_nz (stack_offset));
+		      fprintf_unfiltered (gdb_stdlog, " longword_offset=0x%s",
+					  paddr_nz (longword_offset));
+		    }
+
+		  addr = sp + stack_offset + longword_offset;
+
+		  if (mips_debug)
+		    {
+		      int i;
+		      fprintf_unfiltered (gdb_stdlog, " @0x%s ", 
+					  paddr_nz (addr));
+		      for (i = 0; i < partial_len; i++)
+			{
+			  fprintf_unfiltered (gdb_stdlog, "%02x", 
+					      val[i] & 0xff);
+			}
+		    }
+		  write_memory (addr, val, partial_len);
+		}
+
+	      /* Note!!! This is NOT an else clause.  Odd sized
+	         structs may go thru BOTH paths.  Floating point
+	         arguments will not.  */
+	      /* Write this portion of the argument to a general
+                 purpose register.  */
+	      if (argreg <= MIPS_LAST_ARG_REGNUM
+		  && !fp_register_arg_p (typecode, arg_type))
+		{
+		  LONGEST regval = extract_signed_integer (val, partial_len);
+		  /* Value may need to be sign extended, because 
+		     MIPS_REGSIZE != MIPS_SAVED_REGSIZE.  */
+
+		  /* A non-floating-point argument being passed in a
+		     general register.  If a struct or union, and if
+		     the remaining length is smaller than the register
+		     size, we have to adjust the register value on
+		     big endian targets.
+
+		     It does not seem to be necessary to do the
+		     same for integral types.
+
+		     Also don't do this adjustment on O64 binaries.
+
+		     cagney/2001-07-23: gdb/179: Also, GCC, when
+		     outputting LE O32 with sizeof (struct) <
+		     MIPS_SAVED_REGSIZE, generates a left shift as
+		     part of storing the argument in a register a
+		     register (the left shift isn't generated when
+		     sizeof (struct) >= MIPS_SAVED_REGSIZE).  Since it
+		     is quite possible that this is GCC contradicting
+		     the LE/O32 ABI, GDB has not been adjusted to
+		     accommodate this.  Either someone needs to
+		     demonstrate that the LE/O32 ABI specifies such a
+		     left shift OR this new ABI gets identified as
+		     such and GDB gets tweaked accordingly.  */
+
+		  if (MIPS_SAVED_REGSIZE < 8
+		      && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+		      && partial_len < MIPS_SAVED_REGSIZE
+		      && (typecode == TYPE_CODE_STRUCT ||
+			  typecode == TYPE_CODE_UNION))
+		    regval <<= ((MIPS_SAVED_REGSIZE - partial_len) *
+				TARGET_CHAR_BIT);
+
+		  if (mips_debug)
+		    fprintf_filtered (gdb_stdlog, " - reg=%d val=%s",
+				      argreg,
+				      phex (regval, MIPS_SAVED_REGSIZE));
+		  write_register (argreg, regval);
+		  argreg++;
+
+		  /* Prevent subsequent floating point arguments from
+		     being passed in floating point registers.  */
+		  float_argreg = MIPS_LAST_FP_ARG_REGNUM + 1;
+		}
+
+	      len -= partial_len;
+	      val += partial_len;
+
+	      /* Compute the the offset into the stack at which we
+		 will copy the next parameter.
+
+		 In older ABIs, the caller reserved space for
+		 registers that contained arguments.  This was loosely
+		 refered to as their "home".  Consequently, space is
+		 always allocated.  */
+
+	      stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+	    }
+	}
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stdlog, "\n");
+    }
+
+  /* Return adjusted stack pointer.  */
+  return sp;
+}
+
+static CORE_ADDR
 mips_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
   /* Set the return address register to point to the entry
@@ -2555,7 +3663,7 @@
 static void
 mips_push_register (CORE_ADDR * sp, int regno)
 {
-  char buffer[MAX_REGISTER_RAW_SIZE];
+  char *buffer = alloca (MAX_REGISTER_RAW_SIZE);
   int regsize;
   int offset;
   if (MIPS_SAVED_REGSIZE < REGISTER_RAW_SIZE (regno))
@@ -2578,7 +3686,7 @@
 /* MASK(i,j) == (1<<i) + (1<<(i+1)) + ... + (1<<j)). Assume i<=j<(MIPS_NUMREGS-1). */
 #define MASK(i,j) (((1 << ((j)+1))-1) ^ ((1 << (i))-1))
 
-void
+static void
 mips_push_dummy_frame (void)
 {
   int ireg;
@@ -2657,7 +3765,7 @@
   PROC_PC_REG (proc_desc) = RA_REGNUM;
 }
 
-void
+static void
 mips_pop_frame (void)
 {
   register int regnum;
@@ -2668,7 +3776,7 @@
 
   write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
   if (frame->saved_regs == NULL)
-    mips_find_saved_regs (frame);
+    FRAME_INIT_SAVED_REGS (frame);
   for (regnum = 0; regnum < NUM_REGS; regnum++)
     {
       if (regnum != SP_REGNUM && regnum != PC_REGNUM
@@ -2677,6 +3785,7 @@
 			read_memory_integer (frame->saved_regs[regnum],
 					     MIPS_SAVED_REGSIZE));
     }
+
   write_register (SP_REGNUM, new_sp);
   flush_cached_frames ();
 
@@ -2715,6 +3824,13 @@
     }
 }
 
+static void
+mips_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, 
+		     struct value **args, struct type *type, int gcc_p)
+{
+  write_register(T9_REGNUM, fun);
+}
+
 /* Floating point register management.
 
    Background: MIPS1 & 2 fp registers are 32 bits wide.  To support
@@ -2834,7 +3950,7 @@
 static void
 mips_print_register (int regnum, int all)
 {
-  char raw_buffer[MAX_REGISTER_RAW_SIZE];
+  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
 
   /* Get the data in raw format.  */
   if (!frame_register_read (selected_frame, regnum, raw_buffer))
@@ -2851,7 +3967,7 @@
 	  || mips2_fp_compat ())
       && !((regnum - FP0_REGNUM) & 1))
     {
-      char dbuffer[2 * MAX_REGISTER_RAW_SIZE];
+      char *dbuffer = alloca (2 * MAX_REGISTER_RAW_SIZE);
 
       mips_read_fp_register_double (regnum, dbuffer);
 
@@ -2986,7 +4102,7 @@
 do_gp_register_row (int regnum)
 {
   /* do values for GP (int) regs */
-  char raw_buffer[MAX_REGISTER_RAW_SIZE];
+  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
   int ncols = (MIPS_REGSIZE == 8 ? 4 : 8);	/* display cols per row */
   int col, byte;
   int start_regnum = regnum;
@@ -3044,7 +4160,7 @@
 
 /* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
 
-void
+static void
 mips_do_registers_info (int regnum, int fpregs)
 {
   if (regnum != -1)		/* do one specified register */
@@ -3072,15 +4188,6 @@
     }
 }
 
-/* Return number of args passed to a frame. described by FIP.
-   Can return -1, meaning no way to tell.  */
-
-int
-mips_frame_num_args (struct frame_info *frame)
-{
-  return -1;
-}
-
 /* Is this a branch with a delay slot?  */
 
 static int is_delayed (unsigned long);
@@ -3319,7 +4426,7 @@
    We must skip more in the case where part of the prologue is in the
    delay slot of a non-prologue instruction).  */
 
-CORE_ADDR
+static CORE_ADDR
 mips_skip_prologue (CORE_ADDR pc)
 {
   /* See if we can determine the end of the prologue via the symbol table.
@@ -3454,10 +4561,29 @@
 /* Given a return value in `regbuf' with a type `valtype', extract and
    copy its value into `valbuf'. */
 
-void
-mips_extract_return_value (struct type *valtype,
-			   char regbuf[REGISTER_BYTES],
-			   char *valbuf)
+static void
+mips_eabi_extract_return_value (struct type *valtype,
+				char regbuf[REGISTER_BYTES],
+				char *valbuf)
+{
+  struct return_value_word lo;
+  struct return_value_word hi;
+  return_value_location (valtype, &hi, &lo);
+
+  memcpy (valbuf + lo.buf_offset,
+	  regbuf + REGISTER_BYTE (lo.reg) + lo.reg_offset,
+	  lo.len);
+
+  if (hi.len > 0)
+    memcpy (valbuf + hi.buf_offset,
+	    regbuf + REGISTER_BYTE (hi.reg) + hi.reg_offset,
+	    hi.len);
+}
+
+static void
+mips_o64_extract_return_value (struct type *valtype,
+			       char regbuf[REGISTER_BYTES],
+			       char *valbuf)
 {
   struct return_value_word lo;
   struct return_value_word hi;
@@ -3476,10 +4602,10 @@
 /* Given a return value in `valbuf' with a type `valtype', write it's
    value into the appropriate register. */
 
-void
-mips_store_return_value (struct type *valtype, char *valbuf)
+static void
+mips_eabi_store_return_value (struct type *valtype, char *valbuf)
 {
-  char raw_buffer[MAX_REGISTER_RAW_SIZE];
+  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
   struct return_value_word lo;
   struct return_value_word hi;
   return_value_location (valtype, &hi, &lo);
@@ -3500,10 +4626,298 @@
     }
 }
 
+static void
+mips_o64_store_return_value (struct type *valtype, char *valbuf)
+{
+  char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+  struct return_value_word lo;
+  struct return_value_word hi;
+  return_value_location (valtype, &hi, &lo);
+
+  memset (raw_buffer, 0, sizeof (raw_buffer));
+  memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
+  write_register_bytes (REGISTER_BYTE (lo.reg),
+			raw_buffer,
+			REGISTER_RAW_SIZE (lo.reg));
+
+  if (hi.len > 0)
+    {
+      memset (raw_buffer, 0, sizeof (raw_buffer));
+      memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
+      write_register_bytes (REGISTER_BYTE (hi.reg),
+			    raw_buffer,
+			    REGISTER_RAW_SIZE (hi.reg));
+    }
+}
+
+/* O32 ABI stuff.  */
+
+static void
+mips_o32_xfer_return_value (struct type *type,
+			    struct regcache *regcache,
+			    bfd_byte *in, const bfd_byte *out)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  if (TYPE_CODE (type) == TYPE_CODE_FLT
+      && TYPE_LENGTH (type) == 4
+      && tdep->mips_fpu_type != MIPS_FPU_NONE)
+    {
+      /* A single-precision floating-point value.  It fits in the
+         least significant part of FP0.  */
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
+      mips_xfer_register (regcache, FP0_REGNUM, TYPE_LENGTH (type),
+			  TARGET_BYTE_ORDER, in, out, 0);
+    }
+  else if (TYPE_CODE (type) == TYPE_CODE_FLT
+	   && TYPE_LENGTH (type) == 8
+	   && tdep->mips_fpu_type != MIPS_FPU_NONE)
+    {
+      /* A double-precision floating-point value.  It fits in the
+         least significant part of FP0/FP1 but with byte ordering
+         based on the target (???).  */
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stderr, "Return float in $fp0/$fp1\n");
+      switch (TARGET_BYTE_ORDER)
+	{
+	case BFD_ENDIAN_LITTLE:
+	  mips_xfer_register (regcache, FP0_REGNUM + 0, 4,
+			      TARGET_BYTE_ORDER, in, out, 0);
+	  mips_xfer_register (regcache, FP0_REGNUM + 1, 4,
+			      TARGET_BYTE_ORDER, in, out, 4);
+	  break;
+	case BFD_ENDIAN_BIG:
+	  mips_xfer_register (regcache, FP0_REGNUM + 1, 4,
+			      TARGET_BYTE_ORDER, in, out, 0);
+	  mips_xfer_register (regcache, FP0_REGNUM + 0, 4,
+			      TARGET_BYTE_ORDER, in, out, 4);
+	  break;
+	default:
+	  internal_error (__FILE__, __LINE__, "bad switch");
+	}
+    }
+#if 0
+  else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	   && TYPE_NFIELDS (type) <= 2
+	   && TYPE_NFIELDS (type) >= 1
+	   && ((TYPE_NFIELDS (type) == 1
+		&& (TYPE_CODE (TYPE_FIELD_TYPE (type, 0))
+		    == TYPE_CODE_FLT))
+	       || (TYPE_NFIELDS (type) == 2
+		   && (TYPE_CODE (TYPE_FIELD_TYPE (type, 0))
+		       == TYPE_CODE_FLT)
+		   && (TYPE_CODE (TYPE_FIELD_TYPE (type, 1))
+		       == TYPE_CODE_FLT)))
+	   && tdep->mips_fpu_type != MIPS_FPU_NONE)
+    {
+      /* A struct that contains one or two floats.  Each value is part
+         in the least significant part of their floating point
+         register..  */
+      bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
+      int regnum;
+      int field;
+      for (field = 0, regnum = FP0_REGNUM;
+	   field < TYPE_NFIELDS (type);
+	   field++, regnum += 2)
+	{
+	  int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
+			/ TARGET_CHAR_BIT);
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
+	  mips_xfer_register (regcache, regnum, TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
+			      TARGET_BYTE_ORDER, in, out, offset);
+	}
+    }
+#endif
+#if 0
+  else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	   || TYPE_CODE (type) == TYPE_CODE_UNION)
+    {
+      /* A structure or union.  Extract the left justified value,
+         regardless of the byte order.  I.e. DO NOT USE
+         mips_xfer_lower.  */
+      int offset;
+      int regnum;
+      for (offset = 0, regnum = V0_REGNUM;
+	   offset < TYPE_LENGTH (type);
+	   offset += REGISTER_RAW_SIZE (regnum), regnum++)
+	{
+	  int xfer = REGISTER_RAW_SIZE (regnum);
+	  if (offset + xfer > TYPE_LENGTH (type))
+	    xfer = TYPE_LENGTH (type) - offset;
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
+				offset, xfer, regnum);
+	  mips_xfer_register (regcache, regnum, xfer, BFD_ENDIAN_UNKNOWN,
+			      in, out, offset);
+	}
+    }
+#endif
+  else
+    {
+      /* A scalar extract each part but least-significant-byte
+         justified.  o32 thinks registers are 4 byte, regardless of
+         the ISA.  mips_stack_argsize controls this.  */
+      int offset;
+      int regnum;
+      for (offset = 0, regnum = V0_REGNUM;
+	   offset < TYPE_LENGTH (type);
+	   offset += mips_stack_argsize (), regnum++)
+	{
+	  int xfer = mips_stack_argsize ();
+	  int pos = 0;
+	  if (offset + xfer > TYPE_LENGTH (type))
+	    xfer = TYPE_LENGTH (type) - offset;
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
+				offset, xfer, regnum);
+	  mips_xfer_register (regcache, regnum, xfer, TARGET_BYTE_ORDER,
+			      in, out, offset);
+	}
+    }
+}
+
+static void
+mips_o32_extract_return_value (struct type *type,
+			       struct regcache *regcache,
+			       void *valbuf)
+{
+  mips_o32_xfer_return_value (type, regcache, valbuf, NULL); 
+}
+
+static void
+mips_o32_store_return_value (struct type *type, char *valbuf)
+{
+  mips_o32_xfer_return_value (type, current_regcache, NULL, valbuf); 
+}
+
+/* N32/N44 ABI stuff.  */
+
+static void
+mips_n32n64_xfer_return_value (struct type *type,
+			       struct regcache *regcache,
+			       bfd_byte *in, const bfd_byte *out)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  if (TYPE_CODE (type) == TYPE_CODE_FLT
+      && tdep->mips_fpu_type != MIPS_FPU_NONE)
+    {
+      /* A floating-point value belongs in the least significant part
+         of FP0.  */
+      if (mips_debug)
+	fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
+      mips_xfer_register (regcache, FP0_REGNUM, TYPE_LENGTH (type),
+			  TARGET_BYTE_ORDER, in, out, 0);
+    }
+  else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	   && TYPE_NFIELDS (type) <= 2
+	   && TYPE_NFIELDS (type) >= 1
+	   && ((TYPE_NFIELDS (type) == 1
+		&& (TYPE_CODE (TYPE_FIELD_TYPE (type, 0))
+		    == TYPE_CODE_FLT))
+	       || (TYPE_NFIELDS (type) == 2
+		   && (TYPE_CODE (TYPE_FIELD_TYPE (type, 0))
+		       == TYPE_CODE_FLT)
+		   && (TYPE_CODE (TYPE_FIELD_TYPE (type, 1))
+		       == TYPE_CODE_FLT)))
+	   && tdep->mips_fpu_type != MIPS_FPU_NONE)
+    {
+      /* A struct that contains one or two floats.  Each value is part
+         in the least significant part of their floating point
+         register..  */
+      bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
+      int regnum;
+      int field;
+      for (field = 0, regnum = FP0_REGNUM;
+	   field < TYPE_NFIELDS (type);
+	   field++, regnum += 2)
+	{
+	  int offset = (FIELD_BITPOS (TYPE_FIELDS (type)[field])
+			/ TARGET_CHAR_BIT);
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
+	  mips_xfer_register (regcache, regnum, TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
+			      TARGET_BYTE_ORDER, in, out, offset);
+	}
+    }
+  else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+	   || TYPE_CODE (type) == TYPE_CODE_UNION)
+    {
+      /* A structure or union.  Extract the left justified value,
+         regardless of the byte order.  I.e. DO NOT USE
+         mips_xfer_lower.  */
+      int offset;
+      int regnum;
+      for (offset = 0, regnum = V0_REGNUM;
+	   offset < TYPE_LENGTH (type);
+	   offset += REGISTER_RAW_SIZE (regnum), regnum++)
+	{
+	  int xfer = REGISTER_RAW_SIZE (regnum);
+	  if (offset + xfer > TYPE_LENGTH (type))
+	    xfer = TYPE_LENGTH (type) - offset;
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
+				offset, xfer, regnum);
+	  mips_xfer_register (regcache, regnum, xfer, BFD_ENDIAN_UNKNOWN,
+			      in, out, offset);
+	}
+    }
+  else
+    {
+      /* A scalar extract each part but least-significant-byte
+         justified.  */
+      int offset;
+      int regnum;
+      for (offset = 0, regnum = V0_REGNUM;
+	   offset < TYPE_LENGTH (type);
+	   offset += REGISTER_RAW_SIZE (regnum), regnum++)
+	{
+	  int xfer = REGISTER_RAW_SIZE (regnum);
+	  int pos = 0;
+	  if (offset + xfer > TYPE_LENGTH (type))
+	    xfer = TYPE_LENGTH (type) - offset;
+	  if (mips_debug)
+	    fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
+				offset, xfer, regnum);
+	  mips_xfer_register (regcache, regnum, xfer, TARGET_BYTE_ORDER,
+			      in, out, offset);
+	}
+    }
+}
+
+static void
+mips_n32n64_extract_return_value (struct type *type,
+				  struct regcache *regcache,
+				  void *valbuf)
+{
+  mips_n32n64_xfer_return_value (type, regcache, valbuf, NULL);
+}
+
+static void
+mips_n32n64_store_return_value (struct type *type, char *valbuf)
+{
+  mips_n32n64_xfer_return_value (type, current_regcache, NULL, valbuf);
+}
+
+static void
+mips_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+  /* Nothing to do -- push_arguments does all the work.  */
+}
+
+static CORE_ADDR
+mips_extract_struct_value_address (struct regcache *ignore)
+{
+  /* FIXME: This will only work at random.  The caller passes the
+     struct_return address in V0, but it is not preserved.  It may
+     still be there, or this may be a random value.  */
+  return read_register (V0_REGNUM);
+}
+
 /* Exported procedure: Is PC in the signal trampoline code */
 
-int
-in_sigtramp (CORE_ADDR pc, char *ignore)
+static int
+mips_pc_in_sigtramp (CORE_ADDR pc, char *ignore)
 {
   if (sigtramp_address == 0)
     fixup_sigtramp ();
@@ -3567,10 +4981,7 @@
 {
   mips_fpu_type = MIPS_FPU_SINGLE;
   mips_fpu_type_auto = 0;
-  if (GDB_MULTI_ARCH)
-    {
-      gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_SINGLE;
-    }
+  gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_SINGLE;
 }
 
 static void
@@ -3578,10 +4989,7 @@
 {
   mips_fpu_type = MIPS_FPU_DOUBLE;
   mips_fpu_type_auto = 0;
-  if (GDB_MULTI_ARCH)
-    {
-      gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_DOUBLE;
-    }
+  gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_DOUBLE;
 }
 
 static void
@@ -3589,10 +4997,7 @@
 {
   mips_fpu_type = MIPS_FPU_NONE;
   mips_fpu_type_auto = 0;
-  if (GDB_MULTI_ARCH)
-    {
-      gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_NONE;
-    }
+  gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_NONE;
 }
 
 static void
@@ -3635,7 +5040,7 @@
 
 /* Modify the actual processor type. */
 
-int
+static int
 mips_set_processor_type (char *str)
 {
   int i;
@@ -3737,7 +5142,7 @@
    (if necessary) to point to the actual memory location where the
    breakpoint should be inserted.  */
 
-const unsigned char *
+static const unsigned char *
 mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
 {
   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
@@ -3819,7 +5224,7 @@
    This function implements the SKIP_TRAMPOLINE_CODE macro.
  */
 
-CORE_ADDR
+static CORE_ADDR
 mips_skip_stub (CORE_ADDR pc)
 {
   char *name;
@@ -3902,7 +5307,7 @@
 /* Return non-zero if the PC is inside a call thunk (aka stub or trampoline).
    This implements the IN_SOLIB_CALL_TRAMPOLINE macro.  */
 
-int
+static int
 mips_in_call_stub (CORE_ADDR pc, char *name)
 {
   CORE_ADDR start_addr;
@@ -3930,7 +5335,7 @@
 /* Return non-zero if the PC is inside a return thunk (aka stub or trampoline).
    This implements the IN_SOLIB_RETURN_TRAMPOLINE macro.  */
 
-int
+static int
 mips_in_return_stub (CORE_ADDR pc, char *name)
 {
   CORE_ADDR start_addr;
@@ -3980,7 +5385,7 @@
    point (e.g. programs in ROM) should define a symbol __CALL_DUMMY_ADDRESS
    whose address is the location where the breakpoint should be placed.  */
 
-CORE_ADDR
+static CORE_ADDR
 mips_call_dummy_address (void)
 {
   struct minimal_symbol *sym;
@@ -4126,6 +5531,47 @@
 				 TYPE_LENGTH (builtin_type_void_data_ptr));
 }
 
+static void
+mips_find_abi_section (bfd *abfd, asection *sect, void *obj)
+{
+  enum mips_abi *abip = (enum mips_abi *) obj;
+  const char *name = bfd_get_section_name (abfd, sect);
+
+  if (*abip != MIPS_ABI_UNKNOWN)
+    return;
+
+  if (strncmp (name, ".mdebug.", 8) != 0)
+    return;
+
+  if (strcmp (name, ".mdebug.abi32") == 0)
+    *abip = MIPS_ABI_O32;
+  else if (strcmp (name, ".mdebug.abiN32") == 0)
+    *abip = MIPS_ABI_N32;
+  else if (strcmp (name, ".mdebug.abiN64") == 0)
+    *abip = MIPS_ABI_N64;
+  else if (strcmp (name, ".mdebug.abiO64") == 0)
+    *abip = MIPS_ABI_O64;
+  else if (strcmp (name, ".mdebug.eabi32") == 0)
+    *abip = MIPS_ABI_EABI32;
+  else if (strcmp (name, ".mdebug.eabi64") == 0)
+    *abip = MIPS_ABI_EABI64;
+  else
+    warning ("unsupported ABI %s.", name + 8);
+}
+
+static enum mips_abi
+global_mips_abi (void)
+{
+  int i;
+
+  for (i = 0; mips_abi_strings[i] != NULL; i++)
+    if (mips_abi_strings[i] == mips_abi_string)
+      return (enum mips_abi) i;
+
+  internal_error (__FILE__, __LINE__,
+		  "unknown ABI string");
+}
+
 static struct gdbarch *
 mips_gdbarch_init (struct gdbarch_info info,
 		   struct gdbarch_list *arches)
@@ -4135,7 +5581,7 @@
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
   int elf_flags;
-  enum mips_abi mips_abi;
+  enum mips_abi mips_abi, found_abi, wanted_abi;
   enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   /* Reset the disassembly info, in case it was set to something
@@ -4157,7 +5603,7 @@
       osabi = gdbarch_lookup_osabi (info.abfd);
     }
 
-  /* Check ELF_FLAGS to see if it specifies the ABI being used. */
+  /* Check ELF_FLAGS to see if it specifies the ABI being used.  */
   switch ((elf_flags & EF_MIPS_ABI))
     {
     case E_MIPS_ABI_O32:
@@ -4180,7 +5626,16 @@
       break;
     }
 
-  /* Try the architecture for any hint of the corect ABI */
+  /* GCC creates a pseudo-section whose name describes the ABI.  */
+  if (mips_abi == MIPS_ABI_UNKNOWN && info.abfd != NULL)
+    bfd_map_over_sections (info.abfd, mips_find_abi_section, &mips_abi);
+
+  /* If we have no bfd, then mips_abi will still be MIPS_ABI_UNKNOWN.
+     Use the ABI from the last architecture if there is one.  */
+  if (info.abfd == NULL && arches != NULL)
+    mips_abi = gdbarch_tdep (arches->gdbarch)->found_abi;
+
+  /* Try the architecture for any hint of the correct ABI.  */
   if (mips_abi == MIPS_ABI_UNKNOWN
       && info.bfd_arch_info != NULL
       && info.bfd_arch_info->arch == bfd_arch_mips)
@@ -4196,14 +5651,27 @@
 	  break;
 	case bfd_mach_mips8000:
 	case bfd_mach_mips10000:
-	  mips_abi = MIPS_ABI_N32;
+	  /* On Irix, ELF64 executables use the N64 ABI.  The
+	     pseudo-sections which describe the ABI aren't present
+	     on IRIX.  (Even for executables created by gcc.)  */
+	  if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
+	      && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
+	    mips_abi = MIPS_ABI_N64;
+	  else
+	    mips_abi = MIPS_ABI_N32;
 	  break;
 	}
     }
-#ifdef MIPS_DEFAULT_ABI
+
   if (mips_abi == MIPS_ABI_UNKNOWN)
-    mips_abi = MIPS_DEFAULT_ABI;
-#endif
+    mips_abi = MIPS_ABI_O32;
+
+  /* Now that we have found what the ABI for this binary would be,
+     check whether the user is overriding it.  */
+  found_abi = mips_abi;
+  wanted_abi = global_mips_abi ();
+  if (wanted_abi != MIPS_ABI_UNKNOWN)
+    mips_abi = wanted_abi;
 
   if (gdbarch_debug)
     {
@@ -4213,6 +5681,9 @@
       fprintf_unfiltered (gdb_stdlog,
 			  "mips_gdbarch_init: mips_abi = %d\n",
 			  mips_abi);
+      fprintf_unfiltered (gdb_stdlog,
+			  "mips_gdbarch_init: found_mips_abi = %d\n",
+			  found_abi);
     }
 
   /* try to find a pre-existing architecture */
@@ -4221,7 +5692,7 @@
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
     {
       /* MIPS needs to be pedantic about which ABI the object is
-         using. */
+         using.  */
       if (gdbarch_tdep (arches->gdbarch)->elf_flags != elf_flags)
 	continue;
       if (gdbarch_tdep (arches->gdbarch)->mips_abi != mips_abi)
@@ -4230,88 +5701,115 @@
         return arches->gdbarch;
     }
 
-  /* Need a new architecture. Fill in a target specific vector. */
+  /* Need a new architecture.  Fill in a target specific vector.  */
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
   tdep->osabi = osabi;
 
-  /* Initially set everything according to the default ABI/ISA. */
+  /* Initially set everything according to the default ABI/ISA.  */
   set_gdbarch_short_bit (gdbarch, 16);
   set_gdbarch_int_bit (gdbarch, 32);
   set_gdbarch_float_bit (gdbarch, 32);
   set_gdbarch_double_bit (gdbarch, 64);
   set_gdbarch_long_double_bit (gdbarch, 64);
   set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
+  set_gdbarch_max_register_raw_size (gdbarch, 8);
+  set_gdbarch_max_register_virtual_size (gdbarch, 8);
+  tdep->found_abi = found_abi;
   tdep->mips_abi = mips_abi;
 
+  set_gdbarch_elf_make_msymbol_special (gdbarch, 
+					mips_elf_make_msymbol_special);
+
   switch (mips_abi)
     {
     case MIPS_ABI_O32:
-      tdep->mips_abi_string = "o32";
+      set_gdbarch_push_arguments (gdbarch, mips_o32_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_o32_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, mips_o32_extract_return_value);
       tdep->mips_default_saved_regsize = 4;
       tdep->mips_default_stack_argsize = 4;
       tdep->mips_fp_register_double = 0;
       tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 4 - 1;
-      tdep->mips_regs_have_home_p = 1;
       tdep->gdb_target_is_mips64 = 0;
       tdep->default_mask_address_p = 0;
       set_gdbarch_long_bit (gdbarch, 32);
       set_gdbarch_ptr_bit (gdbarch, 32);
       set_gdbarch_long_long_bit (gdbarch, 64);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_o32_reg_struct_has_addr);
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_o32_use_struct_convention);
       break;
     case MIPS_ABI_O64:
-      tdep->mips_abi_string = "o64";
+      set_gdbarch_push_arguments (gdbarch, mips_o64_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_o64_store_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, mips_o64_extract_return_value);
       tdep->mips_default_saved_regsize = 8;
       tdep->mips_default_stack_argsize = 8;
       tdep->mips_fp_register_double = 1;
       tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 4 - 1;
-      tdep->mips_regs_have_home_p = 1;
       tdep->gdb_target_is_mips64 = 1;
       tdep->default_mask_address_p = 0;
       set_gdbarch_long_bit (gdbarch, 32);
       set_gdbarch_ptr_bit (gdbarch, 32);
       set_gdbarch_long_long_bit (gdbarch, 64);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_o32_reg_struct_has_addr);
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_o32_use_struct_convention);
       break;
     case MIPS_ABI_EABI32:
-      tdep->mips_abi_string = "eabi32";
+      set_gdbarch_push_arguments (gdbarch, mips_eabi_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
       tdep->mips_default_saved_regsize = 4;
       tdep->mips_default_stack_argsize = 4;
       tdep->mips_fp_register_double = 0;
       tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
-      tdep->mips_regs_have_home_p = 0;
       tdep->gdb_target_is_mips64 = 0;
       tdep->default_mask_address_p = 0;
       set_gdbarch_long_bit (gdbarch, 32);
       set_gdbarch_ptr_bit (gdbarch, 32);
       set_gdbarch_long_long_bit (gdbarch, 64);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_eabi_reg_struct_has_addr);
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_eabi_use_struct_convention);
       break;
     case MIPS_ABI_EABI64:
-      tdep->mips_abi_string = "eabi64";
+      set_gdbarch_push_arguments (gdbarch, mips_eabi_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
       tdep->mips_default_saved_regsize = 8;
       tdep->mips_default_stack_argsize = 8;
       tdep->mips_fp_register_double = 1;
       tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
-      tdep->mips_regs_have_home_p = 0;
       tdep->gdb_target_is_mips64 = 1;
       tdep->default_mask_address_p = 0;
       set_gdbarch_long_bit (gdbarch, 64);
       set_gdbarch_ptr_bit (gdbarch, 64);
       set_gdbarch_long_long_bit (gdbarch, 64);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_eabi_reg_struct_has_addr);
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_eabi_use_struct_convention);
       break;
     case MIPS_ABI_N32:
-      tdep->mips_abi_string = "n32";
-      tdep->mips_default_saved_regsize = 4;
+      set_gdbarch_push_arguments (gdbarch, mips_n32n64_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
+      tdep->mips_default_saved_regsize = 8;
       tdep->mips_default_stack_argsize = 8;
       tdep->mips_fp_register_double = 1;
       tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
-      tdep->mips_regs_have_home_p = 0;
-      tdep->gdb_target_is_mips64 = 0;
+      tdep->gdb_target_is_mips64 = 1;
       tdep->default_mask_address_p = 0;
       set_gdbarch_long_bit (gdbarch, 32);
       set_gdbarch_ptr_bit (gdbarch, 32);
@@ -4327,21 +5825,46 @@
 	tm_print_insn_info.mach = info.bfd_arch_info->mach;
       else
 	tm_print_insn_info.mach = bfd_mach_mips8000;
+
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_n32n64_use_struct_convention);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_n32n64_reg_struct_has_addr);
       break;
-    default:
-      tdep->mips_abi_string = "default";
-      tdep->mips_default_saved_regsize = MIPS_REGSIZE;
-      tdep->mips_default_stack_argsize = MIPS_REGSIZE;
-      tdep->mips_fp_register_double = (REGISTER_VIRTUAL_SIZE (FP0_REGNUM) == 8);
+    case MIPS_ABI_N64:
+      set_gdbarch_push_arguments (gdbarch, mips_n32n64_push_arguments);
+      set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
+      tdep->mips_default_saved_regsize = 8;
+      tdep->mips_default_stack_argsize = 8;
+      tdep->mips_fp_register_double = 1;
       tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
       tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
-      tdep->mips_regs_have_home_p = 1;
-      tdep->gdb_target_is_mips64 = 0;
+      tdep->gdb_target_is_mips64 = 1;
       tdep->default_mask_address_p = 0;
-      set_gdbarch_long_bit (gdbarch, 32);
-      set_gdbarch_ptr_bit (gdbarch, 32);
+      set_gdbarch_long_bit (gdbarch, 64);
+      set_gdbarch_ptr_bit (gdbarch, 64);
       set_gdbarch_long_long_bit (gdbarch, 64);
+
+      /* Set up the disassembler info, so that we get the right
+	 register names from libopcodes.  */
+      tm_print_insn_info.flavour = bfd_target_elf_flavour;
+      tm_print_insn_info.arch = bfd_arch_mips;
+      if (info.bfd_arch_info != NULL
+	  && info.bfd_arch_info->arch == bfd_arch_mips
+	  && info.bfd_arch_info->mach)
+	tm_print_insn_info.mach = info.bfd_arch_info->mach;
+      else
+	tm_print_insn_info.mach = bfd_mach_mips8000;
+
+      set_gdbarch_use_struct_convention (gdbarch, 
+					 mips_n32n64_use_struct_convention);
+      set_gdbarch_reg_struct_has_addr (gdbarch, 
+				       mips_n32n64_reg_struct_has_addr);
       break;
+    default:
+      internal_error (__FILE__, __LINE__,
+		      "unknown ABI in switch");
     }
 
   /* FIXME: jlarmour/2000-04-07: There *is* a flag EF_MIPS_32BIT_MODE
@@ -4350,7 +5873,7 @@
 
      ``We deliberately don't allow "-gp32" to set the MIPS_32BITMODE
      flag in object files because to do so would make it impossible to
-     link with libraries compiled without "-gp32". This is
+     link with libraries compiled without "-gp32".  This is
      unnecessarily restrictive.
 
      We could solve this problem by adding "-gp32" multilibs to gcc,
@@ -4360,10 +5883,10 @@
      But even more unhelpfully, the default linker output target for
      mips64-elf is elf32-bigmips, and has EF_MIPS_32BIT_MODE set, even
      for 64-bit programs - you need to change the ABI to change this,
-     and not all gcc targets support that currently. Therefore using
+     and not all gcc targets support that currently.  Therefore using
      this flag to detect 32-bit mode would do the wrong thing given
      the current gcc - it would make GDB treat these 64-bit programs
-     as 32-bit programs by default. */
+     as 32-bit programs by default.  */
 
   /* enable/disable the MIPS FPU */
   if (!mips_fpu_type_auto)
@@ -4390,16 +5913,19 @@
   /* MIPS version of register names.  NOTE: At present the MIPS
      register name management is part way between the old -
      #undef/#define REGISTER_NAMES and the new REGISTER_NAME(nr).
-     Further work on it is required. */
+     Further work on it is required.  */
+  /* NOTE: many targets (esp. embedded) do not go thru the
+     gdbarch_register_name vector at all, instead bypassing it
+     by defining REGISTER_NAMES.  */
   set_gdbarch_register_name (gdbarch, mips_register_name);
   set_gdbarch_read_pc (gdbarch, mips_read_pc);
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
   set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
-  set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
+  set_gdbarch_read_sp (gdbarch, mips_read_sp);
   set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
 
-  /* Add/remove bits from an address. The MIPS needs be careful to
-     ensure that all 32 bit addresses are sign extended to 64 bits. */
+  /* Add/remove bits from an address.  The MIPS needs be careful to
+     ensure that all 32 bit addresses are sign extended to 64 bits.  */
   set_gdbarch_addr_bits_remove (gdbarch, mips_addr_bits_remove);
 
   /* There's a mess in stack frame creation.  See comments in
@@ -4407,12 +5933,13 @@
   set_gdbarch_init_frame_pc_first (gdbarch, mips_init_frame_pc_first);
   set_gdbarch_init_frame_pc (gdbarch, init_frame_pc_noop);
 
-  /* Map debug register numbers onto internal register numbers. */
+  /* Map debug register numbers onto internal register numbers.  */
   set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum);
   set_gdbarch_ecoff_reg_to_regnum (gdbarch, mips_ecoff_reg_to_regnum);
 
   /* Initialize a frame */
   set_gdbarch_init_extra_frame_info (gdbarch, mips_init_extra_frame_info);
+  set_gdbarch_frame_init_saved_regs (gdbarch, mips_frame_init_saved_regs);
 
   /* MIPS version of CALL_DUMMY */
 
@@ -4421,19 +5948,36 @@
   set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
   set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
   set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
+  set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
+  set_gdbarch_push_dummy_frame (gdbarch, mips_push_dummy_frame);
+  set_gdbarch_pop_frame (gdbarch, mips_pop_frame);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_length (gdbarch, 0);
+  set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy);
   set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
   set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
   set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
-  set_gdbarch_push_arguments (gdbarch, mips_push_arguments);
-  set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
+  set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
+  set_gdbarch_register_convert_to_virtual (gdbarch, 
+					   mips_register_convert_to_virtual);
+  set_gdbarch_register_convert_to_raw (gdbarch, 
+				       mips_register_convert_to_raw);
+
   set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
 
+  set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
   set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
+  set_gdbarch_frameless_function_invocation (gdbarch, 
+					     generic_frameless_function_invocation_not);
+  set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
+  set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+  set_gdbarch_frame_args_skip (gdbarch, 0);
+
   set_gdbarch_get_saved_register (gdbarch, mips_get_saved_register);
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
@@ -4447,13 +5991,44 @@
   set_gdbarch_address_to_pointer (gdbarch, address_to_signed_pointer);
   set_gdbarch_integer_to_address (gdbarch, mips_integer_to_address);
 
+  set_gdbarch_function_start_offset (gdbarch, 0);
+
+  /* There are MIPS targets which do not yet use this since they still
+     define REGISTER_VIRTUAL_TYPE.  */
+  set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
+  set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+
+  set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info);
+  set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
+
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch, osabi);
 
+  set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
+  set_gdbarch_extract_struct_value_address (gdbarch, 
+					    mips_extract_struct_value_address);
+  
+  set_gdbarch_skip_trampoline_code (gdbarch, mips_skip_stub);
+
+  set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
+  set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+
   return gdbarch;
 }
 
 static void
+mips_abi_update (char *ignore_args, int from_tty, 
+		 struct cmd_list_element *c)
+{
+  struct gdbarch_info info;
+
+  /* Force the architecture to update, and (if it's a MIPS architecture)
+     mips_gdbarch_init will take care of the rest.  */
+  gdbarch_info_init (&info);
+  gdbarch_update_p (info);
+}
+
+static void
 mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -4494,7 +6069,7 @@
       fprintf_unfiltered (file,
 			  "mips_dump_tdep: tdep->mips_abi = %d (%s)\n",
 			  tdep->mips_abi,
-			  tdep->mips_abi_string);
+			  mips_abi_strings[tdep->mips_abi]);
       fprintf_unfiltered (file,
 			  "mips_dump_tdep: mips_mask_address_p() %d (default %d)\n",
 			  mips_mask_address_p (),
@@ -4531,9 +6106,6 @@
 		      "mips_dump_tdep: FP_REGISTER_DOUBLE = %d\n",
 		      FP_REGISTER_DOUBLE);
   fprintf_unfiltered (file,
-		      "mips_dump_tdep: MIPS_REGS_HAVE_HOME_P = %d\n",
-		      MIPS_REGS_HAVE_HOME_P);
-  fprintf_unfiltered (file,
 		      "mips_dump_tdep: MIPS_DEFAULT_STACK_ARGSIZE = %d\n",
 		      MIPS_DEFAULT_STACK_ARGSIZE);
   fprintf_unfiltered (file,
@@ -4563,9 +6135,6 @@
 		      "mips_dump_tdep: CPLUS_MARKER = %c\n",
 		      CPLUS_MARKER);
   fprintf_unfiltered (file,
-		      "mips_dump_tdep: DEFAULT_MIPS_TYPE = %s\n",
-		      DEFAULT_MIPS_TYPE);
-  fprintf_unfiltered (file,
 		      "mips_dump_tdep: DO_REGISTERS_INFO # %s\n",
 		      XSTRING (DO_REGISTERS_INFO));
   fprintf_unfiltered (file,
@@ -4575,9 +6144,6 @@
 		      "mips_dump_tdep: ECOFF_REG_TO_REGNUM # %s\n",
 		      XSTRING (ECOFF_REG_TO_REGNUM (REGNUM)));
   fprintf_unfiltered (file,
-		      "mips_dump_tdep: ELF_MAKE_MSYMBOL_SPECIAL # %s\n",
-		      XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (SYM, MSYM)));
-  fprintf_unfiltered (file,
 		      "mips_dump_tdep: FCRCS_REGNUM = %d\n",
 		      FCRCS_REGNUM);
   fprintf_unfiltered (file,
@@ -4674,11 +6240,6 @@
 		      "mips_dump_tdep: MIPS_SAVED_REGSIZE = %d\n",
 		      MIPS_SAVED_REGSIZE);
   fprintf_unfiltered (file,
-		      "mips_dump_tdep: MSYMBOL_IS_SPECIAL = function?\n");
-  fprintf_unfiltered (file,
-		      "mips_dump_tdep: MSYMBOL_SIZE # %s\n",
-		      XSTRING (MSYMBOL_SIZE (MSYM)));
-  fprintf_unfiltered (file,
 		      "mips_dump_tdep: OP_LDFPR = used?\n");
   fprintf_unfiltered (file,
 		      "mips_dump_tdep: OP_LDGPR = used?\n");
@@ -4870,6 +6431,11 @@
   static struct cmd_list_element *mipsfpulist = NULL;
   struct cmd_list_element *c;
 
+  mips_abi_string = mips_abi_strings [MIPS_ABI_UNKNOWN];
+  if (MIPS_ABI_LAST + 1
+      != sizeof (mips_abi_strings) / sizeof (mips_abi_strings[0]))
+    internal_error (__FILE__, __LINE__, "mips_abi_strings out of sync");
+
   gdbarch_register (bfd_arch_mips, mips_gdbarch_init, mips_dump_tdep);
   if (!tm_print_insn)		/* Someone may have already set it */
     tm_print_insn = gdb_print_insn_mips;
@@ -4912,6 +6478,22 @@
 				       &setmipscmdlist),
 		     &showmipscmdlist);
 
+  /* Allow the user to override the ABI. */
+  c = add_set_enum_cmd
+    ("abi", class_obscure, mips_abi_strings, &mips_abi_string,
+     "Set the ABI used by this program.\n"
+     "This option can be set to one of:\n"
+     "  auto  - the default ABI associated with the current binary\n"
+     "  o32\n"
+     "  o64\n"
+     "  n32\n"
+     "  n64\n"
+     "  eabi32\n"
+     "  eabi64",
+     &setmipscmdlist);
+  add_show_from_set (c, &showmipscmdlist);
+  set_cmd_sfunc (c, mips_abi_update);
+
   /* Let the user turn off floating point and set the fence post for
      heuristic_proc_start.  */
 
@@ -4940,21 +6522,6 @@
 	   "Show current use of MIPS floating-point coprocessor target.",
 	   &showlist);
 
-#if !GDB_MULTI_ARCH
-  c = add_set_cmd ("processor", class_support, var_string_noescape,
-		   (char *) &tmp_mips_processor_type,
-		   "Set the type of MIPS processor in use.\n\
-Set this to be able to access processor-type-specific registers.\n\
-",
-		   &setlist);
-  set_cmd_cfunc (c, mips_set_processor_type_command);
-  c = add_show_from_set (c, &showlist);
-  set_cmd_cfunc (c, mips_show_processor_type_command);
-
-  tmp_mips_processor_type = xstrdup (DEFAULT_MIPS_TYPE);
-  mips_set_processor_type_command (xstrdup (DEFAULT_MIPS_TYPE), 0);
-#endif
-
   /* We really would like to have both "0" and "unlimited" work, but
      command.c doesn't deal with that.  So make it a var_zinteger
      because the user can always use "999999" or some such for unlimited.  */
@@ -4973,13 +6540,13 @@
 
   /* Allow the user to control whether the upper bits of 64-bit
      addresses should be zeroed.  */
-  c = add_set_auto_boolean_cmd ("mask-address", no_class, &mask_address_var,
-				"Set zeroing of upper 32 bits of 64-bit addresses.\n\
-Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to allow GDB to determine\n\
-the correct value.\n",
-				&setmipscmdlist);
-  add_cmd ("mask-address", no_class, show_mask_address,
-	       "Show current mask-address value", &showmipscmdlist);
+  add_setshow_auto_boolean_cmd ("mask-address", no_class, &mask_address_var, "\
+Set zeroing of upper 32 bits of 64-bit addresses.\n\
+Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to \n\
+allow GDB to determine the correct value.\n", "\
+Show zeroing of upper 32 bits of 64-bit addresses.",
+				NULL, show_mask_address,
+				&setmipscmdlist, &showmipscmdlist);
 
   /* Allow the user to control the size of 32 bit registers within the
      raw remote packet.  */
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index 1126d31..a8d7d72 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "obstack.h"
 #include "target.h"
 #include "value.h"
 #include "bfd.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 0a5704b..6e7bada 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -23,7 +23,6 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "obstack.h"
 #include "target.h"
 #include "value.h"
 #include "bfd.h"
@@ -89,7 +88,7 @@
     return regs[reg];
 }
 
-static char *
+static const char *
 mn10300_generic_register_name (int reg)
 {
   static char *regs[] =
@@ -102,7 +101,7 @@
 }
 
 
-static char *
+static const char *
 am33_register_name (int reg)
 {
   static char *regs[] =
@@ -1161,7 +1160,7 @@
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
 
   /* Stack unwinding.  */
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
@@ -1171,10 +1170,10 @@
   set_gdbarch_frame_init_saved_regs (gdbarch, mn10300_frame_init_saved_regs);
   set_gdbarch_frame_chain (gdbarch, mn10300_frame_chain);
   set_gdbarch_frame_saved_pc (gdbarch, mn10300_frame_saved_pc);
-  set_gdbarch_extract_return_value (gdbarch, mn10300_extract_return_value);
-  set_gdbarch_extract_struct_value_address
+  set_gdbarch_deprecated_extract_return_value (gdbarch, mn10300_extract_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, mn10300_extract_struct_value_address);
-  set_gdbarch_store_return_value (gdbarch, mn10300_store_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, mn10300_store_return_value);
   set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return);
   set_gdbarch_pop_frame (gdbarch, mn10300_pop_frame);
   set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
diff --git a/gdb/mon960-rom.c b/gdb/mon960-rom.c
index 2b7fe5f..46f5784 100644
--- a/gdb/mon960-rom.c
+++ b/gdb/mon960-rom.c
@@ -30,6 +30,7 @@
 #include "symtab.h"
 #include "symfile.h"		/* for generic_load */
 #include "inferior.h"		/* for write_pc() */
+#include "gdb_string.h"
 
 #define USE_GENERIC_LOAD
 
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 81340d4..559c0a2 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -1174,7 +1174,7 @@
 static void
 monitor_fetch_register (int regno)
 {
-  char *name;
+  const char *name;
   char *zerobuf;
   char *regbuf;
   int i;
@@ -1183,7 +1183,10 @@
   zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
   memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
 
-  name = current_monitor->regnames[regno];
+  if (current_monitor->regname != NULL)
+    name = current_monitor->regname (regno);
+  else
+    name = current_monitor->regnames[regno];
   monitor_debug ("MON fetchreg %d '%s'\n", regno, name ? name : "(null name)");
 
   if (!name || (*name == '\0'))
@@ -1333,10 +1336,14 @@
 static void
 monitor_store_register (int regno)
 {
-  char *name;
+  const char *name;
   ULONGEST val;
-
-  name = current_monitor->regnames[regno];
+  
+  if (current_monitor->regname != NULL)
+    name = current_monitor->regname (regno);
+  else
+    name = current_monitor->regnames[regno];
+  
   if (!name || (*name == '\0'))
     {
       monitor_debug ("MON Cannot store unknown register\n");
diff --git a/gdb/monitor.h b/gdb/monitor.h
index 85a44ff..5d6138c 100644
--- a/gdb/monitor.h
+++ b/gdb/monitor.h
@@ -116,6 +116,9 @@
     struct target_ops *target;	/* target operations */
     int stopbits;		/* number of stop bits */
     char **regnames;		/* array of register names in ascii */
+                                /* deprecated: use regname instead */
+    const char *(*regname) (int index); 
+                                /* function for dynamic regname array */
     int num_breakpoints;	/* If set_break != NULL, number of supported
 				   breakpoints */
     int magic;			/* Check value */
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 5d4a885..58c2e13 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -36,7 +36,7 @@
 static int ns32k_localcount (CORE_ADDR enter_pc);
 static void flip_bytes (void *, int);
 
-static char *
+static const char *
 ns32k_register_name_32082 (int regno)
 {
   static char *register_names[] =
@@ -55,7 +55,7 @@
   return (register_names[regno]);
 }
 
-static char *
+static const char *
 ns32k_register_name_32382 (int regno)
 {
   static char *register_names[] =
@@ -337,51 +337,6 @@
   return (frame->frame);
 }
 
-static void
-ns32k_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
-                          struct frame_info *frame, int regnum,
-			  enum lval_type *lval)
-{
-  CORE_ADDR addr;
-
-  if (!target_has_registers)
-    error ("No registers.");
-
-  /* Normal systems don't optimize out things with register numbers.  */
-  if (optimized != NULL)
-    *optimized = 0;
-  addr = find_saved_register (frame, regnum);
-  if (addr != 0)
-    {
-      if (lval != NULL)
-	*lval = lval_memory;
-      if (regnum == SP_REGNUM)
-	{
-	  if (raw_buffer != NULL)
-	    {
-	      /* Put it back in target format.  */
-	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			     (LONGEST) addr);
-	    }
-	  if (addrp != NULL)
-	    *addrp = 0;
-	  return;
-	}
-      if (raw_buffer != NULL)
-	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  else
-    {
-      if (lval != NULL)
-	*lval = lval_register;
-      addr = REGISTER_BYTE (regnum);
-      if (raw_buffer != NULL)
-	read_register_gen (regnum, raw_buffer);
-    }
-  if (addrp != NULL)
-    *addrp = addr;
-}
-
 /* Code to initialize the addresses of the saved registers of frame described
    by FRAME_INFO.  This includes special registers such as pc and fp saved in
    special ways in the stack frame.  sp is even more special: the address we
@@ -614,15 +569,13 @@
 
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
-  set_gdbarch_get_saved_register (gdbarch, ns32k_get_saved_register);
-
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Return value info */
   set_gdbarch_store_struct_return (gdbarch, ns32k_store_struct_return);
-  set_gdbarch_extract_return_value (gdbarch, ns32k_extract_return_value);
-  set_gdbarch_store_return_value (gdbarch, ns32k_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch,
+  set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
                                             ns32k_extract_struct_value_address);
 
   /* Call dummy info */
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 32bda87..9c5e49f 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1,6 +1,8 @@
 /* GDB routines for manipulating objfiles.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002 Free Software Foundation, Inc.
+
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -30,11 +32,12 @@
 #include "objfiles.h"
 #include "gdb-stabs.h"
 #include "target.h"
+#include "bcache.h"
 
 #include <sys/types.h>
 #include "gdb_stat.h"
 #include <fcntl.h>
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "gdb_string.h"
 
 #include "breakpoint.h"
@@ -269,10 +272,8 @@
       objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
       memset (objfile, 0, sizeof (struct objfile));
       objfile->md = NULL;
-      obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
-				  xmalloc, xfree);
-      obstack_specify_allocation (&objfile->macro_cache.cache, 0, 0,
-				  xmalloc, xfree);
+      objfile->psymbol_cache = bcache_xmalloc ();
+      objfile->macro_cache = bcache_xmalloc ();
       obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0, xmalloc,
 				  xfree);
       obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
@@ -483,8 +484,8 @@
       if (objfile->static_psymbols.list)
 	xmfree (objfile->md, objfile->static_psymbols.list);
       /* Free the obstacks for non-reusable objfiles */
-      free_bcache (&objfile->psymbol_cache);
-      free_bcache (&objfile->macro_cache);
+      bcache_xfree (objfile->psymbol_cache);
+      bcache_xfree (objfile->macro_cache);
       obstack_free (&objfile->psymbol_obstack, 0);
       obstack_free (&objfile->symbol_obstack, 0);
       obstack_free (&objfile->type_obstack, 0);
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index ed4e6b7..d472efc 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -1,6 +1,7 @@
 /* Definitions for symbol file management in GDB.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +23,11 @@
 #if !defined (OBJFILES_H)
 #define OBJFILES_H
 
+#include "gdb_obstack.h"	/* For obstack internals.  */
+#include "symfile.h"		/* For struct psymbol_allocation_list */
+
+struct bcache;
+
 /* This structure maintains information on a per-objfile basis about the
    "entry point" of the objfile, and the scope within which the entry point
    exists.  It is possible that gdb will see more than one objfile that is
@@ -276,8 +282,8 @@
     /* A byte cache where we can stash arbitrary "chunks" of bytes that
        will not change. */
 
-    struct bcache psymbol_cache;	/* Byte cache for partial syms */
-    struct bcache macro_cache;          /* Byte cache for macros */
+    struct bcache *psymbol_cache;	/* Byte cache for partial syms */
+    struct bcache *macro_cache;          /* Byte cache for macros */
 
     /* Vectors of all partial symbols read in from file.  The actual data
        is stored in the psymbol_obstack. */
@@ -360,7 +366,7 @@
        so that it gets freed automatically when reading a new object
        file. */
 
-    PTR obj_private;
+    void *obj_private;
 
     /* Set of relocation offsets to apply to each section.
        Currently on the psymbol_obstack (which makes no sense, but I'm
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index 498498b..767d684 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -1,1621 +1,1621 @@
-/* Read os9/os9k symbol tables and convert to internal format, for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This module provides three functions: os9k_symfile_init,
-   which initializes to read a symbol file; os9k_new_init, which 
-   discards existing cached information when all symbols are being
-   discarded; and os9k_symfile_read, which reads a symbol table
-   from a file.
-
-   os9k_symfile_read only does the minimum work necessary for letting the
-   user "name" things symbolically; it does not read the entire symtab.
-   Instead, it reads the external and static symbols and puts them in partial
-   symbol tables.  When more extensive information is requested of a
-   file, the corresponding partial symbol table is mutated into a full
-   fledged symbol table by going back and reading the symbols
-   for real.  os9k_psymtab_to_symtab() is the function that does this */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include "gdb_assert.h"
-#include <stdio.h>
-
-#if defined(USG) || defined(__CYGNUSCLIB__)
-#include <sys/types.h>
-#include <fcntl.h>
-#endif
-
-#include "obstack.h"
-#include "gdb_stat.h"
-#include "symtab.h"
-#include "breakpoint.h"
-#include "command.h"
-#include "target.h"
-#include "gdbcore.h"		/* for bfd stuff */
-#include "libaout.h"		/* FIXME Secret internal BFD stuff for a.out */
-#include "symfile.h"
-#include "objfiles.h"
-#include "buildsym.h"
-#include "gdb-stabs.h"
-#include "demangle.h"
-#include "language.h"		/* Needed inside partial-stab.h */
-#include "complaints.h"
-#include "os9k.h"
-#include "stabsread.h"
-
-extern void _initialize_os9kread (void);
-
-/* Each partial symbol table entry contains a pointer to private data for the
-   read_symtab() function to use when expanding a partial symbol table entry
-   to a full symbol table entry.
-
-   For dbxread this structure contains the offset within the file symbol table
-   of first local symbol for this file, and count of the section
-   of the symbol table devoted to this file's symbols (actually, the section
-   bracketed may contain more than just this file's symbols).  It also contains
-   further information needed to locate the symbols if they are in an ELF file.
-
-   If ldsymcnt is 0, the only reason for this thing's existence is the
-   dependency list.  Nothing else will happen when it is read in.  */
-
-#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
-#define LDSYMCNT(p) (((struct symloc *)((p)->read_symtab_private))->ldsymnum)
-
-struct symloc
-  {
-    int ldsymoff;
-    int ldsymnum;
-  };
-
-/* Remember what we deduced to be the source language of this psymtab. */
-static enum language psymtab_language = language_unknown;
-
-/* keep partial symbol table file nested depth */
-static int psymfile_depth = 0;
-
-/* keep symbol table file nested depth */
-static int symfile_depth = 0;
-
-extern int previous_stab_code;
-
-/* Name of last function encountered.  Used in Solaris to approximate
-   object file boundaries.  */
-static char *last_function_name;
-
-/* Complaints about the symbols we have encountered.  */
-extern struct complaint lbrac_complaint;
-
-extern struct complaint unknown_symtype_complaint;
-
-extern struct complaint unknown_symchar_complaint;
-
-extern struct complaint lbrac_rbrac_complaint;
-
-extern struct complaint repeated_header_complaint;
-
-extern struct complaint repeated_header_name_complaint;
-
-#if 0
-static struct complaint lbrac_unmatched_complaint =
-{"unmatched Increment Block Entry before symtab pos %d", 0, 0};
-
-static struct complaint lbrac_mismatch_complaint =
-{"IBE/IDE symbol mismatch at symtab pos %d", 0, 0};
-#endif
-
-/* Local function prototypes */
-
-static void read_minimal_symbols (struct objfile *);
-
-static void os9k_read_ofile_symtab (struct partial_symtab *);
-
-static void os9k_psymtab_to_symtab (struct partial_symtab *);
-
-static void os9k_psymtab_to_symtab_1 (struct partial_symtab *);
-
-static void read_os9k_psymtab (struct objfile *, CORE_ADDR, int);
-
-static int fill_sym (FILE *, bfd *);
-
-static void os9k_symfile_init (struct objfile *);
-
-static void os9k_new_init (struct objfile *);
-
-static void os9k_symfile_read (struct objfile *, int);
-
-static void os9k_symfile_finish (struct objfile *);
-
-static void
-os9k_process_one_symbol (int, int, CORE_ADDR, char *,
-			 struct section_offsets *, struct objfile *);
-
-static struct partial_symtab *os9k_start_psymtab (struct objfile *, char *,
-						  CORE_ADDR, int, int,
-						  struct partial_symbol **,
-						  struct partial_symbol **);
-
-static struct partial_symtab *os9k_end_psymtab (struct partial_symtab *,
-						char **, int, int, CORE_ADDR,
-						struct partial_symtab **,
-						int);
-
-static void record_minimal_symbol (char *, CORE_ADDR, int, struct objfile *);
-
-#define HANDLE_RBRAC(val) \
-  if ((val) > pst->texthigh) pst->texthigh = (val);
-
-#define SWAP_STBHDR(hdrp, abfd) \
-  { \
-    (hdrp)->fmtno = bfd_get_16(abfd, (unsigned char *)&(hdrp)->fmtno); \
-    (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
-    (hdrp)->offset = bfd_get_32(abfd, (unsigned char *)&(hdrp)->offset); \
-    (hdrp)->nsym = bfd_get_32(abfd, (unsigned char *)&(hdrp)->nsym); \
-  }
-#define SWAP_STBSYM(symp, abfd) \
-  { \
-    (symp)->value = bfd_get_32(abfd, (unsigned char *)&(symp)->value); \
-    (symp)->type = bfd_get_16(abfd, (unsigned char *)&(symp)->type); \
-    (symp)->stroff = bfd_get_32(abfd, (unsigned char *)&(symp)->stroff); \
-  }
-#define N_DATA 0
-#define N_BSS 1
-#define N_RDATA 2
-#define N_IDATA 3
-#define N_TEXT 4
-#define N_ABS 6
-
-static void
-record_minimal_symbol (char *name, CORE_ADDR address, int type,
-		       struct objfile *objfile)
-{
-  enum minimal_symbol_type ms_type;
-
-  switch (type)
-    {
-    case N_TEXT:
-      ms_type = mst_text;
-      address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-      break;
-    case N_DATA:
-      ms_type = mst_data;
-      break;
-    case N_BSS:
-      ms_type = mst_bss;
-      break;
-    case N_RDATA:
-      ms_type = mst_bss;
-      break;
-    case N_IDATA:
-      ms_type = mst_data;
-      break;
-    case N_ABS:
-      ms_type = mst_abs;
-      break;
-    default:
-      ms_type = mst_unknown;
-      break;
-    }
-
-  prim_record_minimal_symbol (name, address, ms_type, objfile);
-}
-
-/* read and process .stb file and store in minimal symbol table */
-typedef char mhhdr[80];
-struct stbhdr
-  {
-    mhhdr comhdr;
-    char *name;
-    short fmtno;
-    int crc;
-    int offset;
-    int nsym;
-    char *pad;
-  };
-struct stbsymbol
-  {
-    int value;
-    short type;
-    int stroff;
-  };
-#define STBSYMSIZE 10
-
-static void
-read_minimal_symbols (struct objfile *objfile)
-{
-  FILE *fp;
-  bfd *abfd;
-  struct stbhdr hdr;
-  struct stbsymbol sym;
-  int ch, i, j, off;
-  char buf[64], buf1[128];
-
-  fp = objfile->auxf1;
-  if (fp == NULL)
-    return;
-  abfd = objfile->obfd;
-  fread (&hdr.comhdr[0], sizeof (mhhdr), 1, fp);
-  i = 0;
-  ch = getc (fp);
-  while (ch != -1)
-    {
-      buf[i] = (char) ch;
-      i++;
-      if (ch == 0)
-	break;
-      ch = getc (fp);
-    };
-  if (i % 2)
-    ch = getc (fp);
-  hdr.name = &buf[0];
-
-  fread (&hdr.fmtno, sizeof (hdr.fmtno), 1, fp);
-  fread (&hdr.crc, sizeof (hdr.crc), 1, fp);
-  fread (&hdr.offset, sizeof (hdr.offset), 1, fp);
-  fread (&hdr.nsym, sizeof (hdr.nsym), 1, fp);
-  SWAP_STBHDR (&hdr, abfd);
-
-  /* read symbols */
-  init_minimal_symbol_collection ();
-  off = hdr.offset;
-  for (i = hdr.nsym; i > 0; i--)
-    {
-      fseek (fp, (long) off, 0);
-      fread (&sym.value, sizeof (sym.value), 1, fp);
-      fread (&sym.type, sizeof (sym.type), 1, fp);
-      fread (&sym.stroff, sizeof (sym.stroff), 1, fp);
-      SWAP_STBSYM (&sym, abfd);
-      fseek (fp, (long) sym.stroff, 0);
-      j = 0;
-      ch = getc (fp);
-      while (ch != -1)
-	{
-	  buf1[j] = (char) ch;
-	  j++;
-	  if (ch == 0)
-	    break;
-	  ch = getc (fp);
-	};
-      record_minimal_symbol (buf1, sym.value, sym.type & 7, objfile);
-      off += STBSYMSIZE;
-    };
-  install_minimal_symbols (objfile);
-  return;
-}
-
-/* Scan and build partial symbols for a symbol file.
-   We have been initialized by a call to os9k_symfile_init, which 
-   put all the relevant info into a "struct os9k_symfile_info",
-   hung off the objfile structure.
-
-   MAINLINE is true if we are reading the main symbol
-   table (as opposed to a shared lib or dynamically loaded file).  */
-
-static void
-os9k_symfile_read (struct objfile *objfile, int mainline)
-{
-  bfd *sym_bfd;
-  struct cleanup *back_to;
-
-  sym_bfd = objfile->obfd;
-  /* If we are reinitializing, or if we have never loaded syms yet, init */
-  if (mainline
-      || (objfile->global_psymbols.size == 0
-	  && objfile->static_psymbols.size == 0))
-    init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
-
-  free_pending_blocks ();
-  back_to = make_cleanup (really_free_pendings, 0);
-
-  make_cleanup_discard_minimal_symbols ();
-  read_minimal_symbols (objfile);
-
-  /* Now that the symbol table data of the executable file are all in core,
-     process them and define symbols accordingly.  */
-  read_os9k_psymtab (objfile,
-		     DBX_TEXT_ADDR (objfile),
-		     DBX_TEXT_SIZE (objfile));
-
-  do_cleanups (back_to);
-}
-
-/* Initialize anything that needs initializing when a completely new
-   symbol file is specified (not just adding some symbols from another
-   file, e.g. a shared library).  */
-
-static void
-os9k_new_init (struct objfile *ignore)
-{
-  stabsread_new_init ();
-  buildsym_new_init ();
-  psymfile_depth = 0;
-/*
-   init_header_files ();
- */
-}
-
-/* os9k_symfile_init ()
-   It is passed a struct objfile which contains, among other things,
-   the BFD for the file whose symbols are being read, and a slot for a pointer
-   to "private data" which we fill with goodies.
-
-   Since BFD doesn't know how to read debug symbols in a format-independent
-   way (and may never do so...), we have to do it ourselves.  We will never
-   be called unless this is an a.out (or very similar) file. 
-   FIXME, there should be a cleaner peephole into the BFD environment here.  */
-
-static void
-os9k_symfile_init (struct objfile *objfile)
-{
-  bfd *sym_bfd = objfile->obfd;
-  char *name = bfd_get_filename (sym_bfd);
-  char dbgname[512], stbname[512];
-  FILE *symfile = 0;
-  FILE *minfile = 0;
-  asection *text_sect;
-
-  strcpy (dbgname, name);
-  strcat (dbgname, ".dbg");
-  strcpy (stbname, name);
-  strcat (stbname, ".stb");
-
-  if ((symfile = fopen (dbgname, "r")) == NULL)
-    {
-      warning ("Symbol file %s not found", dbgname);
-    }
-  objfile->auxf2 = symfile;
-
-  if ((minfile = fopen (stbname, "r")) == NULL)
-    {
-      warning ("Symbol file %s not found", stbname);
-    }
-  objfile->auxf1 = minfile;
-
-  /* Allocate struct to keep track of the symfile */
-  objfile->sym_stab_info = (struct dbx_symfile_info *)
-    xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
-  DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
-
-  text_sect = bfd_get_section_by_name (sym_bfd, ".text");
-  if (!text_sect)
-    error ("Can't find .text section in file");
-  DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
-  DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
-
-  DBX_SYMBOL_SIZE (objfile) = 0;	/* variable size symbol */
-  DBX_SYMCOUNT (objfile) = 0;	/* used to be bfd_get_symcount(sym_bfd) */
-  DBX_SYMTAB_OFFSET (objfile) = 0;	/* used to be SYMBOL_TABLE_OFFSET */
-}
-
-/* Perform any local cleanups required when we are done with a particular
-   objfile.  I.E, we are in the process of discarding all symbol information
-   for an objfile, freeing up all memory held for it, and unlinking the
-   objfile struct from the global list of known objfiles. */
-
-static void
-os9k_symfile_finish (struct objfile *objfile)
-{
-  if (objfile->sym_stab_info != NULL)
-    {
-      xmfree (objfile->md, objfile->sym_stab_info);
-    }
-/*
-   free_header_files ();
- */
-}
-
-
-struct st_dbghdr
-{
-  int sync;
-  short rev;
-  int crc;
-  short os;
-  short cpu;
-};
-#define SYNC 		(int)0xefbefeca
-
-#define SWAP_DBGHDR(hdrp, abfd) \
-  { \
-    (hdrp)->sync = bfd_get_32(abfd, (unsigned char *)&(hdrp)->sync); \
-    (hdrp)->rev = bfd_get_16(abfd, (unsigned char *)&(hdrp)->rev); \
-    (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
-    (hdrp)->os = bfd_get_16(abfd, (unsigned char *)&(hdrp)->os); \
-    (hdrp)->cpu = bfd_get_16(abfd, (unsigned char *)&(hdrp)->cpu); \
-  }
-
-#define N_SYM_CMPLR     0
-#define N_SYM_SLINE     1
-#define N_SYM_SYM       2
-#define N_SYM_LBRAC     3
-#define N_SYM_RBRAC     4
-#define N_SYM_SE        5
-
-struct internal_symstruct
-  {
-    short n_type;
-    short n_desc;
-    long n_value;
-    char *n_strx;
-  };
-static struct internal_symstruct symbol;
-static struct internal_symstruct *symbuf = &symbol;
-static char strbuf[4096];
-static struct st_dbghdr dbghdr;
-static short cmplrid;
-
-#define VER_PRE_ULTRAC	((short)4)
-#define VER_ULTRAC	((short)5)
-
-static int
-fill_sym (FILE *dbg_file, bfd *abfd)
-{
-  short si, nmask;
-  long li;
-  int ii;
-  char *p;
-
-  int nbytes = fread (&si, sizeof (si), 1, dbg_file);
-  if (nbytes == 0)
-    return 0;
-  if (nbytes < 0)
-    perror_with_name ("reading .dbg file.");
-  symbuf->n_desc = 0;
-  symbuf->n_value = 0;
-  symbuf->n_strx = NULL;
-  symbuf->n_type = bfd_get_16 (abfd, (unsigned char *) &si);
-  symbuf->n_type = 0xf & symbuf->n_type;
-  switch (symbuf->n_type)
-    {
-    case N_SYM_CMPLR:
-      fread (&si, sizeof (si), 1, dbg_file);
-      symbuf->n_desc = bfd_get_16 (abfd, (unsigned char *) &si);
-      cmplrid = symbuf->n_desc & 0xff;
-      break;
-    case N_SYM_SLINE:
-      fread (&li, sizeof (li), 1, dbg_file);
-      symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-      fread (&li, sizeof (li), 1, dbg_file);
-      li = bfd_get_32 (abfd, (unsigned char *) &li);
-      symbuf->n_strx = (char *) (li >> 12);
-      symbuf->n_desc = li & 0xfff;
-      break;
-    case N_SYM_SYM:
-      fread (&li, sizeof (li), 1, dbg_file);
-      symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-      si = 0;
-      do
-	{
-	  ii = getc (dbg_file);
-	  strbuf[si++] = (char) ii;
-	}
-      while (ii != 0 || si % 2 != 0);
-      symbuf->n_strx = strbuf;
-      p = (char *) strchr (strbuf, ':');
-      if (!p)
-	break;
-      if ((p[1] == 'F' || p[1] == 'f') && cmplrid == VER_PRE_ULTRAC)
-	{
-	  fread (&si, sizeof (si), 1, dbg_file);
-	  nmask = bfd_get_16 (abfd, (unsigned char *) &si);
-	  for (ii = 0; ii < nmask; ii++)
-	    fread (&si, sizeof (si), 1, dbg_file);
-	}
-      break;
-    case N_SYM_LBRAC:
-      fread (&li, sizeof (li), 1, dbg_file);
-      symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-      break;
-    case N_SYM_RBRAC:
-      fread (&li, sizeof (li), 1, dbg_file);
-      symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
-      break;
-    case N_SYM_SE:
-      break;
-    }
-  return 1;
-}
-
-/* Given pointers to an a.out symbol table in core containing dbx
-   style data, setup partial_symtab's describing each source file for
-   which debugging information is available.
-   SYMFILE_NAME is the name of the file we are reading from. */
-
-static void
-read_os9k_psymtab (struct objfile *objfile, CORE_ADDR text_addr, int text_size)
-{
-  register struct internal_symstruct *bufp = 0;		/* =0 avoids gcc -Wall glitch */
-  register char *namestring;
-  int past_first_source_file = 0;
-  CORE_ADDR last_o_file_start = 0;
-#if 0
-  struct cleanup *back_to;
-#endif
-  bfd *abfd;
-  FILE *fp;
-
-  /* End of the text segment of the executable file.  */
-  static CORE_ADDR end_of_text_addr;
-
-  /* Current partial symtab */
-  static struct partial_symtab *pst = 0;
-
-  /* List of current psymtab's include files */
-  char **psymtab_include_list;
-  int includes_allocated;
-  int includes_used;
-
-  /* Index within current psymtab dependency list */
-  struct partial_symtab **dependency_list;
-  int dependencies_used, dependencies_allocated;
-
-  includes_allocated = 30;
-  includes_used = 0;
-  psymtab_include_list = (char **) alloca (includes_allocated *
-					   sizeof (char *));
-
-  dependencies_allocated = 30;
-  dependencies_used = 0;
-  dependency_list =
-    (struct partial_symtab **) alloca (dependencies_allocated *
-				       sizeof (struct partial_symtab *));
-
-  last_source_file = NULL;
-
-#ifdef END_OF_TEXT_DEFAULT
-  end_of_text_addr = END_OF_TEXT_DEFAULT;
-#else
-  end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))
-    + text_size;		/* Relocate */
-#endif
-
-  abfd = objfile->obfd;
-  fp = objfile->auxf2;
-  if (!fp)
-    return;
-
-  fread (&dbghdr.sync, sizeof (dbghdr.sync), 1, fp);
-  fread (&dbghdr.rev, sizeof (dbghdr.rev), 1, fp);
-  fread (&dbghdr.crc, sizeof (dbghdr.crc), 1, fp);
-  fread (&dbghdr.os, sizeof (dbghdr.os), 1, fp);
-  fread (&dbghdr.cpu, sizeof (dbghdr.cpu), 1, fp);
-  SWAP_DBGHDR (&dbghdr, abfd);
-
-  symnum = 0;
-  while (1)
-    {
-      int ret;
-      long cursymoffset;
-
-      /* Get the symbol for this run and pull out some info */
-      QUIT;			/* allow this to be interruptable */
-      cursymoffset = ftell (objfile->auxf2);
-      ret = fill_sym (objfile->auxf2, abfd);
-      if (ret <= 0)
-	break;
-      else
-	symnum++;
-      bufp = symbuf;
-
-      /* Special case to speed up readin. */
-      if (bufp->n_type == (short) N_SYM_SLINE)
-	continue;
-
-#define CUR_SYMBOL_VALUE bufp->n_value
-      /* partial-stab.h */
-
-      switch (bufp->n_type)
-	{
-	  char *p;
-
-	case N_SYM_CMPLR:
-	  continue;
-
-	case N_SYM_SE:
-	  CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-	  if (psymfile_depth == 1 && pst)
-	    {
-	      os9k_end_psymtab (pst, psymtab_include_list, includes_used,
-				symnum, CUR_SYMBOL_VALUE,
-				dependency_list, dependencies_used);
-	      pst = (struct partial_symtab *) 0;
-	      includes_used = 0;
-	      dependencies_used = 0;
-	    }
-	  psymfile_depth--;
-	  continue;
-
-	case N_SYM_SYM:	/* Typedef or automatic variable. */
-	  namestring = bufp->n_strx;
-	  p = (char *) strchr (namestring, ':');
-	  if (!p)
-	    continue;		/* Not a debugging symbol.   */
-
-	  /* Main processing section for debugging symbols which
-	     the initial read through the symbol tables needs to worry
-	     about.  If we reach this point, the symbol which we are
-	     considering is definitely one we are interested in.
-	     p must also contain the (valid) index into the namestring
-	     which indicates the debugging type symbol.  */
-
-	  switch (p[1])
-	    {
-	    case 'S':
-	      {
-		unsigned long valu;
-		enum language tmp_language;
-		char *str, *p;
-		int n;
-
-		valu = CUR_SYMBOL_VALUE;
-		if (valu)
-		  valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-		past_first_source_file = 1;
-
-		p = strchr (namestring, ':');
-		if (p)
-		  n = p - namestring;
-		else
-		  n = strlen (namestring);
-		str = alloca (n + 1);
-		strncpy (str, namestring, n);
-		str[n] = '\0';
-
-		if (psymfile_depth == 0)
-		  {
-		    if (!pst)
-		      pst = os9k_start_psymtab (objfile,
-						str, valu,
-						cursymoffset,
-						symnum - 1,
-					      objfile->global_psymbols.next,
-					     objfile->static_psymbols.next);
-		  }
-		else
-		  {		/* this is a include file */
-		    tmp_language = deduce_language_from_filename (str);
-		    if (tmp_language != language_unknown
-			&& (tmp_language != language_c
-			    || psymtab_language != language_cplus))
-		      psymtab_language = tmp_language;
-
-/*
-   if (pst && STREQ (str, pst->filename))
-   continue;
-   {
-   register int i;
-   for (i = 0; i < includes_used; i++)
-   if (STREQ (str, psymtab_include_list[i]))
-   {
-   i = -1; 
-   break;
-   }
-   if (i == -1)
-   continue;
-   }
- */
-
-		    psymtab_include_list[includes_used++] = str;
-		    if (includes_used >= includes_allocated)
-		      {
-			char **orig = psymtab_include_list;
-
-			psymtab_include_list = (char **)
-			  alloca ((includes_allocated *= 2) * sizeof (char *));
-			memcpy ((PTR) psymtab_include_list, (PTR) orig,
-				includes_used * sizeof (char *));
-		      }
-
-		  }
-		psymfile_depth++;
-		continue;
-	      }
-
-	    case 'v':
-	      add_psymbol_to_list (namestring, p - namestring,
-				   VAR_NAMESPACE, LOC_STATIC,
-				   &objfile->static_psymbols,
-				   0, CUR_SYMBOL_VALUE,
-				   psymtab_language, objfile);
-	      continue;
-	    case 'V':
-	      add_psymbol_to_list (namestring, p - namestring,
-				   VAR_NAMESPACE, LOC_STATIC,
-				   &objfile->global_psymbols,
-				   0, CUR_SYMBOL_VALUE,
-				   psymtab_language, objfile);
-	      continue;
-
-	    case 'T':
-	      if (p != namestring)	/* a name is there, not just :T... */
-		{
-		  add_psymbol_to_list (namestring, p - namestring,
-				       STRUCT_NAMESPACE, LOC_TYPEDEF,
-				       &objfile->static_psymbols,
-				       CUR_SYMBOL_VALUE, 0,
-				       psymtab_language, objfile);
-		  if (p[2] == 't')
-		    {
-		      /* Also a typedef with the same name.  */
-		      add_psymbol_to_list (namestring, p - namestring,
-					   VAR_NAMESPACE, LOC_TYPEDEF,
-					   &objfile->static_psymbols,
-				      CUR_SYMBOL_VALUE, 0, psymtab_language,
-					   objfile);
-		      p += 1;
-		    }
-		  /* The semantics of C++ state that "struct foo { ... }"
-		     also defines a typedef for "foo".  Unfortuantely, cfront
-		     never makes the typedef when translating from C++ to C.
-		     We make the typedef here so that "ptype foo" works as
-		     expected for cfront translated code.  */
-		  else if (psymtab_language == language_cplus)
-		    {
-		      /* Also a typedef with the same name.  */
-		      add_psymbol_to_list (namestring, p - namestring,
-					   VAR_NAMESPACE, LOC_TYPEDEF,
-					   &objfile->static_psymbols,
-				      CUR_SYMBOL_VALUE, 0, psymtab_language,
-					   objfile);
-		    }
-		}
-	      goto check_enum;
-	    case 't':
-	      if (p != namestring)	/* a name is there, not just :T... */
-		{
-		  add_psymbol_to_list (namestring, p - namestring,
-				       VAR_NAMESPACE, LOC_TYPEDEF,
-				       &objfile->static_psymbols,
-				       CUR_SYMBOL_VALUE, 0,
-				       psymtab_language, objfile);
-		}
-	    check_enum:
-	      /* If this is an enumerated type, we need to
-	         add all the enum constants to the partial symbol
-	         table.  This does not cover enums without names, e.g.
-	         "enum {a, b} c;" in C, but fortunately those are
-	         rare.  There is no way for GDB to find those from the
-	         enum type without spending too much time on it.  Thus
-	         to solve this problem, the compiler needs to put out the
-	         enum in a nameless type.  GCC2 does this.  */
-
-	      /* We are looking for something of the form
-	         <name> ":" ("t" | "T") [<number> "="] "e" <size>
-	         {<constant> ":" <value> ","} ";".  */
-
-	      /* Skip over the colon and the 't' or 'T'.  */
-	      p += 2;
-	      /* This type may be given a number.  Also, numbers can come
-	         in pairs like (0,26).  Skip over it.  */
-	      while ((*p >= '0' && *p <= '9')
-		     || *p == '(' || *p == ',' || *p == ')'
-		     || *p == '=')
-		p++;
-
-	      if (*p++ == 'e')
-		{
-		  /* We have found an enumerated type. skip size */
-		  while (*p >= '0' && *p <= '9')
-		    p++;
-		  /* According to comments in read_enum_type
-		     a comma could end it instead of a semicolon.
-		     I don't know where that happens.
-		     Accept either.  */
-		  while (*p && *p != ';' && *p != ',')
-		    {
-		      char *q;
-
-		      /* Check for and handle cretinous dbx symbol name
-		         continuation! 
-		         if (*p == '\\')
-		         p = next_symbol_text (objfile);
-		       */
-
-		      /* Point to the character after the name
-		         of the enum constant.  */
-		      for (q = p; *q && *q != ':'; q++)
-			;
-		      /* Note that the value doesn't matter for
-		         enum constants in psymtabs, just in symtabs.  */
-		      add_psymbol_to_list (p, q - p,
-					   VAR_NAMESPACE, LOC_CONST,
-					   &objfile->static_psymbols, 0,
-					   0, psymtab_language, objfile);
-		      /* Point past the name.  */
-		      p = q;
-		      /* Skip over the value.  */
-		      while (*p && *p != ',')
-			p++;
-		      /* Advance past the comma.  */
-		      if (*p)
-			p++;
-		    }
-		}
-	      continue;
-	    case 'c':
-	      /* Constant, e.g. from "const" in Pascal.  */
-	      add_psymbol_to_list (namestring, p - namestring,
-				   VAR_NAMESPACE, LOC_CONST,
-				&objfile->static_psymbols, CUR_SYMBOL_VALUE,
-				   0, psymtab_language, objfile);
-	      continue;
-
-	    case 'f':
-	      CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-	      if (pst && pst->textlow == 0)
-		pst->textlow = CUR_SYMBOL_VALUE;
-
-	      add_psymbol_to_list (namestring, p - namestring,
-				   VAR_NAMESPACE, LOC_BLOCK,
-				&objfile->static_psymbols, CUR_SYMBOL_VALUE,
-				   0, psymtab_language, objfile);
-	      continue;
-
-	    case 'F':
-	      CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-	      if (pst && pst->textlow == 0)
-		pst->textlow = CUR_SYMBOL_VALUE;
-
-	      add_psymbol_to_list (namestring, p - namestring,
-				   VAR_NAMESPACE, LOC_BLOCK,
-				&objfile->global_psymbols, CUR_SYMBOL_VALUE,
-				   0, psymtab_language, objfile);
-	      continue;
-
-	    case 'p':
-	    case 'l':
-	    case 's':
-	      continue;
-
-	    case ':':
-	      /* It is a C++ nested symbol.  We don't need to record it
-	         (I don't think); if we try to look up foo::bar::baz,
-	         then symbols for the symtab containing foo should get
-	         read in, I think.  */
-	      /* Someone says sun cc puts out symbols like
-	         /foo/baz/maclib::/usr/local/bin/maclib,
-	         which would get here with a symbol type of ':'.  */
-	      continue;
-
-	    default:
-	      /* Unexpected symbol descriptor.  The second and subsequent stabs
-	         of a continued stab can show up here.  The question is
-	         whether they ever can mimic a normal stab--it would be
-	         nice if not, since we certainly don't want to spend the
-	         time searching to the end of every string looking for
-	         a backslash.  */
-
-	      complain (&unknown_symchar_complaint, p[1]);
-	      continue;
-	    }
-
-	case N_SYM_RBRAC:
-	  CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
-#ifdef HANDLE_RBRAC
-	  HANDLE_RBRAC (CUR_SYMBOL_VALUE);
-	  continue;
-#endif
-	case N_SYM_LBRAC:
-	  continue;
-
-	default:
-	  /* If we haven't found it yet, ignore it.  It's probably some
-	     new type we don't know about yet.  */
-	  complain (&unknown_symtype_complaint,
-		    local_hex_string ((unsigned long) bufp->n_type));
-	  continue;
-	}
-    }
-
-  DBX_SYMCOUNT (objfile) = symnum;
-
-  /* If there's stuff to be cleaned up, clean it up.  */
-  if (DBX_SYMCOUNT (objfile) > 0
-/*FIXME, does this have a bug at start address 0? */
-      && last_o_file_start
-      && objfile->ei.entry_point < bufp->n_value
-      && objfile->ei.entry_point >= last_o_file_start)
-    {
-      objfile->ei.entry_file_lowpc = last_o_file_start;
-      objfile->ei.entry_file_highpc = bufp->n_value;
-    }
-
-  if (pst)
-    {
-      os9k_end_psymtab (pst, psymtab_include_list, includes_used,
-			symnum, end_of_text_addr,
-			dependency_list, dependencies_used);
-    }
-/*
-   do_cleanups (back_to);
- */
-}
-
-/* Allocate and partially fill a partial symtab.  It will be
-   completely filled at the end of the symbol list.
-
-   SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
-   is the address relative to which its symbols are (incremental) or 0
-   (normal). */
-
-
-static struct partial_symtab *
-os9k_start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
-		    int ldsymoff, int ldsymcnt,
-		    struct partial_symbol **global_syms,
-		    struct partial_symbol **static_syms)
-{
-  struct partial_symtab *result =
-  start_psymtab_common (objfile, objfile->section_offsets,
-			filename, textlow, global_syms, static_syms);
-
-  result->read_symtab_private = (char *)
-    obstack_alloc (&objfile->psymbol_obstack, sizeof (struct symloc));
-
-  LDSYMOFF (result) = ldsymoff;
-  LDSYMCNT (result) = ldsymcnt;
-  result->read_symtab = os9k_psymtab_to_symtab;
-
-  /* Deduce the source language from the filename for this psymtab. */
-  psymtab_language = deduce_language_from_filename (filename);
-  return result;
-}
-
-/* Close off the current usage of PST.  
-   Returns PST or NULL if the partial symtab was empty and thrown away.
-   FIXME:  List variables and peculiarities of same.  */
-
-static struct partial_symtab *
-os9k_end_psymtab (struct partial_symtab *pst, char **include_list,
-		  int num_includes, int capping_symbol_cnt,
-		  CORE_ADDR capping_text,
-		  struct partial_symtab **dependency_list,
-		  int number_dependencies)
-{
-  int i;
-  struct partial_symtab *p1;
-  struct objfile *objfile = pst->objfile;
-
-  if (capping_symbol_cnt != -1)
-    LDSYMCNT (pst) = capping_symbol_cnt - LDSYMCNT (pst);
-
-  /* Under Solaris, the N_SO symbols always have a value of 0,
-     instead of the usual address of the .o file.  Therefore,
-     we have to do some tricks to fill in texthigh and textlow.
-     The first trick is in partial-stab.h: if we see a static
-     or global function, and the textlow for the current pst
-     is still 0, then we use that function's address for 
-     the textlow of the pst.
-
-     Now, to fill in texthigh, we remember the last function seen
-     in the .o file (also in partial-stab.h).  Also, there's a hack in
-     bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
-     to here via the misc_info field.  Therefore, we can fill in
-     a reliable texthigh by taking the address plus size of the
-     last function in the file.
-
-     Unfortunately, that does not cover the case where the last function
-     in the file is static.  See the paragraph below for more comments
-     on this situation.
-
-     Finally, if we have a valid textlow for the current file, we run
-     down the partial_symtab_list filling in previous texthighs that
-     are still unknown.  */
-
-  if (pst->texthigh == 0 && last_function_name)
-    {
-      char *p;
-      int n;
-      struct minimal_symbol *minsym;
-
-      p = strchr (last_function_name, ':');
-      if (p == NULL)
-	p = last_function_name;
-      n = p - last_function_name;
-      p = alloca (n + 1);
-      strncpy (p, last_function_name, n);
-      p[n] = 0;
-
-      minsym = lookup_minimal_symbol (p, NULL, objfile);
-
-      if (minsym)
-	{
-	  pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + (long) MSYMBOL_INFO (minsym);
-	}
-      else
-	{
-	  /* This file ends with a static function, and it's
-	     difficult to imagine how hard it would be to track down
-	     the elf symbol.  Luckily, most of the time no one will notice,
-	     since the next file will likely be compiled with -g, so
-	     the code below will copy the first fuction's start address 
-	     back to our texthigh variable.  (Also, if this file is the
-	     last one in a dynamically linked program, texthigh already
-	     has the right value.)  If the next file isn't compiled
-	     with -g, then the last function in this file winds up owning
-	     all of the text space up to the next -g file, or the end (minus
-	     shared libraries).  This only matters for single stepping,
-	     and even then it will still work, except that it will single
-	     step through all of the covered functions, instead of setting
-	     breakpoints around them as it usualy does.  This makes it
-	     pretty slow, but at least it doesn't fail.
-
-	     We can fix this with a fairly big change to bfd, but we need
-	     to coordinate better with Cygnus if we want to do that.  FIXME.  */
-	}
-      last_function_name = NULL;
-    }
-
-  /* this test will be true if the last .o file is only data */
-  if (pst->textlow == 0)
-    pst->textlow = pst->texthigh;
-
-  /* If we know our own starting text address, then walk through all other
-     psymtabs for this objfile, and if any didn't know their ending text
-     address, set it to our starting address.  Take care to not set our
-     own ending address to our starting address, nor to set addresses on
-     `dependency' files that have both textlow and texthigh zero.  */
-  if (pst->textlow)
-    {
-      ALL_OBJFILE_PSYMTABS (objfile, p1)
-      {
-	if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
-	  {
-	    p1->texthigh = pst->textlow;
-	    /* if this file has only data, then make textlow match texthigh */
-	    if (p1->textlow == 0)
-	      p1->textlow = p1->texthigh;
-	  }
-      }
-    }
-
-  /* End of kludge for patching Solaris textlow and texthigh.  */
-
-  pst->n_global_syms =
-    objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
-  pst->n_static_syms =
-    objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
-
-  pst->number_of_dependencies = number_dependencies;
-  if (number_dependencies)
-    {
-      pst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->psymbol_obstack,
-		    number_dependencies * sizeof (struct partial_symtab *));
-      memcpy (pst->dependencies, dependency_list,
-	      number_dependencies * sizeof (struct partial_symtab *));
-    }
-  else
-    pst->dependencies = 0;
-
-  for (i = 0; i < num_includes; i++)
-    {
-      struct partial_symtab *subpst =
-      allocate_psymtab (include_list[i], objfile);
-
-      subpst->section_offsets = pst->section_offsets;
-      subpst->read_symtab_private =
-	(char *) obstack_alloc (&objfile->psymbol_obstack,
-				sizeof (struct symloc));
-      LDSYMOFF (subpst) =
-	LDSYMCNT (subpst) =
-	subpst->textlow =
-	subpst->texthigh = 0;
-
-      /* We could save slight bits of space by only making one of these,
-         shared by the entire set of include files.  FIXME-someday.  */
-      subpst->dependencies = (struct partial_symtab **)
-	obstack_alloc (&objfile->psymbol_obstack,
-		       sizeof (struct partial_symtab *));
-      subpst->dependencies[0] = pst;
-      subpst->number_of_dependencies = 1;
-
-      subpst->globals_offset =
-	subpst->n_global_syms =
-	subpst->statics_offset =
-	subpst->n_static_syms = 0;
-
-      subpst->readin = 0;
-      subpst->symtab = 0;
-      subpst->read_symtab = pst->read_symtab;
-    }
-
-  sort_pst_symbols (pst);
-
-  /* If there is already a psymtab or symtab for a file of this name, 
-     remove it.
-     (If there is a symtab, more drastic things also happen.)
-     This happens in VxWorks.  */
-  free_named_symtabs (pst->filename);
-
-  if (num_includes == 0
-      && number_dependencies == 0
-      && pst->n_global_syms == 0
-      && pst->n_static_syms == 0)
-    {
-      /* Throw away this psymtab, it's empty.  We can't deallocate it, since
-         it is on the obstack, but we can forget to chain it on the list.  */
-      /* Indicate that psymtab was thrown away.  */
-
-      discard_psymtab (pst);
-
-      pst = (struct partial_symtab *) NULL;
-    }
-  return pst;
-}
-
-static void
-os9k_psymtab_to_symtab_1 (struct partial_symtab *pst)
-{
-  struct cleanup *old_chain;
-  int i;
-
-  if (!pst)
-    return;
-
-  if (pst->readin)
-    {
-      fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
-			  pst->filename);
-      return;
-    }
-
-  /* Read in all partial symtabs on which this one is dependent */
-  for (i = 0; i < pst->number_of_dependencies; i++)
-    if (!pst->dependencies[i]->readin)
-      {
-	/* Inform about additional files that need to be read in.  */
-	if (info_verbose)
-	  {
-	    fputs_filtered (" ", gdb_stdout);
-	    wrap_here ("");
-	    fputs_filtered ("and ", gdb_stdout);
-	    wrap_here ("");
-	    printf_filtered ("%s...", pst->dependencies[i]->filename);
-	    wrap_here ("");	/* Flush output */
-	    gdb_flush (gdb_stdout);
-	  }
-	os9k_psymtab_to_symtab_1 (pst->dependencies[i]);
-      }
-
-  if (LDSYMCNT (pst))		/* Otherwise it's a dummy */
-    {
-      /* Init stuff necessary for reading in symbols */
-      stabsread_init ();
-      buildsym_init ();
-      old_chain = make_cleanup (really_free_pendings, 0);
-
-      /* Read in this file's symbols */
-      os9k_read_ofile_symtab (pst);
-      sort_symtab_syms (pst->symtab);
-      do_cleanups (old_chain);
-    }
-
-  pst->readin = 1;
-}
-
-/* Read in all of the symbols for a given psymtab for real.
-   Be verbose about it if the user wants that.  */
-
-static void
-os9k_psymtab_to_symtab (struct partial_symtab *pst)
-{
-  bfd *sym_bfd;
-
-  if (!pst)
-    return;
-
-  if (pst->readin)
-    {
-      fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
-			  pst->filename);
-      return;
-    }
-
-  if (LDSYMCNT (pst) || pst->number_of_dependencies)
-    {
-      /* Print the message now, before reading the string table,
-         to avoid disconcerting pauses.  */
-      if (info_verbose)
-	{
-	  printf_filtered ("Reading in symbols for %s...", pst->filename);
-	  gdb_flush (gdb_stdout);
-	}
-
-      sym_bfd = pst->objfile->obfd;
-      os9k_psymtab_to_symtab_1 (pst);
-
-      /* Match with global symbols.  This only needs to be done once,
-         after all of the symtabs and dependencies have been read in.   */
-      scan_file_globals (pst->objfile);
-
-      /* Finish up the debug error message.  */
-      if (info_verbose)
-	printf_filtered ("done.\n");
-    }
-}
-
-/* Read in a defined section of a specific object file's symbols. */
-static void
-os9k_read_ofile_symtab (struct partial_symtab *pst)
-{
-  register struct internal_symstruct *bufp;
-  unsigned char type;
-  unsigned max_symnum;
-  register bfd *abfd;
-  struct objfile *objfile;
-  int sym_offset;		/* Offset to start of symbols to read */
-  CORE_ADDR text_offset;	/* Start of text segment for symbols */
-  int text_size;		/* Size of text segment for symbols */
-  FILE *dbg_file;
-
-  objfile = pst->objfile;
-  sym_offset = LDSYMOFF (pst);
-  max_symnum = LDSYMCNT (pst);
-  text_offset = pst->textlow;
-  text_size = pst->texthigh - pst->textlow;
-
-  current_objfile = objfile;
-  subfile_stack = NULL;
-  last_source_file = NULL;
-
-  abfd = objfile->obfd;
-  dbg_file = objfile->auxf2;
-
-#if 0
-  /* It is necessary to actually read one symbol *before* the start
-     of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
-     occurs before the N_SO symbol.
-     Detecting this in read_dbx_symtab
-     would slow down initial readin, so we look for it here instead. */
-  if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
-    {
-      fseek (objefile->auxf2, sym_offset, SEEK_CUR);
-      fill_sym (objfile->auxf2, abfd);
-      bufp = symbuf;
-
-      processing_gcc_compilation = 0;
-      if (bufp->n_type == N_TEXT)
-	{
-	  if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
-	    processing_gcc_compilation = 1;
-	  else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
-	    processing_gcc_compilation = 2;
-	}
-
-      /* Try to select a C++ demangling based on the compilation unit
-         producer. */
-
-      if (processing_gcc_compilation)
-	{
-	  if (AUTO_DEMANGLING)
-	    {
-	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
-	    }
-	}
-    }
-  else
-    {
-      /* The N_SO starting this symtab is the first symbol, so we
-         better not check the symbol before it.  I'm not this can
-         happen, but it doesn't hurt to check for it.  */
-      bfd_seek (symfile_bfd, sym_offset, SEEK_CUR);
-      processing_gcc_compilation = 0;
-    }
-#endif /* 0 */
-
-  fseek (dbg_file, (long) sym_offset, 0);
-/*
-   if (bufp->n_type != (unsigned char)N_SYM_SYM)
-   error("First symbol in segment of executable not a source symbol");
- */
-
-  for (symnum = 0; symnum < max_symnum; symnum++)
-    {
-      QUIT;			/* Allow this to be interruptable */
-      fill_sym (dbg_file, abfd);
-      bufp = symbuf;
-      type = bufp->n_type;
-
-      os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
-	 (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
-
-      /* We skip checking for a new .o or -l file; that should never
-         happen in this routine. */
-#if 0
-      else
-      if (type == N_TEXT)
-	{
-	  /* I don't think this code will ever be executed, because
-	     the GCC_COMPILED_FLAG_SYMBOL usually is right before
-	     the N_SO symbol which starts this source file.
-	     However, there is no reason not to accept
-	     the GCC_COMPILED_FLAG_SYMBOL anywhere.  */
-
-	  if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
-	    processing_gcc_compilation = 1;
-	  else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
-	    processing_gcc_compilation = 2;
-
-	  if (AUTO_DEMANGLING)
-	    {
-	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
-	    }
-	}
-      else if (type & N_EXT || type == (unsigned char) N_TEXT
-	       || type == (unsigned char) N_NBTEXT
-	)
-	{
-	  /* Global symbol: see if we came across a dbx defintion for
-	     a corresponding symbol.  If so, store the value.  Remove
-	     syms from the chain when their values are stored, but
-	     search the whole chain, as there may be several syms from
-	     different files with the same name. */
-	  /* This is probably not true.  Since the files will be read
-	     in one at a time, each reference to a global symbol will
-	     be satisfied in each file as it appears. So we skip this
-	     section. */
-	  ;
-	}
-#endif /* 0 */
-    }
-
-  current_objfile = NULL;
-
-  /* In a Solaris elf file, this variable, which comes from the
-     value of the N_SO symbol, will still be 0.  Luckily, text_offset,
-     which comes from pst->textlow is correct. */
-  if (last_source_start_addr == 0)
-    last_source_start_addr = text_offset;
-  pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
-  end_stabs ();
-}
-
-
-/* This handles a single symbol from the symbol-file, building symbols
-   into a GDB symtab.  It takes these arguments and an implicit argument.
-
-   TYPE is the type field of the ".stab" symbol entry.
-   DESC is the desc field of the ".stab" entry.
-   VALU is the value field of the ".stab" entry.
-   NAME is the symbol name, in our address space.
-   SECTION_OFFSETS is a set of amounts by which the sections of this object
-   file were relocated when it was loaded into memory.
-   All symbols that refer
-   to memory locations need to be offset by these amounts.
-   OBJFILE is the object file from which we are reading symbols.
-   It is used in end_symtab.  */
-
-static void
-os9k_process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
-			 struct section_offsets *section_offsets,
-			 struct objfile *objfile)
-{
-  register struct context_stack *new;
-  /* The stab type used for the definition of the last function.
-     N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers.  */
-  static int function_stab_type = 0;
-
-#if 0
-  /* Something is wrong if we see real data before
-     seeing a source file name.  */
-  if (last_source_file == NULL && type != (unsigned char) N_SO)
-    {
-      /* Ignore any symbols which appear before an N_SO symbol.
-         Currently no one puts symbols there, but we should deal
-         gracefully with the case.  A complain()t might be in order,
-         but this should not be an error ().  */
-      return;
-    }
-#endif /* 0 */
-
-  switch (type)
-    {
-    case N_SYM_LBRAC:
-      /* On most machines, the block addresses are relative to the
-         N_SO, the linker did not relocate them (sigh).  */
-      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-      new = push_context (desc, valu);
-      break;
-
-    case N_SYM_RBRAC:
-      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-      new = pop_context ();
-
-#if !defined (OS9K_VARIABLES_INSIDE_BLOCK)
-#define OS9K_VARIABLES_INSIDE_BLOCK(desc, gcc_p) 1
-#endif
-
-      if (!OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
-	local_symbols = new->locals;
-
-      if (context_stack_depth > 1)
-	{
-	  /* This is not the outermost LBRAC...RBRAC pair in the function,
-	     its local symbols preceded it, and are the ones just recovered
-	     from the context stack.  Define the block for them (but don't
-	     bother if the block contains no symbols.  Should we complain
-	     on blocks without symbols?  I can't think of any useful purpose
-	     for them).  */
-	  if (local_symbols != NULL)
-	    {
-	      /* Muzzle a compiler bug that makes end < start.  (which
-	         compilers?  Is this ever harmful?).  */
-	      if (new->start_addr > valu)
-		{
-		  complain (&lbrac_rbrac_complaint);
-		  new->start_addr = valu;
-		}
-	      /* Make a block for the local symbols within.  */
-	      finish_block (0, &local_symbols, new->old_blocks,
-			    new->start_addr, valu, objfile);
-	    }
-	}
-      else
-	{
-	  if (context_stack_depth == 0)
-	    {
-	      within_function = 0;
-	      /* Make a block for the local symbols within.  */
-	      finish_block (new->name, &local_symbols, new->old_blocks,
-			    new->start_addr, valu, objfile);
-	    }
-	  else
-	    {
-	      /* attach local_symbols to the end of new->locals */
-	      if (!new->locals)
-		new->locals = local_symbols;
-	      else
-		{
-		  struct pending *p;
-
-		  p = new->locals;
-		  while (p->next)
-		    p = p->next;
-		  p->next = local_symbols;
-		}
-	    }
-	}
-
-      if (OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
-	/* Now pop locals of block just finished.  */
-	local_symbols = new->locals;
-      break;
-
-
-    case N_SYM_SLINE:
-      /* This type of "symbol" really just records
-         one line-number -- core-address correspondence.
-         Enter it in the line list for this symbol table. */
-      /* Relocate for dynamic loading and for ELF acc fn-relative syms.  */
-      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-      /* FIXME: loses if sizeof (char *) > sizeof (int) */
-      gdb_assert (sizeof (name) <= sizeof (int));
-      record_line (current_subfile, (int) name, valu);
-      break;
-
-      /* The following symbol types need to have the appropriate offset added
-         to their value; then we process symbol definitions in the name.  */
-    case N_SYM_SYM:
-
-      if (name)
-	{
-	  char deftype;
-	  char *dirn, *n;
-	  char *p = strchr (name, ':');
-	  if (p == NULL)
-	    deftype = '\0';
-	  else
-	    deftype = p[1];
-
-
-	  switch (deftype)
-	    {
-	    case 'S':
-	      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-	      n = strrchr (name, '/');
-	      if (n != NULL)
-		{
-		  *n = '\0';
-		  n++;
-		  dirn = name;
-		}
-	      else
-		{
-		  n = name;
-		  dirn = NULL;
-		}
-	      *p = '\0';
-	      if (symfile_depth++ == 0)
-		{
-		  if (last_source_file)
-		    {
-		      end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
-		      end_stabs ();
-		    }
-		  start_stabs ();
-		  os9k_stabs = 1;
-		  start_symtab (n, dirn, valu);
-		  record_debugformat ("OS9");
-		}
-	      else
-		{
-		  push_subfile ();
-		  start_subfile (n, dirn != NULL ? dirn : current_subfile->dirname);
-		}
-	      break;
-
-	    case 'f':
-	    case 'F':
-	      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
-	      function_stab_type = type;
-
-	      within_function = 1;
-	      new = push_context (0, valu);
-	      new->name = define_symbol (valu, name, desc, type, objfile);
-	      break;
-
-	    case 'V':
-	    case 'v':
-	      valu += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
-	      define_symbol (valu, name, desc, type, objfile);
-	      break;
-
-	    default:
-	      define_symbol (valu, name, desc, type, objfile);
-	      break;
-	    }
-	}
-      break;
-
-    case N_SYM_SE:
-      if (--symfile_depth != 0)
-	start_subfile (pop_subfile (), current_subfile->dirname);
-      break;
-
-    default:
-      complain (&unknown_symtype_complaint,
-		local_hex_string ((unsigned long) type));
-      /* FALLTHROUGH */
-      break;
-
-    case N_SYM_CMPLR:
-      break;
-    }
-  previous_stab_code = type;
-}
-
-static struct sym_fns os9k_sym_fns =
-{
-  bfd_target_os9k_flavour,
-  os9k_new_init,		/* sym_new_init: init anything gbl to entire symtab */
-  os9k_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
-  os9k_symfile_read,		/* sym_read: read a symbol file into symtab */
-  os9k_symfile_finish,		/* sym_finish: finished with file, cleanup */
-  default_symfile_offsets,	/* sym_offsets: parse user's offsets to internal form */
-  NULL				/* next: pointer to next struct sym_fns */
-};
-
-void
-_initialize_os9kread (void)
-{
-  add_symtab_fns (&os9k_sym_fns);
-}
+// OBSOLETE /* Read os9/os9k symbol tables and convert to internal format, for GDB.
+// OBSOLETE    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+// OBSOLETE    1996, 1997, 1998, 1999, 2000, 2001
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* This module provides three functions: os9k_symfile_init,
+// OBSOLETE    which initializes to read a symbol file; os9k_new_init, which 
+// OBSOLETE    discards existing cached information when all symbols are being
+// OBSOLETE    discarded; and os9k_symfile_read, which reads a symbol table
+// OBSOLETE    from a file.
+// OBSOLETE 
+// OBSOLETE    os9k_symfile_read only does the minimum work necessary for letting the
+// OBSOLETE    user "name" things symbolically; it does not read the entire symtab.
+// OBSOLETE    Instead, it reads the external and static symbols and puts them in partial
+// OBSOLETE    symbol tables.  When more extensive information is requested of a
+// OBSOLETE    file, the corresponding partial symbol table is mutated into a full
+// OBSOLETE    fledged symbol table by going back and reading the symbols
+// OBSOLETE    for real.  os9k_psymtab_to_symtab() is the function that does this */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include "gdb_assert.h"
+// OBSOLETE #include <stdio.h>
+// OBSOLETE 
+// OBSOLETE #if defined(USG) || defined(__CYGNUSCLIB__)
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include "obstack.h"
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "breakpoint.h"
+// OBSOLETE #include "command.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "gdbcore.h"		/* for bfd stuff */
+// OBSOLETE #include "libaout.h"		/* FIXME Secret internal BFD stuff for a.out */
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "buildsym.h"
+// OBSOLETE #include "gdb-stabs.h"
+// OBSOLETE #include "demangle.h"
+// OBSOLETE #include "language.h"		/* Needed inside partial-stab.h */
+// OBSOLETE #include "complaints.h"
+// OBSOLETE #include "os9k.h"
+// OBSOLETE #include "stabsread.h"
+// OBSOLETE 
+// OBSOLETE extern void _initialize_os9kread (void);
+// OBSOLETE 
+// OBSOLETE /* Each partial symbol table entry contains a pointer to private data for the
+// OBSOLETE    read_symtab() function to use when expanding a partial symbol table entry
+// OBSOLETE    to a full symbol table entry.
+// OBSOLETE 
+// OBSOLETE    For dbxread this structure contains the offset within the file symbol table
+// OBSOLETE    of first local symbol for this file, and count of the section
+// OBSOLETE    of the symbol table devoted to this file's symbols (actually, the section
+// OBSOLETE    bracketed may contain more than just this file's symbols).  It also contains
+// OBSOLETE    further information needed to locate the symbols if they are in an ELF file.
+// OBSOLETE 
+// OBSOLETE    If ldsymcnt is 0, the only reason for this thing's existence is the
+// OBSOLETE    dependency list.  Nothing else will happen when it is read in.  */
+// OBSOLETE 
+// OBSOLETE #define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
+// OBSOLETE #define LDSYMCNT(p) (((struct symloc *)((p)->read_symtab_private))->ldsymnum)
+// OBSOLETE 
+// OBSOLETE struct symloc
+// OBSOLETE   {
+// OBSOLETE     int ldsymoff;
+// OBSOLETE     int ldsymnum;
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE /* Remember what we deduced to be the source language of this psymtab. */
+// OBSOLETE static enum language psymtab_language = language_unknown;
+// OBSOLETE 
+// OBSOLETE /* keep partial symbol table file nested depth */
+// OBSOLETE static int psymfile_depth = 0;
+// OBSOLETE 
+// OBSOLETE /* keep symbol table file nested depth */
+// OBSOLETE static int symfile_depth = 0;
+// OBSOLETE 
+// OBSOLETE extern int previous_stab_code;
+// OBSOLETE 
+// OBSOLETE /* Name of last function encountered.  Used in Solaris to approximate
+// OBSOLETE    object file boundaries.  */
+// OBSOLETE static char *last_function_name;
+// OBSOLETE 
+// OBSOLETE /* Complaints about the symbols we have encountered.  */
+// OBSOLETE extern struct complaint lbrac_complaint;
+// OBSOLETE 
+// OBSOLETE extern struct complaint unknown_symtype_complaint;
+// OBSOLETE 
+// OBSOLETE extern struct complaint unknown_symchar_complaint;
+// OBSOLETE 
+// OBSOLETE extern struct complaint lbrac_rbrac_complaint;
+// OBSOLETE 
+// OBSOLETE extern struct complaint repeated_header_complaint;
+// OBSOLETE 
+// OBSOLETE extern struct complaint repeated_header_name_complaint;
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE static struct complaint lbrac_unmatched_complaint =
+// OBSOLETE {"unmatched Increment Block Entry before symtab pos %d", 0, 0};
+// OBSOLETE 
+// OBSOLETE static struct complaint lbrac_mismatch_complaint =
+// OBSOLETE {"IBE/IDE symbol mismatch at symtab pos %d", 0, 0};
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* Local function prototypes */
+// OBSOLETE 
+// OBSOLETE static void read_minimal_symbols (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void os9k_read_ofile_symtab (struct partial_symtab *);
+// OBSOLETE 
+// OBSOLETE static void os9k_psymtab_to_symtab (struct partial_symtab *);
+// OBSOLETE 
+// OBSOLETE static void os9k_psymtab_to_symtab_1 (struct partial_symtab *);
+// OBSOLETE 
+// OBSOLETE static void read_os9k_psymtab (struct objfile *, CORE_ADDR, int);
+// OBSOLETE 
+// OBSOLETE static int fill_sym (FILE *, bfd *);
+// OBSOLETE 
+// OBSOLETE static void os9k_symfile_init (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void os9k_new_init (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void os9k_symfile_read (struct objfile *, int);
+// OBSOLETE 
+// OBSOLETE static void os9k_symfile_finish (struct objfile *);
+// OBSOLETE 
+// OBSOLETE static void os9k_process_one_symbol (int, int, CORE_ADDR, char *,
+// OBSOLETE 				     struct section_offsets *,
+// OBSOLETE 				     struct objfile *);
+// OBSOLETE 
+// OBSOLETE static struct partial_symtab *os9k_start_psymtab (struct objfile *, char *,
+// OBSOLETE 						  CORE_ADDR, int, int,
+// OBSOLETE 						  struct partial_symbol **,
+// OBSOLETE 						  struct partial_symbol **);
+// OBSOLETE 
+// OBSOLETE static struct partial_symtab *os9k_end_psymtab (struct partial_symtab *,
+// OBSOLETE 						char **, int, int, CORE_ADDR,
+// OBSOLETE 						struct partial_symtab **,
+// OBSOLETE 						int);
+// OBSOLETE 
+// OBSOLETE static void record_minimal_symbol (char *, CORE_ADDR, int, struct objfile *);
+// OBSOLETE 
+// OBSOLETE #define HANDLE_RBRAC(val) \
+// OBSOLETE   if ((val) > pst->texthigh) pst->texthigh = (val);
+// OBSOLETE 
+// OBSOLETE #define SWAP_STBHDR(hdrp, abfd) \
+// OBSOLETE   { \
+// OBSOLETE     (hdrp)->fmtno = bfd_get_16(abfd, (unsigned char *)&(hdrp)->fmtno); \
+// OBSOLETE     (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
+// OBSOLETE     (hdrp)->offset = bfd_get_32(abfd, (unsigned char *)&(hdrp)->offset); \
+// OBSOLETE     (hdrp)->nsym = bfd_get_32(abfd, (unsigned char *)&(hdrp)->nsym); \
+// OBSOLETE   }
+// OBSOLETE #define SWAP_STBSYM(symp, abfd) \
+// OBSOLETE   { \
+// OBSOLETE     (symp)->value = bfd_get_32(abfd, (unsigned char *)&(symp)->value); \
+// OBSOLETE     (symp)->type = bfd_get_16(abfd, (unsigned char *)&(symp)->type); \
+// OBSOLETE     (symp)->stroff = bfd_get_32(abfd, (unsigned char *)&(symp)->stroff); \
+// OBSOLETE   }
+// OBSOLETE #define N_DATA 0
+// OBSOLETE #define N_BSS 1
+// OBSOLETE #define N_RDATA 2
+// OBSOLETE #define N_IDATA 3
+// OBSOLETE #define N_TEXT 4
+// OBSOLETE #define N_ABS 6
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE record_minimal_symbol (char *name, CORE_ADDR address, int type,
+// OBSOLETE 		       struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   enum minimal_symbol_type ms_type;
+// OBSOLETE 
+// OBSOLETE   switch (type)
+// OBSOLETE     {
+// OBSOLETE     case N_TEXT:
+// OBSOLETE       ms_type = mst_text;
+// OBSOLETE       address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE       break;
+// OBSOLETE     case N_DATA:
+// OBSOLETE       ms_type = mst_data;
+// OBSOLETE       break;
+// OBSOLETE     case N_BSS:
+// OBSOLETE       ms_type = mst_bss;
+// OBSOLETE       break;
+// OBSOLETE     case N_RDATA:
+// OBSOLETE       ms_type = mst_bss;
+// OBSOLETE       break;
+// OBSOLETE     case N_IDATA:
+// OBSOLETE       ms_type = mst_data;
+// OBSOLETE       break;
+// OBSOLETE     case N_ABS:
+// OBSOLETE       ms_type = mst_abs;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       ms_type = mst_unknown;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   prim_record_minimal_symbol (name, address, ms_type, objfile);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* read and process .stb file and store in minimal symbol table */
+// OBSOLETE typedef char mhhdr[80];
+// OBSOLETE struct stbhdr
+// OBSOLETE   {
+// OBSOLETE     mhhdr comhdr;
+// OBSOLETE     char *name;
+// OBSOLETE     short fmtno;
+// OBSOLETE     int crc;
+// OBSOLETE     int offset;
+// OBSOLETE     int nsym;
+// OBSOLETE     char *pad;
+// OBSOLETE   };
+// OBSOLETE struct stbsymbol
+// OBSOLETE   {
+// OBSOLETE     int value;
+// OBSOLETE     short type;
+// OBSOLETE     int stroff;
+// OBSOLETE   };
+// OBSOLETE #define STBSYMSIZE 10
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE read_minimal_symbols (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   FILE *fp;
+// OBSOLETE   bfd *abfd;
+// OBSOLETE   struct stbhdr hdr;
+// OBSOLETE   struct stbsymbol sym;
+// OBSOLETE   int ch, i, j, off;
+// OBSOLETE   char buf[64], buf1[128];
+// OBSOLETE 
+// OBSOLETE   fp = objfile->auxf1;
+// OBSOLETE   if (fp == NULL)
+// OBSOLETE     return;
+// OBSOLETE   abfd = objfile->obfd;
+// OBSOLETE   fread (&hdr.comhdr[0], sizeof (mhhdr), 1, fp);
+// OBSOLETE   i = 0;
+// OBSOLETE   ch = getc (fp);
+// OBSOLETE   while (ch != -1)
+// OBSOLETE     {
+// OBSOLETE       buf[i] = (char) ch;
+// OBSOLETE       i++;
+// OBSOLETE       if (ch == 0)
+// OBSOLETE 	break;
+// OBSOLETE       ch = getc (fp);
+// OBSOLETE     };
+// OBSOLETE   if (i % 2)
+// OBSOLETE     ch = getc (fp);
+// OBSOLETE   hdr.name = &buf[0];
+// OBSOLETE 
+// OBSOLETE   fread (&hdr.fmtno, sizeof (hdr.fmtno), 1, fp);
+// OBSOLETE   fread (&hdr.crc, sizeof (hdr.crc), 1, fp);
+// OBSOLETE   fread (&hdr.offset, sizeof (hdr.offset), 1, fp);
+// OBSOLETE   fread (&hdr.nsym, sizeof (hdr.nsym), 1, fp);
+// OBSOLETE   SWAP_STBHDR (&hdr, abfd);
+// OBSOLETE 
+// OBSOLETE   /* read symbols */
+// OBSOLETE   init_minimal_symbol_collection ();
+// OBSOLETE   off = hdr.offset;
+// OBSOLETE   for (i = hdr.nsym; i > 0; i--)
+// OBSOLETE     {
+// OBSOLETE       fseek (fp, (long) off, 0);
+// OBSOLETE       fread (&sym.value, sizeof (sym.value), 1, fp);
+// OBSOLETE       fread (&sym.type, sizeof (sym.type), 1, fp);
+// OBSOLETE       fread (&sym.stroff, sizeof (sym.stroff), 1, fp);
+// OBSOLETE       SWAP_STBSYM (&sym, abfd);
+// OBSOLETE       fseek (fp, (long) sym.stroff, 0);
+// OBSOLETE       j = 0;
+// OBSOLETE       ch = getc (fp);
+// OBSOLETE       while (ch != -1)
+// OBSOLETE 	{
+// OBSOLETE 	  buf1[j] = (char) ch;
+// OBSOLETE 	  j++;
+// OBSOLETE 	  if (ch == 0)
+// OBSOLETE 	    break;
+// OBSOLETE 	  ch = getc (fp);
+// OBSOLETE 	};
+// OBSOLETE       record_minimal_symbol (buf1, sym.value, sym.type & 7, objfile);
+// OBSOLETE       off += STBSYMSIZE;
+// OBSOLETE     };
+// OBSOLETE   install_minimal_symbols (objfile);
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Scan and build partial symbols for a symbol file.
+// OBSOLETE    We have been initialized by a call to os9k_symfile_init, which 
+// OBSOLETE    put all the relevant info into a "struct os9k_symfile_info",
+// OBSOLETE    hung off the objfile structure.
+// OBSOLETE 
+// OBSOLETE    MAINLINE is true if we are reading the main symbol
+// OBSOLETE    table (as opposed to a shared lib or dynamically loaded file).  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_symfile_read (struct objfile *objfile, int mainline)
+// OBSOLETE {
+// OBSOLETE   bfd *sym_bfd;
+// OBSOLETE   struct cleanup *back_to;
+// OBSOLETE 
+// OBSOLETE   sym_bfd = objfile->obfd;
+// OBSOLETE   /* If we are reinitializing, or if we have never loaded syms yet, init */
+// OBSOLETE   if (mainline
+// OBSOLETE       || (objfile->global_psymbols.size == 0
+// OBSOLETE 	  && objfile->static_psymbols.size == 0))
+// OBSOLETE     init_psymbol_list (objfile, DBX_SYMCOUNT (objfile));
+// OBSOLETE 
+// OBSOLETE   free_pending_blocks ();
+// OBSOLETE   back_to = make_cleanup (really_free_pendings, 0);
+// OBSOLETE 
+// OBSOLETE   make_cleanup_discard_minimal_symbols ();
+// OBSOLETE   read_minimal_symbols (objfile);
+// OBSOLETE 
+// OBSOLETE   /* Now that the symbol table data of the executable file are all in core,
+// OBSOLETE      process them and define symbols accordingly.  */
+// OBSOLETE   read_os9k_psymtab (objfile,
+// OBSOLETE 		     DBX_TEXT_ADDR (objfile),
+// OBSOLETE 		     DBX_TEXT_SIZE (objfile));
+// OBSOLETE 
+// OBSOLETE   do_cleanups (back_to);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Initialize anything that needs initializing when a completely new
+// OBSOLETE    symbol file is specified (not just adding some symbols from another
+// OBSOLETE    file, e.g. a shared library).  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_new_init (struct objfile *ignore)
+// OBSOLETE {
+// OBSOLETE   stabsread_new_init ();
+// OBSOLETE   buildsym_new_init ();
+// OBSOLETE   psymfile_depth = 0;
+// OBSOLETE /*
+// OBSOLETE    init_header_files ();
+// OBSOLETE  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* os9k_symfile_init ()
+// OBSOLETE    It is passed a struct objfile which contains, among other things,
+// OBSOLETE    the BFD for the file whose symbols are being read, and a slot for a pointer
+// OBSOLETE    to "private data" which we fill with goodies.
+// OBSOLETE 
+// OBSOLETE    Since BFD doesn't know how to read debug symbols in a format-independent
+// OBSOLETE    way (and may never do so...), we have to do it ourselves.  We will never
+// OBSOLETE    be called unless this is an a.out (or very similar) file. 
+// OBSOLETE    FIXME, there should be a cleaner peephole into the BFD environment here.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_symfile_init (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   bfd *sym_bfd = objfile->obfd;
+// OBSOLETE   char *name = bfd_get_filename (sym_bfd);
+// OBSOLETE   char dbgname[512], stbname[512];
+// OBSOLETE   FILE *symfile = 0;
+// OBSOLETE   FILE *minfile = 0;
+// OBSOLETE   asection *text_sect;
+// OBSOLETE 
+// OBSOLETE   strcpy (dbgname, name);
+// OBSOLETE   strcat (dbgname, ".dbg");
+// OBSOLETE   strcpy (stbname, name);
+// OBSOLETE   strcat (stbname, ".stb");
+// OBSOLETE 
+// OBSOLETE   if ((symfile = fopen (dbgname, "r")) == NULL)
+// OBSOLETE     {
+// OBSOLETE       warning ("Symbol file %s not found", dbgname);
+// OBSOLETE     }
+// OBSOLETE   objfile->auxf2 = symfile;
+// OBSOLETE 
+// OBSOLETE   if ((minfile = fopen (stbname, "r")) == NULL)
+// OBSOLETE     {
+// OBSOLETE       warning ("Symbol file %s not found", stbname);
+// OBSOLETE     }
+// OBSOLETE   objfile->auxf1 = minfile;
+// OBSOLETE 
+// OBSOLETE   /* Allocate struct to keep track of the symfile */
+// OBSOLETE   objfile->sym_stab_info = (struct dbx_symfile_info *)
+// OBSOLETE     xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
+// OBSOLETE   DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
+// OBSOLETE 
+// OBSOLETE   text_sect = bfd_get_section_by_name (sym_bfd, ".text");
+// OBSOLETE   if (!text_sect)
+// OBSOLETE     error ("Can't find .text section in file");
+// OBSOLETE   DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
+// OBSOLETE   DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
+// OBSOLETE 
+// OBSOLETE   DBX_SYMBOL_SIZE (objfile) = 0;	/* variable size symbol */
+// OBSOLETE   DBX_SYMCOUNT (objfile) = 0;	/* used to be bfd_get_symcount(sym_bfd) */
+// OBSOLETE   DBX_SYMTAB_OFFSET (objfile) = 0;	/* used to be SYMBOL_TABLE_OFFSET */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Perform any local cleanups required when we are done with a particular
+// OBSOLETE    objfile.  I.E, we are in the process of discarding all symbol information
+// OBSOLETE    for an objfile, freeing up all memory held for it, and unlinking the
+// OBSOLETE    objfile struct from the global list of known objfiles. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_symfile_finish (struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   if (objfile->sym_stab_info != NULL)
+// OBSOLETE     {
+// OBSOLETE       xmfree (objfile->md, objfile->sym_stab_info);
+// OBSOLETE     }
+// OBSOLETE /*
+// OBSOLETE    free_header_files ();
+// OBSOLETE  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE struct st_dbghdr
+// OBSOLETE {
+// OBSOLETE   int sync;
+// OBSOLETE   short rev;
+// OBSOLETE   int crc;
+// OBSOLETE   short os;
+// OBSOLETE   short cpu;
+// OBSOLETE };
+// OBSOLETE #define SYNC 		(int)0xefbefeca
+// OBSOLETE 
+// OBSOLETE #define SWAP_DBGHDR(hdrp, abfd) \
+// OBSOLETE   { \
+// OBSOLETE     (hdrp)->sync = bfd_get_32(abfd, (unsigned char *)&(hdrp)->sync); \
+// OBSOLETE     (hdrp)->rev = bfd_get_16(abfd, (unsigned char *)&(hdrp)->rev); \
+// OBSOLETE     (hdrp)->crc = bfd_get_32(abfd, (unsigned char *)&(hdrp)->crc); \
+// OBSOLETE     (hdrp)->os = bfd_get_16(abfd, (unsigned char *)&(hdrp)->os); \
+// OBSOLETE     (hdrp)->cpu = bfd_get_16(abfd, (unsigned char *)&(hdrp)->cpu); \
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #define N_SYM_CMPLR     0
+// OBSOLETE #define N_SYM_SLINE     1
+// OBSOLETE #define N_SYM_SYM       2
+// OBSOLETE #define N_SYM_LBRAC     3
+// OBSOLETE #define N_SYM_RBRAC     4
+// OBSOLETE #define N_SYM_SE        5
+// OBSOLETE 
+// OBSOLETE struct internal_symstruct
+// OBSOLETE   {
+// OBSOLETE     short n_type;
+// OBSOLETE     short n_desc;
+// OBSOLETE     long n_value;
+// OBSOLETE     char *n_strx;
+// OBSOLETE   };
+// OBSOLETE static struct internal_symstruct symbol;
+// OBSOLETE static struct internal_symstruct *symbuf = &symbol;
+// OBSOLETE static char strbuf[4096];
+// OBSOLETE static struct st_dbghdr dbghdr;
+// OBSOLETE static short cmplrid;
+// OBSOLETE 
+// OBSOLETE #define VER_PRE_ULTRAC	((short)4)
+// OBSOLETE #define VER_ULTRAC	((short)5)
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE fill_sym (FILE *dbg_file, bfd *abfd)
+// OBSOLETE {
+// OBSOLETE   short si, nmask;
+// OBSOLETE   long li;
+// OBSOLETE   int ii;
+// OBSOLETE   char *p;
+// OBSOLETE 
+// OBSOLETE   int nbytes = fread (&si, sizeof (si), 1, dbg_file);
+// OBSOLETE   if (nbytes == 0)
+// OBSOLETE     return 0;
+// OBSOLETE   if (nbytes < 0)
+// OBSOLETE     perror_with_name ("reading .dbg file.");
+// OBSOLETE   symbuf->n_desc = 0;
+// OBSOLETE   symbuf->n_value = 0;
+// OBSOLETE   symbuf->n_strx = NULL;
+// OBSOLETE   symbuf->n_type = bfd_get_16 (abfd, (unsigned char *) &si);
+// OBSOLETE   symbuf->n_type = 0xf & symbuf->n_type;
+// OBSOLETE   switch (symbuf->n_type)
+// OBSOLETE     {
+// OBSOLETE     case N_SYM_CMPLR:
+// OBSOLETE       fread (&si, sizeof (si), 1, dbg_file);
+// OBSOLETE       symbuf->n_desc = bfd_get_16 (abfd, (unsigned char *) &si);
+// OBSOLETE       cmplrid = symbuf->n_desc & 0xff;
+// OBSOLETE       break;
+// OBSOLETE     case N_SYM_SLINE:
+// OBSOLETE       fread (&li, sizeof (li), 1, dbg_file);
+// OBSOLETE       symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
+// OBSOLETE       fread (&li, sizeof (li), 1, dbg_file);
+// OBSOLETE       li = bfd_get_32 (abfd, (unsigned char *) &li);
+// OBSOLETE       symbuf->n_strx = (char *) (li >> 12);
+// OBSOLETE       symbuf->n_desc = li & 0xfff;
+// OBSOLETE       break;
+// OBSOLETE     case N_SYM_SYM:
+// OBSOLETE       fread (&li, sizeof (li), 1, dbg_file);
+// OBSOLETE       symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
+// OBSOLETE       si = 0;
+// OBSOLETE       do
+// OBSOLETE 	{
+// OBSOLETE 	  ii = getc (dbg_file);
+// OBSOLETE 	  strbuf[si++] = (char) ii;
+// OBSOLETE 	}
+// OBSOLETE       while (ii != 0 || si % 2 != 0);
+// OBSOLETE       symbuf->n_strx = strbuf;
+// OBSOLETE       p = (char *) strchr (strbuf, ':');
+// OBSOLETE       if (!p)
+// OBSOLETE 	break;
+// OBSOLETE       if ((p[1] == 'F' || p[1] == 'f') && cmplrid == VER_PRE_ULTRAC)
+// OBSOLETE 	{
+// OBSOLETE 	  fread (&si, sizeof (si), 1, dbg_file);
+// OBSOLETE 	  nmask = bfd_get_16 (abfd, (unsigned char *) &si);
+// OBSOLETE 	  for (ii = 0; ii < nmask; ii++)
+// OBSOLETE 	    fread (&si, sizeof (si), 1, dbg_file);
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE     case N_SYM_LBRAC:
+// OBSOLETE       fread (&li, sizeof (li), 1, dbg_file);
+// OBSOLETE       symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
+// OBSOLETE       break;
+// OBSOLETE     case N_SYM_RBRAC:
+// OBSOLETE       fread (&li, sizeof (li), 1, dbg_file);
+// OBSOLETE       symbuf->n_value = bfd_get_32 (abfd, (unsigned char *) &li);
+// OBSOLETE       break;
+// OBSOLETE     case N_SYM_SE:
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given pointers to an a.out symbol table in core containing dbx
+// OBSOLETE    style data, setup partial_symtab's describing each source file for
+// OBSOLETE    which debugging information is available.
+// OBSOLETE    SYMFILE_NAME is the name of the file we are reading from. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE read_os9k_psymtab (struct objfile *objfile, CORE_ADDR text_addr, int text_size)
+// OBSOLETE {
+// OBSOLETE   register struct internal_symstruct *bufp = 0;		/* =0 avoids gcc -Wall glitch */
+// OBSOLETE   register char *namestring;
+// OBSOLETE   int past_first_source_file = 0;
+// OBSOLETE   CORE_ADDR last_o_file_start = 0;
+// OBSOLETE #if 0
+// OBSOLETE   struct cleanup *back_to;
+// OBSOLETE #endif
+// OBSOLETE   bfd *abfd;
+// OBSOLETE   FILE *fp;
+// OBSOLETE 
+// OBSOLETE   /* End of the text segment of the executable file.  */
+// OBSOLETE   static CORE_ADDR end_of_text_addr;
+// OBSOLETE 
+// OBSOLETE   /* Current partial symtab */
+// OBSOLETE   static struct partial_symtab *pst = 0;
+// OBSOLETE 
+// OBSOLETE   /* List of current psymtab's include files */
+// OBSOLETE   char **psymtab_include_list;
+// OBSOLETE   int includes_allocated;
+// OBSOLETE   int includes_used;
+// OBSOLETE 
+// OBSOLETE   /* Index within current psymtab dependency list */
+// OBSOLETE   struct partial_symtab **dependency_list;
+// OBSOLETE   int dependencies_used, dependencies_allocated;
+// OBSOLETE 
+// OBSOLETE   includes_allocated = 30;
+// OBSOLETE   includes_used = 0;
+// OBSOLETE   psymtab_include_list = (char **) alloca (includes_allocated *
+// OBSOLETE 					   sizeof (char *));
+// OBSOLETE 
+// OBSOLETE   dependencies_allocated = 30;
+// OBSOLETE   dependencies_used = 0;
+// OBSOLETE   dependency_list =
+// OBSOLETE     (struct partial_symtab **) alloca (dependencies_allocated *
+// OBSOLETE 				       sizeof (struct partial_symtab *));
+// OBSOLETE 
+// OBSOLETE   last_source_file = NULL;
+// OBSOLETE 
+// OBSOLETE #ifdef END_OF_TEXT_DEFAULT
+// OBSOLETE   end_of_text_addr = END_OF_TEXT_DEFAULT;
+// OBSOLETE #else
+// OBSOLETE   end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))
+// OBSOLETE     + text_size;		/* Relocate */
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   abfd = objfile->obfd;
+// OBSOLETE   fp = objfile->auxf2;
+// OBSOLETE   if (!fp)
+// OBSOLETE     return;
+// OBSOLETE 
+// OBSOLETE   fread (&dbghdr.sync, sizeof (dbghdr.sync), 1, fp);
+// OBSOLETE   fread (&dbghdr.rev, sizeof (dbghdr.rev), 1, fp);
+// OBSOLETE   fread (&dbghdr.crc, sizeof (dbghdr.crc), 1, fp);
+// OBSOLETE   fread (&dbghdr.os, sizeof (dbghdr.os), 1, fp);
+// OBSOLETE   fread (&dbghdr.cpu, sizeof (dbghdr.cpu), 1, fp);
+// OBSOLETE   SWAP_DBGHDR (&dbghdr, abfd);
+// OBSOLETE 
+// OBSOLETE   symnum = 0;
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       int ret;
+// OBSOLETE       long cursymoffset;
+// OBSOLETE 
+// OBSOLETE       /* Get the symbol for this run and pull out some info */
+// OBSOLETE       QUIT;			/* allow this to be interruptable */
+// OBSOLETE       cursymoffset = ftell (objfile->auxf2);
+// OBSOLETE       ret = fill_sym (objfile->auxf2, abfd);
+// OBSOLETE       if (ret <= 0)
+// OBSOLETE 	break;
+// OBSOLETE       else
+// OBSOLETE 	symnum++;
+// OBSOLETE       bufp = symbuf;
+// OBSOLETE 
+// OBSOLETE       /* Special case to speed up readin. */
+// OBSOLETE       if (bufp->n_type == (short) N_SYM_SLINE)
+// OBSOLETE 	continue;
+// OBSOLETE 
+// OBSOLETE #define CUR_SYMBOL_VALUE bufp->n_value
+// OBSOLETE       /* partial-stab.h */
+// OBSOLETE 
+// OBSOLETE       switch (bufp->n_type)
+// OBSOLETE 	{
+// OBSOLETE 	  char *p;
+// OBSOLETE 
+// OBSOLETE 	case N_SYM_CMPLR:
+// OBSOLETE 	  continue;
+// OBSOLETE 
+// OBSOLETE 	case N_SYM_SE:
+// OBSOLETE 	  CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 	  if (psymfile_depth == 1 && pst)
+// OBSOLETE 	    {
+// OBSOLETE 	      os9k_end_psymtab (pst, psymtab_include_list, includes_used,
+// OBSOLETE 				symnum, CUR_SYMBOL_VALUE,
+// OBSOLETE 				dependency_list, dependencies_used);
+// OBSOLETE 	      pst = (struct partial_symtab *) 0;
+// OBSOLETE 	      includes_used = 0;
+// OBSOLETE 	      dependencies_used = 0;
+// OBSOLETE 	    }
+// OBSOLETE 	  psymfile_depth--;
+// OBSOLETE 	  continue;
+// OBSOLETE 
+// OBSOLETE 	case N_SYM_SYM:	/* Typedef or automatic variable. */
+// OBSOLETE 	  namestring = bufp->n_strx;
+// OBSOLETE 	  p = (char *) strchr (namestring, ':');
+// OBSOLETE 	  if (!p)
+// OBSOLETE 	    continue;		/* Not a debugging symbol.   */
+// OBSOLETE 
+// OBSOLETE 	  /* Main processing section for debugging symbols which
+// OBSOLETE 	     the initial read through the symbol tables needs to worry
+// OBSOLETE 	     about.  If we reach this point, the symbol which we are
+// OBSOLETE 	     considering is definitely one we are interested in.
+// OBSOLETE 	     p must also contain the (valid) index into the namestring
+// OBSOLETE 	     which indicates the debugging type symbol.  */
+// OBSOLETE 
+// OBSOLETE 	  switch (p[1])
+// OBSOLETE 	    {
+// OBSOLETE 	    case 'S':
+// OBSOLETE 	      {
+// OBSOLETE 		unsigned long valu;
+// OBSOLETE 		enum language tmp_language;
+// OBSOLETE 		char *str, *p;
+// OBSOLETE 		int n;
+// OBSOLETE 
+// OBSOLETE 		valu = CUR_SYMBOL_VALUE;
+// OBSOLETE 		if (valu)
+// OBSOLETE 		  valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 		past_first_source_file = 1;
+// OBSOLETE 
+// OBSOLETE 		p = strchr (namestring, ':');
+// OBSOLETE 		if (p)
+// OBSOLETE 		  n = p - namestring;
+// OBSOLETE 		else
+// OBSOLETE 		  n = strlen (namestring);
+// OBSOLETE 		str = alloca (n + 1);
+// OBSOLETE 		strncpy (str, namestring, n);
+// OBSOLETE 		str[n] = '\0';
+// OBSOLETE 
+// OBSOLETE 		if (psymfile_depth == 0)
+// OBSOLETE 		  {
+// OBSOLETE 		    if (!pst)
+// OBSOLETE 		      pst = os9k_start_psymtab (objfile,
+// OBSOLETE 						str, valu,
+// OBSOLETE 						cursymoffset,
+// OBSOLETE 						symnum - 1,
+// OBSOLETE 					      objfile->global_psymbols.next,
+// OBSOLETE 					     objfile->static_psymbols.next);
+// OBSOLETE 		  }
+// OBSOLETE 		else
+// OBSOLETE 		  {		/* this is a include file */
+// OBSOLETE 		    tmp_language = deduce_language_from_filename (str);
+// OBSOLETE 		    if (tmp_language != language_unknown
+// OBSOLETE 			&& (tmp_language != language_c
+// OBSOLETE 			    || psymtab_language != language_cplus))
+// OBSOLETE 		      psymtab_language = tmp_language;
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    if (pst && STREQ (str, pst->filename))
+// OBSOLETE    continue;
+// OBSOLETE    {
+// OBSOLETE    register int i;
+// OBSOLETE    for (i = 0; i < includes_used; i++)
+// OBSOLETE    if (STREQ (str, psymtab_include_list[i]))
+// OBSOLETE    {
+// OBSOLETE    i = -1; 
+// OBSOLETE    break;
+// OBSOLETE    }
+// OBSOLETE    if (i == -1)
+// OBSOLETE    continue;
+// OBSOLETE    }
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE 		    psymtab_include_list[includes_used++] = str;
+// OBSOLETE 		    if (includes_used >= includes_allocated)
+// OBSOLETE 		      {
+// OBSOLETE 			char **orig = psymtab_include_list;
+// OBSOLETE 
+// OBSOLETE 			psymtab_include_list = (char **)
+// OBSOLETE 			  alloca ((includes_allocated *= 2) * sizeof (char *));
+// OBSOLETE 			memcpy ((PTR) psymtab_include_list, (PTR) orig,
+// OBSOLETE 				includes_used * sizeof (char *));
+// OBSOLETE 		      }
+// OBSOLETE 
+// OBSOLETE 		  }
+// OBSOLETE 		psymfile_depth++;
+// OBSOLETE 		continue;
+// OBSOLETE 	      }
+// OBSOLETE 
+// OBSOLETE 	    case 'v':
+// OBSOLETE 	      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				   VAR_NAMESPACE, LOC_STATIC,
+// OBSOLETE 				   &objfile->static_psymbols,
+// OBSOLETE 				   0, CUR_SYMBOL_VALUE,
+// OBSOLETE 				   psymtab_language, objfile);
+// OBSOLETE 	      continue;
+// OBSOLETE 	    case 'V':
+// OBSOLETE 	      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				   VAR_NAMESPACE, LOC_STATIC,
+// OBSOLETE 				   &objfile->global_psymbols,
+// OBSOLETE 				   0, CUR_SYMBOL_VALUE,
+// OBSOLETE 				   psymtab_language, objfile);
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    case 'T':
+// OBSOLETE 	      if (p != namestring)	/* a name is there, not just :T... */
+// OBSOLETE 		{
+// OBSOLETE 		  add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				       STRUCT_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE 				       &objfile->static_psymbols,
+// OBSOLETE 				       CUR_SYMBOL_VALUE, 0,
+// OBSOLETE 				       psymtab_language, objfile);
+// OBSOLETE 		  if (p[2] == 't')
+// OBSOLETE 		    {
+// OBSOLETE 		      /* Also a typedef with the same name.  */
+// OBSOLETE 		      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 					   VAR_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE 					   &objfile->static_psymbols,
+// OBSOLETE 				      CUR_SYMBOL_VALUE, 0, psymtab_language,
+// OBSOLETE 					   objfile);
+// OBSOLETE 		      p += 1;
+// OBSOLETE 		    }
+// OBSOLETE 		  /* The semantics of C++ state that "struct foo { ... }"
+// OBSOLETE 		     also defines a typedef for "foo".  Unfortuantely, cfront
+// OBSOLETE 		     never makes the typedef when translating from C++ to C.
+// OBSOLETE 		     We make the typedef here so that "ptype foo" works as
+// OBSOLETE 		     expected for cfront translated code.  */
+// OBSOLETE 		  else if (psymtab_language == language_cplus)
+// OBSOLETE 		    {
+// OBSOLETE 		      /* Also a typedef with the same name.  */
+// OBSOLETE 		      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 					   VAR_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE 					   &objfile->static_psymbols,
+// OBSOLETE 				      CUR_SYMBOL_VALUE, 0, psymtab_language,
+// OBSOLETE 					   objfile);
+// OBSOLETE 		    }
+// OBSOLETE 		}
+// OBSOLETE 	      goto check_enum;
+// OBSOLETE 	    case 't':
+// OBSOLETE 	      if (p != namestring)	/* a name is there, not just :T... */
+// OBSOLETE 		{
+// OBSOLETE 		  add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				       VAR_NAMESPACE, LOC_TYPEDEF,
+// OBSOLETE 				       &objfile->static_psymbols,
+// OBSOLETE 				       CUR_SYMBOL_VALUE, 0,
+// OBSOLETE 				       psymtab_language, objfile);
+// OBSOLETE 		}
+// OBSOLETE 	    check_enum:
+// OBSOLETE 	      /* If this is an enumerated type, we need to
+// OBSOLETE 	         add all the enum constants to the partial symbol
+// OBSOLETE 	         table.  This does not cover enums without names, e.g.
+// OBSOLETE 	         "enum {a, b} c;" in C, but fortunately those are
+// OBSOLETE 	         rare.  There is no way for GDB to find those from the
+// OBSOLETE 	         enum type without spending too much time on it.  Thus
+// OBSOLETE 	         to solve this problem, the compiler needs to put out the
+// OBSOLETE 	         enum in a nameless type.  GCC2 does this.  */
+// OBSOLETE 
+// OBSOLETE 	      /* We are looking for something of the form
+// OBSOLETE 	         <name> ":" ("t" | "T") [<number> "="] "e" <size>
+// OBSOLETE 	         {<constant> ":" <value> ","} ";".  */
+// OBSOLETE 
+// OBSOLETE 	      /* Skip over the colon and the 't' or 'T'.  */
+// OBSOLETE 	      p += 2;
+// OBSOLETE 	      /* This type may be given a number.  Also, numbers can come
+// OBSOLETE 	         in pairs like (0,26).  Skip over it.  */
+// OBSOLETE 	      while ((*p >= '0' && *p <= '9')
+// OBSOLETE 		     || *p == '(' || *p == ',' || *p == ')'
+// OBSOLETE 		     || *p == '=')
+// OBSOLETE 		p++;
+// OBSOLETE 
+// OBSOLETE 	      if (*p++ == 'e')
+// OBSOLETE 		{
+// OBSOLETE 		  /* We have found an enumerated type. skip size */
+// OBSOLETE 		  while (*p >= '0' && *p <= '9')
+// OBSOLETE 		    p++;
+// OBSOLETE 		  /* According to comments in read_enum_type
+// OBSOLETE 		     a comma could end it instead of a semicolon.
+// OBSOLETE 		     I don't know where that happens.
+// OBSOLETE 		     Accept either.  */
+// OBSOLETE 		  while (*p && *p != ';' && *p != ',')
+// OBSOLETE 		    {
+// OBSOLETE 		      char *q;
+// OBSOLETE 
+// OBSOLETE 		      /* Check for and handle cretinous dbx symbol name
+// OBSOLETE 		         continuation! 
+// OBSOLETE 		         if (*p == '\\')
+// OBSOLETE 		         p = next_symbol_text (objfile);
+// OBSOLETE 		       */
+// OBSOLETE 
+// OBSOLETE 		      /* Point to the character after the name
+// OBSOLETE 		         of the enum constant.  */
+// OBSOLETE 		      for (q = p; *q && *q != ':'; q++)
+// OBSOLETE 			;
+// OBSOLETE 		      /* Note that the value doesn't matter for
+// OBSOLETE 		         enum constants in psymtabs, just in symtabs.  */
+// OBSOLETE 		      add_psymbol_to_list (p, q - p,
+// OBSOLETE 					   VAR_NAMESPACE, LOC_CONST,
+// OBSOLETE 					   &objfile->static_psymbols, 0,
+// OBSOLETE 					   0, psymtab_language, objfile);
+// OBSOLETE 		      /* Point past the name.  */
+// OBSOLETE 		      p = q;
+// OBSOLETE 		      /* Skip over the value.  */
+// OBSOLETE 		      while (*p && *p != ',')
+// OBSOLETE 			p++;
+// OBSOLETE 		      /* Advance past the comma.  */
+// OBSOLETE 		      if (*p)
+// OBSOLETE 			p++;
+// OBSOLETE 		    }
+// OBSOLETE 		}
+// OBSOLETE 	      continue;
+// OBSOLETE 	    case 'c':
+// OBSOLETE 	      /* Constant, e.g. from "const" in Pascal.  */
+// OBSOLETE 	      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				   VAR_NAMESPACE, LOC_CONST,
+// OBSOLETE 				&objfile->static_psymbols, CUR_SYMBOL_VALUE,
+// OBSOLETE 				   0, psymtab_language, objfile);
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    case 'f':
+// OBSOLETE 	      CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 	      if (pst && pst->textlow == 0)
+// OBSOLETE 		pst->textlow = CUR_SYMBOL_VALUE;
+// OBSOLETE 
+// OBSOLETE 	      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				   VAR_NAMESPACE, LOC_BLOCK,
+// OBSOLETE 				&objfile->static_psymbols, CUR_SYMBOL_VALUE,
+// OBSOLETE 				   0, psymtab_language, objfile);
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    case 'F':
+// OBSOLETE 	      CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 	      if (pst && pst->textlow == 0)
+// OBSOLETE 		pst->textlow = CUR_SYMBOL_VALUE;
+// OBSOLETE 
+// OBSOLETE 	      add_psymbol_to_list (namestring, p - namestring,
+// OBSOLETE 				   VAR_NAMESPACE, LOC_BLOCK,
+// OBSOLETE 				&objfile->global_psymbols, CUR_SYMBOL_VALUE,
+// OBSOLETE 				   0, psymtab_language, objfile);
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    case 'p':
+// OBSOLETE 	    case 'l':
+// OBSOLETE 	    case 's':
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    case ':':
+// OBSOLETE 	      /* It is a C++ nested symbol.  We don't need to record it
+// OBSOLETE 	         (I don't think); if we try to look up foo::bar::baz,
+// OBSOLETE 	         then symbols for the symtab containing foo should get
+// OBSOLETE 	         read in, I think.  */
+// OBSOLETE 	      /* Someone says sun cc puts out symbols like
+// OBSOLETE 	         /foo/baz/maclib::/usr/local/bin/maclib,
+// OBSOLETE 	         which would get here with a symbol type of ':'.  */
+// OBSOLETE 	      continue;
+// OBSOLETE 
+// OBSOLETE 	    default:
+// OBSOLETE 	      /* Unexpected symbol descriptor.  The second and subsequent stabs
+// OBSOLETE 	         of a continued stab can show up here.  The question is
+// OBSOLETE 	         whether they ever can mimic a normal stab--it would be
+// OBSOLETE 	         nice if not, since we certainly don't want to spend the
+// OBSOLETE 	         time searching to the end of every string looking for
+// OBSOLETE 	         a backslash.  */
+// OBSOLETE 
+// OBSOLETE 	      complain (&unknown_symchar_complaint, p[1]);
+// OBSOLETE 	      continue;
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	case N_SYM_RBRAC:
+// OBSOLETE 	  CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE #ifdef HANDLE_RBRAC
+// OBSOLETE 	  HANDLE_RBRAC (CUR_SYMBOL_VALUE);
+// OBSOLETE 	  continue;
+// OBSOLETE #endif
+// OBSOLETE 	case N_SYM_LBRAC:
+// OBSOLETE 	  continue;
+// OBSOLETE 
+// OBSOLETE 	default:
+// OBSOLETE 	  /* If we haven't found it yet, ignore it.  It's probably some
+// OBSOLETE 	     new type we don't know about yet.  */
+// OBSOLETE 	  complain (&unknown_symtype_complaint,
+// OBSOLETE 		    local_hex_string ((unsigned long) bufp->n_type));
+// OBSOLETE 	  continue;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   DBX_SYMCOUNT (objfile) = symnum;
+// OBSOLETE 
+// OBSOLETE   /* If there's stuff to be cleaned up, clean it up.  */
+// OBSOLETE   if (DBX_SYMCOUNT (objfile) > 0
+// OBSOLETE /*FIXME, does this have a bug at start address 0? */
+// OBSOLETE       && last_o_file_start
+// OBSOLETE       && objfile->ei.entry_point < bufp->n_value
+// OBSOLETE       && objfile->ei.entry_point >= last_o_file_start)
+// OBSOLETE     {
+// OBSOLETE       objfile->ei.entry_file_lowpc = last_o_file_start;
+// OBSOLETE       objfile->ei.entry_file_highpc = bufp->n_value;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (pst)
+// OBSOLETE     {
+// OBSOLETE       os9k_end_psymtab (pst, psymtab_include_list, includes_used,
+// OBSOLETE 			symnum, end_of_text_addr,
+// OBSOLETE 			dependency_list, dependencies_used);
+// OBSOLETE     }
+// OBSOLETE /*
+// OBSOLETE    do_cleanups (back_to);
+// OBSOLETE  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Allocate and partially fill a partial symtab.  It will be
+// OBSOLETE    completely filled at the end of the symbol list.
+// OBSOLETE 
+// OBSOLETE    SYMFILE_NAME is the name of the symbol-file we are reading from, and ADDR
+// OBSOLETE    is the address relative to which its symbols are (incremental) or 0
+// OBSOLETE    (normal). */
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE static struct partial_symtab *
+// OBSOLETE os9k_start_psymtab (struct objfile *objfile, char *filename, CORE_ADDR textlow,
+// OBSOLETE 		    int ldsymoff, int ldsymcnt,
+// OBSOLETE 		    struct partial_symbol **global_syms,
+// OBSOLETE 		    struct partial_symbol **static_syms)
+// OBSOLETE {
+// OBSOLETE   struct partial_symtab *result =
+// OBSOLETE   start_psymtab_common (objfile, objfile->section_offsets,
+// OBSOLETE 			filename, textlow, global_syms, static_syms);
+// OBSOLETE 
+// OBSOLETE   result->read_symtab_private = (char *)
+// OBSOLETE     obstack_alloc (&objfile->psymbol_obstack, sizeof (struct symloc));
+// OBSOLETE 
+// OBSOLETE   LDSYMOFF (result) = ldsymoff;
+// OBSOLETE   LDSYMCNT (result) = ldsymcnt;
+// OBSOLETE   result->read_symtab = os9k_psymtab_to_symtab;
+// OBSOLETE 
+// OBSOLETE   /* Deduce the source language from the filename for this psymtab. */
+// OBSOLETE   psymtab_language = deduce_language_from_filename (filename);
+// OBSOLETE   return result;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Close off the current usage of PST.  
+// OBSOLETE    Returns PST or NULL if the partial symtab was empty and thrown away.
+// OBSOLETE    FIXME:  List variables and peculiarities of same.  */
+// OBSOLETE 
+// OBSOLETE static struct partial_symtab *
+// OBSOLETE os9k_end_psymtab (struct partial_symtab *pst, char **include_list,
+// OBSOLETE 		  int num_includes, int capping_symbol_cnt,
+// OBSOLETE 		  CORE_ADDR capping_text,
+// OBSOLETE 		  struct partial_symtab **dependency_list,
+// OBSOLETE 		  int number_dependencies)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   struct partial_symtab *p1;
+// OBSOLETE   struct objfile *objfile = pst->objfile;
+// OBSOLETE 
+// OBSOLETE   if (capping_symbol_cnt != -1)
+// OBSOLETE     LDSYMCNT (pst) = capping_symbol_cnt - LDSYMCNT (pst);
+// OBSOLETE 
+// OBSOLETE   /* Under Solaris, the N_SO symbols always have a value of 0,
+// OBSOLETE      instead of the usual address of the .o file.  Therefore,
+// OBSOLETE      we have to do some tricks to fill in texthigh and textlow.
+// OBSOLETE      The first trick is in partial-stab.h: if we see a static
+// OBSOLETE      or global function, and the textlow for the current pst
+// OBSOLETE      is still 0, then we use that function's address for 
+// OBSOLETE      the textlow of the pst.
+// OBSOLETE 
+// OBSOLETE      Now, to fill in texthigh, we remember the last function seen
+// OBSOLETE      in the .o file (also in partial-stab.h).  Also, there's a hack in
+// OBSOLETE      bfd/elf.c and gdb/elfread.c to pass the ELF st_size field
+// OBSOLETE      to here via the misc_info field.  Therefore, we can fill in
+// OBSOLETE      a reliable texthigh by taking the address plus size of the
+// OBSOLETE      last function in the file.
+// OBSOLETE 
+// OBSOLETE      Unfortunately, that does not cover the case where the last function
+// OBSOLETE      in the file is static.  See the paragraph below for more comments
+// OBSOLETE      on this situation.
+// OBSOLETE 
+// OBSOLETE      Finally, if we have a valid textlow for the current file, we run
+// OBSOLETE      down the partial_symtab_list filling in previous texthighs that
+// OBSOLETE      are still unknown.  */
+// OBSOLETE 
+// OBSOLETE   if (pst->texthigh == 0 && last_function_name)
+// OBSOLETE     {
+// OBSOLETE       char *p;
+// OBSOLETE       int n;
+// OBSOLETE       struct minimal_symbol *minsym;
+// OBSOLETE 
+// OBSOLETE       p = strchr (last_function_name, ':');
+// OBSOLETE       if (p == NULL)
+// OBSOLETE 	p = last_function_name;
+// OBSOLETE       n = p - last_function_name;
+// OBSOLETE       p = alloca (n + 1);
+// OBSOLETE       strncpy (p, last_function_name, n);
+// OBSOLETE       p[n] = 0;
+// OBSOLETE 
+// OBSOLETE       minsym = lookup_minimal_symbol (p, NULL, objfile);
+// OBSOLETE 
+// OBSOLETE       if (minsym)
+// OBSOLETE 	{
+// OBSOLETE 	  pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) + (long) MSYMBOL_INFO (minsym);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* This file ends with a static function, and it's
+// OBSOLETE 	     difficult to imagine how hard it would be to track down
+// OBSOLETE 	     the elf symbol.  Luckily, most of the time no one will notice,
+// OBSOLETE 	     since the next file will likely be compiled with -g, so
+// OBSOLETE 	     the code below will copy the first fuction's start address 
+// OBSOLETE 	     back to our texthigh variable.  (Also, if this file is the
+// OBSOLETE 	     last one in a dynamically linked program, texthigh already
+// OBSOLETE 	     has the right value.)  If the next file isn't compiled
+// OBSOLETE 	     with -g, then the last function in this file winds up owning
+// OBSOLETE 	     all of the text space up to the next -g file, or the end (minus
+// OBSOLETE 	     shared libraries).  This only matters for single stepping,
+// OBSOLETE 	     and even then it will still work, except that it will single
+// OBSOLETE 	     step through all of the covered functions, instead of setting
+// OBSOLETE 	     breakpoints around them as it usualy does.  This makes it
+// OBSOLETE 	     pretty slow, but at least it doesn't fail.
+// OBSOLETE 
+// OBSOLETE 	     We can fix this with a fairly big change to bfd, but we need
+// OBSOLETE 	     to coordinate better with Cygnus if we want to do that.  FIXME.  */
+// OBSOLETE 	}
+// OBSOLETE       last_function_name = NULL;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* this test will be true if the last .o file is only data */
+// OBSOLETE   if (pst->textlow == 0)
+// OBSOLETE     pst->textlow = pst->texthigh;
+// OBSOLETE 
+// OBSOLETE   /* If we know our own starting text address, then walk through all other
+// OBSOLETE      psymtabs for this objfile, and if any didn't know their ending text
+// OBSOLETE      address, set it to our starting address.  Take care to not set our
+// OBSOLETE      own ending address to our starting address, nor to set addresses on
+// OBSOLETE      `dependency' files that have both textlow and texthigh zero.  */
+// OBSOLETE   if (pst->textlow)
+// OBSOLETE     {
+// OBSOLETE       ALL_OBJFILE_PSYMTABS (objfile, p1)
+// OBSOLETE       {
+// OBSOLETE 	if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
+// OBSOLETE 	  {
+// OBSOLETE 	    p1->texthigh = pst->textlow;
+// OBSOLETE 	    /* if this file has only data, then make textlow match texthigh */
+// OBSOLETE 	    if (p1->textlow == 0)
+// OBSOLETE 	      p1->textlow = p1->texthigh;
+// OBSOLETE 	  }
+// OBSOLETE       }
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* End of kludge for patching Solaris textlow and texthigh.  */
+// OBSOLETE 
+// OBSOLETE   pst->n_global_syms =
+// OBSOLETE     objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
+// OBSOLETE   pst->n_static_syms =
+// OBSOLETE     objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
+// OBSOLETE 
+// OBSOLETE   pst->number_of_dependencies = number_dependencies;
+// OBSOLETE   if (number_dependencies)
+// OBSOLETE     {
+// OBSOLETE       pst->dependencies = (struct partial_symtab **)
+// OBSOLETE 	obstack_alloc (&objfile->psymbol_obstack,
+// OBSOLETE 		    number_dependencies * sizeof (struct partial_symtab *));
+// OBSOLETE       memcpy (pst->dependencies, dependency_list,
+// OBSOLETE 	      number_dependencies * sizeof (struct partial_symtab *));
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     pst->dependencies = 0;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i < num_includes; i++)
+// OBSOLETE     {
+// OBSOLETE       struct partial_symtab *subpst =
+// OBSOLETE       allocate_psymtab (include_list[i], objfile);
+// OBSOLETE 
+// OBSOLETE       subpst->section_offsets = pst->section_offsets;
+// OBSOLETE       subpst->read_symtab_private =
+// OBSOLETE 	(char *) obstack_alloc (&objfile->psymbol_obstack,
+// OBSOLETE 				sizeof (struct symloc));
+// OBSOLETE       LDSYMOFF (subpst) =
+// OBSOLETE 	LDSYMCNT (subpst) =
+// OBSOLETE 	subpst->textlow =
+// OBSOLETE 	subpst->texthigh = 0;
+// OBSOLETE 
+// OBSOLETE       /* We could save slight bits of space by only making one of these,
+// OBSOLETE          shared by the entire set of include files.  FIXME-someday.  */
+// OBSOLETE       subpst->dependencies = (struct partial_symtab **)
+// OBSOLETE 	obstack_alloc (&objfile->psymbol_obstack,
+// OBSOLETE 		       sizeof (struct partial_symtab *));
+// OBSOLETE       subpst->dependencies[0] = pst;
+// OBSOLETE       subpst->number_of_dependencies = 1;
+// OBSOLETE 
+// OBSOLETE       subpst->globals_offset =
+// OBSOLETE 	subpst->n_global_syms =
+// OBSOLETE 	subpst->statics_offset =
+// OBSOLETE 	subpst->n_static_syms = 0;
+// OBSOLETE 
+// OBSOLETE       subpst->readin = 0;
+// OBSOLETE       subpst->symtab = 0;
+// OBSOLETE       subpst->read_symtab = pst->read_symtab;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   sort_pst_symbols (pst);
+// OBSOLETE 
+// OBSOLETE   /* If there is already a psymtab or symtab for a file of this name, 
+// OBSOLETE      remove it.
+// OBSOLETE      (If there is a symtab, more drastic things also happen.)
+// OBSOLETE      This happens in VxWorks.  */
+// OBSOLETE   free_named_symtabs (pst->filename);
+// OBSOLETE 
+// OBSOLETE   if (num_includes == 0
+// OBSOLETE       && number_dependencies == 0
+// OBSOLETE       && pst->n_global_syms == 0
+// OBSOLETE       && pst->n_static_syms == 0)
+// OBSOLETE     {
+// OBSOLETE       /* Throw away this psymtab, it's empty.  We can't deallocate it, since
+// OBSOLETE          it is on the obstack, but we can forget to chain it on the list.  */
+// OBSOLETE       /* Indicate that psymtab was thrown away.  */
+// OBSOLETE 
+// OBSOLETE       discard_psymtab (pst);
+// OBSOLETE 
+// OBSOLETE       pst = (struct partial_symtab *) NULL;
+// OBSOLETE     }
+// OBSOLETE   return pst;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_psymtab_to_symtab_1 (struct partial_symtab *pst)
+// OBSOLETE {
+// OBSOLETE   struct cleanup *old_chain;
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   if (!pst)
+// OBSOLETE     return;
+// OBSOLETE 
+// OBSOLETE   if (pst->readin)
+// OBSOLETE     {
+// OBSOLETE       fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
+// OBSOLETE 			  pst->filename);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Read in all partial symtabs on which this one is dependent */
+// OBSOLETE   for (i = 0; i < pst->number_of_dependencies; i++)
+// OBSOLETE     if (!pst->dependencies[i]->readin)
+// OBSOLETE       {
+// OBSOLETE 	/* Inform about additional files that need to be read in.  */
+// OBSOLETE 	if (info_verbose)
+// OBSOLETE 	  {
+// OBSOLETE 	    fputs_filtered (" ", gdb_stdout);
+// OBSOLETE 	    wrap_here ("");
+// OBSOLETE 	    fputs_filtered ("and ", gdb_stdout);
+// OBSOLETE 	    wrap_here ("");
+// OBSOLETE 	    printf_filtered ("%s...", pst->dependencies[i]->filename);
+// OBSOLETE 	    wrap_here ("");	/* Flush output */
+// OBSOLETE 	    gdb_flush (gdb_stdout);
+// OBSOLETE 	  }
+// OBSOLETE 	os9k_psymtab_to_symtab_1 (pst->dependencies[i]);
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE   if (LDSYMCNT (pst))		/* Otherwise it's a dummy */
+// OBSOLETE     {
+// OBSOLETE       /* Init stuff necessary for reading in symbols */
+// OBSOLETE       stabsread_init ();
+// OBSOLETE       buildsym_init ();
+// OBSOLETE       old_chain = make_cleanup (really_free_pendings, 0);
+// OBSOLETE 
+// OBSOLETE       /* Read in this file's symbols */
+// OBSOLETE       os9k_read_ofile_symtab (pst);
+// OBSOLETE       sort_symtab_syms (pst->symtab);
+// OBSOLETE       do_cleanups (old_chain);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   pst->readin = 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read in all of the symbols for a given psymtab for real.
+// OBSOLETE    Be verbose about it if the user wants that.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_psymtab_to_symtab (struct partial_symtab *pst)
+// OBSOLETE {
+// OBSOLETE   bfd *sym_bfd;
+// OBSOLETE 
+// OBSOLETE   if (!pst)
+// OBSOLETE     return;
+// OBSOLETE 
+// OBSOLETE   if (pst->readin)
+// OBSOLETE     {
+// OBSOLETE       fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
+// OBSOLETE 			  pst->filename);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (LDSYMCNT (pst) || pst->number_of_dependencies)
+// OBSOLETE     {
+// OBSOLETE       /* Print the message now, before reading the string table,
+// OBSOLETE          to avoid disconcerting pauses.  */
+// OBSOLETE       if (info_verbose)
+// OBSOLETE 	{
+// OBSOLETE 	  printf_filtered ("Reading in symbols for %s...", pst->filename);
+// OBSOLETE 	  gdb_flush (gdb_stdout);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       sym_bfd = pst->objfile->obfd;
+// OBSOLETE       os9k_psymtab_to_symtab_1 (pst);
+// OBSOLETE 
+// OBSOLETE       /* Match with global symbols.  This only needs to be done once,
+// OBSOLETE          after all of the symtabs and dependencies have been read in.   */
+// OBSOLETE       scan_file_globals (pst->objfile);
+// OBSOLETE 
+// OBSOLETE       /* Finish up the debug error message.  */
+// OBSOLETE       if (info_verbose)
+// OBSOLETE 	printf_filtered ("done.\n");
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read in a defined section of a specific object file's symbols. */
+// OBSOLETE static void
+// OBSOLETE os9k_read_ofile_symtab (struct partial_symtab *pst)
+// OBSOLETE {
+// OBSOLETE   register struct internal_symstruct *bufp;
+// OBSOLETE   unsigned char type;
+// OBSOLETE   unsigned max_symnum;
+// OBSOLETE   register bfd *abfd;
+// OBSOLETE   struct objfile *objfile;
+// OBSOLETE   int sym_offset;		/* Offset to start of symbols to read */
+// OBSOLETE   CORE_ADDR text_offset;	/* Start of text segment for symbols */
+// OBSOLETE   int text_size;		/* Size of text segment for symbols */
+// OBSOLETE   FILE *dbg_file;
+// OBSOLETE 
+// OBSOLETE   objfile = pst->objfile;
+// OBSOLETE   sym_offset = LDSYMOFF (pst);
+// OBSOLETE   max_symnum = LDSYMCNT (pst);
+// OBSOLETE   text_offset = pst->textlow;
+// OBSOLETE   text_size = pst->texthigh - pst->textlow;
+// OBSOLETE 
+// OBSOLETE   current_objfile = objfile;
+// OBSOLETE   subfile_stack = NULL;
+// OBSOLETE   last_source_file = NULL;
+// OBSOLETE 
+// OBSOLETE   abfd = objfile->obfd;
+// OBSOLETE   dbg_file = objfile->auxf2;
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   /* It is necessary to actually read one symbol *before* the start
+// OBSOLETE      of this symtab's symbols, because the GCC_COMPILED_FLAG_SYMBOL
+// OBSOLETE      occurs before the N_SO symbol.
+// OBSOLETE      Detecting this in read_dbx_symtab
+// OBSOLETE      would slow down initial readin, so we look for it here instead. */
+// OBSOLETE   if (!processing_acc_compilation && sym_offset >= (int) symbol_size)
+// OBSOLETE     {
+// OBSOLETE       fseek (objefile->auxf2, sym_offset, SEEK_CUR);
+// OBSOLETE       fill_sym (objfile->auxf2, abfd);
+// OBSOLETE       bufp = symbuf;
+// OBSOLETE 
+// OBSOLETE       processing_gcc_compilation = 0;
+// OBSOLETE       if (bufp->n_type == N_TEXT)
+// OBSOLETE 	{
+// OBSOLETE 	  if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
+// OBSOLETE 	    processing_gcc_compilation = 1;
+// OBSOLETE 	  else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
+// OBSOLETE 	    processing_gcc_compilation = 2;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       /* Try to select a C++ demangling based on the compilation unit
+// OBSOLETE          producer. */
+// OBSOLETE 
+// OBSOLETE       if (processing_gcc_compilation)
+// OBSOLETE 	{
+// OBSOLETE 	  if (AUTO_DEMANGLING)
+// OBSOLETE 	    {
+// OBSOLETE 	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* The N_SO starting this symtab is the first symbol, so we
+// OBSOLETE          better not check the symbol before it.  I'm not this can
+// OBSOLETE          happen, but it doesn't hurt to check for it.  */
+// OBSOLETE       bfd_seek (symfile_bfd, sym_offset, SEEK_CUR);
+// OBSOLETE       processing_gcc_compilation = 0;
+// OBSOLETE     }
+// OBSOLETE #endif /* 0 */
+// OBSOLETE 
+// OBSOLETE   fseek (dbg_file, (long) sym_offset, 0);
+// OBSOLETE /*
+// OBSOLETE    if (bufp->n_type != (unsigned char)N_SYM_SYM)
+// OBSOLETE    error("First symbol in segment of executable not a source symbol");
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE   for (symnum = 0; symnum < max_symnum; symnum++)
+// OBSOLETE     {
+// OBSOLETE       QUIT;			/* Allow this to be interruptable */
+// OBSOLETE       fill_sym (dbg_file, abfd);
+// OBSOLETE       bufp = symbuf;
+// OBSOLETE       type = bufp->n_type;
+// OBSOLETE 
+// OBSOLETE       os9k_process_one_symbol ((int) type, (int) bufp->n_desc,
+// OBSOLETE 	 (CORE_ADDR) bufp->n_value, bufp->n_strx, pst->section_offsets, objfile);
+// OBSOLETE 
+// OBSOLETE       /* We skip checking for a new .o or -l file; that should never
+// OBSOLETE          happen in this routine. */
+// OBSOLETE #if 0
+// OBSOLETE       else
+// OBSOLETE       if (type == N_TEXT)
+// OBSOLETE 	{
+// OBSOLETE 	  /* I don't think this code will ever be executed, because
+// OBSOLETE 	     the GCC_COMPILED_FLAG_SYMBOL usually is right before
+// OBSOLETE 	     the N_SO symbol which starts this source file.
+// OBSOLETE 	     However, there is no reason not to accept
+// OBSOLETE 	     the GCC_COMPILED_FLAG_SYMBOL anywhere.  */
+// OBSOLETE 
+// OBSOLETE 	  if (STREQ (namestring, GCC_COMPILED_FLAG_SYMBOL))
+// OBSOLETE 	    processing_gcc_compilation = 1;
+// OBSOLETE 	  else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
+// OBSOLETE 	    processing_gcc_compilation = 2;
+// OBSOLETE 
+// OBSOLETE 	  if (AUTO_DEMANGLING)
+// OBSOLETE 	    {
+// OBSOLETE 	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else if (type & N_EXT || type == (unsigned char) N_TEXT
+// OBSOLETE 	       || type == (unsigned char) N_NBTEXT
+// OBSOLETE 	)
+// OBSOLETE 	{
+// OBSOLETE 	  /* Global symbol: see if we came across a dbx defintion for
+// OBSOLETE 	     a corresponding symbol.  If so, store the value.  Remove
+// OBSOLETE 	     syms from the chain when their values are stored, but
+// OBSOLETE 	     search the whole chain, as there may be several syms from
+// OBSOLETE 	     different files with the same name. */
+// OBSOLETE 	  /* This is probably not true.  Since the files will be read
+// OBSOLETE 	     in one at a time, each reference to a global symbol will
+// OBSOLETE 	     be satisfied in each file as it appears. So we skip this
+// OBSOLETE 	     section. */
+// OBSOLETE 	  ;
+// OBSOLETE 	}
+// OBSOLETE #endif /* 0 */
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   current_objfile = NULL;
+// OBSOLETE 
+// OBSOLETE   /* In a Solaris elf file, this variable, which comes from the
+// OBSOLETE      value of the N_SO symbol, will still be 0.  Luckily, text_offset,
+// OBSOLETE      which comes from pst->textlow is correct. */
+// OBSOLETE   if (last_source_start_addr == 0)
+// OBSOLETE     last_source_start_addr = text_offset;
+// OBSOLETE   pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
+// OBSOLETE   end_stabs ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* This handles a single symbol from the symbol-file, building symbols
+// OBSOLETE    into a GDB symtab.  It takes these arguments and an implicit argument.
+// OBSOLETE 
+// OBSOLETE    TYPE is the type field of the ".stab" symbol entry.
+// OBSOLETE    DESC is the desc field of the ".stab" entry.
+// OBSOLETE    VALU is the value field of the ".stab" entry.
+// OBSOLETE    NAME is the symbol name, in our address space.
+// OBSOLETE    SECTION_OFFSETS is a set of amounts by which the sections of this object
+// OBSOLETE    file were relocated when it was loaded into memory.
+// OBSOLETE    All symbols that refer
+// OBSOLETE    to memory locations need to be offset by these amounts.
+// OBSOLETE    OBJFILE is the object file from which we are reading symbols.
+// OBSOLETE    It is used in end_symtab.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
+// OBSOLETE 			 struct section_offsets *section_offsets,
+// OBSOLETE 			 struct objfile *objfile)
+// OBSOLETE {
+// OBSOLETE   register struct context_stack *new;
+// OBSOLETE   /* The stab type used for the definition of the last function.
+// OBSOLETE      N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers.  */
+// OBSOLETE   static int function_stab_type = 0;
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   /* Something is wrong if we see real data before
+// OBSOLETE      seeing a source file name.  */
+// OBSOLETE   if (last_source_file == NULL && type != (unsigned char) N_SO)
+// OBSOLETE     {
+// OBSOLETE       /* Ignore any symbols which appear before an N_SO symbol.
+// OBSOLETE          Currently no one puts symbols there, but we should deal
+// OBSOLETE          gracefully with the case.  A complain()t might be in order,
+// OBSOLETE          but this should not be an error ().  */
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE #endif /* 0 */
+// OBSOLETE 
+// OBSOLETE   switch (type)
+// OBSOLETE     {
+// OBSOLETE     case N_SYM_LBRAC:
+// OBSOLETE       /* On most machines, the block addresses are relative to the
+// OBSOLETE          N_SO, the linker did not relocate them (sigh).  */
+// OBSOLETE       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE       new = push_context (desc, valu);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case N_SYM_RBRAC:
+// OBSOLETE       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE       new = pop_context ();
+// OBSOLETE 
+// OBSOLETE #if !defined (OS9K_VARIABLES_INSIDE_BLOCK)
+// OBSOLETE #define OS9K_VARIABLES_INSIDE_BLOCK(desc, gcc_p) 1
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE       if (!OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
+// OBSOLETE 	local_symbols = new->locals;
+// OBSOLETE 
+// OBSOLETE       if (context_stack_depth > 1)
+// OBSOLETE 	{
+// OBSOLETE 	  /* This is not the outermost LBRAC...RBRAC pair in the function,
+// OBSOLETE 	     its local symbols preceded it, and are the ones just recovered
+// OBSOLETE 	     from the context stack.  Define the block for them (but don't
+// OBSOLETE 	     bother if the block contains no symbols.  Should we complain
+// OBSOLETE 	     on blocks without symbols?  I can't think of any useful purpose
+// OBSOLETE 	     for them).  */
+// OBSOLETE 	  if (local_symbols != NULL)
+// OBSOLETE 	    {
+// OBSOLETE 	      /* Muzzle a compiler bug that makes end < start.  (which
+// OBSOLETE 	         compilers?  Is this ever harmful?).  */
+// OBSOLETE 	      if (new->start_addr > valu)
+// OBSOLETE 		{
+// OBSOLETE 		  complain (&lbrac_rbrac_complaint);
+// OBSOLETE 		  new->start_addr = valu;
+// OBSOLETE 		}
+// OBSOLETE 	      /* Make a block for the local symbols within.  */
+// OBSOLETE 	      finish_block (0, &local_symbols, new->old_blocks,
+// OBSOLETE 			    new->start_addr, valu, objfile);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  if (context_stack_depth == 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      within_function = 0;
+// OBSOLETE 	      /* Make a block for the local symbols within.  */
+// OBSOLETE 	      finish_block (new->name, &local_symbols, new->old_blocks,
+// OBSOLETE 			    new->start_addr, valu, objfile);
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      /* attach local_symbols to the end of new->locals */
+// OBSOLETE 	      if (!new->locals)
+// OBSOLETE 		new->locals = local_symbols;
+// OBSOLETE 	      else
+// OBSOLETE 		{
+// OBSOLETE 		  struct pending *p;
+// OBSOLETE 
+// OBSOLETE 		  p = new->locals;
+// OBSOLETE 		  while (p->next)
+// OBSOLETE 		    p = p->next;
+// OBSOLETE 		  p->next = local_symbols;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (OS9K_VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation))
+// OBSOLETE 	/* Now pop locals of block just finished.  */
+// OBSOLETE 	local_symbols = new->locals;
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE     case N_SYM_SLINE:
+// OBSOLETE       /* This type of "symbol" really just records
+// OBSOLETE          one line-number -- core-address correspondence.
+// OBSOLETE          Enter it in the line list for this symbol table. */
+// OBSOLETE       /* Relocate for dynamic loading and for ELF acc fn-relative syms.  */
+// OBSOLETE       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE       /* FIXME: loses if sizeof (char *) > sizeof (int) */
+// OBSOLETE       gdb_assert (sizeof (name) <= sizeof (int));
+// OBSOLETE       record_line (current_subfile, (int) name, valu);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE       /* The following symbol types need to have the appropriate offset added
+// OBSOLETE          to their value; then we process symbol definitions in the name.  */
+// OBSOLETE     case N_SYM_SYM:
+// OBSOLETE 
+// OBSOLETE       if (name)
+// OBSOLETE 	{
+// OBSOLETE 	  char deftype;
+// OBSOLETE 	  char *dirn, *n;
+// OBSOLETE 	  char *p = strchr (name, ':');
+// OBSOLETE 	  if (p == NULL)
+// OBSOLETE 	    deftype = '\0';
+// OBSOLETE 	  else
+// OBSOLETE 	    deftype = p[1];
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE 	  switch (deftype)
+// OBSOLETE 	    {
+// OBSOLETE 	    case 'S':
+// OBSOLETE 	      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 	      n = strrchr (name, '/');
+// OBSOLETE 	      if (n != NULL)
+// OBSOLETE 		{
+// OBSOLETE 		  *n = '\0';
+// OBSOLETE 		  n++;
+// OBSOLETE 		  dirn = name;
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		{
+// OBSOLETE 		  n = name;
+// OBSOLETE 		  dirn = NULL;
+// OBSOLETE 		}
+// OBSOLETE 	      *p = '\0';
+// OBSOLETE 	      if (symfile_depth++ == 0)
+// OBSOLETE 		{
+// OBSOLETE 		  if (last_source_file)
+// OBSOLETE 		    {
+// OBSOLETE 		      end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
+// OBSOLETE 		      end_stabs ();
+// OBSOLETE 		    }
+// OBSOLETE 		  start_stabs ();
+// OBSOLETE 		  os9k_stabs = 1;
+// OBSOLETE 		  start_symtab (n, dirn, valu);
+// OBSOLETE 		  record_debugformat ("OS9");
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		{
+// OBSOLETE 		  push_subfile ();
+// OBSOLETE 		  start_subfile (n, dirn != NULL ? dirn : current_subfile->dirname);
+// OBSOLETE 		}
+// OBSOLETE 	      break;
+// OBSOLETE 
+// OBSOLETE 	    case 'f':
+// OBSOLETE 	    case 'F':
+// OBSOLETE 	      valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
+// OBSOLETE 	      function_stab_type = type;
+// OBSOLETE 
+// OBSOLETE 	      within_function = 1;
+// OBSOLETE 	      new = push_context (0, valu);
+// OBSOLETE 	      new->name = define_symbol (valu, name, desc, type, objfile);
+// OBSOLETE 	      break;
+// OBSOLETE 
+// OBSOLETE 	    case 'V':
+// OBSOLETE 	    case 'v':
+// OBSOLETE 	      valu += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
+// OBSOLETE 	      define_symbol (valu, name, desc, type, objfile);
+// OBSOLETE 	      break;
+// OBSOLETE 
+// OBSOLETE 	    default:
+// OBSOLETE 	      define_symbol (valu, name, desc, type, objfile);
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case N_SYM_SE:
+// OBSOLETE       if (--symfile_depth != 0)
+// OBSOLETE 	start_subfile (pop_subfile (), current_subfile->dirname);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default:
+// OBSOLETE       complain (&unknown_symtype_complaint,
+// OBSOLETE 		local_hex_string ((unsigned long) type));
+// OBSOLETE       /* FALLTHROUGH */
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case N_SYM_CMPLR:
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE   previous_stab_code = type;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct sym_fns os9k_sym_fns =
+// OBSOLETE {
+// OBSOLETE   bfd_target_os9k_flavour,
+// OBSOLETE   os9k_new_init,		/* sym_new_init: init anything gbl to entire symtab */
+// OBSOLETE   os9k_symfile_init,		/* sym_init: read initial info, setup for sym_read() */
+// OBSOLETE   os9k_symfile_read,		/* sym_read: read a symbol file into symtab */
+// OBSOLETE   os9k_symfile_finish,		/* sym_finish: finished with file, cleanup */
+// OBSOLETE   default_symfile_offsets,	/* sym_offsets: parse user's offsets to internal form */
+// OBSOLETE   NULL				/* next: pointer to next struct sym_fns */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_os9kread (void)
+// OBSOLETE {
+// OBSOLETE   add_symtab_fns (&os9k_sym_fns);
+// OBSOLETE }
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 4186cbd..83eb767 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -40,6 +40,10 @@
   "NetBSD a.out",
   "NetBSD ELF",
   "Windows CE",
+  "DJGPP",
+  "NetWare",
+  "Irix",
+  "LynxOS",
 
   "ARM EABI v1",
   "ARM EABI v2",
@@ -228,13 +232,8 @@
 
   if (osabi == GDB_OSABI_UNKNOWN)
     {
-      /* Don't complain about not knowing the OS ABI if we don't
-	 have an inferior.  */
-      if (info.abfd)
-	fprintf_filtered
-	  (gdb_stderr, "GDB doesn't recognize the OS ABI of the inferior.  "
-	   "Attempting to continue with the default %s settings",
-	   bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
+      /* Don't complain about an unknown OSABI.  Assume the user knows
+         what they are doing.  */
       return;
     }
 
@@ -405,6 +404,15 @@
       break;
     }
 
+  if (osabi == GDB_OSABI_UNKNOWN)
+    {
+      /* The FreeBSD folks have been naughty; they stored the string
+         "FreeBSD" in the padding of the e_ident field of the ELF
+         header to "brand" their ELF binaries in FreeBSD 3.x.  */
+      if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
+	osabi = GDB_OSABI_FREEBSD_ELF;
+    }
+
   return osabi;
 }
 
diff --git a/gdb/osabi.h b/gdb/osabi.h
index 23e7025..f62bde7 100644
--- a/gdb/osabi.h
+++ b/gdb/osabi.h
@@ -37,6 +37,10 @@
   GDB_OSABI_NETBSD_AOUT,
   GDB_OSABI_NETBSD_ELF,
   GDB_OSABI_WINCE,
+  GDB_OSABI_GO32,
+  GDB_OSABI_NETWARE,
+  GDB_OSABI_IRIX,
+  GDB_OSABI_LYNXOS,
 
   GDB_OSABI_ARM_EABI_V1,
   GDB_OSABI_ARM_EABI_V2,
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 7333f6d..fbdd3f6 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -104,9 +104,11 @@
 #define yycheck	 pascal_yycheck
 
 #ifndef YYDEBUG
-#define	YYDEBUG	0		/* Default to no yydebug support */
+#define	YYDEBUG 1		/* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c
index e8de788..293de70 100644
--- a/gdb/p-typeprint.c
+++ b/gdb/p-typeprint.c
@@ -21,7 +21,7 @@
 /* This file is derived from p-typeprint.c */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bfd.h"		/* Binary File Description */
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index c8060a2..06a8216 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -21,7 +21,7 @@
 /* This file is derived from c-valprint.c */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 0058cbf..fce8fea 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -1,5 +1,6 @@
 /* Handle HP ELF shared libraries for GDB, the GNU Debugger.
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -47,7 +48,6 @@
 #include "gdb-stabs.h"
 #include "gdb_stat.h"
 #include "gdbcmd.h"
-#include "assert.h"
 #include "language.h"
 #include "regcache.h"
 
@@ -109,7 +109,7 @@
 typedef struct
   {
     CORE_ADDR dld_flags_addr;
-    long long dld_flags;
+    LONGEST dld_flags;
     sec_ptr dyninfo_sect;
     boolean have_read_dld_descriptor;
     boolean is_valid;
@@ -251,7 +251,7 @@
 
   /* Now find the true lowest section in the shared library.  */
   sec = NULL;
-  bfd_map_over_sections (tmp_bfd, find_lowest_section, (PTR) &sec);
+  bfd_map_over_sections (tmp_bfd, find_lowest_section, &sec);
 
   if (sec)
     {
@@ -283,7 +283,7 @@
 		       sizeof (obj_private_data_t));
       obj_private->unwind_info = NULL;
       obj_private->so_info = NULL;
-      so->objfile->obj_private = (PTR) obj_private;
+      so->objfile->obj_private = obj_private;
     }
 
   obj_private = (obj_private_data_t *) so->objfile->obj_private;
@@ -1224,13 +1224,13 @@
   if (storage_needed > 0)
     {
       symbol_table = (asymbol **) xmalloc (storage_needed);
-      back_to = make_cleanup (xfree, (PTR) symbol_table);
+      back_to = make_cleanup (xfree, symbol_table);
       number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
 
       for (i = 0; i < number_of_symbols; i++)
 	{
 	  sym = *symbol_table++;
-	  if (STREQ (sym->name, symname))
+	  if (strcmp (sym->name, symname) == 0)
 	    {
 	      /* Bfd symbols are section relative. */
 	      symaddr = sym->value + sym->section->vma;
diff --git a/gdb/parse.c b/gdb/parse.c
index bc81f22..c5de0af 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1366,6 +1366,23 @@
 	       NULL);
 }
 
+/* This function avoids direct calls to fprintf 
+   in the parser generated debug code.  */
+void
+parser_fprintf (FILE *x, const char *y, ...)
+{ 
+  va_list args;
+  va_start (args, y);
+  if (x == stderr)
+    vfprintf_unfiltered (gdb_stderr, y, args); 
+  else
+    {
+      fprintf_unfiltered (gdb_stderr, " Unknown FILE used.\n");
+      vfprintf_unfiltered (gdb_stderr, y, args);
+    }
+  va_end (args);
+}
+
 void
 _initialize_parse (void)
 {
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 7db1c77e..748208a 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -41,7 +41,7 @@
    the block that we want to evaluate expressions at.  When debugging
    C or C++ code, we use this to find the exact line we're at, and
    then look up the macro definitions active at that point.  */
-CORE_ADDR expression_context_pc;
+extern CORE_ADDR expression_context_pc;
 
 /* The innermost context required by the stack and register variables
    we've encountered so far. */
@@ -216,4 +216,9 @@
 
 extern int target_map_name_to_register (char *, int);
 
+/* Function used to avoid direct calls to fprintf
+   in the code generated by the bison parser.  */
+
+extern void parser_fprintf (FILE *, const char *, ...) ATTR_FORMAT (printf, 2 ,3);
+
 #endif /* PARSER_DEFS_H */
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 25616c0..721e05f 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -475,21 +475,7 @@
 void
 supply_gregset (gdb_gregset_t *gregsetp)
 {
-  int regi;
-  register elf_greg_t *regp = (elf_greg_t *) gregsetp;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
-
-  for (regi = 0; regi < 32; regi++)
-    supply_register (regi, (char *) (regp + regi));
-
-  supply_register (PC_REGNUM, (char *) (regp + PT_NIP));
-  supply_register (tdep->ppc_lr_regnum, (char *) (regp + PT_LNK));
-  supply_register (tdep->ppc_cr_regnum, (char *) (regp + PT_CCR));
-  supply_register (tdep->ppc_xer_regnum, (char *) (regp + PT_XER));
-  supply_register (tdep->ppc_ctr_regnum, (char *) (regp + PT_CTR));
-  if (tdep->ppc_mq_regnum != -1)
-    supply_register (tdep->ppc_mq_regnum, (char *) (regp + PT_MQ));
-  supply_register (tdep->ppc_ps_regnum, (char *) (regp + PT_MSR));
+  ppc_linux_supply_gregset ((char *) gregsetp);
 }
 
 void
@@ -525,12 +511,7 @@
 void
 supply_fpregset (gdb_fpregset_t * fpregsetp)
 {
-  int regi;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
-
-  for (regi = 0; regi < 32; regi++)
-    supply_register (FP0_REGNUM + regi, (char *) (*fpregsetp + regi));
-  supply_register (tdep->ppc_fpscr_regnum, (char *) (*fpregsetp + 32));
+  ppc_linux_supply_fpregset ((char *) fpregsetp);
 }
 
 /* Given a pointer to a floating point register set in /proc format
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index f358274..6adfe29 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -411,293 +411,6 @@
     return rs6000_frame_chain (thisframe);
 }
 
-/* FIXME: Move the following to rs6000-tdep.c (or some other file where
-   it may be used generically by ports which use either the SysV ABI or
-   the EABI */
-
-/* Until November 2001, gcc was not complying to the SYSV ABI for
-   returning structures less than or equal to 8 bytes in size.  It was
-   returning everything in memory.  When this was corrected, it wasn't
-   fixed for native platforms.  */
-int
-ppc_sysv_abi_broken_use_struct_convention (int gcc_p, struct type *value_type)
-{
-  if (TYPE_LENGTH (value_type) == 16
-      && TYPE_VECTOR (value_type))
-    return 0;
-
-  return generic_use_struct_convention (gcc_p, value_type);
-}
-
-/* Structures 8 bytes or less long are returned in the r3 & r4
-   registers, according to the SYSV ABI. */
-int
-ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
-{
-  if (TYPE_LENGTH (value_type) == 16
-      && TYPE_VECTOR (value_type))
-    return 0;
-
-  return (TYPE_LENGTH (value_type) > 8);
-}
-
-/* round2 rounds x up to the nearest multiple of s assuming that s is a
-   power of 2 */
-
-#undef round2
-#define round2(x,s) ((((long) (x) - 1) & ~(long)((s)-1)) + (s))
-
-/* Pass the arguments in either registers, or in the stack. Using the
-   ppc sysv ABI, the first eight words of the argument list (that might
-   be less than eight parameters if some parameters occupy more than one
-   word) are passed in r3..r10 registers.  float and double parameters are
-   passed in fpr's, in addition to that. Rest of the parameters if any
-   are passed in user stack. 
-
-   If the function is returning a structure, then the return address is passed
-   in r3, then the first 7 words of the parametes can be passed in registers,
-   starting from r4. */
-
-CORE_ADDR
-ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-			     int struct_return, CORE_ADDR struct_addr)
-{
-  int argno;
-  /* Next available general register for non-float, non-vector arguments. */
-  int greg;
-  /* Next available floating point register for float arguments. */
-  int freg;
-  /* Next available vector register for vector arguments. */
-  int vreg;
-  int argstkspace;
-  int structstkspace;
-  int argoffset;
-  int structoffset;
-  struct value *arg;
-  struct type *type;
-  int len;
-  char old_sp_buf[4];
-  CORE_ADDR saved_sp;
-
-  greg = struct_return ? 4 : 3;
-  freg = 1;
-  vreg = 2;
-  argstkspace = 0;
-  structstkspace = 0;
-
-  /* Figure out how much new stack space is required for arguments
-     which don't fit in registers.  Unlike the PowerOpen ABI, the
-     SysV ABI doesn't reserve any extra space for parameters which
-     are put in registers. */
-  for (argno = 0; argno < nargs; argno++)
-    {
-      arg = args[argno];
-      type = check_typedef (VALUE_TYPE (arg));
-      len = TYPE_LENGTH (type);
-
-      if (TYPE_CODE (type) == TYPE_CODE_FLT)
-	{
-	  if (freg <= 8)
-	    freg++;
-	  else
-	    {
-	      /* SysV ABI converts floats to doubles when placed in
-	         memory and requires 8 byte alignment */
-	      if (argstkspace & 0x4)
-		argstkspace += 4;
-	      argstkspace += 8;
-	    }
-	}
-      else if (TYPE_CODE (type) == TYPE_CODE_INT && len == 8)	/* long long */
-	{
-	  if (greg > 9)
-	    {
-	      greg = 11;
-	      if (argstkspace & 0x4)
-		argstkspace += 4;
-	      argstkspace += 8;
-	    }
-	  else
-	    {
-	      if ((greg & 1) == 0)
-		greg++;
-	      greg += 2;
-	    }
-	}
-      else if (!TYPE_VECTOR (type))
-        {
-	  if (len > 4
-	      || TYPE_CODE (type) == TYPE_CODE_STRUCT
-	      || TYPE_CODE (type) == TYPE_CODE_UNION)
-	    {
-	      /* Rounding to the nearest multiple of 8 may not be necessary,
-		 but it is safe.  Particularly since we don't know the
-		 field types of the structure */
-	      structstkspace += round2 (len, 8);
-	    }
-	  if (greg <= 10)
-	    greg++;
-	  else
-	    argstkspace += 4;
-    	}
-      else
-        {
-          if (len == 16
-	      && TYPE_CODE (type) == TYPE_CODE_ARRAY
-	      && TYPE_VECTOR (type))
-	    {
-	      if (vreg <= 13)
-		vreg++;
-	      else
-		{
-		  /* Vector arguments must be aligned to 16 bytes on
-                     the stack. */
-		  argstkspace += round2 (argstkspace, 16);
-		  argstkspace += 16;
-		}
-	    }
-	}
-    }
-
-  /* Get current SP location */
-  saved_sp = read_sp ();
-
-  sp -= argstkspace + structstkspace;
-
-  /* Allocate space for backchain and callee's saved lr */
-  sp -= 8;
-
-  /* Make sure that we maintain 16 byte alignment */
-  sp &= ~0x0f;
-
-  /* Update %sp before proceeding any further */
-  write_register (SP_REGNUM, sp);
-
-  /* write the backchain */
-  store_address (old_sp_buf, 4, saved_sp);
-  write_memory (sp, old_sp_buf, 4);
-
-  argoffset = 8;
-  structoffset = argoffset + argstkspace;
-  freg = 1;
-  greg = 3;
-  vreg = 2;
-  /* Fill in r3 with the return structure, if any */
-  if (struct_return)
-    {
-      char val_buf[4];
-      store_address (val_buf, 4, struct_addr);
-      memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
-      greg++;
-    }
-  /* Now fill in the registers and stack... */
-  for (argno = 0; argno < nargs; argno++)
-    {
-      arg = args[argno];
-      type = check_typedef (VALUE_TYPE (arg));
-      len = TYPE_LENGTH (type);
-
-      if (TYPE_CODE (type) == TYPE_CODE_FLT)
-	{
-	  if (freg <= 8)
-	    {
-	      if (len > 8)
-		printf_unfiltered (
-				   "Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
-	      memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + freg)],
-		      VALUE_CONTENTS (arg), len);
-	      freg++;
-	    }
-	  else
-	    {
-	      /* SysV ABI converts floats to doubles when placed in
-	         memory and requires 8 byte alignment */
-	      /* FIXME: Convert floats to doubles */
-	      if (argoffset & 0x4)
-		argoffset += 4;
-	      write_memory (sp + argoffset, (char *) VALUE_CONTENTS (arg), len);
-	      argoffset += 8;
-	    }
-	}
-      else if (TYPE_CODE (type) == TYPE_CODE_INT && len == 8)	/* long long */
-	{
-	  if (greg > 9)
-	    {
-	      greg = 11;
-	      if (argoffset & 0x4)
-		argoffset += 4;
-	      write_memory (sp + argoffset, (char *) VALUE_CONTENTS (arg), len);
-	      argoffset += 8;
-	    }
-	  else
-	    {
-	      if ((greg & 1) == 0)
-		greg++;
-
-	      memcpy (&registers[REGISTER_BYTE (greg)],
-		      VALUE_CONTENTS (arg), 4);
-	      memcpy (&registers[REGISTER_BYTE (greg + 1)],
-		      VALUE_CONTENTS (arg) + 4, 4);
-	      greg += 2;
-	    }
-	}
-      else if (!TYPE_VECTOR (type))
-	{
-	  char val_buf[4];
-	  if (len > 4
-	      || TYPE_CODE (type) == TYPE_CODE_STRUCT
-	      || TYPE_CODE (type) == TYPE_CODE_UNION)
-	    {
-	      write_memory (sp + structoffset, VALUE_CONTENTS (arg), len);
-	      store_address (val_buf, 4, sp + structoffset);
-	      structoffset += round2 (len, 8);
-	    }
-	  else
-	    {
-	      memset (val_buf, 0, 4);
-	      memcpy (val_buf, VALUE_CONTENTS (arg), len);
-	    }
-	  if (greg <= 10)
-	    {
-	      memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
-	      greg++;
-	    }
-	  else
-	    {
-	      write_memory (sp + argoffset, val_buf, 4);
-	      argoffset += 4;
-	    }
-	}
-      else
-	{
-	  if (len == 16
-	      && TYPE_CODE (type) == TYPE_CODE_ARRAY
-	      && TYPE_VECTOR (type))
-	    {
-	      struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-	      char *v_val_buf = alloca (16);
-	      memset (v_val_buf, 0, 16);
-	      memcpy (v_val_buf, VALUE_CONTENTS (arg), len);
-	      if (vreg <= 13)
-		{
-		  memcpy (&registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
-						    + vreg)],
-			  v_val_buf, 16);
-		  vreg++;
-		}
-	      else
-		{
-		  write_memory (sp + argoffset, v_val_buf, 16);
-		  argoffset += 16;
-		}
-	    }
-        }
-    }
-
-  target_store_registers (-1);
-  return sp;
-}
-
 /* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint
    in much the same fashion as memory_remove_breakpoint in mem-break.c,
    but is careful not to write back the previous contents if the code
@@ -886,3 +599,127 @@
 
   return lmp;
 }
+
+enum {
+  ELF_NGREG = 48,
+  ELF_NFPREG = 33,
+  ELF_NVRREG = 33
+};
+
+enum {
+  ELF_GREGSET_SIZE = (ELF_NGREG * 4),
+  ELF_FPREGSET_SIZE = (ELF_NFPREG * 8)
+};
+
+void
+ppc_linux_supply_gregset (char *buf)
+{
+  int regi;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+
+  for (regi = 0; regi < 32; regi++)
+    supply_register (regi, buf + 4 * regi);
+
+  supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP);
+  supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK);
+  supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR);
+  supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER);
+  supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR);
+  if (tdep->ppc_mq_regnum != -1)
+    supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ);
+  supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR);
+}
+
+void
+ppc_linux_supply_fpregset (char *buf)
+{
+  int regi;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+
+  for (regi = 0; regi < 32; regi++)
+    supply_register (FP0_REGNUM + regi, buf + 8 * regi);
+
+  /* The FPSCR is stored in the low order word of the last doubleword in the
+     fpregset.  */
+  supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4);
+}
+
+/*
+  Use a local version of this function to get the correct types for regsets.
+*/
+
+static void
+fetch_core_registers (char *core_reg_sect,
+		      unsigned core_reg_size,
+		      int which,
+		      CORE_ADDR reg_addr)
+{
+  if (which == 0)
+    {
+      if (core_reg_size == ELF_GREGSET_SIZE)
+	ppc_linux_supply_gregset (core_reg_sect);
+      else
+	warning ("wrong size gregset struct in core file");
+    }
+  else if (which == 2)
+    {
+      if (core_reg_size == ELF_FPREGSET_SIZE)
+	ppc_linux_supply_fpregset (core_reg_sect);
+      else
+	warning ("wrong size fpregset struct in core file");
+    }
+}
+
+/* Register that we are able to handle ELF file formats using standard
+   procfs "regset" structures.  */
+
+static struct core_fns ppc_linux_regset_core_fns =
+{
+  bfd_target_elf_flavour,	/* core_flavour */
+  default_check_format,		/* check_format */
+  default_core_sniffer,		/* core_sniffer */
+  fetch_core_registers,		/* core_read_registers */
+  NULL				/* next */
+};
+
+static void
+ppc_linux_init_abi (struct gdbarch_info info,
+                    struct gdbarch *gdbarch)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+  /* Until November 2001, gcc was not complying to the SYSV ABI for
+     returning structures less than or equal to 8 bytes in size. It was
+     returning everything in memory. When this was corrected, it wasn't
+     fixed for native platforms.  */
+  set_gdbarch_use_struct_convention (gdbarch,
+                                   ppc_sysv_abi_broken_use_struct_convention);
+
+  if (tdep->wordsize == 4)
+    {
+      /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
+	 *_push_arguments().  The same remarks hold for the methods below.  */
+      set_gdbarch_frameless_function_invocation (gdbarch,
+        ppc_linux_frameless_function_invocation);
+      set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
+      set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
+
+      set_gdbarch_frame_init_saved_regs (gdbarch,
+                                         ppc_linux_frame_init_saved_regs);
+      set_gdbarch_init_extra_frame_info (gdbarch,
+                                         ppc_linux_init_extra_frame_info);
+
+      set_gdbarch_memory_remove_breakpoint (gdbarch,
+                                            ppc_linux_memory_remove_breakpoint);
+      set_solib_svr4_fetch_link_map_offsets
+        (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
+    }
+}
+
+void
+_initialize_ppc_linux_tdep (void)
+{
+  gdbarch_register_osabi (bfd_arch_powerpc, GDB_OSABI_LINUX,
+			  ppc_linux_init_abi);
+  add_core_fns (&ppc_linux_regset_core_fns);
+}
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index 3da66ad..48c5647 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -22,6 +22,8 @@
 #ifndef PPC_TDEP_H
 #define PPC_TDEP_H
 
+#include "osabi.h"
+
 struct frame_info;
 struct value;
 
@@ -37,6 +39,8 @@
 				       CORE_ADDR);
 int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
 struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
+void ppc_linux_supply_gregset (char *buf);
+void ppc_linux_supply_fpregset (char *buf);
 
 
 /* From rs6000-tdep.c... */
@@ -52,7 +56,7 @@
 struct gdbarch_tdep
   {
     int wordsize;              /* size in bytes of fixed-point word */
-    int osabi;                 /* OS / ABI from ELF header */
+    enum gdb_osabi osabi;      /* OS / ABI from ELF header */
     int *regoff;               /* byte offsets in register arrays */
     const struct reg *regs;    /* from current variant */
     int ppc_gp0_regnum;		/* GPR register 0 */
@@ -68,6 +72,8 @@
     int ppc_mq_regnum;		/* Multiply/Divide extension register */
     int ppc_vr0_regnum;		/* First AltiVec register */
     int ppc_vrsave_regnum;	/* Last AltiVec register */
+    int ppc_ev0_regnum;         /* First ev register */
+    int ppc_ev31_regnum;        /* Last ev register */
     int lr_frame_offset;	/* Offset to ABI specific location where
                                    link register is saved.  */
 };
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c
index 2e43ce4..ce097d7 100644
--- a/gdb/ppcnbsd-nat.c
+++ b/gdb/ppcnbsd-nat.c
@@ -25,8 +25,6 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "gdbcore.h"
-#include "regcache.h"
 
 #include "ppc-tdep.h"
 #include "ppcnbsd-tdep.h"
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 16662fd..6fabab7 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -200,12 +200,8 @@
 ppcnbsd_init_abi (struct gdbarch_info info,
                   struct gdbarch *gdbarch)
 {
-  /* Until November 2001, gcc was not complying to the SYSV ABI for
-     returning structures less than or equal to 8 bytes in size. It was
-     returning everything in memory. When this was corrected, it wasn't
-     fixed for native platforms.  */
-  set_gdbarch_use_struct_convention (gdbarch,
-                                   ppc_sysv_abi_broken_use_struct_convention);
+  /* Stop at main.  */
+  set_gdbarch_frame_chain_valid (gdbarch, generic_func_frame_chain_valid);
 
   set_solib_svr4_fetch_link_map_offsets (gdbarch,
                                 nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index de306f0..2e57050 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -40,6 +40,7 @@
 #include "objfiles.h"		/* ditto */
 #include "completer.h"		/* for completion functions */
 #include "ui-out.h"
+#include "gdb_assert.h"
 
 extern int asm_demangle;	/* Whether to demangle syms in asm printouts */
 extern int addressprint;	/* Whether to print hex addresses in HLL " */
@@ -1785,6 +1786,10 @@
   if (func)
     {
       b = SYMBOL_BLOCK_VALUE (func);
+      /* Function blocks are order sensitive, and thus should not be
+	 hashed.  */
+      gdb_assert (BLOCK_HASHTABLE (b) == 0);
+
       ALL_BLOCK_SYMBOLS (b, i, sym)
         {
 	  QUIT;
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index 2d3ca9f..a74882d 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -36,7 +36,9 @@
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/procfs.h>
+#ifdef HAVE_SYS_PROC_H
 #include <sys/proc.h>	/* for struct proc */
+#endif
 #ifdef HAVE_SYS_USER_H
 #include <sys/user.h>	/* for struct user */
 #endif
@@ -395,9 +397,13 @@
 #ifdef PCCSIG			/* solaris */
   { PCCSIG,   "PCCSIG",   "clear current signal" },
 #endif
+#ifdef PCDSTOP			/* solaris */
   { PCDSTOP,  "PCDSTOP",  "post stop request" },
+#endif
   { PCKILL,   "PCKILL",   "post a signal" },
+#ifdef PCNICE			/* solaris */
   { PCNICE,   "PCNICE",   "set nice priority" },
+#endif
 #ifdef PCREAD			/* solaris */
   { PCREAD,   "PCREAD",   "read from the address space" },
   { PCWRITE,  "PCWRITE",  "write to the address space" },
@@ -417,7 +423,9 @@
   { PCSEXIT,  "PCSEXIT",  "set traced syscall exit  set" },
   { PCSFAULT, "PCSFAULT", "set traced fault set" },
   { PCSFPREG, "PCSFPREG", "set floating point registers" },
+#ifdef PCHOLD			/* solaris */
   { PCSHOLD,  "PCSHOLD",  "set signal mask" },
+#endif
   { PCSREG,   "PCSREG",   "set general registers" },
   { PCSSIG,   "PCSSIG",   "set current signal" },
   { PCSTOP,   "PCSTOP",   "post stop request and wait" },
@@ -431,7 +439,9 @@
 #ifdef PCTWSTOP			/* solaris */
   { PCTWSTOP, "PCTWSTOP", "wait for stop, with timeout arg" },
 #endif
+#ifdef PCUNKILL			/* solaris */
   { PCUNKILL, "PCUNKILL", "delete a pending signal" },
+#endif
 #ifdef PCUNSET			/* solaris */
   { PCUNSET,  "PCUNSET",  "unset modes" },
 #endif
@@ -516,12 +526,14 @@
 	proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
 				    (sysset_t *) &arg[1], 0);
 	break;
+#ifdef PCSHOLD
       case PCSHOLD:
 	fprintf (procfs_file ? procfs_file : stdout, 
 		 "write (PCSHOLD) ");
 	proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
 				     (sigset_t *) &arg[1], 0);
 	break;
+#endif
       case PCSSIG:
 	fprintf (procfs_file ? procfs_file : stdout, 
 		 "write (PCSSIG) ");
@@ -540,10 +552,14 @@
 	  fprintf (procfs_file ? procfs_file : stdout, "clearFlt ");
 	if (arg[1] & PRSTEP)
 	  fprintf (procfs_file ? procfs_file : stdout, "step ");
+#ifdef PRSABORT
 	if (arg[1] & PRSABORT)
 	  fprintf (procfs_file ? procfs_file : stdout, "syscallAbort ");
+#endif
+#ifdef PRSTOP
 	if (arg[1] & PRSTOP)
 	  fprintf (procfs_file ? procfs_file : stdout, "stopReq ");
+#endif
 	  
 	fprintf (procfs_file ? procfs_file : stdout, "\n");
 	break;
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 55e0496..79f5575 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -136,6 +136,8 @@
 
 static char * procfs_make_note_section (bfd *, int *);
 
+static int procfs_can_use_hw_breakpoint (int, int, int);
+
 struct target_ops procfs_ops;		/* the target vector */
 
 static void
@@ -183,6 +185,7 @@
   procfs_ops.to_has_thread_control  = tc_schedlock;
   procfs_ops.to_find_memory_regions = proc_find_memory_regions;
   procfs_ops.to_make_corefile_notes = procfs_make_note_section;
+  procfs_ops.to_can_use_hw_breakpoint = procfs_can_use_hw_breakpoint;
   procfs_ops.to_magic               = OPS_MAGIC;
 }
 
@@ -5138,6 +5141,37 @@
   return 0;
 }
 
+/* Return non-zero if we can set a hardware watchpoint of type TYPE.  TYPE
+   is one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint,
+   or bp_hardware_watchpoint.  CNT is the number of watchpoints used so
+   far.
+   
+   Note:  procfs_can_use_hw_breakpoint() is not yet used by all
+   procfs.c targets due to the fact that some of them still define
+   TARGET_CAN_USE_HARDWARE_WATCHPOINT.  */
+
+static int
+procfs_can_use_hw_breakpoint (int type, int cnt, int othertype)
+{
+#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
+  return 0;
+#else
+  /* Due to the way that proc_set_watchpoint() is implemented, host
+     and target pointers must be of the same size.  If they are not,
+     we can't use hardware watchpoints.  This limitation is due to the
+     fact that proc_set_watchpoint() calls address_to_host_pointer();
+     a close inspection of address_to_host_pointer will reveal that
+     an internal error will be generated when the host and target
+     pointer sizes are different.  */
+  if (sizeof (void *) != TYPE_LENGTH (builtin_type_void_data_ptr))
+    return 0;
+
+  /* Other tests here???  */
+
+  return 1;
+#endif
+}
+
 /*
  * Function: stopped_by_watchpoint
  *
@@ -5431,8 +5465,7 @@
  */
 
 static char *
-mappingflags (flags)
-     long flags;
+mappingflags (long flags)
 {
   static char asciiflags[8];
 
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index 6ad0e4d..214b817 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -53,7 +53,7 @@
       /* The following line is equivalent to: */
       /* setlinebuf (angelDebugLogFile); */
       setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
-#if defined(__CYGWIN32__) || defined(__CYGWIN__)
+#if defined(__CYGWIN__)
       setmode(fileno(angelDebugLogFile), O_TEXT);
 #endif
     }
diff --git a/gdb/rdi-share/host.h b/gdb/rdi-share/host.h
index 2fdbf5f..9944c15 100644
--- a/gdb/rdi-share/host.h
+++ b/gdb/rdi-share/host.h
@@ -29,14 +29,6 @@
 #  define offsetof(T, member)  ((char *)&(((T *)0)->member) - (char *)0)
 #endif
 
-/* If under Cygwin, provide backwards compatibility with older
-   Cygwin compilers that don't define the current cpp define. */
-#ifdef __CYGWIN32__
-#ifndef __CYGWIN__
-#define __CYGWIN__
-#endif
-#endif
-
 /* A temporary sop to older compilers */
 #if defined (__NetBSD__) || defined (unix)
 #  ifndef __unix              /* (good for long-term portability?)  */
@@ -52,7 +44,7 @@
 #endif
 #if defined(_WIN32)
 #  define COMPILING_ON_WIN32    1
-#  if !defined(__CYGWIN32__)
+#  if !defined(__CYGWIN__)
 #    define COMPILING_ON_WINDOWS  1
 #  endif
 #endif
diff --git a/gdb/rdi-share/hostchan.c b/gdb/rdi-share/hostchan.c
index 3114c52..483bc5b 100644
--- a/gdb/rdi-share/hostchan.c
+++ b/gdb/rdi-share/hostchan.c
@@ -556,7 +556,7 @@
             - ((time_was->tv_sec * 1000000) + time_was->tv_usec) );
 }
 
-#if !defined(__unix) && !defined(__CYGWIN32__)
+#if !defined(__unix) && !defined(__CYGWIN__)
 static void gettimeofday( struct timeval *time_now, void *dummy )
 {
     time_t t = clock();
diff --git a/gdb/rdi-share/hostchan.h b/gdb/rdi-share/hostchan.h
index 3e6d26f..b60804d 100644
--- a/gdb/rdi-share/hostchan.h
+++ b/gdb/rdi-share/hostchan.h
@@ -15,14 +15,6 @@
 #ifndef angsd_hostchan_h
 #define angsd_hostchan_h
 
-/* If under Cygwin, provide backwards compatibility with older
-   Cygwin compilers that don't define the current cpp define. */
-#ifdef __CYGWIN32__
-#ifndef __CYGWIN__
-#define __CYGWIN__
-#endif
-#endif
-
 /* A temporary sop to older compilers */
 #if defined (__NetBSD__) || defined (unix)
 #  ifndef __unix              /* (good for long-term portability?)  */
@@ -31,7 +23,7 @@
 #endif
 
 /* struct timeval */
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
 #  include <sys/time.h>
 #else
 #  include "winsock.h"
diff --git a/gdb/rdi-share/serdrv.c b/gdb/rdi-share/serdrv.c
index 91f8f19..bff6a18 100644
--- a/gdb/rdi-share/serdrv.c
+++ b/gdb/rdi-share/serdrv.c
@@ -254,7 +254,7 @@
 
     serial_reset();
 
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
     Unix_ioctlNonBlocking();
 #endif
 
diff --git a/gdb/rdi-share/serpardr.c b/gdb/rdi-share/serpardr.c
index 604d048..fad0548 100644
--- a/gdb/rdi-share/serpardr.c
+++ b/gdb/rdi-share/serpardr.c
@@ -278,7 +278,7 @@
 
     serpar_reset();
 
-#if defined(__unix) || defined(__CYGWIN32__)
+#if defined(__unix) || defined(__CYGWIN__)
     Unix_ioctlNonBlocking();
 #endif
 
diff --git a/gdb/rdi-share/unixcomm.c b/gdb/rdi-share/unixcomm.c
index 0abd411..2204d6d 100644
--- a/gdb/rdi-share/unixcomm.c
+++ b/gdb/rdi-share/unixcomm.c
@@ -96,7 +96,7 @@
 #define PARPORT2   "/dev/par1"
 #endif
 
-#if defined(_WIN32) || defined (__CYGWIN32__) 
+#if defined(_WIN32) || defined (__CYGWIN__) 
 #define SERIAL_PREFIX "com"
 #define SERPORT1   "com1"
 #define SERPORT2   "com2"
@@ -248,7 +248,7 @@
 
 extern int Unix_OpenSerial(const char *name)
 {
-#if defined(BSD) || defined(__CYGWIN32__)
+#if defined(BSD) || defined(__CYGWIN__)
     serpfd = open(name, O_RDWR);
 #else
     serpfd = open(name, O_RDWR | O_NONBLOCK);
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 11ed8c4..e483de0 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1,6 +1,7 @@
 /* Cache and manage the values of registers for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
+   2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,6 +27,8 @@
 #include "gdbcmd.h"
 #include "regcache.h"
 #include "gdb_assert.h"
+#include "gdb_string.h"
+#include "gdbcmd.h"		/* For maintenanceprintlist.  */
 
 /*
  * DATA STRUCTURE
@@ -33,6 +36,358 @@
  * Here is the actual register cache.
  */
 
+/* Per-architecture object describing the layout of a register cache.
+   Computed once when the architecture is created */
+
+struct gdbarch_data *regcache_descr_handle;
+
+struct regcache_descr
+{
+  /* The architecture this descriptor belongs to.  */
+  struct gdbarch *gdbarch;
+
+  /* Is this a ``legacy'' register cache?  Such caches reserve space
+     for raw and pseudo registers and allow access to both.  */
+  int legacy_p;
+
+  /* The raw register cache.  This should contain just [0
+     .. NUM_RAW_REGISTERS).  However, for older targets, it contains
+     space for the full [0 .. NUM_RAW_REGISTERS +
+     NUM_PSEUDO_REGISTERS).  */
+  int nr_raw_registers;
+  long sizeof_raw_registers;
+  long sizeof_raw_register_valid_p;
+
+  /* The cooked register space.  Each cooked register in the range
+     [0..NR_RAW_REGISTERS) is direct-mapped onto the corresponding raw
+     register.  The remaining [NR_RAW_REGISTERS
+     .. NR_COOKED_REGISTERS) (a.k.a. pseudo regiters) are mapped onto
+     both raw registers and memory by the architecture methods
+     gdbarch_register_read and gdbarch_register_write.  */
+  int nr_cooked_registers;
+
+  /* Offset and size (in 8 bit bytes), of reach register in the
+     register cache.  All registers (including those in the range
+     [NR_RAW_REGISTERS .. NR_COOKED_REGISTERS) are given an offset.
+     Assigning all registers an offset makes it possible to keep
+     legacy code, such as that found in read_register_bytes() and
+     write_register_bytes() working.  */
+  long *register_offset;
+  long *sizeof_register;
+
+  /* Useful constant.  Largest of all the registers.  */
+  long max_register_size;
+};
+
+static void *
+init_legacy_regcache_descr (struct gdbarch *gdbarch)
+{
+  int i;
+  struct regcache_descr *descr;
+  /* FIXME: cagney/2002-05-11: gdbarch_data() should take that
+     ``gdbarch'' as a parameter.  */
+  gdb_assert (gdbarch != NULL);
+
+  descr = XMALLOC (struct regcache_descr);
+  descr->gdbarch = gdbarch;
+  descr->legacy_p = 1;
+
+  /* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
+     in the register buffer.  Unfortunatly some architectures do.  */
+  descr->nr_cooked_registers = NUM_REGS + NUM_PSEUDO_REGS;
+  descr->nr_raw_registers = descr->nr_cooked_registers;
+  descr->sizeof_raw_register_valid_p = descr->nr_cooked_registers;
+
+  /* FIXME: cagney/2002-05-11: Instead of using REGISTER_BYTE() this
+     code should compute the offets et.al. at runtime.  This currently
+     isn't possible because some targets overlap register locations -
+     see the mess in read_register_bytes() and write_register_bytes()
+     registers.  */
+  descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
+  descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
+  descr->max_register_size = 0;
+  for (i = 0; i < descr->nr_cooked_registers; i++)
+    {
+      descr->register_offset[i] = REGISTER_BYTE (i);
+      descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
+      if (descr->max_register_size < REGISTER_RAW_SIZE (i))
+	descr->max_register_size = REGISTER_RAW_SIZE (i);
+    }
+
+  /* Come up with the real size of the registers buffer.  */
+  descr->sizeof_raw_registers = REGISTER_BYTES; /* OK use.  */
+  for (i = 0; i < descr->nr_cooked_registers; i++)
+    {
+      long regend;
+      /* Keep extending the buffer so that there is always enough
+         space for all registers.  The comparison is necessary since
+         legacy code is free to put registers in random places in the
+         buffer separated by holes.  Once REGISTER_BYTE() is killed
+         this can be greatly simplified.  */
+      /* FIXME: cagney/2001-12-04: This code shouldn't need to use
+         REGISTER_BYTE().  Unfortunatly, legacy code likes to lay the
+         buffer out so that certain registers just happen to overlap.
+         Ulgh!  New targets use gdbarch's register read/write and
+         entirely avoid this uglyness.  */
+      regend = descr->register_offset[i] + descr->sizeof_register[i];
+      if (descr->sizeof_raw_registers < regend)
+	descr->sizeof_raw_registers = regend;
+    }
+  return descr;
+}
+
+static void *
+init_regcache_descr (struct gdbarch *gdbarch)
+{
+  int i;
+  struct regcache_descr *descr;
+  gdb_assert (gdbarch != NULL);
+
+  /* If an old style architecture, construct the register cache
+     description using all the register macros.  */
+  if (!gdbarch_pseudo_register_read_p (gdbarch)
+      && !gdbarch_pseudo_register_write_p (gdbarch))
+    return init_legacy_regcache_descr (gdbarch);
+
+  descr = XMALLOC (struct regcache_descr);
+  descr->gdbarch = gdbarch;
+  descr->legacy_p = 0;
+
+  /* Total size of the register space.  The raw registers are mapped
+     directly onto the raw register cache while the pseudo's are
+     either mapped onto raw-registers or memory.  */
+  descr->nr_cooked_registers = NUM_REGS + NUM_PSEUDO_REGS;
+
+  /* Construct a strictly RAW register cache.  Don't allow pseudo's
+     into the register cache.  */
+  descr->nr_raw_registers = NUM_REGS;
+
+  /* FIXME: cagney/2002-08-13: Overallocate the register_valid_p
+     array.  This pretects GDB from erant code that accesses elements
+     of the global register_valid_p[] array in the range [NUM_REGS
+     .. NUM_REGS + NUM_PSEUDO_REGS).  */
+  descr->sizeof_raw_register_valid_p = NUM_REGS + NUM_PSEUDO_REGS;
+
+  /* Lay out the register cache.  The pseud-registers are included in
+     the layout even though their value isn't stored in the register
+     cache.  Some code, via read_register_bytes() access a register
+     using an offset/length rather than a register number.
+
+     NOTE: cagney/2002-05-22: Only REGISTER_VIRTUAL_TYPE() needs to be
+     used when constructing the register cache.  It is assumed that
+     register raw size, virtual size and type length of the type are
+     all the same.  */
+
+  {
+    long offset = 0;
+    descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
+    descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
+    descr->max_register_size = 0;
+    for (i = 0; i < descr->nr_cooked_registers; i++)
+      {
+	descr->sizeof_register[i] = TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (i));
+	descr->register_offset[i] = offset;
+	offset += descr->sizeof_register[i];
+	if (descr->max_register_size < descr->sizeof_register[i])
+	  descr->max_register_size = descr->sizeof_register[i];
+      }
+    /* Set the real size of the register cache buffer.  */
+    /* FIXME: cagney/2002-05-22: Should only need to allocate space
+       for the raw registers.  Unfortunatly some code still accesses
+       the register array directly using the global registers[].
+       Until that code has been purged, play safe and over allocating
+       the register buffer.  Ulgh!  */
+    descr->sizeof_raw_registers = offset;
+    /* = descr->register_offset[descr->nr_raw_registers]; */
+  }
+
+#if 0
+  /* Sanity check.  Confirm that the assumptions about gdbarch are
+     true.  The REGCACHE_DESCR_HANDLE is set before doing the checks
+     so that targets using the generic methods supplied by regcache
+     don't go into infinite recursion trying to, again, create the
+     regcache.  */
+  set_gdbarch_data (gdbarch, regcache_descr_handle, descr);
+  for (i = 0; i < descr->nr_cooked_registers; i++)
+    {
+      gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i));
+      gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
+      gdb_assert (descr->register_offset[i] == REGISTER_BYTE (i));
+    }
+  /* gdb_assert (descr->sizeof_raw_registers == REGISTER_BYTES (i));  */
+#endif
+
+  return descr;
+}
+
+static struct regcache_descr *
+regcache_descr (struct gdbarch *gdbarch)
+{
+  return gdbarch_data (gdbarch, regcache_descr_handle);
+}
+
+static void
+xfree_regcache_descr (struct gdbarch *gdbarch, void *ptr)
+{
+  struct regcache_descr *descr = ptr;
+  if (descr == NULL)
+    return;
+  xfree (descr->register_offset);
+  xfree (descr->sizeof_register);
+  descr->register_offset = NULL;
+  descr->sizeof_register = NULL;
+  xfree (descr);
+}
+
+/* The register cache for storing raw register values.  */
+
+struct regcache
+{
+  struct regcache_descr *descr;
+  char *raw_registers;
+  char *raw_register_valid_p;
+  /* If a value isn't in the cache should the corresponding target be
+     queried for a value.  */
+  int passthrough_p;
+};
+
+struct regcache *
+regcache_xmalloc (struct gdbarch *gdbarch)
+{
+  struct regcache_descr *descr;
+  struct regcache *regcache;
+  gdb_assert (gdbarch != NULL);
+  descr = regcache_descr (gdbarch);
+  regcache = XMALLOC (struct regcache);
+  regcache->descr = descr;
+  regcache->raw_registers
+    = XCALLOC (descr->sizeof_raw_registers, char);
+  regcache->raw_register_valid_p
+    = XCALLOC (descr->sizeof_raw_register_valid_p, char);
+  regcache->passthrough_p = 0;
+  return regcache;
+}
+
+void
+regcache_xfree (struct regcache *regcache)
+{
+  if (regcache == NULL)
+    return;
+  xfree (regcache->raw_registers);
+  xfree (regcache->raw_register_valid_p);
+  xfree (regcache);
+}
+
+void
+do_regcache_xfree (void *data)
+{
+  regcache_xfree (data);
+}
+
+struct cleanup *
+make_cleanup_regcache_xfree (struct regcache *regcache)
+{
+  return make_cleanup (do_regcache_xfree, regcache);
+}
+
+void
+regcache_cpy (struct regcache *dst, struct regcache *src)
+{
+  int i;
+  char *buf;
+  gdb_assert (src != NULL && dst != NULL);
+  gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
+  gdb_assert (src != dst);
+  /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
+     It keeps the existing code working where things rely on going
+     through to the register cache.  */
+  if (src == current_regcache && src->descr->legacy_p)
+    {
+      /* ULGH!!!!  Old way.  Use REGISTER bytes and let code below
+	 untangle fetch.  */
+      read_register_bytes (0, dst->raw_registers, REGISTER_BYTES);
+      return;
+    }
+  /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
+     It keeps the existing code working where things rely on going
+     through to the register cache.  */
+  if (dst == current_regcache && dst->descr->legacy_p)
+    {
+      /* ULGH!!!!  Old way.  Use REGISTER bytes and let code below
+	 untangle fetch.  */
+      write_register_bytes (0, src->raw_registers, REGISTER_BYTES);
+      return;
+    }
+  buf = alloca (src->descr->max_register_size);
+  for (i = 0; i < src->descr->nr_raw_registers; i++)
+    {
+      /* Should we worry about the valid bit here?  */
+      regcache_raw_read (src, i, buf);
+      regcache_raw_write (dst, i, buf);
+    }
+}
+
+void
+regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src)
+{
+  int i;
+  gdb_assert (src != NULL && dst != NULL);
+  gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
+  /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough
+     move of data into the current_regcache().  Doing this would be
+     silly - it would mean that valid_p would be completly invalid.  */
+  gdb_assert (dst != current_regcache);
+  memcpy (dst->raw_registers, src->raw_registers,
+	  dst->descr->sizeof_raw_registers);
+  memcpy (dst->raw_register_valid_p, src->raw_register_valid_p,
+	  dst->descr->sizeof_raw_register_valid_p);
+}
+
+struct regcache *
+regcache_dup (struct regcache *src)
+{
+  struct regcache *newbuf;
+  gdb_assert (current_regcache != NULL);
+  newbuf = regcache_xmalloc (src->descr->gdbarch);
+  regcache_cpy (newbuf, src);
+  return newbuf;
+}
+
+struct regcache *
+regcache_dup_no_passthrough (struct regcache *src)
+{
+  struct regcache *newbuf;
+  gdb_assert (current_regcache != NULL);
+  newbuf = regcache_xmalloc (src->descr->gdbarch);
+  regcache_cpy_no_passthrough (newbuf, src);
+  return newbuf;
+}
+
+int
+regcache_valid_p (struct regcache *regcache, int regnum)
+{
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  return regcache->raw_register_valid_p[regnum];
+}
+
+char *
+deprecated_grub_regcache_for_registers (struct regcache *regcache)
+{
+  return regcache->raw_registers;
+}
+
+char *
+deprecated_grub_regcache_for_register_valid (struct regcache *regcache)
+{
+  return regcache->raw_register_valid_p;
+}
+
+/* Global structure containing the current regcache.  */
+/* FIXME: cagney/2002-05-11: The two global arrays registers[] and
+   register_valid[] currently point into this structure.  */
+struct regcache *current_regcache;
+
 /* NOTE: this is a write-through cache.  There is no "dirty" bit for
    recording if the register values have been changed (eg. by the
    user).  Therefore all registers must be written back to the
@@ -81,7 +436,9 @@
 void
 set_register_cached (int regnum, int state)
 {
-  register_valid[regnum] = state;
+  gdb_assert (regnum >= 0);
+  gdb_assert (regnum < current_regcache->descr->nr_raw_registers);
+  current_regcache->raw_register_valid_p[regnum] = state;
 }
 
 /* REGISTER_CHANGED
@@ -97,10 +454,9 @@
    else return a pointer to the start of the cache buffer.  */
 
 static char *
-register_buffer (int regnum)
+register_buffer (struct regcache *regcache, int regnum)
 {
-  gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
-  return &registers[REGISTER_BYTE (regnum)];
+  return regcache->raw_registers + regcache->descr->register_offset[regnum];
 }
 
 /* Return whether register REGNUM is a real register.  */
@@ -111,46 +467,6 @@
   return regnum >= 0 && regnum < NUM_REGS;
 }
 
-/* Return whether register REGNUM is a pseudo register.  */
-
-static int
-pseudo_register (int regnum)
-{
-  return regnum >= NUM_REGS && regnum < NUM_REGS + NUM_PSEUDO_REGS;
-}
-
-/* Fetch register REGNUM into the cache.  */
-
-static void
-fetch_register (int regnum)
-{
-  /* NOTE: cagney/2001-12-04: Legacy targets were using fetch/store
-     pseudo-register as a way of handling registers that needed to be
-     constructed from one or more raw registers.  New targets instead
-     use gdbarch register read/write.  */
-  if (FETCH_PSEUDO_REGISTER_P ()
-      && pseudo_register (regnum))
-    FETCH_PSEUDO_REGISTER (regnum);
-  else
-    target_fetch_registers (regnum);
-}
-
-/* Write register REGNUM cached value to the target.  */
-
-static void
-store_register (int regnum)
-{
-  /* NOTE: cagney/2001-12-04: Legacy targets were using fetch/store
-     pseudo-register as a way of handling registers that needed to be
-     constructed from one or more raw registers.  New targets instead
-     use gdbarch register read/write.  */
-  if (STORE_PSEUDO_REGISTER_P ()
-      && pseudo_register (regnum))
-    STORE_PSEUDO_REGISTER (regnum);
-  else
-    target_store_registers (regnum);
-}
-
 /* Low level examining and depositing of registers.
 
    The caller is responsible for making sure that the inferior is
@@ -176,7 +492,7 @@
      gdb gives control to the user (ie watchpoints).  */
   alloca (0);
 
-  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+  for (i = 0; i < current_regcache->descr->nr_raw_registers; i++)
     set_register_cached (i, 0);
 
   if (registers_changed_hook)
@@ -309,37 +625,129 @@
     }
 
   if (!register_cached (regnum))
-    fetch_register (regnum);
+    target_fetch_registers (regnum);
 
-  memcpy (myaddr, register_buffer (regnum),
+  memcpy (myaddr, register_buffer (current_regcache, regnum),
 	  REGISTER_RAW_SIZE (regnum));
 }
 
 void
-regcache_read (int rawnum, char *buf)
+regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
 {
-  gdb_assert (rawnum >= 0 && rawnum < (NUM_REGS + NUM_PSEUDO_REGS));
-  /* For moment, just use underlying legacy code. Ulgh!!! */
-  legacy_read_register_gen (rawnum, buf);
+  gdb_assert (regcache != NULL && buf != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  if (regcache->descr->legacy_p
+      && regcache->passthrough_p)
+    {
+      gdb_assert (regcache == current_regcache);
+      /* For moment, just use underlying legacy code.  Ulgh!!! This
+	 silently and very indirectly updates the regcache's regcache
+	 via the global register_valid[].  */
+      legacy_read_register_gen (regnum, buf);
+      return;
+    }
+  /* Make certain that the register cache is up-to-date with respect
+     to the current thread.  This switching shouldn't be necessary
+     only there is still only one target side register cache.  Sigh!
+     On the bright side, at least there is a regcache object.  */
+  if (regcache->passthrough_p)
+    {
+      gdb_assert (regcache == current_regcache);
+      if (! ptid_equal (registers_ptid, inferior_ptid))
+	{
+	  registers_changed ();
+	  registers_ptid = inferior_ptid;
+	}
+      if (!register_cached (regnum))
+	target_fetch_registers (regnum);
+    }
+  /* Copy the value directly into the register cache.  */
+  memcpy (buf, (regcache->raw_registers
+		+ regcache->descr->register_offset[regnum]),
+	  regcache->descr->sizeof_register[regnum]);
+}
+
+void
+regcache_raw_read_signed (struct regcache *regcache, int regnum, LONGEST *val)
+{
+  char *buf;
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  regcache_raw_read (regcache, regnum, buf);
+  (*val) = extract_signed_integer (buf,
+				   regcache->descr->sizeof_register[regnum]);
+}
+
+void
+regcache_raw_read_unsigned (struct regcache *regcache, int regnum,
+			    ULONGEST *val)
+{
+  char *buf;
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  regcache_raw_read (regcache, regnum, buf);
+  (*val) = extract_unsigned_integer (buf,
+				     regcache->descr->sizeof_register[regnum]);
 }
 
 void
 read_register_gen (int regnum, char *buf)
 {
-  if (! gdbarch_register_read_p (current_gdbarch))
+  gdb_assert (current_regcache != NULL);
+  gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
+  if (current_regcache->descr->legacy_p)
     {
       legacy_read_register_gen (regnum, buf);
       return;
     }
-  gdbarch_register_read (current_gdbarch, regnum, buf);
+  regcache_cooked_read (current_regcache, regnum, buf);
 }
 
+void
+regcache_cooked_read (struct regcache *regcache, int regnum, void *buf)
+{
+  gdb_assert (regnum >= 0);
+  gdb_assert (regnum < regcache->descr->nr_cooked_registers);
+  if (regnum < regcache->descr->nr_raw_registers)
+    regcache_raw_read (regcache, regnum, buf);
+  else
+    gdbarch_pseudo_register_read (regcache->descr->gdbarch, regcache,
+				  regnum, buf);
+}
+
+void
+regcache_cooked_read_signed (struct regcache *regcache, int regnum,
+			     LONGEST *val)
+{
+  char *buf;
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  regcache_cooked_read (regcache, regnum, buf);
+  (*val) = extract_signed_integer (buf,
+				   regcache->descr->sizeof_register[regnum]);
+}
+
+void
+regcache_cooked_read_unsigned (struct regcache *regcache, int regnum,
+			       ULONGEST *val)
+{
+  char *buf;
+  gdb_assert (regcache != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+  buf = alloca (regcache->descr->sizeof_register[regnum]);
+  regcache_cooked_read (regcache, regnum, buf);
+  (*val) = extract_unsigned_integer (buf,
+				     regcache->descr->sizeof_register[regnum]);
+}
 
 /* Write register REGNUM at MYADDR to the target.  MYADDR points at
    REGISTER_RAW_BYTES(REGNUM), which must be in target byte-order.  */
 
 static void
-legacy_write_register_gen (int regnum, char *myaddr)
+legacy_write_register_gen (int regnum, const void *myaddr)
 {
   int size;
   gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
@@ -362,35 +770,97 @@
       /* If we have a valid copy of the register, and new value == old
 	 value, then don't bother doing the actual store. */
       if (register_cached (regnum)
-	  && memcmp (register_buffer (regnum), myaddr, size) == 0)
+	  && (memcmp (register_buffer (current_regcache, regnum), myaddr, size)
+	      == 0))
 	return;
       else
 	target_prepare_to_store ();
     }
 
-  memcpy (register_buffer (regnum), myaddr, size);
+  memcpy (register_buffer (current_regcache, regnum), myaddr, size);
 
   set_register_cached (regnum, 1);
-  store_register (regnum);
+  target_store_registers (regnum);
 }
 
 void
-regcache_write (int rawnum, char *buf)
+regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
 {
-  gdb_assert (rawnum >= 0 && rawnum < (NUM_REGS + NUM_PSEUDO_REGS));
-  /* For moment, just use underlying legacy code. Ulgh!!! */
-  legacy_write_register_gen (rawnum, buf);
+  gdb_assert (regcache != NULL && buf != NULL);
+  gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+
+  if (regcache->passthrough_p
+      && regcache->descr->legacy_p)
+    {
+      /* For moment, just use underlying legacy code.  Ulgh!!! This
+	 silently and very indirectly updates the regcache's buffers
+	 via the globals register_valid[] and registers[].  */
+      gdb_assert (regcache == current_regcache);
+      legacy_write_register_gen (regnum, buf);
+      return;
+    }
+
+  /* On the sparc, writing %g0 is a no-op, so we don't even want to
+     change the registers array if something writes to this register.  */
+  if (CANNOT_STORE_REGISTER (regnum))
+    return;
+
+  /* Handle the simple case first -> not write through so just store
+     value in cache.  */
+  if (!regcache->passthrough_p)
+    {
+      memcpy ((regcache->raw_registers
+	       + regcache->descr->register_offset[regnum]), buf,
+	      regcache->descr->sizeof_register[regnum]);
+      regcache->raw_register_valid_p[regnum] = 1;
+      return;
+    }
+
+  /* Make certain that the correct cache is selected.  */
+  gdb_assert (regcache == current_regcache);
+  if (! ptid_equal (registers_ptid, inferior_ptid))
+    {
+      registers_changed ();
+      registers_ptid = inferior_ptid;
+    }
+
+  /* If we have a valid copy of the register, and new value == old
+     value, then don't bother doing the actual store. */
+  if (regcache_valid_p (regcache, regnum)
+      && (memcmp (register_buffer (regcache, regnum), buf,
+		  regcache->descr->sizeof_register[regnum]) == 0))
+    return;
+
+  target_prepare_to_store ();
+  memcpy (register_buffer (regcache, regnum), buf,
+	  regcache->descr->sizeof_register[regnum]);
+  regcache->raw_register_valid_p[regnum] = 1;
+  target_store_registers (regnum);
 }
 
 void
 write_register_gen (int regnum, char *buf)
 {
-  if (! gdbarch_register_write_p (current_gdbarch))
+  gdb_assert (current_regcache != NULL);
+  gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
+  if (current_regcache->descr->legacy_p)
     {
       legacy_write_register_gen (regnum, buf);
       return;
     }
-  gdbarch_register_write (current_gdbarch, regnum, buf);
+  regcache_cooked_write (current_regcache, regnum, buf);
+}
+
+void
+regcache_cooked_write (struct regcache *regcache, int regnum, const void *buf)
+{
+  gdb_assert (regnum >= 0);
+  gdb_assert (regnum < regcache->descr->nr_cooked_registers);
+  if (regnum < regcache->descr->nr_raw_registers)
+    regcache_raw_write (regcache, regnum, buf);
+  else
+    gdbarch_pseudo_register_write (regcache->descr->gdbarch, regcache,
+				   regnum, buf);
 }
 
 /* Copy INLEN bytes of consecutive data from memory at MYADDR
@@ -441,11 +911,91 @@
 		  myaddr + (overlapstart - myregstart),
 		  overlapend - overlapstart);
 
-	  store_register (regnum);
+	  target_store_registers (regnum);
 	}
     }
 }
 
+/* Perform a partial register transfer using a read, modify, write
+   operation.  */
+
+typedef void (regcache_read_ftype) (struct regcache *regcache, int regnum,
+				    void *buf);
+typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum,
+				     const void *buf);
+
+void
+regcache_xfer_part (struct regcache *regcache, int regnum,
+		    int offset, int len, void *in, const void *out,
+		    regcache_read_ftype *read, regcache_write_ftype *write)
+{
+  struct regcache_descr *descr = regcache->descr;
+  bfd_byte *reg = alloca (descr->max_register_size);
+  gdb_assert (offset >= 0 && offset <= descr->sizeof_register[regnum]);
+  gdb_assert (len >= 0 && offset + len <= descr->sizeof_register[regnum]);
+  /* Something to do?  */
+  if (offset + len == 0)
+    return;
+  /* Read (when needed) ... */
+  if (in != NULL
+      || offset > 0
+      || offset + len < descr->sizeof_register[regnum])
+    {
+      gdb_assert (read != NULL);
+      read (regcache, regnum, reg);
+    }
+  /* ... modify ... */
+  if (in != NULL)
+    memcpy (in, reg + offset, len);
+  if (out != NULL)
+    memcpy (reg + offset, out, len);
+  /* ... write (when needed).  */
+  if (out != NULL)
+    {
+      gdb_assert (write != NULL);
+      write (regcache, regnum, reg);
+    }
+}
+
+void
+regcache_raw_read_part (struct regcache *regcache, int regnum,
+			int offset, int len, void *buf)
+{
+  struct regcache_descr *descr = regcache->descr;
+  gdb_assert (regnum >= 0 && regnum < descr->nr_raw_registers);
+  regcache_xfer_part (regcache, regnum, offset, len, buf, NULL,
+		      regcache_raw_read, regcache_raw_write);
+}
+
+void
+regcache_raw_write_part (struct regcache *regcache, int regnum,
+			 int offset, int len, const void *buf)
+{
+  struct regcache_descr *descr = regcache->descr;
+  gdb_assert (regnum >= 0 && regnum < descr->nr_raw_registers);
+  regcache_xfer_part (regcache, regnum, offset, len, NULL, buf,
+		      regcache_raw_read, regcache_raw_write);
+}
+
+void
+regcache_cooked_read_part (struct regcache *regcache, int regnum,
+			   int offset, int len, void *buf)
+{
+  struct regcache_descr *descr = regcache->descr;
+  gdb_assert (regnum >= 0 && regnum < descr->nr_cooked_registers);
+  regcache_xfer_part (regcache, regnum, offset, len, buf, NULL,
+		      regcache_cooked_read, regcache_cooked_write);
+}
+
+void
+regcache_cooked_write_part (struct regcache *regcache, int regnum,
+			    int offset, int len, const void *buf)
+{
+  struct regcache_descr *descr = regcache->descr;
+  gdb_assert (regnum >= 0 && regnum < descr->nr_cooked_registers);
+  regcache_xfer_part (regcache, regnum, offset, len, NULL, buf,
+		      regcache_cooked_read, regcache_cooked_write);
+}
 
 /* Return the contents of register REGNUM as an unsigned integer.  */
 
@@ -552,7 +1102,7 @@
    fact, and report it to the users of read_register and friends.  */
 
 void
-supply_register (int regnum, char *val)
+supply_register (int regnum, const void *val)
 {
 #if 1
   if (! ptid_equal (registers_ptid, inferior_ptid))
@@ -564,10 +1114,10 @@
 
   set_register_cached (regnum, 1);
   if (val)
-    memcpy (register_buffer (regnum), val, 
+    memcpy (register_buffer (current_regcache, regnum), val, 
 	    REGISTER_RAW_SIZE (regnum));
   else
-    memset (register_buffer (regnum), '\000', 
+    memset (register_buffer (current_regcache, regnum), '\000', 
 	    REGISTER_RAW_SIZE (regnum));
 
   /* On some architectures, e.g. HPPA, there are a few stray bits in
@@ -576,18 +1126,20 @@
   /* NOTE: cagney/2001-03-16: The macro CLEAN_UP_REGISTER_VALUE is
      going to be deprecated.  Instead architectures will leave the raw
      register value as is and instead clean things up as they pass
-     through the method gdbarch_register_read() clean up the
+     through the method gdbarch_pseudo_register_read() clean up the
      values. */
 
 #ifdef DEPRECATED_CLEAN_UP_REGISTER_VALUE
-  DEPRECATED_CLEAN_UP_REGISTER_VALUE (regnum, register_buffer (regnum));
+  DEPRECATED_CLEAN_UP_REGISTER_VALUE \
+    (regnum, register_buffer (current_regcache, regnum));
 #endif
 }
 
 void
 regcache_collect (int regnum, void *buf)
 {
-  memcpy (buf, register_buffer (regnum), REGISTER_RAW_SIZE (regnum));
+  memcpy (buf, register_buffer (current_regcache, regnum),
+	  REGISTER_RAW_SIZE (regnum));
 }
 
 
@@ -755,37 +1307,250 @@
 static void
 build_regcache (void)
 {
+  current_regcache = regcache_xmalloc (current_gdbarch);
+  current_regcache->passthrough_p = 1;
+  registers = deprecated_grub_regcache_for_registers (current_regcache);
+  register_valid = deprecated_grub_regcache_for_register_valid (current_regcache);
+}
+
+static void
+dump_endian_bytes (struct ui_file *file, enum bfd_endian endian,
+		   const unsigned char *buf, long len)
+{
   int i;
-  int sizeof_register_valid;
-  /* Come up with the real size of the registers buffer.  */
-  int sizeof_registers = REGISTER_BYTES; /* OK use.  */
-  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
+  switch (endian)
     {
-      long regend;
-      /* Keep extending the buffer so that there is always enough
-         space for all registers.  The comparison is necessary since
-         legacy code is free to put registers in random places in the
-         buffer separated by holes.  Once REGISTER_BYTE() is killed
-         this can be greatly simplified.  */
-      /* FIXME: cagney/2001-12-04: This code shouldn't need to use
-         REGISTER_BYTE().  Unfortunatly, legacy code likes to lay the
-         buffer out so that certain registers just happen to overlap.
-         Ulgh!  New targets use gdbarch's register read/write and
-         entirely avoid this uglyness.  */
-      regend = REGISTER_BYTE (i) + REGISTER_RAW_SIZE (i);
-      if (sizeof_registers < regend)
-	sizeof_registers = regend;
+    case BFD_ENDIAN_BIG:
+      for (i = 0; i < len; i++)
+	fprintf_unfiltered (file, "%02x", buf[i]);
+      break;
+    case BFD_ENDIAN_LITTLE:
+      for (i = len - 1; i >= 0; i--)
+	fprintf_unfiltered (file, "%02x", buf[i]);
+      break;
+    default:
+      internal_error (__FILE__, __LINE__, "Bad switch");
     }
-  registers = xmalloc (sizeof_registers);
-  sizeof_register_valid = ((NUM_REGS + NUM_PSEUDO_REGS)
-			   * sizeof (*register_valid));
-  register_valid = xmalloc (sizeof_register_valid);
-  memset (register_valid, 0, sizeof_register_valid);
+}
+
+enum regcache_dump_what
+{
+  regcache_dump_none, regcache_dump_raw, regcache_dump_cooked
+};
+
+static void
+regcache_dump (struct regcache *regcache, struct ui_file *file,
+	       enum regcache_dump_what what_to_dump)
+{
+  struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+  int regnum;
+  int footnote_nr = 0;
+  int footnote_register_size = 0;
+  int footnote_register_offset = 0;
+  int footnote_register_type_name_null = 0;
+  long register_offset = 0;
+  unsigned char *buf = alloca (regcache->descr->max_register_size);
+
+#if 0
+  fprintf_unfiltered (file, "legacy_p %d\n", regcache->descr->legacy_p);
+  fprintf_unfiltered (file, "nr_raw_registers %d\n",
+		      regcache->descr->nr_raw_registers);
+  fprintf_unfiltered (file, "nr_cooked_registers %d\n",
+		      regcache->descr->nr_cooked_registers);
+  fprintf_unfiltered (file, "sizeof_raw_registers %ld\n",
+		      regcache->descr->sizeof_raw_registers);
+  fprintf_unfiltered (file, "sizeof_raw_register_valid_p %ld\n",
+		      regcache->descr->sizeof_raw_register_valid_p);
+  fprintf_unfiltered (file, "max_register_size %ld\n",
+		      regcache->descr->max_register_size);
+  fprintf_unfiltered (file, "NUM_REGS %d\n", NUM_REGS);
+  fprintf_unfiltered (file, "NUM_PSEUDO_REGS %d\n", NUM_PSEUDO_REGS);
+#endif
+
+  gdb_assert (regcache->descr->nr_cooked_registers
+	      == (NUM_REGS + NUM_PSEUDO_REGS));
+
+  for (regnum = -1; regnum < regcache->descr->nr_cooked_registers; regnum++)
+    {
+      /* Name.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %-10s", "Name");
+      else
+	{
+	  const char *p = REGISTER_NAME (regnum);
+	  if (p == NULL)
+	    p = "";
+	  else if (p[0] == '\0')
+	    p = "''";
+	  fprintf_unfiltered (file, " %-10s", p);
+	}
+
+      /* Number.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %4s", "Nr");
+      else
+	fprintf_unfiltered (file, " %4d", regnum);
+
+      /* Relative number.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %4s", "Rel");
+      else if (regnum < NUM_REGS)
+	fprintf_unfiltered (file, " %4d", regnum);
+      else
+	fprintf_unfiltered (file, " %4d", (regnum - NUM_REGS));
+
+      /* Offset.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %6s  ", "Offset");
+      else
+	{
+	  fprintf_unfiltered (file, " %6ld",
+			      regcache->descr->register_offset[regnum]);
+	  if (register_offset != regcache->descr->register_offset[regnum]
+	      || register_offset != REGISTER_BYTE (regnum))
+	    {
+	      if (!footnote_register_offset)
+		footnote_register_offset = ++footnote_nr;
+	      fprintf_unfiltered (file, "*%d", footnote_register_offset);
+	    }
+	  else
+	    fprintf_unfiltered (file, "  ");
+	  register_offset = (regcache->descr->register_offset[regnum]
+			     + regcache->descr->sizeof_register[regnum]);
+	}
+
+      /* Size.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %5s ", "Size");
+      else
+	{
+	  fprintf_unfiltered (file, " %5ld",
+			      regcache->descr->sizeof_register[regnum]);
+	  if ((regcache->descr->sizeof_register[regnum]
+	       != REGISTER_RAW_SIZE (regnum))
+	      || (regcache->descr->sizeof_register[regnum]
+		  != REGISTER_VIRTUAL_SIZE (regnum))
+	      || (regcache->descr->sizeof_register[regnum]
+		  != TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (regnum)))
+	      )
+	    {
+	      if (!footnote_register_size)
+		footnote_register_size = ++footnote_nr;
+	      fprintf_unfiltered (file, "*%d", footnote_register_size);
+	    }
+	  else
+	    fprintf_unfiltered (file, " ");
+	}
+
+      /* Type.  */
+      if (regnum < 0)
+	fprintf_unfiltered (file, " %-20s", "Type");
+      else
+	{
+	  static const char blt[] = "builtin_type";
+	  const char *t = TYPE_NAME (REGISTER_VIRTUAL_TYPE (regnum));
+	  if (t == NULL)
+	    {
+	      char *n;
+	      if (!footnote_register_type_name_null)
+		footnote_register_type_name_null = ++footnote_nr;
+	      xasprintf (&n, "*%d", footnote_register_type_name_null);
+	      make_cleanup (xfree, n);
+	      t = n;
+	    }
+	  /* Chop a leading builtin_type.  */
+	  if (strncmp (t, blt, strlen (blt)) == 0)
+	    t += strlen (blt);
+	  fprintf_unfiltered (file, " %-20s", t);
+	}
+
+      /* Value, raw.  */
+      if (what_to_dump == regcache_dump_raw)
+	{
+	  if (regnum < 0)
+	    fprintf_unfiltered (file, "Raw value");
+	  else if (regnum >= regcache->descr->nr_raw_registers)
+	    fprintf_unfiltered (file, "<cooked>");
+	  else if (!regcache_valid_p (regcache, regnum))
+	    fprintf_unfiltered (file, "<invalid>");
+	  else
+	    {
+	      regcache_raw_read (regcache, regnum, buf);
+	      fprintf_unfiltered (file, "0x");
+	      dump_endian_bytes (file, TARGET_BYTE_ORDER, buf,
+				 REGISTER_RAW_SIZE (regnum));
+	    }
+	}
+
+      /* Value, cooked.  */
+      if (what_to_dump == regcache_dump_cooked)
+	{
+	  if (regnum < 0)
+	    fprintf_unfiltered (file, "Cooked value");
+	  else
+	    {
+	      regcache_cooked_read (regcache, regnum, buf);
+	      fprintf_unfiltered (file, "0x");
+	      dump_endian_bytes (file, TARGET_BYTE_ORDER, buf,
+				 REGISTER_VIRTUAL_SIZE (regnum));
+	    }
+	}
+
+      fprintf_unfiltered (file, "\n");
+    }
+
+  if (footnote_register_size)
+    fprintf_unfiltered (file, "*%d: Inconsistent register sizes.\n",
+			footnote_register_size);
+  if (footnote_register_offset)
+    fprintf_unfiltered (file, "*%d: Inconsistent register offsets.\n",
+			footnote_register_offset);
+  if (footnote_register_type_name_null)
+    fprintf_unfiltered (file, 
+			"*%d: Register type's name NULL.\n",
+			footnote_register_type_name_null);
+  do_cleanups (cleanups);
+}
+
+static void
+regcache_print (char *args, enum regcache_dump_what what_to_dump)
+{
+  if (args == NULL)
+    regcache_dump (current_regcache, gdb_stdout, what_to_dump);
+  else
+    {
+      struct ui_file *file = gdb_fopen (args, "w");
+      if (file == NULL)
+	perror_with_name ("maintenance print architecture");
+      regcache_dump (current_regcache, file, what_to_dump);    
+      ui_file_delete (file);
+    }
+}
+
+static void
+maintenance_print_registers (char *args, int from_tty)
+{
+  regcache_print (args, regcache_dump_none);
+}
+
+static void
+maintenance_print_raw_registers (char *args, int from_tty)
+{
+  regcache_print (args, regcache_dump_raw);
+}
+
+static void
+maintenance_print_cooked_registers (char *args, int from_tty)
+{
+  regcache_print (args, regcache_dump_cooked);
 }
 
 void
 _initialize_regcache (void)
 {
+  regcache_descr_handle = register_gdbarch_data (init_regcache_descr,
+						 xfree_regcache_descr);
+  REGISTER_GDBARCH_SWAP (current_regcache);
   register_gdbarch_swap (&registers, sizeof (registers), NULL);
   register_gdbarch_swap (&register_valid, sizeof (register_valid), NULL);
   register_gdbarch_swap (NULL, 0, build_regcache);
@@ -796,4 +1561,21 @@
    /* Initialize the thread/process associated with the current set of
       registers.  For now, -1 is special, and means `no current process'.  */
   registers_ptid = pid_to_ptid (-1);
+
+  add_cmd ("registers", class_maintenance,
+	   maintenance_print_registers,
+	   "Print the internal register configuration.\
+Takes an optional file parameter.",
+	   &maintenanceprintlist);
+  add_cmd ("raw-registers", class_maintenance,
+	   maintenance_print_raw_registers,
+	   "Print the internal register configuration including raw values.\
+Takes an optional file parameter.",
+	   &maintenanceprintlist);
+  add_cmd ("cooked-registers", class_maintenance,
+	   maintenance_print_cooked_registers,
+	   "Print the internal register configuration including cooked values.\
+Takes an optional file parameter.",
+	   &maintenanceprintlist);
+
 }
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 4e854d3..da91fd6 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -1,6 +1,7 @@
 /* Cache and manage the values of registers for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
+   2001, 2002 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,17 +23,68 @@
 #ifndef REGCACHE_H
 #define REGCACHE_H
 
+struct regcache;
+struct gdbarch;
+
+extern struct regcache *current_regcache;
+
+void regcache_xfree (struct regcache *regcache);
+struct cleanup *make_cleanup_regcache_xfree (struct regcache *regcache);
+struct regcache *regcache_xmalloc (struct gdbarch *gdbarch);
+
 /* Transfer a raw register [0..NUM_REGS) between core-gdb and the
    regcache. */
 
-void regcache_read (int rawnum, char *buf);
-void regcache_write (int rawnum, char *buf);
+void regcache_raw_read (struct regcache *regcache, int rawnum, void *buf);
+void regcache_raw_write (struct regcache *regcache, int rawnum,
+			 const void *buf);
+extern void regcache_raw_read_signed (struct regcache *regcache,
+				      int regnum, LONGEST *val);
+extern void regcache_raw_read_unsigned (struct regcache *regcache,
+					int regnum, ULONGEST *val);
+
+/* Partial transfer of a raw registers.  These perform read, modify,
+   write style operations.  */
+
+void regcache_raw_read_part (struct regcache *regcache, int regnum,
+			     int offset, int len, void *buf);
+void regcache_raw_write_part (struct regcache *regcache, int regnum,
+			      int offset, int len, const void *buf);
+
+int regcache_valid_p (struct regcache *regcache, int regnum);
+
+/* Transfer a cooked register [0..NUM_REGS+NUM_PSEUDO_REGS).  */
+void regcache_cooked_read (struct regcache *regcache, int rawnum, void *buf);
+void regcache_cooked_write (struct regcache *regcache, int rawnum,
+			    const void *buf);
+
+/* NOTE: cagney/2002-08-13: At present GDB has no reliable mechanism
+   for indicating when a ``cooked'' register was constructed from
+   invalid or unavailable ``raw'' registers.  One fairly easy way of
+   adding such a mechanism would be for the cooked functions to return
+   a register valid indication.  Given the possibility of such a
+   change, the extract functions below use a reference parameter,
+   rather than a function result.  */
+
+/* Read a register as a signed/unsigned quantity.  */
+extern void regcache_cooked_read_signed (struct regcache *regcache,
+					 int regnum, LONGEST *val);
+extern void regcache_cooked_read_unsigned (struct regcache *regcache,
+					   int regnum, ULONGEST *val);
+
+/* Partial transfer of a cooked register.  These perform read, modify,
+   write style operations.  */
+
+void regcache_cooked_read_part (struct regcache *regcache, int regnum,
+				int offset, int len, void *buf);
+void regcache_cooked_write_part (struct regcache *regcache, int regnum,
+				 int offset, int len, const void *buf);
 
 /* Transfer a raw register [0..NUM_REGS) between the regcache and the
    target.  These functions are called by the target in response to a
    target_fetch_registers() or target_store_registers().  */
 
-extern void supply_register (int regnum, char *val);
+extern void supply_register (int regnum, const void *val);
 extern void regcache_collect (int regnum, void *buf);
 
 
@@ -47,6 +99,23 @@
 
 extern signed char *register_valid;
 
+/* Copy/duplicate the contents of a register cache.  By default, the
+   operation is pass-through.  Writes to DST and reads from SRC will
+   go through to the target.
+
+   The ``cpy'' functions can not have overlapping SRC and DST buffers.
+
+   ``no passthrough'' versions do not go through to the target.  They
+   only transfer values already in the cache.  */
+
+extern struct regcache *regcache_dup (struct regcache *regcache);
+extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
+extern void regcache_cpy (struct regcache *dest, struct regcache *src);
+extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
+
+extern char *deprecated_grub_regcache_for_registers (struct regcache *);
+extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
+
 extern int register_cached (int regnum);
 
 extern void set_register_cached (int regnum, int state);
diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c
index f74ce97..a6ffb8e 100644
--- a/gdb/remote-bug.c
+++ b/gdb/remote-bug.c
@@ -1,1027 +1,1027 @@
-/* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
-   monitor for the m88k.
-
-   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-   2002 Free Software Foundation, Inc.
-
-   Contributed by Cygnus Support.  Written by K. Richard Pixley.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "inferior.h"
-#include "gdb_string.h"
-#include "regcache.h"
-#include <ctype.h>
-#include <fcntl.h>
-#include <setjmp.h>
-#include <errno.h>
-
-#include "terminal.h"
-#include "gdbcore.h"
-#include "gdbcmd.h"
-
-#include "serial.h"
-#include "remote-utils.h"
-
-/* External data declarations */
-extern int stop_soon_quietly;	/* for wait_for_inferior */
-
-/* Forward data declarations */
-extern struct target_ops bug_ops;	/* Forward declaration */
-
-/* Forward function declarations */
-static int bug_clear_breakpoints (void);
-
-static int bug_read_memory (CORE_ADDR memaddr,
-			    unsigned char *myaddr, int len);
-
-static int bug_write_memory (CORE_ADDR memaddr,
-			     unsigned char *myaddr, int len);
-
-/* This variable is somewhat arbitrary.  It's here so that it can be
-   set from within a running gdb.  */
-
-static int srec_max_retries = 3;
-
-/* Each S-record download to the target consists of an S0 header
-   record, some number of S3 data records, and one S7 termination
-   record.  I call this download a "frame".  Srec_frame says how many
-   bytes will be represented in each frame.  */
-
-#define SREC_SIZE 160
-static int srec_frame = SREC_SIZE;
-
-/* This variable determines how many bytes will be represented in each
-   S3 s-record.  */
-
-static int srec_bytes = 40;
-
-/* At one point it appeared to me as though the bug monitor could not
-   really be expected to receive two sequential characters at 9600
-   baud reliably.  Echo-pacing is an attempt to force data across the
-   line even in this condition.  Specifically, in echo-pace mode, each
-   character is sent one at a time and we look for the echo before
-   sending the next.  This is excruciatingly slow.  */
-
-static int srec_echo_pace = 0;
-
-/* How long to wait after an srec for a possible error message.
-   Similar to the above, I tried sleeping after sending each S3 record
-   in hopes that I might actually see error messages from the bug
-   monitor.  This might actually work if we were to use sleep
-   intervals smaller than 1 second.  */
-
-static int srec_sleep = 0;
-
-/* Every srec_noise records, flub the checksum.  This is a debugging
-   feature.  Set the variable to something other than 1 in order to
-   inject *deliberate* checksum errors.  One might do this if one
-   wanted to test error handling and recovery.  */
-
-static int srec_noise = 0;
-
-/* Called when SIGALRM signal sent due to alarm() timeout.  */
-
-/* Number of SIGTRAPs we need to simulate.  That is, the next
-   NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
-   SIGTRAP without actually waiting for anything.  */
-
-static int need_artificial_trap = 0;
-
-/*
- * Download a file specified in 'args', to the bug.
- */
-
-static void
-bug_load (char *args, int fromtty)
-{
-  bfd *abfd;
-  asection *s;
-  char buffer[1024];
-
-  sr_check_open ();
-
-  inferior_ptid = null_ptid;
-  abfd = bfd_openr (args, 0);
-  if (!abfd)
-    {
-      printf_filtered ("Unable to open file %s\n", args);
-      return;
-    }
-
-  if (bfd_check_format (abfd, bfd_object) == 0)
-    {
-      printf_filtered ("File is not an object file\n");
-      return;
-    }
-
-  s = abfd->sections;
-  while (s != (asection *) NULL)
-    {
-      srec_frame = SREC_SIZE;
-      if (s->flags & SEC_LOAD)
-	{
-	  int i;
-
-	  char *buffer = xmalloc (srec_frame);
-
-	  printf_filtered ("%s\t: 0x%4lx .. 0x%4lx  ", s->name, s->vma, s->vma + s->_raw_size);
-	  gdb_flush (gdb_stdout);
-	  for (i = 0; i < s->_raw_size; i += srec_frame)
-	    {
-	      if (srec_frame > s->_raw_size - i)
-		srec_frame = s->_raw_size - i;
-
-	      bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
-	      bug_write_memory (s->vma + i, buffer, srec_frame);
-	      printf_filtered ("*");
-	      gdb_flush (gdb_stdout);
-	    }
-	  printf_filtered ("\n");
-	  xfree (buffer);
-	}
-      s = s->next;
-    }
-  sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
-  sr_write_cr (buffer);
-  gr_expect_prompt ();
-}
-
-#if 0
-static char *
-get_word (char **p)
-{
-  char *s = *p;
-  char *word;
-  char *copy;
-  size_t len;
-
-  while (isspace (*s))
-    s++;
-
-  word = s;
-
-  len = 0;
-
-  while (*s && !isspace (*s))
-    {
-      s++;
-      len++;
-
-    }
-  copy = xmalloc (len + 1);
-  memcpy (copy, word, len);
-  copy[len] = 0;
-  *p = s;
-  return copy;
-}
-#endif
-
-static struct gr_settings bug_settings =
-{
-  "Bug>",			/* prompt */
-  &bug_ops,			/* ops */
-  bug_clear_breakpoints,	/* clear_all_breakpoints */
-  gr_generic_checkin,		/* checkin */
-};
-
-static char *cpu_check_strings[] =
-{
-  "=",
-  "Invalid Register",
-};
-
-static void
-bug_open (char *args, int from_tty)
-{
-  if (args == NULL)
-    args = "";
-
-  gr_open (args, from_tty, &bug_settings);
-  /* decide *now* whether we are on an 88100 or an 88110 */
-  sr_write_cr ("rs cr06");
-  sr_expect ("rs cr06");
-
-  switch (gr_multi_scan (cpu_check_strings, 0))
-    {
-    case 0:			/* this is an m88100 */
-      target_is_m88110 = 0;
-      break;
-    case 1:			/* this is an m88110 */
-      target_is_m88110 = 1;
-      break;
-    default:
-      internal_error (__FILE__, __LINE__, "failed internal consistency check");
-    }
-}
-
-/* Tell the remote machine to resume.  */
-
-void
-bug_resume (ptid_t ptid, int step, enum target_signal sig)
-{
-  if (step)
-    {
-      sr_write_cr ("t");
-
-      /* Force the next bug_wait to return a trap.  Not doing anything
-         about I/O from the target means that the user has to type
-         "continue" to see any.  FIXME, this should be fixed.  */
-      need_artificial_trap = 1;
-    }
-  else
-    sr_write_cr ("g");
-
-  return;
-}
-
-/* Wait until the remote machine stops, then return,
-   storing status in STATUS just as `wait' would.  */
-
-static char *wait_strings[] =
-{
-  "At Breakpoint",
-  "Exception: Data Access Fault (Local Bus Timeout)",
-  "\r8??\?-Bug>",		/* The '\?' avoids creating a trigraph */
-  "\r197-Bug>",
-  NULL,
-};
-
-ptid_t
-bug_wait (ptid_t ptid, struct target_waitstatus *status)
-{
-  int old_timeout = sr_get_timeout ();
-  int old_immediate_quit = immediate_quit;
-
-  status->kind = TARGET_WAITKIND_EXITED;
-  status->value.integer = 0;
-
-  /* read off leftovers from resume so that the rest can be passed
-     back out as stdout.  */
-  if (need_artificial_trap == 0)
-    {
-      sr_expect ("Effective address: ");
-      (void) sr_get_hex_word ();
-      sr_expect ("\r\n");
-    }
-
-  sr_set_timeout (-1);		/* Don't time out -- user program is running. */
-  immediate_quit = 1;		/* Helps ability to QUIT */
-
-  switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
-    {
-    case 0:			/* breakpoint case */
-      status->kind = TARGET_WAITKIND_STOPPED;
-      status->value.sig = TARGET_SIGNAL_TRAP;
-      /* user output from the target can be discarded here. (?) */
-      gr_expect_prompt ();
-      break;
-
-    case 1:			/* bus error */
-      status->kind = TARGET_WAITKIND_STOPPED;
-      status->value.sig = TARGET_SIGNAL_BUS;
-      /* user output from the target can be discarded here. (?) */
-      gr_expect_prompt ();
-      break;
-
-    case 2:			/* normal case */
-    case 3:
-      if (need_artificial_trap != 0)
-	{
-	  /* stepping */
-	  status->kind = TARGET_WAITKIND_STOPPED;
-	  status->value.sig = TARGET_SIGNAL_TRAP;
-	  need_artificial_trap--;
-	  break;
-	}
-      else
-	{
-	  /* exit case */
-	  status->kind = TARGET_WAITKIND_EXITED;
-	  status->value.integer = 0;
-	  break;
-	}
-
-    case -1:			/* trouble */
-    default:
-      fprintf_filtered (gdb_stderr,
-			"Trouble reading target during wait\n");
-      break;
-    }
-
-  sr_set_timeout (old_timeout);
-  immediate_quit = old_immediate_quit;
-  return inferior_ptid;
-}
-
-/* Return the name of register number REGNO
-   in the form input and output by bug.
-
-   Returns a pointer to a static buffer containing the answer.  */
-static char *
-get_reg_name (int regno)
-{
-  static char *rn[] =
-  {
-    "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
-    "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
-    "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
-    "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
-
-  /* these get confusing because we omit a few and switch some ordering around. */
-
-    "cr01",			/* 32 = psr */
-    "fcr62",			/* 33 = fpsr */
-    "fcr63",			/* 34 = fpcr */
-    "ip",			/* this is something of a cheat. */
-  /* 35 = sxip */
-    "cr05",			/* 36 = snip */
-    "cr06",			/* 37 = sfip */
-
-    "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
-    "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
-    "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
-    "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
-  };
-
-  return rn[regno];
-}
-
-#if 0				/* not currently used */
-/* Read from remote while the input matches STRING.  Return zero on
-   success, -1 on failure.  */
-
-static int
-bug_scan (char *s)
-{
-  int c;
-
-  while (*s)
-    {
-      c = sr_readchar ();
-      if (c != *s++)
-	{
-	  fflush (stdout);
-	  printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
-	  return (-1);
-	}
-    }
-
-  return (0);
-}
-#endif /* never */
-
-static int
-bug_srec_write_cr (char *s)
-{
-  char *p = s;
-
-  if (srec_echo_pace)
-    for (p = s; *p; ++p)
-      {
-	if (sr_get_debug () > 0)
-	  printf ("%c", *p);
-
-	do
-	  serial_write (sr_get_desc (), p, 1);
-	while (sr_pollchar () != *p);
-      }
-  else
-    {
-      sr_write_cr (s);
-/*       return(bug_scan (s) || bug_scan ("\n")); */
-    }
-
-  return (0);
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_fetch_register (int regno)
-{
-  sr_check_open ();
-
-  if (regno == -1)
-    {
-      int i;
-
-      for (i = 0; i < NUM_REGS; ++i)
-	bug_fetch_register (i);
-    }
-  else if (target_is_m88110 && regno == SFIP_REGNUM)
-    {
-      /* m88110 has no sfip. */
-      long l = 0;
-      supply_register (regno, (char *) &l);
-    }
-  else if (regno < XFP_REGNUM)
-    {
-      char buffer[MAX_REGISTER_RAW_SIZE];
-
-      sr_write ("rs ", 3);
-      sr_write_cr (get_reg_name (regno));
-      sr_expect ("=");
-      store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
-			      sr_get_hex_word ());
-      gr_expect_prompt ();
-      supply_register (regno, buffer);
-    }
-  else
-    {
-      /* Float register so we need to parse a strange data format. */
-      long p;
-      unsigned char fpreg_buf[10];
-
-      sr_write ("rs ", 3);
-      sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
-      sr_write_cr (";d");
-      sr_expect ("rs");
-      sr_expect (get_reg_name (regno));
-      sr_expect (";d");
-      sr_expect ("=");
-
-      /* sign */
-      p = sr_get_hex_digit (1);
-      fpreg_buf[0] = p << 7;
-
-      /* exponent */
-      sr_expect ("_");
-      p = sr_get_hex_digit (1);
-      fpreg_buf[0] += (p << 4);
-      fpreg_buf[0] += sr_get_hex_digit (1);
-
-      fpreg_buf[1] = sr_get_hex_digit (1) << 4;
-
-      /* fraction */
-      sr_expect ("_");
-      fpreg_buf[1] += sr_get_hex_digit (1);
-
-      fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
-      fpreg_buf[8] = 0;
-      fpreg_buf[9] = 0;
-
-      gr_expect_prompt ();
-      supply_register (regno, fpreg_buf);
-    }
-
-  return;
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_store_register (int regno)
-{
-  char buffer[1024];
-  sr_check_open ();
-
-  if (regno == -1)
-    {
-      int i;
-
-      for (i = 0; i < NUM_REGS; ++i)
-	bug_store_register (i);
-    }
-  else
-    {
-      char *regname;
-
-      regname = get_reg_name (regno);
-
-      if (target_is_m88110 && regno == SFIP_REGNUM)
-	return;
-      else if (regno < XFP_REGNUM)
-	sprintf (buffer, "rs %s %08lx",
-		 regname,
-		 (long) read_register (regno));
-      else
-	{
-	  unsigned char *fpreg_buf =
-	  (unsigned char *) &registers[REGISTER_BYTE (regno)];
-
-	  sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
-		   regname,
-	  /* sign */
-		   (fpreg_buf[0] >> 7) & 0xf,
-	  /* exponent */
-		   fpreg_buf[0] & 0x7f,
-		   (fpreg_buf[1] >> 8) & 0xf,
-	  /* fraction */
-		   fpreg_buf[1] & 0xf,
-		   fpreg_buf[2],
-		   fpreg_buf[3],
-		   fpreg_buf[4],
-		   fpreg_buf[5],
-		   fpreg_buf[6],
-		   fpreg_buf[7]);
-	}
-
-      sr_write_cr (buffer);
-      gr_expect_prompt ();
-    }
-
-  return;
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
-   MEMADDR.  If WRITE is non-zero, transfer them to the target,
-   otherwise transfer them from the target.  TARGET is unused.
-
-   Returns the number of bytes transferred. */
-
-int
-bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
-		 struct mem_attrib *attrib, struct target_ops *target)
-{
-  int res;
-
-  if (len <= 0)
-    return 0;
-
-  if (write)
-    res = bug_write_memory (memaddr, myaddr, len);
-  else
-    res = bug_read_memory (memaddr, myaddr, len);
-
-  return res;
-}
-
-static void
-start_load (void)
-{
-  char *command;
-
-  command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
-
-  sr_write_cr (command);
-  sr_expect (command);
-  sr_expect ("\r\n");
-  bug_srec_write_cr ("S0030000FC");
-  return;
-}
-
-/* This is an extremely vulnerable and fragile function.  I've made
-   considerable attempts to make this deterministic, but I've
-   certainly forgotten something.  The trouble is that S-records are
-   only a partial file format, not a protocol.  Worse, apparently the
-   m88k bug monitor does not run in real time while receiving
-   S-records.  Hence, we must pay excruciating attention to when and
-   where error messages are returned, and what has actually been sent.
-
-   Each call represents a chunk of memory to be sent to the target.
-   We break that chunk into an S0 header record, some number of S3
-   data records each containing srec_bytes, and an S7 termination
-   record.  */
-
-static char *srecord_strings[] =
-{
-  "S-RECORD",
-  "-Bug>",
-  NULL,
-};
-
-static int
-bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
-  int done;
-  int checksum;
-  int x;
-  int retries;
-  char *buffer = alloca ((srec_bytes + 8) << 1);
-
-  retries = 0;
-
-  do
-    {
-      done = 0;
-
-      if (retries > srec_max_retries)
-	return (-1);
-
-      if (retries > 0)
-	{
-	  if (sr_get_debug () > 0)
-	    printf ("\n<retrying...>\n");
-
-	  /* This gr_expect_prompt call is extremely important.  Without
-	     it, we will tend to resend our packet so fast that it
-	     will arrive before the bug monitor is ready to receive
-	     it.  This would lead to a very ugly resend loop.  */
-
-	  gr_expect_prompt ();
-	}
-
-      start_load ();
-
-      while (done < len)
-	{
-	  int thisgo;
-	  int idx;
-	  char *buf = buffer;
-	  CORE_ADDR address;
-
-	  checksum = 0;
-	  thisgo = len - done;
-	  if (thisgo > srec_bytes)
-	    thisgo = srec_bytes;
-
-	  address = memaddr + done;
-	  sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
-	  buf += 12;
-
-	  checksum += (thisgo + 4 + 1
-		       + (address & 0xff)
-		       + ((address >> 8) & 0xff)
-		       + ((address >> 16) & 0xff)
-		       + ((address >> 24) & 0xff));
-
-	  for (idx = 0; idx < thisgo; idx++)
-	    {
-	      sprintf (buf, "%02X", myaddr[idx + done]);
-	      checksum += myaddr[idx + done];
-	      buf += 2;
-	    }
-
-	  if (srec_noise > 0)
-	    {
-	      /* FIXME-NOW: insert a deliberate error every now and then.
-	         This is intended for testing/debugging the error handling
-	         stuff.  */
-	      static int counter = 0;
-	      if (++counter > srec_noise)
-		{
-		  counter = 0;
-		  ++checksum;
-		}
-	    }
-
-	  sprintf (buf, "%02X", ~checksum & 0xff);
-	  bug_srec_write_cr (buffer);
-
-	  if (srec_sleep != 0)
-	    sleep (srec_sleep);
-
-	  /* This pollchar is probably redundant to the gr_multi_scan
-	     below.  Trouble is, we can't be sure when or where an
-	     error message will appear.  Apparently, when running at
-	     full speed from a typical sun4, error messages tend to
-	     appear to arrive only *after* the s7 record.   */
-
-	  if ((x = sr_pollchar ()) != 0)
-	    {
-	      if (sr_get_debug () > 0)
-		printf ("\n<retrying...>\n");
-
-	      ++retries;
-
-	      /* flush any remaining input and verify that we are back
-	         at the prompt level. */
-	      gr_expect_prompt ();
-	      /* start all over again. */
-	      start_load ();
-	      done = 0;
-	      continue;
-	    }
-
-	  done += thisgo;
-	}
-
-      bug_srec_write_cr ("S7060000000000F9");
-      ++retries;
-
-      /* Having finished the load, we need to figure out whether we
-         had any errors.  */
-    }
-  while (gr_multi_scan (srecord_strings, 0) == 0);;
-
-  return (0);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
-   to inferior's memory at MEMADDR.  Returns errno value.
-   * sb/sh instructions don't work on unaligned addresses, when TU=1.
- */
-
-/* Read LEN bytes from inferior memory at MEMADDR.  Put the result
-   at debugger address MYADDR.  Returns errno value.  */
-static int
-bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
-  char request[100];
-  char *buffer;
-  char *p;
-  char type;
-  char size;
-  unsigned char c;
-  unsigned int inaddr;
-  unsigned int checksum;
-
-  sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
-  sr_write_cr (request);
-
-  p = buffer = alloca (len);
-
-  /* scan up through the header */
-  sr_expect ("S0030000FC");
-
-  while (p < buffer + len)
-    {
-      /* scan off any white space. */
-      while (sr_readchar () != 'S');;
-
-      /* what kind of s-rec? */
-      type = sr_readchar ();
-
-      /* scan record size */
-      sr_get_hex_byte (&size);
-      checksum = size;
-      --size;
-      inaddr = 0;
-
-      switch (type)
-	{
-	case '7':
-	case '8':
-	case '9':
-	  goto done;
-
-	case '3':
-	  sr_get_hex_byte (&c);
-	  inaddr = (inaddr << 8) + c;
-	  checksum += c;
-	  --size;
-	  /* intentional fall through */
-	case '2':
-	  sr_get_hex_byte (&c);
-	  inaddr = (inaddr << 8) + c;
-	  checksum += c;
-	  --size;
-	  /* intentional fall through */
-	case '1':
-	  sr_get_hex_byte (&c);
-	  inaddr = (inaddr << 8) + c;
-	  checksum += c;
-	  --size;
-	  sr_get_hex_byte (&c);
-	  inaddr = (inaddr << 8) + c;
-	  checksum += c;
-	  --size;
-	  break;
-
-	default:
-	  /* bonk */
-	  error ("reading s-records.");
-	}
-
-      if (inaddr < memaddr
-	  || (memaddr + len) < (inaddr + size))
-	error ("srec out of memory range.");
-
-      if (p != buffer + inaddr - memaddr)
-	error ("srec out of sequence.");
-
-      for (; size; --size, ++p)
-	{
-	  sr_get_hex_byte (p);
-	  checksum += *p;
-	}
-
-      sr_get_hex_byte (&c);
-      if (c != (~checksum & 0xff))
-	error ("bad s-rec checksum");
-    }
-
-done:
-  gr_expect_prompt ();
-  if (p != buffer + len)
-    return (1);
-
-  memcpy (myaddr, buffer, len);
-  return (0);
-}
-
-#define MAX_BREAKS	16
-static int num_brkpts = 0;
-
-/* Insert a breakpoint at ADDR.  SAVE is normally the address of the
-   pattern buffer where the instruction that the breakpoint overwrites
-   is saved.  It is unused here since the bug is responsible for
-   saving/restoring the original instruction. */
-
-static int
-bug_insert_breakpoint (CORE_ADDR addr, char *save)
-{
-  sr_check_open ();
-
-  if (num_brkpts < MAX_BREAKS)
-    {
-      char buffer[100];
-
-      num_brkpts++;
-      sprintf (buffer, "br %lx", (long) addr);
-      sr_write_cr (buffer);
-      gr_expect_prompt ();
-      return (0);
-    }
-  else
-    {
-      fprintf_filtered (gdb_stderr,
-		      "Too many break points, break point not installed\n");
-      return (1);
-    }
-
-}
-
-/* Remove a breakpoint at ADDR.  SAVE is normally the previously
-   saved pattern, but is unused here since the bug is responsible
-   for saving/restoring instructions. */
-
-static int
-bug_remove_breakpoint (CORE_ADDR addr, char *save)
-{
-  if (num_brkpts > 0)
-    {
-      char buffer[100];
-
-      num_brkpts--;
-      sprintf (buffer, "nobr %lx", (long) addr);
-      sr_write_cr (buffer);
-      gr_expect_prompt ();
-
-    }
-  return (0);
-}
-
-/* Clear the bugs notion of what the break points are */
-static int
-bug_clear_breakpoints (void)
-{
-
-  if (sr_is_open ())
-    {
-      sr_write_cr ("nobr");
-      sr_expect ("nobr");
-      gr_expect_prompt ();
-    }
-  num_brkpts = 0;
-  return (0);
-}
-
-struct target_ops bug_ops;
-
-static void
-init_bug_ops (void)
-{
-  bug_ops.to_shortname = "bug";
-  "Remote BUG monitor",
-    bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
-  bug_ops.to_doc = " ";
-  bug_ops.to_open = bug_open;
-  bug_ops.to_close = gr_close;
-  bug_ops.to_attach = 0;
-  bug_ops.to_post_attach = NULL;
-  bug_ops.to_require_attach = NULL;
-  bug_ops.to_detach = gr_detach;
-  bug_ops.to_require_detach = NULL;
-  bug_ops.to_resume = bug_resume;
-  bug_ops.to_wait = bug_wait;
-  bug_ops.to_post_wait = NULL;
-  bug_ops.to_fetch_registers = bug_fetch_register;
-  bug_ops.to_store_registers = bug_store_register;
-  bug_ops.to_prepare_to_store = gr_prepare_to_store;
-  bug_ops.to_xfer_memory = bug_xfer_memory;
-  bug_ops.to_files_info = gr_files_info;
-  bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
-  bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
-  bug_ops.to_terminal_init = 0;
-  bug_ops.to_terminal_inferior = 0;
-  bug_ops.to_terminal_ours_for_output = 0;
-  bug_ops.to_terminal_ours = 0;
-  bug_ops.to_terminal_info = 0;
-  bug_ops.to_kill = gr_kill;
-  bug_ops.to_load = bug_load;
-  bug_ops.to_lookup_symbol = 0;
-  bug_ops.to_create_inferior = gr_create_inferior;
-  bug_ops.to_post_startup_inferior = NULL;
-  bug_ops.to_acknowledge_created_inferior = NULL;
-  bug_ops.to_clone_and_follow_inferior = NULL;
-  bug_ops.to_post_follow_inferior_by_clone = NULL;
-  bug_ops.to_insert_fork_catchpoint = NULL;
-  bug_ops.to_remove_fork_catchpoint = NULL;
-  bug_ops.to_insert_vfork_catchpoint = NULL;
-  bug_ops.to_remove_vfork_catchpoint = NULL;
-  bug_ops.to_has_forked = NULL;
-  bug_ops.to_has_vforked = NULL;
-  bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
-  bug_ops.to_post_follow_vfork = NULL;
-  bug_ops.to_insert_exec_catchpoint = NULL;
-  bug_ops.to_remove_exec_catchpoint = NULL;
-  bug_ops.to_has_execd = NULL;
-  bug_ops.to_reported_exec_events_per_exec_call = NULL;
-  bug_ops.to_has_exited = NULL;
-  bug_ops.to_mourn_inferior = gr_mourn;
-  bug_ops.to_can_run = 0;
-  bug_ops.to_notice_signals = 0;
-  bug_ops.to_thread_alive = 0;
-  bug_ops.to_stop = 0;
-  bug_ops.to_pid_to_exec_file = NULL;
-  bug_ops.to_stratum = process_stratum;
-  bug_ops.DONT_USE = 0;
-  bug_ops.to_has_all_memory = 1;
-  bug_ops.to_has_memory = 1;
-  bug_ops.to_has_stack = 1;
-  bug_ops.to_has_registers = 0;
-  bug_ops.to_has_execution = 0;
-  bug_ops.to_sections = 0;
-  bug_ops.to_sections_end = 0;
-  bug_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
-}				/* init_bug_ops */
-
-void
-_initialize_remote_bug (void)
-{
-  init_bug_ops ();
-  add_target (&bug_ops);
-
-  add_show_from_set
-    (add_set_cmd ("srec-bytes", class_support, var_uinteger,
-		  (char *) &srec_bytes,
-		  "\
-Set the number of bytes represented in each S-record.\n\
-This affects the communication protocol with the remote target.",
-		  &setlist),
-     &showlist);
-
-  add_show_from_set
-    (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
-		  (char *) &srec_max_retries,
-		  "\
-Set the number of retries for shipping S-records.\n\
-This affects the communication protocol with the remote target.",
-		  &setlist),
-     &showlist);
-
-#if 0
-  /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
-     end of a download.  But do we need the option at all?  */
-  add_show_from_set
-    (add_set_cmd ("srec-frame", class_support, var_uinteger,
-		  (char *) &srec_frame,
-		  "\
-Set the number of bytes in an S-record frame.\n\
-This affects the communication protocol with the remote target.",
-		  &setlist),
-     &showlist);
-#endif /* 0 */
-
-  add_show_from_set
-    (add_set_cmd ("srec-noise", class_support, var_zinteger,
-		  (char *) &srec_noise,
-		  "\
-Set number of S-record to send before deliberately flubbing a checksum.\n\
-Zero means flub none at all.  This affects the communication protocol\n\
-with the remote target.",
-		  &setlist),
-     &showlist);
-
-  add_show_from_set
-    (add_set_cmd ("srec-sleep", class_support, var_zinteger,
-		  (char *) &srec_sleep,
-		  "\
-Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
-This affects the communication protocol with the remote target.",
-		  &setlist),
-     &showlist);
-
-  add_show_from_set
-    (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
-		  (char *) &srec_echo_pace,
-		  "\
-Set echo-verification.\n\
-When on, use verification by echo when downloading S-records.  This is\n\
-much slower, but generally more reliable.",
-		  &setlist),
-     &showlist);
-}
+// OBSOLETE /* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
+// OBSOLETE    monitor for the m88k.
+// OBSOLETE 
+// OBSOLETE    Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+// OBSOLETE    2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    Contributed by Cygnus Support.  Written by K. Richard Pixley.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <setjmp.h>
+// OBSOLETE #include <errno.h>
+// OBSOLETE 
+// OBSOLETE #include "terminal.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE 
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "remote-utils.h"
+// OBSOLETE 
+// OBSOLETE /* External data declarations */
+// OBSOLETE extern int stop_soon_quietly;	/* for wait_for_inferior */
+// OBSOLETE 
+// OBSOLETE /* Forward data declarations */
+// OBSOLETE extern struct target_ops bug_ops;	/* Forward declaration */
+// OBSOLETE 
+// OBSOLETE /* Forward function declarations */
+// OBSOLETE static int bug_clear_breakpoints (void);
+// OBSOLETE 
+// OBSOLETE static int bug_read_memory (CORE_ADDR memaddr,
+// OBSOLETE 			    unsigned char *myaddr, int len);
+// OBSOLETE 
+// OBSOLETE static int bug_write_memory (CORE_ADDR memaddr,
+// OBSOLETE 			     unsigned char *myaddr, int len);
+// OBSOLETE 
+// OBSOLETE /* This variable is somewhat arbitrary.  It's here so that it can be
+// OBSOLETE    set from within a running gdb.  */
+// OBSOLETE 
+// OBSOLETE static int srec_max_retries = 3;
+// OBSOLETE 
+// OBSOLETE /* Each S-record download to the target consists of an S0 header
+// OBSOLETE    record, some number of S3 data records, and one S7 termination
+// OBSOLETE    record.  I call this download a "frame".  Srec_frame says how many
+// OBSOLETE    bytes will be represented in each frame.  */
+// OBSOLETE 
+// OBSOLETE #define SREC_SIZE 160
+// OBSOLETE static int srec_frame = SREC_SIZE;
+// OBSOLETE 
+// OBSOLETE /* This variable determines how many bytes will be represented in each
+// OBSOLETE    S3 s-record.  */
+// OBSOLETE 
+// OBSOLETE static int srec_bytes = 40;
+// OBSOLETE 
+// OBSOLETE /* At one point it appeared to me as though the bug monitor could not
+// OBSOLETE    really be expected to receive two sequential characters at 9600
+// OBSOLETE    baud reliably.  Echo-pacing is an attempt to force data across the
+// OBSOLETE    line even in this condition.  Specifically, in echo-pace mode, each
+// OBSOLETE    character is sent one at a time and we look for the echo before
+// OBSOLETE    sending the next.  This is excruciatingly slow.  */
+// OBSOLETE 
+// OBSOLETE static int srec_echo_pace = 0;
+// OBSOLETE 
+// OBSOLETE /* How long to wait after an srec for a possible error message.
+// OBSOLETE    Similar to the above, I tried sleeping after sending each S3 record
+// OBSOLETE    in hopes that I might actually see error messages from the bug
+// OBSOLETE    monitor.  This might actually work if we were to use sleep
+// OBSOLETE    intervals smaller than 1 second.  */
+// OBSOLETE 
+// OBSOLETE static int srec_sleep = 0;
+// OBSOLETE 
+// OBSOLETE /* Every srec_noise records, flub the checksum.  This is a debugging
+// OBSOLETE    feature.  Set the variable to something other than 1 in order to
+// OBSOLETE    inject *deliberate* checksum errors.  One might do this if one
+// OBSOLETE    wanted to test error handling and recovery.  */
+// OBSOLETE 
+// OBSOLETE static int srec_noise = 0;
+// OBSOLETE 
+// OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout.  */
+// OBSOLETE 
+// OBSOLETE /* Number of SIGTRAPs we need to simulate.  That is, the next
+// OBSOLETE    NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
+// OBSOLETE    SIGTRAP without actually waiting for anything.  */
+// OBSOLETE 
+// OBSOLETE static int need_artificial_trap = 0;
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Download a file specified in 'args', to the bug.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE bug_load (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE   bfd *abfd;
+// OBSOLETE   asection *s;
+// OBSOLETE   char buffer[1024];
+// OBSOLETE 
+// OBSOLETE   sr_check_open ();
+// OBSOLETE 
+// OBSOLETE   inferior_ptid = null_ptid;
+// OBSOLETE   abfd = bfd_openr (args, 0);
+// OBSOLETE   if (!abfd)
+// OBSOLETE     {
+// OBSOLETE       printf_filtered ("Unable to open file %s\n", args);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (bfd_check_format (abfd, bfd_object) == 0)
+// OBSOLETE     {
+// OBSOLETE       printf_filtered ("File is not an object file\n");
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   s = abfd->sections;
+// OBSOLETE   while (s != (asection *) NULL)
+// OBSOLETE     {
+// OBSOLETE       srec_frame = SREC_SIZE;
+// OBSOLETE       if (s->flags & SEC_LOAD)
+// OBSOLETE 	{
+// OBSOLETE 	  int i;
+// OBSOLETE 
+// OBSOLETE 	  char *buffer = xmalloc (srec_frame);
+// OBSOLETE 
+// OBSOLETE 	  printf_filtered ("%s\t: 0x%4lx .. 0x%4lx  ", s->name, s->vma, s->vma + s->_raw_size);
+// OBSOLETE 	  gdb_flush (gdb_stdout);
+// OBSOLETE 	  for (i = 0; i < s->_raw_size; i += srec_frame)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (srec_frame > s->_raw_size - i)
+// OBSOLETE 		srec_frame = s->_raw_size - i;
+// OBSOLETE 
+// OBSOLETE 	      bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
+// OBSOLETE 	      bug_write_memory (s->vma + i, buffer, srec_frame);
+// OBSOLETE 	      printf_filtered ("*");
+// OBSOLETE 	      gdb_flush (gdb_stdout);
+// OBSOLETE 	    }
+// OBSOLETE 	  printf_filtered ("\n");
+// OBSOLETE 	  xfree (buffer);
+// OBSOLETE 	}
+// OBSOLETE       s = s->next;
+// OBSOLETE     }
+// OBSOLETE   sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
+// OBSOLETE   sr_write_cr (buffer);
+// OBSOLETE   gr_expect_prompt ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE static char *
+// OBSOLETE get_word (char **p)
+// OBSOLETE {
+// OBSOLETE   char *s = *p;
+// OBSOLETE   char *word;
+// OBSOLETE   char *copy;
+// OBSOLETE   size_t len;
+// OBSOLETE 
+// OBSOLETE   while (isspace (*s))
+// OBSOLETE     s++;
+// OBSOLETE 
+// OBSOLETE   word = s;
+// OBSOLETE 
+// OBSOLETE   len = 0;
+// OBSOLETE 
+// OBSOLETE   while (*s && !isspace (*s))
+// OBSOLETE     {
+// OBSOLETE       s++;
+// OBSOLETE       len++;
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE   copy = xmalloc (len + 1);
+// OBSOLETE   memcpy (copy, word, len);
+// OBSOLETE   copy[len] = 0;
+// OBSOLETE   *p = s;
+// OBSOLETE   return copy;
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE static struct gr_settings bug_settings =
+// OBSOLETE {
+// OBSOLETE   "Bug>",			/* prompt */
+// OBSOLETE   &bug_ops,			/* ops */
+// OBSOLETE   bug_clear_breakpoints,	/* clear_all_breakpoints */
+// OBSOLETE   gr_generic_checkin,		/* checkin */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static char *cpu_check_strings[] =
+// OBSOLETE {
+// OBSOLETE   "=",
+// OBSOLETE   "Invalid Register",
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE bug_open (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   if (args == NULL)
+// OBSOLETE     args = "";
+// OBSOLETE 
+// OBSOLETE   gr_open (args, from_tty, &bug_settings);
+// OBSOLETE   /* decide *now* whether we are on an 88100 or an 88110 */
+// OBSOLETE   sr_write_cr ("rs cr06");
+// OBSOLETE   sr_expect ("rs cr06");
+// OBSOLETE 
+// OBSOLETE   switch (gr_multi_scan (cpu_check_strings, 0))
+// OBSOLETE     {
+// OBSOLETE     case 0:			/* this is an m88100 */
+// OBSOLETE       target_is_m88110 = 0;
+// OBSOLETE       break;
+// OBSOLETE     case 1:			/* this is an m88110 */
+// OBSOLETE       target_is_m88110 = 1;
+// OBSOLETE       break;
+// OBSOLETE     default:
+// OBSOLETE       internal_error (__FILE__, __LINE__, "failed internal consistency check");
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Tell the remote machine to resume.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE bug_resume (ptid_t ptid, int step, enum target_signal sig)
+// OBSOLETE {
+// OBSOLETE   if (step)
+// OBSOLETE     {
+// OBSOLETE       sr_write_cr ("t");
+// OBSOLETE 
+// OBSOLETE       /* Force the next bug_wait to return a trap.  Not doing anything
+// OBSOLETE          about I/O from the target means that the user has to type
+// OBSOLETE          "continue" to see any.  FIXME, this should be fixed.  */
+// OBSOLETE       need_artificial_trap = 1;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     sr_write_cr ("g");
+// OBSOLETE 
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Wait until the remote machine stops, then return,
+// OBSOLETE    storing status in STATUS just as `wait' would.  */
+// OBSOLETE 
+// OBSOLETE static char *wait_strings[] =
+// OBSOLETE {
+// OBSOLETE   "At Breakpoint",
+// OBSOLETE   "Exception: Data Access Fault (Local Bus Timeout)",
+// OBSOLETE   "\r8??\?-Bug>",		/* The '\?' avoids creating a trigraph */
+// OBSOLETE   "\r197-Bug>",
+// OBSOLETE   NULL,
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE ptid_t
+// OBSOLETE bug_wait (ptid_t ptid, struct target_waitstatus *status)
+// OBSOLETE {
+// OBSOLETE   int old_timeout = sr_get_timeout ();
+// OBSOLETE   int old_immediate_quit = immediate_quit;
+// OBSOLETE 
+// OBSOLETE   status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE   status->value.integer = 0;
+// OBSOLETE 
+// OBSOLETE   /* read off leftovers from resume so that the rest can be passed
+// OBSOLETE      back out as stdout.  */
+// OBSOLETE   if (need_artificial_trap == 0)
+// OBSOLETE     {
+// OBSOLETE       sr_expect ("Effective address: ");
+// OBSOLETE       (void) sr_get_hex_word ();
+// OBSOLETE       sr_expect ("\r\n");
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   sr_set_timeout (-1);		/* Don't time out -- user program is running. */
+// OBSOLETE   immediate_quit = 1;		/* Helps ability to QUIT */
+// OBSOLETE 
+// OBSOLETE   switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
+// OBSOLETE     {
+// OBSOLETE     case 0:			/* breakpoint case */
+// OBSOLETE       status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE       status->value.sig = TARGET_SIGNAL_TRAP;
+// OBSOLETE       /* user output from the target can be discarded here. (?) */
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case 1:			/* bus error */
+// OBSOLETE       status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE       status->value.sig = TARGET_SIGNAL_BUS;
+// OBSOLETE       /* user output from the target can be discarded here. (?) */
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     case 2:			/* normal case */
+// OBSOLETE     case 3:
+// OBSOLETE       if (need_artificial_trap != 0)
+// OBSOLETE 	{
+// OBSOLETE 	  /* stepping */
+// OBSOLETE 	  status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE 	  status->value.sig = TARGET_SIGNAL_TRAP;
+// OBSOLETE 	  need_artificial_trap--;
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* exit case */
+// OBSOLETE 	  status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE 	  status->value.integer = 0;
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE     case -1:			/* trouble */
+// OBSOLETE     default:
+// OBSOLETE       fprintf_filtered (gdb_stderr,
+// OBSOLETE 			"Trouble reading target during wait\n");
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   sr_set_timeout (old_timeout);
+// OBSOLETE   immediate_quit = old_immediate_quit;
+// OBSOLETE   return inferior_ptid;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the name of register number REGNO
+// OBSOLETE    in the form input and output by bug.
+// OBSOLETE 
+// OBSOLETE    Returns a pointer to a static buffer containing the answer.  */
+// OBSOLETE static char *
+// OBSOLETE get_reg_name (int regno)
+// OBSOLETE {
+// OBSOLETE   static char *rn[] =
+// OBSOLETE   {
+// OBSOLETE     "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
+// OBSOLETE     "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
+// OBSOLETE     "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+// OBSOLETE     "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+// OBSOLETE 
+// OBSOLETE   /* these get confusing because we omit a few and switch some ordering around. */
+// OBSOLETE 
+// OBSOLETE     "cr01",			/* 32 = psr */
+// OBSOLETE     "fcr62",			/* 33 = fpsr */
+// OBSOLETE     "fcr63",			/* 34 = fpcr */
+// OBSOLETE     "ip",			/* this is something of a cheat. */
+// OBSOLETE   /* 35 = sxip */
+// OBSOLETE     "cr05",			/* 36 = snip */
+// OBSOLETE     "cr06",			/* 37 = sfip */
+// OBSOLETE 
+// OBSOLETE     "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
+// OBSOLETE     "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
+// OBSOLETE     "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
+// OBSOLETE     "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
+// OBSOLETE   };
+// OBSOLETE 
+// OBSOLETE   return rn[regno];
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if 0				/* not currently used */
+// OBSOLETE /* Read from remote while the input matches STRING.  Return zero on
+// OBSOLETE    success, -1 on failure.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE bug_scan (char *s)
+// OBSOLETE {
+// OBSOLETE   int c;
+// OBSOLETE 
+// OBSOLETE   while (*s)
+// OBSOLETE     {
+// OBSOLETE       c = sr_readchar ();
+// OBSOLETE       if (c != *s++)
+// OBSOLETE 	{
+// OBSOLETE 	  fflush (stdout);
+// OBSOLETE 	  printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
+// OBSOLETE 	  return (-1);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE #endif /* never */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE bug_srec_write_cr (char *s)
+// OBSOLETE {
+// OBSOLETE   char *p = s;
+// OBSOLETE 
+// OBSOLETE   if (srec_echo_pace)
+// OBSOLETE     for (p = s; *p; ++p)
+// OBSOLETE       {
+// OBSOLETE 	if (sr_get_debug () > 0)
+// OBSOLETE 	  printf ("%c", *p);
+// OBSOLETE 
+// OBSOLETE 	do
+// OBSOLETE 	  serial_write (sr_get_desc (), p, 1);
+// OBSOLETE 	while (sr_pollchar () != *p);
+// OBSOLETE       }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       sr_write_cr (s);
+// OBSOLETE /*       return(bug_scan (s) || bug_scan ("\n")); */
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE bug_fetch_register (int regno)
+// OBSOLETE {
+// OBSOLETE   sr_check_open ();
+// OBSOLETE 
+// OBSOLETE   if (regno == -1)
+// OBSOLETE     {
+// OBSOLETE       int i;
+// OBSOLETE 
+// OBSOLETE       for (i = 0; i < NUM_REGS; ++i)
+// OBSOLETE 	bug_fetch_register (i);
+// OBSOLETE     }
+// OBSOLETE   else if (target_is_m88110 && regno == SFIP_REGNUM)
+// OBSOLETE     {
+// OBSOLETE       /* m88110 has no sfip. */
+// OBSOLETE       long l = 0;
+// OBSOLETE       supply_register (regno, (char *) &l);
+// OBSOLETE     }
+// OBSOLETE   else if (regno < XFP_REGNUM)
+// OBSOLETE     {
+// OBSOLETE       char buffer[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE 
+// OBSOLETE       sr_write ("rs ", 3);
+// OBSOLETE       sr_write_cr (get_reg_name (regno));
+// OBSOLETE       sr_expect ("=");
+// OBSOLETE       store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
+// OBSOLETE 			      sr_get_hex_word ());
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE       supply_register (regno, buffer);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* Float register so we need to parse a strange data format. */
+// OBSOLETE       long p;
+// OBSOLETE       unsigned char fpreg_buf[10];
+// OBSOLETE 
+// OBSOLETE       sr_write ("rs ", 3);
+// OBSOLETE       sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
+// OBSOLETE       sr_write_cr (";d");
+// OBSOLETE       sr_expect ("rs");
+// OBSOLETE       sr_expect (get_reg_name (regno));
+// OBSOLETE       sr_expect (";d");
+// OBSOLETE       sr_expect ("=");
+// OBSOLETE 
+// OBSOLETE       /* sign */
+// OBSOLETE       p = sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[0] = p << 7;
+// OBSOLETE 
+// OBSOLETE       /* exponent */
+// OBSOLETE       sr_expect ("_");
+// OBSOLETE       p = sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[0] += (p << 4);
+// OBSOLETE       fpreg_buf[0] += sr_get_hex_digit (1);
+// OBSOLETE 
+// OBSOLETE       fpreg_buf[1] = sr_get_hex_digit (1) << 4;
+// OBSOLETE 
+// OBSOLETE       /* fraction */
+// OBSOLETE       sr_expect ("_");
+// OBSOLETE       fpreg_buf[1] += sr_get_hex_digit (1);
+// OBSOLETE 
+// OBSOLETE       fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE       fpreg_buf[8] = 0;
+// OBSOLETE       fpreg_buf[9] = 0;
+// OBSOLETE 
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE       supply_register (regno, fpreg_buf);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE bug_store_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char buffer[1024];
+// OBSOLETE   sr_check_open ();
+// OBSOLETE 
+// OBSOLETE   if (regno == -1)
+// OBSOLETE     {
+// OBSOLETE       int i;
+// OBSOLETE 
+// OBSOLETE       for (i = 0; i < NUM_REGS; ++i)
+// OBSOLETE 	bug_store_register (i);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       char *regname;
+// OBSOLETE 
+// OBSOLETE       regname = get_reg_name (regno);
+// OBSOLETE 
+// OBSOLETE       if (target_is_m88110 && regno == SFIP_REGNUM)
+// OBSOLETE 	return;
+// OBSOLETE       else if (regno < XFP_REGNUM)
+// OBSOLETE 	sprintf (buffer, "rs %s %08lx",
+// OBSOLETE 		 regname,
+// OBSOLETE 		 (long) read_register (regno));
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  unsigned char *fpreg_buf =
+// OBSOLETE 	  (unsigned char *) &registers[REGISTER_BYTE (regno)];
+// OBSOLETE 
+// OBSOLETE 	  sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
+// OBSOLETE 		   regname,
+// OBSOLETE 	  /* sign */
+// OBSOLETE 		   (fpreg_buf[0] >> 7) & 0xf,
+// OBSOLETE 	  /* exponent */
+// OBSOLETE 		   fpreg_buf[0] & 0x7f,
+// OBSOLETE 		   (fpreg_buf[1] >> 8) & 0xf,
+// OBSOLETE 	  /* fraction */
+// OBSOLETE 		   fpreg_buf[1] & 0xf,
+// OBSOLETE 		   fpreg_buf[2],
+// OBSOLETE 		   fpreg_buf[3],
+// OBSOLETE 		   fpreg_buf[4],
+// OBSOLETE 		   fpreg_buf[5],
+// OBSOLETE 		   fpreg_buf[6],
+// OBSOLETE 		   fpreg_buf[7]);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       sr_write_cr (buffer);
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address
+// OBSOLETE    MEMADDR.  If WRITE is non-zero, transfer them to the target,
+// OBSOLETE    otherwise transfer them from the target.  TARGET is unused.
+// OBSOLETE 
+// OBSOLETE    Returns the number of bytes transferred. */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+// OBSOLETE 		 struct mem_attrib *attrib, struct target_ops *target)
+// OBSOLETE {
+// OBSOLETE   int res;
+// OBSOLETE 
+// OBSOLETE   if (len <= 0)
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   if (write)
+// OBSOLETE     res = bug_write_memory (memaddr, myaddr, len);
+// OBSOLETE   else
+// OBSOLETE     res = bug_read_memory (memaddr, myaddr, len);
+// OBSOLETE 
+// OBSOLETE   return res;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE start_load (void)
+// OBSOLETE {
+// OBSOLETE   char *command;
+// OBSOLETE 
+// OBSOLETE   command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
+// OBSOLETE 
+// OBSOLETE   sr_write_cr (command);
+// OBSOLETE   sr_expect (command);
+// OBSOLETE   sr_expect ("\r\n");
+// OBSOLETE   bug_srec_write_cr ("S0030000FC");
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* This is an extremely vulnerable and fragile function.  I've made
+// OBSOLETE    considerable attempts to make this deterministic, but I've
+// OBSOLETE    certainly forgotten something.  The trouble is that S-records are
+// OBSOLETE    only a partial file format, not a protocol.  Worse, apparently the
+// OBSOLETE    m88k bug monitor does not run in real time while receiving
+// OBSOLETE    S-records.  Hence, we must pay excruciating attention to when and
+// OBSOLETE    where error messages are returned, and what has actually been sent.
+// OBSOLETE 
+// OBSOLETE    Each call represents a chunk of memory to be sent to the target.
+// OBSOLETE    We break that chunk into an S0 header record, some number of S3
+// OBSOLETE    data records each containing srec_bytes, and an S7 termination
+// OBSOLETE    record.  */
+// OBSOLETE 
+// OBSOLETE static char *srecord_strings[] =
+// OBSOLETE {
+// OBSOLETE   "S-RECORD",
+// OBSOLETE   "-Bug>",
+// OBSOLETE   NULL,
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE   int done;
+// OBSOLETE   int checksum;
+// OBSOLETE   int x;
+// OBSOLETE   int retries;
+// OBSOLETE   char *buffer = alloca ((srec_bytes + 8) << 1);
+// OBSOLETE 
+// OBSOLETE   retries = 0;
+// OBSOLETE 
+// OBSOLETE   do
+// OBSOLETE     {
+// OBSOLETE       done = 0;
+// OBSOLETE 
+// OBSOLETE       if (retries > srec_max_retries)
+// OBSOLETE 	return (-1);
+// OBSOLETE 
+// OBSOLETE       if (retries > 0)
+// OBSOLETE 	{
+// OBSOLETE 	  if (sr_get_debug () > 0)
+// OBSOLETE 	    printf ("\n<retrying...>\n");
+// OBSOLETE 
+// OBSOLETE 	  /* This gr_expect_prompt call is extremely important.  Without
+// OBSOLETE 	     it, we will tend to resend our packet so fast that it
+// OBSOLETE 	     will arrive before the bug monitor is ready to receive
+// OBSOLETE 	     it.  This would lead to a very ugly resend loop.  */
+// OBSOLETE 
+// OBSOLETE 	  gr_expect_prompt ();
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       start_load ();
+// OBSOLETE 
+// OBSOLETE       while (done < len)
+// OBSOLETE 	{
+// OBSOLETE 	  int thisgo;
+// OBSOLETE 	  int idx;
+// OBSOLETE 	  char *buf = buffer;
+// OBSOLETE 	  CORE_ADDR address;
+// OBSOLETE 
+// OBSOLETE 	  checksum = 0;
+// OBSOLETE 	  thisgo = len - done;
+// OBSOLETE 	  if (thisgo > srec_bytes)
+// OBSOLETE 	    thisgo = srec_bytes;
+// OBSOLETE 
+// OBSOLETE 	  address = memaddr + done;
+// OBSOLETE 	  sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
+// OBSOLETE 	  buf += 12;
+// OBSOLETE 
+// OBSOLETE 	  checksum += (thisgo + 4 + 1
+// OBSOLETE 		       + (address & 0xff)
+// OBSOLETE 		       + ((address >> 8) & 0xff)
+// OBSOLETE 		       + ((address >> 16) & 0xff)
+// OBSOLETE 		       + ((address >> 24) & 0xff));
+// OBSOLETE 
+// OBSOLETE 	  for (idx = 0; idx < thisgo; idx++)
+// OBSOLETE 	    {
+// OBSOLETE 	      sprintf (buf, "%02X", myaddr[idx + done]);
+// OBSOLETE 	      checksum += myaddr[idx + done];
+// OBSOLETE 	      buf += 2;
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	  if (srec_noise > 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      /* FIXME-NOW: insert a deliberate error every now and then.
+// OBSOLETE 	         This is intended for testing/debugging the error handling
+// OBSOLETE 	         stuff.  */
+// OBSOLETE 	      static int counter = 0;
+// OBSOLETE 	      if (++counter > srec_noise)
+// OBSOLETE 		{
+// OBSOLETE 		  counter = 0;
+// OBSOLETE 		  ++checksum;
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	  sprintf (buf, "%02X", ~checksum & 0xff);
+// OBSOLETE 	  bug_srec_write_cr (buffer);
+// OBSOLETE 
+// OBSOLETE 	  if (srec_sleep != 0)
+// OBSOLETE 	    sleep (srec_sleep);
+// OBSOLETE 
+// OBSOLETE 	  /* This pollchar is probably redundant to the gr_multi_scan
+// OBSOLETE 	     below.  Trouble is, we can't be sure when or where an
+// OBSOLETE 	     error message will appear.  Apparently, when running at
+// OBSOLETE 	     full speed from a typical sun4, error messages tend to
+// OBSOLETE 	     appear to arrive only *after* the s7 record.   */
+// OBSOLETE 
+// OBSOLETE 	  if ((x = sr_pollchar ()) != 0)
+// OBSOLETE 	    {
+// OBSOLETE 	      if (sr_get_debug () > 0)
+// OBSOLETE 		printf ("\n<retrying...>\n");
+// OBSOLETE 
+// OBSOLETE 	      ++retries;
+// OBSOLETE 
+// OBSOLETE 	      /* flush any remaining input and verify that we are back
+// OBSOLETE 	         at the prompt level. */
+// OBSOLETE 	      gr_expect_prompt ();
+// OBSOLETE 	      /* start all over again. */
+// OBSOLETE 	      start_load ();
+// OBSOLETE 	      done = 0;
+// OBSOLETE 	      continue;
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	  done += thisgo;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       bug_srec_write_cr ("S7060000000000F9");
+// OBSOLETE       ++retries;
+// OBSOLETE 
+// OBSOLETE       /* Having finished the load, we need to figure out whether we
+// OBSOLETE          had any errors.  */
+// OBSOLETE     }
+// OBSOLETE   while (gr_multi_scan (srecord_strings, 0) == 0);;
+// OBSOLETE 
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR
+// OBSOLETE    to inferior's memory at MEMADDR.  Returns errno value.
+// OBSOLETE    * sb/sh instructions don't work on unaligned addresses, when TU=1.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR.  Put the result
+// OBSOLETE    at debugger address MYADDR.  Returns errno value.  */
+// OBSOLETE static int
+// OBSOLETE bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE   char request[100];
+// OBSOLETE   char *buffer;
+// OBSOLETE   char *p;
+// OBSOLETE   char type;
+// OBSOLETE   char size;
+// OBSOLETE   unsigned char c;
+// OBSOLETE   unsigned int inaddr;
+// OBSOLETE   unsigned int checksum;
+// OBSOLETE 
+// OBSOLETE   sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
+// OBSOLETE   sr_write_cr (request);
+// OBSOLETE 
+// OBSOLETE   p = buffer = alloca (len);
+// OBSOLETE 
+// OBSOLETE   /* scan up through the header */
+// OBSOLETE   sr_expect ("S0030000FC");
+// OBSOLETE 
+// OBSOLETE   while (p < buffer + len)
+// OBSOLETE     {
+// OBSOLETE       /* scan off any white space. */
+// OBSOLETE       while (sr_readchar () != 'S');;
+// OBSOLETE 
+// OBSOLETE       /* what kind of s-rec? */
+// OBSOLETE       type = sr_readchar ();
+// OBSOLETE 
+// OBSOLETE       /* scan record size */
+// OBSOLETE       sr_get_hex_byte (&size);
+// OBSOLETE       checksum = size;
+// OBSOLETE       --size;
+// OBSOLETE       inaddr = 0;
+// OBSOLETE 
+// OBSOLETE       switch (type)
+// OBSOLETE 	{
+// OBSOLETE 	case '7':
+// OBSOLETE 	case '8':
+// OBSOLETE 	case '9':
+// OBSOLETE 	  goto done;
+// OBSOLETE 
+// OBSOLETE 	case '3':
+// OBSOLETE 	  sr_get_hex_byte (&c);
+// OBSOLETE 	  inaddr = (inaddr << 8) + c;
+// OBSOLETE 	  checksum += c;
+// OBSOLETE 	  --size;
+// OBSOLETE 	  /* intentional fall through */
+// OBSOLETE 	case '2':
+// OBSOLETE 	  sr_get_hex_byte (&c);
+// OBSOLETE 	  inaddr = (inaddr << 8) + c;
+// OBSOLETE 	  checksum += c;
+// OBSOLETE 	  --size;
+// OBSOLETE 	  /* intentional fall through */
+// OBSOLETE 	case '1':
+// OBSOLETE 	  sr_get_hex_byte (&c);
+// OBSOLETE 	  inaddr = (inaddr << 8) + c;
+// OBSOLETE 	  checksum += c;
+// OBSOLETE 	  --size;
+// OBSOLETE 	  sr_get_hex_byte (&c);
+// OBSOLETE 	  inaddr = (inaddr << 8) + c;
+// OBSOLETE 	  checksum += c;
+// OBSOLETE 	  --size;
+// OBSOLETE 	  break;
+// OBSOLETE 
+// OBSOLETE 	default:
+// OBSOLETE 	  /* bonk */
+// OBSOLETE 	  error ("reading s-records.");
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (inaddr < memaddr
+// OBSOLETE 	  || (memaddr + len) < (inaddr + size))
+// OBSOLETE 	error ("srec out of memory range.");
+// OBSOLETE 
+// OBSOLETE       if (p != buffer + inaddr - memaddr)
+// OBSOLETE 	error ("srec out of sequence.");
+// OBSOLETE 
+// OBSOLETE       for (; size; --size, ++p)
+// OBSOLETE 	{
+// OBSOLETE 	  sr_get_hex_byte (p);
+// OBSOLETE 	  checksum += *p;
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       sr_get_hex_byte (&c);
+// OBSOLETE       if (c != (~checksum & 0xff))
+// OBSOLETE 	error ("bad s-rec checksum");
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE done:
+// OBSOLETE   gr_expect_prompt ();
+// OBSOLETE   if (p != buffer + len)
+// OBSOLETE     return (1);
+// OBSOLETE 
+// OBSOLETE   memcpy (myaddr, buffer, len);
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #define MAX_BREAKS	16
+// OBSOLETE static int num_brkpts = 0;
+// OBSOLETE 
+// OBSOLETE /* Insert a breakpoint at ADDR.  SAVE is normally the address of the
+// OBSOLETE    pattern buffer where the instruction that the breakpoint overwrites
+// OBSOLETE    is saved.  It is unused here since the bug is responsible for
+// OBSOLETE    saving/restoring the original instruction. */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE bug_insert_breakpoint (CORE_ADDR addr, char *save)
+// OBSOLETE {
+// OBSOLETE   sr_check_open ();
+// OBSOLETE 
+// OBSOLETE   if (num_brkpts < MAX_BREAKS)
+// OBSOLETE     {
+// OBSOLETE       char buffer[100];
+// OBSOLETE 
+// OBSOLETE       num_brkpts++;
+// OBSOLETE       sprintf (buffer, "br %lx", (long) addr);
+// OBSOLETE       sr_write_cr (buffer);
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE       return (0);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       fprintf_filtered (gdb_stderr,
+// OBSOLETE 		      "Too many break points, break point not installed\n");
+// OBSOLETE       return (1);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Remove a breakpoint at ADDR.  SAVE is normally the previously
+// OBSOLETE    saved pattern, but is unused here since the bug is responsible
+// OBSOLETE    for saving/restoring instructions. */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE bug_remove_breakpoint (CORE_ADDR addr, char *save)
+// OBSOLETE {
+// OBSOLETE   if (num_brkpts > 0)
+// OBSOLETE     {
+// OBSOLETE       char buffer[100];
+// OBSOLETE 
+// OBSOLETE       num_brkpts--;
+// OBSOLETE       sprintf (buffer, "nobr %lx", (long) addr);
+// OBSOLETE       sr_write_cr (buffer);
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Clear the bugs notion of what the break points are */
+// OBSOLETE static int
+// OBSOLETE bug_clear_breakpoints (void)
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE   if (sr_is_open ())
+// OBSOLETE     {
+// OBSOLETE       sr_write_cr ("nobr");
+// OBSOLETE       sr_expect ("nobr");
+// OBSOLETE       gr_expect_prompt ();
+// OBSOLETE     }
+// OBSOLETE   num_brkpts = 0;
+// OBSOLETE   return (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE struct target_ops bug_ops;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE init_bug_ops (void)
+// OBSOLETE {
+// OBSOLETE   bug_ops.to_shortname = "bug";
+// OBSOLETE   "Remote BUG monitor",
+// OBSOLETE     bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
+// OBSOLETE   bug_ops.to_doc = " ";
+// OBSOLETE   bug_ops.to_open = bug_open;
+// OBSOLETE   bug_ops.to_close = gr_close;
+// OBSOLETE   bug_ops.to_attach = 0;
+// OBSOLETE   bug_ops.to_post_attach = NULL;
+// OBSOLETE   bug_ops.to_require_attach = NULL;
+// OBSOLETE   bug_ops.to_detach = gr_detach;
+// OBSOLETE   bug_ops.to_require_detach = NULL;
+// OBSOLETE   bug_ops.to_resume = bug_resume;
+// OBSOLETE   bug_ops.to_wait = bug_wait;
+// OBSOLETE   bug_ops.to_post_wait = NULL;
+// OBSOLETE   bug_ops.to_fetch_registers = bug_fetch_register;
+// OBSOLETE   bug_ops.to_store_registers = bug_store_register;
+// OBSOLETE   bug_ops.to_prepare_to_store = gr_prepare_to_store;
+// OBSOLETE   bug_ops.to_xfer_memory = bug_xfer_memory;
+// OBSOLETE   bug_ops.to_files_info = gr_files_info;
+// OBSOLETE   bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
+// OBSOLETE   bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
+// OBSOLETE   bug_ops.to_terminal_init = 0;
+// OBSOLETE   bug_ops.to_terminal_inferior = 0;
+// OBSOLETE   bug_ops.to_terminal_ours_for_output = 0;
+// OBSOLETE   bug_ops.to_terminal_ours = 0;
+// OBSOLETE   bug_ops.to_terminal_info = 0;
+// OBSOLETE   bug_ops.to_kill = gr_kill;
+// OBSOLETE   bug_ops.to_load = bug_load;
+// OBSOLETE   bug_ops.to_lookup_symbol = 0;
+// OBSOLETE   bug_ops.to_create_inferior = gr_create_inferior;
+// OBSOLETE   bug_ops.to_post_startup_inferior = NULL;
+// OBSOLETE   bug_ops.to_acknowledge_created_inferior = NULL;
+// OBSOLETE   bug_ops.to_clone_and_follow_inferior = NULL;
+// OBSOLETE   bug_ops.to_post_follow_inferior_by_clone = NULL;
+// OBSOLETE   bug_ops.to_insert_fork_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_remove_fork_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_insert_vfork_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_remove_vfork_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_has_forked = NULL;
+// OBSOLETE   bug_ops.to_has_vforked = NULL;
+// OBSOLETE   bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
+// OBSOLETE   bug_ops.to_post_follow_vfork = NULL;
+// OBSOLETE   bug_ops.to_insert_exec_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_remove_exec_catchpoint = NULL;
+// OBSOLETE   bug_ops.to_has_execd = NULL;
+// OBSOLETE   bug_ops.to_reported_exec_events_per_exec_call = NULL;
+// OBSOLETE   bug_ops.to_has_exited = NULL;
+// OBSOLETE   bug_ops.to_mourn_inferior = gr_mourn;
+// OBSOLETE   bug_ops.to_can_run = 0;
+// OBSOLETE   bug_ops.to_notice_signals = 0;
+// OBSOLETE   bug_ops.to_thread_alive = 0;
+// OBSOLETE   bug_ops.to_stop = 0;
+// OBSOLETE   bug_ops.to_pid_to_exec_file = NULL;
+// OBSOLETE   bug_ops.to_stratum = process_stratum;
+// OBSOLETE   bug_ops.DONT_USE = 0;
+// OBSOLETE   bug_ops.to_has_all_memory = 1;
+// OBSOLETE   bug_ops.to_has_memory = 1;
+// OBSOLETE   bug_ops.to_has_stack = 1;
+// OBSOLETE   bug_ops.to_has_registers = 0;
+// OBSOLETE   bug_ops.to_has_execution = 0;
+// OBSOLETE   bug_ops.to_sections = 0;
+// OBSOLETE   bug_ops.to_sections_end = 0;
+// OBSOLETE   bug_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
+// OBSOLETE }				/* init_bug_ops */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_remote_bug (void)
+// OBSOLETE {
+// OBSOLETE   init_bug_ops ();
+// OBSOLETE   add_target (&bug_ops);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-bytes", class_support, var_uinteger,
+// OBSOLETE 		  (char *) &srec_bytes,
+// OBSOLETE 		  "\
+// OBSOLETE Set the number of bytes represented in each S-record.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
+// OBSOLETE 		  (char *) &srec_max_retries,
+// OBSOLETE 		  "\
+// OBSOLETE Set the number of retries for shipping S-records.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
+// OBSOLETE      end of a download.  But do we need the option at all?  */
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-frame", class_support, var_uinteger,
+// OBSOLETE 		  (char *) &srec_frame,
+// OBSOLETE 		  "\
+// OBSOLETE Set the number of bytes in an S-record frame.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE #endif /* 0 */
+// OBSOLETE 
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-noise", class_support, var_zinteger,
+// OBSOLETE 		  (char *) &srec_noise,
+// OBSOLETE 		  "\
+// OBSOLETE Set number of S-record to send before deliberately flubbing a checksum.\n\
+// OBSOLETE Zero means flub none at all.  This affects the communication protocol\n\
+// OBSOLETE with the remote target.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-sleep", class_support, var_zinteger,
+// OBSOLETE 		  (char *) &srec_sleep,
+// OBSOLETE 		  "\
+// OBSOLETE Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set
+// OBSOLETE     (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
+// OBSOLETE 		  (char *) &srec_echo_pace,
+// OBSOLETE 		  "\
+// OBSOLETE Set echo-verification.\n\
+// OBSOLETE When on, use verification by echo when downloading S-records.  This is\n\
+// OBSOLETE much slower, but generally more reliable.",
+// OBSOLETE 		  &setlist),
+// OBSOLETE      &showlist);
+// OBSOLETE }
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index e489254..24183cc 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -136,9 +136,9 @@
 
 static void es1800_files_info (struct target_ops *);
 
-static int
-es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
-			     struct mem_attrib *, struct target_ops *);
+static int es1800_xfer_inferior_memory (CORE_ADDR, char *, int, int,
+					struct mem_attrib *,
+					struct target_ops *);
 
 static void es1800_prepare_to_store (void);
 
diff --git a/gdb/remote-est.c b/gdb/remote-est.c
index e045a89..0a1d7af 100644
--- a/gdb/remote-est.c
+++ b/gdb/remote-est.c
@@ -76,12 +76,24 @@
  * registers either. So, typing "info reg sp" becomes a "r30".
  */
 
-static char *est_regnames[NUM_REGS] =
+static const char *
+est_regname (int index) 
 {
-  "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-  "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
-  "SR", "PC",
-};
+  
+  static char *regnames[] =
+  {
+    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
+    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7",
+    "SR", "PC",
+  };
+  
+
+  if ((index >= (sizeof (regnames) /  sizeof (regnames[0]))) 
+       || (index < 0) || (index >= NUM_REGS))
+    return NULL;
+  else
+    return regnames[index];
+}
 
 /*
  * Define the monitor command strings. Since these are passed directly
@@ -143,7 +155,8 @@
   est_cmds.cmd_end = NULL;	/* optional command terminator */
   est_cmds.target = &est_ops;	/* target operations */
   est_cmds.stopbits = SERIAL_1_STOPBITS;	/* number of stop bits */
-  est_cmds.regnames = est_regnames;	/* registers names */
+  est_cmds.regnames = NULL;
+  est_cmds.regname = est_regname; /*register names*/
   est_cmds.magic = MONITOR_OPS_MAGIC;	/* magic */
 }				/* init_est_cmds */
 
diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c
index 679dfad..ffbe7d8 100644
--- a/gdb/remote-nindy.c
+++ b/gdb/remote-nindy.c
@@ -1,762 +1,762 @@
-/* Memory-access and commands for remote NINDY process, for GDB.
-
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-   2000, 2001, 2002 Free Software Foundation, Inc.
-
-   Contributed by Intel Corporation.  Modified from remote.c by Chris Benenati.
-
-   GDB is distributed in the hope that it will be useful, but WITHOUT ANY
-   WARRANTY.  No author or distributor accepts responsibility to anyone
-   for the consequences of using it or for whether it serves any
-   particular purpose or works at all, unless he says so in writing.
-   Refer to the GDB General Public License for full details.
-
-   Everyone is granted permission to copy, modify and redistribute GDB,
-   but only under the conditions described in the GDB General Public
-   License.  A copy of this license is supposed to have been given to you
-   along with GDB so you can know your rights and responsibilities.  It
-   should be in a file named COPYING.  Among other things, the copyright
-   notice and this notice must be preserved on all copies.
-
-   In other words, go ahead and share GDB, but don't try to stop
-   anyone else from sharing it farther.  Help stamp out software hoarding!  */
-
-/*
-   Except for the data cache routines, this file bears little resemblence
-   to remote.c.  A new (although similar) protocol has been specified, and
-   portions of the code are entirely dependent on having an i80960 with a
-   NINDY ROM monitor at the other end of the line.
- */
-
-/*****************************************************************************
- *
- * REMOTE COMMUNICATION PROTOCOL BETWEEN GDB960 AND THE NINDY ROM MONITOR.
- *
- *
- * MODES OF OPERATION
- * ----- -- ---------
- *	
- * As far as NINDY is concerned, GDB is always in one of two modes: command
- * mode or passthrough mode.
- *
- * In command mode (the default) pre-defined packets containing requests
- * are sent by GDB to NINDY.  NINDY never talks except in reponse to a request.
- *
- * Once the the user program is started, GDB enters passthrough mode, to give
- * the user program access to the terminal.  GDB remains in this mode until
- * NINDY indicates that the program has stopped.
- *
- *
- * PASSTHROUGH MODE
- * ----------- ----
- *
- * GDB writes all input received from the keyboard directly to NINDY, and writes
- * all characters received from NINDY directly to the monitor.
- *
- * Keyboard input is neither buffered nor echoed to the monitor.
- *
- * GDB remains in passthrough mode until NINDY sends a single ^P character,
- * to indicate that the user process has stopped.
- *
- * Note:
- *	GDB assumes NINDY performs a 'flushreg' when the user program stops.
- *
- *
- * COMMAND MODE
- * ------- ----
- *
- * All info (except for message ack and nak) is transferred between gdb
- * and the remote processor in messages of the following format:
- *
- *		<info>#<checksum>
- *
- * where 
- *	#	is a literal character
- *
- *	<info>	ASCII information;  all numeric information is in the
- *		form of hex digits ('0'-'9' and lowercase 'a'-'f').
- *
- *	<checksum>
- *		is a pair of ASCII hex digits representing an 8-bit
- *		checksum formed by adding together each of the
- *		characters in <info>.
- *
- * The receiver of a message always sends a single character to the sender
- * to indicate that the checksum was good ('+') or bad ('-');  the sender
- * re-transmits the entire message over until a '+' is received.
- *
- * In response to a command NINDY always sends back either data or
- * a result code of the form "Xnn", where "nn" are hex digits and "X00"
- * means no errors.  (Exceptions: the "s" and "c" commands don't respond.)
- *
- * SEE THE HEADER OF THE FILE "gdb.c" IN THE NINDY MONITOR SOURCE CODE FOR A
- * FULL DESCRIPTION OF LEGAL COMMANDS.
- *
- * SEE THE FILE "stop.h" IN THE NINDY MONITOR SOURCE CODE FOR A LIST
- * OF STOP CODES.
- *
- ***************************************************************************/
-
-#include "defs.h"
-#include <signal.h>
-#include <sys/types.h>
-#include <setjmp.h>
-
-#include "frame.h"
-#include "inferior.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "floatformat.h"
-#include "regcache.h"
-
-#include <sys/file.h>
-#include <ctype.h>
-#include "serial.h"
-#include "nindy-share/env.h"
-#include "nindy-share/stop.h"
-#include "remote-utils.h"
-
-extern int unlink ();
-extern char *getenv ();
-extern char *mktemp ();
-
-extern void generic_mourn_inferior ();
-
-extern struct target_ops nindy_ops;
-extern FILE *instream;
-
-extern char ninStopWhy ();
-extern int ninMemGet ();
-extern int ninMemPut ();
-
-int nindy_initial_brk;		/* nonzero if want to send an initial BREAK to nindy */
-int nindy_old_protocol;		/* nonzero if want to use old protocol */
-char *nindy_ttyname;		/* name of tty to talk to nindy on, or null */
-
-#define DLE	'\020'		/* Character NINDY sends to indicate user program has
-				   * halted.  */
-#define TRUE	1
-#define FALSE	0
-
-/* From nindy-share/nindy.c.  */
-extern struct serial *nindy_serial;
-
-static int have_regs = 0;	/* 1 iff regs read since i960 last halted */
-static int regs_changed = 0;	/* 1 iff regs were modified since last read */
-
-extern char *exists ();
-
-static void nindy_fetch_registers (int);
-
-static void nindy_store_registers (int);
-
-static char *savename;
-
-static void
-nindy_close (int quitting)
-{
-  if (nindy_serial != NULL)
-    serial_close (nindy_serial);
-  nindy_serial = NULL;
-
-  if (savename)
-    xfree (savename);
-  savename = 0;
-}
-
-/* Open a connection to a remote debugger.   
-   FIXME, there should be "set" commands for the options that are
-   now specified with gdb command-line options (old_protocol,
-   and initial_brk).  */
-void
-nindy_open (char *name,		/* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
-	    int from_tty)
-{
-  char baudrate[1024];
-
-  if (!name)
-    error_no_arg ("serial port device name");
-
-  target_preopen (from_tty);
-
-  nindy_close (0);
-
-  have_regs = regs_changed = 0;
-
-  /* Allow user to interrupt the following -- we could hang if there's
-     no NINDY at the other end of the remote tty.  */
-  immediate_quit++;
-  /* If baud_rate is -1, then ninConnect will not recognize the baud rate
-     and will deal with the situation in a (more or less) reasonable
-     fashion.  */
-  sprintf (baudrate, "%d", baud_rate);
-  ninConnect (name, baudrate,
-	      nindy_initial_brk, !from_tty, nindy_old_protocol);
-  immediate_quit--;
-
-  if (nindy_serial == NULL)
-    {
-      perror_with_name (name);
-    }
-
-  savename = savestring (name, strlen (name));
-  push_target (&nindy_ops);
-
-  target_fetch_registers (-1);
-
-  init_thread_list ();
-  init_wait_for_inferior ();
-  clear_proceed_status ();
-  normal_stop ();
-}
-
-/* User-initiated quit of nindy operations.  */
-
-static void
-nindy_detach (char *name, int from_tty)
-{
-  if (name)
-    error ("Too many arguments");
-  pop_target ();
-}
-
-static void
-nindy_files_info (void)
-{
-  /* FIXME: this lies about the baud rate if we autobauded.  */
-  printf_unfiltered ("\tAttached to %s at %d bits per second%s%s.\n", savename,
-		     baud_rate,
-		     nindy_old_protocol ? " in old protocol" : "",
-		     nindy_initial_brk ? " with initial break" : "");
-}
-
-/* Return the number of characters in the buffer BUF before
-   the first DLE character.  N is maximum number of characters to
-   consider.  */
-
-static
-int
-non_dle (char *buf, int n)
-{
-  int i;
-
-  for (i = 0; i < n; i++)
-    {
-      if (buf[i] == DLE)
-	{
-	  break;
-	}
-    }
-  return i;
-}
-
-/* Tell the remote machine to resume.  */
-
-void
-nindy_resume (ptid_t ptid, int step, enum target_signal siggnal)
-{
-  if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
-    warning ("Can't send signals to remote NINDY targets.");
-
-  if (regs_changed)
-    {
-      nindy_store_registers (-1);
-      regs_changed = 0;
-    }
-  have_regs = 0;
-  ninGo (step);
-}
-
-/* FIXME, we can probably use the normal terminal_inferior stuff here.
-   We have to do terminal_inferior and then set up the passthrough
-   settings initially.  Thereafter, terminal_ours and terminal_inferior
-   will automatically swap the settings around for us.  */
-
-struct clean_up_tty_args
-{
-  serial_ttystate state;
-  struct serial *serial;
-};
-static struct clean_up_tty_args tty_args;
-
-static void
-clean_up_tty (PTR ptrarg)
-{
-  struct clean_up_tty_args *args = (struct clean_up_tty_args *) ptrarg;
-  serial_set_tty_state (args->serial, args->state);
-  xfree (args->state);
-  warning ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
-}
-
-/* Recover from ^Z or ^C while remote process is running */
-static void (*old_ctrlc) ();
-#ifdef SIGTSTP
-static void (*old_ctrlz) ();
-#endif
-
-static void
-clean_up_int (void)
-{
-  serial_set_tty_state (tty_args.serial, tty_args.state);
-  xfree (tty_args.state);
-
-  signal (SIGINT, old_ctrlc);
-#ifdef SIGTSTP
-  signal (SIGTSTP, old_ctrlz);
-#endif
-  error ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
-}
-
-/* Wait until the remote machine stops. While waiting, operate in passthrough
- * mode; i.e., pass everything NINDY sends to gdb_stdout, and everything from
- * stdin to NINDY.
- *
- * Return to caller, storing status in 'status' just as `wait' would.
- */
-
-static ptid_t
-nindy_wait (ptid_t ptid, struct target_waitstatus *status)
-{
-  fd_set fds;
-  int c;
-  char buf[2];
-  int i, n;
-  unsigned char stop_exit;
-  unsigned char stop_code;
-  struct cleanup *old_cleanups;
-  long ip_value, fp_value, sp_value;	/* Reg values from stop */
-
-  status->kind = TARGET_WAITKIND_EXITED;
-  status->value.integer = 0;
-
-  /* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */
-
-  /* Save current tty attributes, and restore them when done.  */
-  tty_args.serial = serial_fdopen (0);
-  tty_args.state = serial_get_tty_state (tty_args.serial);
-  old_ctrlc = signal (SIGINT, clean_up_int);
-#ifdef SIGTSTP
-  old_ctrlz = signal (SIGTSTP, clean_up_int);
-#endif
-
-  old_cleanups = make_cleanup (clean_up_tty, &tty_args);
-
-  /* Pass input from keyboard to NINDY as it arrives.  NINDY will interpret
-     <CR> and perform echo.  */
-  /* This used to set CBREAK and clear ECHO and CRMOD.  I hope this is close
-     enough.  */
-  serial_raw (tty_args.serial);
-
-  while (1)
-    {
-      /* Input on remote */
-      c = serial_readchar (nindy_serial, -1);
-      if (c == SERIAL_ERROR)
-	{
-	  error ("Cannot read from serial line");
-	}
-      else if (c == 0x1b)	/* ESC */
-	{
-	  c = serial_readchar (nindy_serial, -1);
-	  c &= ~0x40;
-	}
-      else if (c != 0x10)	/* DLE */
-	/* Write out any characters preceding DLE */
-	{
-	  buf[0] = (char) c;
-	  write (1, buf, 1);
-	}
-      else
-	{
-	  stop_exit = ninStopWhy (&stop_code,
-				  &ip_value, &fp_value, &sp_value);
-	  if (!stop_exit && (stop_code == STOP_SRQ))
-	    {
-	      immediate_quit++;
-	      ninSrq ();
-	      immediate_quit--;
-	    }
-	  else
-	    {
-	      /* Get out of loop */
-	      supply_register (IP_REGNUM,
-			       (char *) &ip_value);
-	      supply_register (FP_REGNUM,
-			       (char *) &fp_value);
-	      supply_register (SP_REGNUM,
-			       (char *) &sp_value);
-	      break;
-	    }
-	}
-    }
-
-  serial_set_tty_state (tty_args.serial, tty_args.state);
-  xfree (tty_args.state);
-  discard_cleanups (old_cleanups);
-
-  if (stop_exit)
-    {
-      status->kind = TARGET_WAITKIND_EXITED;
-      status->value.integer = stop_code;
-    }
-  else
-    {
-      /* nindy has some special stop code need to be handled */
-      if (stop_code == STOP_GDB_BPT)
-	stop_code = TRACE_STEP;
-      status->kind = TARGET_WAITKIND_STOPPED;
-      status->value.sig = i960_fault_to_signal (stop_code);
-    }
-  return inferior_ptid;
-}
-
-/* Read the remote registers into the block REGS.  */
-
-/* This is the block that ninRegsGet and ninRegsPut handles.  */
-struct nindy_regs
-{
-  char local_regs[16 * 4];
-  char global_regs[16 * 4];
-  char pcw_acw[2 * 4];
-  char ip[4];
-  char tcw[4];
-  char fp_as_double[4 * 8];
-};
-
-static void
-nindy_fetch_registers (int regno)
-{
-  struct nindy_regs nindy_regs;
-  int regnum;
-
-  immediate_quit++;
-  ninRegsGet ((char *) &nindy_regs);
-  immediate_quit--;
-
-  memcpy (&registers[REGISTER_BYTE (R0_REGNUM)], nindy_regs.local_regs, 16 * 4);
-  memcpy (&registers[REGISTER_BYTE (G0_REGNUM)], nindy_regs.global_regs, 16 * 4);
-  memcpy (&registers[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2 * 4);
-  memcpy (&registers[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1 * 4);
-  memcpy (&registers[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1 * 4);
-  memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], nindy_regs.fp_as_double, 4 * 8);
-
-  registers_fetched ();
-}
-
-static void
-nindy_prepare_to_store (void)
-{
-  /* Fetch all regs if they aren't already here.  */
-  read_register_bytes (0, NULL, REGISTER_BYTES);
-}
-
-static void
-nindy_store_registers (int regno)
-{
-  struct nindy_regs nindy_regs;
-  int regnum;
-
-  memcpy (nindy_regs.local_regs, &registers[REGISTER_BYTE (R0_REGNUM)], 16 * 4);
-  memcpy (nindy_regs.global_regs, &registers[REGISTER_BYTE (G0_REGNUM)], 16 * 4);
-  memcpy (nindy_regs.pcw_acw, &registers[REGISTER_BYTE (PCW_REGNUM)], 2 * 4);
-  memcpy (nindy_regs.ip, &registers[REGISTER_BYTE (IP_REGNUM)], 1 * 4);
-  memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1 * 4);
-  memcpy (nindy_regs.fp_as_double, &registers[REGISTER_BYTE (FP0_REGNUM)], 8 * 4);
-
-  immediate_quit++;
-  ninRegsPut ((char *) &nindy_regs);
-  immediate_quit--;
-}
-
-/* Copy LEN bytes to or from inferior's memory starting at MEMADDR
-   to debugger memory starting at MYADDR.   Copy to inferior if
-   SHOULD_WRITE is nonzero.  Returns the length copied.  TARGET is
-   unused.  */
-
-int
-nindy_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
-			    int should_write, struct mem_attrib *attrib,
-			    struct target_ops *target)
-{
-  int res;
-
-  if (len <= 0)
-    return 0;
-
-  if (should_write)
-    res = ninMemPut (memaddr, myaddr, len);
-  else
-    res = ninMemGet (memaddr, myaddr, len);
-
-  return res;
-}
-
-static void
-nindy_create_inferior (char *execfile, char *args, char **env)
-{
-  int entry_pt;
-  int pid;
-
-  if (args && *args)
-    error ("Can't pass arguments to remote NINDY process");
-
-  if (execfile == 0 || exec_bfd == 0)
-    error ("No executable file specified");
-
-  entry_pt = (int) bfd_get_start_address (exec_bfd);
-
-  pid = 42;
-
-  /* The "process" (board) is already stopped awaiting our commands, and
-     the program is already downloaded.  We just set its PC and go.  */
-
-  inferior_ptid = pid_to_ptid (pid);	/* Needed for wait_for_inferior below */
-
-  clear_proceed_status ();
-
-  /* Tell wait_for_inferior that we've started a new process.  */
-  init_wait_for_inferior ();
-
-  /* Set up the "saved terminal modes" of the inferior
-     based on what modes we are starting it with.  */
-  target_terminal_init ();
-
-  /* Install inferior's terminal modes.  */
-  target_terminal_inferior ();
-
-  /* insert_step_breakpoint ();  FIXME, do we need this?  */
-  /* Let 'er rip... */
-  proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-static void
-reset_command (char *args, int from_tty)
-{
-  if (nindy_serial == NULL)
-    {
-      error ("No target system to reset -- use 'target nindy' command.");
-    }
-  if (query ("Really reset the target system?", 0, 0))
-    {
-      serial_send_break (nindy_serial);
-      tty_flush (nindy_serial);
-    }
-}
-
-void
-nindy_kill (char *args, int from_tty)
-{
-  return;			/* Ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
-
-   The program actually lives on in the remote processor's RAM, and may be
-   run again without a download.  Don't leave it full of breakpoint
-   instructions.  */
-
-void
-nindy_mourn_inferior (void)
-{
-  remove_breakpoints ();
-  unpush_target (&nindy_ops);
-  generic_mourn_inferior ();	/* Do all the proper things now */
-}
-
-/* Pass the args the way catch_errors wants them.  */
-static int
-nindy_open_stub (char *arg)
-{
-  nindy_open (arg, 1);
-  return 1;
-}
-
-static void
-nindy_load (char *filename, int from_tty)
-{
-  asection *s;
-  /* Can't do unix style forking on a VMS system, so we'll use bfd to do
-     all the work for us
-   */
-
-  bfd *file = bfd_openr (filename, 0);
-  if (!file)
-    {
-      perror_with_name (filename);
-      return;
-    }
-
-  if (!bfd_check_format (file, bfd_object))
-    {
-      error ("can't prove it's an object file\n");
-      return;
-    }
-
-  for (s = file->sections; s; s = s->next)
-    {
-      if (s->flags & SEC_LOAD)
-	{
-	  char *buffer = xmalloc (s->_raw_size);
-	  bfd_get_section_contents (file, s, buffer, 0, s->_raw_size);
-	  printf ("Loading section %s, size %x vma %x\n",
-		  s->name,
-		  s->_raw_size,
-		  s->vma);
-	  ninMemPut (s->vma, buffer, s->_raw_size);
-	  xfree (buffer);
-	}
-    }
-  bfd_close (file);
-}
-
-static int
-load_stub (char *arg)
-{
-  target_load (arg, 1);
-  return 1;
-}
-
-/* This routine is run as a hook, just before the main command loop is
-   entered.  If gdb is configured for the i960, but has not had its
-   nindy target specified yet, this will loop prompting the user to do so.
-
-   Unlike the loop provided by Intel, we actually let the user get out
-   of this with a RETURN.  This is useful when e.g. simply examining
-   an i960 object file on the host system.  */
-
-void
-nindy_before_main_loop (void)
-{
-  char ttyname[100];
-  char *p, *p2;
-
-  while (target_stack->target_ops != &nindy_ops)	/* What is this crap??? */
-    {				/* remote tty not specified yet */
-      if (instream == stdin)
-	{
-	  printf_unfiltered ("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit:  ");
-	  gdb_flush (gdb_stdout);
-	}
-      fgets (ttyname, sizeof (ttyname) - 1, stdin);
-
-      /* Strip leading and trailing whitespace */
-      for (p = ttyname; isspace (*p); p++)
-	{
-	  ;
-	}
-      if (*p == '\0')
-	{
-	  return;		/* User just hit spaces or return, wants out */
-	}
-      for (p2 = p; !isspace (*p2) && (*p2 != '\0'); p2++)
-	{
-	  ;
-	}
-      *p2 = '\0';
-      if (STREQ ("quit", p))
-	{
-	  exit (1);
-	}
-
-      if (catch_errors (nindy_open_stub, p, "", RETURN_MASK_ALL))
-	{
-	  /* Now that we have a tty open for talking to the remote machine,
-	     download the executable file if one was specified.  */
-	  if (exec_bfd)
-	    {
-	      catch_errors (load_stub, bfd_get_filename (exec_bfd), "",
-			    RETURN_MASK_ALL);
-	    }
-	}
-    }
-}
-
-/* Define the target subroutine names */
-
-struct target_ops nindy_ops;
-
-static void
-init_nindy_ops (void)
-{
-  nindy_ops.to_shortname = "nindy";
-  "Remote serial target in i960 NINDY-specific protocol",
-    nindy_ops.to_longname = "Use a remote i960 system running NINDY connected by a serial line.\n\
-Specify the name of the device the serial line is connected to.\n\
-The speed (baud rate), whether to use the old NINDY protocol,\n\
-and whether to send a break on startup, are controlled by options\n\
-specified when you started GDB.";
-  nindy_ops.to_doc = "";
-  nindy_ops.to_open = nindy_open;
-  nindy_ops.to_close = nindy_close;
-  nindy_ops.to_attach = 0;
-  nindy_ops.to_post_attach = NULL;
-  nindy_ops.to_require_attach = NULL;
-  nindy_ops.to_detach = nindy_detach;
-  nindy_ops.to_require_detach = NULL;
-  nindy_ops.to_resume = nindy_resume;
-  nindy_ops.to_wait = nindy_wait;
-  nindy_ops.to_post_wait = NULL;
-  nindy_ops.to_fetch_registers = nindy_fetch_registers;
-  nindy_ops.to_store_registers = nindy_store_registers;
-  nindy_ops.to_prepare_to_store = nindy_prepare_to_store;
-  nindy_ops.to_xfer_memory = nindy_xfer_inferior_memory;
-  nindy_ops.to_files_info = nindy_files_info;
-  nindy_ops.to_insert_breakpoint = memory_insert_breakpoint;
-  nindy_ops.to_remove_breakpoint = memory_remove_breakpoint;
-  nindy_ops.to_terminal_init = 0;
-  nindy_ops.to_terminal_inferior = 0;
-  nindy_ops.to_terminal_ours_for_output = 0;
-  nindy_ops.to_terminal_ours = 0;
-  nindy_ops.to_terminal_info = 0;	/* Terminal crud */
-  nindy_ops.to_kill = nindy_kill;
-  nindy_ops.to_load = nindy_load;
-  nindy_ops.to_lookup_symbol = 0;	/* lookup_symbol */
-  nindy_ops.to_create_inferior = nindy_create_inferior;
-  nindy_ops.to_post_startup_inferior = NULL;
-  nindy_ops.to_acknowledge_created_inferior = NULL;
-  nindy_ops.to_clone_and_follow_inferior = NULL;
-  nindy_ops.to_post_follow_inferior_by_clone = NULL;
-  nindy_ops.to_insert_fork_catchpoint = NULL;
-  nindy_ops.to_remove_fork_catchpoint = NULL;
-  nindy_ops.to_insert_vfork_catchpoint = NULL;
-  nindy_ops.to_remove_vfork_catchpoint = NULL;
-  nindy_ops.to_has_forked = NULL;
-  nindy_ops.to_has_vforked = NULL;
-  nindy_ops.to_can_follow_vfork_prior_to_exec = NULL;
-  nindy_ops.to_post_follow_vfork = NULL;
-  nindy_ops.to_insert_exec_catchpoint = NULL;
-  nindy_ops.to_remove_exec_catchpoint = NULL;
-  nindy_ops.to_has_execd = NULL;
-  nindy_ops.to_reported_exec_events_per_exec_call = NULL;
-  nindy_ops.to_has_exited = NULL;
-  nindy_ops.to_mourn_inferior = nindy_mourn_inferior;
-  nindy_ops.to_can_run = 0;	/* can_run */
-  nindy_ops.to_notice_signals = 0;	/* notice_signals */
-  nindy_ops.to_thread_alive = 0;	/* to_thread_alive */
-  nindy_ops.to_stop = 0;	/* to_stop */
-  nindy_ops.to_pid_to_exec_file = NULL;
-  nindy_ops.to_stratum = process_stratum;
-  nindy_ops.DONT_USE = 0;	/* next */
-  nindy_ops.to_has_all_memory = 1;
-  nindy_ops.to_has_memory = 1;
-  nindy_ops.to_has_stack = 1;
-  nindy_ops.to_has_registers = 1;
-  nindy_ops.to_has_execution = 1;	/* all mem, mem, stack, regs, exec */
-  nindy_ops.to_sections = 0;
-  nindy_ops.to_sections_end = 0;	/* Section pointers */
-  nindy_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
-}
-
-void
-_initialize_nindy (void)
-{
-  init_nindy_ops ();
-  add_target (&nindy_ops);
-  add_com ("reset", class_obscure, reset_command,
-	   "Send a 'break' to the remote target system.\n\
-Only useful if the target has been equipped with a circuit\n\
-to perform a hard reset when a break is detected.");
-}
+// OBSOLETE /* Memory-access and commands for remote NINDY process, for GDB.
+// OBSOLETE 
+// OBSOLETE    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+// OBSOLETE    2000, 2001, 2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    Contributed by Intel Corporation.  Modified from remote.c by Chris Benenati.
+// OBSOLETE 
+// OBSOLETE    GDB is distributed in the hope that it will be useful, but WITHOUT ANY
+// OBSOLETE    WARRANTY.  No author or distributor accepts responsibility to anyone
+// OBSOLETE    for the consequences of using it or for whether it serves any
+// OBSOLETE    particular purpose or works at all, unless he says so in writing.
+// OBSOLETE    Refer to the GDB General Public License for full details.
+// OBSOLETE 
+// OBSOLETE    Everyone is granted permission to copy, modify and redistribute GDB,
+// OBSOLETE    but only under the conditions described in the GDB General Public
+// OBSOLETE    License.  A copy of this license is supposed to have been given to you
+// OBSOLETE    along with GDB so you can know your rights and responsibilities.  It
+// OBSOLETE    should be in a file named COPYING.  Among other things, the copyright
+// OBSOLETE    notice and this notice must be preserved on all copies.
+// OBSOLETE 
+// OBSOLETE    In other words, go ahead and share GDB, but don't try to stop
+// OBSOLETE    anyone else from sharing it farther.  Help stamp out software hoarding!  */
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE    Except for the data cache routines, this file bears little resemblence
+// OBSOLETE    to remote.c.  A new (although similar) protocol has been specified, and
+// OBSOLETE    portions of the code are entirely dependent on having an i80960 with a
+// OBSOLETE    NINDY ROM monitor at the other end of the line.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /*****************************************************************************
+// OBSOLETE  *
+// OBSOLETE  * REMOTE COMMUNICATION PROTOCOL BETWEEN GDB960 AND THE NINDY ROM MONITOR.
+// OBSOLETE  *
+// OBSOLETE  *
+// OBSOLETE  * MODES OF OPERATION
+// OBSOLETE  * ----- -- ---------
+// OBSOLETE  *	
+// OBSOLETE  * As far as NINDY is concerned, GDB is always in one of two modes: command
+// OBSOLETE  * mode or passthrough mode.
+// OBSOLETE  *
+// OBSOLETE  * In command mode (the default) pre-defined packets containing requests
+// OBSOLETE  * are sent by GDB to NINDY.  NINDY never talks except in reponse to a request.
+// OBSOLETE  *
+// OBSOLETE  * Once the the user program is started, GDB enters passthrough mode, to give
+// OBSOLETE  * the user program access to the terminal.  GDB remains in this mode until
+// OBSOLETE  * NINDY indicates that the program has stopped.
+// OBSOLETE  *
+// OBSOLETE  *
+// OBSOLETE  * PASSTHROUGH MODE
+// OBSOLETE  * ----------- ----
+// OBSOLETE  *
+// OBSOLETE  * GDB writes all input received from the keyboard directly to NINDY, and writes
+// OBSOLETE  * all characters received from NINDY directly to the monitor.
+// OBSOLETE  *
+// OBSOLETE  * Keyboard input is neither buffered nor echoed to the monitor.
+// OBSOLETE  *
+// OBSOLETE  * GDB remains in passthrough mode until NINDY sends a single ^P character,
+// OBSOLETE  * to indicate that the user process has stopped.
+// OBSOLETE  *
+// OBSOLETE  * Note:
+// OBSOLETE  *	GDB assumes NINDY performs a 'flushreg' when the user program stops.
+// OBSOLETE  *
+// OBSOLETE  *
+// OBSOLETE  * COMMAND MODE
+// OBSOLETE  * ------- ----
+// OBSOLETE  *
+// OBSOLETE  * All info (except for message ack and nak) is transferred between gdb
+// OBSOLETE  * and the remote processor in messages of the following format:
+// OBSOLETE  *
+// OBSOLETE  *		<info>#<checksum>
+// OBSOLETE  *
+// OBSOLETE  * where 
+// OBSOLETE  *	#	is a literal character
+// OBSOLETE  *
+// OBSOLETE  *	<info>	ASCII information;  all numeric information is in the
+// OBSOLETE  *		form of hex digits ('0'-'9' and lowercase 'a'-'f').
+// OBSOLETE  *
+// OBSOLETE  *	<checksum>
+// OBSOLETE  *		is a pair of ASCII hex digits representing an 8-bit
+// OBSOLETE  *		checksum formed by adding together each of the
+// OBSOLETE  *		characters in <info>.
+// OBSOLETE  *
+// OBSOLETE  * The receiver of a message always sends a single character to the sender
+// OBSOLETE  * to indicate that the checksum was good ('+') or bad ('-');  the sender
+// OBSOLETE  * re-transmits the entire message over until a '+' is received.
+// OBSOLETE  *
+// OBSOLETE  * In response to a command NINDY always sends back either data or
+// OBSOLETE  * a result code of the form "Xnn", where "nn" are hex digits and "X00"
+// OBSOLETE  * means no errors.  (Exceptions: the "s" and "c" commands don't respond.)
+// OBSOLETE  *
+// OBSOLETE  * SEE THE HEADER OF THE FILE "gdb.c" IN THE NINDY MONITOR SOURCE CODE FOR A
+// OBSOLETE  * FULL DESCRIPTION OF LEGAL COMMANDS.
+// OBSOLETE  *
+// OBSOLETE  * SEE THE FILE "stop.h" IN THE NINDY MONITOR SOURCE CODE FOR A LIST
+// OBSOLETE  * OF STOP CODES.
+// OBSOLETE  *
+// OBSOLETE  ***************************************************************************/
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <setjmp.h>
+// OBSOLETE 
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "command.h"
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "nindy-share/env.h"
+// OBSOLETE #include "nindy-share/stop.h"
+// OBSOLETE #include "remote-utils.h"
+// OBSOLETE 
+// OBSOLETE extern int unlink ();
+// OBSOLETE extern char *getenv ();
+// OBSOLETE extern char *mktemp ();
+// OBSOLETE 
+// OBSOLETE extern void generic_mourn_inferior ();
+// OBSOLETE 
+// OBSOLETE extern struct target_ops nindy_ops;
+// OBSOLETE extern FILE *instream;
+// OBSOLETE 
+// OBSOLETE extern char ninStopWhy ();
+// OBSOLETE extern int ninMemGet ();
+// OBSOLETE extern int ninMemPut ();
+// OBSOLETE 
+// OBSOLETE int nindy_initial_brk;		/* nonzero if want to send an initial BREAK to nindy */
+// OBSOLETE int nindy_old_protocol;		/* nonzero if want to use old protocol */
+// OBSOLETE char *nindy_ttyname;		/* name of tty to talk to nindy on, or null */
+// OBSOLETE 
+// OBSOLETE #define DLE	'\020'		/* Character NINDY sends to indicate user program has
+// OBSOLETE 				   * halted.  */
+// OBSOLETE #define TRUE	1
+// OBSOLETE #define FALSE	0
+// OBSOLETE 
+// OBSOLETE /* From nindy-share/nindy.c.  */
+// OBSOLETE extern struct serial *nindy_serial;
+// OBSOLETE 
+// OBSOLETE static int have_regs = 0;	/* 1 iff regs read since i960 last halted */
+// OBSOLETE static int regs_changed = 0;	/* 1 iff regs were modified since last read */
+// OBSOLETE 
+// OBSOLETE extern char *exists ();
+// OBSOLETE 
+// OBSOLETE static void nindy_fetch_registers (int);
+// OBSOLETE 
+// OBSOLETE static void nindy_store_registers (int);
+// OBSOLETE 
+// OBSOLETE static char *savename;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_close (int quitting)
+// OBSOLETE {
+// OBSOLETE   if (nindy_serial != NULL)
+// OBSOLETE     serial_close (nindy_serial);
+// OBSOLETE   nindy_serial = NULL;
+// OBSOLETE 
+// OBSOLETE   if (savename)
+// OBSOLETE     xfree (savename);
+// OBSOLETE   savename = 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Open a connection to a remote debugger.   
+// OBSOLETE    FIXME, there should be "set" commands for the options that are
+// OBSOLETE    now specified with gdb command-line options (old_protocol,
+// OBSOLETE    and initial_brk).  */
+// OBSOLETE void
+// OBSOLETE nindy_open (char *name,		/* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
+// OBSOLETE 	    int from_tty)
+// OBSOLETE {
+// OBSOLETE   char baudrate[1024];
+// OBSOLETE 
+// OBSOLETE   if (!name)
+// OBSOLETE     error_no_arg ("serial port device name");
+// OBSOLETE 
+// OBSOLETE   target_preopen (from_tty);
+// OBSOLETE 
+// OBSOLETE   nindy_close (0);
+// OBSOLETE 
+// OBSOLETE   have_regs = regs_changed = 0;
+// OBSOLETE 
+// OBSOLETE   /* Allow user to interrupt the following -- we could hang if there's
+// OBSOLETE      no NINDY at the other end of the remote tty.  */
+// OBSOLETE   immediate_quit++;
+// OBSOLETE   /* If baud_rate is -1, then ninConnect will not recognize the baud rate
+// OBSOLETE      and will deal with the situation in a (more or less) reasonable
+// OBSOLETE      fashion.  */
+// OBSOLETE   sprintf (baudrate, "%d", baud_rate);
+// OBSOLETE   ninConnect (name, baudrate,
+// OBSOLETE 	      nindy_initial_brk, !from_tty, nindy_old_protocol);
+// OBSOLETE   immediate_quit--;
+// OBSOLETE 
+// OBSOLETE   if (nindy_serial == NULL)
+// OBSOLETE     {
+// OBSOLETE       perror_with_name (name);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   savename = savestring (name, strlen (name));
+// OBSOLETE   push_target (&nindy_ops);
+// OBSOLETE 
+// OBSOLETE   target_fetch_registers (-1);
+// OBSOLETE 
+// OBSOLETE   init_thread_list ();
+// OBSOLETE   init_wait_for_inferior ();
+// OBSOLETE   clear_proceed_status ();
+// OBSOLETE   normal_stop ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* User-initiated quit of nindy operations.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_detach (char *name, int from_tty)
+// OBSOLETE {
+// OBSOLETE   if (name)
+// OBSOLETE     error ("Too many arguments");
+// OBSOLETE   pop_target ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_files_info (void)
+// OBSOLETE {
+// OBSOLETE   /* FIXME: this lies about the baud rate if we autobauded.  */
+// OBSOLETE   printf_unfiltered ("\tAttached to %s at %d bits per second%s%s.\n", savename,
+// OBSOLETE 		     baud_rate,
+// OBSOLETE 		     nindy_old_protocol ? " in old protocol" : "",
+// OBSOLETE 		     nindy_initial_brk ? " with initial break" : "");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the number of characters in the buffer BUF before
+// OBSOLETE    the first DLE character.  N is maximum number of characters to
+// OBSOLETE    consider.  */
+// OBSOLETE 
+// OBSOLETE static
+// OBSOLETE int
+// OBSOLETE non_dle (char *buf, int n)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i < n; i++)
+// OBSOLETE     {
+// OBSOLETE       if (buf[i] == DLE)
+// OBSOLETE 	{
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   return i;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Tell the remote machine to resume.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE nindy_resume (ptid_t ptid, int step, enum target_signal siggnal)
+// OBSOLETE {
+// OBSOLETE   if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
+// OBSOLETE     warning ("Can't send signals to remote NINDY targets.");
+// OBSOLETE 
+// OBSOLETE   if (regs_changed)
+// OBSOLETE     {
+// OBSOLETE       nindy_store_registers (-1);
+// OBSOLETE       regs_changed = 0;
+// OBSOLETE     }
+// OBSOLETE   have_regs = 0;
+// OBSOLETE   ninGo (step);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* FIXME, we can probably use the normal terminal_inferior stuff here.
+// OBSOLETE    We have to do terminal_inferior and then set up the passthrough
+// OBSOLETE    settings initially.  Thereafter, terminal_ours and terminal_inferior
+// OBSOLETE    will automatically swap the settings around for us.  */
+// OBSOLETE 
+// OBSOLETE struct clean_up_tty_args
+// OBSOLETE {
+// OBSOLETE   serial_ttystate state;
+// OBSOLETE   struct serial *serial;
+// OBSOLETE };
+// OBSOLETE static struct clean_up_tty_args tty_args;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE clean_up_tty (PTR ptrarg)
+// OBSOLETE {
+// OBSOLETE   struct clean_up_tty_args *args = (struct clean_up_tty_args *) ptrarg;
+// OBSOLETE   serial_set_tty_state (args->serial, args->state);
+// OBSOLETE   xfree (args->state);
+// OBSOLETE   warning ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Recover from ^Z or ^C while remote process is running */
+// OBSOLETE static void (*old_ctrlc) ();
+// OBSOLETE #ifdef SIGTSTP
+// OBSOLETE static void (*old_ctrlz) ();
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE clean_up_int (void)
+// OBSOLETE {
+// OBSOLETE   serial_set_tty_state (tty_args.serial, tty_args.state);
+// OBSOLETE   xfree (tty_args.state);
+// OBSOLETE 
+// OBSOLETE   signal (SIGINT, old_ctrlc);
+// OBSOLETE #ifdef SIGTSTP
+// OBSOLETE   signal (SIGTSTP, old_ctrlz);
+// OBSOLETE #endif
+// OBSOLETE   error ("\n\nYou may need to reset the 80960 and/or reload your program.\n");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Wait until the remote machine stops. While waiting, operate in passthrough
+// OBSOLETE  * mode; i.e., pass everything NINDY sends to gdb_stdout, and everything from
+// OBSOLETE  * stdin to NINDY.
+// OBSOLETE  *
+// OBSOLETE  * Return to caller, storing status in 'status' just as `wait' would.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static ptid_t
+// OBSOLETE nindy_wait (ptid_t ptid, struct target_waitstatus *status)
+// OBSOLETE {
+// OBSOLETE   fd_set fds;
+// OBSOLETE   int c;
+// OBSOLETE   char buf[2];
+// OBSOLETE   int i, n;
+// OBSOLETE   unsigned char stop_exit;
+// OBSOLETE   unsigned char stop_code;
+// OBSOLETE   struct cleanup *old_cleanups;
+// OBSOLETE   long ip_value, fp_value, sp_value;	/* Reg values from stop */
+// OBSOLETE 
+// OBSOLETE   status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE   status->value.integer = 0;
+// OBSOLETE 
+// OBSOLETE   /* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */
+// OBSOLETE 
+// OBSOLETE   /* Save current tty attributes, and restore them when done.  */
+// OBSOLETE   tty_args.serial = serial_fdopen (0);
+// OBSOLETE   tty_args.state = serial_get_tty_state (tty_args.serial);
+// OBSOLETE   old_ctrlc = signal (SIGINT, clean_up_int);
+// OBSOLETE #ifdef SIGTSTP
+// OBSOLETE   old_ctrlz = signal (SIGTSTP, clean_up_int);
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   old_cleanups = make_cleanup (clean_up_tty, &tty_args);
+// OBSOLETE 
+// OBSOLETE   /* Pass input from keyboard to NINDY as it arrives.  NINDY will interpret
+// OBSOLETE      <CR> and perform echo.  */
+// OBSOLETE   /* This used to set CBREAK and clear ECHO and CRMOD.  I hope this is close
+// OBSOLETE      enough.  */
+// OBSOLETE   serial_raw (tty_args.serial);
+// OBSOLETE 
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       /* Input on remote */
+// OBSOLETE       c = serial_readchar (nindy_serial, -1);
+// OBSOLETE       if (c == SERIAL_ERROR)
+// OBSOLETE 	{
+// OBSOLETE 	  error ("Cannot read from serial line");
+// OBSOLETE 	}
+// OBSOLETE       else if (c == 0x1b)	/* ESC */
+// OBSOLETE 	{
+// OBSOLETE 	  c = serial_readchar (nindy_serial, -1);
+// OBSOLETE 	  c &= ~0x40;
+// OBSOLETE 	}
+// OBSOLETE       else if (c != 0x10)	/* DLE */
+// OBSOLETE 	/* Write out any characters preceding DLE */
+// OBSOLETE 	{
+// OBSOLETE 	  buf[0] = (char) c;
+// OBSOLETE 	  write (1, buf, 1);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  stop_exit = ninStopWhy (&stop_code,
+// OBSOLETE 				  &ip_value, &fp_value, &sp_value);
+// OBSOLETE 	  if (!stop_exit && (stop_code == STOP_SRQ))
+// OBSOLETE 	    {
+// OBSOLETE 	      immediate_quit++;
+// OBSOLETE 	      ninSrq ();
+// OBSOLETE 	      immediate_quit--;
+// OBSOLETE 	    }
+// OBSOLETE 	  else
+// OBSOLETE 	    {
+// OBSOLETE 	      /* Get out of loop */
+// OBSOLETE 	      supply_register (IP_REGNUM,
+// OBSOLETE 			       (char *) &ip_value);
+// OBSOLETE 	      supply_register (FP_REGNUM,
+// OBSOLETE 			       (char *) &fp_value);
+// OBSOLETE 	      supply_register (SP_REGNUM,
+// OBSOLETE 			       (char *) &sp_value);
+// OBSOLETE 	      break;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   serial_set_tty_state (tty_args.serial, tty_args.state);
+// OBSOLETE   xfree (tty_args.state);
+// OBSOLETE   discard_cleanups (old_cleanups);
+// OBSOLETE 
+// OBSOLETE   if (stop_exit)
+// OBSOLETE     {
+// OBSOLETE       status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE       status->value.integer = stop_code;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       /* nindy has some special stop code need to be handled */
+// OBSOLETE       if (stop_code == STOP_GDB_BPT)
+// OBSOLETE 	stop_code = TRACE_STEP;
+// OBSOLETE       status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE       status->value.sig = i960_fault_to_signal (stop_code);
+// OBSOLETE     }
+// OBSOLETE   return inferior_ptid;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read the remote registers into the block REGS.  */
+// OBSOLETE 
+// OBSOLETE /* This is the block that ninRegsGet and ninRegsPut handles.  */
+// OBSOLETE struct nindy_regs
+// OBSOLETE {
+// OBSOLETE   char local_regs[16 * 4];
+// OBSOLETE   char global_regs[16 * 4];
+// OBSOLETE   char pcw_acw[2 * 4];
+// OBSOLETE   char ip[4];
+// OBSOLETE   char tcw[4];
+// OBSOLETE   char fp_as_double[4 * 8];
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_fetch_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   struct nindy_regs nindy_regs;
+// OBSOLETE   int regnum;
+// OBSOLETE 
+// OBSOLETE   immediate_quit++;
+// OBSOLETE   ninRegsGet ((char *) &nindy_regs);
+// OBSOLETE   immediate_quit--;
+// OBSOLETE 
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (R0_REGNUM)], nindy_regs.local_regs, 16 * 4);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (G0_REGNUM)], nindy_regs.global_regs, 16 * 4);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (PCW_REGNUM)], nindy_regs.pcw_acw, 2 * 4);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (IP_REGNUM)], nindy_regs.ip, 1 * 4);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1 * 4);
+// OBSOLETE   memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], nindy_regs.fp_as_double, 4 * 8);
+// OBSOLETE 
+// OBSOLETE   registers_fetched ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_prepare_to_store (void)
+// OBSOLETE {
+// OBSOLETE   /* Fetch all regs if they aren't already here.  */
+// OBSOLETE   read_register_bytes (0, NULL, REGISTER_BYTES);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_store_registers (int regno)
+// OBSOLETE {
+// OBSOLETE   struct nindy_regs nindy_regs;
+// OBSOLETE   int regnum;
+// OBSOLETE 
+// OBSOLETE   memcpy (nindy_regs.local_regs, &registers[REGISTER_BYTE (R0_REGNUM)], 16 * 4);
+// OBSOLETE   memcpy (nindy_regs.global_regs, &registers[REGISTER_BYTE (G0_REGNUM)], 16 * 4);
+// OBSOLETE   memcpy (nindy_regs.pcw_acw, &registers[REGISTER_BYTE (PCW_REGNUM)], 2 * 4);
+// OBSOLETE   memcpy (nindy_regs.ip, &registers[REGISTER_BYTE (IP_REGNUM)], 1 * 4);
+// OBSOLETE   memcpy (nindy_regs.tcw, &registers[REGISTER_BYTE (TCW_REGNUM)], 1 * 4);
+// OBSOLETE   memcpy (nindy_regs.fp_as_double, &registers[REGISTER_BYTE (FP0_REGNUM)], 8 * 4);
+// OBSOLETE 
+// OBSOLETE   immediate_quit++;
+// OBSOLETE   ninRegsPut ((char *) &nindy_regs);
+// OBSOLETE   immediate_quit--;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Copy LEN bytes to or from inferior's memory starting at MEMADDR
+// OBSOLETE    to debugger memory starting at MYADDR.   Copy to inferior if
+// OBSOLETE    SHOULD_WRITE is nonzero.  Returns the length copied.  TARGET is
+// OBSOLETE    unused.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE nindy_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+// OBSOLETE 			    int should_write, struct mem_attrib *attrib,
+// OBSOLETE 			    struct target_ops *target)
+// OBSOLETE {
+// OBSOLETE   int res;
+// OBSOLETE 
+// OBSOLETE   if (len <= 0)
+// OBSOLETE     return 0;
+// OBSOLETE 
+// OBSOLETE   if (should_write)
+// OBSOLETE     res = ninMemPut (memaddr, myaddr, len);
+// OBSOLETE   else
+// OBSOLETE     res = ninMemGet (memaddr, myaddr, len);
+// OBSOLETE 
+// OBSOLETE   return res;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_create_inferior (char *execfile, char *args, char **env)
+// OBSOLETE {
+// OBSOLETE   int entry_pt;
+// OBSOLETE   int pid;
+// OBSOLETE 
+// OBSOLETE   if (args && *args)
+// OBSOLETE     error ("Can't pass arguments to remote NINDY process");
+// OBSOLETE 
+// OBSOLETE   if (execfile == 0 || exec_bfd == 0)
+// OBSOLETE     error ("No executable file specified");
+// OBSOLETE 
+// OBSOLETE   entry_pt = (int) bfd_get_start_address (exec_bfd);
+// OBSOLETE 
+// OBSOLETE   pid = 42;
+// OBSOLETE 
+// OBSOLETE   /* The "process" (board) is already stopped awaiting our commands, and
+// OBSOLETE      the program is already downloaded.  We just set its PC and go.  */
+// OBSOLETE 
+// OBSOLETE   inferior_ptid = pid_to_ptid (pid);	/* Needed for wait_for_inferior below */
+// OBSOLETE 
+// OBSOLETE   clear_proceed_status ();
+// OBSOLETE 
+// OBSOLETE   /* Tell wait_for_inferior that we've started a new process.  */
+// OBSOLETE   init_wait_for_inferior ();
+// OBSOLETE 
+// OBSOLETE   /* Set up the "saved terminal modes" of the inferior
+// OBSOLETE      based on what modes we are starting it with.  */
+// OBSOLETE   target_terminal_init ();
+// OBSOLETE 
+// OBSOLETE   /* Install inferior's terminal modes.  */
+// OBSOLETE   target_terminal_inferior ();
+// OBSOLETE 
+// OBSOLETE   /* insert_step_breakpoint ();  FIXME, do we need this?  */
+// OBSOLETE   /* Let 'er rip... */
+// OBSOLETE   proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE reset_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   if (nindy_serial == NULL)
+// OBSOLETE     {
+// OBSOLETE       error ("No target system to reset -- use 'target nindy' command.");
+// OBSOLETE     }
+// OBSOLETE   if (query ("Really reset the target system?", 0, 0))
+// OBSOLETE     {
+// OBSOLETE       serial_send_break (nindy_serial);
+// OBSOLETE       tty_flush (nindy_serial);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE nindy_kill (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   return;			/* Ignore attempts to kill target system */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Clean up when a program exits.
+// OBSOLETE 
+// OBSOLETE    The program actually lives on in the remote processor's RAM, and may be
+// OBSOLETE    run again without a download.  Don't leave it full of breakpoint
+// OBSOLETE    instructions.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE nindy_mourn_inferior (void)
+// OBSOLETE {
+// OBSOLETE   remove_breakpoints ();
+// OBSOLETE   unpush_target (&nindy_ops);
+// OBSOLETE   generic_mourn_inferior ();	/* Do all the proper things now */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Pass the args the way catch_errors wants them.  */
+// OBSOLETE static int
+// OBSOLETE nindy_open_stub (char *arg)
+// OBSOLETE {
+// OBSOLETE   nindy_open (arg, 1);
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nindy_load (char *filename, int from_tty)
+// OBSOLETE {
+// OBSOLETE   asection *s;
+// OBSOLETE   /* Can't do unix style forking on a VMS system, so we'll use bfd to do
+// OBSOLETE      all the work for us
+// OBSOLETE    */
+// OBSOLETE 
+// OBSOLETE   bfd *file = bfd_openr (filename, 0);
+// OBSOLETE   if (!file)
+// OBSOLETE     {
+// OBSOLETE       perror_with_name (filename);
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (!bfd_check_format (file, bfd_object))
+// OBSOLETE     {
+// OBSOLETE       error ("can't prove it's an object file\n");
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   for (s = file->sections; s; s = s->next)
+// OBSOLETE     {
+// OBSOLETE       if (s->flags & SEC_LOAD)
+// OBSOLETE 	{
+// OBSOLETE 	  char *buffer = xmalloc (s->_raw_size);
+// OBSOLETE 	  bfd_get_section_contents (file, s, buffer, 0, s->_raw_size);
+// OBSOLETE 	  printf ("Loading section %s, size %x vma %x\n",
+// OBSOLETE 		  s->name,
+// OBSOLETE 		  s->_raw_size,
+// OBSOLETE 		  s->vma);
+// OBSOLETE 	  ninMemPut (s->vma, buffer, s->_raw_size);
+// OBSOLETE 	  xfree (buffer);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   bfd_close (file);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE load_stub (char *arg)
+// OBSOLETE {
+// OBSOLETE   target_load (arg, 1);
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* This routine is run as a hook, just before the main command loop is
+// OBSOLETE    entered.  If gdb is configured for the i960, but has not had its
+// OBSOLETE    nindy target specified yet, this will loop prompting the user to do so.
+// OBSOLETE 
+// OBSOLETE    Unlike the loop provided by Intel, we actually let the user get out
+// OBSOLETE    of this with a RETURN.  This is useful when e.g. simply examining
+// OBSOLETE    an i960 object file on the host system.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE nindy_before_main_loop (void)
+// OBSOLETE {
+// OBSOLETE   char ttyname[100];
+// OBSOLETE   char *p, *p2;
+// OBSOLETE 
+// OBSOLETE   while (target_stack->target_ops != &nindy_ops)	/* What is this crap??? */
+// OBSOLETE     {				/* remote tty not specified yet */
+// OBSOLETE       if (instream == stdin)
+// OBSOLETE 	{
+// OBSOLETE 	  printf_unfiltered ("\nAttach /dev/ttyNN -- specify NN, or \"quit\" to quit:  ");
+// OBSOLETE 	  gdb_flush (gdb_stdout);
+// OBSOLETE 	}
+// OBSOLETE       fgets (ttyname, sizeof (ttyname) - 1, stdin);
+// OBSOLETE 
+// OBSOLETE       /* Strip leading and trailing whitespace */
+// OBSOLETE       for (p = ttyname; isspace (*p); p++)
+// OBSOLETE 	{
+// OBSOLETE 	  ;
+// OBSOLETE 	}
+// OBSOLETE       if (*p == '\0')
+// OBSOLETE 	{
+// OBSOLETE 	  return;		/* User just hit spaces or return, wants out */
+// OBSOLETE 	}
+// OBSOLETE       for (p2 = p; !isspace (*p2) && (*p2 != '\0'); p2++)
+// OBSOLETE 	{
+// OBSOLETE 	  ;
+// OBSOLETE 	}
+// OBSOLETE       *p2 = '\0';
+// OBSOLETE       if (STREQ ("quit", p))
+// OBSOLETE 	{
+// OBSOLETE 	  exit (1);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (catch_errors (nindy_open_stub, p, "", RETURN_MASK_ALL))
+// OBSOLETE 	{
+// OBSOLETE 	  /* Now that we have a tty open for talking to the remote machine,
+// OBSOLETE 	     download the executable file if one was specified.  */
+// OBSOLETE 	  if (exec_bfd)
+// OBSOLETE 	    {
+// OBSOLETE 	      catch_errors (load_stub, bfd_get_filename (exec_bfd), "",
+// OBSOLETE 			    RETURN_MASK_ALL);
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Define the target subroutine names */
+// OBSOLETE 
+// OBSOLETE struct target_ops nindy_ops;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE init_nindy_ops (void)
+// OBSOLETE {
+// OBSOLETE   nindy_ops.to_shortname = "nindy";
+// OBSOLETE   "Remote serial target in i960 NINDY-specific protocol",
+// OBSOLETE     nindy_ops.to_longname = "Use a remote i960 system running NINDY connected by a serial line.\n\
+// OBSOLETE Specify the name of the device the serial line is connected to.\n\
+// OBSOLETE The speed (baud rate), whether to use the old NINDY protocol,\n\
+// OBSOLETE and whether to send a break on startup, are controlled by options\n\
+// OBSOLETE specified when you started GDB.";
+// OBSOLETE   nindy_ops.to_doc = "";
+// OBSOLETE   nindy_ops.to_open = nindy_open;
+// OBSOLETE   nindy_ops.to_close = nindy_close;
+// OBSOLETE   nindy_ops.to_attach = 0;
+// OBSOLETE   nindy_ops.to_post_attach = NULL;
+// OBSOLETE   nindy_ops.to_require_attach = NULL;
+// OBSOLETE   nindy_ops.to_detach = nindy_detach;
+// OBSOLETE   nindy_ops.to_require_detach = NULL;
+// OBSOLETE   nindy_ops.to_resume = nindy_resume;
+// OBSOLETE   nindy_ops.to_wait = nindy_wait;
+// OBSOLETE   nindy_ops.to_post_wait = NULL;
+// OBSOLETE   nindy_ops.to_fetch_registers = nindy_fetch_registers;
+// OBSOLETE   nindy_ops.to_store_registers = nindy_store_registers;
+// OBSOLETE   nindy_ops.to_prepare_to_store = nindy_prepare_to_store;
+// OBSOLETE   nindy_ops.to_xfer_memory = nindy_xfer_inferior_memory;
+// OBSOLETE   nindy_ops.to_files_info = nindy_files_info;
+// OBSOLETE   nindy_ops.to_insert_breakpoint = memory_insert_breakpoint;
+// OBSOLETE   nindy_ops.to_remove_breakpoint = memory_remove_breakpoint;
+// OBSOLETE   nindy_ops.to_terminal_init = 0;
+// OBSOLETE   nindy_ops.to_terminal_inferior = 0;
+// OBSOLETE   nindy_ops.to_terminal_ours_for_output = 0;
+// OBSOLETE   nindy_ops.to_terminal_ours = 0;
+// OBSOLETE   nindy_ops.to_terminal_info = 0;	/* Terminal crud */
+// OBSOLETE   nindy_ops.to_kill = nindy_kill;
+// OBSOLETE   nindy_ops.to_load = nindy_load;
+// OBSOLETE   nindy_ops.to_lookup_symbol = 0;	/* lookup_symbol */
+// OBSOLETE   nindy_ops.to_create_inferior = nindy_create_inferior;
+// OBSOLETE   nindy_ops.to_post_startup_inferior = NULL;
+// OBSOLETE   nindy_ops.to_acknowledge_created_inferior = NULL;
+// OBSOLETE   nindy_ops.to_clone_and_follow_inferior = NULL;
+// OBSOLETE   nindy_ops.to_post_follow_inferior_by_clone = NULL;
+// OBSOLETE   nindy_ops.to_insert_fork_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_remove_fork_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_insert_vfork_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_remove_vfork_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_has_forked = NULL;
+// OBSOLETE   nindy_ops.to_has_vforked = NULL;
+// OBSOLETE   nindy_ops.to_can_follow_vfork_prior_to_exec = NULL;
+// OBSOLETE   nindy_ops.to_post_follow_vfork = NULL;
+// OBSOLETE   nindy_ops.to_insert_exec_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_remove_exec_catchpoint = NULL;
+// OBSOLETE   nindy_ops.to_has_execd = NULL;
+// OBSOLETE   nindy_ops.to_reported_exec_events_per_exec_call = NULL;
+// OBSOLETE   nindy_ops.to_has_exited = NULL;
+// OBSOLETE   nindy_ops.to_mourn_inferior = nindy_mourn_inferior;
+// OBSOLETE   nindy_ops.to_can_run = 0;	/* can_run */
+// OBSOLETE   nindy_ops.to_notice_signals = 0;	/* notice_signals */
+// OBSOLETE   nindy_ops.to_thread_alive = 0;	/* to_thread_alive */
+// OBSOLETE   nindy_ops.to_stop = 0;	/* to_stop */
+// OBSOLETE   nindy_ops.to_pid_to_exec_file = NULL;
+// OBSOLETE   nindy_ops.to_stratum = process_stratum;
+// OBSOLETE   nindy_ops.DONT_USE = 0;	/* next */
+// OBSOLETE   nindy_ops.to_has_all_memory = 1;
+// OBSOLETE   nindy_ops.to_has_memory = 1;
+// OBSOLETE   nindy_ops.to_has_stack = 1;
+// OBSOLETE   nindy_ops.to_has_registers = 1;
+// OBSOLETE   nindy_ops.to_has_execution = 1;	/* all mem, mem, stack, regs, exec */
+// OBSOLETE   nindy_ops.to_sections = 0;
+// OBSOLETE   nindy_ops.to_sections_end = 0;	/* Section pointers */
+// OBSOLETE   nindy_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_nindy (void)
+// OBSOLETE {
+// OBSOLETE   init_nindy_ops ();
+// OBSOLETE   add_target (&nindy_ops);
+// OBSOLETE   add_com ("reset", class_obscure, reset_command,
+// OBSOLETE 	   "Send a 'break' to the remote target system.\n\
+// OBSOLETE Only useful if the target has been equipped with a circuit\n\
+// OBSOLETE to perform a hard reset when a break is detected.");
+// OBSOLETE }
diff --git a/gdb/remote-nrom.c b/gdb/remote-nrom.c
index 436c3d2..31336b6 100644
--- a/gdb/remote-nrom.c
+++ b/gdb/remote-nrom.c
@@ -1,351 +1,351 @@
-/* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
-   Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
-   Free Software Foundation, Inc.
-   Contributed by:
-   Roger Moyers 
-   XLNT Designs, Inc.
-   15050 Avenue of Science, Suite 106
-   San Diego, CA  92128
-   (619)487-9320
-   roger@xlnt.com
-   Adapted from work done at Cygnus Support in remote-nindy.c,
-   later merged in by Stan Shebs at Cygnus.
-
-   This file is part of GDB.
-
-   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 "defs.h"
-#include "gdbcmd.h"
-#include "serial.h"
-#include "target.h"
-
-/* Default ports used to talk with the NetROM.  */
-
-#define DEFAULT_NETROM_LOAD_PORT    1236
-#define DEFAULT_NETROM_CONTROL_PORT 1237
-
-static void nrom_close (int quitting);
-
-/* New commands.  */
-
-static void nrom_passthru (char *, int);
-
-/* We talk to the NetROM over these sockets.  */
-
-static struct serial *load_desc = NULL;
-static struct serial *ctrl_desc = NULL;
-
-static int load_port = DEFAULT_NETROM_LOAD_PORT;
-static int control_port = DEFAULT_NETROM_CONTROL_PORT;
-
-static char nrom_hostname[100];
-
-/* Forward data declaration. */
-
-extern struct target_ops nrom_ops;
-
-/* Scan input from the remote system, until STRING is found.  Print chars that
-   don't match.  */
-
-static int
-expect (char *string)
-{
-  char *p = string;
-  int c;
-
-  immediate_quit++;
-
-  while (1)
-    {
-      c = serial_readchar (ctrl_desc, 5);
-
-      if (c == *p++)
-	{
-	  if (*p == '\0')
-	    {
-	      immediate_quit--;
-	      return 0;
-	    }
-	}
-      else
-	{
-	  fputc_unfiltered (c, gdb_stdout);
-	  p = string;
-	  if (c == *p)
-	    p++;
-	}
-    }
-}
-
-static void
-nrom_kill (void)
-{
-  nrom_close (0);
-}
-
-static struct serial *
-open_socket (char *name, int port)
-{
-  char sockname[100];
-  struct serial *desc;
-
-  sprintf (sockname, "%s:%d", name, port);
-  desc = serial_open (sockname);
-  if (!desc)
-    perror_with_name (sockname);
-
-  return desc;
-}
-
-static void
-load_cleanup (void)
-{
-  serial_close (load_desc);
-  load_desc = NULL;
-}
-
-/* Download a file specified in ARGS to the netROM.  */
-
-static void
-nrom_load (char *args, int fromtty)
-{
-  int fd, rd_amt, fsize;
-  bfd *pbfd;
-  asection *section;
-  char *downloadstring = "download 0\n";
-  struct cleanup *old_chain;
-
-  /* Tell the netrom to get ready to download. */
-  if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
-    error ("nrom_load: control_send() of `%s' failed", downloadstring);
-
-  expect ("Waiting for a connection...\n");
-
-  load_desc = open_socket (nrom_hostname, load_port);
-
-  old_chain = make_cleanup (load_cleanup, 0);
-
-  pbfd = bfd_openr (args, 0);
-
-  if (pbfd)
-    {
-      make_cleanup (bfd_close, pbfd);
-
-      if (!bfd_check_format (pbfd, bfd_object))
-	error ("\"%s\": not in executable format: %s",
-	       args, bfd_errmsg (bfd_get_error ()));
-
-      for (section = pbfd->sections; section; section = section->next)
-	{
-	  if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
-	    {
-	      bfd_vma section_address;
-	      unsigned long section_size;
-	      const char *section_name;
-
-	      section_name = bfd_get_section_name (pbfd, section);
-	      section_address = bfd_get_section_vma (pbfd, section);
-	      section_size = bfd_section_size (pbfd, section);
-
-	      if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
-		{
-		  file_ptr fptr;
-
-		  printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
-				   section_name, section_address,
-				   section_size);
-
-		  fptr = 0;
-
-		  while (section_size > 0)
-		    {
-		      char buffer[1024];
-		      int count;
-
-		      count = min (section_size, 1024);
-
-		      bfd_get_section_contents (pbfd, section, buffer, fptr,
-						count);
-
-		      serial_write (load_desc, buffer, count);
-		      section_address += count;
-		      fptr += count;
-		      section_size -= count;
-		    }
-		}
-	      else
-		/* BSS and such */
-		{
-		  printf_filtered ("[section %s: not loading]\n",
-				   section_name);
-		}
-	    }
-	}
-    }
-  else
-    error ("\"%s\": Could not open", args);
-
-  do_cleanups (old_chain);
-}
-
-/* Open a connection to the remote NetROM devices.  */
-
-static void
-nrom_open (char *name, int from_tty)
-{
-  int errn;
-
-  if (!name || strchr (name, '/') || strchr (name, ':'))
-    error (
-	    "To open a NetROM connection, you must specify the hostname\n\
-or IP address of the NetROM device you wish to use.");
-
-  strcpy (nrom_hostname, name);
-
-  target_preopen (from_tty);
-
-  unpush_target (&nrom_ops);
-
-  ctrl_desc = open_socket (nrom_hostname, control_port);
-
-  push_target (&nrom_ops);
-
-  if (from_tty)
-    printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
-}
-
-/* Close out all files and local state before this target loses control. */
-
-static void
-nrom_close (int quitting)
-{
-  if (load_desc)
-    serial_close (load_desc);
-  if (ctrl_desc)
-    serial_close (ctrl_desc);
-}
-
-/* Pass arguments directly to the NetROM. */
-
-static void
-nrom_passthru (char *args, int fromtty)
-{
-  char buf[1024];
-
-  sprintf (buf, "%s\n", args);
-  if (serial_write (ctrl_desc, buf, strlen (buf)))
-    error ("nrom_reset: control_send() of `%s'failed", args);
-}
-
-static void
-nrom_mourn (void)
-{
-  unpush_target (&nrom_ops);
-  generic_mourn_inferior ();
-}
-
-/* Define the target vector. */
-
-struct target_ops nrom_ops;
-
-static void
-init_nrom_ops (void)
-{
-  nrom_ops.to_shortname = "nrom";
-  nrom_ops.to_longname = "Remote XDI `NetROM' target";
-  nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
-  nrom_ops.to_open = nrom_open;
-  nrom_ops.to_close = nrom_close;
-  nrom_ops.to_attach = NULL;
-  nrom_ops.to_post_attach = NULL;
-  nrom_ops.to_require_attach = NULL;
-  nrom_ops.to_detach = NULL;
-  nrom_ops.to_require_detach = NULL;
-  nrom_ops.to_resume = NULL;
-  nrom_ops.to_wait = NULL;
-  nrom_ops.to_post_wait = NULL;
-  nrom_ops.to_fetch_registers = NULL;
-  nrom_ops.to_store_registers = NULL;
-  nrom_ops.to_prepare_to_store = NULL;
-  nrom_ops.to_xfer_memory = NULL;
-  nrom_ops.to_files_info = NULL;
-  nrom_ops.to_insert_breakpoint = NULL;
-  nrom_ops.to_remove_breakpoint = NULL;
-  nrom_ops.to_terminal_init = NULL;
-  nrom_ops.to_terminal_inferior = NULL;
-  nrom_ops.to_terminal_ours_for_output = NULL;
-  nrom_ops.to_terminal_ours = NULL;
-  nrom_ops.to_terminal_info = NULL;
-  nrom_ops.to_kill = nrom_kill;
-  nrom_ops.to_load = nrom_load;
-  nrom_ops.to_lookup_symbol = NULL;
-  nrom_ops.to_create_inferior = NULL;
-  nrom_ops.to_post_startup_inferior = NULL;
-  nrom_ops.to_acknowledge_created_inferior = NULL;
-  nrom_ops.to_clone_and_follow_inferior = NULL;
-  nrom_ops.to_post_follow_inferior_by_clone = NULL;
-  nrom_ops.to_insert_fork_catchpoint = NULL;
-  nrom_ops.to_remove_fork_catchpoint = NULL;
-  nrom_ops.to_insert_vfork_catchpoint = NULL;
-  nrom_ops.to_remove_vfork_catchpoint = NULL;
-  nrom_ops.to_has_forked = NULL;
-  nrom_ops.to_has_vforked = NULL;
-  nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
-  nrom_ops.to_post_follow_vfork = NULL;
-  nrom_ops.to_insert_exec_catchpoint = NULL;
-  nrom_ops.to_remove_exec_catchpoint = NULL;
-  nrom_ops.to_has_execd = NULL;
-  nrom_ops.to_reported_exec_events_per_exec_call = NULL;
-  nrom_ops.to_has_exited = NULL;
-  nrom_ops.to_mourn_inferior = nrom_mourn;
-  nrom_ops.to_can_run = NULL;
-  nrom_ops.to_notice_signals = 0;
-  nrom_ops.to_thread_alive = 0;
-  nrom_ops.to_stop = 0;
-  nrom_ops.to_pid_to_exec_file = NULL;
-  nrom_ops.to_stratum = download_stratum;
-  nrom_ops.DONT_USE = NULL;
-  nrom_ops.to_has_all_memory = 1;
-  nrom_ops.to_has_memory = 1;
-  nrom_ops.to_has_stack = 1;
-  nrom_ops.to_has_registers = 1;
-  nrom_ops.to_has_execution = 0;
-  nrom_ops.to_sections = NULL;
-  nrom_ops.to_sections_end = NULL;
-  nrom_ops.to_magic = OPS_MAGIC;
-}
-
-void
-_initialize_remote_nrom (void)
-{
-  init_nrom_ops ();
-  add_target (&nrom_ops);
-
-  add_show_from_set (
-  add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
-	       "Set the port to use for NetROM downloads\n", &setlist),
-		      &showlist);
-
-  add_show_from_set (
-		      add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
-	    "Set the port to use for NetROM debugger services\n", &setlist),
-		      &showlist);
-
-  add_cmd ("nrom", no_class, nrom_passthru,
-	   "Pass arguments as command to NetROM",
-	   &cmdlist);
-}
+// OBSOLETE /* Remote debugging with the XLNT Designs, Inc (XDI) NetROM.
+// OBSOLETE    Copyright 1990, 1991, 1992, 1995, 1998, 1999, 2000
+// OBSOLETE    Free Software Foundation, Inc.
+// OBSOLETE    Contributed by:
+// OBSOLETE    Roger Moyers 
+// OBSOLETE    XLNT Designs, Inc.
+// OBSOLETE    15050 Avenue of Science, Suite 106
+// OBSOLETE    San Diego, CA  92128
+// OBSOLETE    (619)487-9320
+// OBSOLETE    roger@xlnt.com
+// OBSOLETE    Adapted from work done at Cygnus Support in remote-nindy.c,
+// OBSOLETE    later merged in by Stan Shebs at Cygnus.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE 
+// OBSOLETE /* Default ports used to talk with the NetROM.  */
+// OBSOLETE 
+// OBSOLETE #define DEFAULT_NETROM_LOAD_PORT    1236
+// OBSOLETE #define DEFAULT_NETROM_CONTROL_PORT 1237
+// OBSOLETE 
+// OBSOLETE static void nrom_close (int quitting);
+// OBSOLETE 
+// OBSOLETE /* New commands.  */
+// OBSOLETE 
+// OBSOLETE static void nrom_passthru (char *, int);
+// OBSOLETE 
+// OBSOLETE /* We talk to the NetROM over these sockets.  */
+// OBSOLETE 
+// OBSOLETE static struct serial *load_desc = NULL;
+// OBSOLETE static struct serial *ctrl_desc = NULL;
+// OBSOLETE 
+// OBSOLETE static int load_port = DEFAULT_NETROM_LOAD_PORT;
+// OBSOLETE static int control_port = DEFAULT_NETROM_CONTROL_PORT;
+// OBSOLETE 
+// OBSOLETE static char nrom_hostname[100];
+// OBSOLETE 
+// OBSOLETE /* Forward data declaration. */
+// OBSOLETE 
+// OBSOLETE extern struct target_ops nrom_ops;
+// OBSOLETE 
+// OBSOLETE /* Scan input from the remote system, until STRING is found.  Print chars that
+// OBSOLETE    don't match.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE expect (char *string)
+// OBSOLETE {
+// OBSOLETE   char *p = string;
+// OBSOLETE   int c;
+// OBSOLETE 
+// OBSOLETE   immediate_quit++;
+// OBSOLETE 
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       c = serial_readchar (ctrl_desc, 5);
+// OBSOLETE 
+// OBSOLETE       if (c == *p++)
+// OBSOLETE 	{
+// OBSOLETE 	  if (*p == '\0')
+// OBSOLETE 	    {
+// OBSOLETE 	      immediate_quit--;
+// OBSOLETE 	      return 0;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  fputc_unfiltered (c, gdb_stdout);
+// OBSOLETE 	  p = string;
+// OBSOLETE 	  if (c == *p)
+// OBSOLETE 	    p++;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_kill (void)
+// OBSOLETE {
+// OBSOLETE   nrom_close (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static struct serial *
+// OBSOLETE open_socket (char *name, int port)
+// OBSOLETE {
+// OBSOLETE   char sockname[100];
+// OBSOLETE   struct serial *desc;
+// OBSOLETE 
+// OBSOLETE   sprintf (sockname, "%s:%d", name, port);
+// OBSOLETE   desc = serial_open (sockname);
+// OBSOLETE   if (!desc)
+// OBSOLETE     perror_with_name (sockname);
+// OBSOLETE 
+// OBSOLETE   return desc;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE load_cleanup (void)
+// OBSOLETE {
+// OBSOLETE   serial_close (load_desc);
+// OBSOLETE   load_desc = NULL;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Download a file specified in ARGS to the netROM.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_load (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE   int fd, rd_amt, fsize;
+// OBSOLETE   bfd *pbfd;
+// OBSOLETE   asection *section;
+// OBSOLETE   char *downloadstring = "download 0\n";
+// OBSOLETE   struct cleanup *old_chain;
+// OBSOLETE 
+// OBSOLETE   /* Tell the netrom to get ready to download. */
+// OBSOLETE   if (serial_write (ctrl_desc, downloadstring, strlen (downloadstring)))
+// OBSOLETE     error ("nrom_load: control_send() of `%s' failed", downloadstring);
+// OBSOLETE 
+// OBSOLETE   expect ("Waiting for a connection...\n");
+// OBSOLETE 
+// OBSOLETE   load_desc = open_socket (nrom_hostname, load_port);
+// OBSOLETE 
+// OBSOLETE   old_chain = make_cleanup (load_cleanup, 0);
+// OBSOLETE 
+// OBSOLETE   pbfd = bfd_openr (args, 0);
+// OBSOLETE 
+// OBSOLETE   if (pbfd)
+// OBSOLETE     {
+// OBSOLETE       make_cleanup (bfd_close, pbfd);
+// OBSOLETE 
+// OBSOLETE       if (!bfd_check_format (pbfd, bfd_object))
+// OBSOLETE 	error ("\"%s\": not in executable format: %s",
+// OBSOLETE 	       args, bfd_errmsg (bfd_get_error ()));
+// OBSOLETE 
+// OBSOLETE       for (section = pbfd->sections; section; section = section->next)
+// OBSOLETE 	{
+// OBSOLETE 	  if (bfd_get_section_flags (pbfd, section) & SEC_ALLOC)
+// OBSOLETE 	    {
+// OBSOLETE 	      bfd_vma section_address;
+// OBSOLETE 	      unsigned long section_size;
+// OBSOLETE 	      const char *section_name;
+// OBSOLETE 
+// OBSOLETE 	      section_name = bfd_get_section_name (pbfd, section);
+// OBSOLETE 	      section_address = bfd_get_section_vma (pbfd, section);
+// OBSOLETE 	      section_size = bfd_section_size (pbfd, section);
+// OBSOLETE 
+// OBSOLETE 	      if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
+// OBSOLETE 		{
+// OBSOLETE 		  file_ptr fptr;
+// OBSOLETE 
+// OBSOLETE 		  printf_filtered ("[Loading section %s at %x (%d bytes)]\n",
+// OBSOLETE 				   section_name, section_address,
+// OBSOLETE 				   section_size);
+// OBSOLETE 
+// OBSOLETE 		  fptr = 0;
+// OBSOLETE 
+// OBSOLETE 		  while (section_size > 0)
+// OBSOLETE 		    {
+// OBSOLETE 		      char buffer[1024];
+// OBSOLETE 		      int count;
+// OBSOLETE 
+// OBSOLETE 		      count = min (section_size, 1024);
+// OBSOLETE 
+// OBSOLETE 		      bfd_get_section_contents (pbfd, section, buffer, fptr,
+// OBSOLETE 						count);
+// OBSOLETE 
+// OBSOLETE 		      serial_write (load_desc, buffer, count);
+// OBSOLETE 		      section_address += count;
+// OBSOLETE 		      fptr += count;
+// OBSOLETE 		      section_size -= count;
+// OBSOLETE 		    }
+// OBSOLETE 		}
+// OBSOLETE 	      else
+// OBSOLETE 		/* BSS and such */
+// OBSOLETE 		{
+// OBSOLETE 		  printf_filtered ("[section %s: not loading]\n",
+// OBSOLETE 				   section_name);
+// OBSOLETE 		}
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     error ("\"%s\": Could not open", args);
+// OBSOLETE 
+// OBSOLETE   do_cleanups (old_chain);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Open a connection to the remote NetROM devices.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_open (char *name, int from_tty)
+// OBSOLETE {
+// OBSOLETE   int errn;
+// OBSOLETE 
+// OBSOLETE   if (!name || strchr (name, '/') || strchr (name, ':'))
+// OBSOLETE     error (
+// OBSOLETE 	    "To open a NetROM connection, you must specify the hostname\n\
+// OBSOLETE or IP address of the NetROM device you wish to use.");
+// OBSOLETE 
+// OBSOLETE   strcpy (nrom_hostname, name);
+// OBSOLETE 
+// OBSOLETE   target_preopen (from_tty);
+// OBSOLETE 
+// OBSOLETE   unpush_target (&nrom_ops);
+// OBSOLETE 
+// OBSOLETE   ctrl_desc = open_socket (nrom_hostname, control_port);
+// OBSOLETE 
+// OBSOLETE   push_target (&nrom_ops);
+// OBSOLETE 
+// OBSOLETE   if (from_tty)
+// OBSOLETE     printf_filtered ("Connected to NetROM device \"%s\"\n", nrom_hostname);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Close out all files and local state before this target loses control. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_close (int quitting)
+// OBSOLETE {
+// OBSOLETE   if (load_desc)
+// OBSOLETE     serial_close (load_desc);
+// OBSOLETE   if (ctrl_desc)
+// OBSOLETE     serial_close (ctrl_desc);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Pass arguments directly to the NetROM. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_passthru (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE   char buf[1024];
+// OBSOLETE 
+// OBSOLETE   sprintf (buf, "%s\n", args);
+// OBSOLETE   if (serial_write (ctrl_desc, buf, strlen (buf)))
+// OBSOLETE     error ("nrom_reset: control_send() of `%s'failed", args);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE nrom_mourn (void)
+// OBSOLETE {
+// OBSOLETE   unpush_target (&nrom_ops);
+// OBSOLETE   generic_mourn_inferior ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Define the target vector. */
+// OBSOLETE 
+// OBSOLETE struct target_ops nrom_ops;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE init_nrom_ops (void)
+// OBSOLETE {
+// OBSOLETE   nrom_ops.to_shortname = "nrom";
+// OBSOLETE   nrom_ops.to_longname = "Remote XDI `NetROM' target";
+// OBSOLETE   nrom_ops.to_doc = "Remote debug using a NetROM over Ethernet";
+// OBSOLETE   nrom_ops.to_open = nrom_open;
+// OBSOLETE   nrom_ops.to_close = nrom_close;
+// OBSOLETE   nrom_ops.to_attach = NULL;
+// OBSOLETE   nrom_ops.to_post_attach = NULL;
+// OBSOLETE   nrom_ops.to_require_attach = NULL;
+// OBSOLETE   nrom_ops.to_detach = NULL;
+// OBSOLETE   nrom_ops.to_require_detach = NULL;
+// OBSOLETE   nrom_ops.to_resume = NULL;
+// OBSOLETE   nrom_ops.to_wait = NULL;
+// OBSOLETE   nrom_ops.to_post_wait = NULL;
+// OBSOLETE   nrom_ops.to_fetch_registers = NULL;
+// OBSOLETE   nrom_ops.to_store_registers = NULL;
+// OBSOLETE   nrom_ops.to_prepare_to_store = NULL;
+// OBSOLETE   nrom_ops.to_xfer_memory = NULL;
+// OBSOLETE   nrom_ops.to_files_info = NULL;
+// OBSOLETE   nrom_ops.to_insert_breakpoint = NULL;
+// OBSOLETE   nrom_ops.to_remove_breakpoint = NULL;
+// OBSOLETE   nrom_ops.to_terminal_init = NULL;
+// OBSOLETE   nrom_ops.to_terminal_inferior = NULL;
+// OBSOLETE   nrom_ops.to_terminal_ours_for_output = NULL;
+// OBSOLETE   nrom_ops.to_terminal_ours = NULL;
+// OBSOLETE   nrom_ops.to_terminal_info = NULL;
+// OBSOLETE   nrom_ops.to_kill = nrom_kill;
+// OBSOLETE   nrom_ops.to_load = nrom_load;
+// OBSOLETE   nrom_ops.to_lookup_symbol = NULL;
+// OBSOLETE   nrom_ops.to_create_inferior = NULL;
+// OBSOLETE   nrom_ops.to_post_startup_inferior = NULL;
+// OBSOLETE   nrom_ops.to_acknowledge_created_inferior = NULL;
+// OBSOLETE   nrom_ops.to_clone_and_follow_inferior = NULL;
+// OBSOLETE   nrom_ops.to_post_follow_inferior_by_clone = NULL;
+// OBSOLETE   nrom_ops.to_insert_fork_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_remove_fork_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_insert_vfork_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_remove_vfork_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_has_forked = NULL;
+// OBSOLETE   nrom_ops.to_has_vforked = NULL;
+// OBSOLETE   nrom_ops.to_can_follow_vfork_prior_to_exec = NULL;
+// OBSOLETE   nrom_ops.to_post_follow_vfork = NULL;
+// OBSOLETE   nrom_ops.to_insert_exec_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_remove_exec_catchpoint = NULL;
+// OBSOLETE   nrom_ops.to_has_execd = NULL;
+// OBSOLETE   nrom_ops.to_reported_exec_events_per_exec_call = NULL;
+// OBSOLETE   nrom_ops.to_has_exited = NULL;
+// OBSOLETE   nrom_ops.to_mourn_inferior = nrom_mourn;
+// OBSOLETE   nrom_ops.to_can_run = NULL;
+// OBSOLETE   nrom_ops.to_notice_signals = 0;
+// OBSOLETE   nrom_ops.to_thread_alive = 0;
+// OBSOLETE   nrom_ops.to_stop = 0;
+// OBSOLETE   nrom_ops.to_pid_to_exec_file = NULL;
+// OBSOLETE   nrom_ops.to_stratum = download_stratum;
+// OBSOLETE   nrom_ops.DONT_USE = NULL;
+// OBSOLETE   nrom_ops.to_has_all_memory = 1;
+// OBSOLETE   nrom_ops.to_has_memory = 1;
+// OBSOLETE   nrom_ops.to_has_stack = 1;
+// OBSOLETE   nrom_ops.to_has_registers = 1;
+// OBSOLETE   nrom_ops.to_has_execution = 0;
+// OBSOLETE   nrom_ops.to_sections = NULL;
+// OBSOLETE   nrom_ops.to_sections_end = NULL;
+// OBSOLETE   nrom_ops.to_magic = OPS_MAGIC;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_remote_nrom (void)
+// OBSOLETE {
+// OBSOLETE   init_nrom_ops ();
+// OBSOLETE   add_target (&nrom_ops);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE   add_set_cmd ("nrom_load_port", no_class, var_zinteger, (char *) &load_port,
+// OBSOLETE 	       "Set the port to use for NetROM downloads\n", &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 		      add_set_cmd ("nrom_control_port", no_class, var_zinteger, (char *) &control_port,
+// OBSOLETE 	    "Set the port to use for NetROM debugger services\n", &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_cmd ("nrom", no_class, nrom_passthru,
+// OBSOLETE 	   "Pass arguments as command to NetROM",
+// OBSOLETE 	   &cmdlist);
+// OBSOLETE }
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 0a703eb..5a7dd34 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -1,1234 +1,1234 @@
-/* Remote debugging interface for boot monitors, for GDB.
-
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
-   2000, 2001, 2002 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-/* This file was derived from remote-eb.c, which did a similar job, but for
-   an AMD-29K running EBMON.  That file was in turn derived from remote.c
-   as mentioned in the following comment (left in for comic relief):
-
-   "This is like remote.c but is for a different situation--
-   having a PC running os9000 hook up with a unix machine with
-   a serial line, and running ctty com2 on the PC. os9000 has a debug
-   monitor called ROMBUG running.  Not to mention that the PC
-   has PC/NFS, so it can access the same executables that gdb can,
-   over the net in real time."
-
-   In reality, this module talks to a debug monitor called 'ROMBUG', which
-   We communicate with ROMBUG via a direct serial line, the network version
-   of ROMBUG is not available yet.
- */
-
-/* FIXME This file needs to be rewritten if it's to work again, either
-   to self-contained or to use the new monitor interface.  */
-
-#include "defs.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "gdb_string.h"
-#include <sys/types.h>
-#include "command.h"
-#include "serial.h"
-#include "monitor.h"
-#include "remote-utils.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "gdb-stabs.h"
-#include "regcache.h"
-
-struct cmd_list_element *showlist;
-extern struct target_ops rombug_ops;	/* Forward declaration */
-extern struct monitor_ops rombug_cmds;	/* Forward declaration */
-extern struct cmd_list_element *setlist;
-extern struct cmd_list_element *unsetlist;
-extern int attach_flag;
-
-static void rombug_close ();
-static void rombug_fetch_register ();
-static void rombug_fetch_registers ();
-static void rombug_store_register ();
-#if 0
-static int sr_get_debug ();	/* flag set by "set remotedebug" */
-#endif
-static int hashmark;		/* flag set by "set hash" */
-static int rombug_is_open = 0;
-
-/* FIXME: Replace with sr_get_debug ().  */
-#define LOG_FILE "monitor.log"
-FILE *log_file;
-static int monitor_log = 0;
-static int tty_xon = 0;
-static int tty_xoff = 0;
-
-static int timeout = 10;
-static int is_trace_mode = 0;
-/* Descriptor for I/O to remote machine.  Initialize it to NULL */
-static struct serial *monitor_desc = NULL;
-
-static CORE_ADDR bufaddr = 0;
-static int buflen = 0;
-static char readbuf[16];
-
-/* Send data to monitor.  Works just like printf. */
-static void
-printf_monitor (char *pattern,...)
-{
-  va_list args;
-  char buf[200];
-  int i;
-
-  va_start (args, pattern);
-
-  vsprintf (buf, pattern, args);
-  va_end (args);
-
-  if (serial_write (monitor_desc, buf, strlen (buf)))
-    fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
-			safe_strerror (errno));
-}
-
-/* Read a character from the remote system, doing all the fancy timeout stuff */
-static int
-readchar (int timeout)
-{
-  int c;
-
-  c = serial_readchar (monitor_desc, timeout);
-
-  if (sr_get_debug ())
-    putchar (c & 0x7f);
-
-  if (monitor_log && isascii (c))
-    putc (c & 0x7f, log_file);
-
-  if (c >= 0)
-    return c & 0x7f;
-
-  if (c == SERIAL_TIMEOUT)
-    {
-      if (timeout == 0)
-	return c;		/* Polls shouldn't generate timeout errors */
-
-      error ("Timeout reading from remote system.");
-    }
-
-  perror_with_name ("remote-monitor");
-}
-
-/* Scan input from the remote system, until STRING is found.  If DISCARD is
-   non-zero, then discard non-matching input, else print it out.
-   Let the user break out immediately.  */
-static void
-expect (char *string, int discard)
-{
-  char *p = string;
-  int c;
-
-  if (sr_get_debug ())
-    printf ("Expecting \"%s\"\n", string);
-
-  immediate_quit++;
-  while (1)
-    {
-      c = readchar (timeout);
-      if (!isascii (c))
-	continue;
-      if (c == *p++)
-	{
-	  if (*p == '\0')
-	    {
-	      immediate_quit--;
-	      if (sr_get_debug ())
-		printf ("\nMatched\n");
-	      return;
-	    }
-	}
-      else
-	{
-	  if (!discard)
-	    {
-	      fwrite (string, 1, (p - 1) - string, stdout);
-	      putchar ((char) c);
-	      fflush (stdout);
-	    }
-	  p = string;
-	}
-    }
-}
-
-/* Keep discarding input until we see the ROMBUG prompt.
-
-   The convention for dealing with the prompt is that you
-   o give your command
-   o *then* wait for the prompt.
-
-   Thus the last thing that a procedure does with the serial line
-   will be an expect_prompt().  Exception:  rombug_resume does not
-   wait for the prompt, because the terminal is being handed over
-   to the inferior.  However, the next thing which happens after that
-   is a rombug_wait which does wait for the prompt.
-   Note that this includes abnormal exit, e.g. error().  This is
-   necessary to prevent getting into states from which we can't
-   recover.  */
-static void
-expect_prompt (int discard)
-{
-  if (monitor_log)
-    /* This is a convenient place to do this.  The idea is to do it often
-       enough that we never lose much data if we terminate abnormally.  */
-    fflush (log_file);
-
-  if (is_trace_mode)
-    {
-      expect ("trace", discard);
-    }
-  else
-    {
-      expect (PROMPT, discard);
-    }
-}
-
-/* Get a hex digit from the remote system & return its value.
-   If ignore_space is nonzero, ignore spaces (not newline, tab, etc).  */
-static int
-get_hex_digit (int ignore_space)
-{
-  int ch;
-  while (1)
-    {
-      ch = readchar (timeout);
-      if (ch >= '0' && ch <= '9')
-	return ch - '0';
-      else if (ch >= 'A' && ch <= 'F')
-	return ch - 'A' + 10;
-      else if (ch >= 'a' && ch <= 'f')
-	return ch - 'a' + 10;
-      else if (ch == ' ' && ignore_space)
-	;
-      else
-	{
-	  expect_prompt (1);
-	  error ("Invalid hex digit from remote system.");
-	}
-    }
-}
-
-/* Get a byte from monitor and put it in *BYT.  Accept any number
-   leading spaces.  */
-static void
-get_hex_byte (char *byt)
-{
-  int val;
-
-  val = get_hex_digit (1) << 4;
-  val |= get_hex_digit (0);
-  *byt = val;
-}
-
-/* Get N 32-bit words from remote, each preceded by a space,
-   and put them in registers starting at REGNO.  */
-static void
-get_hex_regs (int n, int regno)
-{
-  long val;
-  int i;
-  unsigned char b;
-
-  for (i = 0; i < n; i++)
-    {
-      int j;
-
-      val = 0;
-      for (j = 0; j < 4; j++)
-	{
-	  get_hex_byte (&b);
-	  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-	    val = (val << 8) + b;
-	  else
-	    val = val + (b << (j * 8));
-	}
-      supply_register (regno++, (char *) &val);
-    }
-}
-
-/* This is called not only when we first attach, but also when the
-   user types "run" after having attached.  */
-static void
-rombug_create_inferior (char *execfile, char *args, char **env)
-{
-  int entry_pt;
-
-  if (args && *args)
-    error ("Can't pass arguments to remote ROMBUG process");
-
-  if (execfile == 0 || exec_bfd == 0)
-    error ("No executable file specified");
-
-  entry_pt = (int) bfd_get_start_address (exec_bfd);
-
-  if (monitor_log)
-    fputs ("\nIn Create_inferior()", log_file);
-
-
-/* The "process" (board) is already stopped awaiting our commands, and
-   the program is already downloaded.  We just set its PC and go.  */
-
-  init_wait_for_inferior ();
-  proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-/* Open a connection to a remote debugger.
-   NAME is the filename used for communication.  */
-
-static char dev_name[100];
-
-static void
-rombug_open (char *args, int from_tty)
-{
-  if (args == NULL)
-    error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
-`target RomBug HOST-NAME:PORT-NUMBER' to use a network connection.");
-
-  target_preopen (from_tty);
-
-  if (rombug_is_open)
-    unpush_target (&rombug_ops);
-
-  strcpy (dev_name, args);
-  monitor_desc = serial_open (dev_name);
-  if (monitor_desc == NULL)
-    perror_with_name (dev_name);
-
-  /* if baud rate is set by 'set remotebaud' */
-  if (serial_setbaudrate (monitor_desc, sr_get_baud_rate ()))
-    {
-      serial_close (monitor_desc);
-      perror_with_name ("RomBug");
-    }
-  serial_raw (monitor_desc);
-  if (tty_xon || tty_xoff)
-    {
-      struct hardware_ttystate
-	{
-	  struct termios t;
-	}
-       *tty_s;
-
-      tty_s = (struct hardware_ttystate *) serial_get_tty_state (monitor_desc);
-      if (tty_xon)
-	tty_s->t.c_iflag |= IXON;
-      if (tty_xoff)
-	tty_s->t.c_iflag |= IXOFF;
-      serial_set_tty_state (monitor_desc, (serial_ttystate) tty_s);
-    }
-
-  rombug_is_open = 1;
-
-  log_file = fopen (LOG_FILE, "w");
-  if (log_file == NULL)
-    perror_with_name (LOG_FILE);
-
-  push_monitor (&rombug_cmds);
-  printf_monitor ("\r");	/* CR wakes up monitor */
-  expect_prompt (1);
-  push_target (&rombug_ops);
-  attach_flag = 1;
-
-  if (from_tty)
-    printf ("Remote %s connected to %s\n", target_shortname,
-	    dev_name);
-
-  rombug_fetch_registers ();
-
-  printf_monitor ("ov e \r");
-  expect_prompt (1);
-  bufaddr = 0;
-  buflen = 0;
-}
-
-/*
- * Close out all files and local state before this target loses control.
- */
-
-static void
-rombug_close (int quitting)
-{
-  if (rombug_is_open)
-    {
-      serial_close (monitor_desc);
-      monitor_desc = NULL;
-      rombug_is_open = 0;
-    }
-
-  if (log_file)
-    {
-      if (ferror (log_file))
-	fprintf_unfiltered (gdb_stderr, "Error writing log file.\n");
-      if (fclose (log_file) != 0)
-	fprintf_unfiltered (gdb_stderr, "Error closing log file.\n");
-      log_file = 0;
-    }
-}
-
-int
-rombug_link (char *mod_name, CORE_ADDR *text_reloc)
-{
-  int i, j;
-  unsigned long val;
-  unsigned char b;
-
-  printf_monitor ("l %s \r", mod_name);
-  expect_prompt (1);
-  printf_monitor (".r \r");
-  expect (REG_DELIM, 1);
-  for (i = 0; i <= 7; i++)
-    {
-      val = 0;
-      for (j = 0; j < 4; j++)
-	{
-	  get_hex_byte (&b);
-	  val = (val << 8) + b;
-	}
-    }
-  expect_prompt (1);
-  *text_reloc = val;
-  return 1;
-}
-
-/* Terminate the open connection to the remote debugger.
-   Use this when you want to detach and do something else
-   with your gdb.  */
-static void
-rombug_detach (int from_tty)
-{
-  if (attach_flag)
-    {
-      printf_monitor (GO_CMD);
-      attach_flag = 0;
-    }
-  pop_target ();		/* calls rombug_close to do the real work */
-  if (from_tty)
-    printf ("Ending remote %s debugging\n", target_shortname);
-}
-
-/*
- * Tell the remote machine to resume.
- */
-static void
-rombug_resume (ptid_t ptid, int step, enum target_signal sig)
-{
-  if (monitor_log)
-    fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
-
-  if (step)
-    {
-      is_trace_mode = 1;
-      printf_monitor (STEP_CMD);
-      /* wait for the echo.  **
-         expect (STEP_CMD, 1);
-       */
-    }
-  else
-    {
-      printf_monitor (GO_CMD);
-      /* swallow the echo.  **
-         expect (GO_CMD, 1);
-       */
-    }
-  bufaddr = 0;
-  buflen = 0;
-}
-
-/*
- * Wait until the remote machine stops, then return,
- * storing status in status just as `wait' would.
- */
-
-static ptid *
-rombug_wait (ptid_t ptid, struct target_waitstatus *status)
-{
-  int old_timeout = timeout;
-  struct section_offsets *offs;
-  CORE_ADDR addr, pc;
-  struct obj_section *obj_sec;
-
-  if (monitor_log)
-    fputs ("\nIn wait ()", log_file);
-
-  status->kind = TARGET_WAITKIND_EXITED;
-  status->value.integer = 0;
-
-  timeout = -1;			/* Don't time out -- user program is running. */
-  expect ("eax:", 0);		/* output any message before register display */
-  expect_prompt (1);		/* Wait for prompt, outputting extraneous text */
-
-  status->kind = TARGET_WAITKIND_STOPPED;
-  status->value.sig = TARGET_SIGNAL_TRAP;
-  timeout = old_timeout;
-  rombug_fetch_registers ();
-  bufaddr = 0;
-  buflen = 0;
-  pc = read_register (PC_REGNUM);
-  addr = read_register (DATABASE_REG);
-  obj_sec = find_pc_section (pc);
-  if (obj_sec != NULL)
-    {
-      if (obj_sec->objfile != symfile_objfile)
-	new_symfile_objfile (obj_sec->objfile, 1, 0);
-      offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
-      memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
-      offs->offsets[SECT_OFF_DATA (symfile_objfile)]  = addr;
-      offs->offsets[SECT_OFF_BSS (symfile_objfile)]  = addr;
-
-      objfile_relocate (symfile_objfile, offs);
-    }
-
-  return inferior_ptid;
-}
-
-/* Return the name of register number regno in the form input and output by
-   monitor.  Currently, register_names just happens to contain exactly what
-   monitor wants.  Lets take advantage of that just as long as possible! */
-
-static char *
-get_reg_name (int regno)
-{
-  static char buf[50];
-  char *p;
-  char *b;
-
-  b = buf;
-
-  if (regno < 0)
-    return ("");
-/*
-   for (p = REGISTER_NAME (regno); *p; p++)
-   *b++ = toupper(*p);
-   *b = '\000';
- */
-  p = (char *) REGISTER_NAME (regno);
-  return p;
-/*
-   return buf;
- */
-}
-
-/* read the remote registers into the block regs.  */
-
-static void
-rombug_fetch_registers (void)
-{
-  int regno, j, i;
-  long val;
-  unsigned char b;
-
-  printf_monitor (GET_REG);
-  expect ("eax:", 1);
-  expect ("\n", 1);
-  get_hex_regs (1, 0);
-  get_hex_regs (1, 3);
-  get_hex_regs (1, 1);
-  get_hex_regs (1, 2);
-  get_hex_regs (1, 6);
-  get_hex_regs (1, 7);
-  get_hex_regs (1, 5);
-  get_hex_regs (1, 4);
-  for (regno = 8; regno <= 15; regno++)
-    {
-      expect (REG_DELIM, 1);
-      if (regno >= 8 && regno <= 13)
-	{
-	  val = 0;
-	  for (j = 0; j < 2; j++)
-	    {
-	      get_hex_byte (&b);
-	      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-		val = (val << 8) + b;
-	      else
-		val = val + (b << (j * 8));
-	    }
-
-	  if (regno == 8)
-	    i = 10;
-	  if (regno >= 9 && regno <= 12)
-	    i = regno + 3;
-	  if (regno == 13)
-	    i = 11;
-	  supply_register (i, (char *) &val);
-	}
-      else if (regno == 14)
-	{
-	  get_hex_regs (1, PC_REGNUM);
-	}
-      else if (regno == 15)
-	{
-	  get_hex_regs (1, 9);
-	}
-      else
-	{
-	  val = 0;
-	  supply_register (regno, (char *) &val);
-	}
-    }
-  is_trace_mode = 0;
-  expect_prompt (1);
-}
-
-/* Fetch register REGNO, or all registers if REGNO is -1.
-   Returns errno value.  */
-static void
-rombug_fetch_register (int regno)
-{
-  int val, j;
-  unsigned char b;
-
-  if (monitor_log)
-    {
-      fprintf (log_file, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno));
-      fflush (log_file);
-    }
-
-  if (regno < 0)
-    {
-      rombug_fetch_registers ();
-    }
-  else
-    {
-      char *name = get_reg_name (regno);
-      printf_monitor (GET_REG);
-      if (regno >= 10 && regno <= 15)
-	{
-	  expect ("\n", 1);
-	  expect ("\n", 1);
-	  expect (name, 1);
-	  expect (REG_DELIM, 1);
-	  val = 0;
-	  for (j = 0; j < 2; j++)
-	    {
-	      get_hex_byte (&b);
-	      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-		val = (val << 8) + b;
-	      else
-		val = val + (b << (j * 8));
-	    }
-	  supply_register (regno, (char *) &val);
-	}
-      else if (regno == 8 || regno == 9)
-	{
-	  expect ("\n", 1);
-	  expect ("\n", 1);
-	  expect ("\n", 1);
-	  expect (name, 1);
-	  expect (REG_DELIM, 1);
-	  get_hex_regs (1, regno);
-	}
-      else
-	{
-	  expect (name, 1);
-	  expect (REG_DELIM, 1);
-	  expect ("\n", 1);
-	  get_hex_regs (1, 0);
-	  get_hex_regs (1, 3);
-	  get_hex_regs (1, 1);
-	  get_hex_regs (1, 2);
-	  get_hex_regs (1, 6);
-	  get_hex_regs (1, 7);
-	  get_hex_regs (1, 5);
-	  get_hex_regs (1, 4);
-	}
-      expect_prompt (1);
-    }
-  return;
-}
-
-/* Store the remote registers from the contents of the block REGS.  */
-
-static void
-rombug_store_registers (void)
-{
-  int regno;
-
-  for (regno = 0; regno <= PC_REGNUM; regno++)
-    rombug_store_register (regno);
-
-  registers_changed ();
-}
-
-/* Store register REGNO, or all if REGNO == 0.
-   return errno value.  */
-static void
-rombug_store_register (int regno)
-{
-  char *name;
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn Store_register (regno=%d)\n", regno);
-
-  if (regno == -1)
-    rombug_store_registers ();
-  else
-    {
-      if (sr_get_debug ())
-	printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
-
-      name = get_reg_name (regno);
-      if (name == 0)
-	return;
-      printf_monitor (SET_REG, name, read_register (regno));
-
-      is_trace_mode = 0;
-      expect_prompt (1);
-    }
-}
-
-/* Get ready to modify the registers array.  On machines which store
-   individual registers, this doesn't need to do anything.  On machines
-   which store all the registers in one fell swoop, this makes sure
-   that registers contains all the registers from the program being
-   debugged.  */
-
-static void
-rombug_prepare_to_store (void)
-{
-  /* Do nothing, since we can store individual regs */
-}
-
-static void
-rombug_files_info (void)
-{
-  printf ("\tAttached to %s at %d baud.\n",
-	  dev_name, sr_get_baud_rate ());
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
-   to inferior's memory at MEMADDR.  Returns length moved.  */
-static int
-rombug_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
-  int i;
-  char buf[10];
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-
-  printf_monitor (MEM_SET_CMD, memaddr);
-  for (i = 0; i < len; i++)
-    {
-      expect (CMD_DELIM, 1);
-      printf_monitor ("%x \r", myaddr[i]);
-      if (sr_get_debug ())
-	printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
-    }
-  expect (CMD_DELIM, 1);
-  if (CMD_END)
-    printf_monitor (CMD_END);
-  is_trace_mode = 0;
-  expect_prompt (1);
-
-  bufaddr = 0;
-  buflen = 0;
-  return len;
-}
-
-/* Read LEN bytes from inferior memory at MEMADDR.  Put the result
-   at debugger address MYADDR.  Returns length moved.  */
-static int
-rombug_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
-  int i, j;
-
-  /* Number of bytes read so far.  */
-  int count;
-
-  /* Starting address of this pass.  */
-  unsigned long startaddr;
-
-  /* Number of bytes to read in this pass.  */
-  int len_this_pass;
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
-
-  /* Note that this code works correctly if startaddr is just less
-     than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
-     thing).  That is, something like
-     rombug_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
-     works--it never adds len To memaddr and gets 0.  */
-  /* However, something like
-     rombug_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
-     doesn't need to work.  Detect it and give up if there's an attempt
-     to do that.  */
-  if (((memaddr - 1) + len) < memaddr)
-    {
-      errno = EIO;
-      return 0;
-    }
-  if (bufaddr <= memaddr && (memaddr + len) <= (bufaddr + buflen))
-    {
-      memcpy (myaddr, &readbuf[memaddr - bufaddr], len);
-      return len;
-    }
-
-  startaddr = memaddr;
-  count = 0;
-  while (count < len)
-    {
-      len_this_pass = 16;
-      if ((startaddr % 16) != 0)
-	len_this_pass -= startaddr % 16;
-      if (len_this_pass > (len - count))
-	len_this_pass = (len - count);
-      if (sr_get_debug ())
-	printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
-
-      printf_monitor (MEM_DIS_CMD, startaddr, 8);
-      expect ("- ", 1);
-      for (i = 0; i < 16; i++)
-	{
-	  get_hex_byte (&readbuf[i]);
-	}
-      bufaddr = startaddr;
-      buflen = 16;
-      memcpy (&myaddr[count], readbuf, len_this_pass);
-      count += len_this_pass;
-      startaddr += len_this_pass;
-      expect (CMD_DELIM, 1);
-    }
-  if (CMD_END)
-    printf_monitor (CMD_END);
-  is_trace_mode = 0;
-  expect_prompt (1);
-
-  return len;
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
-   MEMADDR.  If WRITE is non-zero, transfer them to the target,
-   otherwise transfer them from the target.  TARGET is unused.
-
-   Returns the number of bytes transferred. */
-
-static int
-rombug_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
-			     int write, struct mem_attrib *attrib,
-			     struct target_ops *target)
-{
-  if (write)
-    return rombug_write_inferior_memory (memaddr, myaddr, len);
-  else
-    return rombug_read_inferior_memory (memaddr, myaddr, len);
-}
-
-static void
-rombug_kill (char *args, int from_tty)
-{
-  return;			/* ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
-   The program actually lives on in the remote processor's RAM, and may be
-   run again without a download.  Don't leave it full of breakpoint
-   instructions.  */
-
-static void
-rombug_mourn_inferior (void)
-{
-  remove_breakpoints ();
-  generic_mourn_inferior ();	/* Do all the proper things now */
-}
-
-#define MAX_MONITOR_BREAKPOINTS 16
-
-static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] =
-{0};
-
-static int
-rombug_insert_breakpoint (CORE_ADDR addr, char *shadow)
-{
-  int i;
-  CORE_ADDR bp_addr = addr;
-  int bp_size = 0;
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn Insert_breakpoint (addr=%x)\n", addr);
-  BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
-
-  for (i = 0; i <= MAX_MONITOR_BREAKPOINTS; i++)
-    if (breakaddr[i] == 0)
-      {
-	breakaddr[i] = addr;
-	if (sr_get_debug ())
-	  printf ("Breakpoint at %x\n", addr);
-	rombug_read_inferior_memory (bp_addr, shadow, bp_size);
-	printf_monitor (SET_BREAK_CMD, addr);
-	is_trace_mode = 0;
-	expect_prompt (1);
-	return 0;
-      }
-
-  fprintf_unfiltered (gdb_stderr, "Too many breakpoints (> 16) for monitor\n");
-  return 1;
-}
-
-/*
- * _remove_breakpoint -- Tell the monitor to remove a breakpoint
- */
-static int
-rombug_remove_breakpoint (CORE_ADDR addr, char *shadow)
-{
-  int i;
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn Remove_breakpoint (addr=%x)\n", addr);
-
-  for (i = 0; i < MAX_MONITOR_BREAKPOINTS; i++)
-    if (breakaddr[i] == addr)
-      {
-	breakaddr[i] = 0;
-	printf_monitor (CLR_BREAK_CMD, addr);
-	is_trace_mode = 0;
-	expect_prompt (1);
-	return 0;
-      }
-
-  fprintf_unfiltered (gdb_stderr,
-		      "Can't find breakpoint associated with 0x%x\n", addr);
-  return 1;
-}
-
-/* Load a file. This is usually an srecord, which is ascii. No 
-   protocol, just sent line by line. */
-
-#define DOWNLOAD_LINE_SIZE 100
-static void
-rombug_load (char *arg)
-{
-/* this part comment out for os9* */
-#if 0
-  FILE *download;
-  char buf[DOWNLOAD_LINE_SIZE];
-  int i, bytes_read;
-
-  if (sr_get_debug ())
-    printf ("Loading %s to monitor\n", arg);
-
-  download = fopen (arg, "r");
-  if (download == NULL)
-    {
-      error (sprintf (buf, "%s Does not exist", arg));
-      return;
-    }
-
-  printf_monitor (LOAD_CMD);
-/*  expect ("Waiting for S-records from host... ", 1); */
-
-  while (!feof (download))
-    {
-      bytes_read = fread (buf, sizeof (char), DOWNLOAD_LINE_SIZE, download);
-      if (hashmark)
-	{
-	  putchar ('.');
-	  fflush (stdout);
-	}
-
-      if (serial_write (monitor_desc, buf, bytes_read))
-	{
-	  fprintf_unfiltered (gdb_stderr,
-			      "serial_write failed: (while downloading) %s\n",
-			      safe_strerror (errno));
-	  break;
-	}
-      i = 0;
-      while (i++ <= 200000)
-	{
-	};			/* Ugly HACK, probably needs flow control */
-      if (bytes_read < DOWNLOAD_LINE_SIZE)
-	{
-	  if (!feof (download))
-	    error ("Only read %d bytes\n", bytes_read);
-	  break;
-	}
-    }
-
-  if (hashmark)
-    {
-      putchar ('\n');
-    }
-  if (!feof (download))
-    error ("Never got EOF while downloading");
-  fclose (download);
-#endif /* 0 */
-}
-
-/* Put a command string, in args, out to MONITOR.  
-   Output from MONITOR is placed on the users terminal until the prompt 
-   is seen. */
-
-static void
-rombug_command (char *args, int fromtty)
-{
-  if (monitor_desc == NULL)
-    error ("monitor target not open.");
-
-  if (monitor_log)
-    fprintf (log_file, "\nIn command (args=%s)\n", args);
-
-  if (!args)
-    error ("Missing command.");
-
-  printf_monitor ("%s\r", args);
-  expect_prompt (0);
-}
-
-#if 0
-/* Connect the user directly to MONITOR.  This command acts just like the
-   'cu' or 'tip' command.  Use <CR>~. or <CR>~^D to break out.  */
-
-static struct ttystate ttystate;
-
-static void
-cleanup_tty (void)
-{
-  printf ("\r\n[Exiting connect mode]\r\n");
-  /*serial_restore(0, &ttystate); */
-}
-
-static void
-connect_command (char *args, int fromtty)
-{
-  fd_set readfds;
-  int numfds;
-  int c;
-  char cur_esc = 0;
-
-  dont_repeat ();
-
-  if (monitor_desc == NULL)
-    error ("monitor target not open.");
-
-  if (args)
-    fprintf ("This command takes no args.  They have been ignored.\n");
-
-  printf ("[Entering connect mode.  Use ~. or ~^D to escape]\n");
-
-  serial_raw (0, &ttystate);
-
-  make_cleanup (cleanup_tty, 0);
-
-  FD_ZERO (&readfds);
-
-  while (1)
-    {
-      do
-	{
-	  FD_SET (0, &readfds);
-	  FD_SET (deprecated_serial_fd (monitor_desc), &readfds);
-	  numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
-	}
-      while (numfds == 0);
-
-      if (numfds < 0)
-	perror_with_name ("select");
-
-      if (FD_ISSET (0, &readfds))
-	{			/* tty input, send to monitor */
-	  c = getchar ();
-	  if (c < 0)
-	    perror_with_name ("connect");
-
-	  printf_monitor ("%c", c);
-	  switch (cur_esc)
-	    {
-	    case 0:
-	      if (c == '\r')
-		cur_esc = c;
-	      break;
-	    case '\r':
-	      if (c == '~')
-		cur_esc = c;
-	      else
-		cur_esc = 0;
-	      break;
-	    case '~':
-	      if (c == '.' || c == '\004')
-		return;
-	      else
-		cur_esc = 0;
-	    }
-	}
-
-      if (FD_ISSET (deprecated_serial_fd (monitor_desc), &readfds))
-	{
-	  while (1)
-	    {
-	      c = readchar (0);
-	      if (c < 0)
-		break;
-	      putchar (c);
-	    }
-	  fflush (stdout);
-	}
-    }
-}
-#endif
-
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-#warning FIXME: monitor interface pattern strings, stale struct decl
-struct monitor_ops rombug_cmds =
-{
-  "g \r",			/* execute or usually GO command */
-  "g \r",			/* continue command */
-  "t \r",			/* single step */
-  "b %x\r",			/* set a breakpoint */
-  "k %x\r",			/* clear a breakpoint */
-  "c %x\r",			/* set memory to a value */
-  "d %x %d\r",			/* display memory */
-  "$%08X",			/* prompt memory commands use */
-  ".%s %x\r",			/* set a register */
-  ":",				/* delimiter between registers */
-  ". \r",			/* read a register */
-  "mf \r",			/* download command */
-  "RomBug: ",			/* monitor command prompt */
-  ": ",				/* end-of-command delimitor */
-  ".\r"				/* optional command terminator */
-};
-
-struct target_ops rombug_ops;
-
-static void
-init_rombug_ops (void)
-{
-  rombug_ops.to_shortname = "rombug";
-  rombug_ops.to_longname = "Microware's ROMBUG debug monitor";
-  rombug_ops.to_doc = "Use a remote computer running the ROMBUG debug monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
-    rombug_ops.to_open = rombug_open;
-  rombug_ops.to_close = rombug_close;
-  rombug_ops.to_attach = 0;
-  rombug_ops.to_post_attach = NULL;
-  rombug_ops.to_require_attach = NULL;
-  rombug_ops.to_detach = rombug_detach;
-  rombug_ops.to_require_detach = NULL;
-  rombug_ops.to_resume = rombug_resume;
-  rombug_ops.to_wait = rombug_wait;
-  rombug_ops.to_post_wait = NULL;
-  rombug_ops.to_fetch_registers = rombug_fetch_register;
-  rombug_ops.to_store_registers = rombug_store_register;
-  rombug_ops.to_prepare_to_store = rombug_prepare_to_store;
-  rombug_ops.to_xfer_memory = rombug_xfer_inferior_memory;
-  rombug_ops.to_files_info = rombug_files_info;
-  rombug_ops.to_insert_breakpoint = rombug_insert_breakpoint;
-  rombug_ops.to_remove_breakpoint = rombug_remove_breakpoint;	/* Breakpoints */
-  rombug_ops.to_terminal_init = 0;
-  rombug_ops.to_terminal_inferior = 0;
-  rombug_ops.to_terminal_ours_for_output = 0;
-  rombug_ops.to_terminal_ours = 0;
-  rombug_ops.to_terminal_info = 0;	/* Terminal handling */
-  rombug_ops.to_kill = rombug_kill;
-  rombug_ops.to_load = rombug_load;	/* load */
-  rombug_ops.to_lookup_symbol = rombug_link;	/* lookup_symbol */
-  rombug_ops.to_create_inferior = rombug_create_inferior;
-  rombug_ops.to_post_startup_inferior = NULL;
-  rombug_ops.to_acknowledge_created_inferior = NULL;
-  rombug_ops.to_clone_and_follow_inferior = NULL;
-  rombug_ops.to_post_follow_inferior_by_clone = NULL;
-  rombug_ops.to_insert_fork_catchpoint = NULL;
-  rombug_ops.to_remove_fork_catchpoint = NULL;
-  rombug_ops.to_insert_vfork_catchpoint = NULL;
-  rombug_ops.to_remove_vfork_catchpoint = NULL;
-  rombug_ops.to_has_forked = NULL;
-  rombug_ops.to_has_vforked = NULL;
-  rombug_ops.to_can_follow_vfork_prior_to_exec = NULL;
-  rombug_ops.to_post_follow_vfork = NULL;
-  rombug_ops.to_insert_exec_catchpoint = NULL;
-  rombug_ops.to_remove_exec_catchpoint = NULL;
-  rombug_ops.to_has_execd = NULL;
-  rombug_ops.to_reported_exec_events_per_exec_call = NULL;
-  rombug_ops.to_has_exited = NULL;
-  rombug_ops.to_mourn_inferior = rombug_mourn_inferior;
-  rombug_ops.to_can_run = 0;	/* can_run */
-  rombug_ops.to_notice_signals = 0;	/* notice_signals */
-  rombug_ops.to_thread_alive = 0;
-  rombug_ops.to_stop = 0;	/* to_stop */
-  rombug_ops.to_pid_to_exec_file = NULL;
-  rombug_ops.to_stratum = process_stratum;
-  rombug_ops.DONT_USE = 0;	/* next */
-  rombug_ops.to_has_all_memory = 1;
-  rombug_ops.to_has_memory = 1;
-  rombug_ops.to_has_stack = 1;
-  rombug_ops.to_has_registers = 1;
-  rombug_ops.to_has_execution = 1;	/* has execution */
-  rombug_ops.to_sections = 0;
-  rombug_ops.to_sections_end = 0;	/* Section pointers */
-  rombug_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
-}
-
-void
-_initialize_remote_os9k (void)
-{
-  init_rombug_ops ();
-  add_target (&rombug_ops);
-
-  add_show_from_set (
-	     add_set_cmd ("hash", no_class, var_boolean, (char *) &hashmark,
-			  "Set display of activity while downloading a file.\nWhen enabled, a period \'.\' is displayed.",
-			  &setlist),
-		      &showlist);
-
-  add_show_from_set (
-		      add_set_cmd ("timeout", no_class, var_zinteger,
-				   (char *) &timeout,
-		       "Set timeout in seconds for remote MIPS serial I/O.",
-				   &setlist),
-		      &showlist);
-
-  add_show_from_set (
-		      add_set_cmd ("remotelog", no_class, var_zinteger,
-				   (char *) &monitor_log,
-			      "Set monitor activity log on(=1) or off(=0).",
-				   &setlist),
-		      &showlist);
-
-  add_show_from_set (
-		      add_set_cmd ("remotexon", no_class, var_zinteger,
-				   (char *) &tty_xon,
-				   "Set remote tty line XON control",
-				   &setlist),
-		      &showlist);
-
-  add_show_from_set (
-		      add_set_cmd ("remotexoff", no_class, var_zinteger,
-				   (char *) &tty_xoff,
-				   "Set remote tty line XOFF control",
-				   &setlist),
-		      &showlist);
-
-  add_com ("rombug <command>", class_obscure, rombug_command,
-	   "Send a command to the debug monitor.");
-#if 0
-  add_com ("connect", class_obscure, connect_command,
-	   "Connect the terminal directly up to a serial based command monitor.\nUse <CR>~. or <CR>~^D to break out.");
-#endif
-}
+// OBSOLETE /* Remote debugging interface for boot monitors, for GDB.
+// OBSOLETE 
+// OBSOLETE    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+// OBSOLETE    2000, 2001, 2002 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* This file was derived from remote-eb.c, which did a similar job, but for
+// OBSOLETE    an AMD-29K running EBMON.  That file was in turn derived from remote.c
+// OBSOLETE    as mentioned in the following comment (left in for comic relief):
+// OBSOLETE 
+// OBSOLETE    "This is like remote.c but is for a different situation--
+// OBSOLETE    having a PC running os9000 hook up with a unix machine with
+// OBSOLETE    a serial line, and running ctty com2 on the PC. os9000 has a debug
+// OBSOLETE    monitor called ROMBUG running.  Not to mention that the PC
+// OBSOLETE    has PC/NFS, so it can access the same executables that gdb can,
+// OBSOLETE    over the net in real time."
+// OBSOLETE 
+// OBSOLETE    In reality, this module talks to a debug monitor called 'ROMBUG', which
+// OBSOLETE    We communicate with ROMBUG via a direct serial line, the network version
+// OBSOLETE    of ROMBUG is not available yet.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE /* FIXME This file needs to be rewritten if it's to work again, either
+// OBSOLETE    to self-contained or to use the new monitor interface.  */
+// OBSOLETE 
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include "command.h"
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "monitor.h"
+// OBSOLETE #include "remote-utils.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "gdb-stabs.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE struct cmd_list_element *showlist;
+// OBSOLETE extern struct target_ops rombug_ops;	/* Forward declaration */
+// OBSOLETE extern struct monitor_ops rombug_cmds;	/* Forward declaration */
+// OBSOLETE extern struct cmd_list_element *setlist;
+// OBSOLETE extern struct cmd_list_element *unsetlist;
+// OBSOLETE extern int attach_flag;
+// OBSOLETE 
+// OBSOLETE static void rombug_close ();
+// OBSOLETE static void rombug_fetch_register ();
+// OBSOLETE static void rombug_fetch_registers ();
+// OBSOLETE static void rombug_store_register ();
+// OBSOLETE #if 0
+// OBSOLETE static int sr_get_debug ();	/* flag set by "set remotedebug" */
+// OBSOLETE #endif
+// OBSOLETE static int hashmark;		/* flag set by "set hash" */
+// OBSOLETE static int rombug_is_open = 0;
+// OBSOLETE 
+// OBSOLETE /* FIXME: Replace with sr_get_debug ().  */
+// OBSOLETE #define LOG_FILE "monitor.log"
+// OBSOLETE FILE *log_file;
+// OBSOLETE static int monitor_log = 0;
+// OBSOLETE static int tty_xon = 0;
+// OBSOLETE static int tty_xoff = 0;
+// OBSOLETE 
+// OBSOLETE static int timeout = 10;
+// OBSOLETE static int is_trace_mode = 0;
+// OBSOLETE /* Descriptor for I/O to remote machine.  Initialize it to NULL */
+// OBSOLETE static struct serial *monitor_desc = NULL;
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR bufaddr = 0;
+// OBSOLETE static int buflen = 0;
+// OBSOLETE static char readbuf[16];
+// OBSOLETE 
+// OBSOLETE /* Send data to monitor.  Works just like printf. */
+// OBSOLETE static void
+// OBSOLETE printf_monitor (char *pattern,...)
+// OBSOLETE {
+// OBSOLETE   va_list args;
+// OBSOLETE   char buf[200];
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   va_start (args, pattern);
+// OBSOLETE 
+// OBSOLETE   vsprintf (buf, pattern, args);
+// OBSOLETE   va_end (args);
+// OBSOLETE 
+// OBSOLETE   if (serial_write (monitor_desc, buf, strlen (buf)))
+// OBSOLETE     fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
+// OBSOLETE 			safe_strerror (errno));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read a character from the remote system, doing all the fancy timeout stuff */
+// OBSOLETE static int
+// OBSOLETE readchar (int timeout)
+// OBSOLETE {
+// OBSOLETE   int c;
+// OBSOLETE 
+// OBSOLETE   c = serial_readchar (monitor_desc, timeout);
+// OBSOLETE 
+// OBSOLETE   if (sr_get_debug ())
+// OBSOLETE     putchar (c & 0x7f);
+// OBSOLETE 
+// OBSOLETE   if (monitor_log && isascii (c))
+// OBSOLETE     putc (c & 0x7f, log_file);
+// OBSOLETE 
+// OBSOLETE   if (c >= 0)
+// OBSOLETE     return c & 0x7f;
+// OBSOLETE 
+// OBSOLETE   if (c == SERIAL_TIMEOUT)
+// OBSOLETE     {
+// OBSOLETE       if (timeout == 0)
+// OBSOLETE 	return c;		/* Polls shouldn't generate timeout errors */
+// OBSOLETE 
+// OBSOLETE       error ("Timeout reading from remote system.");
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   perror_with_name ("remote-monitor");
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Scan input from the remote system, until STRING is found.  If DISCARD is
+// OBSOLETE    non-zero, then discard non-matching input, else print it out.
+// OBSOLETE    Let the user break out immediately.  */
+// OBSOLETE static void
+// OBSOLETE expect (char *string, int discard)
+// OBSOLETE {
+// OBSOLETE   char *p = string;
+// OBSOLETE   int c;
+// OBSOLETE 
+// OBSOLETE   if (sr_get_debug ())
+// OBSOLETE     printf ("Expecting \"%s\"\n", string);
+// OBSOLETE 
+// OBSOLETE   immediate_quit++;
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       c = readchar (timeout);
+// OBSOLETE       if (!isascii (c))
+// OBSOLETE 	continue;
+// OBSOLETE       if (c == *p++)
+// OBSOLETE 	{
+// OBSOLETE 	  if (*p == '\0')
+// OBSOLETE 	    {
+// OBSOLETE 	      immediate_quit--;
+// OBSOLETE 	      if (sr_get_debug ())
+// OBSOLETE 		printf ("\nMatched\n");
+// OBSOLETE 	      return;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  if (!discard)
+// OBSOLETE 	    {
+// OBSOLETE 	      fwrite (string, 1, (p - 1) - string, stdout);
+// OBSOLETE 	      putchar ((char) c);
+// OBSOLETE 	      fflush (stdout);
+// OBSOLETE 	    }
+// OBSOLETE 	  p = string;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Keep discarding input until we see the ROMBUG prompt.
+// OBSOLETE 
+// OBSOLETE    The convention for dealing with the prompt is that you
+// OBSOLETE    o give your command
+// OBSOLETE    o *then* wait for the prompt.
+// OBSOLETE 
+// OBSOLETE    Thus the last thing that a procedure does with the serial line
+// OBSOLETE    will be an expect_prompt().  Exception:  rombug_resume does not
+// OBSOLETE    wait for the prompt, because the terminal is being handed over
+// OBSOLETE    to the inferior.  However, the next thing which happens after that
+// OBSOLETE    is a rombug_wait which does wait for the prompt.
+// OBSOLETE    Note that this includes abnormal exit, e.g. error().  This is
+// OBSOLETE    necessary to prevent getting into states from which we can't
+// OBSOLETE    recover.  */
+// OBSOLETE static void
+// OBSOLETE expect_prompt (int discard)
+// OBSOLETE {
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     /* This is a convenient place to do this.  The idea is to do it often
+// OBSOLETE        enough that we never lose much data if we terminate abnormally.  */
+// OBSOLETE     fflush (log_file);
+// OBSOLETE 
+// OBSOLETE   if (is_trace_mode)
+// OBSOLETE     {
+// OBSOLETE       expect ("trace", discard);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       expect (PROMPT, discard);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get a hex digit from the remote system & return its value.
+// OBSOLETE    If ignore_space is nonzero, ignore spaces (not newline, tab, etc).  */
+// OBSOLETE static int
+// OBSOLETE get_hex_digit (int ignore_space)
+// OBSOLETE {
+// OBSOLETE   int ch;
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       ch = readchar (timeout);
+// OBSOLETE       if (ch >= '0' && ch <= '9')
+// OBSOLETE 	return ch - '0';
+// OBSOLETE       else if (ch >= 'A' && ch <= 'F')
+// OBSOLETE 	return ch - 'A' + 10;
+// OBSOLETE       else if (ch >= 'a' && ch <= 'f')
+// OBSOLETE 	return ch - 'a' + 10;
+// OBSOLETE       else if (ch == ' ' && ignore_space)
+// OBSOLETE 	;
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  expect_prompt (1);
+// OBSOLETE 	  error ("Invalid hex digit from remote system.");
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get a byte from monitor and put it in *BYT.  Accept any number
+// OBSOLETE    leading spaces.  */
+// OBSOLETE static void
+// OBSOLETE get_hex_byte (char *byt)
+// OBSOLETE {
+// OBSOLETE   int val;
+// OBSOLETE 
+// OBSOLETE   val = get_hex_digit (1) << 4;
+// OBSOLETE   val |= get_hex_digit (0);
+// OBSOLETE   *byt = val;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get N 32-bit words from remote, each preceded by a space,
+// OBSOLETE    and put them in registers starting at REGNO.  */
+// OBSOLETE static void
+// OBSOLETE get_hex_regs (int n, int regno)
+// OBSOLETE {
+// OBSOLETE   long val;
+// OBSOLETE   int i;
+// OBSOLETE   unsigned char b;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i < n; i++)
+// OBSOLETE     {
+// OBSOLETE       int j;
+// OBSOLETE 
+// OBSOLETE       val = 0;
+// OBSOLETE       for (j = 0; j < 4; j++)
+// OBSOLETE 	{
+// OBSOLETE 	  get_hex_byte (&b);
+// OBSOLETE 	  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+// OBSOLETE 	    val = (val << 8) + b;
+// OBSOLETE 	  else
+// OBSOLETE 	    val = val + (b << (j * 8));
+// OBSOLETE 	}
+// OBSOLETE       supply_register (regno++, (char *) &val);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* This is called not only when we first attach, but also when the
+// OBSOLETE    user types "run" after having attached.  */
+// OBSOLETE static void
+// OBSOLETE rombug_create_inferior (char *execfile, char *args, char **env)
+// OBSOLETE {
+// OBSOLETE   int entry_pt;
+// OBSOLETE 
+// OBSOLETE   if (args && *args)
+// OBSOLETE     error ("Can't pass arguments to remote ROMBUG process");
+// OBSOLETE 
+// OBSOLETE   if (execfile == 0 || exec_bfd == 0)
+// OBSOLETE     error ("No executable file specified");
+// OBSOLETE 
+// OBSOLETE   entry_pt = (int) bfd_get_start_address (exec_bfd);
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fputs ("\nIn Create_inferior()", log_file);
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE /* The "process" (board) is already stopped awaiting our commands, and
+// OBSOLETE    the program is already downloaded.  We just set its PC and go.  */
+// OBSOLETE 
+// OBSOLETE   init_wait_for_inferior ();
+// OBSOLETE   proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Open a connection to a remote debugger.
+// OBSOLETE    NAME is the filename used for communication.  */
+// OBSOLETE 
+// OBSOLETE static char dev_name[100];
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_open (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   if (args == NULL)
+// OBSOLETE     error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
+// OBSOLETE `target RomBug HOST-NAME:PORT-NUMBER' to use a network connection.");
+// OBSOLETE 
+// OBSOLETE   target_preopen (from_tty);
+// OBSOLETE 
+// OBSOLETE   if (rombug_is_open)
+// OBSOLETE     unpush_target (&rombug_ops);
+// OBSOLETE 
+// OBSOLETE   strcpy (dev_name, args);
+// OBSOLETE   monitor_desc = serial_open (dev_name);
+// OBSOLETE   if (monitor_desc == NULL)
+// OBSOLETE     perror_with_name (dev_name);
+// OBSOLETE 
+// OBSOLETE   /* if baud rate is set by 'set remotebaud' */
+// OBSOLETE   if (serial_setbaudrate (monitor_desc, sr_get_baud_rate ()))
+// OBSOLETE     {
+// OBSOLETE       serial_close (monitor_desc);
+// OBSOLETE       perror_with_name ("RomBug");
+// OBSOLETE     }
+// OBSOLETE   serial_raw (monitor_desc);
+// OBSOLETE   if (tty_xon || tty_xoff)
+// OBSOLETE     {
+// OBSOLETE       struct hardware_ttystate
+// OBSOLETE 	{
+// OBSOLETE 	  struct termios t;
+// OBSOLETE 	}
+// OBSOLETE        *tty_s;
+// OBSOLETE 
+// OBSOLETE       tty_s = (struct hardware_ttystate *) serial_get_tty_state (monitor_desc);
+// OBSOLETE       if (tty_xon)
+// OBSOLETE 	tty_s->t.c_iflag |= IXON;
+// OBSOLETE       if (tty_xoff)
+// OBSOLETE 	tty_s->t.c_iflag |= IXOFF;
+// OBSOLETE       serial_set_tty_state (monitor_desc, (serial_ttystate) tty_s);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   rombug_is_open = 1;
+// OBSOLETE 
+// OBSOLETE   log_file = fopen (LOG_FILE, "w");
+// OBSOLETE   if (log_file == NULL)
+// OBSOLETE     perror_with_name (LOG_FILE);
+// OBSOLETE 
+// OBSOLETE   push_monitor (&rombug_cmds);
+// OBSOLETE   printf_monitor ("\r");	/* CR wakes up monitor */
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE   push_target (&rombug_ops);
+// OBSOLETE   attach_flag = 1;
+// OBSOLETE 
+// OBSOLETE   if (from_tty)
+// OBSOLETE     printf ("Remote %s connected to %s\n", target_shortname,
+// OBSOLETE 	    dev_name);
+// OBSOLETE 
+// OBSOLETE   rombug_fetch_registers ();
+// OBSOLETE 
+// OBSOLETE   printf_monitor ("ov e \r");
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE   bufaddr = 0;
+// OBSOLETE   buflen = 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Close out all files and local state before this target loses control.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_close (int quitting)
+// OBSOLETE {
+// OBSOLETE   if (rombug_is_open)
+// OBSOLETE     {
+// OBSOLETE       serial_close (monitor_desc);
+// OBSOLETE       monitor_desc = NULL;
+// OBSOLETE       rombug_is_open = 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (log_file)
+// OBSOLETE     {
+// OBSOLETE       if (ferror (log_file))
+// OBSOLETE 	fprintf_unfiltered (gdb_stderr, "Error writing log file.\n");
+// OBSOLETE       if (fclose (log_file) != 0)
+// OBSOLETE 	fprintf_unfiltered (gdb_stderr, "Error closing log file.\n");
+// OBSOLETE       log_file = 0;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE rombug_link (char *mod_name, CORE_ADDR *text_reloc)
+// OBSOLETE {
+// OBSOLETE   int i, j;
+// OBSOLETE   unsigned long val;
+// OBSOLETE   unsigned char b;
+// OBSOLETE 
+// OBSOLETE   printf_monitor ("l %s \r", mod_name);
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE   printf_monitor (".r \r");
+// OBSOLETE   expect (REG_DELIM, 1);
+// OBSOLETE   for (i = 0; i <= 7; i++)
+// OBSOLETE     {
+// OBSOLETE       val = 0;
+// OBSOLETE       for (j = 0; j < 4; j++)
+// OBSOLETE 	{
+// OBSOLETE 	  get_hex_byte (&b);
+// OBSOLETE 	  val = (val << 8) + b;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE   *text_reloc = val;
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Terminate the open connection to the remote debugger.
+// OBSOLETE    Use this when you want to detach and do something else
+// OBSOLETE    with your gdb.  */
+// OBSOLETE static void
+// OBSOLETE rombug_detach (int from_tty)
+// OBSOLETE {
+// OBSOLETE   if (attach_flag)
+// OBSOLETE     {
+// OBSOLETE       printf_monitor (GO_CMD);
+// OBSOLETE       attach_flag = 0;
+// OBSOLETE     }
+// OBSOLETE   pop_target ();		/* calls rombug_close to do the real work */
+// OBSOLETE   if (from_tty)
+// OBSOLETE     printf ("Ending remote %s debugging\n", target_shortname);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Tell the remote machine to resume.
+// OBSOLETE  */
+// OBSOLETE static void
+// OBSOLETE rombug_resume (ptid_t ptid, int step, enum target_signal sig)
+// OBSOLETE {
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
+// OBSOLETE 
+// OBSOLETE   if (step)
+// OBSOLETE     {
+// OBSOLETE       is_trace_mode = 1;
+// OBSOLETE       printf_monitor (STEP_CMD);
+// OBSOLETE       /* wait for the echo.  **
+// OBSOLETE          expect (STEP_CMD, 1);
+// OBSOLETE        */
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       printf_monitor (GO_CMD);
+// OBSOLETE       /* swallow the echo.  **
+// OBSOLETE          expect (GO_CMD, 1);
+// OBSOLETE        */
+// OBSOLETE     }
+// OBSOLETE   bufaddr = 0;
+// OBSOLETE   buflen = 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Wait until the remote machine stops, then return,
+// OBSOLETE  * storing status in status just as `wait' would.
+// OBSOLETE  */
+// OBSOLETE 
+// OBSOLETE static ptid *
+// OBSOLETE rombug_wait (ptid_t ptid, struct target_waitstatus *status)
+// OBSOLETE {
+// OBSOLETE   int old_timeout = timeout;
+// OBSOLETE   struct section_offsets *offs;
+// OBSOLETE   CORE_ADDR addr, pc;
+// OBSOLETE   struct obj_section *obj_sec;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fputs ("\nIn wait ()", log_file);
+// OBSOLETE 
+// OBSOLETE   status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE   status->value.integer = 0;
+// OBSOLETE 
+// OBSOLETE   timeout = -1;			/* Don't time out -- user program is running. */
+// OBSOLETE   expect ("eax:", 0);		/* output any message before register display */
+// OBSOLETE   expect_prompt (1);		/* Wait for prompt, outputting extraneous text */
+// OBSOLETE 
+// OBSOLETE   status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE   status->value.sig = TARGET_SIGNAL_TRAP;
+// OBSOLETE   timeout = old_timeout;
+// OBSOLETE   rombug_fetch_registers ();
+// OBSOLETE   bufaddr = 0;
+// OBSOLETE   buflen = 0;
+// OBSOLETE   pc = read_register (PC_REGNUM);
+// OBSOLETE   addr = read_register (DATABASE_REG);
+// OBSOLETE   obj_sec = find_pc_section (pc);
+// OBSOLETE   if (obj_sec != NULL)
+// OBSOLETE     {
+// OBSOLETE       if (obj_sec->objfile != symfile_objfile)
+// OBSOLETE 	new_symfile_objfile (obj_sec->objfile, 1, 0);
+// OBSOLETE       offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+// OBSOLETE       memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+// OBSOLETE       offs->offsets[SECT_OFF_DATA (symfile_objfile)]  = addr;
+// OBSOLETE       offs->offsets[SECT_OFF_BSS (symfile_objfile)]  = addr;
+// OBSOLETE 
+// OBSOLETE       objfile_relocate (symfile_objfile, offs);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   return inferior_ptid;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Return the name of register number regno in the form input and output by
+// OBSOLETE    monitor.  Currently, register_names just happens to contain exactly what
+// OBSOLETE    monitor wants.  Lets take advantage of that just as long as possible! */
+// OBSOLETE 
+// OBSOLETE static char *
+// OBSOLETE get_reg_name (int regno)
+// OBSOLETE {
+// OBSOLETE   static char buf[50];
+// OBSOLETE   char *p;
+// OBSOLETE   char *b;
+// OBSOLETE 
+// OBSOLETE   b = buf;
+// OBSOLETE 
+// OBSOLETE   if (regno < 0)
+// OBSOLETE     return ("");
+// OBSOLETE /*
+// OBSOLETE    for (p = REGISTER_NAME (regno); *p; p++)
+// OBSOLETE    *b++ = toupper(*p);
+// OBSOLETE    *b = '\000';
+// OBSOLETE  */
+// OBSOLETE   p = (char *) REGISTER_NAME (regno);
+// OBSOLETE   return p;
+// OBSOLETE /*
+// OBSOLETE    return buf;
+// OBSOLETE  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* read the remote registers into the block regs.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_fetch_registers (void)
+// OBSOLETE {
+// OBSOLETE   int regno, j, i;
+// OBSOLETE   long val;
+// OBSOLETE   unsigned char b;
+// OBSOLETE 
+// OBSOLETE   printf_monitor (GET_REG);
+// OBSOLETE   expect ("eax:", 1);
+// OBSOLETE   expect ("\n", 1);
+// OBSOLETE   get_hex_regs (1, 0);
+// OBSOLETE   get_hex_regs (1, 3);
+// OBSOLETE   get_hex_regs (1, 1);
+// OBSOLETE   get_hex_regs (1, 2);
+// OBSOLETE   get_hex_regs (1, 6);
+// OBSOLETE   get_hex_regs (1, 7);
+// OBSOLETE   get_hex_regs (1, 5);
+// OBSOLETE   get_hex_regs (1, 4);
+// OBSOLETE   for (regno = 8; regno <= 15; regno++)
+// OBSOLETE     {
+// OBSOLETE       expect (REG_DELIM, 1);
+// OBSOLETE       if (regno >= 8 && regno <= 13)
+// OBSOLETE 	{
+// OBSOLETE 	  val = 0;
+// OBSOLETE 	  for (j = 0; j < 2; j++)
+// OBSOLETE 	    {
+// OBSOLETE 	      get_hex_byte (&b);
+// OBSOLETE 	      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+// OBSOLETE 		val = (val << 8) + b;
+// OBSOLETE 	      else
+// OBSOLETE 		val = val + (b << (j * 8));
+// OBSOLETE 	    }
+// OBSOLETE 
+// OBSOLETE 	  if (regno == 8)
+// OBSOLETE 	    i = 10;
+// OBSOLETE 	  if (regno >= 9 && regno <= 12)
+// OBSOLETE 	    i = regno + 3;
+// OBSOLETE 	  if (regno == 13)
+// OBSOLETE 	    i = 11;
+// OBSOLETE 	  supply_register (i, (char *) &val);
+// OBSOLETE 	}
+// OBSOLETE       else if (regno == 14)
+// OBSOLETE 	{
+// OBSOLETE 	  get_hex_regs (1, PC_REGNUM);
+// OBSOLETE 	}
+// OBSOLETE       else if (regno == 15)
+// OBSOLETE 	{
+// OBSOLETE 	  get_hex_regs (1, 9);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  val = 0;
+// OBSOLETE 	  supply_register (regno, (char *) &val);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE   is_trace_mode = 0;
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Fetch register REGNO, or all registers if REGNO is -1.
+// OBSOLETE    Returns errno value.  */
+// OBSOLETE static void
+// OBSOLETE rombug_fetch_register (int regno)
+// OBSOLETE {
+// OBSOLETE   int val, j;
+// OBSOLETE   unsigned char b;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     {
+// OBSOLETE       fprintf (log_file, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno));
+// OBSOLETE       fflush (log_file);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (regno < 0)
+// OBSOLETE     {
+// OBSOLETE       rombug_fetch_registers ();
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       char *name = get_reg_name (regno);
+// OBSOLETE       printf_monitor (GET_REG);
+// OBSOLETE       if (regno >= 10 && regno <= 15)
+// OBSOLETE 	{
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  expect (name, 1);
+// OBSOLETE 	  expect (REG_DELIM, 1);
+// OBSOLETE 	  val = 0;
+// OBSOLETE 	  for (j = 0; j < 2; j++)
+// OBSOLETE 	    {
+// OBSOLETE 	      get_hex_byte (&b);
+// OBSOLETE 	      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+// OBSOLETE 		val = (val << 8) + b;
+// OBSOLETE 	      else
+// OBSOLETE 		val = val + (b << (j * 8));
+// OBSOLETE 	    }
+// OBSOLETE 	  supply_register (regno, (char *) &val);
+// OBSOLETE 	}
+// OBSOLETE       else if (regno == 8 || regno == 9)
+// OBSOLETE 	{
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  expect (name, 1);
+// OBSOLETE 	  expect (REG_DELIM, 1);
+// OBSOLETE 	  get_hex_regs (1, regno);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  expect (name, 1);
+// OBSOLETE 	  expect (REG_DELIM, 1);
+// OBSOLETE 	  expect ("\n", 1);
+// OBSOLETE 	  get_hex_regs (1, 0);
+// OBSOLETE 	  get_hex_regs (1, 3);
+// OBSOLETE 	  get_hex_regs (1, 1);
+// OBSOLETE 	  get_hex_regs (1, 2);
+// OBSOLETE 	  get_hex_regs (1, 6);
+// OBSOLETE 	  get_hex_regs (1, 7);
+// OBSOLETE 	  get_hex_regs (1, 5);
+// OBSOLETE 	  get_hex_regs (1, 4);
+// OBSOLETE 	}
+// OBSOLETE       expect_prompt (1);
+// OBSOLETE     }
+// OBSOLETE   return;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store the remote registers from the contents of the block REGS.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_store_registers (void)
+// OBSOLETE {
+// OBSOLETE   int regno;
+// OBSOLETE 
+// OBSOLETE   for (regno = 0; regno <= PC_REGNUM; regno++)
+// OBSOLETE     rombug_store_register (regno);
+// OBSOLETE 
+// OBSOLETE   registers_changed ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store register REGNO, or all if REGNO == 0.
+// OBSOLETE    return errno value.  */
+// OBSOLETE static void
+// OBSOLETE rombug_store_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char *name;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Store_register (regno=%d)\n", regno);
+// OBSOLETE 
+// OBSOLETE   if (regno == -1)
+// OBSOLETE     rombug_store_registers ();
+// OBSOLETE   else
+// OBSOLETE     {
+// OBSOLETE       if (sr_get_debug ())
+// OBSOLETE 	printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
+// OBSOLETE 
+// OBSOLETE       name = get_reg_name (regno);
+// OBSOLETE       if (name == 0)
+// OBSOLETE 	return;
+// OBSOLETE       printf_monitor (SET_REG, name, read_register (regno));
+// OBSOLETE 
+// OBSOLETE       is_trace_mode = 0;
+// OBSOLETE       expect_prompt (1);
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get ready to modify the registers array.  On machines which store
+// OBSOLETE    individual registers, this doesn't need to do anything.  On machines
+// OBSOLETE    which store all the registers in one fell swoop, this makes sure
+// OBSOLETE    that registers contains all the registers from the program being
+// OBSOLETE    debugged.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_prepare_to_store (void)
+// OBSOLETE {
+// OBSOLETE   /* Do nothing, since we can store individual regs */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_files_info (void)
+// OBSOLETE {
+// OBSOLETE   printf ("\tAttached to %s at %d baud.\n",
+// OBSOLETE 	  dev_name, sr_get_baud_rate ());
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR
+// OBSOLETE    to inferior's memory at MEMADDR.  Returns length moved.  */
+// OBSOLETE static int
+// OBSOLETE rombug_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   char buf[10];
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
+// OBSOLETE 
+// OBSOLETE   printf_monitor (MEM_SET_CMD, memaddr);
+// OBSOLETE   for (i = 0; i < len; i++)
+// OBSOLETE     {
+// OBSOLETE       expect (CMD_DELIM, 1);
+// OBSOLETE       printf_monitor ("%x \r", myaddr[i]);
+// OBSOLETE       if (sr_get_debug ())
+// OBSOLETE 	printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
+// OBSOLETE     }
+// OBSOLETE   expect (CMD_DELIM, 1);
+// OBSOLETE   if (CMD_END)
+// OBSOLETE     printf_monitor (CMD_END);
+// OBSOLETE   is_trace_mode = 0;
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE 
+// OBSOLETE   bufaddr = 0;
+// OBSOLETE   buflen = 0;
+// OBSOLETE   return len;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR.  Put the result
+// OBSOLETE    at debugger address MYADDR.  Returns length moved.  */
+// OBSOLETE static int
+// OBSOLETE rombug_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE   int i, j;
+// OBSOLETE 
+// OBSOLETE   /* Number of bytes read so far.  */
+// OBSOLETE   int count;
+// OBSOLETE 
+// OBSOLETE   /* Starting address of this pass.  */
+// OBSOLETE   unsigned long startaddr;
+// OBSOLETE 
+// OBSOLETE   /* Number of bytes to read in this pass.  */
+// OBSOLETE   int len_this_pass;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
+// OBSOLETE 
+// OBSOLETE   /* Note that this code works correctly if startaddr is just less
+// OBSOLETE      than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
+// OBSOLETE      thing).  That is, something like
+// OBSOLETE      rombug_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
+// OBSOLETE      works--it never adds len To memaddr and gets 0.  */
+// OBSOLETE   /* However, something like
+// OBSOLETE      rombug_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
+// OBSOLETE      doesn't need to work.  Detect it and give up if there's an attempt
+// OBSOLETE      to do that.  */
+// OBSOLETE   if (((memaddr - 1) + len) < memaddr)
+// OBSOLETE     {
+// OBSOLETE       errno = EIO;
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE   if (bufaddr <= memaddr && (memaddr + len) <= (bufaddr + buflen))
+// OBSOLETE     {
+// OBSOLETE       memcpy (myaddr, &readbuf[memaddr - bufaddr], len);
+// OBSOLETE       return len;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   startaddr = memaddr;
+// OBSOLETE   count = 0;
+// OBSOLETE   while (count < len)
+// OBSOLETE     {
+// OBSOLETE       len_this_pass = 16;
+// OBSOLETE       if ((startaddr % 16) != 0)
+// OBSOLETE 	len_this_pass -= startaddr % 16;
+// OBSOLETE       if (len_this_pass > (len - count))
+// OBSOLETE 	len_this_pass = (len - count);
+// OBSOLETE       if (sr_get_debug ())
+// OBSOLETE 	printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
+// OBSOLETE 
+// OBSOLETE       printf_monitor (MEM_DIS_CMD, startaddr, 8);
+// OBSOLETE       expect ("- ", 1);
+// OBSOLETE       for (i = 0; i < 16; i++)
+// OBSOLETE 	{
+// OBSOLETE 	  get_hex_byte (&readbuf[i]);
+// OBSOLETE 	}
+// OBSOLETE       bufaddr = startaddr;
+// OBSOLETE       buflen = 16;
+// OBSOLETE       memcpy (&myaddr[count], readbuf, len_this_pass);
+// OBSOLETE       count += len_this_pass;
+// OBSOLETE       startaddr += len_this_pass;
+// OBSOLETE       expect (CMD_DELIM, 1);
+// OBSOLETE     }
+// OBSOLETE   if (CMD_END)
+// OBSOLETE     printf_monitor (CMD_END);
+// OBSOLETE   is_trace_mode = 0;
+// OBSOLETE   expect_prompt (1);
+// OBSOLETE 
+// OBSOLETE   return len;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address
+// OBSOLETE    MEMADDR.  If WRITE is non-zero, transfer them to the target,
+// OBSOLETE    otherwise transfer them from the target.  TARGET is unused.
+// OBSOLETE 
+// OBSOLETE    Returns the number of bytes transferred. */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE rombug_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+// OBSOLETE 			     int write, struct mem_attrib *attrib,
+// OBSOLETE 			     struct target_ops *target)
+// OBSOLETE {
+// OBSOLETE   if (write)
+// OBSOLETE     return rombug_write_inferior_memory (memaddr, myaddr, len);
+// OBSOLETE   else
+// OBSOLETE     return rombug_read_inferior_memory (memaddr, myaddr, len);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_kill (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE   return;			/* ignore attempts to kill target system */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Clean up when a program exits.
+// OBSOLETE    The program actually lives on in the remote processor's RAM, and may be
+// OBSOLETE    run again without a download.  Don't leave it full of breakpoint
+// OBSOLETE    instructions.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_mourn_inferior (void)
+// OBSOLETE {
+// OBSOLETE   remove_breakpoints ();
+// OBSOLETE   generic_mourn_inferior ();	/* Do all the proper things now */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #define MAX_MONITOR_BREAKPOINTS 16
+// OBSOLETE 
+// OBSOLETE static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] =
+// OBSOLETE {0};
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE rombug_insert_breakpoint (CORE_ADDR addr, char *shadow)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE   CORE_ADDR bp_addr = addr;
+// OBSOLETE   int bp_size = 0;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Insert_breakpoint (addr=%x)\n", addr);
+// OBSOLETE   BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i <= MAX_MONITOR_BREAKPOINTS; i++)
+// OBSOLETE     if (breakaddr[i] == 0)
+// OBSOLETE       {
+// OBSOLETE 	breakaddr[i] = addr;
+// OBSOLETE 	if (sr_get_debug ())
+// OBSOLETE 	  printf ("Breakpoint at %x\n", addr);
+// OBSOLETE 	rombug_read_inferior_memory (bp_addr, shadow, bp_size);
+// OBSOLETE 	printf_monitor (SET_BREAK_CMD, addr);
+// OBSOLETE 	is_trace_mode = 0;
+// OBSOLETE 	expect_prompt (1);
+// OBSOLETE 	return 0;
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE   fprintf_unfiltered (gdb_stderr, "Too many breakpoints (> 16) for monitor\n");
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * _remove_breakpoint -- Tell the monitor to remove a breakpoint
+// OBSOLETE  */
+// OBSOLETE static int
+// OBSOLETE rombug_remove_breakpoint (CORE_ADDR addr, char *shadow)
+// OBSOLETE {
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn Remove_breakpoint (addr=%x)\n", addr);
+// OBSOLETE 
+// OBSOLETE   for (i = 0; i < MAX_MONITOR_BREAKPOINTS; i++)
+// OBSOLETE     if (breakaddr[i] == addr)
+// OBSOLETE       {
+// OBSOLETE 	breakaddr[i] = 0;
+// OBSOLETE 	printf_monitor (CLR_BREAK_CMD, addr);
+// OBSOLETE 	is_trace_mode = 0;
+// OBSOLETE 	expect_prompt (1);
+// OBSOLETE 	return 0;
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE   fprintf_unfiltered (gdb_stderr,
+// OBSOLETE 		      "Can't find breakpoint associated with 0x%x\n", addr);
+// OBSOLETE   return 1;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Load a file. This is usually an srecord, which is ascii. No 
+// OBSOLETE    protocol, just sent line by line. */
+// OBSOLETE 
+// OBSOLETE #define DOWNLOAD_LINE_SIZE 100
+// OBSOLETE static void
+// OBSOLETE rombug_load (char *arg)
+// OBSOLETE {
+// OBSOLETE /* this part comment out for os9* */
+// OBSOLETE #if 0
+// OBSOLETE   FILE *download;
+// OBSOLETE   char buf[DOWNLOAD_LINE_SIZE];
+// OBSOLETE   int i, bytes_read;
+// OBSOLETE 
+// OBSOLETE   if (sr_get_debug ())
+// OBSOLETE     printf ("Loading %s to monitor\n", arg);
+// OBSOLETE 
+// OBSOLETE   download = fopen (arg, "r");
+// OBSOLETE   if (download == NULL)
+// OBSOLETE     {
+// OBSOLETE       error (sprintf (buf, "%s Does not exist", arg));
+// OBSOLETE       return;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   printf_monitor (LOAD_CMD);
+// OBSOLETE /*  expect ("Waiting for S-records from host... ", 1); */
+// OBSOLETE 
+// OBSOLETE   while (!feof (download))
+// OBSOLETE     {
+// OBSOLETE       bytes_read = fread (buf, sizeof (char), DOWNLOAD_LINE_SIZE, download);
+// OBSOLETE       if (hashmark)
+// OBSOLETE 	{
+// OBSOLETE 	  putchar ('.');
+// OBSOLETE 	  fflush (stdout);
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (serial_write (monitor_desc, buf, bytes_read))
+// OBSOLETE 	{
+// OBSOLETE 	  fprintf_unfiltered (gdb_stderr,
+// OBSOLETE 			      "serial_write failed: (while downloading) %s\n",
+// OBSOLETE 			      safe_strerror (errno));
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE       i = 0;
+// OBSOLETE       while (i++ <= 200000)
+// OBSOLETE 	{
+// OBSOLETE 	};			/* Ugly HACK, probably needs flow control */
+// OBSOLETE       if (bytes_read < DOWNLOAD_LINE_SIZE)
+// OBSOLETE 	{
+// OBSOLETE 	  if (!feof (download))
+// OBSOLETE 	    error ("Only read %d bytes\n", bytes_read);
+// OBSOLETE 	  break;
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (hashmark)
+// OBSOLETE     {
+// OBSOLETE       putchar ('\n');
+// OBSOLETE     }
+// OBSOLETE   if (!feof (download))
+// OBSOLETE     error ("Never got EOF while downloading");
+// OBSOLETE   fclose (download);
+// OBSOLETE #endif /* 0 */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Put a command string, in args, out to MONITOR.  
+// OBSOLETE    Output from MONITOR is placed on the users terminal until the prompt 
+// OBSOLETE    is seen. */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE rombug_command (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE   if (monitor_desc == NULL)
+// OBSOLETE     error ("monitor target not open.");
+// OBSOLETE 
+// OBSOLETE   if (monitor_log)
+// OBSOLETE     fprintf (log_file, "\nIn command (args=%s)\n", args);
+// OBSOLETE 
+// OBSOLETE   if (!args)
+// OBSOLETE     error ("Missing command.");
+// OBSOLETE 
+// OBSOLETE   printf_monitor ("%s\r", args);
+// OBSOLETE   expect_prompt (0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE /* Connect the user directly to MONITOR.  This command acts just like the
+// OBSOLETE    'cu' or 'tip' command.  Use <CR>~. or <CR>~^D to break out.  */
+// OBSOLETE 
+// OBSOLETE static struct ttystate ttystate;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE cleanup_tty (void)
+// OBSOLETE {
+// OBSOLETE   printf ("\r\n[Exiting connect mode]\r\n");
+// OBSOLETE   /*serial_restore(0, &ttystate); */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE connect_command (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE   fd_set readfds;
+// OBSOLETE   int numfds;
+// OBSOLETE   int c;
+// OBSOLETE   char cur_esc = 0;
+// OBSOLETE 
+// OBSOLETE   dont_repeat ();
+// OBSOLETE 
+// OBSOLETE   if (monitor_desc == NULL)
+// OBSOLETE     error ("monitor target not open.");
+// OBSOLETE 
+// OBSOLETE   if (args)
+// OBSOLETE     fprintf ("This command takes no args.  They have been ignored.\n");
+// OBSOLETE 
+// OBSOLETE   printf ("[Entering connect mode.  Use ~. or ~^D to escape]\n");
+// OBSOLETE 
+// OBSOLETE   serial_raw (0, &ttystate);
+// OBSOLETE 
+// OBSOLETE   make_cleanup (cleanup_tty, 0);
+// OBSOLETE 
+// OBSOLETE   FD_ZERO (&readfds);
+// OBSOLETE 
+// OBSOLETE   while (1)
+// OBSOLETE     {
+// OBSOLETE       do
+// OBSOLETE 	{
+// OBSOLETE 	  FD_SET (0, &readfds);
+// OBSOLETE 	  FD_SET (deprecated_serial_fd (monitor_desc), &readfds);
+// OBSOLETE 	  numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
+// OBSOLETE 	}
+// OBSOLETE       while (numfds == 0);
+// OBSOLETE 
+// OBSOLETE       if (numfds < 0)
+// OBSOLETE 	perror_with_name ("select");
+// OBSOLETE 
+// OBSOLETE       if (FD_ISSET (0, &readfds))
+// OBSOLETE 	{			/* tty input, send to monitor */
+// OBSOLETE 	  c = getchar ();
+// OBSOLETE 	  if (c < 0)
+// OBSOLETE 	    perror_with_name ("connect");
+// OBSOLETE 
+// OBSOLETE 	  printf_monitor ("%c", c);
+// OBSOLETE 	  switch (cur_esc)
+// OBSOLETE 	    {
+// OBSOLETE 	    case 0:
+// OBSOLETE 	      if (c == '\r')
+// OBSOLETE 		cur_esc = c;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case '\r':
+// OBSOLETE 	      if (c == '~')
+// OBSOLETE 		cur_esc = c;
+// OBSOLETE 	      else
+// OBSOLETE 		cur_esc = 0;
+// OBSOLETE 	      break;
+// OBSOLETE 	    case '~':
+// OBSOLETE 	      if (c == '.' || c == '\004')
+// OBSOLETE 		return;
+// OBSOLETE 	      else
+// OBSOLETE 		cur_esc = 0;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+// OBSOLETE 
+// OBSOLETE       if (FD_ISSET (deprecated_serial_fd (monitor_desc), &readfds))
+// OBSOLETE 	{
+// OBSOLETE 	  while (1)
+// OBSOLETE 	    {
+// OBSOLETE 	      c = readchar (0);
+// OBSOLETE 	      if (c < 0)
+// OBSOLETE 		break;
+// OBSOLETE 	      putchar (c);
+// OBSOLETE 	    }
+// OBSOLETE 	  fflush (stdout);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /*
+// OBSOLETE  * Define the monitor command strings. Since these are passed directly
+// OBSOLETE  * through to a printf style function, we need can include formatting
+// OBSOLETE  * strings. We also need a CR or LF on the end.
+// OBSOLETE  */
+// OBSOLETE #warning FIXME: monitor interface pattern strings, stale struct decl
+// OBSOLETE struct monitor_ops rombug_cmds =
+// OBSOLETE {
+// OBSOLETE   "g \r",			/* execute or usually GO command */
+// OBSOLETE   "g \r",			/* continue command */
+// OBSOLETE   "t \r",			/* single step */
+// OBSOLETE   "b %x\r",			/* set a breakpoint */
+// OBSOLETE   "k %x\r",			/* clear a breakpoint */
+// OBSOLETE   "c %x\r",			/* set memory to a value */
+// OBSOLETE   "d %x %d\r",			/* display memory */
+// OBSOLETE   "$%08X",			/* prompt memory commands use */
+// OBSOLETE   ".%s %x\r",			/* set a register */
+// OBSOLETE   ":",				/* delimiter between registers */
+// OBSOLETE   ". \r",			/* read a register */
+// OBSOLETE   "mf \r",			/* download command */
+// OBSOLETE   "RomBug: ",			/* monitor command prompt */
+// OBSOLETE   ": ",				/* end-of-command delimitor */
+// OBSOLETE   ".\r"				/* optional command terminator */
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE struct target_ops rombug_ops;
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE init_rombug_ops (void)
+// OBSOLETE {
+// OBSOLETE   rombug_ops.to_shortname = "rombug";
+// OBSOLETE   rombug_ops.to_longname = "Microware's ROMBUG debug monitor";
+// OBSOLETE   rombug_ops.to_doc = "Use a remote computer running the ROMBUG debug monitor.\n\
+// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).",
+// OBSOLETE     rombug_ops.to_open = rombug_open;
+// OBSOLETE   rombug_ops.to_close = rombug_close;
+// OBSOLETE   rombug_ops.to_attach = 0;
+// OBSOLETE   rombug_ops.to_post_attach = NULL;
+// OBSOLETE   rombug_ops.to_require_attach = NULL;
+// OBSOLETE   rombug_ops.to_detach = rombug_detach;
+// OBSOLETE   rombug_ops.to_require_detach = NULL;
+// OBSOLETE   rombug_ops.to_resume = rombug_resume;
+// OBSOLETE   rombug_ops.to_wait = rombug_wait;
+// OBSOLETE   rombug_ops.to_post_wait = NULL;
+// OBSOLETE   rombug_ops.to_fetch_registers = rombug_fetch_register;
+// OBSOLETE   rombug_ops.to_store_registers = rombug_store_register;
+// OBSOLETE   rombug_ops.to_prepare_to_store = rombug_prepare_to_store;
+// OBSOLETE   rombug_ops.to_xfer_memory = rombug_xfer_inferior_memory;
+// OBSOLETE   rombug_ops.to_files_info = rombug_files_info;
+// OBSOLETE   rombug_ops.to_insert_breakpoint = rombug_insert_breakpoint;
+// OBSOLETE   rombug_ops.to_remove_breakpoint = rombug_remove_breakpoint;	/* Breakpoints */
+// OBSOLETE   rombug_ops.to_terminal_init = 0;
+// OBSOLETE   rombug_ops.to_terminal_inferior = 0;
+// OBSOLETE   rombug_ops.to_terminal_ours_for_output = 0;
+// OBSOLETE   rombug_ops.to_terminal_ours = 0;
+// OBSOLETE   rombug_ops.to_terminal_info = 0;	/* Terminal handling */
+// OBSOLETE   rombug_ops.to_kill = rombug_kill;
+// OBSOLETE   rombug_ops.to_load = rombug_load;	/* load */
+// OBSOLETE   rombug_ops.to_lookup_symbol = rombug_link;	/* lookup_symbol */
+// OBSOLETE   rombug_ops.to_create_inferior = rombug_create_inferior;
+// OBSOLETE   rombug_ops.to_post_startup_inferior = NULL;
+// OBSOLETE   rombug_ops.to_acknowledge_created_inferior = NULL;
+// OBSOLETE   rombug_ops.to_clone_and_follow_inferior = NULL;
+// OBSOLETE   rombug_ops.to_post_follow_inferior_by_clone = NULL;
+// OBSOLETE   rombug_ops.to_insert_fork_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_remove_fork_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_insert_vfork_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_remove_vfork_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_has_forked = NULL;
+// OBSOLETE   rombug_ops.to_has_vforked = NULL;
+// OBSOLETE   rombug_ops.to_can_follow_vfork_prior_to_exec = NULL;
+// OBSOLETE   rombug_ops.to_post_follow_vfork = NULL;
+// OBSOLETE   rombug_ops.to_insert_exec_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_remove_exec_catchpoint = NULL;
+// OBSOLETE   rombug_ops.to_has_execd = NULL;
+// OBSOLETE   rombug_ops.to_reported_exec_events_per_exec_call = NULL;
+// OBSOLETE   rombug_ops.to_has_exited = NULL;
+// OBSOLETE   rombug_ops.to_mourn_inferior = rombug_mourn_inferior;
+// OBSOLETE   rombug_ops.to_can_run = 0;	/* can_run */
+// OBSOLETE   rombug_ops.to_notice_signals = 0;	/* notice_signals */
+// OBSOLETE   rombug_ops.to_thread_alive = 0;
+// OBSOLETE   rombug_ops.to_stop = 0;	/* to_stop */
+// OBSOLETE   rombug_ops.to_pid_to_exec_file = NULL;
+// OBSOLETE   rombug_ops.to_stratum = process_stratum;
+// OBSOLETE   rombug_ops.DONT_USE = 0;	/* next */
+// OBSOLETE   rombug_ops.to_has_all_memory = 1;
+// OBSOLETE   rombug_ops.to_has_memory = 1;
+// OBSOLETE   rombug_ops.to_has_stack = 1;
+// OBSOLETE   rombug_ops.to_has_registers = 1;
+// OBSOLETE   rombug_ops.to_has_execution = 1;	/* has execution */
+// OBSOLETE   rombug_ops.to_sections = 0;
+// OBSOLETE   rombug_ops.to_sections_end = 0;	/* Section pointers */
+// OBSOLETE   rombug_ops.to_magic = OPS_MAGIC;	/* Always the last thing */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE _initialize_remote_os9k (void)
+// OBSOLETE {
+// OBSOLETE   init_rombug_ops ();
+// OBSOLETE   add_target (&rombug_ops);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 	     add_set_cmd ("hash", no_class, var_boolean, (char *) &hashmark,
+// OBSOLETE 			  "Set display of activity while downloading a file.\nWhen enabled, a period \'.\' is displayed.",
+// OBSOLETE 			  &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 		      add_set_cmd ("timeout", no_class, var_zinteger,
+// OBSOLETE 				   (char *) &timeout,
+// OBSOLETE 		       "Set timeout in seconds for remote MIPS serial I/O.",
+// OBSOLETE 				   &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 		      add_set_cmd ("remotelog", no_class, var_zinteger,
+// OBSOLETE 				   (char *) &monitor_log,
+// OBSOLETE 			      "Set monitor activity log on(=1) or off(=0).",
+// OBSOLETE 				   &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 		      add_set_cmd ("remotexon", no_class, var_zinteger,
+// OBSOLETE 				   (char *) &tty_xon,
+// OBSOLETE 				   "Set remote tty line XON control",
+// OBSOLETE 				   &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_show_from_set (
+// OBSOLETE 		      add_set_cmd ("remotexoff", no_class, var_zinteger,
+// OBSOLETE 				   (char *) &tty_xoff,
+// OBSOLETE 				   "Set remote tty line XOFF control",
+// OBSOLETE 				   &setlist),
+// OBSOLETE 		      &showlist);
+// OBSOLETE 
+// OBSOLETE   add_com ("rombug <command>", class_obscure, rombug_command,
+// OBSOLETE 	   "Send a command to the debug monitor.");
+// OBSOLETE #if 0
+// OBSOLETE   add_com ("connect", class_obscure, connect_command,
+// OBSOLETE 	   "Connect the terminal directly up to a serial based command monitor.\nUse <CR>~. or <CR>~^D to break out.");
+// OBSOLETE #endif
+// OBSOLETE }
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 5243f9b..228e3d9 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -1041,24 +1041,24 @@
 	   "Withough an argument, it will display current state.\n",
 	   &maintenancelist);
 
-  add_show_from_set
-    (add_set_boolean_cmd
-     ("rdiromatzero", no_class, &rom_at_zero,
-      "Set target has ROM at addr 0.\n"
-      "A true value disables vector catching, false enables vector catching.\n"
-      "This is evaluated at the time the 'target rdi' command is executed\n",
-      &setlist),
-     &showlist);
+  add_setshow_boolean_cmd
+    ("rdiromatzero", no_class, &rom_at_zero,
+     "Set target has ROM at addr 0.\n"
+     "A true value disables vector catching, false enables vector catching.\n"
+     "This is evaluated at the time the 'target rdi' command is executed\n",
+     "Show if target has ROM at addr 0.\n",
+     NULL, NULL,
+     &setlist, &showlist);
 
-  add_show_from_set
-    (add_set_boolean_cmd
-     ("rdiheartbeat", no_class, &rdi_heartbeat,
-      "Set enable for ADP heartbeat packets.\n"
-      "I don't know why you would want this. If you enable them,\n"
-      "it will confuse ARM and EPI JTAG interface boxes as well\n"
-      "as the Angel Monitor.\n",
-      &setlist),
-     &showlist);
+  add_setshow_boolean_cmd
+    ("rdiheartbeat", no_class, &rdi_heartbeat,
+     "Set enable for ADP heartbeat packets.\n"
+     "I don't know why you would want this. If you enable them,\n"
+     "it will confuse ARM and EPI JTAG interface boxes as well\n"
+     "as the Angel Monitor.\n",
+     "Show enable for ADP heartbeat packets.\n",
+     NULL, NULL,
+     &setlist, &showlist);
 }
 
 /* A little dummy to make linking with the library succeed. */
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 280e79c..34a42ab 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -41,7 +41,7 @@
 #include "defs.h"
 #include "inferior.h"
 #include "value.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "command.h"
 #include <ctype.h>
 #include <fcntl.h>
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 1d037c8..221efe4 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -35,11 +35,13 @@
 #include "terminal.h"
 #include "target.h"
 #include "gdbcore.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "remote-utils.h"
 #include "command.h"
 #include "regcache.h"
+#include "gdb_assert.h"
+#include "sim-regno.h"
 
 /* Prototypes */
 
@@ -276,46 +278,72 @@
     }
 }
 
+int
+one2one_register_sim_regno (int regnum)
+{
+  /* Only makes sense to supply raw registers.  */
+  gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+  return regnum;
+}
+
 static void
 gdbsim_fetch_register (int regno)
 {
-  static int warn_user = 1;
   if (regno == -1)
     {
       for (regno = 0; regno < NUM_REGS; regno++)
 	gdbsim_fetch_register (regno);
+      return;
     }
-  else if (REGISTER_NAME (regno) != NULL
-	   && *REGISTER_NAME (regno) != '\0')
+
+  switch (REGISTER_SIM_REGNO (regno))
     {
-      char buf[MAX_REGISTER_RAW_SIZE];
-      int nr_bytes;
-      if (REGISTER_SIM_REGNO (regno) >= 0)
+    case LEGACY_SIM_REGNO_IGNORE:
+      break;
+    case SIM_REGNO_DOES_NOT_EXIST:
+      {
+	/* For moment treat a `does not exist' register the same way
+           as an ``unavailable'' register.  */
+	char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+	int nr_bytes;
+	memset (buf, 0, MAX_REGISTER_RAW_SIZE);
+	supply_register (regno, buf);
+	set_register_cached (regno, -1);
+	break;
+      }
+    default:
+      {
+	static int warn_user = 1;
+	char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+	int nr_bytes;
+	gdb_assert (regno >= 0 && regno < NUM_REGS);
+	memset (buf, 0, MAX_REGISTER_RAW_SIZE);
 	nr_bytes = sim_fetch_register (gdbsim_desc,
 				       REGISTER_SIM_REGNO (regno),
 				       buf, REGISTER_RAW_SIZE (regno));
-      else
-	nr_bytes = 0;
-      if (nr_bytes == 0)
-	/* register not applicable, supply zero's */
-	memset (buf, 0, MAX_REGISTER_RAW_SIZE);
-      else if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno)
-	       && warn_user)
-	{
-	  fprintf_unfiltered (gdb_stderr,
-			      "Size of register %s (%d/%d) incorrect (%d instead of %d))",
-			      REGISTER_NAME (regno),
-			      regno, REGISTER_SIM_REGNO (regno),
-			      nr_bytes, REGISTER_RAW_SIZE (regno));
-	  warn_user = 0;
-	}
-      supply_register (regno, buf);
-      if (sr_get_debug ())
-	{
-	  printf_filtered ("gdbsim_fetch_register: %d", regno);
-	  /* FIXME: We could print something more intelligible.  */
-	  dump_mem (buf, REGISTER_RAW_SIZE (regno));
-	}
+	if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno) && warn_user)
+	  {
+	    fprintf_unfiltered (gdb_stderr,
+				"Size of register %s (%d/%d) incorrect (%d instead of %d))",
+				REGISTER_NAME (regno),
+				regno, REGISTER_SIM_REGNO (regno),
+				nr_bytes, REGISTER_RAW_SIZE (regno));
+	    warn_user = 0;
+	  }
+	/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
+	   indicatingthat GDB and the SIM have different ideas about
+	   which registers are fetchable.  */
+	/* Else if (nr_bytes < 0): an old simulator, that doesn't
+	   think to return the register size.  Just assume all is ok.  */
+	supply_register (regno, buf);
+	if (sr_get_debug ())
+	  {
+	    printf_filtered ("gdbsim_fetch_register: %d", regno);
+	    /* FIXME: We could print something more intelligible.  */
+	    dump_mem (buf, REGISTER_RAW_SIZE (regno));
+	  }
+	break;
+      }
     }
 }
 
@@ -327,10 +355,9 @@
     {
       for (regno = 0; regno < NUM_REGS; regno++)
 	gdbsim_store_register (regno);
+      return;
     }
-  else if (REGISTER_NAME (regno) != NULL
-	   && *REGISTER_NAME (regno) != '\0'
-	   && REGISTER_SIM_REGNO (regno) >= 0)
+  else if (REGISTER_SIM_REGNO (regno) >= 0)
     {
       char tmp[MAX_REGISTER_RAW_SIZE];
       int nr_bytes;
@@ -341,6 +368,9 @@
       if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
 	internal_error (__FILE__, __LINE__,
 			"Register size different to expected");
+      /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
+	 indicatingthat GDB and the SIM have different ideas about
+	 which registers are fetchable.  */
       if (sr_get_debug ())
 	{
 	  printf_filtered ("gdbsim_store_register: %d", regno);
diff --git a/gdb/remote-vx29k.c b/gdb/remote-vx29k.c
deleted file mode 100644
index 798cd08..0000000
--- a/gdb/remote-vx29k.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Am29k-dependent portions of the RPC protocol
-
-   Contributed by Wind River Systems.
-
-   This file is part of GDB.
-
-   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 <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h"		/* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX			/* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h>		/* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* Generic register read/write routines in remote-vx.c.  */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
-   REGNO is the register to read, or -1 for all; currently,
-   it is ignored.  FIXME look at regno to improve efficiency.  */
-
-void
-vx_read_register (int regno)
-{
-  char am29k_greg_packet[AM29K_GREG_PLEN];
-  char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
-  /* Get general-purpose registers.  When copying values into
-     registers [], don't assume that a location in registers []
-     is properly aligned for the target data type.  */
-
-  net_read_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_GETREGS);
-
-  /* Now copy the register values into registers[].
-     Note that this code depends on the ordering of the REGNUMs
-     as defined in "tm-29k.h".  */
-
-  bcopy (&am29k_greg_packet[AM29K_R_GR96],
-	 &registers[REGISTER_BYTE (GR96_REGNUM)], 160 * AM29K_GREG_SIZE);
-  bcopy (&am29k_greg_packet[AM29K_R_VAB],
-	 &registers[REGISTER_BYTE (VAB_REGNUM)], 15 * AM29K_GREG_SIZE);
-  registers[REGISTER_BYTE (INTE_REGNUM)] = am29k_greg_packet[AM29K_R_INTE];
-  bcopy (&am29k_greg_packet[AM29K_R_RSP],
-	 &registers[REGISTER_BYTE (GR1_REGNUM)], 5 * AM29K_GREG_SIZE);
-
-  /* PAD For now, don't care about exop register */
-
-  memset (&registers[REGISTER_BYTE (EXO_REGNUM)], '\0', AM29K_GREG_SIZE);
-
-  /* If the target has floating point registers, fetch them.
-     Otherwise, zero the floating point register values in
-     registers[] for good measure, even though we might not
-     need to.  */
-
-  if (target_has_fp)
-    {
-      net_read_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
-			  PTRACE_GETFPREGS);
-      registers[REGISTER_BYTE (FPE_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPE];
-      registers[REGISTER_BYTE (FPS_REGNUM)] = am29k_fpreg_packet[AM29K_R_FPS];
-
-      /* PAD For now, don't care about registers (?) AI0 to q */
-
-      memset (&registers[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
-    }
-  else
-    {
-      memset (&registers[REGISTER_BYTE (FPE_REGNUM)], '\0', AM29K_FPREG_SIZE);
-      memset (&registers[REGISTER_BYTE (FPS_REGNUM)], '\0', AM29K_FPREG_SIZE);
-
-      /* PAD For now, don't care about registers (?) AI0 to q */
-
-      memset (&registers[REGISTER_BYTE (161)], '\0', 21 * AM29K_FPREG_SIZE);
-    }
-
-  /* Mark the register cache valid.  */
-
-  registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
-   REGNO is the register to store, or -1 for all; currently,
-   it is ignored.  FIXME look at regno to improve efficiency.  */
-
-void
-vx_write_register (int regno)
-{
-  char am29k_greg_packet[AM29K_GREG_PLEN];
-  char am29k_fpreg_packet[AM29K_FPREG_PLEN];
-
-  /* Store general purpose registers.  When copying values from
-     registers [], don't assume that a location in registers []
-     is properly aligned for the target data type.  */
-
-  bcopy (&registers[REGISTER_BYTE (GR96_REGNUM)],
-	 &am29k_greg_packet[AM29K_R_GR96], 160 * AM29K_GREG_SIZE);
-  bcopy (&registers[REGISTER_BYTE (VAB_REGNUM)],
-	 &am29k_greg_packet[AM29K_R_VAB], 15 * AM29K_GREG_SIZE);
-  am29k_greg_packet[AM29K_R_INTE] = registers[REGISTER_BYTE (INTE_REGNUM)];
-  bcopy (&registers[REGISTER_BYTE (GR1_REGNUM)],
-	 &am29k_greg_packet[AM29K_R_RSP], 5 * AM29K_GREG_SIZE);
-
-  net_write_registers (am29k_greg_packet, AM29K_GREG_PLEN, PTRACE_SETREGS);
-
-  /* Store floating point registers if the target has them.  */
-
-  if (target_has_fp)
-    {
-      am29k_fpreg_packet[AM29K_R_FPE] = registers[REGISTER_BYTE (FPE_REGNUM)];
-      am29k_fpreg_packet[AM29K_R_FPS] = registers[REGISTER_BYTE (FPS_REGNUM)];
-
-      net_write_registers (am29k_fpreg_packet, AM29K_FPREG_PLEN,
-			   PTRACE_SETFPREGS);
-    }
-}
-
-/* VxWorks zeroes fp when the task is initialized; we use this
-   to terminate the frame chain. Chain means here the nominal address of
-   a frame, that is, the return address (lr0) address in the stack. To
-   obtain the frame pointer (lr1) contents, we must add 4 bytes.
-   Note : may be we should modify init_frame_info() to get the frame pointer
-   and store it into the frame_info struct rather than reading its
-   contents when FRAME_CHAIN_VALID is invoked.  THISFRAME is unused.  */
-
-int
-vx29k_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
-  int fp_contents;
-
-  read_memory ((CORE_ADDR) (chain + 4), (char *) &fp_contents, 4);
-  return (fp_contents != 0);
-}
diff --git a/gdb/remote-vx960.c b/gdb/remote-vx960.c
index 08568bc..87435da 100644
--- a/gdb/remote-vx960.c
+++ b/gdb/remote-vx960.c
@@ -1,160 +1,160 @@
-/* i80960-dependent portions of the RPC protocol
-   used with a VxWorks target 
-
-   Contributed by Wind River Systems.
-
-   This file is part of GDB.
-
-   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 <stdio.h>
-#include "defs.h"
-
-#include "vx-share/regPacket.h"
-#include "frame.h"
-#include "inferior.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "command.h"
-#include "symtab.h"
-#include "symfile.h"		/* for struct complaint */
-#include "regcache.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#ifdef _AIX			/* IBM claims "void *malloc()" not char * */
-#define malloc bogon_malloc
-#endif
-
-#include <rpc/rpc.h>
-#include <sys/time.h>		/* UTek's <rpc/rpc.h> doesn't #incl this */
-#include <netdb.h>
-#include "vx-share/ptrace.h"
-#include "vx-share/xdr_ptrace.h"
-#include "vx-share/xdr_ld.h"
-#include "vx-share/xdr_rdb.h"
-#include "vx-share/dbgRpcLib.h"
-
-/* get rid of value.h if possible */
-#include <value.h>
-#include <symtab.h>
-
-/* Flag set if target has fpu */
-
-extern int target_has_fp;
-
-/* 960 floating point format descriptor, from "i960-tdep.c."  */
-
-extern struct ext_format ext_format_i960;
-
-/* Generic register read/write routines in remote-vx.c.  */
-
-extern void net_read_registers ();
-extern void net_write_registers ();
-
-/* Read a register or registers from the VxWorks target.
-   REGNO is the register to read, or -1 for all; currently,
-   it is ignored.  FIXME look at regno to improve efficiency.  */
-
-void
-vx_read_register (int regno)
-{
-  char i960_greg_packet[I960_GREG_PLEN];
-  char i960_fpreg_packet[I960_FPREG_PLEN];
-
-  /* Get general-purpose registers.  When copying values into
-     registers [], don't assume that a location in registers []
-     is properly aligned for the target data type.  */
-
-  net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
-
-  bcopy (&i960_greg_packet[I960_R_R0],
-	 &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
-  bcopy (&i960_greg_packet[I960_R_G0],
-	 &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
-  bcopy (&i960_greg_packet[I960_R_PCW],
-	 &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
-  bcopy (&i960_greg_packet[I960_R_ACW],
-	 &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
-  bcopy (&i960_greg_packet[I960_R_TCW],
-	 &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
-
-  /* If the target has floating point registers, fetch them.
-     Otherwise, zero the floating point register values in
-     registers[] for good measure, even though we might not
-     need to.  */
-
-  if (target_has_fp)
-    {
-      net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
-			  PTRACE_GETFPREGS);
-      bcopy (&i960_fpreg_packet[I960_R_FP0],
-	     &registers[REGISTER_BYTE (FP0_REGNUM)],
-	     REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-    }
-  else
-    bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
-	   REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-
-  /* Mark the register cache valid.  */
-
-  registers_fetched ();
-}
-
-/* Store a register or registers into the VxWorks target.
-   REGNO is the register to store, or -1 for all; currently,
-   it is ignored.  FIXME look at regno to improve efficiency.  */
-
-void
-vx_write_register (int regno)
-{
-  char i960_greg_packet[I960_GREG_PLEN];
-  char i960_fpreg_packet[I960_FPREG_PLEN];
-
-  /* Store floating-point registers.  When copying values from
-     registers [], don't assume that a location in registers []
-     is properly aligned for the target data type.  */
-
-  bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
-	 &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
-  bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
-	 &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
-  bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
-	 &i960_greg_packet[I960_R_PCW], sizeof (int));
-  bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
-	 &i960_greg_packet[I960_R_ACW], sizeof (int));
-  bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
-	 &i960_greg_packet[I960_R_TCW], sizeof (int));
-
-  net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
-
-  /* Store floating point registers if the target has them.  */
-
-  if (target_has_fp)
-    {
-      bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
-	     &i960_fpreg_packet[I960_R_FP0],
-	     REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
-
-      net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
-			   PTRACE_SETFPREGS);
-    }
-}
+// OBSOLETE /* i80960-dependent portions of the RPC protocol
+// OBSOLETE    used with a VxWorks target 
+// OBSOLETE 
+// OBSOLETE    Contributed by Wind River Systems.
+// OBSOLETE 
+// OBSOLETE    This file is part of GDB.
+// OBSOLETE 
+// OBSOLETE    This program is free software; you can redistribute it and/or modify
+// OBSOLETE    it under the terms of the GNU General Public License as published by
+// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE    (at your option) any later version.
+// OBSOLETE 
+// OBSOLETE    This program is distributed in the hope that it will be useful,
+// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE    GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE    You should have received a copy of the GNU General Public License
+// OBSOLETE    along with this program; if not, write to the Free Software
+// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE    Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include <stdio.h>
+// OBSOLETE #include "defs.h"
+// OBSOLETE 
+// OBSOLETE #include "vx-share/regPacket.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "command.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "symfile.h"		/* for struct complaint */
+// OBSOLETE #include "regcache.h"
+// OBSOLETE 
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <errno.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <sys/time.h>
+// OBSOLETE #include <sys/socket.h>
+// OBSOLETE 
+// OBSOLETE #ifdef _AIX			/* IBM claims "void *malloc()" not char * */
+// OBSOLETE #define malloc bogon_malloc
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #include <rpc/rpc.h>
+// OBSOLETE #include <sys/time.h>		/* UTek's <rpc/rpc.h> doesn't #incl this */
+// OBSOLETE #include <netdb.h>
+// OBSOLETE #include "vx-share/ptrace.h"
+// OBSOLETE #include "vx-share/xdr_ptrace.h"
+// OBSOLETE #include "vx-share/xdr_ld.h"
+// OBSOLETE #include "vx-share/xdr_rdb.h"
+// OBSOLETE #include "vx-share/dbgRpcLib.h"
+// OBSOLETE 
+// OBSOLETE /* get rid of value.h if possible */
+// OBSOLETE #include <value.h>
+// OBSOLETE #include <symtab.h>
+// OBSOLETE 
+// OBSOLETE /* Flag set if target has fpu */
+// OBSOLETE 
+// OBSOLETE extern int target_has_fp;
+// OBSOLETE 
+// OBSOLETE /* 960 floating point format descriptor, from "i960-tdep.c."  */
+// OBSOLETE 
+// OBSOLETE extern struct ext_format ext_format_i960;
+// OBSOLETE 
+// OBSOLETE /* Generic register read/write routines in remote-vx.c.  */
+// OBSOLETE 
+// OBSOLETE extern void net_read_registers ();
+// OBSOLETE extern void net_write_registers ();
+// OBSOLETE 
+// OBSOLETE /* Read a register or registers from the VxWorks target.
+// OBSOLETE    REGNO is the register to read, or -1 for all; currently,
+// OBSOLETE    it is ignored.  FIXME look at regno to improve efficiency.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE vx_read_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char i960_greg_packet[I960_GREG_PLEN];
+// OBSOLETE   char i960_fpreg_packet[I960_FPREG_PLEN];
+// OBSOLETE 
+// OBSOLETE   /* Get general-purpose registers.  When copying values into
+// OBSOLETE      registers [], don't assume that a location in registers []
+// OBSOLETE      is properly aligned for the target data type.  */
+// OBSOLETE 
+// OBSOLETE   net_read_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_GETREGS);
+// OBSOLETE 
+// OBSOLETE   bcopy (&i960_greg_packet[I960_R_R0],
+// OBSOLETE 	 &registers[REGISTER_BYTE (R0_REGNUM)], 16 * I960_GREG_SIZE);
+// OBSOLETE   bcopy (&i960_greg_packet[I960_R_G0],
+// OBSOLETE 	 &registers[REGISTER_BYTE (G0_REGNUM)], 16 * I960_GREG_SIZE);
+// OBSOLETE   bcopy (&i960_greg_packet[I960_R_PCW],
+// OBSOLETE 	 &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
+// OBSOLETE   bcopy (&i960_greg_packet[I960_R_ACW],
+// OBSOLETE 	 &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
+// OBSOLETE   bcopy (&i960_greg_packet[I960_R_TCW],
+// OBSOLETE 	 &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
+// OBSOLETE 
+// OBSOLETE   /* If the target has floating point registers, fetch them.
+// OBSOLETE      Otherwise, zero the floating point register values in
+// OBSOLETE      registers[] for good measure, even though we might not
+// OBSOLETE      need to.  */
+// OBSOLETE 
+// OBSOLETE   if (target_has_fp)
+// OBSOLETE     {
+// OBSOLETE       net_read_registers (i960_fpreg_packet, I960_FPREG_PLEN,
+// OBSOLETE 			  PTRACE_GETFPREGS);
+// OBSOLETE       bcopy (&i960_fpreg_packet[I960_R_FP0],
+// OBSOLETE 	     &registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	     REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	   REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
+// OBSOLETE 
+// OBSOLETE   /* Mark the register cache valid.  */
+// OBSOLETE 
+// OBSOLETE   registers_fetched ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Store a register or registers into the VxWorks target.
+// OBSOLETE    REGNO is the register to store, or -1 for all; currently,
+// OBSOLETE    it is ignored.  FIXME look at regno to improve efficiency.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE vx_write_register (int regno)
+// OBSOLETE {
+// OBSOLETE   char i960_greg_packet[I960_GREG_PLEN];
+// OBSOLETE   char i960_fpreg_packet[I960_FPREG_PLEN];
+// OBSOLETE 
+// OBSOLETE   /* Store floating-point registers.  When copying values from
+// OBSOLETE      registers [], don't assume that a location in registers []
+// OBSOLETE      is properly aligned for the target data type.  */
+// OBSOLETE 
+// OBSOLETE   bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
+// OBSOLETE 	 &i960_greg_packet[I960_R_R0], 16 * I960_GREG_SIZE);
+// OBSOLETE   bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
+// OBSOLETE 	 &i960_greg_packet[I960_R_G0], 16 * I960_GREG_SIZE);
+// OBSOLETE   bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
+// OBSOLETE 	 &i960_greg_packet[I960_R_PCW], sizeof (int));
+// OBSOLETE   bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
+// OBSOLETE 	 &i960_greg_packet[I960_R_ACW], sizeof (int));
+// OBSOLETE   bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
+// OBSOLETE 	 &i960_greg_packet[I960_R_TCW], sizeof (int));
+// OBSOLETE 
+// OBSOLETE   net_write_registers (i960_greg_packet, I960_GREG_PLEN, PTRACE_SETREGS);
+// OBSOLETE 
+// OBSOLETE   /* Store floating point registers if the target has them.  */
+// OBSOLETE 
+// OBSOLETE   if (target_has_fp)
+// OBSOLETE     {
+// OBSOLETE       bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+// OBSOLETE 	     &i960_fpreg_packet[I960_R_FP0],
+// OBSOLETE 	     REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
+// OBSOLETE 
+// OBSOLETE       net_write_registers (i960_fpreg_packet, I960_FPREG_PLEN,
+// OBSOLETE 			   PTRACE_SETFPREGS);
+// OBSOLETE     }
+// OBSOLETE }
diff --git a/gdb/remote.c b/gdb/remote.c
index a1b90b7..1584d6b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -94,9 +94,8 @@
 static void extended_remote_open (char *name, int from_tty);
 static void extended_remote_async_open (char *name, int from_tty);
 
-static void remote_open_1 (char *, int, struct target_ops *, int extended_p);
-static void remote_async_open_1 (char *, int, struct target_ops *,
-				 int extended_p);
+static void remote_open_1 (char *, int, struct target_ops *, int extended_p,
+			   int async_p);
 
 static void remote_close (int quitting);
 
@@ -205,10 +204,6 @@
 
 static void update_packet_config (struct packet_config *config);
 
-/* Define the target subroutine names */
-
-void open_remote_target (char *, int, struct target_ops *, int);
-
 void _initialize_remote (void);
 
 /* Description of the remote protocol.  Strictly speaking, when the
@@ -250,11 +245,12 @@
   long remote_packet_size;
 };
 
+
 /* Handle for retreving the remote protocol data from gdbarch.  */
 static struct gdbarch_data *remote_gdbarch_data_handle;
 
 static struct remote_state *
-get_remote_state ()
+get_remote_state (void)
 {
   return gdbarch_data (current_gdbarch, remote_gdbarch_data_handle);
 }
@@ -340,7 +336,17 @@
   return NULL;
 }
 
-/* */
+/* FIXME: graces/2002-08-08: These variables should eventually be
+   bound to an instance of the target object (as in gdbarch-tdep()),
+   when such a thing exists.  */
+
+/* This is set to the data address of the access causing the target
+   to stop for a watchpoint.  */
+static CORE_ADDR remote_watch_data_address;
+
+/* This is non-zero if taregt stopped for a watchpoint. */
+static int remote_stopped_by_watchpoint_p;
+
 
 static struct target_ops remote_ops;
 
@@ -583,7 +589,7 @@
   {
     char *name;
     char *title;
-    enum cmd_auto_boolean detect;
+    enum auto_boolean detect;
     enum packet_support support;
   };
 
@@ -602,13 +608,13 @@
 {
   switch (config->detect)
     {
-    case CMD_AUTO_BOOLEAN_TRUE:
+    case AUTO_BOOLEAN_TRUE:
       config->support = PACKET_ENABLE;
       break;
-    case CMD_AUTO_BOOLEAN_FALSE:
+    case AUTO_BOOLEAN_FALSE:
       config->support = PACKET_DISABLE;
       break;
-    case CMD_AUTO_BOOLEAN_AUTO:
+    case AUTO_BOOLEAN_AUTO:
       config->support = PACKET_SUPPORT_UNKNOWN;
       break;
     }
@@ -632,12 +638,12 @@
     }
   switch (config->detect)
     {
-    case CMD_AUTO_BOOLEAN_AUTO:
+    case AUTO_BOOLEAN_AUTO:
       printf_filtered ("Support for remote protocol `%s' (%s) packet is auto-detected, currently %s.\n",
 		       config->name, config->title, support);
       break;
-    case CMD_AUTO_BOOLEAN_TRUE:
-    case CMD_AUTO_BOOLEAN_FALSE:
+    case AUTO_BOOLEAN_TRUE:
+    case AUTO_BOOLEAN_FALSE:
       printf_filtered ("Support for remote protocol `%s' (%s) packet is currently %s.\n",
 		       config->name, config->title, support);
       break;
@@ -648,11 +654,8 @@
 add_packet_config_cmd (struct packet_config *config,
 		       char *name,
 		       char *title,
-		       void (*set_func) (char *args, int from_tty,
-					 struct cmd_list_element *
-					 c),
-		       void (*show_func) (char *name,
-					  int from_tty),
+		       cmd_sfunc_ftype *set_func,
+		       cmd_sfunc_ftype *show_func,
 		       struct cmd_list_element **set_remote_list,
 		       struct cmd_list_element **show_remote_list,
 		       int legacy)
@@ -664,7 +667,7 @@
   char *cmd_name;
   config->name = name;
   config->title = title;
-  config->detect = CMD_AUTO_BOOLEAN_AUTO;
+  config->detect = AUTO_BOOLEAN_AUTO;
   config->support = PACKET_SUPPORT_UNKNOWN;
   xasprintf (&set_doc, "Set use of remote protocol `%s' (%s) packet",
 	     name, title);
@@ -672,12 +675,10 @@
 	     name, title);
   /* set/show TITLE-packet {auto,on,off} */
   xasprintf (&cmd_name, "%s-packet", title);
-  set_cmd = add_set_auto_boolean_cmd (cmd_name, class_obscure,
-				&config->detect, set_doc,
-				set_remote_list);
-  set_cmd_sfunc (set_cmd, set_func);
-  show_cmd = add_cmd (cmd_name, class_obscure, show_func, show_doc,
-		      show_remote_list);
+  add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
+				&config->detect, set_doc, show_doc,
+				set_func, show_func,
+				set_remote_list, show_remote_list);
   /* set/show remote NAME-packet {auto,on,off} -- legacy */
   if (legacy)
     {
@@ -730,7 +731,7 @@
       switch (config->support)
 	{
 	case PACKET_ENABLE:
-	  if (config->detect == CMD_AUTO_BOOLEAN_AUTO)
+	  if (config->detect == AUTO_BOOLEAN_AUTO)
 	    /* If the stub previously indicated that the packet was
 	       supported then there is a protocol error.. */
 	    error ("Protocol error: %s (%s) conflicting enabled responses.",
@@ -765,7 +766,8 @@
 }
 
 static void
-show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty)
+show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
+					 struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_qSymbol);
 }
@@ -781,7 +783,8 @@
 }
 
 static void
-show_remote_protocol_e_packet_cmd (char *args, int from_tty)
+show_remote_protocol_e_packet_cmd (char *args, int from_tty,
+				   struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_e);
 }
@@ -798,7 +801,8 @@
 }
 
 static void
-show_remote_protocol_E_packet_cmd (char *args, int from_tty)
+show_remote_protocol_E_packet_cmd (char *args, int from_tty,
+				   struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_E);
 }
@@ -816,7 +820,8 @@
 }
 
 static void
-show_remote_protocol_P_packet_cmd (char *args, int from_tty)
+show_remote_protocol_P_packet_cmd (char *args, int from_tty,
+				   struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_P);
 }
@@ -846,7 +851,8 @@
 }
 
 static void
-show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty,
+					       struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]);
 }
@@ -859,7 +865,8 @@
 }
 
 static void
-show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty,
+					       struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]);
 }
@@ -872,7 +879,8 @@
 }
 
 static void
-show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty,
+					    struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]);
 }
@@ -885,7 +893,8 @@
 }
 
 static void
-show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty,
+					   struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]);
 }
@@ -898,7 +907,8 @@
 }
 
 static void
-show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty,
+					     struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]);
 }
@@ -906,7 +916,7 @@
 /* For compatibility with older distributions.  Provide a ``set remote
    Z-packet ...'' command that updates all the Z packet types. */
 
-static enum cmd_auto_boolean remote_Z_packet_detect;
+static enum auto_boolean remote_Z_packet_detect;
 
 static void
 set_remote_protocol_Z_packet_cmd (char *args, int from_tty,
@@ -921,7 +931,8 @@
 }
 
 static void
-show_remote_protocol_Z_packet_cmd (char *args, int from_tty)
+show_remote_protocol_Z_packet_cmd (char *args, int from_tty,
+				   struct cmd_list_element *c)
 {
   int i;
   for (i = 0; i < NR_Z_PACKET_TYPES; i++)
@@ -962,8 +973,8 @@
 }
 
 static void
-show_remote_protocol_binary_download_cmd (char *args,
-					  int from_tty)
+show_remote_protocol_binary_download_cmd (char *args, int from_tty,
+					  struct cmd_list_element *c)
 {
   show_packet_config_cmd (&remote_protocol_binary_download);
 }
@@ -1102,7 +1113,7 @@
 
 #define BUF_THREAD_ID_SIZE (OPAQUETHREADBYTES*2)
 
-char *unpack_varlen_hex (char *buff, int *result);
+char *unpack_varlen_hex (char *buff, ULONGEST *result);
 
 static char *unpack_nibble (char *buf, int *val);
 
@@ -1223,7 +1234,7 @@
 
 char *
 unpack_varlen_hex (char *buff,	/* packet to parse */
-		   int *result)
+		   ULONGEST *result)
 {
   int nibble;
   int retval = 0;
@@ -2144,14 +2155,14 @@
 static void
 remote_open (char *name, int from_tty)
 {
-  remote_open_1 (name, from_tty, &remote_ops, 0);
+  remote_open_1 (name, from_tty, &remote_ops, 0, 0);
 }
 
 /* Just like remote_open, but with asynchronous support. */
 static void
 remote_async_open (char *name, int from_tty)
 {
-  remote_async_open_1 (name, from_tty, &remote_async_ops, 0);
+  remote_open_1 (name, from_tty, &remote_async_ops, 0, 1);
 }
 
 /* Open a connection to a remote debugger using the extended
@@ -2160,14 +2171,16 @@
 static void
 extended_remote_open (char *name, int from_tty)
 {
-  remote_open_1 (name, from_tty, &extended_remote_ops, 1 /*extended_p */ );
+  remote_open_1 (name, from_tty, &extended_remote_ops, 1 /*extended_p */,
+		 0 /* async_p */);
 }
 
 /* Just like extended_remote_open, but with asynchronous support. */
 static void
 extended_remote_async_open (char *name, int from_tty)
 {
-  remote_async_open_1 (name, from_tty, &extended_async_remote_ops, 1 /*extended_p */ );
+  remote_open_1 (name, from_tty, &extended_async_remote_ops,
+		 1 /*extended_p */, 1 /* async_p */);
 }
 
 /* Generic code for opening a connection to a remote target.  */
@@ -2248,7 +2261,7 @@
 
 static void
 remote_open_1 (char *name, int from_tty, struct target_ops *target,
-	       int extended_p)
+	       int extended_p, int async_p)
 {
   int ex;
   struct remote_state *rs = get_remote_state ();
@@ -2258,7 +2271,8 @@
 	   "(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).");
 
   /* See FIXME above */
-  wait_forever_enabled_p = 1;
+  if (!async_p)
+    wait_forever_enabled_p = 1;
 
   target_preopen (from_tty);
 
@@ -2308,6 +2322,22 @@
      someday have a notion of debugging several processes.  */
 
   inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
+
+  if (async_p)
+    {
+      /* With this target we start out by owning the terminal. */
+      remote_async_terminal_ours_p = 1;
+
+      /* FIXME: cagney/1999-09-23: During the initial connection it is
+	 assumed that the target is already ready and able to respond to
+	 requests. Unfortunately remote_start_remote() eventually calls
+	 wait_for_inferior() with no timeout.  wait_forever_enabled_p gets
+	 around this. Eventually a mechanism that allows
+	 wait_for_inferior() to expect/get timeouts will be
+	 implemented. */
+      wait_forever_enabled_p = 0;
+    }
+
 #ifdef SOLIB_CREATE_INFERIOR_HOOK
   /* First delete any symbols previously loaded from shared libraries. */
   no_shared_libraries (NULL, 0);
@@ -2336,126 +2366,13 @@
   if (ex < 0)
     {
       pop_target ();
+      if (async_p)
+	wait_forever_enabled_p = 1;
       throw_exception (ex);
     }
 
-  if (extended_p)
-    {
-      /* Tell the remote that we are using the extended protocol.  */
-      char *buf = alloca (rs->remote_packet_size);
-      putpkt ("!");
-      getpkt (buf, (rs->remote_packet_size), 0);
-    }
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
-  /* FIXME: need a master target_open vector from which all 
-     remote_opens can be called, so that stuff like this can 
-     go there.  Failing that, the following code must be copied
-     to the open function for any remote target that wants to 
-     support svr4 shared libraries.  */
-
-  /* Set up to detect and load shared libraries. */
-  if (exec_bfd) 	/* No use without an exec file. */
-    {
-      SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
-      remote_check_symbols (symfile_objfile);
-    }
-#endif
-}
-
-/* Just like remote_open but with asynchronous support. */
-static void
-remote_async_open_1 (char *name, int from_tty, struct target_ops *target,
-		     int extended_p)
-{
-  int ex;
-  struct remote_state *rs = get_remote_state ();
-  if (name == 0)
-    error ("To open a remote debug connection, you need to specify what\n"
-	   "serial device is attached to the remote system\n"
-	   "(e.g. /dev/ttyS0, /dev/ttya, COM1, etc.).");
-
-  target_preopen (from_tty);
-
-  unpush_target (target);
-
-  remote_desc = remote_serial_open (name);
-  if (!remote_desc)
-    perror_with_name (name);
-
-  if (baud_rate != -1)
-    {
-      if (serial_setbaudrate (remote_desc, baud_rate))
-	{
-	  serial_close (remote_desc);
-	  perror_with_name (name);
-	}
-    }
-
-  serial_raw (remote_desc);
-
-  /* If there is something sitting in the buffer we might take it as a
-     response to a command, which would be bad.  */
-  serial_flush_input (remote_desc);
-
-  if (from_tty)
-    {
-      puts_filtered ("Remote debugging using ");
-      puts_filtered (name);
-      puts_filtered ("\n");
-    }
-
-  push_target (target);		/* Switch to using remote target now */
-
-  init_all_packet_configs ();
-
-  general_thread = -2;
-  continue_thread = -2;
-
-  /* Probe for ability to use "ThreadInfo" query, as required.  */
-  use_threadinfo_query = 1;
-  use_threadextra_query = 1;
-
-  /* Without this, some commands which require an active target (such
-     as kill) won't work.  This variable serves (at least) double duty
-     as both the pid of the target process (if it has such), and as a
-     flag indicating that a target is active.  These functions should
-     be split out into seperate variables, especially since GDB will
-     someday have a notion of debugging several processes.  */
-  inferior_ptid = pid_to_ptid (MAGIC_NULL_PID);
-
-  /* With this target we start out by owning the terminal. */
-  remote_async_terminal_ours_p = 1;
-
-  /* FIXME: cagney/1999-09-23: During the initial connection it is
-     assumed that the target is already ready and able to respond to
-     requests. Unfortunately remote_start_remote() eventually calls
-     wait_for_inferior() with no timeout.  wait_forever_enabled_p gets
-     around this. Eventually a mechanism that allows
-     wait_for_inferior() to expect/get timeouts will be
-     implemented. */
-  wait_forever_enabled_p = 0;
-
-#ifdef SOLIB_CREATE_INFERIOR_HOOK
-  /* First delete any symbols previously loaded from shared libraries. */
-  no_shared_libraries (NULL, 0);
-#endif
-
-  /* Start the remote connection; if error, discard this target.  See
-     the comments in remote_open_1() for further details such as the
-     need to re-throw the exception.  */
-  ex = catch_exceptions (uiout,
-			 remote_start_remote, NULL,
-			 "Couldn't establish connection to remote"
-			 " target\n",
-			 RETURN_MASK_ALL);
-  if (ex < 0)
-    {
-      pop_target ();
-      wait_forever_enabled_p = 1;
-      throw_exception (ex);
-    }
-
-  wait_forever_enabled_p = 1;
+  if (async_p)
+    wait_forever_enabled_p = 1;
 
   if (extended_p)
     {
@@ -3002,7 +2919,8 @@
 {
   struct remote_state *rs = get_remote_state ();
   unsigned char *buf = alloca (rs->remote_packet_size);
-  int thread_num = -1;
+  ULONGEST thread_num = -1;
+  ULONGEST addr;
 
   status->kind = TARGET_WAITKIND_EXITED;
   status->value.integer = 0;
@@ -3020,6 +2938,8 @@
       if (target_wait_loop_hook)
 	(*target_wait_loop_hook) ();
 
+      remote_stopped_by_watchpoint_p = 0;
+
       switch (buf[0])
 	{
 	case 'E':		/* Error of some sort */
@@ -3043,24 +2963,52 @@
 		unsigned char *p1;
 		char *p_temp;
 		int fieldsize;
+		LONGEST pnum = 0;
 
-		/* Read the ``P'' register number.  */
-		LONGEST pnum = strtol ((const char *) p, &p_temp, 16);
-		p1 = (unsigned char *) p_temp;
+		/* If the packet contains a register number save it in pnum
+		   and set p1 to point to the character following it. 
+		   Otherwise p1 points to p.  */
+
+		/* If this packet is an awatch packet, don't parse the 'a'
+		   as a register number.  */
+
+		if (strncmp (p, "awatch", strlen("awatch")) != 0)
+		  {
+		    /* Read the ``P'' register number.  */
+		    pnum = strtol (p, &p_temp, 16);
+		    p1 = (unsigned char *) p_temp;
+		  }
+		else 
+		  p1 = p;
 
 		if (p1 == p)	/* No register number present here */
 		  {
-		    p1 = (unsigned char *) strchr ((const char *) p, ':');
+		    p1 = (unsigned char *) strchr (p, ':');
 		    if (p1 == NULL)
 		      warning ("Malformed packet(a) (missing colon): %s\n\
 Packet: '%s'\n",
 			       p, buf);
-		    if (strncmp ((const char *) p, "thread", p1 - p) == 0)
+		    if (strncmp (p, "thread", p1 - p) == 0)
 		      {
 			p_temp = unpack_varlen_hex (++p1, &thread_num);
 			record_currthread (thread_num);
 			p = (unsigned char *) p_temp;
 		      }
+		    else if ((strncmp (p, "watch", p1 - p) == 0)
+			     || (strncmp (p, "rwatch", p1 - p) == 0)
+			     || (strncmp (p, "awatch", p1 - p) == 0))
+		      {
+			remote_stopped_by_watchpoint_p = 1;
+			p = unpack_varlen_hex (++p1, &addr);
+			remote_watch_data_address = (CORE_ADDR)addr;
+		      }
+		    else
+ 		      {
+ 			/* Silently skip unknown optional info.  */
+ 			p_temp = strchr (p1 + 1, ';');
+ 			if (p_temp)
+			  p = (unsigned char *) p_temp;
+ 		      }
 		  }
 		else
 		  {
@@ -3216,11 +3164,14 @@
 {
   struct remote_state *rs = get_remote_state ();
   unsigned char *buf = alloca (rs->remote_packet_size);
-  int thread_num = -1;
+  ULONGEST thread_num = -1;
+  ULONGEST addr;
 
   status->kind = TARGET_WAITKIND_EXITED;
   status->value.integer = 0;
 
+  remote_stopped_by_watchpoint_p = 0;
+
   while (1)
     {
       unsigned char *p;
@@ -3263,25 +3214,54 @@
 		unsigned char *p1;
 		char *p_temp;
 		int fieldsize;
+		long pnum = 0;
 
-		/* Read the register number */
-		long pnum = strtol ((const char *) p, &p_temp, 16);
-		p1 = (unsigned char *) p_temp;
+		/* If the packet contains a register number, save it in pnum
+		   and set p1 to point to the character following it. 
+		   Otherwise p1 points to p.  */
+
+		/* If this packet is an awatch packet, don't parse the 'a'
+		   as a register number.  */
+		
+		if (!strncmp (p, "awatch", strlen ("awatch")) != 0)
+		  {
+		    /* Read the register number.  */
+		    pnum = strtol (p, &p_temp, 16);
+		    p1 = (unsigned char *) p_temp;
+		  }
+		else 
+		  p1 = p;
 
 		if (p1 == p)	/* No register number present here */
 		  {
-		    p1 = (unsigned char *) strchr ((const char *) p, ':');
+		    p1 = (unsigned char *) strchr (p, ':');
 		    if (p1 == NULL)
 		      warning ("Malformed packet(a) (missing colon): %s\n\
 Packet: '%s'\n",
 			       p, buf);
-		    if (strncmp ((const char *) p, "thread", p1 - p) == 0)
+		    if (strncmp (p, "thread", p1 - p) == 0)
 		      {
 			p_temp = unpack_varlen_hex (++p1, &thread_num);
 			record_currthread (thread_num);
 			p = (unsigned char *) p_temp;
 		      }
+		    else if ((strncmp (p, "watch", p1 - p) == 0)
+			     || (strncmp (p, "rwatch", p1 - p) == 0)
+			     || (strncmp (p, "awatch", p1 - p) == 0))
+		      {
+			remote_stopped_by_watchpoint_p = 1;
+			p = unpack_varlen_hex (++p1, &addr);
+			remote_watch_data_address = (CORE_ADDR)addr;
+		      }
+		    else
+ 		      {
+ 			/* Silently skip unknown optional info.  */
+ 			p_temp = (unsigned char *) strchr (p1 + 1, ';');
+ 			if (p_temp)
+			  p = p_temp;
+ 		      }
 		  }
+		
 		else
 		  {
 		    struct packet_reg *reg = packet_reg_from_pnum (rs, pnum);
@@ -3948,7 +3928,9 @@
       putpkt (buf);
       getpkt (buf, sizeof_buf, 0);
 
-      if (buf[0] == 'E')
+      if (buf[0] == 'E'
+	  && isxdigit (buf[1]) && isxdigit (buf[2])
+	  && buf[3] == '\0')
 	{
 	  /* There is no correspondance between what the remote protocol uses
 	     for errors and errno codes.  We would like a cleaner way of
@@ -4787,10 +4769,7 @@
     }
 }
 
-/* FIXME: This function should be static and a member of the remote
-   target vector. */
-
-int
+static int
 remote_insert_watchpoint (CORE_ADDR addr, int len, int type)
 {
   struct remote_state *rs = get_remote_state ();
@@ -4824,10 +4803,8 @@
 		  "remote_insert_watchpoint: reached end of function");
 }
 
-/* FIXME: This function should be static and a member of the remote
-   target vector. */
 
-int
+static int
 remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
 {
   struct remote_state *rs = get_remote_state ();
@@ -4860,16 +4837,60 @@
 		  "remote_remove_watchpoint: reached end of function");
 }
 
-/* FIXME: This function should be static and a member of the remote
-   target vector. */
+
+int remote_hw_watchpoint_limit = 0;
+int remote_hw_breakpoint_limit = 0;
 
 int
-remote_insert_hw_breakpoint (CORE_ADDR addr, int len)
+remote_check_watch_resources (int type, int cnt, int ot)
 {
+  if (type == bp_hardware_breakpoint)
+    {
+      if (remote_hw_breakpoint_limit == 0)
+	return 0;
+      else if (cnt <= remote_hw_breakpoint_limit)
+	return 1;
+    }
+  else
+    {
+      if (remote_hw_watchpoint_limit == 0)
+	return 0;
+      else if (ot)
+	return -1;
+      else if (cnt <= remote_hw_watchpoint_limit)
+	return 1;
+    }
+  return -1;
+}
+
+int
+remote_stopped_by_watchpoint (void)
+{
+    return remote_stopped_by_watchpoint_p;
+}
+
+CORE_ADDR
+remote_stopped_data_address (void)
+{
+  if (remote_stopped_by_watchpoint ())
+    return remote_watch_data_address;
+  return (CORE_ADDR)0;
+}
+
+
+static int
+remote_insert_hw_breakpoint (CORE_ADDR addr, char *shadow)
+{
+  int len = 0;
   struct remote_state *rs = get_remote_state ();
   char *buf = alloca (rs->remote_packet_size);
   char *p = buf;
       
+  /* The length field should be set to the size of a breakpoint
+     instruction.  */
+
+  BREAKPOINT_FROM_PC (&addr, &len);  
+
   if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
     error ("Can't set hardware breakpoint without the '%s' (%s) packet\n",
 	   remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
@@ -4895,19 +4916,23 @@
       return 0;
     }
   internal_error (__FILE__, __LINE__,
-		  "remote_remove_watchpoint: reached end of function");
+		  "remote_insert_hw_breakpoint: reached end of function");
 }
 
-/* FIXME: This function should be static and a member of the remote
-   target vector. */
 
-int 
-remote_remove_hw_breakpoint (CORE_ADDR addr, int len)
+static int 
+remote_remove_hw_breakpoint (CORE_ADDR addr, char *shadow)
 {
+  int len;
   struct remote_state *rs = get_remote_state ();
   char *buf = alloca (rs->remote_packet_size);
   char *p = buf;
-  
+
+  /* The length field should be set to the size of a breakpoint
+     instruction.  */
+
+  BREAKPOINT_FROM_PC (&addr, &len);
+
   if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
     error ("Can't clear hardware breakpoint without the '%s' (%s) packet\n",
 	   remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
@@ -4933,7 +4958,7 @@
       return 0;
     }
   internal_error (__FILE__, __LINE__,
-		  "remote_remove_watchpoint: reached end of function");
+		  "remote_remove_hw_breakpoint: reached end of function");
 }
 
 /* Some targets are only capable of doing downloads, and afterwards
@@ -4953,18 +4978,6 @@
   remote_open (name, from_tty);
 }
 
-/* Other targets want to use the entire remote serial module but with
-   certain remote_ops overridden. */
-
-void
-open_remote_target (char *name, int from_tty, struct target_ops *target,
-		    int extended_p)
-{
-  printf_filtered ("Selecting the %sremote protocol\n",
-		   (extended_p ? "extended-" : ""));
-  remote_open_1 (name, from_tty, target, extended_p);
-}
-
 /* Table used by the crc32 function to calcuate the checksum. */
 
 static unsigned long crc32_table[256] =
@@ -5410,6 +5423,13 @@
   remote_ops.to_files_info = remote_files_info;
   remote_ops.to_insert_breakpoint = remote_insert_breakpoint;
   remote_ops.to_remove_breakpoint = remote_remove_breakpoint;
+  remote_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+  remote_ops.to_stopped_data_address = remote_stopped_data_address;
+  remote_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
+  remote_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+  remote_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+  remote_ops.to_insert_watchpoint = remote_insert_watchpoint;
+  remote_ops.to_remove_watchpoint = remote_remove_watchpoint;
   remote_ops.to_kill = remote_kill;
   remote_ops.to_load = generic_load;
   remote_ops.to_mourn_inferior = remote_mourn;
@@ -5825,7 +5845,14 @@
   remote_cisco_ops.to_xfer_memory = remote_xfer_memory;
   remote_cisco_ops.to_files_info = remote_files_info;
   remote_cisco_ops.to_insert_breakpoint = remote_insert_breakpoint;
-  remote_cisco_ops.to_remove_breakpoint = remote_remove_breakpoint;
+  remote_cisco_ops.to_remove_breakpoint = remote_remove_breakpoint;  
+  remote_cisco_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+  remote_cisco_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+  remote_cisco_ops.to_insert_watchpoint = remote_insert_watchpoint;
+  remote_cisco_ops.to_remove_watchpoint = remote_remove_watchpoint;
+  remote_cisco_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+  remote_cisco_ops.to_stopped_data_address = remote_stopped_data_address;
+  remote_cisco_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
   remote_cisco_ops.to_kill = remote_kill;
   remote_cisco_ops.to_load = generic_load;
   remote_cisco_ops.to_mourn_inferior = remote_cisco_mourn;
@@ -5915,6 +5942,13 @@
   remote_async_ops.to_files_info = remote_files_info;
   remote_async_ops.to_insert_breakpoint = remote_insert_breakpoint;
   remote_async_ops.to_remove_breakpoint = remote_remove_breakpoint;
+  remote_async_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
+  remote_async_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+  remote_async_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+  remote_async_ops.to_insert_watchpoint = remote_insert_watchpoint;
+  remote_async_ops.to_remove_watchpoint = remote_remove_watchpoint;
+  remote_async_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+  remote_async_ops.to_stopped_data_address = remote_stopped_data_address;
   remote_async_ops.to_terminal_inferior = remote_async_terminal_inferior;
   remote_async_ops.to_terminal_ours = remote_async_terminal_ours;
   remote_async_ops.to_kill = remote_async_kill;
@@ -5968,13 +6002,14 @@
 static void
 show_remote_cmd (char *args, int from_tty)
 {
-  
-  show_remote_protocol_Z_packet_cmd (args, from_tty);
-  show_remote_protocol_e_packet_cmd (args, from_tty);
-  show_remote_protocol_E_packet_cmd (args, from_tty);
-  show_remote_protocol_P_packet_cmd (args, from_tty);
-  show_remote_protocol_qSymbol_packet_cmd (args, from_tty);
-  show_remote_protocol_binary_download_cmd (args, from_tty);
+  /* FIXME: cagney/2002-06-15: This function should iterate over
+     remote_show_cmdlist for a list of sub commands to show.  */
+  show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_e_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_E_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
+  show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
 }
 
 static void
@@ -6069,11 +6104,11 @@
 terminating `#' character and checksum.",
 	   &maintenancelist);
 
-  add_show_from_set
-    (add_set_boolean_cmd ("remotebreak", no_class, &remote_break,
-			  "Set whether to send break if interrupted.\n",
-			  &setlist),
-     &showlist);
+  add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break,
+			   "Set whether to send break if interrupted.\n",
+			   "Show whether to send break if interrupted.\n",
+			   NULL, NULL,
+			   &setlist, &showlist);
 
   /* Install commands for configuring memory read/write packets. */
 
@@ -6150,7 +6185,7 @@
 			 0);
   /* Disable by default.  The ``e'' packet has nasty interactions with
      the threading code - it relies on global state.  */
-  remote_protocol_e.detect = CMD_AUTO_BOOLEAN_FALSE;
+  remote_protocol_e.detect = AUTO_BOOLEAN_FALSE;
   update_packet_config (&remote_protocol_e);
 
   add_packet_config_cmd (&remote_protocol_E,
@@ -6161,7 +6196,7 @@
 			 0);
   /* Disable by default.  The ``e'' packet has nasty interactions with
      the threading code - it relies on global state.  */
-  remote_protocol_E.detect = CMD_AUTO_BOOLEAN_FALSE;
+  remote_protocol_E.detect = AUTO_BOOLEAN_FALSE;
   update_packet_config (&remote_protocol_E);
 
   add_packet_config_cmd (&remote_protocol_P,
@@ -6207,12 +6242,11 @@
 			 0);
 
   /* Keep the old ``set remote Z-packet ...'' working. */
-  tmpcmd = add_set_auto_boolean_cmd ("Z-packet", class_obscure,
-				     &remote_Z_packet_detect,
-				     "\
-Set use of remote protocol `Z' packets", &remote_set_cmdlist);
-  set_cmd_sfunc (tmpcmd, set_remote_protocol_Z_packet_cmd);
-  add_cmd ("Z-packet", class_obscure, show_remote_protocol_Z_packet_cmd,
-	   "Show use of remote protocol `Z' packets ",
-	   &remote_show_cmdlist);
+  add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
+				&remote_Z_packet_detect, "\
+Set use of remote protocol `Z' packets",
+				"Show use of remote protocol `Z' packets ",
+				set_remote_protocol_Z_packet_cmd,
+				show_remote_protocol_Z_packet_cmd,
+				&remote_set_cmdlist, &remote_show_cmdlist);
 }
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index ec49f5d..cc0586f 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -157,11 +157,24 @@
    than does GDB, and don't necessarily support all the registers
    either. So, typing "info reg sp" becomes a "r30".  */
 
-static char *rom68k_regnames[NUM_REGS] =
+static const char *
+rom68k_regname (int index) 
 {
-  "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
-  "A0", "A1", "A2", "A3", "A4", "A5", "A6", "ISP",
-  "SR", "PC"};
+
+  static char *regnames[] =
+  {
+    "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
+    "A0", "A1", "A2", "A3", "A4", "A5", "A6", "ISP",
+    "SR", "PC"
+  };
+  
+  if ((index >= (sizeof (regnames) / sizeof(regnames[0]))) 
+       || (index < 0) || (index >= NUM_REGS))
+    return NULL;
+  else
+    return regnames[index];
+
+}
 
 /* Define the monitor command strings. Since these are passed directly
    through to a printf style function, we may include formatting
@@ -220,7 +233,8 @@
   rom68k_cmds.cmd_end = ".\r";
   rom68k_cmds.target = &rom68k_ops;
   rom68k_cmds.stopbits = SERIAL_1_STOPBITS;
-  rom68k_cmds.regnames = rom68k_regnames;
+  rom68k_cmds.regnames = NULL;
+  rom68k_cmds.regname = rom68k_regname;
   rom68k_cmds.magic = MONITOR_OPS_MAGIC;
 }				/* init_rom68k_cmds */
 
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 8fb2fec..65256f4 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -32,6 +32,8 @@
 #include "gdb-stabs.h"
 #include "regcache.h"
 #include "arch-utils.h"
+#include "language.h"		/* for local_hex_string().  */
+#include "ppc-tdep.h"
 
 #include <sys/ptrace.h>
 #include <sys/reg.h>
@@ -144,18 +146,43 @@
 extern void
 fixup_breakpoints (CORE_ADDR low, CORE_ADDR high, CORE_ADDR delta);
 
-/* Conversion from gdb-to-system special purpose register numbers. */
+/* Given REGNO, a gdb register number, return the corresponding
+   number suitable for use as a ptrace() parameter.  Return -1 if
+   there's no suitable mapping.  Also, set the int pointed to by
+   ISFLOAT to indicate whether REGNO is a floating point register.  */
 
-static int special_regs[] =
+static int
+regmap (int regno, int *isfloat)
 {
-  IAR,				/* PC_REGNUM    */
-  MSR,				/* PS_REGNUM    */
-  CR,				/* CR_REGNUM    */
-  LR,				/* LR_REGNUM    */
-  CTR,				/* CTR_REGNUM   */
-  XER,				/* XER_REGNUM   */
-  MQ				/* MQ_REGNUM    */
-};
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  *isfloat = 0;
+  if (tdep->ppc_gp0_regnum <= regno && regno <= tdep->ppc_gplast_regnum)
+    return regno;
+  else if (FP0_REGNUM <= regno && regno <= FPLAST_REGNUM)
+    {
+      *isfloat = 1;
+      return regno - FP0_REGNUM + FPR0;
+    }
+  else if (regno == PC_REGNUM)
+    return IAR;
+  else if (regno == tdep->ppc_ps_regnum)
+    return MSR;
+  else if (regno == tdep->ppc_cr_regnum)
+    return CR;
+  else if (regno == tdep->ppc_lr_regnum)
+    return LR;
+  else if (regno == tdep->ppc_ctr_regnum)
+    return CTR;
+  else if (regno == tdep->ppc_xer_regnum)
+    return XER;
+  else if (regno == tdep->ppc_fpscr_regnum)
+    return FPSCR;
+  else if (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum)
+    return MQ;
+  else
+    return -1;
+}
 
 /* Call ptrace(REQ, ID, ADDR, DATA, BUF). */
 
@@ -192,36 +219,31 @@
 static void
 fetch_register (int regno)
 {
-  int *addr = (int *) &registers[REGISTER_BYTE (regno)];
-  int nr;
+  int *addr = alloca (MAX_REGISTER_RAW_SIZE);
+  int nr, isfloat;
 
   /* Retrieved values may be -1, so infer errors from errno. */
   errno = 0;
 
+  nr = regmap (regno, &isfloat);
+
   /* Floating-point registers. */
-  if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
-    {
-      nr = regno - FP0_REGNUM + FPR0;
-      rs6000_ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
-    }
+  if (isfloat)
+    rs6000_ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
 
   /* Bogus register number. */
-  else if (regno > LAST_UISA_SP_REGNUM)
+  else if (nr < 0)
     {
       if (regno >= NUM_REGS)
 	fprintf_unfiltered (gdb_stderr,
 			    "gdb error: register no %d not implemented.\n",
 			    regno);
+      return;
     }
 
   /* Fixed-point registers. */
   else
     {
-      if (regno >= FIRST_UISA_SP_REGNUM)
-	nr = special_regs[regno - FIRST_UISA_SP_REGNUM];
-      else
-	nr = regno;
-
       if (!ARCH64 ())
 	*addr = rs6000_ptrace32 (PT_READ_GPR, PIDGET (inferior_ptid), (int *)nr, 0, 0);
       else
@@ -238,7 +260,7 @@
     }
 
   if (!errno)
-    register_valid[regno] = 1;
+    supply_register (regno, (char *) addr);
   else
     {
 #if 0
@@ -254,21 +276,23 @@
 static void
 store_register (int regno)
 {
-  int *addr = (int *) &registers[REGISTER_BYTE (regno)];
-  int nr;
+  int *addr = alloca (MAX_REGISTER_RAW_SIZE);
+  int nr, isfloat;
+
+  /* Fetch the register's value from the register cache.  */
+  regcache_collect (regno, addr);
 
   /* -1 can be a successful return value, so infer errors from errno. */
   errno = 0;
 
+  nr = regmap (regno, &isfloat);
+
   /* Floating-point registers. */
-  if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
-    {
-      nr = regno - FP0_REGNUM + FPR0;
-      rs6000_ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
-    }
+  if (isfloat)
+    rs6000_ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
 
   /* Bogus register number. */
-  else if (regno > LAST_UISA_SP_REGNUM)
+  else if (nr < 0)
     {
       if (regno >= NUM_REGS)
 	fprintf_unfiltered (gdb_stderr,
@@ -287,11 +311,9 @@
 	   (%sp). */
 	exec_one_dummy_insn ();
 
-      if (regno >= FIRST_UISA_SP_REGNUM)
-	nr = special_regs[regno - FIRST_UISA_SP_REGNUM];
-      else
-	nr = regno;
-
+      /* The PT_WRITE_GPR operation is rather odd.  For 32-bit inferiors,
+         the register's value is passed by value, but for 64-bit inferiors,
+	 the address of a buffer containing the value is passed.  */
       if (!ARCH64 ())
 	rs6000_ptrace32 (PT_WRITE_GPR, PIDGET (inferior_ptid), (int *)nr, *addr, 0);
       else
@@ -325,17 +347,30 @@
 
   else
     {
-      /* read 32 general purpose registers. */
-      for (regno = 0; regno < 32; regno++)
-	fetch_register (regno);
+      struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
-      /* read general purpose floating point registers. */
+      /* Read 32 general purpose registers.  */
+      for (regno = tdep->ppc_gp0_regnum;
+           regno <= tdep->ppc_gplast_regnum;
+	   regno++)
+	{
+	  fetch_register (regno);
+	}
+
+      /* Read general purpose floating point registers.  */
       for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
 	fetch_register (regno);
 
-      /* read special registers. */
-      for (regno = FIRST_UISA_SP_REGNUM; regno <= LAST_UISA_SP_REGNUM; regno++)
-	fetch_register (regno);
+      /* Read special registers.  */
+      fetch_register (PC_REGNUM);
+      fetch_register (tdep->ppc_ps_regnum);
+      fetch_register (tdep->ppc_cr_regnum);
+      fetch_register (tdep->ppc_lr_regnum);
+      fetch_register (tdep->ppc_ctr_regnum);
+      fetch_register (tdep->ppc_xer_regnum);
+      fetch_register (tdep->ppc_fpscr_regnum);
+      if (tdep->ppc_mq_regnum >= 0)
+	fetch_register (tdep->ppc_mq_regnum);
     }
 }
 
@@ -351,18 +386,30 @@
 
   else
     {
-      /* write general purpose registers first! */
-      for (regno = GPR0; regno <= GPR31; regno++)
-	store_register (regno);
+      struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
-      /* write floating point registers now. */
+      /* Write general purpose registers first.  */
+      for (regno = tdep->ppc_gp0_regnum;
+           regno <= tdep->ppc_gplast_regnum;
+	   regno++)
+	{
+	  store_register (regno);
+	}
+
+      /* Write floating point registers.  */
       for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
 	store_register (regno);
 
-      /* write special registers. */
-
-      for (regno = FIRST_UISA_SP_REGNUM; regno <= LAST_UISA_SP_REGNUM; regno++)
-	store_register (regno);
+      /* Write special registers.  */
+      store_register (PC_REGNUM);
+      store_register (tdep->ppc_ps_regnum);
+      store_register (tdep->ppc_cr_regnum);
+      store_register (tdep->ppc_lr_regnum);
+      store_register (tdep->ppc_ctr_regnum);
+      store_register (tdep->ppc_xer_regnum);
+      store_register (tdep->ppc_fpscr_regnum);
+      if (tdep->ppc_mq_regnum >= 0)
+	store_register (tdep->ppc_mq_regnum);
     }
 }
 
@@ -514,9 +561,8 @@
 		      int which, CORE_ADDR reg_addr)
 {
   CoreRegs *regs;
-  double *fprs;
-  int arch64, i, size;
-  void *gprs, *sprs[7];
+  int regi;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
 
   if (which != 0)
     {
@@ -526,45 +572,43 @@
       return;
     }
 
-  arch64 = ARCH64 ();
   regs = (CoreRegs *) core_reg_sect;
 
-  /* Retrieve register pointers. */
+  /* Put the register values from the core file section in the regcache.  */
 
-  if (arch64)
+  if (ARCH64 ())
     {
-      gprs = regs->r64.gpr;
-      fprs = regs->r64.fpr;
-      sprs[0] = &regs->r64.iar;
-      sprs[1] = &regs->r64.msr;
-      sprs[2] = &regs->r64.cr;
-      sprs[3] = &regs->r64.lr;
-      sprs[4] = &regs->r64.ctr;
-      sprs[5] = &regs->r64.xer;
+      for (regi = 0; regi < 32; regi++)
+        supply_register (regi, (char *) &regs->r64.gpr[regi]);
+
+      for (regi = 0; regi < 32; regi++)
+	supply_register (FP0_REGNUM + regi, (char *) &regs->r64.fpr[regi]);
+
+      supply_register (PC_REGNUM, (char *) &regs->r64.iar);
+      supply_register (tdep->ppc_ps_regnum, (char *) &regs->r64.msr);
+      supply_register (tdep->ppc_cr_regnum, (char *) &regs->r64.cr);
+      supply_register (tdep->ppc_lr_regnum, (char *) &regs->r64.lr);
+      supply_register (tdep->ppc_ctr_regnum, (char *) &regs->r64.ctr);
+      supply_register (tdep->ppc_xer_regnum, (char *) &regs->r64.xer);
+      supply_register (tdep->ppc_fpscr_regnum, (char *) &regs->r64.fpscr);
     }
   else
     {
-      gprs = regs->r32.gpr;
-      fprs = regs->r32.fpr;
-      sprs[0] = &regs->r32.iar;
-      sprs[1] = &regs->r32.msr;
-      sprs[2] = &regs->r32.cr;
-      sprs[3] = &regs->r32.lr;
-      sprs[4] = &regs->r32.ctr;
-      sprs[5] = &regs->r32.xer;
-      sprs[6] = &regs->r32.mq;
-    }
+      for (regi = 0; regi < 32; regi++)
+        supply_register (regi, (char *) &regs->r32.gpr[regi]);
 
-  /* Copy from pointers to registers[]. */
+      for (regi = 0; regi < 32; regi++)
+	supply_register (FP0_REGNUM + regi, (char *) &regs->r32.fpr[regi]);
 
-  memcpy (registers, gprs, 32 * (arch64 ? 8 : 4));
-  memcpy (registers + REGISTER_BYTE (FP0_REGNUM), fprs, 32 * 8);
-  for (i = FIRST_UISA_SP_REGNUM; i <= LAST_UISA_SP_REGNUM; i++)
-    {
-      size = REGISTER_RAW_SIZE (i);
-      if (size)
-	memcpy (registers + REGISTER_BYTE (i),
-		sprs[i - FIRST_UISA_SP_REGNUM], size);
+      supply_register (PC_REGNUM, (char *) &regs->r32.iar);
+      supply_register (tdep->ppc_ps_regnum, (char *) &regs->r32.msr);
+      supply_register (tdep->ppc_cr_regnum, (char *) &regs->r32.cr);
+      supply_register (tdep->ppc_lr_regnum, (char *) &regs->r32.lr);
+      supply_register (tdep->ppc_ctr_regnum, (char *) &regs->r32.ctr);
+      supply_register (tdep->ppc_xer_regnum, (char *) &regs->r32.xer);
+      supply_register (tdep->ppc_fpscr_regnum, (char *) &regs->r32.fpscr);
+      if (tdep->ppc_mq_regnum >= 0)
+	supply_register (tdep->ppc_mq_regnum, (char *) &regs->r32.mq);
     }
 }
 
@@ -832,6 +876,11 @@
 	  /* relocate symbol table(s). */
 	  vmap_symtab (vp);
 
+	  /* Announce new object files.  Doing this after symbol relocation
+	     makes aix-thread.c's job easier. */
+	  if (target_new_objfile_hook && vp->objfile)
+	    target_new_objfile_hook (vp->objfile);
+
 	  /* There may be more, so we don't break out of the loop.  */
 	}
 
@@ -1109,6 +1158,9 @@
 	}
 
       vmap_symtab (vp);
+
+      if (target_new_objfile_hook && vp != vmap && vp->objfile)
+	target_new_objfile_hook (vp->objfile);
     }
   while (LDI_NEXT (ldi, arch64) != 0);
   vmap_exec ();
@@ -1143,7 +1195,7 @@
 					      : vp->objfile);
 	}
     }
-  error ("Unable to find TOC entry for pc 0x%x\n", pc);
+  error ("Unable to find TOC entry for pc %s\n", local_hex_string (pc));
 }
 
 /* Register that we are able to handle rs6000 core file formats. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 2ba81ea..c73f92d 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -67,12 +67,14 @@
     int saved_gpr;		/* smallest # of saved gpr */
     int saved_fpr;		/* smallest # of saved fpr */
     int saved_vr;               /* smallest # of saved vr */
+    int saved_ev;               /* smallest # of saved ev */
     int alloca_reg;		/* alloca register number (frame ptr) */
     char frameless;		/* true if frameless functions. */
     char nosavedpc;		/* true if pc not saved. */
     int gpr_offset;		/* offset of saved gprs from prev sp */
     int fpr_offset;		/* offset of saved fprs from prev sp */
     int vr_offset;              /* offset of saved vrs from prev sp */
+    int ev_offset;              /* offset of saved evs from prev sp */
     int lr_offset;		/* offset of saved lr */
     int cr_offset;		/* offset of saved cr */
     int vrsave_offset;          /* offset of saved vrsave register */
@@ -86,12 +88,9 @@
     unsigned char sz32;		/* size on 32-bit arch, 0 if nonextant */
     unsigned char sz64;		/* size on 64-bit arch, 0 if nonextant */
     unsigned char fpr;		/* whether register is floating-point */
+    unsigned char pseudo;       /* whether register is pseudo */
   };
 
-/* Return the current architecture's gdbarch_tdep structure. */
-
-#define TDEP	gdbarch_tdep (current_gdbarch)
-
 /* Breakpoint shadows for the single step instructions will be kept here. */
 
 static struct sstep_breaks
@@ -252,7 +251,7 @@
 	      fi = get_current_frame ();
 	      if (fi != NULL)
 		dest = read_memory_addr (fi->frame + SIG_FRAME_PC_OFFSET,
-					 TDEP->wordsize);
+					 gdbarch_tdep (current_gdbarch)->wordsize);
 	    }
 	}
 
@@ -362,11 +361,13 @@
    - saved_gpr is the number of the first saved gpr.
    - saved_fpr is the number of the first saved fpr.
    - saved_vr is the number of the first saved vr.
+   - saved_ev is the number of the first saved ev.
    - alloca_reg is the number of the register used for alloca() handling.
    Otherwise -1.
    - gpr_offset is the offset of the first saved gpr from the previous frame.
    - fpr_offset is the offset of the first saved fpr from the previous frame.
    - vr_offset is the offset of the first saved vr from the previous frame.
+   - ev_offset is the offset of the first saved ev from the previous frame.
    - lr_offset is the offset of the saved lr
    - cr_offset is the offset of the saved cr
    - vrsave_offset is the offset of the saved vrsave register
@@ -444,13 +445,16 @@
   int lr_reg = -1;
   int cr_reg = -1;
   int vr_reg = -1;
+  int ev_reg = -1;
+  long ev_offset = 0;
   int vrsave_reg = -1;
   int reg;
   int framep = 0;
   int minimal_toc_loaded = 0;
   int prev_insn_was_prologue_insn = 1;
   int num_skip_non_prologue_insns = 0;
-
+  const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (current_gdbarch);
+  
   /* Attempt to find the end of the prologue when no limit is specified.
      Note that refine_prologue_limit() has been written so that it may
      be used to "refine" the limits of non-zero PC values too, but this
@@ -470,6 +474,7 @@
   fdata->saved_gpr = -1;
   fdata->saved_fpr = -1;
   fdata->saved_vr = -1;
+  fdata->saved_ev = -1;
   fdata->alloca_reg = -1;
   fdata->frameless = 1;
   fdata->nosavedpc = 1;
@@ -536,7 +541,7 @@
 	}
       else if ((op & 0xffff0000) == 0x60000000)
         {
-	  			/* nop */
+	  /* nop */
 	  /* Allow nops in the prologue, but do not consider them to
 	     be part of the prologue unless followed by other prologue
 	     instructions. */
@@ -650,7 +655,7 @@
       else if ((op & 0xfc0007fe) == 0x7c000378 &&	/* mr(.)  Rx,Ry */
                (((op >> 21) & 31) >= 3) &&              /* R3 >= Ry >= R10 */
                (((op >> 21) & 31) <= 10) &&
-               (((op >> 16) & 31) >= fdata->saved_gpr)) /* Rx: local var reg */
+               ((long) ((op >> 16) & 31) >= fdata->saved_gpr)) /* Rx: local var reg */
 	{
 	  continue;
 
@@ -731,7 +736,9 @@
 	 in a pair of insns to save the vector registers on the
 	 stack.  */
       /* 001110 00000 00000 iiii iiii iiii iiii  */
-      else if ((op & 0xffff0000) == 0x38000000)    /* li r0, SIMM */
+      /* 001110 01110 00000 iiii iiii iiii iiii  */
+      else if ((op & 0xffff0000) == 0x38000000         /* li r0, SIMM */
+               || (op & 0xffff0000) == 0x39c00000)     /* li r14, SIMM */
 	{
 	  li_found_pc = pc;
 	  vr_saved_offset = SIGNED_SHORT (op);
@@ -757,6 +764,104 @@
 	    }
 	}
       /* End AltiVec related instructions.  */
+
+      /* Start BookE related instructions.  */
+      /* Store gen register S at (r31+uimm).
+         Any register less than r13 is volatile, so we don't care.  */
+      /* 000100 sssss 11111 iiiii 01100100001 */
+      else if (arch_info->mach == bfd_mach_ppc_e500
+	       && (op & 0xfc1f07ff) == 0x101f0321)    /* evstdd Rs,uimm(R31) */
+	{
+          if ((op & 0x03e00000) >= 0x01a00000)	/* Rs >= r13 */
+	    {
+              unsigned int imm;
+	      ev_reg = GET_SRC_REG (op);
+              imm = (op >> 11) & 0x1f;
+	      ev_offset = imm * 8;
+	      /* If this is the first vector reg to be saved, or if
+		 it has a lower number than others previously seen,
+		 reupdate the frame info.  */
+	      if (fdata->saved_ev == -1 || fdata->saved_ev > ev_reg)
+		{
+		  fdata->saved_ev = ev_reg;
+		  fdata->ev_offset = ev_offset + offset;
+		}
+	    }
+          continue;
+        }
+      /* Store gen register rS at (r1+rB).  */
+      /* 000100 sssss 00001 bbbbb 01100100000 */
+      else if (arch_info->mach == bfd_mach_ppc_e500
+	       && (op & 0xffe007ff) == 0x13e00320)     /* evstddx RS,R1,Rb */
+	{
+          if (pc == (li_found_pc + 4))
+            {
+              ev_reg = GET_SRC_REG (op);
+	      /* If this is the first vector reg to be saved, or if
+                 it has a lower number than others previously seen,
+                 reupdate the frame info.  */
+              /* We know the contents of rB from the previous instruction.  */
+	      if (fdata->saved_ev == -1 || fdata->saved_ev > ev_reg)
+		{
+                  fdata->saved_ev = ev_reg;
+                  fdata->ev_offset = vr_saved_offset + offset;
+		}
+	      vr_saved_offset = -1;
+	      ev_reg = -1;
+	      li_found_pc = 0;
+            }
+          continue;
+        }
+      /* Store gen register r31 at (rA+uimm).  */
+      /* 000100 11111 aaaaa iiiii 01100100001 */
+      else if (arch_info->mach == bfd_mach_ppc_e500
+	       && (op & 0xffe007ff) == 0x13e00321)   /* evstdd R31,Ra,UIMM */
+        {
+          /* Wwe know that the source register is 31 already, but
+             it can't hurt to compute it.  */
+	  ev_reg = GET_SRC_REG (op);
+          ev_offset = ((op >> 11) & 0x1f) * 8;
+	  /* If this is the first vector reg to be saved, or if
+	     it has a lower number than others previously seen,
+	     reupdate the frame info.  */
+	  if (fdata->saved_ev == -1 || fdata->saved_ev > ev_reg)
+	    {
+	      fdata->saved_ev = ev_reg;
+	      fdata->ev_offset = ev_offset + offset;
+	    }
+
+	  continue;
+      	}
+      /* Store gen register S at (r31+r0).
+         Store param on stack when offset from SP bigger than 4 bytes.  */
+      /* 000100 sssss 11111 00000 01100100000 */
+      else if (arch_info->mach == bfd_mach_ppc_e500
+	       && (op & 0xfc1fffff) == 0x101f0320)     /* evstddx Rs,R31,R0 */
+	{
+          if (pc == (li_found_pc + 4))
+            {
+              if ((op & 0x03e00000) >= 0x01a00000)
+		{
+		  ev_reg = GET_SRC_REG (op);
+		  /* If this is the first vector reg to be saved, or if
+		     it has a lower number than others previously seen,
+		     reupdate the frame info.  */
+                  /* We know the contents of r0 from the previous
+                     instruction.  */
+		  if (fdata->saved_ev == -1 || fdata->saved_ev > ev_reg)
+		    {
+		      fdata->saved_ev = ev_reg;
+		      fdata->ev_offset = vr_saved_offset + offset;
+		    }
+		  ev_reg = -1;
+		}
+	      vr_saved_offset = -1;
+	      li_found_pc = 0;
+	      continue;
+            }
+	}
+      /* End BookE related instructions.  */
+
       else
 	{
 	  /* Not a recognized prologue instruction.
@@ -773,7 +878,7 @@
 	       trampolines.  */
 	    break;
 	  if ((op & 0xf4000000) == 0x40000000) /* bxx */
-	    /* Never skip branches. */
+	    /* Never skip branches.  */
 	    break;
 
 	  if (num_skip_non_prologue_insns++ > max_skip_non_prologue_insns)
@@ -794,9 +899,9 @@
 
   /* If the first thing after skipping a prolog is a branch to a function,
      this might be a call to an initializer in main(), introduced by gcc2.
-     We'd like to skip over it as well. Fortunately, xlc does some extra
+     We'd like to skip over it as well.  Fortunately, xlc does some extra
      work before calling a function right after a prologue, thus we can
-     single out such gcc2 behaviour. */
+     single out such gcc2 behaviour.  */
 
 
   if ((op & 0xfc000001) == 0x48000001)
@@ -806,8 +911,8 @@
       if (op == 0x4def7b82)
 	{			/* cror 0xf, 0xf, 0xf (nop) */
 
-	  /* check and see if we are in main. If so, skip over this initializer
-	     function as well. */
+	  /* Check and see if we are in main.  If so, skip over this
+	     initializer function as well.  */
 
 	  tmp = find_pc_misc_function (pc);
 	  if (tmp >= 0 && STREQ (misc_function_vector[tmp].name, main_name ()))
@@ -827,7 +932,7 @@
 *************************************************************************/
 
 
-/* Pop the innermost frame, go back to the caller. */
+/* Pop the innermost frame, go back to the caller.  */
 
 static void
 rs6000_pop_frame (void)
@@ -850,14 +955,14 @@
   /* Make sure that all registers are valid.  */
   read_register_bytes (0, NULL, REGISTER_BYTES);
 
-  /* figure out previous %pc value. If the function is frameless, it is 
+  /* Figure out previous %pc value.  If the function is frameless, it is 
      still in the link register, otherwise walk the frames and retrieve the
-     saved %pc value in the previous frame. */
+     saved %pc value in the previous frame.  */
 
   addr = get_pc_function_start (frame->pc);
   (void) skip_prologue (addr, frame->pc, &fdata);
 
-  wordsize = TDEP->wordsize;
+  wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
   if (fdata.frameless)
     prev_sp = sp;
   else
@@ -870,7 +975,7 @@
   /* reset %pc value. */
   write_register (PC_REGNUM, lr);
 
-  /* reset register values if any was saved earlier. */
+  /* reset register values if any was saved earlier.  */
 
   if (fdata.saved_gpr != -1)
     {
@@ -898,7 +1003,7 @@
 }
 
 /* Fixup the call sequence of a dummy function, with the real function
-   address.  Its arguments will be passed by gdb. */
+   address.  Its arguments will be passed by gdb.  */
 
 static void
 rs6000_fix_call_dummy (char *dummyname, CORE_ADDR pc, CORE_ADDR fun,
@@ -920,8 +1025,8 @@
    the first eight words of the argument list (that might be less than
    eight parameters if some parameters occupy more than one word) are
    passed in r3..r10 registers.  float and double parameters are
-   passed in fpr's, in addition to that. Rest of the parameters if any
-   are passed in user stack. There might be cases in which half of the
+   passed in fpr's, in addition to that.  Rest of the parameters if any
+   are passed in user stack.  There might be cases in which half of the
    parameter is copied into registers, the other half is pushed into
    stack.
 
@@ -930,7 +1035,7 @@
 
    If the function is returning a structure, then the return address is passed
    in r3, then the first 7 words of the parameters can be passed in registers,
-   starting from r4. */
+   starting from r4.  */
 
 static CORE_ADDR
 rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
@@ -942,20 +1047,20 @@
   int argbytes;			/* current argument byte */
   char tmp_buffer[50];
   int f_argno = 0;		/* current floating point argno */
-  int wordsize = TDEP->wordsize;
+  int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
 
   struct value *arg = 0;
   struct type *type;
 
   CORE_ADDR saved_sp;
 
-  /* The first eight words of ther arguments are passed in registers. Copy
-     them appropriately.
+  /* The first eight words of ther arguments are passed in registers.
+     Copy them appropriately.
 
      If the function is returning a `struct', then the first word (which 
-     will be passed in r3) is used for struct return address. In that
+     will be passed in r3) is used for struct return address.  In that
      case we should advance one word and start from r4 register to copy 
-     parameters. */
+     parameters.  */
 
   ii = struct_return ? 1 : 0;
 
@@ -989,9 +1094,9 @@
       if (TYPE_CODE (type) == TYPE_CODE_FLT)
 	{
 
-	  /* floating point arguments are passed in fpr's, as well as gpr's.
+	  /* Floating point arguments are passed in fpr's, as well as gpr's.
 	     There are 13 fpr's reserved for passing parameters. At this point
-	     there is no way we would run out of them. */
+	     there is no way we would run out of them.  */
 
 	  if (len > 8)
 	    printf_unfiltered (
@@ -1006,7 +1111,7 @@
       if (len > reg_size)
 	{
 
-	  /* Argument takes more than one register. */
+	  /* Argument takes more than one register.  */
 	  while (argbytes < len)
 	    {
 	      memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
@@ -1023,7 +1128,8 @@
 	  --ii;
 	}
       else
-	{			/* Argument can fit in one register. No problem. */
+	{
+	  /* Argument can fit in one register.  No problem.  */
 	  int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
 	  memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
 	  memcpy ((char *)&registers[REGISTER_BYTE (ii + 3)] + adj, 
@@ -1036,17 +1142,17 @@
 
   saved_sp = read_sp ();
 
-  /* location for 8 parameters are always reserved. */
+  /* Location for 8 parameters are always reserved.  */
   sp -= wordsize * 8;
 
-  /* another six words for back chain, TOC register, link register, etc. */
+  /* Another six words for back chain, TOC register, link register, etc.  */
   sp -= wordsize * 6;
 
-  /* stack pointer must be quadword aligned */
+  /* Stack pointer must be quadword aligned.  */
   sp &= -16;
 
-  /* if there are more arguments, allocate space for them in 
-     the stack, then push them starting from the ninth one. */
+  /* If there are more arguments, allocate space for them in 
+     the stack, then push them starting from the ninth one.  */
 
   if ((argno < nargs) || argbytes)
     {
@@ -1066,19 +1172,20 @@
 	  space += ((TYPE_LENGTH (VALUE_TYPE (val))) + 3) & -4;
 	}
 
-      /* add location required for the rest of the parameters */
+      /* Add location required for the rest of the parameters.  */
       space = (space + 15) & -16;
       sp -= space;
 
-      /* This is another instance we need to be concerned about securing our
-         stack space. If we write anything underneath %sp (r1), we might conflict
-         with the kernel who thinks he is free to use this area. So, update %sp
-         first before doing anything else. */
+      /* This is another instance we need to be concerned about
+         securing our stack space. If we write anything underneath %sp
+         (r1), we might conflict with the kernel who thinks he is free
+         to use this area. So, update %sp first before doing anything
+         else.  */
 
       write_register (SP_REGNUM, sp);
 
-      /* if the last argument copied into the registers didn't fit there 
-         completely, push the rest of it into stack. */
+      /* If the last argument copied into the registers didn't fit there 
+         completely, push the rest of it into stack.  */
 
       if (argbytes)
 	{
@@ -1089,7 +1196,7 @@
 	  ii += ((len - argbytes + 3) & -4) / 4;
 	}
 
-      /* push the rest of the arguments into stack. */
+      /* Push the rest of the arguments into stack.  */
       for (; argno < nargs; ++argno)
 	{
 
@@ -1098,7 +1205,8 @@
 	  len = TYPE_LENGTH (type);
 
 
-	  /* float types should be passed in fpr's, as well as in the stack. */
+	  /* Float types should be passed in fpr's, as well as in the
+             stack.  */
 	  if (TYPE_CODE (type) == TYPE_CODE_FLT && f_argno < 13)
 	    {
 
@@ -1117,7 +1225,7 @@
 	}
     }
   else
-    /* Secure stack areas first, before doing anything else. */
+    /* Secure stack areas first, before doing anything else.  */
     write_register (SP_REGNUM, sp);
 
   /* set back chain properly */
@@ -1129,7 +1237,7 @@
 }
 
 /* Function: ppc_push_return_address (pc, sp)
-   Set up the return address for the inferior function call. */
+   Set up the return address for the inferior function call.  */
 
 static CORE_ADDR
 ppc_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
@@ -1140,7 +1248,63 @@
 }
 
 /* Extract a function return value of type TYPE from raw register array
-   REGBUF, and copy that return value into VALBUF in virtual format. */
+   REGBUF, and copy that return value into VALBUF in virtual format.  */
+static void
+e500_extract_return_value (struct type *valtype, struct regcache *regbuf, char *valbuf)
+{
+  int offset = 0;
+  int vallen = TYPE_LENGTH (valtype);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
+      && vallen == 8
+      && TYPE_VECTOR (valtype))
+    {
+      regcache_raw_read (regbuf, tdep->ppc_ev0_regnum + 3, valbuf);
+    }
+  else
+    {
+      /* Return value is copied starting from r3.  Note that r3 for us
+         is a pseudo register.  */
+      int offset = 0;
+      int return_regnum = tdep->ppc_gp0_regnum + 3;
+      int reg_size = REGISTER_RAW_SIZE (return_regnum);
+      int reg_part_size;
+      char *val_buffer;
+      int copied = 0;
+      int i = 0;
+
+      /* Compute where we will start storing the value from.  */ 
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+        {
+	  if (vallen <= reg_size)
+	    offset = reg_size - vallen;
+	  else
+	    offset = reg_size + (reg_size - vallen);
+        }
+
+      /* How big does the local buffer need to be?  */
+      if (vallen <= reg_size)
+	val_buffer = alloca (reg_size);
+      else
+	val_buffer = alloca (vallen);
+
+      /* Read all we need into our private buffer.  We copy it in
+         chunks that are as long as one register, never shorter, even
+         if the value is smaller than the register.  */
+      while (copied < vallen)
+        {
+          reg_part_size = REGISTER_RAW_SIZE (return_regnum + i);
+	  /* It is a pseudo/cooked register.  */
+          regcache_cooked_read (regbuf, return_regnum + i,
+				val_buffer + copied);
+          copied += reg_part_size;
+          i++;
+        }
+      /* Put the stuff in the return buffer.  */
+      memcpy (valbuf, val_buffer + offset, vallen);
+    }
+}
 
 static void
 rs6000_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
@@ -1155,7 +1319,7 @@
       float ff;
       /* floats and doubles are returned in fpr1. fpr's have a size of 8 bytes.
          We need to truncate the return value into float size (4 byte) if
-         necessary. */
+         necessary.  */
 
       if (TYPE_LENGTH (valtype) > 4)	/* this is a double */
 	memcpy (valbuf,
@@ -1284,7 +1448,7 @@
 	return 0;
     }
   ii = read_register (11);	/* r11 holds destination addr   */
-  pc = read_memory_addr (ii, TDEP->wordsize); /* (r11) value */
+  pc = read_memory_addr (ii, gdbarch_tdep (current_gdbarch)->wordsize); /* (r11) value */
   return pc;
 }
 
@@ -1304,13 +1468,13 @@
   func_start = get_pc_function_start (fi->pc);
 
   /* If we failed to find the start of the function, it is a mistake
-     to inspect the instructions. */
+     to inspect the instructions.  */
 
   if (!func_start)
     {
       /* A frame with a zero PC is usually created by dereferencing a NULL
          function pointer, normally causing an immediate core dump of the
-         inferior. Mark function as frameless, as the inferior has no chance
+         inferior.  Mark function as frameless, as the inferior has no chance
          of setting up a stack frame.  */
       if (fi->pc == 0)
 	return 1;
@@ -1322,14 +1486,14 @@
   return fdata.frameless;
 }
 
-/* Return the PC saved in a frame */
+/* Return the PC saved in a frame.  */
 
 CORE_ADDR
 rs6000_frame_saved_pc (struct frame_info *fi)
 {
   CORE_ADDR func_start;
   struct rs6000_framedata fdata;
-  struct gdbarch_tdep *tdep = TDEP;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   int wordsize = tdep->wordsize;
 
   if (fi->signal_handler_caller)
@@ -1341,7 +1505,7 @@
   func_start = get_pc_function_start (fi->pc);
 
   /* If we failed to find the start of the function, it is a mistake
-     to inspect the instructions. */
+     to inspect the instructions.  */
   if (!func_start)
     return 0;
 
@@ -1387,16 +1551,18 @@
   frame_saved_regs_zalloc (fi);
 
   /* If there were any saved registers, figure out parent's stack
-     pointer. */
+     pointer.  */
   /* The following is true only if the frame doesn't have a call to
-     alloca(), FIXME. */
+     alloca(), FIXME.  */
 
   if (fdatap->saved_fpr == 0
       && fdatap->saved_gpr == 0
       && fdatap->saved_vr == 0
+      && fdatap->saved_ev == 0
       && fdatap->lr_offset == 0
       && fdatap->cr_offset == 0
-      && fdatap->vr_offset == 0)
+      && fdatap->vr_offset == 0
+      && fdatap->ev_offset == 0)
     frame_addr = 0;
   else
     /* NOTE: cagney/2002-04-14: The ->frame points to the inner-most
@@ -1450,6 +1616,23 @@
 	}
     }
 
+  /* if != -1, fdatap->saved_ev is the smallest number of saved_ev.
+	All vr's from saved_ev to ev31 are saved. ?????	*/
+  if (tdep->ppc_ev0_regnum != -1 && tdep->ppc_ev31_regnum != -1)
+    {
+      if (fdatap->saved_ev >= 0)
+	{
+	  int i;
+	  CORE_ADDR ev_addr = frame_addr + fdatap->ev_offset;
+	  for (i = fdatap->saved_ev; i < 32; i++)
+	    {
+	      fi->saved_regs[tdep->ppc_ev0_regnum + i] = ev_addr;
+              fi->saved_regs[tdep->ppc_gp0_regnum + i] = ev_addr + 4;
+	      ev_addr += REGISTER_RAW_SIZE (tdep->ppc_ev0_regnum);
+            }
+	}
+    }
+
   /* If != 0, fdatap->cr_offset is the offset from the frame that holds
      the CR.  */
   if (fdatap->cr_offset != 0)
@@ -1467,8 +1650,8 @@
 }
 
 /* Return the address of a frame. This is the inital %sp value when the frame
-   was first allocated. For functions calling alloca(), it might be saved in
-   an alloca register. */
+   was first allocated.  For functions calling alloca(), it might be saved in
+   an alloca register.  */
 
 static CORE_ADDR
 frame_initial_stack_address (struct frame_info *fi)
@@ -1477,23 +1660,24 @@
   struct rs6000_framedata fdata;
   struct frame_info *callee_fi;
 
-  /* if the initial stack pointer (frame address) of this frame is known,
-     just return it. */
+  /* If the initial stack pointer (frame address) of this frame is known,
+     just return it.  */
 
   if (fi->extra_info->initial_sp)
     return fi->extra_info->initial_sp;
 
-  /* find out if this function is using an alloca register.. */
+  /* Find out if this function is using an alloca register.  */
 
   (void) skip_prologue (get_pc_function_start (fi->pc), fi->pc, &fdata);
 
-  /* if saved registers of this frame are not known yet, read and cache them. */
+  /* If saved registers of this frame are not known yet, read and
+     cache them.  */
 
   if (!fi->saved_regs)
     frame_get_saved_regs (fi, &fdata);
 
   /* If no alloca register used, then fi->frame is the value of the %sp for
-     this frame, and it is good enough. */
+     this frame, and it is good enough.  */
 
   if (fdata.alloca_reg < 0)
     {
@@ -1524,7 +1708,7 @@
    (its caller).  */
 
 /* FRAME_CHAIN takes a frame's nominal address
-   and produces the frame's chain-pointer. */
+   and produces the frame's chain-pointer.  */
 
 /* In the case of the RS/6000, the frame's nominal address
    is the address of a 4-byte word containing the calling frame's address.  */
@@ -1533,7 +1717,7 @@
 rs6000_frame_chain (struct frame_info *thisframe)
 {
   CORE_ADDR fp, fpp, lr;
-  int wordsize = TDEP->wordsize;
+  int wordsize = gdbarch_tdep (current_gdbarch)->wordsize;
 
   if (PC_IN_CALL_DUMMY (thisframe->pc, thisframe->frame, thisframe->frame))
     return thisframe->frame;	/* dummy frame same as caller's frame */
@@ -1564,7 +1748,7 @@
 }
 
 /* Return the size of register REG when words are WORDSIZE bytes long.  If REG
-   isn't available with that word size, return 0. */
+   isn't available with that word size, return 0.  */
 
 static int
 regsize (const struct reg *reg, int wordsize)
@@ -1573,12 +1757,12 @@
 }
 
 /* Return the name of register number N, or null if no such register exists
-   in the current architecture. */
+   in the current architecture.  */
 
-static char *
+static const char *
 rs6000_register_name (int n)
 {
-  struct gdbarch_tdep *tdep = TDEP;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   const struct reg *reg = tdep->regs + n;
 
   if (!regsize (reg, tdep->wordsize))
@@ -1592,16 +1776,16 @@
 static int
 rs6000_register_byte (int n)
 {
-  return TDEP->regoff[n];
+  return gdbarch_tdep (current_gdbarch)->regoff[n];
 }
 
 /* Return the number of bytes of storage in the actual machine representation
-   for register N if that register is available, else return 0. */
+   for register N if that register is available, else return 0.  */
 
 static int
 rs6000_register_raw_size (int n)
 {
-  struct gdbarch_tdep *tdep = TDEP;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   const struct reg *reg = tdep->regs + n;
   return regsize (reg, tdep->wordsize);
 }
@@ -1612,7 +1796,7 @@
 static struct type *
 rs6000_register_virtual_type (int n)
 {
-  struct gdbarch_tdep *tdep = TDEP;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   const struct reg *reg = tdep->regs + n;
 
   if (reg->fpr)
@@ -1623,7 +1807,10 @@
       switch (size)
 	{
 	case 8:
-	  return builtin_type_int64;
+	  if (tdep->ppc_ev0_regnum <= n && n <= tdep->ppc_ev31_regnum)
+	    return builtin_type_vec64;
+	  else
+	    return builtin_type_int64;
 	  break;
 	case 16:
 	  return builtin_type_vec128;
@@ -1638,7 +1825,7 @@
 /* For the PowerPC, it appears that the debug info marks float parameters as
    floats regardless of whether the function is prototyped, but the actual
    values are always passed in as doubles.  Tell gdb to always assume that
-   floats are passed as doubles and then converted in the callee. */
+   floats are passed as doubles and then converted in the callee.  */
 
 static int
 rs6000_coerce_float_to_double (struct type *formal, struct type *actual)
@@ -1650,17 +1837,17 @@
    to virtual format.
 
    The register format for RS/6000 floating point registers is always
-   double, we need a conversion if the memory format is float. */
+   double, we need a conversion if the memory format is float.  */
 
 static int
 rs6000_register_convertible (int n)
 {
-  const struct reg *reg = TDEP->regs + n;
+  const struct reg *reg = gdbarch_tdep (current_gdbarch)->regs + n;
   return reg->fpr;
 }
 
 /* Convert data from raw format for register N in buffer FROM
-   to virtual format with type TYPE in buffer TO. */
+   to virtual format with type TYPE in buffer TO.  */
 
 static void
 rs6000_register_convert_to_virtual (int n, struct type *type,
@@ -1676,7 +1863,7 @@
 }
 
 /* Convert data from virtual format with type TYPE in buffer FROM
-   to raw format for register N in buffer TO. */
+   to raw format for register N in buffer TO.  */
 
 static void
 rs6000_register_convert_to_raw (struct type *type, int n,
@@ -1691,185 +1878,70 @@
     memcpy (to, from, REGISTER_RAW_SIZE (n));
 }
 
-int
-altivec_register_p (int regno)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-  if (tdep->ppc_vr0_regnum < 0 || tdep->ppc_vrsave_regnum < 0)
-    return 0;
-  else
-    return (regno >= tdep->ppc_vr0_regnum && regno <= tdep->ppc_vrsave_regnum);
-}
-
 static void
-rs6000_do_altivec_registers (int regnum)
+e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+			   int reg_nr, void *buffer)
 {
-  int i;
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  int base_regnum;
+  int offset = 0;
+  char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
-  for (i = tdep->ppc_vr0_regnum; i <= tdep->ppc_vrsave_regnum; i++)
+  if (reg_nr >= tdep->ppc_gp0_regnum 
+      && reg_nr <= tdep->ppc_gplast_regnum)
     {
-      /* If we want just one reg, check that this is the one we want. */
-      if (regnum != -1 && i != regnum)
-	continue;
+      base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
 
-      /* If the register name is empty, it is undefined for this
-         processor, so don't display anything.  */
-      if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
-        continue;
-
-      fputs_filtered (REGISTER_NAME (i), gdb_stdout);
-      print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), gdb_stdout);
-
-      /* Get the data in raw format.  */
-      if (!frame_register_read (selected_frame, i, raw_buffer))
-        {
-          printf_filtered ("*value not available*\n");
-          continue;
-        }
-
-      /* Convert raw data to virtual format if necessary.  */
-      if (REGISTER_CONVERTIBLE (i))
-	REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
-				     raw_buffer, virtual_buffer);
-      else
-	memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (i));
-
-      /* Print as integer in hex only.  */
-      val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-                 gdb_stdout, 'x', 1, 0, Val_pretty_default);
-      printf_filtered ("\n");
+      /* Build the value in the provided buffer.  */ 
+      /* Read the raw register of which this one is the lower portion.  */
+      regcache_raw_read (regcache, base_regnum, temp_buffer);
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+	offset = 4;
+      memcpy ((char *) buffer, temp_buffer + offset, 4);
     }
 }
 
 static void
-rs6000_altivec_registers_info (char *addr_exp, int from_tty)
+e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+			    int reg_nr, const void *buffer)
 {
-  int regnum, numregs;
-  register char *end;
+  int base_regnum;
+  int offset = 0;
+  char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
-  if (!target_has_registers)
-    error ("The program has no registers now.");
-  if (selected_frame == NULL)
-    error ("No selected frame.");
-
-  if (!addr_exp)
+  if (reg_nr >= tdep->ppc_gp0_regnum 
+      && reg_nr <= tdep->ppc_gplast_regnum)
     {
-      rs6000_do_altivec_registers (-1);
-      return;
+      base_regnum = reg_nr - tdep->ppc_gp0_regnum + tdep->ppc_ev0_regnum;
+      /* reg_nr is 32 bit here, and base_regnum is 64 bits.  */
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+	offset = 4;
+
+      /* Let's read the value of the base register into a temporary
+	 buffer, so that overwriting the last four bytes with the new
+	 value of the pseudo will leave the upper 4 bytes unchanged.  */
+      regcache_raw_read (regcache, base_regnum, temp_buffer);
+
+      /* Write as an 8 byte quantity.  */
+      memcpy (temp_buffer + offset, (char *) buffer, 4);
+      regcache_raw_write (regcache, base_regnum, temp_buffer);
     }
-
-  numregs = NUM_REGS + NUM_PSEUDO_REGS;
-  do
-    {
-      if (addr_exp[0] == '$')
-	addr_exp++;
-      end = addr_exp;
-      while (*end != '\0' && *end != ' ' && *end != '\t')
-	++end;
-
-      regnum = target_map_name_to_register (addr_exp, end - addr_exp);
-      if (regnum < 0)
-        {
-          regnum = numregs;
-          if (*addr_exp >= '0' && *addr_exp <= '9')
-	    regnum = atoi (addr_exp);	/* Take a number */
-          if (regnum >= numregs)	/* Bad name, or bad number */
-	    error ("%.*s: invalid register", end - addr_exp, addr_exp);
-	}
-
-      rs6000_do_altivec_registers (regnum);
-
-      addr_exp = end;
-      while (*addr_exp == ' ' || *addr_exp == '\t')
-	++addr_exp;
-    }
-  while (*addr_exp != '\0');
 }
 
-static void
-rs6000_do_registers_info (int regnum, int fpregs)
+/* Convert a dwarf2 register number to a gdb REGNUM.  */
+static int
+e500_dwarf2_reg_to_regnum (int num)
 {
-  register int i;
-  int numregs = NUM_REGS + NUM_PSEUDO_REGS;
-  char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
-
-  for (i = 0; i < numregs; i++)
-    {
-      /* Decide between printing all regs, nonfloat regs, or specific reg.  */
-      if (regnum == -1)
-        {
-          if ((TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT && !fpregs)
-	      || (altivec_register_p (i) && !fpregs))
-            continue;
-        }
-      else
-        {
-          if (i != regnum)
-            continue;
-        }
-
-      /* If the register name is empty, it is undefined for this
-         processor, so don't display anything.  */
-      if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
-        continue;
-
-      fputs_filtered (REGISTER_NAME (i), gdb_stdout);
-      print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), gdb_stdout);
-
-      /* Get the data in raw format.  */
-      if (!frame_register_read (selected_frame, i, raw_buffer))
-        {
-          printf_filtered ("*value not available*\n");
-          continue;
-        }
-
-      /* Convert raw data to virtual format if necessary.  */
-      if (REGISTER_CONVERTIBLE (i))
-        REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
-				     raw_buffer, virtual_buffer);
-      else
-	memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (i));
-
-      /* If virtual format is floating, print it that way, and in raw hex.  */
-      if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
-        {
-          register int j;
-
-	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-		     gdb_stdout, 0, 1, 0, Val_pretty_default);
-
-          printf_filtered ("\t(raw 0x");
-          for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
-            {
-              register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
-		: REGISTER_RAW_SIZE (i) - 1 - j;
-              printf_filtered ("%02x", (unsigned char) raw_buffer[idx]);
-            }
-          printf_filtered (")");
-        }
-      else
-	{
-	  /* Print the register in hex.  */
-	  val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-		     gdb_stdout, 'x', 1, 0, Val_pretty_default);
-          /* If not a vector register, print it also in decimal.  */
-	  if (!altivec_register_p (i))
-	    {
-	      printf_filtered ("\t");
-	      val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-			 gdb_stdout, 0, 1, 0, Val_pretty_default);
-	    }
-	}
-      printf_filtered ("\n");
-    }
+  int regnum;
+  if (0 <= num && num <= 31)
+    return num + gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum;
+  else 
+    return num;
 }
 
 /* Convert a dbx stab register number (from `r' declaration) to a gdb
-   REGNUM. */
+   REGNUM.  */
 static int
 rs6000_stab_reg_to_regnum (int num)
 {
@@ -1901,7 +1973,7 @@
    In RS/6000, struct return addresses are passed as an extra parameter in r3.
    In function return, callee is not responsible of returning this address
    back.  Since gdb needs to find it, we will store in a designated variable
-   `rs6000_struct_return_address'. */
+   `rs6000_struct_return_address'.  */
 
 static void
 rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
@@ -1912,6 +1984,27 @@
 
 /* Write into appropriate registers a function return value
    of type TYPE, given in virtual format.  */
+static void
+e500_store_return_value (struct type *type, char *valbuf)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  /* Everything is returned in GPR3 and up.  */
+  int copied = 0;
+  int i = 0;
+  int len = TYPE_LENGTH (type);
+  while (copied < len)
+    {
+      int regnum = gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3 + i;
+      int reg_size = REGISTER_RAW_SIZE (regnum);
+      char *reg_val_buf = alloca (reg_size);
+
+      memcpy (reg_val_buf, valbuf + copied, reg_size);
+      copied += reg_size;
+      write_register_gen (regnum, reg_val_buf);
+      i++;
+    }
+}
 
 static void
 rs6000_store_return_value (struct type *type, char *valbuf)
@@ -1922,7 +2015,7 @@
 
     /* Floating point values are returned starting from FPR1 and up.
        Say a double_double_double type could be returned in
-       FPR1/FPR2/FPR3 triple. */
+       FPR1/FPR2/FPR3 triple.  */
 
     write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
 			  TYPE_LENGTH (type));
@@ -1934,7 +2027,7 @@
 			      valbuf, TYPE_LENGTH (type));
     }
   else
-    /* Everything else is returned in GPR3 and up. */
+    /* Everything else is returned in GPR3 and up.  */
     write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
 			  valbuf, TYPE_LENGTH (type));
 }
@@ -1952,7 +2045,7 @@
 /* Return whether PC is in a dummy function call.
 
    FIXME: This just checks for the end of the stack, which is broken
-   for things like stepping through gcc nested function stubs. */
+   for things like stepping through gcc nested function stubs.  */
 
 static int
 rs6000_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
@@ -1960,7 +2053,7 @@
   return sp < pc && pc < fp;
 }
 
-/* Hook called when a new child process is started. */
+/* Hook called when a new child process is started.  */
 
 void
 rs6000_create_inferior (int pid)
@@ -1998,7 +2091,7 @@
     return addr;
 
   /* ADDR is in the data space, so it's a special function pointer. */
-  return read_memory_addr (addr, TDEP->wordsize);
+  return read_memory_addr (addr, gdbarch_tdep (current_gdbarch)->wordsize);
 }
 
 
@@ -2039,41 +2132,44 @@
    would introduce a really large gap between fpscr and the rest of
    the registers for most processors.  */
 
-/* Convenience macros for populating register arrays. */
+/* Convenience macros for populating register arrays.  */
 
-/* Within another macro, convert S to a string. */
+/* Within another macro, convert S to a string.  */
 
 #define STR(s)	#s
 
 /* Return a struct reg defining register NAME that's 32 bits on 32-bit systems
-   and 64 bits on 64-bit systems. */
-#define R(name)		{ STR(name), 4, 8, 0 }
+   and 64 bits on 64-bit systems.  */
+#define R(name)		{ STR(name), 4, 8, 0, 0 }
 
 /* Return a struct reg defining register NAME that's 32 bits on all
-   systems. */
-#define R4(name)	{ STR(name), 4, 4, 0 }
+   systems.  */
+#define R4(name)	{ STR(name), 4, 4, 0, 0 }
 
 /* Return a struct reg defining register NAME that's 64 bits on all
-   systems. */
-#define R8(name)	{ STR(name), 8, 8, 0 }
+   systems.  */
+#define R8(name)	{ STR(name), 8, 8, 0, 0 }
 
 /* Return a struct reg defining register NAME that's 128 bits on all
-   systems. */
-#define R16(name)       { STR(name), 16, 16, 0 }
+   systems.  */
+#define R16(name)       { STR(name), 16, 16, 0, 0 }
 
-/* Return a struct reg defining floating-point register NAME. */
-#define F(name)		{ STR(name), 8, 8, 1 }
+/* Return a struct reg defining floating-point register NAME.  */
+#define F(name)		{ STR(name), 8, 8, 1, 0 }
+
+/* Return a struct reg defining a pseudo register NAME.  */
+#define P(name)		{ STR(name), 4, 8, 0, 1}
 
 /* Return a struct reg defining register NAME that's 32 bits on 32-bit
-   systems and that doesn't exist on 64-bit systems. */
-#define R32(name)	{ STR(name), 4, 0, 0 }
+   systems and that doesn't exist on 64-bit systems.  */
+#define R32(name)	{ STR(name), 4, 0, 0, 0 }
 
 /* Return a struct reg defining register NAME that's 64 bits on 64-bit
-   systems and that doesn't exist on 32-bit systems. */
-#define R64(name)	{ STR(name), 0, 8, 0 }
+   systems and that doesn't exist on 32-bit systems.  */
+#define R64(name)	{ STR(name), 0, 8, 0, 0 }
 
-/* Return a struct reg placeholder for a register that doesn't exist. */
-#define R0		{ 0, 0, 0, 0 }
+/* Return a struct reg placeholder for a register that doesn't exist.  */
+#define R0		{ 0, 0, 0, 0, 0 }
 
 /* UISA registers common across all architectures, including POWER.  */
 
@@ -2103,6 +2199,10 @@
 #define PPC_UISA_SPRS \
   /* 66 */ R4(cr),  R(lr), R(ctr), R4(xer), R4(fpscr)
 
+/* UISA-level SPRs for PowerPC without floating point support.  */
+#define PPC_UISA_NOFP_SPRS \
+  /* 66 */ R4(cr),  R(lr), R(ctr), R4(xer), R0
+
 /* Segment registers, for PowerPC.  */
 #define PPC_SEGMENT_REGS \
   /* 71 */ R32(sr0),  R32(sr1),  R32(sr2),  R32(sr3),  \
@@ -2122,7 +2222,7 @@
   /* 112 */ R(srr0),   R(srr1),   R(tbl),    R(tbu),    \
   /* 116 */ R4(dec),   R(dabr),   R4(ear)
 
-/* AltiVec registers */
+/* AltiVec registers.  */
 #define PPC_ALTIVEC_REGS \
   /*119*/R16(vr0), R16(vr1), R16(vr2), R16(vr3), R16(vr4), R16(vr5), R16(vr6), R16(vr7),  \
   /*127*/R16(vr8), R16(vr9), R16(vr10),R16(vr11),R16(vr12),R16(vr13),R16(vr14),R16(vr15), \
@@ -2130,8 +2230,22 @@
   /*143*/R16(vr24),R16(vr25),R16(vr26),R16(vr27),R16(vr28),R16(vr29),R16(vr30),R16(vr31), \
   /*151*/R4(vscr), R4(vrsave)
 
+/* Vectors of hi-lo general purpose registers.  */
+#define PPC_EV_REGS \
+  /* 0*/R8(ev0), R8(ev1), R8(ev2), R8(ev3), R8(ev4), R8(ev5), R8(ev6), R8(ev7),  \
+  /* 8*/R8(ev8), R8(ev9), R8(ev10),R8(ev11),R8(ev12),R8(ev13),R8(ev14),R8(ev15), \
+  /*16*/R8(ev16),R8(ev17),R8(ev18),R8(ev19),R8(ev20),R8(ev21),R8(ev22),R8(ev23), \
+  /*24*/R8(ev24),R8(ev25),R8(ev26),R8(ev27),R8(ev28),R8(ev29),R8(ev30),R8(ev31)
+
+/* Lower half of the EV registers.  */
+#define PPC_GPRS_PSEUDO_REGS \
+  /*  0 */ P(r0), P(r1), P(r2), P(r3), P(r4), P(r5), P(r6), P(r7),  \
+  /*  8 */ P(r8), P(r9), P(r10),P(r11),P(r12),P(r13),P(r14),P(r15), \
+  /* 16 */ P(r16),P(r17),P(r18),P(r19),P(r20),P(r21),P(r22),P(r23), \
+  /* 24 */ P(r24),P(r25),P(r26),P(r27),P(r28),P(r29),P(r30),P(r31), \
+
 /* IBM POWER (pre-PowerPC) architecture, user-level view.  We only cover
-   user-level SPR's. */
+   user-level SPR's.  */
 static const struct reg registers_power[] =
 {
   COMMON_UISA_REGS,
@@ -2140,7 +2254,7 @@
 };
 
 /* PowerPC UISA - a PPC processor as viewed by user-level code.  A UISA-only
-   view of the PowerPC. */
+   view of the PowerPC.  */
 static const struct reg registers_powerpc[] =
 {
   COMMON_UISA_REGS,
@@ -2156,7 +2270,7 @@
   PPC_UISA_SPRS
 };
 
-/* IBM PowerPC 403. */
+/* IBM PowerPC 403.  */
 static const struct reg registers_403[] =
 {
   COMMON_UISA_REGS,
@@ -2171,7 +2285,7 @@
   /* 139 */ R(pbl1),   R(pbu1), R(pbl2), R(pbu2)
 };
 
-/* IBM PowerPC 403GC. */
+/* IBM PowerPC 403GC.  */
 static const struct reg registers_403GC[] =
 {
   COMMON_UISA_REGS,
@@ -2188,7 +2302,7 @@
   /* 147 */ R(tbhu),   R(tblu)
 };
 
-/* Motorola PowerPC 505. */
+/* Motorola PowerPC 505.  */
 static const struct reg registers_505[] =
 {
   COMMON_UISA_REGS,
@@ -2198,7 +2312,7 @@
   /* 119 */ R(eie), R(eid), R(nri)
 };
 
-/* Motorola PowerPC 860 or 850. */
+/* Motorola PowerPC 860 or 850.  */
 static const struct reg registers_860[] =
 {
   COMMON_UISA_REGS,
@@ -2232,7 +2346,7 @@
   /* 123 */ R(pir), R(mq), R(rtcu), R(rtcl)
 };
 
-/* Motorola PowerPC 602. */
+/* Motorola PowerPC 602.  */
 static const struct reg registers_602[] =
 {
   COMMON_UISA_REGS,
@@ -2244,7 +2358,7 @@
   /* 127 */ R(sebr), R(ser), R(sp), R(lt)
 };
 
-/* Motorola/IBM PowerPC 603 or 603e. */
+/* Motorola/IBM PowerPC 603 or 603e.  */
 static const struct reg registers_603[] =
 {
   COMMON_UISA_REGS,
@@ -2256,7 +2370,7 @@
   /* 127 */ R(hash2), R(imiss), R(icmp), R(rpa)
 };
 
-/* Motorola PowerPC 604 or 604e. */
+/* Motorola PowerPC 604 or 604e.  */
 static const struct reg registers_604[] =
 {
   COMMON_UISA_REGS,
@@ -2268,7 +2382,7 @@
   /* 127 */ R(sia), R(sda)
 };
 
-/* Motorola/IBM PowerPC 750 or 740. */
+/* Motorola/IBM PowerPC 750 or 740.  */
 static const struct reg registers_750[] =
 {
   COMMON_UISA_REGS,
@@ -2284,7 +2398,7 @@
 };
 
 
-/* Motorola PowerPC 7400. */
+/* Motorola PowerPC 7400.  */
 static const struct reg registers_7400[] =
 {
   /* gpr0-gpr31, fpr0-fpr31 */
@@ -2299,6 +2413,18 @@
   /* FIXME? Add more registers? */
 };
 
+/* Motorola e500.  */
+static const struct reg registers_e500[] =
+{
+  R(pc), R(ps),
+  /* cr, lr, ctr, xer, "" */
+  PPC_UISA_NOFP_SPRS,
+  /* 7...38 */
+  PPC_EV_REGS,
+  /* 39...70 */
+  PPC_GPRS_PSEUDO_REGS
+};
+
 /* Information about a particular processor variant.  */
 
 struct variant
@@ -2309,20 +2435,53 @@
     /* English description of the variant.  */
     char *description;
 
-    /* bfd_arch_info.arch corresponding to variant. */
+    /* bfd_arch_info.arch corresponding to variant.  */
     enum bfd_architecture arch;
 
-    /* bfd_arch_info.mach corresponding to variant. */
+    /* bfd_arch_info.mach corresponding to variant.  */
     unsigned long mach;
 
+    /* Number of real registers.  */
+    int nregs;
+
+    /* Number of pseudo registers.  */
+    int npregs;
+
+    /* Number of total registers (the sum of nregs and npregs).  */
+    int num_tot_regs;
+
     /* Table of register names; registers[R] is the name of the register
        number R.  */
-    int nregs;
     const struct reg *regs;
   };
 
-#define num_registers(list) (sizeof (list) / sizeof((list)[0]))
+#define tot_num_registers(list) (sizeof (list) / sizeof((list)[0]))
 
+static int
+num_registers (const struct reg *reg_list, int num_tot_regs)
+{
+  int i;
+  int nregs = 0;
+
+  for (i = 0; i < num_tot_regs; i++)
+    if (!reg_list[i].pseudo)
+      nregs++;
+       
+  return nregs;
+}
+
+static int
+num_pseudo_registers (const struct reg *reg_list, int num_tot_regs)
+{
+  int i;
+  int npregs = 0;
+
+  for (i = 0; i < num_tot_regs; i++)
+    if (reg_list[i].pseudo)
+      npregs ++; 
+
+  return npregs;
+}
 
 /* Information in this table comes from the following web sites:
    IBM:       http://www.chips.ibm.com:80/products/embedded/
@@ -2334,62 +2493,101 @@
    If you add entries to this table, please be sure to allow the new
    value as an argument to the --with-cpu flag, in configure.in.  */
 
-static const struct variant variants[] =
+static struct variant variants[] =
 {
+
   {"powerpc", "PowerPC user-level", bfd_arch_powerpc,
-   bfd_mach_ppc, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"power", "POWER user-level", bfd_arch_rs6000,
-   bfd_mach_rs6k, num_registers (registers_power), registers_power},
+   bfd_mach_rs6k, -1, -1, tot_num_registers (registers_power),
+   registers_power},
   {"403", "IBM PowerPC 403", bfd_arch_powerpc,
-   bfd_mach_ppc_403, num_registers (registers_403), registers_403},
+   bfd_mach_ppc_403, -1, -1, tot_num_registers (registers_403),
+   registers_403},
   {"601", "Motorola PowerPC 601", bfd_arch_powerpc,
-   bfd_mach_ppc_601, num_registers (registers_601), registers_601},
+   bfd_mach_ppc_601, -1, -1, tot_num_registers (registers_601),
+   registers_601},
   {"602", "Motorola PowerPC 602", bfd_arch_powerpc,
-   bfd_mach_ppc_602, num_registers (registers_602), registers_602},
+   bfd_mach_ppc_602, -1, -1, tot_num_registers (registers_602),
+   registers_602},
   {"603", "Motorola/IBM PowerPC 603 or 603e", bfd_arch_powerpc,
-   bfd_mach_ppc_603, num_registers (registers_603), registers_603},
+   bfd_mach_ppc_603, -1, -1, tot_num_registers (registers_603),
+   registers_603},
   {"604", "Motorola PowerPC 604 or 604e", bfd_arch_powerpc,
-   604, num_registers (registers_604), registers_604},
+   604, -1, -1, tot_num_registers (registers_604),
+   registers_604},
   {"403GC", "IBM PowerPC 403GC", bfd_arch_powerpc,
-   bfd_mach_ppc_403gc, num_registers (registers_403GC), registers_403GC},
+   bfd_mach_ppc_403gc, -1, -1, tot_num_registers (registers_403GC),
+   registers_403GC},
   {"505", "Motorola PowerPC 505", bfd_arch_powerpc,
-   bfd_mach_ppc_505, num_registers (registers_505), registers_505},
+   bfd_mach_ppc_505, -1, -1, tot_num_registers (registers_505),
+   registers_505},
   {"860", "Motorola PowerPC 860 or 850", bfd_arch_powerpc,
-   bfd_mach_ppc_860, num_registers (registers_860), registers_860},
+   bfd_mach_ppc_860, -1, -1, tot_num_registers (registers_860),
+   registers_860},
   {"750", "Motorola/IBM PowerPC 750 or 740", bfd_arch_powerpc,
-   bfd_mach_ppc_750, num_registers (registers_750), registers_750},
+   bfd_mach_ppc_750, -1, -1, tot_num_registers (registers_750),
+   registers_750},
   {"7400", "Motorola/IBM PowerPC 7400 (G4)", bfd_arch_powerpc,
-   bfd_mach_ppc_7400, num_registers (registers_7400), registers_7400},
+   bfd_mach_ppc_7400, -1, -1, tot_num_registers (registers_7400),
+   registers_7400},
+  {"e500", "Motorola PowerPC e500", bfd_arch_powerpc,
+   bfd_mach_ppc_e500, -1, -1, tot_num_registers (registers_e500),
+   registers_e500},
 
   /* 64-bit */
   {"powerpc64", "PowerPC 64-bit user-level", bfd_arch_powerpc,
-   bfd_mach_ppc64, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc64, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"620", "Motorola PowerPC 620", bfd_arch_powerpc,
-   bfd_mach_ppc_620, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc_620, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"630", "Motorola PowerPC 630", bfd_arch_powerpc,
-   bfd_mach_ppc_630, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc_630, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"a35", "PowerPC A35", bfd_arch_powerpc,
-   bfd_mach_ppc_a35, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc_a35, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"rs64ii", "PowerPC rs64ii", bfd_arch_powerpc,
-   bfd_mach_ppc_rs64ii, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc_rs64ii, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
   {"rs64iii", "PowerPC rs64iii", bfd_arch_powerpc,
-   bfd_mach_ppc_rs64iii, num_registers (registers_powerpc), registers_powerpc},
+   bfd_mach_ppc_rs64iii, -1, -1, tot_num_registers (registers_powerpc),
+   registers_powerpc},
 
-  /* FIXME: I haven't checked the register sets of the following. */
+  /* FIXME: I haven't checked the register sets of the following.  */
   {"rs1", "IBM POWER RS1", bfd_arch_rs6000,
-   bfd_mach_rs6k_rs1, num_registers (registers_power), registers_power},
+   bfd_mach_rs6k_rs1, -1, -1, tot_num_registers (registers_power),
+   registers_power},
   {"rsc", "IBM POWER RSC", bfd_arch_rs6000,
-   bfd_mach_rs6k_rsc, num_registers (registers_power), registers_power},
+   bfd_mach_rs6k_rsc, -1, -1, tot_num_registers (registers_power),
+   registers_power},
   {"rs2", "IBM POWER RS2", bfd_arch_rs6000,
-   bfd_mach_rs6k_rs2, num_registers (registers_power), registers_power},
+   bfd_mach_rs6k_rs2, -1, -1, tot_num_registers (registers_power),
+   registers_power},
 
-  {0, 0, 0, 0}
+  {0, 0, 0, 0, 0, 0, 0, 0}
 };
 
-#undef num_registers
+/* Initialize the number of registers and pseudo registers in each variant.  */
+
+static void
+init_variants (void)
+{
+  struct variant *v;
+
+  for (v = variants; v->name; v++)
+    {
+      if (v->nregs == -1)
+        v->nregs = num_registers (v->regs, v->num_tot_regs);
+      if (v->npregs == -1)
+        v->npregs = num_pseudo_registers (v->regs, v->num_tot_regs);
+    }  
+}
 
 /* Return the variant corresponding to architecture ARCH and machine number
-   MACH.  If no such variant exists, return null. */
+   MACH.  If no such variant exists, return null.  */
 
 static const struct variant *
 find_variant_by_arch (enum bfd_architecture arch, unsigned long mach)
@@ -2403,93 +2601,21 @@
   return NULL;
 }
 
-
-
-
-static void
-process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
-{
-  int *os_ident_ptr = obj;
-  const char *name;
-  unsigned int sectsize;
-
-  name = bfd_get_section_name (abfd, sect);
-  sectsize = bfd_section_size (abfd, sect);
-  if (strcmp (name, ".note.ABI-tag") == 0 && sectsize > 0)
-    {
-      unsigned int name_length, data_length, note_type;
-      char *note = alloca (sectsize);
-
-      bfd_get_section_contents (abfd, sect, note,
-                                (file_ptr) 0, (bfd_size_type) sectsize);
-
-      name_length = bfd_h_get_32 (abfd, note);
-      data_length = bfd_h_get_32 (abfd, note + 4);
-      note_type   = bfd_h_get_32 (abfd, note + 8);
-
-      if (name_length == 4 && data_length == 16 && note_type == 1
-          && strcmp (note + 12, "GNU") == 0)
-	{
-	  int os_number = bfd_h_get_32 (abfd, note + 16);
-
-	  /* The case numbers are from abi-tags in glibc */
-	  switch (os_number)
-	    {
-	    case 0 :
-	      *os_ident_ptr = ELFOSABI_LINUX;
-	      break;
-	    case 1 :
-	      *os_ident_ptr = ELFOSABI_HURD;
-	      break;
-	    case 2 :
-	      *os_ident_ptr = ELFOSABI_SOLARIS;
-	      break;
-	    default :
-	      internal_error (__FILE__, __LINE__,
-			      "process_note_abi_sections: unknown OS number %d",
-			      os_number);
-	      break;
-	    }
-	}
-    }
-}
-
-/* Return one of the ELFOSABI_ constants for BFDs representing ELF
-   executables.  If it's not an ELF executable or if the OS/ABI couldn't
-   be determined, simply return -1. */
-
 static int
-get_elfosabi (bfd *abfd)
+gdb_print_insn_powerpc (bfd_vma memaddr, disassemble_info *info)
 {
-  int elfosabi = -1;
-
-  if (abfd != NULL && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
-    {
-      elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
-
-      /* When elfosabi is 0 (ELFOSABI_NONE), this is supposed to indicate
-         that we're on a SYSV system.  However, GNU/Linux uses a note section
-	 to record OS/ABI info, but leaves e_ident[EI_OSABI] zero.  So we
-	 have to check the note sections too. */
-      if (elfosabi == 0)
-	{
-	  bfd_map_over_sections (abfd,
-	                         process_note_abi_tag_sections,
-				 &elfosabi);
-	}
-    }
-
-  return elfosabi;
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+    return print_insn_big_powerpc (memaddr, info);
+  else
+    return print_insn_little_powerpc (memaddr, info);
 }
-
 
-
 /* Initialize the current architecture based on INFO.  If possible, re-use an
    architecture from ARCHES, which is a list of architectures already created
    during this debugging session.
 
    Called e.g. at program startup, when reading a core file, and when reading
-   a binary file. */
+   a binary file.  */
 
 static struct gdbarch *
 rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
@@ -2502,8 +2628,9 @@
   enum bfd_architecture arch;
   unsigned long mach;
   bfd abfd;
-  int osabi, sysv_abi;
-  gdbarch_print_insn_ftype *print_insn;
+  int sysv_abi;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
+  asection *sect;
 
   from_xcoff_exec = info.abfd && info.abfd->format == bfd_object &&
     bfd_get_flavour (info.abfd) == bfd_target_xcoff_flavour;
@@ -2513,10 +2640,11 @@
 
   sysv_abi = info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour;
 
-  osabi = get_elfosabi (info.abfd);
+  if (info.abfd)
+    osabi = gdbarch_lookup_osabi (info.abfd);
 
   /* Check word size.  If INFO is from a binary file, infer it from
-     that, else choose a likely default. */
+     that, else choose a likely default.  */
   if (from_xcoff_exec)
     {
       if (bfd_xcoff_is_xcoff64 (info.abfd))
@@ -2540,14 +2668,14 @@
 	wordsize = 4;
     }
 
-  /* Find a candidate among extant architectures. */
+  /* Find a candidate among extant architectures.  */
   for (arches = gdbarch_list_lookup_by_info (arches, &info);
        arches != NULL;
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
     {
       /* Word size in the various PowerPC bfd_arch_info structs isn't
          meaningful, because 64-bit CPUs can run in 32-bit mode.  So, perform
-         separate word size check. */
+         separate word size check.  */
       tdep = gdbarch_tdep (arches->gdbarch);
       if (tdep && tdep->wordsize == wordsize && tdep->osabi == osabi)
 	return arches->gdbarch;
@@ -2576,10 +2704,34 @@
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   tdep->wordsize = wordsize;
   tdep->osabi = osabi;
+
+  /* For e500 executables, the apuinfo section is of help here.  Such
+     section contains the identifier and revision number of each
+     Application-specific Processing Unit that is present on the
+     chip.  The content of the section is determined by the assembler
+     which looks at each instruction and determines which unit (and
+     which version of it) can execute it. In our case we just look for
+     the existance of the section.  */
+
+  if (info.abfd)
+    {
+      sect = bfd_get_section_by_name (info.abfd, ".PPC.EMB.apuinfo");
+      if (sect)
+	{
+	  arch = info.bfd_arch_info->arch;
+	  mach = bfd_mach_ppc_e500;
+	  bfd_default_set_arch_mach (&abfd, arch, mach);
+	  info.bfd_arch_info = bfd_get_arch_info (&abfd);
+	}
+    }
+
   gdbarch = gdbarch_alloc (&info, tdep);
   power = arch == bfd_arch_rs6000;
 
-  /* Choose variant. */
+  /* Initialize the number of real and pseudo registers in each variant.  */
+  init_variants ();
+
+  /* Choose variant.  */
   v = find_variant_by_arch (arch, mach);
   if (!v)
     return NULL;
@@ -2602,20 +2754,53 @@
     tdep->ppc_mq_regnum = -1;
   tdep->ppc_fpscr_regnum = power ? 71 : 70;
 
+  set_gdbarch_pc_regnum (gdbarch, 64);
+  set_gdbarch_sp_regnum (gdbarch, 1);
+  set_gdbarch_fp_regnum (gdbarch, 1);
+  set_gdbarch_deprecated_extract_return_value (gdbarch,
+					       rs6000_extract_return_value);
+  set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
+
   if (v->arch == bfd_arch_powerpc)
     switch (v->mach)
       {
       case bfd_mach_ppc: 
 	tdep->ppc_vr0_regnum = 71;
 	tdep->ppc_vrsave_regnum = 104;
+	tdep->ppc_ev0_regnum = -1;
+	tdep->ppc_ev31_regnum = -1;
 	break;
       case bfd_mach_ppc_7400:
 	tdep->ppc_vr0_regnum = 119;
 	tdep->ppc_vrsave_regnum = 153;
+	tdep->ppc_ev0_regnum = -1;
+	tdep->ppc_ev31_regnum = -1;
+	break;
+      case bfd_mach_ppc_e500:
+        tdep->ppc_gp0_regnum = 39;
+        tdep->ppc_gplast_regnum = 70;
+        tdep->ppc_toc_regnum = -1;
+        tdep->ppc_ps_regnum = 1;
+        tdep->ppc_cr_regnum = 2;
+        tdep->ppc_lr_regnum = 3;
+        tdep->ppc_ctr_regnum = 4;
+        tdep->ppc_xer_regnum = 5;
+	tdep->ppc_ev0_regnum = 7;
+	tdep->ppc_ev31_regnum = 38;
+        set_gdbarch_pc_regnum (gdbarch, 0);
+        set_gdbarch_sp_regnum (gdbarch, 40);
+        set_gdbarch_fp_regnum (gdbarch, 40);
+        set_gdbarch_dwarf2_reg_to_regnum (gdbarch, e500_dwarf2_reg_to_regnum);
+        set_gdbarch_pseudo_register_read (gdbarch, e500_pseudo_register_read);
+        set_gdbarch_pseudo_register_write (gdbarch, e500_pseudo_register_write);
+        set_gdbarch_extract_return_value (gdbarch, e500_extract_return_value);
+        set_gdbarch_store_return_value (gdbarch, e500_store_return_value);
 	break;
       default:
 	tdep->ppc_vr0_regnum = -1;
 	tdep->ppc_vrsave_regnum = -1;
+	tdep->ppc_ev0_regnum = -1;
+	tdep->ppc_ev31_regnum = -1;
 	break;
       }   
 
@@ -2628,8 +2813,8 @@
     tdep->lr_frame_offset = 8;
 
   /* Calculate byte offsets in raw register array.  */
-  tdep->regoff = xmalloc (v->nregs * sizeof (int));
-  for (i = off = 0; i < v->nregs; i++)
+  tdep->regoff = xmalloc (v->num_tot_regs * sizeof (int));
+  for (i = off = 0; i < v->num_tot_regs; i++)
     {
       tdep->regoff[i] = off;
       off += regsize (v->regs + i, wordsize);
@@ -2637,12 +2822,9 @@
 
   /* Select instruction printer.  */
   if (arch == power)
-    print_insn = print_insn_rs6000;
-  else if (info.byte_order == BFD_ENDIAN_BIG)
-    print_insn = print_insn_big_powerpc;
+    set_gdbarch_print_insn (gdbarch, print_insn_rs6000);
   else
-    print_insn = print_insn_little_powerpc;
-  set_gdbarch_print_insn (gdbarch, print_insn);
+    set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc);
 
   set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
@@ -2651,9 +2833,7 @@
   set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
 
   set_gdbarch_num_regs (gdbarch, v->nregs);
-  set_gdbarch_sp_regnum (gdbarch, 1);
-  set_gdbarch_fp_regnum (gdbarch, 1);
-  set_gdbarch_pc_regnum (gdbarch, 64);
+  set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
   set_gdbarch_register_name (gdbarch, rs6000_register_name);
   set_gdbarch_register_size (gdbarch, wordsize);
   set_gdbarch_register_bytes (gdbarch, off);
@@ -2663,7 +2843,6 @@
   set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
   set_gdbarch_max_register_virtual_size (gdbarch, 16);
   set_gdbarch_register_virtual_type (gdbarch, rs6000_register_virtual_type);
-  set_gdbarch_do_registers_info (gdbarch, rs6000_do_registers_info);
 
   set_gdbarch_ptr_bit (gdbarch, wordsize * TARGET_CHAR_BIT);
   set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -2685,7 +2864,7 @@
   set_gdbarch_pc_in_call_dummy (gdbarch, generic_pc_in_call_dummy);
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
@@ -2697,9 +2876,6 @@
   set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
   set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
   set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
-
-  set_gdbarch_extract_return_value (gdbarch, rs6000_extract_return_value);
-  
   /* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
      is correct for the SysV ABI when the wordsize is 8, but I'm also
      fairly certain that ppc_sysv_abi_push_arguments() will give even
@@ -2712,9 +2888,8 @@
   else
     set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
 
-  set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
   set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
 
   set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
@@ -2726,57 +2901,23 @@
   /* Not sure on this. FIXMEmgo */
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
-  /* Until November 2001, gcc was not complying to the SYSV ABI for
-     returning structures less than or equal to 8 bytes in size. It was
-     returning everything in memory. When this was corrected, it wasn't
-     fixed for native platforms. */
   if (sysv_abi)
-    {
-      if (osabi == ELFOSABI_LINUX
-          || osabi == ELFOSABI_NETBSD
-          || osabi == ELFOSABI_FREEBSD)
-	set_gdbarch_use_struct_convention (gdbarch,
-					   ppc_sysv_abi_broken_use_struct_convention);
-      else
-	set_gdbarch_use_struct_convention (gdbarch,
-					   ppc_sysv_abi_use_struct_convention);
-    }
+    set_gdbarch_use_struct_convention (gdbarch,
+    				       ppc_sysv_abi_use_struct_convention);
   else
-    {
-      set_gdbarch_use_struct_convention (gdbarch,
-					 generic_use_struct_convention);
-    }
+    set_gdbarch_use_struct_convention (gdbarch,
+				       generic_use_struct_convention);
 
   set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
-  /* Note: kevinb/2002-04-12: See note above regarding *_push_arguments().
-     The same remarks hold for the methods below.  */
-  if (osabi == ELFOSABI_LINUX && wordsize == 4)
-    {
-      set_gdbarch_frameless_function_invocation (gdbarch,
-	ppc_linux_frameless_function_invocation);
-      set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
-      set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
 
-      set_gdbarch_frame_init_saved_regs (gdbarch,
-	                                 ppc_linux_frame_init_saved_regs);
-      set_gdbarch_init_extra_frame_info (gdbarch,
-	                                 ppc_linux_init_extra_frame_info);
+  set_gdbarch_frameless_function_invocation (gdbarch,
+                                         rs6000_frameless_function_invocation);
+  set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
+  set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
 
-      set_gdbarch_memory_remove_breakpoint (gdbarch,
-	                                    ppc_linux_memory_remove_breakpoint);
-      set_solib_svr4_fetch_link_map_offsets 
-	(gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
-    }
-  else
-    {
-      set_gdbarch_frameless_function_invocation (gdbarch,
-	rs6000_frameless_function_invocation);
-      set_gdbarch_frame_chain (gdbarch, rs6000_frame_chain);
-      set_gdbarch_frame_saved_pc (gdbarch, rs6000_frame_saved_pc);
+  set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
+  set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
 
-      set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
-      set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
-    }
   if (!sysv_abi)
     {
       /* Handle RS/6000 function pointers (which are really function
@@ -2792,9 +2933,24 @@
      now that the C compiler delays popping them.  */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 
+  /* Hook in ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch, osabi);
+
   return gdbarch;
 }
 
+static void
+rs6000_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (tdep == NULL)
+    return;
+
+  fprintf_unfiltered (file, "rs6000_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+}
+
 static struct cmd_list_element *info_powerpc_cmdlist = NULL;
 
 static void
@@ -2808,16 +2964,11 @@
 void
 _initialize_rs6000_tdep (void)
 {
-  register_gdbarch_init (bfd_arch_rs6000, rs6000_gdbarch_init);
-  register_gdbarch_init (bfd_arch_powerpc, rs6000_gdbarch_init);
+  gdbarch_register (bfd_arch_rs6000, rs6000_gdbarch_init, rs6000_dump_tdep);
+  gdbarch_register (bfd_arch_powerpc, rs6000_gdbarch_init, rs6000_dump_tdep);
 
   /* Add root prefix command for "info powerpc" commands */
   add_prefix_cmd ("powerpc", class_info, rs6000_info_powerpc_command,
 		  "Various POWERPC info specific commands.",
 		  &info_powerpc_cmdlist, "info powerpc ", 0, &infolist);
-
-  add_cmd ("altivec", class_info, rs6000_altivec_registers_info,
-	   "Display the contents of the AltiVec registers.",
-	   &info_powerpc_cmdlist);
-
 }
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 19e8923..b7f5918 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -273,14 +273,22 @@
 void
 fill_gregset (gregset_t * gregsetp, int regno)
 {
+  int regi;
   greg_t *gregp = (greg_t *) gregsetp;
 
-  if (regno >= S390_FIRST_CR && regno <= S390_LAST_CR)
-    supply_register (regno, NULL);
-  else if (regno != -1)
-    supply_register (regno, (char *) &gregp[regno]);
-  else
-    supply_gregset (gregsetp);
+  if (regno < 0) 
+    {
+      regcache_collect (S390_PSWM_REGNUM, &gregp[S390_PSWM_REGNUM]);
+      regcache_collect (S390_PC_REGNUM, &gregp[S390_PC_REGNUM]);
+      for (regi = 0; regi < S390_NUM_GPRS; regi++)
+        regcache_collect (S390_GP0_REGNUM + regi,
+			  &gregp[S390_GP0_REGNUM + regi]);
+      for (regi = 0; regi < S390_NUM_ACRS; regi++)
+        regcache_collect (S390_FIRST_ACR + regi,
+			  &gregp[S390_FIRST_ACR + regi]);
+    }
+  else if (regno >= S390_PSWM_REGNUM && regno <= S390_LAST_ACR)
+    regcache_collect (regno, &gregp[regno]);
 }
 
 /*  Given a pointer to a floating point register set in /proc format
@@ -291,12 +299,18 @@
 void
 fill_fpregset (fpregset_t * fpregsetp, int regno)
 {
-  if (regno == -1)
-    supply_fpregset (fpregsetp);
-  else
-    supply_register (regno,
-		     &((char *) fpregsetp)[REGISTER_BYTE (regno) -
-					   REGISTER_BYTE (S390_FPC_REGNUM)]);
+  int regi;
+
+  if (regno < 0) 
+    {
+      regcache_collect (S390_FPC_REGNUM, &fpregsetp->fpc);
+      for (regi = 0; regi < S390_NUM_FPRS; regi++)
+        regcache_collect (S390_FP0_REGNUM + regi, &fpregsetp->fprs[regi]);
+    }
+  else if (regno == S390_FPC_REGNUM)
+    regcache_collect (S390_FPC_REGNUM, &fpregsetp->fpc);
+  else if (regno >= S390_FP0_REGNUM && regno <= S390_FPLAST_REGNUM)
+    regcache_collect (regno, &fpregsetp->fprs[regno - S390_FP0_REGNUM]);
 }
 
 
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c69aca6..49a15a2 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -150,7 +150,7 @@
 
 
 
-char *
+const char *
 s390_register_name (int reg_nr)
 {
   static char *register_names[] = {
@@ -955,7 +955,7 @@
   if (fi->extra_info && fi->extra_info->saved_pc_valid)
     return fi->extra_info->saved_pc;
 
-  if (generic_find_dummy_frame (fi->pc, fi->frame))
+  if (deprecated_generic_find_dummy_frame (fi->pc, fi->frame))
     return generic_read_register_dummy (fi->pc, fi->frame, S390_PC_REGNUM);
 
   s390_frame_init_saved_regs (fi);
@@ -1009,7 +1009,7 @@
 {
   CORE_ADDR prev_fp = 0;
 
-  if (generic_find_dummy_frame (thisframe->pc, thisframe->frame))
+  if (deprecated_generic_find_dummy_frame (thisframe->pc, thisframe->frame))
     return generic_read_register_dummy (thisframe->pc, thisframe->frame,
                                         S390_SP_REGNUM);
   else
@@ -1189,7 +1189,7 @@
 
 /* Not the most efficent code in the world */
 int
-s390_fp_regnum ()
+s390_fp_regnum (void)
 {
   int regno = S390_SP_REGNUM;
   struct frame_extra_info fextra_info;
@@ -1204,7 +1204,7 @@
 }
 
 CORE_ADDR
-s390_read_fp ()
+s390_read_fp (void)
 {
   return read_register (s390_fp_regnum ());
 }
@@ -1246,7 +1246,7 @@
    Used in the contexts of the "return" command, and of 
    target function calls from the debugger.  */
 void
-s390_pop_frame ()
+s390_pop_frame (void)
 {
   /* This function checks for and handles generic dummy frames, and
      calls back to our function for ordinary frames.  */
@@ -1773,8 +1773,8 @@
   /* We can't do this */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
   set_gdbarch_store_struct_return (gdbarch, s390_store_struct_return);
-  set_gdbarch_extract_return_value (gdbarch, s390_extract_return_value);
-  set_gdbarch_store_return_value (gdbarch, s390_store_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value);
   /* Amount PC must be decremented by after a breakpoint.
      This is often the number of bytes in BREAKPOINT
      but not always.  */
@@ -1811,14 +1811,14 @@
   set_gdbarch_num_regs (gdbarch, S390_NUM_REGS);
   set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register);
   set_gdbarch_cannot_store_register (gdbarch, s390_cannot_fetch_register);
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_use_struct_convention (gdbarch, s390_use_struct_convention);
   set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
   set_gdbarch_register_name (gdbarch, s390_register_name);
   set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
   set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
   set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
-  set_gdbarch_extract_struct_value_address
+  set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, generic_cannot_extract_struct_value_address);
 
   /* Parameters for inferior function calls.  */
@@ -1874,7 +1874,7 @@
 
 
 void
-_initialize_s390_tdep ()
+_initialize_s390_tdep (void)
 {
 
   /* Hook us into the gdbarch mechanism.  */
diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c
index 49b2c89..063cca1 100644
--- a/gdb/ser-e7kpc.c
+++ b/gdb/ser-e7kpc.c
@@ -423,16 +423,12 @@
   e7000pc_noop,			/* wait for output to drain */
 };
 
+#endif /*_WIN32 or __GO32__*/
+
 void
 _initialize_ser_e7000pc (void)
 {
+#if defined __GO32__ || defined _WIN32
   serial_add_interface (&e7000pc_ops);
+#endif  
 }
-#else
-
-void
-_initialize_ser_e7000pc (void)
-{
-
-}
-#endif
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 924b675..b133b03 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -26,7 +26,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "symfile.h"
 #include "gdbtypes.h"
@@ -68,7 +67,7 @@
   int f_offset;
 };
 
-static char *
+static const char *
 sh_generic_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -90,7 +89,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -112,7 +111,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh3_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -134,7 +133,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh3e_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -156,7 +155,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh_dsp_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -178,7 +177,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh3_dsp_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -201,7 +200,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh4_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -236,7 +235,7 @@
   return register_names[reg_nr];
 }
 
-static char *
+static const char *
 sh_sh64_register_name (int reg_nr)
 {
   static char *register_names[] =
@@ -1046,7 +1045,7 @@
   int opc;
   int insn;
   int r3_val = 0;
-  char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   
   if (fi->saved_regs == NULL)
     frame_saved_regs_zalloc (fi);
@@ -1385,7 +1384,7 @@
   int insn_size;
   int gdb_register_number;
   int register_number;
-  char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
   
   if (fi->saved_regs == NULL)
@@ -1586,7 +1585,7 @@
   int opc;
   int insn;
   int r3_val = 0;
-  char *dummy_regs = generic_find_dummy_frame (fi->pc, fi->frame);
+  char *dummy_regs = deprecated_generic_find_dummy_frame (fi->pc, fi->frame);
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
   
   if (fi->saved_regs == NULL)
@@ -1814,8 +1813,8 @@
 	    *lval = not_lval;
 	  if (raw_buffer)
 	    memcpy (raw_buffer,
-		    generic_find_dummy_frame (frame->pc, frame->frame) +
-		    REGISTER_BYTE (regnum),
+		    (deprecated_generic_find_dummy_frame (frame->pc, frame->frame)
+		     + REGISTER_BYTE (regnum)),
 		    REGISTER_RAW_SIZE (regnum));
 	  return;
 	}
@@ -2251,11 +2250,12 @@
 		      }
 #endif
 		    /* Note: must use write_register_gen here instead
-		       of regcache_write, because regcache_write works
-		       only for real registers, not pseudo.
-		       write_register_gen will call the gdbarch
-		       function to do register writes, and that will
-		       properly know how to deal with pseudoregs. */
+		       of regcache_raw_write, because
+		       regcache_raw_write works only for real
+		       registers, not pseudo.  write_register_gen will
+		       call the gdbarch function to do register
+		       writes, and that will properly know how to deal
+		       with pseudoregs. */
 		    write_register_gen (regnum, val);
 		    fp_args[double_arg_index] = 1;
 		    fp_args[double_arg_index + 1] = 1;
@@ -3331,7 +3331,7 @@
 
 static void
 sh_sh4_register_convert_to_raw (struct type *type, int regnum,
-				char *from, char *to)
+				const void *from, void *to)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
 
@@ -3347,7 +3347,7 @@
 
 void
 sh_sh64_register_convert_to_raw (struct type *type, int regnum,
-                              char *from, char *to)
+				 const void *from, void *to)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
 
@@ -3371,11 +3371,12 @@
 }
 
 void
-sh_pseudo_register_read (int reg_nr, char *buffer)
+sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+			 int reg_nr, void *buffer)
 {
   int base_regnum, portion;
   char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   if (reg_nr >= tdep->DR0_REGNUM 
       && reg_nr <= tdep->DR_LAST_REGNUM)
@@ -3385,9 +3386,9 @@
       /* Build the value in the provided buffer. */ 
       /* Read the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
-	regcache_read (base_regnum + portion, 
-		       temp_buffer
-		       + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   (temp_buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
       /* We must pay attention to the endiannes. */
       sh_sh4_register_convert_to_virtual (reg_nr,
 					  REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3400,30 +3401,21 @@
 
       /* Read the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
-	regcache_read (base_regnum + portion, 
-		       buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   ((char *) buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 }
 
 static void
-sh4_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
-  if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
-    /* It is a regular register. */
-    regcache_read (reg_nr, buffer);
-  else
-    /* It is a pseudo register and we need to construct its value */
-    sh_pseudo_register_read (reg_nr, buffer);
-}
-
-static void
-sh64_pseudo_register_read (int reg_nr, char *buffer)
+sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+			   int reg_nr, void *buffer)
 {
   int base_regnum;
   int portion;
   int offset = 0;
   char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   if (reg_nr >= tdep->DR0_REGNUM 
       && reg_nr <= tdep->DR_LAST_REGNUM)
@@ -3434,9 +3426,9 @@
       /* DR regs are double precision registers obtained by
 	 concatenating 2 single precision floating point registers. */
       for (portion = 0; portion < 2; portion++)
-	regcache_read (base_regnum + portion, 
-				 temp_buffer
-				 + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   (temp_buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
 
       /* We must pay attention to the endiannes. */
       sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3453,8 +3445,9 @@
       /* FPP regs are pairs of single precision registers obtained by
 	 concatenating 2 single precision floating point registers. */
       for (portion = 0; portion < 2; portion++)
-	regcache_read (base_regnum + portion, 
-				 buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   ((char *) buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   else if (reg_nr >= tdep->FV0_REGNUM 
@@ -3466,8 +3459,9 @@
       /* FV regs are vectors of single precision registers obtained by
 	 concatenating 4 single precision floating point registers. */
       for (portion = 0; portion < 4; portion++)
-	regcache_read (base_regnum + portion, 
-				 buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   ((char *) buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   /* sh compact pseudo registers. 1-to-1 with a shmedia register */
@@ -3477,7 +3471,7 @@
       base_regnum = sh64_compact_reg_base_num (reg_nr);
 
       /* Build the value in the provided buffer. */ 
-      regcache_read (base_regnum, temp_buffer);
+      regcache_raw_read (regcache, base_regnum, temp_buffer);
       if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
 	offset = 4;
       memcpy (buffer, temp_buffer + offset, 4); /* get LOWER 32 bits only????*/
@@ -3491,7 +3485,7 @@
       /* Build the value in the provided buffer. */ 
       /* Floating point registers map 1-1 to the media fp regs,
 	 they have the same size and endienness. */
-      regcache_read (base_regnum, buffer);
+      regcache_raw_read (regcache, base_regnum, buffer);
     }
 
   else if (reg_nr >= tdep->DR0_C_REGNUM 
@@ -3502,9 +3496,9 @@
       /* DR_C regs are double precision registers obtained by
 	 concatenating 2 single precision floating point registers. */
       for (portion = 0; portion < 2; portion++)
-	regcache_read (base_regnum + portion, 
-				 temp_buffer
-				 + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   (temp_buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
 
       /* We must pay attention to the endiannes. */
       sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
@@ -3520,8 +3514,9 @@
       /* FV_C regs are vectors of single precision registers obtained by
 	 concatenating 4 single precision floating point registers. */
       for (portion = 0; portion < 4; portion++)
-	regcache_read (base_regnum + portion, 
-				 buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_read (regcache, base_regnum + portion, 
+			   ((char *) buffer
+			    + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   else if (reg_nr == tdep->FPSCR_C_REGNUM)
@@ -3552,11 +3547,11 @@
        */
       /* *INDENT-ON* */
       /* Get FPSCR into a local buffer */
-      regcache_read (fpscr_base_regnum, temp_buffer);
+      regcache_raw_read (regcache, fpscr_base_regnum, temp_buffer);
       /* Get value as an int. */
       fpscr_value = extract_unsigned_integer (temp_buffer, 4);
       /* Get SR into a local buffer */
-      regcache_read (sr_base_regnum, temp_buffer);
+      regcache_raw_read (regcache, sr_base_regnum, temp_buffer);
       /* Get value as an int. */
       sr_value = extract_unsigned_integer (temp_buffer, 4);
       /* Build the new value. */
@@ -3574,28 +3569,17 @@
 
       /* FPUL_C register is floating point register 32,
 	 same size, same endianness. */
-      regcache_read (base_regnum, buffer);
+      regcache_raw_read (regcache, base_regnum, buffer);
     }
 }
 
-static void
-sh64_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
-
-  if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
-    /* It is a regular register. */
-    regcache_read (reg_nr, buffer);
-  else
-    /* It is a pseudo register and we need to construct its value */
-    sh64_pseudo_register_read (reg_nr, buffer);
-}
-
 void
-sh_pseudo_register_write (int reg_nr, char *buffer)
+sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+			  int reg_nr, const void *buffer)
 {
   int base_regnum, portion;
   char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   if (reg_nr >= tdep->DR0_REGNUM
       && reg_nr <= tdep->DR_LAST_REGNUM)
@@ -3608,8 +3592,9 @@
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
-	regcache_write (base_regnum + portion, 
-			temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_write (regcache, base_regnum + portion, 
+			    (temp_buffer
+			     + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
   else if (reg_nr >= tdep->FV0_REGNUM
 	   && reg_nr <= tdep->FV_LAST_REGNUM)
@@ -3618,29 +3603,20 @@
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
-	regcache_write (base_regnum + portion,
-			buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_write (regcache, base_regnum + portion,
+			    ((char *) buffer
+			     + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 }
 
-static void
-sh4_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
-  if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
-    /* It is a regular register. */
-    regcache_write (reg_nr, buffer);
-  else
-    /* It is a pseudo register and we need to construct its value */
-    sh_pseudo_register_write (reg_nr, buffer);
-}
-
 void
-sh64_pseudo_register_write (int reg_nr, char *buffer)
+sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+			    int reg_nr, const void *buffer)
 {
   int base_regnum, portion;
   int offset;
   char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
   if (reg_nr >= tdep->DR0_REGNUM
       && reg_nr <= tdep->DR_LAST_REGNUM)
@@ -3653,8 +3629,9 @@
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
-	regcache_write (base_regnum + portion, 
-			temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_write (regcache, base_regnum + portion, 
+			    (temp_buffer
+			     + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   else if (reg_nr >= tdep->FPP0_REGNUM 
@@ -3664,8 +3641,9 @@
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
-	regcache_write (base_regnum + portion,
-			buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_write (regcache, base_regnum + portion,
+			    ((char *) buffer
+			     + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   else if (reg_nr >= tdep->FV0_REGNUM
@@ -3675,8 +3653,9 @@
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
-	regcache_write (base_regnum + portion,
-			buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	regcache_raw_write (regcache, base_regnum + portion,
+			    ((char *) buffer
+			     + REGISTER_RAW_SIZE (base_regnum) * portion));
     }
 
   /* sh compact general pseudo registers. 1-to-1 with a shmedia
@@ -3693,10 +3672,10 @@
       /* Let's read the value of the base register into a temporary
 	 buffer, so that overwriting the last four bytes with the new
 	 value of the pseudo will leave the upper 4 bytes unchanged. */
-      regcache_read (base_regnum, temp_buffer);
+      regcache_raw_read (regcache, base_regnum, temp_buffer);
       /* Write as an 8 byte quantity */
       memcpy (temp_buffer + offset, buffer, 4);
-      regcache_write (base_regnum, temp_buffer);
+      regcache_raw_write (regcache, base_regnum, temp_buffer);
     }
 
   /* sh floating point compact pseudo registers. 1-to-1 with a shmedia
@@ -3705,7 +3684,7 @@
 	       && reg_nr <= tdep->FP_LAST_C_REGNUM)
     {
       base_regnum = sh64_compact_reg_base_num (reg_nr);
-      regcache_write (base_regnum, buffer);
+      regcache_raw_write (regcache, base_regnum, buffer);
     }
 
   else if (reg_nr >= tdep->DR0_C_REGNUM 
@@ -3718,8 +3697,9 @@
 	  sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
 					   buffer, temp_buffer);
 
-	  regcache_write (base_regnum + portion,
-			  temp_buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	  regcache_raw_write (regcache, base_regnum + portion,
+			      (temp_buffer
+			       + REGISTER_RAW_SIZE (base_regnum) * portion));
 	}
     }
 
@@ -3730,8 +3710,9 @@
      
       for (portion = 0; portion < 4; portion++)
 	{
-	  regcache_write (base_regnum + portion,
-			  buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+	  regcache_raw_write (regcache, base_regnum + portion,
+			      ((char *) buffer
+			       + REGISTER_RAW_SIZE (base_regnum) * portion));
 	}
     }
 
@@ -3773,39 +3754,28 @@
       fpscr_value = fpscr_c_value & fpscr_mask;
       sr_value = (fpscr_value & sr_mask) >> 6;
       
-      regcache_read (fpscr_base_regnum, temp_buffer);
+      regcache_raw_read (regcache, fpscr_base_regnum, temp_buffer);
       old_fpscr_value = extract_unsigned_integer (temp_buffer, 4);
       old_fpscr_value &= 0xfffc0002;
       fpscr_value |= old_fpscr_value;
       store_unsigned_integer (temp_buffer, 4, fpscr_value);
-      regcache_write (fpscr_base_regnum, temp_buffer);
+      regcache_raw_write (regcache, fpscr_base_regnum, temp_buffer);
       
-      regcache_read (sr_base_regnum, temp_buffer);
+      regcache_raw_read (regcache, sr_base_regnum, temp_buffer);
       old_sr_value = extract_unsigned_integer (temp_buffer, 4);
       old_sr_value &= 0xffff8fff;
       sr_value |= old_sr_value;
       store_unsigned_integer (temp_buffer, 4, sr_value);
-      regcache_write (sr_base_regnum, temp_buffer);
+      regcache_raw_write (regcache, sr_base_regnum, temp_buffer);
     }
 
   else if (reg_nr == tdep->FPUL_C_REGNUM)
     {
       base_regnum = sh64_compact_reg_base_num (reg_nr);
-      regcache_write (base_regnum, buffer);
+      regcache_raw_write (regcache, base_regnum, buffer);
     }
 }
 
-static void
-sh64_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
-  if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
-    /* It is a regular register. */
-    regcache_write (reg_nr, buffer);
-  else
-    /* It is a pseudo register and we need to construct its value */
-    sh64_pseudo_register_write (reg_nr, buffer);
-}
-
 /* Floating point vector of 4 float registers. */
 static void
 do_fv_register_info (int fv_regnum)
@@ -4179,6 +4149,47 @@
 #endif /* SVR4_SHARED_LIBS */
 
 
+enum
+{
+   DSP_DSR_REGNUM = 24,
+   DSP_A0G_REGNUM,
+   DSP_A0_REGNUM,
+   DSP_A1G_REGNUM,
+   DSP_A1_REGNUM,
+   DSP_M0_REGNUM,
+   DSP_M1_REGNUM,
+   DSP_X0_REGNUM,
+   DSP_X1_REGNUM,
+   DSP_Y0_REGNUM,
+   DSP_Y1_REGNUM,
+ 
+   DSP_MOD_REGNUM = 40,
+ 
+   DSP_RS_REGNUM = 43,
+   DSP_RE_REGNUM,
+ 
+   DSP_R0_BANK_REGNUM = 51,
+   DSP_R7_BANK_REGNUM = DSP_R0_BANK_REGNUM + 7
+};
+
+static int
+sh_dsp_register_sim_regno (int nr)
+{
+  if (legacy_register_sim_regno (nr) < 0)
+    return legacy_register_sim_regno (nr);
+  if (nr >= DSP_DSR_REGNUM && nr < DSP_Y1_REGNUM)
+    return nr - DSP_DSR_REGNUM + SIM_SH_DSR_REGNUM;
+  if (nr == DSP_MOD_REGNUM)
+    return SIM_SH_MOD_REGNUM;
+  if (nr == DSP_RS_REGNUM)
+    return SIM_SH_RS_REGNUM;
+  if (nr == DSP_RE_REGNUM)
+    return SIM_SH_RE_REGNUM;
+  if (nr >= DSP_R0_BANK_REGNUM && nr <= DSP_R7_BANK_REGNUM)
+    return nr - DSP_R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM;
+  return nr;
+}
+
 static gdbarch_init_ftype sh_gdbarch_init;
 
 static struct gdbarch *
@@ -4188,7 +4199,7 @@
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
   gdbarch_register_name_ftype *sh_register_name;
-  gdbarch_store_return_value_ftype *sh_store_return_value;
+  gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
   gdbarch_register_virtual_type_ftype *sh_register_virtual_type;
   enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
@@ -4270,13 +4281,14 @@
   set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
   set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
   set_gdbarch_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
-  set_gdbarch_extract_return_value (gdbarch, sh_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
   set_gdbarch_store_struct_return (gdbarch, sh_store_struct_return);
   set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
-  set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
   set_gdbarch_pop_frame (gdbarch, sh_pop_frame);
   set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh);
+  set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
   skip_prologue_hard_way = sh_skip_prologue_hard_way;
   do_pseudo_register = sh_do_pseudo_register;
 
@@ -4311,6 +4323,7 @@
       set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
       set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
       set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+      set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
       tdep->DSR_REGNUM = 24;
       tdep->A0G_REGNUM = 25;
       tdep->A0_REGNUM = 26;
@@ -4347,7 +4360,7 @@
       set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
       set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
       set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
-      set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
       set_gdbarch_fp0_regnum (gdbarch, 25);
       tdep->FPUL_REGNUM = 23;
       tdep->FPSCR_REGNUM = 24;
@@ -4387,7 +4400,7 @@
       sh_store_return_value = sh3e_sh4_store_return_value;
       sh_register_virtual_type = sh_sh4_register_virtual_type;
       set_gdbarch_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
-      set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
       set_gdbarch_fp0_regnum (gdbarch, 25);
       set_gdbarch_register_raw_size (gdbarch, sh_sh4_register_raw_size);
       set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
@@ -4395,8 +4408,8 @@
       set_gdbarch_num_pseudo_regs (gdbarch, 12);
       set_gdbarch_max_register_raw_size (gdbarch, 4 * 4);
       set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
-      set_gdbarch_register_read (gdbarch, sh4_register_read);
-      set_gdbarch_register_write (gdbarch, sh4_register_write);
+      set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);
+      set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);
       tdep->FPUL_REGNUM = 23;
       tdep->FPSCR_REGNUM = 24;
       tdep->FP_LAST_REGNUM = 40;
@@ -4487,8 +4500,8 @@
       /* Or should that go in the virtual_size? */
       /*set_gdbarch_max_register_virtual_size (gdbarch, 8);*/
       set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
-      set_gdbarch_register_read (gdbarch, sh64_register_read);
-      set_gdbarch_register_write (gdbarch, sh64_register_write);
+      set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
+      set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
 
       set_gdbarch_do_registers_info (gdbarch, sh64_do_registers_info);
       set_gdbarch_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
@@ -4496,10 +4509,10 @@
       set_gdbarch_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
       set_gdbarch_frame_chain (gdbarch, sh64_frame_chain);
       set_gdbarch_get_saved_register (gdbarch, sh64_get_saved_register);
-      set_gdbarch_extract_return_value (gdbarch, sh64_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
       set_gdbarch_push_arguments (gdbarch, sh64_push_arguments);
       /*set_gdbarch_store_struct_return (gdbarch, sh64_store_struct_return);*/
-      set_gdbarch_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
+      set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
       set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
       set_gdbarch_pop_frame (gdbarch, sh64_pop_frame);
       set_gdbarch_elf_make_msymbol_special (gdbarch,
@@ -4552,7 +4565,7 @@
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, sh_push_return_address);
 
-  set_gdbarch_store_return_value (gdbarch, sh_store_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, sh_store_return_value);
   set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
diff --git a/gdb/signals/signals.c b/gdb/signals/signals.c
index 643e450..0057e60 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -498,8 +498,11 @@
       if (33 <= hostsig && hostsig <= 63)
 	return (enum target_signal)
 	  (hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
-      else if (hostsig == 64)
-	return TARGET_SIGNAL_REALTIME_64;
+      else if (hostsig == 32)
+	return TARGET_SIGNAL_REALTIME_32;
+      else if (64 <= hostsig && hostsig <= 127)
+	return (enum target_signal)
+	  (hostsig - 64 + (int) TARGET_SIGNAL_REALTIME_64);
       else
 	error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
     }
@@ -784,8 +787,21 @@
 	  if (retsig >= SIGRTMIN && retsig <= SIGRTMAX)
 	    return retsig;
 	}
-      else if (oursig == TARGET_SIGNAL_REALTIME_64)
-	return 64;
+      else if (oursig == TARGET_SIGNAL_REALTIME_32)
+	{
+	  /* TARGET_SIGNAL_REALTIME_32 isn't contiguous with
+             TARGET_SIGNAL_REALTIME_33.  It is 32 by definition.  */
+	  return 32;
+	}
+      else if (oursig >= TARGET_SIGNAL_REALTIME_64
+	  && oursig <= TARGET_SIGNAL_REALTIME_127)
+	{
+	  /* This block of signals is continuous, and
+             TARGET_SIGNAL_REALTIME_64 is 64 by definition.  */
+	  int retsig =
+	    (int) oursig - (int) TARGET_SIGNAL_REALTIME_64 + 64;
+	  return retsig;
+	}
 #endif
       *oursig_ok = 0;
       return 0;
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
new file mode 100644
index 0000000..1cfa452
--- /dev/null
+++ b/gdb/solib-irix.c
@@ -0,0 +1,725 @@
+/* Shared library support for IRIX.
+   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+   Free Software Foundation, Inc.
+
+   This file was created using portions of irix5-nat.c originally
+   contributed to GDB by Ian Lance Taylor.
+
+   This file is part of GDB.
+
+   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 "defs.h"
+
+#include "symtab.h"
+#include "bfd.h"
+#include "symfile.h"
+#include "objfiles.h"
+#include "gdbcore.h"
+#include "target.h"
+#include "inferior.h"
+
+#include "solist.h"
+
+/* Link map info to include in an allocate so_list entry.  Unlike some
+   of the other solib backends, this (Irix) backend chooses to decode
+   the link map info obtained from the target and store it as (mostly)
+   CORE_ADDRs which need no further decoding.  This is more convenient
+   because there are three different link map formats to worry about.
+   We use a single routine (fetch_lm_info) to read (and decode) the target
+   specific link map data.  */
+
+struct lm_info
+{
+  CORE_ADDR addr;		/* address of obj_info or obj_list
+				   struct on target (from which the
+				   following information is obtained).  */
+  CORE_ADDR next;		/* address of next item in list.  */
+  CORE_ADDR reloc_offset;	/* amount to relocate by  */
+  CORE_ADDR pathname_addr;	/* address of pathname  */
+  int pathname_len;		/* length of pathname */
+};
+
+/* It's not desirable to use the system header files to obtain the
+   structure of the obj_list or obj_info structs.  Therefore, we use a
+   platform neutral representation which has been derived from the IRIX
+   header files.  */
+
+typedef struct
+{
+  char b[4];
+}
+gdb_int32_bytes;
+typedef struct
+{
+  char b[8];
+}
+gdb_int64_bytes;
+
+/* The "old" obj_list struct.  This is used with old (o32) binaries.
+   The ``data'' member points at a much larger and more complicated
+   struct which we will only refer to by offsets.  See
+   fetch_lm_info().  */
+
+struct irix_obj_list
+{
+  gdb_int32_bytes data;
+  gdb_int32_bytes next;
+  gdb_int32_bytes prev;
+};
+
+/* The ELF32 and ELF64 versions of the above struct.  The oi_magic value
+   corresponds to the ``data'' value in the "old" struct.  When this value
+   is 0xffffffff, the data will be in one of the following formats.  The
+   ``oi_size'' field is used to decide which one we actually have.  */
+
+struct irix_elf32_obj_info
+{
+  gdb_int32_bytes oi_magic;
+  gdb_int32_bytes oi_size;
+  gdb_int32_bytes oi_next;
+  gdb_int32_bytes oi_prev;
+  gdb_int32_bytes oi_ehdr;
+  gdb_int32_bytes oi_orig_ehdr;
+  gdb_int32_bytes oi_pathname;
+  gdb_int32_bytes oi_pathname_len;
+};
+
+struct irix_elf64_obj_info
+{
+  gdb_int32_bytes oi_magic;
+  gdb_int32_bytes oi_size;
+  gdb_int64_bytes oi_next;
+  gdb_int64_bytes oi_prev;
+  gdb_int64_bytes oi_ehdr;
+  gdb_int64_bytes oi_orig_ehdr;
+  gdb_int64_bytes oi_pathname;
+  gdb_int32_bytes oi_pathname_len;
+  gdb_int32_bytes padding;
+};
+
+/* Union of all of the above (plus a split out magic field).  */
+
+union irix_obj_info
+{
+  gdb_int32_bytes magic;
+  struct irix_obj_list ol32;
+  struct irix_elf32_obj_info oi32;
+  struct irix_elf64_obj_info oi64;
+};
+
+/* MIPS sign extends its 32 bit addresses.  We could conceivably use
+   extract_typed_address here, but to do so, we'd have to construct an
+   appropriate type.  Calling extract_signed_integer or
+   extract_address seems simpler.  */
+
+static CORE_ADDR
+extract_mips_address (void *addr, int len)
+{
+  if (len <= 32)
+    return extract_signed_integer (addr, len);
+  else
+    return extract_address (addr, len);
+}
+
+/* Fetch and return the link map data associated with ADDR.  Note that
+   this routine automatically determines which (of three) link map
+   formats is in use by the target.  */
+
+struct lm_info
+fetch_lm_info (CORE_ADDR addr)
+{
+  struct lm_info li;
+  union irix_obj_info buf;
+
+  li.addr = addr;
+
+  /* The smallest region that we'll need is for buf.ol32.  We'll read
+     that first.  We'll read more of the buffer later if we have to deal
+     with one of the other cases.  (We don't want to incur a memory error
+     if we were to read a larger region that generates an error due to
+     being at the end of a page or the like.)  */
+  read_memory (addr, (char *) &buf, sizeof (buf.ol32));
+
+  if (extract_unsigned_integer (&buf.magic, sizeof (buf.magic)) != 0xffffffff)
+    {
+      /* Use buf.ol32... */
+      char obj_buf[432];
+      CORE_ADDR obj_addr = extract_mips_address (&buf.ol32.data,
+						 sizeof (buf.ol32.data));
+      li.next = extract_mips_address (&buf.ol32.next, sizeof (buf.ol32.next));
+
+      read_memory (obj_addr, obj_buf, sizeof (obj_buf));
+
+      li.pathname_addr = extract_mips_address (&obj_buf[236], 4);
+      li.pathname_len = 0;	/* unknown */
+      li.reloc_offset = extract_mips_address (&obj_buf[196], 4)
+	- extract_mips_address (&obj_buf[248], 4);
+
+    }
+  else if (extract_unsigned_integer (&buf.oi32.oi_size,
+				     sizeof (buf.oi32.oi_size))
+	   == sizeof (buf.oi32))
+    {
+      /* Use buf.oi32...  */
+
+      /* Read rest of buffer.  */
+      read_memory (addr + sizeof (buf.ol32),
+		   ((char *) &buf) + sizeof (buf.ol32),
+		   sizeof (buf.oi32) - sizeof (buf.ol32));
+
+      /* Fill in fields using buffer contents.  */
+      li.next = extract_mips_address (&buf.oi32.oi_next,
+				      sizeof (buf.oi32.oi_next));
+      li.reloc_offset = extract_mips_address (&buf.oi32.oi_ehdr,
+					      sizeof (buf.oi32.oi_ehdr))
+	- extract_mips_address (&buf.oi32.oi_orig_ehdr,
+				sizeof (buf.oi32.oi_orig_ehdr));
+      li.pathname_addr = extract_mips_address (&buf.oi32.oi_pathname,
+					       sizeof (buf.oi32.oi_pathname));
+      li.pathname_len = extract_unsigned_integer (&buf.oi32.oi_pathname_len,
+						  sizeof (buf.oi32.
+							  oi_pathname_len));
+    }
+  else if (extract_unsigned_integer (&buf.oi64.oi_size,
+				     sizeof (buf.oi64.oi_size))
+	   == sizeof (buf.oi64))
+    {
+      /* Use buf.oi64...  */
+
+      /* Read rest of buffer.  */
+      read_memory (addr + sizeof (buf.ol32),
+		   ((char *) &buf) + sizeof (buf.ol32),
+		   sizeof (buf.oi64) - sizeof (buf.ol32));
+
+      /* Fill in fields using buffer contents.  */
+      li.next = extract_mips_address (&buf.oi64.oi_next,
+				      sizeof (buf.oi64.oi_next));
+      li.reloc_offset = extract_mips_address (&buf.oi64.oi_ehdr,
+					      sizeof (buf.oi64.oi_ehdr))
+	- extract_mips_address (&buf.oi64.oi_orig_ehdr,
+				sizeof (buf.oi64.oi_orig_ehdr));
+      li.pathname_addr = extract_mips_address (&buf.oi64.oi_pathname,
+					       sizeof (buf.oi64.oi_pathname));
+      li.pathname_len = extract_unsigned_integer (&buf.oi64.oi_pathname_len,
+						  sizeof (buf.oi64.
+							  oi_pathname_len));
+    }
+  else
+    {
+      error ("Unable to fetch shared library obj_info or obj_list info.");
+    }
+
+  return li;
+}
+
+/* The symbol which starts off the list of shared libraries.  */
+#define DEBUG_BASE "__rld_obj_head"
+
+char shadow_contents[BREAKPOINT_MAX];	/* Stash old bkpt addr contents */
+
+static CORE_ADDR debug_base;	/* Base of dynamic linker structures */
+static CORE_ADDR breakpoint_addr;	/* Address where end bkpt is set */
+
+/*
+
+   LOCAL FUNCTION
+
+   locate_base -- locate the base address of dynamic linker structs
+
+   SYNOPSIS
+
+   CORE_ADDR locate_base (void)
+
+   DESCRIPTION
+
+   For both the SunOS and SVR4 shared library implementations, if the
+   inferior executable has been linked dynamically, there is a single
+   address somewhere in the inferior's data space which is the key to
+   locating all of the dynamic linker's runtime structures.  This
+   address is the value of the symbol defined by the macro DEBUG_BASE.
+   The job of this function is to find and return that address, or to
+   return 0 if there is no such address (the executable is statically
+   linked for example).
+
+   For SunOS, the job is almost trivial, since the dynamic linker and
+   all of it's structures are statically linked to the executable at
+   link time.  Thus the symbol for the address we are looking for has
+   already been added to the minimal symbol table for the executable's
+   objfile at the time the symbol file's symbols were read, and all we
+   have to do is look it up there.  Note that we explicitly do NOT want
+   to find the copies in the shared library.
+
+   The SVR4 version is much more complicated because the dynamic linker
+   and it's structures are located in the shared C library, which gets
+   run as the executable's "interpreter" by the kernel.  We have to go
+   to a lot more work to discover the address of DEBUG_BASE.  Because
+   of this complexity, we cache the value we find and return that value
+   on subsequent invocations.  Note there is no copy in the executable
+   symbol tables.
+
+   Irix 5 is basically like SunOS.
+
+   Note that we can assume nothing about the process state at the time
+   we need to find this address.  We may be stopped on the first instruc-
+   tion of the interpreter (C shared library), the first instruction of
+   the executable itself, or somewhere else entirely (if we attached
+   to the process for example).
+
+ */
+
+static CORE_ADDR
+locate_base (void)
+{
+  struct minimal_symbol *msymbol;
+  CORE_ADDR address = 0;
+
+  msymbol = lookup_minimal_symbol (DEBUG_BASE, NULL, symfile_objfile);
+  if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
+    {
+      address = SYMBOL_VALUE_ADDRESS (msymbol);
+    }
+  return (address);
+}
+
+/*
+
+   LOCAL FUNCTION
+
+   disable_break -- remove the "mapping changed" breakpoint
+
+   SYNOPSIS
+
+   static int disable_break ()
+
+   DESCRIPTION
+
+   Removes the breakpoint that gets hit when the dynamic linker
+   completes a mapping change.
+
+ */
+
+static int
+disable_break (void)
+{
+  int status = 1;
+
+
+  /* Note that breakpoint address and original contents are in our address
+     space, so we just need to write the original contents back. */
+
+  if (memory_remove_breakpoint (breakpoint_addr, shadow_contents) != 0)
+    {
+      status = 0;
+    }
+
+  /* For the SVR4 version, we always know the breakpoint address.  For the
+     SunOS version we don't know it until the above code is executed.
+     Grumble if we are stopped anywhere besides the breakpoint address. */
+
+  if (stop_pc != breakpoint_addr)
+    {
+      warning
+	("stopped at unknown breakpoint while handling shared libraries");
+    }
+
+  return (status);
+}
+
+/*
+
+   LOCAL FUNCTION
+
+   enable_break -- arrange for dynamic linker to hit breakpoint
+
+   SYNOPSIS
+
+   int enable_break (void)
+
+   DESCRIPTION
+
+   This functions inserts a breakpoint at the entry point of the
+   main executable, where all shared libraries are mapped in.
+ */
+
+static int
+enable_break (void)
+{
+  if (symfile_objfile != NULL
+      && target_insert_breakpoint (symfile_objfile->ei.entry_point,
+				   shadow_contents) == 0)
+    {
+      breakpoint_addr = symfile_objfile->ei.entry_point;
+      return 1;
+    }
+
+  return 0;
+}
+
+/*
+
+   LOCAL FUNCTION
+
+   irix_solib_create_inferior_hook -- shared library startup support
+
+   SYNOPSIS
+
+   void solib_create_inferior_hook()
+
+   DESCRIPTION
+
+   When gdb starts up the inferior, it nurses it along (through the
+   shell) until it is ready to execute it's first instruction.  At this
+   point, this function gets called via expansion of the macro
+   SOLIB_CREATE_INFERIOR_HOOK.
+
+   For SunOS executables, this first instruction is typically the
+   one at "_start", or a similar text label, regardless of whether
+   the executable is statically or dynamically linked.  The runtime
+   startup code takes care of dynamically linking in any shared
+   libraries, once gdb allows the inferior to continue.
+
+   For SVR4 executables, this first instruction is either the first
+   instruction in the dynamic linker (for dynamically linked
+   executables) or the instruction at "start" for statically linked
+   executables.  For dynamically linked executables, the system
+   first exec's /lib/libc.so.N, which contains the dynamic linker,
+   and starts it running.  The dynamic linker maps in any needed
+   shared libraries, maps in the actual user executable, and then
+   jumps to "start" in the user executable.
+
+   For both SunOS shared libraries, and SVR4 shared libraries, we
+   can arrange to cooperate with the dynamic linker to discover the
+   names of shared libraries that are dynamically linked, and the
+   base addresses to which they are linked.
+
+   This function is responsible for discovering those names and
+   addresses, and saving sufficient information about them to allow
+   their symbols to be read at a later time.
+
+   FIXME
+
+   Between enable_break() and disable_break(), this code does not
+   properly handle hitting breakpoints which the user might have
+   set in the startup code or in the dynamic linker itself.  Proper
+   handling will probably have to wait until the implementation is
+   changed to use the "breakpoint handler function" method.
+
+   Also, what if child has exit()ed?  Must exit loop somehow.
+ */
+
+static void
+irix_solib_create_inferior_hook (void)
+{
+  if (!enable_break ())
+    {
+      warning ("shared library handler failed to enable breakpoint");
+      return;
+    }
+
+  /* Now run the target.  It will eventually hit the breakpoint, at
+     which point all of the libraries will have been mapped in and we
+     can go groveling around in the dynamic linker structures to find
+     out what we need to know about them. */
+
+  clear_proceed_status ();
+  stop_soon_quietly = 1;
+  stop_signal = TARGET_SIGNAL_0;
+  do
+    {
+      target_resume (pid_to_ptid (-1), 0, stop_signal);
+      wait_for_inferior ();
+    }
+  while (stop_signal != TARGET_SIGNAL_TRAP);
+
+  /* We are now either at the "mapping complete" breakpoint (or somewhere
+     else, a condition we aren't prepared to deal with anyway), so adjust
+     the PC as necessary after a breakpoint, disable the breakpoint, and
+     add any shared libraries that were mapped in. */
+
+  if (!disable_break ())
+    {
+      warning ("shared library handler failed to disable breakpoint");
+    }
+
+  /* solib_add will call reinit_frame_cache.
+     But we are stopped in the startup code and we might not have symbols
+     for the startup code, so heuristic_proc_start could be called
+     and will put out an annoying warning.
+     Delaying the resetting of stop_soon_quietly until after symbol loading
+     suppresses the warning.  */
+  solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
+  stop_soon_quietly = 0;
+  re_enable_breakpoints_in_shlibs ();
+}
+
+/* LOCAL FUNCTION
+
+   current_sos -- build a list of currently loaded shared objects
+
+   SYNOPSIS
+
+   struct so_list *current_sos ()
+
+   DESCRIPTION
+
+   Build a list of `struct so_list' objects describing the shared
+   objects currently loaded in the inferior.  This list does not
+   include an entry for the main executable file.
+
+   Note that we only gather information directly available from the
+   inferior --- we don't examine any of the shared library files
+   themselves.  The declaration of `struct so_list' says which fields
+   we provide values for.  */
+
+static struct so_list *
+irix_current_sos (void)
+{
+  CORE_ADDR lma;
+  char addr_buf[8];
+  struct so_list *head = 0;
+  struct so_list **link_ptr = &head;
+  int is_first = 1;
+  struct lm_info lm;
+
+  /* Make sure we've looked up the inferior's dynamic linker's base
+     structure.  */
+  if (!debug_base)
+    {
+      debug_base = locate_base ();
+
+      /* If we can't find the dynamic linker's base structure, this
+         must not be a dynamically linked executable.  Hmm.  */
+      if (!debug_base)
+	return 0;
+    }
+
+  read_memory (debug_base, addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+  lma = extract_mips_address (addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+
+  while (lma)
+    {
+      lm = fetch_lm_info (lma);
+      if (!is_first)
+	{
+	  int errcode;
+	  char *name_buf;
+	  int name_size;
+	  struct so_list *new
+	    = (struct so_list *) xmalloc (sizeof (struct so_list));
+	  struct cleanup *old_chain = make_cleanup (xfree, new);
+
+	  memset (new, 0, sizeof (*new));
+
+	  new->lm_info = xmalloc (sizeof (struct lm_info));
+	  make_cleanup (xfree, new->lm_info);
+
+	  *new->lm_info = lm;
+
+	  /* Extract this shared object's name.  */
+	  name_size = lm.pathname_len;
+	  if (name_size == 0)
+	    name_size = SO_NAME_MAX_PATH_SIZE - 1;
+
+	  if (name_size >= SO_NAME_MAX_PATH_SIZE)
+	    {
+	      name_size = SO_NAME_MAX_PATH_SIZE - 1;
+	      warning
+		("current_sos: truncating name of %d characters to only %d characters",
+		 lm.pathname_len, name_size);
+	    }
+
+	  target_read_string (lm.pathname_addr, &name_buf,
+			      name_size, &errcode);
+	  if (errcode != 0)
+	    {
+	      warning ("current_sos: Can't read pathname for load map: %s\n",
+		       safe_strerror (errcode));
+	    }
+	  else
+	    {
+	      strncpy (new->so_name, name_buf, name_size);
+	      new->so_name[name_size] = '\0';
+	      xfree (name_buf);
+	      strcpy (new->so_original_name, new->so_name);
+	    }
+
+	  new->next = 0;
+	  *link_ptr = new;
+	  link_ptr = &new->next;
+
+	  discard_cleanups (old_chain);
+	}
+      is_first = 0;
+      lma = lm.next;
+    }
+
+  return head;
+}
+
+/*
+
+  LOCAL FUNCTION
+
+  irix_open_symbol_file_object
+
+  SYNOPSIS
+
+  void irix_open_symbol_file_object (void *from_tty)
+
+  DESCRIPTION
+
+  If no open symbol file, attempt to locate and open the main symbol
+  file.  On IRIX, this is the first link map entry.  If its name is
+  here, we can open it.  Useful when attaching to a process without
+  first loading its symbol file.
+
+  If FROM_TTYP dereferences to a non-zero integer, allow messages to
+  be printed.  This parameter is a pointer rather than an int because
+  open_symbol_file_object() is called via catch_errors() and
+  catch_errors() requires a pointer argument. */
+
+static int
+irix_open_symbol_file_object (void *from_ttyp)
+{
+  CORE_ADDR lma;
+  char addr_buf[8];
+  struct lm_info lm;
+  struct cleanup *cleanups;
+  int errcode;
+  int from_tty = *(int *) from_ttyp;
+  char *filename;
+
+  if (symfile_objfile)
+    if (!query ("Attempt to reload symbols from process? "))
+      return 0;
+
+  if ((debug_base = locate_base ()) == 0)
+    return 0;			/* failed somehow...  */
+
+  /* First link map member should be the executable.  */
+  read_memory (debug_base, addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+  lma = extract_mips_address (addr_buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+  if (lma == 0)
+    return 0;			/* failed somehow...  */
+
+  lm = fetch_lm_info (lma);
+
+  if (lm.pathname_addr == 0)
+    return 0;			/* No filename.  */
+
+  /* Now fetch the filename from target memory.  */
+  target_read_string (lm.pathname_addr, &filename, SO_NAME_MAX_PATH_SIZE - 1,
+		      &errcode);
+
+  if (errcode)
+    {
+      warning ("failed to read exec filename from attached file: %s",
+	       safe_strerror (errcode));
+      return 0;
+    }
+
+  cleanups = make_cleanup (xfree, filename);
+  /* Have a pathname: read the symbol file.  */
+  symbol_file_add_main (filename, from_tty);
+
+  do_cleanups (cleanups);
+
+  return 1;
+}
+
+
+/*
+
+   LOCAL FUNCTION
+
+   irix_special_symbol_handling -- additional shared library symbol handling
+
+   SYNOPSIS
+
+   void irix_special_symbol_handling ()
+
+   DESCRIPTION
+
+   Once the symbols from a shared object have been loaded in the usual
+   way, we are called to do any system specific symbol handling that 
+   is needed.
+
+   For SunOS4, this consisted of grunging around in the dynamic
+   linkers structures to find symbol definitions for "common" symbols
+   and adding them to the minimal symbol table for the runtime common
+   objfile.
+
+   However, for IRIX, there's nothing to do.
+
+ */
+
+static void
+irix_special_symbol_handling (void)
+{
+}
+
+/* Using the solist entry SO, relocate the addresses in SEC.  */
+
+static void
+irix_relocate_section_addresses (struct so_list *so,
+				 struct section_table *sec)
+{
+  sec->addr += so->lm_info->reloc_offset;
+  sec->endaddr += so->lm_info->reloc_offset;
+}
+
+/* Free the lm_info struct.  */
+
+static void
+irix_free_so (struct so_list *so)
+{
+  xfree (so->lm_info);
+}
+
+/* Clear backend specific state.  */
+
+static void
+irix_clear_solib (void)
+{
+  debug_base = 0;
+}
+
+/* Return 1 if PC lies in the dynamic symbol resolution code of the
+   run time loader.  */
+static int
+irix_in_dynsym_resolve_code (CORE_ADDR pc)
+{
+  return 0;
+}
+
+static struct target_so_ops irix_so_ops;
+
+void
+_initialize_irix_solib (void)
+{
+  irix_so_ops.relocate_section_addresses = irix_relocate_section_addresses;
+  irix_so_ops.free_so = irix_free_so;
+  irix_so_ops.clear_solib = irix_clear_solib;
+  irix_so_ops.solib_create_inferior_hook = irix_solib_create_inferior_hook;
+  irix_so_ops.special_symbol_handling = irix_special_symbol_handling;
+  irix_so_ops.current_sos = irix_current_sos;
+  irix_so_ops.open_symbol_file_object = irix_open_symbol_file_object;
+  irix_so_ops.in_dynsym_resolve_code = irix_in_dynsym_resolve_code;
+
+  /* FIXME: Don't do this here.  *_gdbarch_init() should set so_ops. */
+  current_target_so_ops = &irix_so_ops;
+}
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index a00e488..6f43a8f 100644
--- a/gdb/solib-osf.c
+++ b/gdb/solib-osf.c
@@ -359,7 +359,14 @@
 open_map (struct read_map_ctxt *ctxt)
 {
 #ifdef USE_LDR_ROUTINES
-  ctxt->proc = ldr_my_process ();
+  /* Note: As originally written, ldr_my_process() was used to obtain
+     the value for ctxt->proc.  This is incorrect, however, since
+     ldr_my_process() retrieves the "unique identifier" associated
+     with the current process (i.e. GDB) and not the one being
+     debugged.  Presumably, the pid of the process being debugged is
+     compatible with the "unique identifier" used by the ldr_
+     routines, so we use that.  */
+  ctxt->proc = ptid_get_pid (inferior_ptid);
   if (ldr_xattach (ctxt->proc) != 0)
     return 0;
   ctxt->next = LDR_NULL_MODULE;
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 2d71097..3f98a1e 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1318,24 +1318,20 @@
   set_gdbarch_data (gdbarch, fetch_link_map_offsets_gdbarch_data, flmo);
 }
 
-/* Initialize the architecture specific link_map_offsets fetcher. 
-   This is called after <arch>_gdbarch_init() has set up its struct
-   gdbarch for the new architecture, so care must be taken to use the
-   value set by set_solib_svr4_fetch_link_map_offsets(), above.  We
-   do, however, attempt to provide a reasonable alternative (for
-   native targets anyway) if the <arch>_gdbarch_init() fails to call
+/* Initialize the architecture-specific link_map_offsets fetcher.
+   This is called after <arch>_gdbarch_init() has set up its `struct
+   gdbarch' for the new architecture, and is only called if the
+   link_map_offsets fetcher isn't already initialized (which is
+   usually done by calling set_solib_svr4_fetch_link_map_offsets()
+   above in <arch>_gdbarch_init()).  Therefore we attempt to provide a
+   reasonable alternative (for native targets anyway) if the
+   <arch>_gdbarch_init() fails to call
    set_solib_svr4_fetch_link_map_offsets().  */
 
 static void *
 init_fetch_link_map_offsets (struct gdbarch *gdbarch)
 {
-  struct link_map_offsets *(*flmo) =
-    gdbarch_data (gdbarch, fetch_link_map_offsets_gdbarch_data);
-
-  if (flmo == NULL)
-    return legacy_fetch_link_map_offsets;
-  else
-    return flmo;
+  return legacy_fetch_link_map_offsets;
 }
 
 static struct target_so_ops svr4_so_ops;
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index d623e4b..2eb1ff5 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -1,6 +1,7 @@
 /* Handle HP SOM shared libraries for GDB, the GNU Debugger.
-   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-   Free Software Foundation, Inc.
+
+   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,7 +39,6 @@
 #include "gdb-stabs.h"
 #include "gdb_stat.h"
 #include "gdbcmd.h"
-#include "assert.h"
 #include "language.h"
 #include "regcache.h"
 
@@ -319,7 +319,7 @@
 		       sizeof (obj_private_data_t));
       obj_private->unwind_info = NULL;
       obj_private->so_info = NULL;
-      so->objfile->obj_private = (PTR) obj_private;
+      so->objfile->obj_private = obj_private;
     }
 
   obj_private = (obj_private_data_t *) so->objfile->obj_private;
diff --git a/gdb/source.c b/gdb/source.c
index ac74372..c7c1ce2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -500,6 +500,8 @@
 
   printf_filtered ("Source language is %s.\n", language_str (s->language));
   printf_filtered ("Compiled with %s debugging format.\n", s->debugformat);
+  printf_filtered ("%s preprocessor macro info.\n",
+                   s->macro_table ? "Includes" : "Does not include");
 }
 
 
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 6461ca0..033cc81 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -27,12 +27,12 @@
 #include "arch-utils.h"
 #include "frame.h"
 #include "inferior.h"
-#include "obstack.h"
 #include "target.h"
 #include "value.h"
 #include "bfd.h"
 #include "gdb_string.h"
 #include "regcache.h"
+#include "osabi.h"
 
 #ifdef	USE_PROC_FS
 #include <sys/procfs.h>
@@ -111,6 +111,8 @@
     int reg_save_offset;
     int call_dummy_call_offset;
     int print_insn_mach;
+
+    enum gdb_osabi osabi;
   };
 
 /* Now make GDB_TARGET_IS_SPARC64 a runtime test.  */
@@ -2272,12 +2274,13 @@
 
 static struct gdbarch * sparc_gdbarch_init (struct gdbarch_info info,
 					    struct gdbarch_list *arches);
+static void sparc_dump_tdep (struct gdbarch *, struct ui_file *);
 
 void
 _initialize_sparc_tdep (void)
 {
   /* Hook us into the gdbarch mechanism.  */
-  register_gdbarch_init (bfd_arch_sparc, sparc_gdbarch_init);
+  gdbarch_register (bfd_arch_sparc, sparc_gdbarch_init, sparc_dump_tdep);
 
   tm_print_insn = gdb_print_insn_sparc;
   tm_print_insn_info.mach = TM_PRINT_INSN_MACH;		/* Selects sparc/sparclite */
@@ -2547,7 +2550,7 @@
 
 /* MULTI_ARCH support */
 
-static char *
+static const char *
 sparc32_register_name (int regno)
 {
   static char *register_names[] = 
@@ -2571,7 +2574,7 @@
     return register_names[regno];
 }
 
-static char *
+static const char *
 sparc64_register_name (int regno)
 {
   static char *register_names[] = 
@@ -2603,7 +2606,7 @@
     return register_names[regno];
 }
 
-static char *
+static const char *
 sparclite_register_name (int regno)
 {
   static char *register_names[] = 
@@ -2628,7 +2631,7 @@
     return register_names[regno];
 }
 
-static char *
+static const char *
 sparclet_register_name (int regno)
 {
   static char *register_names[] = 
@@ -2930,6 +2933,7 @@
 {
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
   static LONGEST call_dummy_32[] = 
     { 0xbc100001, 0x9de38000, 0xbc100002, 0xbe100003,
@@ -2953,10 +2957,29 @@
     };
   static LONGEST call_dummy_nil[] = {0};
 
+  /* Try to determine the OS ABI of the object we are loading.  */
+
+  if (info.abfd != NULL)
+    {
+      osabi = gdbarch_lookup_osabi (info.abfd);
+      if (osabi == GDB_OSABI_UNKNOWN)
+	{
+	  /* If it's an ELF file, assume it's Solaris.  */
+	  if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
+	    osabi = GDB_OSABI_SOLARIS;
+	}
+    }
+
   /* First see if there is already a gdbarch that can satisfy the request.  */
-  arches = gdbarch_list_lookup_by_info (arches, &info);
-  if (arches != NULL)
-    return arches->gdbarch;
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
 
   /* None found: is the request for a sparc architecture? */
   if (info.bfd_arch_info->arch != bfd_arch_sparc)
@@ -2966,6 +2989,8 @@
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
+  tdep->osabi = osabi;
+
   /* First set settings that are common for all sparc architectures.  */
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
   set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
@@ -2976,8 +3001,7 @@
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
-  set_gdbarch_extract_struct_value_address (gdbarch, 
-					    sparc_extract_struct_value_address);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
   set_gdbarch_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy);
   set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
   set_gdbarch_fp_regnum (gdbarch, SPARC_FP_REGNUM);
@@ -3191,96 +3215,109 @@
   switch (info.bfd_arch_info->mach)
     {
     case bfd_mach_sparc:
-      set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 1;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 32 * 4;
       tdep->print_insn_mach = bfd_mach_sparc;
       break;
     case bfd_mach_sparc_sparclet:
-      set_gdbarch_extract_return_value (gdbarch, 
-					sparclet_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclet_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparclet_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparclet_store_return_value);
       tdep->has_fpu = 0;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 0;
       tdep->print_insn_mach = bfd_mach_sparc_sparclet;
       break;
     case bfd_mach_sparc_sparclite:
-      set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 80);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclite_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 0;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 0;
       tdep->print_insn_mach = bfd_mach_sparc_sparclite;
       break;
     case bfd_mach_sparc_v8plus:
-      set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->print_insn_mach = bfd_mach_sparc;
       tdep->fp_register_bytes = 32 * 4;
       tdep->has_fpu = 1;	/* (all but sparclet and sparclite) */
       break;
     case bfd_mach_sparc_v8plusa:
-      set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 72);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparc32_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 1;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 32 * 4;
       tdep->print_insn_mach = bfd_mach_sparc;
       break;
     case bfd_mach_sparc_sparclite_le:
-      set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 80);
       set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
       set_gdbarch_register_name (gdbarch, sparclite_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 0;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 0;
       tdep->print_insn_mach = bfd_mach_sparc_sparclite;
       break;
     case bfd_mach_sparc_v9:
-      set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 125);
       set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
       set_gdbarch_register_name (gdbarch, sparc64_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 1;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 64 * 4;
       tdep->print_insn_mach = bfd_mach_sparc_v9a;
       break;
     case bfd_mach_sparc_v9a:
-      set_gdbarch_extract_return_value (gdbarch, sparc64_extract_return_value);
+      set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
       set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
       set_gdbarch_num_regs (gdbarch, 125);
       set_gdbarch_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
       set_gdbarch_register_name (gdbarch, sparc64_register_name);
-      set_gdbarch_store_return_value (gdbarch, sparc_store_return_value);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
       tdep->has_fpu = 1;	/* (all but sparclet and sparclite) */
       tdep->fp_register_bytes = 64 * 4;
       tdep->print_insn_mach = bfd_mach_sparc_v9a;
       break;
     }
 
+  /* Hook in OS ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch, osabi);
+
   return gdbarch;
 }
 
+static void
+sparc_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (tdep == NULL)
+    return;
+
+  fprintf_unfiltered (file, "sparc_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+}
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
index 87351f1..aa06747 100644
--- a/gdb/sparcl-tdep.c
+++ b/gdb/sparcl-tdep.c
@@ -27,7 +27,7 @@
 #include "regcache.h"
 #include <sys/types.h>
 
-#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
+#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN__)
 #define HAVE_SOCKETS
 #include <sys/time.h>
 #include <sys/socket.h>
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 56b7849..6011769 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -29,7 +29,7 @@
 #include "defs.h"
 #include "gdb_string.h"
 #include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
@@ -142,7 +142,7 @@
 static struct type *read_array_type (char **, struct type *,
 				     struct objfile *);
 
-static struct type **read_args (char **, int, struct objfile *);
+static struct field *read_args (char **, int, struct objfile *, int *, int *);
 
 static int
 read_cpp_abbrev (struct field_info *, char **, struct type *,
@@ -256,34 +256,36 @@
       *(pp) = next_symbol_text (objfile);	\
   } while (0)
 
-/* FIXME: These probably should be our own types (like rs6000_builtin_type
-   has its own types) rather than builtin_type_*.  */
-static struct type **os9k_type_vector[] =
-{
-  0,
-  &builtin_type_int,
-  &builtin_type_char,
-  &builtin_type_long,
-  &builtin_type_short,
-  &builtin_type_unsigned_char,
-  &builtin_type_unsigned_short,
-  &builtin_type_unsigned_long,
-  &builtin_type_unsigned_int,
-  &builtin_type_float,
-  &builtin_type_double,
-  &builtin_type_void,
-  &builtin_type_long_double
-};
-
-static void os9k_init_type_vector (struct type **);
-
-static void
-os9k_init_type_vector (struct type **tv)
-{
-  unsigned int i;
-  for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
-    tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
-}
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE /* FIXME: These probably should be our own types (like rs6000_builtin_type
+// OBSOLETE    has its own types) rather than builtin_type_*.  */
+// OBSOLETE static struct type **os9k_type_vector[] =
+// OBSOLETE {
+// OBSOLETE   0,
+// OBSOLETE   &builtin_type_int,
+// OBSOLETE   &builtin_type_char,
+// OBSOLETE   &builtin_type_long,
+// OBSOLETE   &builtin_type_short,
+// OBSOLETE   &builtin_type_unsigned_char,
+// OBSOLETE   &builtin_type_unsigned_short,
+// OBSOLETE   &builtin_type_unsigned_long,
+// OBSOLETE   &builtin_type_unsigned_int,
+// OBSOLETE   &builtin_type_float,
+// OBSOLETE   &builtin_type_double,
+// OBSOLETE   &builtin_type_void,
+// OBSOLETE   &builtin_type_long_double
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static void os9k_init_type_vector (struct type **);
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE os9k_init_type_vector (struct type **tv)
+// OBSOLETE {
+// OBSOLETE   unsigned int i;
+// OBSOLETE   for (i = 0; i < sizeof (os9k_type_vector) / sizeof (struct type **); i++)
+// OBSOLETE     tv[i] = (os9k_type_vector[i] == 0 ? 0 : *(os9k_type_vector[i]));
+// OBSOLETE }
+#endif /* OBSOLETE OS9K */
 
 /* Look up a dbx type-number pair.  Return the address of the slot
    where the type for that number-pair is stored.
@@ -351,9 +353,11 @@
 	  memset (&type_vector[old_len], 0,
 		  (type_vector_length - old_len) * sizeof (struct type *));
 
-	  if (os9k_stabs)
-	    /* Deal with OS9000 fundamental types.  */
-	    os9k_init_type_vector (type_vector);
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE 	  if (os9k_stabs)
+// OBSOLETE 	    /* Deal with OS9000 fundamental types.  */
+// OBSOLETE 	    os9k_init_type_vector (type_vector);
+#endif /* OBSOLETE OS9K */
 	}
       return (&type_vector[index]);
     }
@@ -2052,9 +2056,11 @@
 	}
 #endif
       SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
-      if (os9k_stabs)
-	add_symbol_to_list (sym, &global_symbols);
-      else
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs)
+// OBSOLETE 	add_symbol_to_list (sym, &global_symbols);
+// OBSOLETE       else
+#endif /* OBSOLETE OS9K */
 	add_symbol_to_list (sym, &local_symbols);
       break;
 
@@ -2589,21 +2595,24 @@
       break;
 
     case 'f':			/* Function returning another type */
-      if (os9k_stabs && **pp == '(')
-	{
-	  /* Function prototype; parse it.
-	     We must conditionalize this on os9k_stabs because otherwise
-	     it could be confused with a Sun-style (1,3) typenumber
-	     (I think).  */
-	  struct type *t;
-	  ++*pp;
-	  while (**pp != ')')
-	    {
-	      t = read_type (pp, objfile);
-	      if (**pp == ',')
-		++ * pp;
-	    }
-	}
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs && **pp == '(')
+// OBSOLETE 	{
+// OBSOLETE 	  /* Function prototype; parse it.
+// OBSOLETE 	     We must conditionalize this on os9k_stabs because otherwise
+// OBSOLETE 	     it could be confused with a Sun-style (1,3) typenumber
+// OBSOLETE 	     (I think).  */
+// OBSOLETE 	  struct type *t;
+// OBSOLETE 	  ++*pp;
+// OBSOLETE 	  while (**pp != ')')
+// OBSOLETE 	    {
+// OBSOLETE 	      t = read_type (pp, objfile);
+// OBSOLETE 	      if (**pp == ',')
+// OBSOLETE 		++ * pp;
+// OBSOLETE 	    }
+// OBSOLETE 	}
+#endif /* OBSOLETE OS9K */
+
       type1 = read_type (pp, objfile);
       type = make_function_type (type1, dbx_lookup_type (typenums));
       break;
@@ -2684,22 +2693,36 @@
       }
 
     case 'k':			/* Const qualifier on some type (Sun) */
-    case 'c':			/* Const qualifier on some type (OS9000) */
-      /* Because 'c' means other things to AIX and 'k' is perfectly good,
-         only accept 'c' in the os9k_stabs case.  */
-      if (type_descriptor == 'c' && !os9k_stabs)
-	return error_type (pp, objfile);
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       /* ezannoni 2002-07-16: This can be safely deleted, because 'c'
+// OBSOLETE 	 means complex type in AIX stabs, while it means const qualifier
+// OBSOLETE 	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+// OBSOLETE 	 We were erroring out if we were reading AIX stabs.  Right now the
+// OBSOLETE 	 erroring out will happen in the default clause of the switch.  */
+// OBSOLETE     case 'c':			/* Const qualifier on some type (OS9000) */
+// OBSOLETE       /* Because 'c' means other things to AIX and 'k' is perfectly good,
+// OBSOLETE          only accept 'c' in the os9k_stabs case.  */
+// OBSOLETE       if (type_descriptor == 'c' && !os9k_stabs)
+// OBSOLETE 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (1, TYPE_VOLATILE (type), type,
 			   dbx_lookup_type (typenums));
       break;
 
     case 'B':			/* Volatile qual on some type (Sun) */
-    case 'i':			/* Volatile qual on some type (OS9000) */
-      /* Because 'i' means other things to AIX and 'B' is perfectly good,
-         only accept 'i' in the os9k_stabs case.  */
-      if (type_descriptor == 'i' && !os9k_stabs)
-	return error_type (pp, objfile);
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       /* ezannoni 2002-07-16: This can be safely deleted, because 'i'
+// OBSOLETE 	 means imported type in AIX stabs, while it means volatile qualifier
+// OBSOLETE 	 in os9k stabs.  Obviously we were supporting only the os9k meaning.
+// OBSOLETE 	 We were erroring out if we were reading AIX stabs.  Right now the
+// OBSOLETE 	 erroring out will happen in the default clause of the switch.  */
+// OBSOLETE     case 'i':			/* Volatile qual on some type (OS9000) */
+// OBSOLETE       /* Because 'i' means other things to AIX and 'B' is perfectly good,
+// OBSOLETE          only accept 'i' in the os9k_stabs case.  */
+// OBSOLETE       if (type_descriptor == 'i' && !os9k_stabs)
+// OBSOLETE 	return error_type (pp, objfile);
+#endif /* OBSOLETE OS9K */
       type = read_type (pp, objfile);
       type = make_cv_type (TYPE_CONST (type), 1, type,
 			   dbx_lookup_type (typenums));
@@ -2780,7 +2803,8 @@
 	{
 	  struct type *domain = read_type (pp, objfile);
 	  struct type *return_type;
-	  struct type **args;
+	  struct field *args;
+	  int nargs, varargs;
 
 	  if (**pp != ',')
 	    /* Invalid member type data format.  */
@@ -2789,9 +2813,10 @@
 	    ++(*pp);
 
 	  return_type = read_type (pp, objfile);
-	  args = read_args (pp, ';', objfile);
+	  args = read_args (pp, ';', objfile, &nargs, &varargs);
 	  type = dbx_alloc_type (typenums, objfile);
-	  smash_to_method_type (type, domain, return_type, args);
+	  smash_to_method_type (type, domain, return_type, args,
+				nargs, varargs);
 	}
       break;
 
@@ -2802,10 +2827,12 @@
       break;
 
     case 'b':
-      if (os9k_stabs)
-	/* Const and volatile qualified type.  */
-	type = read_type (pp, objfile);
-      else
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs)
+// OBSOLETE 	/* Const and volatile qualified type.  */
+// OBSOLETE 	type = read_type (pp, objfile);
+// OBSOLETE       else
+#endif /* OBSOLETE OS9K */
 	{
 	  /* Sun ACC builtin int type */
 	  type = read_sun_builtin_type (pp, typenums, objfile);
@@ -3664,8 +3691,10 @@
 
   while (**pp != ';' && **pp != '\0')
     {
-      if (os9k_stabs && **pp == ',')
-	break;
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE       if (os9k_stabs && **pp == ',')
+// OBSOLETE 	break;
+#endif /* OBSOLETE OS9K */
       STABS_CONTINUE (pp, objfile);
       /* Get space to record the next field's data.  */
       new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
@@ -3710,8 +3739,9 @@
     }
   if (p[0] == ':' && p[1] == ':')
     {
-      /* chill the list of fields: the last entry (at the head) is a
-         partially constructed entry which we now scrub. */
+      /* (OBSOLETE) chill (OBSOLETE) the list of fields: the last
+         entry (at the head) is a partially constructed entry which we
+         now scrub. */
       fip->list = fip->list->next;
     }
   return 1;
@@ -4327,9 +4357,11 @@
      Fortran adjustable arrays use Adigits or Tdigits for lower or upper;
      for these, produce a type like float[][].  */
 
-  if (os9k_stabs)
-    index_type = builtin_type_int;
-  else
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     index_type = builtin_type_int;
+// OBSOLETE   else
+#endif /* OBSOLETE OS9K */
     {
       index_type = read_type (pp, objfile);
       if (**pp != ';')
@@ -4343,7 +4375,12 @@
       (*pp)++;
       adjustable = 1;
     }
-  lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   lower = read_huge_number (pp, os9k_stabs ? ',' : ';', &nbits);
+#else /* OBSOLETE OS9K */
+  lower = read_huge_number (pp, ';', &nbits);
+#endif /* OBSOLETE OS9K */
+
   if (nbits != 0)
     return error_type (pp, objfile);
 
@@ -4403,15 +4440,17 @@
   osyms = *symlist;
   o_nsyms = osyms ? osyms->nsyms : 0;
 
-  if (os9k_stabs)
-    {
-      /* Size.  Perhaps this does not have to be conditionalized on
-         os9k_stabs (assuming the name of an enum constant can't start
-         with a digit).  */
-      read_huge_number (pp, 0, &nbits);
-      if (nbits != 0)
-	return error_type (pp, objfile);
-    }
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     {
+// OBSOLETE       /* Size.  Perhaps this does not have to be conditionalized on
+// OBSOLETE          os9k_stabs (assuming the name of an enum constant can't start
+// OBSOLETE          with a digit).  */
+// OBSOLETE       read_huge_number (pp, 0, &nbits);
+// OBSOLETE       if (nbits != 0)
+// OBSOLETE 	return error_type (pp, objfile);
+// OBSOLETE     }
+#endif /* OBSOLETE OS9K */
 
   /* The aix4 compiler emits an extra field before the enum members;
      my guess is it's a type of some sort.  Just ignore it.  */
@@ -4650,9 +4689,11 @@
       p++;
     }
 
-  if (os9k_stabs)
-    upper_limit = ULONG_MAX / radix;
-  else
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   if (os9k_stabs)
+// OBSOLETE     upper_limit = ULONG_MAX / radix;
+// OBSOLETE   else
+#endif /* OBSOLETE OS9K */
     upper_limit = LONG_MAX / radix;
 
   while ((c = *p++) >= '0' && c < ('0' + radix))
@@ -4849,9 +4890,11 @@
   else if (self_subrange && n2 == 0 && n3 == 127)
     return init_type (TYPE_CODE_INT, 1, 0, NULL, objfile);
 
-  else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill
-	   && !self_subrange)
-    goto handle_true_range;
+#if 0
+  /* OBSOLETE else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill */
+  /* OBSOLETE          && !self_subrange) */
+  /* OBSOLETE   goto handle_true_range; */
+#endif
 
   /* We used to do this only for subrange of self or subrange of int.  */
   else if (n2 == 0)
@@ -4929,38 +4972,39 @@
    and terminated with END.  Return the list of types read in, or (struct type
    **)-1 if there is an error.  */
 
-static struct type **
-read_args (char **pp, int end, struct objfile *objfile)
+static struct field *
+read_args (char **pp, int end, struct objfile *objfile, int *nargsp,
+	   int *varargsp)
 {
   /* FIXME!  Remove this arbitrary limit!  */
-  struct type *types[1024], **rval;	/* allow for fns of 1023 parameters */
-  int n = 0;
+  struct type *types[1024];	/* allow for fns of 1023 parameters */
+  int n = 0, i;
+  struct field *rval;
 
   while (**pp != end)
     {
       if (**pp != ',')
 	/* Invalid argument list: no ','.  */
-	return (struct type **) -1;
+	return (struct field *) -1;
       (*pp)++;
       STABS_CONTINUE (pp, objfile);
       types[n++] = read_type (pp, objfile);
     }
   (*pp)++;			/* get past `end' (the ':' character) */
 
-  if (n == 1)
-    {
-      rval = (struct type **) xmalloc (2 * sizeof (struct type *));
-    }
-  else if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
-    {
-      rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *));
-      memset (rval + n, 0, sizeof (struct type *));
-    }
+  if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID)
+    *varargsp = 1;
   else
     {
-      rval = (struct type **) xmalloc (n * sizeof (struct type *));
+      n--;
+      *varargsp = 0;
     }
-  memcpy (rval, types, n * sizeof (struct type *));
+
+  rval = (struct field *) xmalloc (n * sizeof (struct field));
+  memset (rval, 0, n * sizeof (struct field));
+  for (i = 0; i < n; i++)
+    rval[i].type = types[i];
+  *nargsp = n;
   return rval;
 }
 
@@ -5363,7 +5407,9 @@
   /* FIXME: If common_block_name is not already NULL, we should complain().  */
   common_block_name = NULL;
 
-  os9k_stabs = 0;
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE   os9k_stabs = 0;
+#endif /* OBSOLETE OS9K */
 }
 
 /* Call after end_symtab() */
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 59504da..d470d47 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -154,8 +154,9 @@
 
 extern void finish_global_stabs (struct objfile *objfile);
 
-
-EXTERN int os9k_stabs;
+#if 0 /* OBSOLETE OS9K */
+// OBSOLETE EXTERN int os9k_stabs;
+#endif /* OBSOLETE OS9K */
 
 /* COFF files can have multiple .stab sections, if they are linked
    using --split-by-reloc.  This linked list is used to pass the
@@ -182,15 +183,14 @@
 					   int number_dependencies,
 					   int textlow_not_set);
 
-extern void
-process_one_symbol (int, int, CORE_ADDR, char *,
-		    struct section_offsets *, struct objfile *);
+extern void process_one_symbol (int, int, CORE_ADDR, char *,
+				struct section_offsets *, struct objfile *);
 
-extern void elfstab_build_psymtabs
-  (struct objfile *objfile,
-   int mainline,
-   file_ptr staboff, unsigned int stabsize,
-   file_ptr stabstroffset, unsigned int stabstrsize);
+extern void elfstab_build_psymtabs (struct objfile *objfile,
+				    int mainline,
+				    file_ptr staboff, unsigned int stabsize,
+				    file_ptr stabstroffset,
+				    unsigned int stabstrsize);
 
 extern void coffstab_build_psymtabs
   (struct objfile *objfile,
diff --git a/gdb/stack.c b/gdb/stack.c
index 2dab0de..fa58963 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -461,7 +461,7 @@
   stb = ui_out_stream_new (uiout);
   old_chain = make_cleanup_ui_out_stream_delete (stb);
 
-  func = find_pc_function (fi->pc);
+  func = find_pc_function (frame_address_in_block (fi));
   if (func)
     {
       /* In certain pathological cases, the symtabs give the wrong
@@ -480,7 +480,7 @@
          ever changed many parts of GDB will need to be changed (and we'll
          create a find_pc_minimal_function or some such).  */
 
-      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
+      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (frame_address_in_block (fi));
       if (msymbol != NULL
 	  && (SYMBOL_VALUE_ADDRESS (msymbol)
 	      > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
@@ -528,7 +528,7 @@
     }
   else
     {
-      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
+      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (frame_address_in_block (fi));
       if (msymbol != NULL)
 	{
 	  funname = SYMBOL_NAME (msymbol);
@@ -929,39 +929,84 @@
       }
   }
 
-  FRAME_INIT_SAVED_REGS (fi);
-  if (fi->saved_regs != NULL)
-    {
-      /* The sp is special; what's returned isn't the save address, but
-         actually the value of the previous frame's sp.  */
-      printf_filtered (" Previous frame's sp is ");
-      print_address_numeric (fi->saved_regs[SP_REGNUM], 1, gdb_stdout);
-      printf_filtered ("\n");
-      count = 0;
-      numregs = NUM_REGS + NUM_PSEUDO_REGS;
-      for (i = 0; i < numregs; i++)
-	if (fi->saved_regs[i] && i != SP_REGNUM)
+  if (fi->saved_regs == NULL)
+    FRAME_INIT_SAVED_REGS (fi);
+  /* Print as much information as possible on the location of all the
+     registers.  */
+  {
+    enum lval_type lval;
+    int optimized;
+    CORE_ADDR addr;
+    int realnum;
+    int count;
+    int i;
+    int need_nl = 1;
+
+    /* The sp is special; what's displayed isn't the save address, but
+       the value of the previous frame's sp.  This is a legacy thing,
+       at one stage the frame cached the previous frame's SP instead
+       of its address, hence it was easiest to just display the cached
+       value.  */
+    if (SP_REGNUM >= 0)
+      {
+	/* Find out the location of the saved stack pointer with out
+           actually evaluating it.  */
+	frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
+			       &realnum, NULL);
+	if (!optimized && lval == not_lval)
 	  {
-	    if (count == 0)
-	      puts_filtered (" Saved registers:\n ");
-	    else
-	      puts_filtered (",");
-	    wrap_here (" ");
-	    printf_filtered (" %s at ", REGISTER_NAME (i));
-	    print_address_numeric (fi->saved_regs[i], 1, gdb_stdout);
-	    count++;
+	    void *value = alloca (MAX_REGISTER_RAW_SIZE);
+	    CORE_ADDR sp;
+	    frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
+				   &realnum, value);
+	    sp = extract_address (value, REGISTER_RAW_SIZE (SP_REGNUM));
+	    printf_filtered (" Previous frame's sp is ");
+	    print_address_numeric (sp, 1, gdb_stdout);
+	    printf_filtered ("\n");
+	    need_nl = 0;
 	  }
-      if (count)
-	puts_filtered ("\n");
-    }
-  else
-    {
-      /* We could get some information about saved registers by
-         calling get_saved_register on each register.  Which info goes
-         with which frame is necessarily lost, however, and I suspect
-         that the users don't care whether they get the info.  */
+	else if (!optimized && lval == lval_memory)
+	  {
+	    printf_filtered (" Previous frame's sp at ");
+	    print_address_numeric (addr, 1, gdb_stdout);
+	    printf_filtered ("\n");
+	    need_nl = 0;
+	  }
+	else if (!optimized && lval == lval_register)
+	  {
+	    printf_filtered (" Previous frame's sp in %s\n",
+			     REGISTER_NAME (realnum));
+	    need_nl = 0;
+	  }
+	/* else keep quiet.  */
+      }
+
+    count = 0;
+    numregs = NUM_REGS + NUM_PSEUDO_REGS;
+    for (i = 0; i < numregs; i++)
+      if (i != SP_REGNUM)
+	{
+	  /* Find out the location of the saved register without
+             fetching the corresponding value.  */
+	  frame_register_unwind (fi, i, &optimized, &lval, &addr, &realnum,
+				 NULL);
+	  /* For moment, only display registers that were saved on the
+	     stack.  */
+	  if (!optimized && lval == lval_memory)
+	    {
+	      if (count == 0)
+		puts_filtered (" Saved registers:\n ");
+	      else
+		puts_filtered (",");
+	      wrap_here (" ");
+	      printf_filtered (" %s at ", REGISTER_NAME (i));
+	      print_address_numeric (addr, 1, gdb_stdout);
+	      count++;
+	    }
+	}
+    if (count || need_nl)
       puts_filtered ("\n");
-    }
+  }
 }
 
 #if 0
@@ -1066,7 +1111,7 @@
 	   fi = get_prev_frame (fi))
 	{
 	  QUIT;
-	  ps = find_pc_psymtab (fi->pc);
+	  ps = find_pc_psymtab (frame_address_in_block (fi));
 	  if (ps)
 	    PSYMTAB_TO_SYMTAB (ps);	/* Force syms to come in */
 	}
@@ -1500,17 +1545,6 @@
     }
 }
 
-
-/* Store the selected frame and its level into *FRAMEP and *LEVELP.
-   If there is no selected frame, *FRAMEP is set to NULL.  */
-
-void
-record_selected_frame (CORE_ADDR *frameaddrp, int *levelp)
-{
-  *frameaddrp = selected_frame ? selected_frame->frame : 0;
-  *levelp = frame_relative_level (selected_frame);
-}
-
 /* Return the symbol-block in which the selected frame is executing.
    Can return zero under various legitimate circumstances.
 
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index b96c901..8177fc2 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -26,6 +26,7 @@
 #include "frame.h"
 #include "gdbtypes.h"
 #include "value.h"
+#include "gdb_string.h"
 
 /* Types that describe the various builtin registers.  */
 
diff --git a/gdb/symfile.c b/gdb/symfile.c
index d087b1f..8d63484 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -38,8 +38,9 @@
 #include "demangle.h"
 #include "inferior.h"		/* for write_pc */
 #include "gdb-stabs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "completer.h"
+#include "bcache.h"
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -1740,8 +1741,10 @@
 		      sizeof (objfile->static_psymbols));
 
 	      /* Free the obstacks for non-reusable objfiles */
-	      free_bcache (&objfile->psymbol_cache);
-	      free_bcache (&objfile->macro_cache);
+	      bcache_xfree (objfile->psymbol_cache);
+	      objfile->psymbol_cache = bcache_xmalloc ();
+	      bcache_xfree (objfile->macro_cache);
+	      objfile->macro_cache = bcache_xmalloc ();
 	      obstack_free (&objfile->psymbol_obstack, 0);
 	      obstack_free (&objfile->symbol_obstack, 0);
 	      obstack_free (&objfile->type_obstack, 0);
@@ -1765,10 +1768,8 @@
 	      objfile->md = NULL;
 	      /* obstack_specify_allocation also initializes the obstack so
 	         it is empty.  */
-	      obstack_specify_allocation (&objfile->psymbol_cache.cache, 0, 0,
-					  xmalloc, xfree);
-	      obstack_specify_allocation (&objfile->macro_cache.cache, 0, 0,
-					  xmalloc, xfree);
+	      objfile->psymbol_cache = bcache_xmalloc ();
+	      objfile->macro_cache = bcache_xmalloc ();
 	      obstack_specify_allocation (&objfile->psymbol_obstack, 0, 0,
 					  xmalloc, xfree);
 	      obstack_specify_allocation (&objfile->symbol_obstack, 0, 0,
@@ -1962,9 +1963,9 @@
       add_filename_language (".c++", language_cplus);
       add_filename_language (".java", language_java);
       add_filename_language (".class", language_java);
-      add_filename_language (".ch", language_chill);
-      add_filename_language (".c186", language_chill);
-      add_filename_language (".c286", language_chill);
+      /* OBSOLETE add_filename_language (".ch", language_chill); */
+      /* OBSOLETE add_filename_language (".c186", language_chill); */
+      /* OBSOLETE add_filename_language (".c286", language_chill); */
       add_filename_language (".f", language_fortran);
       add_filename_language (".F", language_fortran);
       add_filename_language (".s", language_asm);
@@ -2377,7 +2378,7 @@
   /* Create local copy of the partial symbol */
   memcpy (buf, name, namelength);
   buf[namelength] = '\0';
-  SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
+  SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
   /* val and coreaddr are mutually exclusive, one of them *will* be zero */
   if (val != 0)
     {
@@ -2394,7 +2395,7 @@
   SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language);
 
   /* Stash the partial symbol away in the cache */
-  psym = bcache (&psymbol, sizeof (struct partial_symbol), &objfile->psymbol_cache);
+  psym = bcache (&psymbol, sizeof (struct partial_symbol), objfile->psymbol_cache);
 
   /* Save pointer to partial symbol in psymtab, growing symtab if needed. */
   if (list->next >= list->list + list->size)
@@ -2429,7 +2430,7 @@
 
   memcpy (buf, name, namelength);
   buf[namelength] = '\0';
-  SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, &objfile->psymbol_cache);
+  SYMBOL_NAME (&psymbol) = bcache (buf, namelength + 1, objfile->psymbol_cache);
 
   buf = alloca (dem_namelength + 1);
   memcpy (buf, dem_name, dem_namelength);
@@ -2440,11 +2441,11 @@
     case language_c:
     case language_cplus:
       SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) =
-	bcache (buf, dem_namelength + 1, &objfile->psymbol_cache);
+	bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
       break;
-    case language_chill:
-      SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) =
-	bcache (buf, dem_namelength + 1, &objfile->psymbol_cache);
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) = */
+      /* OBSOLETE     bcache (buf, dem_namelength + 1, objfile->psymbol_cache); */
 
       /* FIXME What should be done for the default case? Ignoring for now. */
     }
@@ -2465,7 +2466,7 @@
   SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language);
 
   /* Stash the partial symbol away in the cache */
-  psym = bcache (&psymbol, sizeof (struct partial_symbol), &objfile->psymbol_cache);
+  psym = bcache (&psymbol, sizeof (struct partial_symbol), objfile->psymbol_cache);
 
   /* Save pointer to partial symbol in psymtab, growing symtab if needed. */
   if (list->next >= list->list + list->size)
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 39b10a6..198b2d6 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -1,6 +1,8 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-   1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+   1995, 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation,
+   Inc.
 
    This file is part of GDB.
 
@@ -27,7 +29,7 @@
 #include "objfiles.h"
 #include "breakpoint.h"
 #include "command.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "language.h"
 #include "bcache.h"
 
@@ -86,11 +88,17 @@
 free_symtab_block (struct objfile *objfile, struct block *b)
 {
   register int i, n;
-  n = BLOCK_NSYMS (b);
+  struct symbol *sym, *next_sym;
+
+  n = BLOCK_BUCKETS (b);
   for (i = 0; i < n; i++)
     {
-      xmfree (objfile->md, SYMBOL_NAME (BLOCK_SYM (b, i)));
-      xmfree (objfile->md, (PTR) BLOCK_SYM (b, i));
+      for (sym = BLOCK_BUCKET (b, i); sym; sym = next_sym)
+	{
+	  next_sym = sym->hash_next;
+	  xmfree (objfile->md, SYMBOL_NAME (sym));
+	  xmfree (objfile->md, (PTR) sym);
+	}
     }
   xmfree (objfile->md, (PTR) b);
 }
@@ -161,7 +169,7 @@
   ALL_OBJFILES (objfile)
   {
     printf_filtered ("Byte cache statistics for '%s':\n", objfile->name);
-    print_bcache_statistics (&objfile->psymbol_cache, "partial symbol cache");
+    print_bcache_statistics (objfile->psymbol_cache, "partial symbol cache");
   }
   immediate_quit--;
 }
@@ -196,9 +204,9 @@
     printf_filtered ("  Total memory used for psymbol obstack: %d\n",
 		     obstack_memory_used (&objfile->psymbol_obstack));
     printf_filtered ("  Total memory used for psymbol cache: %d\n",
-		     obstack_memory_used (&objfile->psymbol_cache.cache));
+		     bcache_memory_used (objfile->psymbol_cache));
     printf_filtered ("  Total memory used for macro cache: %d\n",
-		     obstack_memory_used (&objfile->macro_cache.cache));
+		     bcache_memory_used (objfile->macro_cache));
     printf_filtered ("  Total memory used for symbol obstack: %d\n",
 		     obstack_memory_used (&objfile->symbol_obstack));
     printf_filtered ("  Total memory used for type obstack: %d\n",
@@ -457,8 +465,14 @@
 	      fprintf_filtered (outfile, " under ");
 	      gdb_print_host_address (BLOCK_SUPERBLOCK (b), outfile);
 	    }
-	  blen = BLOCK_NSYMS (b);
-	  fprintf_filtered (outfile, ", %d syms in ", blen);
+	  /* drow/2002-07-10: We could save the total symbols count
+	     even if we're using a hashtable, but nothing else but this message
+	     wants it.  */
+	  blen = BLOCK_BUCKETS (b);
+	  if (BLOCK_HASHTABLE (b))
+	    fprintf_filtered (outfile, ", %d buckets in ", blen);
+	  else
+	    fprintf_filtered (outfile, ", %d syms in ", blen);
 	  print_address_numeric (BLOCK_START (b), 1, outfile);
 	  fprintf_filtered (outfile, "..");
 	  print_address_numeric (BLOCK_END (b), 1, outfile);
@@ -474,8 +488,8 @@
 	  if (BLOCK_GCC_COMPILED (b))
 	    fprintf_filtered (outfile, ", compiled with gcc%d", BLOCK_GCC_COMPILED (b));
 	  fprintf_filtered (outfile, "\n");
-	  /* Now print each symbol in this block.  */
-	  /* FIXMED: Sort?  */
+	  /* Now print each symbol in this block (in no particular order, if
+	     we're using a hashtable).  */
 	  ALL_BLOCK_SYMBOLS (b, j, sym)
 	    {
 	      struct print_symbol_args s;
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3d687be..d39962e 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -40,7 +40,7 @@
 #include "linespec.h"
 #include "filenames.h"		/* for FILENAME_CMP */
 
-#include "obstack.h"
+#include "gdb_obstack.h"
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -438,24 +438,26 @@
           gsymbol->language_specific.cplus_specific.demangled_name = NULL;
         }
     }
-  if (demangled == NULL
-      && (gsymbol->language == language_chill
-          || gsymbol->language == language_auto))
-    {
-      demangled =
-        chill_demangle (gsymbol->name);
-      if (demangled != NULL)
-        {
-          gsymbol->language = language_chill;
-          gsymbol->language_specific.chill_specific.demangled_name =
-            obsavestring (demangled, strlen (demangled), obstack);
-          xfree (demangled);
-        }
-      else
-        {
-          gsymbol->language_specific.chill_specific.demangled_name = NULL;
-        }
-    }
+#if 0
+  /* OBSOLETE if (demangled == NULL */
+  /* OBSOLETE     && (gsymbol->language == language_chill */
+  /* OBSOLETE         || gsymbol->language == language_auto)) */
+  /* OBSOLETE   { */
+  /* OBSOLETE     demangled = */
+  /* OBSOLETE       chill_demangle (gsymbol->name); */
+  /* OBSOLETE     if (demangled != NULL) */
+  /* OBSOLETE       { */
+  /* OBSOLETE         gsymbol->language = language_chill; */
+  /* OBSOLETE         gsymbol->language_specific.chill_specific.demangled_name = */
+  /* OBSOLETE           obsavestring (demangled, strlen (demangled), obstack); */
+  /* OBSOLETE         xfree (demangled); */
+  /* OBSOLETE       } */
+  /* OBSOLETE     else */
+  /* OBSOLETE       { */
+  /* OBSOLETE         gsymbol->language_specific.chill_specific.demangled_name = NULL; */
+  /* OBSOLETE       } */
+  /* OBSOLETE   } */
+#endif
 }
 
 
@@ -679,12 +681,27 @@
 	       const namespace_enum namespace, int *is_a_field_of_this,
 	       struct symtab **symtab)
 {
-  char *modified_name = NULL;
-  char *modified_name2 = NULL;
+  char *demangled_name = NULL;
+  const char *modified_name = NULL;
   const char *mangled_name = NULL;
   int needtofreename = 0;
   struct symbol *returnval;
 
+  modified_name = name;
+
+  /* If we are using C++ language, demangle the name before doing a lookup, so
+     we can always binary search. */
+  if (current_language->la_language == language_cplus)
+    {
+      demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
+      if (demangled_name)
+	{
+	  mangled_name = name;
+	  modified_name = demangled_name;
+	  needtofreename = 1;
+	}
+    }
+
   if (case_sensitivity == case_sensitive_off)
     {
       char *copy;
@@ -697,26 +714,11 @@
       copy[len] = 0;
       modified_name = copy;
     }
-  else 
-      modified_name = (char *) name;
-
-  /* If we are using C++ language, demangle the name before doing a lookup, so
-     we can always binary search. */
-  if (current_language->la_language == language_cplus)
-    {
-      modified_name2 = cplus_demangle (modified_name, DMGL_ANSI | DMGL_PARAMS);
-      if (modified_name2)
-	{
-	  mangled_name = name;
-	  modified_name = modified_name2;
-	  needtofreename = 1;
-	}
-    }
 
   returnval = lookup_symbol_aux (modified_name, mangled_name, block,
 				 namespace, is_a_field_of_this, symtab);
   if (needtofreename)
-    xfree (modified_name2);
+    xfree (demangled_name);
 
   return returnval;	 
 }
@@ -1328,6 +1330,22 @@
   register struct symbol *sym_found = NULL;
   register int do_linear_search = 1;
 
+  if (BLOCK_HASHTABLE (block))
+    {
+      unsigned int hash_index;
+      hash_index = msymbol_hash_iw (name);
+      hash_index = hash_index % BLOCK_BUCKETS (block);
+      for (sym = BLOCK_BUCKET (block, hash_index); sym; sym = sym->hash_next)
+	{
+	  if (SYMBOL_NAMESPACE (sym) == namespace 
+	      && (mangled_name
+		  ? strcmp (SYMBOL_NAME (sym), mangled_name) == 0
+		  : SYMBOL_MATCHES_NAME (sym, name)))
+	    return sym;
+	}
+      return NULL;
+    }
+
   /* If the blocks's symbols were sorted, start with a binary search.  */
 
   if (BLOCK_SHOULD_SORT (block))
@@ -1582,14 +1600,15 @@
 	if (section != 0)
 	  {
 	    int i;
+	    struct symbol *sym = NULL;
 
-	    for (i = 0; i < b->nsyms; i++)
+	    ALL_BLOCK_SYMBOLS (b, i, sym)
 	      {
-		fixup_symbol_section (b->sym[i], objfile);
-		if (section == SYMBOL_BFD_SECTION (b->sym[i]))
+		fixup_symbol_section (sym, objfile);
+		if (section == SYMBOL_BFD_SECTION (sym))
 		  break;
 	      }
-	    if (i >= b->nsyms)
+	    if ((i >= BLOCK_BUCKETS (b)) && (sym == NULL))
 	      continue;		/* no symbol in this symtab matches section */
 	  }
 	distance = BLOCK_END (b) - BLOCK_START (b);
@@ -1661,10 +1680,8 @@
       {
 	QUIT;
 	block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), blocknum);
-	top = BLOCK_NSYMS (block);
-	for (bot = 0; bot < top; bot++)
+	ALL_BLOCK_SYMBOLS (block, bot, sym)
 	  {
-	    sym = BLOCK_SYM (block, bot);
 	    switch (SYMBOL_CLASS (sym))
 	      {
 	      case LOC_STATIC:
@@ -2795,10 +2812,9 @@
 	  struct symbol_search *prevtail = tail;
 	  int nfound = 0;
 	  b = BLOCKVECTOR_BLOCK (bv, i);
-	  for (j = 0; j < BLOCK_NSYMS (b); j++)
+	  ALL_BLOCK_SYMBOLS (b, j, sym)
 	    {
 	      QUIT;
-	      sym = BLOCK_SYM (b, j);
 	      if (file_matches (s->filename, files, nfiles)
 		  && ((regexp == NULL || SYMBOL_MATCHES_REGEXP (sym))
 		      && ((kind == VARIABLES_NAMESPACE && SYMBOL_CLASS (sym) != LOC_TYPEDEF
@@ -3719,6 +3735,49 @@
 
 
 /* Begin overload resolution functions */
+
+static char *
+remove_params (const char *demangled_name)
+{
+  const char *argp;
+  char *new_name;
+  int depth;
+
+  if (demangled_name == NULL)
+    return NULL;
+
+  /* First find the end of the arg list.  */
+  argp = strrchr (demangled_name, ')');
+  if (argp == NULL)
+    return NULL;
+
+  /* Back up to the beginning.  */
+  depth = 1;
+
+  while (argp-- > demangled_name)
+    {
+      if (*argp == ')')
+	depth ++;
+      else if (*argp == '(')
+	{
+	  depth --;
+
+	  if (depth == 0)
+	    break;
+	}
+    }
+  if (depth != 0)
+    internal_error (__FILE__, __LINE__,
+		    "bad demangled name %s\n", demangled_name);
+  while (argp[-1] == ' ' && argp > demangled_name)
+    argp --;
+
+  new_name = xmalloc (argp - demangled_name + 1);
+  memcpy (new_name, demangled_name, argp - demangled_name);
+  new_name[argp - demangled_name] = '\0';
+  return new_name;
+}
+
 /* Helper routine for make_symbol_completion_list.  */
 
 static int sym_return_val_size;
@@ -3734,21 +3793,7 @@
 {
   int newsize;
   int i;
-
-  /* Get the demangled name without parameters */
-  char *sym_name = cplus_demangle (SYMBOL_NAME (sym), DMGL_ARM | DMGL_ANSI);
-  if (!sym_name)
-    {
-      sym_name = (char *) xmalloc (strlen (SYMBOL_NAME (sym)) + 1);
-      strcpy (sym_name, SYMBOL_NAME (sym));
-    }
-
-  /* skip symbols that cannot match */
-  if (strcmp (sym_name, oload_name) != 0)
-    {
-      xfree (sym_name);
-      return;
-    }
+  char *sym_name;
 
   /* If there is no type information, we can't do anything, so skip */
   if (SYMBOL_TYPE (sym) == NULL)
@@ -3759,6 +3804,20 @@
     if (!strcmp (SYMBOL_NAME (sym), SYMBOL_NAME (sym_return_val[i])))
       return;
 
+  /* Get the demangled name without parameters */
+  sym_name = remove_params (SYMBOL_DEMANGLED_NAME (sym));
+  if (!sym_name)
+    return;
+
+  /* skip symbols that cannot match */
+  if (strcmp (sym_name, oload_name) != 0)
+    {
+      xfree (sym_name);
+      return;
+    }
+
+  xfree (sym_name);
+
   /* We have a match for an overload instance, so add SYM to the current list
    * of overload instances */
   if (sym_return_val_index + 3 > sym_return_val_size)
@@ -3768,8 +3827,6 @@
     }
   sym_return_val[sym_return_val_index++] = sym;
   sym_return_val[sym_return_val_index] = NULL;
-
-  xfree (sym_name);
 }
 
 /* Return a null-terminated list of pointers to function symbols that
@@ -3792,14 +3849,17 @@
   /* Length of name.  */
   int oload_name_len = 0;
 
-  /* Look for the symbol we are supposed to complete on.
-   * FIXME: This should be language-specific.  */
+  /* Look for the symbol we are supposed to complete on.  */
 
-  oload_name = cplus_demangle (SYMBOL_NAME (fsym), DMGL_ARM | DMGL_ANSI);
+  oload_name = remove_params (SYMBOL_DEMANGLED_NAME (fsym));
   if (!oload_name)
     {
-      oload_name = (char *) xmalloc (strlen (SYMBOL_NAME (fsym)) + 1);
-      strcpy (oload_name, SYMBOL_NAME (fsym));
+      sym_return_val_size = 1;
+      sym_return_val = (struct symbol **) xmalloc (2 * sizeof (struct symbol *));
+      sym_return_val[0] = fsym;
+      sym_return_val[1] = NULL;
+
+      return sym_return_val;
     }
   oload_name_len = strlen (oload_name);
 
diff --git a/gdb/symtab.h b/gdb/symtab.h
index bb22d0d..7f511f0 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -23,12 +23,8 @@
 #if !defined (SYMTAB_H)
 #define SYMTAB_H 1
 
-/* Some definitions and declarations to go with use of obstacks.  */
-
-#include "obstack.h"
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free xfree
-#include "bcache.h"
+/* Opaque declarations.  */
+struct obstack;
 
 /* Don't do this; it means that if some .o's are compiled with GNU C
    and some are not (easy to do accidentally the way we configure
@@ -93,11 +89,13 @@
 	    char *demangled_name;
 	  }
 	cplus_specific;
-	struct chill_specific	/* For Chill */
-	  {
-	    char *demangled_name;
-	  }
-	chill_specific;
+#if 0
+	/* OBSOLETE struct chill_specific	 *//* For Chill */
+	/* OBSOLETE   { */
+	/* OBSOLETE     char *demangled_name; */
+	/* OBSOLETE   } */
+	/* OBSOLETE chill_specific; */
+#endif
       }
     language_specific;
 
@@ -148,10 +146,10 @@
       {									\
 	SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL;			\
       }									\
-    else if (SYMBOL_LANGUAGE (symbol) == language_chill)		\
-      {									\
-	SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL;			\
-      }									\
+    /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \
+    /* OBSOLETE   { */						 	\
+    /* OBSOLETE     SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */	\
+    /* OBSOLETE   } */							\
     else								\
       {									\
 	memset (&(symbol)->ginfo.language_specific, 0,			\
@@ -172,12 +170,12 @@
   (SYMBOL_LANGUAGE (symbol) == language_cplus				\
    || SYMBOL_LANGUAGE (symbol) == language_java				\
    ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol)				\
-   : (SYMBOL_LANGUAGE (symbol) == language_chill			\
-      ? SYMBOL_CHILL_DEMANGLED_NAME (symbol)				\
-      : NULL))
+   : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */		\
+     /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */		\
+     NULL)
 
-#define SYMBOL_CHILL_DEMANGLED_NAME(symbol)				\
-  (symbol)->ginfo.language_specific.chill_specific.demangled_name
+/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
+/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
 
 /* Macro that returns the "natural source name" of a symbol.  In C++ this is
    the "demangled" form of the name if demangle is on and the "mangled" form
@@ -387,6 +385,25 @@
 
     unsigned char gcc_compile_flag;
 
+    /* The symbols for this block are either in a simple linear list or
+       in a simple hashtable.  Blocks which correspond to a function
+       (which have a list of symbols corresponding to arguments) use
+       a linear list, as do some older symbol readers (currently only
+       mdebugread and dstread).  Other blocks are hashed.
+
+       The hashtable uses the same hash function as the minsym hashtables,
+       found in minsyms.c:minsym_hash_iw.  Symbols are hashed based on
+       their demangled name if appropriate, and on their name otherwise.
+       The hash function ignores space, and stops at the beginning of the
+       argument list if any.
+
+       The table is laid out in NSYMS/5 buckets and symbols are chained via
+       their hash_next field.  */
+
+    /* If this is really a hashtable of the symbols, this flag is 1.  */
+
+    unsigned char hashtable;
+
     /* Number of local symbols.  */
 
     int nsyms;
@@ -399,30 +416,38 @@
 
 #define BLOCK_START(bl)		(bl)->startaddr
 #define BLOCK_END(bl)		(bl)->endaddr
-#define BLOCK_NSYMS(bl)		(bl)->nsyms
-#define BLOCK_SYM(bl, n)	(bl)->sym[n]
 #define BLOCK_FUNCTION(bl)	(bl)->function
 #define BLOCK_SUPERBLOCK(bl)	(bl)->superblock
 #define BLOCK_GCC_COMPILED(bl)	(bl)->gcc_compile_flag
+#define BLOCK_HASHTABLE(bl)	(bl)->hashtable
 
-/* Macro to loop through all symbols in a block BL.
-   i counts which symbol we are looking at, and sym points to the current
-   symbol.
-   The contortion at the end is to avoid reading past the last valid
-   BLOCK_SYM.  */
-#define ALL_BLOCK_SYMBOLS(bl, i, sym)			\
-	for ((i) = 0, (sym) = BLOCK_SYM ((bl), (i));	\
-	     (i) < BLOCK_NSYMS ((bl));			\
-	     ++(i), (sym) = ((i) < BLOCK_NSYMS ((bl)))	\
-			    ? BLOCK_SYM ((bl), (i))	\
-			    : NULL)
+/* For blocks without a hashtable (BLOCK_HASHTABLE (bl) == 0) only.  */
+#define BLOCK_NSYMS(bl)		(bl)->nsyms
+#define BLOCK_SYM(bl, n)	(bl)->sym[n]
+
+/* For blocks with a hashtable, but these are valid for non-hashed blocks as
+   well - each symbol will appear to be one bucket by itself.  */
+#define BLOCK_BUCKETS(bl)	(bl)->nsyms
+#define BLOCK_BUCKET(bl, n)	(bl)->sym[n]
+
+/* Macro used to set the size of a hashtable for N symbols.  */
+#define BLOCK_HASHTABLE_SIZE(n)	((n)/5 + 1)
+
+/* Macro to loop through all symbols in a block BL, in no particular order.
+   i counts which bucket we are in, and sym points to the current symbol.  */
+
+#define ALL_BLOCK_SYMBOLS(bl, i, sym)				\
+	for ((i) = 0; (i) < BLOCK_BUCKETS ((bl)); (i)++)	\
+	  for ((sym) = BLOCK_BUCKET ((bl), (i)); (sym);		\
+	       (sym) = (sym)->hash_next)
 
 /* Nonzero if symbols of block BL should be sorted alphabetically.
    Don't sort a block which corresponds to a function.  If we did the
    sorting would have to preserve the order of the symbols for the
-   arguments.  */
+   arguments.  Also don't sort any block that we chose to hash.  */
 
-#define BLOCK_SHOULD_SORT(bl) ((bl)->nsyms >= 40 && BLOCK_FUNCTION (bl) == NULL)
+#define BLOCK_SHOULD_SORT(bl) (! BLOCK_HASHTABLE (bl) \
+			       && BLOCK_FUNCTION (bl) == NULL)
 
 
 /* Represent one symbol name; a variable, constant, function or typedef.  */
@@ -672,6 +697,8 @@
     /* List of ranges where this symbol is active.  This is only
        used by alias symbols at the current time.  */
     struct range_list *ranges;
+
+    struct symbol *hash_next;
   };
 
 
@@ -1077,9 +1104,8 @@
 
 extern void clear_pc_function_cache (void);
 
-extern int
-find_pc_sect_partial_function (CORE_ADDR, asection *,
-			       char **, CORE_ADDR *, CORE_ADDR *);
+extern int find_pc_sect_partial_function (CORE_ADDR, asection *,
+					  char **, CORE_ADDR *, CORE_ADDR *);
 
 /* from symtab.c: */
 
diff --git a/gdb/target.c b/gdb/target.c
index 2cd4928..ec1979b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -52,6 +52,8 @@
 
 static void default_terminal_info (char *, int);
 
+static int default_region_size_ok_for_hw_watchpoint (int);
+
 static int nosymbol (char *, CORE_ADDR *);
 
 static void tcomplain (void);
@@ -62,6 +64,8 @@
 
 static int return_one (void);
 
+static int return_minus_one (void);
+
 void target_ignore (void);
 
 static void target_command (char *, int);
@@ -103,9 +107,8 @@
 
 static void debug_to_prepare_to_store (void);
 
-static int
-debug_to_xfer_memory (CORE_ADDR, char *, int, int, struct mem_attrib *, 
-		      struct target_ops *);
+static int debug_to_xfer_memory (CORE_ADDR, char *, int, int,
+				 struct mem_attrib *, struct target_ops *);
 
 static void debug_to_files_info (struct target_ops *);
 
@@ -113,6 +116,22 @@
 
 static int debug_to_remove_breakpoint (CORE_ADDR, char *);
 
+static int debug_to_can_use_hw_breakpoint (int, int, int);
+
+static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *);
+
+static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *);
+
+static int debug_to_insert_watchpoint (CORE_ADDR, int, int);
+
+static int debug_to_remove_watchpoint (CORE_ADDR, int, int);
+
+static int debug_to_stopped_by_watchpoint (void);
+
+static CORE_ADDR debug_to_stopped_data_address (void);
+
+static int debug_to_region_size_ok_for_hw_watchpoint (int);
+
 static void debug_to_terminal_init (void);
 
 static void debug_to_terminal_inferior (void);
@@ -391,6 +410,29 @@
 	    memory_insert_breakpoint);
   de_fault (to_remove_breakpoint, 
 	    memory_remove_breakpoint);
+  de_fault (to_can_use_hw_breakpoint,
+	    (int (*) (int, int, int))
+	    return_zero);
+  de_fault (to_insert_hw_breakpoint,
+	    (int (*) (CORE_ADDR, char *))
+	    return_minus_one);
+  de_fault (to_remove_hw_breakpoint,
+	    (int (*) (CORE_ADDR, char *))
+	    return_minus_one);
+  de_fault (to_insert_watchpoint,
+	    (int (*) (CORE_ADDR, int, int))
+	    return_minus_one);
+  de_fault (to_remove_watchpoint,
+	    (int (*) (CORE_ADDR, int, int))
+	    return_minus_one);
+  de_fault (to_stopped_by_watchpoint,
+	    (int (*) (void))
+	    return_zero);
+  de_fault (to_stopped_data_address,
+	    (CORE_ADDR (*) (void))
+	    return_zero);
+  de_fault (to_region_size_ok_for_hw_watchpoint,
+	    default_region_size_ok_for_hw_watchpoint);
   de_fault (to_terminal_init, 
 	    (void (*) (void)) 
 	    target_ignore);
@@ -554,6 +596,14 @@
       INHERIT (to_files_info, t);
       INHERIT (to_insert_breakpoint, t);
       INHERIT (to_remove_breakpoint, t);
+      INHERIT (to_can_use_hw_breakpoint, t);
+      INHERIT (to_insert_hw_breakpoint, t);
+      INHERIT (to_remove_hw_breakpoint, t);
+      INHERIT (to_insert_watchpoint, t);
+      INHERIT (to_remove_watchpoint, t);
+      INHERIT (to_stopped_data_address, t);
+      INHERIT (to_stopped_by_watchpoint, t);
+      INHERIT (to_region_size_ok_for_hw_watchpoint, t);
       INHERIT (to_terminal_init, t);
       INHERIT (to_terminal_inferior, t);
       INHERIT (to_terminal_ours_for_output, t);
@@ -1228,6 +1278,12 @@
 }
 
 static int
+default_region_size_ok_for_hw_watchpoint (int byte_count)
+{
+  return (byte_count <= REGISTER_SIZE);
+}
+
+static int
 return_zero (void)
 {
   return 0;
@@ -1239,6 +1295,12 @@
   return 1;
 }
 
+static int
+return_minus_one (void)
+{
+  return -1;
+}
+
 /*
  * Resize the to_sections pointer.  Also make sure that anyone that
  * was holding on to an old value of it gets updated.
@@ -1775,6 +1837,116 @@
   return retval;
 }
 
+static int
+debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty)
+{
+  int retval;
+
+  retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n",
+		      (unsigned long) type,
+		      (unsigned long) cnt,
+		      (unsigned long) from_tty,
+		      (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_region_size_ok_for_hw_watchpoint (int byte_count)
+{
+  CORE_ADDR retval;
+
+  retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n",
+		      (unsigned long) byte_count,
+		      (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_stopped_by_watchpoint (void)
+{
+  int retval;
+
+  retval = debug_target.to_stopped_by_watchpoint ();
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "STOPPED_BY_WATCHPOINT () = %ld\n",
+		      (unsigned long) retval);
+  return retval;
+}
+
+static CORE_ADDR
+debug_to_stopped_data_address (void)
+{
+  CORE_ADDR retval;
+
+  retval = debug_target.to_stopped_data_address ();
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_stopped_data_address () = 0x%lx\n",
+		      (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save)
+{
+  int retval;
+
+  retval = debug_target.to_insert_hw_breakpoint (addr, save);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n",
+		      (unsigned long) addr,
+		      (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save)
+{
+  int retval;
+
+  retval = debug_target.to_remove_hw_breakpoint (addr, save);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n",
+		      (unsigned long) addr,
+		      (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type)
+{
+  int retval;
+
+  retval = debug_target.to_insert_watchpoint (addr, len, type);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
+		      (unsigned long) addr, len, type, (unsigned long) retval);
+  return retval;
+}
+
+static int
+debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type)
+{
+  int retval;
+
+  retval = debug_target.to_insert_watchpoint (addr, len, type);
+
+  fprintf_unfiltered (gdb_stdlog,
+		      "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
+		      (unsigned long) addr, len, type, (unsigned long) retval);
+  return retval;
+}
+
 static void
 debug_to_terminal_init (void)
 {
@@ -2221,6 +2393,14 @@
   current_target.to_files_info = debug_to_files_info;
   current_target.to_insert_breakpoint = debug_to_insert_breakpoint;
   current_target.to_remove_breakpoint = debug_to_remove_breakpoint;
+  current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint;
+  current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint;
+  current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint;
+  current_target.to_insert_watchpoint = debug_to_insert_watchpoint;
+  current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
+  current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
+  current_target.to_stopped_data_address = debug_to_stopped_data_address;
+  current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint;
   current_target.to_terminal_init = debug_to_terminal_init;
   current_target.to_terminal_inferior = debug_to_terminal_inferior;
   current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
@@ -2299,16 +2479,15 @@
 When non-zero, target debugging is enabled.", &setdebuglist),
      &showdebuglist);
 
-  add_show_from_set 
-    (add_set_boolean_cmd 
-     ("trust-readonly-sections", class_support, 
-      &trust_readonly, 
-      "Set mode for reading from readonly sections.\n\
+  add_setshow_boolean_cmd ("trust-readonly-sections", class_support, 
+			   &trust_readonly, "\
+Set mode for reading from readonly sections.\n\
 When this mode is on, memory reads from readonly sections (such as .text)\n\
 will be read from the object file instead of from the target.  This will\n\
-result in significant performance improvement for remote targets.",
-      &setlist),
-     &showlist);
+result in significant performance improvement for remote targets.", "\
+Show mode for reading from readonly sections.\n",
+			   NULL, NULL,
+			   &setlist, &showlist);
 
   add_com ("monitor", class_obscure, do_monitor_command,
 	   "Send a command to the remote monitor (remote targets only).");
diff --git a/gdb/target.h b/gdb/target.h
index 1797fc1..c165801 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -252,6 +252,14 @@
     void (*to_files_info) (struct target_ops *);
     int (*to_insert_breakpoint) (CORE_ADDR, char *);
     int (*to_remove_breakpoint) (CORE_ADDR, char *);
+    int (*to_can_use_hw_breakpoint) (int, int, int);
+    int (*to_insert_hw_breakpoint) (CORE_ADDR, char *);
+    int (*to_remove_hw_breakpoint) (CORE_ADDR, char *);
+    int (*to_remove_watchpoint) (CORE_ADDR, int, int);
+    int (*to_insert_watchpoint) (CORE_ADDR, int, int);
+    int (*to_stopped_by_watchpoint) (void);
+    CORE_ADDR (*to_stopped_data_address) (void);
+    int (*to_region_size_ok_for_hw_watchpoint) (int);
     void (*to_terminal_init) (void);
     void (*to_terminal_inferior) (void);
     void (*to_terminal_ours_for_output) (void);
@@ -1041,7 +1049,8 @@
    write).  */
 
 #ifndef STOPPED_BY_WATCHPOINT
-#define STOPPED_BY_WATCHPOINT(w) 0
+#define STOPPED_BY_WATCHPOINT(w) \
+   (*current_target.to_stopped_by_watchpoint) ()
 #endif
 
 /* HP-UX supplies these operations, which respectively disable and enable
@@ -1056,20 +1065,24 @@
 #define TARGET_ENABLE_HW_WATCHPOINTS(pid)
 #endif
 
-/* Provide defaults for systems that don't support hardware watchpoints.  */
+/* Provide defaults for hardware watchpoint functions.  */
 
-#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
+/* If the *_hw_beakpoint functions have not been defined 
+   elsewhere use the definitions in the target vector.  */
 
 /* Returns non-zero if we can set a hardware watchpoint of type TYPE.  TYPE is
    one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint, or
    bp_hardware_breakpoint.  CNT is the number of such watchpoints used so far
    (including this one?).  OTHERTYPE is who knows what...  */
 
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) 0
+#ifndef TARGET_CAN_USE_HARDWARE_WATCHPOINT
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) \
+ (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
+#endif
 
 #if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
 #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
-     ((LONGEST)(byte_count) <= REGISTER_SIZE)
+    (*current_target.to_region_size_ok_for_hw_watchpoint) (byte_count)
 #endif
 
 
@@ -1077,18 +1090,25 @@
    for write, 1 for read, and 2 for read/write accesses.  Returns 0 for
    success, non-zero for failure.  */
 
-#define target_remove_watchpoint(ADDR,LEN,TYPE) -1
-#define target_insert_watchpoint(ADDR,LEN,TYPE) -1
+#ifndef target_insert_watchpoint
+#define	target_insert_watchpoint(addr, len, type)	\
+     (*current_target.to_insert_watchpoint) (addr, len, type)
 
-#endif /* TARGET_HAS_HARDWARE_WATCHPOINTS */
+#define	target_remove_watchpoint(addr, len, type)	\
+     (*current_target.to_remove_watchpoint) (addr, len, type)
+#endif
 
 #ifndef target_insert_hw_breakpoint
-#define target_remove_hw_breakpoint(ADDR,SHADOW) -1
-#define target_insert_hw_breakpoint(ADDR,SHADOW) -1
+#define target_insert_hw_breakpoint(addr, save) \
+     (*current_target.to_insert_hw_breakpoint) (addr, save)
+
+#define target_remove_hw_breakpoint(addr, save) \
+     (*current_target.to_remove_hw_breakpoint) (addr, save)
 #endif
 
 #ifndef target_stopped_data_address
-#define target_stopped_data_address() 0
+#define target_stopped_data_address() \
+    (*current_target.to_stopped_data_address) ()
 #endif
 
 /* If defined, then we need to decr pc by this much after a hardware break-
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c033fa3..e47afec 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,12 +1,145 @@
-2002-05-27  Michael Chastain  <mec@shout.net>
-From Benjamin Kosnik  <bkoz@redhat.com>
+2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
 
+	* gdb.threads/print-threads.c: New file.
+	* gdb.threads/print-threads.exp: New file.
+	* gdb.threads/schedlock.c: New file.
+	* gdb.threads/schedlock.exp: New file.
+
+2002-08-22  Elena Zannoni  <ezannoni@redhat.com>
+
+        * gdb.arch/altivec-abi.exp: The source C file is altivec-abi.c,
+        not altivec.c.
+
+2002-08-17  Mark Kettenis  <kettenis@gnu.org>
+
+	* gdb.base/return.exp: Remove i*86-*-* from list of xfail'ed
+	targets.  The problem should be fixed now.
+
+2002-08-15  Mark Kettenis  <kettenis@gnu.org>
+
+	* gdb.java/jv-print.exp: Fix p '' and p ''' tests to deal with
+	2002-07-24 change that removes final dots from error messages.
+
+2002-08-13  Tom Tromey  <tromey@redhat.com>
+
+	* gdb.base/readline.exp: New file.
+
+2002-08-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* lib/gdb.exp (gdb_expect_list): Only print one pass, fail, or
+	supress message.
+
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
+	CHILL_FOR_TARGET and CHILL_LIB.
+	* configure.in (configdirs): Remove gdb.chill.
+	* configure: Regenerate.
+	* lib/gdb.exp: Obsolete references to chill.
+	* gdb.fortran/types.exp: Ditto.
+	* gdb.fortran/exprs.exp: Ditto.
+
+2002-07-30  Kevin Buettner  <kevinb@redhat.com>
+
+	* gdb.base/shlib-call.exp (additional_flags): Conditionally
+	set Irix-specific compile and link flags.
+
+2002-07-29  Kevin Buettner  <kevinb@redhat.com>
+
+	* lib/gdb.exp (mips*-*-irix*): Use alternate method for preprocessing
+	source files.  The ``-o'' option doesn't work with the ``-E'' option
+	when using the Irix compiler.
+
+2002-07-19  Daniel Jacobowitz  <drow@mvista.com>
+
+	* config/gdbserver.exp (gdb_load): Don't use TCL varargs.
+	Improve support for reusing an exec file.  Copy exec file
+	to target, and run gdbserver on the target instead of on the host.
+
+2002-07-18  Jim Blandy  <jimb@redhat.com>
+
+	* gdb.base/ending-run.exp: Don't expect to see the program end in
+	some orderly fashion when we're running on a real stand-alone
+	board.
+
+	* gdb.base/interrupt.exp: Correct logic for skipping tests on
+	targets that don't support interrupts.
+
+2002-07-10  Paul N. Hilfinger  <hilfingr@otisco.mckusick.com>
+
+	* gdb.base/attach.exp: Add patterns to match output from /proc-based
+	systems.
+	Move comments in expect statements to inside the actions, so that they
+	don't get matched against.
+
+2002-07-10  Mark Kettenis  <kettenis@gnu.org>
+
+	* gdb.base/interrupt.exp: Setup xfail for all i386 BSD's on "call
+	function when asleep" test.
+
+2002-07-10  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.base/page.exp: Rewrite to handle problems with very long
+	`info set' output.  Update copyright.
+
+2002-06-26  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.hp/configure.in (AC_CONFIG_SUBDIRS): Do not try to configure
+	gdb.threads-hp.
+	* gdb.hp/configure: Regenerate.
+	* gdb.hp/gdb.threads-hp/configure.in: Delete file.
+	* gdb.hp/gdb.threads-hp/configure: Delete file.
+	* gdb.hp/gdb.threads-hp/Makefile.in: Delete file.
+
+2002-06-22  Andrew Cagney  <ac131313@redhat.com>
+
+	* gdb.base/selftest.exp (do_stes_and_next): Skip calls to
+	setlocale, bindtextdomain and textdomain.
+
+2002-06-11  Jim Blandy  <jimb@redhat.com>
+
+	* lib/gdb.exp (get_debug_format): Tolerate message saying whether
+	preprocessor macro information is present.
+
+	* macscp.exp, macscp1.c, macscp2.h, macscp3.h, macscp4.h: New
+	tests.
+
+2002-06-06  Michael Snyder  <msnyder@redhat.com>
+
+	* gdb.base/overlays.exp: Record addresses of overlay
+	functions in TCL variables rather than in GDB variables,
+	to avoid having GDB convert them to pointers (with loss
+	of information).
+
+	* gdb.base/d10v.ld: Merge in several years worth of 
+	default linker script changes.
+	* gdb.base/long_long.exp: Add check for sizeof (long double).
+
+2002-06-06  Michal Ludvig  <mludvig@suse.cz>
+
+	* gdb.asm/asm-source.exp: Add x86-64 target.
+	* gdb.asm/x86_64.inc: New.
+	
+2002-05-30  Michael Chastain  <mec@shout.net>
+
+	From Benjamin Kosnik <bkoz@redhat.com>:
+	* gdb.c++/m-static.cc: New file.
+	* gdb.c++/m-static.exp: New file.
+
+2002-05-28  Michael Snyder  <msnyder@redhat.com>
+
+	* gdb.base/call-ar-st.exp: Allow for reduced floating point
+	precision.
+
+2002-05-27  Michael Chastain  <mec@shout.net>
+
+	From Benjamin Kosnik <bkoz@redhat.com>:
 	* gdb.c++/m-data.cc: New file.
 	* gdb.c++/m-data.exp: New file.
 
 2002-05-27  Michael Chastain  <mec@shout.net>
-From Benjamin Kosnik  <bkoz@redhat.com>
 
+	From Benjamin Kosnik <bkoz@redhat.com>:
 	* gdb.c++/try_catch.cc: New file.
 	* gdb.c++/try_catch.exp: New file.	
 
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index b936e39..f7f610a 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -67,10 +67,6 @@
         'CC=$$(CC_FOR_TARGET)' \
         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
         "CFLAGS=$(TESTSUITE_CFLAGS)" \
-        "CHILLFLAGS=$(CHILLFLAGS)" \
-        'CHILL=$$(CHILL_FOR_TARGET)' \
-        "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
-        "CHILL_LIB=$(CHILL_LIB)" \
         'CXX=$$(CXX_FOR_TARGET)' \
         "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
         "CXXFLAGS=$(CXXFLAGS)" \
diff --git a/gdb/testsuite/config/gdbserver.exp b/gdb/testsuite/config/gdbserver.exp
index 2c63729..475acd4 100644
--- a/gdb/testsuite/config/gdbserver.exp
+++ b/gdb/testsuite/config/gdbserver.exp
@@ -2,7 +2,7 @@
 # ie. a debug agent running as a native process on the same or
 # a different host.
 
-#   Copyright 2000 Free Software Foundation, Inc.
+#   Copyright 2000, 2002 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -89,7 +89,8 @@
 global portnum;
 set portnum "2345";
 
-proc gdb_load { args } {
+proc gdb_load { arg } {
+    global host_exec;
     global server_exec;
     global portnum;
     global verbose;
@@ -133,49 +134,62 @@
     # Export the host:port pair.
     set gdbport $debughost$portnum;
 
-    if { $args == "" || $args == "{}" } {
-	if [info exists server_exec] {
-	    set args $server_exec;
-	} else {
+    # Remember new exec file.
+    if { $arg == "" } {
+	if { ! [info exists host_exec] } {
 	    send_gdb "info files\n";
 	    gdb_expect 30 {
 		-re "Symbols from \"(\[^\"\]+)\"" {
-		    set args $expect_out(1,string);
+		    set host_exec $expect_out(1,string);
 		    exp_continue;
 		}
 		-re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," {
-		    set args $expect_out(1,string);
+		    set host_exec $expect_out(1,string);
 		    exp_continue;
 		}
 		-re "$gdb_prompt $" { }
 	    }
 	}
+    } else {
+	set host_exec $arg
+	if [info exists server_exec] { unset server_exec }
     }
 
-    # remember new exec file 
-    set server_exec $args;
+    if { ! [info exists server_exec] } {
+	if [is_remote target] {
+	    set server_exec [remote_download target $host_exec]
+	} else {
+	    set server_exec $host_exec
+	}
+    }
 
     # Fire off the debug agent
     if [target_info exists gdb_server_args] {
         # This flavour of gdbserver takes as arguments those specified
         # in the board configuration file
         set custom_args [target_info gdb_server_args];
-        remote_spawn host \
-               "$gdbserver $custom_args >& /dev/null < /dev/null &" \
-               writeonly
+	set server_spawn_id [remote_spawn target \
+               "$gdbserver $custom_args"]
     } else {
         # This flavour of gdbserver takes as arguments the port information
         # and the name of the executable file to be debugged.
-        remote_spawn host \
-	    "$gdbserver $sockethost$portnum $args >& /dev/null < /dev/null &" \
-	    writeonly 
+	set server_spawn_id [remote_spawn target \
+	    "$gdbserver $sockethost$portnum $server_exec"]
     } 
+
+    # We can't call close, because if gdbserver is local then that means
+    # that it will get a SIGHUP.
+    ## close -i $server_spawn_id
+    wait -nowait -i $server_spawn_id
+
     # Give it a little time to establish
-    sleep 2
+    sleep 1
 
     # tell gdb what file we are debugging
-    if [gdb_file_cmd $args] {
-	return -1;
+    if { $arg != "" } {
+	if [gdb_file_cmd $arg] {
+	    return -1;
+	}
     }
 
     # attach to the "serial port"
diff --git a/gdb/testsuite/configure b/gdb/testsuite/configure
index bdfc4cd..26d555e 100755
--- a/gdb/testsuite/configure
+++ b/gdb/testsuite/configure
@@ -32,7 +32,6 @@
 program_transform_name=s,x,x,
 silent=
 site=
-sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -147,7 +146,6 @@
   --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
@@ -318,11 +316,6 @@
   -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=*)
@@ -488,16 +481,12 @@
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   fi
-else
-  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -586,7 +575,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:590: checking host system type" >&5
+echo "configure:579: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -607,7 +596,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:611: checking target system type" >&5
+echo "configure:600: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -625,7 +614,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:629: checking build system type" >&5
+echo "configure:618: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -655,7 +644,6 @@
             gdb.c++ \
             gdb.java \
             gdb.disasm \
-            gdb.chill \
             gdb.mi \
             gdb.threads \
             gdb.trace"
@@ -750,12 +738,12 @@
 # End stuff to support --enable-shared
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:754: checking for Cygwin environment" >&5
+echo "configure:742: 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 <<EOF
-#line 759 "configure"
+#line 747 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -766,7 +754,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -783,19 +771,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:787: checking for mingw32 environment" >&5
+echo "configure:775: 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 <<EOF
-#line 792 "configure"
+#line 780 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -814,7 +802,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:818: checking for executable suffix" >&5
+echo "configure:806: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -824,10 +812,10 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+      *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
     done
diff --git a/gdb/testsuite/configure.in b/gdb/testsuite/configure.in
index 48e50d8..ab37e6d 100644
--- a/gdb/testsuite/configure.in
+++ b/gdb/testsuite/configure.in
@@ -19,7 +19,6 @@
             gdb.c++ \
             gdb.java \
             gdb.disasm \
-            gdb.chill \
             gdb.mi \
             gdb.threads \
             gdb.trace"
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 8a9f29d..2e4504a 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -26,7 +26,7 @@
 }
 
 #
-# This file uses altivec.c for input.
+# This file uses altivec-abi.c for input.
 #
 
 set prms_id 0
@@ -37,7 +37,7 @@
     return
 }
 
-set testfile "altivec"
+set testfile "altivec-abi"
 set binfile ${objdir}/${subdir}/${testfile}
 
 set src1 ${srcdir}/${subdir}/${testfile}.c
@@ -58,16 +58,16 @@
     gdb_suppress_tests
 }
 
-gdb_test "b marker" "Breakpoint 2 at.*file.*altivec.c, line \[0-9\]+." "break marker"
-gdb_test "continue" "Breakpoint 2.*marker.*altivec.c.*" "continue to marker"
-gdb_test "finish" "Run till exit from .0.*in marker.*at.*altivec.c.*main \\(\\) at.*altivec.c.*result = vec_func \\(vshort,.*goes in v2.*" "back to main (1)"
+gdb_test "b marker" "Breakpoint 2 at.*file.*altivec-abi.c, line \[0-9\]+." "break marker"
+gdb_test "continue" "Breakpoint 2.*marker.*altivec-abi.c.*" "continue to marker"
+gdb_test "finish" "Run till exit from .0.*in marker.*at.*altivec-abi.c.*main \\(\\) at.*altivec-abi.c.*result = vec_func \\(vshort,.*goes in v2.*" "back to main (1)"
 
 # now all the arguments of vec_fun are initialized
 
 set pattern "vec_func .vshort_f=.111, 222, 333, 444, 555, 666, 777, 888., vushort_f=.100, 200, 300, 400, 500, 600, 700, 800., vint_f=.-10, -20, -30, -40., vuint_f=.1111, 2222, 3333, 4444., vchar_f=.abcdefghilmnopqr., vuchar_f=.ABCDEFGHILMNOPQR., vfloat_f=.1.25, 3.75, 5.5, 1.25., x_f=.1, 2, 3, 4, 5, 6, 7, 8., y_f=.12, 22, 32, 42., a_f=.vector of chars.., b_f=.5.5, 4.5, 3.75, 2.25., c_f=.1.25, 3.5, 5.5, 7.75., intv_on_stack_f=.12, 34, 56, 78.."
 
 set pattern1 $pattern
-append pattern1 " at.*altivec.c.*vint_res  = vec_add.*vint_f, intv_on_stack_f.;"
+append pattern1 " at.*altivec-abi.c.*vint_res  = vec_add.*vint_f, intv_on_stack_f.;"
 
 # Now let's call the function.  This function has > 12 args,
 # the last one will go on the stack.
@@ -85,7 +85,7 @@
   "step into vec_fun"
 
 set pattern2 $pattern
-append pattern2 " at.*altivec.c.*in main.*result = vec_func .vshort,.*goes in v2.*Value returned is.*= .2, 2, 2, 2."
+append pattern2 " at.*altivec-abi.c.*in main.*result = vec_func .vshort,.*goes in v2.*Value returned is.*= .2, 2, 2, 2."
 
 # Let's see if the result is returned correctly.
 gdb_test "finish" \
@@ -95,14 +95,14 @@
 # can we print the args correctly for this function?
 gdb_test "break struct_of_vector_func" "" ""
 
-set pattern "struct_of_vector_func .vector_struct=.vshort1 = .1, 2, 3, 4, 5, 6, 7, 8., vshort2 = .11, 12, 13, 14, 15, 16, 17, 18., vshort3 = .21, 22, 23, 24, 25, 26, 27, 28., vshort4 = .31, 32, 33, 34, 35, 36, 37, 38... at.*altivec.c.*"
+set pattern "struct_of_vector_func .vector_struct=.vshort1 = .1, 2, 3, 4, 5, 6, 7, 8., vshort2 = .11, 12, 13, 14, 15, 16, 17, 18., vshort3 = .21, 22, 23, 24, 25, 26, 27, 28., vshort4 = .31, 32, 33, 34, 35, 36, 37, 38... at.*altivec-abi.c.*"
 
 gdb_test "continue" \
   "Breakpoint 3, $pattern.*vector_struct.vshort1 = vec_add .vector_struct.vshort1, vector_struct.vshort2.;" \
   "continue to struct_of_vector_func"
 
 gdb_test "finish" \
-  "Run till exit from .0  $pattern\[ \r\n\]+main.*altivec.c.*array_of_vector_func.*" \
+  "Run till exit from .0  $pattern\[ \r\n\]+main.*altivec-abi.c.*array_of_vector_func.*" \
   "back to main (2)"
 
 gdb_test "step" "" "step into array_of_vector_func"
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index f6ce1c7..f10f4ae 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -47,6 +47,10 @@
 if [istarget "s390-*-*"] then {
     set asm-arch s390
 }
+if [istarget "x86_64-*-*"] then {
+    set asm-arch x86_64
+    set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+}
 if [istarget "i\[3456\]86-*-*"] then {
     set asm-arch i386
 }
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 2b341af..9c6bb97 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -113,6 +113,11 @@
    gdb_expect {
       -re ".*Illegal process-id: abc.*$gdb_prompt $"\
                       {pass "attach to nonsense is prohibited"}
+      -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+                      {
+                        # Response expected from /proc-based systems.
+                        pass "attach to nonsense is prohibited" 
+                      }
       -re "Attaching to.*$gdb_prompt $"\
                       {fail "attach to nonsense is prohibited (bogus pid allowed)"}
       -re "$gdb_prompt $" {fail "attach to nonsense is prohibited"}
@@ -125,14 +130,23 @@
    #
    send_gdb "attach 0\n"
    gdb_expect {
-      # This reponse is expected on HP-UX 10.20 (i.e., ptrace-based).
       -re "Attaching to.*, process 0.*No such process.*$gdb_prompt $"\
-                      {pass "attach to nonexistent process is prohibited"}
-      # This response is expected on HP-UX 11.0 (i.e., ttrace-based).
+                      {
+                        # Response expected on HP-UX 10.20 (i.e., ptrace-based).
+                        pass "attach to nonexistent process is prohibited"
+                      }
       -re "Attaching to.*, process 0 failed.*Hint.*$gdb_prompt $"\
-                      {pass "attach to nonexistent process is prohibited"}
+                      {
+                        # Response expected on HP-UX 11.0 (i.e., ttrace-based).
+                        pass "attach to nonexistent process is prohibited"
+                      }
       -re "Attaching to.*, process 0.*denied.*$gdb_prompt $"\
                       {pass "attach to nonexistent process is prohibited"}
+      -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+                      {
+                        # Response expected from /proc-based systems.
+                        pass "attach to nonexistent process is prohibited"
+                      }
       -re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
       timeout         {fail "(timeout) attach to nonexistent process is prohibited"}
    }
@@ -164,7 +178,7 @@
 
    send_gdb "attach $testpid\n"
    gdb_expect {
-      -re "Attaching to program.*$binfile, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
+      -re "Attaching to program.*`?$binfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\
                       {pass "attach1, after setting file"}
       -re "$gdb_prompt $" {fail "attach1, after setting file"}
       timeout         {fail "(timeout) attach1, after setting file"}
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index d9bb350..a7ea5cf 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -125,7 +125,7 @@
 	"\[ \t\r\n\]+array_d :"
 	"\[ \t\r\n\]+========="
 	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
+	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]"
 	"\[ \t\r\n\]+"
   }
 }
@@ -194,7 +194,7 @@
 	"\[ \t\r\n\]+array_d :"
 	"\[ \t\r\n\]+========="
 	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
+	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
 	"\[ \t\r\n\]+"
 	".*array_f :"
 	".*student id :\[\t \]+.*YELLOW"
@@ -240,7 +240,7 @@
 	"array_d :"
 	"\[ \t\r\n\]+========="
 	"\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
+	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
 	"\[ \t\r\n\]+"
     }
 }
@@ -259,7 +259,7 @@
 	"\[ \t\r\n\]+array_d :"
 	"\[ \t\r\n\]+========="
 	"\[ \t\r\n\]+0.000000"
-	"\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
+	"\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
 	"\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
     }
 } else {
@@ -433,11 +433,11 @@
     ![gdb_skip_stdio_test "print print_ten_doubles(...)"]} {
     send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
     gdb_expect_list "print print_ten_doubles" ".*$gdb_prompt $" {
-	"\[\t\r\n \]+Two Doubles : 123.456000.*123.456000"
-	"\[\t\r\n \]+Two Doubles : -0.120000.*-1.230000"
-	"\[\t\r\n \]+Two Doubles : 343434.800000.*89.098000"
-	"\[\t\r\n \]+Two Doubles : 3.140000.*-5678.123450"
-	"\[\t\r\n \]+Two Doubles : -0.111111.*216.970650"
+	"\[\t\r\n \]+Two Doubles : 123.45\[0-9\]*.*123.45\[0-9\]*"
+	"\[\t\r\n \]+Two Doubles : -0.1200\[0-9\]*.*-1.2300\[0-9\]*"
+	"\[\t\r\n \]+Two Doubles : 343434.\[0-9\]*.*89.09\[0-9\]*"
+	"\[\t\r\n \]+Two Doubles : 3.1400\[0-9\]*.*-5678.123\[0-9\]*"
+	"\[\t\r\n \]+Two Doubles : -0.1111\[0-9\]*.*216.97\[0-9\]*"
     }
 }
 
diff --git a/gdb/testsuite/gdb.base/d10v.ld b/gdb/testsuite/gdb.base/d10v.ld
index 3c4c38a..41f085b 100644
--- a/gdb/testsuite/gdb.base/d10v.ld
+++ b/gdb/testsuite/gdb.base/d10v.ld
@@ -2,54 +2,57 @@
 	      "elf32-d10v")
 OUTPUT_ARCH(d10v)
 ENTRY(_start)
- SEARCH_DIR(/usr/cygnus/d10v-961230/H-sparc-sun-sunos4.1//lib);
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
+
+MEMORY
+{
+  UNIFIED : org = 0,         len = 0x1000000
+  INSN    : org = 0x1014000, len = 0x40000
+  DATA    : org = 0x2000004, len = 0x7FFC
+  STACK   : org = 0x200BFFE, len = 4
+}
+
 SECTIONS
 {
   /* Overlay sections: */
-  .ovly0  0x01010000 : AT (0x12010000) { foo.o(.text)  }
-  .ovly1  0x01010000 : AT (0x12011000) { bar.o(.text)  }
-  .ovly2  0x01011000 : AT (0x12012000) { baz.o(.text)  }
-  .ovly3  0x01011000 : AT (0x12013000) { grbx.o(.text) }
-  .data00 0x00001000 : AT (0x12014000) { foo.o(.data)  }
-  .data01 0x00001000 : AT (0x12015000) { bar.o(.data)  }
-  .data02 0x00002000 : AT (0x12016000) { baz.o(.data)  }
-  .data03 0x00002000 : AT (0x12017000) { grbx.o(.data) }
-  /* Read-only sections, merged into data segment: */
-  . = 0x00000004;
-  .interp     : { *(.interp) 	}
-  .hash          : { *(.hash)		}
-  .dynsym        : { *(.dynsym)		}
-  .dynstr        : { *(.dynstr)		}
-  .rel.text      : { *(.rel.text)		}
-  .rela.text     : { *(.rela.text) 	}
-  .rel.data      : { *(.rel.data)		}
-  .rela.data     : { *(.rela.data) 	}
-  .rel.rodata    : { *(.rel.rodata) 	}
-  .rela.rodata   : { *(.rela.rodata) 	}
-  .rel.got       : { *(.rel.got)		}
-  .rela.got      : { *(.rela.got)		}
-  .rel.ctors     : { *(.rel.ctors)	}
-  .rela.ctors    : { *(.rela.ctors)	}
-  .rel.dtors     : { *(.rel.dtors)	}
-  .rela.dtors    : { *(.rela.dtors)	}
-  .rel.init      : { *(.rel.init)	}
-  .rela.init     : { *(.rela.init)	}
-  .rel.fini      : { *(.rel.fini)	}
-  .rela.fini     : { *(.rela.fini)	}
-  .rel.bss       : { *(.rel.bss)		}
-  .rela.bss      : { *(.rela.bss)		}
-  .rel.plt       : { *(.rel.plt)		}
-  .rela.plt      : { *(.rela.plt)		}
-  .plt      : { *(.plt)	}
-  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
-  .rodata1   : { *(.rodata1) }
-  /* Adjust the address for the data segment.  */
-  . = ALIGN(4);
+  .ovly0  0x1001000 : AT (0x8000) { foo.o(.text)  }
+  .ovly1  0x1001000 : AT (0x9000) { bar.o(.text)  }
+  .ovly2  0x1002000 : AT (0xa000) { baz.o(.text)  }
+  .ovly3  0x1002000 : AT (0xb000) { grbx.o(.text) }
+  .data00 0x2001000 : AT (0xc000) { foo.o(.data)  }
+  .data01 0x2001000 : AT (0xd000) { bar.o(.data)  }
+  .data02 0x2002000 : AT (0xe000) { baz.o(.data)  }
+  .data03 0x2002000 : AT (0xf000) { grbx.o(.data) }
+
+  .text :
+  {
+    KEEP (*(.init))
+    KEEP (*(.init.*))
+    KEEP (*(.fini))
+    KEEP (*(.fini.*))
+    *(.text)
+    *(.text.*)
+    /* .gnu.warning sections are handled specially by elf32.em.  */
+    *(.gnu.warning)
+    *(.gnu.linkonce.t*)
+    _etext = .;
+    PROVIDE (etext = .);
+  } >INSN =0
+  .rodata    : {
+    *(.rodata) 
+    *(.gnu.linkonce.r*)
+    *(.rodata.*) 
+  } >DATA
+  .rodata1   : { 
+    *(.rodata1)
+    *(.rodata1.*)
+  } >DATA
+
   .data    :
   {
     *(.data)
+    *(.data.*)
     *(.gnu.linkonce.d*)
     _ovly_table = .; 
 	LONG(ABSOLUTE(ADDR(.ovly0)));
@@ -87,34 +90,66 @@
     _novlys = .;
 	LONG((_novlys - _ovly_table) / 16);
     CONSTRUCTORS
-  }
-  .data1   : { *(.data1) }
+  } >DATA
+  .data1   : {
+    *(.data1)
+    *(.data1.*)
+  } >DATA
   .ctors         :
   {
-    *(.ctors)
-  }
+    /* 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) .ctors))
+    KEEP (*(SORT(.ctors.*)))
+    KEEP (*(.ctors))
+  } >DATA
   .dtors         :
   {
-    *(.dtors)
-  }
-  .got           : { *(.got.plt) *(.got) }
-  .dynamic       : { *(.dynamic) }
+    KEEP (*crtbegin.o(.dtors))
+    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
+    KEEP (*(SORT(.dtors.*)))
+    KEEP (*(.dtors))
+  } >DATA
   /* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
      we can shorten the on-disk segment size.  */
-  .sdata     : { *(.sdata) }
+  .sdata     : {
+    *(.sdata)
+    *(.sdata.*)
+  } >DATA
   _edata  =  .;
   PROVIDE (edata = .);
   __bss_start = .;
-  .sbss      : { *(.sbss) *(.scommon) }
+  .sbss      : { *(.sbss) *(.scommon) } >DATA
   .bss       :
   {
    *(.dynbss)
+   *(.dynbss.*)
    *(.bss)
+   *(.bss.*)
    *(COMMON)
-  }
+  } >DATA
+
   _end = . ;
   PROVIDE (end = .);
+
+  .stack : { _stack = .; *(.stack) } >STACK
+
   /* Stabs debugging sections.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
@@ -122,34 +157,37 @@
   .stab.exclstr 0 : { *(.stab.exclstr) }
   .stab.index 0 : { *(.stab.index) }
   .stab.indexstr 0 : { *(.stab.indexstr) }
+
   .comment 0 : { *(.comment) }
+
   /* DWARF debug sections.
-     Symbols in the .debug DWARF section are relative to the beginning of the
-     section so we begin .debug at 0.  It's not clear yet what needs to happen
-     for the others.   */
+     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) }
-  .debug_info     0 : { *(.debug_info) }
+  .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_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  .line           0 : { *(.line) }
-  /* These must appear regardless of  .  */
-  /* Hmmm, there's got to be a better way.  This sets the stack to the
-     top of the simulator memory (i.e. top of 64K data space). */
-  .stack 0x00007FFE : { _stack = .; *(.stack) }
-  .text    0x1000000 :
-  {
-    *(.init)
-    *(.fini)
-    *(.text)
-    /* .gnu.warning sections are handled specially by elf32.em.  */
-    *(.gnu.warning)
-    *(.gnu.linkonce.t*)
-  } =0
-  _etext = .;
-  PROVIDE (etext = .);
+  .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) }
 }
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 656601e..69f2b26 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -229,7 +229,12 @@
     timeout { fail "step out of main (hang or timeout on step at end 1)" }
 }
 
-if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
+# When we're talking to a program running on a real stand-alone board,
+# every BSP's exit function behaves differently, so there's no single
+# way to tell whether we've exited gracefully or not.  So don't run
+# these tests when use_gdb_stub is set, or when we're running under Cygmon.
+if {! [target_info exists use_gdb_stub]
+    && (! [target_info exists use_cygmon] || ! [target_info use_cygmon])} {
     global program_exited;
     if {[eval expr $program_exited == 0]} {
 	send_gdb "n\n"
diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp
index b370b53..6d5401d 100644
--- a/gdb/testsuite/gdb.base/interrupt.exp
+++ b/gdb/testsuite/gdb.base/interrupt.exp
@@ -18,11 +18,9 @@
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
 
-if [host_info exists name] {
-    if [board_info host exists gdb,nointerrupts] {
-	verbose "Skipping interrupt.exp because of nointerrupts."
-	continue
-    }
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping interrupt.exp because of nointerrupts."
+    continue
 }
 
 if [target_info exists gdb,noinferiorio] {
@@ -122,7 +120,7 @@
 
 		setup_xfail "sparc*-*-solaris2*"
 		setup_xfail "mips-*-ultrix*"
-		setup_xfail "i386*-*-bsd*"
+		setup_xfail "i*86-*-*bsd*"
 		setup_xfail "i*86-*-solaris2*"
 		setup_xfail "*-*-sysv4*"
 		setup_xfail "vax-*-*"
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 7084a8d..55086d7 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -114,6 +114,14 @@
     default { }
 }
 
+set sizeof_long_double 8
+send_gdb "print sizeof(long double)\n"
+gdb_expect {
+    -re ".* = 4.*$gdb_prompt $" { set sizeof_long_double 4 }
+    -re ".*$gdb_prompt $" { }
+    default { }
+}
+
 gdb_test "n 4"   ".*38.*" "get to known place"
 
 # Check the hack for long long prints.
@@ -146,11 +154,10 @@
 }
 gdb_test "p/c oct" ".*'w'.*"
 
-if { $sizeof_double == 8 } {
-
-# ARM floating point numbers are not strictly little endian or big endian,
-# but a hybrid.  They are in little endian format with the two words
-# swapped in big endian format.
+if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
+    # ARM floating point numbers are not strictly little endian or big endian,
+    # but a hybrid.  They are in little endian format with the two words
+    # swapped in big endian format.
 
     if { [istarget "arm*-*-*"] || \
 	    [istarget "xscale*-*-*"] || \
@@ -239,7 +246,7 @@
     gdb_test "x/c &oct" ".*-89 .*"
     # FIXME GDB's output is correct, but this longer match fails.
     # gdb_test "x/c &oct" ".*-89 '\\\\247'.*"
-    if { $sizeof_double == 8 } {
+    if { $sizeof_double == 8 || $sizeof_long_double == 8 } {
 	gdb_test "x/f &oct" ".*-5.9822653797615723e-120.*"
     } else {
 	gdb_test "x/f &oct" ".*-2.42716126e-15.*"
diff --git a/gdb/testsuite/gdb.base/overlays.exp b/gdb/testsuite/gdb.base/overlays.exp
index 9188b27..c31da4e 100644
--- a/gdb/testsuite/gdb.base/overlays.exp
+++ b/gdb/testsuite/gdb.base/overlays.exp
@@ -1,4 +1,4 @@
-#   Copyright 1997, 1998 Free Software Foundation, Inc.
+#   Copyright 1997, 1998, 2002 Free Software Foundation, Inc.
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -86,22 +86,42 @@
 }
 
 # couple of convenience variables
-set fptrcast [string_to_regexp "(int (*)(int))"]
+set fptrcast [string_to_regexp "{int (int)}"]
 set iptrcast [string_to_regexp "(int *)"]
+set hexx "0x\[0-9abcdefABCDEF\]+"
 
 gdb_test "overlay manual" "" 
 gdb_test "overlay list" "No sections are mapped." "List with none mapped"
 
 # capture the LMA addresses of [foo bar baz grbx foox barx bazx grbxx]
 
-gdb_test "print \$foo_lma = &foo" \
-	".* $fptrcast 0x.* <\\*foo\\*>"  "foo load addr"
-gdb_test "print \$bar_lma = &bar" \
-	".* $fptrcast 0x.* <\\*bar\\*>"  "bar load addr"
-gdb_test "print \$baz_lma = &baz" \
-	".* $fptrcast 0x.* <\\*baz\\*>"  "baz load addr"
-gdb_test "print \$grbx_lma = &grbx" \
-	".* $fptrcast 0x.* <\\*grbx\\*>" "grbx load addr"
+proc get_func_address { func func_sym msg } {
+    global gdb_prompt
+    global fptrcast
+    global hexx
+
+    set func_addr 0
+    send_gdb "print $func\n" 
+    gdb_expect {
+	-re "\\$\[0-9\]+ = $fptrcast (${hexx}) <$func_sym>.*$gdb_prompt $" {
+	    set func_addr $expect_out(1,string)
+	    pass "get $msg"
+	}
+	-re ".*$gdb_prompt $" {
+	    fail "get $msg"
+	}
+	default {
+	    fail "get $msg (timeout)"
+	}
+    }
+    return $func_addr
+}
+
+set foo_lma  [get_func_address "foo"  "\\*foo\\*"  "foo  load address"]
+set bar_lma  [get_func_address "bar"  "\\*bar\\*"  "bar  load address"]
+set baz_lma  [get_func_address "baz"  "\\*baz\\*"  "baz  load address"]
+set grbx_lma [get_func_address "grbx" "\\*grbx\\*" "grbx load address"]
+
 gdb_test "print \$foox_lma = &foox" \
 	".* $iptrcast 0x.*"  "foox load addr"
 gdb_test "print \$barx_lma = &barx" \
@@ -116,23 +136,19 @@
 
 gdb_test "overlay map .ovly0" "" 
 gdb_test "overlay list" "Section .ovly0, loaded at.*, mapped at.*" "List ovly0"
-gdb_test "print \$foo_vma = &foo" \
-	".* $fptrcast 0x.* <foo>"  "foo runtime addr"
+set foo_vma [get_func_address "foo"  "foo"  "foo  runtime address"]
 
 gdb_test "overlay map .ovly1" "" 
 gdb_test "overlay list" "Section .ovly1, loaded at.*, mapped at.*" "List ovly1"
-gdb_test "print \$bar_vma = &bar" \
-	".* $fptrcast 0x.* <bar>"  "bar runtime addr"
+set bar_vma [get_func_address "bar"  "bar"  "bar  runtime address"]
 
 gdb_test "overlay map .ovly2" "" 
 gdb_test "overlay list" "Section .ovly2, loaded at.*, mapped at.*" "List ovly2"
-gdb_test "print \$baz_vma = &baz" \
-	".* $fptrcast 0x.* <baz>"  "baz runtime addr"
+set baz_vma [get_func_address "baz"  "baz"  "baz  runtime address"]
 
 gdb_test "overlay map .ovly3" "" 
 gdb_test "overlay list" "Section .ovly3, loaded at.*, mapped at.*" "List ovly3"
-gdb_test "print \$grbx_vma = &grbx" \
-	".* $fptrcast 0x.* <grbx>"  "grbx runtime addr"
+set grbx_vma [get_func_address "grbx" "grbx" "grbx runtime address"]
 
 gdb_test "overlay map .data00" "" 
 gdb_test "overlay list" "Section .data00, loaded .*, mapped .*" "List data00"
@@ -156,10 +172,10 @@
 
 # Verify that LMA != VMA
 
-gdb_test "print \$foo_lma   != \$foo_vma" ".* = 1"   "foo's LMA   != VMA"
-gdb_test "print \$bar_lma   != \$bar_vma" ".* = 1"   "bar's LMA   != VMA"
-gdb_test "print \$baz_lma   != \$baz_vma" ".* = 1"   "baz's LMA   != VMA"
-gdb_test "print \$grbx_lma  != \$grbx_vma" ".* = 1"  "grbx's LMA  != VMA"
+gdb_test "print $foo_lma   != $foo_vma" ".* = 1"   "foo's LMA   != VMA"
+gdb_test "print $bar_lma   != $bar_vma" ".* = 1"   "bar's LMA   != VMA"
+gdb_test "print $baz_lma   != $baz_vma" ".* = 1"   "baz's LMA   != VMA"
+gdb_test "print $grbx_lma  != $grbx_vma" ".* = 1"  "grbx's LMA  != VMA"
 gdb_test "print \$foox_lma  != \$foox_vma" ".* = 1"  "foox's LMA  != VMA"
 gdb_test "print \$barx_lma  != \$barx_vma" ".* = 1"  "barx's LMA  != VMA"
 gdb_test "print \$bazx_lma  != \$bazx_vma" ".* = 1"  "bazx's LMA  != VMA"
diff --git a/gdb/testsuite/gdb.base/page.exp b/gdb/testsuite/gdb.base/page.exp
index 9791a60..c757ca2 100644
--- a/gdb/testsuite/gdb.base/page.exp
+++ b/gdb/testsuite/gdb.base/page.exp
@@ -1,4 +1,5 @@
-# Copyright 1992, 1994, 1995, 1999 Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1999, 2002 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -30,10 +31,50 @@
 
 gdb_exit
 gdb_start
+
 gdb_test "set pagination off" ""
-gdb_test "info set" ".*pagination:  State of pagination is off.*"
+gdb_test "show pagination" "State of pagination is off.*" "pagination is off"
+send_gdb "help\n"
+gdb_expect_list "unpaged help" ".*$gdb_prompt $" {
+    "List of classes of commands:"
+    ""
+    "aliases -- Aliases of other commands"
+    "breakpoints -- Making program stop at certain points"
+    "data -- Examining data"
+    "files -- Specifying and examining files"
+    "internals -- Maintenance commands"
+    "obscure -- Obscure features"
+    "running -- Running the program"
+    "stack -- Examining the stack"
+    "status -- Status inquiries"
+    "support -- Support facilities"
+    "tracepoints -- Tracing of program execution without stopping the program"
+    "user-defined -- User-defined commands"
+    ""
+    "Type .help. followed by a class name for a list of commands in that class."
+    "Type .help. followed by command name for full documentation."
+    "Command name abbreviations are allowed if unambiguous."
+}
+
+
 gdb_test "set pagination on" ""
-gdb_test "info set" ".*pagination:  State of pagination is on.*"
+gdb_test "show pagination" "State of pagination is on.*" "pagination is on"
+gdb_test "set height 10" ""
+send_gdb "help\n"
+gdb_expect_list "paged help" \
+	".*---Type <return> to continue, or q <return> to quit---" {
+    "List of classes of commands:"
+    ""
+    "aliases -- Aliases of other commands"
+    "breakpoints -- Making program stop at certain points"
+    "data -- Examining data"
+    "files -- Specifying and examining files"
+    "internals -- Maintenance commands"
+    "obscure -- Obscure features"
+    "running -- Running the program"
+}
+gdb_test "q"
+
 
 gdb_exit
 return 0
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp
new file mode 100644
index 0000000..8edd133
--- /dev/null
+++ b/gdb/testsuite/gdb.base/readline.exp
@@ -0,0 +1,190 @@
+# Copyright 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.  
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Tom Tromey <tromey@redhat.com>
+
+# This file is part of the gdb testsuite.
+
+#
+# Tests for readline operations.
+#
+
+# This function is used to test operate-and-get-next.
+# NAME is the name of the test.
+# ARGS is a list of alternating commands and expected results.
+proc operate_and_get_next {name args} {
+  global gdb_prompt
+
+  set my_gdb_prompt "($gdb_prompt| >)"
+
+  set reverse {}
+  foreach {item result} $args {
+    verbose "sending $item"
+    sleep 1
+
+    # We can't use gdb_test here because we might see a " >" prompt.
+    set status 0
+    send_gdb "$item\n"
+    gdb_expect {
+      -re "$item" {
+	# Ok
+      }
+      timeout {
+	set status 1
+      }
+    }
+
+    if {! $status} {
+      gdb_expect {
+	-re "$result" {
+	  # Ok.
+	}
+	timeout {
+	  set status 1
+	}
+      }
+    }
+
+    if {$status} {
+      fail "$name - send $item"
+      return 0
+    }
+    pass "$name - send $item"
+
+    set reverse [linsert $reverse 0 $item $result]
+  }
+
+  # Now use C-p to go back to the start.
+  foreach {item result} $reverse {
+    # Actually send C-p followed by C-l.  This lets us recognize the
+    # command when gdb prints it again.
+    send_gdb "\x10\x0c"
+    set status 0
+    gdb_expect {
+      -re "$item" {
+	# Ok
+      }
+      timeout {
+	set status 1
+      }
+    }
+    if {$status} {
+      fail "$name - C-p to $item"
+      return 0
+    }
+    pass "$name - C-p to $item"
+  }
+
+  # Now C-o through the list.  Don't send the command, since it is
+  # already there.  Strip off the first command from the list so we
+  # can see the next command inside the loop.
+  set count 0
+  foreach {item result} $args {
+    set status 0
+
+    # If this isn't the first item, make sure we see the command at
+    # the prompt.
+    if {$count > 0} {
+      gdb_expect {
+	-re ".*$item" {
+	  # Ok
+	}
+	timeout {
+	  set status 1
+	}
+      }
+    }
+
+    if {! $status} {
+      # For the last item, send a simple \n instead of C-o.
+      if {$count == [llength $args] - 2} {
+	send_gdb "\n"
+      } else {
+	# 15 is C-o.
+	send_gdb [format %c 15]
+      }
+      set status 0
+      gdb_expect {
+	-re "$result" {
+	  # Ok
+	}
+	timeout {
+	  set status 1
+	}
+      }
+    }
+
+    if {$status} {
+      fail "$name - C-o for $item"
+      return 0
+    }
+    pass "$name - C-o for $item"
+
+    set count [expr {$count + 2}]
+  }
+
+  return 1
+}
+
+
+if $tracelevel {
+  strace $tracelevel
+}
+
+# Don't let a .inputrc file or an existing setting of INPUTRC mess up
+# the test results.  Even if /dev/null doesn't exist on the particular
+# platform, the readline library will use the default setting just by
+# failing to open the file.  OTOH, opening /dev/null successfully will
+# also result in the default settings being used since nothing will be
+# read from this file.
+global env
+if [info exists env(INPUTRC)] {
+    set old_inputrc $env(INPUTRC)
+}
+set env(INPUTRC) "/dev/null"
+
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+set oldtimeout1 $timeout
+set timeout 30
+
+
+# A simple test of operate-and-get-next.
+operate_and_get_next "Simple operate-and-get-next" \
+  "p 1" ".* = 1" \
+  "p 2" ".* = 2"\
+  "p 3" ".* = 3"
+
+# Test operate-and-get-next with a secondary prompt.
+operate_and_get_next "operate-and-get-next with secondary prompt" \
+  "if 1 > 0" "" \
+  "p 5" "" \
+  "end" ".* = 5"
+
+
+# Restore globals modified in this test...
+if [info exists old_inputrc] {
+    set env(INPUTRC) $old_inputrc
+} else {
+    unset env(INPUTRC)
+}
+set timeout $oldtimeout1
+
+return 0
diff --git a/gdb/testsuite/gdb.base/return.exp b/gdb/testsuite/gdb.base/return.exp
index e7a536b..2f8946d 100644
--- a/gdb/testsuite/gdb.base/return.exp
+++ b/gdb/testsuite/gdb.base/return.exp
@@ -91,19 +91,6 @@
     setup_xfail "m6811-*-*"
     gdb_test "next" "printf.*" "next over call to func3"
 
-    # This test is going to fail on all i*86 systems using an i*87.
-    # When returning a floating point value from a function, all known
-    # compilers do this via a `fldl' instruction, which pushes the floating
-    # value on the i387 stack. This causes two problems:
-    # a) Most i*86 targets do not store (or cannot store, see comment in
-    #    in i386v-nat.c:i386_register_u_addr) the floating point registers
-    #    to the target.
-    # b) gdb would have to figure out if the `fldl' instruction (or variants
-    #    of it) has already been executed. If not, it would have to simulate
-    #    a push instruction, as it is not enough to write the register,
-    #    the floating point `stack pointer' has to be updated too.
-    #    Do not expect this to get fixed anytime soon.
-
     # This test also fails for sparc Solaris 2.3 & 2.4, but passes under 2.5
     # At the time the `next' is issued, the floating point unit for the
     # process is not yet initialized, and the storing of the floating
@@ -113,8 +100,8 @@
     # process start, making this test pass, it will be for a version that
     # is not xfailed.
 
-    setup_xfail "i*86-*-*" "sparc-*-solaris2.3*" "sparc-*-solaris2.4*" "m6811-*-*"
-    gdb_test "p tmp3" ".* = 5.*" "correct value returned double test (known problem with i*86 and sparc solaris"
+    setup_xfail "sparc-*-solaris2.3*" "sparc-*-solaris2.4*" "m6811-*-*"
+    gdb_test "p tmp3" ".* = 5.*" "correct value returned double test (known problem with sparc solaris)"
 }
 
 
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index 83ceb62..85e9fa7 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -52,7 +52,7 @@
  
     gdb_reinitialize_dir $srcdir/..
 
-    for {set count 0} {$count < 22} {incr count} {
+    for {set count 0} {$count < 26} {incr count} {
 	send_gdb "list\n"
 	gdb_expect {
 	    -re ".*context = data.*$gdb_prompt $" {
@@ -142,6 +142,22 @@
 	    -re ".*dirarg = .* xmalloc.*$gdb_prompt $" {
 		return
 	    }
+	    -re ".*setlocale .LC_MESSAGES,.*$gdb_prompt $" {
+		set description "next over setlocale LC_MESSAGES"
+		set command "next"
+	    }
+	    -re ".*setlocale .LC_CTYPE,.*$gdb_prompt $" {
+		set description "next over setlocale LC_CTYPE"
+		set command "next"
+	    }
+	    -re ".*bindtextdomain .PACKAGE, LOCALEDIR.;.*$gdb_prompt $" {
+		set description "next over bindtextdomain"
+		set command "next"
+	    }
+	    -re ".*textdomain .PACKAGE.;.*$gdb_prompt $" {
+		set description "next over textdomain PACKAGE"
+		set command "next"
+	    }
 	    -re "\[ \t\]+\{\r\n$gdb_prompt $" {
 		setup_xfail "mips-*-irix5*"
 		fail "$description ended up at odd location"
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 47919be..dd88274 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -65,6 +65,9 @@
 if {$gcc_compiled == 0} {
     if [istarget "hppa*-hp-hpux*"] then {
 	set additional_flags "additional_flags=+z"
+    } elseif { [istarget "mips-sgi-irix*"] } {
+	# Disable SGI compiler's implicit -Dsgi
+	set additional_flags "additional_flags=-Usgi"
     } else {
 	# don't know what the compiler is...
 	set additional_flags ""
@@ -103,6 +106,8 @@
       &&  ([istarget "powerpc*-*-aix*"]
 	|| [istarget "rs6000*-*-aix*"] )) } {
     set additional_flags "additional_flags=-L${objdir}/${subdir}"
+} elseif { [istarget "mips-sgi-irix*"] } {
+    set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
 } else {
     set additional_flags ""
 }
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog
index 51a24df..f4f49b1 100644
--- a/gdb/testsuite/gdb.chill/ChangeLog
+++ b/gdb/testsuite/gdb.chill/ChangeLog
@@ -1,3 +1,17 @@
+2002-08-01  Andrew Cagney  <cagney@redhat.com>
+
+	* builtins.exp, callch.exp, chillvars.exp: Make files obsolete.
+	* enum.exp, gch1041.exp, gch1272.exp: Make files obsolete.
+	* gch1280.exp, gch922.exp, gch981.exp: Make files obsolete.
+	* misc.exp, powerset.exp, pr-4975.exp: Make files obsolete.
+	* pr-5016.exp, pr-5020.exp, pr-5022.exp: Make files obsolete.
+	* pr-5646.exp, pr-5984.exp, pr-6292.exp: Make files obsolete.
+	* pr-6632.exp, pr-8134.exp, pr-8136.exp: Make files obsolete.
+	* pr-8405.exp, pr-8742.exp, pr-8894.exp: Make files obsolete.
+	* pr-9095.exp, pr-9946.exp, result.exp: Make files obsolete.
+	* string.exp, tests1.exp, tests2.exp: Make files obsolete.
+	* tuples.exp, xstruct.exp: Make files obsolete.
+	
 2001-03-06  Kevin Buettner  <kevinb@redhat.com>
 
 	* builtins.exp, callch.exp, chexp.exp, chillvars.exp,
diff --git a/gdb/testsuite/gdb.chill/builtins.exp b/gdb/testsuite/gdb.chill/builtins.exp
index 87fe3af..482a695 100644
--- a/gdb/testsuite/gdb.chill/builtins.exp
+++ b/gdb/testsuite/gdb.chill/builtins.exp
@@ -1,441 +1,441 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "builtins"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break xx_\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n" 
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-#	First one is string to send_gdb to gdb
-#	Second one is string to match gdb result to
-#	Third one is an optional message to be printed
-
-proc test_print_accept { args } {
-    global gdb_prompt
-    global passcount
-    global verbose
-
-    if [llength $args]==3 then {
-	set message [lindex $args 2]
-    } else {
-	set message [lindex $args 0]
-    }
-    set sendthis [lindex $args 0]
-    set expectthis [lindex $args 1]
-    set result [gdb_test $sendthis ".* = ${expectthis}" $message]
-    if $result==0 {incr passcount}
-    return $result
-}
-
-proc test_lower {} {
-    global passcount
-
-    verbose "testing builtin LOWER"
-    set passcount 0
-
-    # discrete mode names
-    test_print_accept "print lower(bool)" "FALSE"
-    test_print_accept "print lower(char)" {'\^[(]0[)]'}
-    test_print_accept "print lower(byte)" "-128"
-    test_print_accept "print lower(ubyte)" "0"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print lower(int)" "-2147483648"
-    } else {
-	test_print_accept "print lower(int)" "-32768"
-    }
-    test_print_accept "print lower(uint)" "0"
-    setup_xfail "alpha-*-*"
-    test_print_accept "print lower(long)" "-2147483648"
-    test_print_accept "print lower(ulong)" "0"
-    test_print_accept "print lower(m_set)" "e1"
-    test_print_accept "print lower(m_set_range)" "e2"
-    test_print_accept "print lower(m_numbered_set)" "n2"
-    test_print_accept "print lower(m_char_range)" "'A'"
-    test_print_accept "print lower(m_bool_range)" "FALSE"
-    test_print_accept "print lower(m_long_range)" "255"
-    test_print_accept "print lower(m_range)" "12"
-
-    # discrete locations
-    test_print_accept "print lower(v_bool)" "FALSE"
-    test_print_accept "print lower(v_char)" {'\^[(]0[)]'}
-    test_print_accept "print lower(v_byte)" "-128"
-    test_print_accept "print lower(v_ubyte)" "0"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print lower(v_int)" "-2147483648"
-    } else {
-	test_print_accept "print lower(v_int)" "-32768"
-    }
-    test_print_accept "print lower(v_uint)" "0"
-    setup_xfail "alpha-*-*"
-    test_print_accept "print lower(v_long)" "-2147483648"
-    test_print_accept "print lower(v_ulong)" "0"
-    test_print_accept "print lower(v_set)" "e1"
-    test_print_accept "print lower(v_set_range)" "e2"
-    test_print_accept "print lower(v_numbered_set)" "n2"
-    test_print_accept "print lower(v_char_range)" "'A'"
-    test_print_accept "print lower(v_bool_range)" "FALSE"
-    test_print_accept "print lower(v_long_range)" "255"
-    test_print_accept "print lower(v_range)" "12"
-
-    # string mode names
-    test_print_accept "print lower(m_chars)" "0"
-    test_print_accept "print lower(m_chars_v)" "0"
-    test_print_accept "print lower(m_bits)" "0"
-
-    # string locations
-    test_print_accept "print lower(v_chars)" "0"
-    test_print_accept "print lower(v_chars_v)" "0"
-    test_print_accept "print lower(v_bits)" "0"
-
-    # string expressions
-    test_print_accept "print lower(\"abcd\")" "0"
-    test_print_accept "print lower(B'010101')" "0"
-
-    # array mode name
-    test_print_accept "print lower(m_arr)" "1";
-    test_print_accept "print lower(m_char_arr)" {'\^[(]0[)]'}
-    test_print_accept "print lower(m_bool_arr)" "FALSE"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print lower(m_int_arr)" "-2147483648"
-    } else {
-	test_print_accept "print lower(m_int_arr)" "-32768"
-    }
-    test_print_accept "print lower(m_set_arr)" "e1"
-    test_print_accept "print lower(m_set_range_arr)" "e2"
-    test_print_accept "print lower(m_numbered_set_arr)" "n2"
-    test_print_accept "print lower(m_char_range_arr)" "'A'"
-    test_print_accept "print lower(m_bool_range_arr)" "FALSE"
-    test_print_accept "print lower(m_long_range_arr)" "255"
-    test_print_accept "print lower(m_range_arr)" "12"
-
-    # array locations
-    test_print_accept "print lower(v_arr)" "1";
-    test_print_accept "print lower(v_char_arr)" {'\^[(]0[)]'}
-    test_print_accept "print lower(v_bool_arr)" "FALSE"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print lower(v_int_arr)" "-2147483648"
-    } else {
-	test_print_accept "print lower(v_int_arr)" "-32768"
-    }
-    test_print_accept "print lower(v_set_arr)" "e1"
-    test_print_accept "print lower(v_set_range_arr)" "e2"
-    test_print_accept "print lower(v_numbered_set_arr)" "n2"
-    test_print_accept "print lower(v_char_range_arr)" "'A'"
-    test_print_accept "print lower(v_bool_range_arr)" "FALSE"
-    test_print_accept "print lower(v_long_range_arr)" "255"
-    test_print_accept "print lower(v_range_arr)" "12"
-}
-
-proc test_upper {} {
-    global passcount
-
-    verbose "testing builtin UPPER"
-    set passcount 0
-
-    # discrete mode names
-    test_print_accept "print upper(bool)" "TRUE"
-    test_print_accept "print upper(char)" {'\^[(]255[)]'}
-    test_print_accept "print upper(byte)" "127"
-    test_print_accept "print upper(ubyte)" "255"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print upper(int)" "2147483647"
-	test_print_accept "print upper(uint)" "4294967295"
-	setup_xfail "alpha-*-*"
-	test_print_accept "print upper(long)" "4294967295"
-	test_print_accept "print upper(ulong)" "18446744073709551615"
-    } else {
-	test_print_accept "print upper(int)" "32767"
-	test_print_accept "print upper(uint)" "65535"
-	test_print_accept "print upper(long)" "2147483647"
-	test_print_accept "print upper(ulong)" "4294967295"
-    }
-    test_print_accept "print upper(m_set)" "e6"
-    test_print_accept "print upper(m_set_range)" "e5"
-    test_print_accept "print upper(m_numbered_set)" "n5"
-    test_print_accept "print upper(m_char_range)" "'Z'"
-    test_print_accept "print upper(m_bool_range)" "FALSE"
-    test_print_accept "print upper(m_long_range)" "3211"
-    test_print_accept "print upper(m_range)" "28"
-
-    # discrete locations
-    test_print_accept "print upper(v_bool)" "TRUE"
-    test_print_accept "print upper(v_char)" {'\^[(]255[)]'}
-    test_print_accept "print upper(v_byte)" "127"
-    test_print_accept "print upper(v_ubyte)" "255"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print upper(v_int)" "2147483647"
-	test_print_accept "print upper(v_uint)" "4294967295"
-	setup_xfail "alpha-*-*"
-	test_print_accept "print upper(v_long)" "4294967295"
-	test_print_accept "print upper(v_ulong)" "18446744073709551615"
-    } else {
-	test_print_accept "print upper(v_int)" "32767"
-	test_print_accept "print upper(v_uint)" "65535"
-	test_print_accept "print upper(v_long)" "2147483647"
-	test_print_accept "print upper(v_ulong)" "4294967295"
-    }
-    test_print_accept "print upper(v_set)" "e6"
-    test_print_accept "print upper(v_set_range)" "e5"
-    test_print_accept "print upper(v_numbered_set)" "n5"
-    test_print_accept "print upper(v_char_range)" "'Z'"
-    test_print_accept "print upper(v_bool_range)" "FALSE"
-    test_print_accept "print upper(v_long_range)" "3211"
-    test_print_accept "print upper(v_range)" "28"
-
-    # string mode names
-    test_print_accept "print upper(m_chars)" "19"
-    test_print_accept "print upper(m_chars_v)" "19"
-    test_print_accept "print upper(m_bits)" "9"
-
-    # string locations
-    test_print_accept "print upper(v_chars)" "19"
-    test_print_accept "print upper(v_chars_v)" "19"
-    test_print_accept "print upper(v_bits)" "9"
-
-    # string expressions
-    test_print_accept "print upper(\"abcd\")" "3"
-    test_print_accept "print upper(B'010101')" "5"
-
-    # array mode name
-    test_print_accept "print upper(m_arr)" "10";
-    test_print_accept "print upper(m_char_arr)" {'\^[(]255[)]'}
-    test_print_accept "print upper(m_bool_arr)" "TRUE"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print upper(m_int_arr)" "2147483647"
-    } else {
-	test_print_accept "print upper(m_int_arr)" "32767"
-    }
-    test_print_accept "print upper(m_set_arr)" "e6"
-    test_print_accept "print upper(m_set_range_arr)" "e5"
-    test_print_accept "print upper(m_numbered_set_arr)" "n5"
-    test_print_accept "print upper(m_char_range_arr)" "'Z'"
-    test_print_accept "print upper(m_bool_range_arr)" "FALSE"
-    test_print_accept "print upper(m_long_range_arr)" "3211"
-    test_print_accept "print upper(m_range_arr)" "28"
-
-    # array locations
-    test_print_accept "print upper(v_arr)" "10";
-    test_print_accept "print upper(v_char_arr)" {'\^[(]255[)]'}
-    test_print_accept "print upper(v_bool_arr)" "TRUE"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print upper(v_int_arr)" "2147483647"
-    } else {
-	test_print_accept "print upper(v_int_arr)" "32767"
-    }
-    test_print_accept "print upper(v_set_arr)" "e6"
-    test_print_accept "print upper(v_set_range_arr)" "e5"
-    test_print_accept "print upper(v_numbered_set_arr)" "n5"
-    test_print_accept "print upper(v_char_range_arr)" "'Z'"
-    test_print_accept "print upper(v_bool_range_arr)" "FALSE"
-    test_print_accept "print upper(v_long_range_arr)" "3211"
-    test_print_accept "print upper(v_range_arr)" "28"
-}
-
-proc test_length {} {
-    global passcount
-
-    verbose "testing builtin LENGTH"
-    set passcount 0
-
-    # string locations
-    test_print_accept "print length(v_chars)" "20"
-    test_print_accept "print length(v_chars_v)" "7";
-    test_print_accept "print length(v_bits)" "10";
-
-    # string expressions
-    test_print_accept "print length(\"the quick brown fox ...\")" "23"
-    test_print_accept "print length(B'010101010101')" "12"
-    test_print_accept "print length(\"foo \" // \"bar\")" "7"
-
-    # check some failures
-    setup_xfail "*-*-*"
-    test_print_accept "print length(m_chars)" "typename in invalid context"
-    setup_xfail "*-*-*"
-    test_print_accept "print length(v_byte)" "bad argument to LENGTH builtin"
-    setup_xfail "*-*-*"
-    test_print_accept "print length(b'000000' // b'111111')" "12"
-}
-
-proc test_size {} {
-    global passcount
-
-    verbose "testing builtin SIZE"
-    set passcount 0
-
-    # modes
-    test_print_accept "print size(bool)" "1"
-    test_print_accept "print size(char)" "1"
-    test_print_accept "print size(byte)" "1"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print size(int)" "4"
-	test_print_accept "print size(ulong)" "8"
-	test_print_accept "print size(ptr)" "8"
-	test_print_accept "print size(m_chars_v)" "24"
-	test_print_accept "print size(m_struct)" "40"
-    } else {
-	test_print_accept "print size(int)" "2"
-	test_print_accept "print size(ulong)" "4"
-	test_print_accept "print size(ptr)" "4"
-	test_print_accept "print size(m_chars_v)" "22"
-	test_print_accept "print size(m_struct)" "36"
-    }
-    test_print_accept "print size(m_set)" "1"
-    test_print_accept "print size(m_numbered_set)" "1"
-    test_print_accept "print size(m_char_range)" "1"
-    test_print_accept "print size(m_range_arr)" "17"
-    test_print_accept "print size(m_chars)" "20"
-    test_print_accept "print size(m_bits)" "2"
-
-    # locations
-    test_print_accept "print size(v_bool)" "1"
-    test_print_accept "print size(v_char)" "1"
-    test_print_accept "print size(v_byte)" "1"
-    if [istarget "alpha-*-*"] then {
-	test_print_accept "print size(v_int)" "4"
-	test_print_accept "print size(v_ulong)" "8"
-	test_print_accept "print size(v_ptr)" "8"
-	test_print_accept "print size(v_chars_v)" "24"
-	test_print_accept "print size(v_struct)" "40"
-    } else {
-	test_print_accept "print size(v_int)" "2"
-	test_print_accept "print size(v_ulong)" "4"
-	test_print_accept "print size(v_ptr)" "4"
-	test_print_accept "print size(v_chars_v)" "22"
-	test_print_accept "print size(v_struct)" "36"
-    }
-    test_print_accept "print size(v_set)" "1"
-    test_print_accept "print size(v_numbered_set)" "1"
-    test_print_accept "print size(v_char_range)" "1"
-    test_print_accept "print size(v_range_arr)" "17"
-    test_print_accept "print size(v_chars)" "20"
-    test_print_accept "print size(v_bits)" "2"
-}
-
-proc test_num {} {
-    global passcount
-
-    verbose "testing builtin NUM"
-    set passcount 0
-
-    # constants
-    test_print_accept "print num(false)" "0"
-    test_print_accept "print num(true)" "1"
-    test_print_accept "print num(10)" "10"
-    test_print_accept "print num(33-34)" "-1"
-    test_print_accept "print num('X')" "88"
-    test_print_accept "print num(e5)" "4"
-
-    # locations
-    test_print_accept "print num(v_bool)" "0"
-    test_print_accept "print num(v_char)" "88"
-    test_print_accept "print num(v_byte)" "-30"
-    test_print_accept "print num(v_ubyte)" "30"
-    test_print_accept "print num(v_int)" "-333"
-    test_print_accept "print num(v_uint)" "333"
-    test_print_accept "print num(v_long)" "-4444"
-    test_print_accept "print num(v_ulong)" "4444"
-    test_print_accept "print num(v_set)" "2"
-    test_print_accept "print num(v_set_range)" "2"
-    test_print_accept "print num(v_numbered_set)" "35"
-    test_print_accept "print num(v_char_range)" "71"
-    test_print_accept "print num(v_long_range)" "1000"
-    test_print_accept "print num(v_range)" "23"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
-    # test builtins as described in chapter 6.20.3 Z.200
-    test_num
-    test_size
-    test_lower
-    test_upper
-    test_length
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "builtins"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break xx_\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n" 
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE #	First one is string to send_gdb to gdb
+# OBSOLETE #	Second one is string to match gdb result to
+# OBSOLETE #	Third one is an optional message to be printed
+# OBSOLETE 
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global passcount
+# OBSOLETE     global verbose
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE     } else {
+# OBSOLETE 	set message [lindex $args 0]
+# OBSOLETE     }
+# OBSOLETE     set sendthis [lindex $args 0]
+# OBSOLETE     set expectthis [lindex $args 1]
+# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE     if $result==0 {incr passcount}
+# OBSOLETE     return $result
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_lower {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin LOWER"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete mode names
+# OBSOLETE     test_print_accept "print lower(bool)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(char)" {'\^[(]0[)]'}
+# OBSOLETE     test_print_accept "print lower(byte)" "-128"
+# OBSOLETE     test_print_accept "print lower(ubyte)" "0"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print lower(int)" "-2147483648"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print lower(int)" "-32768"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print lower(uint)" "0"
+# OBSOLETE     setup_xfail "alpha-*-*"
+# OBSOLETE     test_print_accept "print lower(long)" "-2147483648"
+# OBSOLETE     test_print_accept "print lower(ulong)" "0"
+# OBSOLETE     test_print_accept "print lower(m_set)" "e1"
+# OBSOLETE     test_print_accept "print lower(m_set_range)" "e2"
+# OBSOLETE     test_print_accept "print lower(m_numbered_set)" "n2"
+# OBSOLETE     test_print_accept "print lower(m_char_range)" "'A'"
+# OBSOLETE     test_print_accept "print lower(m_bool_range)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(m_long_range)" "255"
+# OBSOLETE     test_print_accept "print lower(m_range)" "12"
+# OBSOLETE 
+# OBSOLETE     # discrete locations
+# OBSOLETE     test_print_accept "print lower(v_bool)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(v_char)" {'\^[(]0[)]'}
+# OBSOLETE     test_print_accept "print lower(v_byte)" "-128"
+# OBSOLETE     test_print_accept "print lower(v_ubyte)" "0"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print lower(v_int)" "-2147483648"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print lower(v_int)" "-32768"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print lower(v_uint)" "0"
+# OBSOLETE     setup_xfail "alpha-*-*"
+# OBSOLETE     test_print_accept "print lower(v_long)" "-2147483648"
+# OBSOLETE     test_print_accept "print lower(v_ulong)" "0"
+# OBSOLETE     test_print_accept "print lower(v_set)" "e1"
+# OBSOLETE     test_print_accept "print lower(v_set_range)" "e2"
+# OBSOLETE     test_print_accept "print lower(v_numbered_set)" "n2"
+# OBSOLETE     test_print_accept "print lower(v_char_range)" "'A'"
+# OBSOLETE     test_print_accept "print lower(v_bool_range)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(v_long_range)" "255"
+# OBSOLETE     test_print_accept "print lower(v_range)" "12"
+# OBSOLETE 
+# OBSOLETE     # string mode names
+# OBSOLETE     test_print_accept "print lower(m_chars)" "0"
+# OBSOLETE     test_print_accept "print lower(m_chars_v)" "0"
+# OBSOLETE     test_print_accept "print lower(m_bits)" "0"
+# OBSOLETE 
+# OBSOLETE     # string locations
+# OBSOLETE     test_print_accept "print lower(v_chars)" "0"
+# OBSOLETE     test_print_accept "print lower(v_chars_v)" "0"
+# OBSOLETE     test_print_accept "print lower(v_bits)" "0"
+# OBSOLETE 
+# OBSOLETE     # string expressions
+# OBSOLETE     test_print_accept "print lower(\"abcd\")" "0"
+# OBSOLETE     test_print_accept "print lower(B'010101')" "0"
+# OBSOLETE 
+# OBSOLETE     # array mode name
+# OBSOLETE     test_print_accept "print lower(m_arr)" "1";
+# OBSOLETE     test_print_accept "print lower(m_char_arr)" {'\^[(]0[)]'}
+# OBSOLETE     test_print_accept "print lower(m_bool_arr)" "FALSE"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print lower(m_int_arr)" "-2147483648"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print lower(m_int_arr)" "-32768"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print lower(m_set_arr)" "e1"
+# OBSOLETE     test_print_accept "print lower(m_set_range_arr)" "e2"
+# OBSOLETE     test_print_accept "print lower(m_numbered_set_arr)" "n2"
+# OBSOLETE     test_print_accept "print lower(m_char_range_arr)" "'A'"
+# OBSOLETE     test_print_accept "print lower(m_bool_range_arr)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(m_long_range_arr)" "255"
+# OBSOLETE     test_print_accept "print lower(m_range_arr)" "12"
+# OBSOLETE 
+# OBSOLETE     # array locations
+# OBSOLETE     test_print_accept "print lower(v_arr)" "1";
+# OBSOLETE     test_print_accept "print lower(v_char_arr)" {'\^[(]0[)]'}
+# OBSOLETE     test_print_accept "print lower(v_bool_arr)" "FALSE"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print lower(v_int_arr)" "-2147483648"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print lower(v_int_arr)" "-32768"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print lower(v_set_arr)" "e1"
+# OBSOLETE     test_print_accept "print lower(v_set_range_arr)" "e2"
+# OBSOLETE     test_print_accept "print lower(v_numbered_set_arr)" "n2"
+# OBSOLETE     test_print_accept "print lower(v_char_range_arr)" "'A'"
+# OBSOLETE     test_print_accept "print lower(v_bool_range_arr)" "FALSE"
+# OBSOLETE     test_print_accept "print lower(v_long_range_arr)" "255"
+# OBSOLETE     test_print_accept "print lower(v_range_arr)" "12"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_upper {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin UPPER"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete mode names
+# OBSOLETE     test_print_accept "print upper(bool)" "TRUE"
+# OBSOLETE     test_print_accept "print upper(char)" {'\^[(]255[)]'}
+# OBSOLETE     test_print_accept "print upper(byte)" "127"
+# OBSOLETE     test_print_accept "print upper(ubyte)" "255"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print upper(int)" "2147483647"
+# OBSOLETE 	test_print_accept "print upper(uint)" "4294967295"
+# OBSOLETE 	setup_xfail "alpha-*-*"
+# OBSOLETE 	test_print_accept "print upper(long)" "4294967295"
+# OBSOLETE 	test_print_accept "print upper(ulong)" "18446744073709551615"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print upper(int)" "32767"
+# OBSOLETE 	test_print_accept "print upper(uint)" "65535"
+# OBSOLETE 	test_print_accept "print upper(long)" "2147483647"
+# OBSOLETE 	test_print_accept "print upper(ulong)" "4294967295"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print upper(m_set)" "e6"
+# OBSOLETE     test_print_accept "print upper(m_set_range)" "e5"
+# OBSOLETE     test_print_accept "print upper(m_numbered_set)" "n5"
+# OBSOLETE     test_print_accept "print upper(m_char_range)" "'Z'"
+# OBSOLETE     test_print_accept "print upper(m_bool_range)" "FALSE"
+# OBSOLETE     test_print_accept "print upper(m_long_range)" "3211"
+# OBSOLETE     test_print_accept "print upper(m_range)" "28"
+# OBSOLETE 
+# OBSOLETE     # discrete locations
+# OBSOLETE     test_print_accept "print upper(v_bool)" "TRUE"
+# OBSOLETE     test_print_accept "print upper(v_char)" {'\^[(]255[)]'}
+# OBSOLETE     test_print_accept "print upper(v_byte)" "127"
+# OBSOLETE     test_print_accept "print upper(v_ubyte)" "255"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print upper(v_int)" "2147483647"
+# OBSOLETE 	test_print_accept "print upper(v_uint)" "4294967295"
+# OBSOLETE 	setup_xfail "alpha-*-*"
+# OBSOLETE 	test_print_accept "print upper(v_long)" "4294967295"
+# OBSOLETE 	test_print_accept "print upper(v_ulong)" "18446744073709551615"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print upper(v_int)" "32767"
+# OBSOLETE 	test_print_accept "print upper(v_uint)" "65535"
+# OBSOLETE 	test_print_accept "print upper(v_long)" "2147483647"
+# OBSOLETE 	test_print_accept "print upper(v_ulong)" "4294967295"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print upper(v_set)" "e6"
+# OBSOLETE     test_print_accept "print upper(v_set_range)" "e5"
+# OBSOLETE     test_print_accept "print upper(v_numbered_set)" "n5"
+# OBSOLETE     test_print_accept "print upper(v_char_range)" "'Z'"
+# OBSOLETE     test_print_accept "print upper(v_bool_range)" "FALSE"
+# OBSOLETE     test_print_accept "print upper(v_long_range)" "3211"
+# OBSOLETE     test_print_accept "print upper(v_range)" "28"
+# OBSOLETE 
+# OBSOLETE     # string mode names
+# OBSOLETE     test_print_accept "print upper(m_chars)" "19"
+# OBSOLETE     test_print_accept "print upper(m_chars_v)" "19"
+# OBSOLETE     test_print_accept "print upper(m_bits)" "9"
+# OBSOLETE 
+# OBSOLETE     # string locations
+# OBSOLETE     test_print_accept "print upper(v_chars)" "19"
+# OBSOLETE     test_print_accept "print upper(v_chars_v)" "19"
+# OBSOLETE     test_print_accept "print upper(v_bits)" "9"
+# OBSOLETE 
+# OBSOLETE     # string expressions
+# OBSOLETE     test_print_accept "print upper(\"abcd\")" "3"
+# OBSOLETE     test_print_accept "print upper(B'010101')" "5"
+# OBSOLETE 
+# OBSOLETE     # array mode name
+# OBSOLETE     test_print_accept "print upper(m_arr)" "10";
+# OBSOLETE     test_print_accept "print upper(m_char_arr)" {'\^[(]255[)]'}
+# OBSOLETE     test_print_accept "print upper(m_bool_arr)" "TRUE"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print upper(m_int_arr)" "2147483647"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print upper(m_int_arr)" "32767"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print upper(m_set_arr)" "e6"
+# OBSOLETE     test_print_accept "print upper(m_set_range_arr)" "e5"
+# OBSOLETE     test_print_accept "print upper(m_numbered_set_arr)" "n5"
+# OBSOLETE     test_print_accept "print upper(m_char_range_arr)" "'Z'"
+# OBSOLETE     test_print_accept "print upper(m_bool_range_arr)" "FALSE"
+# OBSOLETE     test_print_accept "print upper(m_long_range_arr)" "3211"
+# OBSOLETE     test_print_accept "print upper(m_range_arr)" "28"
+# OBSOLETE 
+# OBSOLETE     # array locations
+# OBSOLETE     test_print_accept "print upper(v_arr)" "10";
+# OBSOLETE     test_print_accept "print upper(v_char_arr)" {'\^[(]255[)]'}
+# OBSOLETE     test_print_accept "print upper(v_bool_arr)" "TRUE"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print upper(v_int_arr)" "2147483647"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print upper(v_int_arr)" "32767"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print upper(v_set_arr)" "e6"
+# OBSOLETE     test_print_accept "print upper(v_set_range_arr)" "e5"
+# OBSOLETE     test_print_accept "print upper(v_numbered_set_arr)" "n5"
+# OBSOLETE     test_print_accept "print upper(v_char_range_arr)" "'Z'"
+# OBSOLETE     test_print_accept "print upper(v_bool_range_arr)" "FALSE"
+# OBSOLETE     test_print_accept "print upper(v_long_range_arr)" "3211"
+# OBSOLETE     test_print_accept "print upper(v_range_arr)" "28"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_length {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin LENGTH"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # string locations
+# OBSOLETE     test_print_accept "print length(v_chars)" "20"
+# OBSOLETE     test_print_accept "print length(v_chars_v)" "7";
+# OBSOLETE     test_print_accept "print length(v_bits)" "10";
+# OBSOLETE 
+# OBSOLETE     # string expressions
+# OBSOLETE     test_print_accept "print length(\"the quick brown fox ...\")" "23"
+# OBSOLETE     test_print_accept "print length(B'010101010101')" "12"
+# OBSOLETE     test_print_accept "print length(\"foo \" // \"bar\")" "7"
+# OBSOLETE 
+# OBSOLETE     # check some failures
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print length(m_chars)" "typename in invalid context"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print length(v_byte)" "bad argument to LENGTH builtin"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print length(b'000000' // b'111111')" "12"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_size {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin SIZE"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # modes
+# OBSOLETE     test_print_accept "print size(bool)" "1"
+# OBSOLETE     test_print_accept "print size(char)" "1"
+# OBSOLETE     test_print_accept "print size(byte)" "1"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print size(int)" "4"
+# OBSOLETE 	test_print_accept "print size(ulong)" "8"
+# OBSOLETE 	test_print_accept "print size(ptr)" "8"
+# OBSOLETE 	test_print_accept "print size(m_chars_v)" "24"
+# OBSOLETE 	test_print_accept "print size(m_struct)" "40"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print size(int)" "2"
+# OBSOLETE 	test_print_accept "print size(ulong)" "4"
+# OBSOLETE 	test_print_accept "print size(ptr)" "4"
+# OBSOLETE 	test_print_accept "print size(m_chars_v)" "22"
+# OBSOLETE 	test_print_accept "print size(m_struct)" "36"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print size(m_set)" "1"
+# OBSOLETE     test_print_accept "print size(m_numbered_set)" "1"
+# OBSOLETE     test_print_accept "print size(m_char_range)" "1"
+# OBSOLETE     test_print_accept "print size(m_range_arr)" "17"
+# OBSOLETE     test_print_accept "print size(m_chars)" "20"
+# OBSOLETE     test_print_accept "print size(m_bits)" "2"
+# OBSOLETE 
+# OBSOLETE     # locations
+# OBSOLETE     test_print_accept "print size(v_bool)" "1"
+# OBSOLETE     test_print_accept "print size(v_char)" "1"
+# OBSOLETE     test_print_accept "print size(v_byte)" "1"
+# OBSOLETE     if [istarget "alpha-*-*"] then {
+# OBSOLETE 	test_print_accept "print size(v_int)" "4"
+# OBSOLETE 	test_print_accept "print size(v_ulong)" "8"
+# OBSOLETE 	test_print_accept "print size(v_ptr)" "8"
+# OBSOLETE 	test_print_accept "print size(v_chars_v)" "24"
+# OBSOLETE 	test_print_accept "print size(v_struct)" "40"
+# OBSOLETE     } else {
+# OBSOLETE 	test_print_accept "print size(v_int)" "2"
+# OBSOLETE 	test_print_accept "print size(v_ulong)" "4"
+# OBSOLETE 	test_print_accept "print size(v_ptr)" "4"
+# OBSOLETE 	test_print_accept "print size(v_chars_v)" "22"
+# OBSOLETE 	test_print_accept "print size(v_struct)" "36"
+# OBSOLETE     }
+# OBSOLETE     test_print_accept "print size(v_set)" "1"
+# OBSOLETE     test_print_accept "print size(v_numbered_set)" "1"
+# OBSOLETE     test_print_accept "print size(v_char_range)" "1"
+# OBSOLETE     test_print_accept "print size(v_range_arr)" "17"
+# OBSOLETE     test_print_accept "print size(v_chars)" "20"
+# OBSOLETE     test_print_accept "print size(v_bits)" "2"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_num {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin NUM"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # constants
+# OBSOLETE     test_print_accept "print num(false)" "0"
+# OBSOLETE     test_print_accept "print num(true)" "1"
+# OBSOLETE     test_print_accept "print num(10)" "10"
+# OBSOLETE     test_print_accept "print num(33-34)" "-1"
+# OBSOLETE     test_print_accept "print num('X')" "88"
+# OBSOLETE     test_print_accept "print num(e5)" "4"
+# OBSOLETE 
+# OBSOLETE     # locations
+# OBSOLETE     test_print_accept "print num(v_bool)" "0"
+# OBSOLETE     test_print_accept "print num(v_char)" "88"
+# OBSOLETE     test_print_accept "print num(v_byte)" "-30"
+# OBSOLETE     test_print_accept "print num(v_ubyte)" "30"
+# OBSOLETE     test_print_accept "print num(v_int)" "-333"
+# OBSOLETE     test_print_accept "print num(v_uint)" "333"
+# OBSOLETE     test_print_accept "print num(v_long)" "-4444"
+# OBSOLETE     test_print_accept "print num(v_ulong)" "4444"
+# OBSOLETE     test_print_accept "print num(v_set)" "2"
+# OBSOLETE     test_print_accept "print num(v_set_range)" "2"
+# OBSOLETE     test_print_accept "print num(v_numbered_set)" "35"
+# OBSOLETE     test_print_accept "print num(v_char_range)" "71"
+# OBSOLETE     test_print_accept "print num(v_long_range)" "1000"
+# OBSOLETE     test_print_accept "print num(v_range)" "23"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE     test_num
+# OBSOLETE     test_size
+# OBSOLETE     test_lower
+# OBSOLETE     test_upper
+# OBSOLETE     test_length
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/callch.exp b/gdb/testsuite/gdb.chill/callch.exp
index 78cf0b7..f81d42f 100644
--- a/gdb/testsuite/gdb.chill/callch.exp
+++ b/gdb/testsuite/gdb.chill/callch.exp
@@ -1,69 +1,69 @@
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests that gdb can call functions in a Chill inferior.
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "callch"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    send_gdb "set language chill\n" ; 
-
-    gdb_test "break callch.ch:48" ""
-    send_gdb "run\n"; gdb_expect -re "Breakpoint .*callch.ch:48.*$gdb_prompt $"
-    gdb_test {set fred(10, i)} {a is '10'; b is '12'.}
-    gdb_test_exact "call klaus()" {here's klaus calling.}
-    gdb_test_exact "call fred()" {too few arguments in function call}
-    # Too many arguments are allowed
-    gdb_test_exact "call klaus(10, 20, 30)" {here's klaus calling.}
-    gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): 1\]\]}\
-	"print a before king"
-    # Current gdb prints 255 for the results that are expected to be -1.
-    setup_xfail "mips*-sgi-irix*"
-    gdb_test {call king(a, otto[[10, 15], [20, 25]])} "x\\(FALSE, FALSE\\) = 10.*p\\(FALSE, FALSE\\) = -1.*x\\(FALSE, TRUE\\) = 15.*p\\(FALSE, TRUE\\) = -1.*x\\(TRUE, FALSE\\) = 20.*p\\(TRUE, FALSE\\) = -1.*x\\(TRUE, TRUE\\) = 25.*p\\(TRUE, TRUE\\) = -1.*"
-    gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): -1\]\]}\
-	"print a after king"
-    gdb_test_exact "call ralph(b)" {x.f1 = 10, x.f2 = FALSE.}
-    gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests that gdb can call functions in a Chill inferior.
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "callch"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n" ; 
+# OBSOLETE 
+# OBSOLETE     gdb_test "break callch.ch:48" ""
+# OBSOLETE     send_gdb "run\n"; gdb_expect -re "Breakpoint .*callch.ch:48.*$gdb_prompt $"
+# OBSOLETE     gdb_test {set fred(10, i)} {a is '10'; b is '12'.}
+# OBSOLETE     gdb_test_exact "call klaus()" {here's klaus calling.}
+# OBSOLETE     gdb_test_exact "call fred()" {too few arguments in function call}
+# OBSOLETE     # Too many arguments are allowed
+# OBSOLETE     gdb_test_exact "call klaus(10, 20, 30)" {here's klaus calling.}
+# OBSOLETE     gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): 1\]\]}\
+# OBSOLETE 	"print a before king"
+# OBSOLETE     # Current gdb prints 255 for the results that are expected to be -1.
+# OBSOLETE     setup_xfail "mips*-sgi-irix*"
+# OBSOLETE     gdb_test {call king(a, otto[[10, 15], [20, 25]])} "x\\(FALSE, FALSE\\) = 10.*p\\(FALSE, FALSE\\) = -1.*x\\(FALSE, TRUE\\) = 15.*p\\(FALSE, TRUE\\) = -1.*x\\(TRUE, FALSE\\) = 20.*p\\(TRUE, FALSE\\) = -1.*x\\(TRUE, TRUE\\) = 25.*p\\(TRUE, TRUE\\) = -1.*"
+# OBSOLETE     gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): -1\]\]}\
+# OBSOLETE 	"print a after king"
+# OBSOLETE     gdb_test_exact "call ralph(b)" {x.f1 = 10, x.f2 = FALSE.}
+# OBSOLETE     gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/chillvars.exp b/gdb/testsuite/gdb.chill/chillvars.exp
index 386bf43..1827c3f 100644
--- a/gdb/testsuite/gdb.chill/chillvars.exp
+++ b/gdb/testsuite/gdb.chill/chillvars.exp
@@ -1,316 +1,316 @@
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "chillvars"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    # This is needed (at least on SunOS4) to make sure the
-    # the symbol table is read.
-    gdb_test "break chillvars.ch:3" ""
-    gdb_test "delete 1" ""
-
-    gdb_test "set width 0" ""
-    gdb_test "set print sevenbit-strings" ""
-    gdb_test "set print address off" ""
-
-    test_BOOL
-    test_CHAR
-    test_BYTE
-    test_UBYTE
-    test_INT
-    test_UINT
-    test_LONG
-    test_ULONG
-    test_REAL
-    test_LONG_REAL
-    test_POWERSET
-    test_arrays
-    test_strings
-    test_structs
-
-    test_ptr
-}
-
-proc test_BOOL {} {
-
-    gdb_test "ptype bool_true"		"type = (BOOL|bool)"
-    gdb_test "ptype bool_false"		"type = (BOOL|bool)"
-    gdb_test "whatis bool_true"		"type = (BOOL|bool)"
-    gdb_test "whatis bool_false"	"type = (BOOL|bool)"
-    gdb_test "print bool_false"		" = FALSE"
-    gdb_test "print bool_true"		" = TRUE"
-
-}
-
-proc test_CHAR {} {
-    gdb_test "ptype control_char"	"type = (CHAR|char)"
-    gdb_test "whatis control_char"	"type = (CHAR|char)"
-    gdb_test "print control_char"	{ = '\^[(]7[)]'}
-    gdb_test "ptype printable_char"	"type = (CHAR|char)"
-    gdb_test "whatis printable_char"	"type = (CHAR|char)"
-    gdb_test "print printable_char"	" = 'a'"
-
-    gdb_test "print lower(char)"	{ = '\^[(]0[)]'}
-    gdb_test "print upper(char)"	{ = '\^[(]255[)]'}
-}
-
-proc test_BYTE {} {
-    gdb_test "ptype byte_low"		"type = (BYTE|byte)"
-    gdb_test "whatis byte_low"		"type = (BYTE|byte)"
-    gdb_test "print byte_low"		" = -128"
-    gdb_test "ptype byte_high"		"type = (BYTE|byte)"
-    gdb_test "whatis byte_high"		"type = (BYTE|byte)"
-    gdb_test "print byte_high"		" = 127"
-
-    gdb_test "print lower(byte)"	" = -128"
-    gdb_test "print upper(byte)"	" = 127"
-    gdb_test "print lower(byte_high)"	" = -128"
-    gdb_test "print upper(byte_high)"	" = 127"
-}
-
-proc test_UBYTE {} {
-    gdb_test "ptype ubyte_low"		"type = (UBYTE|ubyte)"
-    gdb_test "whatis ubyte_low"		"type = (UBYTE|ubyte)"
-    gdb_test "print ubyte_low"		" = 0"
-    gdb_test "ptype ubyte_high"		"type = (UBYTE|ubyte)"
-    gdb_test "whatis ubyte_high"	"type = (UBYTE|ubyte)"
-    gdb_test "print ubyte_high"		" = 255"
-}
-
-proc test_INT {} {
-    gdb_test "ptype int_low"		"type = (INT|int)"
-    gdb_test "whatis int_low"		"type = (INT|int)"
-    gdb_test "print int_low"		" = -32768"
-    gdb_test "ptype int_high"		"type = (INT|int)"
-    gdb_test "whatis int_high"		"type = (INT|int)"
-    gdb_test "print int_high"		" = 32767"
-}
-
-proc test_UINT {} {
-    gdb_test "ptype uint_low"		"type = (UINT|uint)"
-    gdb_test "whatis uint_low"		"type = (UINT|uint)"
-    gdb_test "print uint_low"		" = 0"
-    gdb_test "ptype uint_high"		"type = (UINT|uint)"
-    gdb_test "whatis uint_high"		"type = (UINT|uint)"
-    gdb_test "print uint_high"		" = 65535"
-}
-
-proc test_LONG {} {
-    gdb_test "ptype long_low"		"type = (LONG|long)"
-    gdb_test "whatis long_low"		"type = (LONG|long)"
-    gdb_test "print long_low"		" = -2147483648"
-    gdb_test "ptype long_high"		"type = (LONG|long)"
-    gdb_test "whatis long_high"		"type = (LONG|long)"
-    gdb_test "print long_high"		" = 2147483647"
-}
-
-proc test_ULONG {} {
-    gdb_test "ptype ulong_low"		"type = (ULONG|ulong)"
-    gdb_test "whatis ulong_low"		"type = (ULONG|ulong)"
-    gdb_test "print ulong_low"		" = 0"
-    gdb_test "ptype ulong_high"		"type = (ULONG|ulong)"
-    gdb_test "whatis ulong_high"	"type = (ULONG|ulong)"
-    gdb_test "print ulong_high"		" = 4294967295"
-}
-
-proc test_REAL {} {
-    gdb_test "ptype real1"		"type = (FLOAT|float)"
-    gdb_test "whatis real1"		"type = (FLOAT|float)"
-    gdb_test "print real1"		" = 3.14159274"
-}
-
-proc test_LONG_REAL {} {
-    gdb_test "ptype long_real1"		"type = (DOUBLE|double)"
-    gdb_test "whatis long_real1"	"type = (DOUBLE|double)"
-    gdb_test "print long_real1"		" = 3\\.1400000000000001e\\+300"
-}
-
-proc test_POWERSET {} {
-}
-
-proc test_arrays {} {
-    gdb_test "ptype booltable1"		"type = ARRAY \\(+0:3\\)+ (BOOL|bool)"
-    gdb_test_exact "print booltable1"	\
-	{ = [(0): TRUE, (1:2): FALSE, (3): TRUE]}
-
-    gdb_test "ptype booltable2"		"type = ARRAY \\(+4:7\\)+ (BOOL|bool)"
-    gdb_test_exact "print booltable2" { = [(4): TRUE, (5:6): FALSE, (7): TRUE]}
-
-    gdb_test "ptype chartable1"		"type = ARRAY \\(+0:2\\)+ (CHAR|char)"
-    gdb_test_exact "print chartable1"  {= [(0): '^(0)', (1): '^(1)', (2): '^(2)']}
-
-    gdb_test "ptype chartable2"		"type = ARRAY \\(+3:5\\)+ (CHAR|char)"
-    gdb_test_exact "print chartable2"	\
-	{= [(3): '^(0)', (4): '^(1)', (5): '^(2)']}
-
-    gdb_test "ptype bytetable1"		"type = ARRAY \\(+0:4\\)+ (BYTE|byte)"
-    gdb_test_exact "print bytetable1"		\
-       {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
-    gdb_test "ptype bytetable2"		"type = ARRAY \\(+5:9\\)+ (BYTE|byte)"
-    gdb_test_exact "print bytetable2"	\
-	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
-    gdb_test "ptype bytetable3" \
-	"type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
-    gdb_test_exact "print bytetable3" \
-    {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
-    gdb_test "ptype bytetable4" \
-	"type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
-    gdb_test_exact "print bytetable4" \
-    {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
-
-    gdb_test "ptype ubytetable1"	"type = ARRAY \\(+0:4\\)+ (UBYTE|ubyte)"
-    gdb_test_exact "print ubytetable1"	\
-	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
-    gdb_test "ptype ubytetable2"	"type = ARRAY \\(+5:9\\)+ (UBYTE|ubyte)"
-    gdb_test_exact "print ubytetable2"	\
-	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
-    gdb_test "ptype inttable1"		"type = ARRAY \\(+0:4\\)+ (INT|int)"
-    gdb_test_exact "print inttable1"	\
-	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
-    gdb_test "ptype inttable2"		"type = ARRAY \\(+5:9\\)+ (INT|int)"
-    gdb_test_exact "print inttable2"		\
-	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
-    gdb_test "ptype uinttable1"		"type = ARRAY \\(+0:4\\)+ (UINT|uint)"
-    gdb_test_exact "print uinttable1"	\
-	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
-    gdb_test "ptype uinttable2"		"type = ARRAY \\(+5:9\\)+ (UINT|uint)"
-    gdb_test_exact "print uinttable2"	\
-	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
-    gdb_test "ptype longtable1"		"type = ARRAY \\(+0:4\\)+ (LONG|long)"
-    gdb_test_exact "print longtable1"	\
-	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
-    gdb_test "ptype longtable2"		"type = ARRAY \\(+5:9\\)+ (LONG|long)"
-    gdb_test_exact "print longtable2"	\
-	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
-    gdb_test "ptype ulongtable1"	"type = ARRAY \\(+0:4\\)+ (ULONG|ulong)"
-    gdb_test_exact "print ulongtable1"	\
-	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
-    gdb_test "ptype ulongtable2"	"type = ARRAY \\(+5:9\\)+ (ULONG|ulong)"
-    gdb_test_exact "print ulongtable2"	\
-	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
-    gdb_test "ptype realtable1"		"type = ARRAY \\(+0:4\\)+ (FLOAT|float)"
-    gdb_test_exact "print realtable1"	\
-	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
-    gdb_test "ptype realtable2"		"type = ARRAY \\(+5:9\\)+ (FLOAT|float)"
-    gdb_test_exact "print realtable2"	\
-	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
-    gdb_test "ptype longrealtable1"	"type = ARRAY \\(+0:4\\)+ (DOUBLE|double)"
-    gdb_test_exact "print longrealtable1" \
-	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
-    gdb_test "ptype longrealtable2"	"type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
-    gdb_test_exact "print longrealtable2"	\
-	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
-    gdb_test "print length(longrealtable2)" {= 5}
-    gdb_test "print lower(longrealtable2)" {= 5}
-    gdb_test "print upper(longrealtable2)" {= 9}
-}
-
-proc test_strings {} {
-
-    gdb_test "ptype string1"		"type = CHARS \[(\]4\[)\]+"
-    gdb_test "print string1"		" = \"abcd\""
-
-    gdb_test "ptype string2"		"type = CHARS \[(\]+5\[)\]+"
-    gdb_test "print string2"		{ = \"ef\^\(0\)gh\"}
-
-    gdb_test "ptype string3"		"type = CHARS \[(\]+6\[)\]+"
-    gdb_test "print string3"		" = \"efghij\""
-
-    gdb_test "ptype string4"		"type = CHARS \[(\]+7\[)\]+"
-    gdb_test "print string4"		{ = \"zzzzzz\^\(0\)\"}
-
-    # These tests require a running process, so run to one of the procs
-    # and then do the tests.
-
-    if [runto scalar_arithmetic] then {
-	gdb_test "ptype string1//string2"	"type = CHARS \\(9\\)"
-	gdb_test "print string1//string2"    { = \"abcdef\^\(0\)gh\"}
-	gdb_test_exact {ptype "a chill string"} {type = CHARS (14)}
-	gdb_test "print 'a chill string'"	" = \"a chill string\""
-	gdb_test "print \"ef\"//c'00'//\"gh\""	{ = \"ef\^\(0\)gh\"}
-	gdb_test "print string1 // \"efgh\""	" = \"abcdefgh\""
-	gdb_test "print (6) 'z'"		" = \"zzzzzz\""
-	gdb_test "ptype (6) 'z'"		"type = CHARS \[(\]+6\[)\]+"
-	gdb_test "print (1+2*3) 'x'"		" = \"xxxxxxx\""
-	gdb_test "ptype (1+2*3) 'x'"		"type = CHARS \[(\]+7\[)\]+"
-    }
-
-}
-
-proc test_structs {} {
-    gdb_test "ptype struct1" \
-	"type = STRUCT \\(+.*abool (BOOL|bool),.*aint (INT|int),.*astring CHARS \\(+8\\)+.*\\)+"
-    gdb_test "print struct1" \
-	".* = \\\[\.abool: TRUE, \.aint: 123, \.astring: \"a string\"\\\]"
-    gdb_test "ptype struct2" \
-	"type = STRUCT \\(+.*abool (BOOL|bool),.*nstruct simple_struct,.*aint (INT|int).*\\)+"
-    gdb_test "print struct2" \
-	".* = \\\[.abool: TRUE, \.nstruct: \\\[\.abool: FALSE, \.aint: 456, \.astring: \"deadbeef\"\\\], \.aint: 789\\\]"
-}
-
-proc test_ptr {} {
-    # This is to test Cygnus PR 6932
-    gdb_test "print xptr->int" ".* = 32767"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "chillvars"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE     # the symbol table is read.
+# OBSOLETE     gdb_test "break chillvars.ch:3" ""
+# OBSOLETE     gdb_test "delete 1" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "set width 0" ""
+# OBSOLETE     gdb_test "set print sevenbit-strings" ""
+# OBSOLETE     gdb_test "set print address off" ""
+# OBSOLETE 
+# OBSOLETE     test_BOOL
+# OBSOLETE     test_CHAR
+# OBSOLETE     test_BYTE
+# OBSOLETE     test_UBYTE
+# OBSOLETE     test_INT
+# OBSOLETE     test_UINT
+# OBSOLETE     test_LONG
+# OBSOLETE     test_ULONG
+# OBSOLETE     test_REAL
+# OBSOLETE     test_LONG_REAL
+# OBSOLETE     test_POWERSET
+# OBSOLETE     test_arrays
+# OBSOLETE     test_strings
+# OBSOLETE     test_structs
+# OBSOLETE 
+# OBSOLETE     test_ptr
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_BOOL {} {
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype bool_true"		"type = (BOOL|bool)"
+# OBSOLETE     gdb_test "ptype bool_false"		"type = (BOOL|bool)"
+# OBSOLETE     gdb_test "whatis bool_true"		"type = (BOOL|bool)"
+# OBSOLETE     gdb_test "whatis bool_false"	"type = (BOOL|bool)"
+# OBSOLETE     gdb_test "print bool_false"		" = FALSE"
+# OBSOLETE     gdb_test "print bool_true"		" = TRUE"
+# OBSOLETE 
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_CHAR {} {
+# OBSOLETE     gdb_test "ptype control_char"	"type = (CHAR|char)"
+# OBSOLETE     gdb_test "whatis control_char"	"type = (CHAR|char)"
+# OBSOLETE     gdb_test "print control_char"	{ = '\^[(]7[)]'}
+# OBSOLETE     gdb_test "ptype printable_char"	"type = (CHAR|char)"
+# OBSOLETE     gdb_test "whatis printable_char"	"type = (CHAR|char)"
+# OBSOLETE     gdb_test "print printable_char"	" = 'a'"
+# OBSOLETE 
+# OBSOLETE     gdb_test "print lower(char)"	{ = '\^[(]0[)]'}
+# OBSOLETE     gdb_test "print upper(char)"	{ = '\^[(]255[)]'}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_BYTE {} {
+# OBSOLETE     gdb_test "ptype byte_low"		"type = (BYTE|byte)"
+# OBSOLETE     gdb_test "whatis byte_low"		"type = (BYTE|byte)"
+# OBSOLETE     gdb_test "print byte_low"		" = -128"
+# OBSOLETE     gdb_test "ptype byte_high"		"type = (BYTE|byte)"
+# OBSOLETE     gdb_test "whatis byte_high"		"type = (BYTE|byte)"
+# OBSOLETE     gdb_test "print byte_high"		" = 127"
+# OBSOLETE 
+# OBSOLETE     gdb_test "print lower(byte)"	" = -128"
+# OBSOLETE     gdb_test "print upper(byte)"	" = 127"
+# OBSOLETE     gdb_test "print lower(byte_high)"	" = -128"
+# OBSOLETE     gdb_test "print upper(byte_high)"	" = 127"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_UBYTE {} {
+# OBSOLETE     gdb_test "ptype ubyte_low"		"type = (UBYTE|ubyte)"
+# OBSOLETE     gdb_test "whatis ubyte_low"		"type = (UBYTE|ubyte)"
+# OBSOLETE     gdb_test "print ubyte_low"		" = 0"
+# OBSOLETE     gdb_test "ptype ubyte_high"		"type = (UBYTE|ubyte)"
+# OBSOLETE     gdb_test "whatis ubyte_high"	"type = (UBYTE|ubyte)"
+# OBSOLETE     gdb_test "print ubyte_high"		" = 255"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_INT {} {
+# OBSOLETE     gdb_test "ptype int_low"		"type = (INT|int)"
+# OBSOLETE     gdb_test "whatis int_low"		"type = (INT|int)"
+# OBSOLETE     gdb_test "print int_low"		" = -32768"
+# OBSOLETE     gdb_test "ptype int_high"		"type = (INT|int)"
+# OBSOLETE     gdb_test "whatis int_high"		"type = (INT|int)"
+# OBSOLETE     gdb_test "print int_high"		" = 32767"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_UINT {} {
+# OBSOLETE     gdb_test "ptype uint_low"		"type = (UINT|uint)"
+# OBSOLETE     gdb_test "whatis uint_low"		"type = (UINT|uint)"
+# OBSOLETE     gdb_test "print uint_low"		" = 0"
+# OBSOLETE     gdb_test "ptype uint_high"		"type = (UINT|uint)"
+# OBSOLETE     gdb_test "whatis uint_high"		"type = (UINT|uint)"
+# OBSOLETE     gdb_test "print uint_high"		" = 65535"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_LONG {} {
+# OBSOLETE     gdb_test "ptype long_low"		"type = (LONG|long)"
+# OBSOLETE     gdb_test "whatis long_low"		"type = (LONG|long)"
+# OBSOLETE     gdb_test "print long_low"		" = -2147483648"
+# OBSOLETE     gdb_test "ptype long_high"		"type = (LONG|long)"
+# OBSOLETE     gdb_test "whatis long_high"		"type = (LONG|long)"
+# OBSOLETE     gdb_test "print long_high"		" = 2147483647"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_ULONG {} {
+# OBSOLETE     gdb_test "ptype ulong_low"		"type = (ULONG|ulong)"
+# OBSOLETE     gdb_test "whatis ulong_low"		"type = (ULONG|ulong)"
+# OBSOLETE     gdb_test "print ulong_low"		" = 0"
+# OBSOLETE     gdb_test "ptype ulong_high"		"type = (ULONG|ulong)"
+# OBSOLETE     gdb_test "whatis ulong_high"	"type = (ULONG|ulong)"
+# OBSOLETE     gdb_test "print ulong_high"		" = 4294967295"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_REAL {} {
+# OBSOLETE     gdb_test "ptype real1"		"type = (FLOAT|float)"
+# OBSOLETE     gdb_test "whatis real1"		"type = (FLOAT|float)"
+# OBSOLETE     gdb_test "print real1"		" = 3.14159274"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_LONG_REAL {} {
+# OBSOLETE     gdb_test "ptype long_real1"		"type = (DOUBLE|double)"
+# OBSOLETE     gdb_test "whatis long_real1"	"type = (DOUBLE|double)"
+# OBSOLETE     gdb_test "print long_real1"		" = 3\\.1400000000000001e\\+300"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_POWERSET {} {
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_arrays {} {
+# OBSOLETE     gdb_test "ptype booltable1"		"type = ARRAY \\(+0:3\\)+ (BOOL|bool)"
+# OBSOLETE     gdb_test_exact "print booltable1"	\
+# OBSOLETE 	{ = [(0): TRUE, (1:2): FALSE, (3): TRUE]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype booltable2"		"type = ARRAY \\(+4:7\\)+ (BOOL|bool)"
+# OBSOLETE     gdb_test_exact "print booltable2" { = [(4): TRUE, (5:6): FALSE, (7): TRUE]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype chartable1"		"type = ARRAY \\(+0:2\\)+ (CHAR|char)"
+# OBSOLETE     gdb_test_exact "print chartable1"  {= [(0): '^(0)', (1): '^(1)', (2): '^(2)']}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype chartable2"		"type = ARRAY \\(+3:5\\)+ (CHAR|char)"
+# OBSOLETE     gdb_test_exact "print chartable2"	\
+# OBSOLETE 	{= [(3): '^(0)', (4): '^(1)', (5): '^(2)']}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype bytetable1"		"type = ARRAY \\(+0:4\\)+ (BYTE|byte)"
+# OBSOLETE     gdb_test_exact "print bytetable1"		\
+# OBSOLETE        {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype bytetable2"		"type = ARRAY \\(+5:9\\)+ (BYTE|byte)"
+# OBSOLETE     gdb_test_exact "print bytetable2"	\
+# OBSOLETE 	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype bytetable3" \
+# OBSOLETE 	"type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
+# OBSOLETE     gdb_test_exact "print bytetable3" \
+# OBSOLETE     {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
+# OBSOLETE     gdb_test "ptype bytetable4" \
+# OBSOLETE 	"type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
+# OBSOLETE     gdb_test_exact "print bytetable4" \
+# OBSOLETE     {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype ubytetable1"	"type = ARRAY \\(+0:4\\)+ (UBYTE|ubyte)"
+# OBSOLETE     gdb_test_exact "print ubytetable1"	\
+# OBSOLETE 	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype ubytetable2"	"type = ARRAY \\(+5:9\\)+ (UBYTE|ubyte)"
+# OBSOLETE     gdb_test_exact "print ubytetable2"	\
+# OBSOLETE 	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype inttable1"		"type = ARRAY \\(+0:4\\)+ (INT|int)"
+# OBSOLETE     gdb_test_exact "print inttable1"	\
+# OBSOLETE 	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype inttable2"		"type = ARRAY \\(+5:9\\)+ (INT|int)"
+# OBSOLETE     gdb_test_exact "print inttable2"		\
+# OBSOLETE 	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype uinttable1"		"type = ARRAY \\(+0:4\\)+ (UINT|uint)"
+# OBSOLETE     gdb_test_exact "print uinttable1"	\
+# OBSOLETE 	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype uinttable2"		"type = ARRAY \\(+5:9\\)+ (UINT|uint)"
+# OBSOLETE     gdb_test_exact "print uinttable2"	\
+# OBSOLETE 	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype longtable1"		"type = ARRAY \\(+0:4\\)+ (LONG|long)"
+# OBSOLETE     gdb_test_exact "print longtable1"	\
+# OBSOLETE 	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype longtable2"		"type = ARRAY \\(+5:9\\)+ (LONG|long)"
+# OBSOLETE     gdb_test_exact "print longtable2"	\
+# OBSOLETE 	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype ulongtable1"	"type = ARRAY \\(+0:4\\)+ (ULONG|ulong)"
+# OBSOLETE     gdb_test_exact "print ulongtable1"	\
+# OBSOLETE 	{= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype ulongtable2"	"type = ARRAY \\(+5:9\\)+ (ULONG|ulong)"
+# OBSOLETE     gdb_test_exact "print ulongtable2"	\
+# OBSOLETE 	{= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype realtable1"		"type = ARRAY \\(+0:4\\)+ (FLOAT|float)"
+# OBSOLETE     gdb_test_exact "print realtable1"	\
+# OBSOLETE 	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype realtable2"		"type = ARRAY \\(+5:9\\)+ (FLOAT|float)"
+# OBSOLETE     gdb_test_exact "print realtable2"	\
+# OBSOLETE 	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype longrealtable1"	"type = ARRAY \\(+0:4\\)+ (DOUBLE|double)"
+# OBSOLETE     gdb_test_exact "print longrealtable1" \
+# OBSOLETE 	{= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype longrealtable2"	"type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
+# OBSOLETE     gdb_test_exact "print longrealtable2"	\
+# OBSOLETE 	{= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "print length(longrealtable2)" {= 5}
+# OBSOLETE     gdb_test "print lower(longrealtable2)" {= 5}
+# OBSOLETE     gdb_test "print upper(longrealtable2)" {= 9}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_strings {} {
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype string1"		"type = CHARS \[(\]4\[)\]+"
+# OBSOLETE     gdb_test "print string1"		" = \"abcd\""
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype string2"		"type = CHARS \[(\]+5\[)\]+"
+# OBSOLETE     gdb_test "print string2"		{ = \"ef\^\(0\)gh\"}
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype string3"		"type = CHARS \[(\]+6\[)\]+"
+# OBSOLETE     gdb_test "print string3"		" = \"efghij\""
+# OBSOLETE 
+# OBSOLETE     gdb_test "ptype string4"		"type = CHARS \[(\]+7\[)\]+"
+# OBSOLETE     gdb_test "print string4"		{ = \"zzzzzz\^\(0\)\"}
+# OBSOLETE 
+# OBSOLETE     # These tests require a running process, so run to one of the procs
+# OBSOLETE     # and then do the tests.
+# OBSOLETE 
+# OBSOLETE     if [runto scalar_arithmetic] then {
+# OBSOLETE 	gdb_test "ptype string1//string2"	"type = CHARS \\(9\\)"
+# OBSOLETE 	gdb_test "print string1//string2"    { = \"abcdef\^\(0\)gh\"}
+# OBSOLETE 	gdb_test_exact {ptype "a chill string"} {type = CHARS (14)}
+# OBSOLETE 	gdb_test "print 'a chill string'"	" = \"a chill string\""
+# OBSOLETE 	gdb_test "print \"ef\"//c'00'//\"gh\""	{ = \"ef\^\(0\)gh\"}
+# OBSOLETE 	gdb_test "print string1 // \"efgh\""	" = \"abcdefgh\""
+# OBSOLETE 	gdb_test "print (6) 'z'"		" = \"zzzzzz\""
+# OBSOLETE 	gdb_test "ptype (6) 'z'"		"type = CHARS \[(\]+6\[)\]+"
+# OBSOLETE 	gdb_test "print (1+2*3) 'x'"		" = \"xxxxxxx\""
+# OBSOLETE 	gdb_test "ptype (1+2*3) 'x'"		"type = CHARS \[(\]+7\[)\]+"
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_structs {} {
+# OBSOLETE     gdb_test "ptype struct1" \
+# OBSOLETE 	"type = STRUCT \\(+.*abool (BOOL|bool),.*aint (INT|int),.*astring CHARS \\(+8\\)+.*\\)+"
+# OBSOLETE     gdb_test "print struct1" \
+# OBSOLETE 	".* = \\\[\.abool: TRUE, \.aint: 123, \.astring: \"a string\"\\\]"
+# OBSOLETE     gdb_test "ptype struct2" \
+# OBSOLETE 	"type = STRUCT \\(+.*abool (BOOL|bool),.*nstruct simple_struct,.*aint (INT|int).*\\)+"
+# OBSOLETE     gdb_test "print struct2" \
+# OBSOLETE 	".* = \\\[.abool: TRUE, \.nstruct: \\\[\.abool: FALSE, \.aint: 456, \.astring: \"deadbeef\"\\\], \.aint: 789\\\]"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_ptr {} {
+# OBSOLETE     # This is to test Cygnus PR 6932
+# OBSOLETE     gdb_test "print xptr->int" ".* = 32767"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/enum.exp b/gdb/testsuite/gdb.chill/enum.exp
index 7815272..a4e2930 100644
--- a/gdb/testsuite/gdb.chill/enum.exp
+++ b/gdb/testsuite/gdb.chill/enum.exp
@@ -1,85 +1,85 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at
-#
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "enum"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-	"set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto hugo_
-
-    send_gdb "set var \$i := d\n"
-    gdb_expect -re ".*$gdb_prompt $"
-    gdb_test "print \$i" { = d}
-    gdb_test "print size (\$i)" { = 1}
-    gdb_test "print b+c" { = 3}
-    gdb_test "print c*d" { = 6}
-    gdb_test "print a<b" { = TRUE}
-    gdb_test "print a=b" { = FALSE}
-    gdb_test "print a=a" { = TRUE}
-    gdb_test "print a/=\$i" { = TRUE}
-
-# This is PR 8870
-    gdb_test "break malloc" ".*"
-    gdb_test {set var $j := m_set[b]} ".*invalid.*tuple.*"
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "enum"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE 	"set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto hugo_
+# OBSOLETE 
+# OBSOLETE     send_gdb "set var \$i := d\n"
+# OBSOLETE     gdb_expect -re ".*$gdb_prompt $"
+# OBSOLETE     gdb_test "print \$i" { = d}
+# OBSOLETE     gdb_test "print size (\$i)" { = 1}
+# OBSOLETE     gdb_test "print b+c" { = 3}
+# OBSOLETE     gdb_test "print c*d" { = 6}
+# OBSOLETE     gdb_test "print a<b" { = TRUE}
+# OBSOLETE     gdb_test "print a=b" { = FALSE}
+# OBSOLETE     gdb_test "print a=a" { = TRUE}
+# OBSOLETE     gdb_test "print a/=\$i" { = TRUE}
+# OBSOLETE 
+# OBSOLETE # This is PR 8870
+# OBSOLETE     gdb_test "break malloc" ".*"
+# OBSOLETE     gdb_test {set var $j := m_set[b]} ".*invalid.*tuple.*"
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/gch1041.exp b/gdb/testsuite/gdb.chill/gch1041.exp
index ec80ddf..fe13dc9 100644
--- a/gdb/testsuite/gdb.chill/gch1041.exp
+++ b/gdb/testsuite/gdb.chill/gch1041.exp
@@ -1,76 +1,76 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-#                          Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1041"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-	"set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto arr_
-    # check if array slices print correct index
-    gdb_test {print a1(10:30)} { = \[\(10:30\): 33\]}
-    gdb_test {print a2(3:5)} { = \[\(3:5\): \[.l: 22, .c: "mowi", .b: TRUE\]\]}
-    gdb_test {print a3('a':'c')} { = \[\('a':'c'\): 'X'\]}
-    gdb_test {print a4(e2:e5)} { = \[\(e2:e5\): TRUE\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE #                          Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "gch1041"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE 	"set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto arr_
+# OBSOLETE     # check if array slices print correct index
+# OBSOLETE     gdb_test {print a1(10:30)} { = \[\(10:30\): 33\]}
+# OBSOLETE     gdb_test {print a2(3:5)} { = \[\(3:5\): \[.l: 22, .c: "mowi", .b: TRUE\]\]}
+# OBSOLETE     gdb_test {print a3('a':'c')} { = \[\('a':'c'\): 'X'\]}
+# OBSOLETE     gdb_test {print a4(e2:e5)} { = \[\(e2:e5\): TRUE\]}
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/gch1272.exp b/gdb/testsuite/gdb.chill/gch1272.exp
index 544a5ec..2d2ce9e 100644
--- a/gdb/testsuite/gdb.chill/gch1272.exp
+++ b/gdb/testsuite/gdb.chill/gch1272.exp
@@ -1,86 +1,86 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#
-
-if $tracelevel then {
-        strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1272"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-        -re ".*$gdb_prompt $" {}
-        timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-        "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto brrr
-
-    # check foo
-    gdb_test {print foo} { = \[\(0:99\): 222\]}
-    gdb_test "set var foo := m_array\[\(\*\):44\]" ".*"
-    gdb_test {print foo} { = \[\(0:99\): 44\]}
-
-    # check bar
-    gdb_test {print bar} { = \[\(-10:20\): \[.i: 0, .b: FALSE\]\]}
-    gdb_test "set var bar := m_bar\[\(\*\): \[42, TRUE\]\]" ".*"
-    gdb_test {print bar} { = \[\(-10:20\): \[.i: 42, .b: TRUE\]\]}
-
-    # some failues
-    gdb_test "set var foo := \[\(\*\):44\]" {\(\*\) only possible with modename in front of tuple \(mode\[\.\.\]\)}
-    gdb_test "set var foo := m_xxx\[\(\*\):44\]" {Invalid cast\.}
-    gdb_test "set var foo := m_struct\[\(\*\):44\]" {\(\*\) in invalid context}
-    gdb_test "set var foo := m_ps\[\(\*\):44\]" {\(\*\) in invalid context}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE         strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "gch1272"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE         -re ".*$gdb_prompt $" {}
+# OBSOLETE         timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE         "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto brrr
+# OBSOLETE 
+# OBSOLETE     # check foo
+# OBSOLETE     gdb_test {print foo} { = \[\(0:99\): 222\]}
+# OBSOLETE     gdb_test "set var foo := m_array\[\(\*\):44\]" ".*"
+# OBSOLETE     gdb_test {print foo} { = \[\(0:99\): 44\]}
+# OBSOLETE 
+# OBSOLETE     # check bar
+# OBSOLETE     gdb_test {print bar} { = \[\(-10:20\): \[.i: 0, .b: FALSE\]\]}
+# OBSOLETE     gdb_test "set var bar := m_bar\[\(\*\): \[42, TRUE\]\]" ".*"
+# OBSOLETE     gdb_test {print bar} { = \[\(-10:20\): \[.i: 42, .b: TRUE\]\]}
+# OBSOLETE 
+# OBSOLETE     # some failues
+# OBSOLETE     gdb_test "set var foo := \[\(\*\):44\]" {\(\*\) only possible with modename in front of tuple \(mode\[\.\.\]\)}
+# OBSOLETE     gdb_test "set var foo := m_xxx\[\(\*\):44\]" {Invalid cast\.}
+# OBSOLETE     gdb_test "set var foo := m_struct\[\(\*\):44\]" {\(\*\) in invalid context}
+# OBSOLETE     gdb_test "set var foo := m_ps\[\(\*\):44\]" {\(\*\) in invalid context}
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/gch1280.exp b/gdb/testsuite/gdb.chill/gch1280.exp
index c05f845..7063842 100644
--- a/gdb/testsuite/gdb.chill/gch1280.exp
+++ b/gdb/testsuite/gdb.chill/gch1280.exp
@@ -1,76 +1,76 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#
-
-if $tracelevel then {
-        strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1280"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-        -re ".*$gdb_prompt $" {}
-        timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-        "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto doit
-    gdb_test "next" ""
-    # check too many array elements
-    gdb_test {set var v_x := [1,2,3,4,5]} {Too many array elements}
-    gdb_test {set var $i := m_x[(3): 22, 25]} {Too many array elements}
-    gdb_test "set var \$i := m_x\[\(2\): 22, 25\]" ""
-    gdb_test {print $i} { = \[\(1\): 0, \(2\): 22, \(3\): 25\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE         strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "gch1280"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE         -re ".*$gdb_prompt $" {}
+# OBSOLETE         timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE         "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto doit
+# OBSOLETE     gdb_test "next" ""
+# OBSOLETE     # check too many array elements
+# OBSOLETE     gdb_test {set var v_x := [1,2,3,4,5]} {Too many array elements}
+# OBSOLETE     gdb_test {set var $i := m_x[(3): 22, 25]} {Too many array elements}
+# OBSOLETE     gdb_test "set var \$i := m_x\[\(2\): 22, 25\]" ""
+# OBSOLETE     gdb_test {print $i} { = \[\(1\): 0, \(2\): 22, \(3\): 25\]}
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/gch922.exp b/gdb/testsuite/gdb.chill/gch922.exp
index 104b622..cdfdd35 100644
--- a/gdb/testsuite/gdb.chill/gch922.exp
+++ b/gdb/testsuite/gdb.chill/gch922.exp
@@ -1,183 +1,183 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#			   Kurt Fuchs (fuchs_k@aut.alcatel.at)
-#
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch922"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break xx_\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n" 
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-#	First one is string to send_gdb to gdb
-#	Second one is string to match gdb result to
-#	Third one is an optional message to be printed
-
-proc test_print_accept { args } {
-    global gdb_prompt
-    global passcount
-    global verbose
-
-    if [llength $args]==3 then {
-	set message [lindex $args 2]
-    } else {
-	set message [lindex $args 0]
-    }
-    set sendthis [lindex $args 0]
-    set expectthis [lindex $args 1]
-    set result [gdb_test $sendthis ".* = ${expectthis}" $message]
-    if $result==0 {incr passcount}
-    return $result
-}
-
-
-proc test_chars {} {
-    global passcount gdb_prompt
-
-    verbose "Testing Chars"
-    set passcount 0
-
-    test_print_accept "print a" {'\^\(0\)'<repeats 70 times>//"Jason""\^\(0,5\)""Hugo\^\(10\)"//'\^\(1\)'<repeats 70 times>}
-    test_print_accept "print b" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
-    test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
-    test_print_accept "print d" {'\^\(11\)'}
-
-    gdb_test "set var a := (100)'\^(0,255)'" ""
-    test_print_accept "print a" {"\^\(0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255\)"}
-
-    send_gdb "set var a := (10)'\^(1)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {"\^\(1,1,1,1,1,1,1,1,1,1\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
-    send_gdb "set var b := \"Hugo \"\"\^(3,4)\"\"Otto\^(17)\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print b" {"Hugo ""\^\(3,4\)""Otto\^\(17\)"}
-    send_gdb "set var c := (70)'b' // \"\^(2,3)Hugo \" // (70)'c' \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print c" {'b'<repeats 70 times>//"\^\(2,3\)Hugo "//'c'<repeats 70 times>}
-    gdb_test "set var d := '\^(199)'" ""
-    test_print_accept "print d" {'\^\(199\)'}
-
-    test_print_accept "print (10)'\^(0)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\"" {"\^\(0,0,0,0,0,0,0,0,0,0\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
-    test_print_accept "print \"Jason\"\"\^(0,5)\"\"Hugo\^(10)\"" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
-
-    send_gdb "set var a := \"\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {""}
-    send_gdb "set var a := \"\"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {""""}
-    send_gdb "set var a := \" \"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {" """}
-    send_gdb "set var a := \"\^\^\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {"\^\^"}
-    send_gdb "set var a := \"'\" \n" ; gdb_expect -re "$gdb_prompt $"
-    test_print_accept "print a" {"'"}
-}
-
-
-proc test_code {} {
-    global passcount gdb_prompt
-
-    verbose "Testing Chars"
-    set passcount 0
-
-    runto bulk
-    test_print_accept "print a" {"\^\(255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127\)"}
-    test_print_accept "print b" {"\^\(200\)"}
-#    test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
-    test_print_accept "print d" {'a'}
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-
-if [set_lang_chill] then {
-    # test builtins as described in chapter 6.20.3 Z.200
-
-    test_chars
-#    test_code
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE 
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #			   Kurt Fuchs (fuchs_k@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "gch922"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break xx_\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n" 
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE #	First one is string to send_gdb to gdb
+# OBSOLETE #	Second one is string to match gdb result to
+# OBSOLETE #	Third one is an optional message to be printed
+# OBSOLETE 
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global passcount
+# OBSOLETE     global verbose
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE     } else {
+# OBSOLETE 	set message [lindex $args 0]
+# OBSOLETE     }
+# OBSOLETE     set sendthis [lindex $args 0]
+# OBSOLETE     set expectthis [lindex $args 1]
+# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE     if $result==0 {incr passcount}
+# OBSOLETE     return $result
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE proc test_chars {} {
+# OBSOLETE     global passcount gdb_prompt
+# OBSOLETE 
+# OBSOLETE     verbose "Testing Chars"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     test_print_accept "print a" {'\^\(0\)'<repeats 70 times>//"Jason""\^\(0,5\)""Hugo\^\(10\)"//'\^\(1\)'<repeats 70 times>}
+# OBSOLETE     test_print_accept "print b" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
+# OBSOLETE     test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
+# OBSOLETE     test_print_accept "print d" {'\^\(11\)'}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set var a := (100)'\^(0,255)'" ""
+# OBSOLETE     test_print_accept "print a" {"\^\(0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255\)"}
+# OBSOLETE 
+# OBSOLETE     send_gdb "set var a := (10)'\^(1)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {"\^\(1,1,1,1,1,1,1,1,1,1\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
+# OBSOLETE     send_gdb "set var b := \"Hugo \"\"\^(3,4)\"\"Otto\^(17)\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print b" {"Hugo ""\^\(3,4\)""Otto\^\(17\)"}
+# OBSOLETE     send_gdb "set var c := (70)'b' // \"\^(2,3)Hugo \" // (70)'c' \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print c" {'b'<repeats 70 times>//"\^\(2,3\)Hugo "//'c'<repeats 70 times>}
+# OBSOLETE     gdb_test "set var d := '\^(199)'" ""
+# OBSOLETE     test_print_accept "print d" {'\^\(199\)'}
+# OBSOLETE 
+# OBSOLETE     test_print_accept "print (10)'\^(0)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\"" {"\^\(0,0,0,0,0,0,0,0,0,0\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
+# OBSOLETE     test_print_accept "print \"Jason\"\"\^(0,5)\"\"Hugo\^(10)\"" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
+# OBSOLETE 
+# OBSOLETE     send_gdb "set var a := \"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {""}
+# OBSOLETE     send_gdb "set var a := \"\"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {""""}
+# OBSOLETE     send_gdb "set var a := \" \"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {" """}
+# OBSOLETE     send_gdb "set var a := \"\^\^\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {"\^\^"}
+# OBSOLETE     send_gdb "set var a := \"'\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     test_print_accept "print a" {"'"}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE proc test_code {} {
+# OBSOLETE     global passcount gdb_prompt
+# OBSOLETE 
+# OBSOLETE     verbose "Testing Chars"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     runto bulk
+# OBSOLETE     test_print_accept "print a" {"\^\(255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127\)"}
+# OBSOLETE     test_print_accept "print b" {"\^\(200\)"}
+# OBSOLETE #    test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
+# OBSOLETE     test_print_accept "print d" {'a'}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE 
+# OBSOLETE     test_chars
+# OBSOLETE #    test_code
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/gch981.exp b/gdb/testsuite/gdb.chill/gch981.exp
index 5651bb0..9b684f0 100644
--- a/gdb/testsuite/gdb.chill/gch981.exp
+++ b/gdb/testsuite/gdb.chill/gch981.exp
@@ -1,249 +1,249 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#			   Kurt Fuchs (fuchs_k@aut.alcatel.at)
-#
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch981"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break xx_\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n" 
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-#	First one is string to send_gdb to gdb
-#	Second one is string to match gdb result to
-#	Third one is an optional message to be printed
-
-proc test_print_accept { args } {
-    global gdb_prompt
-    global passcount
-    global verbose
-
-    if [llength $args]==3 then {
-	set message [lindex $args 2]
-    } else {
-	set message [lindex $args 0]
-    }
-    set sendthis [lindex $args 0]
-    set expectthis [lindex $args 1]
-    set result [gdb_test $sendthis ".* = ${expectthis}" $message]
-    if $result==0 {incr passcount}
-    return $result
-}
-
-proc test_power {} {
-    global passcount gdb_prompt
-
-    verbose "Testing some POWERSET Stuff"
-    set passcount 0
-
-    test_print_accept "print v1_power1" {\[e1:e5\]}
-    test_print_accept "print v2_power1" {\[\]}
-    test_print_accept "print SIZE(v1_power1)" "1"
-
-    gdb_test "set v1_power1 := \[b1\]"  ""
-#   if GDB has rejected the improper values, we have to gdb_expect the same!
-    test_print_accept "print v1_power1" {\[e1:e5\]}
-
-    gdb_test "set v1_power1 := \[a1,a2\]"  ""
-    test_print_accept "print v1_power1" {\[e1:e5\]}
-    gdb_test "set v1_power1 := \[b1,b2,b3,e4\]"  ""
-    test_print_accept "print v1_power1" {\[e1:e5\]}
-    gdb_test "set v1_power1 := \[e4:e5\]"  ""
-    test_print_accept "print v1_power1" {\[e4:e5\]}
-    gdb_test "set v1_power1 := \[e1, e2:e3, e5\]"  ""
-    test_print_accept "print v1_power1" {\[e1:e3, e5\]}
-    gdb_test "set v1_power1 := \[e1, e2:e4, e4:e5\]"  ""
-    test_print_accept "print v1_power1" {\[e1:e5\]}
-    gdb_test "set v1_power1 := \[e1, e1:e3, e1:e2, e2:e3\]"  ""
-    test_print_accept "print v1_power1" {\[e1:e3\]}
-
-    gdb_test "set v_power2 := \[e2\]"  ""
-    test_print_accept "print v_power2" {\[\]}
-    gdb_test "set v_power2 := \[1,2,3\]"  ""
-    test_print_accept "print v_power2" {\[\]}
-    gdb_test "set v_power2 := \[e2, b2, b1\]"  ""
-    test_print_accept "print v_power2" {\[\]}
-
-# Note, that this is a numbered SET, so a1:a3 contains all elements (exept a6)
-    gdb_test "set v_power2 := \[a1:a3, a6:a4, a7:a9\]"  ""
-    test_print_accept "print v_power2" {\[a6:a3\]}
-    gdb_test "set v_power2 := \[a1, a4:a6, a9\]"  ""
-    test_print_accept "print v_power2" {\[a1, a9\]}
-    gdb_test "set v_power2 := \[a1:a2, a6, a9\]"  ""
-    test_print_accept "print v_power2" {\[a6:a2, a9\]}
-    gdb_test "set v_power2 := \[a1, a4, a7:a8, a9:a3\]"  ""
-    test_print_accept "print v_power2" {\[a1, a4, a9:a8\]}
-    gdb_test "set v_power2 := \[a1, a4:a8\]"  ""
-    test_print_accept "print v_power2" {\[a1, a4:a8\]}
-    gdb_test "set v_power2 := \[a8,a3,a7,a9,a5,a6\]"  ""
-    test_print_accept "print v_power2" {\[a6, a5, a9, a7, a3, a8\]}
-
-    gdb_test "set v_power3 := \[b1:b2,e1\]"  ""
-    test_print_accept "print v_power3" {\[b1:b2\]}
-    gdb_test "set v_power3 := \[b1, b3, b6:b7\]"  ""
-    test_print_accept "print v_power3" {\[b1, b3, b6:b7\]}
-    gdb_test "set v_power3 := \[b1, b3:b4, b7\]"  ""
-    test_print_accept "print v_power3" {\[b1, b3:b4, b7\]}
-    gdb_test "set v_power3 := \[b1, b4:b6, b7\]"  ""
-    test_print_accept "print v_power3" {\[b1, b4:b7\]}
-    gdb_test "set v_power3 := \[b1:b7\]"  ""
-    test_print_accept "print v_power3" {\[b1:b7\]}
-    gdb_test "set v_power3 := \[b5:b7, b1\]"  ""
-    test_print_accept "print v_power3" {\[b1, b5:b7\]}
-
-    gdb_test "set v_power4 := \[\"b\"\]" ""
-    test_print_accept "print v_power4" {\['b':'x'\]}
-    gdb_test "set v_power4 := \[5\]"  ""
-    test_print_accept "print v_power4" {\['b':'x'\]}
-    gdb_test "set v_power4 := \['c':'f','g':'h','o':'t'\]" ""
-    test_print_accept "print v_power4" {\['c':'h', 'o':'t'\]}
-    gdb_test "set v_power4 := \['a','b','c','d','e','f'\]" ""
-    test_print_accept "print v_power4" {\['a':'f'\]}
-    gdb_test "set v_power4 := \['\^(0)':'\^(200)'\]" ""
-    test_print_accept "print v_power4" {\['\^\(0\)':'\^\(200\)'\]}
-
-    gdb_test "set v_power5 := \[a8\]"  ""
-    test_print_accept "print v_power5" {\[2:100\]}
-    gdb_test "set v_power5 := \[4\]"  ""
-    test_print_accept "print v_power5" {\[4\]}
-    gdb_test "set v_power5 := \[3:95,9:100,10:107,200:250\]" ""
-    test_print_accept "print v_power5" {\[3:107, 200:250\]}
-    gdb_test "set v_power5 := \[2, 100:120, 350:400\]"  ""
-    test_print_accept "print v_power5" {\[2, 100:120, 350:400\]}
-    gdb_test "set v_power5 := \[2:64,65:127,128:256,256:399,400\]" ""
-    test_print_accept "print v_power5" {\[2:400\]}
-    gdb_test "set v_power5 := \[3:95, 99:100, 101:107, 200:250\]"  ""
-    test_print_accept "print v_power5" {\[3:95, 99:107, 200:250\]}
-
-    gdb_test "set v_power6 := \[a8\]"  ""
-    test_print_accept "print v_power6" {\[\]}
-    gdb_test "set v_power6 := \[4\]"  ""
-    test_print_accept "print v_power6" {\[4\]}
-    gdb_test "set v_power6 := \[3:95, 99:100, 101:107, 200:250\]"  ""
-    test_print_accept "print v_power6" {\[3:95, 99:107, 200:250\]}
-    gdb_test "set v_power6 := \[-111:0, 1:112, 11111:22222\]"  ""
-    test_print_accept "print v_power6" {\[-111:112, 11111:22222\]}
-    gdb_test "set v_power6 := \[0, 200:4000, 6666:9999\]"  ""
-    test_print_accept "print v_power6" {\[0, 200:4000, 6666:9999\]}
-
-#    gdb_test "set v_power7 := \[a8\]"  ""
-#    test_print_accept "print v_power7" {\[2:100\]}
-#    gdb_test "set v_power7 := \[4\]"  ""
-#    test_print_accept "print v_power7" {\[4\]}
-#    gdb_test "set v_power7 := \[3:95, 99:100, 101:107, 200:250\]" ""
-#    test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
-#    gdb_test "set v_power7 := \[0, 1000, 1000000, 10000000000\]"  ""
-#    test_print_accept "print v_power7" {\[0, 1000, 1000000, 1000000000\]}
-#    gdb_test "set v_power7 := \[-20000:100000, 111111:2222222\]"  ""
-#    test_print_accept "print v_power7" {\[-20000:100000, 111111:2222222\]}
-#    gdb_test "set v_power7 := \[\]"  ""
-#    test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
-#    gdb_test "set v_power7 := \[2:-500, -501:1, 20:370, -888:-920, 1000:2000, 1800:2500\]\ " ""
-#    test_print_accept "print v_power7" {\[-920:-888, -501:2, 20:370, 1000:2500\]}
-#    test_print_accept "print SIZE(v_power7)" ""
-
-
-    runto 58
-    test_print_accept "print v_set1 IN v1_power1" "TRUE"
-    test_print_accept "print v_set1 IN v2_power1" "FALSE"
-
-}
-
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-
-if [set_lang_chill] then {
-    # test builtins as described in chapter 6.20.3 Z.200
-
-    test_power 
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE 
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #			   Kurt Fuchs (fuchs_k@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "gch981"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break xx_\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n" 
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE #	First one is string to send_gdb to gdb
+# OBSOLETE #	Second one is string to match gdb result to
+# OBSOLETE #	Third one is an optional message to be printed
+# OBSOLETE 
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global passcount
+# OBSOLETE     global verbose
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE     } else {
+# OBSOLETE 	set message [lindex $args 0]
+# OBSOLETE     }
+# OBSOLETE     set sendthis [lindex $args 0]
+# OBSOLETE     set expectthis [lindex $args 1]
+# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE     if $result==0 {incr passcount}
+# OBSOLETE     return $result
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_power {} {
+# OBSOLETE     global passcount gdb_prompt
+# OBSOLETE 
+# OBSOLETE     verbose "Testing some POWERSET Stuff"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE     test_print_accept "print v2_power1" {\[\]}
+# OBSOLETE     test_print_accept "print SIZE(v1_power1)" "1"
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v1_power1 := \[b1\]"  ""
+# OBSOLETE #   if GDB has rejected the improper values, we have to gdb_expect the same!
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v1_power1 := \[a1,a2\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE     gdb_test "set v1_power1 := \[b1,b2,b3,e4\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE     gdb_test "set v1_power1 := \[e4:e5\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e4:e5\]}
+# OBSOLETE     gdb_test "set v1_power1 := \[e1, e2:e3, e5\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e3, e5\]}
+# OBSOLETE     gdb_test "set v1_power1 := \[e1, e2:e4, e4:e5\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE     gdb_test "set v1_power1 := \[e1, e1:e3, e1:e2, e2:e3\]"  ""
+# OBSOLETE     test_print_accept "print v1_power1" {\[e1:e3\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v_power2 := \[e2\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[\]}
+# OBSOLETE     gdb_test "set v_power2 := \[1,2,3\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[\]}
+# OBSOLETE     gdb_test "set v_power2 := \[e2, b2, b1\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[\]}
+# OBSOLETE 
+# OBSOLETE # Note, that this is a numbered SET, so a1:a3 contains all elements (exept a6)
+# OBSOLETE     gdb_test "set v_power2 := \[a1:a3, a6:a4, a7:a9\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a6:a3\]}
+# OBSOLETE     gdb_test "set v_power2 := \[a1, a4:a6, a9\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a1, a9\]}
+# OBSOLETE     gdb_test "set v_power2 := \[a1:a2, a6, a9\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a6:a2, a9\]}
+# OBSOLETE     gdb_test "set v_power2 := \[a1, a4, a7:a8, a9:a3\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a1, a4, a9:a8\]}
+# OBSOLETE     gdb_test "set v_power2 := \[a1, a4:a8\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a1, a4:a8\]}
+# OBSOLETE     gdb_test "set v_power2 := \[a8,a3,a7,a9,a5,a6\]"  ""
+# OBSOLETE     test_print_accept "print v_power2" {\[a6, a5, a9, a7, a3, a8\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v_power3 := \[b1:b2,e1\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1:b2\]}
+# OBSOLETE     gdb_test "set v_power3 := \[b1, b3, b6:b7\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1, b3, b6:b7\]}
+# OBSOLETE     gdb_test "set v_power3 := \[b1, b3:b4, b7\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1, b3:b4, b7\]}
+# OBSOLETE     gdb_test "set v_power3 := \[b1, b4:b6, b7\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1, b4:b7\]}
+# OBSOLETE     gdb_test "set v_power3 := \[b1:b7\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1:b7\]}
+# OBSOLETE     gdb_test "set v_power3 := \[b5:b7, b1\]"  ""
+# OBSOLETE     test_print_accept "print v_power3" {\[b1, b5:b7\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v_power4 := \[\"b\"\]" ""
+# OBSOLETE     test_print_accept "print v_power4" {\['b':'x'\]}
+# OBSOLETE     gdb_test "set v_power4 := \[5\]"  ""
+# OBSOLETE     test_print_accept "print v_power4" {\['b':'x'\]}
+# OBSOLETE     gdb_test "set v_power4 := \['c':'f','g':'h','o':'t'\]" ""
+# OBSOLETE     test_print_accept "print v_power4" {\['c':'h', 'o':'t'\]}
+# OBSOLETE     gdb_test "set v_power4 := \['a','b','c','d','e','f'\]" ""
+# OBSOLETE     test_print_accept "print v_power4" {\['a':'f'\]}
+# OBSOLETE     gdb_test "set v_power4 := \['\^(0)':'\^(200)'\]" ""
+# OBSOLETE     test_print_accept "print v_power4" {\['\^\(0\)':'\^\(200\)'\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v_power5 := \[a8\]"  ""
+# OBSOLETE     test_print_accept "print v_power5" {\[2:100\]}
+# OBSOLETE     gdb_test "set v_power5 := \[4\]"  ""
+# OBSOLETE     test_print_accept "print v_power5" {\[4\]}
+# OBSOLETE     gdb_test "set v_power5 := \[3:95,9:100,10:107,200:250\]" ""
+# OBSOLETE     test_print_accept "print v_power5" {\[3:107, 200:250\]}
+# OBSOLETE     gdb_test "set v_power5 := \[2, 100:120, 350:400\]"  ""
+# OBSOLETE     test_print_accept "print v_power5" {\[2, 100:120, 350:400\]}
+# OBSOLETE     gdb_test "set v_power5 := \[2:64,65:127,128:256,256:399,400\]" ""
+# OBSOLETE     test_print_accept "print v_power5" {\[2:400\]}
+# OBSOLETE     gdb_test "set v_power5 := \[3:95, 99:100, 101:107, 200:250\]"  ""
+# OBSOLETE     test_print_accept "print v_power5" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set v_power6 := \[a8\]"  ""
+# OBSOLETE     test_print_accept "print v_power6" {\[\]}
+# OBSOLETE     gdb_test "set v_power6 := \[4\]"  ""
+# OBSOLETE     test_print_accept "print v_power6" {\[4\]}
+# OBSOLETE     gdb_test "set v_power6 := \[3:95, 99:100, 101:107, 200:250\]"  ""
+# OBSOLETE     test_print_accept "print v_power6" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE     gdb_test "set v_power6 := \[-111:0, 1:112, 11111:22222\]"  ""
+# OBSOLETE     test_print_accept "print v_power6" {\[-111:112, 11111:22222\]}
+# OBSOLETE     gdb_test "set v_power6 := \[0, 200:4000, 6666:9999\]"  ""
+# OBSOLETE     test_print_accept "print v_power6" {\[0, 200:4000, 6666:9999\]}
+# OBSOLETE 
+# OBSOLETE #    gdb_test "set v_power7 := \[a8\]"  ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[2:100\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[4\]"  ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[4\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[3:95, 99:100, 101:107, 200:250\]" ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[0, 1000, 1000000, 10000000000\]"  ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[0, 1000, 1000000, 1000000000\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[-20000:100000, 111111:2222222\]"  ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[-20000:100000, 111111:2222222\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[\]"  ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE #    gdb_test "set v_power7 := \[2:-500, -501:1, 20:370, -888:-920, 1000:2000, 1800:2500\]\ " ""
+# OBSOLETE #    test_print_accept "print v_power7" {\[-920:-888, -501:2, 20:370, 1000:2500\]}
+# OBSOLETE #    test_print_accept "print SIZE(v_power7)" ""
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE     runto 58
+# OBSOLETE     test_print_accept "print v_set1 IN v1_power1" "TRUE"
+# OBSOLETE     test_print_accept "print v_set1 IN v2_power1" "FALSE"
+# OBSOLETE 
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE 
+# OBSOLETE     test_power 
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/misc.exp b/gdb/testsuite/gdb.chill/misc.exp
index e58ba79..1cdeb7c 100644
--- a/gdb/testsuite/gdb.chill/misc.exp
+++ b/gdb/testsuite/gdb.chill/misc.exp
@@ -1,100 +1,100 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-#                          Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "misc"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-	"set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto dummyfunc
-    # check upper/lower case 
-    gdb_test "ptype BOOL" " = (bool|BOOL)"
-    gdb_test "ptype bool" " = (bool|BOOL)"
-    gdb_test "print otto" " = 42"
-    gdb_test "print OTTO" " = 42"
-    gdb_test "print otTO" " = 42"
-    gdb_test "print OTto" " = 42"
-    gdb_test "print NULL" " = NULL" "print emptiness literal"
-
-    # This tests PR 8496.
-    gdb_test {printf "%d %d.",  3+4,2} "7 2." "printf with 2 arguments"
-
-    # This tests GCH/924
-    gdb_test {print (h'23)} { = 35} "print parantised integer literal"
-
-    # Linux thinks this is at line 6, but is otherwise ok.
-    setup_xfail "i*86-pc-linux*-gnu"
-    gdb_test "info line" \
-	{Line 7 of .*misc.ch.* at address H'[0-9a-fA-F]+.*}\
-	"info about current line"
-
-    # check array () type (expr)
-    setup_xfail "m68*-*-hpux*"
-    gdb_test "print array () ubyte (foo)" { = \[\(0:11\): 0\]}
-	
-    send_gdb "set var \$i := foo\n"
-    gdb_expect -re ".*$gdb_prompt $"
-    setup_xfail "m68*-*-hpux*"
-    gdb_test "print/x array () byte (\$i)" { = \[\(0:11\): H'0\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE #                          Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "misc"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE 	"set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto dummyfunc
+# OBSOLETE     # check upper/lower case 
+# OBSOLETE     gdb_test "ptype BOOL" " = (bool|BOOL)"
+# OBSOLETE     gdb_test "ptype bool" " = (bool|BOOL)"
+# OBSOLETE     gdb_test "print otto" " = 42"
+# OBSOLETE     gdb_test "print OTTO" " = 42"
+# OBSOLETE     gdb_test "print otTO" " = 42"
+# OBSOLETE     gdb_test "print OTto" " = 42"
+# OBSOLETE     gdb_test "print NULL" " = NULL" "print emptiness literal"
+# OBSOLETE 
+# OBSOLETE     # This tests PR 8496.
+# OBSOLETE     gdb_test {printf "%d %d.",  3+4,2} "7 2." "printf with 2 arguments"
+# OBSOLETE 
+# OBSOLETE     # This tests GCH/924
+# OBSOLETE     gdb_test {print (h'23)} { = 35} "print parantised integer literal"
+# OBSOLETE 
+# OBSOLETE     # Linux thinks this is at line 6, but is otherwise ok.
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu"
+# OBSOLETE     gdb_test "info line" \
+# OBSOLETE 	{Line 7 of .*misc.ch.* at address H'[0-9a-fA-F]+.*}\
+# OBSOLETE 	"info about current line"
+# OBSOLETE 
+# OBSOLETE     # check array () type (expr)
+# OBSOLETE     setup_xfail "m68*-*-hpux*"
+# OBSOLETE     gdb_test "print array () ubyte (foo)" { = \[\(0:11\): 0\]}
+# OBSOLETE 	
+# OBSOLETE     send_gdb "set var \$i := foo\n"
+# OBSOLETE     gdb_expect -re ".*$gdb_prompt $"
+# OBSOLETE     setup_xfail "m68*-*-hpux*"
+# OBSOLETE     gdb_test "print/x array () byte (\$i)" { = \[\(0:11\): H'0\]}
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/powerset.exp b/gdb/testsuite/gdb.chill/powerset.exp
index c41276c..6d19248 100644
--- a/gdb/testsuite/gdb.chill/powerset.exp
+++ b/gdb/testsuite/gdb.chill/powerset.exp
@@ -1,187 +1,187 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "powerset"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break xx_\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n" 
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-#	First one is string to send_gdb to gdb
-#	Second one is string to match gdb result to
-#	Third one is an optional message to be printed
-
-proc test_print_accept { args } {
-    global gdb_prompt
-    global passcount
-    global verbose
-
-    if [llength $args]==3 then {
-	set message [lindex $args 2]
-    } else {
-	set message [lindex $args 0]
-    }
-    set sendthis [lindex $args 0]
-    set expectthis [lindex $args 1]
-    set result [gdb_test $sendthis ".* = ${expectthis}" $message]
-    if $result==0 {incr passcount}
-    return $result
-}
-
-proc test_card {} {
-    global passcount
-
-    verbose "testing builtin CARD"
-    set passcount 0
-
-    # discrete mode names
-    test_print_accept "print card(v_ps1)" "4"
-    test_print_accept "print card(v_ps2)" "15"
-    test_print_accept "print card(v_ps3)" "4"
-    test_print_accept "print card(v_ps4)" "11"
-    test_print_accept "print card(v_ps5)" "1"
-    test_print_accept "print card(v_ps51)" "0"
-    test_print_accept "print card(v_ps6)" "101"
-
-    # a failure
-    setup_xfail "*-*-*"
-    test_print_accept "print card(m_ps1)" "typename in invalid context"
-}
-
-proc test_min {} {
-    global passcount
-
-    verbose "testing builtin MIN"
-    set passcount 0
-
-    # discrete mode names
-    test_print_accept "print min(v_ps1)" "1"
-    test_print_accept "print min(v_ps2)" "-100"
-    test_print_accept "print min(v_ps3)" "bb"
-    test_print_accept "print min(v_ps4)" "','"
-    test_print_accept "print min(v_ps5)" "FALSE"
-    test_print_accept "print min(v_ps6)" "-50"
-
-    # a failure
-    setup_xfail "*-*-*"
-    test_print_accept "print min(v_ps51)" "MIN for empty powerset"
-    setup_xfail "*-*-*"
-    test_print_accept "print min(m_ps1)" "typename in invalid context"
-}
-
-proc test_max {} {
-    global passcount
-
-    verbose "testing builtin MIN"
-    set passcount 0
-
-    # discrete mode names
-    test_print_accept "print max(v_ps1)" "7"
-    test_print_accept "print max(v_ps2)" "100"
-    test_print_accept "print max(v_ps3)" "ii"
-    test_print_accept "print max(v_ps4)" "'z'"
-    test_print_accept "print max(v_ps5)" "FALSE"
-    test_print_accept "print max(v_ps6)" "50"
-
-    # test an IN
-    test_print_accept "print 0 in v_ps6" "TRUE"
-
-    # a failure
-    setup_xfail "*-*-*"
-    test_print_accept "print max(v_ps51)" "MAX for empty powerset"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
-    # test builtins as described in chapter 6.20.3 Z.200
-    test_card
-    test_min
-    test_max
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "powerset"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break xx_\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n" 
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE #	First one is string to send_gdb to gdb
+# OBSOLETE #	Second one is string to match gdb result to
+# OBSOLETE #	Third one is an optional message to be printed
+# OBSOLETE 
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global passcount
+# OBSOLETE     global verbose
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE     } else {
+# OBSOLETE 	set message [lindex $args 0]
+# OBSOLETE     }
+# OBSOLETE     set sendthis [lindex $args 0]
+# OBSOLETE     set expectthis [lindex $args 1]
+# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE     if $result==0 {incr passcount}
+# OBSOLETE     return $result
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_card {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin CARD"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete mode names
+# OBSOLETE     test_print_accept "print card(v_ps1)" "4"
+# OBSOLETE     test_print_accept "print card(v_ps2)" "15"
+# OBSOLETE     test_print_accept "print card(v_ps3)" "4"
+# OBSOLETE     test_print_accept "print card(v_ps4)" "11"
+# OBSOLETE     test_print_accept "print card(v_ps5)" "1"
+# OBSOLETE     test_print_accept "print card(v_ps51)" "0"
+# OBSOLETE     test_print_accept "print card(v_ps6)" "101"
+# OBSOLETE 
+# OBSOLETE     # a failure
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print card(m_ps1)" "typename in invalid context"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_min {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin MIN"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete mode names
+# OBSOLETE     test_print_accept "print min(v_ps1)" "1"
+# OBSOLETE     test_print_accept "print min(v_ps2)" "-100"
+# OBSOLETE     test_print_accept "print min(v_ps3)" "bb"
+# OBSOLETE     test_print_accept "print min(v_ps4)" "','"
+# OBSOLETE     test_print_accept "print min(v_ps5)" "FALSE"
+# OBSOLETE     test_print_accept "print min(v_ps6)" "-50"
+# OBSOLETE 
+# OBSOLETE     # a failure
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print min(v_ps51)" "MIN for empty powerset"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print min(m_ps1)" "typename in invalid context"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_max {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing builtin MIN"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete mode names
+# OBSOLETE     test_print_accept "print max(v_ps1)" "7"
+# OBSOLETE     test_print_accept "print max(v_ps2)" "100"
+# OBSOLETE     test_print_accept "print max(v_ps3)" "ii"
+# OBSOLETE     test_print_accept "print max(v_ps4)" "'z'"
+# OBSOLETE     test_print_accept "print max(v_ps5)" "FALSE"
+# OBSOLETE     test_print_accept "print max(v_ps6)" "50"
+# OBSOLETE 
+# OBSOLETE     # test an IN
+# OBSOLETE     test_print_accept "print 0 in v_ps6" "TRUE"
+# OBSOLETE 
+# OBSOLETE     # a failure
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print max(v_ps51)" "MAX for empty powerset"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE     test_card
+# OBSOLETE     test_min
+# OBSOLETE     test_max
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/pr-4975.exp b/gdb/testsuite/gdb.chill/pr-4975.exp
index cef9ef5..366c536 100644
--- a/gdb/testsuite/gdb.chill/pr-4975.exp
+++ b/gdb/testsuite/gdb.chill/pr-4975.exp
@@ -1,67 +1,67 @@
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-4975-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-4975"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    # This is needed (at least on SunOS4) to make sure the
-    # the symbol table is read.
-    runto "x"
-    # "You loose"?  Why, thank you.  (But I suspect "You lose" might have
-    # been what was intended).
-    gdb_test "finish" "You loose.*" "Runs and reads symbols OK"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "pr-4975-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-4975"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE     # the symbol table is read.
+# OBSOLETE     runto "x"
+# OBSOLETE     # "You loose"?  Why, thank you.  (But I suspect "You lose" might have
+# OBSOLETE     # been what was intended).
+# OBSOLETE     gdb_test "finish" "You loose.*" "Runs and reads symbols OK"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5016.exp b/gdb/testsuite/gdb.chill/pr-5016.exp
index 760b514..f01c1bf 100644
--- a/gdb/testsuite/gdb.chill/pr-5016.exp
+++ b/gdb/testsuite/gdb.chill/pr-5016.exp
@@ -1,62 +1,63 @@
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-5016"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto dump
+# OBSOLETE     # Linux thinks type is "_cint" (and so does sparc-sun-sunos4, alpha-dec-osf2.0)
+# OBSOLETE     #setup_xfail "i*86-pc-linux*-gnu" "sparc-sun-sunos4*" "alpha-dec-osf2*"
+# OBSOLETE     gdb_test "whatis i" "type = m_index" "whatis int-range"
+# OBSOLETE     gdb_test_exact "ptype m_index" "type = RANGE (1:10)" "ptype m_index"
+# OBSOLETE     gdb_test_exact "whatis a" "type = /*LOC*/ vector"
+# OBSOLETE     gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
+# OBSOLETE     gdb_test "step" ""
+# OBSOLETE     gdb_test_exact "whatis i" "type = long" "whatis loop counter i"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
 
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5016"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto dump
-    # Linux thinks type is "_cint" (and so does sparc-sun-sunos4, alpha-dec-osf2.0)
-    #setup_xfail "i*86-pc-linux*-gnu" "sparc-sun-sunos4*" "alpha-dec-osf2*"
-    gdb_test "whatis i" "type = m_index" "whatis int-range"
-    gdb_test_exact "ptype m_index" "type = RANGE (1:10)" "ptype m_index"
-    gdb_test_exact "whatis a" "type = /*LOC*/ vector"
-    gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
-    gdb_test "step" ""
-    gdb_test_exact "whatis i" "type = long" "whatis loop counter i"
-}
-
-do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5020.exp b/gdb/testsuite/gdb.chill/pr-5020.exp
index 993d373..aad219d 100644
--- a/gdb/testsuite/gdb.chill/pr-5020.exp
+++ b/gdb/testsuite/gdb.chill/pr-5020.exp
@@ -1,85 +1,85 @@
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5020"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    # This is needed (at least on SunOS4) to make sure the
-    # the symbol table is read.
-    gdb_test "break chillvars.ch:3" ""
-    gdb_test "delete 1" ""
-
-    gdb_test "set width 0" ""
-    gdb_test "set print sevenbit-strings" ""
-    gdb_test "set print address off" ""
-
-    test_pr_5020
-}
-
-proc test_pr_5020 {} {
-    global gdb_prompt
-    runto dummy_pr_5020
-    gdb_test_exact "print y" \
-	{= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
-    gdb_test_exact "print boolarr" \
-	{= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
-    gdb_test_exact "print intarr" \
-	{= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
-    gdb_test_exact "print setarr" \
-	{= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
-    gdb_test "set print pretty" ""
-    gdb_test_exact "print y" \
-{= [('a'): [

-    .l: 10, 

-    .b: TRUE

-  ], ('b'): [

-    .l: 111, 

-    .b: FALSE

-  ]]} "print y pretty"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-5020"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE     # the symbol table is read.
+# OBSOLETE     gdb_test "break chillvars.ch:3" ""
+# OBSOLETE     gdb_test "delete 1" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "set width 0" ""
+# OBSOLETE     gdb_test "set print sevenbit-strings" ""
+# OBSOLETE     gdb_test "set print address off" ""
+# OBSOLETE 
+# OBSOLETE     test_pr_5020
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_pr_5020 {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     runto dummy_pr_5020
+# OBSOLETE     gdb_test_exact "print y" \
+# OBSOLETE 	{= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
+# OBSOLETE     gdb_test_exact "print boolarr" \
+# OBSOLETE 	{= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
+# OBSOLETE     gdb_test_exact "print intarr" \
+# OBSOLETE 	{= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
+# OBSOLETE     gdb_test_exact "print setarr" \
+# OBSOLETE 	{= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
+# OBSOLETE     gdb_test "set print pretty" ""
+# OBSOLETE     gdb_test_exact "print y" \
+# OBSOLETE {= [('a'): [

+# OBSOLETE     .l: 10, 

+# OBSOLETE     .b: TRUE

+# OBSOLETE   ], ('b'): [

+# OBSOLETE     .l: 111, 

+# OBSOLETE     .b: FALSE

+# OBSOLETE   ]]} "print y pretty"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5022.exp b/gdb/testsuite/gdb.chill/pr-5022.exp
index 43e2dc2..3060950 100644
--- a/gdb/testsuite/gdb.chill/pr-5022.exp
+++ b/gdb/testsuite/gdb.chill/pr-5022.exp
@@ -1,70 +1,70 @@
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5022"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    # This is needed (at least on SunOS4) to make sure the
-    # the symbol table is read.
-    gdb_test "break gdbme.ch:3" ""
-    gdb_test "delete 1" ""
-
-    gdb_test "set width 0" ""
-    gdb_test "set print sevenbit-strings" ""
-
-    test_pr_5022
-}
-
-proc test_pr_5022 {} {
-    global gdb_prompt
-    runto dummy_pr_5022
-    gdb_test "p p" " = NULL" "print NULL pointer"
-    gdb_test "continue" ""
-    gdb_test "p p" {= PTR\(H'[0-9a-fA-F]+\)} "print non-NULL pointer"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-5022"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE     # the symbol table is read.
+# OBSOLETE     gdb_test "break gdbme.ch:3" ""
+# OBSOLETE     gdb_test "delete 1" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "set width 0" ""
+# OBSOLETE     gdb_test "set print sevenbit-strings" ""
+# OBSOLETE 
+# OBSOLETE     test_pr_5022
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc test_pr_5022 {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     runto dummy_pr_5022
+# OBSOLETE     gdb_test "p p" " = NULL" "print NULL pointer"
+# OBSOLETE     gdb_test "continue" ""
+# OBSOLETE     gdb_test "p p" {= PTR\(H'[0-9a-fA-F]+\)} "print non-NULL pointer"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5646.exp b/gdb/testsuite/gdb.chill/pr-5646.exp
index 3a8aad3..dc093b9 100644
--- a/gdb/testsuite/gdb.chill/pr-5646.exp
+++ b/gdb/testsuite/gdb.chill/pr-5646.exp
@@ -1,64 +1,64 @@
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-5646-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-5646"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto p
-    gdb_test "next" ""
-    gdb_test_exact "print xx" {= [a:b]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "pr-5646-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-5646"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto p
+# OBSOLETE     gdb_test "next" ""
+# OBSOLETE     gdb_test_exact "print xx" {= [a:b]}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5984.exp b/gdb/testsuite/gdb.chill/pr-5984.exp
index cd45aa3..826ec57 100644
--- a/gdb/testsuite/gdb.chill/pr-5984.exp
+++ b/gdb/testsuite/gdb.chill/pr-5984.exp
@@ -1,57 +1,57 @@
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5984"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    send_gdb "set language chill\n" ; 
-
-    gdb_test "break pr-5984.ch:6" ""
-    send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-5984.ch:6"
-    gdb_expect -re "$gdb_prompt $"
-    gdb_test "next" "Jason Dark.*" "next over Jason Dark"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-5984"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n" ; 
+# OBSOLETE 
+# OBSOLETE     gdb_test "break pr-5984.ch:6" ""
+# OBSOLETE     send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-5984.ch:6"
+# OBSOLETE     gdb_expect -re "$gdb_prompt $"
+# OBSOLETE     gdb_test "next" "Jason Dark.*" "next over Jason Dark"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-6292.exp b/gdb/testsuite/gdb.chill/pr-6292.exp
index d57f481..4daf382 100644
--- a/gdb/testsuite/gdb.chill/pr-6292.exp
+++ b/gdb/testsuite/gdb.chill/pr-6292.exp
@@ -1,58 +1,58 @@
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-6292"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    send_gdb "set language chill\n" ; 
-
-    gdb_test "break pr-6292.ch:15" ""
-    send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-6292.ch:15.*$gdb_prompt $"
-    gdb_test_exact "call klaus()" {here's klaus calling.}
-    gdb_test {set fred(10, i)} {a was '10'; b was '12'.}
-    gdb_test "print i" { = 13} "print i after call"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-6292"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n" ; 
+# OBSOLETE 
+# OBSOLETE     gdb_test "break pr-6292.ch:15" ""
+# OBSOLETE     send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-6292.ch:15.*$gdb_prompt $"
+# OBSOLETE     gdb_test_exact "call klaus()" {here's klaus calling.}
+# OBSOLETE     gdb_test {set fred(10, i)} {a was '10'; b was '12'.}
+# OBSOLETE     gdb_test "print i" { = 13} "print i after call"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-6632.exp b/gdb/testsuite/gdb.chill/pr-6632.exp
index 1bec3c7..9f7d623 100644
--- a/gdb/testsuite/gdb.chill/pr-6632.exp
+++ b/gdb/testsuite/gdb.chill/pr-6632.exp
@@ -1,66 +1,66 @@
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-6632-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-6632"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} ${objfile2} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto p
-    gdb_test "whatis x" {type = m_dummy_range}
-    gdb_test_exact "ptype x" {type = m_dummy (dummy_6:dummy_22)}
-    gdb_test "print x" { = dummy_10}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "pr-6632-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-6632"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} ${objfile2} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto p
+# OBSOLETE     gdb_test "whatis x" {type = m_dummy_range}
+# OBSOLETE     gdb_test_exact "ptype x" {type = m_dummy (dummy_6:dummy_22)}
+# OBSOLETE     gdb_test "print x" { = dummy_10}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8134.exp b/gdb/testsuite/gdb.chill/pr-8134.exp
index 0e81ca7..d98c0d8 100644
--- a/gdb/testsuite/gdb.chill/pr-8134.exp
+++ b/gdb/testsuite/gdb.chill/pr-8134.exp
@@ -1,65 +1,65 @@
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-# Note we use pr-8136.ch for pr-8134.exp as well as pr-8136.exp.
-set testfile2 "func1"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-8134"
-set srcfile ${srcdir}/$subdir/pr-8136.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto p1
-    gdb_test "print first" "= 1"
-    gdb_test "print last" "= 10"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE # Note we use pr-8136.ch for pr-8134.exp as well as pr-8136.exp.
+# OBSOLETE set testfile2 "func1"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-8134"
+# OBSOLETE set srcfile ${srcdir}/$subdir/pr-8136.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto p1
+# OBSOLETE     gdb_test "print first" "= 1"
+# OBSOLETE     gdb_test "print last" "= 10"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8136.exp b/gdb/testsuite/gdb.chill/pr-8136.exp
index 3fee7ec..2dd5281 100644
--- a/gdb/testsuite/gdb.chill/pr-8136.exp
+++ b/gdb/testsuite/gdb.chill/pr-8136.exp
@@ -1,63 +1,63 @@
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "func1"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-8136"
-set srcfile ${srcdir}/$subdir/pr-8136.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto p1
-    gdb_test "print ps" {= \[e3, e7:e9\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "func1"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-8136"
+# OBSOLETE set srcfile ${srcdir}/$subdir/pr-8136.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto p1
+# OBSOLETE     gdb_test "print ps" {= \[e3, e7:e9\]}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8405.exp b/gdb/testsuite/gdb.chill/pr-8405.exp
index 826ac6b..31aa6d5 100644
--- a/gdb/testsuite/gdb.chill/pr-8405.exp
+++ b/gdb/testsuite/gdb.chill/pr-8405.exp
@@ -1,61 +1,61 @@
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-    gdb_test "set var \$i:=xx" ""
-    gdb_test "print \$i" {= \[.c: "", .b: B'00000000', .boo: FALSE\]}
-}
-
-if [skip_chill_tests] then { continue }
-
-# Check to see if we have an executable to test.  If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set testfile "pr-8405"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-if ![file exists $binfile] then {
-    warning "$binfile does not exist; tests suppressed." 0
-} else {
-    do_tests
-}
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE     gdb_test "set var \$i:=xx" ""
+# OBSOLETE     gdb_test "print \$i" {= \[.c: "", .b: B'00000000', .boo: FALSE\]}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE # Check to see if we have an executable to test.  If not, then either we
+# OBSOLETE # haven't tried to compile one, or the compilation failed for some reason.
+# OBSOLETE # In either case, just notify the user and skip the tests in this file.
+# OBSOLETE 
+# OBSOLETE set testfile "pr-8405"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if ![file exists $binfile] then {
+# OBSOLETE     warning "$binfile does not exist; tests suppressed." 0
+# OBSOLETE } else {
+# OBSOLETE     do_tests
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/pr-8742.exp b/gdb/testsuite/gdb.chill/pr-8742.exp
index 7fc05be..a7b10d0 100644
--- a/gdb/testsuite/gdb.chill/pr-8742.exp
+++ b/gdb/testsuite/gdb.chill/pr-8742.exp
@@ -1,64 +1,64 @@
-# Copyright 1992, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-8742"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto dummy
-
-    # Haven't investigated why these fail on mips-sgi-irix*
-    setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
-    gdb_test {call x(p [1, 3, 5])} "1 3 5 " "pass int powerset tuple"
-    setup_xfail "mips*-sgi-irix*"
-    gdb_test {call y(s_ps [sc])} "sc " "pass set powerset tuple"
-    setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
-    gdb_test {call x([1, 3, 5])} "1 3 5 " "pass modeless int powerset tuple"
-    setup_xfail "mips*-sgi-irix*"
-    gdb_test {call y([sc])} "sc " "pass modeless set powerset tuple"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-8742"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto dummy
+# OBSOLETE 
+# OBSOLETE     # Haven't investigated why these fail on mips-sgi-irix*
+# OBSOLETE     setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
+# OBSOLETE     gdb_test {call x(p [1, 3, 5])} "1 3 5 " "pass int powerset tuple"
+# OBSOLETE     setup_xfail "mips*-sgi-irix*"
+# OBSOLETE     gdb_test {call y(s_ps [sc])} "sc " "pass set powerset tuple"
+# OBSOLETE     setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
+# OBSOLETE     gdb_test {call x([1, 3, 5])} "1 3 5 " "pass modeless int powerset tuple"
+# OBSOLETE     setup_xfail "mips*-sgi-irix*"
+# OBSOLETE     gdb_test {call y([sc])} "sc " "pass modeless set powerset tuple"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8894.exp b/gdb/testsuite/gdb.chill/pr-8894.exp
index 777570a..1ef4448 100644
--- a/gdb/testsuite/gdb.chill/pr-8894.exp
+++ b/gdb/testsuite/gdb.chill/pr-8894.exp
@@ -1,61 +1,61 @@
-# Copyright 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-8894-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "pr-8894"
-set srcfile ${srcdir}/$subdir/$testfile.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    gdb_test "print size(m_byte)" { = 2}
-    gdb_test "print size(m_struct)" { = 6}
-}
-
-do_tests
+# OBSOLETE # Copyright 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "pr-8894-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-8894"
+# OBSOLETE set srcfile ${srcdir}/$subdir/$testfile.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "print size(m_byte)" { = 2}
+# OBSOLETE     gdb_test "print size(m_struct)" { = 6}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-9095.exp b/gdb/testsuite/gdb.chill/pr-9095.exp
index d5c72b6..44bb2c3 100644
--- a/gdb/testsuite/gdb.chill/pr-9095.exp
+++ b/gdb/testsuite/gdb.chill/pr-9095.exp
@@ -1,62 +1,62 @@
-# Copyright 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-    runto pr-9095.ch:12
-    gdb_test {p v_arr2(5)->.p(5)} "reference value used as function" \
-	"bad call using pointer"
-}
-
-if [skip_chill_tests] then { continue }
-
-# Check to see if we have an executable to test.  If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set testfile "pr-9095"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-if ![file exists $binfile] then {
-    warning "$binfile does not exist; tests suppressed." 0
-} else {
-    do_tests
-}
+# OBSOLETE # Copyright 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE     runto pr-9095.ch:12
+# OBSOLETE     gdb_test {p v_arr2(5)->.p(5)} "reference value used as function" \
+# OBSOLETE 	"bad call using pointer"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE # Check to see if we have an executable to test.  If not, then either we
+# OBSOLETE # haven't tried to compile one, or the compilation failed for some reason.
+# OBSOLETE # In either case, just notify the user and skip the tests in this file.
+# OBSOLETE 
+# OBSOLETE set testfile "pr-9095"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if ![file exists $binfile] then {
+# OBSOLETE     warning "$binfile does not exist; tests suppressed." 0
+# OBSOLETE } else {
+# OBSOLETE     do_tests
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/pr-9946.exp b/gdb/testsuite/gdb.chill/pr-9946.exp
index 7e8b718..f0c48aa 100644
--- a/gdb/testsuite/gdb.chill/pr-9946.exp
+++ b/gdb/testsuite/gdb.chill/pr-9946.exp
@@ -1,79 +1,79 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-#                          Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
-        strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-9946"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-        -re ".*$gdb_prompt $" {}
-        timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    return [gdb_test "show language" ".* source language is \"chill\".*" \
-        "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
-    runto x_
-    gdb_test "next" ""
-    # check comparison of SET's
-    gdb_test {print xyz=moving} { = TRUE}
-    gdb_test {print xyz/=moving} { = FALSE}
-    gdb_test {print xyz<moving} { = FALSE}
-    gdb_test {print xyz<=moving} { = TRUE}
-    gdb_test {print xyz>moving} { = FALSE}
-    gdb_test {print xyz>=moving} { = TRUE}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE #                          Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE         strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "pr-9946"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE         -re ".*$gdb_prompt $" {}
+# OBSOLETE         timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE         "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE     runto x_
+# OBSOLETE     gdb_test "next" ""
+# OBSOLETE     # check comparison of SET's
+# OBSOLETE     gdb_test {print xyz=moving} { = TRUE}
+# OBSOLETE     gdb_test {print xyz/=moving} { = FALSE}
+# OBSOLETE     gdb_test {print xyz<moving} { = FALSE}
+# OBSOLETE     gdb_test {print xyz<=moving} { = TRUE}
+# OBSOLETE     gdb_test {print xyz>moving} { = FALSE}
+# OBSOLETE     gdb_test {print xyz>=moving} { = TRUE}
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/result.exp b/gdb/testsuite/gdb.chill/result.exp
index e9dce15..8c9a897 100644
--- a/gdb/testsuite/gdb.chill/result.exp
+++ b/gdb/testsuite/gdb.chill/result.exp
@@ -1,77 +1,77 @@
-# Copyright 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "result"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    gdb_test "set width 0" ""
-    gdb_test "set print sevenbit-strings" ""
-    gdb_test "set print address off" ""
-
-    # simple function
-    runto simple_func
-    gdb_test "step 2" ""
-    gdb_test "print j" "= 5"
-    gdb_test "p RESULT" "= 10"
-    gdb_test "continue" ""
-    gdb_test "print i" "= 7"
-    gdb_test "step 4" ""
-    gdb_test "set RESULT := 50" ""
-    gdb_test "finish" ""
-    gdb_test "step" ""
-    gdb_test "print i" "= 50"
-
-    # returning a structure
-    runto ret_struct
-    gdb_test "step 2" ""
-    gdb_test "p result" {\[.l: 33, .b: FALSE\]}
-    gdb_test "set var result := \[383, TRUE\]" ""
-    gdb_test "finish" ""
-    gdb_test "p v_struct" {\[.l: 383, .b: TRUE\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "result"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "set width 0" ""
+# OBSOLETE     gdb_test "set print sevenbit-strings" ""
+# OBSOLETE     gdb_test "set print address off" ""
+# OBSOLETE 
+# OBSOLETE     # simple function
+# OBSOLETE     runto simple_func
+# OBSOLETE     gdb_test "step 2" ""
+# OBSOLETE     gdb_test "print j" "= 5"
+# OBSOLETE     gdb_test "p RESULT" "= 10"
+# OBSOLETE     gdb_test "continue" ""
+# OBSOLETE     gdb_test "print i" "= 7"
+# OBSOLETE     gdb_test "step 4" ""
+# OBSOLETE     gdb_test "set RESULT := 50" ""
+# OBSOLETE     gdb_test "finish" ""
+# OBSOLETE     gdb_test "step" ""
+# OBSOLETE     gdb_test "print i" "= 50"
+# OBSOLETE 
+# OBSOLETE     # returning a structure
+# OBSOLETE     runto ret_struct
+# OBSOLETE     gdb_test "step 2" ""
+# OBSOLETE     gdb_test "p result" {\[.l: 33, .b: FALSE\]}
+# OBSOLETE     gdb_test "set var result := \[383, TRUE\]" ""
+# OBSOLETE     gdb_test "finish" ""
+# OBSOLETE     gdb_test "p v_struct" {\[.l: 383, .b: TRUE\]}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/string.exp b/gdb/testsuite/gdb.chill/string.exp
index acaea8ff1..41b2104 100644
--- a/gdb/testsuite/gdb.chill/string.exp
+++ b/gdb/testsuite/gdb.chill/string.exp
@@ -1,73 +1,73 @@
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "string"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    # These tests based on Cygnus PR chill/5696.
-    runto string.ch:22
-    gdb_test "p s20" { = "Moser Wilfried"} "print simple vstring"
-    gdb_test "p s20(1)" { = 'o'} "print vstring element"
-    gdb_test "p s20(1:3)" { = "ose"} "print vstring slice (:)"
-    gdb_test "p s20(2 up 3)" { = "ser"} "print vstring slice (up)"
-    gdb_test "p s10" { = "1234567890"} "print simple string"
-    gdb_test "p s10(1)" { = '2'} "print string element"
-    gdb_test "p s10(1:3)" { = "234"} "print string slice (:)"
-    gdb_test "p s10(2 up 3)" { = "345"} "print string slice (up)"
-
-    gdb_test "p length(s10)" { = 10} "print string length"
-    gdb_test "p length(s20)" { = 14} "print varying string length"
-    gdb_test "p lower(s10)" { = 0} "print string lower"
-    gdb_test "p upper(s10)" { = 9} "print string upper"
-    gdb_test "p lower(s20)" { = 0} "print varying string lower"
-    gdb_test "p upper(s20)" { = 19} "print varying string upper"
-
-    # These tests are based on Cygnus PR chill/9078.
-    gdb_test "print foo // bar" { = "Moser Wilfried"}
-    gdb_test "print foo // bar1" { = "Moser abcde"}
-    gdb_test "print foo1 // bar1" { = "12345abcde"}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "string"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     # These tests based on Cygnus PR chill/5696.
+# OBSOLETE     runto string.ch:22
+# OBSOLETE     gdb_test "p s20" { = "Moser Wilfried"} "print simple vstring"
+# OBSOLETE     gdb_test "p s20(1)" { = 'o'} "print vstring element"
+# OBSOLETE     gdb_test "p s20(1:3)" { = "ose"} "print vstring slice (:)"
+# OBSOLETE     gdb_test "p s20(2 up 3)" { = "ser"} "print vstring slice (up)"
+# OBSOLETE     gdb_test "p s10" { = "1234567890"} "print simple string"
+# OBSOLETE     gdb_test "p s10(1)" { = '2'} "print string element"
+# OBSOLETE     gdb_test "p s10(1:3)" { = "234"} "print string slice (:)"
+# OBSOLETE     gdb_test "p s10(2 up 3)" { = "345"} "print string slice (up)"
+# OBSOLETE 
+# OBSOLETE     gdb_test "p length(s10)" { = 10} "print string length"
+# OBSOLETE     gdb_test "p length(s20)" { = 14} "print varying string length"
+# OBSOLETE     gdb_test "p lower(s10)" { = 0} "print string lower"
+# OBSOLETE     gdb_test "p upper(s10)" { = 9} "print string upper"
+# OBSOLETE     gdb_test "p lower(s20)" { = 0} "print varying string lower"
+# OBSOLETE     gdb_test "p upper(s20)" { = 19} "print varying string upper"
+# OBSOLETE 
+# OBSOLETE     # These tests are based on Cygnus PR chill/9078.
+# OBSOLETE     gdb_test "print foo // bar" { = "Moser Wilfried"}
+# OBSOLETE     gdb_test "print foo // bar1" { = "Moser abcde"}
+# OBSOLETE     gdb_test "print foo1 // bar1" { = "12345abcde"}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/tests1.exp b/gdb/testsuite/gdb.chill/tests1.exp
index 7aa8825..d3c647d 100644
--- a/gdb/testsuite/gdb.chill/tests1.exp
+++ b/gdb/testsuite/gdb.chill/tests1.exp
@@ -1,822 +1,822 @@
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "tests1"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    verbose "loading file '$binfile'"
-    gdb_load $binfile
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break dummyfunc\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n" 
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-#	First one is string to send_gdb to gdb
-#	Second one is string to match gdb result to
-#	Third one is an optional message to be printed
-
-proc test_print_accept { args } {
-    global gdb_prompt
-    global passcount
-    global verbose
-
-    if [llength $args]==3 then {
-	set message [lindex $args 2]
-    } else {
-	set message [lindex $args 0]
-    }
-    set sendthis [lindex $args 0]
-    set expectthis [lindex $args 1]
-    set result [gdb_test $sendthis ".* = ${expectthis}" $message]
-    if $result==0 {incr passcount}
-    return $result
-}
-
-# Testing printing of a specific value.  Increment passcount for
-# success or issue fail message for failure.  In both cases, return
-# a 1 to indicate that more tests can proceed.  However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-
-# various tests if modes are treated correctly
-# using ptype
-proc test_modes {} {
-    global passcount
-
-    verbose "testing chill modes"
-    set passcount 0
-
-    # discrete modes
-    test_print_accept "ptype BYTE" "byte"
-    test_print_accept "ptype UBYTE" "ubyte"
-    test_print_accept "ptype INT" "int"
-    test_print_accept "ptype UINT" "uint"
-    test_print_accept "ptype LONG" "long"
-    test_print_accept "ptype ULONG" "ulong"
-    test_print_accept "ptype BOOL" "bool"
-    test_print_accept "ptype CHAR" "char"
-
-    test_print_accept "ptype set1" "SET \[(\]aaa, bbb, ccc\[)\]" \
-	"print unnumbered set mode"
-    test_print_accept "ptype nset1" "SET \[(\]na = 1, nb = 34, nc = 20\[)\]" \
-	"print numbered set mode"
-
-    # mp:
-    # display maybe in hex values ?
-    #
-    test_print_accept "ptype r11" "ubyte \\(0:255\\)" \
-	"print ubyte range mode"
-    test_print_accept "ptype r12" "uint \\(0:65535\\)" \
-	"print uint range mode"
-#    test_print_accept "ptype r13" "ulong \\(0:4294967295\\)" \
-#	"print ulong range mode"
-    test_print_accept "ptype r14" "byte \\(-128:127\\)" \
-	"print byte range mode"
-    test_print_accept "ptype r15" "int \\(-32768:32767\\)" \
-	"print int range mode"
-    test_print_accept "ptype r16" "long \\(-2147483648:2147483647\\)" \
-	"print long range mode"
-
-    test_print_accept "ptype r2" "set1 \\(bbb:ccc\\)" \
-	"print unnumbered set range mode"
-    test_print_accept "ptype r3" "nset1 \\(na:na\\)" \
-	"print numbered set range mode"
-    # really this order ?
-    # I'm not sure what should happen for the next two tests.
-    setup_xfail "*-*-*"
-    test_print_accept "ptype r4" "nset1 \\(nb = 34:nc = 20\\)" \
-	"print numbered set range mode"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype r5" "nset1 \\(na = 1, nb = 34, nc = 20\\)" \
-	"print numbered set range mode"
-
-    # powerset modes
-    test_print_accept "ptype pm1" \
-	"POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
-	"print powerset mode 1"
-    test_print_accept "ptype pm2" "POWERSET byte \\(1:8\\)" \
-	"print powerset mode 2"
-    test_print_accept "ptype pm3" "POWERSET int \\(-32768:32767\\)" \
-	"print powerset mode 3"
-    test_print_accept "ptype pm4" "POWERSET long \\(-32768:32768\\)" \
-	"print powerset mode 4"
-    test_print_accept "ptype pm5" \
-	"POWERSET long \\(-2147483648:2147483647\\)" \
-	"print powerset mode 5"
-    
-    # reference modes
-    test_print_accept "ptype ref1" "REF pm1" \
-	"print reference to powerset mode"
-    test_print_accept "ptype ref2" "REF byte" \
-	"print reference to byte"
-    test_print_accept "ptype ref3" "PTR" \
-	"print free reference type"
-
-    # procedure modes
-    # FIXME: we have to talk about this ... 
-    test_print_accept "ptype prm1" \
-	"REF PROC \[(\]\[)\]" \
-	"print procedure mode 1"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype prm2" \
-	"REF PROC \[(\]bool in, int out long inout\[)\] RETURNS \[(\]char\[)\]" \
-	"print procedure mode 2"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype prm3" \
-	"REF PROC \[(\]pm1, ref loc\[)\] RETURNS \[(\]ref3\[)\]" \
-	"print procedure mode 3"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype prm4" \
-	"\[(\] \[)\] EXCEPTIONS \[(\]ex1, ex2, ex3\[)\]" \
-	"print procedure mode 4"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype prm5" \
-	"REF PROC \[(\]r11, r16 inout, r5 out\[)\] RETURNS \[(\]r2\[)\] EXCEPTIONS \[(\]ex1\[)\]" \
-	"print procedure mode 5"
-
-    # synchronization modes
-    # FIXME: since gdb doesn't process events & buffers so far, this has be 
-    #        filled later...
-    xfail "synchronization mode handling"
-
-    # timing modes
-    test_print_accept "ptype DURATION" "duration"
-    test_print_accept "ptype TIME" "time"
-
-    # string modes
-    # some tests are done in chillvars.exp
-    test_print_accept "ptype strm1" "CHARS \\(5\\)" "print char string mode"
-    test_print_accept "ptype strm2" "CHARS \[(\]7\[)\] VARYING" \
-	"print varying char string mode"
-    test_print_accept "ptype bstr1" "BOOLS \\(20\\)" "print bit string mode"
-
-    test_print_accept "ptype B'000'" "BOOLS \\(3\\)" "bit string literal"
-    test_print_accept "ptype B'11110000'" "BOOLS \\(8\\)" "bit string literal"
-    # FIXME: adjust error message
-    gdb_test "ptype B'00110211'" {.*Too-large digit.*[.]} \
-	"reject invalid bitstring"
-
-    # array modes
-    # some tests are done in chillvars.exp
-    test_print_accept "ptype arr1m" "ARRAY \\(1:100\\) set1" \
-	"print array mode 1"
-    test_print_accept "ptype arr2m" "ARRAY \\(1:100\\) ARRAY \\(1:100\\) set1"\
-	"print array mode 2"
-    test_print_accept "ptype arr3m" "ARRAY \\(0:255\\) ARRAY \\(0:65535\\) ARRAY \\(-128:127\\) set1" \
-	"print array mode 3"
-    setup_xfail "*-*-*"
-    test_print_accept "ptype arr4m" "ARRAY \\(b:c\\) ARRAY \\(na = 1:na = 1\\) ARRAY \\(nc:nb\\) ARRAY \\(na = 1:nc = 20\\) POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
-	"print array mode 4"
-    
-    # structure modes
-    # some checks are in chillvars.exp
-    # setup_xfail "*-*-*"
-    test_print_accept "ptype stru1m" "STRUCT \\(.*a long,.*b long,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\).*ELSE.*ch3 CHARS \\(1\\).*ESAC.*\\)" \
-	"print structure mode 1"
-    #setup_xfail "*-*-*"
-    test_print_accept "ptype stru2m" "STRUCT \\(.*f set1,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\) VARYING.*ELSE.*ch3 CHARS \\(0\\) VARYING.*ESAC.*\\)" \
-	"print structure mode 2"
-    #setup_xfail "*-*-*"
-    test_print_accept "ptype stru3m" "STRUCT \\(.*f r3,.*CASE OF.*:.*ch1 CHARS \\(20\\).*ESAC.*\\)" \
-	"print structure mode 3"
-    # setup_xfail "*-*-*"
-    test_print_accept "ptype stru4m" "STRUCT \\(.*i long,.*CASE OF.*:.*i1 int,.*i11 int,.*b1 bool,.*c1 char.*:.*i2 long,.*i22 long,.*bs2 BOOLS \\(10\\).*:.*s3 STRUCT \\(.*i3 int,.*CASE OF.*:.*foo long.*ELSE.*bar char.*ESAC.*\\).*ELSE.*x stru2m.*ESAC,.*y stru3m.*\\)" \
-	"print structure mode 4"
-   
-    
-    if $passcount then {
-	pass "$passcount correct modes printed"
-    }
-}
-
-# various tests if locations are treated correctly
-# read access using ptype, print, whatis
-proc test_locations {} {
-    global passcount
-
-    set passcount 0
-    verbose "testing read access to locations"
-    # various location tests can be found in chillvars.exp
-
-    # set locations
-    test_print_accept "ptype s1l" "SET \\(aaa, bbb, ccc\\)" \
-	"print mode of set location"
-    test_print_accept "whatis s1l" "set1" \
-	"print modename of set location"
-    test_print_accept "print s1l" "ccc" "print set location"
-    test_print_accept "ptype s2l" "SET \\(na = 1, nb = 34, nc = 20\\)" \
-	"print mode of numbered set location"
-    test_print_accept "whatis s2l" "nset1" \
-	"print mode name of numbered set location"
-    test_print_accept "print s2l" "nb" "print numberes set location"
-
-    # range modes
-    test_print_accept "ptype rl1" "ubyte \\(0:255\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl1" "r11" \
-	"print mode name of range location"
-    test_print_accept "print rl1" "3" \
-	"print range location"
-
-    test_print_accept "ptype rl2" "ubyte \\(0:255\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl2" "r11" \
-	"print mode name of range location"
-    test_print_accept "print rl2" "0" \
-	"print range location"
-
-    test_print_accept "ptype rl3" "ubyte \\(0:255\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl3" "r11" \
-	"print mode name of range location"
-    test_print_accept "print rl3" "255" \
-	"print range location"
-
-    test_print_accept "ptype rl5" "uint \\(0:65535\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl5" "r12" \
-	"print mode name of range location"
-    test_print_accept "print rl5" "65530" \
-	"print range location"
-
-    test_print_accept "ptype rl6" "uint \\(0:65535\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl6" "r12" \
-	"print mode name of range location"
-    test_print_accept "print rl6" "0" \
-	"print range location"
-	
-    test_print_accept "ptype rl7" "uint \\(0:65535\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl7" "r12" \
-	"print mode name of range location"
-    test_print_accept "print rl7" "65535" \
-	"print range location"
-	
-#     test_print_accept "ptype rl9" "ulong \\(0:4294967295\\)" \
-# 	"print mode of range location"
-#     test_print_accept "whatis rl9" "r13" \
-# 	"print mode name of range location"
-#     test_print_accept "print rl9" "128" \
-# 	"print range location"
-	
-#     test_print_accept "ptype rl10" "ulong \\(0:4294967295\\)" \
-# 	"print mode of range location"
-#     test_print_accept "whatis rl10" "r13" \
-# 	"print mode name of range location"
-#     test_print_accept "print rl10" "0" \
-# 	"print range location"
-	
-#     test_print_accept "ptype rl11" "ulong \\(0:4294967295\\)" \
-# 	"print mode of range location"
-#     test_print_accept "whatis rl11" "r13" \
-# 	"print mode name of range location"
-#     test_print_accept "print rl11" "4294967295" \
-# 	"print range location"
-
-    test_print_accept "ptype rl13" "byte \\(-128:127\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl13" "r14" \
-	"print mode name of range location"
-    test_print_accept "print rl13" "-121" \
-	"print range location"
-
-    test_print_accept "ptype rl14" "byte \\(-128:127\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl14" "r14" \
-	"print mode name of range location"
-    test_print_accept "print rl14" "-128" \
-	"print range location"
-
-    test_print_accept "ptype rl15" "byte \\(-128:127\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl15" "r14" \
-	"print mode name of range location"
-    test_print_accept "print rl15" "127" \
-	"print range location"
-
-    test_print_accept "ptype rl17" "int \\(-32768:32767\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl17" "r15" \
-	"print mode name of range location"
-    test_print_accept "print rl17" "-32720" \
-	"print range location"
-
-    test_print_accept "ptype rl18" "int \\(-32768:32767\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl18" "r15" \
-	"print mode name of range location"
-    test_print_accept "print rl18" "-32768" \
-	"print range location"
-
-    test_print_accept "ptype rl19" "int \\(-32768:32767\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl19" "r15" \
-	"print mode name of range location"
-    test_print_accept "print rl19" "32767" \
-	"print range location"
-
-    test_print_accept "ptype rl21" "long \\(-2147483648:2147483647\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl21" "r16" \
-	"print mode name of range location"
-    test_print_accept "print rl21" "2147483643" \
-	"print range location"
-
-    test_print_accept "ptype rl22" "long \\(-2147483648:2147483647\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl22" "r16" \
-	"print mode name of range location"
-    test_print_accept "print rl22" "-2147483648" \
-	"print range location"
-
-    test_print_accept "ptype rl23" "long \\(-2147483648:2147483647\\)" \
-	"print mode of range location"
-    test_print_accept "whatis rl23" "r16" \
-	"print mode name of range location"
-    test_print_accept "print rl23" "2147483647" \
-	"print range location"
-    
-    # powerset locations
-    test_print_accept "ptype pl1" \
-	"POWERSET SET \\(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\\)" \
-	"print mode of powerset location 1"
-    test_print_accept "whatis pl1" "pm1" \
-	"print mode mode name of powerset location"
-    test_print_accept "print pl1" \
-	"\[\[\]p1:p10\[\]\]" \
-	"print powerset location 1"
-    test_print_accept "print pl2" {\[\]} \
-	"print powerset location 2"
-    test_print_accept "print pl3" "\[\[\]p1, p10\[\]\]" \
-    	"print powerset location 3"
-    test_print_accept "print pl4" {\[p1:p2, p4:p6, p8:p10\]} \
-	"print powerset location 4"
-    test_print_accept "print pl5" {\[p1:p4, p6, p8:p10\]} \
-	"print powerset location 5"
-    test_print_accept "print pl6" {\[p1, p3:p8, p10\]} \
-	"print powerset location 6"
-    
-    test_print_accept "ptype pl7" \
-	"POWERSET byte \\(1:8\\)" \
-	"print mode of byte powerset location"
-    test_print_accept "whatis pl7" "pm2" \
-	"print modename of byte powerset location"
-    test_print_accept "print pl7" {\[1:8\]} \
-	"print powerset location 7"
-    
-    test_print_accept "ptype pl8" \
-	"POWERSET int \\(-32768:32767\\)" \
-	"print mode of int powerset location"
-    test_print_accept "whatis pl8" "pm3" \
-	"print modename of int powerset location"
-    test_print_accept "print pl8" {\[-32768:32767\]} \
-	"print powerset location 8"
-    
-#    test_print_accept "ptype pl9" \
-#	"POWERSET long \\(-2147483648:2147483647\\)" \
-#	"print mode of long powerset location"
-#    test_print_accept "whatis pl9" "pm5" \
-#	"print modename of long powerset location"
-#    test_print_accept "print pl9" {\[-2147483648:2147483647\]} \
-#	"print powerset location 9"
-    
-    # reference modes
-    test_print_accept "ptype ref3l" "PTR" "print mode of reference location"
-    # setup_xfail "*-*-*"
-    test_print_accept "whatis ref3l" "ref3" \
-	"print modename of reference location"
-    # setup_xfail "*-*-*"
-    test_print_accept "print ref3l" "ref3\\(H'.*\\)" \
-	"print reference location"
-    test_print_accept "ptype ref4l" "PTR" "print mode of reference location"
-    # setup_xfail "*-*-*"
-    test_print_accept "whatis ref4l" "ref4" \
-	"print modename of reference location"
-    # setup_xfail "*-*-*"
-    test_print_accept "print ref4l" "ref4\\(H'.*\\)" \
-	"print reference location"
-    test_print_accept "ptype ref5l" "PTR" "print mode of reference location"
-    test_print_accept "whatis ref5l" "PTR" \
-	"print modename of reference location"
-    test_print_accept "print ref5l" "PTR\\(H'.*\\)" \
-	"print reference location"
-
-    # dereference a little bit..
-    test_print_accept "print ref6l->syn_int" "42" \
-	"dereference reference to synmode location"
-    test_print_accept "print ref7l->int" "-42" \
-	"dereference reference to predefined mode location"
-    test_print_accept "print ref8l->pm1" \
-	"\[\[\]p1:p10\[\]\]" \
-	"dereference reference to newmode location"
-
-    # synchronization mode locations
-    # FIXME: synchronization modes are not supported so far...
-    xfail "no synchronization mode location support, not implemented yet"
-    
-    # timing mode locations
-    # FIXME: callbacks to abstime, inttime not implemented
-    xfail "timing modes not implemented properly yet"
-
-    # char string locations
-    # some tests are don in chillvars.exp
-    test_print_accept "ptype strl1" \
-	"CHARS \\(7\\) VARYING" \
-	"print varying string location"
-    test_print_accept "whatis strl1" "strm2" \
-	"print string locationa mode name"
-    test_print_accept "print strl1" \
-	{\"hansi\^\(0\)\"} \
-	"print string location"
-    # string elements
-    test_print_accept "print strl1(0)" "\'h\'" \
-	"print string element 1"
-    test_print_accept "print strl1(5)" {'\^[(]0[)]'} \
-	"print string element 2"
-    test_print_accept "print strl1(3)" "\'s\'" \
-	"print string element 3"
-    test_print_accept "ptype strl1(0)" "char" \
-	"print mode of string element"
-    # slices
-    test_print_accept "print strl1(3:4)" "\"si\"" \
-	"print string slice 1"
-    test_print_accept "print strl1(0:5)" \
-	{\"hansi\^\(0\)\"} \
-	"print string slice 2"
-    test_print_accept "print strl1(0:0)" "\"h\"" \
-	"print string slice 3"
-    test_print_accept "print strl1(0 up 6)" \
-	{\"hansi\^\(0\)\"} \
-	"print string slice 4"
-    # FIXME: adjust error message, when implented
-    gdb_test "print strl1(6 up 1)" \
-	".*slice.*out of range.*" \
-	"print invalid string slice length"
-    gdb_test "print strl1(-1 up 5)" \
-	".*slice.*out of range.*" \
-	"print invalid string slice length"
-    gdb_test "print strl1(-1:5)" \
-	".*slice.*out of range.*" \
-	"print invalid string slice"
-    gdb_test "print strl1(-1:7)" \
-	".*slice.*out of range.*" \
-	"print invalid string slice"
-    gdb_test "print strl1(0 up -1)" \
-	".*slice.*out of range.*" \
-	"print invalid string slice length"
-    gdb_test "print strl1(0 up 0)" {""}
-    
-    # bitstring locations
-    test_print_accept "ptype bstr1" \
-	"BOOLS \\(20\\)" \
-	"print mode of bitstring location"
-    test_print_accept "whatis bstrl1" "bstr1" \
-	"print mode name of bitstring location"
-    test_print_accept "print bstrl1" \
-	"B'10101010101010101010'" \
-	"print bitstring location"
-    
-    test_print_accept "ptype bstrl1(0)" "bool|BOOL" \
-	"print mode of bitstring element"
-    test_print_accept "print bstrl1(0)" "TRUE" \
-	"print bitstring element 1"
-    test_print_accept "print bstrl1(19)" "FALSE" \
-	"print bitstring element 2"
-    test_print_accept "print bstrl1(10)" "TRUE" \
-	"print bitstring element 3"
-    
-    test_print_accept "print bstrl1(0:19)" \
-	"B'10101010101010101010'" \
-	"print bitstring location slice 1"
-    test_print_accept "print bstrl1(0:0)" \
-	"B'1'" \
-	"print bitstring location slice 2"
-    test_print_accept "print bstrl1(3:9)" \
-	"B'0101010'" \
-	"print bitstring location slice 3"
-    test_print_accept "print bstrl1(0 up 20)" \
-	"B'10101010101010101010'" \
-	"print bitstring location slice 4"
-    test_print_accept "print bstrl1(19 up 1)" \
-	"B'0'" \
-	"print bitstring location slice 5"
-    gdb_test "print bstrl1(20 up 1)" \
-	".*slice out of range.*" \
-	"print invalid bitstring slice (20 up 1)"
-    gdb_test "print bstrl1(-4:5)" \
-	".*slice out of range.*" \
-	"print invalid bitstring slice (-4:5)"
-    gdb_test "print bstrl1(-1:up 1)" \
-	".*invalid expression syntax.*" \
-	"print invalid bitstring slice (-1:ip 1)"
-    gdb_test "print bstrl1(-1:20)" \
-	".*slice out of range.*" \
-	"print invalid bitstring slice (-1:20)"
-    gdb_test "print bstrl1(0 up -1)" \
-	".*slice out of range.*" \
-	"print invalid bitstring slice (0 up -1)"
-    test_print_accept "print bstrl1(4 up 0)" "B''"
-    
-    # array mode locations
-    gdb_test_exact "ptype arrl1" \
-	"ARRAY (1:100) set1" \
-	"print mode of array location"
-    gdb_test "whatis arrl1" "arr1m" \
-	"print mode name of array location"
-    gdb_test_exact "print arrl1" {[(1:100): aaa]} \
-	"print array location"
-    test_print_accept "ptype arrl1(1)" \
-	"SET \\(aaa, bbb, ccc\\)" \
-	"print mode of array element"
-    gdb_test_exact "print arrl3" \
-	{[(1:5): [(1:3): [(1:2): -2147483648]]]} \
-	"print array location 2"
-    gdb_test_exact "print arrl3(1)" \
-	{[(1:3): [(1:2): -2147483648]]} \
-	"print array location 3"
-    gdb_test_exact "ptype arrl3(1)" \
-	{ARRAY (1:3) ARRAY (1:2) long} \
-	"print mode of array element"
-    test_print_accept "print arrl3(5)" \
-	{\[\(1:3\): \[\(1:2\): -2147483648\]\]} \
-	"print array location 4"
-    test_print_accept "print arrl3(1,1)" \
-	{\[\(1:2\): -2147483648\]} \
-	"print array location 5"
-    test_print_accept "ptype arrl3(1,1)" \
-	{ARRAY \(1:2\) long} \
-	"print mode of array element"
-    test_print_accept "print arrl3(5,3)" \
-	{\[\(1:2\): -2147483648\]} \
-	"print array location 6"
-    test_print_accept "print arrl3(1,1,1)" \
-	"-2147483648" \
-	"print array location 7"
-    test_print_accept "print arrl3(5,3,2)" \
-	"-2147483648" \
-	"print array location 8"
-    test_print_accept "print arrl3(1)(3)(2)" \
-	"-2147483648" \
-	"print array location 9"
-
-    # reject the following range fails
-    # FIXME: adjust error messages
-    gdb_test "print arrl3(-1)" \
-	".*out of range.*" \
-	"check invalid array indices 1"
-    gdb_test "print arrl3(6)" \
-	".*out of range.*" \
-	"check invalid array indices 2"
-    gdb_test "print arrl3(0,0)" \
-	".*out of range.*" \
-	"check invalid array indices 3"
-    gdb_test "print arrl3(1,0)" \
-	".*out of range.*" \
-	"check invalid array indices 4"
-    gdb_test "print arrl3(1,4)" \
-	".*out of range.*" \
-	"check invalid array indices 5"
-    gdb_test "print arrl3(6,4)" \
-	".*out of range.*" \
-	"check invalid array indices 6"
-    gdb_test "print arrl3(1,1,0)" \
-	".*out of range.*" \
-	"check invalid array indices 7"
-    gdb_test "print arrl3(6,4,0)" \
-	".*out of range.*" \
-	"check invalid array indices 8"
-    gdb_test "print arrl3(1,1,3)" \
-	".*out of range.*" \
-	"check invalid array indices 9"
-
-    gdb_test "print arrl3(0)(0)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 10"
-    gdb_test "print arrl3(1)(0)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 11"
-    gdb_test "print arrl3(1)(4)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 12"
-    gdb_test "print arrl3(6)(4)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 13"
-    gdb_test "print arrl3(1)(1)(0)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 14"
-    gdb_test "print arrl3(6)(4)(0)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 15"
-    gdb_test "print arrl3(1)(1)(3)" \
-	".* array or string index out of range.*" \
-	"check invalid array indices 16"
-    
-    # slices
-    test_print_accept "print arrl4(1:3)" \
-	{\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\]\]} \
-	"print array slice 1"
-    test_print_accept "ptype arrl4(1:3)" \
-	{ARRAY \(1:3\) ARRAY \(1:3\) ARRAY \(1:2\) long} \
-	"print mode of array slice"
-# The next one is bogus:
-#    test_print_accept "print arrl4(5, 2:3, 1)" \
-#	# FIXME: maybe the '(1): ' in the inner tupel should be omitted ? \
-#	{\[(2): \[\(1\): 100\], \(3\):\[\(1\): 100\]\]} \
-#	"print array slice 2"
-    test_print_accept "print arrl4(1 up 4)" \
-	{\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\], \(4\): \[\(1:3\): \[\(1:2\): -2147483648\]\]\]} \
-	"print array slice 3"
-# The next two are bogus:
-#    test_print_accept "print arrl4(3, 2 up 1)" \
-#	{\[\(2:3\): \[\(1:2\): 100\]\]} \
-#	"print array slice 4"
-#    test_print_accept "print arrl4(1:2, 1 up 1, 2)" \
-#	{\[\(1\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\], \(2\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\]\]} \
-#	"print array slice 4"
-    # reject invalid slices
-    # FIXME: adjust error messages
-    gdb_test "print arrl4(5:6)" \
-	".*slice out of range.*" \
-	"check invalid range 1"
-    gdb_test "print arrl4(0:1)" \
-	".*slice out of range.*" \
-	"check invalid range 2"
-    gdb_test "print arrl4(0:6)" \
-	".*slice out of range.*" \
-	"check invalid range 3"
-    gdb_test "print arrl4(3:2)" \
-	".*slice out of range.*" \
-	"check invalid range 4"
-    gdb_test "print arrl4(1,3:4)" \
-	".*syntax error.*" \
-	"check invalid range 5"
-    gdb_test "print arrl4(1,0:1)" \
-	".*syntax error.*" \
-	"check invalid range 6"
-    gdb_test "print arrl4(1,0:4)" \
-	".*syntax error.*" \
-	"check invalid range 7"
-    gdb_test "print arrl4(1,3:2)" \
-	".*syntax error.*" \
-	"check invalid range 8"
-    gdb_test "print arrl4(5 up 2)" \
-	".*slice out of range.*" \
-	"check invalid range 9"
-    gdb_test "print arrl4(-1 up 1)" \
-	".*slice out of range.*" \
-	"check invalid range 10"
-    gdb_test "print arrl4(-1 up 7)" \
-	".*slice out of range.*" \
-	"check invalid range 11"
-    gdb_test "print arrl4(1 up 0)" \
-	".*slice out of range.*" \
-	"check invalid range 12"
-    gdb_test "print arrl4(1,3 up 1)" \
-	".*syntax error.*" \
-	"check invalid range 13"
-    gdb_test "print arrl4(1,-1 up 1)" \
-	".*syntax error.*" \
-	"check invalid range 14"
-    gdb_test "print arrl4(1,-1 up 5)" \
-	".*syntax error.*" \
-	"check invalid range 15"
-    gdb_test "print arrl4(1,2 up 0)" \
-	".*syntax error.*" \
-	"check invalid range 16"
-
-    # structure modes
-    # some tests are in chillvars.exp
-    # FIXME: no tag processing implemented do maybe adjust these tests
-    setup_xfail "*-*-*"
-    test_print_accept "ptype stru1m" \
-	"STRUCT \\(.*a long,.*b long,.*CASE b OF.*\\(42\\):.*ch1 CHARS\\(20\\),.*\\(52\\):.*ch2 CHARS\\(10\\).*ELSE.*ch3 CHARS\\(1\\).*ESAC.*\\)" \
-	"print mode of structure location 1"
-    test_print_accept "whatis strul1" "stru1m" \
-	"print mode name of structure location 1"
-    setup_xfail "*-*-*"
-    test_print_accept "print strul1" \
-	{\[\.a: -2147483648, \.b: 42, \.\(b\): \{\(42\) = \[\.ch1: \"12345678900987654321\"\], \(52\) = \[\.ch2: \"1234567890\"\], (else) = \[\.ch3: \"1\"\]\}\]} \
-	"print structure location 1"
-    test_print_accept "print strul1.a" \
-	"-2147483648" \
-	"print field of structure location 1"
-    test_print_accept "print strul1.b" "42" \
-	"print field of structure location 1"
-    test_print_accept "print strul1.ch1" \
-	"\"12345678900987654321\"" \
-	"print field of structure location 1"
-    # setup_xfail "*-*-*"
-    test_print_accept "print strul1.ch2" \
-	"\"1234567890\"" \
-	"print field of structure location 1"
-    # setup_xfail "*-*-*"
-    test_print_accept "print strul1.ch3" \
-	"\"1\"" \
-	"print field of structure location 1"
-    
-    if $passcount then {
-	pass "$passcount correct locations printed"
-    }
-}
-
-# This is chill/9434
-
-proc test_9434 {} {
-    global passcount
-
-    verbose "testing pr-9434"
-
-    test_print_accept "ptype m_xyzmode" "STRUCT \\(.*next REF m_xyzmode,.*i long.*\\)"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
-    test_modes
-    test_locations
-    test_9434
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "tests1"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     verbose "loading file '$binfile'"
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break dummyfunc\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n" 
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE #	First one is string to send_gdb to gdb
+# OBSOLETE #	Second one is string to match gdb result to
+# OBSOLETE #	Third one is an optional message to be printed
+# OBSOLETE 
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global passcount
+# OBSOLETE     global verbose
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE     } else {
+# OBSOLETE 	set message [lindex $args 0]
+# OBSOLETE     }
+# OBSOLETE     set sendthis [lindex $args 0]
+# OBSOLETE     set expectthis [lindex $args 1]
+# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE     if $result==0 {incr passcount}
+# OBSOLETE     return $result
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Testing printing of a specific value.  Increment passcount for
+# OBSOLETE # success or issue fail message for failure.  In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE 
+# OBSOLETE # various tests if modes are treated correctly
+# OBSOLETE # using ptype
+# OBSOLETE proc test_modes {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing chill modes"
+# OBSOLETE     set passcount 0
+# OBSOLETE 
+# OBSOLETE     # discrete modes
+# OBSOLETE     test_print_accept "ptype BYTE" "byte"
+# OBSOLETE     test_print_accept "ptype UBYTE" "ubyte"
+# OBSOLETE     test_print_accept "ptype INT" "int"
+# OBSOLETE     test_print_accept "ptype UINT" "uint"
+# OBSOLETE     test_print_accept "ptype LONG" "long"
+# OBSOLETE     test_print_accept "ptype ULONG" "ulong"
+# OBSOLETE     test_print_accept "ptype BOOL" "bool"
+# OBSOLETE     test_print_accept "ptype CHAR" "char"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype set1" "SET \[(\]aaa, bbb, ccc\[)\]" \
+# OBSOLETE 	"print unnumbered set mode"
+# OBSOLETE     test_print_accept "ptype nset1" "SET \[(\]na = 1, nb = 34, nc = 20\[)\]" \
+# OBSOLETE 	"print numbered set mode"
+# OBSOLETE 
+# OBSOLETE     # mp:
+# OBSOLETE     # display maybe in hex values ?
+# OBSOLETE     #
+# OBSOLETE     test_print_accept "ptype r11" "ubyte \\(0:255\\)" \
+# OBSOLETE 	"print ubyte range mode"
+# OBSOLETE     test_print_accept "ptype r12" "uint \\(0:65535\\)" \
+# OBSOLETE 	"print uint range mode"
+# OBSOLETE #    test_print_accept "ptype r13" "ulong \\(0:4294967295\\)" \
+# OBSOLETE #	"print ulong range mode"
+# OBSOLETE     test_print_accept "ptype r14" "byte \\(-128:127\\)" \
+# OBSOLETE 	"print byte range mode"
+# OBSOLETE     test_print_accept "ptype r15" "int \\(-32768:32767\\)" \
+# OBSOLETE 	"print int range mode"
+# OBSOLETE     test_print_accept "ptype r16" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE 	"print long range mode"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype r2" "set1 \\(bbb:ccc\\)" \
+# OBSOLETE 	"print unnumbered set range mode"
+# OBSOLETE     test_print_accept "ptype r3" "nset1 \\(na:na\\)" \
+# OBSOLETE 	"print numbered set range mode"
+# OBSOLETE     # really this order ?
+# OBSOLETE     # I'm not sure what should happen for the next two tests.
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype r4" "nset1 \\(nb = 34:nc = 20\\)" \
+# OBSOLETE 	"print numbered set range mode"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype r5" "nset1 \\(na = 1, nb = 34, nc = 20\\)" \
+# OBSOLETE 	"print numbered set range mode"
+# OBSOLETE 
+# OBSOLETE     # powerset modes
+# OBSOLETE     test_print_accept "ptype pm1" \
+# OBSOLETE 	"POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
+# OBSOLETE 	"print powerset mode 1"
+# OBSOLETE     test_print_accept "ptype pm2" "POWERSET byte \\(1:8\\)" \
+# OBSOLETE 	"print powerset mode 2"
+# OBSOLETE     test_print_accept "ptype pm3" "POWERSET int \\(-32768:32767\\)" \
+# OBSOLETE 	"print powerset mode 3"
+# OBSOLETE     test_print_accept "ptype pm4" "POWERSET long \\(-32768:32768\\)" \
+# OBSOLETE 	"print powerset mode 4"
+# OBSOLETE     test_print_accept "ptype pm5" \
+# OBSOLETE 	"POWERSET long \\(-2147483648:2147483647\\)" \
+# OBSOLETE 	"print powerset mode 5"
+# OBSOLETE     
+# OBSOLETE     # reference modes
+# OBSOLETE     test_print_accept "ptype ref1" "REF pm1" \
+# OBSOLETE 	"print reference to powerset mode"
+# OBSOLETE     test_print_accept "ptype ref2" "REF byte" \
+# OBSOLETE 	"print reference to byte"
+# OBSOLETE     test_print_accept "ptype ref3" "PTR" \
+# OBSOLETE 	"print free reference type"
+# OBSOLETE 
+# OBSOLETE     # procedure modes
+# OBSOLETE     # FIXME: we have to talk about this ... 
+# OBSOLETE     test_print_accept "ptype prm1" \
+# OBSOLETE 	"REF PROC \[(\]\[)\]" \
+# OBSOLETE 	"print procedure mode 1"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype prm2" \
+# OBSOLETE 	"REF PROC \[(\]bool in, int out long inout\[)\] RETURNS \[(\]char\[)\]" \
+# OBSOLETE 	"print procedure mode 2"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype prm3" \
+# OBSOLETE 	"REF PROC \[(\]pm1, ref loc\[)\] RETURNS \[(\]ref3\[)\]" \
+# OBSOLETE 	"print procedure mode 3"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype prm4" \
+# OBSOLETE 	"\[(\] \[)\] EXCEPTIONS \[(\]ex1, ex2, ex3\[)\]" \
+# OBSOLETE 	"print procedure mode 4"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype prm5" \
+# OBSOLETE 	"REF PROC \[(\]r11, r16 inout, r5 out\[)\] RETURNS \[(\]r2\[)\] EXCEPTIONS \[(\]ex1\[)\]" \
+# OBSOLETE 	"print procedure mode 5"
+# OBSOLETE 
+# OBSOLETE     # synchronization modes
+# OBSOLETE     # FIXME: since gdb doesn't process events & buffers so far, this has be 
+# OBSOLETE     #        filled later...
+# OBSOLETE     xfail "synchronization mode handling"
+# OBSOLETE 
+# OBSOLETE     # timing modes
+# OBSOLETE     test_print_accept "ptype DURATION" "duration"
+# OBSOLETE     test_print_accept "ptype TIME" "time"
+# OBSOLETE 
+# OBSOLETE     # string modes
+# OBSOLETE     # some tests are done in chillvars.exp
+# OBSOLETE     test_print_accept "ptype strm1" "CHARS \\(5\\)" "print char string mode"
+# OBSOLETE     test_print_accept "ptype strm2" "CHARS \[(\]7\[)\] VARYING" \
+# OBSOLETE 	"print varying char string mode"
+# OBSOLETE     test_print_accept "ptype bstr1" "BOOLS \\(20\\)" "print bit string mode"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype B'000'" "BOOLS \\(3\\)" "bit string literal"
+# OBSOLETE     test_print_accept "ptype B'11110000'" "BOOLS \\(8\\)" "bit string literal"
+# OBSOLETE     # FIXME: adjust error message
+# OBSOLETE     gdb_test "ptype B'00110211'" {.*Too-large digit.*[.]} \
+# OBSOLETE 	"reject invalid bitstring"
+# OBSOLETE 
+# OBSOLETE     # array modes
+# OBSOLETE     # some tests are done in chillvars.exp
+# OBSOLETE     test_print_accept "ptype arr1m" "ARRAY \\(1:100\\) set1" \
+# OBSOLETE 	"print array mode 1"
+# OBSOLETE     test_print_accept "ptype arr2m" "ARRAY \\(1:100\\) ARRAY \\(1:100\\) set1"\
+# OBSOLETE 	"print array mode 2"
+# OBSOLETE     test_print_accept "ptype arr3m" "ARRAY \\(0:255\\) ARRAY \\(0:65535\\) ARRAY \\(-128:127\\) set1" \
+# OBSOLETE 	"print array mode 3"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype arr4m" "ARRAY \\(b:c\\) ARRAY \\(na = 1:na = 1\\) ARRAY \\(nc:nb\\) ARRAY \\(na = 1:nc = 20\\) POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
+# OBSOLETE 	"print array mode 4"
+# OBSOLETE     
+# OBSOLETE     # structure modes
+# OBSOLETE     # some checks are in chillvars.exp
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype stru1m" "STRUCT \\(.*a long,.*b long,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\).*ELSE.*ch3 CHARS \\(1\\).*ESAC.*\\)" \
+# OBSOLETE 	"print structure mode 1"
+# OBSOLETE     #setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype stru2m" "STRUCT \\(.*f set1,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\) VARYING.*ELSE.*ch3 CHARS \\(0\\) VARYING.*ESAC.*\\)" \
+# OBSOLETE 	"print structure mode 2"
+# OBSOLETE     #setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype stru3m" "STRUCT \\(.*f r3,.*CASE OF.*:.*ch1 CHARS \\(20\\).*ESAC.*\\)" \
+# OBSOLETE 	"print structure mode 3"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype stru4m" "STRUCT \\(.*i long,.*CASE OF.*:.*i1 int,.*i11 int,.*b1 bool,.*c1 char.*:.*i2 long,.*i22 long,.*bs2 BOOLS \\(10\\).*:.*s3 STRUCT \\(.*i3 int,.*CASE OF.*:.*foo long.*ELSE.*bar char.*ESAC.*\\).*ELSE.*x stru2m.*ESAC,.*y stru3m.*\\)" \
+# OBSOLETE 	"print structure mode 4"
+# OBSOLETE    
+# OBSOLETE     
+# OBSOLETE     if $passcount then {
+# OBSOLETE 	pass "$passcount correct modes printed"
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # various tests if locations are treated correctly
+# OBSOLETE # read access using ptype, print, whatis
+# OBSOLETE proc test_locations {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     set passcount 0
+# OBSOLETE     verbose "testing read access to locations"
+# OBSOLETE     # various location tests can be found in chillvars.exp
+# OBSOLETE 
+# OBSOLETE     # set locations
+# OBSOLETE     test_print_accept "ptype s1l" "SET \\(aaa, bbb, ccc\\)" \
+# OBSOLETE 	"print mode of set location"
+# OBSOLETE     test_print_accept "whatis s1l" "set1" \
+# OBSOLETE 	"print modename of set location"
+# OBSOLETE     test_print_accept "print s1l" "ccc" "print set location"
+# OBSOLETE     test_print_accept "ptype s2l" "SET \\(na = 1, nb = 34, nc = 20\\)" \
+# OBSOLETE 	"print mode of numbered set location"
+# OBSOLETE     test_print_accept "whatis s2l" "nset1" \
+# OBSOLETE 	"print mode name of numbered set location"
+# OBSOLETE     test_print_accept "print s2l" "nb" "print numberes set location"
+# OBSOLETE 
+# OBSOLETE     # range modes
+# OBSOLETE     test_print_accept "ptype rl1" "ubyte \\(0:255\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl1" "r11" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl1" "3" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl2" "ubyte \\(0:255\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl2" "r11" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl2" "0" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl3" "ubyte \\(0:255\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl3" "r11" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl3" "255" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl5" "uint \\(0:65535\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl5" "r12" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl5" "65530" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl6" "uint \\(0:65535\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl6" "r12" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl6" "0" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 	
+# OBSOLETE     test_print_accept "ptype rl7" "uint \\(0:65535\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl7" "r12" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl7" "65535" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 	
+# OBSOLETE #     test_print_accept "ptype rl9" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # 	"print mode of range location"
+# OBSOLETE #     test_print_accept "whatis rl9" "r13" \
+# OBSOLETE # 	"print mode name of range location"
+# OBSOLETE #     test_print_accept "print rl9" "128" \
+# OBSOLETE # 	"print range location"
+# OBSOLETE 	
+# OBSOLETE #     test_print_accept "ptype rl10" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # 	"print mode of range location"
+# OBSOLETE #     test_print_accept "whatis rl10" "r13" \
+# OBSOLETE # 	"print mode name of range location"
+# OBSOLETE #     test_print_accept "print rl10" "0" \
+# OBSOLETE # 	"print range location"
+# OBSOLETE 	
+# OBSOLETE #     test_print_accept "ptype rl11" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # 	"print mode of range location"
+# OBSOLETE #     test_print_accept "whatis rl11" "r13" \
+# OBSOLETE # 	"print mode name of range location"
+# OBSOLETE #     test_print_accept "print rl11" "4294967295" \
+# OBSOLETE # 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl13" "byte \\(-128:127\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl13" "r14" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl13" "-121" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl14" "byte \\(-128:127\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl14" "r14" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl14" "-128" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl15" "byte \\(-128:127\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl15" "r14" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl15" "127" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl17" "int \\(-32768:32767\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl17" "r15" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl17" "-32720" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl18" "int \\(-32768:32767\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl18" "r15" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl18" "-32768" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl19" "int \\(-32768:32767\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl19" "r15" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl19" "32767" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl21" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl21" "r16" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl21" "2147483643" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl22" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl22" "r16" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl22" "-2147483648" \
+# OBSOLETE 	"print range location"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype rl23" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE 	"print mode of range location"
+# OBSOLETE     test_print_accept "whatis rl23" "r16" \
+# OBSOLETE 	"print mode name of range location"
+# OBSOLETE     test_print_accept "print rl23" "2147483647" \
+# OBSOLETE 	"print range location"
+# OBSOLETE     
+# OBSOLETE     # powerset locations
+# OBSOLETE     test_print_accept "ptype pl1" \
+# OBSOLETE 	"POWERSET SET \\(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\\)" \
+# OBSOLETE 	"print mode of powerset location 1"
+# OBSOLETE     test_print_accept "whatis pl1" "pm1" \
+# OBSOLETE 	"print mode mode name of powerset location"
+# OBSOLETE     test_print_accept "print pl1" \
+# OBSOLETE 	"\[\[\]p1:p10\[\]\]" \
+# OBSOLETE 	"print powerset location 1"
+# OBSOLETE     test_print_accept "print pl2" {\[\]} \
+# OBSOLETE 	"print powerset location 2"
+# OBSOLETE     test_print_accept "print pl3" "\[\[\]p1, p10\[\]\]" \
+# OBSOLETE     	"print powerset location 3"
+# OBSOLETE     test_print_accept "print pl4" {\[p1:p2, p4:p6, p8:p10\]} \
+# OBSOLETE 	"print powerset location 4"
+# OBSOLETE     test_print_accept "print pl5" {\[p1:p4, p6, p8:p10\]} \
+# OBSOLETE 	"print powerset location 5"
+# OBSOLETE     test_print_accept "print pl6" {\[p1, p3:p8, p10\]} \
+# OBSOLETE 	"print powerset location 6"
+# OBSOLETE     
+# OBSOLETE     test_print_accept "ptype pl7" \
+# OBSOLETE 	"POWERSET byte \\(1:8\\)" \
+# OBSOLETE 	"print mode of byte powerset location"
+# OBSOLETE     test_print_accept "whatis pl7" "pm2" \
+# OBSOLETE 	"print modename of byte powerset location"
+# OBSOLETE     test_print_accept "print pl7" {\[1:8\]} \
+# OBSOLETE 	"print powerset location 7"
+# OBSOLETE     
+# OBSOLETE     test_print_accept "ptype pl8" \
+# OBSOLETE 	"POWERSET int \\(-32768:32767\\)" \
+# OBSOLETE 	"print mode of int powerset location"
+# OBSOLETE     test_print_accept "whatis pl8" "pm3" \
+# OBSOLETE 	"print modename of int powerset location"
+# OBSOLETE     test_print_accept "print pl8" {\[-32768:32767\]} \
+# OBSOLETE 	"print powerset location 8"
+# OBSOLETE     
+# OBSOLETE #    test_print_accept "ptype pl9" \
+# OBSOLETE #	"POWERSET long \\(-2147483648:2147483647\\)" \
+# OBSOLETE #	"print mode of long powerset location"
+# OBSOLETE #    test_print_accept "whatis pl9" "pm5" \
+# OBSOLETE #	"print modename of long powerset location"
+# OBSOLETE #    test_print_accept "print pl9" {\[-2147483648:2147483647\]} \
+# OBSOLETE #	"print powerset location 9"
+# OBSOLETE     
+# OBSOLETE     # reference modes
+# OBSOLETE     test_print_accept "ptype ref3l" "PTR" "print mode of reference location"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "whatis ref3l" "ref3" \
+# OBSOLETE 	"print modename of reference location"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print ref3l" "ref3\\(H'.*\\)" \
+# OBSOLETE 	"print reference location"
+# OBSOLETE     test_print_accept "ptype ref4l" "PTR" "print mode of reference location"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "whatis ref4l" "ref4" \
+# OBSOLETE 	"print modename of reference location"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print ref4l" "ref4\\(H'.*\\)" \
+# OBSOLETE 	"print reference location"
+# OBSOLETE     test_print_accept "ptype ref5l" "PTR" "print mode of reference location"
+# OBSOLETE     test_print_accept "whatis ref5l" "PTR" \
+# OBSOLETE 	"print modename of reference location"
+# OBSOLETE     test_print_accept "print ref5l" "PTR\\(H'.*\\)" \
+# OBSOLETE 	"print reference location"
+# OBSOLETE 
+# OBSOLETE     # dereference a little bit..
+# OBSOLETE     test_print_accept "print ref6l->syn_int" "42" \
+# OBSOLETE 	"dereference reference to synmode location"
+# OBSOLETE     test_print_accept "print ref7l->int" "-42" \
+# OBSOLETE 	"dereference reference to predefined mode location"
+# OBSOLETE     test_print_accept "print ref8l->pm1" \
+# OBSOLETE 	"\[\[\]p1:p10\[\]\]" \
+# OBSOLETE 	"dereference reference to newmode location"
+# OBSOLETE 
+# OBSOLETE     # synchronization mode locations
+# OBSOLETE     # FIXME: synchronization modes are not supported so far...
+# OBSOLETE     xfail "no synchronization mode location support, not implemented yet"
+# OBSOLETE     
+# OBSOLETE     # timing mode locations
+# OBSOLETE     # FIXME: callbacks to abstime, inttime not implemented
+# OBSOLETE     xfail "timing modes not implemented properly yet"
+# OBSOLETE 
+# OBSOLETE     # char string locations
+# OBSOLETE     # some tests are don in chillvars.exp
+# OBSOLETE     test_print_accept "ptype strl1" \
+# OBSOLETE 	"CHARS \\(7\\) VARYING" \
+# OBSOLETE 	"print varying string location"
+# OBSOLETE     test_print_accept "whatis strl1" "strm2" \
+# OBSOLETE 	"print string locationa mode name"
+# OBSOLETE     test_print_accept "print strl1" \
+# OBSOLETE 	{\"hansi\^\(0\)\"} \
+# OBSOLETE 	"print string location"
+# OBSOLETE     # string elements
+# OBSOLETE     test_print_accept "print strl1(0)" "\'h\'" \
+# OBSOLETE 	"print string element 1"
+# OBSOLETE     test_print_accept "print strl1(5)" {'\^[(]0[)]'} \
+# OBSOLETE 	"print string element 2"
+# OBSOLETE     test_print_accept "print strl1(3)" "\'s\'" \
+# OBSOLETE 	"print string element 3"
+# OBSOLETE     test_print_accept "ptype strl1(0)" "char" \
+# OBSOLETE 	"print mode of string element"
+# OBSOLETE     # slices
+# OBSOLETE     test_print_accept "print strl1(3:4)" "\"si\"" \
+# OBSOLETE 	"print string slice 1"
+# OBSOLETE     test_print_accept "print strl1(0:5)" \
+# OBSOLETE 	{\"hansi\^\(0\)\"} \
+# OBSOLETE 	"print string slice 2"
+# OBSOLETE     test_print_accept "print strl1(0:0)" "\"h\"" \
+# OBSOLETE 	"print string slice 3"
+# OBSOLETE     test_print_accept "print strl1(0 up 6)" \
+# OBSOLETE 	{\"hansi\^\(0\)\"} \
+# OBSOLETE 	"print string slice 4"
+# OBSOLETE     # FIXME: adjust error message, when implented
+# OBSOLETE     gdb_test "print strl1(6 up 1)" \
+# OBSOLETE 	".*slice.*out of range.*" \
+# OBSOLETE 	"print invalid string slice length"
+# OBSOLETE     gdb_test "print strl1(-1 up 5)" \
+# OBSOLETE 	".*slice.*out of range.*" \
+# OBSOLETE 	"print invalid string slice length"
+# OBSOLETE     gdb_test "print strl1(-1:5)" \
+# OBSOLETE 	".*slice.*out of range.*" \
+# OBSOLETE 	"print invalid string slice"
+# OBSOLETE     gdb_test "print strl1(-1:7)" \
+# OBSOLETE 	".*slice.*out of range.*" \
+# OBSOLETE 	"print invalid string slice"
+# OBSOLETE     gdb_test "print strl1(0 up -1)" \
+# OBSOLETE 	".*slice.*out of range.*" \
+# OBSOLETE 	"print invalid string slice length"
+# OBSOLETE     gdb_test "print strl1(0 up 0)" {""}
+# OBSOLETE     
+# OBSOLETE     # bitstring locations
+# OBSOLETE     test_print_accept "ptype bstr1" \
+# OBSOLETE 	"BOOLS \\(20\\)" \
+# OBSOLETE 	"print mode of bitstring location"
+# OBSOLETE     test_print_accept "whatis bstrl1" "bstr1" \
+# OBSOLETE 	"print mode name of bitstring location"
+# OBSOLETE     test_print_accept "print bstrl1" \
+# OBSOLETE 	"B'10101010101010101010'" \
+# OBSOLETE 	"print bitstring location"
+# OBSOLETE     
+# OBSOLETE     test_print_accept "ptype bstrl1(0)" "bool|BOOL" \
+# OBSOLETE 	"print mode of bitstring element"
+# OBSOLETE     test_print_accept "print bstrl1(0)" "TRUE" \
+# OBSOLETE 	"print bitstring element 1"
+# OBSOLETE     test_print_accept "print bstrl1(19)" "FALSE" \
+# OBSOLETE 	"print bitstring element 2"
+# OBSOLETE     test_print_accept "print bstrl1(10)" "TRUE" \
+# OBSOLETE 	"print bitstring element 3"
+# OBSOLETE     
+# OBSOLETE     test_print_accept "print bstrl1(0:19)" \
+# OBSOLETE 	"B'10101010101010101010'" \
+# OBSOLETE 	"print bitstring location slice 1"
+# OBSOLETE     test_print_accept "print bstrl1(0:0)" \
+# OBSOLETE 	"B'1'" \
+# OBSOLETE 	"print bitstring location slice 2"
+# OBSOLETE     test_print_accept "print bstrl1(3:9)" \
+# OBSOLETE 	"B'0101010'" \
+# OBSOLETE 	"print bitstring location slice 3"
+# OBSOLETE     test_print_accept "print bstrl1(0 up 20)" \
+# OBSOLETE 	"B'10101010101010101010'" \
+# OBSOLETE 	"print bitstring location slice 4"
+# OBSOLETE     test_print_accept "print bstrl1(19 up 1)" \
+# OBSOLETE 	"B'0'" \
+# OBSOLETE 	"print bitstring location slice 5"
+# OBSOLETE     gdb_test "print bstrl1(20 up 1)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"print invalid bitstring slice (20 up 1)"
+# OBSOLETE     gdb_test "print bstrl1(-4:5)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"print invalid bitstring slice (-4:5)"
+# OBSOLETE     gdb_test "print bstrl1(-1:up 1)" \
+# OBSOLETE 	".*invalid expression syntax.*" \
+# OBSOLETE 	"print invalid bitstring slice (-1:ip 1)"
+# OBSOLETE     gdb_test "print bstrl1(-1:20)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"print invalid bitstring slice (-1:20)"
+# OBSOLETE     gdb_test "print bstrl1(0 up -1)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"print invalid bitstring slice (0 up -1)"
+# OBSOLETE     test_print_accept "print bstrl1(4 up 0)" "B''"
+# OBSOLETE     
+# OBSOLETE     # array mode locations
+# OBSOLETE     gdb_test_exact "ptype arrl1" \
+# OBSOLETE 	"ARRAY (1:100) set1" \
+# OBSOLETE 	"print mode of array location"
+# OBSOLETE     gdb_test "whatis arrl1" "arr1m" \
+# OBSOLETE 	"print mode name of array location"
+# OBSOLETE     gdb_test_exact "print arrl1" {[(1:100): aaa]} \
+# OBSOLETE 	"print array location"
+# OBSOLETE     test_print_accept "ptype arrl1(1)" \
+# OBSOLETE 	"SET \\(aaa, bbb, ccc\\)" \
+# OBSOLETE 	"print mode of array element"
+# OBSOLETE     gdb_test_exact "print arrl3" \
+# OBSOLETE 	{[(1:5): [(1:3): [(1:2): -2147483648]]]} \
+# OBSOLETE 	"print array location 2"
+# OBSOLETE     gdb_test_exact "print arrl3(1)" \
+# OBSOLETE 	{[(1:3): [(1:2): -2147483648]]} \
+# OBSOLETE 	"print array location 3"
+# OBSOLETE     gdb_test_exact "ptype arrl3(1)" \
+# OBSOLETE 	{ARRAY (1:3) ARRAY (1:2) long} \
+# OBSOLETE 	"print mode of array element"
+# OBSOLETE     test_print_accept "print arrl3(5)" \
+# OBSOLETE 	{\[\(1:3\): \[\(1:2\): -2147483648\]\]} \
+# OBSOLETE 	"print array location 4"
+# OBSOLETE     test_print_accept "print arrl3(1,1)" \
+# OBSOLETE 	{\[\(1:2\): -2147483648\]} \
+# OBSOLETE 	"print array location 5"
+# OBSOLETE     test_print_accept "ptype arrl3(1,1)" \
+# OBSOLETE 	{ARRAY \(1:2\) long} \
+# OBSOLETE 	"print mode of array element"
+# OBSOLETE     test_print_accept "print arrl3(5,3)" \
+# OBSOLETE 	{\[\(1:2\): -2147483648\]} \
+# OBSOLETE 	"print array location 6"
+# OBSOLETE     test_print_accept "print arrl3(1,1,1)" \
+# OBSOLETE 	"-2147483648" \
+# OBSOLETE 	"print array location 7"
+# OBSOLETE     test_print_accept "print arrl3(5,3,2)" \
+# OBSOLETE 	"-2147483648" \
+# OBSOLETE 	"print array location 8"
+# OBSOLETE     test_print_accept "print arrl3(1)(3)(2)" \
+# OBSOLETE 	"-2147483648" \
+# OBSOLETE 	"print array location 9"
+# OBSOLETE 
+# OBSOLETE     # reject the following range fails
+# OBSOLETE     # FIXME: adjust error messages
+# OBSOLETE     gdb_test "print arrl3(-1)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 1"
+# OBSOLETE     gdb_test "print arrl3(6)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 2"
+# OBSOLETE     gdb_test "print arrl3(0,0)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 3"
+# OBSOLETE     gdb_test "print arrl3(1,0)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 4"
+# OBSOLETE     gdb_test "print arrl3(1,4)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 5"
+# OBSOLETE     gdb_test "print arrl3(6,4)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 6"
+# OBSOLETE     gdb_test "print arrl3(1,1,0)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 7"
+# OBSOLETE     gdb_test "print arrl3(6,4,0)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 8"
+# OBSOLETE     gdb_test "print arrl3(1,1,3)" \
+# OBSOLETE 	".*out of range.*" \
+# OBSOLETE 	"check invalid array indices 9"
+# OBSOLETE 
+# OBSOLETE     gdb_test "print arrl3(0)(0)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 10"
+# OBSOLETE     gdb_test "print arrl3(1)(0)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 11"
+# OBSOLETE     gdb_test "print arrl3(1)(4)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 12"
+# OBSOLETE     gdb_test "print arrl3(6)(4)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 13"
+# OBSOLETE     gdb_test "print arrl3(1)(1)(0)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 14"
+# OBSOLETE     gdb_test "print arrl3(6)(4)(0)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 15"
+# OBSOLETE     gdb_test "print arrl3(1)(1)(3)" \
+# OBSOLETE 	".* array or string index out of range.*" \
+# OBSOLETE 	"check invalid array indices 16"
+# OBSOLETE     
+# OBSOLETE     # slices
+# OBSOLETE     test_print_accept "print arrl4(1:3)" \
+# OBSOLETE 	{\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\]\]} \
+# OBSOLETE 	"print array slice 1"
+# OBSOLETE     test_print_accept "ptype arrl4(1:3)" \
+# OBSOLETE 	{ARRAY \(1:3\) ARRAY \(1:3\) ARRAY \(1:2\) long} \
+# OBSOLETE 	"print mode of array slice"
+# OBSOLETE # The next one is bogus:
+# OBSOLETE #    test_print_accept "print arrl4(5, 2:3, 1)" \
+# OBSOLETE #	# FIXME: maybe the '(1): ' in the inner tupel should be omitted ? \
+# OBSOLETE #	{\[(2): \[\(1\): 100\], \(3\):\[\(1\): 100\]\]} \
+# OBSOLETE #	"print array slice 2"
+# OBSOLETE     test_print_accept "print arrl4(1 up 4)" \
+# OBSOLETE 	{\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\], \(4\): \[\(1:3\): \[\(1:2\): -2147483648\]\]\]} \
+# OBSOLETE 	"print array slice 3"
+# OBSOLETE # The next two are bogus:
+# OBSOLETE #    test_print_accept "print arrl4(3, 2 up 1)" \
+# OBSOLETE #	{\[\(2:3\): \[\(1:2\): 100\]\]} \
+# OBSOLETE #	"print array slice 4"
+# OBSOLETE #    test_print_accept "print arrl4(1:2, 1 up 1, 2)" \
+# OBSOLETE #	{\[\(1\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\], \(2\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\]\]} \
+# OBSOLETE #	"print array slice 4"
+# OBSOLETE     # reject invalid slices
+# OBSOLETE     # FIXME: adjust error messages
+# OBSOLETE     gdb_test "print arrl4(5:6)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 1"
+# OBSOLETE     gdb_test "print arrl4(0:1)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 2"
+# OBSOLETE     gdb_test "print arrl4(0:6)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 3"
+# OBSOLETE     gdb_test "print arrl4(3:2)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 4"
+# OBSOLETE     gdb_test "print arrl4(1,3:4)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 5"
+# OBSOLETE     gdb_test "print arrl4(1,0:1)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 6"
+# OBSOLETE     gdb_test "print arrl4(1,0:4)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 7"
+# OBSOLETE     gdb_test "print arrl4(1,3:2)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 8"
+# OBSOLETE     gdb_test "print arrl4(5 up 2)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 9"
+# OBSOLETE     gdb_test "print arrl4(-1 up 1)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 10"
+# OBSOLETE     gdb_test "print arrl4(-1 up 7)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 11"
+# OBSOLETE     gdb_test "print arrl4(1 up 0)" \
+# OBSOLETE 	".*slice out of range.*" \
+# OBSOLETE 	"check invalid range 12"
+# OBSOLETE     gdb_test "print arrl4(1,3 up 1)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 13"
+# OBSOLETE     gdb_test "print arrl4(1,-1 up 1)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 14"
+# OBSOLETE     gdb_test "print arrl4(1,-1 up 5)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 15"
+# OBSOLETE     gdb_test "print arrl4(1,2 up 0)" \
+# OBSOLETE 	".*syntax error.*" \
+# OBSOLETE 	"check invalid range 16"
+# OBSOLETE 
+# OBSOLETE     # structure modes
+# OBSOLETE     # some tests are in chillvars.exp
+# OBSOLETE     # FIXME: no tag processing implemented do maybe adjust these tests
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "ptype stru1m" \
+# OBSOLETE 	"STRUCT \\(.*a long,.*b long,.*CASE b OF.*\\(42\\):.*ch1 CHARS\\(20\\),.*\\(52\\):.*ch2 CHARS\\(10\\).*ELSE.*ch3 CHARS\\(1\\).*ESAC.*\\)" \
+# OBSOLETE 	"print mode of structure location 1"
+# OBSOLETE     test_print_accept "whatis strul1" "stru1m" \
+# OBSOLETE 	"print mode name of structure location 1"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print strul1" \
+# OBSOLETE 	{\[\.a: -2147483648, \.b: 42, \.\(b\): \{\(42\) = \[\.ch1: \"12345678900987654321\"\], \(52\) = \[\.ch2: \"1234567890\"\], (else) = \[\.ch3: \"1\"\]\}\]} \
+# OBSOLETE 	"print structure location 1"
+# OBSOLETE     test_print_accept "print strul1.a" \
+# OBSOLETE 	"-2147483648" \
+# OBSOLETE 	"print field of structure location 1"
+# OBSOLETE     test_print_accept "print strul1.b" "42" \
+# OBSOLETE 	"print field of structure location 1"
+# OBSOLETE     test_print_accept "print strul1.ch1" \
+# OBSOLETE 	"\"12345678900987654321\"" \
+# OBSOLETE 	"print field of structure location 1"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print strul1.ch2" \
+# OBSOLETE 	"\"1234567890\"" \
+# OBSOLETE 	"print field of structure location 1"
+# OBSOLETE     # setup_xfail "*-*-*"
+# OBSOLETE     test_print_accept "print strul1.ch3" \
+# OBSOLETE 	"\"1\"" \
+# OBSOLETE 	"print field of structure location 1"
+# OBSOLETE     
+# OBSOLETE     if $passcount then {
+# OBSOLETE 	pass "$passcount correct locations printed"
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # This is chill/9434
+# OBSOLETE 
+# OBSOLETE proc test_9434 {} {
+# OBSOLETE     global passcount
+# OBSOLETE 
+# OBSOLETE     verbose "testing pr-9434"
+# OBSOLETE 
+# OBSOLETE     test_print_accept "ptype m_xyzmode" "STRUCT \\(.*next REF m_xyzmode,.*i long.*\\)"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     test_modes
+# OBSOLETE     test_locations
+# OBSOLETE     test_9434
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/tests2.exp b/gdb/testsuite/gdb.chill/tests2.exp
index 1e47e81..a8df589 100644
--- a/gdb/testsuite/gdb.chill/tests2.exp
+++ b/gdb/testsuite/gdb.chill/tests2.exp
@@ -1,271 +1,271 @@
-# Copyright 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set prms_id 0
-set bug_id 0
-
-# Set the current language to chill.  This counts as a test.  If it
-# fails, then we skip the other tests.
-
-set testfile "tests2"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-global infinity
-if [istarget "i*86-*-sysv4*"] then {
-    set infinity "inf"
-} else {
-    set infinity "Infinity"
-}
-
-proc set_lang_chill {} {
-    global gdb_prompt
-    global binfile objdir subdir
-
-    if ![file exists $objdir/$subdir/$binfile] then {
-	return 0
-    }
-    verbose "loading file '$objdir/$subdir/$binfile'"
-    gdb_load $objdir/$subdir/$binfile
-
-    send_gdb "set language chill\n"
-    gdb_expect {
-	-re ".*$gdb_prompt $" {}
-	timeout { fail "set language chill (timeout)" ; return 0 }
-    }
-
-    send_gdb "show language\n"
-    gdb_expect {
-	-re ".* source language is \"chill\".*$gdb_prompt $" {
-	    pass "set language to \"chill\""
-	    send_gdb "break dummyfunc\n"
-	    gdb_expect {
-		-re ".*$gdb_prompt $" {
-		    send_gdb "run\n"
-		    gdb_expect -re ".*$gdb_prompt $" {}
-		    return 1
-		}
-		timeout {
-		    fail "can't set breakpoint (timeout)"
-		    return 0
-		}
-	    }
-	}
-	-re ".*$gdb_prompt $" {
-	    fail "setting language to \"chill\""
-	    return 0
-	}
-	timeout {
-	    fail "can't show language (timeout)"
-	    return 0
-	}
-    }
-}
-
-# checks if structure was accessed correctly
-proc test_write { args } {
-    global gdb_prompt
-
-    if [llength $args]==5 then {
-	set message [lindex $args 4]
-	set extended [lindex $args 3]
-	set matchval [lindex $args 2]
-    } elseif [llength $args]==4 then {
-	set message [lindex $args 3]
-	set matchval [lindex $args 2]
-	set extended ""
-    } elseif [llength $args]==3 then {
-	set message [lindex $args 2]
-	set extended ""
-    } else {
-	warning "test ($args) write called with wrong number of arguments"
-	return 
-    }
-
-    set location [lindex $args 0]
-    set value [lindex $args 1]
-    if ![info exists matchval] then {
-	set matchval $value
-    }
-    verbose "loc: $location, val: $value, msg: $message, ext: $extended, match: $matchval"
-
-    verbose "setting var $value..."
-    send_gdb "set var $location.m$extended := $value\n"
-    gdb_expect -re ".*$gdb_prompt $" {}
-    gdb_test "print $location" \
-      ".*= \[\[\]\\.p1: 2863311530, \\.m: $matchval, \\.p2: 1431655765\[\]\]"\
-      "$message"
-}
-
-# test write access from gdb (setvar x:=y) from gdb
-proc write_access { } {
-    global infinity
-
-    verbose "testing write access to locations"
-    
-    # discrete modes
-    test_write b1 127 "byte write 1"
-    test_write b1 -128 "byte write 2"
-    test_write b1 0 "byte write 3"
-    test_write ub1 255 "ubyte write 1"
-    test_write ub1 0 "ubyte write 2"
-    test_write ub1 42 "ubyte write 3"
-    test_write i1 32767 "int write 1"
-    test_write i1 -32768 "int write 2"
-    test_write i1 0 "int write 3"
-    test_write ui1 65535 "uint write 1"
-    test_write ui1 0 "uint write 2"
-    test_write ui1 123 "uint write 3"
-    test_write l1 2147483647 "long write 1"
-    test_write l1 -2147483648 "long write 2"
-    test_write l1 0 "long write 3"
-    test_write ul1 4294967295 "ulong write 1"
-    test_write ul1 0 "ulong write 2"
-    test_write ul1 1000000 "ulong write 3"
-    test_write bo1 FALSE "bool write 1"
-    test_write bo1 TRUE "bool write 2"
-    test_write c1 \"1234\" "char write 1"
-    test_write c2 \"1234567\" "char write 2"
-    test_write c3 \"654321\" "char write 3"
-    test_write c4 C'65' 'e' "char write 4"
-    test_write bi1 B'10100101' "bitstring write 1"
-    test_write bi2 B'0101001010' "bitstring write 2"
-    test_write se1 a "set write 1"
-    test_write se1 h "set write 2"
-    # The following two use numbered sets with too-large values.
-    setup_xfail "*-*-*"
-    test_write nse1 nb "numbered set write 1"
-    setup_xfail "*-*-*"
-    test_write nse1 nc "numbered set write 2"
-    test_write r1 127 "range write 1"
-    test_write r2 32767 "range write 2"
-    test_write r3 2147483647 "range write 3"
-
-    # powerset modes
-    test_write p1 {[pa:ph]} {\[pa:ph\]} "powerset write 1"
-    test_write p1 {[pa, pc:pf, ph]} {\[pa, pc:pf, ph\]} "powerset write 2"
-    test_write p1 {[pa, pc, pe, pg]} {\[pa, pc, pe, pg\]} "powerset write 3"
-    test_write p1 {[]} {\[\]} "powerset write 4"
-    test_write p2 {[1:32]} {\[1:32\]} "powerset write 5"
-    test_write p2 {[1, 3:30, 32]} {\[1, 3:30, 32\]} "powerset write 6"
-    test_write p2 {[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]} {\[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31\]} \
-	"powerset write 7"
-    test_write p2 {[]} {\[\]} "powerset write 8"
-
-# Fixme: this should be rejected by gnuchill
-#    test_write p3 {[-2147483648:2147483647]} {\[-2147483648:2147483647\]} \
-#	"powerset write 9"
-#    test_write p3 {[-2147483648, -1000000:1000000, 2147483647]} \
-#	{\[-2147483648, -1000000:1000000, 2147483647\]} \
-#	"powerset write 10"
-#    test_write p3 {[-99, -97, -95, 1001, 1003, 1005]} \
-#	{\[-99, -97, -95, 1001, 1003, 1005\]} "powerset write 11"
-#    test_write p3 {[]} {\[\]} "powerset write 12"
-    
-    # reference modes
-    test_write ref1 ->ref1 {H'[0-9a-fA-F]+} "reference write 1"
-    test_write ref2 ->b1 {H'[0-9a-fA-F]+} "reference write 2"
-    test_write ref1 NULL "reference write 3"
-    test_write ref2 NULL "reference write 4"
-
-    # procedure modes
-    test_write pr1 NULL "procefure write 1"
-    # FIXME: remove when NULL is understood
-    test_write pr1 0 NULL "procefure write 2"
-    test_write pr1 dummyfunc {H'[0-9a-fA-F]+ <dummyfunc>} "procedure write 3"
-
-    # timing modes, FIXME when callbacks to timefunctions are implemented
-    #test_write ti1 abstime(1970, 3, 12, 10, 43, 0) {} "time write 1"
-    #test_write ti2 <set somehow a duration>
-    xfail "timing modes not implemented yet"
-    
-    # real modes
-    # This ones 
-    test_write re1 42.03 {42.0[0-9]*} "real write 1"
-    test_write re1 0 "real write 2"
-    test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \
-	"real write 3"
-    setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
-    test_write re1 "1e+39" $infinity "real write 4"
-    test_write re2 42.03 {42.0[0-9]*} "real write 5"
-    test_write re2 0 "real write 6"
-    test_write re2 "1e+308" {1e\+308} "real write 7"
-    setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
-    test_write re2 "1e+309" $infinity "real write 8"
-    # array modes
-    test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\
-	"array write 1"
-    test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
-	"array write 2"
-    test_write arrl1 {[(1): [(1:2): 127], (2): [(1:2): -128], (3): [(1:2): 127]]} {\[\(1\): \[\(1:2\): 127\], \(2\): \[\(1:2\): -128\], \(3\): \[\(1:2\): 127\]\]}\
-	"array write 3"
-     test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
- 	"array write 4"
-     setup_xfail "*-*-*"
-     # Bogus test case - type mismatch?
-     test_write arrl1 {[(1): 127, (2): -128]} "array write 5"
-     test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
- 	"array write 6"
-
-    # structure modes
-    test_write strul1 {[.a: -32768, .b: 32767, .ch: "ZZZZ"]} \
-	{\[\.a: -32768, \.b: 32767, \.ch: \"ZZZZ\"\]} \
-	"structure write 1"
-    test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
-	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
-	"structure write 2"
-    test_write strul1 -32768 {\[\.a: -32768, \.b: 0, \.ch: \"0000\"\]} \
-	{.a} "structure write 3"
-    test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
-	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
-	"structure write 4"
-    test_write strul1 -32768 {\[\.a: 0, \.b: -32768, \.ch: \"0000\"\]} \
-	{.b} "structure write 5"
-    test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
-	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
-	"structure write 6"
-    test_write strul1 \"HUGO\" {\[\.a: 0, \.b: 0, \.ch: \"HUGO\"\]} \
-	{.ch} "structure write 7"
-}
-
-# Start with a fresh gdb.
-
-set binfile "tests2.exe"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
-    write_access
-} else {
-    warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE 
+# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE 
+# OBSOLETE set testfile "tests2"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE global infinity
+# OBSOLETE if [istarget "i*86-*-sysv4*"] then {
+# OBSOLETE     set infinity "inf"
+# OBSOLETE } else {
+# OBSOLETE     set infinity "Infinity"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE     global binfile objdir subdir
+# OBSOLETE 
+# OBSOLETE     if ![file exists $objdir/$subdir/$binfile] then {
+# OBSOLETE 	return 0
+# OBSOLETE     }
+# OBSOLETE     verbose "loading file '$objdir/$subdir/$binfile'"
+# OBSOLETE     gdb_load $objdir/$subdir/$binfile
+# OBSOLETE 
+# OBSOLETE     send_gdb "set language chill\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".*$gdb_prompt $" {}
+# OBSOLETE 	timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     send_gdb "show language\n"
+# OBSOLETE     gdb_expect {
+# OBSOLETE 	-re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE 	    pass "set language to \"chill\""
+# OBSOLETE 	    send_gdb "break dummyfunc\n"
+# OBSOLETE 	    gdb_expect {
+# OBSOLETE 		-re ".*$gdb_prompt $" {
+# OBSOLETE 		    send_gdb "run\n"
+# OBSOLETE 		    gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE 		    return 1
+# OBSOLETE 		}
+# OBSOLETE 		timeout {
+# OBSOLETE 		    fail "can't set breakpoint (timeout)"
+# OBSOLETE 		    return 0
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	}
+# OBSOLETE 	-re ".*$gdb_prompt $" {
+# OBSOLETE 	    fail "setting language to \"chill\""
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE 	timeout {
+# OBSOLETE 	    fail "can't show language (timeout)"
+# OBSOLETE 	    return 0
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # checks if structure was accessed correctly
+# OBSOLETE proc test_write { args } {
+# OBSOLETE     global gdb_prompt
+# OBSOLETE 
+# OBSOLETE     if [llength $args]==5 then {
+# OBSOLETE 	set message [lindex $args 4]
+# OBSOLETE 	set extended [lindex $args 3]
+# OBSOLETE 	set matchval [lindex $args 2]
+# OBSOLETE     } elseif [llength $args]==4 then {
+# OBSOLETE 	set message [lindex $args 3]
+# OBSOLETE 	set matchval [lindex $args 2]
+# OBSOLETE 	set extended ""
+# OBSOLETE     } elseif [llength $args]==3 then {
+# OBSOLETE 	set message [lindex $args 2]
+# OBSOLETE 	set extended ""
+# OBSOLETE     } else {
+# OBSOLETE 	warning "test ($args) write called with wrong number of arguments"
+# OBSOLETE 	return 
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE     set location [lindex $args 0]
+# OBSOLETE     set value [lindex $args 1]
+# OBSOLETE     if ![info exists matchval] then {
+# OBSOLETE 	set matchval $value
+# OBSOLETE     }
+# OBSOLETE     verbose "loc: $location, val: $value, msg: $message, ext: $extended, match: $matchval"
+# OBSOLETE 
+# OBSOLETE     verbose "setting var $value..."
+# OBSOLETE     send_gdb "set var $location.m$extended := $value\n"
+# OBSOLETE     gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE     gdb_test "print $location" \
+# OBSOLETE       ".*= \[\[\]\\.p1: 2863311530, \\.m: $matchval, \\.p2: 1431655765\[\]\]"\
+# OBSOLETE       "$message"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # test write access from gdb (setvar x:=y) from gdb
+# OBSOLETE proc write_access { } {
+# OBSOLETE     global infinity
+# OBSOLETE 
+# OBSOLETE     verbose "testing write access to locations"
+# OBSOLETE     
+# OBSOLETE     # discrete modes
+# OBSOLETE     test_write b1 127 "byte write 1"
+# OBSOLETE     test_write b1 -128 "byte write 2"
+# OBSOLETE     test_write b1 0 "byte write 3"
+# OBSOLETE     test_write ub1 255 "ubyte write 1"
+# OBSOLETE     test_write ub1 0 "ubyte write 2"
+# OBSOLETE     test_write ub1 42 "ubyte write 3"
+# OBSOLETE     test_write i1 32767 "int write 1"
+# OBSOLETE     test_write i1 -32768 "int write 2"
+# OBSOLETE     test_write i1 0 "int write 3"
+# OBSOLETE     test_write ui1 65535 "uint write 1"
+# OBSOLETE     test_write ui1 0 "uint write 2"
+# OBSOLETE     test_write ui1 123 "uint write 3"
+# OBSOLETE     test_write l1 2147483647 "long write 1"
+# OBSOLETE     test_write l1 -2147483648 "long write 2"
+# OBSOLETE     test_write l1 0 "long write 3"
+# OBSOLETE     test_write ul1 4294967295 "ulong write 1"
+# OBSOLETE     test_write ul1 0 "ulong write 2"
+# OBSOLETE     test_write ul1 1000000 "ulong write 3"
+# OBSOLETE     test_write bo1 FALSE "bool write 1"
+# OBSOLETE     test_write bo1 TRUE "bool write 2"
+# OBSOLETE     test_write c1 \"1234\" "char write 1"
+# OBSOLETE     test_write c2 \"1234567\" "char write 2"
+# OBSOLETE     test_write c3 \"654321\" "char write 3"
+# OBSOLETE     test_write c4 C'65' 'e' "char write 4"
+# OBSOLETE     test_write bi1 B'10100101' "bitstring write 1"
+# OBSOLETE     test_write bi2 B'0101001010' "bitstring write 2"
+# OBSOLETE     test_write se1 a "set write 1"
+# OBSOLETE     test_write se1 h "set write 2"
+# OBSOLETE     # The following two use numbered sets with too-large values.
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_write nse1 nb "numbered set write 1"
+# OBSOLETE     setup_xfail "*-*-*"
+# OBSOLETE     test_write nse1 nc "numbered set write 2"
+# OBSOLETE     test_write r1 127 "range write 1"
+# OBSOLETE     test_write r2 32767 "range write 2"
+# OBSOLETE     test_write r3 2147483647 "range write 3"
+# OBSOLETE 
+# OBSOLETE     # powerset modes
+# OBSOLETE     test_write p1 {[pa:ph]} {\[pa:ph\]} "powerset write 1"
+# OBSOLETE     test_write p1 {[pa, pc:pf, ph]} {\[pa, pc:pf, ph\]} "powerset write 2"
+# OBSOLETE     test_write p1 {[pa, pc, pe, pg]} {\[pa, pc, pe, pg\]} "powerset write 3"
+# OBSOLETE     test_write p1 {[]} {\[\]} "powerset write 4"
+# OBSOLETE     test_write p2 {[1:32]} {\[1:32\]} "powerset write 5"
+# OBSOLETE     test_write p2 {[1, 3:30, 32]} {\[1, 3:30, 32\]} "powerset write 6"
+# OBSOLETE     test_write p2 {[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]} {\[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31\]} \
+# OBSOLETE 	"powerset write 7"
+# OBSOLETE     test_write p2 {[]} {\[\]} "powerset write 8"
+# OBSOLETE 
+# OBSOLETE # Fixme: this should be rejected by gnuchill
+# OBSOLETE #    test_write p3 {[-2147483648:2147483647]} {\[-2147483648:2147483647\]} \
+# OBSOLETE #	"powerset write 9"
+# OBSOLETE #    test_write p3 {[-2147483648, -1000000:1000000, 2147483647]} \
+# OBSOLETE #	{\[-2147483648, -1000000:1000000, 2147483647\]} \
+# OBSOLETE #	"powerset write 10"
+# OBSOLETE #    test_write p3 {[-99, -97, -95, 1001, 1003, 1005]} \
+# OBSOLETE #	{\[-99, -97, -95, 1001, 1003, 1005\]} "powerset write 11"
+# OBSOLETE #    test_write p3 {[]} {\[\]} "powerset write 12"
+# OBSOLETE     
+# OBSOLETE     # reference modes
+# OBSOLETE     test_write ref1 ->ref1 {H'[0-9a-fA-F]+} "reference write 1"
+# OBSOLETE     test_write ref2 ->b1 {H'[0-9a-fA-F]+} "reference write 2"
+# OBSOLETE     test_write ref1 NULL "reference write 3"
+# OBSOLETE     test_write ref2 NULL "reference write 4"
+# OBSOLETE 
+# OBSOLETE     # procedure modes
+# OBSOLETE     test_write pr1 NULL "procefure write 1"
+# OBSOLETE     # FIXME: remove when NULL is understood
+# OBSOLETE     test_write pr1 0 NULL "procefure write 2"
+# OBSOLETE     test_write pr1 dummyfunc {H'[0-9a-fA-F]+ <dummyfunc>} "procedure write 3"
+# OBSOLETE 
+# OBSOLETE     # timing modes, FIXME when callbacks to timefunctions are implemented
+# OBSOLETE     #test_write ti1 abstime(1970, 3, 12, 10, 43, 0) {} "time write 1"
+# OBSOLETE     #test_write ti2 <set somehow a duration>
+# OBSOLETE     xfail "timing modes not implemented yet"
+# OBSOLETE     
+# OBSOLETE     # real modes
+# OBSOLETE     # This ones 
+# OBSOLETE     test_write re1 42.03 {42.0[0-9]*} "real write 1"
+# OBSOLETE     test_write re1 0 "real write 2"
+# OBSOLETE     test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \
+# OBSOLETE 	"real write 3"
+# OBSOLETE     setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
+# OBSOLETE     test_write re1 "1e+39" $infinity "real write 4"
+# OBSOLETE     test_write re2 42.03 {42.0[0-9]*} "real write 5"
+# OBSOLETE     test_write re2 0 "real write 6"
+# OBSOLETE     test_write re2 "1e+308" {1e\+308} "real write 7"
+# OBSOLETE     setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
+# OBSOLETE     test_write re2 "1e+309" $infinity "real write 8"
+# OBSOLETE     # array modes
+# OBSOLETE     test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\
+# OBSOLETE 	"array write 1"
+# OBSOLETE     test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE 	"array write 2"
+# OBSOLETE     test_write arrl1 {[(1): [(1:2): 127], (2): [(1:2): -128], (3): [(1:2): 127]]} {\[\(1\): \[\(1:2\): 127\], \(2\): \[\(1:2\): -128\], \(3\): \[\(1:2\): 127\]\]}\
+# OBSOLETE 	"array write 3"
+# OBSOLETE      test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE  	"array write 4"
+# OBSOLETE      setup_xfail "*-*-*"
+# OBSOLETE      # Bogus test case - type mismatch?
+# OBSOLETE      test_write arrl1 {[(1): 127, (2): -128]} "array write 5"
+# OBSOLETE      test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE  	"array write 6"
+# OBSOLETE 
+# OBSOLETE     # structure modes
+# OBSOLETE     test_write strul1 {[.a: -32768, .b: 32767, .ch: "ZZZZ"]} \
+# OBSOLETE 	{\[\.a: -32768, \.b: 32767, \.ch: \"ZZZZ\"\]} \
+# OBSOLETE 	"structure write 1"
+# OBSOLETE     test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE 	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE 	"structure write 2"
+# OBSOLETE     test_write strul1 -32768 {\[\.a: -32768, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE 	{.a} "structure write 3"
+# OBSOLETE     test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE 	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE 	"structure write 4"
+# OBSOLETE     test_write strul1 -32768 {\[\.a: 0, \.b: -32768, \.ch: \"0000\"\]} \
+# OBSOLETE 	{.b} "structure write 5"
+# OBSOLETE     test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE 	{\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE 	"structure write 6"
+# OBSOLETE     test_write strul1 \"HUGO\" {\[\.a: 0, \.b: 0, \.ch: \"HUGO\"\]} \
+# OBSOLETE 	{.ch} "structure write 7"
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE set binfile "tests2.exe"
+# OBSOLETE 
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE 
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE 
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE     write_access
+# OBSOLETE } else {
+# OBSOLETE     warning "$test_name tests suppressed."
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/tuples.exp b/gdb/testsuite/gdb.chill/tuples.exp
index 0efea79..ba08539 100644
--- a/gdb/testsuite/gdb.chill/tuples.exp
+++ b/gdb/testsuite/gdb.chill/tuples.exp
@@ -1,161 +1,161 @@
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "tuples"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    runto tuples.ch:40
-
-    gdb_test_exact "print v_arri" {= [(1): -1, (2): -2, (3): -3, (4): -4, (5): -5]}
-    gdb_test_exact "set v_arri := \[ 33, 44, 55, 66, 77 \]" {}
-    gdb_test_exact "print v_arri" {= [(1): 33, (2): 44, (3): 55, (4): 66, (5): 77]} "after assignment 1 to v_arri"
-    gdb_test_exact "set v_arri := \[-33, -44, -55, -66, -77\]" {}
-    gdb_test_exact "print v_arri" {= [(1): -33, (2): -44, (3): -55, (4): -66, (5): -77]} {after assignment 2 to v_arri}
-
-    gdb_test_exact "print v_arrui" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
-    gdb_test_exact "set v_arrui := \[ 11, 11, 11, 11, 11 \]" {}
-    gdb_test_exact "print v_arrui" {= [(1:5): 11]} "after assignment to v_arrui"
-
-    gdb_test_exact "print v_arrb" {= [(1): -3, (2): -4, (3): -5, (4): -6, (5): -7]}
-
-    gdb_test_exact "set v_arrb := \[ -9, -8, -7, -6, -5 \]" {}
-    gdb_test_exact "print v_arrb" {= [(1): -9, (2): -8, (3): -7, (4): -6, (5): -5]} "after assignment to v_arrb"
-
-    gdb_test_exact "print v_arrub" {= [(1): 3, (2): 4, (3): 5, (4): 6, (5): 7]}
-    gdb_test_exact "set v_arrub := \[ 77, 77, 77, 77, 77 \]" {}
-    gdb_test_exact "print v_arrub" {= [(1:5): 77]} "v_arrub after assignment"
-
-    gdb_test_exact "print j" {= 4}
-    gdb_test_exact "print j := 3+4" {= 7}
-    gdb_test_exact "print j := r1(3)" {= 3}
-
-    gdb_test_exact "print v_arrc" {= [(1): '1', (2): '2', (3): '3', (4): '4', (5): '5']}
-    gdb_test_exact "set v_arrc := \[ 'a', 'b', 'c', 'd', 'e' \]" {}
-    gdb_test_exact "print v_arrc" {= [(1): 'a', (2): 'b', (3): 'c', (4): 'd', (5): 'e']} "v_arrc after assignment"
-
-    gdb_test_exact "print v_ps" {= [1, 3, 5]}
-    gdb_test_exact "set v_ps := \[ 2, 4 \]" {}
-    gdb_test_exact "print v_ps" {= [2, 4]} {v_ps after assignment}
-    gdb_test_exact "print v_ps :=  \[\]" {= []} {assign [] to v_ps}
-
-    gdb_test_exact "print m_arri\[1, 2, 3, 4, 5\]" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
-    gdb_test_exact "print m_arrub\[45, 46, 47, 48, 49\]" {= [(1): 45, (2): 46, (3): 47, (4): 48, (5): 49]}
-
-   gdb_test_exact "print v_cv" {= "foo"}
-   gdb_test_exact "set v_cv := \"foo-bar\"" {}
-   gdb_test_exact "print v_cv" {= "foo-bar"} "v_cv after assignment"
-   gdb_test_exact "set v_cv(3) := ' '" {}
-   gdb_test_exact "print v_cv" {= "foo bar"} "v_cv after element assignment"
-
-   gdb_test_exact "print v_arrbool" {= [(1): TRUE, (2): FALSE, (3): TRUE, (4): FALSE, (5): TRUE]}
-   gdb_test_exact "set v_arrbool := \[ false, false, false, false, false \]" {}
-   gdb_test_exact "print v_arrbool" {= [(1:5): FALSE]} "v_arrbool after assignment 1"
-   gdb_test_exact "set v_arrbool := \[true, true, true, true, true\]" {}
-   gdb_test_exact "print v_arrbool" {= [(1:5): TRUE]} "v_arrbool after assignment 2"
-   gdb_test_exact "set v_arrbool(3) := false" {}
-   gdb_test_exact "print v_arrbool" {= [(1:2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after element assignment"
-
-   gdb_test_exact "set v_arrbool(1 up 2) := \[ false, true \]" {}
-   gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after slice assignment 1"
-   gdb_test_exact "set v_arrbool(3 : 5) := \[ true, true, false \]" {}
-   gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2"
-
-   gdb_test_exact "set vstr := \[ .a: 2+3, .b: 12, .ch1: 'x' \]" {}
-   gdb_test_exact "print vstr.a" {= 5} "vstr.a after assignment"
-   gdb_test_exact "print vstr.ch1" {= 'x'} "vstr.ch1 after assignment"
-
-#   These tests are from Cygnus PR chill/5024:
-    gdb_test "break printdow" ""
-    gdb_test "continue" ""
-    gdb_test_exact "set var w:= dow\[monday\]" {}
-    gdb_test "print w" " = \\\[monday\\\]" \
-	"print bitstring after assignment"
-    gdb_test_exact "set var w:=\[\]" {}
-    gdb_test "print w" " = \\\[\\\]" \
-	"print bitstring after assignment of \[\]"
-
-#   These tests are from Cygnus PR chill/8643:
-    runto tuples.ch:40
-    gdb_test_exact "set var vs1 := \[ \"foo\", 41, \[ b \] \]"  {}
-    gdb_test_exact "print vs1" { = [.str: "foo", .i: 41, .ps: [b]]} \
-	"print vs1 after tuple assign 1"
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact "set var vs1 := \[ \"bar\", 42, m_ps\[ a \] \]" {}
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact "print vs1" { = [.str: "bar", .i: 42, .ps: [a]]} \
-	"print vs1 after tuple assign 2"
-
-    gdb_test_exact "set var \$i := m_s1\[\"foo\", 42, \[a \]\]" {}
-    gdb_test_exact {print $i} { = [.str: "foo", .i: 42, .ps: [a]]} \
-	"print \$i after tuple assign 1"
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact "set var \$i := m_s1\[\"foo\", 44, m_ps\[a \]\]" {}
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact {print $i} { = [.str: "foo", .i: 44, .ps: [a]]} \
-	"print \$i after tuple assign 2"
-
-    gdb_test_exact "set var vs2 := \[ 10, \[ \"foo\" , 42, \[ b \] \] \]" {}
-    gdb_test_exact "print vs2" \
-	{ = [.i: 10, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
-	"print vs2 after tuple assign 1"
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact "set var vs2 := \[ 10+3, m_s1\[ \"foo\" , 42, m_ps\[ b \] \] \]" {}
-    setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
-    gdb_test_exact "print vs2" \
-	{ = [.i: 13, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
-	"print vs2 after tuple assign 2"
-
-    gdb_test_exact "set var vs3 := \[ 33, \[ -1, -2, -3 \] \]" {}
-    gdb_test_exact "print vs3" {[.i: 33, .a: [(1): -1, (2): -2, (3): -3]]} \
-	"print vs3 after tuple assign"
-    gdb_test_exact "set var \$k := m_s3\[ 33, m_arr\[ 4, 3, 2 \] \]" {}
-    gdb_test_exact {print $k} { = [.i: 33, .a: [(1): 4, (2): 3, (3): 2]]} \
-	"print \$k after tuple assign"
-
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile "tuples"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     runto tuples.ch:40
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_arri" {= [(1): -1, (2): -2, (3): -3, (4): -4, (5): -5]}
+# OBSOLETE     gdb_test_exact "set v_arri := \[ 33, 44, 55, 66, 77 \]" {}
+# OBSOLETE     gdb_test_exact "print v_arri" {= [(1): 33, (2): 44, (3): 55, (4): 66, (5): 77]} "after assignment 1 to v_arri"
+# OBSOLETE     gdb_test_exact "set v_arri := \[-33, -44, -55, -66, -77\]" {}
+# OBSOLETE     gdb_test_exact "print v_arri" {= [(1): -33, (2): -44, (3): -55, (4): -66, (5): -77]} {after assignment 2 to v_arri}
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_arrui" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
+# OBSOLETE     gdb_test_exact "set v_arrui := \[ 11, 11, 11, 11, 11 \]" {}
+# OBSOLETE     gdb_test_exact "print v_arrui" {= [(1:5): 11]} "after assignment to v_arrui"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_arrb" {= [(1): -3, (2): -4, (3): -5, (4): -6, (5): -7]}
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "set v_arrb := \[ -9, -8, -7, -6, -5 \]" {}
+# OBSOLETE     gdb_test_exact "print v_arrb" {= [(1): -9, (2): -8, (3): -7, (4): -6, (5): -5]} "after assignment to v_arrb"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_arrub" {= [(1): 3, (2): 4, (3): 5, (4): 6, (5): 7]}
+# OBSOLETE     gdb_test_exact "set v_arrub := \[ 77, 77, 77, 77, 77 \]" {}
+# OBSOLETE     gdb_test_exact "print v_arrub" {= [(1:5): 77]} "v_arrub after assignment"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print j" {= 4}
+# OBSOLETE     gdb_test_exact "print j := 3+4" {= 7}
+# OBSOLETE     gdb_test_exact "print j := r1(3)" {= 3}
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_arrc" {= [(1): '1', (2): '2', (3): '3', (4): '4', (5): '5']}
+# OBSOLETE     gdb_test_exact "set v_arrc := \[ 'a', 'b', 'c', 'd', 'e' \]" {}
+# OBSOLETE     gdb_test_exact "print v_arrc" {= [(1): 'a', (2): 'b', (3): 'c', (4): 'd', (5): 'e']} "v_arrc after assignment"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print v_ps" {= [1, 3, 5]}
+# OBSOLETE     gdb_test_exact "set v_ps := \[ 2, 4 \]" {}
+# OBSOLETE     gdb_test_exact "print v_ps" {= [2, 4]} {v_ps after assignment}
+# OBSOLETE     gdb_test_exact "print v_ps :=  \[\]" {= []} {assign [] to v_ps}
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "print m_arri\[1, 2, 3, 4, 5\]" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
+# OBSOLETE     gdb_test_exact "print m_arrub\[45, 46, 47, 48, 49\]" {= [(1): 45, (2): 46, (3): 47, (4): 48, (5): 49]}
+# OBSOLETE 
+# OBSOLETE    gdb_test_exact "print v_cv" {= "foo"}
+# OBSOLETE    gdb_test_exact "set v_cv := \"foo-bar\"" {}
+# OBSOLETE    gdb_test_exact "print v_cv" {= "foo-bar"} "v_cv after assignment"
+# OBSOLETE    gdb_test_exact "set v_cv(3) := ' '" {}
+# OBSOLETE    gdb_test_exact "print v_cv" {= "foo bar"} "v_cv after element assignment"
+# OBSOLETE 
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1): TRUE, (2): FALSE, (3): TRUE, (4): FALSE, (5): TRUE]}
+# OBSOLETE    gdb_test_exact "set v_arrbool := \[ false, false, false, false, false \]" {}
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1:5): FALSE]} "v_arrbool after assignment 1"
+# OBSOLETE    gdb_test_exact "set v_arrbool := \[true, true, true, true, true\]" {}
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1:5): TRUE]} "v_arrbool after assignment 2"
+# OBSOLETE    gdb_test_exact "set v_arrbool(3) := false" {}
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1:2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after element assignment"
+# OBSOLETE 
+# OBSOLETE    gdb_test_exact "set v_arrbool(1 up 2) := \[ false, true \]" {}
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after slice assignment 1"
+# OBSOLETE    gdb_test_exact "set v_arrbool(3 : 5) := \[ true, true, false \]" {}
+# OBSOLETE    gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2"
+# OBSOLETE 
+# OBSOLETE    gdb_test_exact "set vstr := \[ .a: 2+3, .b: 12, .ch1: 'x' \]" {}
+# OBSOLETE    gdb_test_exact "print vstr.a" {= 5} "vstr.a after assignment"
+# OBSOLETE    gdb_test_exact "print vstr.ch1" {= 'x'} "vstr.ch1 after assignment"
+# OBSOLETE 
+# OBSOLETE #   These tests are from Cygnus PR chill/5024:
+# OBSOLETE     gdb_test "break printdow" ""
+# OBSOLETE     gdb_test "continue" ""
+# OBSOLETE     gdb_test_exact "set var w:= dow\[monday\]" {}
+# OBSOLETE     gdb_test "print w" " = \\\[monday\\\]" \
+# OBSOLETE 	"print bitstring after assignment"
+# OBSOLETE     gdb_test_exact "set var w:=\[\]" {}
+# OBSOLETE     gdb_test "print w" " = \\\[\\\]" \
+# OBSOLETE 	"print bitstring after assignment of \[\]"
+# OBSOLETE 
+# OBSOLETE #   These tests are from Cygnus PR chill/8643:
+# OBSOLETE     runto tuples.ch:40
+# OBSOLETE     gdb_test_exact "set var vs1 := \[ \"foo\", 41, \[ b \] \]"  {}
+# OBSOLETE     gdb_test_exact "print vs1" { = [.str: "foo", .i: 41, .ps: [b]]} \
+# OBSOLETE 	"print vs1 after tuple assign 1"
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact "set var vs1 := \[ \"bar\", 42, m_ps\[ a \] \]" {}
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact "print vs1" { = [.str: "bar", .i: 42, .ps: [a]]} \
+# OBSOLETE 	"print vs1 after tuple assign 2"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "set var \$i := m_s1\[\"foo\", 42, \[a \]\]" {}
+# OBSOLETE     gdb_test_exact {print $i} { = [.str: "foo", .i: 42, .ps: [a]]} \
+# OBSOLETE 	"print \$i after tuple assign 1"
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact "set var \$i := m_s1\[\"foo\", 44, m_ps\[a \]\]" {}
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact {print $i} { = [.str: "foo", .i: 44, .ps: [a]]} \
+# OBSOLETE 	"print \$i after tuple assign 2"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "set var vs2 := \[ 10, \[ \"foo\" , 42, \[ b \] \] \]" {}
+# OBSOLETE     gdb_test_exact "print vs2" \
+# OBSOLETE 	{ = [.i: 10, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
+# OBSOLETE 	"print vs2 after tuple assign 1"
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact "set var vs2 := \[ 10+3, m_s1\[ \"foo\" , 42, m_ps\[ b \] \] \]" {}
+# OBSOLETE     setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE     gdb_test_exact "print vs2" \
+# OBSOLETE 	{ = [.i: 13, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
+# OBSOLETE 	"print vs2 after tuple assign 2"
+# OBSOLETE 
+# OBSOLETE     gdb_test_exact "set var vs3 := \[ 33, \[ -1, -2, -3 \] \]" {}
+# OBSOLETE     gdb_test_exact "print vs3" {[.i: 33, .a: [(1): -1, (2): -2, (3): -3]]} \
+# OBSOLETE 	"print vs3 after tuple assign"
+# OBSOLETE     gdb_test_exact "set var \$k := m_s3\[ 33, m_arr\[ 4, 3, 2 \] \]" {}
+# OBSOLETE     gdb_test_exact {print $k} { = [.i: 33, .a: [(1): 4, (2): 3, (3): 2]]} \
+# OBSOLETE 	"print \$k after tuple assign"
+# OBSOLETE 
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.chill/xstruct.exp b/gdb/testsuite/gdb.chill/xstruct.exp
index e64fcea..f70e6c8 100644
--- a/gdb/testsuite/gdb.chill/xstruct.exp
+++ b/gdb/testsuite/gdb.chill/xstruct.exp
@@ -1,66 +1,66 @@
-# Copyright 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
-	strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "xstruct-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
-    perror "Couldn't compile ${srcfile2}"
-    return -1
-}
-
-set testfile "xstruct"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
-}
-
-proc do_tests {} {
-    global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
-    set prms_id 0
-    set bug_id 0
-
-    # Start with a fresh gdb.
-
-    gdb_exit
-    gdb_start
-    gdb_reinitialize_dir $srcdir/$subdir
-    gdb_load $binfile
-
-    gdb_test "set language chill" ""
-
-    gdb_test "set var \$i := m_x\[\]" ""
-    gdb_test "print \$i" { = \[.i: 0, .ar: \[\(5:6\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]}
-
-    gdb_test "set var \$j := m_y\[\]" ""
-    gdb_test "print \$j" { = \[.i: 0, .ar: \[\(7:8\): \[\(9:10\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
+# OBSOLETE 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+# OBSOLETE 
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE 
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE 
+# OBSOLETE if $tracelevel then {
+# OBSOLETE 	strace $tracelevel
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE 
+# OBSOLETE set testfile2 "xstruct-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if  { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile2}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE set testfile "xstruct"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if  { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE     perror "Couldn't compile ${srcfile}"
+# OBSOLETE     return -1
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE proc do_tests {} {
+# OBSOLETE     global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE 
+# OBSOLETE     set prms_id 0
+# OBSOLETE     set bug_id 0
+# OBSOLETE 
+# OBSOLETE     # Start with a fresh gdb.
+# OBSOLETE 
+# OBSOLETE     gdb_exit
+# OBSOLETE     gdb_start
+# OBSOLETE     gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE     gdb_load $binfile
+# OBSOLETE 
+# OBSOLETE     gdb_test "set language chill" ""
+# OBSOLETE 
+# OBSOLETE     gdb_test "set var \$i := m_x\[\]" ""
+# OBSOLETE     gdb_test "print \$i" { = \[.i: 0, .ar: \[\(5:6\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]}
+# OBSOLETE 
+# OBSOLETE     gdb_test "set var \$j := m_y\[\]" ""
+# OBSOLETE     gdb_test "print \$j" { = \[.i: 0, .ar: \[\(7:8\): \[\(9:10\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]\]}
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE do_tests
diff --git a/gdb/testsuite/gdb.fortran/exprs.exp b/gdb/testsuite/gdb.fortran/exprs.exp
index cccc82a..6c9be34 100644
--- a/gdb/testsuite/gdb.fortran/exprs.exp
+++ b/gdb/testsuite/gdb.fortran/exprs.exp
@@ -17,7 +17,7 @@
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
 
-# This file was adapted from Chill tests by Stan Shebs (shebs@cygnus.com).
+# This file was adapted from (OBSOLETE) Chill tests by Stan Shebs (shebs@cygnus.com).
 
 if $tracelevel then {
 	strace $tracelevel
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index 13bec5d..175549c 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -17,7 +17,7 @@
 # Please email any bugs, comments, and/or additions to this file to:
 # bug-gdb@prep.ai.mit.edu
 
-# This file was adapted from Chill tests by Stan Shebs (shebs@cygnus.com).
+# This file was adapted from (OBSOLETE) Chill tests by Stan Shebs (shebs@cygnus.com).
 
 if $tracelevel then {
 	strace $tracelevel
diff --git a/gdb/testsuite/gdb.hp/configure b/gdb/testsuite/gdb.hp/configure
index e01b962..cb6e184 100755
--- a/gdb/testsuite/gdb.hp/configure
+++ b/gdb/testsuite/gdb.hp/configure
@@ -28,6 +28,7 @@
 program_transform_name=s,x,x,
 silent=
 site=
+sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -142,6 +143,7 @@
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
   --version               print the version of autoconf that created configure
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -312,6 +314,11 @@
   -site=* | --site=* | --sit=*)
     site="$ac_optarg" ;;
 
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$ac_optarg" ;;
+
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -477,12 +484,16 @@
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
   fi
+else
+  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -571,7 +582,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:575: checking host system type" >&5
+echo "configure:586: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -592,7 +603,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:596: checking target system type" >&5
+echo "configure:607: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -610,7 +621,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:614: checking build system type" >&5
+echo "configure:625: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -633,16 +644,7 @@
   program_prefix=${target_alias}-
 
 
-# Directories to use in all configurations.
-configdirs="gdb.aCC \
-	    gdb.base-hp \
-	    gdb.compat \
-	    gdb.defects \
-	    gdb.objdbg \
-	    gdb.threads-hp"
-
-# configure the subdirectories too
-subdirs="$configdirs"
+subdirs="gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg"
 
 
 trap '' 1 2 15
@@ -938,7 +940,7 @@
     esac
   done
 
-  for ac_config_dir in $configdirs; do
+  for ac_config_dir in gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg; do
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
diff --git a/gdb/testsuite/gdb.hp/configure.in b/gdb/testsuite/gdb.hp/configure.in
index dd84c34..3993d1c 100644
--- a/gdb/testsuite/gdb.hp/configure.in
+++ b/gdb/testsuite/gdb.hp/configure.in
@@ -12,6 +12,6 @@
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
 AC_CANONICAL_SYSTEM
 
-AC_CONFIG_SUBDIRS(gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg gdb.threads-hp)
+AC_CONFIG_SUBDIRS(gdb.aCC gdb.base-hp gdb.compat gdb.defects gdb.objdbg)
 
 AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in b/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
deleted file mode 100644
index 240b627..0000000
--- a/gdb/testsuite/gdb.hp/gdb.threads-hp/Makefile.in
+++ /dev/null
@@ -1,27 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = usrthbasic usrthcore usrthfork
-
-all:
-	@echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
-	-rm -f *~ *.o *.ci
-	-rm -f core $(EXECUTABLES)
-
-distclean maintainer-clean realclean: clean
-	-rm -f Makefile config.status config.log
-	-rm -f *-init.exp
-	-rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
-	$(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure
deleted file mode 100755
index 90fa755..0000000
--- a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure
+++ /dev/null
@@ -1,899 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.1 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12.1"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=usrthbasic.exp
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-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"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-CC=${CC-cc}
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../../.. $srcdir/`cd $srcdir;pwd`/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1 | grep ac_space` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in b/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
deleted file mode 100644
index 87fd81b..0000000
--- a/gdb/testsuite/gdb.hp/gdb.threads-hp/configure.in
+++ /dev/null
@@ -1,15 +0,0 @@
-dnl Process this file file with autoconf to produce a configure script.
-dnl This file is a shell script fragment that supplies the information
-dnl necessary to tailor a template configure script into the configure
-dnl script appropriate for this directory.  For more information, check
-dnl any existing configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(usrthbasic.exp)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../../..)
-AC_CANONICAL_SYSTEM
-
-AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.java/jv-print.exp b/gdb/testsuite/gdb.java/jv-print.exp
index fb5dad7..00da1f3 100644
--- a/gdb/testsuite/gdb.java/jv-print.exp
+++ b/gdb/testsuite/gdb.java/jv-print.exp
@@ -89,8 +89,8 @@
     global gdb_prompt
 
     test_print_reject "p 0x" 
-    gdb_test "p ''" "Empty character constant\\."
-    gdb_test "p '''" "Empty character constant\\."
+    gdb_test "p ''" "Empty character constant"
+    gdb_test "p '''" "Empty character constant"
     test_print_reject "p '\\'"
 
     # Note that this turns into "p '\\\'" at gdb's input.
diff --git a/gdb/testsuite/gdb.threads/print-threads.c b/gdb/testsuite/gdb.threads/print-threads.c
new file mode 100644
index 0000000..341ee0a
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/print-threads.c
@@ -0,0 +1,58 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
+
+int slow = 0;
+
+#define NUM 5
+
+int main() {
+    int res;
+    pthread_t threads[NUM];
+    void *thread_result;
+    int args[NUM];
+    int i;
+
+    for (i = 0; i < NUM; i++)
+      {
+	args[i] = i;
+	res = pthread_create(&threads[i], NULL, thread_function, (void *)&args[i]);
+      }
+
+    for (i = 0; i < NUM; i++)
+      res = pthread_join(threads[i], &thread_result);
+
+    printf ("Done\n");
+
+    if (slow)
+      sleep (4);
+
+    exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+    int my_number = *(int *)arg;
+    int rand_num;
+
+    printf ("Print 1, thread %d\n", my_number);
+    sleep (1);
+
+    if (slow)
+      {
+	printf ("Print 2, thread %d\n", my_number);
+	sleep (1);
+	printf ("Print 3, thread %d\n", my_number);
+	sleep (1);
+	printf ("Print 4, thread %d\n", my_number);
+	sleep (1);
+	printf ("Print 5, thread %d\n", my_number);
+	sleep (1);
+      }
+
+    printf("Bye from %d\n", my_number);
+    pthread_exit(NULL);
+}
+
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
new file mode 100644
index 0000000..09c3f8a
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -0,0 +1,156 @@
+# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.  
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Daniel Jacobowitz <drow@mvista.com>
+# (parts based on pthreads.exp by Fred Fish (fnf@cygnus.com).
+#
+# It tests miscellaneous actions with multiple threads, including
+# handling for thread exit.
+
+if $tracelevel then {
+	strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "print-threads"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# regexp for "horizontal" text (i.e. doesn't include newline or
+# carriage return)
+set horiz "\[^\n\r\]*"
+
+set built_binfile 0
+
+# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
+if [istarget "*-*-linux*"] then {
+    set possible_libs "-lpthread -lpthreads -lthread"
+} else {
+    set possible_libs "-lpthreads -lpthread -lthread"
+}
+
+set why_msg "unrecognized error"
+foreach lib $possible_libs {
+    set options "debug"
+    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "libs=$lib"
+    set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
+    switch -regexp -- $ccout {
+	".*no posix threads support.*" {
+	    set why_msg "missing threads include file"
+	    break
+	}
+	".*cannot open -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	".*Can't find library for -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	{^$} {
+	    pass "successfully compiled posix threads test case"
+	    set built_binfile 1
+	    break
+	}
+    }
+}
+if {$built_binfile == "0"} {
+    unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+    return -1
+}
+
+# Now we can proceed with the real testing.
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "set print sevenbit-strings" ""
+#gdb_test "set print address off" ""
+gdb_test "set width 0" ""
+
+# We'll need this when we send_gdb a ^C to GDB.  Need to do it before we
+# run the program and gdb starts saving and restoring tty states.
+# On Ultrix, we don't need it and it is really slow (because shell_escape
+# doesn't use vfork).
+if ![istarget "*-*-ultrix*"] then {
+    gdb_test "shell stty intr '^C'" ""
+}
+
+proc test_all_threads { name kill } {
+    global gdb_prompt
+
+    set i 0
+    set j 0
+    send_gdb "continue\n"
+    gdb_expect {
+	-re "Breakpoint \[0-9\]+, thread_function \\(arg=.*\\) at .*print-threads.c:\[0-9\]+.*$gdb_prompt" {
+	    set i [expr $i + 1]
+	    pass "Hit thread_function breakpoint, $i ($name)"
+	    send_gdb "continue\n"
+	    exp_continue
+	}
+	-re "Breakpoint \[0-9\]+, .* kill \\(.*\\) .*$gdb_prompt" {
+	    set j [expr $j + 1]
+	    if { $kill == 1 } {
+		pass "Hit kill breakpoint, $j ($name)"
+	    } else {
+		fail "Hit kill breakpoint, $j ($name) (unexpected)"
+	    }
+	    send_gdb "continue\n"
+	    exp_continue
+	}
+	-re "Program exited normally\\.\[\r\n\]+$gdb_prompt" {
+	    pass "program exited normally"
+	    if {$i == 5} {
+		pass "all threads ran once ($name)"
+	    } else {
+		fail "all threads ran once ($name) (total $i threads ran)"
+	    }
+	}
+	-re "$gdb_prompt" {
+	    fail "Running threads ($name) (unknown output)"
+	}
+	timeout {
+	    fail "Running threads ($name) (timeout)"
+	}
+    }
+}
+
+runto_main
+gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\."
+gdb_test "set var slow = 0" ""
+test_all_threads "fast" 0
+
+runto_main
+gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (2)"
+gdb_test "set var slow = 1" ""
+test_all_threads "slow" 0
+
+runto_main
+gdb_test "break thread_function" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*print-threads.c, line \[0-9\]*\\." "break thread_function (3)"
+gdb_test "set var slow = 1" "" "set var slow = 1 (2)"
+gdb_test "break kill" "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+"
+test_all_threads "slow with kill breakpoint" 1
+
+return 0
diff --git a/gdb/testsuite/gdb.threads/schedlock.c b/gdb/testsuite/gdb.threads/schedlock.c
new file mode 100644
index 0000000..df361d0
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/schedlock.c
@@ -0,0 +1,44 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+void *thread_function(void *arg); /* Pointer to function executed by each thread */
+
+#define NUM 5
+
+int args[NUM+1];
+
+int main() {
+    int res;
+    pthread_t threads[NUM];
+    void *thread_result;
+    int i;
+
+    for (i = 0; i < NUM; i++)
+      {
+	args[i] = 1;
+	res = pthread_create(&threads[i], NULL, thread_function, (void *)i);
+      }
+
+    /* schedlock.exp: last thread start.  */
+    args[i] = 1;
+    thread_function ((void *) i);
+
+    exit(EXIT_SUCCESS);
+}
+
+void *thread_function(void *arg) {
+    int my_number = (int) arg;
+    int *myp = &args[my_number];
+
+    /* Don't run forever.  Run just short of it :)  */
+    while (*myp > 0)
+      {
+	/* schedlock.exp: main loop.  */
+	(*myp) ++;
+      }
+
+    pthread_exit(NULL);
+}
+
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
new file mode 100644
index 0000000..ea2d8d3
--- /dev/null
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -0,0 +1,353 @@
+# Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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.  
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Daniel Jacobowitz <drow@mvista.com>
+# (parts based on pthreads.exp by Fred Fish (fnf@cygnus.com).
+#
+# This test covers the various forms of "set scheduler-locking".
+
+if $tracelevel then {
+	strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "schedlock"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+set built_binfile 0
+
+# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
+if [istarget "*-*-linux*"] then {
+    set possible_libs "-lpthread -lpthreads -lthread"
+} else {
+    set possible_libs "-lpthreads -lpthread -lthread"
+}
+
+set why_msg "unrecognized error"
+foreach lib $possible_libs {
+    set options "debug"
+    lappend options "incdir=${objdir}/${subdir}"
+    lappend options "libs=$lib"
+    set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
+    switch -regexp -- $ccout {
+	".*no posix threads support.*" {
+	    set why_msg "missing threads include file"
+	    break
+	}
+	".*cannot open -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	".*Can't find library for -lpthread.*" {
+	    set why_msg "missing runtime threads library"
+	}
+	{^$} {
+	    pass "successfully compiled posix threads test case"
+	    set built_binfile 1
+	    break
+	}
+    }
+}
+if {$built_binfile == "0"} {
+    unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+    return -1
+}
+
+# Now we can proceed with the real testing.
+
+proc get_args { } {
+  global list_count
+  global gdb_prompt
+
+  send_gdb "print args\n"
+  gdb_expect {
+    -re "\\\$\[0-9\]+ = {(\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+)}.*$gdb_prompt"
+      {
+	set list_count [expr $list_count + 1]
+	pass "listed args ($list_count)"
+	return [list $expect_out(1,string) $expect_out(2,string) $expect_out(3,string) $expect_out(4,string) $expect_out(5,string) $expect_out(6,string)]
+      }
+    -re "$gdb_prompt"
+      {
+	fail "listed args ($list_count) (unknown output)"
+      }
+    timeout
+      {
+	fail "listed args ($list_count) (timeout)"
+      }
+  }
+}
+
+proc stop_process { description } {
+  global gdb_prompt
+
+  # For this to work we must be sure to consume the "Continuing."
+  # message first, or GDB's signal handler may not be in place.
+  after 1000 {send_gdb "\003"}
+  gdb_expect {
+    -re "Program received signal SIGINT.*$gdb_prompt $"
+      {
+	pass $description
+      }
+    timeout
+      {
+	fail "$description (timeout)"
+      }
+  }
+}
+
+proc get_current_thread { description } {
+  global gdb_prompt
+
+  send_gdb "bt\n"
+  gdb_expect {
+    -re "thread_function \\(arg=0x(\[0-9\])\\).*$gdb_prompt $"
+      {
+	pass $description
+	return $expect_out(1,string)
+      }
+    -re "$gdb_prompt $"
+      {
+	fail "$description (unknown output)"
+      }
+    timeout
+      {
+	fail "$description (timeout)"
+      }
+  }
+}
+
+proc my_continue { msg } {
+  send_gdb "continue\n"
+  gdb_expect {
+    -re "Continuing"
+      { pass "continue ($msg)" }
+    timeout
+      { fail "continue ($msg) (timeout)" }
+  }
+
+  stop_process "stop all threads ($msg)"
+
+  # Make sure we're in one of the looping threads.
+  gdb_breakpoint [gdb_get_line_number "schedlock.exp: main loop"]
+  gdb_continue_to_breakpoint "return to loop ($msg)"
+  delete_breakpoints
+}
+
+proc step_ten_loops { msg } {
+    global gdb_prompt
+
+    for {set i 0} {[expr $i < 10]} {set i [expr $i + 1]} {
+	send_gdb "step\n"
+	set other_step 0
+	gdb_expect {
+	    -re ".*myp\\) \\+\\+;\[\r\n\]+$gdb_prompt $" {
+		pass "step to increment ($msg $i)"
+	    }
+	    -re "$gdb_prompt $" {
+		if {$other_step == 0} {
+		    set other_step 1
+		    send_gdb "step\n"
+		    exp_continue
+		} else {
+		    fail "step to increment ($msg $i)"
+		    # FIXME cascade?
+		}
+	    }
+	    timeout {
+		fail "step to increment ($msg $i) (timeout)"
+	    }
+	}
+    }
+}
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+# We'll need this when we send_gdb a ^C to GDB.  Need to do it before we
+# run the program and gdb starts saving and restoring tty states.
+# On Ultrix, we don't need it and it is really slow (because shell_escape
+# doesn't use vfork).
+if ![istarget "*-*-ultrix*"] then {
+    gdb_test "shell stty intr '^C'" ""
+}
+
+gdb_load ${binfile}
+
+gdb_test "set print sevenbit-strings" ""
+gdb_test "set width 0" ""
+
+runto_main
+
+# See if scheduler locking is available on this target.
+send_gdb "set scheduler-locking off\n"
+global gdb_prompt
+gdb_expect {
+  -re "Target .* cannot support this command"
+    {
+      unsupported "target does not support scheduler locking"
+      return
+    }
+  -re "$gdb_prompt $"
+    {
+      pass "scheduler locking set to none"
+    }
+  timeout
+    {
+      unsupported "target does not support scheduler locking (timeout)"
+      return
+    }
+}
+
+gdb_breakpoint [gdb_get_line_number "schedlock.exp: last thread start"]
+gdb_continue_to_breakpoint "all threads started"
+
+global list_count
+set list_count 0
+
+set start_args [get_args]
+
+# First make sure that all threads are alive.
+my_continue "initial"
+
+set cont_args [get_args]
+
+for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} {
+  if {[lindex $start_args $i] == [lindex $cont_args $i]} {
+    fail "thread $i ran (didn't run)"
+  } else {
+    pass "thread $i ran"
+  }
+}
+
+# We can't change threads, unfortunately, in current GDB.  Use
+# whichever we stopped in.
+set curthread [get_current_thread "find current thread (1)"]
+
+
+
+
+# Test stepping without scheduler locking.
+gdb_test "set scheduler-locking off"  ""
+
+step_ten_loops "unlocked"
+
+# Make sure we're still in the same thread.
+set newthread [get_current_thread "find current thread (2)"]
+if {$curthread == $newthread} {
+    pass "step without lock does not change thread"
+} else {
+    fail "step without lock does not change thread (switched to thread $newthread)"
+}
+
+set start_args $cont_args
+set cont_args [get_args]
+
+for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} {
+  if {[lindex $start_args $i] == [lindex $cont_args $i]} {
+    if {$i == $curthread} {
+      fail "current thread stepped (didn't run)"
+    } else {
+      fail "other thread $i ran (didn't run) (1)"
+    }
+  } else {
+    if {$i == $curthread} {
+	if {[lindex $start_args $i] == [expr [lindex $cont_args $i] - 10]} {
+	    pass "current thread stepped"
+	} else {
+	    fail "current thread stepped (wrong amount)"
+	}
+    } else {
+      pass "other thread $i ran (1)"
+    }
+  }
+}
+
+# Test continue with scheduler locking
+gdb_test "set scheduler-locking on"  ""
+
+my_continue "with lock"
+
+# Make sure we're still in the same thread.
+set newthread [get_current_thread "find current thread (3)"]
+if {$curthread == $newthread} {
+    pass "continue with lock does not change thread"
+} else {
+    fail "continue with lock does not change thread (switched to thread $newthread)"
+}
+
+set start_args $cont_args
+set cont_args [get_args]
+
+for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} {
+  if {[lindex $start_args $i] == [lindex $cont_args $i]} {
+    if {$i == $curthread} {
+      fail "current thread ran (didn't run)"
+    } else {
+      pass "other thread $i didn't run"
+    }
+  } else {
+    if {$i == $curthread} {
+      pass "current thread ran"
+    } else {
+      fail "other thread $i didn't run (ran)"
+    }
+  }
+}
+
+# Test stepping with scheduler locking
+step_ten_loops "locked"
+
+# Make sure we're still in the same thread.
+set newthread [get_current_thread "find current thread (2)"]
+if {$curthread == $newthread} {
+    pass "step with lock does not change thread"
+} else {
+    fail "step with lock does not change thread (switched to thread $newthread)"
+}
+
+set start_args $cont_args
+set cont_args [get_args]
+
+for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} {
+  if {[lindex $start_args $i] == [lindex $cont_args $i]} {
+    if {$i == $curthread} {
+      fail "current thread stepped locked (didn't run)"
+    } else {
+      pass "other thread $i didn't run (stepping)"
+    }
+  } else {
+    if {$i == $curthread} {
+	if {[lindex $start_args $i] == [expr [lindex $cont_args $i] - 10]} {
+	    pass "current thread stepped locked"
+	} else {
+	    fail "current thread stepped locked (wrong amount)"
+	}
+    } else {
+      fail "other thread $i didn't run (stepping) (ran)"
+    }
+  }
+}
+
+return 0
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d9285e8..b4a0b8a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -27,17 +27,17 @@
 load_lib libgloss.exp
 
 global GDB
-global CHILL_LIB
-global CHILL_RT0
+# OBSOLETE global CHILL_LIB
+# OBSOLETE global CHILL_RT0
 
-if ![info exists CHILL_LIB] {
-    set CHILL_LIB [findfile $base_dir/../../gcc/ch/runtime/libchill.a "$base_dir/../../gcc/ch/runtime/libchill.a" [transform -lchill]]
-}
-verbose "using CHILL_LIB = $CHILL_LIB" 2
-if ![info exists CHILL_RT0] {
-    set CHILL_RT0 [findfile $base_dir/../../gcc/ch/runtime/chillrt0.o "$base_dir/../../gcc/ch/runtime/chillrt0.o" ""]
-}
-verbose "using CHILL_RT0 = $CHILL_RT0" 2
+# OBSOLETE if ![info exists CHILL_LIB] {
+# OBSOLETE     set CHILL_LIB [findfile $base_dir/../../gcc/ch/runtime/libchill.a "$base_dir/../../gcc/ch/runtime/libchill.a" [transform -lchill]]
+# OBSOLETE }
+# OBSOLETE verbose "using CHILL_LIB = $CHILL_LIB" 2
+# OBSOLETE if ![info exists CHILL_RT0] {
+# OBSOLETE     set CHILL_RT0 [findfile $base_dir/../../gcc/ch/runtime/chillrt0.o "$base_dir/../../gcc/ch/runtime/chillrt0.o" ""]
+# OBSOLETE }
+# OBSOLETE verbose "using CHILL_RT0 = $CHILL_RT0" 2
 
 if [info exists TOOL_EXECUTABLE] {
     set GDB $TOOL_EXECUTABLE;
@@ -920,25 +920,25 @@
     return 0
 }
 
-# * For crosses, the CHILL runtime doesn't build because it can't find
-# setjmp.h, stdio.h, etc.
-# * For AIX (as of 16 Mar 95), (a) there is no language code for
-# CHILL in output_epilog in gcc/config/rs6000/rs6000.c, (b) collect2
-# does not get along with AIX's too-clever linker.
-# * On Irix5, there is a bug whereby set of bool, etc., don't get
-# TYPE_LOW_BOUND for the bool right because force_to_range_type doesn't
-# work with stub types.
-# Lots of things seem to fail on the PA, and since it's not a supported
-# chill target at the moment, don't run the chill tests.
+# OBSOLETE # * For crosses, the CHILL runtime doesn't build because it
+# OBSOLETE # can't find setjmp.h, stdio.h, etc.
+# OBSOLETE # * For AIX (as of 16 Mar 95), (a) there is no language code for
+# OBSOLETE # CHILL in output_epilog in gcc/config/rs6000/rs6000.c, (b) collect2
+# OBSOLETE # does not get along with AIX's too-clever linker.
+# OBSOLETE # * On Irix5, there is a bug whereby set of bool, etc., don't get
+# OBSOLETE # TYPE_LOW_BOUND for the bool right because force_to_range_type doesn't
+# OBSOLETE # work with stub types.
+# OBSOLETE # Lots of things seem to fail on the PA, and since it's not a supported
+# OBSOLETE # chill target at the moment, don't run the chill tests.
 
-proc skip_chill_tests {} {
-    if ![info exists do_chill_tests] {
-	return 1;
-    }
-    eval set skip_chill [expr ![isnative] || [istarget "*-*-aix*"] || [istarget "*-*-irix5*"] || [istarget "*-*-irix6*"] || [istarget "alpha-*-osf*"] || [istarget "hppa*-*-*"]]
-    verbose "Skip chill tests is $skip_chill"
-    return $skip_chill
-}
+# OBSOLETE proc skip_chill_tests {} {
+# OBSOLETE     if ![info exists do_chill_tests] {
+# OBSOLETE 	return 1;
+# OBSOLETE     }
+# OBSOLETE     eval set skip_chill [expr ![isnative] || [istarget "*-*-aix*"] || [istarget "*-*-irix5*"] || [istarget "*-*-irix6*"] || [istarget "alpha-*-osf*"] || [istarget "hppa*-*-*"]]
+# OBSOLETE     verbose "Skip chill tests is $skip_chill"
+# OBSOLETE     return $skip_chill
+# OBSOLETE }
 
 # Skip all the tests in the file if you are not on an hppa running
 # hpux target.
@@ -959,7 +959,7 @@
     global signed_keyword_not_used
     global gcc_compiled
 
-    if {![istarget "hppa*-*-hpux*"]} {
+    if {![istarget "hppa*-*-hpux*"] && ![istarget "mips*-*-irix*"]} {
 	if { [llength $args] > 0 } {
 	    if {$args == "c++"} {
 		if { [gdb_compile "${srcdir}/lib/compiler.cc" "${binfile}.ci" preprocess {}] != "" } {
@@ -1265,6 +1265,7 @@
     set ok 1
     if { $suppress_flag } {
 	set ok 0
+	unresolved "${test}"
     }
     while { ${index} < [llength ${list}] } {
 	set pattern [lindex ${list} ${index}]
@@ -1273,41 +1274,42 @@
 	    if { ${ok} } {
 		gdb_expect {
 		    -re "${pattern}${sentinel}" {
-			pass "${test}, pattern ${index} + sentinel"
+			# pass "${test}, pattern ${index} + sentinel"
 		    }
 		    -re "${sentinel}" {
-			fail "${test}, pattern ${index} + sentinel"
+			fail "${test} (pattern ${index} + sentinel)"
 			set ok 0
 		    }
 		    timeout {
-			fail "${test}, pattern ${index} + sentinel (timeout)"
+			fail "${test} (pattern ${index} + sentinel) (timeout)"
 			set ok 0
 		    }
 		}
 	    } else {
-		unresolved "${test}, pattern ${index} + sentinel"
+		# unresolved "${test}, pattern ${index} + sentinel"
 	    }
 	} else {
 	    if { ${ok} } {
 		gdb_expect {
 		    -re "${pattern}" {
-			pass "${test}, pattern ${index}"
+			# pass "${test}, pattern ${index}"
 		    }
 		    -re "${sentinel}" {
-			fail "${test}, pattern ${index}"
+			fail "${test} (pattern ${index})"
 			set ok 0
 		    }
 		    timeout {
-			fail "${test}, pattern ${index} (timeout)"
+			fail "${test} (pattern ${index}) (timeout)"
 			set ok 0
 		    }
 		}
 	    } else {
-		unresolved "${test}, pattern ${index}"
+		# unresolved "${test}, pattern ${index}"
 	    }
 	}
     }
     if { ${ok} } {
+	pass "${test}"
 	return 0
     } else {
 	return 1
@@ -1440,7 +1442,7 @@
     set debug_format "unknown"
     send_gdb "info source\n"
     gdb_expect 10 {
-	-re "Compiled with (.*) debugging format.\r\n$gdb_prompt $" {
+	-re "Compiled with (.*) debugging format.\r\n.*$gdb_prompt $" {
 	    set debug_format $expect_out(1,string)
 	    verbose "debug format is $debug_format"
 	    return 1;
diff --git a/gdb/thread.c b/gdb/thread.c
index 45130bb..fa5eb27 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -34,6 +34,7 @@
 #include "gdbcmd.h"
 #include "regcache.h"
 #include "gdb.h"
+#include "gdb_string.h"
 
 #include <ctype.h>
 #include <sys/types.h>
diff --git a/gdb/top.c b/gdb/top.c
index b4026c1..a2cee53 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -63,7 +63,6 @@
 #include <ctype.h>
 #include "ui-out.h"
 #include "cli-out.h"
-#include "interps.h"
 
 /* Default command line prompt.  This is overriden in some configs. */
 
@@ -387,7 +386,6 @@
   char *saved_error_pre_print;
   char *saved_quit_pre_print;
   struct ui_out *saved_uiout;
-  struct gdb_interpreter *saved_interp;
 
   /* Return value from SIGSETJMP(): enum return_reason if error or
      quit caught, 0 otherwise. */
@@ -410,7 +408,6 @@
   /* Override the global ``struct ui_out'' builder.  */
 
   saved_uiout = uiout;
-  saved_interp = gdb_current_interpreter ();
   uiout = func_uiout;
 
   /* Prevent error/quit during FUNC from calling cleanups established
@@ -441,24 +438,7 @@
 
   restore_cleanups (saved_cleanup_chain);
 
-  /*
-    cases:
-    1. interp1 calls using uiout1
-    2. interp1 calls using uiout1 calls using uiout2
-    3. interp1 calls using uiout1 calls interp2 using uiout2
-    4. more?
-    is it enough to note that the interpreter has changed and
-    reset saved_uiout
-   */
-  if (gdb_current_interpreter () == saved_interp)
-    uiout = saved_uiout;
-  else
-    {
-      /* We've changed interpreters under this call.
-	 Reset uiout to the current interpreter's uiout
-	 and hope for the best. */
-      uiout = gdb_interpreter_ui_out (NULL);
-    }
+  uiout = saved_uiout;
 
   if (mask & RETURN_MASK_QUIT)
     quit_pre_print = saved_quit_pre_print;
@@ -723,12 +703,12 @@
 	execute_user_command (c, arg);
       else if (c->type == set_cmd || c->type == show_cmd)
 	do_setshow_command (arg, from_tty & caution, c);
-      else if (c->func == NULL)
+      else if (!cmd_func_p (c))
 	error ("That is not a command, just a help topic.");
       else if (call_command_hook)
 	call_command_hook (c, arg, from_tty & caution);
       else
-	(*c->func) (c, arg, from_tty & caution);
+	cmd_func (c, arg, from_tty & caution);
        
       /* If this command has been post-hooked, run the hook last. */
       execute_cmd_post_hook (c);
@@ -967,6 +947,29 @@
 static int history_size;
 static char *history_filename;
 
+/* This is like readline(), but it has some gdb-specific behavior.
+   gdb can use readline in both the synchronous and async modes during
+   a single gdb invocation.  At the ordinary top-level prompt we might
+   be using the async readline.  That means we can't use
+   rl_pre_input_hook, since it doesn't work properly in async mode.
+   However, for a secondary prompt (" >", such as occurs during a
+   `define'), gdb just calls readline() directly, running it in
+   synchronous mode.  So for operate-and-get-next to work in this
+   situation, we have to switch the hooks around.  That is what
+   gdb_readline_wrapper is for.  */
+char *
+gdb_readline_wrapper (char *prompt)
+{
+  /* Set the hook that works in this case.  */
+  if (event_loop_p && after_char_processing_hook)
+    {
+      rl_pre_input_hook = (Function *) after_char_processing_hook;
+      after_char_processing_hook = NULL;
+    }
+
+  return readline (prompt);
+}
+
 
 #ifdef STOP_SIGNAL
 static void
@@ -1057,7 +1060,7 @@
 /* This is put on the appropriate hook and helps operate-and-get-next
    do its work.  */
 void
-gdb_rl_operate_and_get_next_completion ()
+gdb_rl_operate_and_get_next_completion (void)
 {
   int delta = where_history () - operate_saved_history;
   /* The `key' argument to rl_get_previous_history is ignored.  */
@@ -1079,6 +1082,8 @@
 static int
 gdb_rl_operate_and_get_next (int count, int key)
 {
+  int where;
+
   if (event_loop_p)
     {
       /* Use the async hook.  */
@@ -1091,8 +1096,20 @@
       rl_pre_input_hook = (Function *) gdb_rl_operate_and_get_next_completion;
     }
 
-  /* Add 1 because we eventually want the next line.  */
-  operate_saved_history = where_history () + 1;
+  /* Find the current line, and find the next line to use.  */
+  where = where_history();
+
+  /* FIXME: kettenis/20020817: max_input_history is renamed into
+     history_max_entries in readline-4.2.  When we do a new readline
+     import, we should probably change it here too, even though
+     readline maintains backwards compatibility for now by still
+     defining max_input_history.  */
+  if ((history_is_stifled () && (history_length >= max_input_history)) ||
+      (where >= history_length - 1))
+    operate_saved_history = where;
+  else
+    operate_saved_history = where + 1;
+
   return rl_newline (1, key);
 }
 
@@ -1194,7 +1211,7 @@
 	}
       else if (command_editing_p && instream == stdin && ISATTY (instream))
 	{
-	  rl = readline (local_prompt);
+	  rl = gdb_readline_wrapper (local_prompt);
 	}
       else
 	{
@@ -2108,26 +2125,17 @@
     init_ui_hook (argv0);
 
   /* Install the default UI */
-  /* All the interpreters should have had a look at things by now.
-     Initialize the selected interpreter. */
-  {
-    struct gdb_interpreter *interp;
-    if (interpreter_p == NULL)
-      interpreter_p = xstrdup (GDB_INTERPRETER_CONSOLE);
+  if (!init_ui_hook)
+    {
+      uiout = cli_out_new (gdb_stdout);
 
-    interp = gdb_lookup_interpreter (interpreter_p);
-
-    if (interp == NULL)
-      {
-        fprintf_unfiltered (gdb_stderr, "Interpreter `%s' unrecognized.\n",
-                            interpreter_p);
-        exit (1);
-      }
-    if (!gdb_set_interpreter (interp))
-      {
-        fprintf_unfiltered (gdb_stderr, "Interpreter `%s' failed to initialize.\n",
-                            interpreter_p);
-        exit (1);
-      }
-  }
+      /* All the interpreters should have had a look at things by now.
+	 Initialize the selected interpreter. */
+      if (interpreter_p)
+	{
+	  fprintf_unfiltered (gdb_stderr, "Interpreter `%s' unrecognized.\n",
+			      interpreter_p);
+	  exit (1);
+	}
+    }
 }
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 19f2906..976f925 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -854,7 +854,7 @@
 	line = (*readline_hook) (prompt);
       else if (instream == stdin && ISATTY (instream))
 	{
-	  line = readline (prompt);
+	  line = gdb_readline_wrapper (prompt);
 	  if (line && *line)	/* add it to command history */
 	    add_history (line);
 	}
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index d278c6a..16d4835 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-18  Daniel Jacobowitz  <drow@mvista.com>
+
+	Fix PR gdb/655
+	* tui.c: Disable <termio.h> include.
+
 2002-03-15  Andrew Cagney  <ac131313@redhat.com>
 
 	* tui-out.c (XMALLOC): Delete macro.  Update copyright.
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 7912efc..6b132b7 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -48,7 +48,9 @@
 #endif
 #include <signal.h>
 #include <fcntl.h>
+#if 0
 #include <termio.h>
+#endif
 #include <setjmp.h>
 #include "defs.h"
 #include "gdbcmd.h"
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index b56610d..c4262d9 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -20,7 +20,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
 #include "bfd.h"		/* Binary File Description */
 #include "symtab.h"
 #include "gdbtypes.h"
@@ -88,16 +88,16 @@
       type_print (type, "", stream, 0);
       break;
 #endif
-#ifdef _LANG_chill
-    case language_chill:
-      fprintf_filtered (stream, "SYNMODE ");
-      if (!TYPE_NAME (SYMBOL_TYPE (new)) ||
-	  !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new)))
-	fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
-      else
-	fprintf_filtered (stream, "<builtin> = ");
-      type_print (type, "", stream, 0);
-      break;
+#ifdef _LANG_chill /* OBSOLETE */
+      /* OBSOLETE case language_chill: */
+      /* OBSOLETE   fprintf_filtered (stream, "SYNMODE "); */
+      /* OBSOLETE   if (!TYPE_NAME (SYMBOL_TYPE (new)) || */
+      /* OBSOLETE       !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new))) */
+      /* OBSOLETE     fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new)); */
+      /* OBSOLETE   else */
+      /* OBSOLETE     fprintf_filtered (stream, "<builtin> = "); */
+      /* OBSOLETE   type_print (type, "", stream, 0); */
+      /* OBSOLETE   break; */
 #endif
     default:
       error ("Language not supported.");
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 3dbcaab..3af6d2c 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -483,3 +483,97 @@
     return NULL;
   return stdio_file_new (f, 1);
 }
+
+/* ``struct ui_file'' implementation that maps onto two ui-file objects.  */
+
+static ui_file_write_ftype tee_file_write;
+static ui_file_fputs_ftype tee_file_fputs;
+static ui_file_isatty_ftype tee_file_isatty;
+static ui_file_delete_ftype tee_file_delete;
+static ui_file_flush_ftype tee_file_flush;
+
+static int tee_file_magic;
+
+struct tee_file
+  {
+    int *magic;
+    struct ui_file *one, *two;
+    int close_one, close_two;
+  };
+
+struct ui_file *
+tee_file_new (struct ui_file *one, int close_one,
+	      struct ui_file *two, int close_two)
+{
+  struct ui_file *ui_file = ui_file_new ();
+  struct tee_file *tee = xmalloc (sizeof (struct tee_file));
+  tee->magic = &tee_file_magic;
+  tee->one = one;
+  tee->two = two;
+  tee->close_one = close_one;
+  tee->close_two = close_two;
+  set_ui_file_data (ui_file, tee, tee_file_delete);
+  set_ui_file_flush (ui_file, tee_file_flush);
+  set_ui_file_write (ui_file, tee_file_write);
+  set_ui_file_fputs (ui_file, tee_file_fputs);
+  set_ui_file_isatty (ui_file, tee_file_isatty);
+  return ui_file;
+}
+
+static void
+tee_file_delete (struct ui_file *file)
+{
+  struct tee_file *tee = ui_file_data (file);
+  if (tee->magic != &tee_file_magic)
+    internal_error (__FILE__, __LINE__,
+		    "tee_file_delete: bad magic number");
+  if (tee->close_one)
+    ui_file_delete (tee->one);
+  if (tee->close_two)
+    ui_file_delete (tee->two);
+
+  xfree (tee);
+}
+
+static void
+tee_file_flush (struct ui_file *file)
+{
+  struct tee_file *tee = ui_file_data (file);
+  if (tee->magic != &tee_file_magic)
+    internal_error (__FILE__, __LINE__,
+		    "tee_file_flush: bad magic number");
+  tee->one->to_flush (tee->one);
+  tee->two->to_flush (tee->two);
+}
+
+static void
+tee_file_write (struct ui_file *file, const char *buf, long length_buf)
+{
+  struct tee_file *tee = ui_file_data (file);
+  if (tee->magic != &tee_file_magic)
+    internal_error (__FILE__, __LINE__,
+		    "tee_file_write: bad magic number");
+  ui_file_write (tee->one, buf, length_buf);
+  ui_file_write (tee->two, buf, length_buf);
+}
+
+static void
+tee_file_fputs (const char *linebuffer, struct ui_file *file)
+{
+  struct tee_file *tee = ui_file_data (file);
+  if (tee->magic != &tee_file_magic)
+    internal_error (__FILE__, __LINE__,
+		    "tee_file_fputs: bad magic number");
+  tee->one->to_fputs (linebuffer, tee->one);
+  tee->two->to_fputs (linebuffer, tee->two);
+}
+
+static int
+tee_file_isatty (struct ui_file *file)
+{
+  struct tee_file *tee = ui_file_data (file);
+  if (tee->magic != &tee_file_magic)
+    internal_error (__FILE__, __LINE__,
+		    "tee_file_isatty: bad magic number");
+  return (0);
+}
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 3c35193..989c343 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -90,4 +90,11 @@
 /* Open NAME returning an STDIO based UI_FILE. */
 extern struct ui_file *gdb_fopen (char *name, char *mode);
 
+/* Create a file which writes to both ONE and TWO.  CLOSE_ONE
+   and CLOSE_TWO indicate whether the original files should be
+   closed when the new file is closed.  */
+struct ui_file *tee_file_new (struct ui_file *one,
+			      int close_one,
+			      struct ui_file *two,
+			      int close_two);
 #endif
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index c07d695..4a4a922 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -497,9 +497,9 @@
      based on TARGET_ADDR_BIT.  */
   /* print_address_numeric (address, 1, local_stream); */
   if (TARGET_ADDR_BIT <= 32)
-    strcpy (addstr, local_hex_string_custom ((unsigned long) address, "08l"));
+    strcpy (addstr, local_hex_string_custom (address, "08l"));
   else
-    strcpy (addstr, local_hex_string_custom ((unsigned long) address, "016l"));
+    strcpy (addstr, local_hex_string_custom (address, "016l"));
 
   ui_out_field_string (uiout, fldname, addstr);
 }
diff --git a/gdb/utils.c b/gdb/utils.c
index 4baea62..0c46f79 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1603,7 +1603,7 @@
   /* Call readline, not gdb_readline, because GO32 readline handles control-C
      whereas control-C to gdb_readline will cause the user to get dumped
      out to DOS.  */
-  ignore = readline (cont_prompt);
+  ignore = gdb_readline_wrapper (cont_prompt);
 
   if (annotation_level > 1)
     printf_unfiltered ("\n\032\032post-prompt-for-continue\n");
@@ -2153,9 +2153,11 @@
 	    case language_java:
 	      demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
 	      break;
-	    case language_chill:
-	      demangled = chill_demangle (name);
-	      break;
+#if 0
+	      /* OBSOLETE case language_chill: */
+	      /* OBSOLETE   demangled = chill_demangle (name); */
+	      /* OBSOLETE   break; */
+#endif
 	    default:
 	      demangled = NULL;
 	      break;
@@ -2462,9 +2464,7 @@
 CORE_ADDR
 host_pointer_to_address (void *ptr)
 {
-  if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
-    internal_error (__FILE__, __LINE__,
-		    "core_addr_to_void_ptr: bad cast");
+  gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
   return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
 }
 
@@ -2472,9 +2472,8 @@
 address_to_host_pointer (CORE_ADDR addr)
 {
   void *ptr;
-  if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
-    internal_error (__FILE__, __LINE__,
-		    "core_addr_to_void_ptr: bad cast");
+
+  gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
   ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
   return ptr;
 }
diff --git a/gdb/uw-thread.c b/gdb/uw-thread.c
index 617cfbd..cc6ed6d 100644
--- a/gdb/uw-thread.c
+++ b/gdb/uw-thread.c
@@ -116,6 +116,14 @@
 /* Prototypes for supply_gregset etc. */
 #include "gregset.h"
 
+/* Offset from SP to first arg on stack at first instruction of a
+   function.  We provide a default here that's right for most, if not
+   all, targets that use this file.  */
+
+#ifndef SP_ARG0
+#define SP_ARG0 (1 * 4)
+#endif
+
 /* Whether to emit debugging output. */
 
 #define DEBUG 0
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index e1869d0..3752dce 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "obstack.h"
 #include "target.h"
 #include "value.h"
 #include "bfd.h"
@@ -123,6 +122,12 @@
   E_ALL_REGS_SIZE = (E_NUM_REGS) * v850_reg_size
 };
 
+/* Size of return datatype which fits into all return registers. */
+enum
+{
+  E_MAX_RETTYPE_SIZE_IN_REGS = 2 * v850_reg_size
+};
+
 static LONGEST call_dummy_nil[] = {0};
 
 static char *v850_generic_reg_names[] =
@@ -199,7 +204,7 @@
 /* Function: v850_register_name
    Returns the name of the v850/v850e register N. */
 
-static char *
+static const char *
 v850_register_name (int regnum)
 {
   if (regnum < 0 || regnum >= E_NUM_REGS)
@@ -266,11 +271,90 @@
     return builtin_type_int32;
 }
 
+static int
+v850_type_is_scalar (struct type *t)
+{
+  return (TYPE_CODE (t) != TYPE_CODE_STRUCT
+	  && TYPE_CODE (t) != TYPE_CODE_UNION
+	  && TYPE_CODE (t) != TYPE_CODE_ARRAY);
+}
+
 /* Should call_function allocate stack space for a struct return?  */
-int
+static int
 v850_use_struct_convention (int gcc_p, struct type *type)
 {
-  return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 4);
+  /* According to ABI:
+   * return TYPE_LENGTH (type) > 8);
+   */
+
+  /* Current implementation in gcc: */
+
+  int i;
+  struct type *fld_type, *tgt_type;
+
+  /* 1. The value is greater than 8 bytes -> returned by copying */
+  if (TYPE_LENGTH (type) > 8)
+    return 1;
+
+  /* 2. The value is a single basic type -> returned in register */
+  if (v850_type_is_scalar (type))
+    return 0;
+
+  /* The value is a structure or union with a single element
+   * and that element is either a single basic type or an array of
+   * a single basic type whoes size is greater than or equal to 4
+   * -> returned in register */
+  if ((TYPE_CODE (type) == TYPE_CODE_STRUCT
+       || TYPE_CODE (type) == TYPE_CODE_UNION)
+       && TYPE_NFIELDS (type) == 1)
+    {
+      fld_type = TYPE_FIELD_TYPE (type, 0);
+      if (v850_type_is_scalar (fld_type) && TYPE_LENGTH (fld_type) >= 4)
+	return 0;
+
+      if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
+        {
+	  tgt_type = TYPE_TARGET_TYPE (fld_type);
+	  if (v850_type_is_scalar (tgt_type) && TYPE_LENGTH (tgt_type) >= 4)
+	    return 0;
+	}
+    }
+
+  /* The value is a structure whose first element is an integer or
+   * a float, and which contains no arrays of more than two elements
+   * -> returned in register */
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+      && v850_type_is_scalar (TYPE_FIELD_TYPE (type, 0))
+      && TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == 4)
+    {
+      for (i = 1; i < TYPE_NFIELDS (type); ++i)
+        {
+	  fld_type = TYPE_FIELD_TYPE (type, 0);
+	  if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
+	    {
+	      tgt_type = TYPE_TARGET_TYPE (fld_type);
+	      if (TYPE_LENGTH (fld_type) >= 0 && TYPE_LENGTH (tgt_type) >= 0
+		  && TYPE_LENGTH (fld_type) / TYPE_LENGTH (tgt_type) > 2)
+		return 1;
+	    }
+	}
+      return 0;
+    }
+    
+  /* The value is a union which contains at least one field which
+   * would be returned in registers according to these rules
+   * -> returned in register */
+  if (TYPE_CODE (type) == TYPE_CODE_UNION)
+    {
+      for (i = 0; i < TYPE_NFIELDS (type); ++i)
+        {
+	  fld_type = TYPE_FIELD_TYPE (type, 0);
+	  if (!v850_use_struct_convention (0, fld_type))
+	    return 0;
+	}
+    }
+
+  return 1;
 }
 
 
@@ -844,22 +928,22 @@
   /* First, just for safety, make sure stack is aligned */
   sp &= ~3;
 
-  /* Now make space on the stack for the args. */
-  for (argnum = 0; argnum < nargs; argnum++)
-    len += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
-  sp -= len;			/* possibly over-allocating, but it works... */
-  /* (you might think we could allocate 16 bytes */
-  /* less, but the ABI seems to use it all! )  */
-  argreg = E_ARG0_REGNUM;
-
-  /* the struct_return pointer occupies the first parameter-passing reg */
-  if (struct_return)
-    write_register (argreg++, struct_addr);
-
-  stack_offset = 16;
   /* The offset onto the stack at which we will start copying parameters
      (after the registers are used up) begins at 16 rather than at zero.
      I don't really know why, that's just the way it seems to work.  */
+  stack_offset = 16;
+
+  /* Now make space on the stack for the args. */
+  for (argnum = 0; argnum < nargs; argnum++)
+    len += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
+  sp -= len + stack_offset;	/* possibly over-allocating, but it works... */
+  /* (you might think we could allocate 16 bytes */
+  /* less, but the ABI seems to use it all! )  */
+
+  argreg = E_ARG0_REGNUM;
+  /* the struct_return pointer occupies the first parameter-passing reg */
+  if (struct_return)
+    argreg++;
 
   /* Now load as many as possible of the first arguments into
      registers, and push the rest onto the stack.  There are 16 bytes
@@ -870,8 +954,8 @@
       char *val;
       char valbuf[v850_register_raw_size (E_ARG0_REGNUM)];
 
-      if (TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_STRUCT
-	  && TYPE_LENGTH (VALUE_TYPE (*args)) > 8)
+      if (!v850_type_is_scalar (VALUE_TYPE (*args))
+	  && TYPE_LENGTH (VALUE_TYPE (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
 	{
 	  store_address (valbuf, 4, VALUE_ADDRESS (*args));
 	  len = 4;
@@ -966,8 +1050,26 @@
 static void
 v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
 {
-  memcpy (valbuf, regbuf + v850_register_byte (E_V0_REGNUM),
-	  TYPE_LENGTH (type));
+  CORE_ADDR return_buffer;
+
+  if (!v850_use_struct_convention (0, type))
+    {
+      /* Scalar return values of <= 8 bytes are returned in 
+         E_V0_REGNUM to E_V1_REGNUM. */
+      memcpy (valbuf,
+	      &regbuf[REGISTER_BYTE (E_V0_REGNUM)],
+	      TYPE_LENGTH (type));
+    }
+  else
+    {
+      /* Aggregates and return values > 8 bytes are returned in memory,
+         pointed to by R6. */
+      return_buffer =
+	extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
+			 REGISTER_RAW_SIZE (E_V0_REGNUM));
+
+      read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
+    }
 }
 
 const static unsigned char *
@@ -988,8 +1090,16 @@
 static void
 v850_store_return_value (struct type *type, char *valbuf)
 {
-  write_register_bytes(v850_register_byte (E_V0_REGNUM), valbuf,
-		       TYPE_LENGTH (type));
+  CORE_ADDR return_buffer;
+
+  if (!v850_use_struct_convention (0, type))
+    write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,	
+    			  TYPE_LENGTH (type));
+  else
+    {
+      return_buffer = read_register (E_V0_REGNUM);
+      write_memory (return_buffer, valbuf, TYPE_LENGTH (type));
+    }
 }
 
 static void
@@ -1057,8 +1167,9 @@
 }
 
 static void
-v850_store_struct_return (CORE_ADDR a, CORE_ADDR b)
+v850_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
+  write_register (E_ARG0_REGNUM, addr);
 }
 
 static CORE_ADDR
@@ -1126,7 +1237,7 @@
   set_gdbarch_init_extra_frame_info (gdbarch, v850_init_extra_frame_info);
   set_gdbarch_frame_init_saved_regs (gdbarch, v850_frame_init_saved_regs);
   set_gdbarch_frame_chain (gdbarch, v850_frame_chain);
-  set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+  set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
   set_gdbarch_saved_pc_after_call (gdbarch, v850_saved_pc_after_call);
   set_gdbarch_frame_saved_pc (gdbarch, v850_frame_saved_pc);
   set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
@@ -1158,12 +1269,12 @@
   set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, v850_push_return_address);
-  set_gdbarch_extract_return_value (gdbarch, v850_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
   set_gdbarch_pop_frame (gdbarch, v850_pop_frame);
   set_gdbarch_store_struct_return (gdbarch, v850_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, v850_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
   set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
diff --git a/gdb/valarith.c b/gdb/valarith.c
index cc067cb..279528a 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -859,7 +859,7 @@
     /* Integral operations here.  */
     /* FIXME:  Also mixed integral/booleans, with result an integer. */
     /* FIXME: This implements ANSI C rules (also correct for C++).
-       What about FORTRAN and chill?  */
+       What about FORTRAN and (OBSOLETE) chill ?  */
     {
       unsigned int promoted_len1 = TYPE_LENGTH (type1);
       unsigned int promoted_len2 = TYPE_LENGTH (type2);
@@ -946,12 +946,12 @@
 	    case BINOP_MOD:
 	      /* Knuth 1.2.4, integer only.  Note that unlike the C '%' op,
 	         v1 mod 0 has a defined value, v1. */
-	      /* Chill specifies that v2 must be > 0, so check for that. */
-	      if (current_language->la_language == language_chill
-		  && value_as_long (arg2) <= 0)
-		{
-		  error ("Second operand of MOD must be greater than zero.");
-		}
+	      /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+	      /* OBSOLETE if (current_language->la_language == language_chill */
+	      /* OBSOLETE     && value_as_long (arg2) <= 0) */
+	      /* OBSOLETE { */
+	      /* OBSOLETE   error ("Second operand of MOD must be greater than zero."); */
+	      /* OBSOLETE } */
 	      if (v2 == 0)
 		{
 		  v = v1;
@@ -1070,12 +1070,12 @@
 	    case BINOP_MOD:
 	      /* Knuth 1.2.4, integer only.  Note that unlike the C '%' op,
 	         X mod 0 has a defined value, X. */
-	      /* Chill specifies that v2 must be > 0, so check for that. */
-	      if (current_language->la_language == language_chill
-		  && v2 <= 0)
-		{
-		  error ("Second operand of MOD must be greater than zero.");
-		}
+	      /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+	      /* OBSOLETE if (current_language->la_language == language_chill */
+	      /* OBSOLETE     && v2 <= 0) */
+	      /* OBSOLETE { */
+	      /* OBSOLETE   error ("Second operand of MOD must be greater than zero."); */
+	      /* OBSOLETE } */
 	      if (v2 == 0)
 		{
 		  v = v1;
@@ -1338,8 +1338,8 @@
     return value_from_double (result_type, -value_as_double (arg1));
   else if (TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_BOOL)
     {
-      /* Perform integral promotion for ANSI C/C++.
-         FIXME: What about FORTRAN and chill ?  */
+      /* Perform integral promotion for ANSI C/C++.  FIXME: What about
+         FORTRAN and (OBSOLETE) chill ?  */
       if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_int))
 	result_type = builtin_type_int;
 
diff --git a/gdb/valops.c b/gdb/valops.c
index 798e31f..1eeedd3 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -45,7 +45,8 @@
 extern int overload_debug;
 /* Local functions.  */
 
-static int typecmp (int staticp, struct type *t1[], struct value *t2[]);
+static int typecmp (int staticp, int varargs, int nargs,
+		    struct field t1[], struct value *t2[]);
 
 static CORE_ADDR find_function_addr (struct value *, struct type **);
 static struct value *value_arg_coerce (struct value *, struct type *, int);
@@ -360,18 +361,11 @@
 				       value_zero (t1, not_lval), 0, t1, 1);
 		  if (v)
 		    {
-		      struct value *v2 = value_ind (arg2);
-		      VALUE_ADDRESS (v2) -= VALUE_ADDRESS (v)
-			+ VALUE_OFFSET (v);
-
-                      /* JYG: adjust the new pointer value and
-			 embedded offset. */
-                      v2->aligner.contents[0] -=  VALUE_EMBEDDED_OFFSET (v);
-                      VALUE_EMBEDDED_OFFSET (v2) = 0;
-
-		      v2 = value_addr (v2);
-		      VALUE_TYPE (v2) = type;
-		      return v2;
+                      CORE_ADDR addr2 = value_as_address (arg2);
+                      addr2 -= (VALUE_ADDRESS (v)
+                                + VALUE_OFFSET (v)
+                                + VALUE_EMBEDDED_OFFSET (v));
+                      return value_from_pointer (type, addr2);
 		    }
 		}
 	    }
@@ -382,49 +376,49 @@
       VALUE_POINTED_TO_OFFSET (arg2) = 0;	/* pai: chk_val */
       return arg2;
     }
-  else if (chill_varying_type (type))
-    {
-      struct type *range1, *range2, *eltype1, *eltype2;
-      struct value *val;
-      int count1, count2;
-      LONGEST low_bound, high_bound;
-      char *valaddr, *valaddr_data;
-      /* For lint warning about eltype2 possibly uninitialized: */
-      eltype2 = NULL;
-      if (code2 == TYPE_CODE_BITSTRING)
-	error ("not implemented: converting bitstring to varying type");
-      if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING)
-	  || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))),
-	      eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)),
-	      (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2)
-      /* || TYPE_CODE (eltype1) != TYPE_CODE (eltype2) */ )))
-	error ("Invalid conversion to varying type");
-      range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0);
-      range2 = TYPE_FIELD_TYPE (type2, 0);
-      if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0)
-	count1 = -1;
-      else
-	count1 = high_bound - low_bound + 1;
-      if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0)
-	count1 = -1, count2 = 0;	/* To force error before */
-      else
-	count2 = high_bound - low_bound + 1;
-      if (count2 > count1)
-	error ("target varying type is too small");
-      val = allocate_value (type);
-      valaddr = VALUE_CONTENTS_RAW (val);
-      valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
-      /* Set val's __var_length field to count2. */
-      store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)),
-			    count2);
-      /* Set the __var_data field to count2 elements copied from arg2. */
-      memcpy (valaddr_data, VALUE_CONTENTS (arg2),
-	      count2 * TYPE_LENGTH (eltype2));
-      /* Zero the rest of the __var_data field of val. */
-      memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0',
-	      (count1 - count2) * TYPE_LENGTH (eltype2));
-      return val;
-    }
+  /* OBSOLETE else if (chill_varying_type (type)) */
+  /* OBSOLETE   { */
+  /* OBSOLETE     struct type *range1, *range2, *eltype1, *eltype2; */
+  /* OBSOLETE     struct value *val; */
+  /* OBSOLETE     int count1, count2; */
+  /* OBSOLETE     LONGEST low_bound, high_bound; */
+  /* OBSOLETE     char *valaddr, *valaddr_data; */
+  /* OBSOLETE     *//* For lint warning about eltype2 possibly uninitialized: */
+  /* OBSOLETE     eltype2 = NULL; */
+  /* OBSOLETE     if (code2 == TYPE_CODE_BITSTRING) */
+  /* OBSOLETE       error ("not implemented: converting bitstring to varying type"); */
+  /* OBSOLETE     if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING) */
+  /* OBSOLETE         || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))), */
+  /* OBSOLETE       eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)), */
+  /* OBSOLETE                                (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2) */
+  /* OBSOLETE     *//*|| TYPE_CODE (eltype1) != TYPE_CODE (eltype2) *//* ))) */
+  /* OBSOLETE      error ("Invalid conversion to varying type"); */
+  /* OBSOLETE     range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0); */
+  /* OBSOLETE     range2 = TYPE_FIELD_TYPE (type2, 0); */
+  /* OBSOLETE     if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0) */
+  /* OBSOLETE       count1 = -1; */
+  /* OBSOLETE     else */
+  /* OBSOLETE       count1 = high_bound - low_bound + 1; */
+  /* OBSOLETE     if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0) */
+  /* OBSOLETE       count1 = -1, count2 = 0;	*//* To force error before */
+  /* OBSOLETE     else */
+  /* OBSOLETE       count2 = high_bound - low_bound + 1; */
+  /* OBSOLETE     if (count2 > count1) */
+  /* OBSOLETE       error ("target varying type is too small"); */
+  /* OBSOLETE     val = allocate_value (type); */
+  /* OBSOLETE     valaddr = VALUE_CONTENTS_RAW (val); */
+  /* OBSOLETE     valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8; */
+  /* OBSOLETE     *//* Set val's __var_length field to count2. */
+  /* OBSOLETE     store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)), */
+  /* OBSOLETE 	    count2); */
+  /* OBSOLETE     *//* Set the __var_data field to count2 elements copied from arg2. */
+  /* OBSOLETE     memcpy (valaddr_data, VALUE_CONTENTS (arg2), */
+  /* OBSOLETE      count2 * TYPE_LENGTH (eltype2)); */
+  /* OBSOLETE     *//* Zero the rest of the __var_data field of val. */
+  /* OBSOLETE     memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0', */
+  /* OBSOLETE      (count1 - count2) * TYPE_LENGTH (eltype2)); */
+  /* OBSOLETE     return val; */
+  /* OBSOLETE   } */
   else if (VALUE_LVAL (arg2) == lval_memory)
     {
       return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
@@ -632,6 +626,7 @@
 	write_memory (changed_addr, dest_buffer, changed_len);
 	if (memory_changed_hook)
 	  memory_changed_hook (changed_addr, changed_len);
+	target_changed_event ();
       }
       break;
 
@@ -677,6 +672,9 @@
 			      VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
 #endif
 	}
+
+      target_changed_event ();
+
       /* Assigning to the stack pointer, frame pointer, and other
          (architecture and calling convention specific) registers may
          cause the frame cache to be out of date.  We just do this
@@ -764,6 +762,7 @@
 
 	if (register_changed_hook)
 	  register_changed_hook (-1);
+	target_changed_event ();
       }
       break;
 
@@ -960,9 +959,9 @@
      to do.  "long long" variables are rare enough that
      BUILTIN_TYPE_LONGEST would seem to be a mistake.  */
   if (TYPE_CODE (base_type) == TYPE_CODE_INT)
-    return value_at (builtin_type_int,
-		     (CORE_ADDR) value_as_long (arg1),
-		     VALUE_BFD_SECTION (arg1));
+    return value_at_lazy (builtin_type_int,
+			  (CORE_ADDR) value_as_long (arg1),
+			  VALUE_BFD_SECTION (arg1));
   else if (TYPE_CODE (base_type) == TYPE_CODE_PTR)
     {
       struct type *enc_type;
@@ -1315,8 +1314,10 @@
   struct type *value_type;
   unsigned char struct_return;
   CORE_ADDR struct_addr = 0;
+  struct regcache *retbuf;
+  struct cleanup *retbuf_cleanup;
   struct inferior_status *inf_status;
-  struct cleanup *old_chain;
+  struct cleanup *inf_status_cleanup;
   CORE_ADDR funaddr;
   int using_gcc;		/* Set to version of gcc in use, or zero if not gcc */
   CORE_ADDR real_pc;
@@ -1332,8 +1333,18 @@
   if (!target_has_execution)
     noprocess ();
 
+  /* Create a cleanup chain that contains the retbuf (buffer
+     containing the register values).  This chain is create BEFORE the
+     inf_status chain so that the inferior status can cleaned up
+     (restored or discarded) without having the retbuf freed.  */
+  retbuf = regcache_xmalloc (current_gdbarch);
+  retbuf_cleanup = make_cleanup_regcache_xfree (retbuf);
+
+  /* A cleanup for the inferior status.  Create this AFTER the retbuf
+     so that this can be discarded or applied without interfering with
+     the regbuf.  */
   inf_status = save_inferior_status (1);
-  old_chain = make_cleanup_restore_inferior_status (inf_status);
+  inf_status_cleanup = make_cleanup_restore_inferior_status (inf_status);
 
   /* PUSH_DUMMY_FRAME is responsible for saving the inferior registers
      (and POP_FRAME for restoring them).  (At least on most machines)
@@ -1438,42 +1449,25 @@
   sp = old_sp;			/* It really is used, for some ifdef's... */
 #endif
 
-  if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
-    {
-      i = 0;
-      while (TYPE_CODE (TYPE_ARG_TYPES (ftype)[i]) != TYPE_CODE_VOID)
-	i++;
-      n_method_args = i;
-      if (nargs < i)
-	error ("too few arguments in method call");
-    }
-  else if (nargs < TYPE_NFIELDS (ftype))
+  if (nargs < TYPE_NFIELDS (ftype))
     error ("too few arguments in function call");
 
   for (i = nargs - 1; i >= 0; i--)
     {
-      /* Assume that methods are always prototyped, unless they are off the
-	 end (which we should only be allowing if there is a ``...'').  
-         FIXME.  */
+      int prototyped;
+
+      /* FIXME drow/2002-05-31: Should just always mark methods as
+	 prototyped.  Can we respect TYPE_VARARGS?  Probably not.  */
       if (TYPE_CODE (ftype) == TYPE_CODE_METHOD)
-	{
-	  if (i < n_method_args)
-	    args[i] = value_arg_coerce (args[i], TYPE_ARG_TYPES (ftype)[i], 1);
-	  else
-	    args[i] = value_arg_coerce (args[i], NULL, 0);
-	}
-
-      /* If we're off the end of the known arguments, do the standard
-         promotions.  FIXME: if we had a prototype, this should only
-         be allowed if ... were present.  */
-      if (i >= TYPE_NFIELDS (ftype))
-	args[i] = value_arg_coerce (args[i], NULL, 0);
-
+	prototyped = 1;
       else
-	{
-	  param_type = TYPE_FIELD_TYPE (ftype, i);
-	  args[i] = value_arg_coerce (args[i], param_type, TYPE_PROTOTYPED (ftype));
-	}
+	prototyped = TYPE_PROTOTYPED (ftype);
+
+      if (i < TYPE_NFIELDS (ftype))
+	args[i] = value_arg_coerce (args[i], TYPE_FIELD_TYPE (ftype, i),
+				    prototyped);
+      else
+	args[i] = value_arg_coerce (args[i], NULL, 0);
 
       /*elz: this code is to handle the case in which the function to be called
          has a pointer to function as parameter and the corresponding actual argument
@@ -1485,7 +1479,7 @@
          In cc this is not a problem. */
 
       if (using_gcc == 0)
-	if (param_type)
+	if (param_type && TYPE_CODE (ftype) != TYPE_CODE_METHOD)
 	  /* if this parameter is a pointer to function */
 	  if (TYPE_CODE (param_type) == TYPE_CODE_PTR)
 	    if (TYPE_CODE (TYPE_TARGET_TYPE (param_type)) == TYPE_CODE_FUNC)
@@ -1672,7 +1666,6 @@
     SAVE_DUMMY_FRAME_TOS (sp);
 
   {
-    char *retbuf = (char*) alloca (REGISTER_BYTES);
     char *name;
     struct symbol *symbol;
 
@@ -1731,11 +1724,12 @@
 	  {
 	    /* The user wants to stay in the frame where we stopped (default).*/
 
-	    /* If we did the cleanups, we would print a spurious error
-	       message (Unable to restore previously selected frame),
-	       would write the registers from the inf_status (which is
-	       wrong), and would do other wrong things.  */
-	    discard_cleanups (old_chain);
+	    /* If we restored the inferior status (via the cleanup),
+	       we would print a spurious error message (Unable to
+	       restore previously selected frame), would write the
+	       registers from the inf_status (which is wrong), and
+	       would do other wrong things.  */
+	    discard_cleanups (inf_status_cleanup);
 	    discard_inferior_status (inf_status);
 
 	    /* FIXME: Insert a bunch of wrap_here; name can be very long if it's
@@ -1753,11 +1747,12 @@
       {
 	/* We hit a breakpoint inside the FUNCTION. */
 
-	/* If we did the cleanups, we would print a spurious error
-	   message (Unable to restore previously selected frame),
-	   would write the registers from the inf_status (which is
-	   wrong), and would do other wrong things.  */
-	discard_cleanups (old_chain);
+	/* If we restored the inferior status (via the cleanup), we
+	   would print a spurious error message (Unable to restore
+	   previously selected frame), would write the registers from
+	   the inf_status (which is wrong), and would do other wrong
+	   things.  */
+	discard_cleanups (inf_status_cleanup);
 	discard_inferior_status (inf_status);
 
 	/* The following error message used to say "The expression
@@ -1777,7 +1772,10 @@
       }
 
     /* If we get here the called FUNCTION run to completion. */
-    do_cleanups (old_chain);
+
+    /* Restore the inferior status, via its cleanup.  At this stage,
+       leave the RETBUF alone.  */
+    do_cleanups (inf_status_cleanup);
 
     /* Figure out the value returned by the function.  */
 /* elz: I defined this new macro for the hppa architecture only.
@@ -1790,10 +1788,17 @@
 
 #ifdef VALUE_RETURNED_FROM_STACK
     if (struct_return)
-      return (struct value *) VALUE_RETURNED_FROM_STACK (value_type, struct_addr);
+      {
+	do_cleanups (retbuf_cleanup);
+	return VALUE_RETURNED_FROM_STACK (value_type, struct_addr);
+      }
 #endif
 
-    return value_being_returned (value_type, retbuf, struct_return);
+    {
+      struct value *retval = value_being_returned (value_type, retbuf, struct_return);
+      do_cleanups (retbuf_cleanup);
+      return retval;
+    }
   }
 }
 
@@ -1938,13 +1943,14 @@
 }
 
 /* See if we can pass arguments in T2 to a function which takes arguments
-   of types T1.  Both t1 and t2 are NULL-terminated vectors.  If some
-   arguments need coercion of some sort, then the coerced values are written
-   into T2.  Return value is 0 if the arguments could be matched, or the
-   position at which they differ if not.
+   of types T1.  T1 is a list of NARGS arguments, and T2 is a NULL-terminated
+   vector.  If some arguments need coercion of some sort, then the coerced
+   values are written into T2.  Return value is 0 if the arguments could be
+   matched, or the position at which they differ if not.
 
    STATICP is nonzero if the T1 argument list came from a
-   static member function.
+   static member function.  T2 will still include the ``this'' pointer,
+   but it will be skipped.
 
    For non-static member functions, we ignore the first argument,
    which is the type of the instance variable.  This is because we want
@@ -1953,30 +1959,30 @@
    requested operation is type secure, shouldn't we?  FIXME.  */
 
 static int
-typecmp (int staticp, struct type *t1[], struct value *t2[])
+typecmp (int staticp, int varargs, int nargs,
+	 struct field t1[], struct value *t2[])
 {
   int i;
 
   if (t2 == 0)
-    return 1;
-  if (staticp && t1 == 0)
-    return t2[1] != 0;
-  if (t1 == 0)
-    return 1;
-  if (t1[!staticp] == 0)
-    return 0;
-  if (TYPE_CODE (t1[0]) == TYPE_CODE_VOID)
-    return 0;
+    internal_error (__FILE__, __LINE__, "typecmp: no argument list");
+
   /* Skip ``this'' argument if applicable.  T2 will always include THIS.  */
   if (staticp)
-    t2++;
-  for (i = !staticp; t1[i] && TYPE_CODE (t1[i]) != TYPE_CODE_VOID; i++)
+    t2 ++;
+
+  for (i = 0;
+       (i < nargs) && TYPE_CODE (t1[i].type) != TYPE_CODE_VOID;
+       i++)
     {
       struct type *tt1, *tt2;
+
       if (!t2[i])
 	return i + 1;
-      tt1 = check_typedef (t1[i]);
+
+      tt1 = check_typedef (t1[i].type);
       tt2 = check_typedef (VALUE_TYPE (t2[i]));
+
       if (TYPE_CODE (tt1) == TYPE_CODE_REF
       /* We should be doing hairy argument matching, as below.  */
 	  && (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (tt1))) == TYPE_CODE (tt2)))
@@ -2012,12 +2018,12 @@
       /* We should be doing much hairier argument matching (see section 13.2
          of the ARM), but as a quick kludge, just check for the same type
          code.  */
-      if (TYPE_CODE (t1[i]) != TYPE_CODE (VALUE_TYPE (t2[i])))
+      if (TYPE_CODE (t1[i].type) != TYPE_CODE (VALUE_TYPE (t2[i])))
 	return i + 1;
     }
-  if (!t1[i])
+  if (varargs || t2[i] == NULL)
     return 0;
-  return t2[i] ? i + 1 : 0;
+  return i + 1;
 }
 
 /* Helper function used by value_struct_elt to recurse through baseclasses.
@@ -2046,11 +2052,18 @@
 	  {
 	    struct value *v;
 	    if (TYPE_FIELD_STATIC (type, i))
-	      v = value_static_field (type, i);
+	      {
+		v = value_static_field (type, i);
+		if (v == 0)
+		  error ("field %s is nonexistent or has been optimised out",
+			 name);
+	      }
 	    else
-	      v = value_primitive_field (arg1, offset, i, type);
-	    if (v == 0)
-	      error ("there is no field named %s", name);
+	      {
+		v = value_primitive_field (arg1, offset, i, type);
+		if (v == 0)
+		  error ("there is no field named %s", name);
+	      }
 	    return v;
 	  }
 
@@ -2066,20 +2079,22 @@
 		/* Look for a match through the fields of an anonymous union,
 		   or anonymous struct.  C++ provides anonymous unions.
 
-		   In the GNU Chill implementation of variant record types,
-		   each <alternative field> has an (anonymous) union type,
-		   each member of the union represents a <variant alternative>.
-		   Each <variant alternative> is represented as a struct,
-		   with a member for each <variant field>.  */
+		   In the GNU Chill (OBSOLETE) implementation of
+		   variant record types, each <alternative field> has
+		   an (anonymous) union type, each member of the union
+		   represents a <variant alternative>.  Each <variant
+		   alternative> is represented as a struct, with a
+		   member for each <variant field>.  */
 
 		struct value *v;
 		int new_offset = offset;
 
-		/* This is pretty gross.  In G++, the offset in an anonymous
-		   union is relative to the beginning of the enclosing struct.
-		   In the GNU Chill implementation of variant records,
-		   the bitpos is zero in an anonymous union field, so we
-		   have to add the offset of the union here. */
+		/* This is pretty gross.  In G++, the offset in an
+		   anonymous union is relative to the beginning of the
+		   enclosing struct.  In the GNU Chill (OBSOLETE)
+		   implementation of variant records, the bitpos is
+		   zero in an anonymous union field, so we have to add
+		   the offset of the union here. */
 		if (TYPE_CODE (field_type) == TYPE_CODE_STRUCT
 		    || (TYPE_NFIELDS (field_type) > 0
 			&& TYPE_FIELD_BITPOS (field_type, 0) == 0))
@@ -2303,6 +2318,8 @@
 		if (TYPE_FN_FIELD_STUB (f, j))
 		  check_stub_method (type, i, j);
 		if (!typecmp (TYPE_FN_FIELD_STATIC_P (f, j),
+			      TYPE_VARARGS (TYPE_FN_FIELD_TYPE (f, j)),
+			      TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (f, j)),
 			      TYPE_FN_FIELD_ARGS (f, j), args))
 		  {
 		    if (TYPE_FN_FIELD_VIRTUAL_P (f, j))
@@ -2515,7 +2532,6 @@
  * ARGP is a pointer to a pointer to a value (the object)
  * METHOD is a string containing the method name
  * OFFSET is the offset within the value
- * STATIC_MEMFUNCP is set if the method is static
  * TYPE is the assumed type of the object
  * NUM_FNS is the number of overloaded instances
  * BASETYPE is set to the actual type of the subobject where the method is found
@@ -2606,7 +2622,6 @@
  * ARGP is a pointer to a pointer to a value (the object)
  * METHOD is the method name
  * OFFSET is the offset within the value contents
- * STATIC_MEMFUNCP is set if the method is static
  * NUM_FNS is the number of overloaded instances
  * BASETYPE is set to the type of the base subobject that defines the method
  * BOFFSET is the offset of the base subobject which defines the method */
@@ -2697,6 +2712,7 @@
   register int jj;
   register int ix;
   int static_offset;
+  struct cleanup *cleanups = NULL;
 
   char *obj_type_name = NULL;
   char *func_name = NULL;
@@ -2738,6 +2754,7 @@
         }
 
       oload_syms = make_symbol_overload_list (fsym);
+      cleanups = make_cleanup (xfree, oload_syms);
       while (oload_syms[++i])
 	num_fns++;
       if (!num_fns)
@@ -2754,13 +2771,7 @@
 	{
 	  if (TYPE_FN_FIELD_STATIC_P (fns_ptr, ix))
 	    static_offset = 1;
-	  nparms=0;
-
-	  if (TYPE_FN_FIELD_ARGS(fns_ptr,ix))
-	    {
-	      while (TYPE_CODE(TYPE_FN_FIELD_ARGS(fns_ptr,ix)[nparms]) != TYPE_CODE_VOID)
-		nparms++;
-	    }
+	  nparms = TYPE_NFIELDS (TYPE_FN_FIELD_TYPE (fns_ptr, ix));
 	}
       else
 	{
@@ -2772,7 +2783,7 @@
       parm_types = (struct type **) xmalloc (nparms * (sizeof (struct type *)));
       for (jj = 0; jj < nparms; jj++)
 	parm_types[jj] = (method
-			  ? (TYPE_FN_FIELD_ARGS (fns_ptr, ix)[jj])
+			  ? (TYPE_FN_FIELD_ARGS (fns_ptr, ix)[jj].type)
 			  : TYPE_FIELD_TYPE (SYMBOL_TYPE (oload_syms[ix]), jj));
 
       /* Compare parameter types to supplied argument types.  Skip THIS for
@@ -2900,6 +2911,9 @@
 	}
       *objp = temp;
     }
+  if (cleanups != NULL)
+    do_cleanups (cleanups);
+
   return oload_incompatible ? 100 : (oload_non_standard ? 10 : 0);
 }
 
@@ -3034,7 +3048,7 @@
 	    {
 	      v = value_static_field (t, i);
 	      if (v == NULL)
-		error ("Internal error: could not find static variable %s",
+		error ("static field %s has been optimized out",
 		       name);
 	      return v;
 	    }
@@ -3303,10 +3317,10 @@
   if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
     error ("slice from bad array or bitstring");
   if (lowbound < lowerbound || length < 0
-      || lowbound + length - 1 > upperbound
-  /* Chill allows zero-length strings but not arrays. */
-      || (current_language->la_language == language_chill
-	  && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY))
+      || lowbound + length - 1 > upperbound)
+    /* OBSOLETE Chill allows zero-length strings but not arrays. */
+    /* OBSOLETE || (current_language->la_language == language_chill */
+    /* OBSOLETE && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY)) */
     error ("slice out of range");
   /* FIXME-type-allocation: need a way to free this type when we are
      done with it.  */
@@ -3362,8 +3376,8 @@
   return slice;
 }
 
-/* Assuming chill_varying_type (VARRAY) is true, return an equivalent
-   value as a fixed-length array. */
+/* Assuming OBSOLETE chill_varying_type (VARRAY) is true, return an
+   equivalent value as a fixed-length array. */
 
 struct value *
 varying_to_slice (struct value *varray)
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 36854ce..b1c47a1 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -29,7 +29,6 @@
 #include "gdbcore.h"
 #include "gdbcmd.h"
 #include "target.h"
-#include "obstack.h"
 #include "language.h"
 #include "annotate.h"
 #include "valprint.h"
@@ -333,7 +332,7 @@
       fprintf_filtered (stream,
 			use_local ? local_decimal_format_custom ("ll")
 			: "%lld",
-			val_long);
+			(long long) val_long);
       break;
     case 'u':
       fprintf_filtered (stream, "%llu", (long long) val_long);
@@ -342,13 +341,13 @@
       fprintf_filtered (stream,
 			use_local ? local_hex_format_custom ("ll")
 			: "%llx",
-			val_long);
+			(unsigned long long) val_long);
       break;
     case 'o':
       fprintf_filtered (stream,
 			use_local ? local_octal_format_custom ("ll")
 			: "%llo",
-			val_long);
+			(unsigned long long) val_long);
       break;
     case 'b':
       fprintf_filtered (stream, local_hex_format_custom ("02ll"), val_long);
diff --git a/gdb/value.h b/gdb/value.h
index a0eb990..448c222 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -23,6 +23,8 @@
 #if !defined (VALUE_H)
 #define VALUE_H 1
 
+struct regcache;
+
 #include "doublest.h"
 
 /*
@@ -240,8 +242,8 @@
   do { COERCE_ARRAY(arg);  COERCE_ENUM(arg); } while (0)
 
 #define COERCE_VARYING_ARRAY(arg, real_arg_type)	\
-{ if (chill_varying_type (real_arg_type))  \
-    arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); }
+/* OBSOLETE { if (chill_varying_type (real_arg_type)) */  \
+/* OBSOLETE     arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); } */ 
 
 /* If ARG is an enum, convert it to an integer.  */
 
@@ -406,7 +408,8 @@
 extern struct value *value_subscript (struct value *array, struct value *idx);
 
 extern struct value *value_being_returned (struct type *valtype,
-					   char *retbuf, int struct_return);
+					   struct regcache *retbuf,
+					   int struct_return);
 
 extern struct value *value_in (struct value *element, struct value *set);
 
diff --git a/gdb/values.c b/gdb/values.c
index 225dd21..a0c9794 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -34,6 +34,7 @@
 #include "demangle.h"
 #include "doublest.h"
 #include "gdb_assert.h"
+#include "regcache.h"
 
 /* Prototypes for exported functions. */
 
@@ -792,7 +793,9 @@
 }
 
 
-/* Get the value of the FIELDN'th field (which must be static) of TYPE. */
+/* Get the value of the FIELDN'th field (which must be static) of
+   TYPE.  Return NULL if the field doesn't exist or has been
+   optimized out. */
 
 struct value *
 value_static_field (struct type *type, int fieldno)
@@ -808,7 +811,14 @@
     {
       char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
       struct symbol *sym = lookup_symbol (phys_name, 0, VAR_NAMESPACE, 0, NULL);
-      if (sym == NULL)
+      /* In some cases (involving uninitalized, unreferenced static
+	 const integral members), g++ -gdwarf-2 can emit debugging
+	 information giving rise to symbols whose SYMBOL_CLASS is
+	 LOC_UNRESOLVED.  In that case, do a minimal symbol lookup.
+	 If it returns a useful value, then the symbol was defined
+	 elsewhere, so we use that information.  Otherwise, return
+	 NULL. */
+      if (sym == NULL || SYMBOL_CLASS (sym) == LOC_UNRESOLVED)
 	{
 	  /* With some compilers, e.g. HP aCC, static data members are reported
 	     as non-debuggable symbols */
@@ -1224,7 +1234,8 @@
 
 /* ARGSUSED */
 struct value *
-value_being_returned (struct type *valtype, char *retbuf, int struct_return)
+value_being_returned (struct type *valtype, struct regcache *retbuf,
+		      int struct_return)
 {
   struct value *val;
   CORE_ADDR addr;
@@ -1239,6 +1250,17 @@
 	return value_at (valtype, addr, NULL);
       }
 
+  /* If this is not defined, just use EXTRACT_RETURN_VALUE instead.  */
+  if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+    if (struct_return)
+      {
+	char *buf = deprecated_grub_regcache_for_registers (retbuf);
+	addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (buf);
+	if (!addr)
+	  error ("Function return value unknown.");
+	return value_at (valtype, addr, NULL);
+      }
+
   val = allocate_value (valtype);
   CHECK_TYPEDEF (valtype);
   EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
@@ -1314,7 +1336,7 @@
       || code == TYPE_CODE_UNION)	/* FIXME, implement struct return.  */
     error ("GDB does not support specifying a struct or union return value.");
 
-  STORE_RETURN_VALUE (type, VALUE_CONTENTS (val));
+  STORE_RETURN_VALUE (type, current_regcache, VALUE_CONTENTS (val));
 }
 
 void
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 9ae145e..4ae046a 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -23,6 +23,7 @@
 #include "language.h"
 #include "wrapper.h"
 #include "gdbcmd.h"
+#include "gdb_string.h"
 #include <math.h>
 
 #include "varobj.h"
@@ -52,7 +53,7 @@
   struct block *valid_block;
 
   /* The frame for this expression */
-  CORE_ADDR frame;
+  struct frame_id frame;
 
   /* If 1, "update" always recomputes the frame & valid block
      using the currently selected frame. */
@@ -456,7 +457,7 @@
          Since select_frame is so benign, just call it for all cases. */
       if (fi != NULL)
 	{
-	  var->root->frame = FRAME_FP (fi);
+	  get_frame_id (fi, &var->root->frame);
 	  old_fi = selected_frame;
 	  select_frame (fi);
 	}
@@ -514,13 +515,13 @@
 varobj_gen_name (void)
 {
   static int id = 0;
-  char obj_name[31];
+  char *obj_name;
 
   /* generate a name for this object */
   id++;
-  sprintf (obj_name, "var%d", id);
+  xasprintf (&obj_name, "var%d", id);
 
-  return xstrdup (obj_name);
+  return obj_name;
 }
 
 /* Given an "objname", returns the pointer to the corresponding varobj
@@ -850,7 +851,8 @@
   struct value *new;
   struct vstack *stack = NULL;
   struct vstack *result = NULL;
-  struct frame_info *old_fi;
+  struct frame_id old_fid;
+  struct frame_info *fi;
 
   /* sanity check: have we been passed a pointer? */
   if (changelist == NULL)
@@ -863,7 +865,7 @@
 
   /* Save the selected stack frame, since we will need to change it
      in order to evaluate expressions. */
-  old_fi = selected_frame;
+  get_frame_id (selected_frame, &old_fid);
 
   /* Update the root variable. value_of_root can return NULL
      if the variable is no longer around, i.e. we stepped out of
@@ -983,7 +985,9 @@
     }
 
   /* Restore selected frame */
-  select_frame (old_fi);
+  fi = frame_find_by_id (old_fid);
+  if (fi)
+    select_frame (fi);
 
   if (type_changed)
     return -2;
@@ -1210,14 +1214,11 @@
   child->name = name;
   child->index = index;
   child->value = value_of_child (parent, index);
-  if ((!CPLUS_FAKE_CHILD(child) && child->value == NULL) || parent->error)
+  if ((!CPLUS_FAKE_CHILD (child) && child->value == NULL) || parent->error)
     child->error = 1;
   child->parent = parent;
   child->root = parent->root;
-  childs_name =
-    (char *) xmalloc ((strlen (parent->obj_name) + strlen (name) + 2) *
-		      sizeof (char));
-  sprintf (childs_name, "%s.%s", parent->obj_name, name);
+  xasprintf (&childs_name, "%s.%s", parent->obj_name, name);
   child->obj_name = childs_name;
   install_variable (child);
 
@@ -1306,7 +1307,8 @@
   var->root->lang = NULL;
   var->root->exp = NULL;
   var->root->valid_block = NULL;
-  var->root->frame = (CORE_ADDR) -1;
+  var->root->frame.base = 0;
+  var->root->frame.pc = 0;
   var->root->use_selected_frame = 0;
   var->root->rootvar = NULL;
 
@@ -1645,8 +1647,8 @@
   if (value != NULL && VALUE_LAZY (value))
     {
       /* If we fail to fetch the value of the child, return
-	 NULL so that callers notice that we're leaving an
-	 error message. */
+         NULL so that callers notice that we're leaving an
+         error message. */
       if (!gdb_value_fetch_lazy (value))
 	value = NULL;
     }
@@ -1794,14 +1796,7 @@
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_ARRAY:
-      {
-	/* We never get here unless parent->num_children is greater than 0... */
-	int len = 1;
-	while ((int) pow ((double) 10, (double) len) < index)
-	  len++;
-	name = (char *) xmalloc (1 + len * sizeof (char));
-	sprintf (name, "%d", index);
-      }
+      xasprintf (&name, "%d", index);
       break;
 
     case TYPE_CODE_STRUCT:
@@ -1820,9 +1815,7 @@
 	  break;
 
 	default:
-	  name =
-	    (char *) xmalloc ((strlen (parent->name) + 2) * sizeof (char));
-	  sprintf (name, "*%s", parent->name);
+	  xasprintf (&name, "*%s", parent->name);
 	  break;
 	}
       break;
@@ -1855,10 +1848,7 @@
   else
     {
       reinit_frame_cache ();
-
-
-      fi = find_frame_addr_in_frame_chain (var->root->frame);
-
+      fi = frame_find_by_id (var->root->frame);
       within_scope = fi != NULL;
       /* FIXME: select_frame could fail */
       if (within_scope)
@@ -1929,7 +1919,8 @@
 
 	case TYPE_CODE_STRUCT:
 	case TYPE_CODE_UNION:
-	  gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+	  gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+				"vstructure");
 	  break;
 
 	case TYPE_CODE_PTR:
@@ -1937,7 +1928,8 @@
 	    {
 	    case TYPE_CODE_STRUCT:
 	    case TYPE_CODE_UNION:
-	      gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL, "vstructure");
+	      gdb_value_struct_elt (NULL, &value, &temp, NULL, name, NULL,
+				    "vstructure");
 	      break;
 
 	    default:
@@ -2024,12 +2016,10 @@
 static char *
 c_value_of_variable (struct varobj *var)
 {
-  struct type *type;
-
   /* BOGUS: if val_print sees a struct/class, it will print out its
      children instead of "{...}" */
-  type = get_type (var);
-  switch (TYPE_CODE (type))
+
+  switch (TYPE_CODE (get_type (var)))
     {
     case TYPE_CODE_STRUCT:
     case TYPE_CODE_UNION:
@@ -2038,19 +2028,14 @@
 
     case TYPE_CODE_ARRAY:
       {
-	char number[18];
-	sprintf (number, "[%d]", var->num_children);
-	return xstrdup (number);
+	char *number;
+	xasprintf (&number, "[%d]", var->num_children);
+	return (number);
       }
       /* break; */
 
     default:
       {
-	long dummy;
-	struct ui_file *stb = mem_fileopen ();
-	struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
-	char *thevalue;
-
 	if (var->value == NULL)
 	  {
 	    /* This can happen if we attempt to get the value of a struct
@@ -2060,18 +2045,22 @@
 	  }
 	else
 	  {
+	    long dummy;
+	    struct ui_file *stb = mem_fileopen ();
+	    struct cleanup *old_chain = make_cleanup_ui_file_delete (stb);
+	    char *thevalue;
+
 	    if (VALUE_LAZY (var->value))
 	      gdb_value_fetch_lazy (var->value);
-	    val_print (VALUE_TYPE (var->value), VALUE_CONTENTS_RAW (var->value), 0,
-		       VALUE_ADDRESS (var->value),
-		       stb, format_code[(int) var->format], 1, 0, 0);
+	    val_print (VALUE_TYPE (var->value),
+		       VALUE_CONTENTS_RAW (var->value), 0,
+		       VALUE_ADDRESS (var->value), stb,
+		       format_code[(int) var->format], 1, 0, 0);
 	    thevalue = ui_file_xstrdup (stb, &dummy);
 	    do_cleanups (old_chain);
-	  }
-
 	return thevalue;
       }
-      /* break; */
+      }
     }
 }
 
@@ -2200,7 +2189,8 @@
 	  /* FIXME: This assumes that type orders
 	     inherited, public, private, protected */
 	  i = index + TYPE_N_BASECLASSES (type);
-	  if (STREQ (parent->name, "private") || STREQ (parent->name, "protected"))
+	  if (STREQ (parent->name, "private")
+	      || STREQ (parent->name, "protected"))
 	    i += children[v_public];
 	  if (STREQ (parent->name, "protected"))
 	    i += children[v_private];
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 0478227..709ef38 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -45,12 +45,10 @@
 static gdbarch_frame_args_address_ftype vax_frame_args_address;
 static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
 static gdbarch_frame_init_saved_regs_ftype vax_frame_init_saved_regs;
-static gdbarch_get_saved_register_ftype vax_get_saved_register;
 
 static gdbarch_store_struct_return_ftype vax_store_struct_return;
-static gdbarch_extract_return_value_ftype vax_extract_return_value;
-static gdbarch_store_return_value_ftype vax_store_return_value;
-static gdbarch_extract_struct_value_address_ftype
+static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
+static gdbarch_deprecated_extract_struct_value_address_ftype
     vax_extract_struct_value_address;
 
 static gdbarch_push_dummy_frame_ftype vax_push_dummy_frame;
@@ -83,7 +81,7 @@
 
 static unsigned char *print_insn_arg ();
 
-static char *
+static const char *
 vax_register_name (int regno)
 {
   static char *register_names[] =
@@ -125,51 +123,6 @@
 }
 
 static void
-vax_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
-                        struct frame_info *frame, int regnum,
-                        enum lval_type *lval)
-{
-  CORE_ADDR addr;
-
-  if (!target_has_registers)
-    error ("No registers.");
-
-  /* Normal systems don't optimize out things with register numbers.  */
-  if (optimized != NULL)
-    *optimized = 0;
-  addr = find_saved_register (frame, regnum);
-  if (addr != 0)
-    {
-      if (lval != NULL)
-	*lval = lval_memory;
-      if (regnum == SP_REGNUM)
-	{
-	  if (raw_buffer != NULL)
-	    {
-	      /* Put it back in target format.  */
-	      store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
-			     (LONGEST) addr);
-	    }
-	  if (addrp != NULL)
-	    *addrp = 0;
-	  return;
-	}
-      if (raw_buffer != NULL)
-	target_read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
-    }
-  else
-    {
-      if (lval != NULL)
-	*lval = lval_register;
-      addr = REGISTER_BYTE (regnum);
-      if (raw_buffer != NULL)
-	read_register_gen (regnum, raw_buffer);
-    }
-  if (addrp != NULL)
-    *addrp = addr;
-}
-
-static void
 vax_frame_init_saved_regs (struct frame_info *frame)
 {
   int regnum, regmask;
@@ -186,7 +139,7 @@
 
   /* regmask's low bit is for register 0, which is the first one
      what would be pushed.  */
-  for (regnum = 0; regnum < AP_REGNUM; regnum++)
+  for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
     {
       if (regmask & (1 << regnum))
         frame->saved_regs[regnum] = next_addr += 4;
@@ -199,7 +152,7 @@
 
   frame->saved_regs[PC_REGNUM] = frame->frame + 16;
   frame->saved_regs[FP_REGNUM] = frame->frame + 12;
-  frame->saved_regs[AP_REGNUM] = frame->frame + 8;
+  frame->saved_regs[VAX_AP_REGNUM] = frame->frame + 8;
   frame->saved_regs[PS_REGNUM] = frame->frame + 4;
 }
 
@@ -239,7 +192,7 @@
   if (frame->next)
     return (read_memory_integer (frame->next->frame + 8, 4));
 
-  return (read_register (AP_REGNUM));
+  return (read_register (VAX_AP_REGNUM));
 }
 
 static CORE_ADDR
@@ -276,12 +229,12 @@
     sp = push_word (sp, read_register (regnum));
   sp = push_word (sp, read_register (PC_REGNUM));
   sp = push_word (sp, read_register (FP_REGNUM));
-  sp = push_word (sp, read_register (AP_REGNUM));
+  sp = push_word (sp, read_register (VAX_AP_REGNUM));
   sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) + 0x2fff0000);
   sp = push_word (sp, 0);
   write_register (SP_REGNUM, sp);
   write_register (FP_REGNUM, sp);
-  write_register (AP_REGNUM, sp + (17 * 4));
+  write_register (VAX_AP_REGNUM, sp + (17 * 4));
 }
 
 static void
@@ -296,7 +249,7 @@
 		  | (read_register (PS_REGNUM) & 0xffff0000));
   write_register (PC_REGNUM, read_memory_integer (fp + 16, 4));
   write_register (FP_REGNUM, read_memory_integer (fp + 12, 4));
-  write_register (AP_REGNUM, read_memory_integer (fp + 8, 4));
+  write_register (VAX_AP_REGNUM, read_memory_integer (fp + 8, 4));
   fp += 16;
   for (regnum = 0; regnum < 12; regnum++)
     if (regmask & (0x10000 << regnum))
@@ -353,6 +306,15 @@
   return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
 }
 
+static const unsigned char *
+vax_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+  static const unsigned char vax_breakpoint[] = { 3 };
+
+  *lenptr = sizeof(vax_breakpoint);
+  return (vax_breakpoint);
+}
+
 /* Advance PC across any function entry prologue instructions
    to reach some "real" code.  */
 
@@ -620,13 +582,30 @@
 static struct gdbarch *
 vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
+  struct gdbarch_tdep *tdep;
   struct gdbarch *gdbarch;
+  enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
 
-  /* Right now there is only one VAX architecture variant.  */
-  if (arches != NULL)
-    return (arches->gdbarch);
+  /* Try to determine the ABI of the object we are loading.  */
 
-  gdbarch = gdbarch_alloc (&info, NULL);
+  if (info.abfd != NULL)
+    osabi = gdbarch_lookup_osabi (info.abfd);
+
+  /* Find a candidate among extant architectures.  */
+  for (arches = gdbarch_list_lookup_by_info (arches, &info);
+       arches != NULL;
+       arches = gdbarch_list_lookup_by_info (arches->next, &info))
+    {
+      /* Make sure the ABI selection matches.  */
+      tdep = gdbarch_tdep (arches->gdbarch);
+      if (tdep && tdep->osabi == osabi)
+	return arches->gdbarch;
+    }
+
+  tdep = xmalloc (sizeof (struct gdbarch_tdep));
+  gdbarch = gdbarch_alloc (&info, tdep);
+
+  tdep->osabi = osabi;
 
   /* Register info */
   set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS);
@@ -665,16 +644,13 @@
 
   set_gdbarch_frame_args_skip (gdbarch, 4);
 
-  set_gdbarch_get_saved_register (gdbarch, vax_get_saved_register);
-
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Return value info */
   set_gdbarch_store_struct_return (gdbarch, vax_store_struct_return);
-  set_gdbarch_extract_return_value (gdbarch, vax_extract_return_value);
-  set_gdbarch_store_return_value (gdbarch, vax_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch,
-					    vax_extract_struct_value_address);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, vax_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
 
   /* Call dummy info */
   set_gdbarch_push_dummy_frame (gdbarch, vax_push_dummy_frame);
@@ -692,18 +668,35 @@
   set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
 
   /* Breakpoint info */
+  set_gdbarch_breakpoint_from_pc (gdbarch, vax_breakpoint_from_pc);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
 
   /* Misc info */
   set_gdbarch_function_start_offset (gdbarch, 2);
+  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+
+  /* Hook in ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch, osabi);
 
   return (gdbarch);
 }
 
+static void
+vax_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (tdep == NULL)
+    return;
+
+  fprintf_unfiltered (file, "vax_dump_tdep: OS ABI = %s\n",
+		      gdbarch_osabi_name (tdep->osabi));
+}
+
 void
 _initialize_vax_tdep (void)
 {
-  gdbarch_register (bfd_arch_vax, vax_gdbarch_init, NULL);
+  gdbarch_register (bfd_arch_vax, vax_gdbarch_init, vax_dump_tdep);
 
   tm_print_insn = vax_print_insn;
 }
diff --git a/gdb/vax-tdep.h b/gdb/vax-tdep.h
index 95324bc..ccabdd5 100644
--- a/gdb/vax-tdep.h
+++ b/gdb/vax-tdep.h
@@ -21,6 +21,8 @@
 #ifndef VAX_TDEP_H
 #define VAX_TDEP_H
 
+#include "osabi.h"
+
 /* Say how long (ordinary) registers are.  This is a piece of bogosity
    used in push_word and a few other places;  REGISTER_RAW_SIZE is the
    real way to know how big a register is.  */
@@ -52,4 +54,10 @@
 #define VAX_PC_REGNUM     15  /* Contains program counter */
 #define VAX_PS_REGNUM     16  /* Contains processor status */
 
+/* Target-dependent structure in gdbarch.  */ 
+struct gdbarch_tdep
+{  
+  enum gdb_osabi osabi;		/* OS/ABI of inferior.  */
+};
+
 #endif /* VAX_TDEP_H */
diff --git a/gdb/version.in b/gdb/version.in
index 728029e..5e82357 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-05-28-cvs
+2002-08-24-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index d519f7b..e0377c5 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -1334,7 +1334,7 @@
 static BOOL WINAPI (*DebugActiveProcessStop)(DWORD);
 
 static int
-has_detach_ability ()
+has_detach_ability (void)
 {
   static HMODULE kernel32 = NULL;
 
@@ -1815,7 +1815,7 @@
 }
 
 void
-_initialize_inftarg (void)
+_initialize_win32_nat (void)
 {
   struct cmd_list_element *c;
 
diff --git a/gdb/wince.c b/gdb/wince.c
index e37866c..a640bea 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -1965,7 +1965,7 @@
 }
 
 void
-_initialize_inftarg (void)
+_initialize_wince (void)
 {
   struct cmd_list_element *set;
   init_child_ops ();
diff --git a/gdb/wrapper.c b/gdb/wrapper.c
index 4d39008..6c9c6d6 100644
--- a/gdb/wrapper.c
+++ b/gdb/wrapper.c
@@ -19,9 +19,8 @@
 #include "defs.h"
 #include "value.h"
 #include "wrapper.h"
-#include "top.h"		/* for execute_command */
 
-/* use this struct to pass arguments to wrapper routines. We assume
+/* Use this struct to pass arguments to wrapper routines. We assume
    (arbitrarily) that no gdb function takes more than ten arguments. */
 struct gdb_wrapper_arguments
   {
@@ -52,12 +51,6 @@
   struct value **result_ptr;
 };
 
-struct captured_execute_command_args
-{
-  char *command;
-  int from_tty;
-};
-
 static int wrap_parse_exp_1 (char *);
 
 static int wrap_evaluate_expression (char *);
@@ -338,20 +331,3 @@
   return GDB_RC_OK;
 }
 
-static int
-do_captured_execute_command (struct ui_out *uiout, void *data)
-{
-  struct captured_execute_command_args *args = data;
-  execute_command (args->command, args->from_tty);
-  return GDB_RC_OK;
-}
-
-enum gdb_rc
-gdb_execute_command (struct ui_out *uiout, char *command, int from_tty)
-{
-  struct captured_execute_command_args args;
-  args.command = command;
-  args.from_tty = from_tty;
-  return catch_exceptions (uiout, do_captured_execute_command, &args,
-			   NULL, RETURN_MASK_ALL);
-}
diff --git a/gdb/wrapper.h b/gdb/wrapper.h
index 8507274..977a77d 100644
--- a/gdb/wrapper.h
+++ b/gdb/wrapper.h
@@ -21,10 +21,6 @@
 #include "gdb.h"
 
 struct value;
-struct block;
-struct expression;
-struct ui_out;
-struct type;
 
 /* Use this struct to pass arguments to wrapper routines. */
 struct gdb_wrapper_arguments;
@@ -50,6 +46,4 @@
 
 extern int gdb_parse_and_eval_type (char *, int, struct type **);
 
-extern enum gdb_rc gdb_execute_command (struct ui_out *uiout, char *command,
-					int from_tty);
 #endif /* WRAPPER_H */
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index f57a5f2..7749b41 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -25,7 +25,6 @@
 #include "inferior.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "i387-tdep.h"
 #include "gdb_assert.h"
 #include "x86-64-tdep.h"
 
@@ -195,23 +194,73 @@
 
 /* Transfering floating-point registers between GDB, inferiors and cores.  */
 
-/* Fill GDB's register array with the floating-point register values in
-   *FPREGSETP.  */
-
-void
-supply_fpregset (elf_fpregset_t * fpregsetp)
+static void *
+x86_64_fxsave_offset (elf_fpregset_t * fxsave, int regnum)
 {
-  i387_supply_fxsave ((char *) fpregsetp);
+  const char *reg_name;
+  int reg_index;
+
+  gdb_assert (x86_64_num_gregs - 1 < regnum && regnum < x86_64_num_regs);
+
+  reg_name = x86_64_register_name (regnum);
+
+  if (reg_name[0] == 's' && reg_name[1] == 't')
+    {
+      reg_index = reg_name[2] - '0';
+      return &fxsave->st_space[reg_index * 2];
+    }
+
+  if (reg_name[0] == 'x' && reg_name[1] == 'm' && reg_name[2] == 'm')
+    {
+      reg_index = reg_name[3] - '0';
+      return &fxsave->xmm_space[reg_index * 4];
+    }
+
+  if (strcmp (reg_name, "mxcsr") == 0)
+    return &fxsave->mxcsr;
+
+  return NULL;
 }
 
-/* Fill register REGNO (if it is a floating-point register) in
-   *FPREGSETP with the value in GDB's register array.  If REGNO is -1,
-   do this for all registers.  */
+/* Fill GDB's register array with the floating-point and SSE register
+   values in *FXSAVE.  This function masks off any of the reserved
+   bits in *FXSAVE.  */
 
 void
-fill_fpregset (elf_fpregset_t * fpregsetp, int regno)
+supply_fpregset (elf_fpregset_t * fxsave)
 {
-  i387_fill_fxsave ((char *) fpregsetp, regno);
+  int i, reg_st0, reg_mxcsr;
+
+  reg_st0 = x86_64_register_number ("st0");
+  reg_mxcsr = x86_64_register_number ("mxcsr");
+
+  gdb_assert (reg_st0 > 0 && reg_mxcsr > reg_st0);
+
+  for (i = reg_st0; i <= reg_mxcsr; i++)
+    supply_register (i, x86_64_fxsave_offset (fxsave, i));
+}
+
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+   *FXSAVE with the value in GDB's register array.  If REGNUM is -1, do
+   this for all registers.  This function doesn't touch any of the
+   reserved bits in *FXSAVE.  */
+
+void
+fill_fpregset (elf_fpregset_t * fxsave, int regnum)
+{
+  int i, last_regnum = MXCSR_REGNUM;
+  void *ptr;
+
+  if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
+    last_regnum = FOP_REGNUM;
+
+  for (i = FP0_REGNUM; i <= last_regnum; i++)
+    if (regnum == -1 || regnum == i)
+      {
+	ptr = x86_64_fxsave_offset (fxsave, i);
+	if (ptr)
+	  regcache_collect (i, ptr);
+      }
 }
 
 /* Fetch all floating-point registers from process/thread TID and store
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index a3f8bee..a47f5e7 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -28,6 +28,7 @@
 #include "arch-utils.h"
 #include "regcache.h"
 #include "symfile.h"
+#include "objfiles.h"
 #include "x86-64-tdep.h"
 #include "dwarf2cfi.h"
 #include "gdb_assert.h"
@@ -376,14 +377,15 @@
 		{
 		  int num = classify_argument (TYPE_FIELDS (type)[j].type,
 					       subclasses,
-					       (TYPE_FIELDS (type)[j].loc.bitpos
-						+ bit_offset) % 256);
+					       (TYPE_FIELDS (type)[j].loc.
+						bitpos + bit_offset) % 256);
 		  if (!num)
 		    return 0;
 		  for (i = 0; i < num; i++)
 		    {
 		      int pos =
-			(TYPE_FIELDS (type)[j].loc.bitpos + bit_offset) / 8 / 8;
+			(TYPE_FIELDS (type)[j].loc.bitpos +
+			 bit_offset) / 8 / 8;
 		      classes[i + pos] =
 			merge_classes (subclasses[i], classes[i + pos]);
 		    }
@@ -490,7 +492,7 @@
 	}
     case TYPE_CODE_VOID:
       return 0;
-    default: /* Avoid warning.  */
+    default:			/* Avoid warning.  */
       break;
     }
   internal_error (__FILE__, __LINE__,
@@ -797,13 +799,24 @@
 }
 
 
-static char *
+const char *
 x86_64_register_name (int reg_nr)
 {
   if (reg_nr < 0 || reg_nr >= X86_64_NUM_REGS)
     return NULL;
   return x86_64_register_info_table[reg_nr].name;
 }
+
+int
+x86_64_register_number (const char *name)
+{
+  int reg_nr;
+
+  for (reg_nr = 0; reg_nr < X86_64_NUM_REGS; reg_nr++)
+    if (strcmp (name, x86_64_register_info_table[reg_nr].name) == 0)
+      return reg_nr;
+  return -1;
+}
 
 
 
@@ -845,10 +858,10 @@
 CORE_ADDR
 x86_64_skip_prologue (CORE_ADDR pc)
 {
-  int i, firstline, currline;
+  int i;
   struct symtab_and_line v_sal;
   struct symbol *v_function;
-  CORE_ADDR salendaddr = 0, endaddr = 0;
+  CORE_ADDR endaddr;
 
   /* We will handle only functions beginning with:
      55          pushq %rbp
@@ -862,7 +875,7 @@
   /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp.  */
   for (i = 0; i < PROLOG_BUFSIZE; i++)
     if (prolog_expect[i] != prolog_buf[i])
-      return pc;	/* ... no, it doesn't. Nothing to skip.  */
+      return pc;		/* ... no, it doesn't. Nothing to skip.  */
 
   /* OK, we have found the prologue and want PC of the first 
      non-prologue instruction.  */
@@ -876,18 +889,13 @@
   if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
     return pc;
 
-  firstline = v_sal.line;
-  currline = firstline;
-  salendaddr = v_sal.end;
   endaddr = v_function->ginfo.value.block->endaddr;
 
   for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
-    if (v_sal.symtab->linetable->item[i].line > firstline
-	&& v_sal.symtab->linetable->item[i].pc >= salendaddr
+    if (v_sal.symtab->linetable->item[i].pc >= pc
 	&& v_sal.symtab->linetable->item[i].pc < endaddr)
       {
 	pc = v_sal.symtab->linetable->item[i].pc;
-	currline = v_sal.symtab->linetable->item[i].line;
 	break;
       }
 
@@ -1069,7 +1077,7 @@
 /* Return number of args passed to a frame, no way to tell.  */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 /* Don't use default structure extract routine */
-  set_gdbarch_extract_struct_value_address (gdbarch, 0);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
 
 /* If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
    and EXTRACT_RETURN_VALUE to store/fetch the functions return value.  It is
@@ -1083,12 +1091,12 @@
 /* Extract from an array REGBUF containing the (raw) register state
    a function return value of type TYPE, and copy that, in virtual format,
    into VALBUF.  */
-  set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, x86_64_extract_return_value);
 
 
 /* Write into the appropriate registers a function return value stored
    in VALBUF of type TYPE, given in virtual format.  */
-  set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
+  set_gdbarch_deprecated_store_return_value (gdbarch, x86_64_store_return_value);
 
 
 /* Offset from address of function to start of its code.  */
@@ -1104,6 +1112,7 @@
 				  (gdbarch_breakpoint_from_pc_ftype *)
 				  x86_64_breakpoint_from_pc);
 
+  set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
 
 /* Amount PC must be decremented by after a breakpoint.  This is often the
    number of bytes in BREAKPOINT but not always.  */
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index d15b8e7..7114860 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -28,6 +28,10 @@
 extern int x86_64_num_regs;
 extern int x86_64_num_gregs;
 
+int x86_64_register_number (const char *name);
+const char *x86_64_register_name (int reg_nr);
+	
+
 gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
 gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
 
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index d878111..0e85125 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2277,6 +2277,7 @@
 		    break;
 
 		  case XMC_RW:
+		  case XMC_TD:
 		    /* Data variables are recorded in the minimal symbol
 		       table, except for section symbols.  */
 		    if (*namestring != '.')
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f8c20b7..d358313 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -97,7 +97,7 @@
 /* Function: xstormy16_register_name
    Returns the name of the standard Xstormy16 register N. */
 
-static char *
+static const char *
 xstormy16_register_name (int regnum)
 {
   static char *register_names[] = {
@@ -1086,13 +1086,12 @@
   set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, xstormy16_push_return_address);
-  set_gdbarch_extract_return_value (gdbarch, xstormy16_extract_return_value);
+  set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);
   set_gdbarch_pop_frame (gdbarch, xstormy16_pop_frame);
   set_gdbarch_store_struct_return (gdbarch, xstormy16_store_struct_return);
-  set_gdbarch_store_return_value (gdbarch, xstormy16_store_return_value);
-  set_gdbarch_extract_struct_value_address (gdbarch,
-					    xstormy16_extract_struct_value_address);
+  set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
+  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch,
 				     xstormy16_use_struct_convention);
   set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index 572a878..c7396e2 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -27,7 +27,6 @@
 
 #include "defs.h"
 #include "frame.h"
-#include "obstack.h"
 #include "symtab.h"
 #include "gdbcmd.h"
 #include "gdbtypes.h"
@@ -325,25 +324,26 @@
 {
   if ((regno & 1) == 0 && regno < 16)
     {
-      unsigned short l[2];
+      unsigned char l[4];
 
-      frame_register_read (selected_frame, regno, (char *) (l + 0));
-      frame_register_read (selected_frame, regno + 1, (char *) (l + 1));
+      frame_register_read (selected_frame, regno, l + 0);
+      frame_register_read (selected_frame, regno + 1, l + 2);
       printf_unfiltered ("\t");
-      printf_unfiltered ("%04x%04x", l[0], l[1]);
+      printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
     }
 
   if ((regno & 3) == 0 && regno < 16)
     {
-      unsigned short l[4];
+      unsigned char l[8];
 
-      frame_register_read (selected_frame, regno, (char *) (l + 0));
-      frame_register_read (selected_frame, regno + 1, (char *) (l + 1));
-      frame_register_read (selected_frame, regno + 2, (char *) (l + 2));
-      frame_register_read (selected_frame, regno + 3, (char *) (l + 3));
+      frame_register_read (selected_frame, regno, l + 0);
+      frame_register_read (selected_frame, regno + 1, l + 2);
+      frame_register_read (selected_frame, regno + 2, l + 4);
+      frame_register_read (selected_frame, regno + 3, l + 6);
 
       printf_unfiltered ("\t");
-      printf_unfiltered ("%04x%04x%04x%04x", l[0], l[1], l[2], l[3]);
+      printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
+                         l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7]);
     }
   if (regno == 15)
     {
diff --git a/include/ChangeLog b/include/ChangeLog
index d64d48c..39f1874 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,94 @@
+2002-08-07  H.J. Lu <hjl@gnu.org>
+
+	* bfdlink.h (bfd_link_info): Add allow_undefined_version.
+	(bfd_elf_version_expr): Add symver and script.
+
+2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
+
+	* bfdlink.h (bfd_link_common_skip_ar_symbols): New enum.
+	(struct bfd_link_info): Add new field 'common_skip_ar_symbols'.
+
+2002-07-25  Richard Sandiford  <rsandifo@redhat.com>
+
+	* opcode/mips.h (CPU_R2000): Remove.
+
+2002-07-19  Denis Chertykov  <denisc@overta.ru>
+	    Matthew Green  <mrg@redhat.com>
+
+	* dis-asm.h (print_insn_ip2k): Declare.
+
+2002-07-10  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf/common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED,
+	DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define.
+
+2002-07-01  Alan Modra  <amodra@bigpond.net.au>
+
+	* bfdlink.h (struct bfd_sym_chain): Declare.
+	(struct bfd_link_info): Add gc_sym_list.  Formatting fixes.
+
+2002-06-25  Alan Modra  <amodra@bigpond.net.au>
+
+	* demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
+	* fibheap.h: Likewise.
+	* hashtab.h: Likewise.
+	* partition.h: Likewise.
+	* sort.h: Likewise.
+	* splay-tree.h: Likewise.
+
+2002-06-24  Alan Modra  <amodra@bigpond.net.au>
+
+	* libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
+	* getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
+
+2002-06-18  Dave Brolley  <brolley@redhat.com>
+
+	From Catherine Moore:
+	* dis-asm.h (print_insn_frv): New prototype.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* remote-sim.h: Move to directory gdb/.
+	* callback.h: Move to directory gdb/.
+
+2002-06-07  Charles Wilson  <cwilson@ece.gatech.edu>
+
+	* bfdlink.h (struct bfd_link_info): Change type of
+	pei386_auto_import field to int so that -1 can mean enabled by
+	default and 1 can mean enabled by command line switch.
+
+2002-06-06  DJ Delorie  <dj@redhat.com>
+
+	* hashtab.h (htab): Rearrange new members for backward
+	compatibility.
+	(htab_create): Don't use a macro that requires other headers.
+
+2002-06-05  Geoffrey Keating  <geoffk@redhat.com>
+
+	* hashtab.h (htab_create): Restore prototype for backward
+	compatibility.
+	(htab_try_create): Likewise.
+
+2002-05-22  Geoffrey Keating  <geoffk@redhat.com>
+
+	* hashtab.h (struct htab): Update for change to length specifier.
+
+2002-05-10  Geoffrey Keating  <geoffk@redhat.com>
+
+	* hashtab.h (GTY): Define if undefined.
+	(htab_alloc): New typedef.
+	(htab_free): New typedef.
+	(struct htab): Support gengtype; allow user-specified memory
+	allocation.
+	(htab_create_alloc): New.
+	(htab_create): Replace with #define.
+	(htab_try_create): Delete.
+
+2002-05-31  Michal Ludvig  <mludvig@suse.cz>
+
+	* elf/dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed
+	to DW_CFA_lo_user, DW_CFA_hi_user respectively.
+	
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 	* dis-asm.h: Prototype print_insn_dlx.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index b1411c3..4998fe3 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -3,21 +3,21 @@
    Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
 
-This file is part of BFD, the Binary File Descriptor library.
+   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 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.
+   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.  */
+   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 BFDLINK_H
 #define BFDLINK_H
@@ -66,6 +66,14 @@
   bfd_link_hash_warning		/* Like indirect, but warn if referenced.  */
 };
 
+enum bfd_link_common_skip_ar_aymbols
+{
+  bfd_link_common_skip_none,
+  bfd_link_common_skip_text,
+  bfd_link_common_skip_data,
+  bfd_link_common_skip_all
+};
+
 /* The linking routines use a hash table which uses this structure for
    its elements.  */
 
@@ -183,6 +191,12 @@
 /* Add an entry to the undefs list.  */
 extern void bfd_link_add_undef
   PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
+
+struct bfd_sym_chain
+{
+  struct bfd_sym_chain *next;
+  const char *name;
+};
 
 /* This structure holds all the information needed to communicate
    between BFD and the linker when doing a link.  */
@@ -191,33 +205,46 @@
 {
   /* Function callbacks.  */
   const struct bfd_link_callbacks *callbacks;
+
   /* true if BFD should generate a relocateable object file.  */
   boolean relocateable;
-  /* true if BFD should generate relocation information in the final executable.  */
+
+  /* true if BFD should generate relocation information in the final
+     executable.  */
   boolean emitrelocations;
+
   /* true if BFD should generate a "task linked" object file,
-     similar to relocatable but also with globals converted to statics. */
+     similar to relocatable but also with globals converted to
+     statics.  */
   boolean task_link;
+
   /* true if BFD should generate a shared object.  */
   boolean shared;
+
   /* true if BFD should pre-bind symbols in a shared object.  */
   boolean symbolic;
+
   /* true if BFD should export all symbols in the dynamic symbol table
      of an executable, rather than only those used.  */
   boolean export_dynamic;
+
   /* true if shared objects should be linked directly, not shared.  */
   boolean static_link;
+
   /* true if the output file should be in a traditional format.  This
      is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
      on the output file, but may be checked when reading the input
      files.  */
   boolean traditional_format;
+
   /* true if we want to produced optimized output files.  This might
      need much more time and therefore must be explicitly selected.  */
   boolean optimize;
+
   /* true if BFD should generate errors for undefined symbols
      even if generating a shared object.  */
   boolean no_undefined;
+
   /* true if BFD should allow undefined symbols in shared objects even
      when no_undefined is set to disallow undefined symbols.  The net
      result will be that undefined symbols in regular objects will
@@ -231,39 +258,58 @@
      select an appropriate memset function.  Apparently it is also
      normal for HPPA shared libraries to have undefined symbols.  */
   boolean allow_shlib_undefined;
-  /* True if ok to have multiple definition.  */
+
+  /* true if ok to have multiple definition.  */
   boolean allow_multiple_definition;
+
+  /* true if ok to have version with no definition.  */
+  boolean allow_undefined_version;
+
   /* Which symbols to strip.  */
   enum bfd_link_strip strip;
+
   /* Which local symbols to discard.  */
   enum bfd_link_discard discard;
+
   /* true if symbols should be retained in memory, false if they
      should be freed and reread.  */
   boolean keep_memory;
+
   /* The list of input BFD's involved in the link.  These are chained
      together via the link_next field.  */
   bfd *input_bfds;
+
   /* If a symbol should be created for each input BFD, this is section
      where those symbols should be placed.  It must be a section in
      the output BFD.  It may be NULL, in which case no such symbols
      will be created.  This is to support CREATE_OBJECT_SYMBOLS in the
      linker command language.  */
   asection *create_object_symbols_section;
+
+  /* List of global symbol names that are starting points for marking
+     sections against garbage collection.  */
+  struct bfd_sym_chain *gc_sym_list;
+
   /* Hash table handled by BFD.  */
   struct bfd_link_hash_table *hash;
+
   /* Hash table of symbols to keep.  This is NULL unless strip is
      strip_some.  */
   struct bfd_hash_table *keep_hash;
+
   /* true if every symbol should be reported back via the notice
      callback.  */
   boolean notice_all;
+
   /* Hash table of symbols to report back via the notice callback.  If
      this is NULL, and notice_all is false, then no symbols are
      reported back.  */
   struct bfd_hash_table *notice_hash;
+
   /* Hash table of symbols which are being wrapped (the --wrap linker
      option).  If this is NULL, no symbols are being wrapped.  */
   struct bfd_hash_table *wrap_hash;
+
   /* If a base output file is wanted, then this points to it */
   PTR base_file;
 
@@ -275,6 +321,7 @@
   /* The function to call when the executable or shared object is
      loaded.  */
   const char *init_function;
+
   /* The function to call when the executable or shared object is
      unloaded.  */
   const char *fini_function;
@@ -288,9 +335,10 @@
   /* May be used to set DT_FLAGS_1 for ELF. */
   bfd_vma flags_1;
 
-  /* True if auto-import thunks for DATA items in pei386 DLLs 
-     should be generated/linked against.  */
-  boolean pei386_auto_import;
+  /* Non-zero if auto-import thunks for DATA items in pei386 DLLs 
+     should be generated/linked against.  Set to 1 if this feature
+     is explicitly requested by the user, -1 if enabled by default.  */
+  int pei386_auto_import;
 
   /* True if non-PLT relocs should be merged into one reloc section
      and sorted so that relocs against the same symbol come together.  */
@@ -306,6 +354,10 @@
 
   /* How many spare .dynamic DT_NULL entries should be added?  */
   unsigned int spare_dynamic_tags;
+
+  /* Criteria for skipping symbols when detemining
+     whether to include an object from an archive. */
+  enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
 };
 
 /* This structures holds a set of callback functions.  These are
@@ -553,6 +605,10 @@
   const char *pattern;
   /* Matching function.  */
   int (*match) PARAMS((struct bfd_elf_version_expr *, const char *));
+  /* Defined by ".symver".  */
+  unsigned int symver: 1;
+  /* Defined by version script.  */
+  unsigned int script : 1;
 };
 
 /* Version dependencies.  */
diff --git a/include/callback.h b/include/callback.h
deleted file mode 100644
index 3075284..0000000
--- a/include/callback.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Remote target system call callback support.
-   Copyright 1997 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* This interface isn't intended to be specific to any particular kind
-   of remote (hardware, simulator, whatever).  As such, support for it
-   (e.g. sim/common/callback.c) should *not* live in the simulator source
-   tree, nor should it live in the gdb source tree.  */
-
-/* There are various ways to handle system calls:
-
-   1) Have a simulator intercept the appropriate trap instruction and
-   directly perform the system call on behalf of the target program.
-   This is the typical way of handling system calls for embedded targets.
-   [Handling system calls for embedded targets isn't that much of an
-   oxymoron as running compiler testsuites make use of the capability.]
-
-   This method of system call handling is done when STATE_ENVIRONMENT
-   is ENVIRONMENT_USER.
-
-   2) Have a simulator emulate the hardware as much as possible.
-   If the program running on the real hardware communicates with some sort
-   of target manager, one would want to be able to run this program on the
-   simulator as well.
-
-   This method of system call handling is done when STATE_ENVIRONMENT
-   is ENVIRONMENT_OPERATING.
-*/
-
-#ifndef CALLBACK_H
-#define CALLBACK_H
-
-/* ??? The reason why we check for va_start here should be documented.  */
-
-#ifndef va_start
-#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#endif
-
-/* Mapping of host/target values.  */
-/* ??? For debugging purposes, one might want to add a string of the
-   name of the symbol.  */
-
-typedef struct {
-  int host_val;
-  int target_val;
-} CB_TARGET_DEFS_MAP;
-
-#define MAX_CALLBACK_FDS 10
-
-/* Forward decl for stat/fstat.  */
-struct stat;
-
-typedef struct host_callback_struct host_callback;
-
-struct host_callback_struct 
-{
-  int (*close) PARAMS ((host_callback *,int));
-  int (*get_errno) PARAMS ((host_callback *));
-  int (*isatty) PARAMS ((host_callback *, int));
-  int (*lseek) PARAMS ((host_callback *, int, long , int));
-  int (*open) PARAMS ((host_callback *, const char*, int mode));
-  int (*read) PARAMS ((host_callback *,int,  char *, int));
-  int (*read_stdin) PARAMS (( host_callback *, char *, int));
-  int (*rename) PARAMS ((host_callback *, const char *, const char *));
-  int (*system) PARAMS ((host_callback *, const char *));
-  long (*time) PARAMS ((host_callback *, long *));
-  int (*unlink) PARAMS ((host_callback *, const char *));
-  int (*write) PARAMS ((host_callback *,int, const char *, int));
-  int (*write_stdout) PARAMS ((host_callback *, const char *, int));
-  void (*flush_stdout) PARAMS ((host_callback *));
-  int (*write_stderr) PARAMS ((host_callback *, const char *, int));
-  void (*flush_stderr) PARAMS ((host_callback *));
-  int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
-  int (*fstat) PARAMS ((host_callback *, int, struct stat *));
-
-  /* When present, call to the client to give it the oportunity to
-     poll any io devices for a request to quit (indicated by a nonzero
-     return value). */
-  int (*poll_quit) PARAMS ((host_callback *));
-
-  /* Used when the target has gone away, so we can close open
-     handles and free memory etc etc.  */
-  int (*shutdown) PARAMS ((host_callback *));
-  int (*init)     PARAMS ((host_callback *));
-
-  /* depreciated, use vprintf_filtered - Talk to the user on a console.  */
-  void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
-
-  /* Talk to the user on a console.  */
-  void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
-  /* Same as vprintf_filtered but to stderr.  */
-  void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
-  /* Print an error message and "exit".
-     In the case of gdb "exiting" means doing a longjmp back to the main
-     command loop.  */
-  void (*error) PARAMS ((host_callback *, const char *, ...));
-
-  int last_errno;		/* host format */
-
-  int fdmap[MAX_CALLBACK_FDS];
-  char fdopen[MAX_CALLBACK_FDS];
-  char alwaysopen[MAX_CALLBACK_FDS];
-
-  /* System call numbers.  */
-  CB_TARGET_DEFS_MAP *syscall_map;
-  /* Errno values.  */
-  CB_TARGET_DEFS_MAP *errno_map;
-  /* Flags to the open system call.  */
-  CB_TARGET_DEFS_MAP *open_map;
-  /* Signal numbers.  */
-  CB_TARGET_DEFS_MAP *signal_map;
-  /* Layout of `stat' struct.
-     The format is a series of "name,length" pairs separated by colons.
-     Empty space is indicated with a `name' of "space".
-     All padding must be explicitly mentioned.
-     Lengths are in bytes.  If this needs to be extended to bits,
-     use "name.bits".
-     Example: "st_dev,4:st_ino,4:st_mode,4:..."  */
-  const char *stat_map;
-
-  /* Marker for those wanting to do sanity checks.
-     This should remain the last member of this struct to help catch
-     miscompilation errors. */
-#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
-  int magic;
-};
-
-extern host_callback default_callback;
-
-/* Canonical versions of system call numbers.
-   It's not intended to willy-nilly throw every system call ever heard
-   of in here.  Only include those that have an important use.
-   ??? One can certainly start a discussion over the ones that are currently
-   here, but that will always be true.  */
-
-/* These are used by the ANSI C support of libc.  */
-#define	CB_SYS_exit	1
-#define	CB_SYS_open	2
-#define	CB_SYS_close	3
-#define	CB_SYS_read	4
-#define	CB_SYS_write	5
-#define	CB_SYS_lseek	6
-#define	CB_SYS_unlink	7
-#define	CB_SYS_getpid	8
-#define	CB_SYS_kill	9
-#define CB_SYS_fstat    10
-/*#define CB_SYS_sbrk	11 - not currently a system call, but reserved.  */
-
-/* ARGV support.  */
-#define CB_SYS_argvlen	12
-#define CB_SYS_argv	13
-
-/* These are extras added for one reason or another.  */
-#define CB_SYS_chdir	14
-#define CB_SYS_stat	15
-#define CB_SYS_chmod 	16
-#define CB_SYS_utime 	17
-#define CB_SYS_time 	18
-
-/* Struct use to pass and return information necessary to perform a
-   system call.  */
-/* FIXME: Need to consider target word size.  */
-
-typedef struct cb_syscall {
-  /* The target's value of what system call to perform.  */
-  int func;
-  /* The arguments to the syscall.  */
-  long arg1, arg2, arg3, arg4;
-
-  /* The result.  */
-  long result;
-  /* Some system calls have two results.  */
-  long result2;
-  /* The target's errno value, or 0 if success.
-     This is converted to the target's value with host_to_target_errno.  */
-  int errcode;
-
-  /* Working space to be used by memory read/write callbacks.  */
-  PTR p1;
-  PTR p2;
-  long x1,x2;
-
-  /* Callbacks for reading/writing memory (e.g. for read/write syscalls).
-     ??? long or unsigned long might be better to use for the `count'
-     argument here.  We mimic sim_{read,write} for now.  Be careful to
-     test any changes with -Wall -Werror, mixed signed comparisons
-     will get you.  */
-  int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
-			   unsigned long /*taddr*/, char * /*buf*/,
-			   int /*bytes*/));
-  int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
-			    unsigned long /*taddr*/, const char * /*buf*/,
-			    int /*bytes*/));
-
-  /* For sanity checking, should be last entry.  */
-  int magic;
-} CB_SYSCALL;
-
-/* Magic number sanity checker.  */
-#define CB_SYSCALL_MAGIC 0x12344321
-
-/* Macro to initialize CB_SYSCALL.  Called first, before filling in
-   any fields.  */
-#define CB_SYSCALL_INIT(sc) \
-do { \
-  memset ((sc), 0, sizeof (*(sc))); \
-  (sc)->magic = CB_SYSCALL_MAGIC; \
-} while (0)
-
-/* Return codes for various interface routines.  */
-
-typedef enum {
-  CB_RC_OK = 0,
-  /* generic error */
-  CB_RC_ERR,
-  /* either file not found or no read access */
-  CB_RC_ACCESS,
-  CB_RC_NO_MEM
-} CB_RC;
-
-/* Read in target values for system call numbers, errno values, signals.  */
-CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
-
-/* Translate target to host syscall function numbers.  */
-int cb_target_to_host_syscall PARAMS ((host_callback *, int));
-
-/* Translate host to target errno value.  */
-int cb_host_to_target_errno PARAMS ((host_callback *, int));
-
-/* Translate target to host open flags.  */
-int cb_target_to_host_open PARAMS ((host_callback *, int));
-
-/* Translate target signal number to host.  */
-int cb_target_to_host_signal PARAMS ((host_callback *, int));
-
-/* Translate host signal number to target.  */
-int cb_host_to_target_signal PARAMS ((host_callback *, int));
-
-/* Translate host stat struct to target.
-   If stat struct ptr is NULL, just compute target stat struct size.
-   Result is size of target stat struct or 0 if error.  */
-int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
-
-/* Perform a system call.  */
-CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
-
-#endif
diff --git a/include/demangle.h b/include/demangle.h
index ad0569a..21e9dd3 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -1,5 +1,5 @@
 /* Defs for interface to demanglers.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
+   Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
    
    This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
 #if !defined (DEMANGLE_H)
 #define DEMANGLE_H
 
-#include <ansidecl.h>
+#include "ansidecl.h"
 
 /* Options passed to cplus_demangle (in 2nd parameter). */
 
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 8d38f7e..84c436d 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -210,6 +210,7 @@
 extern int print_insn_hppa		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_i860		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_i960		PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_ip2k		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_m32r		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_m88k		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_mcore		PARAMS ((bfd_vma, disassemble_info*));
@@ -236,6 +237,7 @@
 extern int print_insn_xstormy16		PARAMS ((bfd_vma, disassemble_info*));
 extern int print_insn_sh64		PARAMS ((bfd_vma, disassemble_info *));
 extern int print_insn_sh64x_media	PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_frv		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 1deec0d..a7dfa25 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,66 @@
+2002-08-15  Alan Modra  <amodra@bigpond.net.au>
+
+	* i370.h: Define relocs using reloc-macros.h.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64,
+	EF_M68HC11_ABI): Define for ABI specification.
+	(STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for
+	linker and debugger.
+	(R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs.
+	(R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker
+	relaxation.
+
+2002-07-15  Denis Chertykov  <denisc@overta.ru>
+	    Frank Ch. Eigler  <fche@redhat.com>
+	    Ben Elliston  <bje@redhat.com>
+	    Alan Lehotsky  <alehotsky@cygnus.com>
+	    John Healy  <jhealy@redhat.com>
+	    Graham Stott  <grahams@redhat.com>
+	    Jeff Johnston  <jjohnstn@redhat.com>
+
+        * common.h (EM_IP2K): New macro.
+	(EM_IP2K_OLD): New macro.
+        * ip2k.h: New file.
+
+2002-07-01  Matt Thomas  <matt@3am-software.com>
+
+	* vax.h: Rename EF_* to EF_VAX_*.
+
+2002-06-18  Dave Brolley  <brolley@redhat.com>
+
+	From Catherine Moore, Michael Meissner, Dave Brolley:
+	* common.h (EM_CYGNUS_FRV): New macro.
+	* frv.h: New file.
+
+2002-06-06  Lars Brinkhoff  <lars@nocrew.org>
+
+	* common.h: Change registry@sco.com to registry@caldera.com.
+	(EM_PDP10, EM_PDP11): Define.
+
+2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl)
+	(_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New
+	prototypes.
+
+2002-06-01  Richard Henderson  <rth@redhat.com>
+
+	* alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF,
+	LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New.
+
+2002-05-30  Richard Henderson  <rth@redhat.com>
+
+	* alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64,
+	R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI,
+	R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64,
+	R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New.
+
+2002-05-29  Matt Thomas  <matt@3am-software.com>
+
+	* vax.h: New file
+
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 	* common.h (EM_DLX): Define.
@@ -8,8 +71,8 @@
 	* common.h (NT_GNU_ABI_TAG): Define.
 	(GNU_ABI_TAG_LINUX): Define.
 	(GNU_ABI_TAG_HURD): Define.
-	(GNU_ABI_TAG_SOLARIS): Define. 
-	(NT_NETBSD_IDENT): Define.  
+	(GNU_ABI_TAG_SOLARIS): Define.
+	(NT_NETBSD_IDENT): Define.
 	(NT_FREEBSD_ABI_TAG): Define.
 
 2002-04-24  Elena Zannoni  <ezannoni@redhat.com>
@@ -108,7 +171,7 @@
 
 	* common.h: Update copyright years.
 	(NT_NETBSDCORE_PROCINFO): Define.
-	(NT_NETBSDCORE_FIRSTMACH): Define. 
+	(NT_NETBSDCORE_FIRSTMACH): Define.
 
 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
 
@@ -302,18 +365,18 @@
 
 2000-10-16  Chris Demetriou  <cgd@sibyte.com>
 
-        * mips.h (E_MIPS_ARCH_32): New constant.
-        (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the
-        former with the latter.
+	* mips.h (E_MIPS_ARCH_32): New constant.
+	(E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the
+	former with the latter.
 
-        * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions.
+	* mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions.
 
-        * mips.h (E_MIPS_MACH_SB1): New constant.
+	* mips.h (E_MIPS_MACH_SB1): New constant.
 
 2000-11-30  Jan Hubicka  <jh@suse.cz>
 
-        * common.h (EM_X86_64): New macro.
-        * x86-64.h: New file.
+	* common.h (EM_X86_64): New macro.
+	* x86-64.h: New file.
 
 2000-11-27  Hans-Peter Nilsson  <hp@axis.com>
 
diff --git a/include/elf/alpha.h b/include/elf/alpha.h
index e937b81..0313b5b 100644
--- a/include/elf/alpha.h
+++ b/include/elf/alpha.h
@@ -99,6 +99,28 @@
      STO_ALPHA_STD_GPLOAD.  */
   RELOC_NUMBER (R_ALPHA_BRSGP, 28)
 
+  /* Thread-Local Storage.  */
+  RELOC_NUMBER (R_ALPHA_TLSGD, 29)
+  RELOC_NUMBER (R_ALPHA_TLSLDM, 30)
+  RELOC_NUMBER (R_ALPHA_DTPMOD64, 31)
+  RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32)
+  RELOC_NUMBER (R_ALPHA_DTPREL64, 33)
+  RELOC_NUMBER (R_ALPHA_DTPRELHI, 34)
+  RELOC_NUMBER (R_ALPHA_DTPRELLO, 35)
+  RELOC_NUMBER (R_ALPHA_DTPREL16, 36)
+  RELOC_NUMBER (R_ALPHA_GOTTPREL, 37)
+  RELOC_NUMBER (R_ALPHA_TPREL64, 38)
+  RELOC_NUMBER (R_ALPHA_TPRELHI, 39)
+  RELOC_NUMBER (R_ALPHA_TPRELLO, 40)
+  RELOC_NUMBER (R_ALPHA_TPREL16, 41)
+
 END_RELOC_NUMBERS (R_ALPHA_max)
 
+#define LITUSE_ALPHA_ADDR	0
+#define LITUSE_ALPHA_BASE	1
+#define LITUSE_ALPHA_BYTOFF	2
+#define LITUSE_ALPHA_JSR	3
+#define LITUSE_ALPHA_TLSGD	4
+#define LITUSE_ALPHA_TLSLDM	5
+
 #endif /* _ELF_ALPHA_H */
diff --git a/include/elf/common.h b/include/elf/common.h
index 48e2f4a..0cef267 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -92,7 +92,7 @@
 #define ET_HIPROC	0xFFFF	/* Processor-specific */
 
 /* Values for e_machine, which identifies the architecture.  These numbers
-   are officially assigned by registry@sco.com.  See below for a list of
+   are officially assigned by registry@caldera.com.  See below for a list of
    ad-hoc numbers used during initial development.  */
 
 #define EM_NONE		0	/* No machine */
@@ -145,6 +145,8 @@
 #define EM_TINYJ       61	/* Advanced Logic Corp. TinyJ embedded processor */
 #define EM_X86_64      62       /* Advanced Micro Devices X86-64 processor */
 
+#define EM_PDP10       64	/* Digital Equipment Corp. PDP-10 */
+#define EM_PDP11       65	/* Digital Equipment Corp. PDP-11 */
 #define EM_FX66	       66	/* Siemens FX66 microcontroller */
 #define EM_ST9PLUS     67	/* STMicroelectronics ST9+ 8/16 bit microcontroller */
 #define EM_ST7	       68	/* STMicroelectronics ST7 8-bit microcontroller */
@@ -174,6 +176,7 @@
 #define EM_OPENRISC    92	/* OpenRISC 32-bit embedded processor */
 #define EM_ARC_A5      93	/* ARC Cores Tangent-A5 */
 #define EM_XTENSA      94	/* Tensilica Xtensa Architecture */
+#define EM_IP2K	       101	/* Ubicom IP2022 micro controller */
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -184,7 +187,7 @@
    will have a collision.  Instead, pick a random number.
 
    Normally, each entity or maintainer responsible for a machine with an
-   unofficial e_machine number should eventually ask registry@sco.com for
+   unofficial e_machine number should eventually ask registry@caldera.com for
    an officially blessed number to be added to the list above.  */
 
 #define EM_PJ_OLD      99       /* picoJava */
@@ -242,6 +245,12 @@
 
 #define EM_XSTORMY16	        0xad45
 
+/* FRV magic number - no EABI available??.  */
+#define EM_CYGNUS_FRV		0x5441
+
+/* Ubicom IP2xxx; no ABI */
+#define EM_IP2K_OLD 	        0x8217	
+
 /* See the above comment before you add a new EM_* value here.  */
 
 /* Values for e_version.  */
@@ -299,6 +308,8 @@
 #define SHT_LOOS        0x60000000      /* First of OS specific semantics */
 #define SHT_HIOS        0x6fffffff      /* Last of OS specific semantics */
 
+#define SHT_GNU_LIBLIST	0x6ffffff7	/* List of prelink dependencies */
+
 /* The next three section types are defined by Solaris, and are named
    SHT_SUNW*.  We use them in GNU code, so we also define SHT_GNU*
    versions.  */
@@ -516,6 +527,9 @@
    OS specific values.  This is a deliberate special case and we
    maintain it for backwards compatability.  */
 #define DT_VALRNGLO	0x6ffffd00
+#define DT_GNU_PRELINKED 0x6ffffdf5
+#define DT_GNU_CONFLICTSZ 0x6ffffdf6
+#define DT_GNU_LIBLISTSZ 0x6ffffdf7
 #define DT_CHECKSUM	0x6ffffdf8
 #define DT_PLTPADSZ	0x6ffffdf9
 #define DT_MOVEENT	0x6ffffdfa
@@ -527,6 +541,8 @@
 #define DT_VALRNGHI	0x6ffffdff
 
 #define DT_ADDRRNGLO	0x6ffffe00
+#define DT_GNU_CONFLICT	0x6ffffef8
+#define DT_GNU_LIBLIST	0x6ffffef9
 #define DT_CONFIG	0x6ffffefa
 #define DT_DEPAUDIT	0x6ffffefb
 #define DT_AUDIT	0x6ffffefc
diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h
index 750a720..0e78310 100644
--- a/include/elf/dwarf2.h
+++ b/include/elf/dwarf2.h
@@ -649,8 +649,8 @@
 #define DW_CIE_VERSION	  1
 
 #define DW_CFA_extended   0
-#define DW_CFA_low_user   0x1c
-#define DW_CFA_high_user  0x3f
+#define DW_CFA_lo_user    0x1c
+#define DW_CFA_hi_user    0x3f
 
 #define DW_CHILDREN_no		     0x00
 #define DW_CHILDREN_yes		     0x01
diff --git a/include/elf/i370.h b/include/elf/i370.h
index b6f4785..fd5ec47 100644
--- a/include/elf/i370.h
+++ b/include/elf/i370.h
@@ -1,5 +1,5 @@
 /* i370 ELF support for BFD.
-   Copyright 2000 Free Software Foundation, Inc.
+   Copyright 2000, 2002 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -23,6 +23,8 @@
 #ifndef _ELF_I370_H
 #define _ELF_I370_H
 
+#include "elf/reloc-macros.h"
+
 /* Processor specific section headers, sh_type field */
 
 #define SHT_ORDERED		SHT_HIPROC	/* Link editor is to sort the \
@@ -41,6 +43,26 @@
 						   builds when those objects \
 						   are not to be furhter \
 						   relocated.  */
+
+/* i370 relocations
+   Note that there is really just one relocation that we currently
+   support (and only one that we seem to need, at the moment), and
+   that is the 31-bit address relocation.  Note that the 370/390
+   only supports a 31-bit (2GB) address space.  */
+
+START_RELOC_NUMBERS (i370_reloc_type)
+  RELOC_NUMBER (R_I370_NONE,      0)
+  RELOC_NUMBER (R_I370_ADDR31,    1)
+  RELOC_NUMBER (R_I370_ADDR32,    2)
+  RELOC_NUMBER (R_I370_ADDR16,    3) 
+  RELOC_NUMBER (R_I370_REL31,     4)
+  RELOC_NUMBER (R_I370_REL32,     5)  
+  RELOC_NUMBER (R_I370_ADDR12,    6)
+  RELOC_NUMBER (R_I370_REL12,     7)
+  RELOC_NUMBER (R_I370_ADDR8,     8)
+  RELOC_NUMBER (R_I370_REL8,      9)
+  RELOC_NUMBER (R_I370_COPY,     10)
+  RELOC_NUMBER (R_I370_RELATIVE, 11)
+END_RELOC_NUMBERS (R_I370_max)
+
 #endif /* _ELF_I370_H */
-
-
diff --git a/include/elf/ip2k.h b/include/elf/ip2k.h
new file mode 100644
index 0000000..c331b72
--- /dev/null
+++ b/include/elf/ip2k.h
@@ -0,0 +1,62 @@
+/* IP2xxx ELF support for BFD.
+   Copyright (C) 2000, 2002 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_IP2K_H
+#define _ELF_IP2K_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations.  */
+START_RELOC_NUMBERS (elf_ip2k_reloc_type)
+  RELOC_NUMBER (R_IP2K_NONE, 0)
+  RELOC_NUMBER (R_IP2K_16, 1)
+  RELOC_NUMBER (R_IP2K_32, 2)
+  RELOC_NUMBER (R_IP2K_FR9, 3)
+  RELOC_NUMBER (R_IP2K_BANK, 4)
+  RELOC_NUMBER (R_IP2K_ADDR16CJP, 5)
+  RELOC_NUMBER (R_IP2K_PAGE3, 6)
+  RELOC_NUMBER (R_IP2K_LO8DATA, 7)
+  RELOC_NUMBER (R_IP2K_HI8DATA, 8)
+  RELOC_NUMBER (R_IP2K_LO8INSN, 9)
+  RELOC_NUMBER (R_IP2K_HI8INSN, 10)
+  RELOC_NUMBER (R_IP2K_PC_SKIP, 11)
+  RELOC_NUMBER (R_IP2K_TEXT, 12)
+  RELOC_NUMBER (R_IP2K_FR_OFFSET, 13)
+  RELOC_NUMBER (R_IP2K_EX8DATA, 14)
+END_RELOC_NUMBERS(R_IP2K_max)
+
+
+/* Define the data & instruction memory discriminator.  In a linked
+   executable, an symbol should be deemed to point to an instruction
+   if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly
+   for the data space.  See also `ld/emulparams/elf32ip2k.sh'.  */
+/* ??? Consider extending the _MASK values to include all the
+   intermediate bits that must be zero due to the limited physical
+   memory size on the IP2K.  */
+
+#define IP2K_DATA_MASK   0xff000000
+#define IP2K_DATA_VALUE  0x01000000
+#define IP2K_INSN_MASK   0xff000000
+#define IP2K_INSN_VALUE  0x02000000
+
+/* The location of the memory mapped hardware stack.  */
+#define IP2K_STACK_VALUE 0x0f000000
+#define IP2K_STACK_SIZE  0x20
+
+#endif /* _ELF_IP2K_H */
diff --git a/include/elf/m68hc11.h b/include/elf/m68hc11.h
index 0f9546d..c4ef37d 100644
--- a/include/elf/m68hc11.h
+++ b/include/elf/m68hc11.h
@@ -1,5 +1,5 @@
 /* m68hc11 & m68hc12 ELF support for BFD.
-   Copyright 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -37,6 +37,41 @@
      /* These are GNU extensions to enable C++ vtable garbage collection.  */
   RELOC_NUMBER (R_M68HC11_GNU_VTINHERIT, 9)
   RELOC_NUMBER (R_M68HC11_GNU_VTENTRY, 10)
+
+  RELOC_NUMBER (R_M68HC11_24, 11)
+  RELOC_NUMBER (R_M68HC11_LO16, 12)
+  RELOC_NUMBER (R_M68HC11_PAGE, 13)
+
+     /* GNU extension for linker relaxation.
+        Mark beginning of a jump instruction (any form).  */
+  RELOC_NUMBER (R_M68HC11_RL_JUMP, 20)
+
+     /* Mark beginning of Gcc relaxation group instruction.  */
+  RELOC_NUMBER (R_M68HC11_RL_GROUP, 21)
 END_RELOC_NUMBERS (R_M68HC11_max)
 
+/* Processor specific flags for the ELF header e_flags field.  */
+
+/* ABI identification.  */
+#define EF_M68HC11_ABI  0x00000000F
+
+/* Integers are 32-bit long.  */
+#define E_M68HC11_I32   0x000000001
+
+/* Doubles are 64-bit long.  */
+#define E_M68HC11_F64   0x000000002
+
+/* Uses 68HC12 memory banks.  */
+#define E_M68HC12_BANKS 0x000000004
+
+
+/* Special values for the st_other field in the symbol table.  These
+   are used for 68HC12 to identify far functions (must be called with
+   'call' and returns with 'rtc').  */
+#define STO_M68HC12_FAR 0x80
+
+/* Identify interrupt handlers.  This is used by the debugger to
+   correctly compute the stack frame.  */
+#define STO_M68HC12_INTERRUPT 0x40
+     
 #endif
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 1480f49..af78c9b 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -108,6 +108,11 @@
    FIXME: This seems redundant now that we export the interface above.  */
 extern boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
 
+extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
+extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
+
 /* We put this in elf_section_data (section)->tdata.  */
 struct sh64_section_data
 {
diff --git a/include/elf/vax.h b/include/elf/vax.h
index aba5d9f..c1b5c2b 100644
--- a/include/elf/vax.h
+++ b/include/elf/vax.h
@@ -44,8 +44,8 @@
 END_RELOC_NUMBERS (R_VAX_max)   
 
 /* Processor specific flags for the ELF header e_flags field.  */
-#define EF_NONPIC		0x0001	/* Object contains non-PIC code */
-#define EF_DFLOAT		0x0100	/* Object contains D-Float insn.  */
-#define EF_GFLOAT		0x0200	/* Object contains G-Float insn.  */
+#define EF_VAX_NONPIC		0x0001	/* Object contains non-PIC code */
+#define EF_VAX_DFLOAT		0x0100	/* Object contains D-Float insn.  */
+#define EF_VAX_GFLOAT		0x0200	/* Object contains G-Float insn.  */
 
 #endif
diff --git a/include/fibheap.h b/include/fibheap.h
index d109e4a..fc37f9e 100644
--- a/include/fibheap.h
+++ b/include/fibheap.h
@@ -1,5 +1,5 @@
 /* A Fibonacci heap datatype.
-   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Daniel Berlin (dan@cgsoftware.com).
 
 This file is part of GCC.
@@ -40,7 +40,7 @@
 #ifndef _FIBHEAP_H_
 #define _FIBHEAP_H_
 
-#include <ansidecl.h>
+#include "ansidecl.h"
 
 typedef long fibheapkey_t;
 
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index e0992c9..c39a7a0 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,42 @@
+2002-07-29  Andrey Volkov  <avolkov@transas.com>
+
+	* sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
+	 prefix.
+
+2002-07-23  Andrey Volkov  <avolkov@transas.com>
+
+	* sim-h8300.h: New file.
+
+2002-07-17  Andrew Cagney  <cagney@redhat.com>
+
+	* remote-sim.h: Update copyright.
+	(sim_set_callbacks, sim_size, sim_trace)
+	(sim_set_trace, sim_set_profile_size, sim_kill): Delete.  Moved to
+	"sim/common/run-sim.h".
+
+Wed Jul 17 19:36:38 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* sim-sh.h: Add enum constants for sh[1-4], sh3e, sh3?-dsp,
+	renumbering the sh-dsp registers to use distinct numbers.
+
+2002-06-15  Andrew Cagney  <ac131313@redhat.com>
+
+	* sim-arm.h (enum sim_arm_regs): Rename sim_arm_regnum.
+
+2002-06-12  Andrew Cagney  <ac131313@redhat.com>
+
+	* sim-arm.h: New file.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* callback.h: Copy to here from directory above.
+	* remote-sim.h: Copy to here from directory above.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* sim-d10v.h (sim_d10v_regs): Expand to include all registers.
+	Update copyright.
+
 2002-05-23  Andrew Cagney  <ac131313@redhat.com>
 
 	* sim-d10v.h: New file.  Moved from include/sim-d10v.h.
diff --git a/include/gdb/remote-sim.h b/include/gdb/remote-sim.h
index 726ec62..14d90b4 100644
--- a/include/gdb/remote-sim.h
+++ b/include/gdb/remote-sim.h
@@ -1,6 +1,7 @@
 /* This file defines the interface between the simulator and gdb.
-   Copyright 1993, 1994, 1996, 1997, 1998, 2000
-   Free Software Foundation, Inc.
+
+   Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2002 Free Software
+   Foundation, Inc.
 
 This file is part of GDB.
 
@@ -289,63 +290,6 @@
 SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
 SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
 SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
-
-
-/* Provide simulator with a default (global) host_callback_struct.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-/* Set the size of the simulator memory array.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_size PARAMS ((int i));
-
-
-/* Single-step simulator with tracing enabled.
-   THIS PROCEDURE IS DEPRECIATED.
-   THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-int sim_trace PARAMS ((SIM_DESC sd));
-
-
-/* Enable tracing.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
-/* Configure the size of the profile buffer.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_profile_size PARAMS ((int n));
-
-
-/* Kill the running program.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure will be replaced as part of the introduction of
-   multi-cpu simulators. */
-
-void sim_kill PARAMS ((SIM_DESC sd));
 
 #ifdef __cplusplus
 }
diff --git a/include/gdb/sim-d10v.h b/include/gdb/sim-d10v.h
index 9d29e05..f153a41 100644
--- a/include/gdb/sim-d10v.h
+++ b/include/gdb/sim-d10v.h
@@ -1,5 +1,6 @@
 /* This file defines the interface between the d10v simulator and gdb.
-   Copyright 1999 Free Software Foundation, Inc.
+
+   Copyright 1999, 2002 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -75,26 +76,61 @@
 
 /* The simulator makes use of the following register information. */
 
+enum sim_d10v_regs
+{
+  SIM_D10V_R0_REGNUM,
+  SIM_D10V_R1_REGNUM,
+  SIM_D10V_R2_REGNUM,
+  SIM_D10V_R3_REGNUM,
+  SIM_D10V_R4_REGNUM,
+  SIM_D10V_R5_REGNUM,
+  SIM_D10V_R6_REGNUM,
+  SIM_D10V_R7_REGNUM,
+  SIM_D10V_R8_REGNUM,
+  SIM_D10V_R9_REGNUM,
+  SIM_D10V_R10_REGNUM,
+  SIM_D10V_R11_REGNUM,
+  SIM_D10V_R12_REGNUM,
+  SIM_D10V_R13_REGNUM,
+  SIM_D10V_R14_REGNUM,
+  SIM_D10V_R15_REGNUM,
+  SIM_D10V_CR0_REGNUM,
+  SIM_D10V_CR1_REGNUM,
+  SIM_D10V_CR2_REGNUM,
+  SIM_D10V_CR3_REGNUM,
+  SIM_D10V_CR4_REGNUM,
+  SIM_D10V_CR5_REGNUM,
+  SIM_D10V_CR6_REGNUM,
+  SIM_D10V_CR7_REGNUM,
+  SIM_D10V_CR8_REGNUM,
+  SIM_D10V_CR9_REGNUM,
+  SIM_D10V_CR10_REGNUM,
+  SIM_D10V_CR11_REGNUM,
+  SIM_D10V_CR12_REGNUM,
+  SIM_D10V_CR13_REGNUM,
+  SIM_D10V_CR14_REGNUM,
+  SIM_D10V_CR15_REGNUM,
+  SIM_D10V_A0_REGNUM,
+  SIM_D10V_A1_REGNUM,
+  SIM_D10V_SPI_REGNUM,
+  SIM_D10V_SPU_REGNUM,
+  SIM_D10V_IMAP0_REGNUM,
+  SIM_D10V_IMAP1_REGNUM,
+  SIM_D10V_DMAP0_REGNUM,
+  SIM_D10V_DMAP1_REGNUM,
+  SIM_D10V_DMAP2_REGNUM,
+  SIM_D10V_DMAP3_REGNUM,
+  SIM_D10V_TS2_DMAP_REGNUM
+};
+  
 enum
-  {
-    SIM_D10V_R0_REGNUM = 0,
-    SIM_D10V_CR0_REGNUM = 16,
-    SIM_D10V_A0_REGNUM = 32,
-    SIM_D10V_SPI_REGNUM = 34,
-    SIM_D10V_SPU_REGNUM = 35,
-    SIM_D10V_IMAP0_REGNUM = 36,
-    SIM_D10V_DMAP0_REGNUM = 38,
-    SIM_D10V_TS2_DMAP_REGNUM = 40
-  };
-
-enum
-  {
-    SIM_D10V_NR_R_REGS = 16,
-    SIM_D10V_NR_A_REGS = 2,
-    SIM_D10V_NR_IMAP_REGS = 2,
-    SIM_D10V_NR_DMAP_REGS = 4,
-    SIM_D10V_NR_CR_REGS = 16
-  };
+{
+  SIM_D10V_NR_R_REGS = 16,
+  SIM_D10V_NR_A_REGS = 2,
+  SIM_D10V_NR_IMAP_REGS = 2,
+  SIM_D10V_NR_DMAP_REGS = 4,
+  SIM_D10V_NR_CR_REGS = 16
+};
 
 #ifdef __cplusplus
 }
diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h
new file mode 100644
index 0000000..ecc6883
--- /dev/null
+++ b/include/gdb/sim-h8300.h
@@ -0,0 +1,78 @@
+/* This file defines the interface between the h8300 simulator and gdb.

+   Copyright (C) 2002 Free Software Foundation, Inc.

+

+This file is part of GDB.

+

+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.  */
+
+#if !defined (SIM_H8300_H)

+#define SIM_H8300_H

+

+#ifdef __cplusplus

+extern "C" { //}
+#endif
+  

+/* The simulator makes use of the following register information. */ 

+  

+  enum sim_h8300_regs
+  {
+    /* Registers common to all the H8 variants. */
+    /* Start here: */
+    SIM_H8300_R0_REGNUM,    
+    SIM_H8300_R1_REGNUM,
+    SIM_H8300_R2_REGNUM,
+    SIM_H8300_R3_REGNUM,
+    SIM_H8300_R4_REGNUM,
+    SIM_H8300_R5_REGNUM,
+    SIM_H8300_R6_REGNUM,
+    SIM_H8300_R7_REGNUM,
+
+    SIM_H8300_CCR_REGNUM,  /* Contains processor status */
+    SIM_H8300_PC_REGNUM,   /* Contains program counter */
+    /* End here */
+    
+    SIM_H8300_EXR_REGNUM,  /* Contains extended processor status 
+                              H8S and higher */
+    SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
+    SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
+
+    SIM_H8300_CYCLE_REGNUM,
+    SIM_H8300_INST_REGNUM,
+    SIM_H8300_TICK_REGNUM
+  };
+
+  enum
+  {
+    SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg 
+                                                         may be passed */    
+    SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM,  /* last  reg in which an arg 
+                                                         may be passed */
+    SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing 
+                                                  stack frame */
+    SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM  /* Contains address of top of stack */
+  };
+
+  enum
+  {
+    SIM_H8300_NUM_COMMON_REGS = 10,
+    SIM_H8300_S_NUM_REGS = 13,
+    SIM_H8300_NUM_REGS = 16
+  };
+
+#ifdef __cplusplus

+}
+#endif
+ 

+#endif				/* SIM_H8300_H */
diff --git a/include/gdb/sim-sh.h b/include/gdb/sim-sh.h
index 3c736be..ec0d627 100644
--- a/include/gdb/sim-sh.h
+++ b/include/gdb/sim-sh.h
@@ -1,5 +1,5 @@
 /* This file defines the interface between the sh simulator and gdb.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -27,25 +27,132 @@
 /* The simulator makes use of the following register information. */
 
 enum
-  {
-    SIM_SH64_R0_REGNUM = 0,
-    SIM_SH64_SP_REGNUM = 15,
-    SIM_SH64_PC_REGNUM = 64,
-    SIM_SH64_SR_REGNUM = 65,
-    SIM_SH64_SSR_REGNUM = 66,
-    SIM_SH64_SPC_REGNUM = 67,
-    SIM_SH64_TR0_REGNUM = 68,
-    SIM_SH64_FPCSR_REGNUM = 76,
-    SIM_SH64_FR0_REGNUM = 77
-  };
+{
+  SIM_SH_R0_REGNUM = 0,
+  SIM_SH_R1_REGNUM,
+  SIM_SH_R2_REGNUM,
+  SIM_SH_R3_REGNUM,
+  SIM_SH_R4_REGNUM,
+  SIM_SH_R5_REGNUM,
+  SIM_SH_R6_REGNUM,
+  SIM_SH_R7_REGNUM,
+  SIM_SH_R8_REGNUM,
+  SIM_SH_R9_REGNUM,
+  SIM_SH_R10_REGNUM,
+  SIM_SH_R11_REGNUM,
+  SIM_SH_R12_REGNUM,
+  SIM_SH_R13_REGNUM,
+  SIM_SH_R14_REGNUM,
+  SIM_SH_R15_REGNUM,
+  SIM_SH_PC_REGNUM,
+  SIM_SH_PR_REGNUM,
+  SIM_SH_GBR_REGNUM,
+  SIM_SH_VBR_REGNUM,
+  SIM_SH_MACH_REGNUM,
+  SIM_SH_MACL_REGNUM,
+  SIM_SH_SR_REGNUM,
+  SIM_SH_FPUL_REGNUM,
+  SIM_SH_FPSCR_REGNUM,
+  SIM_SH_FR0_REGNUM, /* FRn registers: sh3e / sh4 */
+  SIM_SH_FR1_REGNUM,
+  SIM_SH_FR2_REGNUM,
+  SIM_SH_FR3_REGNUM,
+  SIM_SH_FR4_REGNUM,
+  SIM_SH_FR5_REGNUM,
+  SIM_SH_FR6_REGNUM,
+  SIM_SH_FR7_REGNUM,
+  SIM_SH_FR8_REGNUM,
+  SIM_SH_FR9_REGNUM,
+  SIM_SH_FR10_REGNUM,
+  SIM_SH_FR11_REGNUM,
+  SIM_SH_FR12_REGNUM,
+  SIM_SH_FR13_REGNUM,
+  SIM_SH_FR14_REGNUM,
+  SIM_SH_FR15_REGNUM,
+  SIM_SH_SSR_REGNUM, /* sh3{,e,-dsp}, sh4 */
+  SIM_SH_SPC_REGNUM, /* sh3{,e,-dsp}, sh4 */
+  SIM_SH_R0_BANK0_REGNUM, /* SIM_SH_Rn_BANKm_REGNUM: sh3[e] / sh4 */
+  SIM_SH_R1_BANK0_REGNUM,
+  SIM_SH_R2_BANK0_REGNUM,
+  SIM_SH_R3_BANK0_REGNUM,
+  SIM_SH_R4_BANK0_REGNUM,
+  SIM_SH_R5_BANK0_REGNUM,
+  SIM_SH_R6_BANK0_REGNUM,
+  SIM_SH_R7_BANK0_REGNUM,
+  SIM_SH_R0_BANK1_REGNUM,
+  SIM_SH_R1_BANK1_REGNUM,
+  SIM_SH_R2_BANK1_REGNUM,
+  SIM_SH_R3_BANK1_REGNUM,
+  SIM_SH_R4_BANK1_REGNUM,
+  SIM_SH_R5_BANK1_REGNUM,
+  SIM_SH_R6_BANK1_REGNUM,
+  SIM_SH_R7_BANK1_REGNUM,
+  SIM_SH_XF0_REGNUM,
+  SIM_SH_XF1_REGNUM,
+  SIM_SH_XF2_REGNUM,
+  SIM_SH_XF3_REGNUM,
+  SIM_SH_XF4_REGNUM,
+  SIM_SH_XF5_REGNUM,
+  SIM_SH_XF6_REGNUM,
+  SIM_SH_XF7_REGNUM,
+  SIM_SH_XF8_REGNUM,
+  SIM_SH_XF9_REGNUM,
+  SIM_SH_XF10_REGNUM,
+  SIM_SH_XF11_REGNUM,
+  SIM_SH_XF12_REGNUM,
+  SIM_SH_XF13_REGNUM,
+  SIM_SH_XF14_REGNUM,
+  SIM_SH_XF15_REGNUM,
+  SIM_SH_SGR_REGNUM,
+  SIM_SH_DBR_REGNUM,
+  SIM_SH4_NUM_REGS, /* 77 */
+
+  /* sh[3]-dsp */
+  SIM_SH_DSR_REGNUM,
+  SIM_SH_A0G_REGNUM,
+  SIM_SH_A0_REGNUM,
+  SIM_SH_A1G_REGNUM,
+  SIM_SH_A1_REGNUM,
+  SIM_SH_M0_REGNUM,
+  SIM_SH_M1_REGNUM,
+  SIM_SH_X0_REGNUM,
+  SIM_SH_X1_REGNUM,
+  SIM_SH_Y0_REGNUM,
+  SIM_SH_Y1_REGNUM,
+  SIM_SH_MOD_REGNUM,
+  SIM_SH_RS_REGNUM,
+  SIM_SH_RE_REGNUM,
+  SIM_SH_R0_BANK_REGNUM,
+  SIM_SH_R1_BANK_REGNUM,
+  SIM_SH_R2_BANK_REGNUM,
+  SIM_SH_R3_BANK_REGNUM,
+  SIM_SH_R4_BANK_REGNUM,
+  SIM_SH_R5_BANK_REGNUM,
+  SIM_SH_R6_BANK_REGNUM,
+  SIM_SH_R7_BANK_REGNUM
+  /* 100..127: room for expansion.  */
+};
 
 enum
-  {
-    SIM_SH64_NR_REGS = 141,  /* total number of architectural registers */
-    SIM_SH64_NR_R_REGS = 64, /* number of general registers */
-    SIM_SH64_NR_TR_REGS = 8, /* number of target registers */
-    SIM_SH64_NR_FP_REGS = 64 /* number of floating point registers */
-  };
+{
+  SIM_SH64_R0_REGNUM = 0,
+  SIM_SH64_SP_REGNUM = 15,
+  SIM_SH64_PC_REGNUM = 64,
+  SIM_SH64_SR_REGNUM = 65,
+  SIM_SH64_SSR_REGNUM = 66,
+  SIM_SH64_SPC_REGNUM = 67,
+  SIM_SH64_TR0_REGNUM = 68,
+  SIM_SH64_FPCSR_REGNUM = 76,
+  SIM_SH64_FR0_REGNUM = 77
+};
+
+enum
+{
+  SIM_SH64_NR_REGS = 141,  /* total number of architectural registers */
+  SIM_SH64_NR_R_REGS = 64, /* number of general registers */
+  SIM_SH64_NR_TR_REGS = 8, /* number of target registers */
+  SIM_SH64_NR_FP_REGS = 64 /* number of floating point registers */
+};
 
 #ifdef __cplusplus
 }
diff --git a/include/getopt.h b/include/getopt.h
index cb5feba..0c6470b 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -105,16 +105,17 @@
    declaration without arguments.  If it is 0, we checked and failed
    to find the declaration so provide a fully prototyped one.  If it
    is 1, we found it so don't provide any declaration at all.  */
-#if defined (__GNU_LIBRARY__) || (defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT)
+#if !HAVE_DECL_GETOPT
+#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
 extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
-# if !defined (HAVE_DECL_GETOPT)
+#else
 extern int getopt ();
-# endif
-#endif /* __GNU_LIBRARY__ */
+#endif
+#endif /* !HAVE_DECL_GETOPT */
+
 extern int getopt_long (int argc, char *const *argv, const char *shortopts,
 		        const struct option *longopts, int *longind);
 extern int getopt_long_only (int argc, char *const *argv,
diff --git a/include/hashtab.h b/include/hashtab.h
index 8871710..be866b5 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,5 +1,5 @@
 /* An expandable hash tables datatype.  
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
 This program is free software; you can redistribute it and/or modify
@@ -36,7 +36,11 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <ansidecl.h>
+#include "ansidecl.h"
+
+#ifndef GTY
+#define GTY(X)
+#endif
 
 /* The type for a hash code.  */
 typedef unsigned int hashval_t;
@@ -63,12 +67,21 @@
    htab_traverse.  Return 1 to continue scan, 0 to stop.  */
 typedef int (*htab_trav) PARAMS ((void **, void *));
 
+/* Memory-allocation function, with the same functionality as calloc().
+   Iff it returns NULL, the hash table implementation will pass an error
+   code back to the user, so if your code doesn't handle errors,
+   best if you use xcalloc instead.  */
+typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
+
+/* We also need a free() routine.  */
+typedef void (*htab_free) PARAMS ((PTR));
+
 /* Hash tables are of the following type.  The structure
    (implementation) of this type is not needed for using the hash
    tables.  All work with hash table should be executed only through
    functions mentioned below. */
 
-struct htab
+struct htab GTY(())
 {
   /* Pointer to hash function.  */
   htab_hash hash_f;
@@ -80,7 +93,7 @@
   htab_del del_f;
 
   /* Table itself.  */
-  PTR *entries;
+  PTR * GTY ((use_param (""), length ("%h.size"))) entries;
 
   /* Current size (in entries) of the hash table */
   size_t size;
@@ -99,9 +112,9 @@
      of collisions fixed for time of work with the hash table. */
   unsigned int collisions;
 
-  /* This is non-zero if we are allowed to return NULL for function calls
-     that allocate memory.  */
-  int return_allocation_failure;
+  /* Pointers to allocate/free functions.  */
+  htab_alloc alloc_f;
+  htab_free free_f;
 };
 
 typedef struct htab *htab_t;
@@ -111,14 +124,14 @@
 
 /* The prototypes of the package functions. */
 
-extern htab_t	htab_create	PARAMS ((size_t, htab_hash,
-					 htab_eq, htab_del));
+extern htab_t	htab_create_alloc	PARAMS ((size_t, htab_hash,
+						 htab_eq, htab_del,
+						 htab_alloc, htab_free));
 
-/* This function is like htab_create, but may return NULL if memory
-   allocation fails, and also signals that htab_find_slot_with_hash and
-   htab_find_slot are allowed to return NULL when inserting.  */
-extern htab_t	htab_try_create	PARAMS ((size_t, htab_hash,
-					 htab_eq, htab_del));
+/* Backward-compatibility functions.  */
+extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+
 extern void	htab_delete	PARAMS ((htab_t));
 extern void	htab_empty	PARAMS ((htab_t));
 
diff --git a/include/libiberty.h b/include/libiberty.h
index 3e0ca09..0463301 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -73,12 +73,12 @@
    declaration without arguments.  If it is 0, we checked and failed
    to find the declaration so provide a fully prototyped one.  If it
    is 1, we found it so don't provide any declaration at all.  */
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || (defined (HAVE_DECL_BASENAME) && !HAVE_DECL_BASENAME)
+#if !HAVE_DECL_BASENAME
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (HAVE_DECL_BASENAME)
 extern char *basename PARAMS ((const char *));
 #else
-# if !defined (HAVE_DECL_BASENAME)
 extern char *basename ();
-# endif
+#endif
 #endif
 
 /* A well-defined basename () that is always compiled in.  */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 100c886..b950eef 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,49 @@
+2002-08-19  Elena Zannoni <ezannoni@redhat.com>
+ 
+        From matthew green  <mrg@redhat.com>
+
+        * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
+	instructions.
+        (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
+	PPC_OPCODE_CACHELCK, PPC_OPCODE_RFMCI): New opcode flags for the
+	e500x2 Integer select, branch locking, performance monitor,
+	cache locking and machine check APUs, respectively.
+	(PPC_OPCODE_EFS): New opcode type for efs* instructions.
+	(PPC_OPCODE_CLASSIC): New opcode type for Classic PowerPC instructions.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11.h (M6812_OP_PAGE): Define to identify call operand.
+	(M68HC12_BANK_VIRT, M68HC12_BANK_MASK, M68HC12_BANK_BASE,
+	M68HC12_BANK_SHIFT, M68HC12_BANK_PAGE_MASK): Define for 68HC12
+	memory banks.
+	(M6811_OC1M5, M6811_OC1M4, M6811_MODF): Fix value.
+
+2002-07-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* mips.h (INSN_MIPS16): New define.
+
+2002-07-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* i386.h: Remove IgnoreSize from movsx and movzx.
+
+2002-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* a29k.h: Replace CONST with const.
+	(CONST): Don't define.
+	* convex.h: Replace CONST with const.
+	(CONST): Don't define.
+	* dlx.h: Replace CONST with const.
+	* or32.h (CONST): Don't define.
+
+2002-05-30  Chris G. Demetriou  <cgd@broadcom.com>
+
+	* mips.h (OP_SH_ALN, OP_MASK_ALN, OP_SH_VSEL, OP_MASK_VSEL)
+	(MDMX_FMTSEL_IMM_QH, MDMX_FMTSEL_IMM_OB, MDMX_FMTSEL_VEC_QH)
+	(MDMX_FMTSEL_VEC_OB, INSN_READ_MDMX_ACC, INSN_WRITE_MDMX_ACC)
+	(INSN_MDMX): New constants, for MDMX support.
+	(opcode character list): Add "O", "Q", "X", "Y", and "Z" for MDMX.
+
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 	* dlx.h: New file.
diff --git a/include/opcode/a29k.h b/include/opcode/a29k.h
index 399be67..c6c8c37 100644
--- a/include/opcode/a29k.h
+++ b/include/opcode/a29k.h
@@ -1,5 +1,5 @@
 /* Table of opcodes for the AMD 29000 family.
-   Copyright 1990, 1991, 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1993, 1994, 2002 Free Software Foundation, Inc.
 
 This file is part of GDB and GAS.
 
@@ -62,11 +62,7 @@
   char *args;
 };
 
-#ifndef CONST
-#define CONST
-#endif /* CONST */
-
-static CONST struct a29k_opcode a29k_opcodes[] =
+static const struct a29k_opcode a29k_opcodes[] =
 {
 
 { "add", 0x14000000, "c,a,b" },
@@ -282,4 +278,4 @@
 			   if we've run off the end of the table.  */
 };
 
-CONST unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
+const unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
diff --git a/include/opcode/convex.h b/include/opcode/convex.h
index 780b12d..ccf5568 100644
--- a/include/opcode/convex.h
+++ b/include/opcode/convex.h
@@ -1,5 +1,5 @@
 /* Information for instruction disassembly on the Convex.
-   Copyright 1989, 1993 Free Software Foundation, Inc.
+   Copyright 1989, 1993, 2002 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -17,10 +17,6 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef	CONST
-#define	CONST
-#endif	/* CONST */
-
 #define xxx 0
 #define rrr 1
 #define rr 2
@@ -67,7 +63,7 @@
 #define CPUID 20
 #define TID 21
 
-CONST char *op[] = {
+const char *op[] = {
   "",
   "v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7",
   "s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7",
@@ -92,7 +88,7 @@
   "tid",
 };
 
-CONST struct formstr format0[] = {
+const struct formstr format0[] = {
   {0,0,rrr,V,S,S},	/* mov */
   {0,0,rrr,S,S,V},	/* mov */
   {1,1,rrr,V,V,V},	/* merg.t */
@@ -159,7 +155,7 @@
   {4,8,rrr,V,S,V},	/* div.l */
 };
 
-CONST struct formstr format1[] = {
+const struct formstr format1[] = {
   {11,0,xxx,0,0,0},	/* exit */
   {12,0,a3,0,0,0},	/* jmp */
   {13,2,a3,0,0,0},	/* jmpi.f */
@@ -226,7 +222,7 @@
   {21,8,a2r,V,0,0},	/* st.l */
 };
 
-CONST struct formstr format2[] = {
+const struct formstr format2[] = {
   {28,5,rr,A,A,0},	/* cvtw.b */
   {28,6,rr,A,A,0},	/* cvtw.h */
   {29,7,rr,A,A,0},	/* cvtb.w */
@@ -357,7 +353,7 @@
   {4,8,rr,S,S,0},	/* div.l */
 };
 
-CONST struct formstr format3[] = {
+const struct formstr format3[] = {
   {32,3,rr,V,V,0},	/* cvtd.s */
   {31,4,rr,V,V,0},	/* cvts.d */
   {33,4,rr,V,V,0},	/* cvtl.d */
@@ -424,7 +420,7 @@
   {43,8,rr,S,S,0},	/* neg.l */
 };
 
-CONST struct formstr format4[] = {
+const struct formstr format4[] = {
   {46,0,nops,0,0,0},	/* nop */
   {47,0,pcrel,0,0,0},	/* br */
   {48,2,pcrel,0,0,0},	/* bri.f */
@@ -435,7 +431,7 @@
   {50,1,pcrel,0,0,0},	/* brs.t */
 };
 
-CONST struct formstr format5[] = {
+const struct formstr format5[] = {
   {51,5,rr,V,V,0},	/* ldvi.b */
   {51,6,rr,V,V,0},	/* ldvi.h */
   {51,7,rr,V,V,0},	/* ldvi.w */
@@ -454,7 +450,7 @@
   {52,8,rxr,S,V,0},	/* stvi.l */
 };
 
-CONST struct formstr format6[] = {
+const struct formstr format6[] = {
   {53,0,r,A,0,0},	/* ldsdr */
   {54,0,r,A,0,0},	/* ldkdr */
   {55,3,r,S,0,0},	/* ln.s */
@@ -521,7 +517,7 @@
   {83,4,r,S,0,0},	/* atan.d */
 };
 
-CONST struct formstr format7[] = {
+const struct formstr format7[] = {
   {84,5,r,V,0,0},	/* sum.b */
   {84,6,r,V,0,0},	/* sum.h */
   {84,7,r,V,0,0},	/* sum.w */
@@ -556,11 +552,11 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr formatx[] = {
+const struct formstr formatx[] = {
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr format1a[] = {
+const struct formstr format1a[] = {
   {91,0,imr,A,0,0},	/* halt */
   {92,0,a4,0,0,0},	/* sysc */
   {18,6,imr,A,0,0},	/* ld.h */
@@ -595,7 +591,7 @@
   {41,7,imr,A,0,0},	/* lt.w */
 };
 
-CONST struct formstr format1b[] = {
+const struct formstr format1b[] = {
   {18,4,imr,S,0,0},	/* ld.d */
   {18,10,imr,S,0,0},	/* ld.u */
   {18,8,imr,S,0,0},	/* ld.l */
@@ -630,7 +626,7 @@
   {41,7,imr,S,0,0},	/* lt.w */
 };
 
-CONST struct formstr e0_format0[] = {
+const struct formstr e0_format0[] = {
   {10,3,rrr,S,V,V},	/* sub.s */
   {10,4,rrr,S,V,V},	/* sub.d */
   {4,3,rrr,S,V,V},	/* div.s */
@@ -697,7 +693,7 @@
   {4,16,rrr,V,S,V},	/* div.l.f */
 };
 
-CONST struct formstr e0_format1[] = {
+const struct formstr e0_format1[] = {
   {0,0,0,0,0,0},
   {94,0,a3,0,0,0},	/* tst */
   {95,0,a3,0,0,0},	/* lck */
@@ -764,7 +760,7 @@
   {21,16,a2r,V,0,0},	/* st.l.f */
 };
 
-CONST struct formstr e0_format2[] = {
+const struct formstr e0_format2[] = {
   {28,5,rr,V,V,0},	/* cvtw.b */
   {28,6,rr,V,V,0},	/* cvtw.h */
   {29,7,rr,V,V,0},	/* cvtb.w */
@@ -895,7 +891,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e0_format3[] = {
+const struct formstr e0_format3[] = {
   {32,11,rr,V,V,0},	/* cvtd.s.f */
   {31,12,rr,V,V,0},	/* cvts.d.f */
   {33,12,rr,V,V,0},	/* cvtl.d.f */
@@ -962,7 +958,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e0_format4[] = {
+const struct formstr e0_format4[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -973,7 +969,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e0_format5[] = {
+const struct formstr e0_format5[] = {
   {51,13,rr,V,V,0},	/* ldvi.b.f */
   {51,14,rr,V,V,0},	/* ldvi.h.f */
   {51,15,rr,V,V,0},	/* ldvi.w.f */
@@ -992,7 +988,7 @@
   {52,16,rxr,S,V,0},	/* stvi.l.f */
 };
 
-CONST struct formstr e0_format6[] = {
+const struct formstr e0_format6[] = {
   {0,0,rxl,S,CIR,0},	/* mov */
   {0,0,lr,CIR,S,0},	/* mov */
   {0,0,lr,TOC,S,0},	/* mov */
@@ -1059,7 +1055,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e0_format7[] = {
+const struct formstr e0_format7[] = {
   {84,13,r,V,0,0},	/* sum.b.f */
   {84,14,r,V,0,0},	/* sum.h.f */
   {84,15,r,V,0,0},	/* sum.w.f */
@@ -1094,7 +1090,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e1_format0[] = {
+const struct formstr e1_format0[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -1161,7 +1157,7 @@
   {4,23,rrr,V,S,V},	/* div.l.t */
 };
 
-CONST struct formstr e1_format1[] = {
+const struct formstr e1_format1[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -1228,7 +1224,7 @@
   {21,23,a2r,V,0,0},	/* st.l.t */
 };
 
-CONST struct formstr e1_format2[] = {
+const struct formstr e1_format2[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -1359,7 +1355,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e1_format3[] = {
+const struct formstr e1_format3[] = {
   {32,18,rr,V,V,0},	/* cvtd.s.t */
   {31,19,rr,V,V,0},	/* cvts.d.t */
   {33,19,rr,V,V,0},	/* cvtl.d.t */
@@ -1426,7 +1422,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e1_format4[] = {
+const struct formstr e1_format4[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -1437,7 +1433,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e1_format5[] = {
+const struct formstr e1_format5[] = {
   {51,20,rr,V,V,0},	/* ldvi.b.t */
   {51,21,rr,V,V,0},	/* ldvi.h.t */
   {51,22,rr,V,V,0},	/* ldvi.w.t */
@@ -1456,7 +1452,7 @@
   {52,23,rxr,S,V,0},	/* stvi.l.t */
 };
 
-CONST struct formstr e1_format6[] = {
+const struct formstr e1_format6[] = {
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
   {0,0,0,0,0,0},
@@ -1523,7 +1519,7 @@
   {0,0,0,0,0,0},
 };
 
-CONST struct formstr e1_format7[] = {
+const struct formstr e1_format7[] = {
   {84,20,r,V,0,0},	/* sum.b.t */
   {84,21,r,V,0,0},	/* sum.h.t */
   {84,22,r,V,0,0},	/* sum.w.t */
diff --git a/include/opcode/dlx.h b/include/opcode/dlx.h
index 23e3b00..e1b249f 100644
--- a/include/opcode/dlx.h
+++ b/include/opcode/dlx.h
@@ -163,7 +163,7 @@
   char *args;
 };
 
-static CONST struct dlx_opcode dlx_opcodes[] =
+static const struct dlx_opcode dlx_opcodes[] =
   {
   /* Arithmetic and Logic R-TYPE instructions.  */
     { "nop",      (ALUOP|NOPF),   "N"     },  /* NOP                          */
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 0171f62..71c204c 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -121,9 +121,9 @@
 {"movslq", 2,   0x63, X, Cpu64,  NoSuf|Modrm|Rex64,		{ Reg32|WordMem, Reg64, 0} },
 /* Intel Syntax next 5 insns */
 {"movsx",  2, 0x0fbe, X, Cpu386, b_Suf|Modrm,			{ Reg8|ByteMem, WordReg, 0} },
-{"movsx",  2, 0x0fbf, X, Cpu386, w_Suf|Modrm|IgnoreSize,	{ Reg16|ShortMem, Reg32, 0} },
+{"movsx",  2, 0x0fbf, X, Cpu386, w_Suf|Modrm,			{ Reg16|ShortMem, Reg32, 0} },
 {"movsx",  2, 0x0fbe, X, Cpu64,  b_Suf|Modrm|Rex64,		{ Reg8|ByteMem, Reg64, 0} },
-{"movsx",  2, 0x0fbf, X, Cpu64,  w_Suf|Modrm|IgnoreSize|Rex64,	{ Reg16|ShortMem, Reg64, 0} },
+{"movsx",  2, 0x0fbf, X, Cpu64,  w_Suf|Modrm|Rex64,		{ Reg16|ShortMem, Reg64, 0} },
 {"movsx",  2,   0x63, X, Cpu64,  l_Suf|Modrm|Rex64,		{ Reg32|WordMem, Reg64, 0} },
 
 /* Move with zero extend.  */
@@ -135,11 +135,11 @@
 {"movzwq", 2, 0x0fb7, X, Cpu64,  NoSuf|Modrm|Rex64,		{ Reg16|ShortMem, Reg64, 0} },
 /* Intel Syntax next 4 insns */
 {"movzx",  2, 0x0fb6, X, Cpu386, b_Suf|Modrm,			{ Reg8|ByteMem, WordReg, 0} },
-{"movzx",  2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize,	{ Reg16|ShortMem, Reg32, 0} },
+{"movzx",  2, 0x0fb7, X, Cpu386, w_Suf|Modrm,			{ Reg16|ShortMem, Reg32, 0} },
 /* These instructions are not particulary usefull, since the zero extend
    32->64 is implicit, but we can encode them.  */
 {"movzx",  2, 0x0fb6, X, Cpu386, b_Suf|Modrm|Rex64,		{ Reg8|ByteMem, Reg64, 0} },
-{"movzx",  2, 0x0fb7, X, Cpu386, w_Suf|Modrm|IgnoreSize|Rex64,	{ Reg16|ShortMem, Reg64, 0} },
+{"movzx",  2, 0x0fb7, X, Cpu386, w_Suf|Modrm|Rex64,		{ Reg16|ShortMem, Reg64, 0} },
 
 /* Push instructions.  */
 {"push",   1,	0x50, X, CpuNo64, wl_Suf|ShortForm|DefaultSize,	{ WordReg, 0, 0 } },
diff --git a/include/opcode/m68hc11.h b/include/opcode/m68hc11.h
index 52a2461..a538026 100644
--- a/include/opcode/m68hc11.h
+++ b/include/opcode/m68hc11.h
@@ -1,6 +1,6 @@
 /* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
-   Copyright 1999, 2000 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -191,7 +191,7 @@
 /* Flags of the SPSR register.  */
 #define M6811_SPIF	0x80	/* SPI Transfer Complete flag */
 #define M6811_WCOL	0x40	/* Write Collision */
-#define M6811_MODF	0x20	/* Mode Fault */
+#define M6811_MODF	0x10	/* Mode Fault */
 
 /* Flags of the ADCTL register.  */
 #define M6811_CCF	0x80	/* Conversions Complete Flag */
@@ -212,8 +212,8 @@
 /* Flags of the OC1M register.  */
 #define M6811_OC1M7	0x80	/* Output Compare 7 */
 #define M6811_OC1M6	0x40	/*                6 */
-#define M6811_OC1M5	0x40	/*                5 */
-#define M6811_OC1M4	0x40	/*                4 */
+#define M6811_OC1M5	0x20	/*                5 */
+#define M6811_OC1M4	0x10	/*                4 */
 #define M6811_OC1M3	0x08	/*                3 */
 
 /* Flags of the OC1D register.  */
@@ -341,7 +341,9 @@
 #define M6812_OP_IDX_2        0x0800   /* N,r N:16-bits */
 #define M6812_OP_D_IDX        0x1000   /* Indirect indexed: [D,r] */
 #define M6812_OP_D_IDX_2      0x2000   /* [N,r] N:16-bits */
-#define M6811_OP_MASK         0x0FFFF
+#define M6812_OP_PAGE         0x4000   /* Page number */
+#define M6811_OP_MASK         0x07FFF
+#define M6811_OP_BRANCH       0x00008000 /* Branch, jsr, call */
 #define M6811_OP_BITMASK      0x00010000 /* Bitmask:             #<val-8>    */
 #define M6811_OP_JUMP_REL     0x00020000 /* Pc-Relative:         <val-8>     */
 #define M6812_OP_JUMP_REL16   0x00040000 /* Pc-relative:         <val-16>    */
@@ -376,6 +378,13 @@
 #define M6811_OP_HIGH_ADDR    0x01000000 /* Used internally by gas.  */
 #define M6811_OP_LOW_ADDR     0x02000000
 
+#define M68HC12_BANK_VIRT 0x01000000
+#define M68HC12_BANK_MASK 0x00003fff
+#define M68HC12_BANK_BASE 0x00008000
+#define M68HC12_BANK_SHIFT 14
+#define M68HC12_BANK_PAGE_MASK 0x0ff
+
+
 /* CPU identification.  */
 #define cpu6811 0x01
 #define cpu6812 0x02
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 06f5625..1a39640 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -133,6 +133,16 @@
 #define OP_MASK_SEL		0x7	/* The sel field of mfcZ and mtcZ.  */
 #define OP_SH_CODE19		6       /* 19 bit wait code.  */
 #define OP_MASK_CODE19		0x7ffff
+#define OP_SH_ALN		21
+#define OP_MASK_ALN		0x7
+#define OP_SH_VSEL		21
+#define OP_MASK_VSEL		0x1f
+
+/* Values in the 'VSEL' field.  */
+#define MDMX_FMTSEL_IMM_QH	0x1d
+#define MDMX_FMTSEL_IMM_OB	0x1e
+#define MDMX_FMTSEL_VEC_QH	0x15
+#define MDMX_FMTSEL_VEC_OB	0x16
 
 /* This structure holds information for a particular instruction.  */
 
@@ -220,13 +230,21 @@
    "f" 32 bit floating point constant
    "l" 32 bit floating point constant in .lit4
 
+   MDMX instruction operands (note that while these use the FP register
+   fields, they accept both $fN and $vN names for the registers):  
+   "O"	MDMX alignment offset (OP_*_ALN)
+   "Q"	MDMX vector/scalar/immediate source (OP_*_VSEL and OP_*_FT)
+   "X"	MDMX destination register (OP_*_FD) 
+   "Y"	MDMX source register (OP_*_FS)
+   "Z"	MDMX source register (OP_*_FT)
+
    Other:
    "()" parens surrounding optional value
    ","  separates operands
 
    Characters used so far, for quick reference when adding more:
    "<>(),"
-   "ABCDEFGHIJLMNPRSTUVW"
+   "ABCDEFGHIJLMNOPQRSTUVWXYZ"
    "abcdfhijklopqrstuvwxz"
 */
 
@@ -297,6 +315,10 @@
 #define INSN_MULT                   0x40000000
 /* Instruction synchronize shared memory.  */
 #define INSN_SYNC		    0x80000000
+/* Instruction reads MDMX accumulator.  XXX FIXME: No bits left!  */
+#define INSN_READ_MDMX_ACC	    0
+/* Instruction writes MDMX accumulator.  XXX FIXME: No bits left!  */
+#define INSN_WRITE_MDMX_ACC	    0
 
 /* Instruction is actually a macro.  It should be ignored by the
    disassembler, and requires special treatment by the assembler.  */
@@ -317,9 +339,14 @@
 #define INSN_ISA64                0x00000400
 
 /* Masks used for MIPS-defined ASEs.  */
+#define INSN_ASE_MASK		  0x0000f000
 
+/* MIPS 16 ASE */
+#define INSN_MIPS16               0x00002000
 /* MIPS-3D ASE */
 #define INSN_MIPS3D               0x00004000
+/* MDMX ASE */ 
+#define INSN_MDMX                 0x00008000
 
 /* Chip specific instructions.  These are bitmasks.  */
 
@@ -350,7 +377,6 @@
 /* CPU defines, use instead of hardcoding processor number. Keep this
    in sync with bfd/archures.c in order for machine selection to work.  */
 #define CPU_UNKNOWN	0               /* Gas internal use.  */
-#define CPU_R2000	2000
 #define CPU_R3000	3000
 #define CPU_R3900	3900
 #define CPU_R4000	4000
diff --git a/include/opcode/or32.h b/include/opcode/or32.h
index 05c5326..4609a48 100644
--- a/include/opcode/or32.h
+++ b/include/opcode/or32.h
@@ -31,10 +31,6 @@
 #define PARAMS(x) x
 #endif
 
-#ifndef CONST
-#define CONST const
-#endif
-
 #define MAX_GPRS 32
 #define PAGE_SIZE 4096
 #undef __HALF_WORD_INSN__
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index f7db66f..ffd313a 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -107,6 +107,30 @@
 /* Opcode isn't supported by Power4 architecture.  */
 #define PPC_OPCODE_NOPOWER4 (040000)
 
+/* Opcode is only supported by POWERPC Classic architecture.  */
+#define PPC_OPCODE_CLASSIC (0100000)
+
+/* Opcode is only supported by e500x2 Core.  */
+#define PPC_OPCODE_SPE     (0200000)
+
+/* Opcode is supported by e500x2 Integer select APU.  */
+#define PPC_OPCODE_ISEL     (0400000)
+
+/* Opcode is an e500 SPE floating point instruction.  */
+#define PPC_OPCODE_EFS      (01000000)
+
+/* Opcode is supported by branch locking APU.  */
+#define PPC_OPCODE_BRLOCK   (02000000)
+
+/* Opcode is supported by performance monitor APU.  */
+#define PPC_OPCODE_PMR      (04000000)
+
+/* Opcode is supported by cache locking APU.  */
+#define PPC_OPCODE_CACHELCK (010000000)
+
+/* Opcode is supported by machine check APU.  */
+#define PPC_OPCODE_RFMCI    (020000000)
+
 /* A macro to extract the major opcode from an instruction.  */
 #define PPC_OP(i) (((i) >> 26) & 0x3f)
 
diff --git a/include/partition.h b/include/partition.h
index 851422a..885a79b 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -1,5 +1,5 @@
 /* List implementation of a partition of consecutive integers.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by CodeSourcery, LLC.
 
    This file is part of GCC.
@@ -40,7 +40,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <ansidecl.h>
+#include "ansidecl.h"
 #include <stdio.h>
 
 struct partition_elem
diff --git a/include/remote-sim.h b/include/remote-sim.h
deleted file mode 100644
index 726ec62..0000000
--- a/include/remote-sim.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/* This file defines the interface between the simulator and gdb.
-   Copyright 1993, 1994, 1996, 1997, 1998, 2000
-   Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-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.  */
-
-#if !defined (REMOTE_SIM_H)
-#define REMOTE_SIM_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This file is used when building stand-alone simulators, so isolate this
-   file from gdb.  */
-
-/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
-   gdb does (unsigned int - from defs.h).  */
-
-#ifndef CORE_ADDR_TYPE
-typedef unsigned int SIM_ADDR;
-#else
-typedef CORE_ADDR_TYPE SIM_ADDR;
-#endif
-
-
-/* Semi-opaque type used as result of sim_open and passed back to all
-   other routines.  "desc" is short for "descriptor".
-   It is up to each simulator to define `sim_state'.  */
-
-typedef struct sim_state *SIM_DESC;
-
-
-/* Values for `kind' arg to sim_open.  */
-
-typedef enum {
-  SIM_OPEN_STANDALONE, /* simulator used standalone (run.c) */
-  SIM_OPEN_DEBUG       /* simulator used by debugger (gdb) */
-} SIM_OPEN_KIND;
-
-
-/* Return codes from various functions.  */
-
-typedef enum {
-  SIM_RC_FAIL = 0,
-  SIM_RC_OK = 1,
-  SIM_RC_UNKNOWN_BREAKPOINT = 2,
-  SIM_RC_INSUFFICIENT_RESOURCES = 3,
-  SIM_RC_DUPLICATE_BREAKPOINT = 4
-} SIM_RC;
-
-
-/* The bfd struct, as an opaque type.  */
-
-struct _bfd;
-
-
-/* Main simulator entry points.  */
-
-
-/* Create a fully initialized simulator instance.
-
-   (This function is called when the simulator is selected from the
-   gdb command line.)
-
-   KIND specifies how the simulator shall be used.  Currently there
-   are only two kinds: stand-alone and debug.
-
-   CALLBACK specifies a standard host callback (defined in callback.h).
-
-   ABFD, when non NULL, designates a target program.  The program is
-   not loaded.
-
-   ARGV is a standard ARGV pointer such as that passed from the
-   command line.  The syntax of the argument list is is assumed to be
-   ``SIM-PROG { SIM-OPTION } [ TARGET-PROGRAM { TARGET-OPTION } ]''.
-   The trailing TARGET-PROGRAM and args are only valid for a
-   stand-alone simulator.
-
-   On success, the result is a non NULL descriptor that shall be
-   passed to the other sim_foo functions.  While the simulator
-   configuration can be parameterized by (in decreasing precedence)
-   ARGV's SIM-OPTION, ARGV's TARGET-PROGRAM and the ABFD argument, the
-   successful creation of the simulator shall not dependent on the
-   presence of any of these arguments/options.
-
-   Hardware simulator: The created simulator shall be sufficiently
-   initialized to handle, with out restrictions any client requests
-   (including memory reads/writes, register fetch/stores and a
-   resume).
-
-   Process simulator: that process is not created until a call to
-   sim_create_inferior.  FIXME: What should the state of the simulator
-   be? */
-
-SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct _bfd *abfd, char **argv));
-
-
-/* Destory a simulator instance.
-
-   QUITTING is non-zero if we cannot hang on errors.
-
-   This may involve freeing target memory and closing any open files
-   and mmap'd areas.  You cannot assume sim_kill has already been
-   called. */
-
-void sim_close PARAMS ((SIM_DESC sd, int quitting));
-
-
-/* Load program PROG into the simulators memory.
-
-   If ABFD is non-NULL, the bfd for the file has already been opened.
-   The result is a return code indicating success.
-
-   Hardware simulator: Normally, each program section is written into
-   memory according to that sections LMA using physical (direct)
-   addressing.  The exception being systems, such as PPC/CHRP, which
-   support more complicated program loaders.  A call to this function
-   should not effect the state of the processor registers.  Multiple
-   calls to this function are permitted and have an accumulative
-   effect.
-
-   Process simulator: Calls to this function may be ignored.
-
-   FIXME: Most hardware simulators load the image at the VMA using
-   virtual addressing.
-
-   FIXME: For some hardware targets, before a loaded program can be
-   executed, it requires the manipulation of VM registers and tables.
-   Such manipulation should probably (?) occure in
-   sim_create_inferior. */
-
-SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct _bfd *abfd, int from_tty));
-
-
-/* Prepare to run the simulated program.
-
-   ABFD, if not NULL, provides initial processor state information.
-   ARGV and ENV, if non NULL, are NULL terminated lists of pointers.
-
-   Hardware simulator: This function shall initialize the processor
-   registers to a known value.  The program counter and possibly stack
-   pointer shall be set using information obtained from ABFD (or
-   hardware reset defaults).  ARGV and ENV, dependant on the target
-   ABI, may be written to memory.
-
-   Process simulator: After a call to this function, a new process
-   instance shall exist. The TEXT, DATA, BSS and stack regions shall
-   all be initialized, ARGV and ENV shall be written to process
-   address space (according to the applicable ABI) and the program
-   counter and stack pointer set accordingly. */
-
-SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct _bfd *abfd, char **argv, char **env));
-
-
-/* Fetch LENGTH bytes of the simulated program's memory.  Start fetch
-   at virtual address MEM and store in BUF.  Result is number of bytes
-   read, or zero if error.  */
-
-int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Store LENGTH bytes from BUF into the simulated program's
-   memory. Store bytes starting at virtual address MEM. Result is
-   number of bytes write, or zero if error.  */
-
-int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Fetch register REGNO storing its raw (target endian) value in the
-   LENGTH byte buffer BUF.  Return the actual size of the register or
-   zero if REGNO is not applicable.
-
-   Legacy implementations ignore LENGTH and always return -1.
-
-   If LENGTH does not match the size of REGNO no data is transfered
-   (the actual register size is still returned). */
-
-int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Store register REGNO from the raw (target endian) value in BUF.
-   Return the actual size of the register or zero if REGNO is not
-   applicable.
-
-   Legacy implementations ignore LENGTH and always return -1.
-
-   If LENGTH does not match the size of REGNO no data is transfered
-   (the actual register size is still returned). */
-
-int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Print whatever statistics the simulator has collected.
-
-   VERBOSE is currently unused and must always be zero.  */
-
-void sim_info PARAMS ((SIM_DESC sd, int verbose));
-
-
-/* Run (or resume) the simulated program.
-
-   STEP, when non-zero indicates that only a single simulator cycle
-   should be emulated.
-
-   SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
-   event (hardware interrupt, signal) to be delivered to the simulated
-   program.
-
-   Hardware simulator: If the SIGRC value returned by
-   sim_stop_reason() is passed back to the simulator via SIGGNAL then
-   the hardware simulator shall correctly deliver the hardware event
-   indicated by that signal.  If a value of zero is passed in then the
-   simulation will continue as if there were no outstanding signal.
-   The effect of any other SIGGNAL value is is implementation
-   dependant.
-
-   Process simulator: If SIGRC is non-zero then the corresponding
-   signal is delivered to the simulated program and execution is then
-   continued.  A zero SIGRC value indicates that the program should
-   continue as normal. */
-
-void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
-
-
-/* Asynchronous request to stop the simulation.
-   A nonzero return indicates that the simulator is able to handle
-   the request */
-
-int sim_stop PARAMS ((SIM_DESC sd));
-
-
-/* Fetch the REASON why the program stopped.
-
-   SIM_EXITED: The program has terminated. SIGRC indicates the target
-   dependant exit status.
-
-   SIM_STOPPED: The program has stopped.  SIGRC uses the host's signal
-   numbering as a way of identifying the reaon: program interrupted by
-   user via a sim_stop request (SIGINT); a breakpoint instruction
-   (SIGTRAP); a completed single step (SIGTRAP); an internal error
-   condition (SIGABRT); an illegal instruction (SIGILL); Access to an
-   undefined memory region (SIGSEGV); Mis-aligned memory access
-   (SIGBUS).  For some signals information in addition to the signal
-   number may be retained by the simulator (e.g. offending address),
-   that information is not directly accessable via this interface.
-
-   SIM_SIGNALLED: The program has been terminated by a signal. The
-   simulator has encountered target code that causes the the program
-   to exit with signal SIGRC.
-
-   SIM_RUNNING, SIM_POLLING: The return of one of these values
-   indicates a problem internal to the simulator. */
-
-enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
-
-void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc));
-
-
-/* Passthru for other commands that the simulator might support.
-   Simulators should be prepared to deal with any combination of NULL
-   or empty CMD. */
-
-void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
-
-/* Call these functions to set and clear breakpoints at ADDR. */
-
-SIM_RC sim_set_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_clear_all_breakpoints PARAMS ((SIM_DESC sd));
-
-/* These functions are used to enable and disable breakpoints. */
-
-SIM_RC sim_enable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_disable_breakpoint PARAMS ((SIM_DESC sd, SIM_ADDR addr));
-SIM_RC sim_enable_all_breakpoints PARAMS ((SIM_DESC sd));
-SIM_RC sim_disable_all_breakpoints PARAMS ((SIM_DESC sd));
-
-
-/* Provide simulator with a default (global) host_callback_struct.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
-
-
-/* Set the size of the simulator memory array.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_size PARAMS ((int i));
-
-
-/* Single-step simulator with tracing enabled.
-   THIS PROCEDURE IS DEPRECIATED.
-   THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-int sim_trace PARAMS ((SIM_DESC sd));
-
-
-/* Enable tracing.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure returns: ``0'' indicating that the simulator should
-   be continued using sim_trace() calls; ``1'' indicating that the
-   simulation has finished. */
-
-void sim_set_trace PARAMS ((void));
-
-
-/* Configure the size of the profile buffer.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure does not take a SIM_DESC argument as it is
-   used before sim_open. */
-
-void sim_set_profile_size PARAMS ((int n));
-
-
-/* Kill the running program.
-   THIS PROCEDURE IS DEPRECIATED.
-   GDB and NRUN do not use this interface.
-   This procedure will be replaced as part of the introduction of
-   multi-cpu simulators. */
-
-void sim_kill PARAMS ((SIM_DESC sd));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined (REMOTE_SIM_H) */
diff --git a/include/sort.h b/include/sort.h
index b974059..3f3a92f 100644
--- a/include/sort.h
+++ b/include/sort.h
@@ -1,5 +1,5 @@
 /* Sorting algorithms.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
    Contributed by Mark Mitchell <mark@codesourcery.com>.
 
 This file is part of GCC.
@@ -31,7 +31,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <ansidecl.h>
+#include "ansidecl.h"
 
 /* Sort an array of pointers.  */
 
diff --git a/include/splay-tree.h b/include/splay-tree.h
index 4b7a7bf..23f7ac6 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -1,5 +1,5 @@
 /* A splay-tree datatype.  
-   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GCC.
@@ -34,7 +34,7 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#include <ansidecl.h>
+#include "ansidecl.h"
 
 /* Use typedefs for the key and data types to facilitate changing
    these types, if necessary.  These types should be sufficiently wide
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 89fca1e..828f76f 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,65 @@
+2002-08-07  DJ Delorie  <dj@redhat.com>
+
+	* regex.c (re_error_msgid): Just use a simple array of strings.
+	(re_compile_pattern): Compensate.
+	(re_comp): Likewise.
+	(re_comp): Likewise.
+	(regerror): Likewise.
+
+2002-07-29  Neil Booth  <neil@daikokuya.co.uk>
+
+	* cplus-dem.c (PREPEND_BLANK): Remove.
+
+2002-07-10  Jason Merrill  <jason@redhat.com>
+
+	* cp-demangle.c (demangle_identifier): Support extended Unicode
+	characters.
+
+2002-07-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* cp-demangle.c (demangle_v3_with_details): Wrap in
+	!defined IN_GLIBCPP_V3.
+
+2002-07-01  Mark Mitchell  <mark@codesourcery.com>
+
+	* cp-demangle.c (demangle_operator_name): Add type_arg parameter.
+	Set it for the "st" operator.
+	(demangle_expression): Handle expressions with types as arguments.
+
+2002-06-30  Douglas Rupp  <rupp@gnat.com>
+
+	* configure.in (OUTPUT_OPTION,NO_MINUS_C_MINUS_O): Configure.
+	* Makefile.in (OUTPUT_OPTION): Use.
+
+2002-06-22  Peter Breitenlohner <peb@mppmu.mpg.de>
+
+	* Makefile.in (install_to_libdir): Add $(DESTDIR).
+	(install_to_tooldir): Likewise.
+
+2002-06-17  Douglas Rupp  <rupp@gnat.com>
+
+	* lbasename.c: Add 2002 to copyright.
+	(IS_DIR_SEPARATOR): Remove VMS junk.
+
+2002-06-05  Geoffrey Keating  <geoffk@redhat.com>
+
+	* hashtab.c (htab_create): New stub function for backward
+	compatibility.
+	(htab_try_create): Likewise.
+
+2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
+
+	* hashtab.c (htab_create): Delete.
+	(htab_try_create): Delete.
+	(htab_create_alloc): New.
+	(htab_delete): Support user-specified memory allocation.
+	(htab_expand): Likewise.
+
+2002-05-22  Roman Lechtchinsky  <rl@cs.tu-berlin.de>
+
+	* configure.in: Fix typo in the code checking for sys_errlist.
+	* configure: Regenerated.
+
 2002-05-13  Andreas Schwab  <schwab@suse.de>
 
 	* config.table: Use mh-x86pic also for x86-64.
@@ -30,7 +92,7 @@
 
 2002-03-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
 
-	* cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
+	* cp-demangle.c (java_demangle_v3): Don't try to release "demangled" 
 	if it is NULL.
 
 2002-03-27  DJ Delorie  <dj@redhat.com>
@@ -89,7 +151,7 @@
 
 	* xmalloc.c (xmalloc_fail): Clarify error message.
 
-2002-02-21  Jim Blandy  <jimb@redhat.com>
+2002-02-22  Jim Blandy  <jimb@redhat.com>
 
 	* splay-tree.c (splay_tree_xmalloc_allocate,
 	splay_tree_xmalloc_deallocate): New functions.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 3dccfad..5a25987 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -52,6 +52,9 @@
 INSTALL_DATA = @INSTALL_DATA@
 mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
 
+# Some compilers can't handle cc -c blah.c -o foo/blah.o.
+OUTPUT_OPTION = @OUTPUT_OPTION@
+
 AR = @AR@
 AR_FLAGS = rc
 
@@ -117,7 +120,7 @@
 	if [ x"$(PICFLAG)" != x ]; then \
 	  $(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
 	else true; fi
-	$(COMPILE.c) $<
+	$(COMPILE.c) $< $(OUTPUT_OPTION)
 
 # NOTE: If you add new files to the library, add them to this list
 # (alphabetical), and add them to REQUIRED_OFILES, or
@@ -256,25 +259,25 @@
 install: install_to_$(INSTALL_DEST) install-subdir
 
 install_to_libdir: all
-	$(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
-	( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
-	mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+	$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
+	( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+	mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
 	if test -n "${target_header_dir}"; then \
 	  case "${target_header_dir}" in \
 	    /*)    thd=${target_header_dir};; \
 	    *)     thd=${includedir}${MULTISUBDIR}/${target_header_dir};; \
 	  esac; \
-	  ${mkinstalldirs} $${thd}; \
+	  ${mkinstalldirs} $(DESTDIR)$${thd}; \
 	  for h in ${INSTALLED_HEADERS}; do \
-	    ${INSTALL_DATA} $$h $${thd}; \
+	    ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
 	  done; \
 	fi
 	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install_to_tooldir: all
-	$(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
-	( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
-	mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+	$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
+	( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+	mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
 	@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 # needed-list is used by libstdc++.  NEEDED is the list of functions
diff --git a/libiberty/configure b/libiberty/configure
index fc89885..cac9f56 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -42,7 +42,6 @@
 program_transform_name=s,x,x,
 silent=
 site=
-sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -157,7 +156,6 @@
   --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
@@ -328,11 +326,6 @@
   -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=*)
@@ -498,16 +491,12 @@
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   fi
-else
-  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -616,7 +605,7 @@
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:620: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:609: 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"
@@ -641,7 +630,7 @@
 # Extract the first word of "makeinfo", so it can be a program name with args.
 set dummy makeinfo; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:645: checking for $ac_word" >&5
+echo "configure:634: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -687,7 +676,7 @@
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:691: checking for $ac_word" >&5
+echo "configure:680: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -727,7 +716,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:731: checking host system type" >&5
+echo "configure:720: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -750,7 +739,7 @@
 
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:754: checking build system type" >&5
+echo "configure:743: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -776,7 +765,7 @@
 # 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:780: checking for $ac_word" >&5
+echo "configure:769: 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
@@ -808,7 +797,7 @@
 # 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:812: checking for $ac_word" >&5
+echo "configure:801: 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
@@ -840,7 +829,7 @@
   # 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:844: checking for $ac_word" >&5
+echo "configure:833: 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
@@ -877,7 +866,7 @@
 # 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:881: checking for $ac_word" >&5
+echo "configure:870: 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
@@ -907,7 +896,7 @@
   # 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:911: checking for $ac_word" >&5
+echo "configure:900: 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
@@ -956,7 +945,7 @@
 fi
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:960: checking whether we are using GNU C" >&5
+echo "configure:949: 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
@@ -965,7 +954,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:969: \"$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:958: \"$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
@@ -981,7 +970,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:985: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:974: 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
@@ -1011,8 +1000,69 @@
 
 
 
+if test "x$CC" != xcc; then
+  echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
+echo "configure:1006: checking whether $CC and cc understand -c and -o together" >&5
+else
+  echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
+echo "configure:1009: checking whether cc understands -c and -o together" >&5
+fi
+set dummy $CC; ac_cc="`echo $2 |
+		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
+if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'foo(){}' > conftest.c
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
+if { (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+   test -f conftest.o && { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+      ac_try='cc -c conftest.c -o conftest.o 1>&5'
+      if { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+	 test -f conftest.o && { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+      then
+        # cc works too.
+        :
+      else
+        # cc exists but doesn't like -o.
+        eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<\EOF
+#define NO_MINUS_C_MINUS_O 1
+EOF
+
+fi
+
+# autoconf is lame and doesn't give us any substitution variable for this.
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
+  NO_MINUS_C_MINUS_O=yes
+else
+  OUTPUT_OPTION='-o $@'
+fi
+
+
+
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1016: checking for POSIXized ISC" >&5
+echo "configure:1066: 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
@@ -1033,12 +1083,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1037: checking for working const" >&5
+echo "configure:1087: 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 <<EOF
-#line 1042 "configure"
+#line 1092 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1087,7 +1137,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1108,21 +1158,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1112: checking for inline" >&5
+echo "configure:1162: 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 <<EOF
-#line 1119 "configure"
+#line 1169 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1165,7 +1215,7 @@
 # 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:1169: checking for a BSD compatible install" >&5
+echo "configure:1219: 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
@@ -1226,7 +1276,7 @@
 # able to link anything, it had better be able to at least compile
 # something.
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1230: checking how to run the C preprocessor" >&5
+echo "configure:1280: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1241,13 +1291,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1245 "configure"
+#line 1295 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1301: \"$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
   :
@@ -1258,13 +1308,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1262 "configure"
+#line 1312 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1318: \"$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
   :
@@ -1275,13 +1325,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1279 "configure"
+#line 1329 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1335: \"$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
   :
@@ -1309,17 +1359,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1313: checking for $ac_hdr" >&5
+echo "configure:1363: 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
-#line 1318 "configure"
+#line 1368 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1373: \"$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*
@@ -1346,12 +1396,12 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1350: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1400: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1355 "configure"
+#line 1405 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1367,7 +1417,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1388,12 +1438,12 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1392: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1442: 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 <<EOF
-#line 1397 "configure"
+#line 1447 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1402,7 +1452,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:1406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -1424,19 +1474,19 @@
 
 
 echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
-echo "configure:1428: checking whether errno must be declared" >&5
+echo "configure:1478: checking whether errno must be declared" >&5
 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1433 "configure"
+#line 1483 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 int x = errno;
 ; return 0; }
 EOF
-if { (eval echo configure:1440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   libiberty_cv_declare_errno=no
 else
@@ -1458,12 +1508,12 @@
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1462: checking for ANSI C header files" >&5
+echo "configure:1512: 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 <<EOF
-#line 1467 "configure"
+#line 1517 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1471,7 +1521,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1525: \"$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*
@@ -1488,7 +1538,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1492 "configure"
+#line 1542 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1506,7 +1556,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
+#line 1560 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1527,7 +1577,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1531 "configure"
+#line 1581 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1538,7 +1588,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1562,12 +1612,12 @@
 fi
 
 echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
-echo "configure:1566: checking for uintptr_t" >&5
+echo "configure:1616: checking for uintptr_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1571 "configure"
+#line 1621 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1604,12 +1654,12 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1608: checking for pid_t" >&5
+echo "configure:1658: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1613 "configure"
+#line 1663 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1694,12 +1744,12 @@
   for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1698: checking for $ac_func" >&5
+echo "configure:1748: 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 <<EOF
-#line 1703 "configure"
+#line 1753 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1722,7 +1772,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1776: \"$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
@@ -1749,12 +1799,12 @@
   for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1753: checking for $ac_func" >&5
+echo "configure:1803: 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 <<EOF
-#line 1758 "configure"
+#line 1808 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1777,7 +1827,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1831: \"$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
@@ -1804,12 +1854,12 @@
   for ac_func in memmove memset putenv random rename rindex sigsetmask
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1808: checking for $ac_func" >&5
+echo "configure:1858: 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 <<EOF
-#line 1813 "configure"
+#line 1863 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1832,7 +1882,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1886: \"$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
@@ -1859,12 +1909,12 @@
   for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1863: checking for $ac_func" >&5
+echo "configure:1913: 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 <<EOF
-#line 1868 "configure"
+#line 1918 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1887,7 +1937,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1941: \"$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
@@ -1914,12 +1964,12 @@
   for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1918: checking for $ac_func" >&5
+echo "configure:1968: 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 <<EOF
-#line 1923 "configure"
+#line 1973 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1942,7 +1992,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1996: \"$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
@@ -1969,12 +2019,12 @@
   for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1973: checking for $ac_func" >&5
+echo "configure:2023: 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 <<EOF
-#line 1978 "configure"
+#line 2028 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1997,7 +2047,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2051: \"$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
@@ -2024,12 +2074,12 @@
   for ac_func in sysconf times sbrk gettimeofday ffs
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2028: checking for $ac_func" >&5
+echo "configure:2078: 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 <<EOF
-#line 2033 "configure"
+#line 2083 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2052,7 +2102,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2106: \"$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
@@ -2282,7 +2332,7 @@
   # We haven't set the list of objects yet.  Use the standard autoconf
   # tests.  This will only work if the compiler works.
   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2286: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2336: 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.
@@ -2293,12 +2343,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 2297 "configure"
+#line 2347 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2352: \"$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
@@ -2324,19 +2374,19 @@
   { 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:2328: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2378: 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
 
   for ac_func in $funcs
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2335: checking for $ac_func" >&5
+echo "configure:2385: 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 <<EOF
-#line 2340 "configure"
+#line 2390 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2359,7 +2409,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2413: \"$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
@@ -2386,12 +2436,12 @@
 
 
   echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2390: checking whether alloca needs Cray hooks" >&5
+echo "configure:2440: 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 <<EOF
-#line 2395 "configure"
+#line 2445 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -2416,12 +2466,12 @@
 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:2420: checking for $ac_func" >&5
+echo "configure:2470: 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 <<EOF
-#line 2425 "configure"
+#line 2475 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2444,7 +2494,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2498: \"$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
@@ -2470,7 +2520,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2474: checking stack direction for C alloca" >&5
+echo "configure:2524: 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
@@ -2478,7 +2528,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 2482 "configure"
+#line 2532 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -2497,7 +2547,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:2501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2551: \"$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
@@ -2519,17 +2569,17 @@
 
   ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2523: checking for vfork.h" >&5
+echo "configure:2573: checking for vfork.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
-#line 2528 "configure"
+#line 2578 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2583: \"$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*
@@ -2554,18 +2604,18 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2558: checking for working vfork" >&5
+echo "configure:2608: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2564: checking for vfork" >&5
+echo "configure:2614: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2569 "configure"
+#line 2619 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -2588,7 +2638,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -2610,7 +2660,7 @@
 ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 2614 "configure"
+#line 2664 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -2705,7 +2755,7 @@
   }
 }
 EOF
-if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -2737,12 +2787,12 @@
     for ac_func in _doprnt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2741: checking for $ac_func" >&5
+echo "configure:2791: 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 <<EOF
-#line 2746 "configure"
+#line 2796 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2765,7 +2815,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2819: \"$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
@@ -2795,12 +2845,12 @@
     for ac_func in _doprnt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_func" >&5
+echo "configure:2849: 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 <<EOF
-#line 2804 "configure"
+#line 2854 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2823,7 +2873,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2877: \"$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
@@ -2851,19 +2901,19 @@
 
   for v in $vars; do
     echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2855: checking for $v" >&5
+echo "configure:2905: checking for $v" >&5
     if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2860 "configure"
+#line 2910 "configure"
 #include "confdefs.h"
 int *p;
 int main() {
-extern int $v []; p = &$v;
+extern int $v []; p = $v;
 ; return 0; }
 EOF
-if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "libiberty_cv_var_$v=yes"
 else
@@ -2889,12 +2939,12 @@
   for ac_func in $checkfuncs
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2893: checking for $ac_func" >&5
+echo "configure:2943: 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 <<EOF
-#line 2898 "configure"
+#line 2948 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2917,7 +2967,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2971: \"$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
@@ -2943,21 +2993,21 @@
 
 fi
 
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2951: checking for $ac_hdr" >&5
+echo "configure:3001: 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
-#line 2956 "configure"
+#line 3006 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3011: \"$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*
@@ -2986,12 +3036,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2990: checking for $ac_func" >&5
+echo "configure:3040: 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 <<EOF
-#line 2995 "configure"
+#line 3045 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3014,7 +3064,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3068: \"$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
@@ -3039,7 +3089,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3043: checking for working mmap" >&5
+echo "configure:3093: 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
@@ -3047,7 +3097,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3051 "configure"
+#line 3101 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3075,11 +3125,24 @@
 #include <fcntl.h>
 #include <sys/mman.h>
 
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -3187,7 +3250,7 @@
 }
 
 EOF
-if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3254: \"$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
@@ -3211,7 +3274,7 @@
 
 
 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3215: checking for working strncmp" >&5
+echo "configure:3278: checking for working strncmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3219,7 +3282,7 @@
   ac_cv_func_strncmp_works=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3223 "configure"
+#line 3286 "configure"
 #include "confdefs.h"
 
 /* Test by Jim Wilson and Kaveh Ghazi.
@@ -3283,7 +3346,7 @@
 }
 
 EOF
-if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_strncmp_works=yes
 else
@@ -3467,6 +3530,8 @@
 s%@RANLIB@%$RANLIB%g
 s%@CC@%$CC%g
 s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
+s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
+s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
diff --git a/libiberty/configure.in b/libiberty/configure.in
index f6d92bc..a8dc66f 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -100,6 +100,16 @@
 
 LIB_AC_PROG_CC
 
+AC_PROG_CC_C_O
+# autoconf is lame and doesn't give us any substitution variable for this.
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
+  NO_MINUS_C_MINUS_O=yes
+else
+  OUTPUT_OPTION='-o $@'
+fi
+AC_SUBST(NO_MINUS_C_MINUS_O)
+AC_SUBST(OUTPUT_OPTION)
+
 AC_ISC_POSIX
 AC_C_CONST
 AC_C_INLINE
@@ -401,7 +411,7 @@
   for v in $vars; do
     AC_MSG_CHECKING([for $v])
     AC_CACHE_VAL(libiberty_cv_var_$v,
-      [AC_TRY_LINK([int *p;], [extern int $v []; p = &$v;],
+      [AC_TRY_LINK([int *p;], [extern int $v []; p = $v;],
 		   [eval "libiberty_cv_var_$v=yes"],
 		   [eval "libiberty_cv_var_$v=no"])])
     if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 4a91700..eece533 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -51,6 +51,8 @@
 #include <string.h>
 #endif
 
+#include <ctype.h>
+
 #include "ansidecl.h"
 #include "libiberty.h"
 #include "dyn-string.h"
@@ -898,7 +900,7 @@
 static status_t demangle_identifier
   PARAMS ((demangling_t, int, dyn_string_t));
 static status_t demangle_operator_name
-  PARAMS ((demangling_t, int, int *));
+  PARAMS ((demangling_t, int, int *, int *));
 static status_t demangle_nv_offset
   PARAMS ((demangling_t));
 static status_t demangle_v_offset
@@ -1325,7 +1327,7 @@
       if (peek == 'c' && peek_char_next (dm) == 'v')
 	*suppress_return_type = 1;
 
-      RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args));
+      RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args, NULL));
     }
   else if (peek == 'C' || peek == 'D')
     {
@@ -1466,9 +1468,45 @@
 
   while (length-- > 0)
     {
+      int ch;
       if (end_of_name_p (dm))
 	return "Unexpected end of name in <identifier>.";
-      if (!dyn_string_append_char (identifier, next_char (dm)))
+      ch = next_char (dm);
+
+      /* Handle extended Unicode characters.  We encode them as __U{hex}_,
+         where {hex} omits leading 0's.  For instance, '$' is encoded as
+         "__U24_".  */
+      if (ch == '_'
+	  && peek_char (dm) == '_'
+	  && peek_char_next (dm) == 'U')
+	{
+	  char buf[10];
+	  int pos = 0;
+	  advance_char (dm); advance_char (dm); length -= 2;
+	  while (length-- > 0)
+	    {
+	      ch = next_char (dm);
+	      if (!isxdigit (ch))
+		break;
+	      buf[pos++] = ch;
+	    }
+	  if (ch != '_' || length < 0)
+	    return STATUS_ERROR;
+	  if (pos == 0)
+	    {
+	      /* __U_ just means __U.  */
+	      if (!dyn_string_append_cstr (identifier, "__U"))
+		return STATUS_ALLOCATION_FAILED;
+	      continue;
+	    }
+	  else
+	    {
+	      buf[pos] = '\0';
+	      ch = strtol (buf, 0, 16);
+	    }
+	}
+
+      if (!dyn_string_append_char (identifier, ch))
 	return STATUS_ALLOCATION_FAILED;
     }
 
@@ -1501,7 +1539,9 @@
 /* Demangles and emits an <operator-name>.  If SHORT_NAME is non-zero,
    the short form is emitted; otherwise the full source form
    (`operator +' etc.) is emitted.  *NUM_ARGS is set to the number of
-   operands that the operator takes.  
+   operands that the operator takes.  If TYPE_ARG is non-NULL,
+   *TYPE_ARG is set to 1 if the first argument is a type and 0
+   otherwise.
 
     <operator-name>
                   ::= nw        # new           
@@ -1551,15 +1591,17 @@
                   ::= cl        # ()            
                   ::= ix        # []            
                   ::= qu        # ?
-                  ::= sz        # sizeof 
+		  ::= st        # sizeof (a type)
+                  ::= sz        # sizeof (an expression)
                   ::= cv <type> # cast        
 		  ::= v [0-9] <source-name>  # vendor extended operator  */
 
 static status_t
-demangle_operator_name (dm, short_name, num_args)
+demangle_operator_name (dm, short_name, num_args, type_arg)
      demangling_t dm;
      int short_name;
      int *num_args;
+     int *type_arg;
 {
   struct operator_code
   {
@@ -1633,6 +1675,10 @@
 
   DEMANGLE_TRACE ("operator-name", dm);
 
+  /* Assume the first argument is not a type.  */
+  if (type_arg)
+    *type_arg = 0;
+
   /* Is this a vendor-extended operator?  */
   if (c0 == 'v' && IS_DIGIT (c1))
     {
@@ -1652,6 +1698,16 @@
       return STATUS_OK;
     }
 
+  /* Is it the sizeof variant that takes a type?  */
+  if (c0 == 's' && c1 == 't')
+    {
+      RETURN_IF_ERROR (result_add (dm, " sizeof"));
+      *num_args = 1;
+      if (type_arg)
+	*type_arg = 1;
+      return STATUS_OK;
+    }
+
   /* Perform a binary search for the operator code.  */
   while (1)
     {
@@ -3154,6 +3210,7 @@
     /* An operator expression.  */
     {
       int num_args;
+      int type_arg;
       status_t status = STATUS_OK;
       dyn_string_t operator_name;
 
@@ -3161,7 +3218,8 @@
 	 operations in infix notation, capture the operator name
 	 first.  */
       RETURN_IF_ERROR (result_push (dm));
-      RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args));
+      RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args,
+					       &type_arg));
       operator_name = (dyn_string_t) result_pop (dm);
 
       /* If it's binary, do an operand first.  */
@@ -3182,7 +3240,10 @@
       
       /* Emit its second (if binary) or only (if unary) operand.  */
       RETURN_IF_ERROR (result_add_char (dm, '('));
-      RETURN_IF_ERROR (demangle_expression (dm));
+      if (type_arg)
+	RETURN_IF_ERROR (demangle_type (dm));
+      else
+	RETURN_IF_ERROR (demangle_expression (dm));
       RETURN_IF_ERROR (result_add_char (dm, ')'));
 
       /* The ternary operator takes a third operand.  */
@@ -3857,6 +3918,7 @@
 #endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */
 
 
+#ifndef IN_GLIBCPP_V3
 /* Demangle NAME in the G++ V3 ABI demangling style, and return either
    zero, indicating that some error occurred, or a demangling_t
    holding the results.  */
@@ -3894,7 +3956,6 @@
 }
 
 
-#ifndef IN_GLIBCPP_V3
 /* Return non-zero iff NAME is the mangled form of a constructor name
    in the G++ V3 ABI demangling style.  Specifically, return:
    - '1' if NAME is a complete object constructor,
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 203e30d..995757c 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -305,8 +305,6 @@
 };
 
 #define STRING_EMPTY(str)	((str) -> b == (str) -> p)
-#define PREPEND_BLANK(str)	{if (!STRING_EMPTY(str)) \
-    string_prepend(str, " ");}
 #define APPEND_BLANK(str)	{if (!STRING_EMPTY(str)) \
     string_append(str, " ");}
 #define LEN_STRING(str)         ( (STRING_EMPTY(str))?0:((str)->p - (str)->b))
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 7477c35..6bf59ff 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -158,33 +158,52 @@
 /* This function creates table with length slightly longer than given
    source length.  Created hash table is initiated as empty (all the
    hash table entries are EMPTY_ENTRY).  The function returns the
-   created hash table.  Memory allocation must not fail.  */
+   created hash table, or NULL if memory allocation fails.  */
 
 htab_t
+htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
+     size_t size;
+     htab_hash hash_f;
+     htab_eq eq_f;
+     htab_del del_f;
+     htab_alloc alloc_f;
+     htab_free free_f;
+{
+  htab_t result;
+
+  size = higher_prime_number (size);
+  result = (htab_t) (*alloc_f) (1, sizeof (struct htab));
+  if (result == NULL)
+    return NULL;
+  result->entries = (PTR *) (*alloc_f) (size, sizeof (PTR));
+  if (result->entries == NULL)
+    {
+      if (free_f != NULL)
+	(*free_f) (result);
+      return NULL;
+    }
+  result->size = size;
+  result->hash_f = hash_f;
+  result->eq_f = eq_f;
+  result->del_f = del_f;
+  result->alloc_f = alloc_f;
+  result->free_f = free_f;
+  return result;
+}
+
+/* These functions exist solely for backward compatibility.  */
+
+#undef htab_create
+htab_t
 htab_create (size, hash_f, eq_f, del_f)
      size_t size;
      htab_hash hash_f;
      htab_eq eq_f;
      htab_del del_f;
 {
-  htab_t result;
-
-  size = higher_prime_number (size);
-  result = (htab_t) xcalloc (1, sizeof (struct htab));
-  result->entries = (PTR *) xcalloc (size, sizeof (PTR));
-  result->size = size;
-  result->hash_f = hash_f;
-  result->eq_f = eq_f;
-  result->del_f = del_f;
-  result->return_allocation_failure = 0;
-  return result;
+  return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
 }
 
-/* This function creates table with length slightly longer than given
-   source length.  The created hash table is initiated as empty (all the
-   hash table entries are EMPTY_ENTRY).  The function returns the created
-   hash table.  Memory allocation may fail; it may return NULL.  */
-
 htab_t
 htab_try_create (size, hash_f, eq_f, del_f)
      size_t size;
@@ -192,26 +211,7 @@
      htab_eq eq_f;
      htab_del del_f;
 {
-  htab_t result;
-
-  size = higher_prime_number (size);
-  result = (htab_t) calloc (1, sizeof (struct htab));
-  if (result == NULL)
-    return NULL;
-
-  result->entries = (PTR *) calloc (size, sizeof (PTR));
-  if (result->entries == NULL)
-    {
-      free (result);
-      return NULL;
-    }
-
-  result->size = size;
-  result->hash_f = hash_f;
-  result->eq_f = eq_f;
-  result->del_f = del_f;
-  result->return_allocation_failure = 1;
-  return result;
+  return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
 }
 
 /* This function frees all memory allocated for given hash table.
@@ -229,8 +229,11 @@
 	  && htab->entries[i] != DELETED_ENTRY)
 	(*htab->del_f) (htab->entries[i]);
 
-  free (htab->entries);
-  free (htab);
+  if (htab->free_f != NULL)
+    {
+      (*htab->free_f) (htab->entries);
+      (*htab->free_f) (htab);
+    }
 }
 
 /* This function clears all entries in the given hash table.  */
@@ -302,21 +305,17 @@
   PTR *oentries;
   PTR *olimit;
   PTR *p;
+  PTR *nentries;
 
   oentries = htab->entries;
   olimit = oentries + htab->size;
 
   htab->size = higher_prime_number (htab->size * 2);
 
-  if (htab->return_allocation_failure)
-    {
-      PTR *nentries = (PTR *) calloc (htab->size, sizeof (PTR *));
-      if (nentries == NULL)
-	return 0;
-      htab->entries = nentries;
-    }
-  else
-    htab->entries = (PTR *) xcalloc (htab->size, sizeof (PTR *));
+  nentries = (PTR *) (*htab->alloc_f) (htab->size, sizeof (PTR *));
+  if (nentries == NULL)
+    return 0;
+  htab->entries = nentries;
 
   htab->n_elements -= htab->n_deleted;
   htab->n_deleted = 0;
@@ -337,7 +336,8 @@
     }
   while (p < olimit);
 
-  free (oentries);
+  if (htab->free_f != NULL)
+    (*htab->free_f) (oentries);
   return 1;
 }
 
diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c
index cea0253..43cb73f 100644
--- a/libiberty/lbasename.c
+++ b/libiberty/lbasename.c
@@ -1,6 +1,6 @@
 /* Libiberty basename.  Like basename, but is not overridden by the
    system C library.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of the libiberty library.
 Libiberty is free software; you can redistribute it and/or
@@ -53,19 +53,11 @@
 #  endif
 #endif
 
-/* Define IS_DIR_SEPARATOR. VMS uses '::', ':', '[...]' and '<...>' to
-   separate the different components of a file specification.  It's a
-   bit of a stretch to call ':', ']' and '>' directory separators, so
-   just define the test to find the file name component.  */
-#ifdef VMS
-#  define IS_DIR_SEPARATOR(ch) ((ch) == ':' || (ch) == ']' || (ch) == '>')
+#ifndef DIR_SEPARATOR_2
+#  define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
 #else
-#  ifndef DIR_SEPARATOR_2
-#    define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#  else
-#    define IS_DIR_SEPARATOR(ch) \
+#  define IS_DIR_SEPARATOR(ch) \
 	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#  endif
 #endif
 
 const char *
diff --git a/libiberty/regex.c b/libiberty/regex.c
index a64cd56..a83cda0 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -2,7 +2,7 @@
    version 0.12.
    (Implements POSIX draft P1003.2/D11.2, except for some of the
    internationalization features.)
-   Copyright (C) 1993-1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1993-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -1373,80 +1373,26 @@
    POSIX doesn't require that we do anything for REG_NOERROR,
    but why not be nice?  */
 
-static const char re_error_msgid[] =
+static const char *re_error_msgid[] =
   {
-# define REG_NOERROR_IDX	0
-    gettext_noop ("Success")	/* REG_NOERROR */
-    "\0"
-# define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
-    gettext_noop ("No match")	/* REG_NOMATCH */
-    "\0"
-# define REG_BADPAT_IDX	(REG_NOMATCH_IDX + sizeof "No match")
-    gettext_noop ("Invalid regular expression") /* REG_BADPAT */
-    "\0"
-# define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
-    gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
-    "\0"
-# define REG_ECTYPE_IDX	(REG_ECOLLATE_IDX + sizeof "Invalid collation character")
-    gettext_noop ("Invalid character class name") /* REG_ECTYPE */
-    "\0"
-# define REG_EESCAPE_IDX	(REG_ECTYPE_IDX + sizeof "Invalid character class name")
-    gettext_noop ("Trailing backslash") /* REG_EESCAPE */
-    "\0"
-# define REG_ESUBREG_IDX	(REG_EESCAPE_IDX + sizeof "Trailing backslash")
-    gettext_noop ("Invalid back reference") /* REG_ESUBREG */
-    "\0"
-# define REG_EBRACK_IDX	(REG_ESUBREG_IDX + sizeof "Invalid back reference")
-    gettext_noop ("Unmatched [ or [^")	/* REG_EBRACK */
-    "\0"
-# define REG_EPAREN_IDX	(REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
-    gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
-    "\0"
-# define REG_EBRACE_IDX	(REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
-    gettext_noop ("Unmatched \\{") /* REG_EBRACE */
-    "\0"
-# define REG_BADBR_IDX	(REG_EBRACE_IDX + sizeof "Unmatched \\{")
-    gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
-    "\0"
-# define REG_ERANGE_IDX	(REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
-    gettext_noop ("Invalid range end")	/* REG_ERANGE */
-    "\0"
-# define REG_ESPACE_IDX	(REG_ERANGE_IDX + sizeof "Invalid range end")
-    gettext_noop ("Memory exhausted") /* REG_ESPACE */
-    "\0"
-# define REG_BADRPT_IDX	(REG_ESPACE_IDX + sizeof "Memory exhausted")
-    gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
-    "\0"
-# define REG_EEND_IDX	(REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
-    gettext_noop ("Premature end of regular expression") /* REG_EEND */
-    "\0"
-# define REG_ESIZE_IDX	(REG_EEND_IDX + sizeof "Premature end of regular expression")
-    gettext_noop ("Regular expression too big") /* REG_ESIZE */
-    "\0"
-# define REG_ERPAREN_IDX	(REG_ESIZE_IDX + sizeof "Regular expression too big")
+    gettext_noop ("Success"),	/* REG_NOERROR */
+    gettext_noop ("No match"),	/* REG_NOMATCH */
+    gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
+    gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
+    gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
+    gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
+    gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
+    gettext_noop ("Unmatched [ or [^"),	/* REG_EBRACK */
+    gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
+    gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
+    gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
+    gettext_noop ("Invalid range end"),	/* REG_ERANGE */
+    gettext_noop ("Memory exhausted"), /* REG_ESPACE */
+    gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
+    gettext_noop ("Premature end of regular expression"), /* REG_EEND */
+    gettext_noop ("Regular expression too big"), /* REG_ESIZE */
     gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
   };
-
-static const size_t re_error_msgid_idx[] =
-  {
-    REG_NOERROR_IDX,
-    REG_NOMATCH_IDX,
-    REG_BADPAT_IDX,
-    REG_ECOLLATE_IDX,
-    REG_ECTYPE_IDX,
-    REG_EESCAPE_IDX,
-    REG_ESUBREG_IDX,
-    REG_EBRACK_IDX,
-    REG_EPAREN_IDX,
-    REG_EBRACE_IDX,
-    REG_BADBR_IDX,
-    REG_ERANGE_IDX,
-    REG_ESPACE_IDX,
-    REG_BADRPT_IDX,
-    REG_EEND_IDX,
-    REG_ESIZE_IDX,
-    REG_ERPAREN_IDX
-  };
 
 #endif /* INSIDE_RECURSION */
 
@@ -7944,7 +7890,7 @@
 
   if (!ret)
     return NULL;
-  return gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+  return gettext (re_error_msgid[(int) ret]);
 }
 #ifdef _LIBC
 weak_alias (__re_compile_pattern, re_compile_pattern)
@@ -7981,14 +7927,12 @@
     {
       re_comp_buf.buffer = (unsigned char *) malloc (200);
       if (re_comp_buf.buffer == NULL)
-        return (char *) gettext (re_error_msgid
-				 + re_error_msgid_idx[(int) REG_ESPACE]);
+        return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
       re_comp_buf.allocated = 200;
 
       re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
       if (re_comp_buf.fastmap == NULL)
-	return (char *) gettext (re_error_msgid
-				 + re_error_msgid_idx[(int) REG_ESPACE]);
+	return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
     }
 
   /* Since `re_exec' always passes NULL for the `regs' argument, we
@@ -8008,7 +7952,7 @@
     return NULL;
 
   /* Yes, we're discarding `const' here if !HAVE_LIBINTL.  */
-  return (char *) gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+  return (char *) gettext (re_error_msgid[(int) ret]);
 }
 
 
@@ -8239,15 +8183,15 @@
   size_t msg_size;
 
   if (errcode < 0
-      || errcode >= (int) (sizeof (re_error_msgid_idx)
-			   / sizeof (re_error_msgid_idx[0])))
+      || errcode >= (int) (sizeof (re_error_msgid)
+			   / sizeof (re_error_msgid[0])))
     /* Only error codes returned by the rest of the code should be passed
        to this routine.  If we are given anything else, or if other regex
        code generates an invalid error code, then the program has a bug.
        Dump core so we can fix it.  */
     abort ();
 
-  msg = gettext (re_error_msgid + re_error_msgid_idx[errcode]);
+  msg = gettext (re_error_msgid[errcode]);
 
   msg_size = strlen (msg) + 1; /* Includes the null.  */
 
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 81b061d..ecdd732 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -2587,6 +2587,10 @@
 _ZN4Prim1iEibcdfwPN4java4lang6StringEsx
 Prim.i(int, boolean, byte, double, float, char, java.lang.String, short, long)
 #
+--format=java
+_ZN4java4util14Map__U24_Entry11class__U24_E
+java.util.Map$Entry.class$
+#
 --format=hp
 _Utf58_0_1__1_2147483647__2147483648
 _Utf58_0_1__1_2147483647__2147483648
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh
index 22875d0..bdc67f9 100644
--- a/ltcf-cxx.sh
+++ b/ltcf-cxx.sh
@@ -250,11 +250,17 @@
     ;;
   hpux*)
     if test $with_gnu_ld = no; then
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      case "$host_cpu" in
+	ia64*)
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_shlibpath_var=no ;;
+	*)
+	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;;
+      esac
+      hardcode_direct=yes
       hardcode_libdir_separator=:
       export_dynamic_flag_spec='${wl}-E'
     fi
-    hardcode_direct=yes
     hardcode_minus_L=yes # Not in the search PATH, but as the default
 			 # location of the library.
 
@@ -283,7 +289,14 @@
 	  if test $with_gnu_ld = no; then
 	    case "$host_os" in
 	    hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
-	    *) archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
+	    *)
+	      case "$host_cpu" in
+		ia64*)
+		  archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;;
+		*)
+		  archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
+	      esac
+	      ;;
 	    esac
 	  fi
 	else
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 2c5816b..8bbcdff 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,258 @@
+2002-08-16  Christian Groessler <chris@groessler.org>
+
+	* z8k-dis.c (unparse_instr): case CLASS_BA: Designate hex
+	values as those.
+	* z8kgen.c (opt): Fix definition of "in rd,imm16" opcode.
+	* z8k-opc.h: Regenerated with new z8kgen.c.
+
+2002-08-19  Elena Zannoni  <ezannoni@redhat.com> 
+
+        From  matthew green  <mrg@redhat.com>
+
+	* ppc-dis.c (powerpc_dialect): Support `-m500', `-m500x2' and
+	`-mefs'. Turn off AltiVec for E500 and efs.
+	(print_insn_powerpc): Don't print an AltiVec instruction if the
+	dialect is not efs.
+
+	* ppc-opc.c (insert_pmrn, extract_pmrn, insert_ev2, extract_ev2,
+	insert_ev4, extract_ev4, insert_ev8, extract_ev8): New functions
+	for extracting pmrn/evld/evstd/etc operands.
+	(CRB, CRFD, CRFS, DC, RD): New instruction fields.
+	(CT): Make this equal to RD + 1.
+	(PMRN): New operand.
+	(RA): Update.
+	(EVUIMM, EVUIMM_2, EVUIMM_4, EVUIMM_8): New operands.
+	(WS): Update.
+	(EVSEL, EVSEL_MASK): New instruction form and mask for EVSEL.
+	(ISEL, ISEL_MASK): New instruction form and mask for ISEL.
+	(XISEL, XISEL_MASK): New instruction form and mask for ISEL.
+	(CTX, CTX_MASK): New instruction form and mask for context cache
+	instructions.
+	(UCTX, UCTX_MASK): New instruction form and mask for user context
+	cache instructions.
+	(XC, XC_MASK, XUC, XUC_MASK): New instruction forms.
+	(CLASSIC): New define.
+	(PPCESPE): New define.
+	(PPCISEL, , PPCBRLK, PPCPMR, PPCCHLK, PPCRFMI): New
+	defines for integer select, cache control, branch
+	locking, power management, cache locking and machine check
+	APU instructions, respectively.
+	(efsabs, efsnabs, efsneg, efsadd, efssub, efsmul,
+	efsdiv, efscmpgt, efscmplt, efscmpeq, efststgt, efststlt,
+	efststeq, efscfui, efsctuiz, efscfsi, efscfuf, efscfsf,
+	efsctui, efsctsi, efsctsiz, efsctuf, efsctsf, 
+	evaddw, evaddiw, evsubfw, evsubifw, evabs, evneg, evextsb,
+	evextsh, evrndw, evcntlzw, evcntlsw, brinc, evand, evandc, evor,
+	evorc, evxor, eveqv, evnand, evnor, evrlw, evrlwi, evslw, evslwi,
+	evsrws, evsrwu, evsrwis, evsrwiu, evsplati, evsplatfi, evmergehi,
+	evmergelo, evmergehilo, evmergelohi, evcmpgts, evcmpgtu, evcmplts,
+	evcmpltu, evcmpeq, evsel, evldd, evlddx, evldw, evldwx, evldh,
+	evldhx, evlwhe, evlwhex, evlwhou, evlwhoux, evlwhos, evlwhosx,
+	evlwwsplat, evlwwsplatx, evlwhsplat, evlwhsplatx, evlhhesplat,
+	evlhhesplatx, evlhousplat, evlhousplatx, evlhossplat, evlhossplatx,
+	evstdd, evstddx, evstdw, evstdwx, evstdh, evstdhx, evstwwe,
+	evstwwex, evstwwo, evstwwox, evstwhe, evstwhex, evstwho, evstwhox,
+	evfsabs, evfsnabs, evfsneg, evfsadd, evfssub, evfsmul, evfsdiv,
+	evfscmpgt, evfscmplt, evfscmpeq, evfststgt, evfststlt, evfststeq,
+	evfscfui, evfsctuiz, evfscfsi, evfscfuf, evfscfsf, evfsctui,
+	evfsctsi, evfsctsiz, evfsctuf, evfsctsf, evsabs, evsnabs, evsneg,
+	evsadd, evssub, evsmul, evsdiv, evscmpgt, evsgmplt, evsgmpeq,
+	evststgt, evststlt, evststeq, evscfui, evscfsi, evscfuf, evscfsf,
+	evsctui, evsctuiz, evsctsi, evsctsiz, evsctuf, evsctsf, evmhossf,
+	evmhossfa, evmhosmf, evmhosmfa, evmhosmi, evmhosmia, evmhoumi,
+	evmhoumia, evmhessf, evmhessfa, evmhesmf, evmhesmfa, evmhesmi,
+	evmhesmia, evmheumi, evmheumia, evmhossfaaw, evmhossiaaw,
+	evmhosmfaaw, evmhosmiaaw, evmhousiaaw, evmhoumiaaw, evmhessfaaw,
+	evmhessiaaw, evmhesmfaaw, evmhesmiaaw, evmheusiaaw, evmheumiaaw,
+	evmhossfanw, evmhossianw, evmhosmfanw, evmhosmianw, evmhousianw,
+	evmhoumianw, evmhessfanw, evmhessianw, evmhesmfanw, evmhesmianw,
+	evmheusianw, evmheumianw, evmhogsmfaa, evmhogsmiaa, evmhogumiaa,
+	evmhegsmfaa, evmhegsmiaa, evmhegumiaa, evmhogsmfan, evmhogsmian,
+	evmhogumian, evmhegsmfan, evmhegsmian, evmhegumian, evmwhssf,
+	evmwhssfa, evmwhssfaa, evmwhssmaa, evmwhsmfaa, evmwhsmiaa,
+	evmwhusiaa, evmwhumiaa, evmwhssfan, evmwhssian, evmwhsmfan,
+	evmwhsmian, evmwhusian, evmwhumian, evmwhgssfaa, evmwhgsmfaa,
+	evmwhgsmiaa, evmwhgumiaa, evmwhgssfan, evmwhgsmfan, evmwhgsmian,
+	evmwhgumian, evmwhsmf, evmwhsmfa, evmshsmi, evmshsmia, evmshumi,
+	evmshumia, evmmlssf, evmmlssfa, evmwlsmf, evmwlsmfa, evmwlumi,
+	evmwlumia, evmwlssfaaw, evmwlssiaaw, evmwlsmfaaw, evmwlsmiaaw,
+	evmwlusiaaw, evmwlumiaaw, evmwissfanw, evmwissianw, evmwlsmfanw,
+	evmwlsmianw, evmwlusianw, evmwlumianw, evmwssf, evmwssfa,
+	evmwsmf, evmwsmfa, evmwsmi, evmwsmia, evmwumi, evmwumia,
+	evmwssfaa, evmwsmfaa, evmwsmiaa, evmwumiaa, evmwssfan, evmwsmfan,
+	evmwsmian, evmwumian, evaddssiaaw, evaddsmiaaw, evaddusiaaw,
+	evaddumiaaw, evsubfssiaaw, evsubfsmiaaw, evsubfusiaaw,
+	evsubfumiaaw, evmra, evdivws, evdivws): New e500x2 Core Complex
+	instructions.
+	(rfmci): New machine check APU instruction.
+	(isel): New integer select APU instructino.
+	(icbtls, icbtlse, icblc, icblce, dcbtls, dcbtlse, dcbtstls,
+	dcbtstlse, dcblc, dcblce): New cache control APU instructions.
+	(mtspefscr, mfspefscr): New instructions.
+	(mfpmr, mtpmr): New performance monitor APU instructions.
+	(savecontext): New context cache APU instructions.
+	(bblels, bbelr): New branch locking APU instructions.
+	(bblels, bbelr): New instructions.
+	(mftbl, mftbu, mftb): Set as CLASSIC instructions.  Add BOOKE alias.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-opc.c: Update call operand to accept the page definition.
+	Identify instructions that are branches and calls to generate a
+	RL_JUMP relocation.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11-dis.c (print_insn): Take into account 68HC12 memory
+	banks and fix disassembling of call instruction.
+	(print_indexed_operand): New param to tell whether
+	it was an indirect addressing operand (for disassembling call).
+
+2002-08-09  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2002-08-08  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
+
+	* mips-opc.c (mips_builtin_opcodes): Remove "dla" and "la" as
+	aliases to "daddiu" and "addiu".
+
+2002-07-30  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+
+2002-07-25  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+	* po/es.po: Updated Spanish translation.
+	* po/pr_BR.po: Updated Brazilian Portuguese translation.
+	* po/tr.po: Updated Turkish translation.
+	* po/fr.po: Updated French translation.
+
+2002-07-24  Nick Clifton  <nickc@redhat.com>
+
+	* po/sv.po: Updated Swedish translation.
+	* po/es.po: Updated Spanish translation.
+	* po/pr_BR.po: Updated Brazilian Portuguese translation.
+
+2002-07-23  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am: Run "make dep-am".
+	* Makefile.in: Regenerate.
+	* po/POTFILES.in: Regenerate.
+
+2002-07-23  Nick Clifton  <nickc@redhat.com>
+
+	* po/fr.po: Updated French translation.
+	* po/pr_BR.po: New Brazilian Portuguese translation.
+	* po/id.po: Updated Indonesian translation.
+	* configure.in (LINGUAS): Add pr_BR.
+	* configure: Regenerate.
+
+2002-07-18  Denis Chertykov  <denisc@overta.ru>
+	    Frank Ch. Eigler  <fche@redhat.com>
+	    Alan Lehotsky <alehotsky@cygnus.com>
+	    matthew green  <mrg@redhat.com>
+
+	* configure.in: Add support for ip2k.
+	* configure: Regenerate.
+	* Makefile.am: Add support for ip2k.
+	* Makefile.in: Regenerate.
+	* disassemble.c: Add support for ip2k.
+	* ip2k-asm.c: New generated file.
+	* ip2k-desc.c: New generated file.
+	* ip2k-desc.h: New generated file.
+	* ip2k-dis.c: New generated file.
+	* ip2k-ibld.c: New generated file.
+	* ip2k-opc.c: New generated file.
+	* ip2k-opc.h: New generated file.
+
+2002-07-17  David Mosberger  <davidm@hpl.hp.com>
+
+	* ia64-opc-b.c (bWhc): New macro.
+	(mWhc): Ditto.
+	(OpPaWhcD): Ditto.
+	(ia64_opcodes_b): Correct patterns for indirect call
+	instructions to use 3-bit "wh" field.
+	* ia64-asmtab.c: Regnerate.
+
+2002-07-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+	* mips-dis.c (mips_isa_type): Add MIPS16 insn handling.
+	* mips-opc.c (I16): New define.
+	(mips_builtin_opcodes): Make jalx an I16 insn.
+
+2002-06-18  Dave Brolley  <brolley@redhat.com>
+
+	* po/POTFILES.in: Add frv-*.[ch].
+	* disassemble.c (ARCH_frv): New macro.
+	(disassembler): Handle bfd_arch_frv.
+	* configure.in: Support frv_bfd_arch.
+	* Makefile.am (HFILES): Add frv-*.h.
+	(CFILES): Add frv-*.c
+	(ALL_MACHINES): Add frv-*.lo.
+	(CLEANFILES): Add stamp-frv.
+	(FRV_DEPS): New variable.
+	(stamp-frv): New target.
+	(frv-asm.lo): New target.
+	(frv-desc.lo): New target.
+	(frv-dis.lo): New target.
+	(frv-ibld.lo): New target.
+	(frv-opc.lo): New target.
+	(frv-*.[ch]): New files.
+
+2002-06-18  Ben Elliston  <bje@redhat.com>
+
+	* Makefile.am (CGENDEPS): Remove unnecessary stamp-cgen.
+	* Makefile.in: Regenerate.
+
+2002-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+	* a29k-dis.c: Replace CONST with const.
+	* h8300-dis.c: Likewise.
+	* m68k-dis.c: Likewise.
+	* or32-dis.c: Likewise.
+	* sparc-dis.c: Likewise.
+
+2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
+
+	* configure.in: Add "sh5*-*" to list of targets which include
+	sh64 support.
+	* configure: Regenerate.
+
+2002-05-31  Chris G. Demetriou  <cgd@broadcom.com>
+
+	* mips-opc.c: Clean up a few whitespace issues, and sort a
+	few entries understanding that 'x' follows 'w' in the alphabet.
+	
+2002-05-31  Chris G. Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* mips-opc.c: Add support for SB-1 MDMX subset and extensions.
+
+2002-05-31  Alan Modra  <amodra@bigpond.net.au>
+
+	* Makefile.am: Run "make dep-am".
+	* Makefile.in: Regenerate.
+	* po/POTFILES.in: Regenerate.
+
+2002-05-30  Chris G. Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* mips-dis.c (print_insn_arg): Add support for 'O', 'Q', 'X', 'Y',
+	and 'Z' formats, for MDMX.
+        (mips_isa_type): Add MDMX instructions to the ISA
+	bit mask for bfd_mach_mipsisa64.
+	* mips-opc.c: Add support for MDMX instructions.
+	(MX): New definition.
+
+	* mips-dis.c: Update copyright years to include 2002.
+
+2002-05-30  Diego Novillo  <dnovillo@redhat.com>
+
+	* d10v-opc.c (d10v_opcodes): `btsti' does not modify its
+        arguments.
+
 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
 
 	* configure.in: Add DLX configuraton support.
@@ -14,7 +269,7 @@
 	* arc-dis.c: Use #include "" instead of <> for local header files.
 	* m68k-dis.c: Likewise.
 
-Wed May 22 20:11:51 2002  J"orn Rennecke <joern.rennecke@superh.com>
+2002-05-22  J"orn Rennecke <joern.rennecke@superh.com>
 
 	* Makefile.am (sh-dis.lo): Compile with @archdefs@.
 	* Makefile.in: regenerate.
@@ -26,7 +281,7 @@
 
 	* mips-opc.c (mips_builtin_opcodes): Add drol, dror macros.
 
-Fri May 17 14:26:44 2002  J"orn Rennecke <joern.rennecke@superh.com>
+2002-05-17  J"orn Rennecke <joern.rennecke@superh.com>
 
 	* disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh.
 	* sh-dis.c (LITTLE_BIT): Delete.
@@ -152,7 +407,7 @@
 	* ppc-opc.c: Add optional field to mtmsrd.
 	(MTMSRD_L, XRLARB_MASK): Define.
 
-Mon Mar 18 21:10:43 CET 2002  Jan Hubicka  <jh@suse.cz>
+2002-03-18  Jan Hubicka  <jh@suse.cz>
 
 	* i386-dis.c (prefix_name): Fix handling of 32bit address prefix
 	in 64bit mode.
@@ -262,7 +517,7 @@
 
 2002-02-20  Tom Rix  <trix@redhat.com>
 
-	* ppc-opc.c (powerpc_operands): Add WS feild.  Use for tlbre, tlbwe.
+	* ppc-opc.c (powerpc_operands): Add WS field.  Use for tlbre, tlbwe.
 
 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
 
@@ -1642,7 +1897,7 @@
 	* ia64-ic.tbl: Update from Intel.  Add setf to fr-writers.
 	* ia64-asmtab.c: Regenerate.
 
-Mon Feb 12 17:41:26 CET 2001  Jan Hubicka  <jh@suse.cz>
+2001-02-12  Jan Hubicka  <jh@suse.cz>
 
 	* i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison
 	instructions.
@@ -1681,7 +1936,7 @@
 	* fr30-desc.h: Regenerate with CGEN_MAX_SYNTAX_ELEMENTS.
 	* m32r-desc.h: Regenerate.
 
-Thu Feb  1 16:29:06 MET 2001  Jan Hubicka  <jh@suse.cz>
+2001-02-01  Jan Hubicka  <jh@suse.cz>
 
 	* i386-dis.c (dis386_att, grps): Use 'T' for push/pop
 	(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
@@ -1694,7 +1949,7 @@
 
 	* disassemble.c: Remove spurious white space.
 
-Sat Jan 13 01:48:24 MET 2001  Jan Hubicka  <jh@suse.cz>
+2001-01-13  Jan Hubicka  <jh@suse.cz>
 
 	* i386-dis.c (dis386_att, disx86_64_att): Fix ret, lret and iret
 	templates.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 0996b2e..d2f043c 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -26,9 +26,11 @@
 HFILES = \
 	arm-opc.h \
 	fr30-desc.h fr30-opc.h \
+	frv-desc.h frv-opc.h \
 	h8500-opc.h \
 	ia64-asmtab.h \
 	ia64-opc.h \
+	ip2k-desc.h ip2k-opc.h \
 	m32r-desc.h m32r-opc.h \
 	mcore-opc.h \
 	openrisc-desc.h openrisc-opc.h \
@@ -66,6 +68,11 @@
 	fr30-dis.c \
 	fr30-ibld.c \
 	fr30-opc.c \
+	frv-asm.c \
+	frv-desc.c \
+	frv-dis.c \
+	frv-ibld.c \
+	frv-opc.c \
 	h8300-dis.c \
 	h8500-dis.c \
 	hppa-dis.c \
@@ -84,6 +91,11 @@
 	ia64-opc.c \
 	ia64-gen.c \
 	ia64-asmtab.c \
+	ip2k-asm.c \
+	ip2k-desc.c \
+	ip2k-dis.c \
+	ip2k-ibld.c \
+	ip2k-opc.c \
 	m32r-asm.c \
 	m32r-desc.c \
 	m32r-dis.c \
@@ -168,6 +180,11 @@
 	fr30-dis.lo \
 	fr30-ibld.lo \
 	fr30-opc.lo \
+	frv-asm.lo \
+	frv-desc.lo \
+	frv-dis.lo \
+	frv-ibld.lo \
+	frv-opc.lo \
 	h8300-dis.lo \
 	h8500-dis.lo \
 	hppa-dis.lo \
@@ -178,6 +195,11 @@
 	i960-dis.lo \
 	ia64-dis.lo \
 	ia64-opc.lo \
+	ip2k-asm.lo \
+	ip2k-desc.lo \
+	ip2k-dis.lo \
+	ip2k-ibld.lo \
+	ip2k-opc.lo \
 	m32r-asm.lo \
 	m32r-desc.lo \
 	m32r-dis.lo \
@@ -301,7 +323,7 @@
 	rm -f $(DESTDIR)$(bfdincludedir)/dis-asm.h
 
 CLEANFILES = \
-	stamp-m32r stamp-fr30 stamp-openrisc \
+	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
 	stamp-xstormy16 \
 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
 
@@ -311,7 +333,7 @@
 CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
 CGENFLAGS = -v
 
-CGENDEPS = ../cgen/stamp-cgen \
+CGENDEPS = \
 	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
 	$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
 	$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
@@ -319,13 +341,17 @@
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
 if CGEN_MAINT
+IP2K_DEPS = stamp-ip2k
 M32R_DEPS = stamp-m32r
 FR30_DEPS = stamp-fr30
+FRV_DEPS = stamp-frv
 OPENRISC_DEPS = stamp-openrisc
 XSTORMY16_DEPS = stamp-xstormy16
 else
+IP2K_DEPS =
 M32R_DEPS =
 FR30_DEPS =
+FRV_DEPS =
 OPENRISC_DEPS = 
 XSTORMY16_DEPS = 
 endif
@@ -338,6 +364,11 @@
 .PHONY: run-cgen
 
 # For now, require developers to configure with --enable-cgen-maint.
+$(srcdir)/ip2k-desc.h $(srcdir)/ip2k-desc.c $(srcdir)/ip2k-opc.h $(srcdir)/ip2k-opc.c $(srcdir)/ip2k-ibld.c $(srcdir)/ip2k-asm.c $(srcdir)/ip2k-dis.c: $(IP2K_DEPS)
+	@true
+stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
+	$(MAKE) run-cgen arch=ip2k prefix=ip2k options= extrafiles=
+
 $(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
 	@true
 stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
@@ -348,6 +379,11 @@
 stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
 	$(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
 
+$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
+	@true
+stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc
+	$(MAKE) run-cgen arch=frv prefix=frv options= extrafiles=
+
 $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
 	@true
 stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
@@ -474,8 +510,7 @@
 d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/opcode/d30v.h
 dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
-  $(INCDIR)/opcode/dlx.h $(INCDIR)/dis-asm.h $(BFD_H) \
-  $(INCDIR)/symcat.h opintl.h
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
 dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
 disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -496,6 +531,23 @@
 fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
   fr30-opc.h $(INCDIR)/libiberty.h
+frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h opintl.h $(INCDIR)/libiberty.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+  $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+  $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
+  $(INCDIR)/elf/reloc-macros.h
 h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
   $(INCDIR)/symcat.h opintl.h
@@ -538,6 +590,22 @@
   ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
   ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
 ia64-asmtab.lo: ia64-asmtab.c
+ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+  $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+  $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h $(INCDIR)/libiberty.h
 m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
   m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 3602cbd..c2a5c5a 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -136,9 +136,11 @@
 HFILES = \
 	arm-opc.h \
 	fr30-desc.h fr30-opc.h \
+	frv-desc.h frv-opc.h \
 	h8500-opc.h \
 	ia64-asmtab.h \
 	ia64-opc.h \
+	ip2k-desc.h ip2k-opc.h \
 	m32r-desc.h m32r-opc.h \
 	mcore-opc.h \
 	openrisc-desc.h openrisc-opc.h \
@@ -177,6 +179,11 @@
 	fr30-dis.c \
 	fr30-ibld.c \
 	fr30-opc.c \
+	frv-asm.c \
+	frv-desc.c \
+	frv-dis.c \
+	frv-ibld.c \
+	frv-opc.c \
 	h8300-dis.c \
 	h8500-dis.c \
 	hppa-dis.c \
@@ -195,6 +202,11 @@
 	ia64-opc.c \
 	ia64-gen.c \
 	ia64-asmtab.c \
+	ip2k-asm.c \
+	ip2k-desc.c \
+	ip2k-dis.c \
+	ip2k-ibld.c \
+	ip2k-opc.c \
 	m32r-asm.c \
 	m32r-desc.c \
 	m32r-dis.c \
@@ -280,6 +292,11 @@
 	fr30-dis.lo \
 	fr30-ibld.lo \
 	fr30-opc.lo \
+	frv-asm.lo \
+	frv-desc.lo \
+	frv-dis.lo \
+	frv-ibld.lo \
+	frv-opc.lo \
 	h8300-dis.lo \
 	h8500-dis.lo \
 	hppa-dis.lo \
@@ -290,6 +307,11 @@
 	i960-dis.lo \
 	ia64-dis.lo \
 	ia64-opc.lo \
+	ip2k-asm.lo \
+	ip2k-desc.lo \
+	ip2k-dis.lo \
+	ip2k-ibld.lo \
+	ip2k-opc.lo \
 	m32r-asm.lo \
 	m32r-desc.lo \
 	m32r-dis.lo \
@@ -368,7 +390,7 @@
 POTFILES = $(HFILES) $(CFILES)
 
 CLEANFILES = \
-	stamp-m32r stamp-fr30 stamp-openrisc \
+	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
 	stamp-xstormy16 \
 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
 
@@ -378,17 +400,21 @@
 CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
 CGENFLAGS = -v
 
-CGENDEPS = ../cgen/stamp-cgen \
+CGENDEPS = \
 	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
 	$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
 	$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
 	$(CGENDIR)/opc-opinst.scm \
 	cgen-asm.in cgen-dis.in cgen-ibld.in
 
+@CGEN_MAINT_TRUE@IP2K_DEPS = @CGEN_MAINT_TRUE@stamp-ip2k
+@CGEN_MAINT_FALSE@IP2K_DEPS = 
 @CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
 @CGEN_MAINT_FALSE@M32R_DEPS = 
 @CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
 @CGEN_MAINT_FALSE@FR30_DEPS = 
+@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv
+@CGEN_MAINT_FALSE@FRV_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
@@ -421,7 +447,7 @@
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = gtar
+TAR = tar
 GZIP_ENV = --best
 SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
 OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -834,6 +860,11 @@
 .PHONY: run-cgen
 
 # For now, require developers to configure with --enable-cgen-maint.
+$(srcdir)/ip2k-desc.h $(srcdir)/ip2k-desc.c $(srcdir)/ip2k-opc.h $(srcdir)/ip2k-opc.c $(srcdir)/ip2k-ibld.c $(srcdir)/ip2k-asm.c $(srcdir)/ip2k-dis.c: $(IP2K_DEPS)
+	@true
+stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
+	$(MAKE) run-cgen arch=ip2k prefix=ip2k options= extrafiles=
+
 $(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
 	@true
 stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
@@ -844,6 +875,11 @@
 stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
 	$(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
 
+$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
+	@true
+stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc
+	$(MAKE) run-cgen arch=frv prefix=frv options= extrafiles=
+
 $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
 	@true
 stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
@@ -970,8 +1006,7 @@
 d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/opcode/d30v.h
 dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
-  $(INCDIR)/opcode/dlx.h $(INCDIR)/dis-asm.h $(BFD_H) \
-  $(INCDIR)/symcat.h opintl.h
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
 dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
 disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -992,6 +1027,23 @@
 fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
   fr30-opc.h $(INCDIR)/libiberty.h
+frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h opintl.h $(INCDIR)/libiberty.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+  $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+  $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+  frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
+  $(INCDIR)/elf/reloc-macros.h
 h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
   $(INCDIR)/symcat.h opintl.h
@@ -1034,6 +1086,22 @@
   ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
   ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
 ia64-asmtab.lo: ia64-asmtab.c
+ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+  $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
+ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+  $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+  $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+  ip2k-opc.h $(INCDIR)/libiberty.h
 m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
   $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
   m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
diff --git a/opcodes/a29k-dis.c b/opcodes/a29k-dis.c
index 0e937ba..a3090c3 100644
--- a/opcodes/a29k-dis.c
+++ b/opcodes/a29k-dis.c
@@ -1,5 +1,5 @@
 /* Instruction printing code for the AMD 29000
-   Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001
+   Copyright 1990, 1993, 1994, 1995, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Jim Kingdon.
 
@@ -153,7 +153,7 @@
 
   find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
 
-  struct a29k_opcode CONST * opcode;
+  struct a29k_opcode const * opcode;
 
   {
     int status =
diff --git a/opcodes/configure b/opcodes/configure
index a83d43d..9b6992b 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -2625,7 +2625,7 @@
 fi
 
 
-ALL_LINGUAS="fr sv tr es da de id"
+ALL_LINGUAS="fr sv tr es da de id pt_BR"
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 echo "configure:2631: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
@@ -4614,6 +4614,7 @@
 	bfd_i860_arch)		ta="$ta i860-dis.lo" ;;
 	bfd_i960_arch)		ta="$ta i960-dis.lo" ;;
 	bfd_ia64_arch)		ta="$ta ia64-dis.lo ia64-opc.lo" ;;
+	bfd_ip2k_arch)		ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
 	bfd_m32r_arch)		ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
 	bfd_m68hc11_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
 	bfd_m68hc12_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -4642,7 +4643,7 @@
 	  # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
 	  for t in $target $canon_targets; do
 	    case $t in
-	      all |  sh64-* | sh-*-*elf* | shl-*-*elf* | shle-*-*elf* | \
+	      all |  sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
 	      sh-*-linux* | shl-*-linux*)
 				ta="$ta sh64-dis.lo sh64-opc.lo"
 				archdefs="$archdefs -DINCLUDE_SHMEDIA"
@@ -4663,6 +4664,7 @@
 	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" ;;
+	bfd_frv_arch)           ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
 
 	"")			;;
 	*)		{ echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index 96e5a6b..3ce5e37 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -78,7 +78,7 @@
 
 AC_PROG_CC
 
-ALL_LINGUAS="fr sv tr es da de id"
+ALL_LINGUAS="fr sv tr es da de id pt_BR"
 CY_GNU_GETTEXT
 
 . ${srcdir}/../bfd/configure.host
@@ -189,6 +189,7 @@
 	bfd_i860_arch)		ta="$ta i860-dis.lo" ;;
 	bfd_i960_arch)		ta="$ta i960-dis.lo" ;;
 	bfd_ia64_arch)		ta="$ta ia64-dis.lo ia64-opc.lo" ;;
+	bfd_ip2k_arch)		ta="$ta ip2k-asm.lo ip2k-desc.lo ip2k-dis.lo ip2k-ibld.lo ip2k-opc.lo" using_cgen=yes ;;
 	bfd_m32r_arch)		ta="$ta m32r-asm.lo m32r-desc.lo m32r-dis.lo m32r-ibld.lo m32r-opc.lo m32r-opinst.lo" using_cgen=yes ;;
 	bfd_m68hc11_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
 	bfd_m68hc12_arch)	ta="$ta m68hc11-dis.lo m68hc11-opc.lo" ;;
@@ -217,7 +218,7 @@
 	  # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
 	  for t in $target $canon_targets; do
 	    case $t in
-	      all |  sh64-* | sh-*-*elf* | shl-*-*elf* | shle-*-*elf* | \
+	      all |  sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
 	      sh-*-linux* | shl-*-linux*)
 				ta="$ta sh64-dis.lo sh64-opc.lo"
 				archdefs="$archdefs -DINCLUDE_SHMEDIA"
@@ -238,6 +239,7 @@
 	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" ;;
+	bfd_frv_arch)           ta="$ta frv-asm.lo frv-desc.lo frv-dis.lo frv-ibld.lo frv-opc.lo" using_cgen=yes ;;
 
 	"")			;;
 	*)		AC_MSG_ERROR(*** unknown target architecture $arch) ;;
diff --git a/opcodes/d10v-opc.c b/opcodes/d10v-opc.c
index b2ce10f..8682177 100644
--- a/opcodes/d10v-opc.c
+++ b/opcodes/d10v-opc.c
@@ -1,5 +1,5 @@
 /* d10v-opc.c -- D10V opcode list
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Written by Martin Hunt, Cygnus Support
 
 This file is part of GDB, GAS, and the GNU binutils.
@@ -196,7 +196,7 @@
   { "brf0t.s", SHORT_B, 3, MU, BRANCH|PAR|RF0, 0x4b00, 0x7f00, { ANUM8 } },
   { "brf0t.l", LONG_B, 3, MU, SEQ, 0x25800000, 0x3fff0000, { ANUM16 } },
   { "bseti", SHORT_2, 1, IU, PAR, 0x801, 0x7e01, { RDST, UNUM4 } },
-  { "btsti", SHORT_2, 1, IU, PAR|WF0, 0xe01, 0x7e01, { RDST, UNUM4 } },
+  { "btsti", SHORT_2, 1, IU, PAR|WF0, 0xe01, 0x7e01, { RSRC2, UNUM4 } },
   { "clrac", SHORT_2, 1, IU, PAR, 0x5601, 0x7eff, { ADST } },
   { "cmp", SHORT_2, 1, EITHER, PAR|WF0, 0x600, 0x7e01, { RSRC2, RSRC } },
   { "cmp", SHORT_2, 1, IU, PAR|WF0, 0x1603, 0x7eef, { ASRC2, ASRC } },
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index bfb22c2..88fa635 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -36,6 +36,7 @@
 #define ARCH_i386
 #define ARCH_i860
 #define ARCH_i960
+#define ARCH_ip2k
 #define ARCH_ia64
 #define ARCH_fr30
 #define ARCH_m32r
@@ -66,6 +67,7 @@
 #define ARCH_w65
 #define ARCH_xstormy16
 #define ARCH_z8k
+#define ARCH_frv
 #define INCLUDE_SHMEDIA
 #endif
 
@@ -178,6 +180,11 @@
       disassemble = print_insn_ia64;
       break;
 #endif
+#ifdef ARCH_ip2k
+    case bfd_arch_ip2k:
+      disassemble = print_insn_ip2k;
+      break;
+#endif
 #ifdef ARCH_fr30
     case bfd_arch_fr30:
       disassemble = print_insn_fr30;
@@ -336,6 +343,11 @@
       disassemble = print_insn_vax;
       break;
 #endif
+#ifdef ARCH_frv
+    case bfd_arch_frv:
+      disassemble = print_insn_frv;
+      break;
+#endif
     default:
       return 0;
     }
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index c521c77..d14fda9 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -1,5 +1,6 @@
 /* Disassemble h8300 instructions.
-   Copyright 1993, 1994, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -69,17 +70,17 @@
      int mode;
 {
   /* Find the first entry in the table for this opcode.  */
-  static CONST char *regnames[] =
+  static const char *regnames[] =
     {
       "r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
       "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
     };
-  static CONST char *wregnames[] =
+  static const char *wregnames[] =
     {
       "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
       "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
     };
-  static CONST char *lregnames[] =
+  static const char *lregnames[] =
     {
       "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
       "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
@@ -92,7 +93,7 @@
   int plen = 0;
   static boolean init = 0;
   struct h8_opcode *q;
-  char CONST **pregnames = mode != 0 ? lregnames : wregnames;
+  char const **pregnames = mode != 0 ? lregnames : wregnames;
   int status;
   int l;
   unsigned char data[20];
diff --git a/opcodes/ia64-asmtab.c b/opcodes/ia64-asmtab.c
index 45f60eb..f007f71 100644
--- a/opcodes/ia64-asmtab.c
+++ b/opcodes/ia64-asmtab.c
@@ -4203,8 +4203,8 @@
   { 14, 4, 0, 0x0000000100000000ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x40, 681, },
   { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x200, 1843, },
   { 14, 4, 0, 0x0000000108000100ull, 0x000001eff80011c0ull, { 15, 0, 0, 0, 0 }, 0x240, 1844, },
-  { 14, 4, 1, 0x0000002000000000ull, 0x000001ee00001000ull, { 14, 15, 0, 0, 0 }, 0x0, 437, },
-  { 14, 4, 1, 0x0000002000000000ull, 0x000001ee00001000ull, { 14, 15, 0, 0, 0 }, 0x40, 438, },
+  { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 14, 15, 0, 0, 0 }, 0x0, 437, },
+  { 14, 4, 1, 0x0000002100000000ull, 0x000001ef00001000ull, { 14, 15, 0, 0, 0 }, 0x40, 438, },
   { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011ffull, { 80, 0, 0, 0, 0 }, 0x40, 835, },
   { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 80, 0, 0, 0, 0 }, 0x0, 682, },
   { 14, 4, 0, 0x0000008000000000ull, 0x000001ee000011c0ull, { 80, 0, 0, 0, 0 }, 0x40, 683, },
@@ -4585,7 +4585,7 @@
 };
 
 static const char dis_table[] = {
-0xa0, 0xc2, 0x60, 0xa0, 0x2c, 0x80, 0xa0, 0x2a, 0x80, 0xa0, 0x1a, 0x70, 
+0xa0, 0xc2, 0xa0, 0xa0, 0x2c, 0xc0, 0xa0, 0x2a, 0xc0, 0xa0, 0x1a, 0x70, 
 0x98, 0xb0, 0x01, 0x40, 0x90, 0x50, 0x90, 0x28, 0x24, 0x31, 0x48, 0x24, 
 0x31, 0x40, 0x90, 0x28, 0x24, 0x31, 0x38, 0x24, 0x31, 0x30, 0x90, 0x50, 
 0x90, 0x28, 0x24, 0x31, 0x20, 0x24, 0x31, 0x18, 0x90, 0x28, 0x24, 0x31, 
@@ -4659,557 +4659,558 @@
 0x83, 0x37, 0x1b, 0x98, 0xb0, 0x01, 0x40, 0x90, 0x50, 0x90, 0x28, 0x24, 
 0x2e, 0x60, 0x24, 0x2e, 0x58, 0x90, 0x28, 0x24, 0x2e, 0x50, 0x24, 0x2e, 
 0x48, 0x90, 0x50, 0x90, 0x28, 0x24, 0x2e, 0x38, 0x24, 0x2e, 0x30, 0x90, 
-0x28, 0x24, 0x2e, 0x28, 0x24, 0x2e, 0x20, 0xa8, 0x08, 0xe0, 0x0d, 0xe0, 
-0x96, 0x38, 0x95, 0xe8, 0x9b, 0x48, 0x05, 0xa8, 0x91, 0xa0, 0x90, 0xd0, 
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x88, 0x33, 0x92, 0xa4, 0x1c, 0x78, 
-0x33, 0x90, 0x90, 0x38, 0xa4, 0x1c, 0x68, 0x33, 0x8e, 0x80, 0x33, 0x8c, 
-0x90, 0x60, 0x90, 0x28, 0x24, 0x1c, 0x28, 0xa4, 0x1c, 0x18, 0x33, 0x84, 
-0x90, 0x38, 0xa4, 0x1c, 0x08, 0x33, 0x82, 0xa4, 0x1c, 0x50, 0x33, 0x8b, 
-0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x40, 0x33, 0x89, 0xa4, 
-0x1c, 0x30, 0x33, 0x87, 0x90, 0x38, 0xa4, 0x2d, 0xd8, 0x35, 0xc1, 0xa4, 
-0x2d, 0x78, 0x35, 0xb5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2a, 0xb0, 0x35, 
-0x62, 0xa4, 0x2a, 0x80, 0x35, 0x5c, 0x10, 0x10, 0xa4, 0x1b, 0xf8, 0x33, 
-0x80, 0x91, 0x50, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1c, 0xb8, 
+0x28, 0x24, 0x2e, 0x28, 0x24, 0x2e, 0x20, 0xa8, 0x09, 0x00, 0x0e, 0x20, 
+0x96, 0x48, 0x95, 0xe8, 0x93, 0x38, 0x91, 0xa0, 0x90, 0xd0, 0x90, 0x70, 
+0x90, 0x38, 0xa4, 0x1c, 0x88, 0x33, 0x92, 0xa4, 0x1c, 0x78, 0x33, 0x90, 
+0x90, 0x38, 0xa4, 0x1c, 0x68, 0x33, 0x8e, 0x80, 0x33, 0x8c, 0x90, 0x60, 
+0x90, 0x28, 0x24, 0x1c, 0x28, 0xa4, 0x1c, 0x18, 0x33, 0x84, 0x90, 0x38, 
+0xa4, 0x1c, 0x08, 0x33, 0x82, 0xa4, 0x1c, 0x50, 0x33, 0x8b, 0x90, 0xe0, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x1c, 0x40, 0x33, 0x89, 0xa4, 0x1c, 0x30, 
+0x33, 0x87, 0x90, 0x38, 0xa4, 0x2d, 0xd8, 0x35, 0xc1, 0xa4, 0x2d, 0x78, 
+0x35, 0xb5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2a, 0xb0, 0x35, 0x62, 0xa4, 
+0x2a, 0x80, 0x35, 0x5c, 0x10, 0x10, 0xa4, 0x1b, 0xf8, 0x33, 0x80, 0x99, 
+0x60, 0x02, 0x70, 0x90, 0x90, 0x90, 0x50, 0x90, 0x28, 0x24, 0x1c, 0xb8, 
 0x80, 0x33, 0x9e, 0x80, 0xa4, 0x1c, 0xc0, 0x33, 0x9c, 0x90, 0x50, 0x90, 
 0x28, 0x24, 0x1c, 0xc8, 0x80, 0x33, 0x9f, 0x90, 0x38, 0xa4, 0x1c, 0xd0, 
 0x33, 0x9d, 0xa4, 0x1c, 0x98, 0x33, 0x94, 0x90, 0xe0, 0x90, 0x70, 0x90, 
 0x38, 0xa4, 0x2d, 0x08, 0x35, 0xa9, 0xa4, 0x2c, 0x68, 0x35, 0x96, 0x90, 
 0x38, 0xa4, 0x2c, 0x00, 0x35, 0x87, 0xa4, 0x2b, 0x70, 0x35, 0x76, 0x81, 
-0xa4, 0x1c, 0xa8, 0x33, 0x96, 0xe4, 0xe1, 0xc5, 0x00, 0x37, 0x16, 0xed, 
-0x21, 0xc3, 0xa0, 0xdf, 0x80, 0x37, 0x10, 0x92, 0x40, 0x99, 0x18, 0x02, 
-0x00, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xd0, 
+0xa4, 0x1c, 0xa8, 0x33, 0x96, 0xe4, 0xa1, 0xc5, 0x00, 0x37, 0x16, 0x18, 
+0x24, 0x1b, 0xf0, 0xe4, 0xe1, 0xc3, 0x80, 0x37, 0x10, 0x92, 0x40, 0x91, 
+0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xd0, 
 0x35, 0xc0, 0xa4, 0x2d, 0x70, 0x35, 0xb4, 0x80, 0x90, 0x38, 0xa4, 0x2a, 
-0xa8, 0x35, 0x61, 0xa4, 0x2a, 0x78, 0x35, 0x5b, 0x10, 0x10, 0x80, 0x90, 
-0x70, 0x90, 0x38, 0xa4, 0x2c, 0xf8, 0x35, 0xa8, 0xa4, 0x2c, 0x60, 0x35, 
-0x94, 0x90, 0x38, 0xa4, 0x2b, 0xf0, 0x35, 0x86, 0xa4, 0x2b, 0x68, 0x35, 
-0x74, 0xe4, 0xe1, 0xc2, 0x00, 0x37, 0x0a, 0xed, 0x21, 0xc0, 0xa0, 0xdf, 
-0x40, 0x37, 0x04, 0x92, 0x80, 0x92, 0x40, 0x99, 0x18, 0x02, 0x00, 0x10, 
-0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc8, 0x35, 0xbf, 
-0xa4, 0x2d, 0x68, 0x35, 0xb3, 0x80, 0x90, 0x38, 0xa4, 0x2a, 0xa0, 0x35, 
-0x60, 0xa4, 0x2a, 0x70, 0x35, 0x5a, 0x10, 0x10, 0x80, 0x90, 0x70, 0x90, 
-0x38, 0xa4, 0x2c, 0xe8, 0x35, 0xa7, 0xa4, 0x2c, 0x58, 0x35, 0x92, 0x90, 
-0x38, 0xa4, 0x2b, 0xe0, 0x35, 0x85, 0xa4, 0x2b, 0x60, 0x35, 0x72, 0xe4, 
-0xe1, 0xc5, 0x40, 0x37, 0x18, 0xe5, 0x21, 0xc3, 0xc0, 0x37, 0x12, 0x92, 
-0x50, 0x99, 0x18, 0x02, 0x00, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 
-0x38, 0xa4, 0x2d, 0xc0, 0x35, 0xbe, 0xa4, 0x2d, 0x60, 0x35, 0xb2, 0x80, 
-0x90, 0x38, 0xa4, 0x2a, 0x98, 0x35, 0x5f, 0xa4, 0x2a, 0x68, 0x35, 0x59, 
-0x10, 0x10, 0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xd8, 0x35, 0xa6, 
-0xa4, 0x2c, 0x50, 0x35, 0x90, 0x90, 0x38, 0xa4, 0x2b, 0xd0, 0x35, 0x84, 
-0xa4, 0x2b, 0x58, 0x35, 0x70, 0xec, 0xe1, 0xc2, 0x60, 0xe6, 0xc0, 0x37, 
-0x0c, 0xe5, 0x21, 0xc0, 0xc0, 0x37, 0x06, 0xc0, 0x40, 0x80, 0x10, 0x10, 
-0x81, 0x90, 0x90, 0x90, 0x48, 0xc9, 0xe1, 0x59, 0x80, 0x85, 0x35, 0x6a, 
-0xc9, 0xe1, 0x5a, 0x00, 0x85, 0x35, 0x67, 0x80, 0x35, 0x65, 0x80, 0xd8, 
-0x47, 0x80, 0x0d, 0xc0, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 
-0x81, 0x80, 0x80, 0x37, 0x00, 0x80, 0x36, 0xfe, 0xd5, 0x81, 0x80, 0x80, 
-0x36, 0xfc, 0x80, 0x36, 0xfa, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 
-0xd5, 0x81, 0x80, 0x80, 0x37, 0x01, 0x80, 0x36, 0xff, 0xd5, 0x81, 0x80, 
-0x80, 0x36, 0xfd, 0x80, 0x36, 0xfb, 0xc0, 0x80, 0x84, 0x36, 0xf9, 0xa0, 
-0x56, 0x50, 0xa0, 0x40, 0x70, 0xa8, 0x1d, 0x40, 0x33, 0x18, 0xa0, 0x12, 
-0x38, 0xa0, 0x0b, 0x48, 0x96, 0x00, 0x9a, 0xf0, 0x05, 0xc0, 0x91, 0x70, 
-0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x50, 0x33, 0x7c, 0xa4, 
-0x14, 0x60, 0x33, 0x7b, 0x10, 0x10, 0xa4, 0x14, 0x58, 0x33, 0x7a, 0x90, 
-0x70, 0x90, 0x38, 0xa4, 0x14, 0x20, 0x33, 0x61, 0xa4, 0x14, 0x30, 0x33, 
-0x60, 0x10, 0x10, 0xa4, 0x14, 0x28, 0x33, 0x5f, 0x90, 0xb8, 0x90, 0x70, 
-0x90, 0x38, 0xa4, 0x13, 0xf0, 0x33, 0x46, 0xa4, 0x14, 0x00, 0x33, 0x45, 
-0x10, 0x10, 0xa4, 0x13, 0xf8, 0x33, 0x44, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x13, 0xc0, 0x33, 0x2b, 0xa4, 0x13, 0xd0, 0x33, 0x2a, 0x10, 0x10, 0xa4, 
-0x13, 0xc8, 0x33, 0x29, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 
-0xa4, 0x14, 0x38, 0x33, 0x77, 0xa4, 0x14, 0x48, 0x33, 0x79, 0x10, 0x10, 
-0xa4, 0x14, 0x40, 0x33, 0x78, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, 
-0x33, 0x5c, 0xa4, 0x14, 0x18, 0x33, 0x5e, 0x10, 0x10, 0xa4, 0x14, 0x10, 
-0x33, 0x5d, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xd8, 0x33, 
-0x41, 0xa4, 0x13, 0xe8, 0x33, 0x43, 0x10, 0x10, 0xa4, 0x13, 0xe0, 0x33, 
-0x42, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa8, 0x33, 0x26, 0xa4, 0x13, 
-0xb8, 0x33, 0x28, 0x10, 0x10, 0xa4, 0x13, 0xb0, 0x33, 0x27, 0xe4, 0xe1, 
-0x4f, 0xc0, 0x35, 0x49, 0x9a, 0xf0, 0x05, 0x00, 0x91, 0x70, 0x90, 0xb8, 
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xa0, 0x33, 0x74, 0xa4, 0x13, 0x98, 
-0x33, 0x76, 0x10, 0x10, 0xa4, 0x13, 0x90, 0x33, 0x75, 0x90, 0x70, 0x90, 
-0x38, 0xa4, 0x13, 0x88, 0x33, 0x59, 0xa4, 0x13, 0x80, 0x33, 0x5b, 0x10, 
-0x10, 0xa4, 0x13, 0x78, 0x33, 0x5a, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 
-0xa4, 0x13, 0x70, 0x33, 0x3e, 0xa4, 0x13, 0x68, 0x33, 0x40, 0x10, 0x10, 
-0xa4, 0x13, 0x60, 0x33, 0x3f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x58, 
-0x33, 0x23, 0xa4, 0x13, 0x50, 0x33, 0x25, 0x10, 0x10, 0xa4, 0x13, 0x48, 
-0x33, 0x24, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 
-0x71, 0x80, 0x33, 0x73, 0x10, 0x10, 0x80, 0x33, 0x72, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x33, 0x56, 0x80, 0x33, 0x58, 0x10, 0x10, 0x80, 0x33, 0x57, 
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x3b, 0x80, 0x33, 0x3d, 
-0x10, 0x10, 0x80, 0x33, 0x3c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x20, 
-0x80, 0x33, 0x22, 0x10, 0x10, 0x80, 0x33, 0x21, 0xe4, 0xe1, 0x3d, 0x40, 
-0x35, 0x09, 0x95, 0x40, 0x9a, 0x90, 0x05, 0x00, 0x91, 0x10, 0x90, 0x88, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x6e, 0x80, 0x33, 0x70, 0x10, 0x10, 
-0x80, 0x33, 0x6f, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x53, 0x80, 0x33, 
-0x55, 0x10, 0x10, 0x80, 0x33, 0x54, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 
-0xa4, 0x13, 0x30, 0x33, 0x38, 0xa4, 0x13, 0x40, 0x33, 0x3a, 0x10, 0x10, 
-0xa4, 0x13, 0x38, 0x33, 0x39, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x00, 
-0x33, 0x1d, 0xa4, 0x13, 0x10, 0x33, 0x1f, 0x10, 0x10, 0xa4, 0x13, 0x08, 
-0x33, 0x1e, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 
-0x6b, 0x80, 0x33, 0x6d, 0x10, 0x10, 0x80, 0x33, 0x6c, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x33, 0x50, 0x80, 0x33, 0x52, 0x10, 0x10, 0x80, 0x33, 0x51, 
-0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x18, 0x33, 0x35, 0xa4, 
-0x13, 0x28, 0x33, 0x37, 0x10, 0x10, 0xa4, 0x13, 0x20, 0x33, 0x36, 0x90, 
-0x70, 0x90, 0x38, 0xa4, 0x12, 0xe8, 0x33, 0x1a, 0xa4, 0x12, 0xf8, 0x33, 
-0x1c, 0x10, 0x10, 0xa4, 0x12, 0xf0, 0x33, 0x1b, 0xe4, 0xe1, 0x4f, 0x40, 
-0x35, 0x47, 0x98, 0xb8, 0x01, 0x68, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x33, 0x17, 0x80, 0x33, 0x19, 0x10, 0x10, 0x80, 0x33, 
-0x18, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x97, 0x00, 0x60, 0xa0, 0x96, 
-0xc0, 0x90, 0x30, 0x60, 0xa0, 0x96, 0x80, 0x60, 0xa0, 0x96, 0x40, 0xe4, 
-0xe1, 0x3c, 0x40, 0x35, 0x05, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 
-0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x65, 
-0x80, 0x33, 0x6a, 0x10, 0x10, 0x80, 0x33, 0x69, 0x90, 0x50, 0x90, 0x28, 
-0x80, 0x33, 0x4a, 0x80, 0x33, 0x4f, 0x10, 0x10, 0x80, 0x33, 0x4e, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x2f, 0x80, 0x33, 0x34, 0x10, 
-0x10, 0x80, 0x33, 0x33, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x11, 0x80, 
-0x33, 0x16, 0x10, 0x10, 0x80, 0x33, 0x15, 0x91, 0x10, 0x90, 0x88, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x33, 0x62, 0x80, 0x33, 0x64, 0x10, 0x10, 0x80, 
-0x33, 0x63, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x47, 0x80, 0x33, 0x49, 
-0x10, 0x10, 0x80, 0x33, 0x48, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x33, 0x2c, 0x80, 0x33, 0x2e, 0x10, 0x10, 0x80, 0x33, 0x2d, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x33, 0x0e, 0x80, 0x33, 0x10, 0x10, 0x10, 0x80, 0x33, 
-0x0f, 0xe4, 0xe1, 0x4e, 0xc0, 0x35, 0x45, 0x88, 0x02, 0x28, 0x91, 0x10, 
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x66, 0x80, 0x33, 0x68, 
-0x10, 0x10, 0x80, 0x33, 0x67, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4b, 
-0x80, 0x33, 0x4d, 0x10, 0x10, 0x80, 0x33, 0x4c, 0x90, 0x88, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x33, 0x30, 0x80, 0x33, 0x32, 0x10, 0x10, 0x80, 0x33, 
-0x31, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x12, 0x80, 0x33, 0x14, 0x10, 
-0x10, 0x80, 0x33, 0x13, 0xe4, 0xe1, 0x3b, 0x40, 0x35, 0x01, 0x93, 0x40, 
-0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 
-0x9e, 0x10, 0x10, 0x80, 0x32, 0x9d, 0x90, 0x28, 0x81, 0x32, 0x9a, 0x10, 
-0x10, 0x80, 0x32, 0x99, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x96, 0x10, 
-0x10, 0x80, 0x32, 0x95, 0x90, 0x28, 0x81, 0x32, 0x92, 0x10, 0x10, 0x80, 
-0x32, 0x91, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9b, 0x10, 
-0x10, 0x80, 0x32, 0x9c, 0x90, 0x28, 0x81, 0x32, 0x97, 0x10, 0x10, 0x80, 
-0x32, 0x98, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x93, 0x10, 0x10, 0x80, 
-0x32, 0x94, 0x90, 0x28, 0x81, 0x32, 0x8f, 0x10, 0x10, 0x80, 0x32, 0x90, 
-0xe4, 0xe1, 0x4e, 0x40, 0x35, 0x43, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 
-0x10, 0x90, 0x28, 0x81, 0x32, 0x8d, 0x10, 0x10, 0x80, 0x32, 0x8e, 0xe4, 
-0xe1, 0x3a, 0x40, 0x34, 0xfd, 0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08, 0x94, 
+0xa8, 0x35, 0x61, 0xa4, 0x2a, 0x78, 0x35, 0x5b, 0x18, 0x20, 0x00, 0xf8, 
+0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xf8, 0x35, 0xa8, 0xa4, 0x2c, 
+0x60, 0x35, 0x94, 0x90, 0x38, 0xa4, 0x2b, 0xf0, 0x35, 0x86, 0xa4, 0x2b, 
+0x68, 0x35, 0x74, 0xe4, 0xa1, 0xc2, 0x00, 0x37, 0x0a, 0x18, 0x24, 0x1b, 
+0xe8, 0xe4, 0xe1, 0xc0, 0x80, 0x37, 0x04, 0x92, 0x90, 0x92, 0x40, 0x91, 
+0x08, 0x10, 0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc8, 
+0x35, 0xbf, 0xa4, 0x2d, 0x68, 0x35, 0xb3, 0x80, 0x90, 0x38, 0xa4, 0x2a, 
+0xa0, 0x35, 0x60, 0xa4, 0x2a, 0x70, 0x35, 0x5a, 0x18, 0x20, 0x00, 0xf8, 
+0x80, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x2c, 0xe8, 0x35, 0xa7, 0xa4, 0x2c, 
+0x58, 0x35, 0x92, 0x90, 0x38, 0xa4, 0x2b, 0xe0, 0x35, 0x85, 0xa4, 0x2b, 
+0x60, 0x35, 0x72, 0xe4, 0xa1, 0xc5, 0x40, 0x37, 0x18, 0x10, 0x10, 0xe4, 
+0xe1, 0xc3, 0xc0, 0x37, 0x12, 0x92, 0x50, 0x99, 0x1c, 0x1c, 0xd8, 0x10, 
+0x10, 0x90, 0x80, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x2d, 0xc0, 0x35, 0xbe, 
+0xa4, 0x2d, 0x60, 0x35, 0xb2, 0x80, 0x90, 0x38, 0xa4, 0x2a, 0x98, 0x35, 
+0x5f, 0xa4, 0x2a, 0x68, 0x35, 0x59, 0x18, 0x20, 0x00, 0xf8, 0x80, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x2c, 0xd8, 0x35, 0xa6, 0xa4, 0x2c, 0x50, 0x35, 
+0x90, 0x90, 0x38, 0xa4, 0x2b, 0xd0, 0x35, 0x84, 0xa4, 0x2b, 0x58, 0x35, 
+0x70, 0xe4, 0xa1, 0xc2, 0x40, 0x37, 0x0c, 0x10, 0x10, 0xe4, 0xe1, 0xc0, 
+0xc0, 0x37, 0x06, 0xc0, 0x40, 0x80, 0x10, 0x10, 0x81, 0x90, 0x90, 0x90, 
+0x48, 0xc9, 0xe1, 0x59, 0x80, 0x85, 0x35, 0x6a, 0xc9, 0xe1, 0x5a, 0x00, 
+0x85, 0x35, 0x67, 0x80, 0x35, 0x65, 0x80, 0xd8, 0x47, 0x80, 0x0d, 0xc0, 
+0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, 0x37, 
+0x00, 0x80, 0x36, 0xfe, 0xd5, 0x81, 0x80, 0x80, 0x36, 0xfc, 0x80, 0x36, 
+0xfa, 0xc0, 0x80, 0x10, 0x10, 0x82, 0x90, 0x58, 0xd5, 0x81, 0x80, 0x80, 
+0x37, 0x01, 0x80, 0x36, 0xff, 0xd5, 0x81, 0x80, 0x80, 0x36, 0xfd, 0x80, 
+0x36, 0xfb, 0xc0, 0x80, 0x84, 0x36, 0xf9, 0xa0, 0x56, 0x50, 0xa0, 0x40, 
+0x70, 0xa8, 0x1d, 0x40, 0x33, 0x18, 0xa0, 0x12, 0x38, 0xa0, 0x0b, 0x48, 
+0x96, 0x00, 0x9a, 0xf0, 0x05, 0xc0, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 
+0x90, 0x38, 0xa4, 0x14, 0x50, 0x33, 0x7c, 0xa4, 0x14, 0x60, 0x33, 0x7b, 
+0x10, 0x10, 0xa4, 0x14, 0x58, 0x33, 0x7a, 0x90, 0x70, 0x90, 0x38, 0xa4, 
+0x14, 0x20, 0x33, 0x61, 0xa4, 0x14, 0x30, 0x33, 0x60, 0x10, 0x10, 0xa4, 
+0x14, 0x28, 0x33, 0x5f, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 
+0xf0, 0x33, 0x46, 0xa4, 0x14, 0x00, 0x33, 0x45, 0x10, 0x10, 0xa4, 0x13, 
+0xf8, 0x33, 0x44, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xc0, 0x33, 0x2b, 
+0xa4, 0x13, 0xd0, 0x33, 0x2a, 0x10, 0x10, 0xa4, 0x13, 0xc8, 0x33, 0x29, 
+0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x38, 0x33, 
+0x77, 0xa4, 0x14, 0x48, 0x33, 0x79, 0x10, 0x10, 0xa4, 0x14, 0x40, 0x33, 
+0x78, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x14, 0x08, 0x33, 0x5c, 0xa4, 0x14, 
+0x18, 0x33, 0x5e, 0x10, 0x10, 0xa4, 0x14, 0x10, 0x33, 0x5d, 0x90, 0xb8, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0xd8, 0x33, 0x41, 0xa4, 0x13, 0xe8, 
+0x33, 0x43, 0x10, 0x10, 0xa4, 0x13, 0xe0, 0x33, 0x42, 0x90, 0x70, 0x90, 
+0x38, 0xa4, 0x13, 0xa8, 0x33, 0x26, 0xa4, 0x13, 0xb8, 0x33, 0x28, 0x10, 
+0x10, 0xa4, 0x13, 0xb0, 0x33, 0x27, 0xe4, 0xe1, 0x4f, 0xc0, 0x35, 0x49, 
+0x9a, 0xf0, 0x05, 0x00, 0x91, 0x70, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 
+0xa4, 0x13, 0xa0, 0x33, 0x74, 0xa4, 0x13, 0x98, 0x33, 0x76, 0x10, 0x10, 
+0xa4, 0x13, 0x90, 0x33, 0x75, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x88, 
+0x33, 0x59, 0xa4, 0x13, 0x80, 0x33, 0x5b, 0x10, 0x10, 0xa4, 0x13, 0x78, 
+0x33, 0x5a, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x70, 0x33, 
+0x3e, 0xa4, 0x13, 0x68, 0x33, 0x40, 0x10, 0x10, 0xa4, 0x13, 0x60, 0x33, 
+0x3f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x58, 0x33, 0x23, 0xa4, 0x13, 
+0x50, 0x33, 0x25, 0x10, 0x10, 0xa4, 0x13, 0x48, 0x33, 0x24, 0x91, 0x10, 
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x71, 0x80, 0x33, 0x73, 
+0x10, 0x10, 0x80, 0x33, 0x72, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x56, 
+0x80, 0x33, 0x58, 0x10, 0x10, 0x80, 0x33, 0x57, 0x90, 0x88, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x33, 0x3b, 0x80, 0x33, 0x3d, 0x10, 0x10, 0x80, 0x33, 
+0x3c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x20, 0x80, 0x33, 0x22, 0x10, 
+0x10, 0x80, 0x33, 0x21, 0xe4, 0xe1, 0x3d, 0x40, 0x35, 0x09, 0x95, 0x40, 
+0x9a, 0x90, 0x05, 0x00, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x33, 0x6e, 0x80, 0x33, 0x70, 0x10, 0x10, 0x80, 0x33, 0x6f, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x33, 0x53, 0x80, 0x33, 0x55, 0x10, 0x10, 0x80, 
+0x33, 0x54, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x30, 0x33, 
+0x38, 0xa4, 0x13, 0x40, 0x33, 0x3a, 0x10, 0x10, 0xa4, 0x13, 0x38, 0x33, 
+0x39, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x13, 0x00, 0x33, 0x1d, 0xa4, 0x13, 
+0x10, 0x33, 0x1f, 0x10, 0x10, 0xa4, 0x13, 0x08, 0x33, 0x1e, 0x91, 0x10, 
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x6b, 0x80, 0x33, 0x6d, 
+0x10, 0x10, 0x80, 0x33, 0x6c, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x50, 
+0x80, 0x33, 0x52, 0x10, 0x10, 0x80, 0x33, 0x51, 0x90, 0xb8, 0x90, 0x70, 
+0x90, 0x38, 0xa4, 0x13, 0x18, 0x33, 0x35, 0xa4, 0x13, 0x28, 0x33, 0x37, 
+0x10, 0x10, 0xa4, 0x13, 0x20, 0x33, 0x36, 0x90, 0x70, 0x90, 0x38, 0xa4, 
+0x12, 0xe8, 0x33, 0x1a, 0xa4, 0x12, 0xf8, 0x33, 0x1c, 0x10, 0x10, 0xa4, 
+0x12, 0xf0, 0x33, 0x1b, 0xe4, 0xe1, 0x4f, 0x40, 0x35, 0x47, 0x98, 0xb8, 
+0x01, 0x68, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 
+0x17, 0x80, 0x33, 0x19, 0x10, 0x10, 0x80, 0x33, 0x18, 0x90, 0x60, 0x90, 
+0x30, 0x60, 0xa0, 0x97, 0x00, 0x60, 0xa0, 0x96, 0xc0, 0x90, 0x30, 0x60, 
+0xa0, 0x96, 0x80, 0x60, 0xa0, 0x96, 0x40, 0xe4, 0xe1, 0x3c, 0x40, 0x35, 
+0x05, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 
+0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x65, 0x80, 0x33, 0x6a, 0x10, 
+0x10, 0x80, 0x33, 0x69, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4a, 0x80, 
+0x33, 0x4f, 0x10, 0x10, 0x80, 0x33, 0x4e, 0x90, 0x88, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x33, 0x2f, 0x80, 0x33, 0x34, 0x10, 0x10, 0x80, 0x33, 0x33, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x11, 0x80, 0x33, 0x16, 0x10, 0x10, 
+0x80, 0x33, 0x15, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
+0x33, 0x62, 0x80, 0x33, 0x64, 0x10, 0x10, 0x80, 0x33, 0x63, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x33, 0x47, 0x80, 0x33, 0x49, 0x10, 0x10, 0x80, 0x33, 
+0x48, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x2c, 0x80, 0x33, 
+0x2e, 0x10, 0x10, 0x80, 0x33, 0x2d, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 
+0x0e, 0x80, 0x33, 0x10, 0x10, 0x10, 0x80, 0x33, 0x0f, 0xe4, 0xe1, 0x4e, 
+0xc0, 0x35, 0x45, 0x88, 0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x33, 0x66, 0x80, 0x33, 0x68, 0x10, 0x10, 0x80, 0x33, 
+0x67, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x4b, 0x80, 0x33, 0x4d, 0x10, 
+0x10, 0x80, 0x33, 0x4c, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 
+0x30, 0x80, 0x33, 0x32, 0x10, 0x10, 0x80, 0x33, 0x31, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x33, 0x12, 0x80, 0x33, 0x14, 0x10, 0x10, 0x80, 0x33, 0x13, 
+0xe4, 0xe1, 0x3b, 0x40, 0x35, 0x01, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 
+0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9e, 0x10, 0x10, 0x80, 
+0x32, 0x9d, 0x90, 0x28, 0x81, 0x32, 0x9a, 0x10, 0x10, 0x80, 0x32, 0x99, 
+0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x96, 0x10, 0x10, 0x80, 0x32, 0x95, 
+0x90, 0x28, 0x81, 0x32, 0x92, 0x10, 0x10, 0x80, 0x32, 0x91, 0x90, 0xc0, 
+0x90, 0x60, 0x90, 0x28, 0x81, 0x32, 0x9b, 0x10, 0x10, 0x80, 0x32, 0x9c, 
+0x90, 0x28, 0x81, 0x32, 0x97, 0x10, 0x10, 0x80, 0x32, 0x98, 0x90, 0x60, 
+0x90, 0x28, 0x81, 0x32, 0x93, 0x10, 0x10, 0x80, 0x32, 0x94, 0x90, 0x28, 
+0x81, 0x32, 0x8f, 0x10, 0x10, 0x80, 0x32, 0x90, 0xe4, 0xe1, 0x4e, 0x40, 
+0x35, 0x43, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x81, 
+0x32, 0x8d, 0x10, 0x10, 0x80, 0x32, 0x8e, 0xe4, 0xe1, 0x3a, 0x40, 0x34, 
+0xfd, 0xa0, 0x0e, 0x80, 0xa0, 0x09, 0x08, 0x94, 0x80, 0x9a, 0x30, 0x04, 
+0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x0d, 
+0x80, 0x33, 0x0c, 0x10, 0x10, 0x80, 0x33, 0x0b, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x32, 0xf2, 0x80, 0x32, 0xf1, 0x10, 0x10, 0x80, 0x32, 0xf0, 0x90, 
+0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd7, 0x80, 0x32, 0xd6, 0x10, 
+0x10, 0x80, 0x32, 0xd5, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xbc, 0x80, 
+0x32, 0xbb, 0x10, 0x10, 0x80, 0x32, 0xba, 0x91, 0x10, 0x90, 0x88, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x33, 0x08, 0x80, 0x33, 0x0a, 0x10, 0x10, 0x80, 
+0x33, 0x09, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xed, 0x80, 0x32, 0xef, 
+0x10, 0x10, 0x80, 0x32, 0xee, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
+0x32, 0xd2, 0x80, 0x32, 0xd4, 0x10, 0x10, 0x80, 0x32, 0xd3, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x32, 0xb7, 0x80, 0x32, 0xb9, 0x10, 0x10, 0x80, 0x32, 
+0xb8, 0xe4, 0xe1, 0x47, 0x40, 0x35, 0x31, 0x9a, 0x30, 0x04, 0x40, 0x91, 
+0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x05, 0x80, 0x33, 
+0x07, 0x10, 0x10, 0x80, 0x33, 0x06, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
+0xea, 0x80, 0x32, 0xec, 0x10, 0x10, 0x80, 0x32, 0xeb, 0x90, 0x88, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x32, 0xcf, 0x80, 0x32, 0xd1, 0x10, 0x10, 0x80, 
+0x32, 0xd0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb4, 0x80, 0x32, 0xb6, 
+0x10, 0x10, 0x80, 0x32, 0xb5, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x33, 0x02, 0x80, 0x33, 0x04, 0x10, 0x10, 0x80, 0x33, 0x03, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe7, 0x80, 0x32, 0xe9, 0x10, 0x10, 
+0x80, 0x32, 0xe8, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xcc, 
+0x80, 0x32, 0xce, 0x10, 0x10, 0x80, 0x32, 0xcd, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x32, 0xb1, 0x80, 0x32, 0xb3, 0x10, 0x10, 0x80, 0x32, 0xb2, 0xe4, 
+0xe1, 0x36, 0xc0, 0x34, 0xe5, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 
+0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xff, 0x80, 0x33, 
+0x01, 0x10, 0x10, 0x80, 0x33, 0x00, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
+0xe4, 0x80, 0x32, 0xe6, 0x10, 0x10, 0x80, 0x32, 0xe5, 0x90, 0x88, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x32, 0xc9, 0x80, 0x32, 0xcb, 0x10, 0x10, 0x80, 
+0x32, 0xca, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xae, 0x80, 0x32, 0xb0, 
+0x10, 0x10, 0x80, 0x32, 0xaf, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x32, 0xfc, 0x80, 0x32, 0xfe, 0x10, 0x10, 0x80, 0x32, 0xfd, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe1, 0x80, 0x32, 0xe3, 0x10, 0x10, 
+0x80, 0x32, 0xe2, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc6, 
+0x80, 0x32, 0xc8, 0x10, 0x10, 0x80, 0x32, 0xc7, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x32, 0xab, 0x80, 0x32, 0xad, 0x10, 0x10, 0x80, 0x32, 0xac, 0xe4, 
+0xe1, 0x46, 0x40, 0x35, 0x2d, 0x88, 0x00, 0xb0, 0x10, 0x10, 0x10, 0x10, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa8, 0x80, 0x32, 0xaa, 0x10, 0x10, 
+0x80, 0x32, 0xa9, 0xe4, 0xe1, 0x36, 0x40, 0x34, 0xe3, 0x96, 0xe8, 0x94, 
 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x33, 0x0d, 0x80, 0x33, 0x0c, 0x10, 0x10, 0x80, 0x33, 0x0b, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf2, 0x80, 0x32, 0xf1, 0x10, 0x10, 
-0x80, 0x32, 0xf0, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xd7, 
-0x80, 0x32, 0xd6, 0x10, 0x10, 0x80, 0x32, 0xd5, 0x90, 0x50, 0x90, 0x28, 
-0x80, 0x32, 0xbc, 0x80, 0x32, 0xbb, 0x10, 0x10, 0x80, 0x32, 0xba, 0x91, 
-0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x08, 0x80, 0x33, 
-0x0a, 0x10, 0x10, 0x80, 0x33, 0x09, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
-0xed, 0x80, 0x32, 0xef, 0x10, 0x10, 0x80, 0x32, 0xee, 0x90, 0x88, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x32, 0xd2, 0x80, 0x32, 0xd4, 0x10, 0x10, 0x80, 
-0x32, 0xd3, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb7, 0x80, 0x32, 0xb9, 
-0x10, 0x10, 0x80, 0x32, 0xb8, 0xe4, 0xe1, 0x47, 0x40, 0x35, 0x31, 0x9a, 
-0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x33, 0x05, 0x80, 0x33, 0x07, 0x10, 0x10, 0x80, 0x33, 0x06, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x32, 0xea, 0x80, 0x32, 0xec, 0x10, 0x10, 0x80, 0x32, 
-0xeb, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xcf, 0x80, 0x32, 
-0xd1, 0x10, 0x10, 0x80, 0x32, 0xd0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
-0xb4, 0x80, 0x32, 0xb6, 0x10, 0x10, 0x80, 0x32, 0xb5, 0x91, 0x10, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0x02, 0x80, 0x33, 0x04, 0x10, 
-0x10, 0x80, 0x33, 0x03, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe7, 0x80, 
-0x32, 0xe9, 0x10, 0x10, 0x80, 0x32, 0xe8, 0x90, 0x88, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x32, 0xcc, 0x80, 0x32, 0xce, 0x10, 0x10, 0x80, 0x32, 0xcd, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xb1, 0x80, 0x32, 0xb3, 0x10, 0x10, 
-0x80, 0x32, 0xb2, 0xe4, 0xe1, 0x36, 0xc0, 0x34, 0xe5, 0x94, 0x80, 0x9a, 
-0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x32, 0xff, 0x80, 0x33, 0x01, 0x10, 0x10, 0x80, 0x33, 0x00, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x32, 0xe4, 0x80, 0x32, 0xe6, 0x10, 0x10, 0x80, 0x32, 
-0xe5, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc9, 0x80, 0x32, 
-0xcb, 0x10, 0x10, 0x80, 0x32, 0xca, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
-0xae, 0x80, 0x32, 0xb0, 0x10, 0x10, 0x80, 0x32, 0xaf, 0x91, 0x10, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xfc, 0x80, 0x32, 0xfe, 0x10, 
-0x10, 0x80, 0x32, 0xfd, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xe1, 0x80, 
-0x32, 0xe3, 0x10, 0x10, 0x80, 0x32, 0xe2, 0x90, 0x88, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x32, 0xc6, 0x80, 0x32, 0xc8, 0x10, 0x10, 0x80, 0x32, 0xc7, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xab, 0x80, 0x32, 0xad, 0x10, 0x10, 
-0x80, 0x32, 0xac, 0xe4, 0xe1, 0x46, 0x40, 0x35, 0x2d, 0x88, 0x00, 0xb0, 
-0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa8, 0x80, 
-0x32, 0xaa, 0x10, 0x10, 0x80, 0x32, 0xa9, 0xe4, 0xe1, 0x36, 0x40, 0x34, 
-0xe3, 0x96, 0xe8, 0x94, 0x80, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x10, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf6, 0x80, 0x32, 0xfb, 0x10, 
-0x10, 0x80, 0x32, 0xfa, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdb, 0x80, 
-0x32, 0xe0, 0x10, 0x10, 0x80, 0x32, 0xdf, 0x90, 0x88, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x32, 0xc0, 0x80, 0x32, 0xc5, 0x10, 0x10, 0x80, 0x32, 0xc4, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa2, 0x80, 0x32, 0xa7, 0x10, 0x10, 
-0x80, 0x32, 0xa6, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x32, 0xf3, 0x80, 0x32, 0xf5, 0x10, 0x10, 0x80, 0x32, 0xf4, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x32, 0xd8, 0x80, 0x32, 0xda, 0x10, 0x10, 0x80, 0x32, 
-0xd9, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xbd, 0x80, 0x32, 
-0xbf, 0x10, 0x10, 0x80, 0x32, 0xbe, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
-0x9f, 0x80, 0x32, 0xa1, 0x10, 0x10, 0x80, 0x32, 0xa0, 0xe4, 0xe1, 0x45, 
-0x40, 0x35, 0x29, 0x88, 0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x32, 0xf7, 0x80, 0x32, 0xf9, 0x10, 0x10, 0x80, 0x32, 
-0xf8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdc, 0x80, 0x32, 0xde, 0x10, 
-0x10, 0x80, 0x32, 0xdd, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
-0xc1, 0x80, 0x32, 0xc3, 0x10, 0x10, 0x80, 0x32, 0xc2, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x32, 0xa3, 0x80, 0x32, 0xa5, 0x10, 0x10, 0x80, 0x32, 0xa4, 
-0xe4, 0xe1, 0x35, 0xc0, 0x34, 0xe1, 0x90, 0x40, 0xe5, 0x21, 0x44, 0x40, 
-0x35, 0x25, 0xe5, 0x21, 0x35, 0x40, 0x34, 0xdf, 0x9e, 0xb4, 0x20, 0x08, 
-0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 
-0x80, 0x8c, 0x37, 0x58, 0x84, 0x36, 0xf5, 0xa4, 0x35, 0x38, 0x36, 0xbf, 
-0x90, 0x28, 0x24, 0x34, 0x78, 0xa4, 0x32, 0xf8, 0x36, 0x77, 0xd0, 0xc4, 
-0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x38, 0x84, 0x36, 0xf3, 0xa4, 0x35, 
-0x28, 0x36, 0xbd, 0x90, 0x28, 0x24, 0x34, 0x68, 0xa4, 0x32, 0xe8, 0x36, 
-0x75, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdf, 
-0xa4, 0x35, 0x08, 0x36, 0xb9, 0x90, 0x28, 0x24, 0x34, 0x48, 0xa4, 0x32, 
-0xc8, 0x36, 0x71, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdb, 0xa4, 
-0x34, 0xf8, 0x36, 0xb7, 0x90, 0x28, 0x24, 0x34, 0x38, 0xa4, 0x32, 0xb8, 
-0x36, 0x6f, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 
-0x80, 0x36, 0xd3, 0xa4, 0x34, 0xd8, 0x36, 0xb3, 0x90, 0x28, 0x24, 0x34, 
-0x18, 0xa4, 0x32, 0x98, 0x36, 0x6b, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 
-0x36, 0xcf, 0xa4, 0x34, 0xc8, 0x36, 0xb1, 0x90, 0x28, 0x24, 0x34, 0x08, 
-0xa4, 0x32, 0x88, 0x36, 0x69, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 
-0x28, 0x80, 0x36, 0xc7, 0xa4, 0x34, 0xa8, 0x36, 0xad, 0x90, 0x28, 0x24, 
-0x33, 0xe8, 0xa4, 0x32, 0x68, 0x36, 0x65, 0xd0, 0xc3, 0x40, 0x90, 0x28, 
-0x80, 0x36, 0xc3, 0xa4, 0x34, 0x98, 0x36, 0xab, 0x90, 0x28, 0x24, 0x33, 
-0xd8, 0xa4, 0x32, 0x58, 0x36, 0x63, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 
-0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x78, 0x84, 0x36, 
-0xf7, 0xa4, 0x35, 0x48, 0x36, 0xc1, 0x90, 0x28, 0x24, 0x34, 0x88, 0xa4, 
-0x33, 0x08, 0x36, 0x79, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 
-0x48, 0x84, 0x36, 0xf4, 0xa4, 0x35, 0x30, 0x36, 0xbe, 0x90, 0x28, 0x24, 
-0x34, 0x70, 0xa4, 0x32, 0xf0, 0x36, 0x76, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 
-0x40, 0x90, 0x28, 0x80, 0x36, 0xe3, 0xa4, 0x35, 0x18, 0x36, 0xbb, 0x90, 
-0x28, 0x24, 0x34, 0x58, 0xa4, 0x32, 0xd8, 0x36, 0x73, 0xd0, 0xc3, 0x40, 
-0x90, 0x28, 0x80, 0x36, 0xdd, 0xa4, 0x35, 0x00, 0x36, 0xb8, 0x90, 0x28, 
-0x24, 0x34, 0x40, 0xa4, 0x32, 0xc0, 0x36, 0x70, 0x91, 0x98, 0xd5, 0x06, 
-0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd7, 0xa4, 0x34, 0xe8, 
-0x36, 0xb5, 0x90, 0x28, 0x24, 0x34, 0x28, 0xa4, 0x32, 0xa8, 0x36, 0x6d, 
-0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd1, 0xa4, 0x34, 0xd0, 0x36, 
-0xb2, 0x90, 0x28, 0x24, 0x34, 0x10, 0xa4, 0x32, 0x90, 0x36, 0x6a, 0xd5, 
-0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xcb, 0xa4, 0x34, 
-0xb8, 0x36, 0xaf, 0x90, 0x28, 0x24, 0x33, 0xf8, 0xa4, 0x32, 0x78, 0x36, 
-0x67, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc5, 0xa4, 0x34, 0xa0, 
-0x36, 0xac, 0x90, 0x28, 0x24, 0x33, 0xe0, 0xa4, 0x32, 0x60, 0x36, 0x64, 
-0x99, 0x08, 0x01, 0xf0, 0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 
-0xb0, 0x33, 0xee, 0xa4, 0x1f, 0x30, 0x33, 0xde, 0xd4, 0xc2, 0x00, 0xa4, 
-0x1f, 0x40, 0x33, 0xf0, 0xa4, 0x1e, 0xc0, 0x33, 0xe0, 0x81, 0x90, 0x78, 
-0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x60, 0x33, 0xf4, 0xa4, 0x1e, 0xe0, 0x33, 
-0xe4, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x50, 0x33, 0xf2, 0xa4, 0x1e, 0xd0, 
-0x33, 0xe2, 0xa8, 0x0b, 0x18, 0x13, 0xa8, 0x96, 0x80, 0x93, 0x40, 0x99, 
-0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xb8, 
-0x32, 0x58, 0x24, 0x12, 0xb0, 0x90, 0x38, 0xa4, 0x11, 0xe0, 0x32, 0x3d, 
-0x24, 0x11, 0xd8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x11, 0x08, 0x32, 0x22, 
-0x24, 0x11, 0x00, 0x90, 0x38, 0xa4, 0x10, 0x30, 0x32, 0x07, 0x24, 0x10, 
-0x28, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xa8, 0x32, 0x53, 
-0x24, 0x12, 0xa0, 0x90, 0x38, 0xa4, 0x11, 0xd0, 0x32, 0x38, 0x24, 0x11, 
-0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xf8, 0x32, 0x1d, 0x24, 0x10, 
-0xf0, 0x90, 0x38, 0xa4, 0x10, 0x20, 0x32, 0x02, 0x24, 0x10, 0x18, 0xe4, 
-0xe1, 0x91, 0x40, 0x36, 0x47, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 
-0x60, 0x90, 0x38, 0xa4, 0x12, 0x90, 0x32, 0x50, 0x24, 0x12, 0x88, 0x90, 
-0x38, 0xa4, 0x11, 0xb8, 0x32, 0x35, 0x24, 0x11, 0xb0, 0x90, 0x60, 0x90, 
-0x38, 0xa4, 0x10, 0xe0, 0x32, 0x1a, 0x24, 0x10, 0xd8, 0x90, 0x38, 0xa4, 
-0x10, 0x08, 0x31, 0xff, 0x24, 0x10, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 
-0x38, 0xa4, 0x12, 0x78, 0x32, 0x4d, 0x24, 0x12, 0x70, 0x90, 0x38, 0xa4, 
-0x11, 0xa0, 0x32, 0x32, 0x24, 0x11, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x10, 0xc8, 0x32, 0x17, 0x24, 0x10, 0xc0, 0x90, 0x38, 0xa4, 0x0f, 0xf0, 
-0x31, 0xfc, 0x24, 0x0f, 0xe8, 0xe4, 0xe1, 0x8f, 0xc0, 0x36, 0x41, 0x93, 
-0x78, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x12, 0x60, 0x32, 0x4a, 0x24, 0x12, 0x58, 0x90, 0x38, 0xa4, 0x11, 0x88, 
-0x32, 0x2f, 0x24, 0x11, 0x80, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xb0, 
-0x32, 0x14, 0x24, 0x10, 0xa8, 0x90, 0x38, 0xa4, 0x0f, 0xd8, 0x31, 0xf9, 
-0x24, 0x0f, 0xd0, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x48, 
-0x32, 0x47, 0x24, 0x12, 0x40, 0x90, 0x38, 0xa4, 0x11, 0x70, 0x32, 0x2c, 
-0x24, 0x11, 0x68, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x98, 0x32, 0x11, 
-0x24, 0x10, 0x90, 0x90, 0x38, 0xa4, 0x0f, 0xc0, 0x31, 0xf6, 0x24, 0x0f, 
-0xb8, 0xec, 0xa0, 0xff, 0x00, 0x02, 0x00, 0x33, 0xfe, 0xa4, 0x31, 0xc8, 
-0x36, 0x3b, 0x88, 0x00, 0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 
-0x0f, 0xa8, 0x31, 0xf3, 0x24, 0x0f, 0xa0, 0xe9, 0x60, 0xfe, 0x40, 0x02, 
-0x00, 0x33, 0xfa, 0xe3, 0x61, 0x8c, 0xc0, 0x36, 0x35, 0x95, 0x08, 0x93, 
-0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x12, 0x30, 0x32, 0x41, 0x24, 0x12, 0x28, 0x90, 0x38, 0xa4, 0x11, 0x58, 
-0x32, 0x26, 0x24, 0x11, 0x50, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x80, 
-0x32, 0x0b, 0x24, 0x10, 0x78, 0x90, 0x38, 0xa4, 0x0f, 0x90, 0x31, 0xed, 
-0x24, 0x0f, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x00, 
-0x32, 0x3e, 0x24, 0x11, 0xf8, 0x90, 0x38, 0xa4, 0x11, 0x28, 0x32, 0x23, 
-0x24, 0x11, 0x20, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x50, 0x32, 0x08, 
-0x24, 0x10, 0x48, 0x90, 0x38, 0xa4, 0x0f, 0x60, 0x31, 0xea, 0x24, 0x0f, 
-0x58, 0xe4, 0xe1, 0x91, 0x80, 0x36, 0x49, 0x88, 0x01, 0x88, 0x90, 0xc0, 
-0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x20, 0x32, 0x42, 0x24, 0x12, 0x18, 
-0x90, 0x38, 0xa4, 0x11, 0x48, 0x32, 0x27, 0x24, 0x11, 0x40, 0x90, 0x60, 
-0x90, 0x38, 0xa4, 0x10, 0x70, 0x32, 0x0c, 0x24, 0x10, 0x68, 0x90, 0x38, 
-0xa4, 0x0f, 0x80, 0x31, 0xee, 0x24, 0x0f, 0x78, 0xe4, 0xe1, 0x90, 0x00, 
-0x36, 0x43, 0x92, 0xd0, 0x99, 0x50, 0x02, 0x80, 0x90, 0xa0, 0x90, 0x50, 
-0x90, 0x28, 0x80, 0x31, 0xe9, 0x24, 0x0f, 0x40, 0x90, 0x28, 0x80, 0x31, 
-0xe5, 0x24, 0x0f, 0x20, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe1, 0x24, 
-0x0f, 0x00, 0x90, 0x28, 0x80, 0x31, 0xdd, 0x24, 0x0e, 0xe0, 0x90, 0xa0, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe6, 0x24, 0x0f, 0x38, 0x90, 0x28, 
-0x80, 0x31, 0xe2, 0x24, 0x0f, 0x18, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 
-0xde, 0x24, 0x0e, 0xf8, 0x90, 0x28, 0x80, 0x31, 0xda, 0x24, 0x0e, 0xd8, 
-0xec, 0xe1, 0x8e, 0xa1, 0x00, 0x00, 0x36, 0x3d, 0x88, 0x00, 0x78, 0x10, 
-0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x31, 0xd8, 0x24, 0x0e, 0xc8, 0xec, 
-0xe1, 0x8d, 0x20, 0xfe, 0x00, 0x36, 0x37, 0xe5, 0xa1, 0x34, 0xc0, 0x34, 
-0xd1, 0xa0, 0x2a, 0x10, 0xa8, 0x16, 0x60, 0x29, 0xd8, 0xa0, 0x0c, 0x48, 
-0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x31, 0xa1, 0x80, 0x31, 0xa0, 0x10, 0x10, 0x80, 
-0x31, 0x9f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x98, 0x31, 0xb3, 0xa4, 
-0x08, 0x90, 0x31, 0xb2, 0x10, 0x10, 0xa4, 0x08, 0x88, 0x31, 0xb1, 0x90, 
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0xb8, 0x31, 0xd7, 0xa4, 0x09, 
-0xb0, 0x31, 0xd6, 0x10, 0x10, 0xa4, 0x09, 0xa8, 0x31, 0xd5, 0x90, 0x70, 
-0x90, 0x38, 0xa4, 0x09, 0x28, 0x31, 0xc5, 0xa4, 0x09, 0x20, 0x31, 0xc4, 
-0x10, 0x10, 0xa4, 0x09, 0x18, 0x31, 0xc3, 0x91, 0x40, 0x90, 0x88, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x31, 0x9c, 0x80, 0x31, 0x9e, 0x10, 0x10, 0x80, 
-0x31, 0x9d, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x70, 0x31, 0xae, 0xa4, 
-0x08, 0x80, 0x31, 0xb0, 0x10, 0x10, 0xa4, 0x08, 0x78, 0x31, 0xaf, 0x90, 
-0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x90, 0x31, 0xd2, 0xa4, 0x09, 
-0xa0, 0x31, 0xd4, 0x10, 0x10, 0xa4, 0x09, 0x98, 0x31, 0xd3, 0x90, 0x70, 
-0x90, 0x38, 0xa4, 0x09, 0x00, 0x31, 0xc0, 0xa4, 0x09, 0x10, 0x31, 0xc2, 
-0x10, 0x10, 0xa4, 0x09, 0x08, 0x31, 0xc1, 0x92, 0xb0, 0x91, 0x40, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x99, 0x80, 0x31, 0x9b, 0x10, 
-0x10, 0x80, 0x31, 0x9a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x58, 0x31, 
-0xab, 0xa4, 0x08, 0x68, 0x31, 0xad, 0x10, 0x10, 0xa4, 0x08, 0x60, 0x31, 
-0xac, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x78, 0x31, 0xcf, 
-0xa4, 0x09, 0x88, 0x31, 0xd1, 0x10, 0x10, 0xa4, 0x09, 0x80, 0x31, 0xd0, 
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xe8, 0x31, 0xbd, 0xa4, 0x08, 0xf8, 
-0x31, 0xbf, 0x10, 0x10, 0xa4, 0x08, 0xf0, 0x31, 0xbe, 0x91, 0x40, 0x90, 
-0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x96, 0x80, 0x31, 0x98, 0x10, 
-0x10, 0x80, 0x31, 0x97, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x40, 0x31, 
-0xa8, 0xa4, 0x08, 0x50, 0x31, 0xaa, 0x10, 0x10, 0xa4, 0x08, 0x48, 0x31, 
-0xa9, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x60, 0x31, 0xcc, 
-0xa4, 0x09, 0x70, 0x31, 0xce, 0x10, 0x10, 0xa4, 0x09, 0x68, 0x31, 0xcd, 
-0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xd0, 0x31, 0xba, 0xa4, 0x08, 0xe0, 
-0x31, 0xbc, 0x10, 0x10, 0xa4, 0x08, 0xd8, 0x31, 0xbb, 0x10, 0x10, 0x90, 
-0xa8, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x8d, 
-0x80, 0x31, 0x8f, 0x10, 0x10, 0x80, 0x31, 0x8e, 0x90, 0x60, 0x90, 0x30, 
-0x60, 0xa0, 0x2a, 0xc0, 0x60, 0xa0, 0x2a, 0x80, 0x90, 0x30, 0x60, 0xa0, 
-0x2a, 0x40, 0x60, 0xa0, 0x2a, 0x00, 0x97, 0xf0, 0x95, 0x60, 0x92, 0xb0, 
-0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x93, 0x80, 
-0x31, 0x95, 0x10, 0x10, 0x80, 0x31, 0x94, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x08, 0x28, 0x31, 0xa5, 0xa4, 0x08, 0x38, 0x31, 0xa7, 0x10, 0x10, 0xa4, 
-0x08, 0x30, 0x31, 0xa6, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 
-0x48, 0x31, 0xc9, 0xa4, 0x09, 0x58, 0x31, 0xcb, 0x10, 0x10, 0xa4, 0x09, 
-0x50, 0x31, 0xca, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xb8, 0x31, 0xb7, 
-0xa4, 0x08, 0xc8, 0x31, 0xb9, 0x10, 0x10, 0xa4, 0x08, 0xc0, 0x31, 0xb8, 
-0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x90, 0x80, 
-0x31, 0x92, 0x10, 0x10, 0x80, 0x31, 0x91, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x08, 0x10, 0x31, 0xa2, 0xa4, 0x08, 0x20, 0x31, 0xa4, 0x10, 0x10, 0xa4, 
-0x08, 0x18, 0x31, 0xa3, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 
-0x30, 0x31, 0xc6, 0xa4, 0x09, 0x40, 0x31, 0xc8, 0x10, 0x10, 0xa4, 0x09, 
-0x38, 0x31, 0xc7, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0xa0, 0x31, 0xb4, 
-0xa4, 0x08, 0xb0, 0x31, 0xb6, 0x10, 0x10, 0xa4, 0x08, 0xa8, 0x31, 0xb5, 
-0x10, 0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 
-0xcb, 0x80, 0x30, 0xca, 0x90, 0x28, 0x80, 0x30, 0xc9, 0x80, 0x30, 0xc8, 
-0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xc4, 0x80, 0x30, 0xc7, 0x90, 0x28, 
-0x80, 0x30, 0xc6, 0x80, 0x30, 0xc5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 
-0x80, 0x30, 0xbc, 0x80, 0x30, 0xc3, 0x90, 0x28, 0x80, 0x30, 0xc2, 0x80, 
-0x30, 0xc1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbd, 0x80, 0x30, 0xc0, 
-0x90, 0x28, 0x80, 0x30, 0xbf, 0x80, 0x30, 0xbe, 0x91, 0x88, 0x80, 0x90, 
-0xc0, 0x90, 0x60, 0x90, 0x28, 0x81, 0x31, 0x3b, 0x10, 0x10, 0x80, 0x31, 
-0x3a, 0x90, 0x28, 0x81, 0x31, 0x3d, 0x10, 0x10, 0x80, 0x31, 0x3c, 0x90, 
-0x60, 0x90, 0x28, 0x81, 0x31, 0x41, 0x10, 0x10, 0x80, 0x31, 0x40, 0x90, 
-0x28, 0x81, 0x31, 0x3f, 0x10, 0x10, 0x80, 0x31, 0x3e, 0x80, 0x10, 0x10, 
-0x10, 0x10, 0x90, 0x28, 0x81, 0x31, 0x38, 0x10, 0x10, 0x80, 0x31, 0x39, 
-0xa0, 0x0b, 0x90, 0xa0, 0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x56, 0x80, 0x31, 0x55, 
-0x10, 0x10, 0x80, 0x31, 0x54, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xe8, 
-0x31, 0x68, 0xa4, 0x06, 0xe0, 0x31, 0x67, 0x10, 0x10, 0xa4, 0x06, 0xd8, 
-0x31, 0x66, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x08, 0x31, 
-0x8c, 0xa4, 0x08, 0x00, 0x31, 0x8b, 0x10, 0x10, 0xa4, 0x07, 0xf8, 0x31, 
-0x8a, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x78, 0x31, 0x7a, 0xa4, 0x07, 
-0x70, 0x31, 0x79, 0x10, 0x10, 0xa4, 0x07, 0x68, 0x31, 0x78, 0x91, 0x40, 
-0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x51, 0x80, 0x31, 0x53, 
-0x10, 0x10, 0x80, 0x31, 0x52, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xc0, 
-0x31, 0x63, 0xa4, 0x06, 0xd0, 0x31, 0x65, 0x10, 0x10, 0xa4, 0x06, 0xc8, 
-0x31, 0x64, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xe0, 0x31, 
-0x87, 0xa4, 0x07, 0xf0, 0x31, 0x89, 0x10, 0x10, 0xa4, 0x07, 0xe8, 0x31, 
-0x88, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x50, 0x31, 0x75, 0xa4, 0x07, 
-0x60, 0x31, 0x77, 0x10, 0x10, 0xa4, 0x07, 0x58, 0x31, 0x76, 0x92, 0xb0, 
-0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4e, 0x80, 
-0x31, 0x50, 0x10, 0x10, 0x80, 0x31, 0x4f, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x06, 0xa8, 0x31, 0x60, 0xa4, 0x06, 0xb8, 0x31, 0x62, 0x10, 0x10, 0xa4, 
-0x06, 0xb0, 0x31, 0x61, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 
-0xc8, 0x31, 0x84, 0xa4, 0x07, 0xd8, 0x31, 0x86, 0x10, 0x10, 0xa4, 0x07, 
-0xd0, 0x31, 0x85, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x38, 0x31, 0x72, 
-0xa4, 0x07, 0x48, 0x31, 0x74, 0x10, 0x10, 0xa4, 0x07, 0x40, 0x31, 0x73, 
-0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4b, 0x80, 
-0x31, 0x4d, 0x10, 0x10, 0x80, 0x31, 0x4c, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x06, 0x90, 0x31, 0x5d, 0xa4, 0x06, 0xa0, 0x31, 0x5f, 0x10, 0x10, 0xa4, 
-0x06, 0x98, 0x31, 0x5e, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 
-0xb0, 0x31, 0x81, 0xa4, 0x07, 0xc0, 0x31, 0x83, 0x10, 0x10, 0xa4, 0x07, 
-0xb8, 0x31, 0x82, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x20, 0x31, 0x6f, 
-0xa4, 0x07, 0x30, 0x31, 0x71, 0x10, 0x10, 0xa4, 0x07, 0x28, 0x31, 0x70, 
-0x10, 0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x31, 0x42, 0x80, 0x31, 0x44, 0x10, 0x10, 0x80, 0x31, 0x43, 0x80, 0x95, 
+0x28, 0x80, 0x32, 0xf6, 0x80, 0x32, 0xfb, 0x10, 0x10, 0x80, 0x32, 0xfa, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xdb, 0x80, 0x32, 0xe0, 0x10, 0x10, 
+0x80, 0x32, 0xdf, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc0, 
+0x80, 0x32, 0xc5, 0x10, 0x10, 0x80, 0x32, 0xc4, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x32, 0xa2, 0x80, 0x32, 0xa7, 0x10, 0x10, 0x80, 0x32, 0xa6, 0x91, 
+0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xf3, 0x80, 0x32, 
+0xf5, 0x10, 0x10, 0x80, 0x32, 0xf4, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
+0xd8, 0x80, 0x32, 0xda, 0x10, 0x10, 0x80, 0x32, 0xd9, 0x90, 0x88, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x32, 0xbd, 0x80, 0x32, 0xbf, 0x10, 0x10, 0x80, 
+0x32, 0xbe, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0x9f, 0x80, 0x32, 0xa1, 
+0x10, 0x10, 0x80, 0x32, 0xa0, 0xe4, 0xe1, 0x45, 0x40, 0x35, 0x29, 0x88, 
+0x02, 0x28, 0x91, 0x10, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 
+0xf7, 0x80, 0x32, 0xf9, 0x10, 0x10, 0x80, 0x32, 0xf8, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x32, 0xdc, 0x80, 0x32, 0xde, 0x10, 0x10, 0x80, 0x32, 0xdd, 
+0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xc1, 0x80, 0x32, 0xc3, 
+0x10, 0x10, 0x80, 0x32, 0xc2, 0x90, 0x50, 0x90, 0x28, 0x80, 0x32, 0xa3, 
+0x80, 0x32, 0xa5, 0x10, 0x10, 0x80, 0x32, 0xa4, 0xe4, 0xe1, 0x35, 0xc0, 
+0x34, 0xe1, 0x90, 0x40, 0xe5, 0x21, 0x44, 0x40, 0x35, 0x25, 0xe5, 0x21, 
+0x35, 0x40, 0x34, 0xdf, 0x9e, 0xb4, 0x20, 0x08, 0x93, 0x70, 0x91, 0xd8, 
+0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x58, 
+0x84, 0x36, 0xf5, 0xa4, 0x35, 0x38, 0x36, 0xbf, 0x90, 0x28, 0x24, 0x34, 
+0x78, 0xa4, 0x32, 0xf8, 0x36, 0x77, 0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 
+0x8c, 0x37, 0x38, 0x84, 0x36, 0xf3, 0xa4, 0x35, 0x28, 0x36, 0xbd, 0x90, 
+0x28, 0x24, 0x34, 0x68, 0xa4, 0x32, 0xe8, 0x36, 0x75, 0xd5, 0x06, 0x80, 
+0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdf, 0xa4, 0x35, 0x08, 0x36, 
+0xb9, 0x90, 0x28, 0x24, 0x34, 0x48, 0xa4, 0x32, 0xc8, 0x36, 0x71, 0xd0, 
+0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xdb, 0xa4, 0x34, 0xf8, 0x36, 0xb7, 
+0x90, 0x28, 0x24, 0x34, 0x38, 0xa4, 0x32, 0xb8, 0x36, 0x6f, 0x91, 0x98, 
+0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xd3, 0xa4, 
+0x34, 0xd8, 0x36, 0xb3, 0x90, 0x28, 0x24, 0x34, 0x18, 0xa4, 0x32, 0x98, 
+0x36, 0x6b, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xcf, 0xa4, 0x34, 
+0xc8, 0x36, 0xb1, 0x90, 0x28, 0x24, 0x34, 0x08, 0xa4, 0x32, 0x88, 0x36, 
+0x69, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc7, 
+0xa4, 0x34, 0xa8, 0x36, 0xad, 0x90, 0x28, 0x24, 0x33, 0xe8, 0xa4, 0x32, 
+0x68, 0x36, 0x65, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 0xc3, 0xa4, 
+0x34, 0x98, 0x36, 0xab, 0x90, 0x28, 0x24, 0x33, 0xd8, 0xa4, 0x32, 0x58, 
+0x36, 0x63, 0x93, 0x70, 0x91, 0xd8, 0xd5, 0x07, 0x80, 0xd0, 0xc4, 0x40, 
+0x90, 0x48, 0x80, 0x8c, 0x37, 0x78, 0x84, 0x36, 0xf7, 0xa4, 0x35, 0x48, 
+0x36, 0xc1, 0x90, 0x28, 0x24, 0x34, 0x88, 0xa4, 0x33, 0x08, 0x36, 0x79, 
+0xd0, 0xc4, 0x40, 0x90, 0x48, 0x80, 0x8c, 0x37, 0x48, 0x84, 0x36, 0xf4, 
+0xa4, 0x35, 0x30, 0x36, 0xbe, 0x90, 0x28, 0x24, 0x34, 0x70, 0xa4, 0x32, 
+0xf0, 0x36, 0x76, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 
+0x36, 0xe3, 0xa4, 0x35, 0x18, 0x36, 0xbb, 0x90, 0x28, 0x24, 0x34, 0x58, 
+0xa4, 0x32, 0xd8, 0x36, 0x73, 0xd0, 0xc3, 0x40, 0x90, 0x28, 0x80, 0x36, 
+0xdd, 0xa4, 0x35, 0x00, 0x36, 0xb8, 0x90, 0x28, 0x24, 0x34, 0x40, 0xa4, 
+0x32, 0xc0, 0x36, 0x70, 0x91, 0x98, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 0x40, 
+0x90, 0x28, 0x80, 0x36, 0xd7, 0xa4, 0x34, 0xe8, 0x36, 0xb5, 0x90, 0x28, 
+0x24, 0x34, 0x28, 0xa4, 0x32, 0xa8, 0x36, 0x6d, 0xd0, 0xc3, 0x40, 0x90, 
+0x28, 0x80, 0x36, 0xd1, 0xa4, 0x34, 0xd0, 0x36, 0xb2, 0x90, 0x28, 0x24, 
+0x34, 0x10, 0xa4, 0x32, 0x90, 0x36, 0x6a, 0xd5, 0x06, 0x80, 0xd0, 0xc3, 
+0x40, 0x90, 0x28, 0x80, 0x36, 0xcb, 0xa4, 0x34, 0xb8, 0x36, 0xaf, 0x90, 
+0x28, 0x24, 0x33, 0xf8, 0xa4, 0x32, 0x78, 0x36, 0x67, 0xd0, 0xc3, 0x40, 
+0x90, 0x28, 0x80, 0x36, 0xc5, 0xa4, 0x34, 0xa0, 0x36, 0xac, 0x90, 0x28, 
+0x24, 0x33, 0xe0, 0xa4, 0x32, 0x60, 0x36, 0x64, 0x99, 0x08, 0x01, 0xf0, 
+0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0xb0, 0x33, 0xee, 0xa4, 
+0x1f, 0x30, 0x33, 0xde, 0xd4, 0xc2, 0x00, 0xa4, 0x1f, 0x40, 0x33, 0xf0, 
+0xa4, 0x1e, 0xc0, 0x33, 0xe0, 0x81, 0x90, 0x78, 0xd4, 0xc2, 0x00, 0xa4, 
+0x1f, 0x60, 0x33, 0xf4, 0xa4, 0x1e, 0xe0, 0x33, 0xe4, 0xd4, 0xc2, 0x00, 
+0xa4, 0x1f, 0x50, 0x33, 0xf2, 0xa4, 0x1e, 0xd0, 0x33, 0xe2, 0xa8, 0x0b, 
+0x18, 0x13, 0xa8, 0x96, 0x80, 0x93, 0x40, 0x99, 0x90, 0x03, 0x00, 0x90, 
+0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0xb8, 0x32, 0x58, 0x24, 0x12, 
+0xb0, 0x90, 0x38, 0xa4, 0x11, 0xe0, 0x32, 0x3d, 0x24, 0x11, 0xd8, 0x90, 
+0x60, 0x90, 0x38, 0xa4, 0x11, 0x08, 0x32, 0x22, 0x24, 0x11, 0x00, 0x90, 
+0x38, 0xa4, 0x10, 0x30, 0x32, 0x07, 0x24, 0x10, 0x28, 0x90, 0xc0, 0x90, 
+0x60, 0x90, 0x38, 0xa4, 0x12, 0xa8, 0x32, 0x53, 0x24, 0x12, 0xa0, 0x90, 
+0x38, 0xa4, 0x11, 0xd0, 0x32, 0x38, 0x24, 0x11, 0xc8, 0x90, 0x60, 0x90, 
+0x38, 0xa4, 0x10, 0xf8, 0x32, 0x1d, 0x24, 0x10, 0xf0, 0x90, 0x38, 0xa4, 
+0x10, 0x20, 0x32, 0x02, 0x24, 0x10, 0x18, 0xe4, 0xe1, 0x91, 0x40, 0x36, 
+0x47, 0x99, 0x90, 0x03, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
+0x12, 0x90, 0x32, 0x50, 0x24, 0x12, 0x88, 0x90, 0x38, 0xa4, 0x11, 0xb8, 
+0x32, 0x35, 0x24, 0x11, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xe0, 
+0x32, 0x1a, 0x24, 0x10, 0xd8, 0x90, 0x38, 0xa4, 0x10, 0x08, 0x31, 0xff, 
+0x24, 0x10, 0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x78, 
+0x32, 0x4d, 0x24, 0x12, 0x70, 0x90, 0x38, 0xa4, 0x11, 0xa0, 0x32, 0x32, 
+0x24, 0x11, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xc8, 0x32, 0x17, 
+0x24, 0x10, 0xc0, 0x90, 0x38, 0xa4, 0x0f, 0xf0, 0x31, 0xfc, 0x24, 0x0f, 
+0xe8, 0xe4, 0xe1, 0x8f, 0xc0, 0x36, 0x41, 0x93, 0x78, 0x99, 0x90, 0x03, 
+0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x60, 0x32, 0x4a, 
+0x24, 0x12, 0x58, 0x90, 0x38, 0xa4, 0x11, 0x88, 0x32, 0x2f, 0x24, 0x11, 
+0x80, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0xb0, 0x32, 0x14, 0x24, 0x10, 
+0xa8, 0x90, 0x38, 0xa4, 0x0f, 0xd8, 0x31, 0xf9, 0x24, 0x0f, 0xd0, 0x90, 
+0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x48, 0x32, 0x47, 0x24, 0x12, 
+0x40, 0x90, 0x38, 0xa4, 0x11, 0x70, 0x32, 0x2c, 0x24, 0x11, 0x68, 0x90, 
+0x60, 0x90, 0x38, 0xa4, 0x10, 0x98, 0x32, 0x11, 0x24, 0x10, 0x90, 0x90, 
+0x38, 0xa4, 0x0f, 0xc0, 0x31, 0xf6, 0x24, 0x0f, 0xb8, 0xec, 0xa0, 0xff, 
+0x00, 0x02, 0x00, 0x33, 0xfe, 0xa4, 0x31, 0xc8, 0x36, 0x3b, 0x88, 0x00, 
+0x88, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x0f, 0xa8, 0x31, 0xf3, 
+0x24, 0x0f, 0xa0, 0xe9, 0x60, 0xfe, 0x40, 0x02, 0x00, 0x33, 0xfa, 0xe3, 
+0x61, 0x8c, 0xc0, 0x36, 0x35, 0x95, 0x08, 0x93, 0x40, 0x99, 0x90, 0x03, 
+0x00, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x30, 0x32, 0x41, 
+0x24, 0x12, 0x28, 0x90, 0x38, 0xa4, 0x11, 0x58, 0x32, 0x26, 0x24, 0x11, 
+0x50, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 0x80, 0x32, 0x0b, 0x24, 0x10, 
+0x78, 0x90, 0x38, 0xa4, 0x0f, 0x90, 0x31, 0xed, 0x24, 0x0f, 0x88, 0x90, 
+0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x12, 0x00, 0x32, 0x3e, 0x24, 0x11, 
+0xf8, 0x90, 0x38, 0xa4, 0x11, 0x28, 0x32, 0x23, 0x24, 0x11, 0x20, 0x90, 
+0x60, 0x90, 0x38, 0xa4, 0x10, 0x50, 0x32, 0x08, 0x24, 0x10, 0x48, 0x90, 
+0x38, 0xa4, 0x0f, 0x60, 0x31, 0xea, 0x24, 0x0f, 0x58, 0xe4, 0xe1, 0x91, 
+0x80, 0x36, 0x49, 0x88, 0x01, 0x88, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 
+0xa4, 0x12, 0x20, 0x32, 0x42, 0x24, 0x12, 0x18, 0x90, 0x38, 0xa4, 0x11, 
+0x48, 0x32, 0x27, 0x24, 0x11, 0x40, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x10, 
+0x70, 0x32, 0x0c, 0x24, 0x10, 0x68, 0x90, 0x38, 0xa4, 0x0f, 0x80, 0x31, 
+0xee, 0x24, 0x0f, 0x78, 0xe4, 0xe1, 0x90, 0x00, 0x36, 0x43, 0x92, 0xd0, 
+0x99, 0x50, 0x02, 0x80, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 
+0xe9, 0x24, 0x0f, 0x40, 0x90, 0x28, 0x80, 0x31, 0xe5, 0x24, 0x0f, 0x20, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xe1, 0x24, 0x0f, 0x00, 0x90, 0x28, 
+0x80, 0x31, 0xdd, 0x24, 0x0e, 0xe0, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x31, 0xe6, 0x24, 0x0f, 0x38, 0x90, 0x28, 0x80, 0x31, 0xe2, 0x24, 
+0x0f, 0x18, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0xde, 0x24, 0x0e, 0xf8, 
+0x90, 0x28, 0x80, 0x31, 0xda, 0x24, 0x0e, 0xd8, 0xec, 0xe1, 0x8e, 0xa1, 
+0x00, 0x00, 0x36, 0x3d, 0x88, 0x00, 0x78, 0x10, 0x10, 0x10, 0x10, 0x90, 
+0x28, 0x80, 0x31, 0xd8, 0x24, 0x0e, 0xc8, 0xec, 0xe1, 0x8d, 0x20, 0xfe, 
+0x00, 0x36, 0x37, 0xe5, 0xa1, 0x34, 0xc0, 0x34, 0xd1, 0xa0, 0x2a, 0x10, 
+0xa8, 0x16, 0x60, 0x29, 0xd8, 0xa0, 0x0c, 0x48, 0xa0, 0x0a, 0xc8, 0x95, 
 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x31, 0x48, 0x80, 0x31, 0x4a, 0x10, 0x10, 0x80, 0x31, 0x49, 0x90, 0x70, 
-0x90, 0x38, 0xa4, 0x06, 0x78, 0x31, 0x5a, 0xa4, 0x06, 0x88, 0x31, 0x5c, 
-0x10, 0x10, 0xa4, 0x06, 0x80, 0x31, 0x5b, 0x90, 0xb8, 0x90, 0x70, 0x90, 
-0x38, 0xa4, 0x07, 0x98, 0x31, 0x7e, 0xa4, 0x07, 0xa8, 0x31, 0x80, 0x10, 
-0x10, 0xa4, 0x07, 0xa0, 0x31, 0x7f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 
-0x08, 0x31, 0x6c, 0xa4, 0x07, 0x18, 0x31, 0x6e, 0x10, 0x10, 0xa4, 0x07, 
-0x10, 0x31, 0x6d, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
-0x31, 0x45, 0x80, 0x31, 0x47, 0x10, 0x10, 0x80, 0x31, 0x46, 0x90, 0x70, 
-0x90, 0x38, 0xa4, 0x06, 0x60, 0x31, 0x57, 0xa4, 0x06, 0x70, 0x31, 0x59, 
-0x10, 0x10, 0xa4, 0x06, 0x68, 0x31, 0x58, 0x90, 0xb8, 0x90, 0x70, 0x90, 
-0x38, 0xa4, 0x07, 0x80, 0x31, 0x7b, 0xa4, 0x07, 0x90, 0x31, 0x7d, 0x10, 
-0x10, 0xa4, 0x07, 0x88, 0x31, 0x7c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 
-0xf0, 0x31, 0x69, 0xa4, 0x07, 0x00, 0x31, 0x6b, 0x10, 0x10, 0xa4, 0x06, 
-0xf8, 0x31, 0x6a, 0x10, 0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 
-0x28, 0x80, 0x30, 0xbb, 0x80, 0x30, 0xba, 0x90, 0x28, 0x80, 0x30, 0xb9, 
-0x80, 0x30, 0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xb4, 0x80, 0x30, 
-0xb7, 0x90, 0x28, 0x80, 0x30, 0xb6, 0x80, 0x30, 0xb5, 0x90, 0xa0, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x30, 0xac, 0x80, 0x30, 0xb3, 0x90, 0x28, 0x80, 
-0x30, 0xb2, 0x80, 0x30, 0xb1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xad, 
-0x80, 0x30, 0xb0, 0x90, 0x28, 0x80, 0x30, 0xaf, 0x80, 0x30, 0xae, 0xc3, 
-0xc0, 0x30, 0x42, 0x9c, 0xe8, 0x07, 0x60, 0x91, 0x90, 0x90, 0xf0, 0x10, 
-0x10, 0x80, 0x88, 0x00, 0x80, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xbc, 
-0x80, 0x33, 0xbd, 0x81, 0x33, 0xb3, 0xd0, 0x41, 0x80, 0x24, 0x1e, 0xb0, 
-0x24, 0x1e, 0xb8, 0x10, 0x10, 0x80, 0x90, 0x58, 0x80, 0x90, 0x28, 0x24, 
-0x1d, 0xb0, 0x24, 0x1d, 0xb8, 0x81, 0x24, 0x1d, 0x70, 0x92, 0x68, 0x91, 
-0x00, 0x80, 0x90, 0x90, 0x90, 0x30, 0x80, 0x24, 0x1e, 0x20, 0x90, 0x38, 
-0xa4, 0x1e, 0x18, 0x33, 0xca, 0x80, 0x33, 0xc9, 0x80, 0x90, 0x28, 0x80, 
-0x33, 0xd3, 0xa4, 0x1e, 0x00, 0x33, 0xd2, 0x80, 0x90, 0xc0, 0x90, 0x60, 
-0x90, 0x28, 0x80, 0x33, 0xcd, 0xa4, 0x1e, 0x10, 0x33, 0xcc, 0x90, 0x28, 
-0x80, 0x33, 0xc8, 0xa4, 0x1e, 0x08, 0x33, 0xc7, 0x90, 0x50, 0x90, 0x28, 
-0x80, 0x33, 0xd1, 0x80, 0x33, 0xd0, 0x90, 0x28, 0x24, 0x1e, 0xa8, 0x24, 
-0x1e, 0xa0, 0x90, 0x58, 0x80, 0x10, 0x10, 0x80, 0x10, 0x10, 0x80, 0x33, 
-0xbf, 0x80, 0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x80, 0x80, 0x10, 
-0x10, 0x80, 0x33, 0xbe, 0x91, 0x58, 0x91, 0x00, 0x90, 0x80, 0x81, 0x90, 
-0x50, 0x90, 0x28, 0x80, 0x33, 0xba, 0x80, 0x33, 0xbb, 0x81, 0x33, 0xb2, 
-0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xb8, 0x80, 0x33, 0xb9, 0x81, 
-0x33, 0xb1, 0x83, 0x90, 0x28, 0x24, 0x1d, 0xa0, 0x24, 0x1d, 0xa8, 0x90, 
-0xe8, 0x81, 0x90, 0x88, 0x90, 0x38, 0x10, 0x10, 0x80, 0x33, 0xcb, 0x90, 
-0x28, 0x80, 0x33, 0xc6, 0x80, 0x33, 0xc5, 0x80, 0x90, 0x28, 0x80, 0x33, 
-0xcf, 0x80, 0x33, 0xce, 0x82, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x78, 0x97, 
-0x10, 0x9e, 0x10, 0x06, 0x98, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 
-0x60, 0x90, 0x38, 0xa4, 0x03, 0x80, 0x30, 0x71, 0x24, 0x03, 0x78, 0x90, 
-0x38, 0xa4, 0x04, 0x10, 0x30, 0x83, 0x24, 0x04, 0x08, 0x90, 0x60, 0x90, 
-0x38, 0xa4, 0x05, 0x30, 0x30, 0xa7, 0x24, 0x05, 0x28, 0x90, 0x38, 0xa4, 
-0x04, 0xa0, 0x30, 0x95, 0x24, 0x04, 0x98, 0x90, 0xc0, 0x90, 0x60, 0x90, 
-0x38, 0xa4, 0x03, 0x70, 0x30, 0x6c, 0x24, 0x03, 0x68, 0x90, 0x38, 0xa4, 
-0x04, 0x00, 0x30, 0x7e, 0x24, 0x03, 0xf8, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x05, 0x20, 0x30, 0xa2, 0x24, 0x05, 0x18, 0x90, 0x38, 0xa4, 0x04, 0x90, 
-0x30, 0x90, 0x24, 0x04, 0x88, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 
-0x38, 0xa4, 0x03, 0x58, 0x30, 0x69, 0x24, 0x03, 0x50, 0x90, 0x38, 0xa4, 
-0x03, 0xe8, 0x30, 0x7b, 0x24, 0x03, 0xe0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x05, 0x08, 0x30, 0x9f, 0x24, 0x05, 0x00, 0x90, 0x38, 0xa4, 0x04, 0x78, 
-0x30, 0x8d, 0x24, 0x04, 0x70, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x03, 0x40, 0x30, 0x66, 0x24, 0x03, 0x38, 0x90, 0x38, 0xa4, 0x03, 0xd0, 
-0x30, 0x78, 0x24, 0x03, 0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xf0, 
-0x30, 0x9c, 0x24, 0x04, 0xe8, 0x90, 0x38, 0xa4, 0x04, 0x60, 0x30, 0x8a, 
-0x24, 0x04, 0x58, 0x10, 0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 
-0xa4, 0x02, 0xf8, 0x30, 0x5d, 0x24, 0x02, 0xf0, 0xd7, 0x42, 0x00, 0xa4, 
-0x31, 0x78, 0x36, 0x31, 0xa4, 0x31, 0x58, 0x36, 0x2d, 0x9c, 0xe0, 0x06, 
-0x90, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
-0x03, 0x28, 0x30, 0x63, 0x24, 0x03, 0x20, 0x90, 0x38, 0xa4, 0x03, 0xb8, 
-0x30, 0x75, 0x24, 0x03, 0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xd8, 
-0x30, 0x99, 0x24, 0x04, 0xd0, 0x90, 0x38, 0xa4, 0x04, 0x48, 0x30, 0x87, 
-0x24, 0x04, 0x40, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x10, 
-0x30, 0x60, 0x24, 0x03, 0x08, 0x90, 0x38, 0xa4, 0x03, 0xa0, 0x30, 0x72, 
-0x24, 0x03, 0x98, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xc0, 0x30, 0x96, 
-0x24, 0x04, 0xb8, 0x90, 0x38, 0xa4, 0x04, 0x30, 0x30, 0x84, 0x24, 0x04, 
-0x28, 0x10, 0x10, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x88, 
-0x30, 0x52, 0xa4, 0x02, 0x78, 0x30, 0x50, 0x90, 0x38, 0xa4, 0x02, 0x70, 
-0x30, 0x4b, 0xa4, 0x02, 0x60, 0x30, 0x4d, 0x90, 0x70, 0x90, 0x38, 0xa4, 
-0x02, 0x50, 0x30, 0x43, 0xa4, 0x02, 0x40, 0x30, 0x49, 0x90, 0x38, 0xa4, 
-0x02, 0x38, 0x30, 0x44, 0xa4, 0x02, 0x28, 0x30, 0x46, 0x91, 0x48, 0x80, 
-0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x56, 0x24, 0x02, 0xa8, 
-0x90, 0x28, 0x80, 0x30, 0x58, 0x24, 0x02, 0xb8, 0x90, 0x50, 0x90, 0x28, 
-0x80, 0x30, 0x5c, 0x24, 0x02, 0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, 
-0x02, 0xc8, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, 
-0x24, 0x02, 0xa0, 0xd7, 0x42, 0x00, 0xa4, 0x31, 0x80, 0x36, 0x32, 0xa4, 
-0x31, 0x60, 0x36, 0x2e, 0xa0, 0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, 
-0x88, 0x9e, 0x88, 0x09, 0xd0, 0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, 
-0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2c, 0x40, 0x85, 0x34, 0xcd, 0xcb, 0x61, 
-0x25, 0x00, 0x85, 0x34, 0xa3, 0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, 
-0x91, 0x10, 0x90, 0xa0, 0x90, 0x68, 0x90, 0x20, 0x38, 0x96, 0xc9, 0xe2, 
-0x25, 0x00, 0x85, 0x34, 0xcb, 0xa4, 0x44, 0x90, 0x38, 0x93, 0x90, 0x38, 
-0xa4, 0x44, 0x58, 0x38, 0x8c, 0xa4, 0x44, 0x48, 0x38, 0x8a, 0x90, 0x48, 
-0x10, 0x10, 0xa4, 0x44, 0x10, 0x38, 0x83, 0x10, 0x10, 0x80, 0x38, 0x7f, 
-0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xe0, 0x38, 0x7d, 0x91, 0xb0, 0x91, 
-0x60, 0x90, 0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x44, 0x80, 0x38, 0x91, 
-0xa4, 0x44, 0x70, 0x38, 0x8f, 0x90, 0x38, 0xa4, 0x44, 0x38, 0x38, 0x88, 
-0xa4, 0x44, 0x28, 0x38, 0x86, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0x00, 
-0x38, 0x81, 0x10, 0x10, 0x80, 0x38, 0x7e, 0x90, 0x28, 0x80, 0x38, 0x77, 
-0x80, 0x38, 0x76, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xd0, 0x38, 0x7b, 
-0xcb, 0x61, 0x24, 0xc0, 0x85, 0x34, 0xa2, 0x90, 0xd8, 0x88, 0x00, 0x90, 
-0x84, 0x90, 0x38, 0xc1, 0xc0, 0x85, 0x38, 0x9a, 0xc9, 0xe1, 0x2c, 0x00, 
-0x85, 0x34, 0xc9, 0xcb, 0x61, 0x24, 0x80, 0x85, 0x34, 0xa1, 0x88, 0x00, 
-0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2b, 0xc0, 0x85, 0x34, 0xc7, 0xcb, 
-0x61, 0x24, 0x40, 0x85, 0x34, 0xa0, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, 
-0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2b, 0x40, 0x85, 0x34, 0xc3, 0xcb, 
-0x61, 0x23, 0xc0, 0x85, 0x34, 0x9e, 0x88, 0x01, 0x00, 0x90, 0xa0, 0x81, 
-0x90, 0x70, 0x80, 0x90, 0x20, 0x38, 0x8d, 0xc9, 0xe1, 0x2b, 0x00, 0x85, 
-0x34, 0xc1, 0x81, 0x38, 0x84, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xc0, 
-0x38, 0x79, 0xcb, 0x61, 0x23, 0x80, 0x85, 0x34, 0x9d, 0x90, 0xb0, 0x88, 
-0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, 0xc0, 0x85, 0x34, 0xbf, 
-0xcb, 0x61, 0x23, 0x40, 0x85, 0x34, 0x9c, 0x88, 0x00, 0x68, 0x84, 0x10, 
-0x10, 0xc9, 0xe1, 0x2a, 0x80, 0x85, 0x34, 0xbd, 0xcb, 0x61, 0x23, 0x00, 
-0x85, 0x34, 0x9b, 0x92, 0x38, 0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 
-0x90, 0x40, 0x80, 0xa4, 0x45, 0x48, 0x38, 0xaa, 0x80, 0xa4, 0x45, 0x40, 
-0x38, 0xa7, 0x90, 0x28, 0x81, 0x38, 0xa6, 0x90, 0x38, 0xa4, 0x45, 0x20, 
-0x38, 0xa5, 0xa4, 0x45, 0x10, 0x38, 0xa3, 0x90, 0x28, 0x80, 0x38, 0xa1, 
-0x80, 0x38, 0xa0, 0x80, 0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x44, 0xf8, 
-0x10, 0x10, 0x90, 0x38, 0xa4, 0x44, 0xe8, 0x38, 0x9e, 0xa4, 0x44, 0xd8, 
-0x38, 0x9c, 0x90, 0x50, 0x80, 0xc9, 0xa2, 0x26, 0x00, 0x85, 0x38, 0x99, 
-0x80, 0x38, 0x97, 0x9a, 0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, 
-0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, 0x00, 0x85, 0x34, 0xb9, 
-0xcb, 0x61, 0x22, 0x80, 0x85, 0x34, 0x99, 0x88, 0x00, 0x68, 0x84, 0x10, 
-0x10, 0xc9, 0xe1, 0x29, 0xc0, 0x85, 0x34, 0xb7, 0xcb, 0x61, 0x22, 0x40, 
-0x85, 0x34, 0x98, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 
-0xe1, 0x29, 0x80, 0x85, 0x34, 0xb5, 0xcb, 0x61, 0x22, 0x00, 0x85, 0x34, 
-0x97, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x40, 0x85, 
-0x34, 0xb3, 0xcb, 0x61, 0x21, 0xc0, 0x85, 0x34, 0x96, 0x90, 0x90, 0x90, 
-0x48, 0xcb, 0xa1, 0x20, 0x00, 0x85, 0x34, 0x85, 0xcb, 0xa1, 0x1f, 0xc0, 
-0x85, 0x34, 0x84, 0x90, 0x48, 0xcb, 0xa1, 0x1f, 0x80, 0x85, 0x34, 0x83, 
-0xcb, 0xa1, 0x1f, 0x40, 0x85, 0x34, 0x82, 0xcb, 0xa2, 0x1d, 0x00, 0x80, 
-0x38, 0x75, 0x92, 0x40, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 
-0x60, 0x84, 0x24, 0x23, 0xd8, 0x8c, 0x23, 0x58, 0x84, 0x24, 0x23, 0xd0, 
-0x90, 0x48, 0x8c, 0x23, 0x50, 0x84, 0x24, 0x23, 0xc8, 0x8c, 0x23, 0x48, 
-0x84, 0x24, 0x23, 0xc0, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x38, 0x84, 
-0x24, 0x23, 0xb0, 0x8c, 0x23, 0x30, 0x84, 0x24, 0x23, 0xa8, 0x90, 0x48, 
-0x8c, 0x23, 0x28, 0x84, 0x24, 0x23, 0xa0, 0x8c, 0x23, 0x20, 0x84, 0x24, 
-0x23, 0x98, 0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x10, 0x84, 
-0x24, 0x23, 0x88, 0x8c, 0x23, 0x08, 0x84, 0x24, 0x23, 0x80, 0x90, 0x48, 
-0x8c, 0x23, 0x00, 0x84, 0x24, 0x23, 0x78, 0x8c, 0x22, 0xf8, 0x84, 0x24, 
-0x23, 0x70, 0x90, 0x38, 0xa4, 0x22, 0xe0, 0x34, 0x5d, 0xa4, 0x22, 0xd0, 
-0x34, 0x5b, 0xa0, 0x0f, 0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, 
-0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x1c, 0x00, 
-0x38, 0x6c, 0xe5, 0x22, 0x18, 0x00, 0x38, 0x6a, 0xcb, 0x61, 0x12, 0x40, 
-0x85, 0x34, 0x58, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x14, 0x00, 0x38, 
-0x4c, 0xe5, 0x22, 0x10, 0x00, 0x38, 0x4a, 0xcb, 0x61, 0x12, 0x00, 0x85, 
-0x34, 0x57, 0x90, 0x48, 0xcb, 0xa1, 0x11, 0xc0, 0x85, 0x34, 0x56, 0xcb, 
-0xa1, 0x11, 0x80, 0x85, 0x34, 0x55, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 
-0x00, 0x80, 0xe5, 0x22, 0x09, 0x00, 0x38, 0x30, 0xe5, 0x22, 0x03, 0x00, 
-0x38, 0x18, 0xcb, 0x61, 0x11, 0x00, 0x85, 0x34, 0x53, 0x98, 0x50, 0x00, 
-0x80, 0xe5, 0x21, 0xfd, 0x00, 0x38, 0x00, 0xe5, 0x21, 0xf7, 0x00, 0x37, 
-0xe8, 0xcb, 0x61, 0x10, 0xc0, 0x85, 0x34, 0x52, 0x90, 0x48, 0xcb, 0xa1, 
-0x10, 0x80, 0x85, 0x34, 0x51, 0xcb, 0xa1, 0x10, 0x40, 0x85, 0x34, 0x50, 
-0x92, 0x20, 0x91, 0x30, 0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, 
-0x8c, 0x01, 0xa0, 0x84, 0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, 
-0x84, 0x30, 0x3c, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, 
-0xc0, 0x81, 0x30, 0x24, 0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 
-0x30, 0x1c, 0xc0, 0xc0, 0x81, 0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 
-0x81, 0x30, 0x10, 0xc0, 0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, 
-0xd5, 0x03, 0x80, 0xc8, 0xe1, 0xf3, 0x00, 0x81, 0x8c, 0x01, 0xc0, 0x84, 
-0x30, 0x40, 0xc8, 0xe1, 0xf4, 0x00, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, 
-0x3d, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xf2, 0x80, 0x81, 0x30, 0x2c, 0xc8, 
-0xe1, 0xef, 0x80, 0x81, 0x30, 0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, 
-0xe1, 0xe9, 0x80, 0x81, 0x30, 0x20, 0xc8, 0xe1, 0xea, 0x80, 0x81, 0x30, 
-0x1a, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xe9, 0x00, 0x81, 0x30, 0x14, 0xc8, 
-0xe1, 0xe6, 0x00, 0x81, 0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 
-0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x16, 0x00, 0x38, 0x54, 
-0xe5, 0x22, 0x17, 0x00, 0x38, 0x66, 0xcb, 0x61, 0x0f, 0xc0, 0x85, 0x34, 
-0x4e, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x0e, 0x00, 0x38, 0x34, 0xe5, 
-0x22, 0x0f, 0x00, 0x38, 0x46, 0xcb, 0x61, 0x0f, 0x80, 0x85, 0x34, 0x4d, 
-0x90, 0x48, 0xcb, 0xa1, 0x0f, 0x40, 0x85, 0x34, 0x4c, 0xcb, 0xa1, 0x0f, 
-0x00, 0x85, 0x34, 0x4b, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 
-0xe5, 0x22, 0x07, 0x00, 0x38, 0x28, 0xe5, 0x22, 0x01, 0x00, 0x38, 0x10, 
-0xcb, 0x61, 0x0d, 0x40, 0x85, 0x34, 0x3a, 0x98, 0x50, 0x00, 0x80, 0xe5, 
-0x21, 0xfb, 0x00, 0x37, 0xf8, 0xe5, 0x21, 0xf5, 0x00, 0x37, 0xe0, 0xcb, 
-0x61, 0x0d, 0x00, 0x85, 0x34, 0x39, 0x90, 0x48, 0xcb, 0xa1, 0x0c, 0xc0, 
-0x85, 0x34, 0x38, 0xcb, 0xa1, 0x0c, 0x80, 0x85, 0x34, 0x37, 0x91, 0x00, 
-0x90, 0x80, 0x90, 0x40, 0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, 
-0x01, 0x80, 0x30, 0x07, 0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, 
-0xe5, 0x20, 0x00, 0x00, 0x30, 0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 
-0xed, 0x00, 0x37, 0xae, 0xe5, 0x21, 0xee, 0x40, 0x37, 0xc4, 0x90, 0x40, 
-0xe5, 0x21, 0xe3, 0x80, 0x37, 0x88, 0xe5, 0x21, 0xe4, 0xc0, 0x37, 0x9e, 
-0x80, 0x99, 0x28, 0x02, 0xf0, 0x8c, 0x21, 0x48, 0x90, 0x80, 0x90, 0x40, 
-0xe5, 0x22, 0x19, 0x00, 0x38, 0x62, 0xe5, 0x22, 0x17, 0x80, 0x38, 0x68, 
-0x90, 0x40, 0xe5, 0x22, 0x11, 0x00, 0x38, 0x42, 0xe5, 0x22, 0x0f, 0x80, 
-0x38, 0x48, 0x91, 0x48, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 
-0x08, 0x00, 0x38, 0x2c, 0xe5, 0x22, 0x02, 0x00, 0x38, 0x14, 0xcb, 0x61, 
-0x0b, 0x00, 0x85, 0x34, 0x30, 0x90, 0x40, 0xe5, 0x21, 0xfc, 0x00, 0x37, 
-0xfc, 0xe5, 0x21, 0xf6, 0x00, 0x37, 0xe4, 0x90, 0x48, 0xcb, 0xa1, 0x0a, 
-0x80, 0x85, 0x34, 0x2e, 0xcb, 0xa1, 0x0a, 0xc0, 0x85, 0x34, 0x2f, 0x10, 
-0x10, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xf0, 0x80, 0x37, 0xc0, 0xe5, 
-0x21, 0xef, 0x00, 0x37, 0xc8, 0x90, 0x40, 0xe5, 0x21, 0xe7, 0x00, 0x37, 
-0x9a, 0xe5, 0x21, 0xe5, 0x80, 0x37, 0xa2, 
+0x31, 0xa1, 0x80, 0x31, 0xa0, 0x10, 0x10, 0x80, 0x31, 0x9f, 0x90, 0x70, 
+0x90, 0x38, 0xa4, 0x08, 0x98, 0x31, 0xb3, 0xa4, 0x08, 0x90, 0x31, 0xb2, 
+0x10, 0x10, 0xa4, 0x08, 0x88, 0x31, 0xb1, 0x90, 0xb8, 0x90, 0x70, 0x90, 
+0x38, 0xa4, 0x09, 0xb8, 0x31, 0xd7, 0xa4, 0x09, 0xb0, 0x31, 0xd6, 0x10, 
+0x10, 0xa4, 0x09, 0xa8, 0x31, 0xd5, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 
+0x28, 0x31, 0xc5, 0xa4, 0x09, 0x20, 0x31, 0xc4, 0x10, 0x10, 0xa4, 0x09, 
+0x18, 0x31, 0xc3, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 
+0x31, 0x9c, 0x80, 0x31, 0x9e, 0x10, 0x10, 0x80, 0x31, 0x9d, 0x90, 0x70, 
+0x90, 0x38, 0xa4, 0x08, 0x70, 0x31, 0xae, 0xa4, 0x08, 0x80, 0x31, 0xb0, 
+0x10, 0x10, 0xa4, 0x08, 0x78, 0x31, 0xaf, 0x90, 0xb8, 0x90, 0x70, 0x90, 
+0x38, 0xa4, 0x09, 0x90, 0x31, 0xd2, 0xa4, 0x09, 0xa0, 0x31, 0xd4, 0x10, 
+0x10, 0xa4, 0x09, 0x98, 0x31, 0xd3, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 
+0x00, 0x31, 0xc0, 0xa4, 0x09, 0x10, 0x31, 0xc2, 0x10, 0x10, 0xa4, 0x09, 
+0x08, 0x31, 0xc1, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x31, 0x99, 0x80, 0x31, 0x9b, 0x10, 0x10, 0x80, 0x31, 0x9a, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x58, 0x31, 0xab, 0xa4, 0x08, 0x68, 
+0x31, 0xad, 0x10, 0x10, 0xa4, 0x08, 0x60, 0x31, 0xac, 0x90, 0xb8, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x09, 0x78, 0x31, 0xcf, 0xa4, 0x09, 0x88, 0x31, 
+0xd1, 0x10, 0x10, 0xa4, 0x09, 0x80, 0x31, 0xd0, 0x90, 0x70, 0x90, 0x38, 
+0xa4, 0x08, 0xe8, 0x31, 0xbd, 0xa4, 0x08, 0xf8, 0x31, 0xbf, 0x10, 0x10, 
+0xa4, 0x08, 0xf0, 0x31, 0xbe, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x31, 0x96, 0x80, 0x31, 0x98, 0x10, 0x10, 0x80, 0x31, 0x97, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x40, 0x31, 0xa8, 0xa4, 0x08, 0x50, 
+0x31, 0xaa, 0x10, 0x10, 0xa4, 0x08, 0x48, 0x31, 0xa9, 0x90, 0xb8, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x09, 0x60, 0x31, 0xcc, 0xa4, 0x09, 0x70, 0x31, 
+0xce, 0x10, 0x10, 0xa4, 0x09, 0x68, 0x31, 0xcd, 0x90, 0x70, 0x90, 0x38, 
+0xa4, 0x08, 0xd0, 0x31, 0xba, 0xa4, 0x08, 0xe0, 0x31, 0xbc, 0x10, 0x10, 
+0xa4, 0x08, 0xd8, 0x31, 0xbb, 0x10, 0x10, 0x90, 0xa8, 0x10, 0x10, 0x10, 
+0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x8d, 0x80, 0x31, 0x8f, 0x10, 
+0x10, 0x80, 0x31, 0x8e, 0x90, 0x60, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0xc0, 
+0x60, 0xa0, 0x2a, 0x80, 0x90, 0x30, 0x60, 0xa0, 0x2a, 0x40, 0x60, 0xa0, 
+0x2a, 0x00, 0x97, 0xf0, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x93, 0x80, 0x31, 0x95, 0x10, 0x10, 
+0x80, 0x31, 0x94, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x28, 0x31, 0xa5, 
+0xa4, 0x08, 0x38, 0x31, 0xa7, 0x10, 0x10, 0xa4, 0x08, 0x30, 0x31, 0xa6, 
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x48, 0x31, 0xc9, 0xa4, 
+0x09, 0x58, 0x31, 0xcb, 0x10, 0x10, 0xa4, 0x09, 0x50, 0x31, 0xca, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x08, 0xb8, 0x31, 0xb7, 0xa4, 0x08, 0xc8, 0x31, 
+0xb9, 0x10, 0x10, 0xa4, 0x08, 0xc0, 0x31, 0xb8, 0x91, 0x40, 0x90, 0x88, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x90, 0x80, 0x31, 0x92, 0x10, 0x10, 
+0x80, 0x31, 0x91, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x10, 0x31, 0xa2, 
+0xa4, 0x08, 0x20, 0x31, 0xa4, 0x10, 0x10, 0xa4, 0x08, 0x18, 0x31, 0xa3, 
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x09, 0x30, 0x31, 0xc6, 0xa4, 
+0x09, 0x40, 0x31, 0xc8, 0x10, 0x10, 0xa4, 0x09, 0x38, 0x31, 0xc7, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x08, 0xa0, 0x31, 0xb4, 0xa4, 0x08, 0xb0, 0x31, 
+0xb6, 0x10, 0x10, 0xa4, 0x08, 0xa8, 0x31, 0xb5, 0x10, 0x10, 0x91, 0x40, 
+0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xcb, 0x80, 0x30, 0xca, 
+0x90, 0x28, 0x80, 0x30, 0xc9, 0x80, 0x30, 0xc8, 0x90, 0x50, 0x90, 0x28, 
+0x80, 0x30, 0xc4, 0x80, 0x30, 0xc7, 0x90, 0x28, 0x80, 0x30, 0xc6, 0x80, 
+0x30, 0xc5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbc, 0x80, 
+0x30, 0xc3, 0x90, 0x28, 0x80, 0x30, 0xc2, 0x80, 0x30, 0xc1, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x30, 0xbd, 0x80, 0x30, 0xc0, 0x90, 0x28, 0x80, 0x30, 
+0xbf, 0x80, 0x30, 0xbe, 0x91, 0x88, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 
+0x28, 0x81, 0x31, 0x3b, 0x10, 0x10, 0x80, 0x31, 0x3a, 0x90, 0x28, 0x81, 
+0x31, 0x3d, 0x10, 0x10, 0x80, 0x31, 0x3c, 0x90, 0x60, 0x90, 0x28, 0x81, 
+0x31, 0x41, 0x10, 0x10, 0x80, 0x31, 0x40, 0x90, 0x28, 0x81, 0x31, 0x3f, 
+0x10, 0x10, 0x80, 0x31, 0x3e, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x28, 
+0x81, 0x31, 0x38, 0x10, 0x10, 0x80, 0x31, 0x39, 0xa0, 0x0b, 0x90, 0xa0, 
+0x0a, 0xc8, 0x95, 0x60, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x31, 0x56, 0x80, 0x31, 0x55, 0x10, 0x10, 0x80, 0x31, 
+0x54, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xe8, 0x31, 0x68, 0xa4, 0x06, 
+0xe0, 0x31, 0x67, 0x10, 0x10, 0xa4, 0x06, 0xd8, 0x31, 0x66, 0x90, 0xb8, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x08, 0x08, 0x31, 0x8c, 0xa4, 0x08, 0x00, 
+0x31, 0x8b, 0x10, 0x10, 0xa4, 0x07, 0xf8, 0x31, 0x8a, 0x90, 0x70, 0x90, 
+0x38, 0xa4, 0x07, 0x78, 0x31, 0x7a, 0xa4, 0x07, 0x70, 0x31, 0x79, 0x10, 
+0x10, 0xa4, 0x07, 0x68, 0x31, 0x78, 0x91, 0x40, 0x90, 0x88, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x31, 0x51, 0x80, 0x31, 0x53, 0x10, 0x10, 0x80, 0x31, 
+0x52, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xc0, 0x31, 0x63, 0xa4, 0x06, 
+0xd0, 0x31, 0x65, 0x10, 0x10, 0xa4, 0x06, 0xc8, 0x31, 0x64, 0x90, 0xb8, 
+0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xe0, 0x31, 0x87, 0xa4, 0x07, 0xf0, 
+0x31, 0x89, 0x10, 0x10, 0xa4, 0x07, 0xe8, 0x31, 0x88, 0x90, 0x70, 0x90, 
+0x38, 0xa4, 0x07, 0x50, 0x31, 0x75, 0xa4, 0x07, 0x60, 0x31, 0x77, 0x10, 
+0x10, 0xa4, 0x07, 0x58, 0x31, 0x76, 0x92, 0xb0, 0x91, 0x40, 0x90, 0x88, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4e, 0x80, 0x31, 0x50, 0x10, 0x10, 
+0x80, 0x31, 0x4f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xa8, 0x31, 0x60, 
+0xa4, 0x06, 0xb8, 0x31, 0x62, 0x10, 0x10, 0xa4, 0x06, 0xb0, 0x31, 0x61, 
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xc8, 0x31, 0x84, 0xa4, 
+0x07, 0xd8, 0x31, 0x86, 0x10, 0x10, 0xa4, 0x07, 0xd0, 0x31, 0x85, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x07, 0x38, 0x31, 0x72, 0xa4, 0x07, 0x48, 0x31, 
+0x74, 0x10, 0x10, 0xa4, 0x07, 0x40, 0x31, 0x73, 0x91, 0x40, 0x90, 0x88, 
+0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x4b, 0x80, 0x31, 0x4d, 0x10, 0x10, 
+0x80, 0x31, 0x4c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0x90, 0x31, 0x5d, 
+0xa4, 0x06, 0xa0, 0x31, 0x5f, 0x10, 0x10, 0xa4, 0x06, 0x98, 0x31, 0x5e, 
+0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0xb0, 0x31, 0x81, 0xa4, 
+0x07, 0xc0, 0x31, 0x83, 0x10, 0x10, 0xa4, 0x07, 0xb8, 0x31, 0x82, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x07, 0x20, 0x31, 0x6f, 0xa4, 0x07, 0x30, 0x31, 
+0x71, 0x10, 0x10, 0xa4, 0x07, 0x28, 0x31, 0x70, 0x10, 0x10, 0x80, 0x10, 
+0x10, 0x10, 0x10, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x42, 0x80, 0x31, 
+0x44, 0x10, 0x10, 0x80, 0x31, 0x43, 0x80, 0x95, 0x60, 0x92, 0xb0, 0x91, 
+0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x48, 0x80, 0x31, 
+0x4a, 0x10, 0x10, 0x80, 0x31, 0x49, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 
+0x78, 0x31, 0x5a, 0xa4, 0x06, 0x88, 0x31, 0x5c, 0x10, 0x10, 0xa4, 0x06, 
+0x80, 0x31, 0x5b, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x98, 
+0x31, 0x7e, 0xa4, 0x07, 0xa8, 0x31, 0x80, 0x10, 0x10, 0xa4, 0x07, 0xa0, 
+0x31, 0x7f, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x08, 0x31, 0x6c, 0xa4, 
+0x07, 0x18, 0x31, 0x6e, 0x10, 0x10, 0xa4, 0x07, 0x10, 0x31, 0x6d, 0x91, 
+0x40, 0x90, 0x88, 0x90, 0x50, 0x90, 0x28, 0x80, 0x31, 0x45, 0x80, 0x31, 
+0x47, 0x10, 0x10, 0x80, 0x31, 0x46, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 
+0x60, 0x31, 0x57, 0xa4, 0x06, 0x70, 0x31, 0x59, 0x10, 0x10, 0xa4, 0x06, 
+0x68, 0x31, 0x58, 0x90, 0xb8, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x07, 0x80, 
+0x31, 0x7b, 0xa4, 0x07, 0x90, 0x31, 0x7d, 0x10, 0x10, 0xa4, 0x07, 0x88, 
+0x31, 0x7c, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x06, 0xf0, 0x31, 0x69, 0xa4, 
+0x07, 0x00, 0x31, 0x6b, 0x10, 0x10, 0xa4, 0x06, 0xf8, 0x31, 0x6a, 0x10, 
+0x10, 0x91, 0x40, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xbb, 
+0x80, 0x30, 0xba, 0x90, 0x28, 0x80, 0x30, 0xb9, 0x80, 0x30, 0xb8, 0x90, 
+0x50, 0x90, 0x28, 0x80, 0x30, 0xb4, 0x80, 0x30, 0xb7, 0x90, 0x28, 0x80, 
+0x30, 0xb6, 0x80, 0x30, 0xb5, 0x90, 0xa0, 0x90, 0x50, 0x90, 0x28, 0x80, 
+0x30, 0xac, 0x80, 0x30, 0xb3, 0x90, 0x28, 0x80, 0x30, 0xb2, 0x80, 0x30, 
+0xb1, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0xad, 0x80, 0x30, 0xb0, 0x90, 
+0x28, 0x80, 0x30, 0xaf, 0x80, 0x30, 0xae, 0xc3, 0xc0, 0x30, 0x42, 0x9c, 
+0xe8, 0x07, 0x60, 0x91, 0x90, 0x90, 0xf0, 0x10, 0x10, 0x80, 0x88, 0x00, 
+0x80, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xbc, 0x80, 0x33, 0xbd, 0x81, 
+0x33, 0xb3, 0xd0, 0x41, 0x80, 0x24, 0x1e, 0xb0, 0x24, 0x1e, 0xb8, 0x10, 
+0x10, 0x80, 0x90, 0x58, 0x80, 0x90, 0x28, 0x24, 0x1d, 0xb0, 0x24, 0x1d, 
+0xb8, 0x81, 0x24, 0x1d, 0x70, 0x92, 0x68, 0x91, 0x00, 0x80, 0x90, 0x90, 
+0x90, 0x30, 0x80, 0x24, 0x1e, 0x20, 0x90, 0x38, 0xa4, 0x1e, 0x18, 0x33, 
+0xca, 0x80, 0x33, 0xc9, 0x80, 0x90, 0x28, 0x80, 0x33, 0xd3, 0xa4, 0x1e, 
+0x00, 0x33, 0xd2, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x28, 0x80, 0x33, 
+0xcd, 0xa4, 0x1e, 0x10, 0x33, 0xcc, 0x90, 0x28, 0x80, 0x33, 0xc8, 0xa4, 
+0x1e, 0x08, 0x33, 0xc7, 0x90, 0x50, 0x90, 0x28, 0x80, 0x33, 0xd1, 0x80, 
+0x33, 0xd0, 0x90, 0x28, 0x24, 0x1e, 0xa8, 0x24, 0x1e, 0xa0, 0x90, 0x58, 
+0x80, 0x10, 0x10, 0x80, 0x10, 0x10, 0x80, 0x33, 0xbf, 0x80, 0x90, 0x40, 
+0x10, 0x10, 0x80, 0x24, 0x1d, 0x80, 0x80, 0x10, 0x10, 0x80, 0x33, 0xbe, 
+0x91, 0x58, 0x91, 0x00, 0x90, 0x80, 0x81, 0x90, 0x50, 0x90, 0x28, 0x80, 
+0x33, 0xba, 0x80, 0x33, 0xbb, 0x81, 0x33, 0xb2, 0x81, 0x90, 0x50, 0x90, 
+0x28, 0x80, 0x33, 0xb8, 0x80, 0x33, 0xb9, 0x81, 0x33, 0xb1, 0x83, 0x90, 
+0x28, 0x24, 0x1d, 0xa0, 0x24, 0x1d, 0xa8, 0x90, 0xe8, 0x81, 0x90, 0x88, 
+0x90, 0x38, 0x10, 0x10, 0x80, 0x33, 0xcb, 0x90, 0x28, 0x80, 0x33, 0xc6, 
+0x80, 0x33, 0xc5, 0x80, 0x90, 0x28, 0x80, 0x33, 0xcf, 0x80, 0x33, 0xce, 
+0x82, 0x10, 0x10, 0x80, 0x24, 0x1d, 0x78, 0x97, 0x10, 0x9e, 0x10, 0x06, 
+0x98, 0x93, 0x00, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 
+0x03, 0x80, 0x30, 0x71, 0x24, 0x03, 0x78, 0x90, 0x38, 0xa4, 0x04, 0x10, 
+0x30, 0x83, 0x24, 0x04, 0x08, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x30, 
+0x30, 0xa7, 0x24, 0x05, 0x28, 0x90, 0x38, 0xa4, 0x04, 0xa0, 0x30, 0x95, 
+0x24, 0x04, 0x98, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x70, 
+0x30, 0x6c, 0x24, 0x03, 0x68, 0x90, 0x38, 0xa4, 0x04, 0x00, 0x30, 0x7e, 
+0x24, 0x03, 0xf8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x20, 0x30, 0xa2, 
+0x24, 0x05, 0x18, 0x90, 0x38, 0xa4, 0x04, 0x90, 0x30, 0x90, 0x24, 0x04, 
+0x88, 0x91, 0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x58, 
+0x30, 0x69, 0x24, 0x03, 0x50, 0x90, 0x38, 0xa4, 0x03, 0xe8, 0x30, 0x7b, 
+0x24, 0x03, 0xe0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x05, 0x08, 0x30, 0x9f, 
+0x24, 0x05, 0x00, 0x90, 0x38, 0xa4, 0x04, 0x78, 0x30, 0x8d, 0x24, 0x04, 
+0x70, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x40, 0x30, 0x66, 
+0x24, 0x03, 0x38, 0x90, 0x38, 0xa4, 0x03, 0xd0, 0x30, 0x78, 0x24, 0x03, 
+0xc8, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xf0, 0x30, 0x9c, 0x24, 0x04, 
+0xe8, 0x90, 0x38, 0xa4, 0x04, 0x60, 0x30, 0x8a, 0x24, 0x04, 0x58, 0x10, 
+0x10, 0x80, 0x10, 0x10, 0x10, 0x10, 0x90, 0x38, 0xa4, 0x02, 0xf8, 0x30, 
+0x5d, 0x24, 0x02, 0xf0, 0xd7, 0x42, 0x00, 0xa4, 0x31, 0x78, 0x36, 0x31, 
+0xa4, 0x31, 0x58, 0x36, 0x2d, 0x9c, 0xe0, 0x06, 0x90, 0x93, 0x00, 0x91, 
+0x80, 0x90, 0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x28, 0x30, 0x63, 
+0x24, 0x03, 0x20, 0x90, 0x38, 0xa4, 0x03, 0xb8, 0x30, 0x75, 0x24, 0x03, 
+0xb0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x04, 0xd8, 0x30, 0x99, 0x24, 0x04, 
+0xd0, 0x90, 0x38, 0xa4, 0x04, 0x48, 0x30, 0x87, 0x24, 0x04, 0x40, 0x90, 
+0xc0, 0x90, 0x60, 0x90, 0x38, 0xa4, 0x03, 0x10, 0x30, 0x60, 0x24, 0x03, 
+0x08, 0x90, 0x38, 0xa4, 0x03, 0xa0, 0x30, 0x72, 0x24, 0x03, 0x98, 0x90, 
+0x60, 0x90, 0x38, 0xa4, 0x04, 0xc0, 0x30, 0x96, 0x24, 0x04, 0xb8, 0x90, 
+0x38, 0xa4, 0x04, 0x30, 0x30, 0x84, 0x24, 0x04, 0x28, 0x10, 0x10, 0x90, 
+0xe0, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x88, 0x30, 0x52, 0xa4, 0x02, 
+0x78, 0x30, 0x50, 0x90, 0x38, 0xa4, 0x02, 0x70, 0x30, 0x4b, 0xa4, 0x02, 
+0x60, 0x30, 0x4d, 0x90, 0x70, 0x90, 0x38, 0xa4, 0x02, 0x50, 0x30, 0x43, 
+0xa4, 0x02, 0x40, 0x30, 0x49, 0x90, 0x38, 0xa4, 0x02, 0x38, 0x30, 0x44, 
+0xa4, 0x02, 0x28, 0x30, 0x46, 0x91, 0x48, 0x80, 0x90, 0xa0, 0x90, 0x50, 
+0x90, 0x28, 0x80, 0x30, 0x56, 0x24, 0x02, 0xa8, 0x90, 0x28, 0x80, 0x30, 
+0x58, 0x24, 0x02, 0xb8, 0x90, 0x50, 0x90, 0x28, 0x80, 0x30, 0x5c, 0x24, 
+0x02, 0xd8, 0x90, 0x28, 0x80, 0x30, 0x5a, 0x24, 0x02, 0xc8, 0x80, 0x10, 
+0x10, 0x10, 0x10, 0x90, 0x28, 0x80, 0x30, 0x53, 0x24, 0x02, 0xa0, 0xd7, 
+0x42, 0x00, 0xa4, 0x31, 0x80, 0x36, 0x32, 0xa4, 0x31, 0x60, 0x36, 0x2e, 
+0xa0, 0x14, 0x90, 0xa0, 0x10, 0xb8, 0xa0, 0x0c, 0x88, 0x9e, 0x88, 0x09, 
+0xd0, 0x94, 0xf0, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 
+0xe1, 0x2c, 0x40, 0x85, 0x34, 0xcd, 0xcb, 0x61, 0x25, 0x00, 0x85, 0x34, 
+0xa3, 0x9a, 0x00, 0x03, 0xf8, 0x91, 0x98, 0x80, 0x91, 0x10, 0x90, 0xa0, 
+0x90, 0x68, 0x90, 0x20, 0x38, 0x96, 0xc9, 0xe2, 0x25, 0x00, 0x85, 0x34, 
+0xcb, 0xa4, 0x44, 0x90, 0x38, 0x93, 0x90, 0x38, 0xa4, 0x44, 0x58, 0x38, 
+0x8c, 0xa4, 0x44, 0x48, 0x38, 0x8a, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 
+0x10, 0x38, 0x83, 0x10, 0x10, 0x80, 0x38, 0x7f, 0x81, 0x10, 0x10, 0x80, 
+0xa4, 0x43, 0xe0, 0x38, 0x7d, 0x91, 0xb0, 0x91, 0x60, 0x90, 0xe0, 0x90, 
+0x70, 0x90, 0x38, 0xa4, 0x44, 0x80, 0x38, 0x91, 0xa4, 0x44, 0x70, 0x38, 
+0x8f, 0x90, 0x38, 0xa4, 0x44, 0x38, 0x38, 0x88, 0xa4, 0x44, 0x28, 0x38, 
+0x86, 0x90, 0x48, 0x10, 0x10, 0xa4, 0x44, 0x00, 0x38, 0x81, 0x10, 0x10, 
+0x80, 0x38, 0x7e, 0x90, 0x28, 0x80, 0x38, 0x77, 0x80, 0x38, 0x76, 0x81, 
+0x10, 0x10, 0x80, 0xa4, 0x43, 0xd0, 0x38, 0x7b, 0xcb, 0x61, 0x24, 0xc0, 
+0x85, 0x34, 0xa2, 0x90, 0xd8, 0x88, 0x00, 0x90, 0x84, 0x90, 0x38, 0xc1, 
+0xc0, 0x85, 0x38, 0x9a, 0xc9, 0xe1, 0x2c, 0x00, 0x85, 0x34, 0xc9, 0xcb, 
+0x61, 0x24, 0x80, 0x85, 0x34, 0xa1, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 
+0xc9, 0xe1, 0x2b, 0xc0, 0x85, 0x34, 0xc7, 0xcb, 0x61, 0x24, 0x40, 0x85, 
+0x34, 0xa0, 0x91, 0xf8, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 
+0xc9, 0xe1, 0x2b, 0x40, 0x85, 0x34, 0xc3, 0xcb, 0x61, 0x23, 0xc0, 0x85, 
+0x34, 0x9e, 0x88, 0x01, 0x00, 0x90, 0xa0, 0x81, 0x90, 0x70, 0x80, 0x90, 
+0x20, 0x38, 0x8d, 0xc9, 0xe1, 0x2b, 0x00, 0x85, 0x34, 0xc1, 0x81, 0x38, 
+0x84, 0x81, 0x10, 0x10, 0x80, 0xa4, 0x43, 0xc0, 0x38, 0x79, 0xcb, 0x61, 
+0x23, 0x80, 0x85, 0x34, 0x9d, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 
+0x10, 0xc9, 0xe1, 0x2a, 0xc0, 0x85, 0x34, 0xbf, 0xcb, 0x61, 0x23, 0x40, 
+0x85, 0x34, 0x9c, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x2a, 
+0x80, 0x85, 0x34, 0xbd, 0xcb, 0x61, 0x23, 0x00, 0x85, 0x34, 0x9b, 0x92, 
+0x38, 0x81, 0x91, 0x68, 0x91, 0x18, 0x90, 0x80, 0x90, 0x40, 0x80, 0xa4, 
+0x45, 0x48, 0x38, 0xaa, 0x80, 0xa4, 0x45, 0x40, 0x38, 0xa7, 0x90, 0x28, 
+0x81, 0x38, 0xa6, 0x90, 0x38, 0xa4, 0x45, 0x20, 0x38, 0xa5, 0xa4, 0x45, 
+0x10, 0x38, 0xa3, 0x90, 0x28, 0x80, 0x38, 0xa1, 0x80, 0x38, 0xa0, 0x80, 
+0x90, 0x40, 0x10, 0x10, 0x80, 0x24, 0x44, 0xf8, 0x10, 0x10, 0x90, 0x38, 
+0xa4, 0x44, 0xe8, 0x38, 0x9e, 0xa4, 0x44, 0xd8, 0x38, 0x9c, 0x90, 0x50, 
+0x80, 0xc9, 0xa2, 0x26, 0x00, 0x85, 0x38, 0x99, 0x80, 0x38, 0x97, 0x9a, 
+0xd0, 0x03, 0xe0, 0x91, 0x60, 0x90, 0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 
+0x10, 0xc9, 0xe1, 0x2a, 0x00, 0x85, 0x34, 0xb9, 0xcb, 0x61, 0x22, 0x80, 
+0x85, 0x34, 0x99, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 
+0xc0, 0x85, 0x34, 0xb7, 0xcb, 0x61, 0x22, 0x40, 0x85, 0x34, 0x98, 0x90, 
+0xb0, 0x88, 0x00, 0x68, 0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x80, 0x85, 
+0x34, 0xb5, 0xcb, 0x61, 0x22, 0x00, 0x85, 0x34, 0x97, 0x88, 0x00, 0x68, 
+0x84, 0x10, 0x10, 0xc9, 0xe1, 0x29, 0x40, 0x85, 0x34, 0xb3, 0xcb, 0x61, 
+0x21, 0xc0, 0x85, 0x34, 0x96, 0x90, 0x90, 0x90, 0x48, 0xcb, 0xa1, 0x20, 
+0x00, 0x85, 0x34, 0x85, 0xcb, 0xa1, 0x1f, 0xc0, 0x85, 0x34, 0x84, 0x90, 
+0x48, 0xcb, 0xa1, 0x1f, 0x80, 0x85, 0x34, 0x83, 0xcb, 0xa1, 0x1f, 0x40, 
+0x85, 0x34, 0x82, 0xcb, 0xa2, 0x1d, 0x00, 0x80, 0x38, 0x75, 0x92, 0x40, 
+0x91, 0x20, 0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x60, 0x84, 0x24, 0x23, 
+0xd8, 0x8c, 0x23, 0x58, 0x84, 0x24, 0x23, 0xd0, 0x90, 0x48, 0x8c, 0x23, 
+0x50, 0x84, 0x24, 0x23, 0xc8, 0x8c, 0x23, 0x48, 0x84, 0x24, 0x23, 0xc0, 
+0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x38, 0x84, 0x24, 0x23, 0xb0, 0x8c, 
+0x23, 0x30, 0x84, 0x24, 0x23, 0xa8, 0x90, 0x48, 0x8c, 0x23, 0x28, 0x84, 
+0x24, 0x23, 0xa0, 0x8c, 0x23, 0x20, 0x84, 0x24, 0x23, 0x98, 0x91, 0x20, 
+0x90, 0x90, 0x90, 0x48, 0x8c, 0x23, 0x10, 0x84, 0x24, 0x23, 0x88, 0x8c, 
+0x23, 0x08, 0x84, 0x24, 0x23, 0x80, 0x90, 0x48, 0x8c, 0x23, 0x00, 0x84, 
+0x24, 0x23, 0x78, 0x8c, 0x22, 0xf8, 0x84, 0x24, 0x23, 0x70, 0x90, 0x38, 
+0xa4, 0x22, 0xe0, 0x34, 0x5d, 0xa4, 0x22, 0xd0, 0x34, 0x5b, 0xa0, 0x0f, 
+0x50, 0xa0, 0x09, 0x08, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 
+0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x1c, 0x00, 0x38, 0x6c, 0xe5, 0x22, 
+0x18, 0x00, 0x38, 0x6a, 0xcb, 0x61, 0x12, 0x40, 0x85, 0x34, 0x58, 0x98, 
+0x50, 0x00, 0x80, 0xe5, 0x22, 0x14, 0x00, 0x38, 0x4c, 0xe5, 0x22, 0x10, 
+0x00, 0x38, 0x4a, 0xcb, 0x61, 0x12, 0x00, 0x85, 0x34, 0x57, 0x90, 0x48, 
+0xcb, 0xa1, 0x11, 0xc0, 0x85, 0x34, 0x56, 0xcb, 0xa1, 0x11, 0x80, 0x85, 
+0x34, 0x55, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 
+0x09, 0x00, 0x38, 0x30, 0xe5, 0x22, 0x03, 0x00, 0x38, 0x18, 0xcb, 0x61, 
+0x11, 0x00, 0x85, 0x34, 0x53, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x21, 0xfd, 
+0x00, 0x38, 0x00, 0xe5, 0x21, 0xf7, 0x00, 0x37, 0xe8, 0xcb, 0x61, 0x10, 
+0xc0, 0x85, 0x34, 0x52, 0x90, 0x48, 0xcb, 0xa1, 0x10, 0x80, 0x85, 0x34, 
+0x51, 0xcb, 0xa1, 0x10, 0x40, 0x85, 0x34, 0x50, 0x92, 0x20, 0x91, 0x30, 
+0x90, 0xb8, 0xd5, 0x03, 0x00, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0xa0, 0x84, 
+0x30, 0x3e, 0xc0, 0xc0, 0x81, 0x8c, 0x01, 0x80, 0x84, 0x30, 0x3c, 0xd5, 
+0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x28, 0xc0, 0xc0, 0x81, 0x30, 0x24, 
+0x90, 0x78, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x1c, 0xc0, 0xc0, 
+0x81, 0x30, 0x18, 0xd5, 0x02, 0x00, 0xc0, 0xc0, 0x81, 0x30, 0x10, 0xc0, 
+0xc0, 0x81, 0x30, 0x0c, 0x91, 0x70, 0x90, 0xd8, 0xd5, 0x03, 0x80, 0xc8, 
+0xe1, 0xf3, 0x00, 0x81, 0x8c, 0x01, 0xc0, 0x84, 0x30, 0x40, 0xc8, 0xe1, 
+0xf4, 0x00, 0x81, 0x8c, 0x01, 0x90, 0x84, 0x30, 0x3d, 0xd5, 0x02, 0x80, 
+0xc8, 0xe1, 0xf2, 0x80, 0x81, 0x30, 0x2c, 0xc8, 0xe1, 0xef, 0x80, 0x81, 
+0x30, 0x26, 0x90, 0x98, 0xd5, 0x02, 0x80, 0xc8, 0xe1, 0xe9, 0x80, 0x81, 
+0x30, 0x20, 0xc8, 0xe1, 0xea, 0x80, 0x81, 0x30, 0x1a, 0xd5, 0x02, 0x80, 
+0xc8, 0xe1, 0xe9, 0x00, 0x81, 0x30, 0x14, 0xc8, 0xe1, 0xe6, 0x00, 0x81, 
+0x30, 0x0e, 0x9a, 0x30, 0x04, 0x40, 0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 
+0x00, 0x80, 0xe5, 0x22, 0x16, 0x00, 0x38, 0x54, 0xe5, 0x22, 0x17, 0x00, 
+0x38, 0x66, 0xcb, 0x61, 0x0f, 0xc0, 0x85, 0x34, 0x4e, 0x98, 0x50, 0x00, 
+0x80, 0xe5, 0x22, 0x0e, 0x00, 0x38, 0x34, 0xe5, 0x22, 0x0f, 0x00, 0x38, 
+0x46, 0xcb, 0x61, 0x0f, 0x80, 0x85, 0x34, 0x4d, 0x90, 0x48, 0xcb, 0xa1, 
+0x0f, 0x40, 0x85, 0x34, 0x4c, 0xcb, 0xa1, 0x0f, 0x00, 0x85, 0x34, 0x4b, 
+0x91, 0x90, 0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x07, 0x00, 
+0x38, 0x28, 0xe5, 0x22, 0x01, 0x00, 0x38, 0x10, 0xcb, 0x61, 0x0d, 0x40, 
+0x85, 0x34, 0x3a, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x21, 0xfb, 0x00, 0x37, 
+0xf8, 0xe5, 0x21, 0xf5, 0x00, 0x37, 0xe0, 0xcb, 0x61, 0x0d, 0x00, 0x85, 
+0x34, 0x39, 0x90, 0x48, 0xcb, 0xa1, 0x0c, 0xc0, 0x85, 0x34, 0x38, 0xcb, 
+0xa1, 0x0c, 0x80, 0x85, 0x34, 0x37, 0x91, 0x00, 0x90, 0x80, 0x90, 0x40, 
+0xe5, 0x20, 0x02, 0x40, 0x30, 0x0a, 0xe5, 0x20, 0x01, 0x80, 0x30, 0x07, 
+0x90, 0x40, 0xe5, 0x20, 0x00, 0xc0, 0x30, 0x04, 0xe5, 0x20, 0x00, 0x00, 
+0x30, 0x01, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x21, 0xed, 0x00, 0x37, 0xae, 
+0xe5, 0x21, 0xee, 0x40, 0x37, 0xc4, 0x90, 0x40, 0xe5, 0x21, 0xe3, 0x80, 
+0x37, 0x88, 0xe5, 0x21, 0xe4, 0xc0, 0x37, 0x9e, 0x80, 0x99, 0x28, 0x02, 
+0xf0, 0x8c, 0x21, 0x48, 0x90, 0x80, 0x90, 0x40, 0xe5, 0x22, 0x19, 0x00, 
+0x38, 0x62, 0xe5, 0x22, 0x17, 0x80, 0x38, 0x68, 0x90, 0x40, 0xe5, 0x22, 
+0x11, 0x00, 0x38, 0x42, 0xe5, 0x22, 0x0f, 0x80, 0x38, 0x48, 0x91, 0x48, 
+0x90, 0xc8, 0x98, 0x50, 0x00, 0x80, 0xe5, 0x22, 0x08, 0x00, 0x38, 0x2c, 
+0xe5, 0x22, 0x02, 0x00, 0x38, 0x14, 0xcb, 0x61, 0x0b, 0x00, 0x85, 0x34, 
+0x30, 0x90, 0x40, 0xe5, 0x21, 0xfc, 0x00, 0x37, 0xfc, 0xe5, 0x21, 0xf6, 
+0x00, 0x37, 0xe4, 0x90, 0x48, 0xcb, 0xa1, 0x0a, 0x80, 0x85, 0x34, 0x2e, 
+0xcb, 0xa1, 0x0a, 0xc0, 0x85, 0x34, 0x2f, 0x10, 0x10, 0x90, 0x80, 0x90, 
+0x40, 0xe5, 0x21, 0xf0, 0x80, 0x37, 0xc0, 0xe5, 0x21, 0xef, 0x00, 0x37, 
+0xc8, 0x90, 0x40, 0xe5, 0x21, 0xe7, 0x00, 0x37, 0x9a, 0xe5, 0x21, 0xe5, 
+0x80, 0x37, 0xa2, 
 };
 
 static const struct ia64_dis_names ia64_dis_names[] = {
diff --git a/opcodes/ia64-opc-b.c b/opcodes/ia64-opc-b.c
index 9772b37..9a4a850 100644
--- a/opcodes/ia64-opc-b.c
+++ b/opcodes/ia64-opc-b.c
@@ -32,6 +32,7 @@
 #define bPr(x)		(((ia64_insn) ((x) & 0x3f)) << 0)
 #define bWha(x)		(((ia64_insn) ((x) & 0x3)) << 33)
 #define bWhb(x)		(((ia64_insn) ((x) & 0x3)) << 3)
+#define bWhc(x)		(((ia64_insn) ((x) & 0x7)) << 32)
 #define bX6(x)		(((ia64_insn) ((x) & 0x3f)) << 27)
 
 #define mBtype		bBtype (-1)
@@ -41,11 +42,14 @@
 #define mPr		bPr (-1)
 #define mWha		bWha (-1)
 #define mWhb		bWhb (-1)
+#define mWhc		bWhc (-1)
 #define mX6		bX6 (-1)
 
 #define OpX6(a,b) 	(bOp (a) | bX6 (b)), (mOp | mX6)
 #define OpPaWhaD(a,b,c,d) \
 	(bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD)
+#define OpPaWhcD(a,b,c,d) \
+	(bOp (a) | bPa (b) | bWhc (c) | bD (d)), (mOp | mPa | mWhc | mD)
 #define OpBtypePaWhaD(a,b,c,d,e) \
 	(bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \
 	(mOp | mBtype | mPa | mWha | mD)
@@ -188,30 +192,30 @@
 
     {"break.b",		B0, OpX6 (0, 0x00), {IMMU21}},
 
-    {"br.call.sptk.few",	B, OpPaWhaD (1, 0, 0, 0), {B1, B2}},
-    {"br.call.sptk",		B, OpPaWhaD (1, 0, 0, 0), {B1, B2}, PSEUDO},
-    {"br.call.sptk.few.clr",	B, OpPaWhaD (1, 0, 0, 1), {B1, B2}},
-    {"br.call.sptk.clr",	B, OpPaWhaD (1, 0, 0, 1), {B1, B2}, PSEUDO},
-    {"br.call.spnt.few",	B, OpPaWhaD (1, 0, 1, 0), {B1, B2}},
-    {"br.call.spnt",		B, OpPaWhaD (1, 0, 1, 0), {B1, B2}, PSEUDO},
-    {"br.call.spnt.few.clr",	B, OpPaWhaD (1, 0, 1, 1), {B1, B2}},
-    {"br.call.spnt.clr",	B, OpPaWhaD (1, 0, 1, 1), {B1, B2}, PSEUDO},
-    {"br.call.dptk.few",	B, OpPaWhaD (1, 0, 2, 0), {B1, B2}},
-    {"br.call.dptk",		B, OpPaWhaD (1, 0, 2, 0), {B1, B2}, PSEUDO},
-    {"br.call.dptk.few.clr",	B, OpPaWhaD (1, 0, 2, 1), {B1, B2}},
-    {"br.call.dptk.clr",	B, OpPaWhaD (1, 0, 2, 1), {B1, B2}, PSEUDO},
-    {"br.call.dpnt.few",	B, OpPaWhaD (1, 0, 3, 0), {B1, B2}},
-    {"br.call.dpnt",		B, OpPaWhaD (1, 0, 3, 0), {B1, B2}, PSEUDO},
-    {"br.call.dpnt.few.clr",	B, OpPaWhaD (1, 0, 3, 1), {B1, B2}},
-    {"br.call.dpnt.clr",	B, OpPaWhaD (1, 0, 3, 1), {B1, B2}, PSEUDO},
-    {"br.call.sptk.many",	B, OpPaWhaD (1, 1, 0, 0), {B1, B2}},
-    {"br.call.sptk.many.clr",	B, OpPaWhaD (1, 1, 0, 1), {B1, B2}},
-    {"br.call.spnt.many",	B, OpPaWhaD (1, 1, 1, 0), {B1, B2}},
-    {"br.call.spnt.many.clr",	B, OpPaWhaD (1, 1, 1, 1), {B1, B2}},
-    {"br.call.dptk.many",	B, OpPaWhaD (1, 1, 2, 0), {B1, B2}},
-    {"br.call.dptk.many.clr",	B, OpPaWhaD (1, 1, 2, 1), {B1, B2}},
-    {"br.call.dpnt.many",	B, OpPaWhaD (1, 1, 3, 0), {B1, B2}},
-    {"br.call.dpnt.many.clr",	B, OpPaWhaD (1, 1, 3, 1), {B1, B2}},
+    {"br.call.sptk.few",	B, OpPaWhcD (1, 0, 1, 0), {B1, B2}},
+    {"br.call.sptk",		B, OpPaWhcD (1, 0, 1, 0), {B1, B2}, PSEUDO},
+    {"br.call.sptk.few.clr",	B, OpPaWhcD (1, 0, 1, 1), {B1, B2}},
+    {"br.call.sptk.clr",	B, OpPaWhcD (1, 0, 1, 1), {B1, B2}, PSEUDO},
+    {"br.call.spnt.few",	B, OpPaWhcD (1, 0, 3, 0), {B1, B2}},
+    {"br.call.spnt",		B, OpPaWhcD (1, 0, 3, 0), {B1, B2}, PSEUDO},
+    {"br.call.spnt.few.clr",	B, OpPaWhcD (1, 0, 3, 1), {B1, B2}},
+    {"br.call.spnt.clr",	B, OpPaWhcD (1, 0, 3, 1), {B1, B2}, PSEUDO},
+    {"br.call.dptk.few",	B, OpPaWhcD (1, 0, 5, 0), {B1, B2}},
+    {"br.call.dptk",		B, OpPaWhcD (1, 0, 5, 0), {B1, B2}, PSEUDO},
+    {"br.call.dptk.few.clr",	B, OpPaWhcD (1, 0, 5, 1), {B1, B2}},
+    {"br.call.dptk.clr",	B, OpPaWhcD (1, 0, 5, 1), {B1, B2}, PSEUDO},
+    {"br.call.dpnt.few",	B, OpPaWhcD (1, 0, 7, 0), {B1, B2}},
+    {"br.call.dpnt",		B, OpPaWhcD (1, 0, 7, 0), {B1, B2}, PSEUDO},
+    {"br.call.dpnt.few.clr",	B, OpPaWhcD (1, 0, 7, 1), {B1, B2}},
+    {"br.call.dpnt.clr",	B, OpPaWhcD (1, 0, 7, 1), {B1, B2}, PSEUDO},
+    {"br.call.sptk.many",	B, OpPaWhcD (1, 1, 1, 0), {B1, B2}},
+    {"br.call.sptk.many.clr",	B, OpPaWhcD (1, 1, 1, 1), {B1, B2}},
+    {"br.call.spnt.many",	B, OpPaWhcD (1, 1, 3, 0), {B1, B2}},
+    {"br.call.spnt.many.clr",	B, OpPaWhcD (1, 1, 3, 1), {B1, B2}},
+    {"br.call.dptk.many",	B, OpPaWhcD (1, 1, 5, 0), {B1, B2}},
+    {"br.call.dptk.many.clr",	B, OpPaWhcD (1, 1, 5, 1), {B1, B2}},
+    {"br.call.dpnt.many",	B, OpPaWhcD (1, 1, 7, 0), {B1, B2}},
+    {"br.call.dpnt.many.clr",	B, OpPaWhcD (1, 1, 7, 1), {B1, B2}},
 
 #define BRP(a,b,c) \
       B0, OpX6IhWhb (2, a, b, c), {B2, TAG13}, NO_PRED
@@ -470,6 +474,7 @@
 #undef bPr
 #undef bWha
 #undef bWhb
+#undef bWhc
 #undef bX6
 #undef mBtype
 #undef mD
@@ -478,9 +483,11 @@
 #undef mPr
 #undef mWha
 #undef mWhb
+#undef mWhc
 #undef mX6
 #undef OpX6
 #undef OpPaWhaD
+#undef OpPaWhcD
 #undef OpBtypePaWhaD
 #undef OpBtypePaWhaDPr
 #undef OpX6BtypePaWhaD
diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
new file mode 100644
index 0000000..c2163b0
--- /dev/null
+++ b/opcodes/ip2k-asm.c
@@ -0,0 +1,977 @@
+/* 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 <stdio.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "ip2k-desc.h"
+#include "ip2k-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_fr (cd, strp, opindex, valuep)
+     CGEN_CPU_DESC cd;
+     const char **strp;
+     int opindex;
+     long *valuep;
+{
+  const char *errmsg;
+  char *old_strp;
+  char *afteroffset; 
+  enum cgen_parse_operand_result result_type;
+  bfd_vma value;
+  extern CGEN_KEYWORD ip2k_cgen_opval_register_names;
+  long tempvalue;
+
+  old_strp = *strp;
+  afteroffset = NULL; 
+
+
+  /* Check here to see if you're about to try parsing a w as the first arg */
+  /* and return an error if you are.                                       */
+  if ( (strncmp(*strp,"w",1)==0) || (strncmp(*strp,"W",1)==0) )
+  {
+     (*strp)++;
+
+     if ( (strncmp(*strp,",",1)==0) || isspace(**strp) )
+     {
+        /* We've been passed a w.  Return with an error message so that  */
+        /* cgen will try the next parsing option.                        */
+        errmsg = _("W keyword invalid in FR operand slot.");
+        return errmsg;
+     }
+     *strp = old_strp;
+  }
+
+
+  /* Attempt parse as register keyword. */
+  /* old_strp = *strp; */
+
+  errmsg = cgen_parse_keyword (cd, strp, & ip2k_cgen_opval_register_names, valuep);
+  if ( *strp != NULL )
+  if (errmsg == NULL)
+    return errmsg;
+
+  /* Attempt to parse for "(IP)" */
+  afteroffset = strstr(*strp,"(IP)");
+
+  if ( afteroffset == NULL)
+  {
+     /* Make sure it's not in lower case */
+     afteroffset = strstr(*strp,"(ip)");
+  }
+
+  if ( afteroffset != NULL )
+    {
+      if ( afteroffset != *strp )
+	{
+	  /* Invalid offset present.*/
+	  errmsg = _("offset(IP) is not a valid form");
+	  return errmsg;
+	}
+      else
+	{
+	  *strp += 4; 
+	  *valuep = 0;
+	  errmsg = NULL;
+	  return errmsg;
+	}
+    }
+
+  /* Attempt to parse for DP. ex: mov w, offset(DP)  */
+  /*                              mov offset(DP),w   */
+
+  /* Try parsing it as an address and see what comes back */
+
+  afteroffset = strstr(*strp,"(DP)");
+
+  if ( afteroffset == NULL)
+  {
+     /* Maybe it's in lower case */
+     afteroffset = strstr(*strp,"(dp)");
+  }
+
+  if ( afteroffset != NULL )
+  {
+     if ( afteroffset == *strp )
+     {
+        /* No offset present. Use 0 by default. */
+        tempvalue = 0;
+        errmsg = NULL;
+     }
+     else
+     {
+       errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IP2K_FR_OFFSET,
+				    & result_type, & tempvalue);
+     }
+
+     if (errmsg == NULL)
+     {
+        if ( (tempvalue >= 0) && (tempvalue <= 127) )
+        {
+           /* Value is ok.  Fix up the first 2 bits and return */       
+           *valuep = 0x0100 | tempvalue;
+           *strp += 4; /* skip over the (DP) in *strp */
+           return errmsg;
+        } else
+        {
+           /* Found something there in front of (DP) but it's out of range. */
+           errmsg = _("(DP) offset out of range.");
+           return errmsg;
+        }
+        
+     }
+  }
+
+
+  /* Attempt to parse for SP. ex: mov w, offset(SP)  */
+  /*                              mov offset(SP), w  */
+
+
+  afteroffset = strstr(*strp,"(SP)");
+
+  if (afteroffset == NULL)
+  {
+     /* Maybe it's in lower case. */
+     afteroffset = strstr(*strp, "(sp)");
+  }
+
+  if ( afteroffset != NULL )
+  {
+     if ( afteroffset ==  *strp )
+     {
+        /* No offset present. Use 0 by default. */
+        tempvalue = 0;
+        errmsg = NULL;
+     }
+     else
+     {
+       errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IP2K_FR_OFFSET,
+				    & result_type, & tempvalue);
+     }
+     if (errmsg == NULL)
+     {
+        if ( (tempvalue >= 0) && (tempvalue <= 127) )
+        {
+           /* Value is ok.  Fix up the first 2 bits and return */
+           *valuep = 0x0180 | tempvalue;
+           *strp += 4; /* skip over the (SP) in *strp */
+           return errmsg;
+        } else
+        {
+           /* Found something there in front of (SP) but it's out of range. */
+           errmsg = _("(SP) offset out of range.");
+           return errmsg;
+        }
+        
+     }
+  }
+
+
+  /* Attempt to parse as an address. */
+  *strp = old_strp;
+  errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_IP2K_FR9,
+			       & result_type, & value);
+  if (errmsg == NULL)
+    {
+      *valuep = value;
+
+      /* if a parenthesis is found, warn about invalid form */
+
+      if (**strp == '(')
+	{
+	  errmsg = _("illegal use of parentheses");
+        }
+      /* if a numeric value is specified, ensure that it is between 1 and 255 */
+      else if (result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+	{
+	  if (value < 0x1 || value > 0xff)
+	    errmsg = _("operand out of range (not between 1 and 255)");
+	}
+    }
+  return errmsg;
+}
+
+static const char *
+parse_addr16 (cd, strp, opindex, valuep)
+     CGEN_CPU_DESC cd;
+     const char **strp;
+     int opindex;
+     long *valuep;
+{
+  const char *errmsg;
+  enum cgen_parse_operand_result result_type;
+  bfd_reloc_code_real_type code = BFD_RELOC_NONE;
+  long value;
+
+  if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16H )
+      code = BFD_RELOC_IP2K_HI8DATA;
+  else if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16L )
+      code = BFD_RELOC_IP2K_LO8DATA;
+  else
+    {
+      /* Something is very wrong. opindex has to be one of the above. */
+      errmsg = _("parse_addr16: invalid opindex.");
+      return errmsg;
+    }
+  
+  errmsg = cgen_parse_address (cd, strp, opindex, code,
+                                  & result_type, & value);
+  if (errmsg == NULL)
+    {
+       /* We either have a relocation or a number now. */
+      if ( result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER )
+      {
+         /* We got a number back. */
+         if ( code == BFD_RELOC_IP2K_HI8DATA )
+            value >>= 8;
+         else    /* code = BFD_RELOC_IP2K_LOW8DATA */
+	    value &= 0x00FF;
+      }   
+         *valuep = value;
+   }
+
+  return errmsg;
+}
+
+
+ static const char *
+ parse_addr16_p (cd, strp, opindex, valuep)
+      CGEN_CPU_DESC cd;
+      const char **strp;
+      int opindex;
+      long *valuep;
+ {
+   const char *errmsg;
+   enum cgen_parse_operand_result result_type;
+   bfd_reloc_code_real_type code = BFD_RELOC_IP2K_PAGE3;
+   long value;
+ 
+   errmsg = cgen_parse_address (cd, strp, opindex, code,
+                                 & result_type, & value);
+   if (errmsg == NULL)
+   {
+       if ( result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER )
+            *valuep = (value >> 13) & 0x7;
+       else if ( result_type == CGEN_PARSE_OPERAND_RESULT_QUEUED )
+            *valuep = value;
+   }
+   return errmsg; 
+ }
+
+
+ static const char *
+ parse_addr16_cjp (cd, strp, opindex, valuep)
+      CGEN_CPU_DESC cd;
+      const char **strp;
+      int opindex;
+      long *valuep;
+ {
+   const char *errmsg;
+   enum cgen_parse_operand_result result_type;
+   bfd_reloc_code_real_type code = BFD_RELOC_NONE;
+   long value;
+ 
+   if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16CJP )
+      code = BFD_RELOC_IP2K_ADDR16CJP;
+   else if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16P )
+      code = BFD_RELOC_IP2K_PAGE3;
+
+   errmsg = cgen_parse_address (cd, strp, opindex, code,
+                                 & result_type, & value);
+   if (errmsg == NULL)
+   {
+       if ( result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER )
+       {
+  	 if ( (value & 0x1) == 0)  /* If the address is even .... */
+         {
+             if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16CJP )
+                *valuep = (value >> 1) & 0x1FFF;  /* Should mask be 1FFF? */
+             else if ( opindex == (CGEN_OPERAND_TYPE)IP2K_OPERAND_ADDR16P )
+                *valuep = (value >> 14) & 0x7;
+          }
+          else
+ 	    errmsg = _("Byte address required. - must be even.");
+       }else if ( result_type == CGEN_PARSE_OPERAND_RESULT_QUEUED )
+       {
+            /* This will happen for things like (s2-s1) where s2 and s1 */
+ 	    /* are labels.                                	        */
+            *valuep = value;
+        }
+      else 
+        errmsg = _("cgen_parse_address returned a symbol. Literal required.");
+   }
+   return errmsg; 
+ }
+
+
+static const char *
+parse_lit8 (cd, strp, opindex, valuep)
+     CGEN_CPU_DESC cd;
+     const char **strp;
+     int opindex;
+     long *valuep;
+{
+  const char *errmsg;
+  enum cgen_parse_operand_result result_type;
+  bfd_reloc_code_real_type code = BFD_RELOC_NONE;
+  long value;
+
+  /* Parse %OP relocating operators. */
+  if (strncmp (*strp, "%bank", 5) == 0)
+    {
+      *strp += 5;
+      code = BFD_RELOC_IP2K_BANK;
+    }
+  else if (strncmp (*strp, "%lo8data", 8) == 0)
+    {
+      *strp += 8;
+      code = BFD_RELOC_IP2K_LO8DATA;
+    }
+  else if (strncmp (*strp, "%hi8data", 8) == 0)
+    {
+      *strp += 8;
+      code = BFD_RELOC_IP2K_HI8DATA;
+    }
+  else if (strncmp (*strp, "%ex8data", 8) == 0)
+    {
+      *strp += 8;
+      code = BFD_RELOC_IP2K_EX8DATA;
+    }
+  else if (strncmp (*strp, "%lo8insn", 8) == 0)
+    {
+      *strp += 8;
+      code = BFD_RELOC_IP2K_LO8INSN;
+    }
+  else if (strncmp (*strp, "%hi8insn", 8) == 0)
+    {
+      *strp += 8;
+      code = BFD_RELOC_IP2K_HI8INSN;
+    }
+  
+
+  /* Parse %op operand.  */
+  if (code != BFD_RELOC_NONE)
+    {
+      errmsg = cgen_parse_address (cd, strp, opindex, code, 
+				   & result_type, & value);
+      if ((errmsg == NULL) &&
+	  (result_type != CGEN_PARSE_OPERAND_RESULT_QUEUED))
+	errmsg = _("%operator operand is not a symbol");
+
+      *valuep = value;
+    }
+  /* Parse as a number.  */
+  else
+    {
+      errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
+
+      /* Truncate to eight bits to accept both signed and unsigned input. */
+      if (errmsg == NULL)
+	*valuep &= 0xFF;
+    }
+
+  return errmsg;
+}
+
+static const char *
+parse_bit3 (cd, strp, opindex, valuep)
+     CGEN_CPU_DESC cd;
+     const char **strp;
+     int opindex;
+     long *valuep;
+{
+  const char *errmsg;
+  char mode = 0;
+  long count = 0;
+  unsigned long value;
+
+  if (strncmp (*strp, "%bit", 4) == 0)
+    {
+      *strp += 4;
+      mode = 1;
+    }
+  else if (strncmp (*strp, "%msbbit", 7) == 0)
+    {
+      *strp += 7;
+      mode = 1;
+    }
+  else if (strncmp (*strp, "%lsbbit", 7) == 0)
+    {
+      *strp += 7;
+      mode = 2;
+    }
+
+  errmsg = cgen_parse_signed_integer (cd, strp, opindex, valuep);
+  if (errmsg) {
+    return errmsg;
+  }
+
+  if (mode) {
+    value = (unsigned long) *valuep;
+    if (value == 0) {
+      errmsg = _("Attempt to find bit index of 0");
+      return errmsg;
+    }
+    
+    if (mode == 1) {
+      count = 31;
+      while ((value & 0x80000000) == 0) {
+        count--;
+        value <<= 1;
+      }
+    } else if (mode == 2) {
+      count = 0;
+      while ((value & 0x00000001) == 0) {
+        count++;
+        value >>= 1;
+      }
+    }
+    
+    *valuep = count;
+  }
+
+  return errmsg;
+}
+
+
+/* -- dis.c */
+
+const char * ip2k_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 *
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      errmsg = parse_addr16_cjp (cd, strp, IP2K_OPERAND_ADDR16CJP, &fields->f_addr16cjp);
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      errmsg = parse_addr16 (cd, strp, IP2K_OPERAND_ADDR16H, &fields->f_imm8);
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      errmsg = parse_addr16 (cd, strp, IP2K_OPERAND_ADDR16L, &fields->f_imm8);
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      errmsg = parse_addr16_cjp (cd, strp, IP2K_OPERAND_ADDR16P, &fields->f_page3);
+      break;
+    case IP2K_OPERAND_BITNO :
+      errmsg = parse_bit3 (cd, strp, IP2K_OPERAND_BITNO, &fields->f_bitno);
+      break;
+    case IP2K_OPERAND_CBIT :
+      errmsg = cgen_parse_unsigned_integer (cd, strp, IP2K_OPERAND_CBIT, &junk);
+      break;
+    case IP2K_OPERAND_DCBIT :
+      errmsg = cgen_parse_unsigned_integer (cd, strp, IP2K_OPERAND_DCBIT, &junk);
+      break;
+    case IP2K_OPERAND_FR :
+      errmsg = parse_fr (cd, strp, IP2K_OPERAND_FR, &fields->f_reg);
+      break;
+    case IP2K_OPERAND_LIT8 :
+      errmsg = parse_lit8 (cd, strp, IP2K_OPERAND_LIT8, &fields->f_imm8);
+      break;
+    case IP2K_OPERAND_PABITS :
+      errmsg = cgen_parse_unsigned_integer (cd, strp, IP2K_OPERAND_PABITS, &junk);
+      break;
+    case IP2K_OPERAND_RETI3 :
+      errmsg = cgen_parse_unsigned_integer (cd, strp, IP2K_OPERAND_RETI3, &fields->f_reti3);
+      break;
+    case IP2K_OPERAND_ZBIT :
+      errmsg = cgen_parse_unsigned_integer (cd, strp, IP2K_OPERAND_ZBIT, &junk);
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex);
+      abort ();
+  }
+
+  return errmsg;
+}
+
+cgen_parse_fn * const ip2k_cgen_parse_handlers[] = 
+{
+  parse_insn_normal,
+};
+
+void
+ip2k_cgen_init_asm (cd)
+     CGEN_CPU_DESC cd;
+{
+  ip2k_cgen_init_opcode_table (cd);
+  ip2k_cgen_init_ibld_table (cd);
+  cd->parse_handlers = & ip2k_cgen_parse_handlers[0];
+  cd->parse_operand = ip2k_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 ip2k_cgen_assemble_insn
+
+   Returns NULL for success, an error message for failure.  */
+
+char * 
+ip2k_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 = cd->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 *
+ip2k_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 (! ip2k_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
+ip2k_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 (! ip2k_cgen_opval_supported (ke))
+	continue;
+#endif
+      cgen_asm_record_register (cd, ke->name, ke->value);
+    }
+}
+
+#endif /* 0 */
diff --git a/opcodes/ip2k-desc.c b/opcodes/ip2k-desc.c
new file mode 100644
index 0000000..a676e77
--- /dev/null
+++ b/opcodes/ip2k-desc.c
@@ -0,0 +1,1219 @@
+/* CPU data for ip2k.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 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 <stdio.h>
+#include <stdarg.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "ip2k-desc.h"
+#include "ip2k-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 },
+  { "ip2022", MACH_IP2022 },
+  { "ip2022ext", MACH_IP2022EXT },
+  { "max", MACH_MAX },
+  { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY ISA_attr[] =
+{
+  { "ip2k", ISA_IP2K },
+  { "max", ISA_MAX },
+  { 0, 0 }
+};
+
+const CGEN_ATTR_TABLE ip2k_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 ip2k_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 ip2k_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 ip2k_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] },
+  { "EXT-SKIP-INSN", &bool_attr[0], &bool_attr[0] },
+  { "SKIPA", &bool_attr[0], &bool_attr[0] },
+  { 0, 0, 0 }
+};
+
+/* Instruction set variants.  */
+
+static const CGEN_ISA ip2k_cgen_isa_table[] = {
+  { "ip2k", 16, 16, 16, 16 },
+  { 0, 0, 0, 0, 0 }
+};
+
+/* Machine variants.  */
+
+static const CGEN_MACH ip2k_cgen_mach_table[] = {
+  { "ip2022", "ip2022", MACH_IP2022, 0 },
+  { "ip2022ext", "ip2022ext", MACH_IP2022EXT, 0 },
+  { 0, 0, 0, 0 }
+};
+
+static CGEN_KEYWORD_ENTRY ip2k_cgen_opval_register_names_entries[] =
+{
+  { "ADDRSEL", 2, {0, {0}}, 0, 0 },
+  { "ADDRX", 3, {0, {0}}, 0, 0 },
+  { "IPH", 4, {0, {0}}, 0, 0 },
+  { "IPL", 5, {0, {0}}, 0, 0 },
+  { "SPH", 6, {0, {0}}, 0, 0 },
+  { "SPL", 7, {0, {0}}, 0, 0 },
+  { "PCH", 8, {0, {0}}, 0, 0 },
+  { "PCL", 9, {0, {0}}, 0, 0 },
+  { "WREG", 10, {0, {0}}, 0, 0 },
+  { "STATUS", 11, {0, {0}}, 0, 0 },
+  { "DPH", 12, {0, {0}}, 0, 0 },
+  { "DPL", 13, {0, {0}}, 0, 0 },
+  { "SPDREG", 14, {0, {0}}, 0, 0 },
+  { "MULH", 15, {0, {0}}, 0, 0 },
+  { "ADDRH", 16, {0, {0}}, 0, 0 },
+  { "ADDRL", 17, {0, {0}}, 0, 0 },
+  { "DATAH", 18, {0, {0}}, 0, 0 },
+  { "DATAL", 19, {0, {0}}, 0, 0 },
+  { "INTVECH", 20, {0, {0}}, 0, 0 },
+  { "INTVECL", 21, {0, {0}}, 0, 0 },
+  { "INTSPD", 22, {0, {0}}, 0, 0 },
+  { "INTF", 23, {0, {0}}, 0, 0 },
+  { "INTE", 24, {0, {0}}, 0, 0 },
+  { "INTED", 25, {0, {0}}, 0, 0 },
+  { "FCFG", 26, {0, {0}}, 0, 0 },
+  { "TCTRL", 27, {0, {0}}, 0, 0 },
+  { "XCFG", 28, {0, {0}}, 0, 0 },
+  { "EMCFG", 29, {0, {0}}, 0, 0 },
+  { "IPCH", 30, {0, {0}}, 0, 0 },
+  { "IPCL", 31, {0, {0}}, 0, 0 },
+  { "RAIN", 32, {0, {0}}, 0, 0 },
+  { "RAOUT", 33, {0, {0}}, 0, 0 },
+  { "RADIR", 34, {0, {0}}, 0, 0 },
+  { "LFSRH", 35, {0, {0}}, 0, 0 },
+  { "RBIN", 36, {0, {0}}, 0, 0 },
+  { "RBOUT", 37, {0, {0}}, 0, 0 },
+  { "RBDIR", 38, {0, {0}}, 0, 0 },
+  { "LFSRL", 39, {0, {0}}, 0, 0 },
+  { "RCIN", 40, {0, {0}}, 0, 0 },
+  { "RCOUT", 41, {0, {0}}, 0, 0 },
+  { "RCDIR", 42, {0, {0}}, 0, 0 },
+  { "LFSRA", 43, {0, {0}}, 0, 0 },
+  { "RDIN", 44, {0, {0}}, 0, 0 },
+  { "RDOUT", 45, {0, {0}}, 0, 0 },
+  { "RDDIR", 46, {0, {0}}, 0, 0 },
+  { "REIN", 48, {0, {0}}, 0, 0 },
+  { "REOUT", 49, {0, {0}}, 0, 0 },
+  { "REDIR", 50, {0, {0}}, 0, 0 },
+  { "RFIN", 52, {0, {0}}, 0, 0 },
+  { "RFOUT", 53, {0, {0}}, 0, 0 },
+  { "RFDIR", 54, {0, {0}}, 0, 0 },
+  { "RGOUT", 57, {0, {0}}, 0, 0 },
+  { "RGDIR", 58, {0, {0}}, 0, 0 },
+  { "RTTMR", 64, {0, {0}}, 0, 0 },
+  { "RTCFG", 65, {0, {0}}, 0, 0 },
+  { "T0TMR", 66, {0, {0}}, 0, 0 },
+  { "T0CFG", 67, {0, {0}}, 0, 0 },
+  { "T1CNTH", 68, {0, {0}}, 0, 0 },
+  { "T1CNTL", 69, {0, {0}}, 0, 0 },
+  { "T1CAP1H", 70, {0, {0}}, 0, 0 },
+  { "T1CAP1L", 71, {0, {0}}, 0, 0 },
+  { "T1CAP2H", 72, {0, {0}}, 0, 0 },
+  { "T1CMP2H", 72, {0, {0}}, 0, 0 },
+  { "T1CAP2L", 73, {0, {0}}, 0, 0 },
+  { "T1CMP2L", 73, {0, {0}}, 0, 0 },
+  { "T1CMP1H", 74, {0, {0}}, 0, 0 },
+  { "T1CMP1L", 75, {0, {0}}, 0, 0 },
+  { "T1CFG1H", 76, {0, {0}}, 0, 0 },
+  { "T1CFG1L", 77, {0, {0}}, 0, 0 },
+  { "T1CFG2H", 78, {0, {0}}, 0, 0 },
+  { "T1CFG2L", 79, {0, {0}}, 0, 0 },
+  { "ADCH", 80, {0, {0}}, 0, 0 },
+  { "ADCL", 81, {0, {0}}, 0, 0 },
+  { "ADCCFG", 82, {0, {0}}, 0, 0 },
+  { "ADCTMR", 83, {0, {0}}, 0, 0 },
+  { "T2CNTH", 84, {0, {0}}, 0, 0 },
+  { "T2CNTL", 85, {0, {0}}, 0, 0 },
+  { "T2CAP1H", 86, {0, {0}}, 0, 0 },
+  { "T2CAP1L", 87, {0, {0}}, 0, 0 },
+  { "T2CAP2H", 88, {0, {0}}, 0, 0 },
+  { "T2CMP2H", 88, {0, {0}}, 0, 0 },
+  { "T2CAP2L", 89, {0, {0}}, 0, 0 },
+  { "T2CMP2L", 89, {0, {0}}, 0, 0 },
+  { "T2CMP1H", 90, {0, {0}}, 0, 0 },
+  { "T2CMP1L", 91, {0, {0}}, 0, 0 },
+  { "T2CFG1H", 92, {0, {0}}, 0, 0 },
+  { "T2CFG1L", 93, {0, {0}}, 0, 0 },
+  { "T2CFG2H", 94, {0, {0}}, 0, 0 },
+  { "T2CFG2L", 95, {0, {0}}, 0, 0 },
+  { "S1TMRH", 96, {0, {0}}, 0, 0 },
+  { "S1TMRL", 97, {0, {0}}, 0, 0 },
+  { "S1TBUFH", 98, {0, {0}}, 0, 0 },
+  { "S1TBUFL", 99, {0, {0}}, 0, 0 },
+  { "S1TCFG", 100, {0, {0}}, 0, 0 },
+  { "S1RCNT", 101, {0, {0}}, 0, 0 },
+  { "S1RBUFH", 102, {0, {0}}, 0, 0 },
+  { "S1RBUFL", 103, {0, {0}}, 0, 0 },
+  { "S1RCFG", 104, {0, {0}}, 0, 0 },
+  { "S1RSYNC", 105, {0, {0}}, 0, 0 },
+  { "S1INTF", 106, {0, {0}}, 0, 0 },
+  { "S1INTE", 107, {0, {0}}, 0, 0 },
+  { "S1MODE", 108, {0, {0}}, 0, 0 },
+  { "S1SMASK", 109, {0, {0}}, 0, 0 },
+  { "PSPCFG", 110, {0, {0}}, 0, 0 },
+  { "CMPCFG", 111, {0, {0}}, 0, 0 },
+  { "S2TMRH", 112, {0, {0}}, 0, 0 },
+  { "S2TMRL", 113, {0, {0}}, 0, 0 },
+  { "S2TBUFH", 114, {0, {0}}, 0, 0 },
+  { "S2TBUFL", 115, {0, {0}}, 0, 0 },
+  { "S2TCFG", 116, {0, {0}}, 0, 0 },
+  { "S2RCNT", 117, {0, {0}}, 0, 0 },
+  { "S2RBUFH", 118, {0, {0}}, 0, 0 },
+  { "S2RBUFL", 119, {0, {0}}, 0, 0 },
+  { "S2RCFG", 120, {0, {0}}, 0, 0 },
+  { "S2RSYNC", 121, {0, {0}}, 0, 0 },
+  { "S2INTF", 122, {0, {0}}, 0, 0 },
+  { "S2INTE", 123, {0, {0}}, 0, 0 },
+  { "S2MODE", 124, {0, {0}}, 0, 0 },
+  { "S2SMASK", 125, {0, {0}}, 0, 0 },
+  { "CALLH", 126, {0, {0}}, 0, 0 },
+  { "CALLL", 127, {0, {0}}, 0, 0 }
+};
+
+CGEN_KEYWORD ip2k_cgen_opval_register_names =
+{
+  & ip2k_cgen_opval_register_names_entries[0],
+  121,
+  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 ip2k_cgen_hw_table[] =
+{
+  { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-spr", HW_H_SPR, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-registers", HW_H_REGISTERS, CGEN_ASM_NONE, 0, { 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+  { "h-stack", HW_H_STACK, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-pabits", HW_H_PABITS, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-zbit", HW_H_ZBIT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-cbit", HW_H_CBIT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-dcbit", HW_H_DCBIT, CGEN_ASM_NONE, 0, { 0, { (1<<MACH_BASE) } } },
+  { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PROFILE)|A(PC), { (1<<MACH_BASE) } } },
+  { 0, 0, CGEN_ASM_NONE, 0, {0, {0}} }
+};
+
+#undef A
+
+
+/* The instruction field table.  */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_IFLD_##a)
+#else
+#define A(a) (1 << CGEN_IFLD_/**/a)
+#endif
+
+const CGEN_IFLD ip2k_cgen_ifld_table[] =
+{
+  { IP2K_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_IMM8, "f-imm8", 0, 16, 7, 8, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_REG, "f-reg", 0, 16, 8, 9, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
+  { IP2K_F_ADDR16CJP, "f-addr16cjp", 0, 16, 12, 13, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
+  { IP2K_F_DIR, "f-dir", 0, 16, 9, 1, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_BITNO, "f-bitno", 0, 16, 11, 3, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP3, "f-op3", 0, 16, 15, 3, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP4, "f-op4", 0, 16, 15, 4, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP4MID, "f-op4mid", 0, 16, 11, 4, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP6, "f-op6", 0, 16, 15, 6, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP8, "f-op8", 0, 16, 15, 8, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP6_10LOW, "f-op6-10low", 0, 16, 9, 10, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_OP6_7LOW, "f-op6-7low", 0, 16, 9, 7, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_RETI3, "f-reti3", 0, 16, 2, 3, { 0, { (1<<MACH_BASE) } }  },
+  { IP2K_F_SKIPB, "f-skipb", 0, 16, 12, 1, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
+  { IP2K_F_PAGE3, "f-page3", 0, 16, 2, 3, { 0, { (1<<MACH_BASE) } }  },
+  { 0, 0, 0, 0, 0, 0, {0, {0}} }
+};
+
+#undef A
+
+
+
+/* multi ifield declarations */
+
+
+
+/* multi ifield definitions */
+
+
+/* The operand table.  */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_OPERAND_##a)
+#else
+#define A(a) (1 << CGEN_OPERAND_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) IP2K_OPERAND_##op
+#else
+#define OPERAND(op) IP2K_OPERAND_/**/op
+#endif
+
+const CGEN_OPERAND ip2k_cgen_operand_table[] =
+{
+/* pc: program counter */
+  { "pc", IP2K_OPERAND_PC, HW_H_PC, 0, 0,
+    { 0, &(ip2k_cgen_ifld_table[0]) }, 
+    { 0|A(SEM_ONLY), { (1<<MACH_BASE) } }  },
+/* addr16cjp: 13-bit address */
+  { "addr16cjp", IP2K_OPERAND_ADDR16CJP, HW_H_UINT, 12, 13,
+    { 0, &(ip2k_cgen_ifld_table[4]) }, 
+    { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
+/* fr: register */
+  { "fr", IP2K_OPERAND_FR, HW_H_REGISTERS, 8, 9,
+    { 0, &(ip2k_cgen_ifld_table[3]) }, 
+    { 0|A(ABS_ADDR), { (1<<MACH_BASE) } }  },
+/* lit8: 8-bit signed literal */
+  { "lit8", IP2K_OPERAND_LIT8, HW_H_SINT, 7, 8,
+    { 0, &(ip2k_cgen_ifld_table[2]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* bitno: bit number */
+  { "bitno", IP2K_OPERAND_BITNO, HW_H_UINT, 11, 3,
+    { 0, &(ip2k_cgen_ifld_table[6]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* addr16p: page number */
+  { "addr16p", IP2K_OPERAND_ADDR16P, HW_H_UINT, 2, 3,
+    { 0, &(ip2k_cgen_ifld_table[16]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* addr16h: high 8 bits of address */
+  { "addr16h", IP2K_OPERAND_ADDR16H, HW_H_UINT, 7, 8,
+    { 0, &(ip2k_cgen_ifld_table[2]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* addr16l: low 8 bits of address */
+  { "addr16l", IP2K_OPERAND_ADDR16L, HW_H_UINT, 7, 8,
+    { 0, &(ip2k_cgen_ifld_table[2]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* reti3: reti flags */
+  { "reti3", IP2K_OPERAND_RETI3, HW_H_UINT, 2, 3,
+    { 0, &(ip2k_cgen_ifld_table[14]) }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* pabits: page bits */
+  { "pabits", IP2K_OPERAND_PABITS, HW_H_PABITS, 0, 0,
+    { 0, 0 }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* zbit: zero bit */
+  { "zbit", IP2K_OPERAND_ZBIT, HW_H_ZBIT, 0, 0,
+    { 0, 0 }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* cbit: carry bit */
+  { "cbit", IP2K_OPERAND_CBIT, HW_H_CBIT, 0, 0,
+    { 0, 0 }, 
+    { 0, { (1<<MACH_BASE) } }  },
+/* dcbit: digit carry bit */
+  { "dcbit", IP2K_OPERAND_DCBIT, HW_H_DCBIT, 0, 0,
+    { 0, 0 }, 
+    { 0, { (1<<MACH_BASE) } }  },
+  { 0, 0, 0, 0, 0, {0, {0}} }
+};
+
+#undef A
+
+
+/* The instruction table.  */
+
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+#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
+
+static const CGEN_IBASE ip2k_cgen_insn_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}} },
+/* jmp $addr16cjp */
+  {
+    IP2K_INSN_JMP, "jmp", "jmp", 16,
+    { 0|A(UNCOND_CTI), { (1<<MACH_BASE) } }
+  },
+/* call $addr16cjp */
+  {
+    IP2K_INSN_CALL, "call", "call", 16,
+    { 0|A(UNCOND_CTI), { (1<<MACH_BASE) } }
+  },
+/* sb $fr,$bitno */
+  {
+    IP2K_INSN_SB, "sb", "sb", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* snb $fr,$bitno */
+  {
+    IP2K_INSN_SNB, "snb", "snb", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* setb $fr,$bitno */
+  {
+    IP2K_INSN_SETB, "setb", "setb", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* clrb $fr,$bitno */
+  {
+    IP2K_INSN_CLRB, "clrb", "clrb", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* xor W,#$lit8 */
+  {
+    IP2K_INSN_XORW_L, "xorw_l", "xor", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* and W,#$lit8 */
+  {
+    IP2K_INSN_ANDW_L, "andw_l", "and", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* or W,#$lit8 */
+  {
+    IP2K_INSN_ORW_L, "orw_l", "or", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* add W,#$lit8 */
+  {
+    IP2K_INSN_ADDW_L, "addw_l", "add", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* sub W,#$lit8 */
+  {
+    IP2K_INSN_SUBW_L, "subw_l", "sub", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* cmp W,#$lit8 */
+  {
+    IP2K_INSN_CMPW_L, "cmpw_l", "cmp", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* retw #$lit8 */
+  {
+    IP2K_INSN_RETW_L, "retw_l", "retw", 16,
+    { 0|A(UNCOND_CTI), { (1<<MACH_BASE) } }
+  },
+/* cse W,#$lit8 */
+  {
+    IP2K_INSN_CSEW_L, "csew_l", "cse", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* csne W,#$lit8 */
+  {
+    IP2K_INSN_CSNEW_L, "csnew_l", "csne", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* push #$lit8 */
+  {
+    IP2K_INSN_PUSH_L, "push_l", "push", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* muls W,#$lit8 */
+  {
+    IP2K_INSN_MULSW_L, "mulsw_l", "muls", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* mulu W,#$lit8 */
+  {
+    IP2K_INSN_MULUW_L, "muluw_l", "mulu", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* loadl #$lit8 */
+  {
+    IP2K_INSN_LOADL_L, "loadl_l", "loadl", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* loadh #$lit8 */
+  {
+    IP2K_INSN_LOADH_L, "loadh_l", "loadh", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* loadl $addr16l */
+  {
+    IP2K_INSN_LOADL_A, "loadl_a", "loadl", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* loadh $addr16h */
+  {
+    IP2K_INSN_LOADH_A, "loadh_a", "loadh", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* addc $fr,W */
+  {
+    IP2K_INSN_ADDCFR_W, "addcfr_w", "addc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* addc W,$fr */
+  {
+    IP2K_INSN_ADDCW_FR, "addcw_fr", "addc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* incsnz $fr */
+  {
+    IP2K_INSN_INCSNZ_FR, "incsnz_fr", "incsnz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* incsnz W,$fr */
+  {
+    IP2K_INSN_INCSNZW_FR, "incsnzw_fr", "incsnz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* muls W,$fr */
+  {
+    IP2K_INSN_MULSW_FR, "mulsw_fr", "muls", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* mulu W,$fr */
+  {
+    IP2K_INSN_MULUW_FR, "muluw_fr", "mulu", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* decsnz $fr */
+  {
+    IP2K_INSN_DECSNZ_FR, "decsnz_fr", "decsnz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* decsnz W,$fr */
+  {
+    IP2K_INSN_DECSNZW_FR, "decsnzw_fr", "decsnz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* subc W,$fr */
+  {
+    IP2K_INSN_SUBCW_FR, "subcw_fr", "subc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* subc $fr,W */
+  {
+    IP2K_INSN_SUBCFR_W, "subcfr_w", "subc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* pop $fr */
+  {
+    IP2K_INSN_POP_FR, "pop_fr", "pop", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* push $fr */
+  {
+    IP2K_INSN_PUSH_FR, "push_fr", "push", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* cse W,$fr */
+  {
+    IP2K_INSN_CSEW_FR, "csew_fr", "cse", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* csne W,$fr */
+  {
+    IP2K_INSN_CSNEW_FR, "csnew_fr", "csne", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* incsz $fr */
+  {
+    IP2K_INSN_INCSZ_FR, "incsz_fr", "incsz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* incsz W,$fr */
+  {
+    IP2K_INSN_INCSZW_FR, "incszw_fr", "incsz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* swap $fr */
+  {
+    IP2K_INSN_SWAP_FR, "swap_fr", "swap", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* swap W,$fr */
+  {
+    IP2K_INSN_SWAPW_FR, "swapw_fr", "swap", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* rl $fr */
+  {
+    IP2K_INSN_RL_FR, "rl_fr", "rl", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* rl W,$fr */
+  {
+    IP2K_INSN_RLW_FR, "rlw_fr", "rl", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* rr $fr */
+  {
+    IP2K_INSN_RR_FR, "rr_fr", "rr", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* rr W,$fr */
+  {
+    IP2K_INSN_RRW_FR, "rrw_fr", "rr", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* decsz $fr */
+  {
+    IP2K_INSN_DECSZ_FR, "decsz_fr", "decsz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* decsz W,$fr */
+  {
+    IP2K_INSN_DECSZW_FR, "decszw_fr", "decsz", 16,
+    { 0|A(SKIP_CTI), { (1<<MACH_BASE) } }
+  },
+/* inc $fr */
+  {
+    IP2K_INSN_INC_FR, "inc_fr", "inc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* inc W,$fr */
+  {
+    IP2K_INSN_INCW_FR, "incw_fr", "inc", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* not $fr */
+  {
+    IP2K_INSN_NOT_FR, "not_fr", "not", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* not W,$fr */
+  {
+    IP2K_INSN_NOTW_FR, "notw_fr", "not", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* test $fr */
+  {
+    IP2K_INSN_TEST_FR, "test_fr", "test", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* mov W,#$lit8 */
+  {
+    IP2K_INSN_MOVW_L, "movw_l", "mov", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* mov $fr,W */
+  {
+    IP2K_INSN_MOVFR_W, "movfr_w", "mov", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* mov W,$fr */
+  {
+    IP2K_INSN_MOVW_FR, "movw_fr", "mov", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* add $fr,W */
+  {
+    IP2K_INSN_ADDFR_W, "addfr_w", "add", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* add W,$fr */
+  {
+    IP2K_INSN_ADDW_FR, "addw_fr", "add", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* xor $fr,W */
+  {
+    IP2K_INSN_XORFR_W, "xorfr_w", "xor", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* xor W,$fr */
+  {
+    IP2K_INSN_XORW_FR, "xorw_fr", "xor", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* and $fr,W */
+  {
+    IP2K_INSN_ANDFR_W, "andfr_w", "and", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* and W,$fr */
+  {
+    IP2K_INSN_ANDW_FR, "andw_fr", "and", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* or $fr,W */
+  {
+    IP2K_INSN_ORFR_W, "orfr_w", "or", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* or W,$fr */
+  {
+    IP2K_INSN_ORW_FR, "orw_fr", "or", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* dec $fr */
+  {
+    IP2K_INSN_DEC_FR, "dec_fr", "dec", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* dec W,$fr */
+  {
+    IP2K_INSN_DECW_FR, "decw_fr", "dec", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* sub $fr,W */
+  {
+    IP2K_INSN_SUBFR_W, "subfr_w", "sub", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* sub W,$fr */
+  {
+    IP2K_INSN_SUBW_FR, "subw_fr", "sub", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* clr $fr */
+  {
+    IP2K_INSN_CLR_FR, "clr_fr", "clr", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* cmp W,$fr */
+  {
+    IP2K_INSN_CMPW_FR, "cmpw_fr", "cmp", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* speed #$lit8 */
+  {
+    IP2K_INSN_SPEED, "speed", "speed", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* ireadi */
+  {
+    IP2K_INSN_IREADI, "ireadi", "ireadi", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* iwritei */
+  {
+    IP2K_INSN_IWRITEI, "iwritei", "iwritei", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* fread */
+  {
+    IP2K_INSN_FREAD, "fread", "fread", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* fwrite */
+  {
+    IP2K_INSN_FWRITE, "fwrite", "fwrite", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* iread */
+  {
+    IP2K_INSN_IREAD, "iread", "iread", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* iwrite */
+  {
+    IP2K_INSN_IWRITE, "iwrite", "iwrite", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* page $addr16p */
+  {
+    IP2K_INSN_PAGE, "page", "page", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* system */
+  {
+    IP2K_INSN_SYSTEM, "system", "system", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* reti #$reti3 */
+  {
+    IP2K_INSN_RETI, "reti", "reti", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* ret */
+  {
+    IP2K_INSN_RET, "ret", "ret", 16,
+    { 0|A(UNCOND_CTI), { (1<<MACH_BASE) } }
+  },
+/* int */
+  {
+    IP2K_INSN_INT, "int", "int", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* breakx */
+  {
+    IP2K_INSN_BREAKX, "breakx", "breakx", 16,
+    { 0|A(EXT_SKIP_INSN), { (1<<MACH_BASE) } }
+  },
+/* cwdt */
+  {
+    IP2K_INSN_CWDT, "cwdt", "cwdt", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* ferase */
+  {
+    IP2K_INSN_FERASE, "ferase", "ferase", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* retnp */
+  {
+    IP2K_INSN_RETNP, "retnp", "retnp", 16,
+    { 0|A(UNCOND_CTI), { (1<<MACH_BASE) } }
+  },
+/* break */
+  {
+    IP2K_INSN_BREAK, "break", "break", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+/* nop */
+  {
+    IP2K_INSN_NOP, "nop", "nop", 16,
+    { 0, { (1<<MACH_BASE) } }
+  },
+};
+
+#undef OP
+#undef A
+
+/* Initialize anything needed to be done once, before any cpu_open call.  */
+static void init_tables PARAMS ((void));
+
+static void
+init_tables ()
+{
+}
+
+static const CGEN_MACH * lookup_mach_via_bfd_name
+  PARAMS ((const CGEN_MACH *, const char *));
+static void build_hw_table  PARAMS ((CGEN_CPU_TABLE *));
+static void build_ifield_table  PARAMS ((CGEN_CPU_TABLE *));
+static void build_operand_table PARAMS ((CGEN_CPU_TABLE *));
+static void build_insn_table    PARAMS ((CGEN_CPU_TABLE *));
+static void ip2k_cgen_rebuild_tables PARAMS ((CGEN_CPU_TABLE *));
+
+/* Subroutine of ip2k_cgen_cpu_open to look up a mach via its bfd name.  */
+
+static const CGEN_MACH *
+lookup_mach_via_bfd_name (table, name)
+     const CGEN_MACH *table;
+     const char *name;
+{
+  while (table->name)
+    {
+      if (strcmp (name, table->bfd_name) == 0)
+	return table;
+      ++table;
+    }
+  abort ();
+}
+
+/* Subroutine of ip2k_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 = & ip2k_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 ip2k_cgen_cpu_open to build the hardware table.  */
+
+static void
+build_ifield_table (cd)
+     CGEN_CPU_TABLE *cd;
+{
+  cd->ifld_table = & ip2k_cgen_ifld_table[0];
+}
+
+/* Subroutine of ip2k_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 = & ip2k_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 ip2k_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 = & ip2k_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 ip2k_cgen_cpu_open to rebuild the tables.  */
+
+static void
+ip2k_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 = & ip2k_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 = & ip2k_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, "ip2k_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
+ip2k_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 (ip2k_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, "ip2k_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, "ip2k_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 = ip2k_cgen_rebuild_tables;
+  ip2k_cgen_rebuild_tables (cd);
+
+  /* Default to not allowing signed overflow.  */
+  cd->signed_overflow_ok_p = 0;
+  
+  return (CGEN_CPU_DESC) cd;
+}
+
+/* Cover fn to ip2k_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
+ip2k_cgen_cpu_open_1 (mach_name, endian)
+     const char *mach_name;
+     enum cgen_endian endian;
+{
+  return ip2k_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
+ip2k_cgen_cpu_close (cd)
+     CGEN_CPU_DESC cd;
+{
+  unsigned int i;
+  CGEN_INSN *insns;
+
+  if (cd->macro_insn_table.init_entries)
+    {
+      insns = cd->macro_insn_table.init_entries;
+      for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
+	{
+	  if (CGEN_INSN_RX ((insns)))
+	    regfree(CGEN_INSN_RX (insns));
+	}
+    }
+
+  if (cd->insn_table.init_entries)
+    {
+      insns = cd->insn_table.init_entries;
+      for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
+	{
+	  if (CGEN_INSN_RX (insns))
+	    regfree(CGEN_INSN_RX (insns));
+	}
+    }
+
+  
+
+  if (cd->macro_insn_table.init_entries)
+    free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
+
+  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);
+
+  if (cd->operand_table.entries)
+    free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
+
+  free (cd);
+}
+
diff --git a/opcodes/ip2k-desc.h b/opcodes/ip2k-desc.h
new file mode 100644
index 0000000..74819ac
--- /dev/null
+++ b/opcodes/ip2k-desc.h
@@ -0,0 +1,251 @@
+/* CPU data header for ip2k.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 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 IP2K_CPU_H
+#define IP2K_CPU_H
+
+#define CGEN_ARCH ip2k
+
+/* Given symbol S, return ip2k_cgen_<S>.  */
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define CGEN_SYM(s) ip2k##_cgen_##s
+#else
+#define CGEN_SYM(s) ip2k/**/_cgen_/**/s
+#endif
+
+
+/* Selected cpu families.  */
+#define HAVE_CPU_IP2KBF
+
+#define CGEN_INSN_LSB0_P 1
+
+/* 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 2
+
+#define CGEN_INT_INSN_P 1
+
+/* Maximum number of syntax elements in an instruction.  */
+#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 12
+
+/* 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 3
+
+/* Enums.  */
+
+/* Enum declaration for op6 enums.  */
+typedef enum insn_op6 {
+  OP6_OTHER1, OP6_OTHER2, OP6_SUB, OP6_DEC
+ , OP6_OR, OP6_AND, OP6_XOR, OP6_ADD
+ , OP6_TEST, OP6_NOT, OP6_INC, OP6_DECSZ
+ , OP6_RR, OP6_RL, OP6_SWAP, OP6_INCSZ
+ , OP6_CSE, OP6_POP, OP6_SUBC, OP6_DECSNZ
+ , OP6_MULU, OP6_MULS, OP6_INCSNZ, OP6_ADDC
+} INSN_OP6;
+
+/* Enum declaration for dir enums.  */
+typedef enum insn_dir {
+  DIR_TO_W, DIR_NOTTO_W
+} INSN_DIR;
+
+/* Enum declaration for op4 enums.  */
+typedef enum insn_op4 {
+  OP4_LITERAL = 7, OP4_CLRB = 8, OP4_SETB = 9, OP4_SNB = 10
+ , OP4_SB = 11
+} INSN_OP4;
+
+/* Enum declaration for op4mid enums.  */
+typedef enum insn_op4mid {
+  OP4MID_LOADH_L = 0, OP4MID_LOADL_L = 1, OP4MID_MULU_L = 2, OP4MID_MULS_L = 3
+ , OP4MID_PUSH_L = 4, OP4MID_CSNE_L = 6, OP4MID_CSE_L = 7, OP4MID_RETW_L = 8
+ , OP4MID_CMP_L = 9, OP4MID_SUB_L = 10, OP4MID_ADD_L = 11, OP4MID_MOV_L = 12
+ , OP4MID_OR_L = 13, OP4MID_AND_L = 14, OP4MID_XOR_L = 15
+} INSN_OP4MID;
+
+/* Enum declaration for op3 enums.  */
+typedef enum insn_op3 {
+  OP3_CALL = 6, OP3_JMP = 7
+} INSN_OP3;
+
+/* Enum declaration for .  */
+typedef enum register_names {
+  H_REGISTERS_ADDRSEL = 2, H_REGISTERS_ADDRX = 3, H_REGISTERS_IPH = 4, H_REGISTERS_IPL = 5
+ , H_REGISTERS_SPH = 6, H_REGISTERS_SPL = 7, H_REGISTERS_PCH = 8, H_REGISTERS_PCL = 9
+ , H_REGISTERS_WREG = 10, H_REGISTERS_STATUS = 11, H_REGISTERS_DPH = 12, H_REGISTERS_DPL = 13
+ , H_REGISTERS_SPDREG = 14, H_REGISTERS_MULH = 15, H_REGISTERS_ADDRH = 16, H_REGISTERS_ADDRL = 17
+ , H_REGISTERS_DATAH = 18, H_REGISTERS_DATAL = 19, H_REGISTERS_INTVECH = 20, H_REGISTERS_INTVECL = 21
+ , H_REGISTERS_INTSPD = 22, H_REGISTERS_INTF = 23, H_REGISTERS_INTE = 24, H_REGISTERS_INTED = 25
+ , H_REGISTERS_FCFG = 26, H_REGISTERS_TCTRL = 27, H_REGISTERS_XCFG = 28, H_REGISTERS_EMCFG = 29
+ , H_REGISTERS_IPCH = 30, H_REGISTERS_IPCL = 31, H_REGISTERS_RAIN = 32, H_REGISTERS_RAOUT = 33
+ , H_REGISTERS_RADIR = 34, H_REGISTERS_LFSRH = 35, H_REGISTERS_RBIN = 36, H_REGISTERS_RBOUT = 37
+ , H_REGISTERS_RBDIR = 38, H_REGISTERS_LFSRL = 39, H_REGISTERS_RCIN = 40, H_REGISTERS_RCOUT = 41
+ , H_REGISTERS_RCDIR = 42, H_REGISTERS_LFSRA = 43, H_REGISTERS_RDIN = 44, H_REGISTERS_RDOUT = 45
+ , H_REGISTERS_RDDIR = 46, H_REGISTERS_REIN = 48, H_REGISTERS_REOUT = 49, H_REGISTERS_REDIR = 50
+ , H_REGISTERS_RFIN = 52, H_REGISTERS_RFOUT = 53, H_REGISTERS_RFDIR = 54, H_REGISTERS_RGOUT = 57
+ , H_REGISTERS_RGDIR = 58, H_REGISTERS_RTTMR = 64, H_REGISTERS_RTCFG = 65, H_REGISTERS_T0TMR = 66
+ , H_REGISTERS_T0CFG = 67, H_REGISTERS_T1CNTH = 68, H_REGISTERS_T1CNTL = 69, H_REGISTERS_T1CAP1H = 70
+ , H_REGISTERS_T1CAP1L = 71, H_REGISTERS_T1CAP2H = 72, H_REGISTERS_T1CMP2H = 72, H_REGISTERS_T1CAP2L = 73
+ , H_REGISTERS_T1CMP2L = 73, H_REGISTERS_T1CMP1H = 74, H_REGISTERS_T1CMP1L = 75, H_REGISTERS_T1CFG1H = 76
+ , H_REGISTERS_T1CFG1L = 77, H_REGISTERS_T1CFG2H = 78, H_REGISTERS_T1CFG2L = 79, H_REGISTERS_ADCH = 80
+ , H_REGISTERS_ADCL = 81, H_REGISTERS_ADCCFG = 82, H_REGISTERS_ADCTMR = 83, H_REGISTERS_T2CNTH = 84
+ , H_REGISTERS_T2CNTL = 85, H_REGISTERS_T2CAP1H = 86, H_REGISTERS_T2CAP1L = 87, H_REGISTERS_T2CAP2H = 88
+ , H_REGISTERS_T2CMP2H = 88, H_REGISTERS_T2CAP2L = 89, H_REGISTERS_T2CMP2L = 89, H_REGISTERS_T2CMP1H = 90
+ , H_REGISTERS_T2CMP1L = 91, H_REGISTERS_T2CFG1H = 92, H_REGISTERS_T2CFG1L = 93, H_REGISTERS_T2CFG2H = 94
+ , H_REGISTERS_T2CFG2L = 95, H_REGISTERS_S1TMRH = 96, H_REGISTERS_S1TMRL = 97, H_REGISTERS_S1TBUFH = 98
+ , H_REGISTERS_S1TBUFL = 99, H_REGISTERS_S1TCFG = 100, H_REGISTERS_S1RCNT = 101, H_REGISTERS_S1RBUFH = 102
+ , H_REGISTERS_S1RBUFL = 103, H_REGISTERS_S1RCFG = 104, H_REGISTERS_S1RSYNC = 105, H_REGISTERS_S1INTF = 106
+ , H_REGISTERS_S1INTE = 107, H_REGISTERS_S1MODE = 108, H_REGISTERS_S1SMASK = 109, H_REGISTERS_PSPCFG = 110
+ , H_REGISTERS_CMPCFG = 111, H_REGISTERS_S2TMRH = 112, H_REGISTERS_S2TMRL = 113, H_REGISTERS_S2TBUFH = 114
+ , H_REGISTERS_S2TBUFL = 115, H_REGISTERS_S2TCFG = 116, H_REGISTERS_S2RCNT = 117, H_REGISTERS_S2RBUFH = 118
+ , H_REGISTERS_S2RBUFL = 119, H_REGISTERS_S2RCFG = 120, H_REGISTERS_S2RSYNC = 121, H_REGISTERS_S2INTF = 122
+ , H_REGISTERS_S2INTE = 123, H_REGISTERS_S2MODE = 124, H_REGISTERS_S2SMASK = 125, H_REGISTERS_CALLH = 126
+ , H_REGISTERS_CALLL = 127
+} REGISTER_NAMES;
+
+/* Attributes.  */
+
+/* Enum declaration for machine type selection.  */
+typedef enum mach_attr {
+  MACH_BASE, MACH_IP2022, MACH_IP2022EXT, MACH_MAX
+} MACH_ATTR;
+
+/* Enum declaration for instruction set selection.  */
+typedef enum isa_attr {
+  ISA_IP2K, 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 ip2k_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 ip2k ifield types.  */
+typedef enum ifield_type {
+  IP2K_F_NIL, IP2K_F_ANYOF, IP2K_F_IMM8, IP2K_F_REG
+ , IP2K_F_ADDR16CJP, IP2K_F_DIR, IP2K_F_BITNO, IP2K_F_OP3
+ , IP2K_F_OP4, IP2K_F_OP4MID, IP2K_F_OP6, IP2K_F_OP8
+ , IP2K_F_OP6_10LOW, IP2K_F_OP6_7LOW, IP2K_F_RETI3, IP2K_F_SKIPB
+ , IP2K_F_PAGE3, IP2K_F_MAX
+} IFIELD_TYPE;
+
+#define MAX_IFLD ((int) IP2K_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 ip2k hardware types.  */
+typedef enum cgen_hw_type {
+  HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
+ , HW_H_IADDR, HW_H_SPR, HW_H_REGISTERS, HW_H_STACK
+ , HW_H_PABITS, HW_H_ZBIT, HW_H_CBIT, HW_H_DCBIT
+ , HW_H_PC, 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 ip2k operand types.  */
+typedef enum cgen_operand_type {
+  IP2K_OPERAND_PC, IP2K_OPERAND_ADDR16CJP, IP2K_OPERAND_FR, IP2K_OPERAND_LIT8
+ , IP2K_OPERAND_BITNO, IP2K_OPERAND_ADDR16P, IP2K_OPERAND_ADDR16H, IP2K_OPERAND_ADDR16L
+ , IP2K_OPERAND_RETI3, IP2K_OPERAND_PABITS, IP2K_OPERAND_ZBIT, IP2K_OPERAND_CBIT
+ , IP2K_OPERAND_DCBIT, IP2K_OPERAND_MAX
+} CGEN_OPERAND_TYPE;
+
+/* Number of operands types.  */
+#define MAX_OPERANDS 13
+
+/* 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_EXT_SKIP_INSN, CGEN_INSN_SKIPA
+ , 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 ip2k_cgen_hardware_attr_table[];
+extern const CGEN_ATTR_TABLE ip2k_cgen_ifield_attr_table[];
+extern const CGEN_ATTR_TABLE ip2k_cgen_operand_attr_table[];
+extern const CGEN_ATTR_TABLE ip2k_cgen_insn_attr_table[];
+
+/* Hardware decls.  */
+
+
+
+
+
+#endif /* IP2K_CPU_H */
diff --git a/opcodes/ip2k-dis.c b/opcodes/ip2k-dis.c
new file mode 100644
index 0000000..91aaa61
--- /dev/null
+++ b/opcodes/ip2k-dis.c
@@ -0,0 +1,743 @@
+/* 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 <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "ip2k-desc.h"
+#include "ip2k-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 */
+
+/* -- dis.c */
+
+static void
+print_fr (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+  const CGEN_KEYWORD_ENTRY *ke;
+  extern CGEN_KEYWORD ip2k_cgen_opval_register_names;
+  long offsettest;
+  long offsetvalue;
+
+  if ( value == 0 ) /* This is (IP) */
+  {
+      (*info->fprintf_func) (info->stream, "%s", "(IP)");
+      return;
+  }
+
+  offsettest = value >> 7;
+  offsetvalue = value & 0x7F;
+
+  /* Check to see if first two bits are 10 -> (DP) */
+  if ( offsettest == 2 )
+  {
+      if ( offsetvalue == 0 )
+         (*info->fprintf_func) (info->stream, "%s","(DP)");
+      else
+         (*info->fprintf_func) (info->stream, "$%x%s",offsetvalue, "(DP)");
+      return;
+  }
+
+  /* Check to see if first two bits are 11 -> (SP) */
+  if ( offsettest == 3 )
+  {
+      if ( offsetvalue == 0 )
+         (*info->fprintf_func) (info->stream, "%s", "(SP)");
+      else
+         (*info->fprintf_func) (info->stream, "$%x%s", offsetvalue,"(SP)");
+      return;
+  }
+
+  /* Attempt to print as a register keyword. */
+  ke = cgen_keyword_lookup_value (& ip2k_cgen_opval_register_names, value);
+  if (ke != NULL)
+    {
+      (*info->fprintf_func) (info->stream, "%s", ke->name);
+      return;
+    }
+
+  /* Print as an address literal. */
+  (*info->fprintf_func) (info->stream, "$%02x", value);
+}
+
+static void
+print_dollarhex (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "$%x", value);
+}
+
+static void
+print_dollarhex8 (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "$%02x", value);
+}
+
+static void
+print_dollarhex16 (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "$%04x", value);
+}
+
+static void
+print_dollarhex_addr16h (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  /* This is a loadh instruction. Shift the value to the left      */
+  /* by 8 bits so that disassembled code will reassemble properly. */
+  value = ((value << 8) & 0xFF00);
+
+  (*info->fprintf_func) (info->stream, "$%04x", value);
+}
+
+static void
+print_dollarhex_addr16l (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "$%04x", value);
+}
+
+static void
+print_dollarhex_p (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  value = ((value << 14) & 0x1C000);
+  ;value = (value  & 0x1FFFF);
+  (*info->fprintf_func) (info->stream, "$%05x", value);
+}
+
+static void
+print_dollarhex_cj (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  value = ((value << 1) & 0x1FFFF);
+  (*info->fprintf_func) (info->stream, "$%05x", value);
+}
+
+
+static void
+print_decimal (cd, dis_info, value, attrs, pc, length)
+     CGEN_CPU_DESC cd;
+     PTR dis_info;
+     long value;
+     unsigned int attrs;
+     bfd_vma pc;
+     int length;
+{
+  disassemble_info *info = (disassemble_info *) dis_info;
+
+  (*info->fprintf_func) (info->stream, "%d", value);
+}
+
+
+
+/* -- */
+
+void ip2k_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
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      print_dollarhex_cj (cd, info, fields->f_addr16cjp, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      print_dollarhex_addr16h (cd, info, fields->f_imm8, 0, pc, length);
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      print_dollarhex_addr16l (cd, info, fields->f_imm8, 0, pc, length);
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      print_dollarhex_p (cd, info, fields->f_page3, 0, pc, length);
+      break;
+    case IP2K_OPERAND_BITNO :
+      print_decimal (cd, info, fields->f_bitno, 0, pc, length);
+      break;
+    case IP2K_OPERAND_CBIT :
+      print_normal (cd, info, 0, 0, pc, length);
+      break;
+    case IP2K_OPERAND_DCBIT :
+      print_normal (cd, info, 0, 0, pc, length);
+      break;
+    case IP2K_OPERAND_FR :
+      print_fr (cd, info, fields->f_reg, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
+      break;
+    case IP2K_OPERAND_LIT8 :
+      print_dollarhex8 (cd, info, fields->f_imm8, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+      break;
+    case IP2K_OPERAND_PABITS :
+      print_normal (cd, info, 0, 0, pc, length);
+      break;
+    case IP2K_OPERAND_RETI3 :
+      print_dollarhex (cd, info, fields->f_reti3, 0, pc, length);
+      break;
+    case IP2K_OPERAND_ZBIT :
+      print_normal (cd, info, 0, 0, pc, length);
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while printing insn.\n"),
+	       opindex);
+    abort ();
+  }
+}
+
+cgen_print_fn * const ip2k_cgen_print_handlers[] = 
+{
+  print_insn_normal,
+};
+
+
+void
+ip2k_cgen_init_dis (cd)
+     CGEN_CPU_DESC cd;
+{
+  ip2k_cgen_init_opcode_table (cd);
+  ip2k_cgen_init_ibld_table (cd);
+  cd->print_handlers = & ip2k_cgen_print_handlers[0];
+  cd->print_operand = ip2k_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.  */
+      ip2k_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;
+  int basesize;
+
+  /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
+  basesize = cd->base_insn_bitsize < buflen * 8 ?
+                                     cd->base_insn_bitsize : buflen * 8;
+  insn_value = cgen_get_insn_value (cd, buf, basesize);
+
+
+  /* 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 (! ip2k_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).  */
+
+typedef struct cpu_desc_list {
+  struct cpu_desc_list *next;
+  int isa;
+  int mach;
+  int endian;
+  CGEN_CPU_DESC cd;
+} cpu_desc_list;
+
+int
+print_insn_ip2k (pc, info)
+     bfd_vma pc;
+     disassemble_info *info;
+{
+  static cpu_desc_list *cd_list = 0;
+  cpu_desc_list *cl = 0;
+  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_ip2k
+#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 = info->insn_sets;
+#endif
+
+  /* If we've switched cpu's, try to find a handle we've used before */
+  if (cd
+      && (isa != prev_isa
+	  || mach != prev_mach
+	  || endian != prev_endian))
+    {
+      cd = 0;
+      for (cl = cd_list; cl; cl = cl->next)
+	{
+	  if (cl->isa == isa &&
+	      cl->mach == mach &&
+	      cl->endian == endian)
+	    {
+	      cd = cl->cd;
+	      break;
+	    }
+	}
+    } 
+
+  /* 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 = ip2k_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 ();
+
+      /* save this away for future reference */
+      cl = xmalloc (sizeof (struct cpu_desc_list));
+      cl->cd = cd;
+      cl->isa = isa;
+      cl->mach = mach;
+      cl->endian = endian;
+      cl->next = cd_list;
+      cd_list = cl;
+
+      ip2k_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/ip2k-ibld.c b/opcodes/ip2k-ibld.c
new file mode 100644
index 0000000..22e2d8d
--- /dev/null
+++ b/opcodes/ip2k-ibld.c
@@ -0,0 +1,952 @@
+/* Instruction building/extraction support for ip2k. -*- 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 <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "ip2k-desc.h"
+#include "ip2k-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 <prefix>-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 * ip2k_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 *
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      errmsg = insert_normal (cd, fields->f_addr16cjp, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 12, 13, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      errmsg = insert_normal (cd, fields->f_imm8, 0, 0, 7, 8, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      errmsg = insert_normal (cd, fields->f_imm8, 0, 0, 7, 8, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      errmsg = insert_normal (cd, fields->f_page3, 0, 0, 2, 3, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_BITNO :
+      errmsg = insert_normal (cd, fields->f_bitno, 0, 0, 11, 3, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_CBIT :
+      break;
+    case IP2K_OPERAND_DCBIT :
+      break;
+    case IP2K_OPERAND_FR :
+      errmsg = insert_normal (cd, fields->f_reg, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 9, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_LIT8 :
+      errmsg = insert_normal (cd, fields->f_imm8, 0, 0, 7, 8, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_PABITS :
+      break;
+    case IP2K_OPERAND_RETI3 :
+      errmsg = insert_normal (cd, fields->f_reti3, 0, 0, 2, 3, 16, total_length, buffer);
+      break;
+    case IP2K_OPERAND_ZBIT :
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
+	       opindex);
+      abort ();
+  }
+
+  return errmsg;
+}
+
+int ip2k_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
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 12, 13, 16, total_length, pc, & fields->f_addr16cjp);
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 8, 16, total_length, pc, & fields->f_imm8);
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 8, 16, total_length, pc, & fields->f_imm8);
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 16, total_length, pc, & fields->f_page3);
+      break;
+    case IP2K_OPERAND_BITNO :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 3, 16, total_length, pc, & fields->f_bitno);
+      break;
+    case IP2K_OPERAND_CBIT :
+      break;
+    case IP2K_OPERAND_DCBIT :
+      break;
+    case IP2K_OPERAND_FR :
+      length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_ABS_ADDR), 0, 8, 9, 16, total_length, pc, & fields->f_reg);
+      break;
+    case IP2K_OPERAND_LIT8 :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 8, 16, total_length, pc, & fields->f_imm8);
+      break;
+    case IP2K_OPERAND_PABITS :
+      break;
+    case IP2K_OPERAND_RETI3 :
+      length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 16, total_length, pc, & fields->f_reti3);
+      break;
+    case IP2K_OPERAND_ZBIT :
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
+	       opindex);
+      abort ();
+    }
+
+  return length;
+}
+
+cgen_insert_fn * const ip2k_cgen_insert_handlers[] = 
+{
+  insert_insn_normal,
+};
+
+cgen_extract_fn * const ip2k_cgen_extract_handlers[] = 
+{
+  extract_insn_normal,
+};
+
+int ip2k_cgen_get_int_operand
+  PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
+bfd_vma ip2k_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
+ip2k_cgen_get_int_operand (cd, opindex, fields)
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+     int opindex;
+     const CGEN_FIELDS * fields;
+{
+  int value;
+
+  switch (opindex)
+    {
+    case IP2K_OPERAND_ADDR16CJP :
+      value = fields->f_addr16cjp;
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      value = fields->f_page3;
+      break;
+    case IP2K_OPERAND_BITNO :
+      value = fields->f_bitno;
+      break;
+    case IP2K_OPERAND_CBIT :
+      value = 0;
+      break;
+    case IP2K_OPERAND_DCBIT :
+      value = 0;
+      break;
+    case IP2K_OPERAND_FR :
+      value = fields->f_reg;
+      break;
+    case IP2K_OPERAND_LIT8 :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_PABITS :
+      value = 0;
+      break;
+    case IP2K_OPERAND_RETI3 :
+      value = fields->f_reti3;
+      break;
+    case IP2K_OPERAND_ZBIT :
+      value = 0;
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
+		       opindex);
+      abort ();
+  }
+
+  return value;
+}
+
+bfd_vma
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      value = fields->f_addr16cjp;
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      value = fields->f_page3;
+      break;
+    case IP2K_OPERAND_BITNO :
+      value = fields->f_bitno;
+      break;
+    case IP2K_OPERAND_CBIT :
+      value = 0;
+      break;
+    case IP2K_OPERAND_DCBIT :
+      value = 0;
+      break;
+    case IP2K_OPERAND_FR :
+      value = fields->f_reg;
+      break;
+    case IP2K_OPERAND_LIT8 :
+      value = fields->f_imm8;
+      break;
+    case IP2K_OPERAND_PABITS :
+      value = 0;
+      break;
+    case IP2K_OPERAND_RETI3 :
+      value = fields->f_reti3;
+      break;
+    case IP2K_OPERAND_ZBIT :
+      value = 0;
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
+		       opindex);
+      abort ();
+  }
+
+  return value;
+}
+
+void ip2k_cgen_set_int_operand
+  PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, int));
+void ip2k_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
+ip2k_cgen_set_int_operand (cd, opindex, fields, value)
+     CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+     int opindex;
+     CGEN_FIELDS * fields;
+     int value;
+{
+  switch (opindex)
+    {
+    case IP2K_OPERAND_ADDR16CJP :
+      fields->f_addr16cjp = value;
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      fields->f_page3 = value;
+      break;
+    case IP2K_OPERAND_BITNO :
+      fields->f_bitno = value;
+      break;
+    case IP2K_OPERAND_CBIT :
+      break;
+    case IP2K_OPERAND_DCBIT :
+      break;
+    case IP2K_OPERAND_FR :
+      fields->f_reg = value;
+      break;
+    case IP2K_OPERAND_LIT8 :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_PABITS :
+      break;
+    case IP2K_OPERAND_RETI3 :
+      fields->f_reti3 = value;
+      break;
+    case IP2K_OPERAND_ZBIT :
+      break;
+
+    default :
+      /* xgettext:c-format */
+      fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
+		       opindex);
+      abort ();
+  }
+}
+
+void
+ip2k_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 IP2K_OPERAND_ADDR16CJP :
+      fields->f_addr16cjp = value;
+      break;
+    case IP2K_OPERAND_ADDR16H :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_ADDR16L :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_ADDR16P :
+      fields->f_page3 = value;
+      break;
+    case IP2K_OPERAND_BITNO :
+      fields->f_bitno = value;
+      break;
+    case IP2K_OPERAND_CBIT :
+      break;
+    case IP2K_OPERAND_DCBIT :
+      break;
+    case IP2K_OPERAND_FR :
+      fields->f_reg = value;
+      break;
+    case IP2K_OPERAND_LIT8 :
+      fields->f_imm8 = value;
+      break;
+    case IP2K_OPERAND_PABITS :
+      break;
+    case IP2K_OPERAND_RETI3 :
+      fields->f_reti3 = value;
+      break;
+    case IP2K_OPERAND_ZBIT :
+      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
+ip2k_cgen_init_ibld_table (cd)
+     CGEN_CPU_DESC cd;
+{
+  cd->insert_handlers = & ip2k_cgen_insert_handlers[0];
+  cd->extract_handlers = & ip2k_cgen_extract_handlers[0];
+
+  cd->insert_operand = ip2k_cgen_insert_operand;
+  cd->extract_operand = ip2k_cgen_extract_operand;
+
+  cd->get_int_operand = ip2k_cgen_get_int_operand;
+  cd->set_int_operand = ip2k_cgen_set_int_operand;
+  cd->get_vma_operand = ip2k_cgen_get_vma_operand;
+  cd->set_vma_operand = ip2k_cgen_set_vma_operand;
+}
diff --git a/opcodes/ip2k-opc.c b/opcodes/ip2k-opc.c
new file mode 100644
index 0000000..311a0f7
--- /dev/null
+++ b/opcodes/ip2k-opc.c
@@ -0,0 +1,914 @@
+/* Instruction opcode table for ip2k.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 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 "ip2k-desc.h"
+#include "ip2k-opc.h"
+#include "libiberty.h"
+
+/* -- opc.c */
+
+/* A better hash function for instruction mnemonics. */
+unsigned int
+ip2k_asm_hash (insn)
+     const char* insn;
+{
+  unsigned int hash;
+  const char* m = insn;
+
+  for (hash = 0; *m && !isspace(*m); m++)
+    hash = (hash * 23) ^ (0x1F & tolower(*m));
+
+  /* printf ("%s %d\n", insn, (hash % CGEN_ASM_HASH_SIZE)); */
+
+  return hash % CGEN_ASM_HASH_SIZE;
+}
+
+
+
+
+/* -- asm.c */
+/* 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) & ip2k_cgen_ifld_table[IP2K_##f]
+#else
+#define F(f) & ip2k_cgen_ifld_table[IP2K_/**/f]
+#endif
+static const CGEN_IFMT ifmt_empty = {
+  0, 0, 0x0, { { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jmp = {
+  16, 16, 0xe000, { { F (F_OP3) }, { F (F_ADDR16CJP) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb = {
+  16, 16, 0xf000, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_xorw_l = {
+  16, 16, 0xff00, { { F (F_OP4) }, { F (F_OP4MID) }, { F (F_IMM8) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_loadl_a = {
+  16, 16, 0xff00, { { F (F_OP4) }, { F (F_OP4MID) }, { F (F_IMM8) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_loadh_a = {
+  16, 16, 0xff00, { { F (F_OP4) }, { F (F_OP4MID) }, { F (F_IMM8) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_addcfr_w = {
+  16, 16, 0xfe00, { { F (F_OP6) }, { F (F_DIR) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_speed = {
+  16, 16, 0xff00, { { F (F_OP8) }, { F (F_IMM8) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ireadi = {
+  16, 16, 0xffff, { { F (F_OP6) }, { F (F_OP6_10LOW) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_page = {
+  16, 16, 0xfff8, { { F (F_OP6) }, { F (F_OP6_7LOW) }, { F (F_PAGE3) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_reti = {
+  16, 16, 0xfff8, { { F (F_OP6) }, { F (F_OP6_7LOW) }, { F (F_RETI3) }, { 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) IP2K_OPERAND_##op
+#else
+#define OPERAND(op) IP2K_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 ip2k_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}},
+/* jmp $addr16cjp */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (ADDR16CJP), 0 } },
+    & ifmt_jmp, { 0xe000 }
+  },
+/* call $addr16cjp */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (ADDR16CJP), 0 } },
+    & ifmt_jmp, { 0xc000 }
+  },
+/* sb $fr,$bitno */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', OP (BITNO), 0 } },
+    & ifmt_sb, { 0xb000 }
+  },
+/* snb $fr,$bitno */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', OP (BITNO), 0 } },
+    & ifmt_sb, { 0xa000 }
+  },
+/* setb $fr,$bitno */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', OP (BITNO), 0 } },
+    & ifmt_sb, { 0x9000 }
+  },
+/* clrb $fr,$bitno */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', OP (BITNO), 0 } },
+    & ifmt_sb, { 0x8000 }
+  },
+/* xor W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7f00 }
+  },
+/* and W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7e00 }
+  },
+/* or W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7d00 }
+  },
+/* add W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7b00 }
+  },
+/* sub W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7a00 }
+  },
+/* cmp W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7900 }
+  },
+/* retw #$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7800 }
+  },
+/* cse W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7700 }
+  },
+/* csne W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7600 }
+  },
+/* push #$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7400 }
+  },
+/* muls W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7300 }
+  },
+/* mulu W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7200 }
+  },
+/* loadl #$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7100 }
+  },
+/* loadh #$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7000 }
+  },
+/* loadl $addr16l */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (ADDR16L), 0 } },
+    & ifmt_loadl_a, { 0x7100 }
+  },
+/* loadh $addr16h */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (ADDR16H), 0 } },
+    & ifmt_loadh_a, { 0x7000 }
+  },
+/* addc $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x5e00 }
+  },
+/* addc W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x5c00 }
+  },
+/* incsnz $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x5a00 }
+  },
+/* incsnz W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x5800 }
+  },
+/* muls W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x5400 }
+  },
+/* mulu W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x5000 }
+  },
+/* decsnz $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4e00 }
+  },
+/* decsnz W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4c00 }
+  },
+/* subc W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4800 }
+  },
+/* subc $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x4a00 }
+  },
+/* pop $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4600 }
+  },
+/* push $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4400 }
+  },
+/* cse W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4200 }
+  },
+/* csne W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x4000 }
+  },
+/* incsz $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3e00 }
+  },
+/* incsz W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3c00 }
+  },
+/* swap $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3a00 }
+  },
+/* swap W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3800 }
+  },
+/* rl $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3600 }
+  },
+/* rl W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3400 }
+  },
+/* rr $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3200 }
+  },
+/* rr W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x3000 }
+  },
+/* decsz $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2e00 }
+  },
+/* decsz W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2c00 }
+  },
+/* inc $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2a00 }
+  },
+/* inc W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2800 }
+  },
+/* not $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2600 }
+  },
+/* not W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2400 }
+  },
+/* test $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2200 }
+  },
+/* mov W,#$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', '#', OP (LIT8), 0 } },
+    & ifmt_xorw_l, { 0x7c00 }
+  },
+/* mov $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x200 }
+  },
+/* mov W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x2000 }
+  },
+/* add $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x1e00 }
+  },
+/* add W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x1c00 }
+  },
+/* xor $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x1a00 }
+  },
+/* xor W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x1800 }
+  },
+/* and $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x1600 }
+  },
+/* and W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x1400 }
+  },
+/* or $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0x1200 }
+  },
+/* or W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x1000 }
+  },
+/* dec $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0xe00 }
+  },
+/* dec W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0xc00 }
+  },
+/* sub $fr,W */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), ',', 'W', 0 } },
+    & ifmt_addcfr_w, { 0xa00 }
+  },
+/* sub W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x800 }
+  },
+/* clr $fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x600 }
+  },
+/* cmp W,$fr */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', 'W', ',', OP (FR), 0 } },
+    & ifmt_addcfr_w, { 0x400 }
+  },
+/* speed #$lit8 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (LIT8), 0 } },
+    & ifmt_speed, { 0x100 }
+  },
+/* ireadi */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x1d }
+  },
+/* iwritei */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x1c }
+  },
+/* fread */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x1b }
+  },
+/* fwrite */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x1a }
+  },
+/* iread */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x19 }
+  },
+/* iwrite */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x18 }
+  },
+/* page $addr16p */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (ADDR16P), 0 } },
+    & ifmt_page, { 0x10 }
+  },
+/* system */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0xff }
+  },
+/* reti #$reti3 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', '#', OP (RETI3), 0 } },
+    & ifmt_reti, { 0x8 }
+  },
+/* ret */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x7 }
+  },
+/* int */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x6 }
+  },
+/* breakx */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x5 }
+  },
+/* cwdt */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x4 }
+  },
+/* ferase */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x3 }
+  },
+/* retnp */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x2 }
+  },
+/* break */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x1 }
+  },
+/* nop */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_ireadi, { 0x0 }
+  },
+};
+
+#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) & ip2k_cgen_ifld_table[IP2K_##f]
+#else
+#define F(f) & ip2k_cgen_ifld_table[IP2K_/**/f]
+#endif
+static const CGEN_IFMT ifmt_sc = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_snc = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sz = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_snz = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_skip = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_skipb = {
+  16, 16, 0xffff, { { F (F_OP4) }, { F (F_BITNO) }, { F (F_REG) }, { 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) IP2K_OPERAND_##op
+#else
+#define OPERAND(op) IP2K_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 ip2k_cgen_macro_insn_table[] =
+{
+/* sc */
+  {
+    -1, "sc", "sc", 16,
+    { 0|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+/* snc */
+  {
+    -1, "snc", "snc", 16,
+    { 0|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+/* sz */
+  {
+    -1, "sz", "sz", 16,
+    { 0|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+/* snz */
+  {
+    -1, "snz", "snz", 16,
+    { 0|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+/* skip */
+  {
+    -1, "skip", "skip", 16,
+    { 0|A(SKIPA)|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+/* skip */
+  {
+    -1, "skipb", "skip", 16,
+    { 0|A(SKIPA)|A(ALIAS), { (1<<MACH_BASE) } }
+  },
+};
+
+/* The macro instruction opcode table.  */
+
+static const CGEN_OPCODE ip2k_cgen_macro_insn_opcode_table[] =
+{
+/* sc */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_sc, { 0xb00b }
+  },
+/* snc */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_snc, { 0xa00b }
+  },
+/* sz */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_sz, { 0xb40b }
+  },
+/* snz */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_snz, { 0xa40b }
+  },
+/* skip */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_skip, { 0xa009 }
+  },
+/* skip */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, 0 } },
+    & ifmt_skipb, { 0xb009 }
+  },
+};
+
+#undef A
+#undef OPERAND
+#undef MNEM
+#undef OP
+
+#ifndef CGEN_ASM_HASH_P
+#define CGEN_ASM_HASH_P(insn) 1
+#endif
+
+#ifndef CGEN_DIS_HASH_P
+#define CGEN_DIS_HASH_P(insn) 1
+#endif
+
+/* Return non-zero if INSN is to be added to the hash table.
+   Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file.  */
+
+static int
+asm_hash_insn_p (insn)
+     const CGEN_INSN *insn ATTRIBUTE_UNUSED;
+{
+  return CGEN_ASM_HASH_P (insn);
+}
+
+static int
+dis_hash_insn_p (insn)
+     const CGEN_INSN *insn;
+{
+  /* If building the hash table and the NO-DIS attribute is present,
+     ignore.  */
+  if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
+    return 0;
+  return CGEN_DIS_HASH_P (insn);
+}
+
+#ifndef CGEN_ASM_HASH
+#define CGEN_ASM_HASH_SIZE 127
+#ifdef CGEN_MNEMONIC_OPERANDS
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
+#else
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
+#endif
+#endif
+
+/* It doesn't make much sense to provide a default here,
+   but while this is under development we do.
+   BUFFER is a pointer to the bytes of the insn, target order.
+   VALUE is the first base_insn_bitsize bits as an int in host order.  */
+
+#ifndef CGEN_DIS_HASH
+#define CGEN_DIS_HASH_SIZE 256
+#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
+#endif
+
+/* The result is the hash value of the insn.
+   Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file.  */
+
+static unsigned int
+asm_hash_insn (mnem)
+     const char * mnem;
+{
+  return CGEN_ASM_HASH (mnem);
+}
+
+/* BUF is a pointer to the bytes of the insn, target order.
+   VALUE is the first base_insn_bitsize bits as an int in host order.  */
+
+static unsigned int
+dis_hash_insn (buf, value)
+     const char * buf ATTRIBUTE_UNUSED;
+     CGEN_INSN_INT value ATTRIBUTE_UNUSED;
+{
+  return CGEN_DIS_HASH (buf, value);
+}
+
+static void set_fields_bitsize PARAMS ((CGEN_FIELDS *, int));
+
+/* Set the recorded length of the insn in the CGEN_FIELDS struct.  */
+
+static void
+set_fields_bitsize (fields, size)
+     CGEN_FIELDS *fields;
+     int size;
+{
+  CGEN_FIELDS_BITSIZE (fields) = size;
+}
+
+/* Function to call before using the operand instance table.
+   This plugs the opcode entries and macro instructions into the cpu table.  */
+
+void
+ip2k_cgen_init_opcode_table (cd)
+     CGEN_CPU_DESC cd;
+{
+  int i;
+  int num_macros = (sizeof (ip2k_cgen_macro_insn_table) /
+		    sizeof (ip2k_cgen_macro_insn_table[0]));
+  const CGEN_IBASE *ib = & ip2k_cgen_macro_insn_table[0];
+  const CGEN_OPCODE *oc = & ip2k_cgen_macro_insn_opcode_table[0];
+  CGEN_INSN *insns = (CGEN_INSN *) xmalloc (num_macros * sizeof (CGEN_INSN));
+  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+  for (i = 0; i < num_macros; ++i)
+    {
+      insns[i].base = &ib[i];
+      insns[i].opcode = &oc[i];
+      ip2k_cgen_build_insn_regex (& insns[i]);
+    }
+  cd->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 = & ip2k_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];
+      ip2k_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/ip2k-opc.h b/opcodes/ip2k-opc.h
new file mode 100644
index 0000000..0f8df98
--- /dev/null
+++ b/opcodes/ip2k-opc.h
@@ -0,0 +1,133 @@
+/* Instruction opcode header for ip2k.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 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 IP2K_OPC_H
+#define IP2K_OPC_H
+
+/* -- opc.h */
+
+/* Check applicability of instructions against machines.  */
+#define CGEN_VALIDATE_INSN_SUPPORTED
+
+/* Allows reason codes to be output when assembler errors occur.  */
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
+/* Override disassembly hashing - there are variable bits in the top
+   byte of these instructions.  */
+#define CGEN_DIS_HASH_SIZE 8
+#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 5) % CGEN_DIS_HASH_SIZE)
+
+#define CGEN_ASM_HASH_SIZE 127
+#define CGEN_ASM_HASH(insn) ip2k_asm_hash(insn)
+
+extern unsigned int ip2k_asm_hash (const char *insn);
+
+
+/* Special check to ensure that instruction exists for given machine. */
+static int
+ip2k_cgen_insn_supported (cd, insn)
+     CGEN_CPU_DESC cd;
+     CGEN_INSN *insn;
+{
+  int machs = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_MACH);
+
+  /* No mach attribute?  Assume it's supported for all machs.  */
+  if (machs == 0)
+    return 1;
+  
+  return ((machs & cd->machs) != 0);
+}
+
+
+/* -- opc.c */
+/* Enum declaration for ip2k instruction types.  */
+typedef enum cgen_insn_type {
+  IP2K_INSN_INVALID, IP2K_INSN_JMP, IP2K_INSN_CALL, IP2K_INSN_SB
+ , IP2K_INSN_SNB, IP2K_INSN_SETB, IP2K_INSN_CLRB, IP2K_INSN_XORW_L
+ , IP2K_INSN_ANDW_L, IP2K_INSN_ORW_L, IP2K_INSN_ADDW_L, IP2K_INSN_SUBW_L
+ , IP2K_INSN_CMPW_L, IP2K_INSN_RETW_L, IP2K_INSN_CSEW_L, IP2K_INSN_CSNEW_L
+ , IP2K_INSN_PUSH_L, IP2K_INSN_MULSW_L, IP2K_INSN_MULUW_L, IP2K_INSN_LOADL_L
+ , IP2K_INSN_LOADH_L, IP2K_INSN_LOADL_A, IP2K_INSN_LOADH_A, IP2K_INSN_ADDCFR_W
+ , IP2K_INSN_ADDCW_FR, IP2K_INSN_INCSNZ_FR, IP2K_INSN_INCSNZW_FR, IP2K_INSN_MULSW_FR
+ , IP2K_INSN_MULUW_FR, IP2K_INSN_DECSNZ_FR, IP2K_INSN_DECSNZW_FR, IP2K_INSN_SUBCW_FR
+ , IP2K_INSN_SUBCFR_W, IP2K_INSN_POP_FR, IP2K_INSN_PUSH_FR, IP2K_INSN_CSEW_FR
+ , IP2K_INSN_CSNEW_FR, IP2K_INSN_INCSZ_FR, IP2K_INSN_INCSZW_FR, IP2K_INSN_SWAP_FR
+ , IP2K_INSN_SWAPW_FR, IP2K_INSN_RL_FR, IP2K_INSN_RLW_FR, IP2K_INSN_RR_FR
+ , IP2K_INSN_RRW_FR, IP2K_INSN_DECSZ_FR, IP2K_INSN_DECSZW_FR, IP2K_INSN_INC_FR
+ , IP2K_INSN_INCW_FR, IP2K_INSN_NOT_FR, IP2K_INSN_NOTW_FR, IP2K_INSN_TEST_FR
+ , IP2K_INSN_MOVW_L, IP2K_INSN_MOVFR_W, IP2K_INSN_MOVW_FR, IP2K_INSN_ADDFR_W
+ , IP2K_INSN_ADDW_FR, IP2K_INSN_XORFR_W, IP2K_INSN_XORW_FR, IP2K_INSN_ANDFR_W
+ , IP2K_INSN_ANDW_FR, IP2K_INSN_ORFR_W, IP2K_INSN_ORW_FR, IP2K_INSN_DEC_FR
+ , IP2K_INSN_DECW_FR, IP2K_INSN_SUBFR_W, IP2K_INSN_SUBW_FR, IP2K_INSN_CLR_FR
+ , IP2K_INSN_CMPW_FR, IP2K_INSN_SPEED, IP2K_INSN_IREADI, IP2K_INSN_IWRITEI
+ , IP2K_INSN_FREAD, IP2K_INSN_FWRITE, IP2K_INSN_IREAD, IP2K_INSN_IWRITE
+ , IP2K_INSN_PAGE, IP2K_INSN_SYSTEM, IP2K_INSN_RETI, IP2K_INSN_RET
+ , IP2K_INSN_INT, IP2K_INSN_BREAKX, IP2K_INSN_CWDT, IP2K_INSN_FERASE
+ , IP2K_INSN_RETNP, IP2K_INSN_BREAK, IP2K_INSN_NOP
+} CGEN_INSN_TYPE;
+
+/* Index of `invalid' insn place holder.  */
+#define CGEN_INSN_INVALID IP2K_INSN_INVALID
+
+/* Total number of insns in table.  */
+#define MAX_INSNS ((int) IP2K_INSN_NOP + 1)
+
+/* This struct records data prior to insertion or after extraction.  */
+struct cgen_fields
+{
+  int length;
+  long f_nil;
+  long f_anyof;
+  long f_imm8;
+  long f_reg;
+  long f_addr16cjp;
+  long f_dir;
+  long f_bitno;
+  long f_op3;
+  long f_op4;
+  long f_op4mid;
+  long f_op6;
+  long f_op8;
+  long f_op6_10low;
+  long f_op6_7low;
+  long f_reti3;
+  long f_skipb;
+  long f_page3;
+};
+
+#define CGEN_INIT_PARSE(od) \
+{\
+}
+#define CGEN_INIT_INSERT(od) \
+{\
+}
+#define CGEN_INIT_EXTRACT(od) \
+{\
+}
+#define CGEN_INIT_PRINT(od) \
+{\
+}
+
+
+#endif /* IP2K_OPC_H */
diff --git a/opcodes/m68hc11-dis.c b/opcodes/m68hc11-dis.c
index bb0cc20..c721d16 100644
--- a/opcodes/m68hc11-dis.c
+++ b/opcodes/m68hc11-dis.c
@@ -1,6 +1,6 @@
 /* m68hc11-dis.c -- Motorola 68HC11 & 68HC12 disassembly
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 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
@@ -40,7 +40,7 @@
 static int read_memory
   PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
 static int print_indexed_operand
-  PARAMS ((bfd_vma, struct disassemble_info *, int));
+  PARAMS ((bfd_vma, struct disassemble_info *, int*, int));
 static int print_insn
   PARAMS ((bfd_vma, struct disassemble_info *, int));
 
@@ -68,9 +68,10 @@
 /* Read the 68HC12 indexed operand byte and print the corresponding mode.
    Returns the number of bytes read or -1 if failure.  */
 static int
-print_indexed_operand (memaddr, info, mov_insn)
+print_indexed_operand (memaddr, info, indirect, mov_insn)
      bfd_vma memaddr;
      struct disassemble_info *info;
+     int *indirect;
      int mov_insn;
 {
   bfd_byte buffer[4];
@@ -79,6 +80,9 @@
   short sval;
   int pos = 1;
 
+  if (indirect)
+    *indirect = 0;
+
   status = read_memory (memaddr, &buffer[0], 1, info);
   if (status != 0)
     {
@@ -140,6 +144,8 @@
       sval = ((buffer[0] << 8) | (buffer[1] & 0x0FF));
       (*info->fprintf_func) (info->stream, "[%u,%s]",
 			     sval & 0x0ffff, reg_name[reg]);
+      if (indirect)
+        *indirect = 1;
     }
   else if ((buffer[0] & 0x4) == 0)
     {
@@ -189,6 +195,8 @@
 	case 3:
 	default:
 	  (*info->fprintf_func) (info->stream, "[D,%s]", reg_name[reg]);
+          if (indirect)
+            *indirect = 1;
 	  break;
 	}
     }
@@ -440,12 +448,19 @@
       /* Analyze the 68HC12 indexed byte.  */
       if (format & M6812_INDEXED_FLAGS)
 	{
-	  status = print_indexed_operand (memaddr + pos, info, 0);
+          int indirect;
+
+	  status = print_indexed_operand (memaddr + pos, info, &indirect, 0);
 	  if (status < 0)
 	    {
 	      return status;
 	    }
 	  pos += status;
+
+          /* The indirect addressing mode of the call instruction does
+             not need the page code.  */
+          if ((format & M6812_OP_PAGE) && indirect)
+            format &= ~M6812_OP_PAGE;
 	}
 
       /* 68HC12 dbcc/ibcc/tbcc operands.  */
@@ -532,6 +547,8 @@
       if (format & (M6811_OP_IMM16 | M6811_OP_IND16))
 	{
 	  int val;
+          bfd_vma addr;
+          unsigned page = 0;
 
 	  status = read_memory (memaddr + pos + offset, &buffer[0], 2, info);
 	  if (status != 0)
@@ -546,6 +563,38 @@
 
 	  val = ((buffer[0] << 8) | (buffer[1] & 0x0FF));
 	  val &= 0x0FFFF;
+          addr = val;
+          if (format & M6812_OP_PAGE)
+            {
+              status = read_memory (memaddr + pos + offset, buffer, 1, info);
+              if (status != 0)
+                return status;
+
+              page = (unsigned) buffer[0];
+              if (addr >= M68HC12_BANK_BASE && addr < 0x0c000)
+                addr = ((val - M68HC12_BANK_BASE)
+                        | (page << M68HC12_BANK_SHIFT))
+                   + M68HC12_BANK_VIRT;
+            }
+          else if ((arch & cpu6812)
+                   && addr >= M68HC12_BANK_BASE && addr < 0x0c000)
+             {
+                int cur_page;
+                bfd_vma vaddr;
+                
+                if (memaddr >= M68HC12_BANK_VIRT)
+                   cur_page = ((memaddr - M68HC12_BANK_VIRT)
+                               >> M68HC12_BANK_SHIFT);
+                else
+                   cur_page = 0;
+
+                vaddr = ((addr - M68HC12_BANK_BASE)
+                         + (cur_page << M68HC12_BANK_SHIFT))
+                   + M68HC12_BANK_VIRT;
+                if (!info->symbol_at_address_func (addr, info)
+                    && info->symbol_at_address_func (vaddr, info))
+                   addr = vaddr;
+             }
 	  if (format & M6811_OP_IMM16)
 	    {
 	      format &= ~M6811_OP_IMM16;
@@ -554,13 +603,21 @@
 	  else
 	    format &= ~M6811_OP_IND16;
 
-	  (*info->print_address_func) (val, info);
+	  (*info->print_address_func) (addr, info);
+          if (format & M6812_OP_PAGE)
+            {
+              (* info->fprintf_func) (info->stream, " {");
+              (* info->print_address_func) (val, info);
+              (* info->fprintf_func) (info->stream, ", %d}", page);
+              format &= ~M6812_OP_PAGE;
+              pos += 1;
+            }
 	}
 
       if (format & M6812_OP_IDX_P2)
 	{
 	  (*info->fprintf_func) (info->stream, ", ");
-	  status = print_indexed_operand (memaddr + pos + offset, info, 1);
+	  status = print_indexed_operand (memaddr + pos + offset, info, 0, 1);
 	  if (status < 0)
 	    return status;
 	  pos += status;
@@ -584,6 +641,21 @@
 	  (*info->print_address_func) (val, info);
 	}
 
+      if (format & M6812_OP_PAGE)
+	{
+	  int val;
+
+	  status = read_memory (memaddr + pos + offset, &buffer[0], 1, info);
+	  if (status != 0)
+	    {
+	      return status;
+	    }
+	  pos += 1;
+
+	  val = buffer[0] & 0x0ff;
+	  (*info->fprintf_func) (info->stream, ", %d", val);
+	}
+      
 #ifdef DEBUG
       /* Consistency check.  'format' must be 0, so that we have handled
          all formats; and the computed size of the insn must match the
diff --git a/opcodes/m68hc11-opc.c b/opcodes/m68hc11-opc.c
index 1e37971..53cb358 100644
--- a/opcodes/m68hc11-opc.c
+++ b/opcodes/m68hc11-opc.c
@@ -1,6 +1,6 @@
 /* m68hc11-opc.c -- Motorola 68HC11 & 68HC12 opcode list
-   Copyright 1999, 2000 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -76,6 +76,7 @@
 #define OP_IX           M6811_OP_IX
 #define OP_IY           M6811_OP_IY
 #define OP_IND16        M6811_OP_IND16
+#define OP_PAGE         M6812_OP_PAGE
 #define OP_IDX          M6812_OP_IDX
 #define OP_IDX_1        M6812_OP_IDX_1
 #define OP_IDX_2        M6812_OP_IDX_2
@@ -83,8 +84,9 @@
 #define OP_D_IDX_2      M6812_OP_D_IDX_2
 #define OP_DIRECT       M6811_OP_DIRECT
 #define OP_BITMASK      M6811_OP_BITMASK
-#define OP_JUMP_REL     M6811_OP_JUMP_REL
-#define OP_JUMP_REL16   M6812_OP_JUMP_REL16
+#define OP_BRANCH       M6811_OP_BRANCH
+#define OP_JUMP_REL     (M6811_OP_JUMP_REL|OP_BRANCH)
+#define OP_JUMP_REL16   (M6812_OP_JUMP_REL16|OP_BRANCH)
 #define OP_REG          M6812_OP_REG
 #define OP_REG_1        M6812_OP_REG
 #define OP_REG_2        M6812_OP_REG_2
@@ -325,12 +327,18 @@
   { "bvc",  OP_JUMP_REL,       2, 0x28,  1,  3, CHG_NONE, cpu6811 | cpu6812 },
   { "bvs",  OP_JUMP_REL,       2, 0x29,  1,  3, CHG_NONE, cpu6811 | cpu6812 },
 
-  { "call", OP_IND16,          4, 0x4a,  8,  8,  CHG_NONE, cpu6812 },
-  { "call", OP_IDX,            3, 0x4b,  8,  8,  CHG_NONE, cpu6812 },
-  { "call", OP_IDX_1,          4, 0x4b,  8,  8,  CHG_NONE, cpu6812 },
-  { "call", OP_IDX_2,          5, 0x4b,  9,  9,  CHG_NONE, cpu6812 },
-  { "call", OP_D_IDX,          2, 0x4b, 10, 10,  CHG_NONE, cpu6812 },
-  { "call", OP_D_IDX_2,        4, 0x4b, 10, 10,  CHG_NONE, cpu6812 },
+  { "call", OP_IND16 | OP_PAGE
+          | OP_BRANCH,         4, 0x4a,  8,  8,  CHG_NONE, cpu6812 },
+  { "call", OP_IDX | OP_PAGE
+          | OP_BRANCH,         3, 0x4b,  8,  8,  CHG_NONE, cpu6812 },
+  { "call", OP_IDX_1 | OP_PAGE
+          | OP_BRANCH,         4, 0x4b,  8,  8,  CHG_NONE, cpu6812 },
+  { "call", OP_IDX_2 | OP_PAGE
+          | OP_BRANCH,         5, 0x4b,  9,  9,  CHG_NONE, cpu6812 },
+  { "call", OP_D_IDX
+          | OP_BRANCH,         2, 0x4b, 10, 10,  CHG_NONE, cpu6812 },
+  { "call", OP_D_IDX_2
+          | OP_BRANCH,         4, 0x4b, 10, 10,  CHG_NONE, cpu6812 },
 
   { "cba",  OP_NONE,           1, 0x11,  2,  2,  CHG_NZVC, cpu6811 },
   { "cba",  OP_NONE | OP_PAGE2,2, 0x17,  2,  2,  CHG_NZVC, cpu6812 },
@@ -564,22 +572,22 @@
   { "iny",  OP_NONE |OP_PAGE2,     2, 0x08,  4,  4,  CHG_Z, cpu6811 },
   { "iny",  OP_NONE,               1, 0x02,  1,  1,  CHG_Z, cpu6812 },
 
-  { "jmp",  OP_IND16,              3, 0x7e,  3,  3,  CHG_NONE, cpu6811 },
+  { "jmp",  OP_IND16 | OP_BRANCH,  3, 0x7e,  3,  3,  CHG_NONE, cpu6811 },
   { "jmp",  OP_IX,                 2, 0x6e,  3,  3,  CHG_NONE, cpu6811 },
   { "jmp",  OP_IY | OP_PAGE2,      3, 0x6e,  4,  4,  CHG_NONE, cpu6811 },
-  { "jmp",  OP_IND16,              3, 0x06,  3,  3,  CHG_NONE, cpu6812 },
+  { "jmp",  OP_IND16 | OP_BRANCH,  3, 0x06,  3,  3,  CHG_NONE, cpu6812 },
   { "jmp",  OP_IDX,                2, 0x05,  3,  3,  CHG_NONE, cpu6812 },
   { "jmp",  OP_IDX_1,              3, 0x05,  3,  3,  CHG_NONE, cpu6812 },
   { "jmp",  OP_IDX_2,              4, 0x05,  4,  4,  CHG_NONE, cpu6812 },
   { "jmp",  OP_D_IDX,              2, 0x05,  6,  6,  CHG_NONE, cpu6812 },
   { "jmp",  OP_D_IDX_2,            4, 0x05,  6,  6,  CHG_NONE, cpu6812 },
 
-  { "jsr",  OP_DIRECT,             2, 0x9d,  5,  5,  CHG_NONE, cpu6811 },
-  { "jsr",  OP_IND16,              3, 0xbd,  6,  6,  CHG_NONE, cpu6811 },
+  { "jsr",  OP_DIRECT | OP_BRANCH, 2, 0x9d,  5,  5,  CHG_NONE, cpu6811 },
+  { "jsr",  OP_IND16 | OP_BRANCH,  3, 0xbd,  6,  6,  CHG_NONE, cpu6811 },
   { "jsr",  OP_IX,                 2, 0xad,  6,  6,  CHG_NONE, cpu6811 },
   { "jsr",  OP_IY | OP_PAGE2,      3, 0xad,  6,  6,  CHG_NONE, cpu6811 },
-  { "jsr",  OP_DIRECT,             2, 0x17,  4,  4,  CHG_NONE, cpu6812 },
-  { "jsr",  OP_IND16,              3, 0x16,  4,  3,  CHG_NONE, cpu6812 },
+  { "jsr",  OP_DIRECT | OP_BRANCH, 2, 0x17,  4,  4,  CHG_NONE, cpu6812 },
+  { "jsr",  OP_IND16 | OP_BRANCH,  3, 0x16,  4,  3,  CHG_NONE, cpu6812 },
   { "jsr",  OP_IDX,                2, 0x15,  4,  4,  CHG_NONE, cpu6812 },
   { "jsr",  OP_IDX_1,              3, 0x15,  4,  4,  CHG_NONE, cpu6812 },
   { "jsr",  OP_IDX_2,              4, 0x15,  5,  5,  CHG_NONE, cpu6812 },
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index d575088..12c0b94 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -46,7 +46,7 @@
 print_insn_arg PARAMS ((const char *, unsigned char *, unsigned char *,
 			bfd_vma, disassemble_info *));
 
-CONST char * CONST fpcr_names[] = {
+const char * const fpcr_names[] = {
     "", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
     "%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
 };
@@ -478,7 +478,7 @@
   register int place = d[1];
   register unsigned char *p = p0;
   int regno;
-  register CONST char *regname;
+  register const char *regname;
   register unsigned char *p1;
   double flval;
   int flt_p;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 661c179..9b35a47 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -284,6 +284,53 @@
 			     (l >> OP_SH_SEL) & OP_MASK_SEL);
       break;
 
+    case 'O':
+      (*info->fprintf_func) (info->stream, "%d",
+			     (l >> OP_SH_ALN) & OP_MASK_ALN);
+      break;
+
+    case 'Q':
+      {
+	unsigned int vsel = (l >> OP_SH_VSEL) & OP_MASK_VSEL;
+	if ((vsel & 0x10) == 0)
+	  {
+	    int fmt;
+	    vsel &= 0x0f;
+	    for (fmt = 0; fmt < 3; fmt++, vsel >>= 1)
+	      if ((vsel & 1) == 0)
+		break;
+	    (*info->fprintf_func) (info->stream, "$v%d[%d]",
+				   (l >> OP_SH_FT) & OP_MASK_FT, 
+				   vsel >> 1);
+	  }
+	else if ((vsel & 0x08) == 0)
+	  {
+	    (*info->fprintf_func) (info->stream, "$v%d",
+				   (l >> OP_SH_FT) & OP_MASK_FT);
+	  }
+	else
+	  {
+	    (*info->fprintf_func) (info->stream, "0x%x",
+				   (l >> OP_SH_FT) & OP_MASK_FT);
+	  }
+      }
+      break;
+
+    case 'X':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FD) & OP_MASK_FD);
+      break;
+
+    case 'Y':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FS) & OP_MASK_FS);
+      break;
+
+    case 'Z':
+      (*info->fprintf_func) (info->stream, "$v%d",
+			     (l >> OP_SH_FT) & OP_MASK_FT);
+      break;
+
     default:
       /* xgettext:c-format */
       (*info->fprintf_func) (info->stream,
@@ -365,7 +412,7 @@
       break;
     case bfd_mach_mips16:
       *cputype = CPU_MIPS16;
-      *isa = ISA_MIPS3;
+      *isa = ISA_MIPS3 | INSN_MIPS16;
       break;
     case bfd_mach_mips5:
       *cputype = CPU_MIPS5;
@@ -378,16 +425,16 @@
     case bfd_mach_mipsisa32:
       *cputype = CPU_MIPS32;
       /* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
-	 Note that MIPS-3D is not applicable to MIPS32.  (See _MIPS32
-	 Architecture For Programmers Volume I: Introduction to the
+	 Note that MIPS-3D and MDMX are not applicable to MIPS32.  (See
+	 _MIPS32 Architecture For Programmers Volume I: Introduction to the
 	 MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
 	 page 1.  */
-      *isa = ISA_MIPS32;
+      *isa = ISA_MIPS32 | INSN_MIPS16;
       break;
     case bfd_mach_mipsisa64:
       *cputype = CPU_MIPS64;
       /* For stock MIPS64, disassemble all applicable MIPS-specified ASEs.  */
-      *isa = ISA_MIPS64 | INSN_MIPS3D;
+      *isa = ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX;
       break;
 
     default:
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 4b8cbc7..6e8adc5 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -4,7 +4,7 @@
    Contributed by Ralph Campbell and OSF
    Commented and modified by Ian Lance Taylor, Cygnus Support
    Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
-   MIPS-3D support added by Broadcom Corporation (SiByte).
+   MIPS-3D and MDMX support added by Broadcom Corporation (SiByte).
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -75,6 +75,9 @@
 
 #define IS_M    INSN_MULT
 
+#define WR_MACC INSN_WRITE_MDMX_ACC
+#define RD_MACC INSN_READ_MDMX_ACC
+
 #define I1	INSN_ISA1
 #define I2	INSN_ISA2
 #define I3	INSN_ISA3
@@ -84,8 +87,14 @@
 #define I64     INSN_ISA64
 
 /* MIPS64 MIPS-3D ASE support.  */
+#define I16     INSN_MIPS16
+
+/* MIPS64 MIPS-3D ASE support.  */
 #define M3D     INSN_MIPS3D
 
+/* MIPS64 MDMX ASE support.  */
+#define MX      INSN_MDMX
+
 #define P3	INSN_4650
 #define L1	INSN_4010
 #define V1      INSN_4100
@@ -144,15 +153,27 @@
 {"add",     "t,r,I",	0,    (int) M_ADD_I,	INSN_MACRO,		I1	},
 {"add.s",   "D,V,T",	0x46000000, 0xffe0003f,	WR_D|RD_S|RD_T|FP_S,	I1	},
 {"add.d",   "D,V,T",	0x46200000, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I1	},
+{"add.ob",  "X,Y,Q",	0x7800000b, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
 {"add.ps",  "D,V,T",	0x46c00000, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
+{"add.qh",  "X,Y,Q",	0x7820000b, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
+{"adda.ob", "Y,Q",	0x78000037, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"adda.qh", "Y,Q",	0x78200037, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"addi",    "t,r,j",	0x20000000, 0xfc000000,	WR_t|RD_s,		I1	},
 {"addiu",   "t,r,j",	0x24000000, 0xfc000000,	WR_t|RD_s,		I1	},
+{"addl.ob", "Y,Q",	0x78000437, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"addl.qh", "Y,Q",	0x78200437, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"addr.ps", "D,S,T",	0x46c00018, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	M3D	},
 {"addu",    "d,v,t",	0x00000021, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"addu",    "t,r,I",	0,    (int) M_ADDU_I,	INSN_MACRO,		I1	},
+{"alni.ob", "X,Y,Z,O",	0x78000018, 0xff00003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"alni.qh", "X,Y,Z,O",	0x7800001a, 0xff00003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"alnv.ps", "D,V,T,s",	0x4c00001e, 0xfc00003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
+{"alnv.ob", "X,Y,Z,s",	0x78000019, 0xfc00003f,	WR_D|RD_S|RD_T|RD_s|FP_D, MX|SB1	},
+{"alnv.qh", "X,Y,Z,s",	0x7800001b, 0xfc00003f,	WR_D|RD_S|RD_T|RD_s|FP_D, MX	},
 {"and",     "d,v,t",	0x00000024, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"and",     "t,r,I",	0,    (int) M_AND_I,	INSN_MACRO,		I1	},
+{"and.ob",  "X,Y,Q",	0x7800000c, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"and.qh",  "X,Y,Q",	0x7820000c, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"andi",    "t,r,i",	0x30000000, 0xfc000000,	WR_t|RD_s,		I1	},
 /* b is at the top of the table.  */
 /* bal is at the top of the table.  */
@@ -256,8 +277,10 @@
 {"c.eq.d",  "M,S,T",    0x46200032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.eq.s",  "S,T",      0x46000032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S,   I1      },
 {"c.eq.s",  "M,S,T",    0x46000032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S,   I4|I32	},
+{"c.eq.ob", "Y,Q",	0x78000001, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX|SB1	},
 {"c.eq.ps", "S,T",	0x46c00032, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
 {"c.eq.ps", "M,S,T",	0x46c00032, 0xffe000ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
+{"c.eq.qh", "Y,Q",	0x78200001, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX	},
 {"c.ueq.d", "S,T",	0x46200033, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I1	},
 {"c.ueq.d", "M,S,T",    0x46200033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.ueq.s", "S,T",      0x46000033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S,   I1      },
@@ -316,8 +339,10 @@
 {"c.lt.d",  "M,S,T",    0x4620003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.lt.s",  "S,T",	0x4600003c, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_S,	I1	},
 {"c.lt.s",  "M,S,T",    0x4600003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S,   I4|I32	},
+{"c.lt.ob", "Y,Q",	0x78000004, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX|SB1	},
 {"c.lt.ps", "S,T",	0x46c0003c, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
 {"c.lt.ps", "M,S,T",	0x46c0003c, 0xffe000ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
+{"c.lt.qh", "Y,Q",	0x78200004, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX	},
 {"c.nge.d", "S,T",	0x4620003d, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I1	},
 {"c.nge.d", "M,S,T",    0x4620003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.nge.s", "S,T",      0x4600003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S,   I1      },
@@ -328,8 +353,10 @@
 {"c.le.d",  "M,S,T",    0x4620003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.le.s",  "S,T",	0x4600003e, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_S,	I1	},
 {"c.le.s",  "M,S,T",    0x4600003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S,   I4|I32	},
+{"c.le.ob", "Y,Q",	0x78000005, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX|SB1	},
 {"c.le.ps", "S,T",	0x46c0003e, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
 {"c.le.ps", "M,S,T",	0x46c0003e, 0xffe000ff,	RD_S|RD_T|WR_CC|FP_D,	I5	},
+{"c.le.qh", "Y,Q",	0x78200005, 0xfc2007ff,	WR_CC|RD_S|RD_T|FP_D,	MX	},
 {"c.ngt.d", "S,T",	0x4620003f, 0xffe007ff,	RD_S|RD_T|WR_CC|FP_D,	I1	},
 {"c.ngt.d", "M,S,T",    0x4620003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D,   I4|I32	},
 {"c.ngt.s", "S,T",      0x4600003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S,   I1      },
@@ -453,7 +480,6 @@
 {"divu",    "z,t",      0x0000001b, 0xffe0ffff, RD_s|RD_t|WR_HILO,      I1      },
 {"divu",    "d,v,t",	0,    (int) M_DIVU_3,	INSN_MACRO,		I1	},
 {"divu",    "d,v,I",	0,    (int) M_DIVU_3I,	INSN_MACRO,		I1	},
-{"dla",     "t,o(b)",	0x64000000, 0xfc000000, WR_t|RD_s,		I3	}, /* daddiu */
 {"dla",     "t,A(b)",	0,    (int) M_DLA_AB,	INSN_MACRO,		I3	},
 {"dli",     "t,j",      0x24000000, 0xffe00000, WR_t,			I3	}, /* addiu */
 {"dli",	    "t,i",	0x34000000, 0xffe00000, WR_t,			I3	}, /* ori */
@@ -544,10 +570,7 @@
    assembler, but will never match user input (because the line above
    will match first).  */
 {"jal",     "a",	0x0c000000, 0xfc000000,	UBD|WR_31,		I1	},
-  /* jalx really should only be avaliable if mips16 is available,
-     but for now make it I1. */
-{"jalx",    "a",	0x74000000, 0xfc000000, UBD|WR_31,		I1      },
-{"la",      "t,o(b)",	0x24000000, 0xfc000000,	WR_t|RD_s,		I1	}, /* addiu */
+{"jalx",    "a",	0x74000000, 0xfc000000, UBD|WR_31,		I16     },
 {"la",      "t,A(b)",	0,    (int) M_LA_AB,	INSN_MACRO,		I1	},
 {"lb",      "t,o(b)",	0x80000000, 0xfc000000,	LDD|RD_b|WR_t,		I1	},
 {"lb",      "t,A(b)",	0,    (int) M_LB_AB,	INSN_MACRO,		I1	},
@@ -626,6 +649,8 @@
 {"maddu",   "s,t",      0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M,      G1	},
 {"maddu",   "d,s,t",    0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1	},
 {"madd16",  "s,t",      0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO,          V1 },
+{"max.ob",  "X,Y,Q",	0x78000007, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"max.qh",  "X,Y,Q",	0x78200007, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"mfpc",    "t,P",	0x4000c801, 0xffe0ffc1,	LCD|WR_t|RD_C0,		M1	},
 {"mfps",    "t,P",	0x4000c800, 0xffe0ffc1,	LCD|WR_t|RD_C0,		M1	},
 {"mfc0",    "t,G",	0x40000000, 0xffe007ff,	LCD|WR_t|RD_C0,		I1	},
@@ -638,28 +663,39 @@
 {"mfc3",    "t,G,H",    0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, 	I32     },
 {"mfhi",    "d",	0x00000010, 0xffff07ff,	WR_d|RD_HI,		I1	},
 {"mflo",    "d",	0x00000012, 0xffff07ff,	WR_d|RD_LO,		I1	},
+{"min.ob",  "X,Y,Q",	0x78000006, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"min.qh",  "X,Y,Q",	0x78200006, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"mov.d",   "D,S",	0x46200006, 0xffff003f,	WR_D|RD_S|FP_D,		I1	},
 {"mov.s",   "D,S",	0x46000006, 0xffff003f,	WR_D|RD_S|FP_S,		I1	},
 {"mov.ps",  "D,S",	0x46c00006, 0xffff003f,	WR_D|RD_S|FP_D,		I5	},
 {"movf",    "d,s,N",    0x00000001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_D|FP_S, I4|I32},
 {"movf.d",  "D,S,N",    0x46200011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,   I4|I32	},
+{"movf.l",  "D,S,N",	0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,	MX|SB1	},
+{"movf.l",  "X,Y,N",	0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,	MX|SB1	},
 {"movf.s",  "D,S,N",    0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S,   I4|I32	},
 {"movf.ps", "D,S,N",	0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,	I5	},
 {"movn",    "d,v,t",    0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 	I4|I32	},
 {"ffc",     "d,v",	0x0000000b, 0xfc1f07ff,	WR_d|RD_s,		L1	},
 {"movn.d",  "D,S,t",    0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    I4|I32	},
+{"movn.l",  "D,S,t",    0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    MX|SB1	},
+{"movn.l",  "X,Y,t",    0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    MX|SB1	},
 {"movn.s",  "D,S,t",    0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S,    I4|I32	},
 {"movn.ps", "D,S,t",    0x46c00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    I5	},
 {"movt",    "d,s,N",    0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC,        I4|I32	},
 {"movt.d",  "D,S,N",    0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,   I4|I32	},
+{"movt.l",  "D,S,N",    0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,   MX|SB1	},
+{"movt.l",  "X,Y,N",    0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,   MX|SB1	},
 {"movt.s",  "D,S,N",    0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S,   I4|I32	},
 {"movt.ps", "D,S,N",	0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D,	I5	},
 {"movz",    "d,v,t",    0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 	I4|I32	},
 {"ffs",     "d,v",	0x0000000a, 0xfc1f07ff,	WR_d|RD_s,		L1	},
 {"movz.d",  "D,S,t",    0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    I4|I32	},
+{"movz.l",  "D,S,t",    0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    MX|SB1	},
+{"movz.l",  "X,Y,t",    0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    MX|SB1	},
 {"movz.s",  "D,S,t",    0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S,    I4|I32	},
 {"movz.ps", "D,S,t",    0x46c00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D,    I5	},
 /* move is at the top of the table.  */
+{"msgn.qh", "X,Y,Q",	0x78200000, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"msub.d",  "D,R,S,T",	0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I4	},
 {"msub.s",  "D,R,S,T",	0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, I4	},
 {"msub.ps", "D,R,S,T",	0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, I5	},
@@ -681,15 +717,25 @@
 {"mtlo",    "s",	0x00000013, 0xfc1fffff,	RD_s|WR_LO,		I1	},
 {"mul.d",   "D,V,T",	0x46200002, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I1	},
 {"mul.s",   "D,V,T",	0x46000002, 0xffe0003f,	WR_D|RD_S|RD_T|FP_S,	I1	},
+{"mul.ob",  "X,Y,Q",	0x78000030, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
 {"mul.ps",  "D,V,T",	0x46c00002, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
+{"mul.qh",  "X,Y,Q",	0x78200030, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"mul",     "d,v,t",    0x70000002, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, I32|P3  },
 {"mul",     "d,v,t",	0,    (int) M_MUL,	INSN_MACRO,		I1	},
 {"mul",     "d,v,I",	0,    (int) M_MUL_I,	INSN_MACRO,		I1	},
+{"mula.ob", "Y,Q",	0x78000033, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"mula.qh", "Y,Q",	0x78200033, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
+{"mull.ob", "Y,Q",	0x78000433, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D, MX|SB1	},
+{"mull.qh", "Y,Q",	0x78200433, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"mulo",    "d,v,t",	0,    (int) M_MULO,	INSN_MACRO,		I1	},
 {"mulo",    "d,v,I",	0,    (int) M_MULO_I,	INSN_MACRO,		I1	},
 {"mulou",   "d,v,t",	0,    (int) M_MULOU,	INSN_MACRO,		I1	},
 {"mulou",   "d,v,I",	0,    (int) M_MULOU_I,	INSN_MACRO,		I1	},
 {"mulr.ps", "D,S,T",	0x46c0001a, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	M3D	},
+{"muls.ob", "Y,Q",	0x78000032, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"muls.qh", "Y,Q",	0x78200032, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
+{"mulsl.ob", "Y,Q",	0x78000432, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"mulsl.qh", "Y,Q",	0x78200432, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"mult",    "s,t",      0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1	},
 {"mult",    "d,s,t",    0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, G1	},
 {"multu",   "s,t",      0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, I1	},
@@ -708,19 +754,32 @@
 /* nop is at the start of the table.  */
 {"nor",     "d,v,t",	0x00000027, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"nor",     "t,r,I",	0,    (int) M_NOR_I,	INSN_MACRO,		I1	},
+{"nor.ob",  "X,Y,Q",	0x7800000f, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"nor.qh",  "X,Y,Q",	0x7820000f, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"not",     "d,v",	0x00000027, 0xfc1f07ff,	WR_d|RD_s|RD_t,		I1	},/*nor d,s,0*/
 {"or",      "d,v,t",	0x00000025, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"or",      "t,r,I",	0,    (int) M_OR_I,	INSN_MACRO,		I1	},
+{"or.ob",   "X,Y,Q",	0x7800000e, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"or.qh",   "X,Y,Q",	0x7820000e, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"ori",     "t,r,i",	0x34000000, 0xfc000000,	WR_t|RD_s,		I1	},
-
+{"pabsdiff.ob", "X,Y,Q",0x78000009, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	SB1	},
+{"pabsdiffc.ob", "Y,Q",	0x78000035, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	SB1	},
+{"pavg.ob", "X,Y,Q",	0x78000008, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	SB1	},
+{"pickf.ob", "X,Y,Q",	0x78000002, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"pickf.qh", "X,Y,Q",	0x78200002, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
+{"pickt.ob", "X,Y,Q",	0x78000003, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"pickt.qh", "X,Y,Q",	0x78200003, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"pll.ps",  "D,V,T",	0x46c0002c, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
 {"plu.ps",  "D,V,T",	0x46c0002d, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
-
   /* pref and prefx are at the start of the table.  */
-
 {"pul.ps",  "D,V,T",	0x46c0002e, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
 {"puu.ps",  "D,V,T",	0x46c0002f, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
-
+{"rach.ob", "X",	0x7a00003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX|SB1	},
+{"rach.qh", "X",	0x7a20003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX	},
+{"racl.ob", "X",	0x7800003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX|SB1	},
+{"racl.qh", "X",	0x7820003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX	},
+{"racm.ob", "X",	0x7900003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX|SB1	},
+{"racm.qh", "X",	0x7920003f, 0xfffff83f,	WR_D|RD_MACC|FP_D,	MX	},
 {"recip.d", "D,S",	0x46200015, 0xffff003f, WR_D|RD_S|FP_D,		I4	},
 {"recip.ps","D,S",	0x46c00015, 0xffff003f, WR_D|RD_S|FP_D,		SB1	},
 {"recip.s", "D,S",	0x46000015, 0xffff003f, WR_D|RD_S|FP_S,		I4	},
@@ -737,6 +796,12 @@
 {"remu",    "d,v,t",	0,    (int) M_REMU_3,	INSN_MACRO,		I1	},
 {"remu",    "d,v,I",	0,    (int) M_REMU_3I,	INSN_MACRO,		I1	},
 {"rfe",     "",		0x42000010, 0xffffffff,	0,			I1|T3	},
+{"rnas.qh", "X,Q",	0x78200025, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
+{"rnau.ob", "X,Q",	0x78000021, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX|SB1	},
+{"rnau.qh", "X,Q",	0x78200021, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
+{"rnes.qh", "X,Q",	0x78200026, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
+{"rneu.ob", "X,Q",	0x78000022, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX|SB1	},
+{"rneu.qh", "X,Q",	0x78200022, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
 {"rol",     "d,v,t",	0,    (int) M_ROL,	INSN_MACRO,		I1	},
 {"rol",     "d,v,I",	0,    (int) M_ROL_I,	INSN_MACRO,		I1	},
 {"ror",     "d,v,t",	0,    (int) M_ROR,	INSN_MACRO,		I1	},
@@ -754,6 +819,9 @@
 {"rsqrt2.d",  "D,S,T",	0x4620001f, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	M3D	},
 {"rsqrt2.ps", "D,S,T",	0x46c0001f, 0xffe0003f,	WR_D|RD_S|RD_T|FP_S,	M3D	},
 {"rsqrt2.s",  "D,S,T",	0x4600001f, 0xffe0003f,	WR_D|RD_S|RD_T|FP_S,	M3D	},
+{"rzs.qh",  "X,Q",	0x78200024, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
+{"rzu.ob",  "X,Q",	0x78000020, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX|SB1	},
+{"rzu.qh",  "X,Q",	0x78200020, 0xfc20f83f,	WR_D|RD_MACC|RD_T|FP_D,	MX	},
 {"sb",      "t,o(b)",	0xa0000000, 0xfc000000,	SM|RD_t|RD_b,		I1	},
 {"sb",      "t,A(b)",	0,    (int) M_SB_AB,	INSN_MACRO,		I1	},
 {"sc",	    "t,o(b)",	0xe0000000, 0xfc000000, SM|RD_t|WR_t|RD_b,	I2	},
@@ -798,6 +866,16 @@
 {"sgtu",    "d,v,I",	0,    (int) M_SGTU_I,	INSN_MACRO,		I1	},
 {"sh",      "t,o(b)",	0xa4000000, 0xfc000000,	SM|RD_t|RD_b,		I1	},
 {"sh",      "t,A(b)",	0,    (int) M_SH_AB,	INSN_MACRO,		I1	},
+{"shfl.bfla.qh", "X,Y,Z", 0x7a20001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.mixh.ob", "X,Y,Z", 0x7980001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"shfl.mixh.qh", "X,Y,Z", 0x7820001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.mixl.ob", "X,Y,Z", 0x79c0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"shfl.mixl.qh", "X,Y,Z", 0x78a0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.pach.ob", "X,Y,Z", 0x7900001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"shfl.pach.qh", "X,Y,Z", 0x7920001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.repa.qh", "X,Y,Z", 0x7b20001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.repb.qh", "X,Y,Z", 0x7ba0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX	},
+{"shfl.upsl.ob", "X,Y,Z", 0x78c0001f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
 {"sle",     "d,v,t",	0,    (int) M_SLE,	INSN_MACRO,		I1	},
 {"sle",     "d,v,I",	0,    (int) M_SLE_I,	INSN_MACRO,		I1	},
 {"sleu",    "d,v,t",	0,    (int) M_SLEU,	INSN_MACRO,		I1	},
@@ -805,6 +883,8 @@
 {"sllv",    "d,t,s",	0x00000004, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	},
 {"sll",     "d,w,s",	0x00000004, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	}, /* sllv */
 {"sll",     "d,w,<",	0x00000000, 0xffe0003f,	WR_d|RD_t,		I1	},
+{"sll.ob",  "X,Y,Q",	0x78000010, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"sll.qh",  "X,Y,Q",	0x78200010, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"slt",     "d,v,t",	0x0000002a, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"slt",     "d,v,I",	0,    (int) M_SLT_I,	INSN_MACRO,		I1	},
 {"slti",    "t,r,j",	0x28000000, 0xfc000000,	WR_t|RD_s,		I1	},
@@ -819,16 +899,25 @@
 {"srav",    "d,t,s",	0x00000007, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	},
 {"sra",     "d,w,s",	0x00000007, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	}, /* srav */
 {"sra",     "d,w,<",	0x00000003, 0xffe0003f,	WR_d|RD_t,		I1	},
+{"sra.qh",  "X,Y,Q",	0x78200013, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 {"srlv",    "d,t,s",	0x00000006, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	},
 {"srl",     "d,w,s",	0x00000006, 0xfc0007ff,	WR_d|RD_t|RD_s,		I1	}, /* srlv */
 {"srl",     "d,w,<",	0x00000002, 0xffe0003f,	WR_d|RD_t,		I1	},
+{"srl.ob",  "X,Y,Q",	0x78000012, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"srl.qh",  "X,Y,Q",	0x78200012, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
 /* ssnop is at the start of the table.  */
 {"standby", "",         0x42000021, 0xffffffff,	0,			V1	},
 {"sub",     "d,v,t",	0x00000022, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"sub",     "d,v,I",	0,    (int) M_SUB_I,	INSN_MACRO,		I1	},
 {"sub.d",   "D,V,T",	0x46200001, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I1	},
 {"sub.s",   "D,V,T",	0x46000001, 0xffe0003f,	WR_D|RD_S|RD_T|FP_S,	I1	},
+{"sub.ob",  "X,Y,Q",	0x7800000a, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
 {"sub.ps",  "D,V,T",	0x46c00001, 0xffe0003f,	WR_D|RD_S|RD_T|FP_D,	I5	},
+{"sub.qh",  "X,Y,Q",	0x7820000a, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
+{"suba.ob", "Y,Q",	0x78000036, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"suba.qh", "Y,Q",	0x78200036, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
+{"subl.ob", "Y,Q",	0x78000436, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"subl.qh", "Y,Q",	0x78200436, 0xfc2007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"subu",    "d,v,t",	0x00000023, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
 {"subu",    "d,v,I",	0,    (int) M_SUBU_I,	INSN_MACRO,		I1	},
 {"suspend", "",         0x42000022, 0xffffffff,	0,			V1	},
@@ -917,13 +1006,20 @@
 {"ush",     "t,A(b)",	0,    (int) M_USH_A,	INSN_MACRO,		I1	},
 {"usw",     "t,o(b)",	0,    (int) M_USW,	INSN_MACRO,		I1	},
 {"usw",     "t,A(b)",	0,    (int) M_USW_A,	INSN_MACRO,		I1	},
-{"xor",     "d,v,t",	0x00000026, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
-{"xor",     "t,r,I",	0,    (int) M_XOR_I,	INSN_MACRO,		I1	},
-{"xori",    "t,r,i",	0x38000000, 0xfc000000,	WR_t|RD_s,		I1	},
+{"wach.ob", "Y",	0x7a00003e, 0xffff07ff,	WR_MACC|RD_S|FP_D,	MX|SB1	},
+{"wach.qh", "Y",	0x7a20003e, 0xffff07ff,	WR_MACC|RD_S|FP_D,	MX	},
+{"wacl.ob", "Y,Z",	0x7800003e, 0xffe007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX|SB1	},
+{"wacl.qh", "Y,Z",	0x7820003e, 0xffe007ff,	WR_MACC|RD_S|RD_T|FP_D,	MX	},
 {"wait",    "",         0x42000020, 0xffffffff, TRAP,   		I3|I32	},
 {"wait",    "J",        0x42000020, 0xfe00003f, TRAP,   		I32     },
 {"waiti",   "",		0x42000020, 0xffffffff,	TRAP,			L1	},
 {"wb", 	    "o(b)",	0xbc040000, 0xfc1f0000, SM|RD_b,		L1	},
+{"xor",     "d,v,t",	0x00000026, 0xfc0007ff,	WR_d|RD_s|RD_t,		I1	},
+{"xor",     "t,r,I",	0,    (int) M_XOR_I,	INSN_MACRO,		I1	},
+{"xor.ob",  "X,Y,Q",	0x7800000d, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX|SB1	},
+{"xor.qh",  "X,Y,Q",	0x7820000d, 0xfc20003f,	WR_D|RD_S|RD_T|FP_D,	MX	},
+{"xori",    "t,r,i",	0x38000000, 0xfc000000,	WR_t|RD_s,		I1	},
+
 /* No hazard protection on coprocessor instructions--they shouldn't
    change the state of the processor and if they do it's up to the
    user to put in nops as necessary.  These are at the end so that the
diff --git a/opcodes/or32-dis.c b/opcodes/or32-dis.c
index 8876a30..d5f4679 100644
--- a/opcodes/or32-dis.c
+++ b/opcodes/or32-dis.c
@@ -261,7 +261,7 @@
   /* The four bytes of the instruction.  */
   unsigned long insn;
   find_byte_func_type find_byte_func = (find_byte_func_type)info->private_data;
-  struct or32_opcode CONST * opcode;
+  struct or32_opcode const * opcode;
 
   {
     int status =
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 0cb531b..1f85d72 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -18,6 +18,7 @@
 d30v-opc.c
 dis-buf.c
 disassemble.c
+dlx-dis.c
 fr30-asm.c
 fr30-desc.c
 fr30-desc.h
@@ -25,6 +26,13 @@
 fr30-ibld.c
 fr30-opc.c
 fr30-opc.h
+frv-asm.c
+frv-desc.c
+frv-desc.h
+frv-dis.c
+frv-ibld.c
+frv-opc.c
+frv-opc.h
 h8300-dis.c
 h8500-dis.c
 h8500-opc.h
@@ -46,6 +54,13 @@
 ia64-opc-m.c
 ia64-opc.c
 ia64-opc.h
+ip2k-asm.c
+ip2k-desc.c
+ip2k-desc.h
+ip2k-dis.c
+ip2k-ibld.c
+ip2k-opc.c
+ip2k-opc.h
 m10200-dis.c
 m10200-opc.c
 m10300-dis.c
diff --git a/opcodes/po/es.po b/opcodes/po/es.po
index a423506..4ee0c99 100644
--- a/opcodes/po/es.po
+++ b/opcodes/po/es.po
@@ -1,12 +1,12 @@
-# Mensajes en español para opcodes-2.12-pre020121
+# Mensajes en español para opcodes-2.12.91
 # Copyright (C) 2002 Free Software Foundation, Inc.
 # Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-01-24 08:55-0600\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 02:03-0500\n"
 "Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
 "Language-Team: Spanish <es@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "¡Referencia limm ilegal en la última instrucción!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<precisión ilegal>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Conjunto de nombres de registro no reconocido: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Opción de desensamblador no reconocida: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -62,7 +62,8 @@
 msgid "unknown constraint `%c'"
 msgstr "restricción `%c' desconocida"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operando fuera de rango (%ld no está entre %ld y %ld)"
@@ -88,106 +89,126 @@
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "La dirección 0x%x está fuera de los límites.\n"
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "No se reconoció el campo %d durante la decodificación.\n"
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr "falta el mnemónico en la cadena sintáctica"
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
-#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
-#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr "instrucción no reconocida"
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "error sintáctico (se esperaba el carácter `%c', se encontró `%c')"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "error sintáctico (se esperaba el carácter `%c', se encontró el final de la instrucción)"
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr "basura al final de la línea"
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr "forma de instrucción no reconocida"
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "instrucción errónea `%.50s...'"
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instrucción errónea `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr "*desconocida*"
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "No se reconoció el campo %d al mostrar insn.\n"
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "operando fuera de rango (%ld no está entre %ld y %lu)"
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operando fuera de rango (%lu no está entre 0 y %lu)"
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "No se reconoció el campo %d al construir insn.\n"
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "No se reconoció el campo %d al decodificar insn.\n"
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "No se reconoció el campo %d al obtener el operando int.\n"
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "No se reconoció el campo %d al obtener el operando vma.\n"
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "No se reconoció el campo %d al establecer el operando int.\n"
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "No se reconoció el campo %d al establecer el operando vma.\n"
 
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr "Hmmmm %x"
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr "No se entiende %x \n"
@@ -237,12 +258,12 @@
 msgid "# <dis error: %08x>"
 msgstr "# <error de desensamblador: %08x>"
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# error interno, modificador(%c) sin definir"
 
-#: mips-dis.c:1154
+#: mips-dis.c:1209
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# error interno del desensamblador, modificador (%c) no reconocido"
@@ -276,62 +297,62 @@
 msgid "$<undefined>"
 msgstr "$<sin definir>"
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr "opción condicional inválida"
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "intento de establecer el bit y cuando se usaba el modificador + ó -"
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
 msgstr "el desplazamiento no es un múltiplo de 4"
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
 msgstr "el desplazamiento no está entre -2048 y 2047"
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
 msgstr "el desplazamiento no está entre -8192 y 8191"
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr "ignorando los bits menos significativos en el desplazamiento de la rama"
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr "máscara de bits ilegal"
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr "valor fuera de rango"
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr "registro índice en el rango de carga"
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr "operando de registro inválido mientras se actualizaba"
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr "desconocida"
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Error interno:  sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Error interno: sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Error interno: sparc-opcode.h erróneo: \"%s\" == \"%s\"\n"
@@ -395,5 +416,33 @@
 msgid "immediate value must be even"
 msgstr "el valor inmediato debe ser par"
 
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Registro erróneo en el preincremento"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Registro erróneo en el postincremento"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nombre de registro erróneo"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "La etiqueta tiene conflictos con el nombre de registro"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "La etiqueta tiene conflictos con `Rx'"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Expresión inmediata errónea"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "El operando small no era un número inmediato"
+
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "nombre clave/de registro no reconocido"
diff --git a/opcodes/po/fr.po b/opcodes/po/fr.po
index e1806b0..b0ff20e 100644
--- a/opcodes/po/fr.po
+++ b/opcodes/po/fr.po
@@ -1,12 +1,12 @@
 # Messages français pour opcodes.
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Michel Robitaille <robitail@IRO.UMontreal.CA>, 1996.
+# Copyright © 1996 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-03-17 20:00-0500\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 08:00-0500\n"
 "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Référence limite illégale dans la dernière instruction!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<précision illégale>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Nom de jeu de registres inconnu: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Option du désassembleur non reconnue: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -62,7 +62,8 @@
 msgid "unknown constraint `%c'"
 msgstr "contrainte inconnue « %c »"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "opérande hors gamme (%ld n'est pas entre %ld et %ld)"
@@ -88,105 +89,127 @@
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "Adresse 0x%x est hors gamme.\n"
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Champ non reconnu %d lors de l'analyse.\n"
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr "mnémonique manquante dans la syntaxe de la chaîne"
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr "instruction non reconnue"
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "erreur de syntaxe (caractère « %c » attendu,  « %c » obtenu)"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "erreur de syntaxe (caractère « %c » attendu, fin de l'instruction obtenue)"
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr "rebut à la fin de la ligne"
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr "forme d'instruction non reconnue"
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "instruction erronée « %.50s... »"
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instruction erronée « %.50s »"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr "*inconnu*"
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "Champ non reconnu %d lors de l'impression insn.\n"
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "opérande hors gamme (%ld n'est pas entre %ld et %lu)"
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "opérande hors gamme (%lu n'est pas entre 0 et %lu)"
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Champ non reconnu %d lors de la construction de insn.\n"
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Champ non reconnu %d lors du décodage de insn.\n"
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Champ non reconnu %d lors de la prise d'une opérande int.\n"
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Champ non reconnu %d lors de la prise d'une opérande vma.\n"
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande int.\n"
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande vma.\n"
 
 # h8300-dis.c:380Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr "Hummm %x"
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr "Ne comprend pas %x \n"
@@ -236,12 +259,12 @@
 msgid "# <dis error: %08x>"
 msgstr "# <erreur du désassembleur: %08x>"
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# erreur interne, modificateur non défini(%c)"
 
-#: mips-dis.c:1154
+#: mips-dis.c:1209
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# erreur interne du déssassembleur, modificateur non reconnu(%c)"
@@ -275,62 +298,62 @@
 msgid "$<undefined>"
 msgstr "$<non défini>"
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr "option conditionnelle invalide"
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "tentative d'initialisation du bit y lorsque le modificateur + ou - a été utilisé"
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
 msgstr "décalage n'est pas un multiple de 4"
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
 msgstr "décalage n'est pas entre -2048 et 2047"
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
 msgstr "décalage n'est pas entre -8192 et 8191"
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr "Les derniers bits les moins significatifs sont ignorés dans le décalage de branchement"
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr "masque de bits illégal"
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr "valeur hors gamme"
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr "registre index n'est pas dans la plage de chargement"
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr "opérande registre invalide lors de la mise à jour"
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr "inconnu"
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Erreur interne:  sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Erreur interne: sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Erreur interne: sparc-opcode.h erroné: « %s » == « %s »\n"
@@ -356,31 +379,31 @@
 
 #: v850-opc.c:69
 msgid "displacement value is out of range"
-msgstr "La valeur de déplacement est hors gamme."
+msgstr "valeur de déplacement est hors gamme"
 
 #: v850-opc.c:70
 msgid "displacement value is not aligned"
-msgstr "La valeur de déplacement n'est pas alignée."
+msgstr "valeur de déplacement n'est pas alignée"
 
 #: v850-opc.c:72
 msgid "immediate value is out of range"
-msgstr "La valeur immédiate est hors gamme."
+msgstr "valeur immédiate est hors gamme"
 
 #: v850-opc.c:83
 msgid "branch value not in range and to odd offset"
-msgstr "Valeur de branchement est hors gamme et a un décalage impair."
+msgstr "valeur de branchement est hors gamme et a un décalage impair"
 
 #: v850-opc.c:85 v850-opc.c:117
 msgid "branch value out of range"
-msgstr "Valeur de branchement hors gamme."
+msgstr "valeur de branchement hors gamme"
 
 #: v850-opc.c:88 v850-opc.c:120
 msgid "branch to odd offset"
-msgstr "Branchement avec un décalage impair."
+msgstr "Branchement avec un décalage impair"
 
 #: v850-opc.c:115
 msgid "branch value not in range and to an odd offset"
-msgstr "Valeur de branchement est hors gamme et a un décalage impair"
+msgstr "valeur de branchement est hors gamme et a un décalage impair"
 
 #: v850-opc.c:346
 msgid "invalid register for stack adjustment"
@@ -388,11 +411,39 @@
 
 #: v850-opc.c:370
 msgid "immediate value not in range and not even"
-msgstr "La valeur immédiate est hors gamme et est impaire."
+msgstr "valeur immédiate est hors gamme et est impaire"
 
 #: v850-opc.c:375
 msgid "immediate value must be even"
-msgstr "La valeur immédiate doit être paire."
+msgstr "valeur immédiate doit être paire"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Registre erroné dans un préincrément"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Registre erroné dans un postincrément"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nom erroné de registre"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Conflits d'étiquette avec le nom de registre"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Conflit d'étiquette avec « Rx »"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Expression immédiate erronée"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Petite opérande n'était pas un nombre immédiat"
 
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "nom de mot clé ou de registre non reconnu"
diff --git a/opcodes/po/id.po b/opcodes/po/id.po
index 3c69b4b..3edf294 100644
--- a/opcodes/po/id.po
+++ b/opcodes/po/id.po
@@ -1,12 +1,12 @@
-# opcodes 2.12-pre020121 (Indonesian)
+# opcodes 2.12.1 (Indonesian)
 # Copyright (C) 2002 Free Software Foundation, Inc.
 # Tedi Heriyanto <tedi_h@gmx.net>, 2002.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-04-02 08:20GMT+0700\n"
+"Project-Id-Version: opcodes 2.12.1\n"
+"POT-Creation-Date: 2002-02-08 03:24-0200\n"
+"PO-Revision-Date: 2002-07-23 12:35GMT+0700\n"
 "Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
@@ -26,21 +26,21 @@
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "referensi limm ilegal dalam instruksi terakhir!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:502
 msgid "<illegal precision>"
 msgstr "<presisi ilegal>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1012
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Set nama register tidak dikenal: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1019
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Option disasembler tidak dikenal: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -63,7 +63,7 @@
 msgid "unknown constraint `%c'"
 msgstr "konstrain tidak dikenal `%c'"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operand keluar batas (%ld tidak antara %ld dan %ld)"
@@ -89,94 +89,94 @@
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "Alamat 0x%x di luar batas.\n"
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Field tidak dikenal %d saat parsing.\n"
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr "mnemonik hilang dalam string sintaks"
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511 m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr "instruksti tidak dikenal"
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "kesalahan sintaks (diharapkan karakter `%c', ditemukan `%c')"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "kesalahan sintaks (diharapkan karakter `%c', ditemukan akhir instruksi)"
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr "sampah di akhir baris"
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr "bentuk instruksi tidak dikenal"
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "instruksi buruk `%.50s...'"
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instruksi buruk `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39 xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr "*tidak dikenal*"
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "Field tidak dikenal %d saat mencetak insn.\n"
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "operand di luar batas (%ld tidak antara %ld dan %lu)"
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operand di luar batas (%lu tidak antara 0 dan %lu)"
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Field tidak dikenal %d saat membuild insn.\n"
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Field tidak dikenal %d saat mendekode insn.\n"
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Field tidak dikenal %d saat memperoleh operand int.\n"
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Field tidak dikenal %d saat memperoleh operand vma.\n"
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Field tidak dikenal %d saat menset operand int.\n"
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Field tidak dikenal %d saat menset operand vma.\n"
@@ -316,21 +316,21 @@
 msgstr "operand register tidak valid saat mengupdate"
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr "tidak dikenal"
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Kesalahan internal:  sparc-opcode.h buruk: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Kesalahan internal: sparc-opcode.h buruk: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Kesalahan internal: sparc-opcode.h buruk: \"%s\" == \"%s\"\n"
@@ -393,3 +393,31 @@
 #: v850-opc.c:375
 msgid "immediate value must be even"
 msgstr "nilai langsung harus genap"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "register buruk dalam preinkremen"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Register buruk dalam pascainkremen"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nama register buruk"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Label konflik dengan nama register"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Label konflik dengan `Rx'"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Ekspresi langsung yang buruk"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Operand kecil bukan sebuah angka immediate"
diff --git a/opcodes/po/pt_BR.po b/opcodes/po/pt_BR.po
new file mode 100644
index 0000000..c2663d3
--- /dev/null
+++ b/opcodes/po/pt_BR.po
@@ -0,0 +1,445 @@
+# opcodes: translation to Brazilian Portuguese (pt_BR)
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 04:00-0300\n"
+"Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n"
+"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: alpha-opc.c:335
+msgid "branch operand unaligned"
+msgstr "operando de desvio desalinhado"
+
+#: alpha-opc.c:358 alpha-opc.c:380
+msgid "jump hint unaligned"
+msgstr "dica de salto desalinhada"
+
+#: arc-dis.c:52
+msgid "Illegal limm reference in last instruction!\n"
+msgstr "Referência limm ilegal na última instrução!\n"
+
+#: arm-dis.c:507
+msgid "<illegal precision>"
+msgstr "<precisão ilegal>"
+
+#: arm-dis.c:1010
+#, c-format
+msgid "Unrecognised register name set: %s\n"
+msgstr "Conjunto de nomes de registrador desconhecido: %s\n"
+
+#: arm-dis.c:1017
+#, c-format
+msgid "Unrecognised disassembler option: %s\n"
+msgstr "Opção do desmontador desconhecida: %s\n"
+
+#: arm-dis.c:1191
+msgid ""
+"\n"
+"The following ARM specific disassembler options are supported for use with\n"
+"the -M switch:\n"
+msgstr ""
+"\n"
+"As opções do desmontador espcíficas para ARM a seguir não são suportadas para\n"
+"uso com a opção -M:\n"
+
+#: avr-dis.c:118 avr-dis.c:128
+msgid "undefined"
+msgstr "indefinido"
+
+#: avr-dis.c:180
+msgid "Internal disassembler error"
+msgstr "Erro interno do desmontador"
+
+#: avr-dis.c:228
+#, c-format
+msgid "unknown constraint `%c'"
+msgstr "restrição `%c' desconhecida"
+
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#, c-format
+msgid "operand out of range (%ld not between %ld and %ld)"
+msgstr "operando fora de faixa (%ld não está entre %ld e %ld)"
+
+#: cgen-asm.c:367
+#, c-format
+msgid "operand out of range (%lu not between %lu and %lu)"
+msgstr "operando fora de faixa (%lu não está entre %lu e %lu)"
+
+#: d30v-dis.c:312
+#, c-format
+msgid "<unknown register %d>"
+msgstr "<registrador %d desconhecido>"
+
+#. Can't happen.
+#: dis-buf.c:57
+#, c-format
+msgid "Unknown error %d\n"
+msgstr "Erro %d desconhecido\n"
+
+#: dis-buf.c:62
+#, c-format
+msgid "Address 0x%x is out of bounds.\n"
+msgstr "Endereço 0x%x está fora dos limites.\n"
+
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
+#, c-format
+msgid "Unrecognized field %d while parsing.\n"
+msgstr "Campo %d desconhecido durante análise.\n"
+
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
+msgid "missing mnemonic in syntax string"
+msgstr "mnemônico faltando na string de sintaxe"
+
+#. We couldn't parse it.
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+msgid "unrecognized instruction"
+msgstr "instrução não reconhecida"
+
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
+#, c-format
+msgid "syntax error (expected char `%c', found `%c')"
+msgstr "erro de sintaxe (esperado char `%c', encontrado `%c')"
+
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
+#, c-format
+msgid "syntax error (expected char `%c', found end of instruction)"
+msgstr "erro de sintaxe (esperado char `%c', encontrado fim de instrução)"
+
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
+msgid "junk at end of line"
+msgstr "lixo no final do arquivo"
+
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
+msgid "unrecognized form of instruction"
+msgstr "forma de instrução não reconhecida"
+
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
+#, c-format
+msgid "bad instruction `%.50s...'"
+msgstr "instrução `%.50s...' errada"
+
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
+#, c-format
+msgid "bad instruction `%.50s'"
+msgstr "instrução `%.50s' errada"
+
+#. Default text to print if an instruction isn't recognized.
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
+msgid "*unknown*"
+msgstr "*desconecida*"
+
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
+#, c-format
+msgid "Unrecognized field %d while printing insn.\n"
+msgstr "Campo %d não reconhecido durante impressão de insn.\n"
+
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
+#, c-format
+msgid "operand out of range (%ld not between %ld and %lu)"
+msgstr "operando fora de faixa (%ld não está entre %ld e %lu)"
+
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
+#, c-format
+msgid "operand out of range (%lu not between 0 and %lu)"
+msgstr "operando fora de faixa (%lu não está entre 0 e %lu)"
+
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
+#, c-format
+msgid "Unrecognized field %d while building insn.\n"
+msgstr "Campo %d não reconhecido durante construção de insn.\n"
+
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
+#, c-format
+msgid "Unrecognized field %d while decoding insn.\n"
+msgstr "Campo %d não reconhecido durante decodificação de insn.\n"
+
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
+#, c-format
+msgid "Unrecognized field %d while getting int operand.\n"
+msgstr "Campo %d não reconhecido ao obter operando int.\n"
+
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
+#, c-format
+msgid "Unrecognized field %d while getting vma operand.\n"
+msgstr "Campo %d não reconhecido ao obter operando vma.\n"
+
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
+#, c-format
+msgid "Unrecognized field %d while setting int operand.\n"
+msgstr "Campo %d não reconhecido ao definir operando int.\n"
+
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
+#, c-format
+msgid "Unrecognized field %d while setting vma operand.\n"
+msgstr "Campo %d não reconhecido ao definir operando vma.\n"
+
+#: h8300-dis.c:385
+#, c-format
+msgid "Hmmmm %x"
+msgstr "Hmmmm %x"
+
+#: h8300-dis.c:396
+#, c-format
+msgid "Don't understand %x \n"
+msgstr "Não entendo %x \n"
+
+#: h8500-dis.c:143
+#, c-format
+msgid "can't cope with insert %d\n"
+msgstr "impossível lidar com insert %d\n"
+
+#. Couldn't understand anything.
+#: h8500-dis.c:350
+#, c-format
+msgid "%02x\t\t*unknown*"
+msgstr "%02x\t\t*desconhecido*"
+
+#: i386-dis.c:1649
+msgid "<internal disassembler error>"
+msgstr "<erro interno do desmontador>"
+
+#: m10200-dis.c:199
+#, c-format
+msgid "unknown\t0x%02x"
+msgstr "desconhecido\t0x%02x"
+
+#: m10200-dis.c:339
+#, c-format
+msgid "unknown\t0x%04lx"
+msgstr "desconhecido\t0x%04lx"
+
+#: m10300-dis.c:685
+#, c-format
+msgid "unknown\t0x%04x"
+msgstr "desconhecido\t0x%04x"
+
+#: m68k-dis.c:429
+#, c-format
+msgid "<internal error in opcode table: %s %s>\n"
+msgstr "<erro interno na tabela de códigos de operação: %s %s>\n"
+
+#: m68k-dis.c:1007
+#, c-format
+msgid "<function code %d>"
+msgstr "<código de função %d>"
+
+#: m88k-dis.c:255
+#, c-format
+msgid "# <dis error: %08x>"
+msgstr "# <erro de desmontador: %08x>"
+
+#: mips-dis.c:337
+#, c-format
+msgid "# internal error, undefined modifier(%c)"
+msgstr "# erro interno, modificador (%c) indefinido"
+
+#: mips-dis.c:1209
+#, c-format
+msgid "# internal disassembler error, unrecognised modifier (%c)"
+msgstr "# erro interno do desmontador, modificador (%c) não reconhecido"
+
+#: mmix-dis.c:34
+#, c-format
+msgid "Bad case %d (%s) in %s:%d\n"
+msgstr "Case %d errado (%s) em %s:%d\n"
+
+#: mmix-dis.c:44
+#, c-format
+msgid "Internal: Non-debugged code (test-case missing): %s:%d"
+msgstr "Interno: Código não depurado (test-case faltando): %s:%d"
+
+#: mmix-dis.c:53
+msgid "(unknown)"
+msgstr "(desconhecido)"
+
+#: mmix-dis.c:517
+#, c-format
+msgid "*unknown operands type: %d*"
+msgstr "*tipo de operandos desconhecidos: %d*"
+
+#. I and Z are output operands and can`t be immediate
+#. * A is an address and we can`t have the address of
+#. * an immediate either. We don't know how much to increase
+#. * aoffsetp by since whatever generated this is broken
+#. * anyway!
+#.
+#: ns32k-dis.c:628
+msgid "$<undefined>"
+msgstr "$<indefinido>"
+
+#: ppc-opc.c:777 ppc-opc.c:810
+msgid "invalid conditional option"
+msgstr "opção condicional inválida"
+
+#: ppc-opc.c:812
+msgid "attempt to set y bit when using + or - modifier"
+msgstr "tentativa de setar bit y ao usar modificador + ou -"
+
+#: ppc-opc.c:844 ppc-opc.c:896
+msgid "offset not a multiple of 4"
+msgstr "deslocamento não é um múltiplo de 4"
+
+#: ppc-opc.c:869
+msgid "offset not between -2048 and 2047"
+msgstr "deslocamento não está entre -2048 and 2047"
+
+#: ppc-opc.c:894
+msgid "offset not between -8192 and 8191"
+msgstr "deslocamento não está entre -8192 and 8191"
+
+#: ppc-opc.c:922
+msgid "ignoring least significant bits in branch offset"
+msgstr "ignorando os bits menos significatiovs no deslocamento do desvio"
+
+#: ppc-opc.c:956 ppc-opc.c:993
+msgid "illegal bitmask"
+msgstr "máscara de bits ilegal"
+
+#: ppc-opc.c:1066
+msgid "value out of range"
+msgstr "valor fora de faixa"
+
+#: ppc-opc.c:1142
+msgid "index register in load range"
+msgstr "registrador de índice na faixa de carregamento"
+
+#: ppc-opc.c:1158
+msgid "invalid register operand when updating"
+msgstr "operando de registro inválido durante atualização"
+
+#. Mark as non-valid instruction
+#: sparc-dis.c:750
+msgid "unknown"
+msgstr "desconhecido"
+
+#: sparc-dis.c:825
+#, c-format
+msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
+msgstr "Erro interno:  sparc-opcode.h errado: \"%s\", %#.8lx, %#.8lx\n"
+
+#: sparc-dis.c:836
+#, c-format
+msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
+msgstr "Erro interno: sparc-opcode.h errado: \"%s\", %#.8lx, %#.8lx\n"
+
+#: sparc-dis.c:885
+#, c-format
+msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
+msgstr "Erro interno: sparc-opcode.h errado: \"%s\" == \"%s\"\n"
+
+#: v850-dis.c:224
+#, c-format
+msgid "unknown operand shift: %x\n"
+msgstr "deslocamento de operando desconhecido: %x\n"
+
+#: v850-dis.c:236
+#, c-format
+msgid "unknown pop reg: %d\n"
+msgstr "registrador pop desconhecido: %d\n"
+
+#. The functions used to insert and extract complicated operands.
+#. Note: There is a conspiracy between these functions and
+#. v850_insert_operand() in gas/config/tc-v850.c.  Error messages
+#. containing the string 'out of range' will be ignored unless a
+#. specific command line option is given to GAS.
+#: v850-opc.c:68
+msgid "displacement value is not in range and is not aligned"
+msgstr "valor do deslocamento está fora da faixa e não está alinhado"
+
+#: v850-opc.c:69
+msgid "displacement value is out of range"
+msgstr "valor do deslocamento está fora da faixa"
+
+#: v850-opc.c:70
+msgid "displacement value is not aligned"
+msgstr "valor do deslocamento não está alinhado"
+
+#: v850-opc.c:72
+msgid "immediate value is out of range"
+msgstr "valor imediato está fora da faixa"
+
+#: v850-opc.c:83
+msgid "branch value not in range and to odd offset"
+msgstr "valor do desvio fora da faixa e para deslocamento ímpar"
+
+#: v850-opc.c:85 v850-opc.c:117
+msgid "branch value out of range"
+msgstr "valor do desvio fora da faixa"
+
+#: v850-opc.c:88 v850-opc.c:120
+msgid "branch to odd offset"
+msgstr "desvio para um deslocamento ímpar"
+
+#: v850-opc.c:115
+msgid "branch value not in range and to an odd offset"
+msgstr "valor do desvio fora da faixa e para um deslocamento ímpar"
+
+#: v850-opc.c:346
+msgid "invalid register for stack adjustment"
+msgstr "registrador inválido para ajuste da pilha"
+
+#: v850-opc.c:370
+msgid "immediate value not in range and not even"
+msgstr "valor imediato fora da faixa e não é par"
+
+#: v850-opc.c:375
+msgid "immediate value must be even"
+msgstr "o valor imediato deve ser par"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Registrador errado no pré-incremento"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Registrador errado no pós-incremento"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nome de registrador errado"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "O rótulo conflita com nome de registrador"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "O rótulo conflita com `Rx'"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Expressão imediata errada"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "O operando pequeno não era um número imediato"
diff --git a/opcodes/po/sv.po b/opcodes/po/sv.po
index a6eda07..56190f8 100644
--- a/opcodes/po/sv.po
+++ b/opcodes/po/sv.po
@@ -1,12 +1,12 @@
 # Swedish messages for opcodes.
-# Copyright (C) 2001 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 2001.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Christian Rose <menthos@menthos.com>, 2001, 2002.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.11\n"
-"POT-Creation-Date: 2002-01-31 17:10+0000\n"
-"PO-Revision-Date: 2001-10-23 15:35+0200\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-08-03 13:19+0200\n"
 "Last-Translator: Christian Rose <menthos@menthos.com>\n"
 "Language-Team: Swedish <sv@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,16 +25,16 @@
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Otillåten limm-referens i sista instruktionen!\n"
 
-#: arm-dis.c:502
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<otillåten precision>"
 
-#: arm-dis.c:1012
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Okänt registernamn är angivet: %s\n"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Okänt disassembleralternativ: %s\n"
@@ -62,8 +62,8 @@
 msgid "unknown constraint `%c'"
 msgstr "okänd begränsning \"%c\""
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
-#: xstormy16-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %ld)"
@@ -89,111 +89,126 @@
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "Adressen 0x%x ligger utanför tillåtna gränser.\n"
 
-#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Okänt fält %d vid tolkning.\n"
 
-#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
-msgstr ""
+msgstr "instruktion saknas i syntaxsträng"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511
-#: m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430
-#: openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623
-#: xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508
-#: xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr "okänd instruktion"
 
-#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade \"%c\")"
 
-#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
-#, fuzzy, c-format
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
+#, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
-msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade \"%c\")"
+msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade slutet på instruktion)"
 
-#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr "skräp vid slutet på raden"
 
-#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
-#, fuzzy
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
-msgstr "okänd instruktion"
+msgstr "okänd instruktionsform"
 
-#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "felaktig instruktion \"%.50s...\""
 
-#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "felaktig instruktion \"%.50s\""
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
 #: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr "*okänd*"
 
-#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "Okänt fält %d vid utskrift av instruktion.\n"
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
-#, fuzzy, c-format
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
+#, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
-msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %ld)"
+msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %lu)"
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operanden utanför intervallet (%lu inte mellan 0 och %lu)"
 
-#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Okänt fält %d vid konstruktion av instruktion.\n"
 
-#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Okänt fält %d vid avkodning av instruktion.\n"
 
-#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Okänt fält %d vid hämtning av heltalsoperand.\n"
 
-#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Okänt fält %d vid hämtning av vma-operand.\n"
 
-#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Okänt fält %d vid inställning av heltalsoperand.\n"
 
-#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
 #: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Okänt fält %d vid inställning av vma-operand.\n"
 
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr "Hmmmm %x"
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr "Förstår inte %x \n"
@@ -243,35 +258,34 @@
 msgid "# <dis error: %08x>"
 msgstr "# <disassemblerarfel: %08x>"
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# internt fel, okänd modifierare(%c)"
 
-#: mips-dis.c:1154
-#, fuzzy, c-format
+#: mips-dis.c:1209
+#, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
-msgstr "# internt fel, okänd modifierare(%c)"
+msgstr "# internt disassemblerfel, okänd modifierare (%c)"
 
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
-msgstr ""
+msgstr "Felaktigt fall %d (%s) i %s:%d\n"
 
 #: mmix-dis.c:44
 #, c-format
 msgid "Internal: Non-debugged code (test-case missing): %s:%d"
-msgstr ""
+msgstr "Internt: Ej felsökt kod (testfall saknas): %s:%d"
 
 #: mmix-dis.c:53
-#, fuzzy
 msgid "(unknown)"
-msgstr "okänd"
+msgstr "(okänd)"
 
 #: mmix-dis.c:517
-#, fuzzy, c-format
+#, c-format
 msgid "*unknown operands type: %d*"
-msgstr "okänt operandskifte: %x\n"
+msgstr "*okänd operandtyp: %d*"
 
 #. I and Z are output operands and can`t be immediate
 #. * A is an address and we can`t have the address of
@@ -283,62 +297,62 @@
 msgid "$<undefined>"
 msgstr "$<odefinierad>"
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr "ogiltig villkorlig flagga"
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "försök att ställa in y-biten då modifieraren + eller - användes"
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
-msgstr ""
+msgstr "avståndet är inte en multipel av 4"
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
-msgstr ""
+msgstr "avståndet är inte mellan -2048 och 2047"
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
-msgstr ""
+msgstr "avståndet är inte mellan -8192 och 8191"
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr "ignorerar minst signifikanta bitarna i grenavstånd"
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr "otillåten bitmask"
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr "värdet är utanför intervallet"
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr "indexregistret är i inläsningsintervallet"
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr "ogiltig registeroperand vid uppdatering"
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr "okänd"
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Internt fel:  felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\" == \"%s\"\n"
@@ -360,8 +374,7 @@
 #. specific command line option is given to GAS.
 #: v850-opc.c:68
 msgid "displacement value is not in range and is not aligned"
-msgstr ""
-"förskjutningsvärdet är inte inom intervallet och ligger inte på jämn gräns"
+msgstr "förskjutningsvärdet är inte inom intervallet och ligger inte på jämn gräns"
 
 #: v850-opc.c:69
 msgid "displacement value is out of range"
@@ -404,35 +417,32 @@
 msgstr "omedelbara värdet måste vara jämnt"
 
 #: xstormy16-asm.c:74
-#, fuzzy
 msgid "Bad register in preincrement"
-msgstr "indexregistret är i inläsningsintervallet"
+msgstr "Felaktigt register i förhandsökning"
 
 #: xstormy16-asm.c:79
-#, fuzzy
 msgid "Bad register in postincrement"
-msgstr "ogiltigt register för stackjustering"
+msgstr "Felaktigt register i efterhandsökning"
 
 #: xstormy16-asm.c:81
-#, fuzzy
 msgid "Bad register name"
-msgstr "indexregistret är i inläsningsintervallet"
+msgstr "Felaktigt registernamn"
 
 #: xstormy16-asm.c:85
 msgid "Label conflicts with register name"
-msgstr ""
+msgstr "Etiketten är i konflikt med registernamn"
 
 #: xstormy16-asm.c:89
 msgid "Label conflicts with `Rx'"
-msgstr ""
+msgstr "Etiketten är i konflikt med \"Rx\""
 
 #: xstormy16-asm.c:91
 msgid "Bad immediate expression"
-msgstr ""
+msgstr "Felaktigt omedelbart uttryck"
 
 #: xstormy16-asm.c:120
 msgid "Small operand was not an immediate number"
-msgstr ""
+msgstr "Liten operand var inte ett omedelbart tal"
 
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "okänt namn på nyckelord/register"
diff --git a/opcodes/po/tr.po b/opcodes/po/tr.po
index e776662..75ef049 100644
--- a/opcodes/po/tr.po
+++ b/opcodes/po/tr.po
@@ -4,9 +4,9 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-02-17 11:26EET\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 11:26EET\n"
 "Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
@@ -26,21 +26,21 @@
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Son iÅŸlemde geçersiz limm referansı!\n"
 
-#: arm-dis.c:509
+#: arm-dis.c:507
 msgid "<illegal precision>"
 msgstr "<geçersiz kesinlik>"
 
-#: arm-dis.c:1019
+#: arm-dis.c:1010
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Bilinmeyen yazmaç ad kümesi: %s\n"
 
-#: arm-dis.c:1026
+#: arm-dis.c:1017
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Bilinmeyen karşıt-çevirici seçeneÄŸi: %s\n"
 
-#: arm-dis.c:1198
+#: arm-dis.c:1191
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -63,7 +63,8 @@
 msgid "unknown constraint `%c'"
 msgstr "`%c' bilinmeyen kısıtı"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "Kapsam dışı terim (%ld, %ld ve %ld arasında değil) "
@@ -89,106 +90,126 @@
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "0x%x adresi sınırların dışında.\n"
 
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Ayrıştırma esnasında bilinmeyen alan %d bulundu.\n"
 
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
 msgid "missing mnemonic in syntax string"
 msgstr "biçem dizgesinde ipucu eksik"
 
 #. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
-#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
-#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
 msgid "unrecognized instruction"
 msgstr "bilinmeyen iÅŸlem"
 
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "biçem hatası (char `%c' beklenirken `%c' bulundu)"
 
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "biçem hatası (char `%c' beklenirken iÅŸlem sonu bulundu)"
 
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
 msgid "junk at end of line"
 msgstr "Satır sonu bozuk "
 
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
 msgid "unrecognized form of instruction"
 msgstr "bilinmeyen iÅŸlem türü"
 
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "geçersiz iÅŸlem `%.50s...'"
 
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "geçersiz iÅŸlem `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
 msgid "*unknown*"
 msgstr "*bilinmeyen*"
 
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "yönerge yazdırılırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "Kapsam dışı işlenen (%ld, %ld ve %lu arasında değil) "
 
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "kapsam dışı terim (%lu 0 ve %lu arasında değil) "
 
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Yönerge oluÅŸturulurken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Yönerge çözümlenirken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "`int' terimi alınırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "`vma' terimi alınırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "`int' terimi atanırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "`vma' terimi atanırken bilinmeyen alan %d bulundu.\n"
 
-#: h8300-dis.c:384
+#: h8300-dis.c:385
 #, c-format
 msgid "Hmmmm %x"
 msgstr "Hmmmm %x"
 
-#: h8300-dis.c:395
+#: h8300-dis.c:396
 #, c-format
 msgid "Don't understand %x \n"
 msgstr "%x anlaşılamadı\n"
@@ -238,12 +259,12 @@
 msgid "# <dis error: %08x>"
 msgstr "# <`dis' hatası: %08x>"
 
-#: mips-dis.c:290
+#: mips-dis.c:337
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "#iç hata, tanımlanmamış deÄŸiÅŸtirici (%c)"
 
-#: mips-dis.c:1154
+#: mips-dis.c:1209
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "#iç karşıt-çevirici hatası, tanımlanmamış deÄŸiÅŸtirici (%c)"
@@ -277,62 +298,62 @@
 msgid "$<undefined>"
 msgstr "$<tanımlanmamış>"
 
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
 msgid "invalid conditional option"
 msgstr "koÅŸullu seçenek geçersiz "
 
-#: ppc-opc.c:800
+#: ppc-opc.c:812
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "+ veya - değiştiricisini kullanırken y bitini atama denemesi"
 
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
 msgid "offset not a multiple of 4"
 msgstr "görece 4'ün katı deÄŸil"
 
-#: ppc-opc.c:857
+#: ppc-opc.c:869
 msgid "offset not between -2048 and 2047"
 msgstr "görece -2048 ve 2047 arasında deÄŸil"
 
-#: ppc-opc.c:882
+#: ppc-opc.c:894
 msgid "offset not between -8192 and 8191"
 msgstr "görece -8192 ve 8191 arasında deÄŸil"
 
-#: ppc-opc.c:910
+#: ppc-opc.c:922
 msgid "ignoring least significant bits in branch offset"
 msgstr "Dal göreli konumunda en önemsiz bitler atlanıyor"
 
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
 msgid "illegal bitmask"
 msgstr "geçersiz bitmask "
 
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
 msgid "value out of range"
 msgstr "değer aralık dışı"
 
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
 msgid "index register in load range"
 msgstr "yükleme aralığında endeks yazmacı"
 
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
 msgid "invalid register operand when updating"
 msgstr "güncelleme esnasında geçersiz yazmaç terimi bulundu"
 
 #. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
 msgid "unknown"
 msgstr "bilinmeyen"
 
-#: sparc-dis.c:824
+#: sparc-dis.c:825
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Ä°ç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:835
+#: sparc-dis.c:836
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Ä°ç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:884
+#: sparc-dis.c:885
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Ä°ç hata: geçersiz sparc-opcode.h: \"%s\" == \"%s\"\n"
@@ -395,3 +416,31 @@
 #: v850-opc.c:375
 msgid "immediate value must be even"
 msgstr "ÅŸimdiki deÄŸer çift sayı olmalı"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Arttırma öncesinde geçersiz yazmaç"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Arttırma sonrasında  geçersiz yazmaç "
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Geçersiz yazmaç adı"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Etiket, yazmaç adıyla çakışıyor"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Etiket, `Rx' ile çakışıyor"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Hatalı şimdiki ifade"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Küçük iÅŸlenen ÅŸimdiki sayı deÄŸil"
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 0ac8275..bd4dfac 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -53,7 +53,29 @@
 	  || strcmp (info->disassembler_options, "booke64") == 0))
     dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
   else 
-    dialect |= PPC_OPCODE_403 | PPC_OPCODE_601;
+    if ((info->mach == bfd_mach_ppc_e500)
+        || (info->disassembler_options
+	&& (   strcmp (info->disassembler_options, "e500") == 0
+	    || strcmp (info->disassembler_options, "e500x2") == 0)))
+      {
+        dialect |= PPC_OPCODE_BOOKE
+	  | PPC_OPCODE_SPE | PPC_OPCODE_ISEL
+	  | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
+	  | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
+	  | PPC_OPCODE_RFMCI;
+	/* efs* and AltiVec conflict.  */
+	dialect &= ~PPC_OPCODE_ALTIVEC;
+      }
+  else 
+    if (info->disassembler_options
+	&& (strcmp (info->disassembler_options, "efs") == 0))
+      {
+	dialect |= PPC_OPCODE_EFS;
+	/* efs* and AltiVec conflict.  */
+	dialect &= ~PPC_OPCODE_ALTIVEC;
+      }
+  else
+    dialect |= PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_COMMON;
 
   if (info->disassembler_options
       && strcmp (info->disassembler_options, "power4") == 0)
@@ -153,6 +175,9 @@
 	  || (opcode->flags & dialect) == 0)
 	continue;
 
+      if ((dialect & PPC_OPCODE_EFS) && (opcode->flags & PPC_OPCODE_ALTIVEC))
+        continue;
+
       /* Make two passes over the operands.  First see if any of them
 	 have extraction functions, and, if they do, make sure the
 	 instruction is valid.  */
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 70167f7..9ba4e25 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -100,6 +100,10 @@
   PARAMS ((unsigned long, long, int, const char **));
 static long extract_nsi
   PARAMS ((unsigned long, int, int *));
+static unsigned long insert_pmrn
+  PARAMS ((unsigned long, long, int, const char **));
+static long extract_pmrn
+  PARAMS ((unsigned long, int, int *));
 static unsigned long insert_ral
   PARAMS ((unsigned long, long, int, const char **));
 static unsigned long insert_ram
@@ -122,6 +126,18 @@
   PARAMS ((unsigned long, long, int, const char **));
 static long extract_tbr
   PARAMS ((unsigned long, int, int *));
+static unsigned long insert_ev2
+  PARAMS ((unsigned long, long, int, const char **));
+static long extract_ev2
+  PARAMS ((unsigned long, int, int *));
+static unsigned long insert_ev4
+  PARAMS ((unsigned long, long, int, const char **));
+static long extract_ev4
+  PARAMS ((unsigned long, int, int *));
+static unsigned long insert_ev8
+  PARAMS ((unsigned long, long, int, const char **));
+static long extract_ev8
+  PARAMS ((unsigned long, int, int *));
 
 /* The operands table.
 
@@ -235,8 +251,21 @@
 #define CR BT + 1
   { 3, 18, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
 
+  /* The CRB field in an X form instruction.  */
+#define CRB CR + 1
+  { 5, 6, 0, 0, 0 },
+
+  /* The CRFD field in an X form instruction.  */
+#define CRFD CRB + 1
+  { 3, 23, 0, 0, 0 },
+
+  /* The CRFS field in an X form instruction.  */
+#define CRFS CRFD + 1
+  { 3, 0, 0, 0, 0 },
+
   /* The CT field in an X form instruction.  */
-#define CT CR + 1
+#define CT CRFS + 1
+#define RD CT
   { 5, 21, 0, 0, PPC_OPERAND_OPTIONAL },
 
   /* The D field in a D form instruction.  This is a displacement off
@@ -365,8 +394,12 @@
   { 16, 0, insert_nsi, extract_nsi,
       PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
 
+  /* The PMRN field in an X form instruction.  */
+#define PMRN NSI + 1
+  { 16, 0, insert_pmrn, extract_pmrn, PPC_OPERAND_GPR },
+
   /* The RA field in an D, DS, X, XO, M, or MDS form instruction.  */
-#define RA NSI + 1
+#define RA PMRN + 1
 #define RA_MASK (0x1f << 16)
   { 5, 16, 0, 0, PPC_OPERAND_GPR },
 
@@ -505,8 +538,24 @@
 #define SHB UIMM + 1
   { 4, 6, 0, 0, 0 },
 
+  /* The other UIMM field in a EVX form instruction. */
+#define EVUIMM SHB + 1
+  { 5, 11, 0, 0, 0 },
+
+  /* The other UIMM field in a half word EVX form instruction. */
+#define EVUIMM_2 EVUIMM + 1
+  { 5, 11, insert_ev2, extract_ev2, PPC_OPERAND_PARENS },
+
+  /* The other UIMM field in a word EVX form instruction. */
+#define EVUIMM_4 EVUIMM_2 + 1
+  { 5, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
+
+  /* The other UIMM field in a double EVX form instruction. */
+#define EVUIMM_8 EVUIMM_4 + 1
+  { 8, 11, insert_ev8, extract_ev8, PPC_OPERAND_PARENS },
+
   /* The WS field.  */
-#define WS SHB + 1
+#define WS EVUIMM_8 + 1
 #define WS_MASK (0x7 << 11)
   { 3, 11, 0, 0, 0 },
 
@@ -829,6 +878,75 @@
   return value & 0x1e;
 }
 
+static unsigned long
+insert_ev2 (insn, value, dialect, errmsg)
+     unsigned long insn;
+     long value;
+     int dialect ATTRIBUTE_UNUSED;
+     const char ** errmsg ATTRIBUTE_UNUSED;
+{
+  if ((value & 1) != 0 && errmsg != NULL)
+    *errmsg = _("offset not a multiple of 2");
+  if ((value > 62) != 0 && errmsg != NULL)
+    *errmsg = _("offset greater than 62");
+  return insn | ((value & 0xf8) << 8);
+}
+
+static long
+extract_ev2 (insn, dialect, invalid)
+     unsigned long insn;
+     int dialect ATTRIBUTE_UNUSED;
+     int * invalid ATTRIBUTE_UNUSED;
+{
+  return (insn >> 8) & 0xf8;
+}
+
+static unsigned long
+insert_ev4 (insn, value, dialect, errmsg)
+     unsigned long insn;
+     long value;
+     int dialect ATTRIBUTE_UNUSED;
+     const char ** errmsg ATTRIBUTE_UNUSED;
+{
+  if ((value & 3) != 0 && errmsg != NULL)
+    *errmsg = _("offset not a multiple of 4");
+  if ((value > 124) != 0 && errmsg != NULL)
+    *errmsg = _("offset greater than 124");
+  return insn | ((value & 0xf8) << 8);
+}
+
+static long
+extract_ev4 (insn, dialect, invalid)
+     unsigned long insn;
+     int dialect ATTRIBUTE_UNUSED;
+     int * invalid ATTRIBUTE_UNUSED;
+{
+  return (insn >> 8) & 0xf8;
+}
+
+static unsigned long
+insert_ev8 (insn, value, dialect, errmsg)
+     unsigned long insn;
+     long value;
+     int dialect ATTRIBUTE_UNUSED;
+     const char ** errmsg ATTRIBUTE_UNUSED;
+{
+  if ((value & 7) != 0 && errmsg != NULL)
+    *errmsg = _("offset not a multiple of 8");
+  if ((value > 248) != 0 && errmsg != NULL)
+    *errmsg = _("offset greater than 248");
+  return insn | ((value & 0xf8) << 8);
+}
+
+static long
+extract_ev8 (insn, dialect, invalid)
+     unsigned long insn;
+     int dialect ATTRIBUTE_UNUSED;
+     int * invalid ATTRIBUTE_UNUSED;
+{
+  return (insn >> 8) & 0xf8;
+}
+
 /* The DS field in a DS form instruction.  This is like D, but the
    lower two bits are forced to zero.  */
 
@@ -1111,6 +1229,28 @@
   return - (((insn & 0xffff) ^ 0x8000) - 0x8000);
 }
 
+/* The PMRN field in a X form instruction.
+   This has 5+5 bits switched around.  */
+
+static unsigned long
+insert_pmrn (insn, value, dialect, errmsg)
+     unsigned long insn;
+     long value;
+     int dialect ATTRIBUTE_UNUSED;
+     const char **errmsg ATTRIBUTE_UNUSED;
+{
+  return insn | ((value & 0x1f) << 16) | ((value & 0x3e) << 11);
+}
+
+static long
+extract_pmrn (insn, dialect, invalid)
+     unsigned long insn;
+     int dialect ATTRIBUTE_UNUSED;
+     int *invalid ATTRIBUTE_UNUSED;
+{
+  return ((insn >> 16) & 0x1f) | ((insn >> 11) & 0x3e);
+}
+
 /* The RA field in a D or X form instruction which is an updating
    load, which means that the RA field may not be zero and may not
    equal the RT field.  */
@@ -1332,6 +1472,14 @@
 #define BBOYBI_MASK (BBOYCB_MASK | BI_MASK)
 #define BBOATBI_MASK (BBOAT2CB_MASK | BI_MASK)
 
+/* An Context form instruction.  */
+#define CTX(op, xop)   (OP (op) | (((unsigned long)(xop)) & 0x7))
+#define CTX_MASK       CTX(0x3f, 0x7)
+
+/* An User Context form instruction.  */
+#define UCTX(op, xop)  (OP (op) | (((unsigned long)(xop)) & 0x1f))
+#define UCTX_MASK      UCTX(0x3f, 0x1f)
+
 /* The main opcode mask with the RA field clear.  */
 #define DRA_MASK (OP_MASK | RA_MASK)
 
@@ -1343,6 +1491,10 @@
 #define DEO(op, xop) (OP (op) | ((xop) & 0xf))
 #define DE_MASK DEO (0x3e, 0xf)
 
+/* An EVSEL form instruction.  */
+#define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3)
+#define EVSEL_MASK EVSEL(0x3f, 0xff)
+
 /* An M form instruction.  */
 #define M(op, rc) (OP (op) | ((rc) & 1))
 #define M_MASK M (0x3f, 1)
@@ -1457,6 +1609,10 @@
 #define XFL(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1) | (((unsigned long)(rc)) & 1))
 #define XFL_MASK (XFL (0x3f, 0x3ff, 1) | (((unsigned long)1) << 25) | (((unsigned long)1) << 16))
 
+/* An X form isel instruction.  */
+#define XISEL(op, xop)  (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1))
+#define XISEL_MASK      XISEL(0x3f, 0x1f)
+
 /* An XL form instruction with the LK field set to 0.  */
 #define XL(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
 
@@ -1528,6 +1684,10 @@
 /* An X form instruction with everything filled in except the E field.  */
 #define XE_MASK (0xffff7fff)
 
+/* An X form user context instruction.  */
+#define XUC(op, xop)  (OP (op) | (((unsigned long)(xop)) & 0x1f))
+#define XUC_MASK      XUC(0x3f, 0x1f)
+
 /* The BO encodings used in extended conditional branch mnemonics.  */
 #define BODNZF	(0x0)
 #define BODNZFP	(0x1)
@@ -1609,6 +1769,14 @@
 #define	MFDEC2	PPC_OPCODE_PPC | PPC_OPCODE_601
 #define BOOKE	PPC_OPCODE_BOOKE
 #define BOOKE64	PPC_OPCODE_BOOKE64
+#define CLASSIC	PPC_OPCODE_CLASSIC
+#define PPCSPE	PPC_OPCODE_SPE
+#define PPCISEL	PPC_OPCODE_ISEL
+#define PPCEFS	PPC_OPCODE_EFS
+#define PPCBRLK	PPC_OPCODE_BRLOCK
+#define PPCPMR	PPC_OPCODE_PMR
+#define PPCCHLK	PPC_OPCODE_CACHELCK
+#define PPCRFMCI	PPC_OPCODE_RFMCI
 
 /* The opcode table.
 
@@ -1918,6 +2086,306 @@
 { "vupklsh",   VX(4,  718), VX_MASK,	PPCVEC,		{ VD, VB } },
 { "vxor",      VX(4, 1220), VX_MASK,	PPCVEC,		{ VD, VA, VB } },
 
+{ "evaddw",    VX(4, 512), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evaddiw",   VX(4, 514), VX_MASK,	PPCSPE,		{ RD, RB, UIMM } },
+{ "evsubfw",   VX(4, 516), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evsubifw",  VX(4, 518), VX_MASK,	PPCSPE,		{ RD, UIMM, RB } },
+{ "evabs",     VX(4, 520), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evneg",     VX(4, 521), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evextsb",   VX(4, 522), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evextsh",   VX(4, 523), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evrndw",    VX(4, 524), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evcntlzw",  VX(4, 525), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evcntlsw",  VX(4, 526), VX_MASK,	PPCSPE,		{ RD, RA } },
+
+{ "brinc",     VX(4, 527), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evand",     VX(4, 529), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evandc",    VX(4, 530), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evor",      VX(4, 535), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evorc",     VX(4, 539), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evxor",     VX(4, 534), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "eveqv",     VX(4, 537), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evnand",    VX(4, 542), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evnor",     VX(4, 536), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evrlw",     VX(4, 552), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evrlwi",    VX(4, 554), VX_MASK,	PPCSPE,		{ RD, RA, EVUIMM } },
+{ "evslw",     VX(4, 548), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evslwi",    VX(4, 550), VX_MASK,	PPCSPE,		{ RD, RA, EVUIMM } },
+{ "evsrws",    VX(4, 545), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evsrwu",    VX(4, 544), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evsrwis",   VX(4, 547), VX_MASK,	PPCSPE,		{ RD, RA, EVUIMM } },
+{ "evsrwiu",   VX(4, 546), VX_MASK,	PPCSPE,		{ RD, RA, EVUIMM } },
+{ "evsplati",  VX(4, 553), VX_MASK,	PPCSPE,		{ RD, SIMM } },
+{ "evsplatfi", VX(4, 555), VX_MASK,	PPCSPE,		{ RD, SIMM } },
+{ "evmergehi", VX(4, 556), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmergelo", VX(4, 557), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmergehilo",VX(4,558), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmergelohi",VX(4,559), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evcmpgts",  VX(4, 561), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evcmpgtu",  VX(4, 560), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evcmplts",  VX(4, 563), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evcmpltu",  VX(4, 562), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evcmpeq",   VX(4, 564), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evsel",     EVSEL(4,79),EVSEL_MASK,	PPCSPE,		{ RD, RA, RB, CRFS } },
+
+{ "evldd",     VX(4, 769), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evlddx",    VX(4, 768), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evldw",     VX(4, 771), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evldwx",    VX(4, 770), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evldh",     VX(4, 773), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evldhx",    VX(4, 772), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlwhe",    VX(4, 785), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evlwhex",   VX(4, 784), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlwhou",   VX(4, 789), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evlwhoux",  VX(4, 788), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlwhos",   VX(4, 791), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evlwhosx",  VX(4, 790), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlwwsplat",VX(4, 793), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evlwwsplatx",VX(4, 792), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlwhsplat",VX(4, 797), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evlwhsplatx",VX(4, 796), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlhhesplat",VX(4, 777), VX_MASK,	PPCSPE,		{ RS, EVUIMM_2, RA } },
+{ "evlhhesplatx",VX(4, 776), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlhhousplat",VX(4, 781), VX_MASK,	PPCSPE,		{ RS, EVUIMM_2, RA } },
+{ "evlhhousplatx",VX(4, 780), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evlhhossplat",VX(4, 783), VX_MASK,	PPCSPE,		{ RS, EVUIMM_2, RA } },
+{ "evlhhossplatx",VX(4, 782), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+
+{ "evstdd",    VX(4, 801), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evstddx",   VX(4, 800), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstdw",    VX(4, 803), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evstdwx",   VX(4, 802), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstdh",    VX(4, 805), VX_MASK,	PPCSPE,		{ RS, EVUIMM_8, RA } },
+{ "evstdhx",   VX(4, 804), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstwwe",   VX(4, 825), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evstwwex",  VX(4, 824), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstwwo",   VX(4, 829), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evstwwox",  VX(4, 828), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstwhe",   VX(4, 817), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evstwhex",  VX(4, 816), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+{ "evstwho",   VX(4, 821), VX_MASK,	PPCSPE,		{ RS, EVUIMM_4, RA } },
+{ "evstwhox",  VX(4, 820), VX_MASK,	PPCSPE,		{ RS, RA, RB } },
+
+{ "evfsabs",   VX(4, 644), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evfsnabs",  VX(4, 645), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evfsneg",   VX(4, 656), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evfsadd",   VX(4, 640), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evfssub",   VX(4, 641), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evfsmul",   VX(4, 648), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evfsdiv",   VX(4, 649), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evfscmpgt", VX(4, 652), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfscmplt", VX(4, 653), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfscmpeq", VX(4, 654), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfststgt", VX(4, 668), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfststlt", VX(4, 669), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfststeq", VX(4, 670), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evfscfui",  VX(4, 656), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctuiz", VX(4, 664), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfscfsi",  VX(4, 657), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfscfuf",  VX(4, 658), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfscfsf",  VX(4, 659), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctui",  VX(4, 660), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctsi",  VX(4, 661), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctsiz", VX(4, 666), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctuf",  VX(4, 662), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evfsctsf",  VX(4, 663), VX_MASK,	PPCSPE,		{ RD, RB } },
+
+{ "efsabs",   VX(4, 708), VX_MASK,	PPCEFS,		{ RD, RA } },
+{ "efsnabs",  VX(4, 709), VX_MASK,	PPCEFS,		{ RD, RA } },
+{ "efsneg",   VX(4, 710), VX_MASK,	PPCEFS,		{ RD, RA } },
+{ "efsadd",   VX(4, 704), VX_MASK,	PPCEFS,		{ RD, RA, RB } },
+{ "efssub",   VX(4, 705), VX_MASK,	PPCEFS,		{ RD, RA, RB } },
+{ "efsmul",   VX(4, 712), VX_MASK,	PPCEFS,		{ RD, RA, RB } },
+{ "efsdiv",   VX(4, 713), VX_MASK,	PPCEFS,		{ RD, RA, RB } },
+{ "efscmpgt", VX(4, 716), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efscmplt", VX(4, 717), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efscmpeq", VX(4, 718), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efststgt", VX(4, 732), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efststlt", VX(4, 733), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efststeq", VX(4, 734), VX_MASK,	PPCEFS,		{ CRFD, RA, RB } },
+{ "efscfui",  VX(4, 720), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctuiz", VX(4, 728), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efscfsi",  VX(4, 721), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efscfuf",  VX(4, 722), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efscfsf",  VX(4, 723), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctui",  VX(4, 724), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctsi",  VX(4, 725), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctsiz", VX(4, 730), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctuf",  VX(4, 726), VX_MASK,	PPCEFS,		{ RD, RB } },
+{ "efsctsf",  VX(4, 727), VX_MASK,	PPCEFS,		{ RD, RB } },
+
+{ "evsabs",    VX(4, 708), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsnabs",   VX(4, 709), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsneg",    VX(4, 710), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsadd",    VX(4, 704), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evssub",    VX(4, 705), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evsmul",    VX(4, 712), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evsdiv",    VX(4, 713), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evscmpgt",  VX(4, 716), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evsgmplt",  VX(4, 717), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evsgmpeq",  VX(4, 718), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evststgt",  VX(4, 732), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evststlt",  VX(4, 733), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evststeq",  VX(4, 734), VX_MASK,	PPCSPE,		{ CRFD, RA, RB } },
+{ "evscfui",   VX(4, 720), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evscfsi",   VX(4, 721), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evscfuf",   VX(4, 722), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evscfsf",   VX(4, 723), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctui",   VX(4, 724), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctuiz",  VX(4, 728), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctsi",   VX(4, 725), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctsiz",  VX(4, 730), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctuf",   VX(4, 726), VX_MASK,	PPCSPE,		{ RD, RB } },
+{ "evsctsf",   VX(4, 727), VX_MASK,	PPCSPE,		{ RD, RB } },
+
+{ "evmhossf",  VX(4, 1031), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhossfa", VX(4, 1063), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmf",  VX(4, 1039), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmfa", VX(4, 1071), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmi",  VX(4, 1037), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmia", VX(4, 1069), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhoumi",  VX(4, 1036), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhoumia", VX(4, 1068), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessf",  VX(4, 1027), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessfa", VX(4, 1059), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmf",  VX(4, 1035), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmfa", VX(4, 1067), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmi",  VX(4, 1033), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmia", VX(4, 1065), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheumi",  VX(4, 1032), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheumia", VX(4, 1064), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmhossfaaw",VX(4, 1287), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhossiaaw",VX(4, 1285), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmfaaw",VX(4, 1295), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmiaaw",VX(4, 1293), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhousiaaw",VX(4, 1284), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhoumiaaw",VX(4, 1292), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessfaaw",VX(4, 1283), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessiaaw",VX(4, 1281), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmfaaw",VX(4, 1291), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmiaaw",VX(4, 1289), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheusiaaw",VX(4, 1280), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheumiaaw",VX(4, 1288), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmhossfanw",VX(4, 1415), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhossianw",VX(4, 1413), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmfanw",VX(4, 1423), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhosmianw",VX(4, 1421), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhousianw",VX(4, 1412), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhoumianw",VX(4, 1420), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessfanw",VX(4, 1411), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhessianw",VX(4, 1409), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmfanw",VX(4, 1419), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhesmianw",VX(4, 1417), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheusianw",VX(4, 1408), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmheumianw",VX(4, 1416), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmhogsmfaa",VX(4, 1327), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhogsmiaa",VX(4, 1325), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhogumiaa",VX(4, 1324), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegsmfaa",VX(4, 1323), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegsmiaa",VX(4, 1321), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegumiaa",VX(4, 1320), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmhogsmfan",VX(4, 1455), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhogsmian",VX(4, 1453), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhogumian",VX(4, 1452), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegsmfan",VX(4, 1451), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegsmian",VX(4, 1449), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmhegumian",VX(4, 1448), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwhssf",  VX(4, 1095), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhssfa", VX(4, 1127), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmf",  VX(4, 1103), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmfa", VX(4, 1135), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmi",  VX(4, 1101), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmia", VX(4, 1133), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhumi",  VX(4, 1100), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhumia", VX(4, 1132), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwlssf",  VX(4, 1091), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlssfa", VX(4, 1123), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmf",  VX(4, 1099), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmfa", VX(4, 1131), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlumi",  VX(4, 1096), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlumia", VX(4, 1128), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwhssfaa",VX(4, 1351), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhssmaa",VX(4, 1349), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmfaa",VX(4, 1359), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmiaa",VX(4, 1357), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhusiaa",VX(4, 1348), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhumiaa",VX(4, 1356), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwlssfaaw",VX(4, 1347), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlssiaaw",VX(4, 1345), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmfaaw",VX(4, 1355), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmiaaw",VX(4, 1353), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlusiaaw",VX(4, 1344), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlumiaaw",VX(4, 1352), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwhssfan",VX(4, 1479), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhssian",VX(4, 1477), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmfan",VX(4, 1487), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhsmian",VX(4, 1485), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhusian",VX(4, 1476), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhumian",VX(4, 1484), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwlssfanw",VX(4, 1475), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlssianw",VX(4, 1473), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmfanw",VX(4, 1483), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlsmianw",VX(4, 1481), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlusianw",VX(4, 1472), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwlumianw",VX(4, 1480), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwhgssfaa",VX(4, 1383), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgsmfaa",VX(4, 1391), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgsmiaa",VX(4, 1381), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgumiaa",VX(4, 1380), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwhgssfan",VX(4, 1511), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgsmfan",VX(4, 1519), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgsmian",VX(4, 1509), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwhgumian",VX(4, 1508), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwssf",   VX(4, 1107), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwssfa",  VX(4, 1139), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmf",   VX(4, 1115), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmfa",  VX(4, 1147), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmi",   VX(4, 1113), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmia",  VX(4, 1145), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwumi",   VX(4, 1112), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwumia",  VX(4, 1144), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwssfaa", VX(4, 1363), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmfaa", VX(4, 1371), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmiaa", VX(4, 1369), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwumiaa", VX(4, 1368), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evmwssfan", VX(4, 1491), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmfan", VX(4, 1499), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwsmian", VX(4, 1497), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evmwumian", VX(4, 1496), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
+{ "evaddssiaaw",VX(4, 1217), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evaddsmiaaw",VX(4, 1225), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evaddusiaaw",VX(4, 1216), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evaddumiaaw",VX(4, 1224), VX_MASK,	PPCSPE,		{ RD, RA } },
+
+{ "evsubfssiaaw",VX(4, 1219), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsubfsmiaaw",VX(4, 1227), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsubfusiaaw",VX(4, 1218), VX_MASK,	PPCSPE,		{ RD, RA } },
+{ "evsubfumiaaw",VX(4, 1226), VX_MASK,	PPCSPE,		{ RD, RA } },
+
+{ "evmra",    VX(4, 1220), VX_MASK,	PPCSPE,		{ RD, RA } },
+
+{ "evdivws",  VX(4, 1222), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+{ "evdivwu",  VX(4, 1223), VX_MASK,	PPCSPE,		{ RD, RA, RB } },
+
 { "mulli",   OP(7),	OP_MASK,	PPCCOM,		{ RT, RA, SI } },
 { "muli",    OP(7),	OP_MASK,	PWRCOM,		{ RT, RA, SI } },
 
@@ -2467,6 +2935,8 @@
 
 { "crnot",   XL(19,33), XL_MASK,	PPCCOM,		{ BT, BA, BBA } },
 { "crnor",   XL(19,33),	XL_MASK,	COM,		{ BT, BA, BB } },
+{ "rfmci",    X(19,38),  0xffffffff,	PPCRFMCI,	{ 0 } },
+
 
 { "rfi",     XL(19,50),	0xffffffff,	COM,		{ 0 } },
 { "rfci",    XL(19,51),	0xffffffff,	PPC403,		{ 0 } },
@@ -2785,6 +3255,8 @@
 { "mulhwu",  XO(31,11,0,0), XO_MASK,	PPC,		{ RT, RA, RB } },
 { "mulhwu.", XO(31,11,0,1), XO_MASK,	PPC,		{ RT, RA, RB } },
 
+{ "isel",    XISEL(31,15),XISEL_MASK,	PPCISEL,	{ RT, RA, RB, CRB } },
+
 { "mfcr",    X(31,19),	XRARB_MASK,	COM,		{ RT } },
 
 { "lwarx",   X(31,20),	X_MASK,		PPC,		{ RT, RA, RB } },
@@ -2914,6 +3386,8 @@
 { "wrtee",   X(31,131),	XRARB_MASK,	PPC403,		{ RS } },
 { "wrtee",   X(31,131),	XRARB_MASK,	BOOKE,		{ RS } },
 
+{ "dcbtstls",X(31,134),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "subfe",   XO(31,136,0,0), XO_MASK,	PPCCOM,		{ RT, RA, RB } },
 { "sfe",     XO(31,136,0,0), XO_MASK,	PWRCOM,		{ RT, RA, RB } },
 { "subfe.",  XO(31,136,0,1), XO_MASK,	PPCCOM,		{ RT, RA, RB } },
@@ -2932,6 +3406,8 @@
 { "addeo.",  XO(31,138,1,1), XO_MASK,	PPCCOM,		{ RT, RA, RB } },
 { "aeo.",    XO(31,138,1,1), XO_MASK,	PWRCOM,		{ RT, RA, RB } },
 
+{ "dcbtstlse",X(31,142),X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "mtcr",    XFXM(31,144,0xff), XFXFXM_MASK|FXM_MASK, COM,	{ RS }},
 { "mtcrf",   X(31,144),	XFXFXM_MASK,	COM,		{ FXM, RS } },
 
@@ -2957,6 +3433,9 @@
 { "wrteei",  X(31,163),	XE_MASK,	PPC403,		{ E } },
 { "wrteei",  X(31,163),	XE_MASK,	BOOKE,		{ E } },
 
+{ "dcbtls",  X(31,166),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+{ "dcbtlse", X(31,174),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "mtmsrd",  X(31,178),	XRLARB_MASK,	PPC64,		{ RS, MTMSRD_L } },
 
 { "stdux",   X(31,181),	X_MASK,		PPC64,		{ RS, RAS, RB } },
@@ -3001,6 +3480,8 @@
 
 { "stbxe",   X(31,223),	X_MASK,		BOOKE64,	{ RS, RA, RB } },
 
+{ "icblc",   X(31,230),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "subfme",  XO(31,232,0,0), XORB_MASK, PPCCOM,		{ RT, RA } },
 { "sfme",    XO(31,232,0,0), XORB_MASK, PWRCOM,		{ RT, RA } },
 { "subfme.", XO(31,232,0,1), XORB_MASK, PPCCOM,		{ RT, RA } },
@@ -3033,6 +3514,7 @@
 { "mullwo.", XO(31,235,1,1), XO_MASK,	PPCCOM,		{ RT, RA, RB } },
 { "mulso.",  XO(31,235,1,1), XO_MASK,	PWRCOM,		{ RT, RA, RB } },
 
+{ "icblce",  X(31,238),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
 { "mtsrin",  X(31,242),	XRA_MASK,	PPC32,		{ RS, RB } },
 { "mtsri",   X(31,242),	XRA_MASK,	POWER32,	{ RS, RB } },
 
@@ -3137,6 +3619,8 @@
 { "divo",    XO(31,331,1,0), XO_MASK,	M601,		{ RT, RA, RB } },
 { "divo.",   XO(31,331,1,1), XO_MASK,	M601,		{ RT, RA, RB } },
 
+{ "mfpmr",   X(31,334),	X_MASK,		PPCPMR,		{ RT, PMRN }},
+
 { "mfmq",     XSPR(31,339,0),   XSPR_MASK, M601,	{ RT } },
 { "mfxer",    XSPR(31,339,1),   XSPR_MASK, COM,		{ RT } },
 { "mfrtcu",   XSPR(31,339,4),   XSPR_MASK, COM,		{ RT } },
@@ -3181,6 +3665,7 @@
 { "mfasr",    XSPR(31,339,280), XSPR_MASK, PPC64,	{ RT } },
 { "mfear",    XSPR(31,339,282), XSPR_MASK, PPC,		{ RT } },
 { "mfpvr",    XSPR(31,339,287), XSPR_MASK, PPC,		{ RT } },
+{ "mfspefscr",XSPR(31,339,512), XSPR_MASK, PPCSPE,	{ RT } },
 { "mfibatu",  XSPR(31,339,528), XSPRBAT_MASK, PPC,	{ RT, SPRBAT } },
 { "mfibatl",  XSPR(31,339,529), XSPRBAT_MASK, PPC,	{ RT, SPRBAT } },
 { "mfdbatu",  XSPR(31,339,536), XSPRBAT_MASK, PPC,	{ RT, SPRBAT } },
@@ -3296,9 +3781,9 @@
 
 { "tlbia",   X(31,370),	0xffffffff,	PPC,		{ 0 } },
 
-{ "mftbl",   XSPR(31,371,268), XSPR_MASK, PPC,		{ RT } },
-{ "mftbu",   XSPR(31,371,269), XSPR_MASK, PPC,		{ RT } },
-{ "mftb",    X(31,371),	X_MASK,		PPC,		{ RT, TBR } },
+{ "mftbl",   XSPR(31,371,268), XSPR_MASK, CLASSIC,	{ RT } },
+{ "mftbu",   XSPR(31,371,269), XSPR_MASK, CLASSIC,	{ RT } },
+{ "mftb",    X(31,371),	X_MASK,		CLASSIC,	{ RT, TBR } },
 
 { "lwaux",   X(31,373),	X_MASK,		PPC64,		{ RT, RAL, RB } },
 
@@ -3308,12 +3793,16 @@
 
 { "mtdcrx",  X(31,387),	X_MASK,		BOOKE,		{ RA, RS } },
 
+{ "dcblc",   X(31,390),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "subfe64", XO(31,392,0,0), XO_MASK,	BOOKE64,	{ RT, RA, RB } },
 { "subfe64o",XO(31,392,1,0), XO_MASK,	BOOKE64,	{ RT, RA, RB } },
 
 { "adde64",  XO(31,394,0,0), XO_MASK,	BOOKE64,	{ RT, RA, RB } },
 { "adde64o", XO(31,394,1,0), XO_MASK,	BOOKE64,	{ RT, RA, RB } },
 
+{ "dcblce",  X(31,398),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "slbmte",  X(31,402), XRA_MASK,	PPC64,		{ RS, RB } },
 
 { "sthx",    X(31,407),	X_MASK,		COM,		{ RS, RA, RB } },
@@ -3444,6 +3933,7 @@
 { "mtear",   XSPR(31,467,282), XSPR_MASK,    PPC,	{ RS } },
 { "mttbl",   XSPR(31,467,284), XSPR_MASK,    PPC,	{ RS } },
 { "mttbu",   XSPR(31,467,285), XSPR_MASK,    PPC,	{ RS } },
+{ "mtspefscr",XSPR(31,467,512),XSPR_MASK,    PPCSPE,	{ RT } },
 { "mtibatu", XSPR(31,467,528), XSPRBAT_MASK, PPC,	{ SPRBAT, RS } },
 { "mtibatl", XSPR(31,467,529), XSPRBAT_MASK, PPC,	{ SPRBAT, RS } },
 { "mtdbatu", XSPR(31,467,536), XSPRBAT_MASK, PPC,	{ SPRBAT, RS } },
@@ -3514,6 +4004,10 @@
 
 { "dcread",  X(31,486),	X_MASK,		PPC403,		{ RT, RA, RB }},
 
+{ "mtpmr",   X(31,462),	X_MASK,		PPCPMR,		{ PMRN, RS }},
+
+{ "icbtls",  X(31,486),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "nabs",    XO(31,488,0,0), XORB_MASK, M601,		{ RT, RA } },
 { "subfme64",XO(31,488,0,0), XORB_MASK, BOOKE64,	{ RT, RA } },
 { "nabs.",   XO(31,488,0,1), XORB_MASK, M601,		{ RT, RA } },
@@ -3534,6 +4028,8 @@
 { "divwo",   XO(31,491,1,0), XO_MASK,	PPC,		{ RT, RA, RB } },
 { "divwo.",  XO(31,491,1,1), XO_MASK,	PPC,		{ RT, RA, RB } },
 
+{ "icbtlse", X(31,494),	X_MASK,		PPCCHLK,	{ CT, RA, RB }},
+
 { "slbia",   X(31,498),	0xffffffff,	PPC64,		{ 0 } },
 
 { "cli",     X(31,502), XRB_MASK,	POWER,		{ RT, RA } },
@@ -3542,6 +4038,7 @@
 
 { "mcrxr",   X(31,512),	XRARB_MASK|(3<<21), COM,	{ BF } },
 
+{ "bblels",  X(31,518),	X_MASK,		PPCBRLK,	{ 0 }},
 { "mcrxr64", X(31,544),	XRARB_MASK|(3<<21), BOOKE,	{ BF } },
 
 { "clcs",    X(31,531), XRB_MASK,	M601,		{ RT, RA } },
@@ -3572,6 +4069,7 @@
 
 { "lfsxe",   X(31,543),	X_MASK,		BOOKE64,	{ FRT, RA, RB } },
 
+{ "bbelr",   X(31,550),	X_MASK,		PPCBRLK,	{ 0 }},
 { "tlbsync", X(31,566),	0xffffffff,	PPC,		{ 0 } },
 
 { "lfsux",   X(31,567),	X_MASK,		COM,		{ FRT, RAS, RB } },
@@ -4060,6 +4558,9 @@
 { "clrlslwi",4,   PPCCOM,	"rlwinm %0,%1,%3,(%2)-(%3),31-(%3)" },
 { "clrlslwi.",4,  PPCCOM,	"rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
 
+{ "mftbl",   1,   BOOKE,	"mfspr %0,tbl" },
+{ "mftbu",   1,   BOOKE,	"mfspr %0,tbu" },
+{ "mftb",    2,   BOOKE,	"mfspr %0,%1" },
 };
 
 const int powerpc_num_macros =
diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c
index 4c59398..47ebb31 100644
--- a/opcodes/sparc-dis.c
+++ b/opcodes/sparc-dis.c
@@ -1,6 +1,6 @@
 /* Print SPARC instructions.
    Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000 Free Software Foundation, Inc.
+   2000, 2002 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -188,7 +188,7 @@
 
   for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
     {
-      CONST struct sparc_opcode *opcode = op->opcode;
+      const struct sparc_opcode *opcode = op->opcode;
       if ((opcode->match & insn) == opcode->match
 	  && (opcode->lose & insn) == 0)
 	return (opcode->flags & F_DELAYED);
@@ -272,7 +272,7 @@
 
   for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
     {
-      CONST struct sparc_opcode *opcode = op->opcode;
+      const struct sparc_opcode *opcode = op->opcode;
 
       /* If the insn isn't supported by the current architecture, skip it.  */
       if (! (opcode->architecture & current_arch_mask))
@@ -312,7 +312,7 @@
 	  (*info->fprintf_func) (stream, opcode->name);
 
 	  {
-	    register CONST char *s;
+	    register const char *s;
 
 	    if (opcode->args[0] != ',')
 	      (*info->fprintf_func) (stream, " ");
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c
index d375e69..6c19138 100644
--- a/opcodes/z8k-dis.c
+++ b/opcodes/z8k-dis.c
@@ -515,10 +515,10 @@
 	  break;
 	case CLASS_BA:
           if (is_segmented)
-            sprintf (tmp_str, "rr%ld(#%lx)", instr_data->arg_reg[datum_value],
+            sprintf (tmp_str, "rr%ld(#0x%lx)", instr_data->arg_reg[datum_value],
                      instr_data->immediate);
           else
-            sprintf (tmp_str, "r%ld(#%lx)", instr_data->arg_reg[datum_value],
+            sprintf (tmp_str, "r%ld(#0x%lx)", instr_data->arg_reg[datum_value],
                      instr_data->immediate);
 	  strcat (out_str, tmp_str);
 	  break;
diff --git a/opcodes/z8k-opc.h b/opcodes/z8k-opc.h
index 025cfab..0e478bf 100644
--- a/opcodes/z8k-opc.h
+++ b/opcodes/z8k-opc.h
@@ -1621,14 +1621,14 @@
 	{CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,135},
 
 
-/* 0011 1101 dddd 0100 imm16 *** in rd,imm16 */
+/* 0011 1011 dddd 0100 imm16 *** in rd,imm16 */
 {
 #ifdef NICENAMES
 "in rd,imm16",16,12,
 0x00,
 #endif
 "in",OPC_in,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
-	{CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,136},
+	{CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,136},
 
 
 /* 0011 1100 ssN0 dddd *** inb rbd,@rs */
diff --git a/opcodes/z8kgen.c b/opcodes/z8kgen.c
index fa85059..5bd9240 100644
--- a/opcodes/z8kgen.c
+++ b/opcodes/z8kgen.c
@@ -209,8 +209,8 @@
 
   "------", 8, 16, "0111 1010 0000 0000", "halt", 0,
   "------", 10, 16, "0011 1101 ssN0 dddd", "in rd,@rs", 0,
-  "------", 12, 16, "0011 1101 dddd 0100 imm16", "in rd,imm16", 0,
   "------", 12, 8, "0011 1100 ssN0 dddd", "inb rbd,@rs", 0,
+  "------", 12, 16, "0011 1011 dddd 0100 imm16", "in rd,imm16", 0,
   "------", 10, 8, "0011 1010 dddd 0100 imm16", "inb rbd,imm16", 0,
   "-ZSV--", 11, 16, "0010 1001 ddN0 imm4m1", "inc @rd,imm4m1", 0,
   "-ZSV--", 14, 16, "0110 1001 ddN0 imm4m1 address_dst", "inc address_dst(rd),imm4m1", 0,
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index c4bbd79..403d870 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,13 @@
+2002-08-23  Andrew Cagney  <ac131313@redhat.com>
+
+	* support/config.guess: Import version 2002-08-23.
+	* support/config.sub: Import version 2002-08-22.
+
+2002-07-19  Chris Demetriou  <cgd@broadcom.com>
+
+	* support/config.guess: Update from ../config.guess.
+	* support/config.sub: Update from ../config.sub.
+
 2002-02-24  Elena Zannoni  <ezannoni@redhat.com>
 
         * ChangeLog.gdb: Renamed from ChangeLog.Cygnus.
diff --git a/readline/examples/excallback.c b/readline/examples/excallback.c
index ca03fc3..3d4bb18 100644
--- a/readline/examples/excallback.c
+++ b/readline/examples/excallback.c
@@ -153,6 +153,8 @@
   } else {
     fprintf(stderr, "|%s|\n", line);
   }
+
+  free (line);
 }
 
 int
diff --git a/readline/support/config.guess b/readline/support/config.guess
index db494f8..c5438de 100755
--- a/readline/support/config.guess
+++ b/readline/support/config.guess
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2002-02-19'
+timestamp='2002-08-23'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -88,30 +88,40 @@
   exit 1
 fi
 
+trap 'exit 1' 1 2 15
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
 
-# CC_FOR_BUILD -- compiler used by this script.
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
-	  if test $? = 0 ; then
+# This shell variable is my proudest work .. or something. --bje
+
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
-	rm -f $dummy.c $dummy.o $dummy.rel ;
+	rm -f $files ;
 	if test x"$CC_FOR_BUILD" = x ; then
 	  CC_FOR_BUILD=no_compiler_found ;
 	fi
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;
+unset files'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -138,9 +148,11 @@
 	#
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
-	UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
-	    UNAME_MACHINE_ARCH=unknown
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
@@ -219,6 +231,7 @@
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
+	eval $set_cc_for_build
 	cat <<EOF >$dummy.s
 	.data
 \$Lformat:
@@ -244,10 +257,9 @@
 	jsr \$26,exit
 	.end main
 EOF
-	eval $set_cc_for_build
 	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 	if test "$?" = 0 ; then
-		case `./$dummy` in
+		case `$dummy` in
 			0-0)
 				UNAME_MACHINE="alpha"
 				;;
@@ -269,9 +281,12 @@
 			2-1307)
 				UNAME_MACHINE="alphaev68"
 				;;
+			3-1307)
+				UNAME_MACHINE="alphaev7"
+				;;
 		esac
 	fi
-	rm -f $dummy.s $dummy
+	rm -f $dummy.s $dummy && rmdir $tmpdir
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	exit 0 ;;
     Alpha\ *:Windows_NT*:*)
@@ -312,6 +327,10 @@
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
@@ -419,14 +438,17 @@
 	}
 EOF
 	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo mips-mips-riscos${UNAME_RELEASE}
 	exit 0 ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
 	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS)
+	echo powerpc-harris-powermax
+	exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
 	exit 0 ;;
@@ -499,8 +521,8 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
+		$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+		rm -f $dummy.c $dummy && rmdir $tmpdir
 		echo rs6000-ibm-aix3.2.5
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
@@ -598,9 +620,9 @@
                   exit (0);
               }
 EOF
-		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
 		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-		    rm -f $dummy.c $dummy
+		    rm -f $dummy.c $dummy && rmdir $tmpdir
 		fi ;;
 	esac
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -636,8 +658,8 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+	rm -f $dummy.c $dummy && rmdir $tmpdir
 	echo unknown-hitachi-hiuxwe2
 	exit 0 ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -720,7 +742,19 @@
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit 0 ;;
     *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	rm -f $dummy.c && rmdir $tmpdir
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
 	exit 0 ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
@@ -759,7 +793,7 @@
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -770,18 +804,18 @@
 	#undef CPU
 	#undef mips
 	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 
-	CPU=mipsel 
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
 	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 	CPU=mips
 	#else
 	CPU=
 	#endif
-	#endif 
+	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	rm -f $dummy.c
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 	;;
     ppc:Linux:*:*)
@@ -844,7 +878,7 @@
 		;;
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;		
+		exit 0 ;;
 	  coff-i386)
 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 		exit 0 ;;
@@ -877,7 +911,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	rm -f $dummy.c
+	rm -f $dummy.c && rmdir $tmpdir
 	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 	;;
@@ -916,13 +950,13 @@
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
 			&& UNAME_MACHINE=i586
-		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
 	else
@@ -955,9 +989,12 @@
 	# "miniframe"
 	echo m68010-convergent-sysv
 	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
     M68*:*:R3V[567]*:*)
 	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1048,6 +1085,9 @@
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
 	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit 0 ;;
@@ -1058,12 +1098,12 @@
 	echo `uname -p`-apple-darwin${UNAME_RELEASE}
 	exit 0 ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
-		echo i386-${UNAME_MACHINE}-nto-qnx
-	else
-		echo `uname -p`-${UNAME_MACHINE}-nto-qnx
 	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
 	exit 0 ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
@@ -1240,8 +1280,8 @@
 }
 EOF
 
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+rm -f $dummy.c $dummy && rmdir $tmpdir
 
 # Apollos put the system type in the environment.
 
diff --git a/readline/support/config.sub b/readline/support/config.sub
index 4ac7ab2..b0222f7 100755
--- a/readline/support/config.sub
+++ b/readline/support/config.sub
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2002-02-22'
+timestamp='2002-08-22'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -230,24 +230,34 @@
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 	| c4x | clipper \
-	| d10v | d30v | dsp16xx \
-	| fr30 \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
+	| ip2k \
 	| m32r | m68000 | m68k | m88k | mcore \
-	| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
-	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
-	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
-	| mipsisa32 \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| ns16k | ns32k \
 	| openrisc | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
-	| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
 	| strongarm \
 	| tahoe | thumb | tic80 | tron \
 	| v850 | v850e \
@@ -281,32 +291,43 @@
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armv*-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
 	| bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c54x-* \
 	| clipper-* | cydra-* \
-	| d10v-* | d30v-* \
+	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | fx80-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
 	| m32r-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 	| m88110-* | m88k-* | mcore-* \
-	| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
-	| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
-	| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39 | mipstx39el \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
 	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
 	| v850-* | v850e-* | vax-* \
@@ -728,13 +749,13 @@
 	pbb)
 		basic_machine=m68k-tti
 		;;
-        pc532 | pc532-*)
+	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
-	pentiumpro | p6 | 6x86 | athlon)
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 		basic_machine=i686-pc
 		;;
 	pentiumii | pentium2)
@@ -755,22 +776,22 @@
 	power)	basic_machine=power-ibm
 		;;
 	ppc)	basic_machine=powerpc-unknown
-	        ;;
+		;;
 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
-	        ;;
+		;;
 	ppcle-* | powerpclittle-*)
 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64)	basic_machine=powerpc64-unknown
-	        ;;
+		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
-	        ;;
+		;;
 	ppc64le-* | powerpc64little-*)
 		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
@@ -801,6 +822,12 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
 	sequent)
 		basic_machine=i386-sequent
 		;;
@@ -866,7 +893,7 @@
 	sun386 | sun386i | roadrunner)
 		basic_machine=i386-sun
 		;;
-        sv1)
+	sv1)
 		basic_machine=sv1-cray
 		os=-unicos
 		;;
@@ -924,8 +951,8 @@
 		os=-vms
 		;;
 	vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
+		basic_machine=f301-fujitsu
+		;;
 	vxworks960)
 		basic_machine=i960-wrs
 		os=-vxworks
@@ -950,7 +977,7 @@
 		basic_machine=i386-pc
 		os=-windows32-msvcrt
 		;;
-        xps | xps100)
+	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
 	ymp)
@@ -996,7 +1023,7 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh3eb | sh4eb)
+	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
 		basic_machine=sh-unknown
 		;;
 	sh64)
@@ -1005,7 +1032,7 @@
 	sparc | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
-        cydra)
+	cydra)
 		basic_machine=cydra-cydrome
 		;;
 	orion)
@@ -1090,7 +1117,7 @@
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova*)
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1155,7 +1182,7 @@
 		os=-rtmk-nova
 		;;
 	-ns2 )
-	        os=-nextstep2
+		os=-nextstep2
 		;;
 	-nsk*)
 		os=-nsk
@@ -1194,8 +1221,8 @@
 	-xenix)
 		os=-xenix
 		;;
-        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-	        os=-mint
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
 		;;
 	-none)
 		;;
@@ -1232,7 +1259,7 @@
 	pdp10-*)
 		os=-tops20
 		;;
-        pdp11-*)
+	pdp11-*)
 		os=-none
 		;;
 	*-dec | vax-*)
@@ -1325,19 +1352,19 @@
 	*-next)
 		os=-nextstep3
 		;;
-        *-gould)
+	*-gould)
 		os=-sysv
 		;;
-        *-highlevel)
+	*-highlevel)
 		os=-bsd
 		;;
 	*-encore)
 		os=-bsd
 		;;
-        *-sgi)
+	*-sgi)
 		os=-irix
 		;;
-        *-siemens)
+	*-siemens)
 		os=-sysv4
 		;;
 	*-masscomp)
@@ -1409,7 +1436,7 @@
 			-ptx*)
 				vendor=sequent
 				;;
-			-vxsim* | -vxworks*)
+			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
 			-aux*)
diff --git a/sim/ChangeLog b/sim/ChangeLog
index b727293..4d6c1ad 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,32 @@
+2002-07-17  Andrew Cagney  <ac131313@redhat.com>
+
+	* w65/: Delete directory.
+
+2002-07-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure.in (extra_subdirs): Mark fr30-*-* as obsolete.
+	* configure: Re-generate.
+
+2002-07-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure.in (extra_subdirs): Mark d30v-*-* as obsolete.
+	* configure: Re-generate.
+	
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (autoconf-changelog autoheader-changelog): Let name,
+	id, date and host to be overriden by NAME, ID, DATE and HOST
+	respectfully.  Use ISO dates.
+
+Thu Jun  6 12:34:13 2002  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (ChangeLog): New makefile variable.
+	* README-HACKING: Mention the ChangeLog makefile variable.
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* tic80/: Delete directory.
+
 2002-05-16  Stephane Carrez  <stcarrez@nerim.fr>
 
 	* MAINTAINERS: Update my email address.
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 1e53780..9a044f0 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -73,6 +73,10 @@
 # @target_makefile_frag@
 ###
 
+# Name of the ChangeLog file.
+ChangeLog = ChangeLog
+
+
 RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
 		echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
 	   fi`
@@ -220,16 +224,20 @@
 	done
 
 autoconf-changelog autoheader-changelog:
-	id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
-	name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
-	host="`hostname`" ; \
-	date="`date | sed 's/ [^ ]* \([0-9]*\)$$/ \1/'`" ; \
+	id=$(ID) ; \
+	test x$$id = x && id="`id | sed -e 's/^[^(]*(\([^)]*\).*$$/\1/'`" ; \
+	name=$(NAME) ; \
+	test x$$name = x && name=`grep "^$$id:" /etc/passwd | cut -f 5 -d ':'` ; \
+	host=$(HOST) ; \
+	test x$$host = x && host="`hostname`" ; \
+	date=$(DATE) ; \
+	test x$$date = x && date="`date +%Y-%m-%d`" ; \
 	echo "$$date $$name $$id@$$host" ; \
 	for d in * ; \
 	do \
 	    if [ -d $$d -a -f $$d/configure.in ] ; \
 	    then \
-		 echo "Creating new-ChangeLog in $$d ..." ; \
+		 echo "Creating new-$(ChangeLog) in $$d ..." ; \
 		 ( echo "$$date  $$name  <$$id@$$host>" ; \
 		   echo "" ; \
 		   echo "	* configure: Regenerated to track ../common/aclocal.m4 changes." ; \
@@ -238,8 +246,8 @@
 		     echo "	* config.in: Ditto." ; \
 		   fi ; \
 		   echo "" ; \
-		   cat $$d/ChangeLog \
-		 ) > $$d/new-ChangeLog ; \
+		   cat $$d/$(ChangeLog) \
+		 ) > $$d/new-$(ChangeLog) ; \
 	    fi ; \
 	done
 
@@ -248,7 +256,7 @@
 	do \
 	    if [ -d $$d -a -f $$d/configure.in ] ; \
 	    then \
-		 echo "Moving $$d/new-ChangeLog to $$d/ChangeLog ..." ; \
-		 mv $$d/new-ChangeLog $$d/ChangeLog ; \
+		 echo "Moving $$d/new-$(ChangeLog) to $$d/$(ChangeLog) ..." ; \
+		 mv $$d/new-$(ChangeLog) $$d/$(ChangeLog) ; \
 	    fi ; \
 	done
diff --git a/sim/README-HACKING b/sim/README-HACKING
index e4efeb1..bee504a 100644
--- a/sim/README-HACKING
+++ b/sim/README-HACKING
@@ -153,6 +153,11 @@
 	$  make -f Makefile.in SHELL=/bin/sh autoheader-changelog
 	$  more */new-ChangeLog
 	$  make -f Makefile.in SHELL=/bin/sh autoheader-install
+
+To add the entries to an alternative ChangeLog file, use:
+
+	$  make ChangeLog=MyChangeLog ....
+
 
 tconfig.in
 ==========
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index b5b17f2..9ce404e 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,39 @@
+2002-08-15  Nick Clifton  <nickc@redhat.com>
+
+	* armos.c (ARMul_OSHandleSWI): Catch and ignore SWIs of -1, they
+	can be caused by an interrupted system call being resumed by GDB.
+
+2002-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* armemu.c (ARMul_Emulate32): Add more tests for valid MIA, MIAPH
+	and MIAxy instructions.
+	
+2002-06-21  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* armos.h (ADP_Stopped_RunTimeError): Set correct value.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-12  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in: Update copyright.
+	(wrapper.o): Specify dependencies.
+	* wrapper.c: Include "gdb/sim-arm.h".
+	(sim_store_register, sim_fetch_register): Rewrite using `enum
+	arm_sim_regs' and a switch.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* wrapper.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* armos.c: Include "gdb/callback.h".
+
+2002-05-29  Nick Clifton  <nickc@cambridge.redhat.com>
+
+	* armcopro.c (XScale_check_memacc): Set the FSR and FAR registers
+	if a Data Abort is detected.
+
 2002-05-27  Nick Clifton  <nickc@cambridge.redhat.com>
 
 	* armvirt.c (GetWord): Only perform access checks if 'check'
diff --git a/sim/arm/Makefile.in b/sim/arm/Makefile.in
index 79bbc88..0da765f 100644
--- a/sim/arm/Makefile.in
+++ b/sim/arm/Makefile.in
@@ -1,5 +1,5 @@
 #    Makefile template for Configure for the arm sim library.
-#    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+#    Copyright 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
 #    Written by Cygnus Support.
 # 
 # This program is free software; you can redistribute it and/or modify
@@ -48,3 +48,9 @@
 thumbemu.o: thumbemu.c armdefs.h armemu.h
 
 bag.o: bag.c bag.h
+
+wrapper.o: armdefs.h armemu.h dbg_rdi.h \
+	$(srcdir)/../common/run-sim.h \
+	$(srcdir)/../common/sim-utils.h \
+	$(srcdir)/../../include/gdb/sim-arm.h \
+	$(srcdir)/../../include/gdb/remote-sim.h
diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c
index 8b04186..2c2ca85 100644
--- a/sim/arm/armcopro.c
+++ b/sim/arm/armcopro.c
@@ -479,7 +479,14 @@
 
   /* Check alignment fault enable/disable.  */
   if ((read_cp15_reg (1, 0, 0) & ARMul_CP15_R1_ALIGN) && (* address & 3))
-    ARMul_Abort (state, ARMul_DataAbortV);
+    {
+      /* Set the FSR and FAR.
+	 Do not use XScale_set_fsr_far as this checks the DCSR register.  */
+      write_cp15_reg (state, 5, 0, 0, ARMul_CP15_R5_MMU_EXCPT);
+      write_cp15_reg (state, 6, 0, 0, * address);
+
+      ARMul_Abort (state, ARMul_DataAbortV);
+    }
 
   if (XScale_debug_moe (state, -1))
     return;
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c
index 8e71926..44943c4 100644
--- a/sim/arm/armemu.c
+++ b/sim/arm/armemu.c
@@ -3366,78 +3366,84 @@
 		switch (BITS (18, 19))
 		  {
 		  case 0x0:
-		    {
-		      /* XScale MIA instruction.  Signed multiplication of two 32 bit
-			 values and addition to 40 bit accumulator.  */
-		      long long Rm = state->Reg[MULLHSReg];
-		      long long Rs = state->Reg[MULACCReg];
+		    if (BITS (4, 11) == 1 && BITS (16, 17) == 0)
+		      {
+			/* XScale MIA instruction.  Signed multiplication of
+			   two 32 bit values and addition to 40 bit accumulator.  */
+			long long Rm = state->Reg[MULLHSReg];
+			long long Rs = state->Reg[MULACCReg];
 
-		      if (Rm & (1 << 31))
-			Rm -= 1ULL << 32;
-		      if (Rs & (1 << 31))
-			Rs -= 1ULL << 32;
-		      state->Accumulator += Rm * Rs;
-		    }
-		    goto donext;
+			if (Rm & (1 << 31))
+			  Rm -= 1ULL << 32;
+			if (Rs & (1 << 31))
+			  Rs -= 1ULL << 32;
+			state->Accumulator += Rm * Rs;
+			goto donext;
+		      }
+		    break;
 
 		  case 0x2:
-		    {
-		      /* XScale MIAPH instruction.  */
-		      ARMword t1 = state->Reg[MULLHSReg] >> 16;
-		      ARMword t2 = state->Reg[MULACCReg] >> 16;
-		      ARMword t3 = state->Reg[MULLHSReg] & 0xffff;
-		      ARMword t4 = state->Reg[MULACCReg] & 0xffff;
-		      long long t5;
+		    if (BITS (4, 11) == 1 && BITS (16, 17) == 0)
+		      {
+			/* XScale MIAPH instruction.  */
+			ARMword t1 = state->Reg[MULLHSReg] >> 16;
+			ARMword t2 = state->Reg[MULACCReg] >> 16;
+			ARMword t3 = state->Reg[MULLHSReg] & 0xffff;
+			ARMword t4 = state->Reg[MULACCReg] & 0xffff;
+			long long t5;
 
-		      if (t1 & (1 << 15))
-			t1 -= 1 << 16;
-		      if (t2 & (1 << 15))
-			t2 -= 1 << 16;
-		      if (t3 & (1 << 15))
-			t3 -= 1 << 16;
-		      if (t4 & (1 << 15))
-			t4 -= 1 << 16;
-		      t1 *= t2;
-		      t5 = t1;
-		      if (t5 & (1 << 31))
-			t5 -= 1ULL << 32;
-		      state->Accumulator += t5;
-		      t3 *= t4;
-		      t5 = t3;
-		      if (t5 & (1 << 31))
-			t5 -= 1ULL << 32;
-		      state->Accumulator += t5;
-		    }
-		    goto donext;
+			if (t1 & (1 << 15))
+			  t1 -= 1 << 16;
+			if (t2 & (1 << 15))
+			  t2 -= 1 << 16;
+			if (t3 & (1 << 15))
+			  t3 -= 1 << 16;
+			if (t4 & (1 << 15))
+			  t4 -= 1 << 16;
+			t1 *= t2;
+			t5 = t1;
+			if (t5 & (1 << 31))
+			  t5 -= 1ULL << 32;
+			state->Accumulator += t5;
+			t3 *= t4;
+			t5 = t3;
+			if (t5 & (1 << 31))
+			  t5 -= 1ULL << 32;
+			state->Accumulator += t5;
+			goto donext;
+		      }
+		    break;
 
 		  case 0x3:
-		    {
-		      /* XScale MIAxy instruction.  */
-		      ARMword t1;
-		      ARMword t2;
-		      long long t5;
+		    if (BITS (4, 11) == 1)
+		      {
+			/* XScale MIAxy instruction.  */
+			ARMword t1;
+			ARMword t2;
+			long long t5;
 
-		      if (BIT (17))
-			t1 = state->Reg[MULLHSReg] >> 16;
-		      else
-			t1 = state->Reg[MULLHSReg] & 0xffff;
+			if (BIT (17))
+			  t1 = state->Reg[MULLHSReg] >> 16;
+			else
+			  t1 = state->Reg[MULLHSReg] & 0xffff;
 
-		      if (BIT (16))
-			t2 = state->Reg[MULACCReg] >> 16;
-		      else
-			t2 = state->Reg[MULACCReg] & 0xffff;
+			if (BIT (16))
+			  t2 = state->Reg[MULACCReg] >> 16;
+			else
+			  t2 = state->Reg[MULACCReg] & 0xffff;
 
-		      if (t1 & (1 << 15))
-			t1 -= 1 << 16;
-		      if (t2 & (1 << 15))
-			t2 -= 1 << 16;
-		      t1 *= t2;
-		      t5 = t1;
-		      if (t5 & (1 << 31))
-			t5 -= 1ULL << 32;
-		      state->Accumulator += t5;
-		    }
-		    goto donext;
+			if (t1 & (1 << 15))
+			  t1 -= 1 << 16;
+			if (t2 & (1 << 15))
+			  t2 -= 1 << 16;
+			t1 *= t2;
+			t5 = t1;
+			if (t5 & (1 << 31))
+			  t5 -= 1ULL << 32;
+			state->Accumulator += t5;
+			goto donext;
+		      }
+		    break;
 
 		  default:
 		    break;
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index 4635932..c4cb051 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -83,7 +83,7 @@
 /* For RDIError_BreakpointReached.  */
 #include "dbg_rdi.h"
 
-#include "callback.h"
+#include "gdb/callback.h"
 extern host_callback *sim_callback;
 
 extern unsigned ARMul_OSInit       (ARMul_State *);
@@ -553,6 +553,13 @@
 	  /* R0 is a reason code.  */
 	  switch (state->Reg[0])
 	    {
+	    case -1:
+	      /* This can happen when a SWI is interrupted (eg receiving a
+		 ctrl-C whilst processing SWIRead()).  The SWI will complete
+		 returning -1 in r0 to the caller.  If GDB is then used to
+		 resume the system call the reason code will now be -1.  */
+	      return TRUE;
+	  
 	      /* Unimplemented reason codes.  */
 	    case AngelSWI_Reason_ReadC:
 	    case AngelSWI_Reason_IsTTY:
@@ -685,6 +692,13 @@
       /* These are used by the FPE code.  */
       break;
       
+    case -1:
+      /* This can happen when a SWI is interrupted (eg receiving a
+	 ctrl-C whilst processing SWIRead()).  The SWI will complete
+	 returning -1 in r0 to the caller.  If GDB is then used to
+	 resume the system call the reason code will now be -1.  */
+      return TRUE;
+	  
     case 0x180001: /* RedBoot's Syscall SWI in ARM mode.  */
       if (swi_mask & SWI_MASK_REDBOOT)
 	{
diff --git a/sim/arm/armos.h b/sim/arm/armos.h
index d943735..b0a1da0 100644
--- a/sim/arm/armos.h
+++ b/sim/arm/armos.h
@@ -15,20 +15,16 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
-/***************************************************************************\
-*                   Define the initial layout of memory                     *
-\***************************************************************************/
+/* Define the initial layout of memory.  */
 
-#define ADDRSUPERSTACK          0x800L	/* supervisor stack space */
-#define ADDRUSERSTACK           0x80000L	/* default user stack start */
-#define ADDRSOFTVECTORS         0x840L	/* soft vectors are here */
-#define ADDRCMDLINE             0xf00L	/* command line is here after a SWI GetEnv */
-#define ADDRSOFHANDLERS         0xad0L	/* address and workspace for installed handlers */
-#define SOFTVECTORCODE          0xb80L	/* default handlers */
+#define ADDRSUPERSTACK          0x800L	/* Supervisor stack space.  */
+#define ADDRUSERSTACK           0x80000L/* Default user stack start.  */
+#define ADDRSOFTVECTORS         0x840L	/* Soft vectors are here.  */
+#define ADDRCMDLINE             0xf00L	/* Command line is here after a SWI GetEnv.  */
+#define ADDRSOFHANDLERS         0xad0L	/* Address and workspace for installed handlers.  */
+#define SOFTVECTORCODE          0xb80L	/* Default handlers.  */
 
-/***************************************************************************\
-*                               SWI numbers                                 *
-\***************************************************************************/
+/* SWI numbers.  */
 
 #define SWI_WriteC                 0x0
 #define SWI_Write0                 0x2
@@ -56,40 +52,41 @@
 #define SWI_InstallHandler         0x70
 #define SWI_GenerateError          0x71
 
-#define SWI_Breakpoint             0x180000	/* see gdb's tm-arm.h */
+#define SWI_Breakpoint             0x180000	/* See gdb's tm-arm.h  */
 
 #define AngelSWI_ARM		   0x123456
 #define AngelSWI_Thumb		   0xAB
 
-/* The reason codes: */
-#define AngelSWI_Reason_Open		(0x01)
-#define AngelSWI_Reason_Close		(0x02)
-#define AngelSWI_Reason_WriteC		(0x03)
-#define AngelSWI_Reason_Write0		(0x04)
-#define AngelSWI_Reason_Write		(0x05)
-#define AngelSWI_Reason_Read		(0x06)
-#define AngelSWI_Reason_ReadC		(0x07)
-#define AngelSWI_Reason_IsTTY		(0x09)
-#define AngelSWI_Reason_Seek		(0x0A)
-#define AngelSWI_Reason_FLen		(0x0C)
-#define AngelSWI_Reason_TmpNam		(0x0D)
-#define AngelSWI_Reason_Remove		(0x0E)
-#define AngelSWI_Reason_Rename		(0x0F)
-#define AngelSWI_Reason_Clock		(0x10)
-#define AngelSWI_Reason_Time		(0x11)
-#define AngelSWI_Reason_System		(0x12)
-#define AngelSWI_Reason_Errno		(0x13)
-#define AngelSWI_Reason_GetCmdLine 	(0x15)
-#define AngelSWI_Reason_HeapInfo 	(0x16)
-#define AngelSWI_Reason_EnterSVC 	(0x17)
-#define AngelSWI_Reason_ReportException (0x18)
+/* The reason codes:  */
+#define AngelSWI_Reason_Open		0x01
+#define AngelSWI_Reason_Close		0x02
+#define AngelSWI_Reason_WriteC		0x03
+#define AngelSWI_Reason_Write0		0x04
+#define AngelSWI_Reason_Write		0x05
+#define AngelSWI_Reason_Read		0x06
+#define AngelSWI_Reason_ReadC		0x07
+#define AngelSWI_Reason_IsTTY		0x09
+#define AngelSWI_Reason_Seek		0x0A
+#define AngelSWI_Reason_FLen		0x0C
+#define AngelSWI_Reason_TmpNam		0x0D
+#define AngelSWI_Reason_Remove		0x0E
+#define AngelSWI_Reason_Rename		0x0F
+#define AngelSWI_Reason_Clock		0x10
+#define AngelSWI_Reason_Time		0x11
+#define AngelSWI_Reason_System		0x12
+#define AngelSWI_Reason_Errno		0x13
+#define AngelSWI_Reason_GetCmdLine 	0x15
+#define AngelSWI_Reason_HeapInfo 	0x16
+#define AngelSWI_Reason_EnterSVC 	0x17
+#define AngelSWI_Reason_ReportException 0x18
 #define ADP_Stopped_ApplicationExit 	((2 << 16) + 38)
-#define ADP_Stopped_RunTimeError 	((2 << 16) + 34)
+#define ADP_Stopped_RunTimeError 	((2 << 16) + 35)
 
-#define FPESTART 0x2000L
-#define FPEEND 0x8000L
-#define FPEOLDVECT FPESTART + 0x100L + 8L * 16L + 4L	/* stack + 8 regs + fpsr */
-#define FPENEWVECT(addr) 0xea000000L + ((addr) >> 2) - 3L	/* branch from 4 to 0x2400 */
+/* Floating Point Emulator address space.  */
+#define FPESTART         0x2000L
+#define FPEEND           0x8000L
+#define FPEOLDVECT       FPESTART + 0x100L + 8L * 16L + 4L	/* Stack + 8 regs + fpsr.  */
+#define FPENEWVECT(addr) 0xea000000L + ((addr) >> 2) - 3L	/* Branch from 4 to 0x2400.  */
 
 extern unsigned long fpecode[];
 extern unsigned long fpesize;
diff --git a/sim/arm/configure b/sim/arm/configure
index 2c574e4..65f0825 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -3537,6 +3537,8 @@
 COPRO=armcopro.o
 
 
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 0ff2cd9..c8361ba 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -28,14 +28,15 @@
 #include <string.h>
 #include <bfd.h>
 #include <signal.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "armdefs.h"
 #include "armemu.h"
 #include "dbg_rdi.h"
 #include "ansidecl.h"
 #include "sim-utils.h"
 #include "run-sim.h"
+#include "gdb/sim-arm.h"
 
 host_callback *sim_callback;
 
@@ -386,13 +387,45 @@
 {
   init ();
 
-  if (rn == 25)
+  switch ((enum sim_arm_regs) rn)
     {
+    case SIM_ARM_R0_REGNUM:
+    case SIM_ARM_R1_REGNUM:
+    case SIM_ARM_R2_REGNUM:
+    case SIM_ARM_R3_REGNUM:
+    case SIM_ARM_R4_REGNUM:
+    case SIM_ARM_R5_REGNUM:
+    case SIM_ARM_R6_REGNUM:
+    case SIM_ARM_R7_REGNUM:
+    case SIM_ARM_R8_REGNUM:
+    case SIM_ARM_R9_REGNUM:
+    case SIM_ARM_R10_REGNUM:
+    case SIM_ARM_R11_REGNUM:
+    case SIM_ARM_R12_REGNUM:
+    case SIM_ARM_R13_REGNUM:
+    case SIM_ARM_R14_REGNUM:
+    case SIM_ARM_R15_REGNUM: /* PC */
+    case SIM_ARM_FP0_REGNUM:
+    case SIM_ARM_FP1_REGNUM:
+    case SIM_ARM_FP2_REGNUM:
+    case SIM_ARM_FP3_REGNUM:
+    case SIM_ARM_FP4_REGNUM:
+    case SIM_ARM_FP5_REGNUM:
+    case SIM_ARM_FP6_REGNUM:
+    case SIM_ARM_FP7_REGNUM:
+    case SIM_ARM_FPS_REGNUM:
+      ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
+      break;
+
+    case SIM_ARM_PS_REGNUM:
       state->Cpsr = frommem (state, memory);
       ARMul_CPSRAltered (state);
+      break;
+
+    default:
+      return 0;
     }
-  else
-    ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
+
   return -1;
 }
 
@@ -407,14 +440,46 @@
 
   init ();
 
-  if (rn < 16)
-    regval = ARMul_GetReg (state, state->Mode, rn);
-  else if (rn == 25)
-    /* FIXME: use PS_REGNUM from gdb/config/arm/tm-arm.h.  */
-    regval = ARMul_GetCPSR (state);
-  else
-    /* FIXME: should report an error.  */
-    regval = 0;
+  switch ((enum sim_arm_regs) rn)
+    {
+    case SIM_ARM_R0_REGNUM:
+    case SIM_ARM_R1_REGNUM:
+    case SIM_ARM_R2_REGNUM:
+    case SIM_ARM_R3_REGNUM:
+    case SIM_ARM_R4_REGNUM:
+    case SIM_ARM_R5_REGNUM:
+    case SIM_ARM_R6_REGNUM:
+    case SIM_ARM_R7_REGNUM:
+    case SIM_ARM_R8_REGNUM:
+    case SIM_ARM_R9_REGNUM:
+    case SIM_ARM_R10_REGNUM:
+    case SIM_ARM_R11_REGNUM:
+    case SIM_ARM_R12_REGNUM:
+    case SIM_ARM_R13_REGNUM:
+    case SIM_ARM_R14_REGNUM:
+    case SIM_ARM_R15_REGNUM: /* PC */
+      regval = ARMul_GetReg (state, state->Mode, rn);
+      break;
+
+    case SIM_ARM_FP0_REGNUM:
+    case SIM_ARM_FP1_REGNUM:
+    case SIM_ARM_FP2_REGNUM:
+    case SIM_ARM_FP3_REGNUM:
+    case SIM_ARM_FP4_REGNUM:
+    case SIM_ARM_FP5_REGNUM:
+    case SIM_ARM_FP6_REGNUM:
+    case SIM_ARM_FP7_REGNUM:
+    case SIM_ARM_FPS_REGNUM:
+      memset (memory, 0, length);
+      return 0;
+
+    case SIM_ARM_PS_REGNUM:
+      regval = ARMul_GetCPSR (state);
+      break;
+
+    default:
+      return 0;
+    }
 
   while (length)
     {
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 65aa6b1..8e7aabc 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,72 @@
+2002-07-17  Andrew Cagney  <cagney@redhat.com>
+
+	* run-sim.h: Add #ifdef RUN_SIM_H wrapper.
+	(sim_set_callbacks, sim_size, sim_trace)
+	(sim_set_trace, sim_set_profile_size, sim_kill): Declare.  Moved
+	to here from "gdb/remote-sim.h".
+
+2002-07-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* sim-resume.c (sim_resume): Add local variable sig_to_deliver to
+	avoid possible longjmp problems with automatic variable siggnal.
+
+2002-07-14  Andrew Cagney  <ac131313@redhat.com>
+
+	From 2002-07-11 Momchil Velikov <velco@fadata.bg>:
+	* Make-common.in (installdirs): Make $(libdir) too, needed when
+	installing libsim.a.
+
+2002-07-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* gennltvals.sh (dir): Mark d30v as obsolete.
+	* nltvals.def: Remove d30v.
+
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* hw-events.c (hw_event_queue_schedule): Initialize `dummy'.
+
+	* sim-memopt.c: Include <unistd.h>.
+	(do_memopt_add): Fix printf format.
+	* sim-events.c (sim_events_schedule): Initialize ``dummy''.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* aclocal.m4 (SIM_AC_OPTION_WARNINGS): Update to match GDB's
+	--enable-gdb-build-warnings.
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09  Aldy Hernandez  <aldyh@redhat.com>
+
+        * sim-fpu.c (unpack_fpu): Initialize exponent for
+        sim_fpu_class_zero.
+        (i2fpu): Same.
+        (sim_fpu_sqrt): Same.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* gentmap.c (gen_targ_map_c): Generate "gdb/callback.h".
+	* sim-basics.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* run.c: Ditto.
+	* sim-load.c: Ditto.
+	* callback.c: Ditto.
+	* syscall.c: Ditto.
+	* Make-common.in (callback_h): Define.
+	(remote_sim_h): Define.
+	(run.o): Update.
+	(callback.o): Update.
+	(syscall.o): Update.
+	(sim-load.o): 
+	(nrun.o): Update.
+	(sim-hload.o): Update.
+	(sim-io.o): Update.
+	(sim-reason.o): Update.
+	(sim-reg.o): Update.
+	(sim-resume.o): Update.
+
+2002-05-30  Kazu Hirata  <kazu@cs.umass.edu>
+
+	* run.c: Fix formatting.
+
 2002-05-20  Nick Clifton  <nickc@cambridge.redhat.com>
 
 	* run-sim.h: New header.  Provide prototypes for functions used
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 519b213..744295a 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -248,6 +248,9 @@
 
 RUNTESTFLAGS =
 
+callback_h = $(srcroot)/include/gdb/callback.h
+remote_sim_h = $(srcroot)/include/gdb/remote-sim.h
+
 all: $(SIM_EXTRA_ALL) libsim.a run .gdbinit
 
 libsim.a: $(LIB_OBJS)
@@ -259,8 +262,7 @@
 	$(CC) $(ALL_CFLAGS) -o run$(EXEEXT) \
 	  $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
-run.o: $(srccom)/run.c config.h tconfig.h \
-	  $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h
+run.o: $(srccom)/run.c config.h tconfig.h $(remote_sim_h) $(callback_h)
 	$(CC) -c $(srccom)/run.c $(ALL_CFLAGS)
 
 # FIXME: Ideally, callback.o and friends live in a library outside of
@@ -268,12 +270,10 @@
 # devo/libremote because this directory would contain more than just
 # a library).
 
-callback.o: $(srccom)/callback.c config.h tconfig.h \
-	  $(srcroot)/include/callback.h targ-vals.h
+callback.o: $(srccom)/callback.c config.h tconfig.h $(callback_h) targ-vals.h
 	$(CC) -c $(srccom)/callback.c $(ALL_CFLAGS)
 
-syscall.o: $(srccom)/syscall.c config.h tconfig.h \
-	  $(srcroot)/include/callback.h targ-vals.h
+syscall.o: $(srccom)/syscall.c config.h tconfig.h $(callback_h) targ-vals.h
 	$(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS)
 
 targ-map.o: targ-map.c targ-vals.h
@@ -399,21 +399,18 @@
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS)
 
-sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-hload.o: $(srccom)/sim-hload.c $(sim-assert_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-hload.c $(ALL_CFLAGS)
 
-sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-hrw.o: $(srccom)/sim-hrw.c $(sim-assert_h) $(sim_core_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-hrw.c $(ALL_CFLAGS)
 
 sim-hw.o: $(srccom)/sim-hw.c $(sim_main_headers)
 	$(CC) -c $(srccom)/sim-hw.c $(ALL_CFLAGS)
 
-sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) \
-	  $(srcroot)/include/remote-sim.h \
+sim-info.o: $(srccom)/sim-info.c $(sim-assert_h) $(remote_sim_h) \
 	  $(SIM_EXTRA_DEPS)
 	$(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS)
 
@@ -423,8 +420,8 @@
 	cat $(srccom)/$@ >> tmp-$@
 	$(SHELL) $(srcdir)/../../move-if-change tmp-$@ $@
 
-sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) \
-	  $(srcroot)/include/remote-sim.h targ-vals.h
+sim-io.o: $(srccom)/sim-io.c $(sim_main_headers) $(sim-io_h) $(remote_sim_h) \
+	  targ-vals.h
 	$(CC) -c $(srccom)/sim-io.c $(ALL_CFLAGS)
 
 sim-memopt.o: $(srccom)/sim-memopt.c $(sim_main_headers) \
@@ -439,16 +436,13 @@
 	  $(sim-options_h) $(sim-io_h)
 	$(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS)
 
-sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-reason.o: $(srccom)/sim-reason.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-reason.c $(ALL_CFLAGS)
 
-sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-reg.o: $(srccom)/sim-reg.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-reg.c $(ALL_CFLAGS)
 
-sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) \
-	  $(srcroot)/include/remote-sim.h
+sim-resume.o: $(srccom)/sim-resume.c $(sim_main_headers) $(remote_sim_h)
 	$(CC) -c $(srccom)/sim-resume.c $(ALL_CFLAGS)
 
 sim-run.o: $(srccom)/sim-run.c $(sim_main_headers)
@@ -478,7 +472,7 @@
 sim-watch.o: $(srccom)/sim-watch.c $(sim_main_headers)
 	$(CC) -c $(srccom)/sim-watch.c $(ALL_CFLAGS)
 
-sim-load.o: $(srccom)/sim-load.c $(srcroot)/include/callback.h
+sim-load.o: $(srccom)/sim-load.c $(callback_h)
 	$(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS)
 
 sim-break.o: $(srccom)/sim-break.c $(sim_main_headers) \
@@ -547,8 +541,7 @@
 	$(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS)
 
 
-nrun.o: $(srccom)/nrun.c config.h tconfig.h \
-	  $(srcroot)/include/remote-sim.h $(srcroot)/include/callback.h \
+nrun.o: $(srccom)/nrun.c config.h tconfig.h $(remote_sim_h) $(callback_h) \
 	  $(sim_main_headers)
 	$(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
 
@@ -599,6 +592,7 @@
 
 installdirs:
 	$(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
+	$(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
 
 check:
 	cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
@@ -685,7 +679,7 @@
 	$(SHELL) $(srccom)/cgen.sh arch $(srcdir) \
 		$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
 		$(arch) "$(FLAGS)" ignored "$(isa)" $(mach) ignored ignored
-	
+
 cgen-cpu: force
 	$(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \
 		$(CGEN) $(CGENDIR) "$(CGENFLAGS)" \
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index a1c797a..ceee6d4 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -787,34 +787,65 @@
 dnl it enables extra GCC specific warnings.
 AC_DEFUN(SIM_AC_OPTION_WARNINGS,
 [
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 AC_ARG_ENABLE(build-warnings,
-[  --enable-build-warnings[=LIST]		Enable build-time compiler warnings],
-[build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+[  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
+[case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
-fi
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi])dnl
+AC_ARG_ENABLE(sim-build-warnings,
+[  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used],
+[case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi])dnl
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi],[build_warnings=""])dnl
+    AC_MSG_CHECKING(compiler warning flags)
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",)
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    AC_MSG_RESULT(${WARN_CFLAGS}${WERROR_CFLAGS})
+fi
 ])
 AC_SUBST(WARN_CFLAGS)
 AC_SUBST(WERROR_CFLAGS)
diff --git a/sim/common/callback.c b/sim/common/callback.c
index af5de14..db0fff6 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -46,7 +46,7 @@
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
 #include "targ-vals.h"
 
 #ifdef HAVE_UNISTD_H
diff --git a/sim/common/gennltvals.sh b/sim/common/gennltvals.sh
index 40ca5c7..fefd880 100644
--- a/sim/common/gennltvals.sh
+++ b/sim/common/gennltvals.sh
@@ -33,9 +33,9 @@
 $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
 	"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
 
-dir=libgloss target=d30v
-$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
-	"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
+# OBSOLETE dir=libgloss target=d30v
+# OBSOLETE $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
+# OBSOLETE 	"syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}"
 
 dir=libgloss target=fr30
 $shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index e4f5d0d..897a6f7 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -68,7 +68,7 @@
   printf ("#include <errno.h>\n");
   printf ("#include <fcntl.h>\n");
   printf ("#include \"ansidecl.h\"\n");
-  printf ("#include \"callback.h\"\n");
+  printf ("#include \"gdb/callback.h\"\n");
   printf ("#include \"targ-vals.h\"\n");
   printf ("\n");
 
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index 243a7aa..78cceb6 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -88,6 +88,7 @@
 {
   struct hw_event *event;
   va_list dummy;
+  memset (&dummy, 0, sizeof dummy);
   event = hw_event_queue_schedule_vtracef (me, delta_time, callback, data,
 					   NULL, dummy);
   return event;
diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
index b5e82fc..14093ae 100644
--- a/sim/common/nltvals.def
+++ b/sim/common/nltvals.def
@@ -214,30 +214,6 @@
 /* end d10v sys target macros */
 #endif
 #endif
-#ifdef NL_TARGET_d30v
-#ifdef sys_defs
-/* from syscall.h */
-/* begin d30v sys target macros */
- { "SYS_argv", 13  },
- { "SYS_argvlen", 12  },
- { "SYS_chdir", 14  },
- { "SYS_chmod", 16  },
- { "SYS_close", 3  },
- { "SYS_exit", 1  },
- { "SYS_fstat", 10  },
- { "SYS_getpid", 8  },
- { "SYS_kill", 9  },
- { "SYS_lseek", 6  },
- { "SYS_open", 2  },
- { "SYS_read", 4  },
- { "SYS_stat", 15  },
- { "SYS_time", 18  },
- { "SYS_unlink", 7  },
- { "SYS_utime", 17  },
- { "SYS_write", 5  },
-/* end d30v sys target macros */
-#endif
-#endif
 #ifdef NL_TARGET_fr30
 #ifdef sys_defs
 /* from syscall.h */
diff --git a/sim/common/run-sim.h b/sim/common/run-sim.h
index 7792373..3424fa5 100644
--- a/sim/common/run-sim.h
+++ b/sim/common/run-sim.h
@@ -20,6 +20,9 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#ifndef RUN_SIM_H
+#define RUN_SIM_H
+
 #ifdef SIM_TARGET_SWITCHES
   /* Parse the command line, extracting any target specific switches
      before the generic simulator code gets a chance to complain
@@ -29,4 +32,63 @@
   /* Display a list of target specific switches supported by this
      target.  */
 void sim_target_display_usage PARAMS ((void));
+
+#endif
+
+/* Provide simulator with a default (global) host_callback_struct.
+   THIS PROCEDURE IS DEPRECATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_set_callbacks PARAMS ((struct host_callback_struct *));
+
+
+/* Set the size of the simulator memory array.
+   THIS PROCEDURE IS DEPRECATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_size PARAMS ((int i));
+
+
+/* Single-step simulator with tracing enabled.
+   THIS PROCEDURE IS DEPRECATED.
+   THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
+   GDB and NRUN do not use this interface.
+   This procedure returns: ``0'' indicating that the simulator should
+   be continued using sim_trace() calls; ``1'' indicating that the
+   simulation has finished. */
+
+int sim_trace PARAMS ((SIM_DESC sd));
+
+
+/* Enable tracing.
+   THIS PROCEDURE IS DEPRECATED.
+   GDB and NRUN do not use this interface.
+   This procedure returns: ``0'' indicating that the simulator should
+   be continued using sim_trace() calls; ``1'' indicating that the
+   simulation has finished. */
+
+void sim_set_trace PARAMS ((void));
+
+
+/* Configure the size of the profile buffer.
+   THIS PROCEDURE IS DEPRECATED.
+   GDB and NRUN do not use this interface.
+   This procedure does not take a SIM_DESC argument as it is
+   used before sim_open. */
+
+void sim_set_profile_size PARAMS ((int n));
+
+
+/* Kill the running program.
+   THIS PROCEDURE IS DEPRECATED.
+   GDB and NRUN do not use this interface.
+   This procedure will be replaced as part of the introduction of
+   multi-cpu simulators. */
+
+void sim_kill PARAMS ((SIM_DESC sd));
+
 #endif
diff --git a/sim/common/run.c b/sim/common/run.c
index 874f4b3..d8c86cd 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -43,8 +43,8 @@
 
 #include "libiberty.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "ansidecl.h"
 #include "run-sim.h"
 
@@ -59,7 +59,7 @@
 extern int getopt ();
 
 #ifdef NEED_UI_LOOP_HOOK
-/* Gdb foolery. This is only needed for gdb using a gui. */
+/* Gdb foolery. This is only needed for gdb using a gui.  */
 int (*ui_loop_hook) PARAMS ((int signo));
 #endif
 
@@ -108,7 +108,7 @@
 
   /* FIXME: This is currently being migrated into sim_open.
      Simulators that use functions such as sim_size() still require
-     this. */
+     this.  */
   default_callback.init (&default_callback);
   sim_set_callbacks (&default_callback);
 
@@ -120,9 +120,9 @@
      do all argv processing.  */
 
 #ifdef SIM_H8300 /* FIXME: quick hack */
-  while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF) 
+  while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
 #else
-  while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF) 
+  while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
 #endif
     switch (i)
       {
@@ -153,7 +153,7 @@
 #ifdef SIM_HAVE_ENVIRONMENT
       case 'o':
 	/* Operating enironment where any signals are delivered to the
-           target. */
+           target.  */
 	operating_p = 1;
 	break;
 #endif SIM_HAVE_ENVIRONMENT
@@ -178,11 +178,11 @@
 	/* FIXME: Quick hack, to be replaced by more general facility.  */
 #ifdef SIM_H8300
       case 'h':
-	set_h8300h (1,0);
+	set_h8300h (1, 0);
 	break;
       case 'S':
-	set_h8300h (1,1);
-        break;
+	set_h8300h (1, 1);
+	break;
 #endif
       default:
 	usage ();
@@ -202,9 +202,9 @@
     }
 
   abfd = bfd_openr (name, 0);
-  if (!abfd) 
+  if (!abfd)
     {
-      fprintf (stderr, "%s: can't open %s: %s\n", 
+      fprintf (stderr, "%s: can't open %s: %s\n",
 	       myname, name, bfd_errmsg (bfd_get_error ()));
       exit (1);
     }
@@ -231,7 +231,7 @@
 #endif
 
   /* Ensure that any run-time initialisation that needs to be
-     performed by the simulator can occur. */
+     performed by the simulator can occur.  */
   sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, abfd, sim_argv);
   if (sd == 0)
     exit (1);
@@ -245,7 +245,7 @@
 #ifdef SIM_HAVE_ENVIRONMENT
   /* NOTE: An old simulator supporting the operating environment MUST
      provide sim_set_trace() and not sim_trace(). That way
-     sim_stop_reason() can be used to determine any stop reason. */
+     sim_stop_reason() can be used to determine any stop reason.  */
   if (trace)
     sim_set_trace ();
   sigrc = 0;
@@ -299,14 +299,14 @@
     case sim_signalled:
     case sim_stopped:
       if (sigrc != 0)
-        fprintf (stderr, "program stopped with signal %d.\n", sigrc);
+	fprintf (stderr, "program stopped with signal %d.\n", sigrc);
       break;
 
     case sim_exited:
       break;
 
     case sim_running:
-    case sim_polling: /* these indicate a serious problem */
+    case sim_polling: /* These indicate a serious problem.  */
       abort ();
       break;
 
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h
index fc34b21..a7d7a1e 100644
--- a/sim/common/sim-basics.h
+++ b/sim/common/sim-basics.h
@@ -132,8 +132,8 @@
 #endif
 
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "sim-config.h"
 
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
index 22531e3..6cd75ea 100644
--- a/sim/common/sim-events.c
+++ b/sim/common/sim-events.c
@@ -481,6 +481,7 @@
 		     void *data)
 {
   va_list dummy;
+  memset (&dummy, 0, sizeof dummy);
   return sim_events_schedule_vtracef (sd, delta_time, handler, data,
 				      NULL, dummy);
 }
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 76391751..28d61a5 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -330,6 +330,7 @@
 	  /* tastes like zero */
 	  dst->class = sim_fpu_class_zero;
 	  dst->sign = sign;
+	  dst->normal_exp = 0;
 	}
       else
 	{
@@ -520,6 +521,7 @@
     {
       f->class = sim_fpu_class_zero;
       f->sign = 0;
+      f->normal_exp = 0;
     }
   else
     {
@@ -648,6 +650,7 @@
     {
       f->class = sim_fpu_class_zero;
       f->sign = 0;
+      f->normal_exp = 0;
     }
   else
     {
@@ -1799,6 +1802,7 @@
     {
       f->class = sim_fpu_class_zero;
       f->sign = r->sign;
+      f->normal_exp = 0;
       return 0;
     }
   if (sim_fpu_is_infinity (r))
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index bfe3f15..314d2dd 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -36,8 +36,8 @@
 #include "bfd.h"
 #include "sim-utils.h"
 
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 static void eprintf PARAMS ((host_callback *, const char *, ...));
 static void xprintf PARAMS ((host_callback *, const char *, ...));
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
index a8e9df6..d66dc1e 100644
--- a/sim/common/sim-memopt.c
+++ b/sim/common/sim-memopt.c
@@ -46,6 +46,9 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /* Memory fill byte. */
 static unsigned8 fill_byte_value;
@@ -167,7 +170,7 @@
 	    {
 	      sim_io_error (sd,
 			    "Error, cannot confirm that mmap file is large enough "
-			    "(>= %d bytes)\n", bytes);
+			    "(>= %ld bytes)\n", bytes);
 	    }
 
 	  free_buffer = mmap (0, bytes, PROT_READ|PROT_WRITE, MAP_SHARED, mmap_next_fd, 0);
diff --git a/sim/common/sim-resume.c b/sim/common/sim-resume.c
index 8cf75d5..d7d61e7 100644
--- a/sim/common/sim-resume.c
+++ b/sim/common/sim-resume.c
@@ -65,24 +65,29 @@
       int last_cpu_nr = sim_engine_last_cpu_nr (sd);
       int next_cpu_nr = sim_engine_next_cpu_nr (sd);
       int nr_cpus = sim_engine_nr_cpus (sd);
+      int sig_to_deliver;
 
       sim_events_preprocess (sd, last_cpu_nr >= nr_cpus, next_cpu_nr >= nr_cpus);
       if (next_cpu_nr >= nr_cpus)
 	next_cpu_nr = 0;
 
-      /* Only deliver the siggnal ]sic] the first time through - don't
-         re-deliver any siggnal during a restart. */
-      if (jmpval == sim_engine_restart_jmpval)
-	siggnal = 0;
+      /* Only deliver the SIGGNAL [sic] the first time through - don't
+         re-deliver any SIGGNAL during a restart.  NOTE: A new local
+         variable is used to avoid problems with the automatic
+         variable ``siggnal'' being trashed by a long jump.  */
+      if (jmpval == sim_engine_start_jmpval)
+	sig_to_deliver = siggnal;
+      else
+	sig_to_deliver = 0;
 
 #ifdef SIM_CPU_EXCEPTION_RESUME
       {
 	sim_cpu* cpu = STATE_CPU (sd, next_cpu_nr);
-	SIM_CPU_EXCEPTION_RESUME(sd, cpu, siggnal);
+	SIM_CPU_EXCEPTION_RESUME(sd, cpu, sig_to_deliver);
       }
 #endif
 
-      sim_engine_run (sd, next_cpu_nr, nr_cpus, siggnal);
+      sim_engine_run (sd, next_cpu_nr, nr_cpus, sig_to_deliver);
     }
   engine->jmpbuf = NULL;
 
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index e0a3b88..75121cf 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -46,7 +46,7 @@
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "callback.h"
+#include "gdb/callback.h"
 #include "targ-vals.h"
 
 #ifndef ENOSYS
diff --git a/sim/configure b/sim/configure
index b8029dd..a50ac9a 100755
--- a/sim/configure
+++ b/sim/configure
@@ -1420,12 +1420,12 @@
 	extra_subdirs="${extra_subdirs} testsuite"
 	;;
   d10v-*-*)		sim_target=d10v ;;
-  d30v-*-*)
-	sim_target=d30v
-	only_if_gcc=yes
-	extra_subdirs="${extra_subdirs} igen"
-	;;
-  fr30-*-*)		sim_target=fr30 ;;
+# OBSOLETE   d30v-*-*)
+# OBSOLETE 	sim_target=d30v
+# OBSOLETE 	only_if_gcc=yes
+# OBSOLETE 	extra_subdirs="${extra_subdirs} igen"
+# OBSOLETE 	;;
+# OBSOLETE   fr30-*-*)		sim_target=fr30 ;;
   h8300*-*-*)		sim_target=h8300 ;;
   h8500-*-*)		sim_target=h8500 ;;
   i960-*-*)		sim_target=i960 ;;
diff --git a/sim/configure.in b/sim/configure.in
index e48ae36..ce074b3 100644
--- a/sim/configure.in
+++ b/sim/configure.in
@@ -59,12 +59,12 @@
 	extra_subdirs="${extra_subdirs} testsuite"
 	;;
   d10v-*-*)		sim_target=d10v ;;
-  d30v-*-*)
-	sim_target=d30v
-	only_if_gcc=yes
-	extra_subdirs="${extra_subdirs} igen"
-	;;
-  fr30-*-*)		sim_target=fr30 ;;
+# OBSOLETE   d30v-*-*)
+# OBSOLETE 	sim_target=d30v
+# OBSOLETE 	only_if_gcc=yes
+# OBSOLETE 	extra_subdirs="${extra_subdirs} igen"
+# OBSOLETE 	;;
+# OBSOLETE   fr30-*-*)		sim_target=fr30 ;;
   h8300*-*-*)		sim_target=h8300 ;;
   h8500-*-*)		sim_target=h8500 ;;
   i960-*-*)		sim_target=i960 ;;
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index c232dca..320eb98 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,38 @@
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* d10v_sim.h (SET_PSW_BIT): Add cast to avoid inverting an enum.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-13  Tom Rix  <trix@redhat.com>
+
+	* interp.c (xfer_mem): Fix transfers across multiple segments.
+ 
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (INCLUDE): Update path to callback.h.
+	* gencode.c: Do not include "callback.h".
+	* d10v_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* interp.c: Ditto.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* interp.c (sim_fetch_register): Fix name of enum used in cast.
+	(sim_store_register): Ditto.
+
+2002-06-02  Elena Zannoni  <ezannoni@redhat.com>
+
+        From Jason Eckhardt <jle@redhat.com>
+        * d10v_sim.h (INC_ADDR): Correctly handle the case where MOD_E is
+        less than MOD_S (post-decrement).
+
+2002-06-01  Andrew Cagney  <ac131313@redhat.com>
+
+	* interp.c (sim_fetch_register, sim_store_register): Use a switch
+	statement and enums from "sim-d10v.h".
+
 2002-05-28  Elena Zannoni  <ezannoni@redhat.com>
 
 	* interp.c (sim_create_inferior): Add comment.
diff --git a/sim/d10v/Makefile.in b/sim/d10v/Makefile.in
index 7ea6059..f46c54d 100644
--- a/sim/d10v/Makefile.in
+++ b/sim/d10v/Makefile.in
@@ -22,7 +22,7 @@
 SIM_EXTRA_CLEAN = clean-extra
 SIM_EXTRA_CFLAGS = -DNEED_UI_LOOP_HOOK -DSIM_HAVE_ENVIRONMENT
 
-INCLUDE = d10v_sim.h $(srcroot)/include/callback.h targ-vals.h endian.c \
+INCLUDE = d10v_sim.h $(srcroot)/include/gdb/callback.h targ-vals.h endian.c \
 	$(srcroot)/include/gdb/sim-d10v.h
 
 # This selects the d10v newlib/libgloss syscall definitions.
diff --git a/sim/d10v/configure b/sim/d10v/configure
index a106c4c..14a723f 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -153,7 +153,9 @@
 ac_help="$ac_help
   --enable-sim-profile=opts		Enable profiling flags"
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -677,7 +679,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:681: checking how to run the C preprocessor" >&5
+echo "configure:683: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -692,13 +694,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 696 "configure"
+#line 698 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:704: \"$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
   :
@@ -709,13 +711,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 713 "configure"
+#line 715 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:721: \"$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
   :
@@ -726,13 +728,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 730 "configure"
+#line 732 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:738: \"$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
   :
@@ -757,7 +759,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:761: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:763: 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
@@ -784,7 +786,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:788: checking for POSIXized ISC" >&5
+echo "configure:790: 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
@@ -805,12 +807,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:809: checking for ANSI C header files" >&5
+echo "configure:811: 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 <<EOF
-#line 814 "configure"
+#line 816 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -818,7 +820,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:824: \"$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*
@@ -835,7 +837,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 839 "configure"
+#line 841 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -853,7 +855,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 857 "configure"
+#line 859 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -874,7 +876,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 878 "configure"
+#line 880 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -885,7 +887,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -909,12 +911,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:913: checking for working const" >&5
+echo "configure:915: 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 <<EOF
-#line 918 "configure"
+#line 920 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -963,7 +965,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -984,21 +986,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:988: checking for inline" >&5
+echo "configure:990: 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 <<EOF
-#line 995 "configure"
+#line 997 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1024,12 +1026,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1028: checking for off_t" >&5
+echo "configure:1030: 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 <<EOF
-#line 1033 "configure"
+#line 1035 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1057,12 +1059,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1061: checking for size_t" >&5
+echo "configure:1063: 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 <<EOF
-#line 1066 "configure"
+#line 1068 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1092,19 +1094,19 @@
 # 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:1096: checking for working alloca.h" >&5
+echo "configure:1098: 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 <<EOF
-#line 1101 "configure"
+#line 1103 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1110: \"$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
@@ -1125,12 +1127,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1129: checking for alloca" >&5
+echo "configure:1131: 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 <<EOF
-#line 1134 "configure"
+#line 1136 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1158,7 +1160,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1164: \"$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
@@ -1190,12 +1192,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1194: checking whether alloca needs Cray hooks" >&5
+echo "configure:1196: 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 <<EOF
-#line 1199 "configure"
+#line 1201 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1220,12 +1222,12 @@
 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:1224: checking for $ac_func" >&5
+echo "configure:1226: 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 <<EOF
-#line 1229 "configure"
+#line 1231 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1248,7 +1250,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1254: \"$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
@@ -1275,7 +1277,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1279: checking stack direction for C alloca" >&5
+echo "configure:1281: 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
@@ -1283,7 +1285,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
+#line 1289 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1302,7 +1304,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1308: \"$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
@@ -1327,17 +1329,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1331: checking for $ac_hdr" >&5
+echo "configure:1333: 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
-#line 1336 "configure"
+#line 1338 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1343: \"$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*
@@ -1366,12 +1368,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1370: checking for $ac_func" >&5
+echo "configure:1372: 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 <<EOF
-#line 1375 "configure"
+#line 1377 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1394,7 +1396,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1400: \"$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
@@ -1419,7 +1421,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1423: checking for working mmap" >&5
+echo "configure:1425: 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
@@ -1427,7 +1429,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1431 "configure"
+#line 1433 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1567,7 +1569,7 @@
 }
 
 EOF
-if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1573: \"$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
@@ -1590,12 +1592,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1594: checking for Cygwin environment" >&5
+echo "configure:1596: 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 <<EOF
-#line 1599 "configure"
+#line 1601 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1606,7 +1608,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1623,19 +1625,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1627: checking for mingw32 environment" >&5
+echo "configure:1629: 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 <<EOF
-#line 1632 "configure"
+#line 1634 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1702,7 +1704,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1706: checking host system type" >&5
+echo "configure:1708: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1723,7 +1725,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1727: checking target system type" >&5
+echo "configure:1729: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1741,7 +1743,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1745: checking build system type" >&5
+echo "configure:1747: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1785,7 +1787,7 @@
 # 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:1789: checking for $ac_word" >&5
+echo "configure:1791: 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
@@ -1815,7 +1817,7 @@
   # 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:1819: checking for $ac_word" >&5
+echo "configure:1821: 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
@@ -1866,7 +1868,7 @@
       # 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:1870: checking for $ac_word" >&5
+echo "configure:1872: 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
@@ -1898,7 +1900,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1904: 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.
@@ -1909,12 +1911,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1913 "configure"
+#line 1915 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1920: \"$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
@@ -1940,12 +1942,12 @@
   { 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:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1946: 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:1949: checking whether we are using GNU C" >&5
+echo "configure:1951: 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
@@ -1954,7 +1956,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1958: \"$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:1960: \"$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
@@ -1973,7 +1975,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1977: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1979: 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
@@ -2016,7 +2018,7 @@
 # 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:2020: checking for a BSD compatible install" >&5
+echo "configure:2022: 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
@@ -2084,7 +2086,7 @@
 # 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:2088: checking for $ac_word" >&5
+echo "configure:2090: 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
@@ -2119,17 +2121,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2123: checking for $ac_hdr" >&5
+echo "configure:2125: 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
-#line 2128 "configure"
+#line 2130 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2135: \"$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*
@@ -2159,12 +2161,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2163: checking for $ac_func" >&5
+echo "configure:2165: 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 <<EOF
-#line 2168 "configure"
+#line 2170 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2187,7 +2189,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2193: \"$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
@@ -2216,12 +2218,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2220: checking for $ac_func" >&5
+echo "configure:2222: 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 <<EOF
-#line 2225 "configure"
+#line 2227 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2244,7 +2246,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2250: \"$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
@@ -2278,19 +2280,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2282: checking for LC_MESSAGES" >&5
+echo "configure:2284: 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 <<EOF
-#line 2287 "configure"
+#line 2289 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2296: \"$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
@@ -2311,7 +2313,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2315: checking whether NLS is requested" >&5
+echo "configure:2317: 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"
@@ -2331,7 +2333,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2335: checking whether included gettext is requested" >&5
+echo "configure:2337: 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"
@@ -2350,17 +2352,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2354: checking for libintl.h" >&5
+echo "configure:2356: 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
-#line 2359 "configure"
+#line 2361 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2366: \"$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*
@@ -2377,19 +2379,19 @@
 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:2381: checking for gettext in libc" >&5
+echo "configure:2383: 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 <<EOF
-#line 2386 "configure"
+#line 2388 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2395: \"$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
@@ -2405,7 +2407,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2409: checking for bindtextdomain in -lintl" >&5
+echo "configure:2411: 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
@@ -2413,7 +2415,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2417 "configure"
+#line 2419 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2424,7 +2426,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2430: \"$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
@@ -2440,19 +2442,19 @@
 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:2444: checking for gettext in libintl" >&5
+echo "configure:2446: 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 <<EOF
-#line 2449 "configure"
+#line 2451 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2458: \"$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
@@ -2480,7 +2482,7 @@
 	      # 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:2484: checking for $ac_word" >&5
+echo "configure:2486: 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
@@ -2514,12 +2516,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2518: checking for $ac_func" >&5
+echo "configure:2520: 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 <<EOF
-#line 2523 "configure"
+#line 2525 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2542,7 +2544,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2548: \"$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
@@ -2569,7 +2571,7 @@
 		# 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:2573: checking for $ac_word" >&5
+echo "configure:2575: 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
@@ -2605,7 +2607,7 @@
 		# 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:2609: checking for $ac_word" >&5
+echo "configure:2611: 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
@@ -2637,7 +2639,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2641 "configure"
+#line 2643 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2645,7 +2647,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2677,7 +2679,7 @@
         # 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:2681: checking for $ac_word" >&5
+echo "configure:2683: 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
@@ -2711,7 +2713,7 @@
         # 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:2715: checking for $ac_word" >&5
+echo "configure:2717: 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
@@ -2747,7 +2749,7 @@
         # 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:2751: checking for $ac_word" >&5
+echo "configure:2753: 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
@@ -2837,7 +2839,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2841: checking for catalogs to be installed" >&5
+echo "configure:2843: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2865,17 +2867,17 @@
       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:2869: checking for linux/version.h" >&5
+echo "configure:2871: 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
-#line 2874 "configure"
+#line 2876 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2881: \"$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*
@@ -2944,17 +2946,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2948: checking for $ac_hdr" >&5
+echo "configure:2950: 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
-#line 2953 "configure"
+#line 2955 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2960: \"$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*
@@ -2984,17 +2986,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2988: checking for $ac_hdr" >&5
+echo "configure:2990: 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
-#line 2993 "configure"
+#line 2995 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3000: \"$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*
@@ -3024,17 +3026,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3028: checking for $ac_hdr" >&5
+echo "configure:3030: 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
-#line 3033 "configure"
+#line 3035 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3064,17 +3066,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3068: checking for $ac_hdr" >&5
+echo "configure:3070: 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
-#line 3073 "configure"
+#line 3075 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3080: \"$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*
@@ -3103,12 +3105,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3107: checking for $ac_func" >&5
+echo "configure:3109: 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 <<EOF
-#line 3112 "configure"
+#line 3114 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3131,7 +3133,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3137: \"$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
@@ -3158,7 +3160,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3162: checking for bind in -lsocket" >&5
+echo "configure:3164: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3166,7 +3168,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3170 "configure"
+#line 3172 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3177,7 +3179,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3183: \"$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
@@ -3205,7 +3207,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3209: checking for gethostbyname in -lnsl" >&5
+echo "configure:3211: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3213,7 +3215,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3217 "configure"
+#line 3219 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3224,7 +3226,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3230: \"$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
@@ -3400,12 +3402,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3404: checking return type of signal handlers" >&5
+echo "configure:3406: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3409 "configure"
+#line 3411 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3422,7 +3424,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3444,7 +3446,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3448: checking for executable suffix" >&5
+echo "configure:3450: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3454,7 +3456,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3496,37 +3498,84 @@
 
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3551: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3561 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -3534,17 +3583,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3538: checking for $ac_hdr" >&5
+echo "configure:3587: 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
-#line 3543 "configure"
+#line 3592 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3597: \"$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*
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 3566da0..09e0631 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -3,7 +3,7 @@
 #include <ctype.h>
 #include <limits.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/d10v.h"
 #include "bfd.h"
 
@@ -21,7 +21,7 @@
 
 extern int d10v_debug;
 
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 #include "sim-config.h"
 #include "sim-types.h"
 
@@ -318,7 +318,7 @@
 #define PSW CREG (PSW_CR)
 #define SET_PSW(VAL) SET_CREG (PSW_CR, (VAL))
 #define SET_HW_PSW(VAL) SET_HW_CREG (PSW_CR, (VAL))
-#define SET_PSW_BIT(MASK,VAL) move_to_cr (PSW_CR, ~(MASK), (VAL) ? (MASK) : 0, 1)
+#define SET_PSW_BIT(MASK,VAL) move_to_cr (PSW_CR, ~((reg_t) MASK), (VAL) ? (MASK) : 0, 1)
 
 #define PSW_SM ((PSW & PSW_SM_BIT) != 0)
 #define SET_PSW_SM(VAL) SET_PSW_BIT (PSW_SM_BIT, (VAL))
@@ -435,7 +435,7 @@
   { \
     int test_i = i < 0 ? i : ~((i) - 1); \
     if (PSW_MD && GPR (x) == (MOD_E & test_i)) \
-      SET_GPR (x, MOD_S); \
+      SET_GPR (x, MOD_S & test_i); \
     else \
       SET_GPR (x, GPR (x) + (i)); \
   } \
diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c
index 2d1269b..b66297d 100644
--- a/sim/d10v/gencode.c
+++ b/sim/d10v/gencode.c
@@ -3,7 +3,6 @@
 #include <ctype.h>
 #include <limits.h>
 #include "ansidecl.h"
-#include "callback.h"
 #include "opcode/d10v.h"
 
 static void write_header PARAMS ((void));
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 0b02d8a..0f7295d 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -1,8 +1,8 @@
 #include <signal.h>
 #include "sysdep.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "d10v_sim.h"
 #include "gdb/sim-d10v.h"
@@ -715,7 +715,7 @@
 {
   int xfered = 0;
 
-  while (xfered < size)
+  while (0 < size)
     {
       uint8 *memory;
       unsigned long phys;
@@ -754,9 +754,10 @@
       virt += phys_size;
       buffer += phys_size;
       xfered += phys_size;
+      size -= phys_size;
     }
 
-  return size;
+  return xfered;
 }
 
 
@@ -1307,54 +1308,82 @@
      int length;
 {
   int size;
-  if (rn < 0)
-    size = 0;
-  else if (rn >= SIM_D10V_R0_REGNUM
-	   && rn < SIM_D10V_R0_REGNUM + SIM_D10V_NR_R_REGS)
+  switch ((enum sim_d10v_regs) rn)
     {
+    case SIM_D10V_R0_REGNUM:
+    case SIM_D10V_R1_REGNUM:
+    case SIM_D10V_R2_REGNUM:
+    case SIM_D10V_R3_REGNUM:
+    case SIM_D10V_R4_REGNUM:
+    case SIM_D10V_R5_REGNUM:
+    case SIM_D10V_R6_REGNUM:
+    case SIM_D10V_R7_REGNUM:
+    case SIM_D10V_R8_REGNUM:
+    case SIM_D10V_R9_REGNUM:
+    case SIM_D10V_R10_REGNUM:
+    case SIM_D10V_R11_REGNUM:
+    case SIM_D10V_R12_REGNUM:
+    case SIM_D10V_R13_REGNUM:
+    case SIM_D10V_R14_REGNUM:
+    case SIM_D10V_R15_REGNUM:
       WRITE_16 (memory, GPR (rn - SIM_D10V_R0_REGNUM));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_CR0_REGNUM
-	   && rn < SIM_D10V_CR0_REGNUM + SIM_D10V_NR_CR_REGS)
-    {
+      break;
+    case SIM_D10V_CR0_REGNUM:
+    case SIM_D10V_CR1_REGNUM:
+    case SIM_D10V_CR2_REGNUM:
+    case SIM_D10V_CR3_REGNUM:
+    case SIM_D10V_CR4_REGNUM:
+    case SIM_D10V_CR5_REGNUM:
+    case SIM_D10V_CR6_REGNUM:
+    case SIM_D10V_CR7_REGNUM:
+    case SIM_D10V_CR8_REGNUM:
+    case SIM_D10V_CR9_REGNUM:
+    case SIM_D10V_CR10_REGNUM:
+    case SIM_D10V_CR11_REGNUM:
+    case SIM_D10V_CR12_REGNUM:
+    case SIM_D10V_CR13_REGNUM:
+    case SIM_D10V_CR14_REGNUM:
+    case SIM_D10V_CR15_REGNUM:
       WRITE_16 (memory, CREG (rn - SIM_D10V_CR0_REGNUM));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_A0_REGNUM
-	   && rn < SIM_D10V_A0_REGNUM + SIM_D10V_NR_A_REGS)
-    {
+      break;
+    case SIM_D10V_A0_REGNUM:
+    case SIM_D10V_A1_REGNUM:
       WRITE_64 (memory, ACC (rn - SIM_D10V_A0_REGNUM));
       size = 8;
-    }
-  else if (rn == SIM_D10V_SPI_REGNUM)
-    {
+      break;
+    case SIM_D10V_SPI_REGNUM:
       /* PSW_SM indicates that the current SP is the USER
          stack-pointer. */
       WRITE_16 (memory, spi_register ());
       size = 2;
-    }
-  else if (rn == SIM_D10V_SPU_REGNUM)
-    {
+      break;
+    case SIM_D10V_SPU_REGNUM:
       /* PSW_SM indicates that the current SP is the USER
          stack-pointer. */
       WRITE_16 (memory, spu_register ());
       size = 2;
-    }
-  else if (rn >= SIM_D10V_IMAP0_REGNUM
-	   && rn < SIM_D10V_IMAP0_REGNUM + SIM_D10V_NR_IMAP_REGS)
-    {
+      break;
+    case SIM_D10V_IMAP0_REGNUM:
+    case SIM_D10V_IMAP1_REGNUM:
       WRITE_16 (memory, imap_register (rn - SIM_D10V_IMAP0_REGNUM));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_DMAP0_REGNUM
-	   && rn < SIM_D10V_DMAP0_REGNUM + SIM_D10V_NR_DMAP_REGS)
-    {
+      break;
+    case SIM_D10V_DMAP0_REGNUM:
+    case SIM_D10V_DMAP1_REGNUM:
+    case SIM_D10V_DMAP2_REGNUM:
+    case SIM_D10V_DMAP3_REGNUM:
       WRITE_16 (memory, dmap_register (rn - SIM_D10V_DMAP0_REGNUM));
       size = 2;
+      break;
+    case SIM_D10V_TS2_DMAP_REGNUM:
+      size = 0;
+      break;
+    default:
+      size = 0;
+      break;
     }
-  else
-    size = 0;
   return size;
 }
  
@@ -1366,52 +1395,80 @@
      int length;
 {
   int size;
-  if (rn < 0)
-    size = 0;
-  else if (rn >= SIM_D10V_R0_REGNUM
-	   && rn < SIM_D10V_R0_REGNUM + SIM_D10V_NR_R_REGS)
+  switch ((enum sim_d10v_regs) rn)
     {
+    case SIM_D10V_R0_REGNUM:
+    case SIM_D10V_R1_REGNUM:
+    case SIM_D10V_R2_REGNUM:
+    case SIM_D10V_R3_REGNUM:
+    case SIM_D10V_R4_REGNUM:
+    case SIM_D10V_R5_REGNUM:
+    case SIM_D10V_R6_REGNUM:
+    case SIM_D10V_R7_REGNUM:
+    case SIM_D10V_R8_REGNUM:
+    case SIM_D10V_R9_REGNUM:
+    case SIM_D10V_R10_REGNUM:
+    case SIM_D10V_R11_REGNUM:
+    case SIM_D10V_R12_REGNUM:
+    case SIM_D10V_R13_REGNUM:
+    case SIM_D10V_R14_REGNUM:
+    case SIM_D10V_R15_REGNUM:
       SET_GPR (rn - SIM_D10V_R0_REGNUM, READ_16 (memory));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_CR0_REGNUM
-	   && rn < SIM_D10V_CR0_REGNUM + SIM_D10V_NR_CR_REGS)
-    {
+      break;
+    case SIM_D10V_CR0_REGNUM:
+    case SIM_D10V_CR1_REGNUM:
+    case SIM_D10V_CR2_REGNUM:
+    case SIM_D10V_CR3_REGNUM:
+    case SIM_D10V_CR4_REGNUM:
+    case SIM_D10V_CR5_REGNUM:
+    case SIM_D10V_CR6_REGNUM:
+    case SIM_D10V_CR7_REGNUM:
+    case SIM_D10V_CR8_REGNUM:
+    case SIM_D10V_CR9_REGNUM:
+    case SIM_D10V_CR10_REGNUM:
+    case SIM_D10V_CR11_REGNUM:
+    case SIM_D10V_CR12_REGNUM:
+    case SIM_D10V_CR13_REGNUM:
+    case SIM_D10V_CR14_REGNUM:
+    case SIM_D10V_CR15_REGNUM:
       SET_CREG (rn - SIM_D10V_CR0_REGNUM, READ_16 (memory));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_A0_REGNUM
-	   && rn < SIM_D10V_A0_REGNUM + SIM_D10V_NR_A_REGS)
-    {
+      break;
+    case SIM_D10V_A0_REGNUM:
+    case SIM_D10V_A1_REGNUM:
       SET_ACC (rn - SIM_D10V_A0_REGNUM, READ_64 (memory) & MASK40);
       size = 8;
-    }
-  else if (rn == SIM_D10V_SPI_REGNUM)
-    {
+      break;
+    case SIM_D10V_SPI_REGNUM:
       /* PSW_SM indicates that the current SP is the USER
          stack-pointer. */
       set_spi_register (READ_16 (memory));
       size = 2;
-    }
-  else if (rn == SIM_D10V_SPU_REGNUM)
-    {
+      break;
+    case SIM_D10V_SPU_REGNUM:
       set_spu_register (READ_16 (memory));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_IMAP0_REGNUM
-	   && rn < SIM_D10V_IMAP0_REGNUM + SIM_D10V_NR_IMAP_REGS)
-    {
+      break;
+    case SIM_D10V_IMAP0_REGNUM:
+    case SIM_D10V_IMAP1_REGNUM:
       set_imap_register (rn - SIM_D10V_IMAP0_REGNUM, READ_16(memory));
       size = 2;
-    }
-  else if (rn >= SIM_D10V_DMAP0_REGNUM
-	   && rn < SIM_D10V_DMAP0_REGNUM + SIM_D10V_NR_DMAP_REGS)
-    {
+      break;
+    case SIM_D10V_DMAP0_REGNUM:
+    case SIM_D10V_DMAP1_REGNUM:
+    case SIM_D10V_DMAP2_REGNUM:
+    case SIM_D10V_DMAP3_REGNUM:
       set_dmap_register (rn - SIM_D10V_DMAP0_REGNUM, READ_16(memory));
       size = 2;
+      break;
+    case SIM_D10V_TS2_DMAP_REGNUM:
+      size = 0;
+      break;
+    default:
+      size = 0;
+      break;
     }
-  else
-    size = 0;
   SLOT_FLUSH ();
   return size;
 }
diff --git a/sim/d30v/ChangeLog b/sim/d30v/ChangeLog
index 6f65b24..d1c1df5 100644
--- a/sim/d30v/ChangeLog
+++ b/sim/d30v/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-13  Andrew Cagney  <ac131313@redhat.com>
+
+	* cpu.h: Mark file obsolete.
+	* sim-main.h,  sim-calls.c, engine.c, cpu.c, alu.h: Ditto.
+	* dc-short, ic-d30v, d30v-insns, Makefile.in: Ditto.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2000-07-05  Nick Clifton  <nickc@cygnus.com>
 
 	* d30v-insns: Change minimum loop size limit to 0x10.
diff --git a/sim/d30v/Makefile.in b/sim/d30v/Makefile.in
index d563be8..76afe20 100644
--- a/sim/d30v/Makefile.in
+++ b/sim/d30v/Makefile.in
@@ -1,217 +1,217 @@
-#   Mitsubishi Electric Corp. D30V Simulator.
-#   Copyright (C) 1997, Free Software Foundation, Inc.
-#   Contributed by Cygnus Support.
-# 
-# This file is part of 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.  */
-
-M4= @M4@
-
-
-## COMMON_PRE_CONFIG_FRAG
-
-# These variables are given default values in COMMON_PRE_CONFIG_FRAG.
-# We override the ones we need to here.
-# Not all of these need to be mentioned, only the necessary ones.
-
-# List of object files, less common parts.
-SIM_OBJS = \
-	$(SIM_NEW_COMMON_OBJS) \
-	engine.o cpu.o \
-	s_support.o l_support.o \
-	s_idecode.o l_idecode.o  \
-	s_semantics.o l_semantics.o \
-	sim-calls.o itable.o \
-	sim-hload.o \
-	sim-hrw.o \
-	sim-engine.o \
-	sim-stop.o \
-	sim-reason.o \
-	sim-resume.o
-
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = itable.h s_idecode.h l_idecode.h cpu.h alu.h
-
-# List of generators
-SIM_GEN=tmp-igen
-
-# List of extra flags to always pass to $(CC).
-SIM_EXTRA_CFLAGS = @sim_trapdump@
-
-# List of main object files for `run'.
-SIM_RUN_OBJS = nrun.o
-
-# Dependency of `clean' to clean any extra files.
-SIM_EXTRA_CLEAN = clean-igen
-
-# This selects the d30v newlib/libgloss syscall definitions.
-NL_TARGET=-DNL_TARGET_d30v
-
-## COMMON_POST_CONFIG_FRAG
-
-MAIN_INCLUDE_DEPS = tconfig.h
-INCLUDE_DEPS = $(MAIN_INCLUDE_DEPS) $(SIM_EXTRA_DEPS)
-
-# Rules need to build $(SIM_OBJS), plus whatever else the target wants.
-
-# ... target specific rules ...
-
-# Filter to eliminate known warnings
-FILTER = 2>&1 | egrep -v "Discarding instruction|instruction field of type \`compute\' changed to \`cache\'|Instruction format is not 64 bits wide"
-
-BUILT_SRC_FROM_IGEN = \
-	s_icache.h \
-	s_icache.c \
-	s_idecode.h \
-	s_idecode.c \
-	s_semantics.h \
-	s_semantics.c \
-	s_model.h \
-	s_model.c \
-	s_support.h \
-	s_support.c \
-	l_icache.h \
-	l_icache.c \
-	l_idecode.h \
-	l_idecode.c \
-	l_semantics.h \
-	l_semantics.c \
-	l_model.h \
-	l_model.c \
-	l_support.h \
-	l_support.c \
-	itable.h itable.c
-$(BUILT_SRC_FROM_IGEN): tmp-igen
-#
-
-.PHONY: clean-igen
-clean-igen:
-	rm -f $(BUILT_SRC_FROM_IGEN)
-	rm -f tmp-igen tmp-insns
-
-../igen/igen:
-	cd ../igen && $(MAKE)
-
-tmp-igen: $(srcdir)/dc-short $(srcdir)/d30v-insns $(srcdir)/ic-d30v ../igen/igen
-	cd ../igen && $(MAKE)
-	echo "# 1 \"$(srcdir)/d30v-insns\"" > tmp-insns
-	$(M4) < $(srcdir)/d30v-insns >> tmp-insns 
-	@echo "Generating short version ..."
-	../igen/igen \
-		-G gen-zero-r0 \
-		-G direct-access \
-		-G default-nia-minus-one \
-		-G conditional-issue \
-		-G verify-slot \
-		-G field-widths \
-		-F short,emul \
-		-B 32 \
-		-P "s_" \
-		-o $(srcdir)/dc-short \
-		-k $(srcdir)/ic-d30v \
-		-n $(srcdir)/d30v-insns -i tmp-insns \
-		-n s_icache.h    -hc tmp-icache.h \
-		-n s_icache.c    -c  tmp-icache.c \
-		-n s_semantics.h -hs tmp-semantics.h \
-		-n s_semantics.c -s  tmp-semantics.c \
-		-n s_idecode.h   -hd tmp-idecode.h \
-		-n s_idecode.c   -d  tmp-idecode.c \
-		-n s_model.h     -hm tmp-model.h \
-		-n s_model.c     -m  tmp-model.c \
-		-n s_support.h   -hf tmp-support.h \
-		-n s_support.c   -f  tmp-support.c $(FILTER)
-	$(srcdir)/../../move-if-change tmp-icache.h s_icache.h
-	$(srcdir)/../../move-if-change tmp-icache.c s_icache.c
-	$(srcdir)/../../move-if-change tmp-idecode.h s_idecode.h
-	$(srcdir)/../../move-if-change tmp-idecode.c s_idecode.c
-	$(srcdir)/../../move-if-change tmp-semantics.h s_semantics.h
-	$(srcdir)/../../move-if-change tmp-semantics.c s_semantics.c
-	$(srcdir)/../../move-if-change tmp-model.h s_model.h
-	$(srcdir)/../../move-if-change tmp-model.c s_model.c
-	$(srcdir)/../../move-if-change tmp-support.h s_support.h
-	$(srcdir)/../../move-if-change tmp-support.c s_support.c
-	@echo "Generating long version ..."
-	../igen/igen \
-		-G gen-zero-r0 \
-		-G direct-access \
-		-G default-nia-minus-one \
-		-G conditional-issue \
-		-G field-widths \
-		-F long,emul \
-		-B 64 \
-		-P "l_" \
-		-o $(srcdir)/dc-short \
-		-k $(srcdir)/ic-d30v \
-		-i tmp-insns \
-		-n l_icache.h    -hc tmp-icache.h \
-		-n l_icache.c    -c  tmp-icache.c \
-		-n l_semantics.h -hs tmp-semantics.h \
-		-n l_semantics.c -s  tmp-semantics.c \
-		-n l_idecode.h   -hd tmp-idecode.h \
-		-n l_idecode.c   -d  tmp-idecode.c \
-		-n l_model.h     -hm tmp-model.h \
-		-n l_model.c     -m  tmp-model.c \
-		-n l_support.h   -hf tmp-support.h \
-		-n l_support.c   -f  tmp-support.c $(FILTER)
-	$(srcdir)/../../move-if-change tmp-icache.h l_icache.h
-	$(srcdir)/../../move-if-change tmp-icache.c l_icache.c
-	$(srcdir)/../../move-if-change tmp-idecode.h l_idecode.h
-	$(srcdir)/../../move-if-change tmp-idecode.c l_idecode.c
-	$(srcdir)/../../move-if-change tmp-semantics.h l_semantics.h
-	$(srcdir)/../../move-if-change tmp-semantics.c l_semantics.c
-	$(srcdir)/../../move-if-change tmp-model.h l_model.h
-	$(srcdir)/../../move-if-change tmp-model.c l_model.c
-	$(srcdir)/../../move-if-change tmp-support.h l_support.h
-	$(srcdir)/../../move-if-change tmp-support.c l_support.c
-	@echo "Generating instruction database ..."
-	../igen/igen \
-		-G field-widths \
-		-F short,long,emul \
-		-B 64 \
-		-o $(srcdir)/dc-short \
-		-k $(srcdir)/ic-d30v \
-		-i tmp-insns \
-		-n itable.h    -ht tmp-itable.h \
-		-n itable.c    -t  tmp-itable.c $(FILTER)
-	$(srcdir)/../../move-if-change tmp-itable.h itable.h
-	$(srcdir)/../../move-if-change tmp-itable.c itable.c
-	touch tmp-igen
-
-ENGINE_H = \
-	sim-main.h \
-	$(srcdir)/../common/sim-basics.h \
-	config.h \
-	$(srcdir)/../common/sim-config.h \
-	$(srcdir)/../common/sim-inline.h \
-	$(srcdir)/../common/sim-types.h \
-	$(srcdir)/../common/sim-bits.h \
-	$(srcdir)/../common/sim-endian.h \
-	itable.h \
-	l_idecode.h s_idecode.h \
-	cpu.h \
-	alu.h \
-	$(srcdir)/../common/sim-alu.h \
-	$(srcdir)/../common/sim-core.h \
-	$(srcdir)/../common/sim-events.h \
-
-engine.o: engine.c $(ENGINE_H)
-sim-calls.o: sim-calls.c $(ENGINE_H) $(srcdir)/../common/sim-utils.h $(srcdir)/../common/sim-options.h
-cpu.o: cpu.c $(ENGINE_H)
-s_support.o: s_support.c $(ENGINE_H)
-l_support.o: l_support.c $(ENGINE_H)
-s_semantics.o: s_semantics.c $(ENGINE_H)
-l_semantics.o: l_semantics.c $(ENGINE_H)
+# OBSOLETE #   Mitsubishi Electric Corp. D30V Simulator.
+# OBSOLETE #   Copyright (C) 1997, Free Software Foundation, Inc.
+# OBSOLETE #   Contributed by Cygnus Support.
+# OBSOLETE # 
+# OBSOLETE # This file is part of GDB, the GNU debugger.
+# OBSOLETE # 
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2, or (at your option)
+# OBSOLETE # any later version.
+# OBSOLETE # 
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE # 
+# OBSOLETE # You should have received a copy of the GNU General Public License along
+# OBSOLETE # with this program; if not, write to the Free Software Foundation, Inc.,
+# OBSOLETE # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+# OBSOLETE 
+# OBSOLETE M4= @M4@
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE ## COMMON_PRE_CONFIG_FRAG
+# OBSOLETE 
+# OBSOLETE # These variables are given default values in COMMON_PRE_CONFIG_FRAG.
+# OBSOLETE # We override the ones we need to here.
+# OBSOLETE # Not all of these need to be mentioned, only the necessary ones.
+# OBSOLETE 
+# OBSOLETE # List of object files, less common parts.
+# OBSOLETE SIM_OBJS = \
+# OBSOLETE 	$(SIM_NEW_COMMON_OBJS) \
+# OBSOLETE 	engine.o cpu.o \
+# OBSOLETE 	s_support.o l_support.o \
+# OBSOLETE 	s_idecode.o l_idecode.o  \
+# OBSOLETE 	s_semantics.o l_semantics.o \
+# OBSOLETE 	sim-calls.o itable.o \
+# OBSOLETE 	sim-hload.o \
+# OBSOLETE 	sim-hrw.o \
+# OBSOLETE 	sim-engine.o \
+# OBSOLETE 	sim-stop.o \
+# OBSOLETE 	sim-reason.o \
+# OBSOLETE 	sim-resume.o
+# OBSOLETE 
+# OBSOLETE # List of extra dependencies.
+# OBSOLETE # Generally this consists of simulator specific files included by sim-main.h.
+# OBSOLETE SIM_EXTRA_DEPS = itable.h s_idecode.h l_idecode.h cpu.h alu.h
+# OBSOLETE 
+# OBSOLETE # List of generators
+# OBSOLETE SIM_GEN=tmp-igen
+# OBSOLETE 
+# OBSOLETE # List of extra flags to always pass to $(CC).
+# OBSOLETE SIM_EXTRA_CFLAGS = @sim_trapdump@
+# OBSOLETE 
+# OBSOLETE # List of main object files for `run'.
+# OBSOLETE SIM_RUN_OBJS = nrun.o
+# OBSOLETE 
+# OBSOLETE # Dependency of `clean' to clean any extra files.
+# OBSOLETE SIM_EXTRA_CLEAN = clean-igen
+# OBSOLETE 
+# OBSOLETE # This selects the d30v newlib/libgloss syscall definitions.
+# OBSOLETE NL_TARGET=-DNL_TARGET_d30v
+# OBSOLETE 
+# OBSOLETE ## COMMON_POST_CONFIG_FRAG
+# OBSOLETE 
+# OBSOLETE MAIN_INCLUDE_DEPS = tconfig.h
+# OBSOLETE INCLUDE_DEPS = $(MAIN_INCLUDE_DEPS) $(SIM_EXTRA_DEPS)
+# OBSOLETE 
+# OBSOLETE # Rules need to build $(SIM_OBJS), plus whatever else the target wants.
+# OBSOLETE 
+# OBSOLETE # ... target specific rules ...
+# OBSOLETE 
+# OBSOLETE # Filter to eliminate known warnings
+# OBSOLETE FILTER = 2>&1 | egrep -v "Discarding instruction|instruction field of type \`compute\' changed to \`cache\'|Instruction format is not 64 bits wide"
+# OBSOLETE 
+# OBSOLETE BUILT_SRC_FROM_IGEN = \
+# OBSOLETE 	s_icache.h \
+# OBSOLETE 	s_icache.c \
+# OBSOLETE 	s_idecode.h \
+# OBSOLETE 	s_idecode.c \
+# OBSOLETE 	s_semantics.h \
+# OBSOLETE 	s_semantics.c \
+# OBSOLETE 	s_model.h \
+# OBSOLETE 	s_model.c \
+# OBSOLETE 	s_support.h \
+# OBSOLETE 	s_support.c \
+# OBSOLETE 	l_icache.h \
+# OBSOLETE 	l_icache.c \
+# OBSOLETE 	l_idecode.h \
+# OBSOLETE 	l_idecode.c \
+# OBSOLETE 	l_semantics.h \
+# OBSOLETE 	l_semantics.c \
+# OBSOLETE 	l_model.h \
+# OBSOLETE 	l_model.c \
+# OBSOLETE 	l_support.h \
+# OBSOLETE 	l_support.c \
+# OBSOLETE 	itable.h itable.c
+# OBSOLETE $(BUILT_SRC_FROM_IGEN): tmp-igen
+# OBSOLETE #
+# OBSOLETE 
+# OBSOLETE .PHONY: clean-igen
+# OBSOLETE clean-igen:
+# OBSOLETE 	rm -f $(BUILT_SRC_FROM_IGEN)
+# OBSOLETE 	rm -f tmp-igen tmp-insns
+# OBSOLETE 
+# OBSOLETE ../igen/igen:
+# OBSOLETE 	cd ../igen && $(MAKE)
+# OBSOLETE 
+# OBSOLETE tmp-igen: $(srcdir)/dc-short $(srcdir)/d30v-insns $(srcdir)/ic-d30v ../igen/igen
+# OBSOLETE 	cd ../igen && $(MAKE)
+# OBSOLETE 	echo "# 1 \"$(srcdir)/d30v-insns\"" > tmp-insns
+# OBSOLETE 	$(M4) < $(srcdir)/d30v-insns >> tmp-insns 
+# OBSOLETE 	@echo "Generating short version ..."
+# OBSOLETE 	../igen/igen \
+# OBSOLETE 		-G gen-zero-r0 \
+# OBSOLETE 		-G direct-access \
+# OBSOLETE 		-G default-nia-minus-one \
+# OBSOLETE 		-G conditional-issue \
+# OBSOLETE 		-G verify-slot \
+# OBSOLETE 		-G field-widths \
+# OBSOLETE 		-F short,emul \
+# OBSOLETE 		-B 32 \
+# OBSOLETE 		-P "s_" \
+# OBSOLETE 		-o $(srcdir)/dc-short \
+# OBSOLETE 		-k $(srcdir)/ic-d30v \
+# OBSOLETE 		-n $(srcdir)/d30v-insns -i tmp-insns \
+# OBSOLETE 		-n s_icache.h    -hc tmp-icache.h \
+# OBSOLETE 		-n s_icache.c    -c  tmp-icache.c \
+# OBSOLETE 		-n s_semantics.h -hs tmp-semantics.h \
+# OBSOLETE 		-n s_semantics.c -s  tmp-semantics.c \
+# OBSOLETE 		-n s_idecode.h   -hd tmp-idecode.h \
+# OBSOLETE 		-n s_idecode.c   -d  tmp-idecode.c \
+# OBSOLETE 		-n s_model.h     -hm tmp-model.h \
+# OBSOLETE 		-n s_model.c     -m  tmp-model.c \
+# OBSOLETE 		-n s_support.h   -hf tmp-support.h \
+# OBSOLETE 		-n s_support.c   -f  tmp-support.c $(FILTER)
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-icache.h s_icache.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-icache.c s_icache.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-idecode.h s_idecode.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-idecode.c s_idecode.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-semantics.h s_semantics.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-semantics.c s_semantics.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-model.h s_model.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-model.c s_model.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-support.h s_support.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-support.c s_support.c
+# OBSOLETE 	@echo "Generating long version ..."
+# OBSOLETE 	../igen/igen \
+# OBSOLETE 		-G gen-zero-r0 \
+# OBSOLETE 		-G direct-access \
+# OBSOLETE 		-G default-nia-minus-one \
+# OBSOLETE 		-G conditional-issue \
+# OBSOLETE 		-G field-widths \
+# OBSOLETE 		-F long,emul \
+# OBSOLETE 		-B 64 \
+# OBSOLETE 		-P "l_" \
+# OBSOLETE 		-o $(srcdir)/dc-short \
+# OBSOLETE 		-k $(srcdir)/ic-d30v \
+# OBSOLETE 		-i tmp-insns \
+# OBSOLETE 		-n l_icache.h    -hc tmp-icache.h \
+# OBSOLETE 		-n l_icache.c    -c  tmp-icache.c \
+# OBSOLETE 		-n l_semantics.h -hs tmp-semantics.h \
+# OBSOLETE 		-n l_semantics.c -s  tmp-semantics.c \
+# OBSOLETE 		-n l_idecode.h   -hd tmp-idecode.h \
+# OBSOLETE 		-n l_idecode.c   -d  tmp-idecode.c \
+# OBSOLETE 		-n l_model.h     -hm tmp-model.h \
+# OBSOLETE 		-n l_model.c     -m  tmp-model.c \
+# OBSOLETE 		-n l_support.h   -hf tmp-support.h \
+# OBSOLETE 		-n l_support.c   -f  tmp-support.c $(FILTER)
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-icache.h l_icache.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-icache.c l_icache.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-idecode.h l_idecode.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-idecode.c l_idecode.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-semantics.h l_semantics.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-semantics.c l_semantics.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-model.h l_model.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-model.c l_model.c
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-support.h l_support.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-support.c l_support.c
+# OBSOLETE 	@echo "Generating instruction database ..."
+# OBSOLETE 	../igen/igen \
+# OBSOLETE 		-G field-widths \
+# OBSOLETE 		-F short,long,emul \
+# OBSOLETE 		-B 64 \
+# OBSOLETE 		-o $(srcdir)/dc-short \
+# OBSOLETE 		-k $(srcdir)/ic-d30v \
+# OBSOLETE 		-i tmp-insns \
+# OBSOLETE 		-n itable.h    -ht tmp-itable.h \
+# OBSOLETE 		-n itable.c    -t  tmp-itable.c $(FILTER)
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-itable.h itable.h
+# OBSOLETE 	$(srcdir)/../../move-if-change tmp-itable.c itable.c
+# OBSOLETE 	touch tmp-igen
+# OBSOLETE 
+# OBSOLETE ENGINE_H = \
+# OBSOLETE 	sim-main.h \
+# OBSOLETE 	$(srcdir)/../common/sim-basics.h \
+# OBSOLETE 	config.h \
+# OBSOLETE 	$(srcdir)/../common/sim-config.h \
+# OBSOLETE 	$(srcdir)/../common/sim-inline.h \
+# OBSOLETE 	$(srcdir)/../common/sim-types.h \
+# OBSOLETE 	$(srcdir)/../common/sim-bits.h \
+# OBSOLETE 	$(srcdir)/../common/sim-endian.h \
+# OBSOLETE 	itable.h \
+# OBSOLETE 	l_idecode.h s_idecode.h \
+# OBSOLETE 	cpu.h \
+# OBSOLETE 	alu.h \
+# OBSOLETE 	$(srcdir)/../common/sim-alu.h \
+# OBSOLETE 	$(srcdir)/../common/sim-core.h \
+# OBSOLETE 	$(srcdir)/../common/sim-events.h \
+# OBSOLETE 
+# OBSOLETE engine.o: engine.c $(ENGINE_H)
+# OBSOLETE sim-calls.o: sim-calls.c $(ENGINE_H) $(srcdir)/../common/sim-utils.h $(srcdir)/../common/sim-options.h
+# OBSOLETE cpu.o: cpu.c $(ENGINE_H)
+# OBSOLETE s_support.o: s_support.c $(ENGINE_H)
+# OBSOLETE l_support.o: l_support.c $(ENGINE_H)
+# OBSOLETE s_semantics.o: s_semantics.c $(ENGINE_H)
+# OBSOLETE l_semantics.o: l_semantics.c $(ENGINE_H)
diff --git a/sim/d30v/alu.h b/sim/d30v/alu.h
index d39ee3f..5605ce2 100644
--- a/sim/d30v/alu.h
+++ b/sim/d30v/alu.h
@@ -1,106 +1,106 @@
-/* Mitsubishi Electric Corp. D30V Simulator.
-   Copyright (C) 1997, Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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 _D30V_ALU_H_
-#define _D30V_ALU_H_
-
-#define ALU_CARRY (PSW_VAL(PSW_C) != 0)
-
-#include "sim-alu.h"
-
-#define ALU16_END(TARG, HIGH)						\
-{									\
-  unsigned32 mask, value;						\
-  if (ALU16_HAD_OVERFLOW) {						\
-    mask = BIT32 (PSW_V) | BIT32 (PSW_VA) | BIT32 (PSW_C);		\
-    value = BIT32 (PSW_V) | BIT32 (PSW_VA);				\
-  }									\
-  else {								\
-    mask = BIT32 (PSW_V) | BIT32 (PSW_C);				\
-    value = 0;								\
-  }									\
-  if (ALU16_HAD_CARRY_BORROW)						\
-    value |= BIT32 (PSW_C);						\
-  if (HIGH)								\
-    WRITE32_QUEUE_MASK (TARG, ALU16_OVERFLOW_RESULT<<16, 0xffff0000);	\
-  else									\
-    WRITE32_QUEUE_MASK (TARG, ALU16_OVERFLOW_RESULT, 0x0000ffff);	\
-  WRITE32_QUEUE_MASK (&PSW, value, mask);				\
-}
-
-#define ALU32_END(TARG)							\
-{									\
-  unsigned32 mask, value;						\
-  if (ALU32_HAD_OVERFLOW) {						\
-    mask = BIT32 (PSW_V) | BIT32 (PSW_VA) | BIT32 (PSW_C);		\
-    value = BIT32 (PSW_V) | BIT32 (PSW_VA);				\
-  }									\
-  else {								\
-    mask = BIT32 (PSW_V) | BIT32 (PSW_C);				\
-    value = 0;								\
-  }									\
-  if (ALU32_HAD_CARRY_BORROW)						\
-    value |= BIT32 (PSW_C);						\
-  WRITE32_QUEUE (TARG, ALU32_OVERFLOW_RESULT);				\
-  WRITE32_QUEUE_MASK (&PSW, value, mask);				\
-}
-
-#define ALU_END(TARG) ALU32_END(TARG)
-
-
-/* PSW & Flag manipulation */
-
-#define PSW_SET(BIT,VAL) BLIT32(PSW, (BIT), (VAL))
-#define PSW_VAL(BIT) EXTRACTED32(PSW, (BIT), (BIT))
-
-#define PSW_F(FLAG) (17 + ((FLAG) % 8) * 2)
-#define PSW_FLAG_SET(FLAG,VAL) PSW_SET(PSW_F(FLAG), VAL)
-#define PSW_FLAG_VAL(FLAG) PSW_VAL(PSW_F(FLAG))
-
-#define PSW_SET_QUEUE(BIT,VAL)						\
-do {									\
-  unsigned32 mask = BIT32 (BIT);					\
-  unsigned32 bitval = (VAL) ? mask : 0;					\
-  WRITE32_QUEUE_MASK (&PSW, bitval, mask);				\
-} while (0)
-
-#define PSW_FLAG_SET_QUEUE(FLAG,VAL)					\
-do {									\
-  unsigned32 mask = BIT32 (PSW_F (FLAG));				\
-  unsigned32 bitval = (VAL) ? mask : 0;					\
-  WRITE32_QUEUE_MASK (&PSW, bitval, mask);				\
-} while (0)
-
-/* Bring data in from the cold */
-
-#define IMEM(EA) \
-(sim_core_read_8(STATE_CPU (sd, 0), cia, exec_map, (EA)))
-
-#define MEM(SIGN, EA, NR_BYTES) \
-((SIGN##_##NR_BYTES) sim_core_read_unaligned_##NR_BYTES(STATE_CPU (sd, 0), cia, read_map, (EA)))
-
-#define STORE(EA, NR_BYTES, VAL) \
-do { \
-  sim_core_write_unaligned_##NR_BYTES(STATE_CPU (sd, 0), cia, write_map, (EA), (VAL)); \
-} while (0)
-
-
-#endif
+/* OBSOLETE /* Mitsubishi Electric Corp. D30V Simulator. */
+/* OBSOLETE    Copyright (C) 1997, Free Software Foundation, Inc. */
+/* OBSOLETE    Contributed by Cygnus Support. */
+/* OBSOLETE  */
+/* OBSOLETE This file is part of GDB, the GNU debugger. */
+/* OBSOLETE  */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2, or (at your option) */
+/* OBSOLETE any later version. */
+/* OBSOLETE  */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE  */
+/* OBSOLETE You should have received a copy of the GNU General Public License along */
+/* OBSOLETE with this program; if not, write to the Free Software Foundation, Inc., */
+/* OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef _D30V_ALU_H_ */
+/* OBSOLETE #define _D30V_ALU_H_ */
+/* OBSOLETE  */
+/* OBSOLETE #define ALU_CARRY (PSW_VAL(PSW_C) != 0) */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-alu.h" */
+/* OBSOLETE  */
+/* OBSOLETE #define ALU16_END(TARG, HIGH)						\ */
+/* OBSOLETE {									\ */
+/* OBSOLETE   unsigned32 mask, value;						\ */
+/* OBSOLETE   if (ALU16_HAD_OVERFLOW) {						\ */
+/* OBSOLETE     mask = BIT32 (PSW_V) | BIT32 (PSW_VA) | BIT32 (PSW_C);		\ */
+/* OBSOLETE     value = BIT32 (PSW_V) | BIT32 (PSW_VA);				\ */
+/* OBSOLETE   }									\ */
+/* OBSOLETE   else {								\ */
+/* OBSOLETE     mask = BIT32 (PSW_V) | BIT32 (PSW_C);				\ */
+/* OBSOLETE     value = 0;								\ */
+/* OBSOLETE   }									\ */
+/* OBSOLETE   if (ALU16_HAD_CARRY_BORROW)						\ */
+/* OBSOLETE     value |= BIT32 (PSW_C);						\ */
+/* OBSOLETE   if (HIGH)								\ */
+/* OBSOLETE     WRITE32_QUEUE_MASK (TARG, ALU16_OVERFLOW_RESULT<<16, 0xffff0000);	\ */
+/* OBSOLETE   else									\ */
+/* OBSOLETE     WRITE32_QUEUE_MASK (TARG, ALU16_OVERFLOW_RESULT, 0x0000ffff);	\ */
+/* OBSOLETE   WRITE32_QUEUE_MASK (&PSW, value, mask);				\ */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE #define ALU32_END(TARG)							\ */
+/* OBSOLETE {									\ */
+/* OBSOLETE   unsigned32 mask, value;						\ */
+/* OBSOLETE   if (ALU32_HAD_OVERFLOW) {						\ */
+/* OBSOLETE     mask = BIT32 (PSW_V) | BIT32 (PSW_VA) | BIT32 (PSW_C);		\ */
+/* OBSOLETE     value = BIT32 (PSW_V) | BIT32 (PSW_VA);				\ */
+/* OBSOLETE   }									\ */
+/* OBSOLETE   else {								\ */
+/* OBSOLETE     mask = BIT32 (PSW_V) | BIT32 (PSW_C);				\ */
+/* OBSOLETE     value = 0;								\ */
+/* OBSOLETE   }									\ */
+/* OBSOLETE   if (ALU32_HAD_CARRY_BORROW)						\ */
+/* OBSOLETE     value |= BIT32 (PSW_C);						\ */
+/* OBSOLETE   WRITE32_QUEUE (TARG, ALU32_OVERFLOW_RESULT);				\ */
+/* OBSOLETE   WRITE32_QUEUE_MASK (&PSW, value, mask);				\ */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE #define ALU_END(TARG) ALU32_END(TARG) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* PSW & Flag manipulation */ */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_SET(BIT,VAL) BLIT32(PSW, (BIT), (VAL)) */
+/* OBSOLETE #define PSW_VAL(BIT) EXTRACTED32(PSW, (BIT), (BIT)) */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_F(FLAG) (17 + ((FLAG) % 8) * 2) */
+/* OBSOLETE #define PSW_FLAG_SET(FLAG,VAL) PSW_SET(PSW_F(FLAG), VAL) */
+/* OBSOLETE #define PSW_FLAG_VAL(FLAG) PSW_VAL(PSW_F(FLAG)) */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_SET_QUEUE(BIT,VAL)						\ */
+/* OBSOLETE do {									\ */
+/* OBSOLETE   unsigned32 mask = BIT32 (BIT);					\ */
+/* OBSOLETE   unsigned32 bitval = (VAL) ? mask : 0;					\ */
+/* OBSOLETE   WRITE32_QUEUE_MASK (&PSW, bitval, mask);				\ */
+/* OBSOLETE } while (0) */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_FLAG_SET_QUEUE(FLAG,VAL)					\ */
+/* OBSOLETE do {									\ */
+/* OBSOLETE   unsigned32 mask = BIT32 (PSW_F (FLAG));				\ */
+/* OBSOLETE   unsigned32 bitval = (VAL) ? mask : 0;					\ */
+/* OBSOLETE   WRITE32_QUEUE_MASK (&PSW, bitval, mask);				\ */
+/* OBSOLETE } while (0) */
+/* OBSOLETE  */
+/* OBSOLETE /* Bring data in from the cold */ */
+/* OBSOLETE  */
+/* OBSOLETE #define IMEM(EA) \ */
+/* OBSOLETE (sim_core_read_8(STATE_CPU (sd, 0), cia, exec_map, (EA))) */
+/* OBSOLETE  */
+/* OBSOLETE #define MEM(SIGN, EA, NR_BYTES) \ */
+/* OBSOLETE ((SIGN##_##NR_BYTES) sim_core_read_unaligned_##NR_BYTES(STATE_CPU (sd, 0), cia, read_map, (EA))) */
+/* OBSOLETE  */
+/* OBSOLETE #define STORE(EA, NR_BYTES, VAL) \ */
+/* OBSOLETE do { \ */
+/* OBSOLETE   sim_core_write_unaligned_##NR_BYTES(STATE_CPU (sd, 0), cia, write_map, (EA), (VAL)); \ */
+/* OBSOLETE } while (0) */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #endif */
diff --git a/sim/d30v/configure b/sim/d30v/configure
index 1779847..90a98a0 100755
--- a/sim/d30v/configure
+++ b/sim/d30v/configure
@@ -161,7 +161,9 @@
 ac_help="$ac_help
   --enable-sim-hostendian=end		Specify host byte endian orientation."
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --enable-sim-reserved-bits		Specify whether to check reserved bits in instruction."
 ac_help="$ac_help
@@ -689,7 +691,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:693: checking how to run the C preprocessor" >&5
+echo "configure:695: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -704,13 +706,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 708 "configure"
+#line 710 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:716: \"$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
   :
@@ -721,13 +723,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 725 "configure"
+#line 727 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:733: \"$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
   :
@@ -738,13 +740,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
+#line 744 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:750: \"$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
   :
@@ -769,7 +771,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:775: 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
@@ -796,7 +798,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:800: checking for POSIXized ISC" >&5
+echo "configure:802: 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
@@ -817,12 +819,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:821: checking for ANSI C header files" >&5
+echo "configure:823: 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 <<EOF
-#line 826 "configure"
+#line 828 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -830,7 +832,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:836: \"$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*
@@ -847,7 +849,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 851 "configure"
+#line 853 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -865,7 +867,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 869 "configure"
+#line 871 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -886,7 +888,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 890 "configure"
+#line 892 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -897,7 +899,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -921,12 +923,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:925: checking for working const" >&5
+echo "configure:927: 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 <<EOF
-#line 930 "configure"
+#line 932 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -975,7 +977,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -996,21 +998,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1000: checking for inline" >&5
+echo "configure:1002: 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 <<EOF
-#line 1007 "configure"
+#line 1009 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1036,12 +1038,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1040: checking for off_t" >&5
+echo "configure:1042: 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 <<EOF
-#line 1045 "configure"
+#line 1047 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1069,12 +1071,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1073: checking for size_t" >&5
+echo "configure:1075: 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 <<EOF
-#line 1078 "configure"
+#line 1080 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1104,19 +1106,19 @@
 # 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:1108: checking for working alloca.h" >&5
+echo "configure:1110: 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 <<EOF
-#line 1113 "configure"
+#line 1115 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1122: \"$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
@@ -1137,12 +1139,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1141: checking for alloca" >&5
+echo "configure:1143: 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 <<EOF
-#line 1146 "configure"
+#line 1148 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1170,7 +1172,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1176: \"$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
@@ -1202,12 +1204,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1206: checking whether alloca needs Cray hooks" >&5
+echo "configure:1208: 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 <<EOF
-#line 1211 "configure"
+#line 1213 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1232,12 +1234,12 @@
 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:1236: checking for $ac_func" >&5
+echo "configure:1238: 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 <<EOF
-#line 1241 "configure"
+#line 1243 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1260,7 +1262,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1266: \"$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
@@ -1287,7 +1289,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1291: checking stack direction for C alloca" >&5
+echo "configure:1293: 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
@@ -1295,7 +1297,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
+#line 1301 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1314,7 +1316,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1320: \"$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
@@ -1339,17 +1341,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1343: checking for $ac_hdr" >&5
+echo "configure:1345: 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
-#line 1348 "configure"
+#line 1350 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1355: \"$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*
@@ -1378,12 +1380,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1382: checking for $ac_func" >&5
+echo "configure:1384: 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 <<EOF
-#line 1387 "configure"
+#line 1389 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1406,7 +1408,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1412: \"$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
@@ -1431,7 +1433,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1435: checking for working mmap" >&5
+echo "configure:1437: 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
@@ -1439,7 +1441,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
+#line 1445 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1579,7 +1581,7 @@
 }
 
 EOF
-if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1585: \"$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
@@ -1602,12 +1604,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1606: checking for Cygwin environment" >&5
+echo "configure:1608: 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 <<EOF
-#line 1611 "configure"
+#line 1613 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1618,7 +1620,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1635,19 +1637,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1639: checking for mingw32 environment" >&5
+echo "configure:1641: 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 <<EOF
-#line 1644 "configure"
+#line 1646 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1714,7 +1716,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1718: checking host system type" >&5
+echo "configure:1720: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1735,7 +1737,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1739: checking target system type" >&5
+echo "configure:1741: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1753,7 +1755,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1757: checking build system type" >&5
+echo "configure:1759: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1797,7 +1799,7 @@
 # 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:1801: checking for $ac_word" >&5
+echo "configure:1803: 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
@@ -1827,7 +1829,7 @@
   # 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:1831: checking for $ac_word" >&5
+echo "configure:1833: 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
@@ -1878,7 +1880,7 @@
       # 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:1882: checking for $ac_word" >&5
+echo "configure:1884: 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
@@ -1910,7 +1912,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1916: 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.
@@ -1921,12 +1923,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1925 "configure"
+#line 1927 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1932: \"$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
@@ -1952,12 +1954,12 @@
   { 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:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1958: 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:1961: checking whether we are using GNU C" >&5
+echo "configure:1963: 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
@@ -1966,7 +1968,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$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:1972: \"$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
@@ -1985,7 +1987,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1989: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1991: 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
@@ -2028,7 +2030,7 @@
 # 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:2032: checking for a BSD compatible install" >&5
+echo "configure:2034: 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
@@ -2096,7 +2098,7 @@
 # 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:2100: checking for $ac_word" >&5
+echo "configure:2102: 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
@@ -2131,17 +2133,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2135: checking for $ac_hdr" >&5
+echo "configure:2137: 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
-#line 2140 "configure"
+#line 2142 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2147: \"$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*
@@ -2171,12 +2173,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: checking for $ac_func" >&5
+echo "configure:2177: 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 <<EOF
-#line 2180 "configure"
+#line 2182 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2199,7 +2201,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2205: \"$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
@@ -2228,12 +2230,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2232: checking for $ac_func" >&5
+echo "configure:2234: 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 <<EOF
-#line 2237 "configure"
+#line 2239 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2256,7 +2258,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2262: \"$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
@@ -2290,19 +2292,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2294: checking for LC_MESSAGES" >&5
+echo "configure:2296: 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 <<EOF
-#line 2299 "configure"
+#line 2301 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2308: \"$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
@@ -2323,7 +2325,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2327: checking whether NLS is requested" >&5
+echo "configure:2329: 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"
@@ -2343,7 +2345,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2347: checking whether included gettext is requested" >&5
+echo "configure:2349: 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"
@@ -2362,17 +2364,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2366: checking for libintl.h" >&5
+echo "configure:2368: 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
-#line 2371 "configure"
+#line 2373 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2378: \"$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*
@@ -2389,19 +2391,19 @@
 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:2393: checking for gettext in libc" >&5
+echo "configure:2395: 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 <<EOF
-#line 2398 "configure"
+#line 2400 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2407: \"$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
@@ -2417,7 +2419,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2421: checking for bindtextdomain in -lintl" >&5
+echo "configure:2423: 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
@@ -2425,7 +2427,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
+#line 2431 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2436,7 +2438,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2442: \"$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
@@ -2452,19 +2454,19 @@
 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:2456: checking for gettext in libintl" >&5
+echo "configure:2458: 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 <<EOF
-#line 2461 "configure"
+#line 2463 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2470: \"$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
@@ -2492,7 +2494,7 @@
 	      # 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:2496: checking for $ac_word" >&5
+echo "configure:2498: 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
@@ -2526,12 +2528,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2530: checking for $ac_func" >&5
+echo "configure:2532: 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 <<EOF
-#line 2535 "configure"
+#line 2537 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2554,7 +2556,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2560: \"$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
@@ -2581,7 +2583,7 @@
 		# 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:2585: checking for $ac_word" >&5
+echo "configure:2587: 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
@@ -2617,7 +2619,7 @@
 		# 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:2621: checking for $ac_word" >&5
+echo "configure:2623: 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
@@ -2649,7 +2651,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
+#line 2655 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2657,7 +2659,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2689,7 +2691,7 @@
         # 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:2693: checking for $ac_word" >&5
+echo "configure:2695: 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
@@ -2723,7 +2725,7 @@
         # 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:2727: checking for $ac_word" >&5
+echo "configure:2729: 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
@@ -2759,7 +2761,7 @@
         # 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:2763: checking for $ac_word" >&5
+echo "configure:2765: 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
@@ -2849,7 +2851,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2853: checking for catalogs to be installed" >&5
+echo "configure:2855: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2877,17 +2879,17 @@
       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:2881: checking for linux/version.h" >&5
+echo "configure:2883: 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
-#line 2886 "configure"
+#line 2888 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2893: \"$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*
@@ -2956,17 +2958,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2960: checking for $ac_hdr" >&5
+echo "configure:2962: 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
-#line 2965 "configure"
+#line 2967 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2972: \"$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*
@@ -2996,17 +2998,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3000: checking for $ac_hdr" >&5
+echo "configure:3002: 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
-#line 3005 "configure"
+#line 3007 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3012: \"$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*
@@ -3036,17 +3038,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3040: checking for $ac_hdr" >&5
+echo "configure:3042: 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
-#line 3045 "configure"
+#line 3047 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3076,17 +3078,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3080: checking for $ac_hdr" >&5
+echo "configure:3082: 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
-#line 3085 "configure"
+#line 3087 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3092: \"$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*
@@ -3115,12 +3117,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3119: checking for $ac_func" >&5
+echo "configure:3121: 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 <<EOF
-#line 3124 "configure"
+#line 3126 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3143,7 +3145,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3149: \"$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
@@ -3170,7 +3172,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3174: checking for bind in -lsocket" >&5
+echo "configure:3176: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3178,7 +3180,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
+#line 3184 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3189,7 +3191,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3195: \"$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
@@ -3217,7 +3219,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3221: checking for gethostbyname in -lnsl" >&5
+echo "configure:3223: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3225,7 +3227,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3229 "configure"
+#line 3231 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3236,7 +3238,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3242: \"$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
@@ -3412,12 +3414,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3416: checking return type of signal handlers" >&5
+echo "configure:3418: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3421 "configure"
+#line 3423 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3434,7 +3436,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3456,7 +3458,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3460: checking for executable suffix" >&5
+echo "configure:3462: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3466,7 +3468,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3512,7 +3514,7 @@
 # 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:3516: checking for $ac_word" >&5
+echo "configure:3518: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3704,14 +3706,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3708: checking whether byte ordering is bigendian" >&5
+echo "configure:3710: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3715 "configure"
+#line 3717 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3722,11 +3724,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3730 "configure"
+#line 3732 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3737,7 +3739,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3757,7 +3759,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3761 "configure"
+#line 3763 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3770,7 +3772,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3804,37 +3806,84 @@
 fi
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3859: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3869 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -3880,17 +3929,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3884: checking for $ac_hdr" >&5
+echo "configure:3933: 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
-#line 3889 "configure"
+#line 3938 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3943: \"$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*
diff --git a/sim/d30v/cpu.c b/sim/d30v/cpu.c
index c14a951..32d8829 100644
--- a/sim/d30v/cpu.c
+++ b/sim/d30v/cpu.c
@@ -1,172 +1,172 @@
-/* Mitsubishi Electric Corp. D30V Simulator.
-   Copyright (C) 1997, Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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 _CPU_C_
-#define _CPU_C_
-
-#include "sim-main.h"
-
-
-int
-is_wrong_slot (SIM_DESC sd,
-	       address_word cia,
-	       itable_index index)
-{
-  switch (STATE_CPU (sd, 0)->unit)
-    {
-    case memory_unit:
-      return !itable[index].option[itable_option_mu];
-    case integer_unit:
-      return !itable[index].option[itable_option_iu];
-    case any_unit:
-      return 0;
-    default:
-      sim_engine_abort (sd, STATE_CPU (sd, 0), cia,
-			"internal error - is_wrong_slot - bad switch");
-      return -1;
-    }
-}
-
-int
-is_condition_ok (SIM_DESC sd,
-		 address_word cia,
-		 int cond)
-{
-  switch (cond)
-    {
-    case 0x0:
-      return 1;
-    case 0x1:
-      return PSW_VAL(PSW_F0);
-    case 0x2:
-      return !PSW_VAL(PSW_F0);
-    case 0x3:
-      return PSW_VAL(PSW_F1);
-    case 0x4:
-      return !PSW_VAL(PSW_F1);
-    case 0x5:
-      return PSW_VAL(PSW_F0) && PSW_VAL(PSW_F1);
-    case 0x6:
-      return PSW_VAL(PSW_F0) && !PSW_VAL(PSW_F1);
-    case 0x7:
-      sim_engine_abort (sd, STATE_CPU (sd, 0), cia,
-			"is_condition_ok - bad instruction condition bits");
-      return 0;
-    default:
-      sim_engine_abort (sd, STATE_CPU (sd, 0), cia,
-			"internal error - is_condition_ok - bad switch");
-      return -1;
-    }
-}
-
-/* If --trace-call, trace calls, remembering the current state of
-   registers.  */
-
-typedef struct _call_stack {
-  struct _call_stack *prev;
-  registers regs;
-} call_stack;
-
-static call_stack *call_stack_head = (call_stack *)0;
-static int call_depth = 0;
-
-void call_occurred (SIM_DESC sd,
-		    sim_cpu *cpu,
-		    address_word cia,
-		    address_word nia)
-{
-  call_stack *ptr = ZALLOC (call_stack);
-  ptr->regs = cpu->regs;
-  ptr->prev = call_stack_head;
-  call_stack_head = ptr;
-
-  trace_one_insn (sd, cpu, nia, 1, "", 0, "call",
-		  "Depth %3d, Return 0x%.8lx, Args 0x%.8lx 0x%.8lx",
-		  ++call_depth, (unsigned long)cia+8, (unsigned long)GPR[2],
-		  (unsigned long)GPR[3]);
-}
-
-/* If --trace-call, trace returns, checking if any saved register was changed.  */
-
-void return_occurred (SIM_DESC sd,
-		      sim_cpu *cpu,
-		      address_word cia,
-		      address_word nia)
-{
-  char buffer[1024];
-  char *buf_ptr = buffer;
-  call_stack *ptr = call_stack_head;
-  int regno;
-  char *prefix = ", Registers that differ: ";
-
-  *buf_ptr = '\0';
-  for (regno = 34; regno <= 63; regno++) {
-    if (cpu->regs.general_purpose[regno] != ptr->regs.general_purpose[regno]) {
-      sprintf (buf_ptr, "%sr%d", prefix, regno);
-      buf_ptr += strlen (buf_ptr);
-      prefix = " ";
-    }
-  }
-
-  if (cpu->regs.accumulator[1] != ptr->regs.accumulator[1]) {
-    sprintf (buf_ptr, "%sa1", prefix);
-    buf_ptr += strlen (buf_ptr);
-    prefix = " ";
-  }
-
-  trace_one_insn (sd, cpu, cia, 1, "", 0, "return",
-		  "Depth %3d, Return 0x%.8lx, Ret. 0x%.8lx 0x%.8lx%s",
-		  call_depth--, (unsigned long)nia, (unsigned long)GPR[2],
-		  (unsigned long)GPR[3], buffer);
-
-  call_stack_head = ptr->prev;
-  zfree (ptr);
-}
-
-
-/* Read/write functions for system call interface.  */
-int
-d30v_read_mem (host_callback *cb,
-	       struct cb_syscall *sc,
-	       unsigned long taddr,
-	       char *buf,
-	       int bytes)
-{
-  SIM_DESC sd = (SIM_DESC) sc->p1;
-  sim_cpu *cpu = STATE_CPU (sd, 0);
-
-  return sim_core_read_buffer (sd, cpu, read_map, buf, taddr, bytes);
-}
-
-int
-d30v_write_mem (host_callback *cb,
-		struct cb_syscall *sc,
-		unsigned long taddr,
-		const char *buf,
-		int bytes)
-{
-  SIM_DESC sd = (SIM_DESC) sc->p1;
-  sim_cpu *cpu = STATE_CPU (sd, 0);
-
-  return sim_core_write_buffer (sd, cpu, write_map, buf, taddr, bytes);
-}
-
-#endif /* _CPU_C_ */
+/* OBSOLETE /* Mitsubishi Electric Corp. D30V Simulator. */
+/* OBSOLETE    Copyright (C) 1997, Free Software Foundation, Inc. */
+/* OBSOLETE    Contributed by Cygnus Support. */
+/* OBSOLETE  */
+/* OBSOLETE This file is part of GDB, the GNU debugger. */
+/* OBSOLETE  */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2, or (at your option) */
+/* OBSOLETE any later version. */
+/* OBSOLETE  */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE  */
+/* OBSOLETE You should have received a copy of the GNU General Public License along */
+/* OBSOLETE with this program; if not, write to the Free Software Foundation, Inc., */
+/* OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef _CPU_C_ */
+/* OBSOLETE #define _CPU_C_ */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-main.h" */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE is_wrong_slot (SIM_DESC sd, */
+/* OBSOLETE 	       address_word cia, */
+/* OBSOLETE 	       itable_index index) */
+/* OBSOLETE { */
+/* OBSOLETE   switch (STATE_CPU (sd, 0)->unit) */
+/* OBSOLETE     { */
+/* OBSOLETE     case memory_unit: */
+/* OBSOLETE       return !itable[index].option[itable_option_mu]; */
+/* OBSOLETE     case integer_unit: */
+/* OBSOLETE       return !itable[index].option[itable_option_iu]; */
+/* OBSOLETE     case any_unit: */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     default: */
+/* OBSOLETE       sim_engine_abort (sd, STATE_CPU (sd, 0), cia, */
+/* OBSOLETE 			"internal error - is_wrong_slot - bad switch"); */
+/* OBSOLETE       return -1; */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE is_condition_ok (SIM_DESC sd, */
+/* OBSOLETE 		 address_word cia, */
+/* OBSOLETE 		 int cond) */
+/* OBSOLETE { */
+/* OBSOLETE   switch (cond) */
+/* OBSOLETE     { */
+/* OBSOLETE     case 0x0: */
+/* OBSOLETE       return 1; */
+/* OBSOLETE     case 0x1: */
+/* OBSOLETE       return PSW_VAL(PSW_F0); */
+/* OBSOLETE     case 0x2: */
+/* OBSOLETE       return !PSW_VAL(PSW_F0); */
+/* OBSOLETE     case 0x3: */
+/* OBSOLETE       return PSW_VAL(PSW_F1); */
+/* OBSOLETE     case 0x4: */
+/* OBSOLETE       return !PSW_VAL(PSW_F1); */
+/* OBSOLETE     case 0x5: */
+/* OBSOLETE       return PSW_VAL(PSW_F0) && PSW_VAL(PSW_F1); */
+/* OBSOLETE     case 0x6: */
+/* OBSOLETE       return PSW_VAL(PSW_F0) && !PSW_VAL(PSW_F1); */
+/* OBSOLETE     case 0x7: */
+/* OBSOLETE       sim_engine_abort (sd, STATE_CPU (sd, 0), cia, */
+/* OBSOLETE 			"is_condition_ok - bad instruction condition bits"); */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     default: */
+/* OBSOLETE       sim_engine_abort (sd, STATE_CPU (sd, 0), cia, */
+/* OBSOLETE 			"internal error - is_condition_ok - bad switch"); */
+/* OBSOLETE       return -1; */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* If --trace-call, trace calls, remembering the current state of */
+/* OBSOLETE    registers.  */ */
+/* OBSOLETE  */
+/* OBSOLETE typedef struct _call_stack { */
+/* OBSOLETE   struct _call_stack *prev; */
+/* OBSOLETE   registers regs; */
+/* OBSOLETE } call_stack; */
+/* OBSOLETE  */
+/* OBSOLETE static call_stack *call_stack_head = (call_stack *)0; */
+/* OBSOLETE static int call_depth = 0; */
+/* OBSOLETE  */
+/* OBSOLETE void call_occurred (SIM_DESC sd, */
+/* OBSOLETE 		    sim_cpu *cpu, */
+/* OBSOLETE 		    address_word cia, */
+/* OBSOLETE 		    address_word nia) */
+/* OBSOLETE { */
+/* OBSOLETE   call_stack *ptr = ZALLOC (call_stack); */
+/* OBSOLETE   ptr->regs = cpu->regs; */
+/* OBSOLETE   ptr->prev = call_stack_head; */
+/* OBSOLETE   call_stack_head = ptr; */
+/* OBSOLETE  */
+/* OBSOLETE   trace_one_insn (sd, cpu, nia, 1, "", 0, "call", */
+/* OBSOLETE 		  "Depth %3d, Return 0x%.8lx, Args 0x%.8lx 0x%.8lx", */
+/* OBSOLETE 		  ++call_depth, (unsigned long)cia+8, (unsigned long)GPR[2], */
+/* OBSOLETE 		  (unsigned long)GPR[3]); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* If --trace-call, trace returns, checking if any saved register was changed.  */ */
+/* OBSOLETE  */
+/* OBSOLETE void return_occurred (SIM_DESC sd, */
+/* OBSOLETE 		      sim_cpu *cpu, */
+/* OBSOLETE 		      address_word cia, */
+/* OBSOLETE 		      address_word nia) */
+/* OBSOLETE { */
+/* OBSOLETE   char buffer[1024]; */
+/* OBSOLETE   char *buf_ptr = buffer; */
+/* OBSOLETE   call_stack *ptr = call_stack_head; */
+/* OBSOLETE   int regno; */
+/* OBSOLETE   char *prefix = ", Registers that differ: "; */
+/* OBSOLETE  */
+/* OBSOLETE   *buf_ptr = '\0'; */
+/* OBSOLETE   for (regno = 34; regno <= 63; regno++) { */
+/* OBSOLETE     if (cpu->regs.general_purpose[regno] != ptr->regs.general_purpose[regno]) { */
+/* OBSOLETE       sprintf (buf_ptr, "%sr%d", prefix, regno); */
+/* OBSOLETE       buf_ptr += strlen (buf_ptr); */
+/* OBSOLETE       prefix = " "; */
+/* OBSOLETE     } */
+/* OBSOLETE   } */
+/* OBSOLETE  */
+/* OBSOLETE   if (cpu->regs.accumulator[1] != ptr->regs.accumulator[1]) { */
+/* OBSOLETE     sprintf (buf_ptr, "%sa1", prefix); */
+/* OBSOLETE     buf_ptr += strlen (buf_ptr); */
+/* OBSOLETE     prefix = " "; */
+/* OBSOLETE   } */
+/* OBSOLETE  */
+/* OBSOLETE   trace_one_insn (sd, cpu, cia, 1, "", 0, "return", */
+/* OBSOLETE 		  "Depth %3d, Return 0x%.8lx, Ret. 0x%.8lx 0x%.8lx%s", */
+/* OBSOLETE 		  call_depth--, (unsigned long)nia, (unsigned long)GPR[2], */
+/* OBSOLETE 		  (unsigned long)GPR[3], buffer); */
+/* OBSOLETE  */
+/* OBSOLETE   call_stack_head = ptr->prev; */
+/* OBSOLETE   zfree (ptr); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* Read/write functions for system call interface.  */ */
+/* OBSOLETE int */
+/* OBSOLETE d30v_read_mem (host_callback *cb, */
+/* OBSOLETE 	       struct cb_syscall *sc, */
+/* OBSOLETE 	       unsigned long taddr, */
+/* OBSOLETE 	       char *buf, */
+/* OBSOLETE 	       int bytes) */
+/* OBSOLETE { */
+/* OBSOLETE   SIM_DESC sd = (SIM_DESC) sc->p1; */
+/* OBSOLETE   sim_cpu *cpu = STATE_CPU (sd, 0); */
+/* OBSOLETE  */
+/* OBSOLETE   return sim_core_read_buffer (sd, cpu, read_map, buf, taddr, bytes); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE d30v_write_mem (host_callback *cb, */
+/* OBSOLETE 		struct cb_syscall *sc, */
+/* OBSOLETE 		unsigned long taddr, */
+/* OBSOLETE 		const char *buf, */
+/* OBSOLETE 		int bytes) */
+/* OBSOLETE { */
+/* OBSOLETE   SIM_DESC sd = (SIM_DESC) sc->p1; */
+/* OBSOLETE   sim_cpu *cpu = STATE_CPU (sd, 0); */
+/* OBSOLETE  */
+/* OBSOLETE   return sim_core_write_buffer (sd, cpu, write_map, buf, taddr, bytes); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE #endif /* _CPU_C_ */ */
diff --git a/sim/d30v/cpu.h b/sim/d30v/cpu.h
index 56f749c..1e9f3d8 100644
--- a/sim/d30v/cpu.h
+++ b/sim/d30v/cpu.h
@@ -1,249 +1,249 @@
-/* Mitsubishi Electric Corp. D30V Simulator.
-   Copyright (C) 1997, Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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 _CPU_H_
-#define _CPU_H_
-
-enum {
-  NR_GENERAL_PURPOSE_REGISTERS = 64,
-  NR_CONTROL_REGISTERS = 64,
-  NR_ACCUMULATORS = 2,
-  STACK_POINTER_GPR = 63,
-  NR_STACK_POINTERS = 2,
-};
-
-enum {
-  processor_status_word_cr = 0,
-  backup_processor_status_word_cr = 1,
-  program_counter_cr = 2,
-  backup_program_counter_cr = 3,
-  debug_backup_processor_status_word_cr = 4,
-  debug_backup_program_counter_cr = 5,
-  reserved_6_cr = 6,
-  repeat_count_cr = 7,
-  repeat_start_address_cr = 8,
-  repeat_end_address_cr = 9,
-  modulo_start_address_cr = 10,
-  modulo_end_address_cr = 11,
-  instruction_break_address_cr = 14,
-  eit_vector_base_cr = 15,
-};
-
-
-enum {
-  PSW_SM = 0,
-  PSW_EA = 2,
-  PSW_DB = 3,
-  PSW_DS = 4,
-  PSW_IE = 5,
-  PSW_RP = 6,
-  PSW_MD = 7,
-  PSW_F0 = 17,
-  PSW_F1 = 19,
-  PSW_F2 = 21,
-  PSW_F3 = 23,
-  PSW_S = 25,
-  PSW_V = 27,
-  PSW_VA = 29,
-  PSW_C = 31,
-};
-
-/* aliases for PSW flag numbers (F0..F7) */
-enum
-{
-  PSW_S_FLAG = 4,
-};
-
-typedef struct _registers {
-  unsigned32 general_purpose[NR_GENERAL_PURPOSE_REGISTERS];
-  /* keep track of the stack pointer */
-  unsigned32 sp[NR_STACK_POINTERS]; /* swap with SP */
-  unsigned32 current_sp;
-  unsigned32 control[NR_CONTROL_REGISTERS];
-  unsigned64 accumulator[NR_ACCUMULATORS];
-} registers;
-
-typedef enum _cpu_units {
-  memory_unit,
-  integer_unit,
-  any_unit,
-} cpu_units;
-
-/* In order to support parallel instructions, which one instruction can be
-   writing to a register that is used as input to another, queue up the
-   writes to the end of the instruction boundaries.  */
-
-#define MAX_WRITE32	16
-#define MAX_WRITE64	2
-
-struct _write32 {
-  int num;				/* # of 32-bit writes queued up */
-  unsigned32 value[MAX_WRITE32];	/* value to write */
-  unsigned32 mask[MAX_WRITE32];		/* mask to use */
-  unsigned32 *ptr[MAX_WRITE32];		/* address to write to */
-};
-
-struct _write64 {
-  int num;				/* # of 64-bit writes queued up */
-  unsigned64 value[MAX_WRITE64];	/* value to write */
-  unsigned64 *ptr[MAX_WRITE64];		/* address to write to */
-};
-
-struct _sim_cpu {
-  cpu_units unit;
-  registers regs;
-  sim_cpu_base base;
-  int trace_call_p;			/* Whether to do call tracing.  */
-  int trace_trap_p;			/* If unknown traps dump out the regs */
-  int trace_action;			/* trace bits at end of instructions */
-  int left_kills_right_p;               /* left insn kills insn in right slot of -> */
-  int mvtsys_left_p;			/* left insn was mvtsys */
-  int did_trap;				/* we did a trap & need to finish it */
-  struct _write32 write32;		/* queued up 32-bit writes */
-  struct _write64 write64;		/* queued up 64-bit writes */
-};
-
-#define PC	(STATE_CPU (sd, 0)->regs.control[program_counter_cr])
-#define PSW 	(STATE_CPU (sd, 0)->regs.control[processor_status_word_cr])
-#define PSWL    (*AL2_4(&PSW))
-#define PSWH    (*AH2_4(&PSW))
-#define DPSW 	(STATE_CPU (sd, 0)->regs.control[debug_backup_processor_status_word_cr])
-#define DPC 	(STATE_CPU (sd, 0)->regs.control[debug_backup_program_counter_cr])
-#define bPC 	(STATE_CPU (sd, 0)->regs.control[backup_program_counter_cr])
-#define bPSW 	(STATE_CPU (sd, 0)->regs.control[backup_processor_status_word_cr])
-#define RPT_C 	(STATE_CPU (sd, 0)->regs.control[repeat_count_cr])
-#define RPT_S 	(STATE_CPU (sd, 0)->regs.control[repeat_start_address_cr])
-#define RPT_E 	(STATE_CPU (sd, 0)->regs.control[repeat_end_address_cr])
-#define MOD_S 	(STATE_CPU (sd, 0)->regs.control[modulo_start_address_cr])
-#define MOD_E 	(STATE_CPU (sd, 0)->regs.control[modulo_end_address_cr])
-#define IBA 	(STATE_CPU (sd, 0)->regs.control[instruction_break_address_cr])
-#define EIT_VB	(STATE_CPU (sd, 0)->regs.control[eit_vector_base_cr])
-#define GPR	(STATE_CPU (sd, 0)->regs.general_purpose)
-#define GPR_CLEAR(N) (GPR[(N)] = 0)
-#define ACC	(STATE_CPU (sd, 0)->regs.accumulator)
-#define CREG	(STATE_CPU (sd, 0)->regs.control)
-#define SP      (GPR[STACK_POINTER_GPR])
-#define TRACE_CALL_P (STATE_CPU (sd, 0)->trace_call_p)
-#define TRACE_TRAP_P (STATE_CPU (sd, 0)->trace_trap_p)
-#define TRACE_ACTION (STATE_CPU (sd, 0)->trace_action)
-#define     TRACE_ACTION_CALL	0x00000001	/* call occurred */
-#define     TRACE_ACTION_RETURN	0x00000002	/* return occurred */
-
-#define WRITE32 (STATE_CPU (sd, 0)->write32)
-#define WRITE32_NUM	 (WRITE32.num)
-#define WRITE32_PTR(N)	 (WRITE32.ptr[N])
-#define WRITE32_MASK(N)	 (WRITE32.mask[N])
-#define WRITE32_VALUE(N) (WRITE32.value[N])
-#define WRITE32_QUEUE(PTR, VALUE) WRITE32_QUEUE_MASK (PTR, VALUE, 0xffffffff)
-
-#define WRITE32_QUEUE_MASK(PTR, VALUE, MASK)				\
-do {									\
-  int _num = WRITE32_NUM;						\
-  if (_num >= MAX_WRITE32)						\
-    sim_engine_abort (sd, STATE_CPU (sd, 0), cia,			\
-		      "Too many queued 32-bit writes");			\
-  WRITE32_PTR(_num) = PTR;						\
-  WRITE32_VALUE(_num) = VALUE;						\
-  WRITE32_MASK(_num) = MASK;						\
-  WRITE32_NUM = _num+1;							\
-} while (0)
-
-#define DID_TRAP	(STATE_CPU (sd, 0)->did_trap)
-
-#define WRITE64 (STATE_CPU (sd, 0)->write64)
-#define WRITE64_NUM	 (WRITE64.num)
-#define WRITE64_PTR(N)	 (WRITE64.ptr[N])
-#define WRITE64_VALUE(N) (WRITE64.value[N])
-#define WRITE64_QUEUE(PTR, VALUE)					\
-do {									\
-  int _num = WRITE64_NUM;						\
-  if (_num >= MAX_WRITE64)						\
-    sim_engine_abort (sd, STATE_CPU (sd, 0), cia,			\
-		      "Too many queued 64-bit writes");			\
-  WRITE64_PTR(_num) = PTR;						\
-  WRITE64_VALUE(_num) = VALUE;						\
-  WRITE64_NUM = _num+1;							\
-} while (0)
-
-#define DPSW_VALID	0xbf005555
-#define PSW_VALID	0xb7005555
-#define EIT_VALID	0xfffff000	/* From page 7-4 of D30V/MPEG arch. manual  */
-#define EIT_VB_DEFAULT	0xfffff000	/* Value of the EIT_VB register after reset */
-
-/* Verify that the instruction is in the correct slot */
-
-#define IS_WRONG_SLOT is_wrong_slot(sd, cia, MY_INDEX)
-extern int is_wrong_slot
-(SIM_DESC sd,
- address_word cia,
- itable_index index);
-
-#define IS_CONDITION_OK is_condition_ok(sd, cia, CCC)
-extern int is_condition_ok
-(SIM_DESC sd,
- address_word cia,
- int cond);
-
-#define SIM_HAVE_BREAKPOINTS	/* Turn on internal breakpoint module */
-
-/* Internal breakpoint instruction is syscall 5 */
-#define SIM_BREAKPOINT {0x0e, 0x00, 0x00, 0x05}
-#define SIM_BREAKPOINT_SIZE (4)
-
-/* Call occurred */
-extern void call_occurred
-(SIM_DESC sd,
- sim_cpu *cpu,
- address_word cia,
- address_word nia);
-
-/* Return occurred */
-extern void return_occurred
-(SIM_DESC sd,
- sim_cpu *cpu,
- address_word cia,
- address_word nia);
-
-/* Whether to do call tracing.  */
-extern int d30v_call_trace_p;
-
-/* Read/write functions for system call interface.  */
-extern int d30v_read_mem
-(host_callback *cb,
- struct cb_syscall *sc,
- unsigned long taddr,
- char *buf,
- int bytes);
-
-extern int d30v_write_mem
-(host_callback *cb,
- struct cb_syscall *sc,
- unsigned long taddr,
- const char *buf,
- int bytes);
-
-/* Process all of the queued up writes in order now */
-void unqueue_writes
-(SIM_DESC sd,
- sim_cpu *cpu,
- address_word cia);
-
-#endif /* _CPU_H_ */
+/* OBSOLETE /* Mitsubishi Electric Corp. D30V Simulator. */
+/* OBSOLETE    Copyright (C) 1997, Free Software Foundation, Inc. */
+/* OBSOLETE    Contributed by Cygnus Support. */
+/* OBSOLETE  */
+/* OBSOLETE This file is part of GDB, the GNU debugger. */
+/* OBSOLETE  */
+/* OBSOLETE This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE it under the terms of the GNU General Public License as published by */
+/* OBSOLETE the Free Software Foundation; either version 2, or (at your option) */
+/* OBSOLETE any later version. */
+/* OBSOLETE  */
+/* OBSOLETE This program is distributed in the hope that it will be useful, */
+/* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE GNU General Public License for more details. */
+/* OBSOLETE  */
+/* OBSOLETE You should have received a copy of the GNU General Public License along */
+/* OBSOLETE with this program; if not, write to the Free Software Foundation, Inc., */
+/* OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef _CPU_H_ */
+/* OBSOLETE #define _CPU_H_ */
+/* OBSOLETE  */
+/* OBSOLETE enum { */
+/* OBSOLETE   NR_GENERAL_PURPOSE_REGISTERS = 64, */
+/* OBSOLETE   NR_CONTROL_REGISTERS = 64, */
+/* OBSOLETE   NR_ACCUMULATORS = 2, */
+/* OBSOLETE   STACK_POINTER_GPR = 63, */
+/* OBSOLETE   NR_STACK_POINTERS = 2, */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE enum { */
+/* OBSOLETE   processor_status_word_cr = 0, */
+/* OBSOLETE   backup_processor_status_word_cr = 1, */
+/* OBSOLETE   program_counter_cr = 2, */
+/* OBSOLETE   backup_program_counter_cr = 3, */
+/* OBSOLETE   debug_backup_processor_status_word_cr = 4, */
+/* OBSOLETE   debug_backup_program_counter_cr = 5, */
+/* OBSOLETE   reserved_6_cr = 6, */
+/* OBSOLETE   repeat_count_cr = 7, */
+/* OBSOLETE   repeat_start_address_cr = 8, */
+/* OBSOLETE   repeat_end_address_cr = 9, */
+/* OBSOLETE   modulo_start_address_cr = 10, */
+/* OBSOLETE   modulo_end_address_cr = 11, */
+/* OBSOLETE   instruction_break_address_cr = 14, */
+/* OBSOLETE   eit_vector_base_cr = 15, */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE enum { */
+/* OBSOLETE   PSW_SM = 0, */
+/* OBSOLETE   PSW_EA = 2, */
+/* OBSOLETE   PSW_DB = 3, */
+/* OBSOLETE   PSW_DS = 4, */
+/* OBSOLETE   PSW_IE = 5, */
+/* OBSOLETE   PSW_RP = 6, */
+/* OBSOLETE   PSW_MD = 7, */
+/* OBSOLETE   PSW_F0 = 17, */
+/* OBSOLETE   PSW_F1 = 19, */
+/* OBSOLETE   PSW_F2 = 21, */
+/* OBSOLETE   PSW_F3 = 23, */
+/* OBSOLETE   PSW_S = 25, */
+/* OBSOLETE   PSW_V = 27, */
+/* OBSOLETE   PSW_VA = 29, */
+/* OBSOLETE   PSW_C = 31, */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE /* aliases for PSW flag numbers (F0..F7) */ */
+/* OBSOLETE enum */
+/* OBSOLETE { */
+/* OBSOLETE   PSW_S_FLAG = 4, */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE typedef struct _registers { */
+/* OBSOLETE   unsigned32 general_purpose[NR_GENERAL_PURPOSE_REGISTERS]; */
+/* OBSOLETE   /* keep track of the stack pointer */ */
+/* OBSOLETE   unsigned32 sp[NR_STACK_POINTERS]; /* swap with SP */ */
+/* OBSOLETE   unsigned32 current_sp; */
+/* OBSOLETE   unsigned32 control[NR_CONTROL_REGISTERS]; */
+/* OBSOLETE   unsigned64 accumulator[NR_ACCUMULATORS]; */
+/* OBSOLETE } registers; */
+/* OBSOLETE  */
+/* OBSOLETE typedef enum _cpu_units { */
+/* OBSOLETE   memory_unit, */
+/* OBSOLETE   integer_unit, */
+/* OBSOLETE   any_unit, */
+/* OBSOLETE } cpu_units; */
+/* OBSOLETE  */
+/* OBSOLETE /* In order to support parallel instructions, which one instruction can be */
+/* OBSOLETE    writing to a register that is used as input to another, queue up the */
+/* OBSOLETE    writes to the end of the instruction boundaries.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define MAX_WRITE32	16 */
+/* OBSOLETE #define MAX_WRITE64	2 */
+/* OBSOLETE  */
+/* OBSOLETE struct _write32 { */
+/* OBSOLETE   int num;				/* # of 32-bit writes queued up */ */
+/* OBSOLETE   unsigned32 value[MAX_WRITE32];	/* value to write */ */
+/* OBSOLETE   unsigned32 mask[MAX_WRITE32];		/* mask to use */ */
+/* OBSOLETE   unsigned32 *ptr[MAX_WRITE32];		/* address to write to */ */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE struct _write64 { */
+/* OBSOLETE   int num;				/* # of 64-bit writes queued up */ */
+/* OBSOLETE   unsigned64 value[MAX_WRITE64];	/* value to write */ */
+/* OBSOLETE   unsigned64 *ptr[MAX_WRITE64];		/* address to write to */ */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE struct _sim_cpu { */
+/* OBSOLETE   cpu_units unit; */
+/* OBSOLETE   registers regs; */
+/* OBSOLETE   sim_cpu_base base; */
+/* OBSOLETE   int trace_call_p;			/* Whether to do call tracing.  */ */
+/* OBSOLETE   int trace_trap_p;			/* If unknown traps dump out the regs */ */
+/* OBSOLETE   int trace_action;			/* trace bits at end of instructions */ */
+/* OBSOLETE   int left_kills_right_p;               /* left insn kills insn in right slot of -> */ */
+/* OBSOLETE   int mvtsys_left_p;			/* left insn was mvtsys */ */
+/* OBSOLETE   int did_trap;				/* we did a trap & need to finish it */ */
+/* OBSOLETE   struct _write32 write32;		/* queued up 32-bit writes */ */
+/* OBSOLETE   struct _write64 write64;		/* queued up 64-bit writes */ */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE #define PC	(STATE_CPU (sd, 0)->regs.control[program_counter_cr]) */
+/* OBSOLETE #define PSW 	(STATE_CPU (sd, 0)->regs.control[processor_status_word_cr]) */
+/* OBSOLETE #define PSWL    (*AL2_4(&PSW)) */
+/* OBSOLETE #define PSWH    (*AH2_4(&PSW)) */
+/* OBSOLETE #define DPSW 	(STATE_CPU (sd, 0)->regs.control[debug_backup_processor_status_word_cr]) */
+/* OBSOLETE #define DPC 	(STATE_CPU (sd, 0)->regs.control[debug_backup_program_counter_cr]) */
+/* OBSOLETE #define bPC 	(STATE_CPU (sd, 0)->regs.control[backup_program_counter_cr]) */
+/* OBSOLETE #define bPSW 	(STATE_CPU (sd, 0)->regs.control[backup_processor_status_word_cr]) */
+/* OBSOLETE #define RPT_C 	(STATE_CPU (sd, 0)->regs.control[repeat_count_cr]) */
+/* OBSOLETE #define RPT_S 	(STATE_CPU (sd, 0)->regs.control[repeat_start_address_cr]) */
+/* OBSOLETE #define RPT_E 	(STATE_CPU (sd, 0)->regs.control[repeat_end_address_cr]) */
+/* OBSOLETE #define MOD_S 	(STATE_CPU (sd, 0)->regs.control[modulo_start_address_cr]) */
+/* OBSOLETE #define MOD_E 	(STATE_CPU (sd, 0)->regs.control[modulo_end_address_cr]) */
+/* OBSOLETE #define IBA 	(STATE_CPU (sd, 0)->regs.control[instruction_break_address_cr]) */
+/* OBSOLETE #define EIT_VB	(STATE_CPU (sd, 0)->regs.control[eit_vector_base_cr]) */
+/* OBSOLETE #define GPR	(STATE_CPU (sd, 0)->regs.general_purpose) */
+/* OBSOLETE #define GPR_CLEAR(N) (GPR[(N)] = 0) */
+/* OBSOLETE #define ACC	(STATE_CPU (sd, 0)->regs.accumulator) */
+/* OBSOLETE #define CREG	(STATE_CPU (sd, 0)->regs.control) */
+/* OBSOLETE #define SP      (GPR[STACK_POINTER_GPR]) */
+/* OBSOLETE #define TRACE_CALL_P (STATE_CPU (sd, 0)->trace_call_p) */
+/* OBSOLETE #define TRACE_TRAP_P (STATE_CPU (sd, 0)->trace_trap_p) */
+/* OBSOLETE #define TRACE_ACTION (STATE_CPU (sd, 0)->trace_action) */
+/* OBSOLETE #define     TRACE_ACTION_CALL	0x00000001	/* call occurred */ */
+/* OBSOLETE #define     TRACE_ACTION_RETURN	0x00000002	/* return occurred */ */
+/* OBSOLETE  */
+/* OBSOLETE #define WRITE32 (STATE_CPU (sd, 0)->write32) */
+/* OBSOLETE #define WRITE32_NUM	 (WRITE32.num) */
+/* OBSOLETE #define WRITE32_PTR(N)	 (WRITE32.ptr[N]) */
+/* OBSOLETE #define WRITE32_MASK(N)	 (WRITE32.mask[N]) */
+/* OBSOLETE #define WRITE32_VALUE(N) (WRITE32.value[N]) */
+/* OBSOLETE #define WRITE32_QUEUE(PTR, VALUE) WRITE32_QUEUE_MASK (PTR, VALUE, 0xffffffff) */
+/* OBSOLETE  */
+/* OBSOLETE #define WRITE32_QUEUE_MASK(PTR, VALUE, MASK)				\ */
+/* OBSOLETE do {									\ */
+/* OBSOLETE   int _num = WRITE32_NUM;						\ */
+/* OBSOLETE   if (_num >= MAX_WRITE32)						\ */
+/* OBSOLETE     sim_engine_abort (sd, STATE_CPU (sd, 0), cia,			\ */
+/* OBSOLETE 		      "Too many queued 32-bit writes");			\ */
+/* OBSOLETE   WRITE32_PTR(_num) = PTR;						\ */
+/* OBSOLETE   WRITE32_VALUE(_num) = VALUE;						\ */
+/* OBSOLETE   WRITE32_MASK(_num) = MASK;						\ */
+/* OBSOLETE   WRITE32_NUM = _num+1;							\ */
+/* OBSOLETE } while (0) */
+/* OBSOLETE  */
+/* OBSOLETE #define DID_TRAP	(STATE_CPU (sd, 0)->did_trap) */
+/* OBSOLETE  */
+/* OBSOLETE #define WRITE64 (STATE_CPU (sd, 0)->write64) */
+/* OBSOLETE #define WRITE64_NUM	 (WRITE64.num) */
+/* OBSOLETE #define WRITE64_PTR(N)	 (WRITE64.ptr[N]) */
+/* OBSOLETE #define WRITE64_VALUE(N) (WRITE64.value[N]) */
+/* OBSOLETE #define WRITE64_QUEUE(PTR, VALUE)					\ */
+/* OBSOLETE do {									\ */
+/* OBSOLETE   int _num = WRITE64_NUM;						\ */
+/* OBSOLETE   if (_num >= MAX_WRITE64)						\ */
+/* OBSOLETE     sim_engine_abort (sd, STATE_CPU (sd, 0), cia,			\ */
+/* OBSOLETE 		      "Too many queued 64-bit writes");			\ */
+/* OBSOLETE   WRITE64_PTR(_num) = PTR;						\ */
+/* OBSOLETE   WRITE64_VALUE(_num) = VALUE;						\ */
+/* OBSOLETE   WRITE64_NUM = _num+1;							\ */
+/* OBSOLETE } while (0) */
+/* OBSOLETE  */
+/* OBSOLETE #define DPSW_VALID	0xbf005555 */
+/* OBSOLETE #define PSW_VALID	0xb7005555 */
+/* OBSOLETE #define EIT_VALID	0xfffff000	/* From page 7-4 of D30V/MPEG arch. manual  */ */
+/* OBSOLETE #define EIT_VB_DEFAULT	0xfffff000	/* Value of the EIT_VB register after reset */ */
+/* OBSOLETE  */
+/* OBSOLETE /* Verify that the instruction is in the correct slot */ */
+/* OBSOLETE  */
+/* OBSOLETE #define IS_WRONG_SLOT is_wrong_slot(sd, cia, MY_INDEX) */
+/* OBSOLETE extern int is_wrong_slot */
+/* OBSOLETE (SIM_DESC sd, */
+/* OBSOLETE  address_word cia, */
+/* OBSOLETE  itable_index index); */
+/* OBSOLETE  */
+/* OBSOLETE #define IS_CONDITION_OK is_condition_ok(sd, cia, CCC) */
+/* OBSOLETE extern int is_condition_ok */
+/* OBSOLETE (SIM_DESC sd, */
+/* OBSOLETE  address_word cia, */
+/* OBSOLETE  int cond); */
+/* OBSOLETE  */
+/* OBSOLETE #define SIM_HAVE_BREAKPOINTS	/* Turn on internal breakpoint module */ */
+/* OBSOLETE  */
+/* OBSOLETE /* Internal breakpoint instruction is syscall 5 */ */
+/* OBSOLETE #define SIM_BREAKPOINT {0x0e, 0x00, 0x00, 0x05} */
+/* OBSOLETE #define SIM_BREAKPOINT_SIZE (4) */
+/* OBSOLETE  */
+/* OBSOLETE /* Call occurred */ */
+/* OBSOLETE extern void call_occurred */
+/* OBSOLETE (SIM_DESC sd, */
+/* OBSOLETE  sim_cpu *cpu, */
+/* OBSOLETE  address_word cia, */
+/* OBSOLETE  address_word nia); */
+/* OBSOLETE  */
+/* OBSOLETE /* Return occurred */ */
+/* OBSOLETE extern void return_occurred */
+/* OBSOLETE (SIM_DESC sd, */
+/* OBSOLETE  sim_cpu *cpu, */
+/* OBSOLETE  address_word cia, */
+/* OBSOLETE  address_word nia); */
+/* OBSOLETE  */
+/* OBSOLETE /* Whether to do call tracing.  */ */
+/* OBSOLETE extern int d30v_call_trace_p; */
+/* OBSOLETE  */
+/* OBSOLETE /* Read/write functions for system call interface.  */ */
+/* OBSOLETE extern int d30v_read_mem */
+/* OBSOLETE (host_callback *cb, */
+/* OBSOLETE  struct cb_syscall *sc, */
+/* OBSOLETE  unsigned long taddr, */
+/* OBSOLETE  char *buf, */
+/* OBSOLETE  int bytes); */
+/* OBSOLETE  */
+/* OBSOLETE extern int d30v_write_mem */
+/* OBSOLETE (host_callback *cb, */
+/* OBSOLETE  struct cb_syscall *sc, */
+/* OBSOLETE  unsigned long taddr, */
+/* OBSOLETE  const char *buf, */
+/* OBSOLETE  int bytes); */
+/* OBSOLETE  */
+/* OBSOLETE /* Process all of the queued up writes in order now */ */
+/* OBSOLETE void unqueue_writes */
+/* OBSOLETE (SIM_DESC sd, */
+/* OBSOLETE  sim_cpu *cpu, */
+/* OBSOLETE  address_word cia); */
+/* OBSOLETE  */
+/* OBSOLETE #endif /* _CPU_H_ */ */
diff --git a/sim/d30v/d30v-insns b/sim/d30v/d30v-insns
index 7b7c3c8..10ce868 100644
--- a/sim/d30v/d30v-insns
+++ b/sim/d30v/d30v-insns
@@ -1,2424 +1,2421 @@
-//  -*- C -*-
-//  Mitsubishi Electric Corp. D30V Simulator.
-//  Copyright (C) 1997, Free Software Foundation, Inc.
-//  Contributed by Cygnus Solutions Inc.
-//
-//  This file is part of 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 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.
-//
-
-
-define( _BRA,  `1.*,CCC,000')
-define( _LOGIC, `1.*,CCC,001')
-define( _IMEM, `1.*,CCC,010')
-define( _IALU1, `1.*,CCC,100')
-define(_IALU2, `1.*,CCC,101')
-
-
-
-define(_IMM6, `6.IMM_6S')
-define(_IMM12, `12.IMM_12S')
-define(_IMM18, `18.IMM_18S')
-define(_IMM32, `6.IMM_6L,*,000,8.IMM_8L,00,18.IMM_18L')
-
-
-
-// The following is called when ever an illegal instruction is
-// encountered
-::internal::illegal
-	sim_io_eprintf (sd, "illegal instruction at 0x%lx\n", (long) cia);
-	sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
-
-// The following is called when ever an instruction in the wrong
-// slot is encountered.
-::internal::wrong_slot
-	sim_io_eprintf (sd, "wrong slot at 0x%lx\n", (long) cia);
-	sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
-
-
-
-// Something illegal that can be used to contact the simulator emul
-// library.
-define(_EMUL, `1.*,CCC,111')
-
-void::function::do_emul:int imm
-	/* temp hack - later replace with real interface */
-	enum {
-	  param1 = 2, param2, param3, param4
-	};
-	switch (imm) {
-	case 0:
-	  {
-	    sim_engine_abort (SD, CPU, cia, "UNIX call emulation unsupported");
-	    break;
-	  }
-	case 1:
-	  /* Trap 1 - prints a string */
-	  {
-	    address_word str = GPR[param1];
-	    char chr;
-	    while (1) {
-	      chr = MEM (unsigned, str, 1);
-	    if (chr == '\0') break;
-	      sim_io_write_stdout (sd, &chr, sizeof chr);
-	      str++;
-	    }
-	    break;
-	  }
-	case 3:
-	  /* Trap 3 - writes a character */
-	  {
-	    char chr = GPR[param1];
-	    sim_io_write_stdout (sd, &chr, sizeof chr);
-	    break;
-	  }
-	case 4:
-	  /* Trap 4 exits with status in [param1] */
-	  {
-	    sim_engine_halt (SD, CPU, NULL, cia, sim_exited, GPR[param1]);
-	    break;
-	  }
-	case 5:
-	  /* Trap 5 breakpoints.  If the breakpoint system knows about this, it
-	     won't return.  Otherwise, we fall through to treat this as an
-	     unknown instruction.  */
-	  {
-	    sim_handle_breakpoint (SD, CPU, cia);
-	  /* Fall through to default case.*/
-	  }
-	default:
-	  sim_engine_abort (SD, CPU, cia, "Unknown monitor call %d", imm);
-	}
-
-_EMUL,00000,00,6.*,6.*,IMM_6S:EMUL:short,emul:iu,mu:EMUL
-"syscall <imm>"
-	do_emul (_SD, imm);
-_BRA,00000,00,6.**,6.**,_IMM32:BRA:long:iu,mu:EMUL long
-"syscall <imm>"
-	do_emul (_SD, imm);
-
-// ABS
-
-_IALU1,01000,00,6.RA,6.RB,6.**:IALU1:short:iu,mu:ABS
-"abs r<RA>, r<RB>"
-	WRITE32_QUEUE (Ra, abs(Rb));
-
-
-
-// ADD
-
-void::function::do_add:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	ALU_BEGIN(rb);
-	ALU_ADDC(imm);
-	ALU_END(ra);
-
-_IALU1,00000,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADD
-"add r<RA>, r<RB>, r<RC>"
-	do_add (_SD, Ra, Rb, Rc);
-_IALU1,00000,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADD imm
-"add r<RA>, r<RB>, <imm>"
-	do_add (_SD, Ra, Rb, imm);
-_IALU1,00000,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADD imm long
-"add r<RA>, r<RB>, <imm>"
-	do_add (_SD, Ra, Rb, imm);
-
-
-
-// ADD2H
-
-void::function::do_add2h:signed32 *ra, signed32 rb, signed32 imm
-	unsigned16 ah2 = VH2_4(rb) + VH2_4(imm);
-	unsigned16 al2 = VL2_4(rb) + VL2_4(imm);
-	WRITE32_QUEUE (ra, (ah2 << 16) | al2);
-
-_IALU1,00001,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADD2H
-"add2h r<RA>, r<RB>, r<RC>"
-	do_add2h (_SD, Ra, Rb, Rc);
-_IALU1,00001,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADD2H imm
-"add2h r<RA>, r<RB>, <imm>"
-	do_add2h (_SD, Ra, Rb, immHL);
-_IALU1,00001,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADD2H imm long
-"add2h r<RA>, r<RB>, <imm>"
-	do_add2h (_SD, Ra, Rb, imm);
-
-
-
-// ADDC
-
-void::function::do_addc:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	ALU_BEGIN(rb);
-	ALU_ADDC_C(imm, ALU_CARRY);
-	ALU_END(ra);
-
-_IALU1,00100,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDC
-"addc r<RA>, r<RB>, r<RC>"
-	do_addc (_SD, Ra, Rb, Rc);
-_IALU1,00100,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDC imm
-"addc r<RA>, r<RB>, <imm>"
-	do_addc (_SD, Ra, Rb, imm);
-_IALU1,00100,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDC imm long
-"addc r<RA>, r<RB>, <imm>"
-	do_addc (_SD, Ra, Rb, imm);
-
-
-
-// ADDHppp
-
-void::function::do_addh_ppp:int ppp, unsigned32 *ra, unsigned32 rb, unsigned32 src
-	switch (ppp) {
-	case 0x0: /* LLL */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_ADDC(VL2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x1: /* LLH */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_ADDC(VH2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x2: /* LHL */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_ADDC(VL2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x3: /* LHH */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_ADDC(VH2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x4: /* HLL */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_ADDC(VL2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x5: /* HLH */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_ADDC(VH2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x6: /* HHL */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_ADDC(VL2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x7: /* HHH */
-	  {	
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_ADDC(VH2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "do_addh_ppp - internal error - bad switch");
-	}
-::%s::ppp:int ppp
-	switch (ppp)
-	  {
-	  case 0x0: return "lll";
-	  case 0x1: return "llh";
-	  case 0x2: return "lhl";
-	  case 0x3: return "lhh";
-	  case 0x4: return "hll";
-	  case 0x5: return "hlh";
-	  case 0x6: return "hhl";
-	  case 0x7: return "hhh";
-	  default: return "?";
-	  }
-
-_IALU1,10,ppp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDHppp
-"addh%s<ppp> r<RA>, r<RB>, r<RC>"
-	do_addh_ppp(_SD, ppp, Ra, Rb, Rc);
-_IALU1,10,ppp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDHppp imm
-"addh%s<ppp> r<RA>, r<RB>, <imm>"
-	do_addh_ppp(_SD, ppp, Ra, Rb, immHL);
-_IALU1,10,ppp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDHppp imm long
-"addh%s<ppp> r<RA>, r<RB>, <imm>"
-	do_addh_ppp(_SD, ppp, Ra, Rb, imm);
-
-
-
-// ADDS
-
-void::function::do_adds:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	ALU_BEGIN(rb);
-	ALU_ADDC(EXTRACTED32(imm, 0, 0));
-	ALU_END(ra);
-
-_IALU1,00110,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDS
-"adds r<RA>, r<RB>, r<RC>"
-	do_adds (_SD, Ra, Rb, Rc);
-_IALU1,00110,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDS imm
-"adds r<RA>, r<RB>, <imm>"
-	do_adds (_SD, Ra, Rb, imm);
-_IALU1,00110,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDS imm long
-"adds r<RA>, r<RB>, <imm>"
-	do_adds (_SD, Ra, Rb, imm);
-
-
-
-// ADDS2H
-
-void::function::do_adds2h:unsigned32 *ra, unsigned32 rb, unsigned32 immHL
-	unsigned16 high = VH2_4(rb) + EXTRACTED32(immHL, 0, 0);
-	unsigned16 low = VL2_4(rb) + EXTRACTED32(immHL, 16, 16);
-	WRITE32_QUEUE (ra, (high << 16) | low);
-
-_IALU1,00111,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDS2H
-"adds2h r<RA>, r<RB>, r<RC>"
-	do_adds2h (_SD, Ra, Rb, Rc);
-_IALU1,00111,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDS2H imm
-"adds2h r<RA>, r<RB>, <imm>"
-	do_adds2h (_SD, Ra, Rb, immHL);
-_IALU1,00111,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDS2H imm long
-"adds2h r<RA>, r<RB>, <imm>"
-	do_adds2h (_SD, Ra, Rb, imm);
-
-
-
-// AND
-
-_LOGIC,11000,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:AND
-"and r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, Rb & Rc);
-_LOGIC,11000,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:AND imm
-"and r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb & imm);
-_LOGIC,11000,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:AND imm long
-"and r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb & imm);
-
-
-// ANDFG
-
-_LOGIC,01000,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:Logical AND Flags
-"andfg f<FA>, f<FB>, f<FC>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) & PSW_FLAG_VAL(FC));
-_LOGIC,01000,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:Logical AND Flags imm
-"andfg f<FA>, f<FB>, <imm_6>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) & (imm_6 & 1));
-
-
-
-// AVG
-
-void::function::do_avg:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	WRITE32_QUEUE (ra, ((signed64)(signed32)rb + (signed64)(signed32)imm + 1) >> 1);
-
-_IALU1,01010,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:AVG
-"avg r<RA>, r<RB>, r<RC>"
-	do_avg (_SD, Ra, Rb, Rc);
-_IALU1,01010,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:AVG imm
-"avg r<RA>, r<RB>, <imm>"
-	do_avg (_SD, Ra, Rb, imm);
-_IALU1,01010,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:AVG imm long
-"avg r<RA>, r<RB>, <imm>"
-	do_avg (_SD, Ra, Rb, imm);
-
-
-
-// AVG2H
-
-void::function::do_avg2h:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	unsigned16 high = ((signed32)(signed16)VH2_4(rb) + (signed32)(signed16)VH2_4(imm) + 1) >> 1;
-	unsigned16 low  = ((signed32)(signed16)VL2_4(rb) + (signed32)(signed16)VL2_4(imm) + 1) >> 1;
-	WRITE32_QUEUE (ra, (high << 16) | low);
-
-_IALU1,01011,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:AVG2H
-"avg2h r<RA>, r<RB>, r<RC>"
-	do_avg2h (_SD, Ra, Rb, Rc);
-_IALU1,01011,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:AVG2H imm
-"avg2h r<RA>, r<RB>, <imm>"
-	do_avg2h (_SD, Ra, Rb, immHL);
-_IALU1,01011,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:AVG2H imm long
-"avg2h r<RA>, r<RB>, <imm>"
-	do_avg2h (_SD, Ra, Rb, imm);
-
-
-
-// BCLR
-
-_LOGIC,00011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BCLR
-"bclr r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE(Ra, Rb & ~BIT32((Rc) % 32));
-_LOGIC,00011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BCLR imm
-"bclr r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE(Ra, Rb & ~BIT32((imm) % 32));
-
-
-
-// BNOT
-
-_LOGIC,00001,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BNOT
-"bnot r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, Rb ^ BIT32((Rc) % 32));
-_LOGIC,00001,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BNOT imm
-"bnot r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb ^ BIT32((imm) % 32));
-
-
-
-// BRA
-
-_BRA,00000,00,6.**,6.**,6.RC:BRA:short:mu:BRA
-"bra r<RC>"
-	nia = cia + pcdisp;
-_BRA,00000,10,_IMM18:BRA:short:mu:BRA imm
-"bra <pcdisp>"
-	nia = cia + pcdisp;
-_BRA,00000,10,6.**,6.**,_IMM32:BRA:long:mu:BRA imm long
-"bra <pcdisp>"
-	nia = cia + pcdisp;
-
-
-
-// BRATNZ
-
-_BRA,00100,01,6.RA,6.**,6.RC:BRA:short:mu:BRATNZ
-"bratnz r<RC>"
-	if (*Ra != 0)
-	  nia = cia + pcdisp;
-_BRA,00100,11,6.RA,_IMM12:BRA:short:mu:BRATNZ imm
-"bratnz <pcdisp>"
-	if (*Ra != 0)
-	  nia = cia + pcdisp;
-_BRA,00100,11,6.RA,6.**,_IMM32:BRA:long:mu:BRATNZ imm long
-"bratnz <pcdisp>"
-	if (*Ra != 0)
-	  nia = cia + pcdisp;
-
-
-
-// BRATZR
-
-_BRA,00100,00,6.RA,6.**,6.RC:BRA:short:mu:BRATZR
-"bratzr r<RC>"
-	if (val_Ra == 0)
-	  nia = cia + pcdisp;
-_BRA,00100,10,6.RA,_IMM12:BRA:short:mu:BRATZR imm
-"bratzr <pcdisp>"
-	if (val_Ra == 0)
-	  nia = cia + pcdisp;
-_BRA,00100,10,6.RA,6.**,_IMM32:BRA:long:mu:BRATZR imm long
-"bratzr <pcdisp>"
-	if (val_Ra == 0)
-	  nia = cia + pcdisp;
-
-
-
-// BSET
-
-_LOGIC,00010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BSET
-"bset r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, Rb | BIT32((Rc) % 32));
-_LOGIC,00010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BSET imm
-"bset r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb | BIT32((imm) % 32));
-
-
-
-// BSR
-
-_BRA,00010,00,6.**,6.**,6.RC:BRA:short:mu:BSR
-"bsr r<RC>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	nia = cia + pcdisp;
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-_BRA,00010,10,_IMM18:BRA:short:mu:BSR imm
-"bsr <pcdisp>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	nia = cia + pcdisp;
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-_BRA,00010,10,6.**,6.**,_IMM32:BRA:long:mu:BSR imm long
-"bsr <pcdisp>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	nia = cia + pcdisp;
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-
-
-// BSRTNZ
-
-_BRA,00110,01,6.RA,6.**,6.RC:BRA:short:mu:BSRTNZ
-"bsrtnz r<RC>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-_BRA,00110,11,6.RA,_IMM12:BRA:short:mu:BSRTNZ imm
-"bsrtnz <pcdisp>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-_BRA,00110,11,6.RA,6.**,_IMM32:BRA:long:mu:BSRTNZ imm long
-"bsrtnz <pcdisp>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-
-// BSRTZR
-
-_BRA,00110,00,6.RA,6.**,6.RC:BRA:short:mu:BSRTZR
-"bsrtzr r<RC>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-_BRA,00110,10,6.RA,_IMM12:BRA:short:mu:BSRTZR imm
-"bsrtzr <pcdisp>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-_BRA,00110,10,6.RA,6.**,_IMM32:BRA:long:mu:BSRTZR imm long
-"bsrtzr <pcdisp>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = cia + pcdisp;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-
-// BTST
-
-_LOGIC,00000,00,***,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:BTST
-"btst f<FA>, r<RB>, r<RC>"
-	int bit = (Rc) % 32;
-	PSW_FLAG_SET_QUEUE(FA, MASKED32(Rb, bit, bit));
-_LOGIC,00000,10,***,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:BTST imm
-"btst f<FA>, r<RB>, <imm>"
-	int bit = imm % 32;
-	PSW_FLAG_SET_QUEUE(FA, MASKED32(Rb, bit, bit));
-
-
-
-// CMPcc
-
-void::function::do_cmp_cc:int cc, int fa, signed32 rb, signed32 rc
-	int value = 0;
-	switch (cc) {
-	case 0: /* EQ */
-	  value = (rb == rc);
-	  break;
-	case 1: /* NE */
-	  value = (rb != rc);
-	  break;
-	case 2: /* GT */
-	  value = (rb > rc);
-	  break;
-	case 3: /* GE */
-	  value = (rb >= rc);
-	  break;
-	case 4: /* LT */
-	  value = (rb < rc);
-	  break;
-	case 5: /* LE */
-	  value = (rb <= rc);
-	  break;
-	case 6: /* PS */
-	  value = ((rb >= 0) && (rc >= 0));
-	  break;
-	case 7: /* NG */
-	  value = ((rb < 0) && (rc < 0));
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "do_cmp_cc - internal error - bad switch (%d)", cc);
-	}
-	PSW_FLAG_SET_QUEUE(fa, value);
-
-::%s::ccc:int ccc
-	switch (ccc)
-	  {
-	  case 0: return "eq";
-	  case 1: return "ne";
-	  case 2: return "gt";
-	  case 3: return "ge";
-	  case 4: return "lt";
-	  case 5: return "le";
-	  case 6: return "ps";
-	  case 7: return "ng";
-	  default: return "?";
-	  }
-
-_LOGIC,01100,00,ccc,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:CMPcc
-"cmp%s<ccc> f<FA>, r<RB>, r<RC>"
-	do_cmp_cc(_SD, ccc, FA, Rb, Rc);
-_LOGIC,01100,10,ccc,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:CMPcc imm
-"cmp%s<ccc> f<FA>, r<RB>, <imm>"
-	do_cmp_cc(_SD, ccc, FA, Rb, imm);
-_LOGIC,01100,10,ccc,3.FA,6.RB,_IMM32:LOGIC:long:iu,mu:CMPcc imm long
-"cmp%s<ccc> f<FA>, r<RB>, <imm>"
-	do_cmp_cc(_SD, ccc, FA, Rb, imm);
-
-
-
-// CMPUcc
-
-void::function::do_cmpu_cc:int cc, int fa, unsigned32 rb, unsigned32 rc
-	int value = 0;
-	switch (cc) {
-	case 2: /* GT */
-	  value = (rb > rc);
-	  break;
-	case 3: /* GE */
-	  value = (rb >= rc);
-	  break;
-	case 4: /* LT */
-	  value = (rb < rc);
-	  break;
-	case 5: /* LE */
-	  value = (rb <= rc);
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "do_cmpu_cc - internal error - bad switch (%d)", cc);
-	}
-	PSW_FLAG_SET_QUEUE(fa, value);
-
-_LOGIC,01101,00,ccc,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:CMPUcc
-"cmpu%s<ccc> f<FA>, r<RB>, r<RC>"
-	do_cmpu_cc(_SD, ccc, FA, Rb, Rc);
-_LOGIC,01101,10,ccc,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:CMPUcc imm
-"cmpu%s<ccc> f<FA>, r<RB>, <imm>"
-	do_cmpu_cc(_SD, ccc, FA, Rb, imm_6u);
-_LOGIC,01101,10,ccc,3.FA,6.RB,_IMM32:LOGIC:long:iu,mu:CMPUcc imm long
-"cmpu%s<ccc> f<FA>, r<RB>, <imm>"
-	do_cmpu_cc(_SD, ccc, FA, Rb, imm);
-
-
-
-// DBRA
-
-void::function::do_dbra:address_word pcdisp, unsigned32 ra
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
-
-_BRA,10000,00,6.RA,6.**,6.RC:BRA:short:mu:DBRA
-"dbra r<RA>, r<RC>"
-	do_dbra(_SD, pcdisp, val_Ra);
-_BRA,10000,10,6.RA,_IMM12:BRA:short:mu:DBRA imm
-"dbra r<RA>, <pcdisp>"
-	do_dbra(_SD, pcdisp, val_Ra);
-_BRA,10000,10,6.RA,6.**,_IMM32:BRA:long:mu:DBRA imm long
-"dbra r<RA>, <pcdisp>"
-	do_dbra(_SD, pcdisp, val_Ra);
-
-
-
-// DBRAI
-
-void::function::do_dbrai:address_word pcdisp, unsigned32 imm
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
-
-_BRA,10100,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DBRAI
-"dbrai <IMM_6>, r<RC>"
-	do_dbrai(_SD, pcdisp, IMM_6);
-_BRA,10100,10,6.IMM_6,_IMM12:BRA:short:mu:DBRAI imm
-"dbrai <IMM_6>, <pcdisp>"
-	do_dbrai(_SD, pcdisp, IMM_6);
-_BRA,10100,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DBRAI imm long
-"dbrai <IMM_6>, <pcdisp>"
-	do_dbrai(_SD, pcdisp, IMM_6);
-
-
-
-// DBSR
-
-void::function::do_dbsr:address_word pcdisp, unsigned32 ra
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + ra);
-	WRITE32_QUEUE (&GPR[62], cia + ra + 8);
-
-_BRA,10010,00,6.RA,6.**,6.RC:BRA:short:mu:DBSR
-"dbsr r<RA>, r<RC>"
-	do_dbsr(_SD, pcdisp, val_Ra);
-_BRA,10010,10,6.RA,_IMM12:BRA:short:mu:DBSR imm
-"dbsr r<RA>, <pcdisp>"
-	do_dbsr(_SD, pcdisp, val_Ra);
-_BRA,10010,10,6.RA,6.**,_IMM32:BRA:long:mu:DBSR imm long
-"dbsr r<RA>, <pcdisp>"
-	do_dbsr(_SD, pcdisp, val_Ra);
-
-
-
-// DBSRI
-
-void::function::do_dbsri:address_word pcdisp, unsigned32 imm
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
-	WRITE32_QUEUE (&GPR[62], cia + (imm << 3) + 8);
-
-_BRA,10110,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DBSRI
-"dbsri <IMM_6>, r<RC>"
-	do_dbsri(_SD, pcdisp, IMM_6);
-_BRA,10110,10,6.IMM_6,_IMM12:BRA:short:mu:DBSRI imm
-"dbsri <IMM_6>, <pcdisp>"
-	do_dbsri(_SD, pcdisp, IMM_6);
-_BRA,10110,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DBSRI imm long
-"dbsri <IMM_6>, <pcdisp>"
-	do_dbsri(_SD, pcdisp, IMM_6);
-
-
-
-// DBT
-
-
-_BRA,01011,00,6.**,6.**,6.**:BRA:short:mu:DBT
-"dbt"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  {
-	    WRITE32_QUEUE (&DPC, RPT_S);
-	    if (RPT_C == 0)
-	      PSW_SET (PSW_RP, 0);
-	  }
-	else
-	  WRITE32_QUEUE (&DPC, cia + 8);
-	DID_TRAP = 2;
-	nia = 0xfffff120; /* debug_trap_address */
-
-// DJMP
-
-void::function::do_djmp:address_word pcdisp, unsigned32 ra
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
-
-_BRA,10001,00,6.RA,6.**,6.RC:BRA:short:mu:DJMP
-"djmp r<RA>, r<RC>"
-	do_djmp(_SD, pcdisp, val_Ra);
-_BRA,10001,10,6.RA,_IMM12:BRA:short:mu:DJMP imm
-"djmp r<RA>, <pcdisp>"
-	do_djmp(_SD, pcdisp, val_Ra);
-_BRA,10001,10,6.RA,6.**,_IMM32:BRA:long:mu:DJMP imm long
-"djmp r<RA>, <pcdisp>"
-	do_djmp(_SD, pcdisp, val_Ra);
-
-
-
-// DJMPI
-
-void::function::do_djmpi:address_word pcdisp, unsigned32 imm
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
-
-_BRA,10101,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DJMPI
-"djmpi <IMM_6>, r<RC>"
-	do_djmpi(_SD, pcdisp, IMM_6);
-_BRA,10101,10,6.IMM_6,_IMM12:BRA:short:mu:DJMPI imm
-"djmpi <IMM_6>, <pcdisp>"
-	do_djmpi(_SD, pcdisp, IMM_6);
-_BRA,10101,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DJMPI imm long
-"djmpi <IMM_6>, <pcdisp>"
-	do_djmpi(_SD, pcdisp, IMM_6);
-
-
-
-// DJSR
-
-void::function::do_djsr:address_word pcdisp, unsigned32 ra
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
-	WRITE32_QUEUE (&GPR[62], cia + (ra & ~0x7) + 8);
-
-_BRA,10011,00,6.RA,6.**,6.RC:BRA:short:mu:DJSR
-"djsr r<RA>, r<RC>"
-	do_djsr(_SD, pcdisp, val_Ra);
-_BRA,10011,10,6.RA,_IMM12:BRA:short:mu:DJSR imm
-"djsr r<RA>, <pcdisp>"
-	do_djsr(_SD, pcdisp, val_Ra);
-_BRA,10011,10,6.RA,6.**,_IMM32:BRA:long:mu:DJSR imm long
-"djsr r<RA>, <pcdisp>"
-	do_djsr(_SD, pcdisp, val_Ra);
-
-
-
-// DJSRI
-
-void::function::do_djsri:address_word pcdisp, unsigned32 imm
-	PSW_SET_QUEUE (PSW_RP, 1);
-	WRITE32_QUEUE (&RPT_C, 1);
-	WRITE32_QUEUE (&RPT_S, pcdisp);
-	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
-	WRITE32_QUEUE (&GPR[62], cia + (imm << 3) + 8);
-
-_BRA,10111,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DJSRI
-"djsri <IMM_6>, r<RC>"
-	do_djsri(_SD, pcdisp, IMM_6);
-_BRA,10111,10,6.IMM_6,_IMM12:BRA:short:mu:DJSRI imm
-"djsri <IMM_6>, <pcdisp>"
-	do_djsri(_SD, pcdisp, IMM_6);
-_BRA,10111,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DJSRI imm long
-"djsri <IMM_6>, <pcdisp>"
-	do_djsri(_SD, pcdisp, IMM_6);
-
-
-
-// JMP
-
-_BRA,00001,00,6.**,6.**,6.RC:BRA:short:mu:JMP
-"jmp r<RC>"
-	nia = pcaddr;
-	if (RC == 62 && TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_RETURN;
-_BRA,00001,10,_IMM18:BRA:short:mu:JMP imm
-"jmp <pcdisp>"
-	nia = pcaddr;
-_BRA,00001,10,6.**,6.**,_IMM32:BRA:long:mu:JMP imm long
-"jmp <pcdisp>"
-	nia = pcaddr;
-
-
-
-// JMPTNZ
-
-_BRA,00101,01,6.RA,6.**,6.RC:BRA:short:mu:JMPTNZ
-"jmptnz r<RC>"
-	if (val_Ra != 0)
-	  nia = pcaddr;
-_BRA,00101,11,6.RA,_IMM12:BRA:short:mu:JMPTNZ imm
-"jmptnz <pcdisp>"
-	if (val_Ra != 0)
-	  nia = pcaddr;
-_BRA,00101,11,6.RA,6.**,_IMM32:BRA:long:mu:JMPTNZ imm long
-"jmptnz <pcdisp>"
-	if (val_Ra != 0)
-	  nia = pcaddr;
-
-
-
-// JMPTZR
-
-_BRA,00101,00,6.RA,6.**,6.RC:BRA:short:mu:JMPTZR
-"jmptzr r<RC>"
-	if (val_Ra == 0)
-	  nia = pcaddr;
-_BRA,00101,10,6.RA,_IMM12:BRA:short:mu:JMPTZR imm
-"jmptzr <pcdisp>"
-	if (val_Ra == 0)
-	  nia = pcaddr;
-_BRA,00101,10,6.RA,6.**,_IMM32:BRA:long:mu:JMPTZR imm long
-"jmptzr <pcdisp>"
-	if (val_Ra == 0)
-	  nia = pcaddr;
-
-
-
-// JOINpp 
-
-void::function::do_join_pp:int pp, unsigned32 *ra, unsigned32 rb, unsigned32 src
-	switch (pp) {
-	case 0x0: /* LL */
-	  WRITE32_QUEUE (ra, ((unsigned32)VL2_4(rb) << 16) | VL2_4(src));
-	  break;
-	case 0x1: /* LH */
-	  WRITE32_QUEUE (ra, ((unsigned32)VL2_4(rb) << 16) | VH2_4(src));
-	  break;
-	case 0x2: /* HL */
-	  WRITE32_QUEUE (ra, ((unsigned32)VH2_4(rb) << 16) | VL2_4(src));
-	  break;
-	case 0x3: /* HH */
-	  WRITE32_QUEUE (ra, ((unsigned32)VH2_4(rb) << 16) | VH2_4(src));
-	  break;
-	}
-
-::%s::pp:int pp
-	switch (pp)
-	  {
-	  case 0x0: return "ll";
-	  case 0x1: return "lh";
-	  case 0x2: return "hl";
-	  case 0x3: return "hh";
-	  default: return "?";
-	  }
-
-_IALU1,011,pp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:JOINpp
-"join%s<pp> r<RA>, r<RB>, r<RC>"
-	do_join_pp(_SD, pp, Ra, Rb, Rc);
-_IALU1,011,pp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:JOINpp imm
-"join%s<pp> r<RA>, r<RB>, <imm>"
-	do_join_pp(_SD, pp, Ra, Rb, immHL);
-_IALU1,011,pp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:JOINpp imm long
-"join%s<pp> r<RA>, r<RB>, <imm>"
-	do_join_pp(_SD, pp, Ra, Rb, immHL);
-
-
-
-// JSR
-
-_BRA,00011,00,6.**,6.**,6.RC:BRA:short:mu:JSR
-"jsr r<RC>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-	return pcaddr;
-_BRA,00011,10,_IMM18:BRA:short:mu:JSR imm
-"jsr <pcdisp>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-	return pcaddr;
-_BRA,00011,10,6.**,6.**,_IMM32:BRA:long:mu:JSR imm long
-"jsr <pcdisp>"
-	if (cia == RPT_E && PSW_VAL (PSW_RP))
-	  WRITE32_QUEUE (&GPR[62], RPT_S);
-	else
-	  WRITE32_QUEUE (&GPR[62], cia + 8);
-	if (TRACE_CALL_P)
-	  TRACE_ACTION |= TRACE_ACTION_CALL;
-	return pcaddr;
-
-
-// JSRTNZ
-
-_BRA,00111,01,6.RA,6.**,6.RC:BRA:short:mu:JSRTNZ
-"jsrtnz r<RC>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-_BRA,00111,11,6.RA,_IMM12:BRA:short:mu:JSRTNZ imm
-"jsrtnz <pcdisp>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-_BRA,00111,11,6.RA,6.**,_IMM32:BRA:long:mu:JSRTNZ imm long
-"jsrtnz <pcdisp>"
-	if (val_Ra != 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-
-
-// JSRTZR
-
-_BRA,00111,00,6.RA,6.**,6.RC:BRA:short:mu:JSRTZR
-"jsrtzr r<RC>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-_BRA,00111,10,6.RA,_IMM12:BRA:short:mu:JSRTZR imm
-"jsrtzr <pcdisp>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-_BRA,00111,10,6.RA,6.**,_IMM32:BRA:long:mu:JSRTZR imm long
-"jsrtzr <pcdisp>"
-	if (val_Ra == 0) {
-	  if (cia == RPT_E && PSW_VAL (PSW_RP))
-	    WRITE32_QUEUE (&GPR[62], RPT_S);
-	  else
-	    WRITE32_QUEUE (&GPR[62], cia + 8);
-	  nia = pcaddr;
-	  if (TRACE_CALL_P)
-	    TRACE_ACTION |= TRACE_ACTION_CALL;
-	}
-
-
-
-// Post increment
-
-void::function::do_incr:int x, unsigned32 *rb, int delta
-	unsigned32 next_rb;
-	if (x == 1)
-	  next_rb = *rb + delta;
-	else if (x == 3)
-	  next_rb = *rb - delta;
-	else
-	  next_rb = *rb; /* value not used */
-	/* HW erratum: check value after incrementing */
-	if (next_rb == MOD_E
-	    && (x == 1 || x == 3)
-	    && (PSW_VAL(PSW_MD))) {
-	  WRITE32_QUEUE (rb, MOD_S);
-	}
-	else if (x == 1 || x == 3)
-	  WRITE32_QUEUE (rb, next_rb);
-
-// LD2H
-
-int::function::make_even_reg:int reg, const char *name
-	if (reg & 1)
-	  sim_engine_abort (SD, CPU, cia,
-			    "0x%lx:%s odd register (r%d) used in multi-word load/mulx2h",
-			    (long) cia, name, reg);
-	return reg;
-
-void::function::do_ld2h:int ra, unsigned32 rb, unsigned32 src
-	signed32 mem;
-	ra = make_even_reg(_SD, ra, "LD2H");
-	mem = MEM(signed, rb + src, 4);
-	if (ra != 0)
-	{
-	  WRITE32_QUEUE (&GPR[ra + 0], SEXT32(EXTRACTED32(mem, 0, 15), 16));
-	  WRITE32_QUEUE (&GPR[ra + 1], SEXT32(EXTRACTED32(mem, 16, 31), 16));
-	}
-
-::%s::XX:int XX
-	switch (XX)
-	  {
-	  case 0: return "";
-	  case 1: return "+";
-	  case 3: return "-";
-	  default: return "?";
-	  }
-
-_IMEM,00011,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD2H
-"ld2h r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ld2h r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ld2h(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,00011,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD2H long
-"ld2h r<RA>, @(r<RB>, <imm>)"
-	do_ld2h(_SD, RA, Rb, imm);
-
-
-
-// LD2W
-
-void::function::do_ld2w:int ra, unsigned32 rb, unsigned32 src
-	unsigned64 mem;
-	ra = make_even_reg(_SD, ra, "LD2W");
-	mem = MEM(unsigned, rb + src, 8);
-	if (ra != 0)
-	{
-	  WRITE32_QUEUE (&GPR[ra + 0], EXTRACTED64 (mem, 0, 31));
-	  WRITE32_QUEUE (&GPR[ra + 1], EXTRACTED64 (mem, 32, 63));
-	}
-
-_IMEM,00110,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:L2W
-"ld2w r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ld2w r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ld2w(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 8);
-_IMEM,00110,10,6.RA,6.RB,_IMM32:IMEM:long:mu:L2W long
-"ld2w r<RA>, @(r<RB>, <imm>)"
-	do_ld2w(_SD, RA, Rb, imm);
-
-
-
-// LD4BH
-
-void::function::do_ld4bh:unsigned32 ra, unsigned32 rb, unsigned32 src
-	unsigned16 l1, l2, h1, h2;
-	unsigned32 mem;
-	ra = make_even_reg(_SD, ra, "LD4BH");
-	mem = MEM(unsigned, rb + src, 4);
-	h1 = SEXT16(EXTRACTED32(mem, 0, 7), 8);
-	l1 = SEXT16(EXTRACTED32(mem, 8, 15), 8);
-	h2 = SEXT16(EXTRACTED32(mem, 16, 23), 8);
-	l2 = SEXT16(EXTRACTED32(mem, 24, 31), 8);
-	if (ra != 0)
-	{
-	  WRITE32_QUEUE (&GPR[ra + 0], (h1 << 16) | l1);
-	  WRITE32_QUEUE (&GPR[ra + 1], (h2 << 16) | l2);
-	}
-
-_IMEM,00101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD4BH
-"ld4bh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ld4bh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ld4bh(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,00101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD4BH long
-"ld4bh r<RA>, @(r<RB>, <imm>)"
-	do_ld4bh(_SD, RA, Rb, imm);
-
-
-
-// LD4BHU
-
-void::function::do_ld4bhu:unsigned32 ra, unsigned32 rb, unsigned32 src
-	unsigned16 l1, l2, h1, h2;
-	unsigned32 mem;
-	ra = make_even_reg(_SD, ra, "LD4BH");
-	mem = MEM(signed, rb + src, 4);
-	h1 = EXTRACTED32(mem, 0, 7);
-	l1 = EXTRACTED32(mem, 8, 15);
-	h2 = EXTRACTED32(mem, 16, 23);
-	l2 = EXTRACTED32(mem, 24, 31);
-	if (ra != 0)
-	{
-	  WRITE32_QUEUE (&GPR[ra + 0], (h1 << 16) | l1);
-	  WRITE32_QUEUE (&GPR[ra + 1], (h2 << 16) | l2);
-	}
-
-_IMEM,01101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD4BHU
-"ld4hbu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ld4hbu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ld4bhu(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,01101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD4BHU long
-"ld4hbu r<RA>, @(r<RB>, <imm>)"
-	do_ld4bhu(_SD, RA, Rb, imm);
-
-
-
-// LDB
-
-void::function::do_ldb:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(signed, rb + src, 1));
-
-_IMEM,00000,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDB
-"ldb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldb(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 1);
-_IMEM,00000,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDB long
-"ldb r<RA>, @(r<RB>, <imm>)"
-	do_ldb(_SD, Ra, Rb, imm);
-
-
-
-// LDBU
-
-void::function::do_ldbu:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(unsigned, rb + src, 1));
-
-_IMEM,01001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDBU
-"ldbu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldbu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldbu(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 1);
-_IMEM,01001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDBU long
-"ldbu r<RA>, @(r<RB>, <imm>)"
-	do_ldbu(_SD, Ra, Rb, imm);
-
-
-
-// LDH
-
-void::function::do_ldh:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(signed, rb + src, 2));
-
-_IMEM,00010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDH
-"ldh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldh(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 2);
-_IMEM,00010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDH long
-"ldh r<RA>, @(r<RB>, <imm>)"
-	do_ldh(_SD, Ra, Rb, imm);
-
-
-
-// LDHH
-
-void::function::do_ldhh:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(signed, rb + src, 2) << 16);
-
-_IMEM,00001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDHH
-"ldhh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldhh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldhh(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 2);
-_IMEM,00001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDHH long
-"ldhh r<RA>, @(r<RB>, <imm>)"
-	do_ldhh(_SD, Ra, Rb, imm);
-
-
-
-// LDHU
-
-void::function::do_ldhu:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(unsigned, rb + src, 2));
-
-_IMEM,01010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDHU
-"ldhu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldhu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldhu(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 2);
-_IMEM,01010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDHU long
-"ldhu r<RA>, @(r<RB>, <imm>)"
-	do_ldhu(_SD, Ra, Rb, imm);
-
-
-
-// LDW
-
-void::function::do_ldw:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, MEM(signed, rb + src, 4));
-
-_IMEM,00100,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDW
-"ldw r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"ldw r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_ldw(_SD, Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,00100,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDW long
-"ldw r<RA>, @(r<RB>, <imm>)"
-	do_ldw(_SD, Ra, Rb, imm);
-
-
-
-// MACa
-
-void::function::do_mac:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
-	unsigned64 accum = *aa;
-	accum += (signed64) (rb) * (signed64) (src);
-	WRITE64_QUEUE (aa, accum);
-	WRITE32_QUEUE (ra, EXTRACTED64(accum, 32, 63));
-
-_IALU2,10100,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MACa
-"mac<AA> r<RA>, r<RB>, r<RC>"
-	do_mac(_SD, Aa, Ra, Rb, Rc);	
-_IALU2,10100,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MACa imm
-"mac<AA> r<RA>, r<RB>, <imm>"
-	do_mac(_SD, Aa, Ra, Rb, imm);
-
-
-
-// MACSa
-
-void::function::do_macs:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
-	unsigned64 accum = *aa;
-	accum += ((signed64) (rb) * (signed64) (src)) << 1;
-	WRITE64_QUEUE (aa, accum);
-	WRITE32_QUEUE (ra, EXTRACTED64(accum, 0, 31));
-
-_IALU2,10101,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MACSa
-"macs<AA> r<RA>, r<RB>, r<RC>"
-	do_macs(_SD, Aa, Ra, Rb, Rc);	
-_IALU2,10101,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MACSa imm
-"macs<AA> r<RA>, r<RB>, <imm>"
-	do_macs(_SD, Aa, Ra, Rb, imm);
-
-
-
-// MODDEC | MODINC
-
-_IMEM,00111,11,6.**,6.RB,_IMM6:IMEM:short:mu:MODDEC
-"moddec r<RB>, <imm>"
-	do_incr(_SD, 3/*0b11*/, &GPR[RB], imm_5);	
-_IMEM,00111,01,6.**,6.RB,_IMM6:IMEM:short:mu:MODINC
-"modinc r<RB>, <imm>"
-	do_incr(_SD, 1/*0b01*/, &GPR[RB], imm_5);	
-
-
-
-// MSUBa
-
-void::function::do_msub:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
-	unsigned64 accum = *aa;
-	accum -= (signed64) (rb) * (signed64) (src);
-	WRITE64_QUEUE (aa, accum);
-	WRITE32_QUEUE (ra, EXTRACTED64(accum, 32, 63));
-
-_IALU2,10110,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MSUBa
-"msub<AA> r<RA>, r<RB>, r<RC>"
-	do_msub(_SD, Aa, Ra, Rb, Rc);	
-_IALU2,10110,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MSUBa imm
-"msub<AA> r<RA>, r<RB>, <imm>"
-	do_msub(_SD, Aa, Ra, Rb, imm);
-
-
-
-// MSUBSa
-
-void::function::do_msubs:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
-	unsigned64 accum = *aa;
-	accum -= ((signed64) (rb) * (signed64) (src)) << 1;
-	WRITE64_QUEUE (aa, accum);
-	WRITE32_QUEUE (ra, EXTRACTED64(accum, 0, 31));
-
-_IALU2,10111,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MSUBSa
-"msubs<AA> r<RA>, r<RB>, r<RC>"
-	do_msubs(_SD, Aa, Ra, Rb, Rc);	
-_IALU2,10111,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MSUBSa imm
-"msubs<AA> r<RA>, r<RB>, <imm>"
-	do_msubs(_SD, Aa, Ra, Rb, imm);
-
-
-
-// MUL
-
-void::function::do_mul:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	WRITE32_QUEUE (ra, rb * src);
-
-_IALU2,10000,00,6.RA,6.RB,6.RC:IALU2:short:iu:MUL
-"mul r<RA>, r<RB>, r<RC>"
-	do_mul(_SD, Ra, Rb, Rc);	
-_IALU2,10000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MUL imm
-"mul r<RA>, r<RB>, <imm>"
-	do_mul(_SD, Ra, Rb, imm);
-
-
-
-// MUL2H
-
-void::function::do_mul2h:unsigned32 *ra, unsigned32 rb, unsigned32 src
-	unsigned16 high = VH2_4(rb) * VH2_4(src);
-	unsigned16 low  = VL2_4(rb) * VL2_4(src);
-	WRITE32_QUEUE (ra, (high << 16) | low);
-
-_IALU2,00000,00,6.RA,6.RB,6.RC:IALU2:short:iu:MUL2H
-"mul2h r<RA>, r<RB>, r<RC>"
-	do_mul2h(_SD, Ra, Rb, Rc);	
-_IALU2,00000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MUL2H imm
-"mul2h r<RA>, r<RB>, <imm>"
-	do_mul2h(_SD, Ra, Rb, immHL);
-
-
-
-// MULX
-
-void::function::do_mulx:unsigned64 *aa, signed32 rb, signed32 src
-	WRITE64_QUEUE (aa, (signed64) (rb) * (signed64) (src));
-
-_IALU2,11000,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MULX
-"mulx a<AA>, r<RB>, r<RC>"
-	do_mulx(_SD, Aa, Rb, Rc);	
-_IALU2,11000,10,5.*,1.AA,6.RB,_IMM6:IALU2:short:iu:MULX imm
-"mulx a<AA>, r<RB>, <imm>"
-	do_mulx(_SD, Aa, Rb, imm);
-
-
-// MULX2H
-
-void::function::do_mulx2h:int ra, signed32 rb, signed32 src, int high
-	signed32 result = rb * src;
-	if (!high)
-	  {
-	    ra = make_even_reg(_SD, ra, "MULX2H");
-	    if (ra != 0)
-	      WRITE32_QUEUE (&GPR[ra+1], result);
-	  }
-	else if (ra != 0)
-	  {
-	      WRITE32_QUEUE (&GPR[ra+0], result);
-	  }
-
-_IALU2,00001,00,6.RA,6.RB,6.RC:IALU2:short:iu:MULX2H
-"mul2h r<RA>, r<RB>, r<RC>"
-	do_mulx2h(_SD, RA, RbH, RcH, 1);
-	do_mulx2h(_SD, RA, RbL, RcL, 0);
-_IALU2,00001,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MULX2H imm
-"mul2h r<RA>, r<RB>, <imm>"
-	do_mulx2h(_SD, RA, RbH, imm, 1);
-	do_mulx2h(_SD, RA, RbL, imm, 0);
-
-// MULHXpp
-
-void::function::do_mulhx:int pp, unsigned32 *ra, unsigned32 rb, unsigned32 src
-	signed32 value = 0;
-	switch (pp) {
-	case 0: /* LL */
-	  value = SEXT32(VL2_4(rb), 16) * SEXT32(VL2_4(src), 16);
-	  break;
-	case 1: /* LH */
-	  value = SEXT32(VL2_4(rb), 16) * SEXT32(VH2_4(src), 16);
-	  break;
-	case 2: /* HL */
-	  value = SEXT32(VH2_4(rb), 16) * SEXT32(VL2_4(src), 16);
-	  break;
-	case 3: /* HH */
-	  value = SEXT32(VH2_4(rb), 16) * SEXT32(VH2_4(src), 16);
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "do_mulhx - internal error - bad switch");
-	}
-	WRITE32_QUEUE (ra, value);
-
-_IALU2,001,pp,00,6.RA,6.RB,6.RC:IALU2:short:iu:MULHXpp
-"mulhx%s<pp> r<RA>, r<RB>, r<RC>"
-	do_mulhx(_SD, pp, Ra, Rb, Rc);	
-_IALU2,001,pp,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MULHXpp imm
-"mulhx%s<pp> r<RA>, r<RB>, <imm>"
-	do_mulhx(_SD, pp, Ra, Rb, immHL);
-
-
-
-// MULXS
-
-void::function::do_mulxs:unsigned64 *aa, signed32 rb, signed32 src
-	WRITE64_QUEUE (aa, ((signed64) (rb) * (signed64) (src)) << 1);
-
-_IALU2,11001,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MULXS
-"mulxs a<AA>, r<RB>, r<RC>"
-	do_mulxs(_SD, Aa, Rb, Rc);	
-_IALU2,11001,10,5.*,1.AA,6.RB,_IMM6:IALU2:short:iu:MULXS imm
-"mulxs a<AA>, r<RB>, <imm>"
-	do_mulxs(_SD, Aa, Rb, imm);
-
-
-
-// MVFACC
-
-void::function::do_mvfacc:unsigned32 *ra, unsigned64 ab, unsigned32 src
-	while (src > 63) src -= 64;
-	WRITE32_QUEUE (ra, ((signed64)ab) >> src);
-
-_IALU2,11111,00,6.RA,5.*,1.AB,6.RC:IALU2:short:iu:MVFACC
-"mvfacc r<RA>, a<AB>, r<RC>"
-	do_mvfacc(_SD, Ra, *Ab, Rc);	
-_IALU2,11111,10,6.RA,5.*,1.AB,_IMM6:IALU2:short:iu:MVFACC imm
-"mvfacc r<RA>, a<AB>, <imm>"
-	do_mvfacc(_SD, Ra, *Ab, imm_6u);
-
-
-
-// MVFSYS
-
-_BRA,11110,00,6.RA,6.CR,6.ID:BRA:short:mu:MVFSYS
-"mvfsys r<RA>, cr<CR>"
-	switch (ID) {
-	case 0:
-	  if (CR >= NR_CONTROL_REGISTERS)
-	    sim_engine_abort (SD, CPU, cia, "FIXME - illegal CR");
-	  else
-	    WRITE32_QUEUE (Ra, (CPU)->regs.control[CR]);
-	  break;
-	case 1:
-	  WRITE32_QUEUE (Ra, PSWL);
-	  break;
-	case 2:
-	  WRITE32_QUEUE (Ra, EXTRACTED32(PSWH, 16, 31));
-	  break;
-	case 3:
-	  WRITE32_QUEUE (Ra, PSW_FLAG_VAL(CR));
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "FIXME - illegal ID");
-	}
-
-
-
-// MVTACC
-
-_IALU2,01111,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MVTACC
-"mvtacc a<AA>, r<RB>, r<RC>"
-	WRITE64_QUEUE (Aa, INSERTED64(RbU, 0, 31) | (RcU));
-
-
-
-// MVTSYS
-
-_BRA,01110,00,6.CR,6.RB,6.ID:BRA:short:mu:MVTSYS
-"mvtsys cr<CR>, r<RB>"
-	switch (ID) {
-	case 0:			/* control register */
-	  if (CR >= NR_CONTROL_REGISTERS)
-	    sim_engine_abort (SD, CPU, cia, "FIXME - illegal CR");
-	  else
-	    {
-	      unsigned32 value = Rb;
-	      CPU->mvtsys_left_p = 1;
-	      if (CR == processor_status_word_cr)
-		{
-		  unsigned32 ds = PSW & BIT32 (PSW_DS);	/* preserve ds */
-		  value = ds | (value & PSW_VALID);
-		}
-	      else if (CR == backup_processor_status_word_cr
-		       || CR == debug_backup_processor_status_word_cr)
-		value &= DPSW_VALID;
-	      else if (CR == eit_vector_base_cr)
-		value &= EIT_VALID;
-	      WRITE32_QUEUE (&(CPU)->regs.control[CR], value);
-	    }
-	  break;
-	case 1:			/* PSWL */
-	  WRITE32_QUEUE_MASK (&PSW, EXTRACTED32(Rb, 16, 31),
-			      PSW_VALID & 0x0000ffff);
-	  break;
-	case 2:			/* PSWH */
-	  {
-	    unsigned32 ds = PSW & BIT32 (PSW_DS);	/* preserve ds */
-	    WRITE32_QUEUE_MASK (&PSW, (EXTRACTED32(Rb, 16, 31) << 16) | ds,
-				(PSW_VALID | ds) & 0xffff0000);
-	  }
-	  break;
-	case 3:			/* FLAG */
-	  PSW_FLAG_SET_QUEUE(CR, Rb & 1);
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "FIXME - illegal ID");
-	}
-
-
-
-// NOP
-
-_BRA,01111,00,6.**,6.**,6.**:BRA:short:iu,mu:NOP
-"nop"
-	/* NOP */;
-
-
-// NOT
-
-_LOGIC,11001,00,6.RA,6.RB,6.*:LOGIC:short:iu,mu:NOT
-"not r<RA>, r<RB>"
-	WRITE32_QUEUE (Ra, ~Rb);
-
-
-
-// NOTFG
-
-_LOGIC,01001,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:NOTFG
-"notfg f<FA>, f<FB>"
-	PSW_FLAG_SET_QUEUE(FA, !PSW_FLAG_VAL(FB));
-
-
-// OR
-
-_LOGIC,11010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:OR
-"or r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, Rb | Rc);
-_LOGIC,11010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:OR imm
-"or r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb | imm);
-_LOGIC,11010,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:OR imm long
-"or r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb | imm);
-
-
-
-// ORFG
-
-_LOGIC,01010,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:ORFG
-"orfg f<FA>, f<FB>, f<FC>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) | PSW_FLAG_VAL(FC));
-_LOGIC,01010,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:ORFG imm
-"orfg f<FA>, f<FB>, <imm>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) | (imm_6 & 1));
-
-
-
-// REIT
-
-_BRA,01000,00,6.**,6.**,6.**:BRA:short:mu:REIT
-"reit"
-	WRITE32_QUEUE (&PSW, bPSW);
-	nia = bPC;
-
-
-
-
-// REPEAT
-
-void::function::do_repeat:unsigned32 count, address_word pcaddr
-	address_word rpt_s = cia + 8;
-	address_word rpt_e = cia + pcaddr;
-
-	if (count == 0)
-	  sim_engine_abort (SD, CPU, cia, "REPEAT with ra=0 and REPEATI with imm = 0 is forbidden.");
-	if (count > 1)
-	  PSW_SET_QUEUE (PSW_RP, 1);
-	if (rpt_e  < rpt_s + 0x10)
-	  sim_io_eprintf (sd, "warning: 0x%lx: REPEAT or REPEATI loop is too small\n", (long) cia);
-	WRITE32_QUEUE (&RPT_C, count - 1);
-	WRITE32_QUEUE (&RPT_S, rpt_s);
-	WRITE32_QUEUE (&RPT_E, rpt_e);
-
-_BRA,11000,00,6.RA,6.**,6.RC:BRA:short:mu:REPEAT
-"repeat r<RA>, r<RC>"
-	do_repeat(_SD, val_Ra, pcaddr);
-_BRA,11000,10,6.RA,_IMM12:BRA:short:mu:REPEAT imm
-"repeat r<RA>, <pcaddr>"
-	do_repeat(_SD, val_Ra, pcaddr);
-_BRA,11000,10,6.RA,6.**,_IMM32:BRA:long:mu:REPEAT imm long
-"repeat r<RA>, <pcaddr>"
-	do_repeat(_SD, val_Ra, pcaddr);
-
-
-
-
-// REPEATI
-
-_BRA,11010,00,6.IMM_6,6.**,6.RC:BRA:short:mu:REPEATI
-"repeati <IMM_6>, r<RC>"
-	do_repeat(_SD, IMM_6, pcaddr);
-_BRA,11010,10,6.IMM_6,_IMM12:BRA:short:mu:REPEATI imm
-"repeati <IMM_6>, <pcaddr>"
-	do_repeat(_SD, IMM_6, pcaddr);
-_BRA,11010,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:REPEATI imm long
-"repeati <IMM_6>, <pcaddr>"
-	do_repeat(_SD, IMM_6, pcaddr);
-
-
-
-
-// RTD
-
-_BRA,01010,00,6.*,6.*,6.*:BRA:short:mu:RTD
-"rtd"
-	WRITE32_QUEUE (&PSW, DPSW);
-	nia = DPC;
-
-
-
-
-// ROT
-
-_LOGIC,10100,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:ROT
-"rot r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, ROT32(Rb, Rc & 0x1f));
-_LOGIC,10100,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:ROT imm
-"rot r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, ROT32(Rb, imm & 0x1f));
-
-
-
-
-// ROT2H
-
-void::function::do_rot2h:unsigned32 *ra, unsigned32 rb, signed32 src
-	unsigned16 high = ROTR16(VH2_4(rb), VH2_4(src) & 0xf);
-	unsigned16 low  = ROTR16(VL2_4(rb), VL2_4(src) & 0xf);
-	WRITE32_QUEUE (ra, (high << 16) | low);
-
-_LOGIC,10101,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:ROT2H
-"rot2h r<RA>, r<RB>, r<RC>"
-	do_rot2h(_SD, Ra, Rb, Rc);
-_LOGIC,10101,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:ROT2H imm
-"rot2h r<RA>, r<RB>, <imm>"
-	do_rot2h(_SD, Ra, Rb, immHL);
-
-
-
-
-// SAT
-
-void::function::do_sat:signed32 *ra, signed32 rb, signed32 src
-	int bits = LSMASKED32(src, 4, 0); /* 5 */
-	signed32 sat = LSMASK32(bits, 0) >> 2;
-	signed32 nsat = ~sat;
-	signed32 value;
-	if (bits != src)
-	  sim_io_eprintf (sd, "warning: 0x%lx:SAT bit overflow\n", (long) cia);
-	if (bits == 0)
-	  value = rb;
-	else if (rb >= sat)
-	  value = sat;
-	else if (rb <= nsat)
-	  value = nsat;
-	else
-	  value = rb;
-	WRITE32_QUEUE (ra, value);
-
-_IALU2,01000,00,6.RA,6.RB,6.RC:IALU2:short:iu:SAT
-"sat r<RA>, r<RB>, r<RC>"
-	do_sat(_SD, Ra, Rb, Rc);
-_IALU2,01000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SAT imm
-"sat r<RA>, r<RB>, <imm>"
-	do_sat(_SD, Ra, Rb, imm_5);
-
-
-
-
-// SAT2H
-
-void::function::do_sath:signed32 *ra, signed32 rb, signed32 src, int high, int updates_f4
-	int bits = LSMASKED32(src, 4, 0); /* 5 */
-	signed32 sat = LSMASK32(bits, 0) >> 2;
-	signed32 nsat = ~sat;
-	signed32 value;
-	if (bits != src)
-	  sim_io_eprintf (sd, "warning: 0x%lx:SAT bit overflow\n", (long) cia);
-	if (bits == 0)
-	  value = rb;
-	else if (rb >= sat)
-	  value = sat;
-	else if (rb <= nsat)
-	  value = nsat;
-	else
-	  value = rb;
-	if (high)
-	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
-	else
-	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
-	if (updates_f4)
-	  {
-	    /* if MU instruction was a MVTSYS (lkr), unqueue register writes now */
-	    if(STATE_CPU (sd, 0)->mvtsys_left_p)
-	      unqueue_writes (sd, STATE_CPU (sd, 0), cia);
-	    PSW_FLAG_SET_QUEUE(PSW_S_FLAG, PSW_FLAG_VAL(PSW_S_FLAG) ^ (value & 1));
-	  }
-
-_IALU2,01001,00,6.RA,6.RB,6.RC:IALU2:short:iu:SAT2H
-"sat2h r<RA>, r<RB>, r<RC>"
-	do_sath(_SD, Ra, RbH, RcH, 1, 0);
-	do_sath(_SD, Ra, RbL, RcL, 0, 0);
-_IALU2,01001,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SAT2H imm
-"sat2h r<RA>, r<RB>, <imm>"
-	do_sath(_SD, Ra, RbH, imm_5, 1, 0);
-	do_sath(_SD, Ra, RbL, imm_5, 0, 0);
-
-
-
-
-// SATHp
-
-::%s::p:int p
-	switch (p)
-	  {
-	  case 0: return "l";
-	  case 1: return "h";
-	  default: return "?";
-	  }
-
-_IALU2,1110,p,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATHP
-"sath%s<p> r<RA>, r<RB>, r<RC>"
-	do_sath(_SD, Ra, Rb, Rc, p, 1);
-_IALU2,1110,p,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATHP imm
-"sath%s<p> r<RA>, r<RB>, <imm>"
-	do_sath(_SD, Ra, Rb, imm_5, p, 1);
-
-
-
-// SATZ
-
-void::function::do_satz:signed32 *ra, signed32 rb, signed32 src
-	if (rb < 0)
-	  WRITE32_QUEUE (ra, 0);
-	else
-	  do_sat (_SD, ra, rb, src);
-
-_IALU2,01010,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATZ
-"satz r<RA>, r<RB>, r<RC>"
-	do_satz(_SD, Ra, Rb, Rc);
-_IALU2,01010,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATZ imm
-"satz r<RA>, r<RB>, <imm>"
-	do_satz(_SD, Ra, Rb, imm_5);
-
-
-
-
-// SATZ2H
-
-void::function::do_satzh:signed32 *ra, signed16 rb, signed32 src, int high
-	int bits = LSMASKED32(src, 3, 0); /*4*/
-	signed16 sat = LSMASK16(bits, 0) >> 2;
-	signed16 nsat = 0;
-	signed16 value;
-	if (bits != src)
-	  sim_io_eprintf (sd, "warning: 0x%lx:SATZ2H bit overflow\n", (long) cia);
-	if (bits == 0 && rb > sat)
-	  value = rb;
-	else if (rb > sat)
-	  value = sat;
-	else if (rb < nsat)
-	  value = nsat;
-	else
-	  value = rb;
-	if (high)
-	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
-	else
-	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
-
-
-_IALU2,01011,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATZ2H
-"satz2h r<RA>, r<RB>, r<RC>"
-	do_satzh(_SD, Ra, RbH, RcH, 1);
-	do_satzh(_SD, Ra, RbL, RcL, 0);
-_IALU2,01011,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATZ2H imm
-"satz2h r<RA>, r<RB>, <imm>"
-	do_satzh(_SD, Ra, RbH, imm, 1);
-	do_satzh(_SD, Ra, RbL, imm, 0);
-
-
-
-
-// SRA
-
-void::function::do_sra:unsigned32 *ra, unsigned32 rb, signed32 src
-	unsigned32 value;
-	while (src > 31) src -= 32;
-	while (src < -32) src += 32;
-	if (src >= 0)
-	  value = (signed32)rb >> src;
-	else if (src == -32)
-	  value = 0;
-	else
-	  value = rb << -src;
-	WRITE32_QUEUE (ra, value);
-
-_LOGIC,10000,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRA
-"sra r<RA>, r<RB>, r<RC>"
-	do_sra(_SD, Ra, Rb, Rc);
-_LOGIC,10000,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRA imm
-"sra r<RA>, r<RB>, <imm>"
-	do_sra(_SD, Ra, Rb, imm);
-
-
-
-
-// SRAHp
-
-void::function::do_srah:unsigned32 *ra, unsigned32 rb, int src, int high
-	unsigned32 value;
-	while (src > 31) src -= 32;
-	while (src < -32) src += 32;
-	if (src >= 0)
-	  value = (signed32)rb >> src;
-	else if (src == -32)
-	  value = 0;
-	else
-	  value = rb << -src;
-	if (high)
-	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
-	else
-	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
-
-_LOGIC,0010,p,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRAHP
-"srah%s<p> r<RA>, r<RB>, r<RC>"
-	do_srah(_SD, Ra, Rb, Rc, p);
-_LOGIC,0010,p,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRAHP imm
-"srah%s<p> r<RA>, r<RB>, <imm>"
-	do_srah(_SD, Ra, Rb, imm, p);
-
-
-
-
-// SRA2H
-
-_LOGIC,10001,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRA2H
-"sra2h r<RA>, r<RB>, r<RC>"
-	signed32 srcH = RcH;
-	signed32 srcL = RcL;
-	while (srcH > 15) srcH -= 16;
-	while (srcH < -16) srcH += 16;
-	while (srcL > 15) srcL -= 16;
-	while (srcL < -16) srcL += 16;
-	do_srah(_SD, Ra, RbH, srcH, 1);
-	do_srah(_SD, Ra, RbL, srcL, 0);
-_LOGIC,10001,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRA2H imm
-"sra2h r<RA>, r<RB>, <imm>"
-	signed32 src = imm;
-	while (src > 15) src -= 16;
-	while (src < -16) src += 16;
-	do_srah(_SD, Ra, RbH, src, 1);
-	do_srah(_SD, Ra, RbL, src, 0);
-
-
-
-
-// SRC
-
-void::function::do_src:unsigned32 *ra, unsigned32 rb, int src
-	unsigned32 value;
-	unsigned64 operand;
-	unsigned64 shifted;
-	while (src > 31) src -= 32;
-	while (src < -32) src += 32;
-	if (src >= 0)
-	  {
-	    operand = (INSERTED64(rb, 0, 31) | INSERTED64(*ra, 32, 63));
-	    shifted = operand >> src;
-	    value = EXTRACTED64(shifted, 32, 63);
-	  }
-	else
-	  {
-	    operand = (INSERTED64(*ra, 0, 31) | INSERTED64(rb, 32, 63));
-	    shifted = operand << -src;
-	    value = EXTRACTED64(shifted, 0, 31);
-	  }
-	WRITE32_QUEUE (ra, value);
-
-_LOGIC,10110,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRC
-"src r<RA>, r<RB>, r<RC>"
-	do_src(_SD, Ra, Rb, Rc);
-_LOGIC,10110,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRC imm
-"src r<RA>, r<RB>, <imm>"
-	do_src(_SD, Ra, Rb, imm);
-
-
-
-
-// SRL
-
-void::function::do_srl:unsigned32 *ra, unsigned32 rb, int src
-	unsigned32 value;
-	while (src > 31) src -= 32;
-	while (src < -32) src += 32;
-	if (src >= 0)
-	  value = (unsigned32)rb >> src;
-	else if (src == -32)
-	  value = 0;
-	else
-	  value = (unsigned32)rb << -src;
-	WRITE32_QUEUE (ra, value);
-
-_LOGIC,10010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRL
-"srl r<RA>, r<RB>, r<RC>"
-	do_srl(_SD, Ra, Rb, Rc);
-_LOGIC,10010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRL imm
-"srl r<RA>, r<RB>, <imm>"
-	do_srl(_SD, Ra, Rb, imm);
-
-
-
-
-// SRLHp
-
-void::function::do_srlh:unsigned32 *ra, unsigned32 rb, int src, int high
-	unsigned32 value;
-	while (src > 31) src -= 32;
-	while (src < -32) src += 32;
-	if (src >= 0)
-	  value = rb >> src;
-	else if (src == -32)
-	  value = 0;
-	else
-	  value = rb << -src;
-	if (high)
-	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
-	else
-	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
-
-_LOGIC,0011,p,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRLHP
-"srlh%s<p> r<RA>, r<RB>, r<RC>"
-	do_srlh(_SD, Ra, Rb, Rc, p);
-_LOGIC,0011,p,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRLHP imm
-"srlh%s<p> r<RA>, r<RB>, <imm>"
-	do_srlh(_SD, Ra, Rb, imm, p);
-
-
-// SRL2H
-
-_LOGIC,10011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRL2H
-"srl2h r<RA>, r<RB>, r<RC>"
-	signed32 srcH = RcH;
-	signed32 srcL = RcL;
-	while (srcH > 15) srcH -= 16;
-	while (srcH < -16) srcH += 16;
-	while (srcL > 15) srcL -= 16;
-	while (srcL < -16) srcL += 16;
-	do_srlh(_SD, Ra, RbHU, srcH, 1);
-	do_srlh(_SD, Ra, RbLU, srcL, 0);
-_LOGIC,10011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRL2H imm
-"srl2h r<RA>, r<RB>, <imm>"
-	signed32 src = imm;
-	while (src > 15) src -= 16;
-	while (src < -16) src += 16;
-	do_srlh(_SD, Ra, RbHU, src, 1);
-	do_srlh(_SD, Ra, RbLU, src, 0);
-
-
-
-
-// ST2H
-
-void::function::get_even_reg:int *reg, unsigned32 *r0, const char *name
-	if (*reg & 1)
-	  sim_engine_abort (SD, CPU, cia,
-			    "0x%lx:%s odd register (r%d) used in multi-word store",
-			    (long) cia, name, *reg);
-	if (*reg == 0)
-	  *r0 = 0;
-	else
-	  *r0 = GPR[*reg];
-
-void::function::do_st2h:int ra, unsigned32 rb, unsigned32 src
-	unsigned32 val_ra;
-	unsigned32 mem;
-	get_even_reg(_SD, &ra, &val_ra, "ST2H");
-	mem = INSERTED32(val_ra, 0, 15) |
-	      INSERTED32(GPR[ra + 1], 16, 31);
-	STORE(rb + src, 4, mem);
-
-_IMEM,10011,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST2H
-"st2h r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"st2h r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_st2h(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,10011,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST2H long
-"st2h r<RA>, @(r<RB>, <imm>)"
-	do_st2h(_SD, RA, Rb, imm);
-
-
-
-// ST2W
-
-void::function::do_st2w:int ra, unsigned32 rb, unsigned32 src
-	unsigned32 val_ra;
-	unsigned64 mem;
-	get_even_reg(_SD, &ra, &val_ra, "ST2W");
-	mem = INSERTED64(val_ra, 0, 31) | INSERTED64(GPR[ra + 1], 32, 63);
-	STORE(rb + src, 8, mem);
-
-_IMEM,10110,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST2W
-"st2w r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"st2w r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_st2w(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 8);
-_IMEM,10110,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST2W long
-"st2w r<RA>, @(r<RB>, <imm>)"
-	do_st2w(_SD, RA, Rb, imm);
-
-
-
-// ST4HB
-
-void::function::do_st4hb:int ra, unsigned32 rb, unsigned32 src
-	unsigned32 val_ra;
-	unsigned32 mem;
-	get_even_reg(_SD, &ra, &val_ra, "ST4HB");
-	mem = INSERTED32(EXTRACTED32(val_ra, 8, 15), 0, 7) |
-	      INSERTED32(EXTRACTED32(val_ra, 24, 31), 8, 15) |
-	      INSERTED32(EXTRACTED32(GPR[ra + 1], 8, 15), 16, 23) |
-	      INSERTED32(EXTRACTED32(GPR[ra + 1], 24, 31), 24, 31);
-	STORE(rb + src, 4, mem);
-
-_IMEM,10101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST4HB
-"st4hb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"st4hb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_st4hb(_SD, RA, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,10101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST4HB long
-"st4hb r<RA>, @(r<RB>, <imm>)"
-	do_st4hb(_SD, RA, Rb, imm);
-
-
-
-// STB
-
-void::function::do_stb:unsigned32 ra, unsigned32 rb, unsigned32 src
-	STORE(rb + src, 1, EXTRACTED32(ra, 24, 31));
-
-_IMEM,10000,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STB
-"stb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"stb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_stb(_SD, val_Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 1);
-_IMEM,10000,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STB long
-"stb r<RA>, @(r<RB>, <imm>)"
-	do_stb(_SD, val_Ra, Rb, imm);
-
-
-
-// STH
-
-void::function::do_sth:unsigned32 ra, unsigned32 rb, unsigned32 src
-	STORE(rb + src, 2, EXTRACTED32(ra, 16, 31));
-
-_IMEM,10010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STH
-"sth r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"sth r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_sth(_SD, val_Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 2);
-_IMEM,10010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STH long
-"sth r<RA>, @(r<RB>, <imm>)"
-	do_sth(_SD, val_Ra, Rb, imm);
-
-
-
-// STHH
-
-void::function::do_sthh:unsigned32 ra, unsigned32 rb, unsigned32 src
-	STORE(rb + src, 2, EXTRACTED32(ra, 0, 15));
-
-_IMEM,10001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STHH
-"sthh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"sthh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_sthh(_SD, val_Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 2);
-_IMEM,10001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STHH long
-"sthh r<RA>, @(r<RB>, <imm>)"
-	do_sthh(_SD, val_Ra, Rb, imm);
-
-
-
-// STW
-
-void::function::do_stw:unsigned32 ra, unsigned32 rb, unsigned32 src
-	STORE(rb + src, 4, ra);
-
-_IMEM,10100,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STW
-"stw r<RA>, @(r<RB>, <SRC_6>)":XX == 0
-"stw r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
-	do_stw(_SD, val_Ra, Rb, src);
-	do_incr(_SD, XX, &GPR[RB], 4);
-_IMEM,10100,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STW long
-"stw r<RA>, @(r<RB>, <imm>)"
-	do_stw(_SD, val_Ra, Rb, imm);
-
-
-
-// SUB
-
-void::function::do_sub:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	ALU_BEGIN(rb);
-	ALU_SUBB(imm);
-	ALU_END(ra);
-
-_IALU1,00010,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUB
-"sub r<RA>, r<RB>, r<RC>"
-	do_sub (_SD, Ra, Rb, Rc);
-_IALU1,00010,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUB imm
-"sub r<RA>, r<RB>, <imm>"
-	do_sub (_SD, Ra, Rb, imm);
-_IALU1,00010,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUB imm long
-"sub r<RA>, r<RB>, <imm>"
-	do_sub (_SD, Ra, Rb, imm);
-
-
-
-// SUB2H
-
-void::function::do_sub2h:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	unsigned16 high = VH2_4(rb) - VH2_4(imm);
-	unsigned16 low  = VL2_4(rb) - VL2_4(imm);
-	WRITE32_QUEUE (ra, (high << 16) | low);
-
-_IALU1,00011,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUB2H
-"sub2h r<RA>, r<RB>, r<RC>"
-	do_sub2h (_SD, Ra, Rb, Rc);
-_IALU1,00011,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUB2H imm
-"sub2h r<RA>, r<RB>, <imm>"
-	do_sub2h (_SD, Ra, Rb, immHL);
-_IALU1,00011,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUB2H imm long
-"sub2h r<RA>, r<RB>, <imm>"
-	do_sub2h (_SD, Ra, Rb, imm);
-
-
-
-// SUBB
-
-void::function::do_subb:unsigned32 *ra, unsigned32 rb, unsigned32 imm
-	ALU_BEGIN(rb);
-	ALU_SUBB_B(imm, ALU_CARRY);
-	ALU_END(ra);
-	
-_IALU1,00101,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUBB
-"subb r<RA>, r<RB>, r<RC>"
-	do_subb (_SD, Ra, Rb, Rc);
-_IALU1,00101,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUBB imm
-"subb r<RA>, r<RB>, <imm>"
-	do_subb (_SD, Ra, Rb, imm);
-_IALU1,00101,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUBB imm long
-"subb r<RA>, r<RB>, <imm>"
-	do_subb (_SD, Ra, Rb, imm);
-
-
-
-// SUBHppp
-
-void::function::do_subh_ppp:int ppp, unsigned32 *ra, unsigned32 rb, unsigned32 src
-	switch (ppp) {
-	case 0x0: /* LLL */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_SUBB(VL2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x1: /* LLH */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_SUBB(VH2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x2: /* LHL */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_SUBB(VL2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x3: /* LHH */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_SUBB(VH2_4(src));
-	  ALU16_END(ra, 0);
-	  }
-	  break;
-	case 0x4: /* HLL */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_SUBB(VL2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x5: /* HLH */
-	  {
-	  ALU16_BEGIN(VL2_4(rb));
-	  ALU16_SUBB(VH2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x6: /* HHL */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_SUBB(VL2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	case 0x7: /* HHH */
-	  {
-	  ALU16_BEGIN(VH2_4(rb));
-	  ALU16_SUBB(VH2_4(src));
-	  ALU16_END(ra, 1);
-	  }
-	  break;
-	default:
-	  sim_engine_abort (SD, CPU, cia, "do_subh_ppp - internal error - bad switch");
-	}
-
-_IALU1,11,ppp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUBHppp
-"subh%s<ppp> r<RA>, r<RB>, r<RC>"
-	do_subh_ppp(_SD, ppp, Ra, Rb, Rc);
-_IALU1,11,ppp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUBHppp imm
-"subh%s<ppp> r<RA>, r<RB>, <imm>"
-	do_subh_ppp(_SD, ppp, Ra, Rb, immHL);
-_IALU1,11,ppp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUBHppp imm long
-"subh%s<ppp> r<RA>, r<RB>, <imm>"
-	do_subh_ppp(_SD, ppp, Ra, Rb, imm);
-
-
-
-// TRAP
-
-address_word::function::do_trap:address_word trap_vector, address_word nia
-	/* Steal trap 31 for doing system calls */
-	/* System calls are defined in libgloss/d30v/syscall.h.  */
-	if (trap_vector == EIT_VB + 0x20 + (31 << 3))
-	  {
-	    enum { PARM1 = 2, PARM2, PARM3, PARM4, FUNC };
-	    if (GPR[FUNC] == 1)		/* exit */
-	      {
-	        sim_engine_halt (sd, STATE_CPU (sd, 0), NULL, cia, sim_exited,
-		  	         GPR[PARM1]);
-	        return -1; /* dummy */
-	      }
-	    else
-	      {
-		CB_SYSCALL syscall;
-
-		CB_SYSCALL_INIT (&syscall);
-		syscall.arg1 = GPR[PARM1];
-		syscall.arg2 = GPR[PARM2];
-		syscall.arg3 = GPR[PARM3];
-		syscall.arg4 = GPR[PARM4];
-		syscall.func = GPR[FUNC];
-		syscall.p1 = (PTR) SD;
-		syscall.read_mem = d30v_read_mem;
-		syscall.write_mem = d30v_write_mem;
-
-		WRITE32_QUEUE (&GPR[PARM1],
-			       ((cb_syscall (STATE_CALLBACK (SD), &syscall)
-				 == CB_RC_OK)
-				? syscall.result
-				: -syscall.errcode));
-		return nia;
-	      }
-	  }
-	else if (TRACE_TRAP_P)
-	  {
-	    int reg, i;
-	    sim_io_eprintf (sd, "\nTrap %ld:\n", (long) ((trap_vector - (EIT_VB + 0x20)) >> 3));
-	    for (reg = 0; reg < NR_GENERAL_PURPOSE_REGISTERS; reg += 8)
-	      {
-		sim_io_eprintf (sd, "r%.2d  - r%.2d: ", reg, reg+7);
-		for (i = 0; i < 8; i++)
-		  sim_io_eprintf (sd, " 0x%.8lx", (long) GPR[reg+i]);
-		sim_io_eprintf (sd, "\n");
-	      }
-
-	    for (reg = 0; reg < 16; reg += 8)
-	      {
-		sim_io_eprintf (sd, "cr%.2d - cr%.2d:", reg, reg+7);
-		for (i = 0; i < 8; i++)
-		  sim_io_eprintf (sd, " 0x%.8lx", (long) CREG[reg+i]);
-		sim_io_eprintf (sd, "\n");
-	      }
-
-	    sim_io_eprintf (sd, "a0   - a1:  ");
-	    for (reg = 0; reg < NR_ACCUMULATORS; reg++)
-	      sim_io_eprintf (sd, " 0x%.8lx 0x%.8lx",
-			      (long)EXTRACTED64(ACC[reg], 0, 31),
-			      (long)EXTRACTED64(ACC[reg], 32, 63));
-	    sim_io_eprintf (sd, "\n");
-
-	    sim_io_eprintf (sd, "f0   - f7:  ");
-	    sim_io_eprintf (sd, "     (f0) %d", (int) PSW_VAL(PSW_F0));
-	    sim_io_eprintf (sd, "     (f1) %d", (int) PSW_VAL(PSW_F1));
-	    sim_io_eprintf (sd, "     (f2) %d", (int) PSW_VAL(PSW_F2));
-	    sim_io_eprintf (sd, "     (f3) %d", (int) PSW_VAL(PSW_F3));
-	    sim_io_eprintf (sd, "      (s) %d", (int) PSW_VAL(PSW_S));
-	    sim_io_eprintf (sd, "      (v) %d", (int) PSW_VAL(PSW_V));
-	    sim_io_eprintf (sd, "     (va) %d", (int) PSW_VAL(PSW_VA));
-	    sim_io_eprintf (sd, "      (c) %d\n", (int) PSW_VAL(PSW_C));
-
-	    sim_io_eprintf (sd, "pswh:       ");
-	    sim_io_eprintf (sd, "     (sm) %d", (int) PSW_VAL(PSW_SM));
-	    sim_io_eprintf (sd, "     (ea) %d", (int) PSW_VAL(PSW_EA));
-	    sim_io_eprintf (sd, "     (ie) %d", (int) PSW_VAL(PSW_IE));
-	    sim_io_eprintf (sd, "     (rp) %d", (int) PSW_VAL(PSW_RP));
-	    sim_io_eprintf (sd, "     (md) %d", (int) PSW_VAL(PSW_MD));
-
-	    if (PSW_VAL(PSW_DB))
-	      sim_io_eprintf (sd, "     (db) %d", (int) PSW_VAL(PSW_DB));
-
-	    if (PSW_VAL(PSW_DS))
-	      sim_io_eprintf (sd, "     (ds) %d", (int) PSW_VAL(PSW_DS));
-
-	    sim_io_eprintf (sd, "\n");
-	    return nia;
-	  }
-	else
-	  {
-	    if(PSW_VAL(PSW_RP) && RPT_E == cia)
-	      {
-		WRITE32_QUEUE (&bPC, RPT_S);
-		if (RPT_C == 0)
-		  PSW_SET (PSW_RP, 0);
-	      }
-	    else
-	      WRITE32_QUEUE (&bPC, cia + 8);
-	    DID_TRAP = 1;
-	    return trap_vector;
-	  }
-
-_BRA,01001,00,6.**,6.**,6.RC:BRA:short:mu:TRAP
-"trap r<RC>"
-	nia = do_trap (_SD, EIT_VB + 0x20 + MASKED32(Rc, 24, 28), nia);
-_BRA,01001,10,6.**,6.**,_IMM6:BRA:short:mu:TRAP imm
-"trap <imm>"
-	nia = do_trap (_SD, EIT_VB + 0x20 + (imm_5 << 3), nia);
-
-
-
-// XOR
-
-_LOGIC,11011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:XOR
-"xor r<RA>, r<RB>, r<RC>"
-	WRITE32_QUEUE (Ra, Rb ^ Rc);
-_LOGIC,11011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:XOR imm
-"xor r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb ^ imm);
-_LOGIC,11011,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:XOR imm long
-"xor r<RA>, r<RB>, <imm>"
-	WRITE32_QUEUE (Ra, Rb ^ imm);
-
-
-
-// XORFG
-
-_LOGIC,01011,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:XORFG
-"xorfg f<FA>, f<FB>, f<FC>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) ^ PSW_FLAG_VAL(FC));
-_LOGIC,01011,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:XORFG imm
-"xorfg f<FA>, f<FB>, <imm_6>"
-	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) ^ (imm_6 & 1));
-
-
-
+# OBSOLETE //  -*- C -*-
+# OBSOLETE //  Mitsubishi Electric Corp. D30V Simulator.
+# OBSOLETE //  Copyright (C) 1997, Free Software Foundation, Inc.
+# OBSOLETE //  Contributed by Cygnus Solutions Inc.
+# OBSOLETE //
+# OBSOLETE //  This file is part of GDB, the GNU debugger.
+# OBSOLETE //
+# OBSOLETE //  This program is free software; you can redistribute it and/or modify
+# OBSOLETE //  it under the terms of the GNU General Public License as published by
+# OBSOLETE //  the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE //  (at your option) any later version.
+# OBSOLETE //
+# OBSOLETE //  This program is distributed in the hope that it will be useful,
+# OBSOLETE //  but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE //  GNU General Public License for more details.
+# OBSOLETE //
+# OBSOLETE //  You should have received a copy of the GNU General Public License
+# OBSOLETE //  along with this program; if not, write to the Free Software
+# OBSOLETE //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE //
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE define( _BRA,  `1.*,CCC,000')
+# OBSOLETE define( _LOGIC, `1.*,CCC,001')
+# OBSOLETE define( _IMEM, `1.*,CCC,010')
+# OBSOLETE define( _IALU1, `1.*,CCC,100')
+# OBSOLETE define(_IALU2, `1.*,CCC,101')
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE define(_IMM6, `6.IMM_6S')
+# OBSOLETE define(_IMM12, `12.IMM_12S')
+# OBSOLETE define(_IMM18, `18.IMM_18S')
+# OBSOLETE define(_IMM32, `6.IMM_6L,*,000,8.IMM_8L,00,18.IMM_18L')
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // The following is called when ever an illegal instruction is
+# OBSOLETE // encountered
+# OBSOLETE ::internal::illegal
+# OBSOLETE 	sim_io_eprintf (sd, "illegal instruction at 0x%lx\n", (long) cia);
+# OBSOLETE 	sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
+# OBSOLETE 
+# OBSOLETE // The following is called when ever an instruction in the wrong
+# OBSOLETE // slot is encountered.
+# OBSOLETE ::internal::wrong_slot
+# OBSOLETE 	sim_io_eprintf (sd, "wrong slot at 0x%lx\n", (long) cia);
+# OBSOLETE 	sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // Something illegal that can be used to contact the simulator emul
+# OBSOLETE // library.
+# OBSOLETE define(_EMUL, `1.*,CCC,111')
+# OBSOLETE 
+# OBSOLETE void::function::do_emul:int imm
+# OBSOLETE 	/* temp hack - later replace with real interface */
+# OBSOLETE 	enum {
+# OBSOLETE 	  param1 = 2, param2, param3, param4
+# OBSOLETE 	};
+# OBSOLETE 	switch (imm) {
+# OBSOLETE 	case 0:
+# OBSOLETE 	  {
+# OBSOLETE 	    sim_engine_abort (SD, CPU, cia, "UNIX call emulation unsupported");
+# OBSOLETE 	    break;
+# OBSOLETE 	  }
+# OBSOLETE 	case 1:
+# OBSOLETE 	  /* Trap 1 - prints a string */
+# OBSOLETE 	  {
+# OBSOLETE 	    address_word str = GPR[param1];
+# OBSOLETE 	    char chr;
+# OBSOLETE 	    while (1) {
+# OBSOLETE 	      chr = MEM (unsigned, str, 1);
+# OBSOLETE 	    if (chr == '\0') break;
+# OBSOLETE 	      sim_io_write_stdout (sd, &chr, sizeof chr);
+# OBSOLETE 	      str++;
+# OBSOLETE 	    }
+# OBSOLETE 	    break;
+# OBSOLETE 	  }
+# OBSOLETE 	case 3:
+# OBSOLETE 	  /* Trap 3 - writes a character */
+# OBSOLETE 	  {
+# OBSOLETE 	    char chr = GPR[param1];
+# OBSOLETE 	    sim_io_write_stdout (sd, &chr, sizeof chr);
+# OBSOLETE 	    break;
+# OBSOLETE 	  }
+# OBSOLETE 	case 4:
+# OBSOLETE 	  /* Trap 4 exits with status in [param1] */
+# OBSOLETE 	  {
+# OBSOLETE 	    sim_engine_halt (SD, CPU, NULL, cia, sim_exited, GPR[param1]);
+# OBSOLETE 	    break;
+# OBSOLETE 	  }
+# OBSOLETE 	case 5:
+# OBSOLETE 	  /* Trap 5 breakpoints.  If the breakpoint system knows about this, it
+# OBSOLETE 	     won't return.  Otherwise, we fall through to treat this as an
+# OBSOLETE 	     unknown instruction.  */
+# OBSOLETE 	  {
+# OBSOLETE 	    sim_handle_breakpoint (SD, CPU, cia);
+# OBSOLETE 	  /* Fall through to default case.*/
+# OBSOLETE 	  }
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "Unknown monitor call %d", imm);
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _EMUL,00000,00,6.*,6.*,IMM_6S:EMUL:short,emul:iu,mu:EMUL
+# OBSOLETE "syscall <imm>"
+# OBSOLETE 	do_emul (_SD, imm);
+# OBSOLETE _BRA,00000,00,6.**,6.**,_IMM32:BRA:long:iu,mu:EMUL long
+# OBSOLETE "syscall <imm>"
+# OBSOLETE 	do_emul (_SD, imm);
+# OBSOLETE 
+# OBSOLETE // ABS
+# OBSOLETE 
+# OBSOLETE _IALU1,01000,00,6.RA,6.RB,6.**:IALU1:short:iu,mu:ABS
+# OBSOLETE "abs r<RA>, r<RB>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, abs(Rb));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADD
+# OBSOLETE 
+# OBSOLETE void::function::do_add:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	ALU_BEGIN(rb);
+# OBSOLETE 	ALU_ADDC(imm);
+# OBSOLETE 	ALU_END(ra);
+# OBSOLETE 
+# OBSOLETE _IALU1,00000,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADD
+# OBSOLETE "add r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_add (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00000,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADD imm
+# OBSOLETE "add r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_add (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,00000,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADD imm long
+# OBSOLETE "add r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_add (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADD2H
+# OBSOLETE 
+# OBSOLETE void::function::do_add2h:signed32 *ra, signed32 rb, signed32 imm
+# OBSOLETE 	unsigned16 ah2 = VH2_4(rb) + VH2_4(imm);
+# OBSOLETE 	unsigned16 al2 = VL2_4(rb) + VL2_4(imm);
+# OBSOLETE 	WRITE32_QUEUE (ra, (ah2 << 16) | al2);
+# OBSOLETE 
+# OBSOLETE _IALU1,00001,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADD2H
+# OBSOLETE "add2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_add2h (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00001,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADD2H imm
+# OBSOLETE "add2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_add2h (_SD, Ra, Rb, immHL);
+# OBSOLETE _IALU1,00001,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADD2H imm long
+# OBSOLETE "add2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_add2h (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADDC
+# OBSOLETE 
+# OBSOLETE void::function::do_addc:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	ALU_BEGIN(rb);
+# OBSOLETE 	ALU_ADDC_C(imm, ALU_CARRY);
+# OBSOLETE 	ALU_END(ra);
+# OBSOLETE 
+# OBSOLETE _IALU1,00100,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDC
+# OBSOLETE "addc r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_addc (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00100,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDC imm
+# OBSOLETE "addc r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_addc (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,00100,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDC imm long
+# OBSOLETE "addc r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_addc (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADDHppp
+# OBSOLETE 
+# OBSOLETE void::function::do_addh_ppp:int ppp, unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	switch (ppp) {
+# OBSOLETE 	case 0x0: /* LLL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x1: /* LLH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x2: /* LHL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x3: /* LHH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x4: /* HLL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x5: /* HLH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x6: /* HHL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x7: /* HHH */
+# OBSOLETE 	  {	
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_ADDC(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "do_addh_ppp - internal error - bad switch");
+# OBSOLETE 	}
+# OBSOLETE ::%s::ppp:int ppp
+# OBSOLETE 	switch (ppp)
+# OBSOLETE 	  {
+# OBSOLETE 	  case 0x0: return "lll";
+# OBSOLETE 	  case 0x1: return "llh";
+# OBSOLETE 	  case 0x2: return "lhl";
+# OBSOLETE 	  case 0x3: return "lhh";
+# OBSOLETE 	  case 0x4: return "hll";
+# OBSOLETE 	  case 0x5: return "hlh";
+# OBSOLETE 	  case 0x6: return "hhl";
+# OBSOLETE 	  case 0x7: return "hhh";
+# OBSOLETE 	  default: return "?";
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IALU1,10,ppp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDHppp
+# OBSOLETE "addh%s<ppp> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_addh_ppp(_SD, ppp, Ra, Rb, Rc);
+# OBSOLETE _IALU1,10,ppp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDHppp imm
+# OBSOLETE "addh%s<ppp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_addh_ppp(_SD, ppp, Ra, Rb, immHL);
+# OBSOLETE _IALU1,10,ppp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDHppp imm long
+# OBSOLETE "addh%s<ppp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_addh_ppp(_SD, ppp, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADDS
+# OBSOLETE 
+# OBSOLETE void::function::do_adds:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	ALU_BEGIN(rb);
+# OBSOLETE 	ALU_ADDC(EXTRACTED32(imm, 0, 0));
+# OBSOLETE 	ALU_END(ra);
+# OBSOLETE 
+# OBSOLETE _IALU1,00110,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDS
+# OBSOLETE "adds r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_adds (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00110,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDS imm
+# OBSOLETE "adds r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_adds (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,00110,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDS imm long
+# OBSOLETE "adds r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_adds (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ADDS2H
+# OBSOLETE 
+# OBSOLETE void::function::do_adds2h:unsigned32 *ra, unsigned32 rb, unsigned32 immHL
+# OBSOLETE 	unsigned16 high = VH2_4(rb) + EXTRACTED32(immHL, 0, 0);
+# OBSOLETE 	unsigned16 low = VL2_4(rb) + EXTRACTED32(immHL, 16, 16);
+# OBSOLETE 	WRITE32_QUEUE (ra, (high << 16) | low);
+# OBSOLETE 
+# OBSOLETE _IALU1,00111,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:ADDS2H
+# OBSOLETE "adds2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_adds2h (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00111,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:ADDS2H imm
+# OBSOLETE "adds2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_adds2h (_SD, Ra, Rb, immHL);
+# OBSOLETE _IALU1,00111,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:ADDS2H imm long
+# OBSOLETE "adds2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_adds2h (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // AND
+# OBSOLETE 
+# OBSOLETE _LOGIC,11000,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:AND
+# OBSOLETE "and r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb & Rc);
+# OBSOLETE _LOGIC,11000,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:AND imm
+# OBSOLETE "and r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb & imm);
+# OBSOLETE _LOGIC,11000,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:AND imm long
+# OBSOLETE "and r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb & imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ANDFG
+# OBSOLETE 
+# OBSOLETE _LOGIC,01000,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:Logical AND Flags
+# OBSOLETE "andfg f<FA>, f<FB>, f<FC>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) & PSW_FLAG_VAL(FC));
+# OBSOLETE _LOGIC,01000,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:Logical AND Flags imm
+# OBSOLETE "andfg f<FA>, f<FB>, <imm_6>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) & (imm_6 & 1));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // AVG
+# OBSOLETE 
+# OBSOLETE void::function::do_avg:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	WRITE32_QUEUE (ra, ((signed64)(signed32)rb + (signed64)(signed32)imm + 1) >> 1);
+# OBSOLETE 
+# OBSOLETE _IALU1,01010,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:AVG
+# OBSOLETE "avg r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_avg (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,01010,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:AVG imm
+# OBSOLETE "avg r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_avg (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,01010,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:AVG imm long
+# OBSOLETE "avg r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_avg (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // AVG2H
+# OBSOLETE 
+# OBSOLETE void::function::do_avg2h:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	unsigned16 high = ((signed32)(signed16)VH2_4(rb) + (signed32)(signed16)VH2_4(imm) + 1) >> 1;
+# OBSOLETE 	unsigned16 low  = ((signed32)(signed16)VL2_4(rb) + (signed32)(signed16)VL2_4(imm) + 1) >> 1;
+# OBSOLETE 	WRITE32_QUEUE (ra, (high << 16) | low);
+# OBSOLETE 
+# OBSOLETE _IALU1,01011,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:AVG2H
+# OBSOLETE "avg2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_avg2h (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,01011,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:AVG2H imm
+# OBSOLETE "avg2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_avg2h (_SD, Ra, Rb, immHL);
+# OBSOLETE _IALU1,01011,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:AVG2H imm long
+# OBSOLETE "avg2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_avg2h (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BCLR
+# OBSOLETE 
+# OBSOLETE _LOGIC,00011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BCLR
+# OBSOLETE "bclr r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE(Ra, Rb & ~BIT32((Rc) % 32));
+# OBSOLETE _LOGIC,00011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BCLR imm
+# OBSOLETE "bclr r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE(Ra, Rb & ~BIT32((imm) % 32));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BNOT
+# OBSOLETE 
+# OBSOLETE _LOGIC,00001,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BNOT
+# OBSOLETE "bnot r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb ^ BIT32((Rc) % 32));
+# OBSOLETE _LOGIC,00001,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BNOT imm
+# OBSOLETE "bnot r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb ^ BIT32((imm) % 32));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BRA
+# OBSOLETE 
+# OBSOLETE _BRA,00000,00,6.**,6.**,6.RC:BRA:short:mu:BRA
+# OBSOLETE "bra r<RC>"
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE _BRA,00000,10,_IMM18:BRA:short:mu:BRA imm
+# OBSOLETE "bra <pcdisp>"
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE _BRA,00000,10,6.**,6.**,_IMM32:BRA:long:mu:BRA imm long
+# OBSOLETE "bra <pcdisp>"
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BRATNZ
+# OBSOLETE 
+# OBSOLETE _BRA,00100,01,6.RA,6.**,6.RC:BRA:short:mu:BRATNZ
+# OBSOLETE "bratnz r<RC>"
+# OBSOLETE 	if (*Ra != 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE _BRA,00100,11,6.RA,_IMM12:BRA:short:mu:BRATNZ imm
+# OBSOLETE "bratnz <pcdisp>"
+# OBSOLETE 	if (*Ra != 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE _BRA,00100,11,6.RA,6.**,_IMM32:BRA:long:mu:BRATNZ imm long
+# OBSOLETE "bratnz <pcdisp>"
+# OBSOLETE 	if (*Ra != 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BRATZR
+# OBSOLETE 
+# OBSOLETE _BRA,00100,00,6.RA,6.**,6.RC:BRA:short:mu:BRATZR
+# OBSOLETE "bratzr r<RC>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE _BRA,00100,10,6.RA,_IMM12:BRA:short:mu:BRATZR imm
+# OBSOLETE "bratzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE _BRA,00100,10,6.RA,6.**,_IMM32:BRA:long:mu:BRATZR imm long
+# OBSOLETE "bratzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BSET
+# OBSOLETE 
+# OBSOLETE _LOGIC,00010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:BSET
+# OBSOLETE "bset r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb | BIT32((Rc) % 32));
+# OBSOLETE _LOGIC,00010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:BSET imm
+# OBSOLETE "bset r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb | BIT32((imm) % 32));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BSR
+# OBSOLETE 
+# OBSOLETE _BRA,00010,00,6.**,6.**,6.RC:BRA:short:mu:BSR
+# OBSOLETE "bsr r<RC>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE _BRA,00010,10,_IMM18:BRA:short:mu:BSR imm
+# OBSOLETE "bsr <pcdisp>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE _BRA,00010,10,6.**,6.**,_IMM32:BRA:long:mu:BSR imm long
+# OBSOLETE "bsr <pcdisp>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	nia = cia + pcdisp;
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BSRTNZ
+# OBSOLETE 
+# OBSOLETE _BRA,00110,01,6.RA,6.**,6.RC:BRA:short:mu:BSRTNZ
+# OBSOLETE "bsrtnz r<RC>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _BRA,00110,11,6.RA,_IMM12:BRA:short:mu:BSRTNZ imm
+# OBSOLETE "bsrtnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _BRA,00110,11,6.RA,6.**,_IMM32:BRA:long:mu:BSRTNZ imm long
+# OBSOLETE "bsrtnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BSRTZR
+# OBSOLETE 
+# OBSOLETE _BRA,00110,00,6.RA,6.**,6.RC:BRA:short:mu:BSRTZR
+# OBSOLETE "bsrtzr r<RC>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _BRA,00110,10,6.RA,_IMM12:BRA:short:mu:BSRTZR imm
+# OBSOLETE "bsrtzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _BRA,00110,10,6.RA,6.**,_IMM32:BRA:long:mu:BSRTZR imm long
+# OBSOLETE "bsrtzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = cia + pcdisp;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // BTST
+# OBSOLETE 
+# OBSOLETE _LOGIC,00000,00,***,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:BTST
+# OBSOLETE "btst f<FA>, r<RB>, r<RC>"
+# OBSOLETE 	int bit = (Rc) % 32;
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, MASKED32(Rb, bit, bit));
+# OBSOLETE _LOGIC,00000,10,***,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:BTST imm
+# OBSOLETE "btst f<FA>, r<RB>, <imm>"
+# OBSOLETE 	int bit = imm % 32;
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, MASKED32(Rb, bit, bit));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // CMPcc
+# OBSOLETE 
+# OBSOLETE void::function::do_cmp_cc:int cc, int fa, signed32 rb, signed32 rc
+# OBSOLETE 	int value = 0;
+# OBSOLETE 	switch (cc) {
+# OBSOLETE 	case 0: /* EQ */
+# OBSOLETE 	  value = (rb == rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 1: /* NE */
+# OBSOLETE 	  value = (rb != rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 2: /* GT */
+# OBSOLETE 	  value = (rb > rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 3: /* GE */
+# OBSOLETE 	  value = (rb >= rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 4: /* LT */
+# OBSOLETE 	  value = (rb < rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 5: /* LE */
+# OBSOLETE 	  value = (rb <= rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 6: /* PS */
+# OBSOLETE 	  value = ((rb >= 0) && (rc >= 0));
+# OBSOLETE 	  break;
+# OBSOLETE 	case 7: /* NG */
+# OBSOLETE 	  value = ((rb < 0) && (rc < 0));
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "do_cmp_cc - internal error - bad switch (%d)", cc);
+# OBSOLETE 	}
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(fa, value);
+# OBSOLETE 
+# OBSOLETE ::%s::ccc:int ccc
+# OBSOLETE 	switch (ccc)
+# OBSOLETE 	  {
+# OBSOLETE 	  case 0: return "eq";
+# OBSOLETE 	  case 1: return "ne";
+# OBSOLETE 	  case 2: return "gt";
+# OBSOLETE 	  case 3: return "ge";
+# OBSOLETE 	  case 4: return "lt";
+# OBSOLETE 	  case 5: return "le";
+# OBSOLETE 	  case 6: return "ps";
+# OBSOLETE 	  case 7: return "ng";
+# OBSOLETE 	  default: return "?";
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _LOGIC,01100,00,ccc,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:CMPcc
+# OBSOLETE "cmp%s<ccc> f<FA>, r<RB>, r<RC>"
+# OBSOLETE 	do_cmp_cc(_SD, ccc, FA, Rb, Rc);
+# OBSOLETE _LOGIC,01100,10,ccc,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:CMPcc imm
+# OBSOLETE "cmp%s<ccc> f<FA>, r<RB>, <imm>"
+# OBSOLETE 	do_cmp_cc(_SD, ccc, FA, Rb, imm);
+# OBSOLETE _LOGIC,01100,10,ccc,3.FA,6.RB,_IMM32:LOGIC:long:iu,mu:CMPcc imm long
+# OBSOLETE "cmp%s<ccc> f<FA>, r<RB>, <imm>"
+# OBSOLETE 	do_cmp_cc(_SD, ccc, FA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // CMPUcc
+# OBSOLETE 
+# OBSOLETE void::function::do_cmpu_cc:int cc, int fa, unsigned32 rb, unsigned32 rc
+# OBSOLETE 	int value = 0;
+# OBSOLETE 	switch (cc) {
+# OBSOLETE 	case 2: /* GT */
+# OBSOLETE 	  value = (rb > rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 3: /* GE */
+# OBSOLETE 	  value = (rb >= rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 4: /* LT */
+# OBSOLETE 	  value = (rb < rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 5: /* LE */
+# OBSOLETE 	  value = (rb <= rc);
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "do_cmpu_cc - internal error - bad switch (%d)", cc);
+# OBSOLETE 	}
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(fa, value);
+# OBSOLETE 
+# OBSOLETE _LOGIC,01101,00,ccc,3.FA,6.RB,6.RC:LOGIC:short:iu,mu:CMPUcc
+# OBSOLETE "cmpu%s<ccc> f<FA>, r<RB>, r<RC>"
+# OBSOLETE 	do_cmpu_cc(_SD, ccc, FA, Rb, Rc);
+# OBSOLETE _LOGIC,01101,10,ccc,3.FA,6.RB,_IMM6:LOGIC:short:iu,mu:CMPUcc imm
+# OBSOLETE "cmpu%s<ccc> f<FA>, r<RB>, <imm>"
+# OBSOLETE 	do_cmpu_cc(_SD, ccc, FA, Rb, imm_6u);
+# OBSOLETE _LOGIC,01101,10,ccc,3.FA,6.RB,_IMM32:LOGIC:long:iu,mu:CMPUcc imm long
+# OBSOLETE "cmpu%s<ccc> f<FA>, r<RB>, <imm>"
+# OBSOLETE 	do_cmpu_cc(_SD, ccc, FA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DBRA
+# OBSOLETE 
+# OBSOLETE void::function::do_dbra:address_word pcdisp, unsigned32 ra
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
+# OBSOLETE 
+# OBSOLETE _BRA,10000,00,6.RA,6.**,6.RC:BRA:short:mu:DBRA
+# OBSOLETE "dbra r<RA>, r<RC>"
+# OBSOLETE 	do_dbra(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10000,10,6.RA,_IMM12:BRA:short:mu:DBRA imm
+# OBSOLETE "dbra r<RA>, <pcdisp>"
+# OBSOLETE 	do_dbra(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10000,10,6.RA,6.**,_IMM32:BRA:long:mu:DBRA imm long
+# OBSOLETE "dbra r<RA>, <pcdisp>"
+# OBSOLETE 	do_dbra(_SD, pcdisp, val_Ra);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DBRAI
+# OBSOLETE 
+# OBSOLETE void::function::do_dbrai:address_word pcdisp, unsigned32 imm
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
+# OBSOLETE 
+# OBSOLETE _BRA,10100,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DBRAI
+# OBSOLETE "dbrai <IMM_6>, r<RC>"
+# OBSOLETE 	do_dbrai(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10100,10,6.IMM_6,_IMM12:BRA:short:mu:DBRAI imm
+# OBSOLETE "dbrai <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_dbrai(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10100,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DBRAI imm long
+# OBSOLETE "dbrai <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_dbrai(_SD, pcdisp, IMM_6);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DBSR
+# OBSOLETE 
+# OBSOLETE void::function::do_dbsr:address_word pcdisp, unsigned32 ra
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + ra);
+# OBSOLETE 	WRITE32_QUEUE (&GPR[62], cia + ra + 8);
+# OBSOLETE 
+# OBSOLETE _BRA,10010,00,6.RA,6.**,6.RC:BRA:short:mu:DBSR
+# OBSOLETE "dbsr r<RA>, r<RC>"
+# OBSOLETE 	do_dbsr(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10010,10,6.RA,_IMM12:BRA:short:mu:DBSR imm
+# OBSOLETE "dbsr r<RA>, <pcdisp>"
+# OBSOLETE 	do_dbsr(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10010,10,6.RA,6.**,_IMM32:BRA:long:mu:DBSR imm long
+# OBSOLETE "dbsr r<RA>, <pcdisp>"
+# OBSOLETE 	do_dbsr(_SD, pcdisp, val_Ra);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DBSRI
+# OBSOLETE 
+# OBSOLETE void::function::do_dbsri:address_word pcdisp, unsigned32 imm
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, cia + pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
+# OBSOLETE 	WRITE32_QUEUE (&GPR[62], cia + (imm << 3) + 8);
+# OBSOLETE 
+# OBSOLETE _BRA,10110,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DBSRI
+# OBSOLETE "dbsri <IMM_6>, r<RC>"
+# OBSOLETE 	do_dbsri(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10110,10,6.IMM_6,_IMM12:BRA:short:mu:DBSRI imm
+# OBSOLETE "dbsri <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_dbsri(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10110,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DBSRI imm long
+# OBSOLETE "dbsri <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_dbsri(_SD, pcdisp, IMM_6);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DBT
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE _BRA,01011,00,6.**,6.**,6.**:BRA:short:mu:DBT
+# OBSOLETE "dbt"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  {
+# OBSOLETE 	    WRITE32_QUEUE (&DPC, RPT_S);
+# OBSOLETE 	    if (RPT_C == 0)
+# OBSOLETE 	      PSW_SET (PSW_RP, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&DPC, cia + 8);
+# OBSOLETE 	DID_TRAP = 2;
+# OBSOLETE 	nia = 0xfffff120; /* debug_trap_address */
+# OBSOLETE 
+# OBSOLETE // DJMP
+# OBSOLETE 
+# OBSOLETE void::function::do_djmp:address_word pcdisp, unsigned32 ra
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
+# OBSOLETE 
+# OBSOLETE _BRA,10001,00,6.RA,6.**,6.RC:BRA:short:mu:DJMP
+# OBSOLETE "djmp r<RA>, r<RC>"
+# OBSOLETE 	do_djmp(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10001,10,6.RA,_IMM12:BRA:short:mu:DJMP imm
+# OBSOLETE "djmp r<RA>, <pcdisp>"
+# OBSOLETE 	do_djmp(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10001,10,6.RA,6.**,_IMM32:BRA:long:mu:DJMP imm long
+# OBSOLETE "djmp r<RA>, <pcdisp>"
+# OBSOLETE 	do_djmp(_SD, pcdisp, val_Ra);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DJMPI
+# OBSOLETE 
+# OBSOLETE void::function::do_djmpi:address_word pcdisp, unsigned32 imm
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
+# OBSOLETE 
+# OBSOLETE _BRA,10101,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DJMPI
+# OBSOLETE "djmpi <IMM_6>, r<RC>"
+# OBSOLETE 	do_djmpi(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10101,10,6.IMM_6,_IMM12:BRA:short:mu:DJMPI imm
+# OBSOLETE "djmpi <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_djmpi(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10101,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DJMPI imm long
+# OBSOLETE "djmpi <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_djmpi(_SD, pcdisp, IMM_6);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DJSR
+# OBSOLETE 
+# OBSOLETE void::function::do_djsr:address_word pcdisp, unsigned32 ra
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (ra & ~0x7));
+# OBSOLETE 	WRITE32_QUEUE (&GPR[62], cia + (ra & ~0x7) + 8);
+# OBSOLETE 
+# OBSOLETE _BRA,10011,00,6.RA,6.**,6.RC:BRA:short:mu:DJSR
+# OBSOLETE "djsr r<RA>, r<RC>"
+# OBSOLETE 	do_djsr(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10011,10,6.RA,_IMM12:BRA:short:mu:DJSR imm
+# OBSOLETE "djsr r<RA>, <pcdisp>"
+# OBSOLETE 	do_djsr(_SD, pcdisp, val_Ra);
+# OBSOLETE _BRA,10011,10,6.RA,6.**,_IMM32:BRA:long:mu:DJSR imm long
+# OBSOLETE "djsr r<RA>, <pcdisp>"
+# OBSOLETE 	do_djsr(_SD, pcdisp, val_Ra);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // DJSRI
+# OBSOLETE 
+# OBSOLETE void::function::do_djsri:address_word pcdisp, unsigned32 imm
+# OBSOLETE 	PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, pcdisp);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, cia + (imm << 3));
+# OBSOLETE 	WRITE32_QUEUE (&GPR[62], cia + (imm << 3) + 8);
+# OBSOLETE 
+# OBSOLETE _BRA,10111,00,6.IMM_6,6.**,6.RC:BRA:short:mu:DJSRI
+# OBSOLETE "djsri <IMM_6>, r<RC>"
+# OBSOLETE 	do_djsri(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10111,10,6.IMM_6,_IMM12:BRA:short:mu:DJSRI imm
+# OBSOLETE "djsri <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_djsri(_SD, pcdisp, IMM_6);
+# OBSOLETE _BRA,10111,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:DJSRI imm long
+# OBSOLETE "djsri <IMM_6>, <pcdisp>"
+# OBSOLETE 	do_djsri(_SD, pcdisp, IMM_6);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JMP
+# OBSOLETE 
+# OBSOLETE _BRA,00001,00,6.**,6.**,6.RC:BRA:short:mu:JMP
+# OBSOLETE "jmp r<RC>"
+# OBSOLETE 	nia = pcaddr;
+# OBSOLETE 	if (RC == 62 && TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_RETURN;
+# OBSOLETE _BRA,00001,10,_IMM18:BRA:short:mu:JMP imm
+# OBSOLETE "jmp <pcdisp>"
+# OBSOLETE 	nia = pcaddr;
+# OBSOLETE _BRA,00001,10,6.**,6.**,_IMM32:BRA:long:mu:JMP imm long
+# OBSOLETE "jmp <pcdisp>"
+# OBSOLETE 	nia = pcaddr;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JMPTNZ
+# OBSOLETE 
+# OBSOLETE _BRA,00101,01,6.RA,6.**,6.RC:BRA:short:mu:JMPTNZ
+# OBSOLETE "jmptnz r<RC>"
+# OBSOLETE 	if (val_Ra != 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE _BRA,00101,11,6.RA,_IMM12:BRA:short:mu:JMPTNZ imm
+# OBSOLETE "jmptnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE _BRA,00101,11,6.RA,6.**,_IMM32:BRA:long:mu:JMPTNZ imm long
+# OBSOLETE "jmptnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JMPTZR
+# OBSOLETE 
+# OBSOLETE _BRA,00101,00,6.RA,6.**,6.RC:BRA:short:mu:JMPTZR
+# OBSOLETE "jmptzr r<RC>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE _BRA,00101,10,6.RA,_IMM12:BRA:short:mu:JMPTZR imm
+# OBSOLETE "jmptzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE _BRA,00101,10,6.RA,6.**,_IMM32:BRA:long:mu:JMPTZR imm long
+# OBSOLETE "jmptzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0)
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JOINpp 
+# OBSOLETE 
+# OBSOLETE void::function::do_join_pp:int pp, unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	switch (pp) {
+# OBSOLETE 	case 0x0: /* LL */
+# OBSOLETE 	  WRITE32_QUEUE (ra, ((unsigned32)VL2_4(rb) << 16) | VL2_4(src));
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x1: /* LH */
+# OBSOLETE 	  WRITE32_QUEUE (ra, ((unsigned32)VL2_4(rb) << 16) | VH2_4(src));
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x2: /* HL */
+# OBSOLETE 	  WRITE32_QUEUE (ra, ((unsigned32)VH2_4(rb) << 16) | VL2_4(src));
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x3: /* HH */
+# OBSOLETE 	  WRITE32_QUEUE (ra, ((unsigned32)VH2_4(rb) << 16) | VH2_4(src));
+# OBSOLETE 	  break;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE ::%s::pp:int pp
+# OBSOLETE 	switch (pp)
+# OBSOLETE 	  {
+# OBSOLETE 	  case 0x0: return "ll";
+# OBSOLETE 	  case 0x1: return "lh";
+# OBSOLETE 	  case 0x2: return "hl";
+# OBSOLETE 	  case 0x3: return "hh";
+# OBSOLETE 	  default: return "?";
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IALU1,011,pp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:JOINpp
+# OBSOLETE "join%s<pp> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_join_pp(_SD, pp, Ra, Rb, Rc);
+# OBSOLETE _IALU1,011,pp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:JOINpp imm
+# OBSOLETE "join%s<pp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_join_pp(_SD, pp, Ra, Rb, immHL);
+# OBSOLETE _IALU1,011,pp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:JOINpp imm long
+# OBSOLETE "join%s<pp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_join_pp(_SD, pp, Ra, Rb, immHL);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JSR
+# OBSOLETE 
+# OBSOLETE _BRA,00011,00,6.**,6.**,6.RC:BRA:short:mu:JSR
+# OBSOLETE "jsr r<RC>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	return pcaddr;
+# OBSOLETE _BRA,00011,10,_IMM18:BRA:short:mu:JSR imm
+# OBSOLETE "jsr <pcdisp>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	return pcaddr;
+# OBSOLETE _BRA,00011,10,6.**,6.**,_IMM32:BRA:long:mu:JSR imm long
+# OBSOLETE "jsr <pcdisp>"
+# OBSOLETE 	if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	if (TRACE_CALL_P)
+# OBSOLETE 	  TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	return pcaddr;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JSRTNZ
+# OBSOLETE 
+# OBSOLETE _BRA,00111,01,6.RA,6.**,6.RC:BRA:short:mu:JSRTNZ
+# OBSOLETE "jsrtnz r<RC>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE _BRA,00111,11,6.RA,_IMM12:BRA:short:mu:JSRTNZ imm
+# OBSOLETE "jsrtnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE _BRA,00111,11,6.RA,6.**,_IMM32:BRA:long:mu:JSRTNZ imm long
+# OBSOLETE "jsrtnz <pcdisp>"
+# OBSOLETE 	if (val_Ra != 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // JSRTZR
+# OBSOLETE 
+# OBSOLETE _BRA,00111,00,6.RA,6.**,6.RC:BRA:short:mu:JSRTZR
+# OBSOLETE "jsrtzr r<RC>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE _BRA,00111,10,6.RA,_IMM12:BRA:short:mu:JSRTZR imm
+# OBSOLETE "jsrtzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE _BRA,00111,10,6.RA,6.**,_IMM32:BRA:long:mu:JSRTZR imm long
+# OBSOLETE "jsrtzr <pcdisp>"
+# OBSOLETE 	if (val_Ra == 0) {
+# OBSOLETE 	  if (cia == RPT_E && PSW_VAL (PSW_RP))
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], RPT_S);
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (&GPR[62], cia + 8);
+# OBSOLETE 	  nia = pcaddr;
+# OBSOLETE 	  if (TRACE_CALL_P)
+# OBSOLETE 	    TRACE_ACTION |= TRACE_ACTION_CALL;
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // Post increment
+# OBSOLETE 
+# OBSOLETE void::function::do_incr:int x, unsigned32 *rb, int delta
+# OBSOLETE 	unsigned32 next_rb;
+# OBSOLETE 	if (x == 1)
+# OBSOLETE 	  next_rb = *rb + delta;
+# OBSOLETE 	else if (x == 3)
+# OBSOLETE 	  next_rb = *rb - delta;
+# OBSOLETE 	else
+# OBSOLETE 	  next_rb = *rb; /* value not used */
+# OBSOLETE 	/* HW erratum: check value after incrementing */
+# OBSOLETE 	if (next_rb == MOD_E
+# OBSOLETE 	    && (x == 1 || x == 3)
+# OBSOLETE 	    && (PSW_VAL(PSW_MD))) {
+# OBSOLETE 	  WRITE32_QUEUE (rb, MOD_S);
+# OBSOLETE 	}
+# OBSOLETE 	else if (x == 1 || x == 3)
+# OBSOLETE 	  WRITE32_QUEUE (rb, next_rb);
+# OBSOLETE 
+# OBSOLETE // LD2H
+# OBSOLETE 
+# OBSOLETE int::function::make_even_reg:int reg, const char *name
+# OBSOLETE 	if (reg & 1)
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia,
+# OBSOLETE 			    "0x%lx:%s odd register (r%d) used in multi-word load/mulx2h",
+# OBSOLETE 			    (long) cia, name, reg);
+# OBSOLETE 	return reg;
+# OBSOLETE 
+# OBSOLETE void::function::do_ld2h:int ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	signed32 mem;
+# OBSOLETE 	ra = make_even_reg(_SD, ra, "LD2H");
+# OBSOLETE 	mem = MEM(signed, rb + src, 4);
+# OBSOLETE 	if (ra != 0)
+# OBSOLETE 	{
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 0], SEXT32(EXTRACTED32(mem, 0, 15), 16));
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 1], SEXT32(EXTRACTED32(mem, 16, 31), 16));
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE ::%s::XX:int XX
+# OBSOLETE 	switch (XX)
+# OBSOLETE 	  {
+# OBSOLETE 	  case 0: return "";
+# OBSOLETE 	  case 1: return "+";
+# OBSOLETE 	  case 3: return "-";
+# OBSOLETE 	  default: return "?";
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IMEM,00011,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD2H
+# OBSOLETE "ld2h r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ld2h r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ld2h(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,00011,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD2H long
+# OBSOLETE "ld2h r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ld2h(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LD2W
+# OBSOLETE 
+# OBSOLETE void::function::do_ld2w:int ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned64 mem;
+# OBSOLETE 	ra = make_even_reg(_SD, ra, "LD2W");
+# OBSOLETE 	mem = MEM(unsigned, rb + src, 8);
+# OBSOLETE 	if (ra != 0)
+# OBSOLETE 	{
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 0], EXTRACTED64 (mem, 0, 31));
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 1], EXTRACTED64 (mem, 32, 63));
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _IMEM,00110,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:L2W
+# OBSOLETE "ld2w r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ld2w r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ld2w(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 8);
+# OBSOLETE _IMEM,00110,10,6.RA,6.RB,_IMM32:IMEM:long:mu:L2W long
+# OBSOLETE "ld2w r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ld2w(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LD4BH
+# OBSOLETE 
+# OBSOLETE void::function::do_ld4bh:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned16 l1, l2, h1, h2;
+# OBSOLETE 	unsigned32 mem;
+# OBSOLETE 	ra = make_even_reg(_SD, ra, "LD4BH");
+# OBSOLETE 	mem = MEM(unsigned, rb + src, 4);
+# OBSOLETE 	h1 = SEXT16(EXTRACTED32(mem, 0, 7), 8);
+# OBSOLETE 	l1 = SEXT16(EXTRACTED32(mem, 8, 15), 8);
+# OBSOLETE 	h2 = SEXT16(EXTRACTED32(mem, 16, 23), 8);
+# OBSOLETE 	l2 = SEXT16(EXTRACTED32(mem, 24, 31), 8);
+# OBSOLETE 	if (ra != 0)
+# OBSOLETE 	{
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 0], (h1 << 16) | l1);
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 1], (h2 << 16) | l2);
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _IMEM,00101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD4BH
+# OBSOLETE "ld4bh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ld4bh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ld4bh(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,00101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD4BH long
+# OBSOLETE "ld4bh r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ld4bh(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LD4BHU
+# OBSOLETE 
+# OBSOLETE void::function::do_ld4bhu:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned16 l1, l2, h1, h2;
+# OBSOLETE 	unsigned32 mem;
+# OBSOLETE 	ra = make_even_reg(_SD, ra, "LD4BH");
+# OBSOLETE 	mem = MEM(signed, rb + src, 4);
+# OBSOLETE 	h1 = EXTRACTED32(mem, 0, 7);
+# OBSOLETE 	l1 = EXTRACTED32(mem, 8, 15);
+# OBSOLETE 	h2 = EXTRACTED32(mem, 16, 23);
+# OBSOLETE 	l2 = EXTRACTED32(mem, 24, 31);
+# OBSOLETE 	if (ra != 0)
+# OBSOLETE 	{
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 0], (h1 << 16) | l1);
+# OBSOLETE 	  WRITE32_QUEUE (&GPR[ra + 1], (h2 << 16) | l2);
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _IMEM,01101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LD4BHU
+# OBSOLETE "ld4hbu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ld4hbu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ld4bhu(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,01101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LD4BHU long
+# OBSOLETE "ld4hbu r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ld4bhu(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDB
+# OBSOLETE 
+# OBSOLETE void::function::do_ldb:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(signed, rb + src, 1));
+# OBSOLETE 
+# OBSOLETE _IMEM,00000,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDB
+# OBSOLETE "ldb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldb(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 1);
+# OBSOLETE _IMEM,00000,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDB long
+# OBSOLETE "ldb r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldb(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDBU
+# OBSOLETE 
+# OBSOLETE void::function::do_ldbu:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(unsigned, rb + src, 1));
+# OBSOLETE 
+# OBSOLETE _IMEM,01001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDBU
+# OBSOLETE "ldbu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldbu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldbu(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 1);
+# OBSOLETE _IMEM,01001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDBU long
+# OBSOLETE "ldbu r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldbu(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDH
+# OBSOLETE 
+# OBSOLETE void::function::do_ldh:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(signed, rb + src, 2));
+# OBSOLETE 
+# OBSOLETE _IMEM,00010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDH
+# OBSOLETE "ldh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldh(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 2);
+# OBSOLETE _IMEM,00010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDH long
+# OBSOLETE "ldh r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldh(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDHH
+# OBSOLETE 
+# OBSOLETE void::function::do_ldhh:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(signed, rb + src, 2) << 16);
+# OBSOLETE 
+# OBSOLETE _IMEM,00001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDHH
+# OBSOLETE "ldhh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldhh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldhh(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 2);
+# OBSOLETE _IMEM,00001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDHH long
+# OBSOLETE "ldhh r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldhh(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDHU
+# OBSOLETE 
+# OBSOLETE void::function::do_ldhu:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(unsigned, rb + src, 2));
+# OBSOLETE 
+# OBSOLETE _IMEM,01010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDHU
+# OBSOLETE "ldhu r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldhu r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldhu(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 2);
+# OBSOLETE _IMEM,01010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDHU long
+# OBSOLETE "ldhu r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldhu(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // LDW
+# OBSOLETE 
+# OBSOLETE void::function::do_ldw:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, MEM(signed, rb + src, 4));
+# OBSOLETE 
+# OBSOLETE _IMEM,00100,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:LDW
+# OBSOLETE "ldw r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "ldw r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_ldw(_SD, Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,00100,10,6.RA,6.RB,_IMM32:IMEM:long:mu:LDW long
+# OBSOLETE "ldw r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_ldw(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MACa
+# OBSOLETE 
+# OBSOLETE void::function::do_mac:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	unsigned64 accum = *aa;
+# OBSOLETE 	accum += (signed64) (rb) * (signed64) (src);
+# OBSOLETE 	WRITE64_QUEUE (aa, accum);
+# OBSOLETE 	WRITE32_QUEUE (ra, EXTRACTED64(accum, 32, 63));
+# OBSOLETE 
+# OBSOLETE _IALU2,10100,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MACa
+# OBSOLETE "mac<AA> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mac(_SD, Aa, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,10100,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MACa imm
+# OBSOLETE "mac<AA> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_mac(_SD, Aa, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MACSa
+# OBSOLETE 
+# OBSOLETE void::function::do_macs:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	unsigned64 accum = *aa;
+# OBSOLETE 	accum += ((signed64) (rb) * (signed64) (src)) << 1;
+# OBSOLETE 	WRITE64_QUEUE (aa, accum);
+# OBSOLETE 	WRITE32_QUEUE (ra, EXTRACTED64(accum, 0, 31));
+# OBSOLETE 
+# OBSOLETE _IALU2,10101,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MACSa
+# OBSOLETE "macs<AA> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_macs(_SD, Aa, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,10101,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MACSa imm
+# OBSOLETE "macs<AA> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_macs(_SD, Aa, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MODDEC | MODINC
+# OBSOLETE 
+# OBSOLETE _IMEM,00111,11,6.**,6.RB,_IMM6:IMEM:short:mu:MODDEC
+# OBSOLETE "moddec r<RB>, <imm>"
+# OBSOLETE 	do_incr(_SD, 3/*0b11*/, &GPR[RB], imm_5);	
+# OBSOLETE _IMEM,00111,01,6.**,6.RB,_IMM6:IMEM:short:mu:MODINC
+# OBSOLETE "modinc r<RB>, <imm>"
+# OBSOLETE 	do_incr(_SD, 1/*0b01*/, &GPR[RB], imm_5);	
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MSUBa
+# OBSOLETE 
+# OBSOLETE void::function::do_msub:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	unsigned64 accum = *aa;
+# OBSOLETE 	accum -= (signed64) (rb) * (signed64) (src);
+# OBSOLETE 	WRITE64_QUEUE (aa, accum);
+# OBSOLETE 	WRITE32_QUEUE (ra, EXTRACTED64(accum, 32, 63));
+# OBSOLETE 
+# OBSOLETE _IALU2,10110,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MSUBa
+# OBSOLETE "msub<AA> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_msub(_SD, Aa, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,10110,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MSUBa imm
+# OBSOLETE "msub<AA> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_msub(_SD, Aa, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MSUBSa
+# OBSOLETE 
+# OBSOLETE void::function::do_msubs:unsigned64 *aa, unsigned32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	unsigned64 accum = *aa;
+# OBSOLETE 	accum -= ((signed64) (rb) * (signed64) (src)) << 1;
+# OBSOLETE 	WRITE64_QUEUE (aa, accum);
+# OBSOLETE 	WRITE32_QUEUE (ra, EXTRACTED64(accum, 0, 31));
+# OBSOLETE 
+# OBSOLETE _IALU2,10111,0,1.AA,6.RA,6.RB,6.RC:IALU2:short:iu:MSUBSa
+# OBSOLETE "msubs<AA> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_msubs(_SD, Aa, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,10111,1,1.AA,6.RA,6.RB,_IMM6:IALU2:short:iu:MSUBSa imm
+# OBSOLETE "msubs<AA> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_msubs(_SD, Aa, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MUL
+# OBSOLETE 
+# OBSOLETE void::function::do_mul:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	WRITE32_QUEUE (ra, rb * src);
+# OBSOLETE 
+# OBSOLETE _IALU2,10000,00,6.RA,6.RB,6.RC:IALU2:short:iu:MUL
+# OBSOLETE "mul r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mul(_SD, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,10000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MUL imm
+# OBSOLETE "mul r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_mul(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MUL2H
+# OBSOLETE 
+# OBSOLETE void::function::do_mul2h:unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned16 high = VH2_4(rb) * VH2_4(src);
+# OBSOLETE 	unsigned16 low  = VL2_4(rb) * VL2_4(src);
+# OBSOLETE 	WRITE32_QUEUE (ra, (high << 16) | low);
+# OBSOLETE 
+# OBSOLETE _IALU2,00000,00,6.RA,6.RB,6.RC:IALU2:short:iu:MUL2H
+# OBSOLETE "mul2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mul2h(_SD, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,00000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MUL2H imm
+# OBSOLETE "mul2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_mul2h(_SD, Ra, Rb, immHL);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MULX
+# OBSOLETE 
+# OBSOLETE void::function::do_mulx:unsigned64 *aa, signed32 rb, signed32 src
+# OBSOLETE 	WRITE64_QUEUE (aa, (signed64) (rb) * (signed64) (src));
+# OBSOLETE 
+# OBSOLETE _IALU2,11000,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MULX
+# OBSOLETE "mulx a<AA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mulx(_SD, Aa, Rb, Rc);	
+# OBSOLETE _IALU2,11000,10,5.*,1.AA,6.RB,_IMM6:IALU2:short:iu:MULX imm
+# OBSOLETE "mulx a<AA>, r<RB>, <imm>"
+# OBSOLETE 	do_mulx(_SD, Aa, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MULX2H
+# OBSOLETE 
+# OBSOLETE void::function::do_mulx2h:int ra, signed32 rb, signed32 src, int high
+# OBSOLETE 	signed32 result = rb * src;
+# OBSOLETE 	if (!high)
+# OBSOLETE 	  {
+# OBSOLETE 	    ra = make_even_reg(_SD, ra, "MULX2H");
+# OBSOLETE 	    if (ra != 0)
+# OBSOLETE 	      WRITE32_QUEUE (&GPR[ra+1], result);
+# OBSOLETE 	  }
+# OBSOLETE 	else if (ra != 0)
+# OBSOLETE 	  {
+# OBSOLETE 	      WRITE32_QUEUE (&GPR[ra+0], result);
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IALU2,00001,00,6.RA,6.RB,6.RC:IALU2:short:iu:MULX2H
+# OBSOLETE "mul2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mulx2h(_SD, RA, RbH, RcH, 1);
+# OBSOLETE 	do_mulx2h(_SD, RA, RbL, RcL, 0);
+# OBSOLETE _IALU2,00001,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MULX2H imm
+# OBSOLETE "mul2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_mulx2h(_SD, RA, RbH, imm, 1);
+# OBSOLETE 	do_mulx2h(_SD, RA, RbL, imm, 0);
+# OBSOLETE 
+# OBSOLETE // MULHXpp
+# OBSOLETE 
+# OBSOLETE void::function::do_mulhx:int pp, unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	signed32 value = 0;
+# OBSOLETE 	switch (pp) {
+# OBSOLETE 	case 0: /* LL */
+# OBSOLETE 	  value = SEXT32(VL2_4(rb), 16) * SEXT32(VL2_4(src), 16);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 1: /* LH */
+# OBSOLETE 	  value = SEXT32(VL2_4(rb), 16) * SEXT32(VH2_4(src), 16);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 2: /* HL */
+# OBSOLETE 	  value = SEXT32(VH2_4(rb), 16) * SEXT32(VL2_4(src), 16);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 3: /* HH */
+# OBSOLETE 	  value = SEXT32(VH2_4(rb), 16) * SEXT32(VH2_4(src), 16);
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "do_mulhx - internal error - bad switch");
+# OBSOLETE 	}
+# OBSOLETE 	WRITE32_QUEUE (ra, value);
+# OBSOLETE 
+# OBSOLETE _IALU2,001,pp,00,6.RA,6.RB,6.RC:IALU2:short:iu:MULHXpp
+# OBSOLETE "mulhx%s<pp> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mulhx(_SD, pp, Ra, Rb, Rc);	
+# OBSOLETE _IALU2,001,pp,10,6.RA,6.RB,_IMM6:IALU2:short:iu:MULHXpp imm
+# OBSOLETE "mulhx%s<pp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_mulhx(_SD, pp, Ra, Rb, immHL);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MULXS
+# OBSOLETE 
+# OBSOLETE void::function::do_mulxs:unsigned64 *aa, signed32 rb, signed32 src
+# OBSOLETE 	WRITE64_QUEUE (aa, ((signed64) (rb) * (signed64) (src)) << 1);
+# OBSOLETE 
+# OBSOLETE _IALU2,11001,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MULXS
+# OBSOLETE "mulxs a<AA>, r<RB>, r<RC>"
+# OBSOLETE 	do_mulxs(_SD, Aa, Rb, Rc);	
+# OBSOLETE _IALU2,11001,10,5.*,1.AA,6.RB,_IMM6:IALU2:short:iu:MULXS imm
+# OBSOLETE "mulxs a<AA>, r<RB>, <imm>"
+# OBSOLETE 	do_mulxs(_SD, Aa, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MVFACC
+# OBSOLETE 
+# OBSOLETE void::function::do_mvfacc:unsigned32 *ra, unsigned64 ab, unsigned32 src
+# OBSOLETE 	while (src > 63) src -= 64;
+# OBSOLETE 	WRITE32_QUEUE (ra, ((signed64)ab) >> src);
+# OBSOLETE 
+# OBSOLETE _IALU2,11111,00,6.RA,5.*,1.AB,6.RC:IALU2:short:iu:MVFACC
+# OBSOLETE "mvfacc r<RA>, a<AB>, r<RC>"
+# OBSOLETE 	do_mvfacc(_SD, Ra, *Ab, Rc);	
+# OBSOLETE _IALU2,11111,10,6.RA,5.*,1.AB,_IMM6:IALU2:short:iu:MVFACC imm
+# OBSOLETE "mvfacc r<RA>, a<AB>, <imm>"
+# OBSOLETE 	do_mvfacc(_SD, Ra, *Ab, imm_6u);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MVFSYS
+# OBSOLETE 
+# OBSOLETE _BRA,11110,00,6.RA,6.CR,6.ID:BRA:short:mu:MVFSYS
+# OBSOLETE "mvfsys r<RA>, cr<CR>"
+# OBSOLETE 	switch (ID) {
+# OBSOLETE 	case 0:
+# OBSOLETE 	  if (CR >= NR_CONTROL_REGISTERS)
+# OBSOLETE 	    sim_engine_abort (SD, CPU, cia, "FIXME - illegal CR");
+# OBSOLETE 	  else
+# OBSOLETE 	    WRITE32_QUEUE (Ra, (CPU)->regs.control[CR]);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 1:
+# OBSOLETE 	  WRITE32_QUEUE (Ra, PSWL);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 2:
+# OBSOLETE 	  WRITE32_QUEUE (Ra, EXTRACTED32(PSWH, 16, 31));
+# OBSOLETE 	  break;
+# OBSOLETE 	case 3:
+# OBSOLETE 	  WRITE32_QUEUE (Ra, PSW_FLAG_VAL(CR));
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "FIXME - illegal ID");
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MVTACC
+# OBSOLETE 
+# OBSOLETE _IALU2,01111,00,5.*,1.AA,6.RB,6.RC:IALU2:short:iu:MVTACC
+# OBSOLETE "mvtacc a<AA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE64_QUEUE (Aa, INSERTED64(RbU, 0, 31) | (RcU));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // MVTSYS
+# OBSOLETE 
+# OBSOLETE _BRA,01110,00,6.CR,6.RB,6.ID:BRA:short:mu:MVTSYS
+# OBSOLETE "mvtsys cr<CR>, r<RB>"
+# OBSOLETE 	switch (ID) {
+# OBSOLETE 	case 0:			/* control register */
+# OBSOLETE 	  if (CR >= NR_CONTROL_REGISTERS)
+# OBSOLETE 	    sim_engine_abort (SD, CPU, cia, "FIXME - illegal CR");
+# OBSOLETE 	  else
+# OBSOLETE 	    {
+# OBSOLETE 	      unsigned32 value = Rb;
+# OBSOLETE 	      CPU->mvtsys_left_p = 1;
+# OBSOLETE 	      if (CR == processor_status_word_cr)
+# OBSOLETE 		{
+# OBSOLETE 		  unsigned32 ds = PSW & BIT32 (PSW_DS);	/* preserve ds */
+# OBSOLETE 		  value = ds | (value & PSW_VALID);
+# OBSOLETE 		}
+# OBSOLETE 	      else if (CR == backup_processor_status_word_cr
+# OBSOLETE 		       || CR == debug_backup_processor_status_word_cr)
+# OBSOLETE 		value &= DPSW_VALID;
+# OBSOLETE 	      else if (CR == eit_vector_base_cr)
+# OBSOLETE 		value &= EIT_VALID;
+# OBSOLETE 	      WRITE32_QUEUE (&(CPU)->regs.control[CR], value);
+# OBSOLETE 	    }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 1:			/* PSWL */
+# OBSOLETE 	  WRITE32_QUEUE_MASK (&PSW, EXTRACTED32(Rb, 16, 31),
+# OBSOLETE 			      PSW_VALID & 0x0000ffff);
+# OBSOLETE 	  break;
+# OBSOLETE 	case 2:			/* PSWH */
+# OBSOLETE 	  {
+# OBSOLETE 	    unsigned32 ds = PSW & BIT32 (PSW_DS);	/* preserve ds */
+# OBSOLETE 	    WRITE32_QUEUE_MASK (&PSW, (EXTRACTED32(Rb, 16, 31) << 16) | ds,
+# OBSOLETE 				(PSW_VALID | ds) & 0xffff0000);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 3:			/* FLAG */
+# OBSOLETE 	  PSW_FLAG_SET_QUEUE(CR, Rb & 1);
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "FIXME - illegal ID");
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // NOP
+# OBSOLETE 
+# OBSOLETE _BRA,01111,00,6.**,6.**,6.**:BRA:short:iu,mu:NOP
+# OBSOLETE "nop"
+# OBSOLETE 	/* NOP */;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // NOT
+# OBSOLETE 
+# OBSOLETE _LOGIC,11001,00,6.RA,6.RB,6.*:LOGIC:short:iu,mu:NOT
+# OBSOLETE "not r<RA>, r<RB>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, ~Rb);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // NOTFG
+# OBSOLETE 
+# OBSOLETE _LOGIC,01001,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:NOTFG
+# OBSOLETE "notfg f<FA>, f<FB>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, !PSW_FLAG_VAL(FB));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // OR
+# OBSOLETE 
+# OBSOLETE _LOGIC,11010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:OR
+# OBSOLETE "or r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb | Rc);
+# OBSOLETE _LOGIC,11010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:OR imm
+# OBSOLETE "or r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb | imm);
+# OBSOLETE _LOGIC,11010,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:OR imm long
+# OBSOLETE "or r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb | imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ORFG
+# OBSOLETE 
+# OBSOLETE _LOGIC,01010,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:ORFG
+# OBSOLETE "orfg f<FA>, f<FB>, f<FC>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) | PSW_FLAG_VAL(FC));
+# OBSOLETE _LOGIC,01010,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:ORFG imm
+# OBSOLETE "orfg f<FA>, f<FB>, <imm>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) | (imm_6 & 1));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // REIT
+# OBSOLETE 
+# OBSOLETE _BRA,01000,00,6.**,6.**,6.**:BRA:short:mu:REIT
+# OBSOLETE "reit"
+# OBSOLETE 	WRITE32_QUEUE (&PSW, bPSW);
+# OBSOLETE 	nia = bPC;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // REPEAT
+# OBSOLETE 
+# OBSOLETE void::function::do_repeat:unsigned32 count, address_word pcaddr
+# OBSOLETE 	address_word rpt_s = cia + 8;
+# OBSOLETE 	address_word rpt_e = cia + pcaddr;
+# OBSOLETE 
+# OBSOLETE 	if (count == 0)
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "REPEAT with ra=0 and REPEATI with imm = 0 is forbidden.");
+# OBSOLETE 	if (count > 1)
+# OBSOLETE 	  PSW_SET_QUEUE (PSW_RP, 1);
+# OBSOLETE 	if (rpt_e  < rpt_s + 0x10)
+# OBSOLETE 	  sim_io_eprintf (sd, "warning: 0x%lx: REPEAT or REPEATI loop is too small\n", (long) cia);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_C, count - 1);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_S, rpt_s);
+# OBSOLETE 	WRITE32_QUEUE (&RPT_E, rpt_e);
+# OBSOLETE 
+# OBSOLETE _BRA,11000,00,6.RA,6.**,6.RC:BRA:short:mu:REPEAT
+# OBSOLETE "repeat r<RA>, r<RC>"
+# OBSOLETE 	do_repeat(_SD, val_Ra, pcaddr);
+# OBSOLETE _BRA,11000,10,6.RA,_IMM12:BRA:short:mu:REPEAT imm
+# OBSOLETE "repeat r<RA>, <pcaddr>"
+# OBSOLETE 	do_repeat(_SD, val_Ra, pcaddr);
+# OBSOLETE _BRA,11000,10,6.RA,6.**,_IMM32:BRA:long:mu:REPEAT imm long
+# OBSOLETE "repeat r<RA>, <pcaddr>"
+# OBSOLETE 	do_repeat(_SD, val_Ra, pcaddr);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // REPEATI
+# OBSOLETE 
+# OBSOLETE _BRA,11010,00,6.IMM_6,6.**,6.RC:BRA:short:mu:REPEATI
+# OBSOLETE "repeati <IMM_6>, r<RC>"
+# OBSOLETE 	do_repeat(_SD, IMM_6, pcaddr);
+# OBSOLETE _BRA,11010,10,6.IMM_6,_IMM12:BRA:short:mu:REPEATI imm
+# OBSOLETE "repeati <IMM_6>, <pcaddr>"
+# OBSOLETE 	do_repeat(_SD, IMM_6, pcaddr);
+# OBSOLETE _BRA,11010,10,6.IMM_6,6.**,_IMM32:BRA:long:mu:REPEATI imm long
+# OBSOLETE "repeati <IMM_6>, <pcaddr>"
+# OBSOLETE 	do_repeat(_SD, IMM_6, pcaddr);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // RTD
+# OBSOLETE 
+# OBSOLETE _BRA,01010,00,6.*,6.*,6.*:BRA:short:mu:RTD
+# OBSOLETE "rtd"
+# OBSOLETE 	WRITE32_QUEUE (&PSW, DPSW);
+# OBSOLETE 	nia = DPC;
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ROT
+# OBSOLETE 
+# OBSOLETE _LOGIC,10100,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:ROT
+# OBSOLETE "rot r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, ROT32(Rb, Rc & 0x1f));
+# OBSOLETE _LOGIC,10100,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:ROT imm
+# OBSOLETE "rot r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, ROT32(Rb, imm & 0x1f));
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ROT2H
+# OBSOLETE 
+# OBSOLETE void::function::do_rot2h:unsigned32 *ra, unsigned32 rb, signed32 src
+# OBSOLETE 	unsigned16 high = ROTR16(VH2_4(rb), VH2_4(src) & 0xf);
+# OBSOLETE 	unsigned16 low  = ROTR16(VL2_4(rb), VL2_4(src) & 0xf);
+# OBSOLETE 	WRITE32_QUEUE (ra, (high << 16) | low);
+# OBSOLETE 
+# OBSOLETE _LOGIC,10101,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:ROT2H
+# OBSOLETE "rot2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_rot2h(_SD, Ra, Rb, Rc);
+# OBSOLETE _LOGIC,10101,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:ROT2H imm
+# OBSOLETE "rot2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_rot2h(_SD, Ra, Rb, immHL);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SAT
+# OBSOLETE 
+# OBSOLETE void::function::do_sat:signed32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	int bits = LSMASKED32(src, 4, 0); /* 5 */
+# OBSOLETE 	signed32 sat = LSMASK32(bits, 0) >> 2;
+# OBSOLETE 	signed32 nsat = ~sat;
+# OBSOLETE 	signed32 value;
+# OBSOLETE 	if (bits != src)
+# OBSOLETE 	  sim_io_eprintf (sd, "warning: 0x%lx:SAT bit overflow\n", (long) cia);
+# OBSOLETE 	if (bits == 0)
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	else if (rb >= sat)
+# OBSOLETE 	  value = sat;
+# OBSOLETE 	else if (rb <= nsat)
+# OBSOLETE 	  value = nsat;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	WRITE32_QUEUE (ra, value);
+# OBSOLETE 
+# OBSOLETE _IALU2,01000,00,6.RA,6.RB,6.RC:IALU2:short:iu:SAT
+# OBSOLETE "sat r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sat(_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU2,01000,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SAT imm
+# OBSOLETE "sat r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sat(_SD, Ra, Rb, imm_5);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SAT2H
+# OBSOLETE 
+# OBSOLETE void::function::do_sath:signed32 *ra, signed32 rb, signed32 src, int high, int updates_f4
+# OBSOLETE 	int bits = LSMASKED32(src, 4, 0); /* 5 */
+# OBSOLETE 	signed32 sat = LSMASK32(bits, 0) >> 2;
+# OBSOLETE 	signed32 nsat = ~sat;
+# OBSOLETE 	signed32 value;
+# OBSOLETE 	if (bits != src)
+# OBSOLETE 	  sim_io_eprintf (sd, "warning: 0x%lx:SAT bit overflow\n", (long) cia);
+# OBSOLETE 	if (bits == 0)
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	else if (rb >= sat)
+# OBSOLETE 	  value = sat;
+# OBSOLETE 	else if (rb <= nsat)
+# OBSOLETE 	  value = nsat;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	if (high)
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
+# OBSOLETE 	if (updates_f4)
+# OBSOLETE 	  {
+# OBSOLETE 	    /* if MU instruction was a MVTSYS (lkr), unqueue register writes now */
+# OBSOLETE 	    if(STATE_CPU (sd, 0)->mvtsys_left_p)
+# OBSOLETE 	      unqueue_writes (sd, STATE_CPU (sd, 0), cia);
+# OBSOLETE 	    PSW_FLAG_SET_QUEUE(PSW_S_FLAG, PSW_FLAG_VAL(PSW_S_FLAG) ^ (value & 1));
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IALU2,01001,00,6.RA,6.RB,6.RC:IALU2:short:iu:SAT2H
+# OBSOLETE "sat2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sath(_SD, Ra, RbH, RcH, 1, 0);
+# OBSOLETE 	do_sath(_SD, Ra, RbL, RcL, 0, 0);
+# OBSOLETE _IALU2,01001,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SAT2H imm
+# OBSOLETE "sat2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sath(_SD, Ra, RbH, imm_5, 1, 0);
+# OBSOLETE 	do_sath(_SD, Ra, RbL, imm_5, 0, 0);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SATHp
+# OBSOLETE 
+# OBSOLETE ::%s::p:int p
+# OBSOLETE 	switch (p)
+# OBSOLETE 	  {
+# OBSOLETE 	  case 0: return "l";
+# OBSOLETE 	  case 1: return "h";
+# OBSOLETE 	  default: return "?";
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _IALU2,1110,p,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATHP
+# OBSOLETE "sath%s<p> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sath(_SD, Ra, Rb, Rc, p, 1);
+# OBSOLETE _IALU2,1110,p,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATHP imm
+# OBSOLETE "sath%s<p> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sath(_SD, Ra, Rb, imm_5, p, 1);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SATZ
+# OBSOLETE 
+# OBSOLETE void::function::do_satz:signed32 *ra, signed32 rb, signed32 src
+# OBSOLETE 	if (rb < 0)
+# OBSOLETE 	  WRITE32_QUEUE (ra, 0);
+# OBSOLETE 	else
+# OBSOLETE 	  do_sat (_SD, ra, rb, src);
+# OBSOLETE 
+# OBSOLETE _IALU2,01010,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATZ
+# OBSOLETE "satz r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_satz(_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU2,01010,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATZ imm
+# OBSOLETE "satz r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_satz(_SD, Ra, Rb, imm_5);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SATZ2H
+# OBSOLETE 
+# OBSOLETE void::function::do_satzh:signed32 *ra, signed16 rb, signed32 src, int high
+# OBSOLETE 	int bits = LSMASKED32(src, 3, 0); /*4*/
+# OBSOLETE 	signed16 sat = LSMASK16(bits, 0) >> 2;
+# OBSOLETE 	signed16 nsat = 0;
+# OBSOLETE 	signed16 value;
+# OBSOLETE 	if (bits != src)
+# OBSOLETE 	  sim_io_eprintf (sd, "warning: 0x%lx:SATZ2H bit overflow\n", (long) cia);
+# OBSOLETE 	if (bits == 0 && rb > sat)
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	else if (rb > sat)
+# OBSOLETE 	  value = sat;
+# OBSOLETE 	else if (rb < nsat)
+# OBSOLETE 	  value = nsat;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb;
+# OBSOLETE 	if (high)
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE _IALU2,01011,00,6.RA,6.RB,6.RC:IALU2:short:iu:SATZ2H
+# OBSOLETE "satz2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_satzh(_SD, Ra, RbH, RcH, 1);
+# OBSOLETE 	do_satzh(_SD, Ra, RbL, RcL, 0);
+# OBSOLETE _IALU2,01011,10,6.RA,6.RB,_IMM6:IALU2:short:iu:SATZ2H imm
+# OBSOLETE "satz2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_satzh(_SD, Ra, RbH, imm, 1);
+# OBSOLETE 	do_satzh(_SD, Ra, RbL, imm, 0);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRA
+# OBSOLETE 
+# OBSOLETE void::function::do_sra:unsigned32 *ra, unsigned32 rb, signed32 src
+# OBSOLETE 	unsigned32 value;
+# OBSOLETE 	while (src > 31) src -= 32;
+# OBSOLETE 	while (src < -32) src += 32;
+# OBSOLETE 	if (src >= 0)
+# OBSOLETE 	  value = (signed32)rb >> src;
+# OBSOLETE 	else if (src == -32)
+# OBSOLETE 	  value = 0;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb << -src;
+# OBSOLETE 	WRITE32_QUEUE (ra, value);
+# OBSOLETE 
+# OBSOLETE _LOGIC,10000,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRA
+# OBSOLETE "sra r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sra(_SD, Ra, Rb, Rc);
+# OBSOLETE _LOGIC,10000,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRA imm
+# OBSOLETE "sra r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sra(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRAHp
+# OBSOLETE 
+# OBSOLETE void::function::do_srah:unsigned32 *ra, unsigned32 rb, int src, int high
+# OBSOLETE 	unsigned32 value;
+# OBSOLETE 	while (src > 31) src -= 32;
+# OBSOLETE 	while (src < -32) src += 32;
+# OBSOLETE 	if (src >= 0)
+# OBSOLETE 	  value = (signed32)rb >> src;
+# OBSOLETE 	else if (src == -32)
+# OBSOLETE 	  value = 0;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb << -src;
+# OBSOLETE 	if (high)
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
+# OBSOLETE 
+# OBSOLETE _LOGIC,0010,p,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRAHP
+# OBSOLETE "srah%s<p> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_srah(_SD, Ra, Rb, Rc, p);
+# OBSOLETE _LOGIC,0010,p,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRAHP imm
+# OBSOLETE "srah%s<p> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_srah(_SD, Ra, Rb, imm, p);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRA2H
+# OBSOLETE 
+# OBSOLETE _LOGIC,10001,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRA2H
+# OBSOLETE "sra2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	signed32 srcH = RcH;
+# OBSOLETE 	signed32 srcL = RcL;
+# OBSOLETE 	while (srcH > 15) srcH -= 16;
+# OBSOLETE 	while (srcH < -16) srcH += 16;
+# OBSOLETE 	while (srcL > 15) srcL -= 16;
+# OBSOLETE 	while (srcL < -16) srcL += 16;
+# OBSOLETE 	do_srah(_SD, Ra, RbH, srcH, 1);
+# OBSOLETE 	do_srah(_SD, Ra, RbL, srcL, 0);
+# OBSOLETE _LOGIC,10001,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRA2H imm
+# OBSOLETE "sra2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	signed32 src = imm;
+# OBSOLETE 	while (src > 15) src -= 16;
+# OBSOLETE 	while (src < -16) src += 16;
+# OBSOLETE 	do_srah(_SD, Ra, RbH, src, 1);
+# OBSOLETE 	do_srah(_SD, Ra, RbL, src, 0);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRC
+# OBSOLETE 
+# OBSOLETE void::function::do_src:unsigned32 *ra, unsigned32 rb, int src
+# OBSOLETE 	unsigned32 value;
+# OBSOLETE 	unsigned64 operand;
+# OBSOLETE 	unsigned64 shifted;
+# OBSOLETE 	while (src > 31) src -= 32;
+# OBSOLETE 	while (src < -32) src += 32;
+# OBSOLETE 	if (src >= 0)
+# OBSOLETE 	  {
+# OBSOLETE 	    operand = (INSERTED64(rb, 0, 31) | INSERTED64(*ra, 32, 63));
+# OBSOLETE 	    shifted = operand >> src;
+# OBSOLETE 	    value = EXTRACTED64(shifted, 32, 63);
+# OBSOLETE 	  }
+# OBSOLETE 	else
+# OBSOLETE 	  {
+# OBSOLETE 	    operand = (INSERTED64(*ra, 0, 31) | INSERTED64(rb, 32, 63));
+# OBSOLETE 	    shifted = operand << -src;
+# OBSOLETE 	    value = EXTRACTED64(shifted, 0, 31);
+# OBSOLETE 	  }
+# OBSOLETE 	WRITE32_QUEUE (ra, value);
+# OBSOLETE 
+# OBSOLETE _LOGIC,10110,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRC
+# OBSOLETE "src r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_src(_SD, Ra, Rb, Rc);
+# OBSOLETE _LOGIC,10110,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRC imm
+# OBSOLETE "src r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_src(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRL
+# OBSOLETE 
+# OBSOLETE void::function::do_srl:unsigned32 *ra, unsigned32 rb, int src
+# OBSOLETE 	unsigned32 value;
+# OBSOLETE 	while (src > 31) src -= 32;
+# OBSOLETE 	while (src < -32) src += 32;
+# OBSOLETE 	if (src >= 0)
+# OBSOLETE 	  value = (unsigned32)rb >> src;
+# OBSOLETE 	else if (src == -32)
+# OBSOLETE 	  value = 0;
+# OBSOLETE 	else
+# OBSOLETE 	  value = (unsigned32)rb << -src;
+# OBSOLETE 	WRITE32_QUEUE (ra, value);
+# OBSOLETE 
+# OBSOLETE _LOGIC,10010,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRL
+# OBSOLETE "srl r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_srl(_SD, Ra, Rb, Rc);
+# OBSOLETE _LOGIC,10010,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRL imm
+# OBSOLETE "srl r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_srl(_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRLHp
+# OBSOLETE 
+# OBSOLETE void::function::do_srlh:unsigned32 *ra, unsigned32 rb, int src, int high
+# OBSOLETE 	unsigned32 value;
+# OBSOLETE 	while (src > 31) src -= 32;
+# OBSOLETE 	while (src < -32) src += 32;
+# OBSOLETE 	if (src >= 0)
+# OBSOLETE 	  value = rb >> src;
+# OBSOLETE 	else if (src == -32)
+# OBSOLETE 	  value = 0;
+# OBSOLETE 	else
+# OBSOLETE 	  value = rb << -src;
+# OBSOLETE 	if (high)
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value << 16, 0xffff0000);
+# OBSOLETE 	else
+# OBSOLETE 	  WRITE32_QUEUE_MASK (ra, value, 0x0000ffff);
+# OBSOLETE 
+# OBSOLETE _LOGIC,0011,p,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRLHP
+# OBSOLETE "srlh%s<p> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_srlh(_SD, Ra, Rb, Rc, p);
+# OBSOLETE _LOGIC,0011,p,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRLHP imm
+# OBSOLETE "srlh%s<p> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_srlh(_SD, Ra, Rb, imm, p);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SRL2H
+# OBSOLETE 
+# OBSOLETE _LOGIC,10011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:SRL2H
+# OBSOLETE "srl2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	signed32 srcH = RcH;
+# OBSOLETE 	signed32 srcL = RcL;
+# OBSOLETE 	while (srcH > 15) srcH -= 16;
+# OBSOLETE 	while (srcH < -16) srcH += 16;
+# OBSOLETE 	while (srcL > 15) srcL -= 16;
+# OBSOLETE 	while (srcL < -16) srcL += 16;
+# OBSOLETE 	do_srlh(_SD, Ra, RbHU, srcH, 1);
+# OBSOLETE 	do_srlh(_SD, Ra, RbLU, srcL, 0);
+# OBSOLETE _LOGIC,10011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:SRL2H imm
+# OBSOLETE "srl2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	signed32 src = imm;
+# OBSOLETE 	while (src > 15) src -= 16;
+# OBSOLETE 	while (src < -16) src += 16;
+# OBSOLETE 	do_srlh(_SD, Ra, RbHU, src, 1);
+# OBSOLETE 	do_srlh(_SD, Ra, RbLU, src, 0);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ST2H
+# OBSOLETE 
+# OBSOLETE void::function::get_even_reg:int *reg, unsigned32 *r0, const char *name
+# OBSOLETE 	if (*reg & 1)
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia,
+# OBSOLETE 			    "0x%lx:%s odd register (r%d) used in multi-word store",
+# OBSOLETE 			    (long) cia, name, *reg);
+# OBSOLETE 	if (*reg == 0)
+# OBSOLETE 	  *r0 = 0;
+# OBSOLETE 	else
+# OBSOLETE 	  *r0 = GPR[*reg];
+# OBSOLETE 
+# OBSOLETE void::function::do_st2h:int ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned32 val_ra;
+# OBSOLETE 	unsigned32 mem;
+# OBSOLETE 	get_even_reg(_SD, &ra, &val_ra, "ST2H");
+# OBSOLETE 	mem = INSERTED32(val_ra, 0, 15) |
+# OBSOLETE 	      INSERTED32(GPR[ra + 1], 16, 31);
+# OBSOLETE 	STORE(rb + src, 4, mem);
+# OBSOLETE 
+# OBSOLETE _IMEM,10011,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST2H
+# OBSOLETE "st2h r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "st2h r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_st2h(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,10011,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST2H long
+# OBSOLETE "st2h r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_st2h(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ST2W
+# OBSOLETE 
+# OBSOLETE void::function::do_st2w:int ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned32 val_ra;
+# OBSOLETE 	unsigned64 mem;
+# OBSOLETE 	get_even_reg(_SD, &ra, &val_ra, "ST2W");
+# OBSOLETE 	mem = INSERTED64(val_ra, 0, 31) | INSERTED64(GPR[ra + 1], 32, 63);
+# OBSOLETE 	STORE(rb + src, 8, mem);
+# OBSOLETE 
+# OBSOLETE _IMEM,10110,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST2W
+# OBSOLETE "st2w r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "st2w r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_st2w(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 8);
+# OBSOLETE _IMEM,10110,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST2W long
+# OBSOLETE "st2w r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_st2w(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // ST4HB
+# OBSOLETE 
+# OBSOLETE void::function::do_st4hb:int ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	unsigned32 val_ra;
+# OBSOLETE 	unsigned32 mem;
+# OBSOLETE 	get_even_reg(_SD, &ra, &val_ra, "ST4HB");
+# OBSOLETE 	mem = INSERTED32(EXTRACTED32(val_ra, 8, 15), 0, 7) |
+# OBSOLETE 	      INSERTED32(EXTRACTED32(val_ra, 24, 31), 8, 15) |
+# OBSOLETE 	      INSERTED32(EXTRACTED32(GPR[ra + 1], 8, 15), 16, 23) |
+# OBSOLETE 	      INSERTED32(EXTRACTED32(GPR[ra + 1], 24, 31), 24, 31);
+# OBSOLETE 	STORE(rb + src, 4, mem);
+# OBSOLETE 
+# OBSOLETE _IMEM,10101,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:ST4HB
+# OBSOLETE "st4hb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "st4hb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_st4hb(_SD, RA, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,10101,10,6.RA,6.RB,_IMM32:IMEM:long:mu:ST4HB long
+# OBSOLETE "st4hb r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_st4hb(_SD, RA, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // STB
+# OBSOLETE 
+# OBSOLETE void::function::do_stb:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	STORE(rb + src, 1, EXTRACTED32(ra, 24, 31));
+# OBSOLETE 
+# OBSOLETE _IMEM,10000,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STB
+# OBSOLETE "stb r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "stb r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_stb(_SD, val_Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 1);
+# OBSOLETE _IMEM,10000,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STB long
+# OBSOLETE "stb r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_stb(_SD, val_Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // STH
+# OBSOLETE 
+# OBSOLETE void::function::do_sth:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	STORE(rb + src, 2, EXTRACTED32(ra, 16, 31));
+# OBSOLETE 
+# OBSOLETE _IMEM,10010,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STH
+# OBSOLETE "sth r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "sth r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_sth(_SD, val_Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 2);
+# OBSOLETE _IMEM,10010,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STH long
+# OBSOLETE "sth r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_sth(_SD, val_Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // STHH
+# OBSOLETE 
+# OBSOLETE void::function::do_sthh:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	STORE(rb + src, 2, EXTRACTED32(ra, 0, 15));
+# OBSOLETE 
+# OBSOLETE _IMEM,10001,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STHH
+# OBSOLETE "sthh r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "sthh r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_sthh(_SD, val_Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 2);
+# OBSOLETE _IMEM,10001,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STHH long
+# OBSOLETE "sthh r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_sthh(_SD, val_Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // STW
+# OBSOLETE 
+# OBSOLETE void::function::do_stw:unsigned32 ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	STORE(rb + src, 4, ra);
+# OBSOLETE 
+# OBSOLETE _IMEM,10100,XX,6.RA,6.RB,6.SRC_6:IMEM:short:mu:STW
+# OBSOLETE "stw r<RA>, @(r<RB>, <SRC_6>)":XX == 0
+# OBSOLETE "stw r<RA>, @(r<RB>%s<XX>, r<SRC_6>)"
+# OBSOLETE 	do_stw(_SD, val_Ra, Rb, src);
+# OBSOLETE 	do_incr(_SD, XX, &GPR[RB], 4);
+# OBSOLETE _IMEM,10100,10,6.RA,6.RB,_IMM32:IMEM:long:mu:STW long
+# OBSOLETE "stw r<RA>, @(r<RB>, <imm>)"
+# OBSOLETE 	do_stw(_SD, val_Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SUB
+# OBSOLETE 
+# OBSOLETE void::function::do_sub:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	ALU_BEGIN(rb);
+# OBSOLETE 	ALU_SUBB(imm);
+# OBSOLETE 	ALU_END(ra);
+# OBSOLETE 
+# OBSOLETE _IALU1,00010,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUB
+# OBSOLETE "sub r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sub (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00010,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUB imm
+# OBSOLETE "sub r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sub (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,00010,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUB imm long
+# OBSOLETE "sub r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sub (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SUB2H
+# OBSOLETE 
+# OBSOLETE void::function::do_sub2h:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	unsigned16 high = VH2_4(rb) - VH2_4(imm);
+# OBSOLETE 	unsigned16 low  = VL2_4(rb) - VL2_4(imm);
+# OBSOLETE 	WRITE32_QUEUE (ra, (high << 16) | low);
+# OBSOLETE 
+# OBSOLETE _IALU1,00011,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUB2H
+# OBSOLETE "sub2h r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_sub2h (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00011,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUB2H imm
+# OBSOLETE "sub2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sub2h (_SD, Ra, Rb, immHL);
+# OBSOLETE _IALU1,00011,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUB2H imm long
+# OBSOLETE "sub2h r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_sub2h (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SUBB
+# OBSOLETE 
+# OBSOLETE void::function::do_subb:unsigned32 *ra, unsigned32 rb, unsigned32 imm
+# OBSOLETE 	ALU_BEGIN(rb);
+# OBSOLETE 	ALU_SUBB_B(imm, ALU_CARRY);
+# OBSOLETE 	ALU_END(ra);
+# OBSOLETE 	
+# OBSOLETE _IALU1,00101,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUBB
+# OBSOLETE "subb r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_subb (_SD, Ra, Rb, Rc);
+# OBSOLETE _IALU1,00101,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUBB imm
+# OBSOLETE "subb r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_subb (_SD, Ra, Rb, imm);
+# OBSOLETE _IALU1,00101,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUBB imm long
+# OBSOLETE "subb r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_subb (_SD, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // SUBHppp
+# OBSOLETE 
+# OBSOLETE void::function::do_subh_ppp:int ppp, unsigned32 *ra, unsigned32 rb, unsigned32 src
+# OBSOLETE 	switch (ppp) {
+# OBSOLETE 	case 0x0: /* LLL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x1: /* LLH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x2: /* LHL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x3: /* LHH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 0);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x4: /* HLL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x5: /* HLH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VL2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x6: /* HHL */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VL2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	case 0x7: /* HHH */
+# OBSOLETE 	  {
+# OBSOLETE 	  ALU16_BEGIN(VH2_4(rb));
+# OBSOLETE 	  ALU16_SUBB(VH2_4(src));
+# OBSOLETE 	  ALU16_END(ra, 1);
+# OBSOLETE 	  }
+# OBSOLETE 	  break;
+# OBSOLETE 	default:
+# OBSOLETE 	  sim_engine_abort (SD, CPU, cia, "do_subh_ppp - internal error - bad switch");
+# OBSOLETE 	}
+# OBSOLETE 
+# OBSOLETE _IALU1,11,ppp,00,6.RA,6.RB,6.RC:IALU1:short:iu,mu:SUBHppp
+# OBSOLETE "subh%s<ppp> r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	do_subh_ppp(_SD, ppp, Ra, Rb, Rc);
+# OBSOLETE _IALU1,11,ppp,10,6.RA,6.RB,_IMM6:IALU1:short:iu,mu:SUBHppp imm
+# OBSOLETE "subh%s<ppp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_subh_ppp(_SD, ppp, Ra, Rb, immHL);
+# OBSOLETE _IALU1,11,ppp,10,6.RA,6.RB,_IMM32:IALU1:long:iu,mu:SUBHppp imm long
+# OBSOLETE "subh%s<ppp> r<RA>, r<RB>, <imm>"
+# OBSOLETE 	do_subh_ppp(_SD, ppp, Ra, Rb, imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // TRAP
+# OBSOLETE 
+# OBSOLETE address_word::function::do_trap:address_word trap_vector, address_word nia
+# OBSOLETE 	/* Steal trap 31 for doing system calls */
+# OBSOLETE 	/* System calls are defined in libgloss/d30v/syscall.h.  */
+# OBSOLETE 	if (trap_vector == EIT_VB + 0x20 + (31 << 3))
+# OBSOLETE 	  {
+# OBSOLETE 	    enum { PARM1 = 2, PARM2, PARM3, PARM4, FUNC };
+# OBSOLETE 	    if (GPR[FUNC] == 1)		/* exit */
+# OBSOLETE 	      {
+# OBSOLETE 	        sim_engine_halt (sd, STATE_CPU (sd, 0), NULL, cia, sim_exited,
+# OBSOLETE 		  	         GPR[PARM1]);
+# OBSOLETE 	        return -1; /* dummy */
+# OBSOLETE 	      }
+# OBSOLETE 	    else
+# OBSOLETE 	      {
+# OBSOLETE 		CB_SYSCALL syscall;
+# OBSOLETE 
+# OBSOLETE 		CB_SYSCALL_INIT (&syscall);
+# OBSOLETE 		syscall.arg1 = GPR[PARM1];
+# OBSOLETE 		syscall.arg2 = GPR[PARM2];
+# OBSOLETE 		syscall.arg3 = GPR[PARM3];
+# OBSOLETE 		syscall.arg4 = GPR[PARM4];
+# OBSOLETE 		syscall.func = GPR[FUNC];
+# OBSOLETE 		syscall.p1 = (PTR) SD;
+# OBSOLETE 		syscall.read_mem = d30v_read_mem;
+# OBSOLETE 		syscall.write_mem = d30v_write_mem;
+# OBSOLETE 
+# OBSOLETE 		WRITE32_QUEUE (&GPR[PARM1],
+# OBSOLETE 			       ((cb_syscall (STATE_CALLBACK (SD), &syscall)
+# OBSOLETE 				 == CB_RC_OK)
+# OBSOLETE 				? syscall.result
+# OBSOLETE 				: -syscall.errcode));
+# OBSOLETE 		return nia;
+# OBSOLETE 	      }
+# OBSOLETE 	  }
+# OBSOLETE 	else if (TRACE_TRAP_P)
+# OBSOLETE 	  {
+# OBSOLETE 	    int reg, i;
+# OBSOLETE 	    sim_io_eprintf (sd, "\nTrap %ld:\n", (long) ((trap_vector - (EIT_VB + 0x20)) >> 3));
+# OBSOLETE 	    for (reg = 0; reg < NR_GENERAL_PURPOSE_REGISTERS; reg += 8)
+# OBSOLETE 	      {
+# OBSOLETE 		sim_io_eprintf (sd, "r%.2d  - r%.2d: ", reg, reg+7);
+# OBSOLETE 		for (i = 0; i < 8; i++)
+# OBSOLETE 		  sim_io_eprintf (sd, " 0x%.8lx", (long) GPR[reg+i]);
+# OBSOLETE 		sim_io_eprintf (sd, "\n");
+# OBSOLETE 	      }
+# OBSOLETE 
+# OBSOLETE 	    for (reg = 0; reg < 16; reg += 8)
+# OBSOLETE 	      {
+# OBSOLETE 		sim_io_eprintf (sd, "cr%.2d - cr%.2d:", reg, reg+7);
+# OBSOLETE 		for (i = 0; i < 8; i++)
+# OBSOLETE 		  sim_io_eprintf (sd, " 0x%.8lx", (long) CREG[reg+i]);
+# OBSOLETE 		sim_io_eprintf (sd, "\n");
+# OBSOLETE 	      }
+# OBSOLETE 
+# OBSOLETE 	    sim_io_eprintf (sd, "a0   - a1:  ");
+# OBSOLETE 	    for (reg = 0; reg < NR_ACCUMULATORS; reg++)
+# OBSOLETE 	      sim_io_eprintf (sd, " 0x%.8lx 0x%.8lx",
+# OBSOLETE 			      (long)EXTRACTED64(ACC[reg], 0, 31),
+# OBSOLETE 			      (long)EXTRACTED64(ACC[reg], 32, 63));
+# OBSOLETE 	    sim_io_eprintf (sd, "\n");
+# OBSOLETE 
+# OBSOLETE 	    sim_io_eprintf (sd, "f0   - f7:  ");
+# OBSOLETE 	    sim_io_eprintf (sd, "     (f0) %d", (int) PSW_VAL(PSW_F0));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (f1) %d", (int) PSW_VAL(PSW_F1));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (f2) %d", (int) PSW_VAL(PSW_F2));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (f3) %d", (int) PSW_VAL(PSW_F3));
+# OBSOLETE 	    sim_io_eprintf (sd, "      (s) %d", (int) PSW_VAL(PSW_S));
+# OBSOLETE 	    sim_io_eprintf (sd, "      (v) %d", (int) PSW_VAL(PSW_V));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (va) %d", (int) PSW_VAL(PSW_VA));
+# OBSOLETE 	    sim_io_eprintf (sd, "      (c) %d\n", (int) PSW_VAL(PSW_C));
+# OBSOLETE 
+# OBSOLETE 	    sim_io_eprintf (sd, "pswh:       ");
+# OBSOLETE 	    sim_io_eprintf (sd, "     (sm) %d", (int) PSW_VAL(PSW_SM));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (ea) %d", (int) PSW_VAL(PSW_EA));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (ie) %d", (int) PSW_VAL(PSW_IE));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (rp) %d", (int) PSW_VAL(PSW_RP));
+# OBSOLETE 	    sim_io_eprintf (sd, "     (md) %d", (int) PSW_VAL(PSW_MD));
+# OBSOLETE 
+# OBSOLETE 	    if (PSW_VAL(PSW_DB))
+# OBSOLETE 	      sim_io_eprintf (sd, "     (db) %d", (int) PSW_VAL(PSW_DB));
+# OBSOLETE 
+# OBSOLETE 	    if (PSW_VAL(PSW_DS))
+# OBSOLETE 	      sim_io_eprintf (sd, "     (ds) %d", (int) PSW_VAL(PSW_DS));
+# OBSOLETE 
+# OBSOLETE 	    sim_io_eprintf (sd, "\n");
+# OBSOLETE 	    return nia;
+# OBSOLETE 	  }
+# OBSOLETE 	else
+# OBSOLETE 	  {
+# OBSOLETE 	    if(PSW_VAL(PSW_RP) && RPT_E == cia)
+# OBSOLETE 	      {
+# OBSOLETE 		WRITE32_QUEUE (&bPC, RPT_S);
+# OBSOLETE 		if (RPT_C == 0)
+# OBSOLETE 		  PSW_SET (PSW_RP, 0);
+# OBSOLETE 	      }
+# OBSOLETE 	    else
+# OBSOLETE 	      WRITE32_QUEUE (&bPC, cia + 8);
+# OBSOLETE 	    DID_TRAP = 1;
+# OBSOLETE 	    return trap_vector;
+# OBSOLETE 	  }
+# OBSOLETE 
+# OBSOLETE _BRA,01001,00,6.**,6.**,6.RC:BRA:short:mu:TRAP
+# OBSOLETE "trap r<RC>"
+# OBSOLETE 	nia = do_trap (_SD, EIT_VB + 0x20 + MASKED32(Rc, 24, 28), nia);
+# OBSOLETE _BRA,01001,10,6.**,6.**,_IMM6:BRA:short:mu:TRAP imm
+# OBSOLETE "trap <imm>"
+# OBSOLETE 	nia = do_trap (_SD, EIT_VB + 0x20 + (imm_5 << 3), nia);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // XOR
+# OBSOLETE 
+# OBSOLETE _LOGIC,11011,00,6.RA,6.RB,6.RC:LOGIC:short:iu,mu:XOR
+# OBSOLETE "xor r<RA>, r<RB>, r<RC>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb ^ Rc);
+# OBSOLETE _LOGIC,11011,10,6.RA,6.RB,_IMM6:LOGIC:short:iu,mu:XOR imm
+# OBSOLETE "xor r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb ^ imm);
+# OBSOLETE _LOGIC,11011,10,6.RA,6.RB,_IMM32:LOGIC:long:iu,mu:XOR imm long
+# OBSOLETE "xor r<RA>, r<RB>, <imm>"
+# OBSOLETE 	WRITE32_QUEUE (Ra, Rb ^ imm);
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE 
+# OBSOLETE // XORFG
+# OBSOLETE 
+# OBSOLETE _LOGIC,01011,00,***,3.FA,***,3.FB,***,3.FC:LOGIC:short:iu,mu:XORFG
+# OBSOLETE "xorfg f<FA>, f<FB>, f<FC>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) ^ PSW_FLAG_VAL(FC));
+# OBSOLETE _LOGIC,01011,10,***,3.FA,***,3.FB,_IMM6:LOGIC:short:iu,mu:XORFG imm
+# OBSOLETE "xorfg f<FA>, f<FB>, <imm_6>"
+# OBSOLETE 	PSW_FLAG_SET_QUEUE(FA, PSW_FLAG_VAL(FB) ^ (imm_6 & 1));
diff --git a/sim/d30v/dc-short b/sim/d30v/dc-short
index 1451dfa..95887ec 100644
--- a/sim/d30v/dc-short
+++ b/sim/d30v/dc-short
@@ -1,22 +1,22 @@
-//
-//  Mitsubishi Electric Corp. D30V Simulator.
-//  Copyright (C) 1997, Free Software Foundation, Inc.
-//  Contributed by Cygnus Solutions Inc.
-//
-//  This file is part of 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 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.
-//
-switch: 4: 13: 4: 13
+# OBSOLETE //
+# OBSOLETE //  Mitsubishi Electric Corp. D30V Simulator.
+# OBSOLETE //  Copyright (C) 1997, Free Software Foundation, Inc.
+# OBSOLETE //  Contributed by Cygnus Solutions Inc.
+# OBSOLETE //
+# OBSOLETE //  This file is part of GDB, the GNU debugger.
+# OBSOLETE //
+# OBSOLETE //  This program is free software; you can redistribute it and/or modify
+# OBSOLETE //  it under the terms of the GNU General Public License as published by
+# OBSOLETE //  the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE //  (at your option) any later version.
+# OBSOLETE //
+# OBSOLETE //  This program is distributed in the hope that it will be useful,
+# OBSOLETE //  but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE //  GNU General Public License for more details.
+# OBSOLETE //
+# OBSOLETE //  You should have received a copy of the GNU General Public License
+# OBSOLETE //  along with this program; if not, write to the Free Software
+# OBSOLETE //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE //
+# OBSOLETE switch: 4: 13: 4: 13
diff --git a/sim/d30v/engine.c b/sim/d30v/engine.c
index 2bbaad1..0f4a025 100644
--- a/sim/d30v/engine.c
+++ b/sim/d30v/engine.c
@@ -1,496 +1,496 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
-    Copyright (C) 1996, 1997, Free Software Foundation
-
-    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 ENGINE_C
-#define ENGINE_C
-
-#include "sim-main.h"
-
-#include <stdio.h>
-#include <ctype.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-static void
-do_stack_swap (SIM_DESC sd)
-{
-  sim_cpu *cpu = STATE_CPU (sd, 0);
-  unsigned new_sp = (PSW_VAL(PSW_SM) != 0);
-  if (cpu->regs.current_sp != new_sp)
-    {
-      cpu->regs.sp[cpu->regs.current_sp] = SP;
-      cpu->regs.current_sp = new_sp;
-      SP = cpu->regs.sp[cpu->regs.current_sp];
-    }
-}
-
-#if WITH_TRACE
-/* Implement ALU tracing of 32-bit registers.  */
-static void
-trace_alu32 (SIM_DESC sd,
-	     sim_cpu *cpu,
-	     address_word cia,
-	     unsigned32 *ptr)
-{
-  unsigned32 value = *ptr;
-
-  if (ptr >= &GPR[0] && ptr <= &GPR[NR_GENERAL_PURPOSE_REGISTERS])
-    trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu",
-		    "Set register r%-2d = 0x%.8lx (%ld)",
-		    ptr - &GPR[0], (long)value, (long)value);
-
-  else if (ptr == &PSW || ptr == &bPSW || ptr == &DPSW)
-    trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu",
-		    "Set register %s = 0x%.8lx%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
-		    (ptr == &PSW) ? "psw" : ((ptr == &bPSW) ? "bpsw" : "dpsw"),
-		    (long)value,
-		    (value & (0x80000000 >> PSW_SM)) ? ", sm" : "",
-		    (value & (0x80000000 >> PSW_EA)) ? ", ea" : "",
-		    (value & (0x80000000 >> PSW_DB)) ? ", db" : "",
-		    (value & (0x80000000 >> PSW_DS)) ? ", ds" : "",
-		    (value & (0x80000000 >> PSW_IE)) ? ", ie" : "",
-		    (value & (0x80000000 >> PSW_RP)) ? ", rp" : "",
-		    (value & (0x80000000 >> PSW_MD)) ? ", md" : "",
-		    (value & (0x80000000 >> PSW_F0)) ? ", f0" : "",
-		    (value & (0x80000000 >> PSW_F1)) ? ", f1" : "",
-		    (value & (0x80000000 >> PSW_F2)) ? ", f2" : "",
-		    (value & (0x80000000 >> PSW_F3)) ? ", f3" : "",
-		    (value & (0x80000000 >> PSW_S))  ? ", s"  : "",
-		    (value & (0x80000000 >> PSW_V))  ? ", v"  : "",
-		    (value & (0x80000000 >> PSW_VA)) ? ", va" : "",
-		    (value & (0x80000000 >> PSW_C))  ? ", c"  : "");
-
-  else if (ptr >= &CREG[0] && ptr <= &CREG[NR_CONTROL_REGISTERS])
-    trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu",
-		    "Set register cr%d = 0x%.8lx (%ld)",
-		    ptr - &CREG[0], (long)value, (long)value);
-}
-
-/* Implement ALU tracing of 32-bit registers.  */
-static void
-trace_alu64 (SIM_DESC sd,
-	     sim_cpu *cpu,
-	     address_word cia,
-	     unsigned64 *ptr)
-{
-  unsigned64 value = *ptr;
-
-  if (ptr >= &ACC[0] && ptr <= &ACC[NR_ACCUMULATORS])
-    trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu",
-		    "Set register a%-2d = 0x%.8lx 0x%.8lx",
-		    ptr - &ACC[0],
-		    (unsigned long)(unsigned32)(value >> 32),
-		    (unsigned long)(unsigned32)value);
-
-}
-#endif
-
-/* Process all of the queued up writes in order now */
-void
-unqueue_writes (SIM_DESC sd,
-		sim_cpu *cpu,
-		address_word cia)
-{
-  int i, num;
-  int did_psw = 0;
-  unsigned32 *psw_addr = &PSW;
-
-  num = WRITE32_NUM;
-  for (i = 0; i < num; i++)
-    {
-      unsigned32 mask = WRITE32_MASK (i);
-      unsigned32 *ptr = WRITE32_PTR (i);
-      unsigned32 value = (*ptr & ~mask) | (WRITE32_VALUE (i) & mask);
-      int j;
-
-      if (ptr == psw_addr)
-       {
-	 /* If MU instruction was not a MVTSYS, resolve PSW
-             contention in favour of IU. */
-	  if(! STATE_CPU (sd, 0)->mvtsys_left_p)
-	    {
-	      /* Detect contention in parallel writes to the same PSW flags.
-		 The hardware allows the updates from IU to prevail over
-		 those from MU. */
-	      
-	      unsigned32 flag_bits =
-		BIT32 (PSW_F0) | BIT32 (PSW_F1) |
-		BIT32 (PSW_F2) | BIT32 (PSW_F3) |
-		BIT32 (PSW_S) | BIT32 (PSW_V) |
-		BIT32 (PSW_VA) | BIT32 (PSW_C);
-	      unsigned32 my_flag_bits = mask & flag_bits;
-	      
-	      for (j = i + 1; j < num; j++)
-		if (WRITE32_PTR (j) == psw_addr && /* write to PSW */
-		    WRITE32_MASK (j) & my_flag_bits)  /* some of the same flags */
-		  {
-		    /* Recompute local mask & value, to suppress this
-		       earlier write to the same flag bits. */
-		    
-		    unsigned32 new_mask = mask & ~(WRITE32_MASK (j) & my_flag_bits);
-		    
-		    /* There is a special case for the VA (accumulated
-		       overflow) flag, in that it is only included in the
-		       second instruction's mask if the overflow
-		       occurred.  Yet the hardware still suppresses the
-		       first instruction's update to VA.  So we kludge
-		       this by inferring PSW_V -> PSW_VA for the second
-		       instruction. */
-		    
-		    if (WRITE32_MASK (j) & BIT32 (PSW_V))
-		      {
-			new_mask &= ~BIT32 (PSW_VA);
-		      }
-		    
-		    value = (*ptr & ~new_mask) | (WRITE32_VALUE (i) & new_mask);
-		  }
-	    }
-	  
-         did_psw = 1;
-       }
-
-      *ptr = value;
-
-#if WITH_TRACE
-      if (TRACE_ALU_P (cpu))
-	trace_alu32 (sd, cpu, cia, ptr);
-#endif
-    }
-
-  num = WRITE64_NUM;
-  for (i = 0; i < num; i++)
-    {
-      unsigned64 *ptr = WRITE64_PTR (i);
-      *ptr = WRITE64_VALUE (i);
-
-#if WITH_TRACE
-      if (TRACE_ALU_P (cpu))
-	trace_alu64 (sd, cpu, cia, ptr);
-#endif
-    }
-
-  WRITE32_NUM = 0;
-  WRITE64_NUM = 0;
-
-  if (DID_TRAP == 1) /* ordinary trap */
-    {
-      bPSW = PSW;
-      PSW &= (BIT32 (PSW_DB) | BIT32 (PSW_SM));
-      did_psw = 1;
-    }
-  else if (DID_TRAP == 2) /* debug trap */
-    {
-      DPSW = PSW;
-      PSW &= BIT32 (PSW_DS);
-      PSW |= BIT32 (PSW_DS);
-      did_psw = 1;
-    }
-  DID_TRAP = 0;
-
-  if (did_psw)
-    do_stack_swap (sd);
-}
-
-
-/* SIMULATE INSTRUCTIONS, various different ways of achieving the same
-   thing */
-
-static address_word
-do_long (SIM_DESC sd,
-	 l_instruction_word instruction,
-	 address_word cia)
-{
-  address_word nia = l_idecode_issue(sd,
-				     instruction,
-				     cia);
-
-  unqueue_writes (sd, STATE_CPU (sd, 0), cia);
-  return nia;
-}
-
-static address_word
-do_2_short (SIM_DESC sd,
-	    s_instruction_word insn1,
-	    s_instruction_word insn2,
-	    cpu_units unit,
-	    address_word cia)
-{
-  address_word nia;
-
-  /* run the first instruction */
-  STATE_CPU (sd, 0)->unit = unit;
-  STATE_CPU (sd, 0)->left_kills_right_p = 0;
-  STATE_CPU (sd, 0)->mvtsys_left_p = 0;
-  nia = s_idecode_issue(sd,
-			insn1,
-			cia);
-
-  unqueue_writes (sd, STATE_CPU (sd, 0), cia);
-
-  /* Only do the second instruction if the PC has not changed */
-  if ((nia == INVALID_INSTRUCTION_ADDRESS) &&
-      (! STATE_CPU (sd, 0)->left_kills_right_p)) {
-    STATE_CPU (sd, 0)->unit = any_unit;
-    nia = s_idecode_issue (sd,
-			   insn2,
-			   cia);
-
-    unqueue_writes (sd, STATE_CPU (sd, 0), cia);
-  }
-
-  STATE_CPU (sd, 0)->left_kills_right_p = 0;
-  STATE_CPU (sd, 0)->mvtsys_left_p = 0;
-  return nia;
-}
-
-static address_word
-do_parallel (SIM_DESC sd,
-	     s_instruction_word left_insn,
-	     s_instruction_word right_insn,
-	     address_word cia)
-{
-  address_word nia_left;
-  address_word nia_right;
-  address_word nia;
-
-  /* run the first instruction */
-  STATE_CPU (sd, 0)->unit = memory_unit;
-  STATE_CPU (sd, 0)->left_kills_right_p = 0;
-  STATE_CPU (sd, 0)->mvtsys_left_p = 0;
-  nia_left = s_idecode_issue(sd,
-			     left_insn,
-			     cia);
-
-  /* run the second instruction */
-  STATE_CPU (sd, 0)->unit = integer_unit;
-  nia_right = s_idecode_issue(sd,
-			      right_insn,
-			      cia);
-
-  /* merge the PC's */
-  if (nia_left == INVALID_INSTRUCTION_ADDRESS) {
-    if (nia_right == INVALID_INSTRUCTION_ADDRESS)
-      nia = INVALID_INSTRUCTION_ADDRESS;
-    else
-      nia = nia_right;
-  }
-  else {
-    if (nia_right == INVALID_INSTRUCTION_ADDRESS)
-      nia = nia_left;
-    else {
-      sim_engine_abort (sd, STATE_CPU (sd, 0), cia, "parallel jumps");
-      nia = INVALID_INSTRUCTION_ADDRESS;
-    }
-  }
-
-  unqueue_writes (sd, STATE_CPU (sd, 0), cia);
-  return nia;
-}
-
-
-typedef enum {
-  p_insn = 0,
-  long_insn = 3,
-  l_r_insn = 1,
-  r_l_insn = 2,
-} instruction_types;
-
-STATIC_INLINE instruction_types
-instruction_type(l_instruction_word insn)
-{
-  int fm0 = MASKED64(insn, 0, 0) != 0;
-  int fm1 = MASKED64(insn, 32, 32) != 0;
-  return ((fm0 << 1) | fm1);
-}
-
-
-
-void
-sim_engine_run (SIM_DESC sd,
-		int last_cpu_nr,
-		int nr_cpus,
-		int siggnal)
-{
-  while (1)
-    {
-      address_word cia = PC;
-      address_word nia;
-      l_instruction_word insn = IMEM(cia);
-      int rp_was_set;
-      int rpt_c_was_nonzero;
-
-      /* Before executing the instruction, we need to test whether or
-	 not RPT_C is greater than zero, and save that state for use
-	 after executing the instruction.  In particular, we need to
-	 not care whether the instruction changes RPT_C itself. */
-
-      rpt_c_was_nonzero = (RPT_C > 0);
-
-      /* Before executing the instruction, we need to check to see if
-	 we have to decrement RPT_C, the repeat count register.  Do this
-	 if PC == RPT_E, but only if we are in an active repeat block. */
-
-      if (PC == RPT_E &&
-	  (RPT_C > 0 || PSW_VAL (PSW_RP) != 0))
-	{
-	  RPT_C --;
-	}
-      
-      /* Now execute the instruction at PC */
-
-      switch (instruction_type (insn))
-	{
-	case long_insn:
-	  nia = do_long (sd, insn, cia);
-	  break;
-	case r_l_insn:
-	  /* L <- R */
-	  nia = do_2_short (sd, insn, insn >> 32, integer_unit, cia);
-	  break;
-	case l_r_insn:
-	  /* L -> R */
-	  nia = do_2_short (sd, insn >> 32, insn, memory_unit, cia);
-	  break;
-	case p_insn:
-	  nia = do_parallel (sd, insn >> 32, insn, cia);
-	  break;
-	default:
-	  sim_engine_abort (sd, STATE_CPU (sd, 0), cia,
-			    "internal error - engine_run_until_stop - bad switch");
-	  nia = -1;
-	}
-
-      if (TRACE_ACTION)
-	{
-	  if (TRACE_ACTION & TRACE_ACTION_CALL)
-	    call_occurred (sd, STATE_CPU (sd, 0), cia, nia);
-
-	  if (TRACE_ACTION & TRACE_ACTION_RETURN)
-	    return_occurred (sd, STATE_CPU (sd, 0), cia, nia);
-
-	  TRACE_ACTION = 0;
-	}
-
-      /* Check now to see if we need to reset the RP bit in the PSW.
-	 There are three conditions for this, the RP bit is already
-	 set (just a speed optimization), the instruction we just
-	 executed is the last instruction in the loop, and the repeat
-	 count is currently zero. */
-
-      rp_was_set = PSW_VAL (PSW_RP);
-      if (rp_was_set && (PC == RPT_E) && RPT_C == 0)
-	{
-	  PSW_SET (PSW_RP, 0);
-	}
-
-      /* Now update the PC.  If we just executed a jump instruction,
-	 that takes precedence over everything else.  Next comes
-	 branching back to RPT_S as a result of a loop.  Finally, the
-	 default is to simply advance to the next inline
-	 instruction. */
-
-      if (nia != INVALID_INSTRUCTION_ADDRESS)
-	{
-	  PC = nia;
-	}
-      else if (rp_was_set && rpt_c_was_nonzero && (PC == RPT_E))
-	{
-	  PC = RPT_S;
-	}
-      else
-	{
-	  PC = cia + 8;
-	}
-
-      /* Check for DDBT (debugger debug trap) condition.  Do this after
-	 the repeat block checks so the excursion to the trap handler does
-	 not alter looping state. */
-
-      if (cia == IBA && PSW_VAL (PSW_DB))
-	{
-	  DPC = PC;
-	  PSW_SET (PSW_EA, 1);
-	  DPSW = PSW;
-	  /* clear all bits in PSW except SM */
-	  PSW &= BIT32 (PSW_SM);
-	  /* add DS bit */
-	  PSW |= BIT32 (PSW_DS);
-	  /* dispatch to DDBT handler */
-	  PC = 0xfffff128; /* debugger_debug_trap_address */
-	}
-
-      /* process any events */
-      /* FIXME - should L->R or L<-R insns count as two cycles? */
-      if (sim_events_tick (sd))
-	{
-	  sim_events_process (sd);
-	}
-    }  
-}
-
-
-/* d30v external interrupt handler.
-
-   Note: This should be replaced by a proper interrupt delivery
-   mechanism.  This interrupt mechanism discards later interrupts if
-   an earlier interrupt hasn't been delivered.
-
-   Note: This interrupt mechanism does not reset its self when the
-   simulator is re-opened. */
-
-void
-d30v_interrupt_event (SIM_DESC sd,
-		      void *data)
-{
-  if (PSW_VAL (PSW_IE))
-    /* interrupts not masked */
-    {
-      /* scrub any pending interrupt */
-      if (sd->pending_interrupt != NULL)
-	sim_events_deschedule (sd, sd->pending_interrupt);
-      /* deliver */
-      bPSW = PSW;
-      bPC = PC;
-      PSW = 0;
-      PC = 0xfffff138; /* external interrupt */
-      do_stack_swap (sd);
-    }
-  else if (sd->pending_interrupt == NULL)
-    /* interrupts masked and no interrupt pending */
-    {
-      sd->pending_interrupt = sim_events_schedule (sd, 1,
-						   d30v_interrupt_event,
-						   data);
-    }
-}
-
-#endif
+/* OBSOLETE /*  This file is part of the program psim. */
+/* OBSOLETE  */
+/* OBSOLETE     Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au> */
+/* OBSOLETE     Copyright (C) 1996, 1997, Free Software Foundation */
+/* OBSOLETE  */
+/* OBSOLETE     This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE     it under the terms of the GNU General Public License as published by */
+/* OBSOLETE     the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE     (at your option) any later version. */
+/* OBSOLETE  */
+/* OBSOLETE     This program is distributed in the hope that it will be useful, */
+/* OBSOLETE     but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE     GNU General Public License for more details. */
+/* OBSOLETE   */
+/* OBSOLETE     You should have received a copy of the GNU General Public License */
+/* OBSOLETE     along with this program; if not, write to the Free Software */
+/* OBSOLETE     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* OBSOLETE   */
+/* OBSOLETE     */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef ENGINE_C */
+/* OBSOLETE #define ENGINE_C */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-main.h" */
+/* OBSOLETE  */
+/* OBSOLETE #include <stdio.h> */
+/* OBSOLETE #include <ctype.h> */
+/* OBSOLETE  */
+/* OBSOLETE #ifdef HAVE_STDLIB_H */
+/* OBSOLETE #include <stdlib.h> */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE #ifdef HAVE_STRING_H */
+/* OBSOLETE #include <string.h> */
+/* OBSOLETE #else */
+/* OBSOLETE #ifdef HAVE_STRINGS_H */
+/* OBSOLETE #include <strings.h> */
+/* OBSOLETE #endif */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE static void */
+/* OBSOLETE do_stack_swap (SIM_DESC sd) */
+/* OBSOLETE { */
+/* OBSOLETE   sim_cpu *cpu = STATE_CPU (sd, 0); */
+/* OBSOLETE   unsigned new_sp = (PSW_VAL(PSW_SM) != 0); */
+/* OBSOLETE   if (cpu->regs.current_sp != new_sp) */
+/* OBSOLETE     { */
+/* OBSOLETE       cpu->regs.sp[cpu->regs.current_sp] = SP; */
+/* OBSOLETE       cpu->regs.current_sp = new_sp; */
+/* OBSOLETE       SP = cpu->regs.sp[cpu->regs.current_sp]; */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE #if WITH_TRACE */
+/* OBSOLETE /* Implement ALU tracing of 32-bit registers.  */ */
+/* OBSOLETE static void */
+/* OBSOLETE trace_alu32 (SIM_DESC sd, */
+/* OBSOLETE 	     sim_cpu *cpu, */
+/* OBSOLETE 	     address_word cia, */
+/* OBSOLETE 	     unsigned32 *ptr) */
+/* OBSOLETE { */
+/* OBSOLETE   unsigned32 value = *ptr; */
+/* OBSOLETE  */
+/* OBSOLETE   if (ptr >= &GPR[0] && ptr <= &GPR[NR_GENERAL_PURPOSE_REGISTERS]) */
+/* OBSOLETE     trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu", */
+/* OBSOLETE 		    "Set register r%-2d = 0x%.8lx (%ld)", */
+/* OBSOLETE 		    ptr - &GPR[0], (long)value, (long)value); */
+/* OBSOLETE  */
+/* OBSOLETE   else if (ptr == &PSW || ptr == &bPSW || ptr == &DPSW) */
+/* OBSOLETE     trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu", */
+/* OBSOLETE 		    "Set register %s = 0x%.8lx%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", */
+/* OBSOLETE 		    (ptr == &PSW) ? "psw" : ((ptr == &bPSW) ? "bpsw" : "dpsw"), */
+/* OBSOLETE 		    (long)value, */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_SM)) ? ", sm" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_EA)) ? ", ea" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_DB)) ? ", db" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_DS)) ? ", ds" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_IE)) ? ", ie" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_RP)) ? ", rp" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_MD)) ? ", md" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_F0)) ? ", f0" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_F1)) ? ", f1" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_F2)) ? ", f2" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_F3)) ? ", f3" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_S))  ? ", s"  : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_V))  ? ", v"  : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_VA)) ? ", va" : "", */
+/* OBSOLETE 		    (value & (0x80000000 >> PSW_C))  ? ", c"  : ""); */
+/* OBSOLETE  */
+/* OBSOLETE   else if (ptr >= &CREG[0] && ptr <= &CREG[NR_CONTROL_REGISTERS]) */
+/* OBSOLETE     trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu", */
+/* OBSOLETE 		    "Set register cr%d = 0x%.8lx (%ld)", */
+/* OBSOLETE 		    ptr - &CREG[0], (long)value, (long)value); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Implement ALU tracing of 32-bit registers.  */ */
+/* OBSOLETE static void */
+/* OBSOLETE trace_alu64 (SIM_DESC sd, */
+/* OBSOLETE 	     sim_cpu *cpu, */
+/* OBSOLETE 	     address_word cia, */
+/* OBSOLETE 	     unsigned64 *ptr) */
+/* OBSOLETE { */
+/* OBSOLETE   unsigned64 value = *ptr; */
+/* OBSOLETE  */
+/* OBSOLETE   if (ptr >= &ACC[0] && ptr <= &ACC[NR_ACCUMULATORS]) */
+/* OBSOLETE     trace_one_insn (sd, cpu, cia, 1, "engine.c", __LINE__, "alu", */
+/* OBSOLETE 		    "Set register a%-2d = 0x%.8lx 0x%.8lx", */
+/* OBSOLETE 		    ptr - &ACC[0], */
+/* OBSOLETE 		    (unsigned long)(unsigned32)(value >> 32), */
+/* OBSOLETE 		    (unsigned long)(unsigned32)value); */
+/* OBSOLETE  */
+/* OBSOLETE } */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE /* Process all of the queued up writes in order now */ */
+/* OBSOLETE void */
+/* OBSOLETE unqueue_writes (SIM_DESC sd, */
+/* OBSOLETE 		sim_cpu *cpu, */
+/* OBSOLETE 		address_word cia) */
+/* OBSOLETE { */
+/* OBSOLETE   int i, num; */
+/* OBSOLETE   int did_psw = 0; */
+/* OBSOLETE   unsigned32 *psw_addr = &PSW; */
+/* OBSOLETE  */
+/* OBSOLETE   num = WRITE32_NUM; */
+/* OBSOLETE   for (i = 0; i < num; i++) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned32 mask = WRITE32_MASK (i); */
+/* OBSOLETE       unsigned32 *ptr = WRITE32_PTR (i); */
+/* OBSOLETE       unsigned32 value = (*ptr & ~mask) | (WRITE32_VALUE (i) & mask); */
+/* OBSOLETE       int j; */
+/* OBSOLETE  */
+/* OBSOLETE       if (ptr == psw_addr) */
+/* OBSOLETE        { */
+/* OBSOLETE 	 /* If MU instruction was not a MVTSYS, resolve PSW */
+/* OBSOLETE              contention in favour of IU. */ */
+/* OBSOLETE 	  if(! STATE_CPU (sd, 0)->mvtsys_left_p) */
+/* OBSOLETE 	    { */
+/* OBSOLETE 	      /* Detect contention in parallel writes to the same PSW flags. */
+/* OBSOLETE 		 The hardware allows the updates from IU to prevail over */
+/* OBSOLETE 		 those from MU. */ */
+/* OBSOLETE 	       */
+/* OBSOLETE 	      unsigned32 flag_bits = */
+/* OBSOLETE 		BIT32 (PSW_F0) | BIT32 (PSW_F1) | */
+/* OBSOLETE 		BIT32 (PSW_F2) | BIT32 (PSW_F3) | */
+/* OBSOLETE 		BIT32 (PSW_S) | BIT32 (PSW_V) | */
+/* OBSOLETE 		BIT32 (PSW_VA) | BIT32 (PSW_C); */
+/* OBSOLETE 	      unsigned32 my_flag_bits = mask & flag_bits; */
+/* OBSOLETE 	       */
+/* OBSOLETE 	      for (j = i + 1; j < num; j++) */
+/* OBSOLETE 		if (WRITE32_PTR (j) == psw_addr && /* write to PSW */ */
+/* OBSOLETE 		    WRITE32_MASK (j) & my_flag_bits)  /* some of the same flags */ */
+/* OBSOLETE 		  { */
+/* OBSOLETE 		    /* Recompute local mask & value, to suppress this */
+/* OBSOLETE 		       earlier write to the same flag bits. */ */
+/* OBSOLETE 		     */
+/* OBSOLETE 		    unsigned32 new_mask = mask & ~(WRITE32_MASK (j) & my_flag_bits); */
+/* OBSOLETE 		     */
+/* OBSOLETE 		    /* There is a special case for the VA (accumulated */
+/* OBSOLETE 		       overflow) flag, in that it is only included in the */
+/* OBSOLETE 		       second instruction's mask if the overflow */
+/* OBSOLETE 		       occurred.  Yet the hardware still suppresses the */
+/* OBSOLETE 		       first instruction's update to VA.  So we kludge */
+/* OBSOLETE 		       this by inferring PSW_V -> PSW_VA for the second */
+/* OBSOLETE 		       instruction. */ */
+/* OBSOLETE 		     */
+/* OBSOLETE 		    if (WRITE32_MASK (j) & BIT32 (PSW_V)) */
+/* OBSOLETE 		      { */
+/* OBSOLETE 			new_mask &= ~BIT32 (PSW_VA); */
+/* OBSOLETE 		      } */
+/* OBSOLETE 		     */
+/* OBSOLETE 		    value = (*ptr & ~new_mask) | (WRITE32_VALUE (i) & new_mask); */
+/* OBSOLETE 		  } */
+/* OBSOLETE 	    } */
+/* OBSOLETE 	   */
+/* OBSOLETE          did_psw = 1; */
+/* OBSOLETE        } */
+/* OBSOLETE  */
+/* OBSOLETE       *ptr = value; */
+/* OBSOLETE  */
+/* OBSOLETE #if WITH_TRACE */
+/* OBSOLETE       if (TRACE_ALU_P (cpu)) */
+/* OBSOLETE 	trace_alu32 (sd, cpu, cia, ptr); */
+/* OBSOLETE #endif */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   num = WRITE64_NUM; */
+/* OBSOLETE   for (i = 0; i < num; i++) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned64 *ptr = WRITE64_PTR (i); */
+/* OBSOLETE       *ptr = WRITE64_VALUE (i); */
+/* OBSOLETE  */
+/* OBSOLETE #if WITH_TRACE */
+/* OBSOLETE       if (TRACE_ALU_P (cpu)) */
+/* OBSOLETE 	trace_alu64 (sd, cpu, cia, ptr); */
+/* OBSOLETE #endif */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   WRITE32_NUM = 0; */
+/* OBSOLETE   WRITE64_NUM = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   if (DID_TRAP == 1) /* ordinary trap */ */
+/* OBSOLETE     { */
+/* OBSOLETE       bPSW = PSW; */
+/* OBSOLETE       PSW &= (BIT32 (PSW_DB) | BIT32 (PSW_SM)); */
+/* OBSOLETE       did_psw = 1; */
+/* OBSOLETE     } */
+/* OBSOLETE   else if (DID_TRAP == 2) /* debug trap */ */
+/* OBSOLETE     { */
+/* OBSOLETE       DPSW = PSW; */
+/* OBSOLETE       PSW &= BIT32 (PSW_DS); */
+/* OBSOLETE       PSW |= BIT32 (PSW_DS); */
+/* OBSOLETE       did_psw = 1; */
+/* OBSOLETE     } */
+/* OBSOLETE   DID_TRAP = 0; */
+/* OBSOLETE  */
+/* OBSOLETE   if (did_psw) */
+/* OBSOLETE     do_stack_swap (sd); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* SIMULATE INSTRUCTIONS, various different ways of achieving the same */
+/* OBSOLETE    thing */ */
+/* OBSOLETE  */
+/* OBSOLETE static address_word */
+/* OBSOLETE do_long (SIM_DESC sd, */
+/* OBSOLETE 	 l_instruction_word instruction, */
+/* OBSOLETE 	 address_word cia) */
+/* OBSOLETE { */
+/* OBSOLETE   address_word nia = l_idecode_issue(sd, */
+/* OBSOLETE 				     instruction, */
+/* OBSOLETE 				     cia); */
+/* OBSOLETE  */
+/* OBSOLETE   unqueue_writes (sd, STATE_CPU (sd, 0), cia); */
+/* OBSOLETE   return nia; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static address_word */
+/* OBSOLETE do_2_short (SIM_DESC sd, */
+/* OBSOLETE 	    s_instruction_word insn1, */
+/* OBSOLETE 	    s_instruction_word insn2, */
+/* OBSOLETE 	    cpu_units unit, */
+/* OBSOLETE 	    address_word cia) */
+/* OBSOLETE { */
+/* OBSOLETE   address_word nia; */
+/* OBSOLETE  */
+/* OBSOLETE   /* run the first instruction */ */
+/* OBSOLETE   STATE_CPU (sd, 0)->unit = unit; */
+/* OBSOLETE   STATE_CPU (sd, 0)->left_kills_right_p = 0; */
+/* OBSOLETE   STATE_CPU (sd, 0)->mvtsys_left_p = 0; */
+/* OBSOLETE   nia = s_idecode_issue(sd, */
+/* OBSOLETE 			insn1, */
+/* OBSOLETE 			cia); */
+/* OBSOLETE  */
+/* OBSOLETE   unqueue_writes (sd, STATE_CPU (sd, 0), cia); */
+/* OBSOLETE  */
+/* OBSOLETE   /* Only do the second instruction if the PC has not changed */ */
+/* OBSOLETE   if ((nia == INVALID_INSTRUCTION_ADDRESS) && */
+/* OBSOLETE       (! STATE_CPU (sd, 0)->left_kills_right_p)) { */
+/* OBSOLETE     STATE_CPU (sd, 0)->unit = any_unit; */
+/* OBSOLETE     nia = s_idecode_issue (sd, */
+/* OBSOLETE 			   insn2, */
+/* OBSOLETE 			   cia); */
+/* OBSOLETE  */
+/* OBSOLETE     unqueue_writes (sd, STATE_CPU (sd, 0), cia); */
+/* OBSOLETE   } */
+/* OBSOLETE  */
+/* OBSOLETE   STATE_CPU (sd, 0)->left_kills_right_p = 0; */
+/* OBSOLETE   STATE_CPU (sd, 0)->mvtsys_left_p = 0; */
+/* OBSOLETE   return nia; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static address_word */
+/* OBSOLETE do_parallel (SIM_DESC sd, */
+/* OBSOLETE 	     s_instruction_word left_insn, */
+/* OBSOLETE 	     s_instruction_word right_insn, */
+/* OBSOLETE 	     address_word cia) */
+/* OBSOLETE { */
+/* OBSOLETE   address_word nia_left; */
+/* OBSOLETE   address_word nia_right; */
+/* OBSOLETE   address_word nia; */
+/* OBSOLETE  */
+/* OBSOLETE   /* run the first instruction */ */
+/* OBSOLETE   STATE_CPU (sd, 0)->unit = memory_unit; */
+/* OBSOLETE   STATE_CPU (sd, 0)->left_kills_right_p = 0; */
+/* OBSOLETE   STATE_CPU (sd, 0)->mvtsys_left_p = 0; */
+/* OBSOLETE   nia_left = s_idecode_issue(sd, */
+/* OBSOLETE 			     left_insn, */
+/* OBSOLETE 			     cia); */
+/* OBSOLETE  */
+/* OBSOLETE   /* run the second instruction */ */
+/* OBSOLETE   STATE_CPU (sd, 0)->unit = integer_unit; */
+/* OBSOLETE   nia_right = s_idecode_issue(sd, */
+/* OBSOLETE 			      right_insn, */
+/* OBSOLETE 			      cia); */
+/* OBSOLETE  */
+/* OBSOLETE   /* merge the PC's */ */
+/* OBSOLETE   if (nia_left == INVALID_INSTRUCTION_ADDRESS) { */
+/* OBSOLETE     if (nia_right == INVALID_INSTRUCTION_ADDRESS) */
+/* OBSOLETE       nia = INVALID_INSTRUCTION_ADDRESS; */
+/* OBSOLETE     else */
+/* OBSOLETE       nia = nia_right; */
+/* OBSOLETE   } */
+/* OBSOLETE   else { */
+/* OBSOLETE     if (nia_right == INVALID_INSTRUCTION_ADDRESS) */
+/* OBSOLETE       nia = nia_left; */
+/* OBSOLETE     else { */
+/* OBSOLETE       sim_engine_abort (sd, STATE_CPU (sd, 0), cia, "parallel jumps"); */
+/* OBSOLETE       nia = INVALID_INSTRUCTION_ADDRESS; */
+/* OBSOLETE     } */
+/* OBSOLETE   } */
+/* OBSOLETE  */
+/* OBSOLETE   unqueue_writes (sd, STATE_CPU (sd, 0), cia); */
+/* OBSOLETE   return nia; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE typedef enum { */
+/* OBSOLETE   p_insn = 0, */
+/* OBSOLETE   long_insn = 3, */
+/* OBSOLETE   l_r_insn = 1, */
+/* OBSOLETE   r_l_insn = 2, */
+/* OBSOLETE } instruction_types; */
+/* OBSOLETE  */
+/* OBSOLETE STATIC_INLINE instruction_types */
+/* OBSOLETE instruction_type(l_instruction_word insn) */
+/* OBSOLETE { */
+/* OBSOLETE   int fm0 = MASKED64(insn, 0, 0) != 0; */
+/* OBSOLETE   int fm1 = MASKED64(insn, 32, 32) != 0; */
+/* OBSOLETE   return ((fm0 << 1) | fm1); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE sim_engine_run (SIM_DESC sd, */
+/* OBSOLETE 		int last_cpu_nr, */
+/* OBSOLETE 		int nr_cpus, */
+/* OBSOLETE 		int siggnal) */
+/* OBSOLETE { */
+/* OBSOLETE   while (1) */
+/* OBSOLETE     { */
+/* OBSOLETE       address_word cia = PC; */
+/* OBSOLETE       address_word nia; */
+/* OBSOLETE       l_instruction_word insn = IMEM(cia); */
+/* OBSOLETE       int rp_was_set; */
+/* OBSOLETE       int rpt_c_was_nonzero; */
+/* OBSOLETE  */
+/* OBSOLETE       /* Before executing the instruction, we need to test whether or */
+/* OBSOLETE 	 not RPT_C is greater than zero, and save that state for use */
+/* OBSOLETE 	 after executing the instruction.  In particular, we need to */
+/* OBSOLETE 	 not care whether the instruction changes RPT_C itself. */ */
+/* OBSOLETE  */
+/* OBSOLETE       rpt_c_was_nonzero = (RPT_C > 0); */
+/* OBSOLETE  */
+/* OBSOLETE       /* Before executing the instruction, we need to check to see if */
+/* OBSOLETE 	 we have to decrement RPT_C, the repeat count register.  Do this */
+/* OBSOLETE 	 if PC == RPT_E, but only if we are in an active repeat block. */ */
+/* OBSOLETE  */
+/* OBSOLETE       if (PC == RPT_E && */
+/* OBSOLETE 	  (RPT_C > 0 || PSW_VAL (PSW_RP) != 0)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  RPT_C --; */
+/* OBSOLETE 	} */
+/* OBSOLETE        */
+/* OBSOLETE       /* Now execute the instruction at PC */ */
+/* OBSOLETE  */
+/* OBSOLETE       switch (instruction_type (insn)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	case long_insn: */
+/* OBSOLETE 	  nia = do_long (sd, insn, cia); */
+/* OBSOLETE 	  break; */
+/* OBSOLETE 	case r_l_insn: */
+/* OBSOLETE 	  /* L <- R */ */
+/* OBSOLETE 	  nia = do_2_short (sd, insn, insn >> 32, integer_unit, cia); */
+/* OBSOLETE 	  break; */
+/* OBSOLETE 	case l_r_insn: */
+/* OBSOLETE 	  /* L -> R */ */
+/* OBSOLETE 	  nia = do_2_short (sd, insn >> 32, insn, memory_unit, cia); */
+/* OBSOLETE 	  break; */
+/* OBSOLETE 	case p_insn: */
+/* OBSOLETE 	  nia = do_parallel (sd, insn >> 32, insn, cia); */
+/* OBSOLETE 	  break; */
+/* OBSOLETE 	default: */
+/* OBSOLETE 	  sim_engine_abort (sd, STATE_CPU (sd, 0), cia, */
+/* OBSOLETE 			    "internal error - engine_run_until_stop - bad switch"); */
+/* OBSOLETE 	  nia = -1; */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       if (TRACE_ACTION) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  if (TRACE_ACTION & TRACE_ACTION_CALL) */
+/* OBSOLETE 	    call_occurred (sd, STATE_CPU (sd, 0), cia, nia); */
+/* OBSOLETE  */
+/* OBSOLETE 	  if (TRACE_ACTION & TRACE_ACTION_RETURN) */
+/* OBSOLETE 	    return_occurred (sd, STATE_CPU (sd, 0), cia, nia); */
+/* OBSOLETE  */
+/* OBSOLETE 	  TRACE_ACTION = 0; */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       /* Check now to see if we need to reset the RP bit in the PSW. */
+/* OBSOLETE 	 There are three conditions for this, the RP bit is already */
+/* OBSOLETE 	 set (just a speed optimization), the instruction we just */
+/* OBSOLETE 	 executed is the last instruction in the loop, and the repeat */
+/* OBSOLETE 	 count is currently zero. */ */
+/* OBSOLETE  */
+/* OBSOLETE       rp_was_set = PSW_VAL (PSW_RP); */
+/* OBSOLETE       if (rp_was_set && (PC == RPT_E) && RPT_C == 0) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  PSW_SET (PSW_RP, 0); */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       /* Now update the PC.  If we just executed a jump instruction, */
+/* OBSOLETE 	 that takes precedence over everything else.  Next comes */
+/* OBSOLETE 	 branching back to RPT_S as a result of a loop.  Finally, the */
+/* OBSOLETE 	 default is to simply advance to the next inline */
+/* OBSOLETE 	 instruction. */ */
+/* OBSOLETE  */
+/* OBSOLETE       if (nia != INVALID_INSTRUCTION_ADDRESS) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  PC = nia; */
+/* OBSOLETE 	} */
+/* OBSOLETE       else if (rp_was_set && rpt_c_was_nonzero && (PC == RPT_E)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  PC = RPT_S; */
+/* OBSOLETE 	} */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  PC = cia + 8; */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       /* Check for DDBT (debugger debug trap) condition.  Do this after */
+/* OBSOLETE 	 the repeat block checks so the excursion to the trap handler does */
+/* OBSOLETE 	 not alter looping state. */ */
+/* OBSOLETE  */
+/* OBSOLETE       if (cia == IBA && PSW_VAL (PSW_DB)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  DPC = PC; */
+/* OBSOLETE 	  PSW_SET (PSW_EA, 1); */
+/* OBSOLETE 	  DPSW = PSW; */
+/* OBSOLETE 	  /* clear all bits in PSW except SM */ */
+/* OBSOLETE 	  PSW &= BIT32 (PSW_SM); */
+/* OBSOLETE 	  /* add DS bit */ */
+/* OBSOLETE 	  PSW |= BIT32 (PSW_DS); */
+/* OBSOLETE 	  /* dispatch to DDBT handler */ */
+/* OBSOLETE 	  PC = 0xfffff128; /* debugger_debug_trap_address */ */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       /* process any events */ */
+/* OBSOLETE       /* FIXME - should L->R or L<-R insns count as two cycles? */ */
+/* OBSOLETE       if (sim_events_tick (sd)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  sim_events_process (sd); */
+/* OBSOLETE 	} */
+/* OBSOLETE     }   */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* d30v external interrupt handler. */
+/* OBSOLETE  */
+/* OBSOLETE    Note: This should be replaced by a proper interrupt delivery */
+/* OBSOLETE    mechanism.  This interrupt mechanism discards later interrupts if */
+/* OBSOLETE    an earlier interrupt hasn't been delivered. */
+/* OBSOLETE  */
+/* OBSOLETE    Note: This interrupt mechanism does not reset its self when the */
+/* OBSOLETE    simulator is re-opened. */ */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE d30v_interrupt_event (SIM_DESC sd, */
+/* OBSOLETE 		      void *data) */
+/* OBSOLETE { */
+/* OBSOLETE   if (PSW_VAL (PSW_IE)) */
+/* OBSOLETE     /* interrupts not masked */ */
+/* OBSOLETE     { */
+/* OBSOLETE       /* scrub any pending interrupt */ */
+/* OBSOLETE       if (sd->pending_interrupt != NULL) */
+/* OBSOLETE 	sim_events_deschedule (sd, sd->pending_interrupt); */
+/* OBSOLETE       /* deliver */ */
+/* OBSOLETE       bPSW = PSW; */
+/* OBSOLETE       bPC = PC; */
+/* OBSOLETE       PSW = 0; */
+/* OBSOLETE       PC = 0xfffff138; /* external interrupt */ */
+/* OBSOLETE       do_stack_swap (sd); */
+/* OBSOLETE     } */
+/* OBSOLETE   else if (sd->pending_interrupt == NULL) */
+/* OBSOLETE     /* interrupts masked and no interrupt pending */ */
+/* OBSOLETE     { */
+/* OBSOLETE       sd->pending_interrupt = sim_events_schedule (sd, 1, */
+/* OBSOLETE 						   d30v_interrupt_event, */
+/* OBSOLETE 						   data); */
+/* OBSOLETE     } */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE #endif */
diff --git a/sim/d30v/ic-d30v b/sim/d30v/ic-d30v
index 50a184f..bdf7ea2 100644
--- a/sim/d30v/ic-d30v
+++ b/sim/d30v/ic-d30v
@@ -1,80 +1,80 @@
-# Instruction cache rules
-#
-#   This file is part of the program psim.
-#
-#   Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-#
-#   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.
-#
-compute:RA:RA::
-compute:RA:Ra:signed32 *:(&GPR[RA])
-compute:RA:RaH:signed16 *:AH2_4(Ra)
-compute:RA:RaL:signed16 *:AL2_4(Ra)
-compute:RA:val_Ra:signed32:(RA == 0 ? 0 : GPR[RA])
-#
-compute:RB:RB::
-compute:RB:Rb:signed32:(RB == 0 ? 0 : GPR[RB])
-compute:RB:RbU:unsigned32:(RB == 0 ? 0 : GPR[RB])
-compute:RB:RbH:signed16:VH2_4(Rb)
-compute:RB:RbL:signed16:VL2_4(Rb)
-compute:RB:RbHU:unsigned16:VH2_4(Rb)
-compute:RB:RbLU:unsigned16:VL2_4(Rb)
-#
-compute:RC:RC::
-compute:RC:Rc:signed32:(RC == 0 ? 0 : GPR[RC])
-compute:RC:RcU:unsigned32:(RC == 0 ? 0 : GPR[RC])
-compute:RC:RcH:signed16:VH2_4(Rc)
-compute:RC:RcL:signed16:VL2_4(Rc)
-#
-#
-compute:IMM_6S:IMM_6S::
-compute:IMM_6S:imm:signed32:SEXT32(IMM_6S, 32 - 6)
-# NB - for short imm[HL] are the same value
-compute:IMM_6S:immHL:signed32:((imm << 16) | MASKED32(imm, 16, 31))
-compute:IMM_6S:immH:signed32:imm
-compute:IMM_6S:immL:signed32:imm
-compute:IMM_6S:imm_6:signed32:IMM_6S
-compute:IMM_6S:imm_5:signed32:LSMASKED32(IMM_6S, 4, 0)
-compute:IMM_6S:imm_6u:unsigned32:(IMM_6S & 0x3f)
-#
-compute:RC:pcdisp:signed32:(Rc & ~0x7)
-compute:RC:pcaddr:signed32:pcdisp
-#
-compute:IMM_18S:IMM_18S::
-compute:IMM_18S:pcdisp:signed32:(SEXT32(IMM_18S, 32 - 18) << 3)
-compute:IMM_18S:pcaddr:signed32:pcdisp
-compute:IMM_12S:IMM_12S::
-compute:IMM_12S:pcdisp:signed32:(SEXT32(IMM_12S, 32 - 12) << 3)
-compute:IMM_12S:pcaddr:signed32:pcdisp
-#
-compute:IMM_8L:IMM_8L::
-compute:IMM_18L:IMM_18L::
-compute:IMM_6L:IMM_6L::
-compute:IMM_6L:imm:signed32:((((IMM_6L << 8) | IMM_8L) << 18) | IMM_18L)
-compute:IMM_6L:immHL:signed32:imm
-compute:IMM_6L:immH:signed32:EXTRACTED32(imm, 0, 15)
-compute:IMM_6L:immL:signed32:EXTRACTED32(imm, 16, 31)
-compute:IMM_6L:pcdisp:signed32:(imm & ~0x7)
-compute:IMM_6L:pcaddr:signed32:pcdisp
-#
-#
-compute:SRC_6:SRC_6::
-compute:SRC_6:src:unsigned32:(XX == 2 ? SEXT32(SRC_6, 32 - 6) : GPR[SRC_6])
-#
-#
-compute:AA:AA::
-compute:AA:Aa:unsigned64*:((CPU)->regs.accumulator + AA)
-compute:AB:AB::
-compute:AB:Ab:unsigned64*:((CPU)->regs.accumulator + AB)
+# OBSOLETE # Instruction cache rules
+# OBSOLETE #
+# OBSOLETE #   This file is part of the program psim.
+# OBSOLETE #
+# OBSOLETE #   Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
+# OBSOLETE #
+# OBSOLETE #   This program is free software; you can redistribute it and/or modify
+# OBSOLETE #   it under the terms of the GNU General Public License as published by
+# OBSOLETE #   the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE #   (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE #   This program is distributed in the hope that it will be useful,
+# OBSOLETE #   but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE #   GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE #   You should have received a copy of the GNU General Public License
+# OBSOLETE #   along with this program; if not, write to the Free Software
+# OBSOLETE #   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE #
+# OBSOLETE compute:RA:RA::
+# OBSOLETE compute:RA:Ra:signed32 *:(&GPR[RA])
+# OBSOLETE compute:RA:RaH:signed16 *:AH2_4(Ra)
+# OBSOLETE compute:RA:RaL:signed16 *:AL2_4(Ra)
+# OBSOLETE compute:RA:val_Ra:signed32:(RA == 0 ? 0 : GPR[RA])
+# OBSOLETE #
+# OBSOLETE compute:RB:RB::
+# OBSOLETE compute:RB:Rb:signed32:(RB == 0 ? 0 : GPR[RB])
+# OBSOLETE compute:RB:RbU:unsigned32:(RB == 0 ? 0 : GPR[RB])
+# OBSOLETE compute:RB:RbH:signed16:VH2_4(Rb)
+# OBSOLETE compute:RB:RbL:signed16:VL2_4(Rb)
+# OBSOLETE compute:RB:RbHU:unsigned16:VH2_4(Rb)
+# OBSOLETE compute:RB:RbLU:unsigned16:VL2_4(Rb)
+# OBSOLETE #
+# OBSOLETE compute:RC:RC::
+# OBSOLETE compute:RC:Rc:signed32:(RC == 0 ? 0 : GPR[RC])
+# OBSOLETE compute:RC:RcU:unsigned32:(RC == 0 ? 0 : GPR[RC])
+# OBSOLETE compute:RC:RcH:signed16:VH2_4(Rc)
+# OBSOLETE compute:RC:RcL:signed16:VL2_4(Rc)
+# OBSOLETE #
+# OBSOLETE #
+# OBSOLETE compute:IMM_6S:IMM_6S::
+# OBSOLETE compute:IMM_6S:imm:signed32:SEXT32(IMM_6S, 32 - 6)
+# OBSOLETE # NB - for short imm[HL] are the same value
+# OBSOLETE compute:IMM_6S:immHL:signed32:((imm << 16) | MASKED32(imm, 16, 31))
+# OBSOLETE compute:IMM_6S:immH:signed32:imm
+# OBSOLETE compute:IMM_6S:immL:signed32:imm
+# OBSOLETE compute:IMM_6S:imm_6:signed32:IMM_6S
+# OBSOLETE compute:IMM_6S:imm_5:signed32:LSMASKED32(IMM_6S, 4, 0)
+# OBSOLETE compute:IMM_6S:imm_6u:unsigned32:(IMM_6S & 0x3f)
+# OBSOLETE #
+# OBSOLETE compute:RC:pcdisp:signed32:(Rc & ~0x7)
+# OBSOLETE compute:RC:pcaddr:signed32:pcdisp
+# OBSOLETE #
+# OBSOLETE compute:IMM_18S:IMM_18S::
+# OBSOLETE compute:IMM_18S:pcdisp:signed32:(SEXT32(IMM_18S, 32 - 18) << 3)
+# OBSOLETE compute:IMM_18S:pcaddr:signed32:pcdisp
+# OBSOLETE compute:IMM_12S:IMM_12S::
+# OBSOLETE compute:IMM_12S:pcdisp:signed32:(SEXT32(IMM_12S, 32 - 12) << 3)
+# OBSOLETE compute:IMM_12S:pcaddr:signed32:pcdisp
+# OBSOLETE #
+# OBSOLETE compute:IMM_8L:IMM_8L::
+# OBSOLETE compute:IMM_18L:IMM_18L::
+# OBSOLETE compute:IMM_6L:IMM_6L::
+# OBSOLETE compute:IMM_6L:imm:signed32:((((IMM_6L << 8) | IMM_8L) << 18) | IMM_18L)
+# OBSOLETE compute:IMM_6L:immHL:signed32:imm
+# OBSOLETE compute:IMM_6L:immH:signed32:EXTRACTED32(imm, 0, 15)
+# OBSOLETE compute:IMM_6L:immL:signed32:EXTRACTED32(imm, 16, 31)
+# OBSOLETE compute:IMM_6L:pcdisp:signed32:(imm & ~0x7)
+# OBSOLETE compute:IMM_6L:pcaddr:signed32:pcdisp
+# OBSOLETE #
+# OBSOLETE #
+# OBSOLETE compute:SRC_6:SRC_6::
+# OBSOLETE compute:SRC_6:src:unsigned32:(XX == 2 ? SEXT32(SRC_6, 32 - 6) : GPR[SRC_6])
+# OBSOLETE #
+# OBSOLETE #
+# OBSOLETE compute:AA:AA::
+# OBSOLETE compute:AA:Aa:unsigned64*:((CPU)->regs.accumulator + AA)
+# OBSOLETE compute:AB:AB::
+# OBSOLETE compute:AB:Ab:unsigned64*:((CPU)->regs.accumulator + AB)
diff --git a/sim/d30v/sim-calls.c b/sim/d30v/sim-calls.c
index d319529..9384376 100644
--- a/sim/d30v/sim-calls.c
+++ b/sim/d30v/sim-calls.c
@@ -1,364 +1,364 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
-    Copyright (C) 1997, Free Software Foundation
-
-    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 <stdarg.h>
-#include <ctype.h>
-
-#include "sim-main.h"
-#include "sim-options.h"
-
-#include "bfd.h"
-#include "sim-utils.h"
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-static unsigned long extmem_size = 1024*1024*8;	/* 8 meg is the maximum listed in the arch. manual */
-
-static const char * get_insn_name (sim_cpu *, int);
-
-#define SIM_ADDR unsigned
-
-
-#define OPTION_TRACE_CALL	200
-#define OPTION_TRACE_TRAPDUMP	201
-#define OPTION_EXTMEM_SIZE	202
-
-static SIM_RC
-d30v_option_handler (SIM_DESC sd,
-		     sim_cpu *cpu,
-		     int opt,
-		     char *arg,
-		     int command_p)
-{
-  char *suffix;
-
-  switch (opt)
-    {
-    default:
-      break;
-
-    case OPTION_TRACE_CALL:
-      if (arg == NULL || strcmp (arg, "yes") == 0 || strcmp (arg, "on") == 0)
-	TRACE_CALL_P = 1;
-      else if (strcmp (arg, "no") == 0 || strcmp (arg, "off") == 0)
-	TRACE_CALL_P = 0;
-      else
-	{
-	  sim_io_eprintf (sd, "Unreconized --trace-call option `%s'\n", arg);
-	  return SIM_RC_FAIL;
-	}
-      return SIM_RC_OK;
-
-    case OPTION_TRACE_TRAPDUMP:
-      if (arg == NULL || strcmp (arg, "yes") == 0 || strcmp (arg, "on") == 0)
-	TRACE_TRAP_P = 1;
-      else if (strcmp (arg, "no") == 0 || strcmp (arg, "off") == 0)
-	TRACE_TRAP_P = 0;
-      else
-	{
-	  sim_io_eprintf (sd, "Unreconized --trace-call option `%s'\n", arg);
-	  return SIM_RC_FAIL;
-	}
-      return SIM_RC_OK;
-
-    case OPTION_EXTMEM_SIZE:
-      if (arg == NULL || !isdigit (*arg))
-	{
-	  sim_io_eprintf (sd, "Invalid memory size `%s'", arg);
-	  return SIM_RC_FAIL;
-	}
-
-      suffix = arg;
-      extmem_size = strtol (arg, &suffix, 0);
-      if (*suffix == 'm' || *suffix == 'M')
-	extmem_size <<= 20;
-      else if (*suffix == 'k' || *suffix == 'K')
-	extmem_size <<= 10;
-      sim_do_commandf (sd, "memory delete 0x80000000");
-      sim_do_commandf (sd, "memory region 0x80000000,0x%lx", extmem_size);
-
-      return SIM_RC_OK;
-    }
-
-  sim_io_eprintf (sd, "Unknown option (%d)\n", opt);
-  return SIM_RC_FAIL;
-}
-
-static const OPTION d30v_options[] =
-{
-  { {"trace-call", optional_argument, NULL, OPTION_TRACE_CALL},
-      '\0', "on|off", "Enable tracing of calls and returns, checking saved registers",
-      d30v_option_handler },
-  { {"trace-trapdump", optional_argument, NULL, OPTION_TRACE_TRAPDUMP},
-      '\0', "on|off",
-#if TRAPDUMP
-    "Traps 0..30 dump out all of the registers (defaults on)",
-#else
-    "Traps 0..30 dump out all of the registers",
-#endif
-      d30v_option_handler },
-  { {"extmem-size", required_argument, NULL, OPTION_EXTMEM_SIZE},
-    '\0', "size", "Change size of external memory, default 8 meg",
-    d30v_option_handler },
-  { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL }
-};
-
-/* Return name of an insn, used by insn profiling.  */
-
-static const char *
-get_insn_name (sim_cpu *cpu, int i)
-{
-  return itable[i].name;
-}
-
-/* Structures used by the simulator, for gdb just have static structures */
-
-SIM_DESC
-sim_open (SIM_OPEN_KIND kind,
-	  host_callback *callback,
-	  struct _bfd *abfd,
-	  char **argv)
-{
-  SIM_DESC sd = sim_state_alloc (kind, callback);
-
-  /* FIXME: watchpoints code shouldn't need this */
-  STATE_WATCHPOINTS (sd)->pc = &(PC);
-  STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
-  STATE_WATCHPOINTS (sd)->interrupt_handler = d30v_interrupt_event;
-
-  /* Initialize the mechanism for doing insn profiling.  */
-  CPU_INSN_NAME (STATE_CPU (sd, 0)) = get_insn_name;
-  CPU_MAX_INSNS (STATE_CPU (sd, 0)) = nr_itable_entries;
-
-#ifdef TRAPDUMP
-  TRACE_TRAP_P = TRAPDUMP;
-#endif
-
-  if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
-    return 0;
-  sim_add_option_table (sd, NULL, d30v_options);
-
-  /* Memory and EEPROM */
-  /* internal instruction RAM - fixed */
-  sim_do_commandf (sd, "memory region 0,0x10000");
-  /* internal data RAM - fixed */
-  sim_do_commandf (sd, "memory region 0x20000000,0x8000");
-  /* control register dummy area */
-  sim_do_commandf (sd, "memory region 0x40000000,0x10000");
-  /* external RAM */
-  sim_do_commandf (sd, "memory region 0x80000000,0x%lx", extmem_size);
-  /* EIT RAM */
-  sim_do_commandf (sd, "memory region 0xfffff000,0x1000");
-
-  /* getopt will print the error message so we just have to exit if this fails.
-     FIXME: Hmmm...  in the case of gdb we need getopt to call
-     print_filtered.  */
-  if (sim_parse_args (sd, argv) != SIM_RC_OK)
-    {
-      /* Uninstall the modules to avoid memory leaks,
-	 file descriptor leaks, etc.  */
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  /* check for/establish the a reference program image */
-  if (sim_analyze_program (sd,
-			   (STATE_PROG_ARGV (sd) != NULL
-			    ? *STATE_PROG_ARGV (sd)
-			    : NULL),
-			   abfd) != SIM_RC_OK)
-    {
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  /* establish any remaining configuration options */
-  if (sim_config (sd) != SIM_RC_OK)
-    {
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  if (sim_post_argv_init (sd) != SIM_RC_OK)
-    {
-      /* Uninstall the modules to avoid memory leaks,
-	 file descriptor leaks, etc.  */
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  return sd;
-}
-
-
-void
-sim_close (SIM_DESC sd, int quitting)
-{
-  /* Uninstall the modules to avoid memory leaks,
-     file descriptor leaks, etc.  */
-  sim_module_uninstall (sd);
-}
-
-
-SIM_RC
-sim_create_inferior (SIM_DESC sd,
-		     struct _bfd *abfd,
-		     char **argv,
-		     char **envp)
-{
-  /* clear all registers */
-  memset (&STATE_CPU (sd, 0)->regs, 0, sizeof (STATE_CPU (sd, 0)->regs));
-  EIT_VB = EIT_VB_DEFAULT;
-  STATE_CPU (sd, 0)->unit = any_unit;
-  sim_module_init (sd);
-  if (abfd != NULL)
-    PC = bfd_get_start_address (abfd);
-  else
-    PC = 0xfffff000; /* reset value */
-  return SIM_RC_OK;
-}
-
-void
-sim_do_command (SIM_DESC sd, char *cmd)
-{
-  if (sim_args_command (sd, cmd) != SIM_RC_OK)
-    sim_io_printf (sd, "Unknown command `%s'\n", cmd);
-}
-
-/* The following register definitions were ripped off from
-   gdb/config/tm-d30v.h.  If any of those defs changes, this table needs to
-   be updated.  */
-
-#define NUM_REGS 86
-
-#define R0_REGNUM	0
-#define FP_REGNUM	11
-#define LR_REGNUM 	62
-#define SP_REGNUM 	63
-#define SPI_REGNUM	64	/* Interrupt stack pointer */
-#define SPU_REGNUM	65	/* User stack pointer */
-#define CREGS_START	66
-
-#define PSW_REGNUM 	(CREGS_START + 0) /* psw, bpsw, or dpsw??? */
-#define    PSW_SM 0x80000000	/* Stack mode: 0 == interrupt (SPI),
-					       1 == user (SPU) */
-#define BPSW_REGNUM	(CREGS_START + 1) /* Backup PSW (on interrupt) */
-#define PC_REGNUM 	(CREGS_START + 2) /* pc, bpc, or dpc??? */
-#define BPC_REGNUM 	(CREGS_START + 3) /* Backup PC (on interrupt) */
-#define DPSW_REGNUM	(CREGS_START + 4) /* Backup PSW (on debug trap) */
-#define DPC_REGNUM 	(CREGS_START + 5) /* Backup PC (on debug trap) */
-#define RPT_C_REGNUM	(CREGS_START + 7) /* Loop count */
-#define RPT_S_REGNUM	(CREGS_START + 8) /* Loop start address*/
-#define RPT_E_REGNUM	(CREGS_START + 9) /* Loop end address */
-#define MOD_S_REGNUM	(CREGS_START + 10)
-#define MOD_E_REGNUM	(CREGS_START + 11)
-#define IBA_REGNUM	(CREGS_START + 14) /* Instruction break address */
-#define EIT_VB_REGNUM	(CREGS_START + 15) /* Vector base address */
-#define INT_S_REGNUM	(CREGS_START + 16) /* Interrupt status */
-#define INT_M_REGNUM	(CREGS_START + 17) /* Interrupt mask */
-#define A0_REGNUM 	84
-#define A1_REGNUM 	85
-
-int
-sim_fetch_register (sd, regno, buf, length)
-     SIM_DESC sd;
-     int regno;
-     unsigned char *buf;
-     int length;
-{
-  if (regno < A0_REGNUM)
-    {
-      unsigned32 reg;
-
-      if (regno <= R0_REGNUM + 63)
-	reg = sd->cpu[0].regs.general_purpose[regno];
-      else if (regno <= SPU_REGNUM)
-	reg = sd->cpu[0].regs.sp[regno - SPI_REGNUM];
-      else
-	reg = sd->cpu[0].regs.control[regno - CREGS_START];
-
-      buf[0] = reg >> 24;
-      buf[1] = reg >> 16;
-      buf[2] = reg >> 8;
-      buf[3] = reg;
-    }
-  else if (regno < NUM_REGS)
-    {
-      unsigned32 reg;
-
-      reg = sd->cpu[0].regs.accumulator[regno - A0_REGNUM] >> 32;
-
-      buf[0] = reg >> 24;
-      buf[1] = reg >> 16;
-      buf[2] = reg >> 8;
-      buf[3] = reg;
-
-      reg = sd->cpu[0].regs.accumulator[regno - A0_REGNUM];
-
-      buf[4] = reg >> 24;
-      buf[5] = reg >> 16;
-      buf[6] = reg >> 8;
-      buf[7] = reg;
-    }
-  else
-    abort ();
-  return -1;
-}
-
-int
-sim_store_register (sd, regno, buf, length)
-     SIM_DESC sd;
-     int regno;
-     unsigned char *buf;
-     int length;
-{
-  if (regno < A0_REGNUM)
-    {
-      unsigned32 reg;
-
-      reg = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
-
-      if (regno <= R0_REGNUM + 63)
-	sd->cpu[0].regs.general_purpose[regno] = reg;
-      else if (regno <= SPU_REGNUM)
-	sd->cpu[0].regs.sp[regno - SPI_REGNUM] = reg;
-      else
-	sd->cpu[0].regs.control[regno - CREGS_START] = reg;
-    }
-  else if (regno < NUM_REGS)
-    {
-      unsigned32 reg;
-
-      reg = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
-
-      sd->cpu[0].regs.accumulator[regno - A0_REGNUM] = (unsigned64)reg << 32;
-
-      reg = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
-
-      sd->cpu[0].regs.accumulator[regno - A0_REGNUM] |= reg;
-    }
-  else
-    abort ();
-  return -1;
-}
+/* OBSOLETE /*  This file is part of the program psim. */
+/* OBSOLETE  */
+/* OBSOLETE     Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au> */
+/* OBSOLETE     Copyright (C) 1997, Free Software Foundation */
+/* OBSOLETE  */
+/* OBSOLETE     This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE     it under the terms of the GNU General Public License as published by */
+/* OBSOLETE     the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE     (at your option) any later version. */
+/* OBSOLETE  */
+/* OBSOLETE     This program is distributed in the hope that it will be useful, */
+/* OBSOLETE     but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE     GNU General Public License for more details. */
+/* OBSOLETE   */
+/* OBSOLETE     You should have received a copy of the GNU General Public License */
+/* OBSOLETE     along with this program; if not, write to the Free Software */
+/* OBSOLETE     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* OBSOLETE   */
+/* OBSOLETE     */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #include <stdarg.h> */
+/* OBSOLETE #include <ctype.h> */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-main.h" */
+/* OBSOLETE #include "sim-options.h" */
+/* OBSOLETE  */
+/* OBSOLETE #include "bfd.h" */
+/* OBSOLETE #include "sim-utils.h" */
+/* OBSOLETE  */
+/* OBSOLETE #ifdef HAVE_STDLIB_H */
+/* OBSOLETE #include <stdlib.h> */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE static unsigned long extmem_size = 1024*1024*8;	/* 8 meg is the maximum listed in the arch. manual */ */
+/* OBSOLETE  */
+/* OBSOLETE static const char * get_insn_name (sim_cpu *, int); */
+/* OBSOLETE  */
+/* OBSOLETE #define SIM_ADDR unsigned */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #define OPTION_TRACE_CALL	200 */
+/* OBSOLETE #define OPTION_TRACE_TRAPDUMP	201 */
+/* OBSOLETE #define OPTION_EXTMEM_SIZE	202 */
+/* OBSOLETE  */
+/* OBSOLETE static SIM_RC */
+/* OBSOLETE d30v_option_handler (SIM_DESC sd, */
+/* OBSOLETE 		     sim_cpu *cpu, */
+/* OBSOLETE 		     int opt, */
+/* OBSOLETE 		     char *arg, */
+/* OBSOLETE 		     int command_p) */
+/* OBSOLETE { */
+/* OBSOLETE   char *suffix; */
+/* OBSOLETE  */
+/* OBSOLETE   switch (opt) */
+/* OBSOLETE     { */
+/* OBSOLETE     default: */
+/* OBSOLETE       break; */
+/* OBSOLETE  */
+/* OBSOLETE     case OPTION_TRACE_CALL: */
+/* OBSOLETE       if (arg == NULL || strcmp (arg, "yes") == 0 || strcmp (arg, "on") == 0) */
+/* OBSOLETE 	TRACE_CALL_P = 1; */
+/* OBSOLETE       else if (strcmp (arg, "no") == 0 || strcmp (arg, "off") == 0) */
+/* OBSOLETE 	TRACE_CALL_P = 0; */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  sim_io_eprintf (sd, "Unreconized --trace-call option `%s'\n", arg); */
+/* OBSOLETE 	  return SIM_RC_FAIL; */
+/* OBSOLETE 	} */
+/* OBSOLETE       return SIM_RC_OK; */
+/* OBSOLETE  */
+/* OBSOLETE     case OPTION_TRACE_TRAPDUMP: */
+/* OBSOLETE       if (arg == NULL || strcmp (arg, "yes") == 0 || strcmp (arg, "on") == 0) */
+/* OBSOLETE 	TRACE_TRAP_P = 1; */
+/* OBSOLETE       else if (strcmp (arg, "no") == 0 || strcmp (arg, "off") == 0) */
+/* OBSOLETE 	TRACE_TRAP_P = 0; */
+/* OBSOLETE       else */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  sim_io_eprintf (sd, "Unreconized --trace-call option `%s'\n", arg); */
+/* OBSOLETE 	  return SIM_RC_FAIL; */
+/* OBSOLETE 	} */
+/* OBSOLETE       return SIM_RC_OK; */
+/* OBSOLETE  */
+/* OBSOLETE     case OPTION_EXTMEM_SIZE: */
+/* OBSOLETE       if (arg == NULL || !isdigit (*arg)) */
+/* OBSOLETE 	{ */
+/* OBSOLETE 	  sim_io_eprintf (sd, "Invalid memory size `%s'", arg); */
+/* OBSOLETE 	  return SIM_RC_FAIL; */
+/* OBSOLETE 	} */
+/* OBSOLETE  */
+/* OBSOLETE       suffix = arg; */
+/* OBSOLETE       extmem_size = strtol (arg, &suffix, 0); */
+/* OBSOLETE       if (*suffix == 'm' || *suffix == 'M') */
+/* OBSOLETE 	extmem_size <<= 20; */
+/* OBSOLETE       else if (*suffix == 'k' || *suffix == 'K') */
+/* OBSOLETE 	extmem_size <<= 10; */
+/* OBSOLETE       sim_do_commandf (sd, "memory delete 0x80000000"); */
+/* OBSOLETE       sim_do_commandf (sd, "memory region 0x80000000,0x%lx", extmem_size); */
+/* OBSOLETE  */
+/* OBSOLETE       return SIM_RC_OK; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   sim_io_eprintf (sd, "Unknown option (%d)\n", opt); */
+/* OBSOLETE   return SIM_RC_FAIL; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE static const OPTION d30v_options[] = */
+/* OBSOLETE { */
+/* OBSOLETE   { {"trace-call", optional_argument, NULL, OPTION_TRACE_CALL}, */
+/* OBSOLETE       '\0', "on|off", "Enable tracing of calls and returns, checking saved registers", */
+/* OBSOLETE       d30v_option_handler }, */
+/* OBSOLETE   { {"trace-trapdump", optional_argument, NULL, OPTION_TRACE_TRAPDUMP}, */
+/* OBSOLETE       '\0', "on|off", */
+/* OBSOLETE #if TRAPDUMP */
+/* OBSOLETE     "Traps 0..30 dump out all of the registers (defaults on)", */
+/* OBSOLETE #else */
+/* OBSOLETE     "Traps 0..30 dump out all of the registers", */
+/* OBSOLETE #endif */
+/* OBSOLETE       d30v_option_handler }, */
+/* OBSOLETE   { {"extmem-size", required_argument, NULL, OPTION_EXTMEM_SIZE}, */
+/* OBSOLETE     '\0', "size", "Change size of external memory, default 8 meg", */
+/* OBSOLETE     d30v_option_handler }, */
+/* OBSOLETE   { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE /* Return name of an insn, used by insn profiling.  */ */
+/* OBSOLETE  */
+/* OBSOLETE static const char * */
+/* OBSOLETE get_insn_name (sim_cpu *cpu, int i) */
+/* OBSOLETE { */
+/* OBSOLETE   return itable[i].name; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* Structures used by the simulator, for gdb just have static structures */ */
+/* OBSOLETE  */
+/* OBSOLETE SIM_DESC */
+/* OBSOLETE sim_open (SIM_OPEN_KIND kind, */
+/* OBSOLETE 	  host_callback *callback, */
+/* OBSOLETE 	  struct _bfd *abfd, */
+/* OBSOLETE 	  char **argv) */
+/* OBSOLETE { */
+/* OBSOLETE   SIM_DESC sd = sim_state_alloc (kind, callback); */
+/* OBSOLETE  */
+/* OBSOLETE   /* FIXME: watchpoints code shouldn't need this */ */
+/* OBSOLETE   STATE_WATCHPOINTS (sd)->pc = &(PC); */
+/* OBSOLETE   STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC); */
+/* OBSOLETE   STATE_WATCHPOINTS (sd)->interrupt_handler = d30v_interrupt_event; */
+/* OBSOLETE  */
+/* OBSOLETE   /* Initialize the mechanism for doing insn profiling.  */ */
+/* OBSOLETE   CPU_INSN_NAME (STATE_CPU (sd, 0)) = get_insn_name; */
+/* OBSOLETE   CPU_MAX_INSNS (STATE_CPU (sd, 0)) = nr_itable_entries; */
+/* OBSOLETE  */
+/* OBSOLETE #ifdef TRAPDUMP */
+/* OBSOLETE   TRACE_TRAP_P = TRAPDUMP; */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE   if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK) */
+/* OBSOLETE     return 0; */
+/* OBSOLETE   sim_add_option_table (sd, NULL, d30v_options); */
+/* OBSOLETE  */
+/* OBSOLETE   /* Memory and EEPROM */ */
+/* OBSOLETE   /* internal instruction RAM - fixed */ */
+/* OBSOLETE   sim_do_commandf (sd, "memory region 0,0x10000"); */
+/* OBSOLETE   /* internal data RAM - fixed */ */
+/* OBSOLETE   sim_do_commandf (sd, "memory region 0x20000000,0x8000"); */
+/* OBSOLETE   /* control register dummy area */ */
+/* OBSOLETE   sim_do_commandf (sd, "memory region 0x40000000,0x10000"); */
+/* OBSOLETE   /* external RAM */ */
+/* OBSOLETE   sim_do_commandf (sd, "memory region 0x80000000,0x%lx", extmem_size); */
+/* OBSOLETE   /* EIT RAM */ */
+/* OBSOLETE   sim_do_commandf (sd, "memory region 0xfffff000,0x1000"); */
+/* OBSOLETE  */
+/* OBSOLETE   /* getopt will print the error message so we just have to exit if this fails. */
+/* OBSOLETE      FIXME: Hmmm...  in the case of gdb we need getopt to call */
+/* OBSOLETE      print_filtered.  */ */
+/* OBSOLETE   if (sim_parse_args (sd, argv) != SIM_RC_OK) */
+/* OBSOLETE     { */
+/* OBSOLETE       /* Uninstall the modules to avoid memory leaks, */
+/* OBSOLETE 	 file descriptor leaks, etc.  */ */
+/* OBSOLETE       sim_module_uninstall (sd); */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* check for/establish the a reference program image */ */
+/* OBSOLETE   if (sim_analyze_program (sd, */
+/* OBSOLETE 			   (STATE_PROG_ARGV (sd) != NULL */
+/* OBSOLETE 			    ? *STATE_PROG_ARGV (sd) */
+/* OBSOLETE 			    : NULL), */
+/* OBSOLETE 			   abfd) != SIM_RC_OK) */
+/* OBSOLETE     { */
+/* OBSOLETE       sim_module_uninstall (sd); */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   /* establish any remaining configuration options */ */
+/* OBSOLETE   if (sim_config (sd) != SIM_RC_OK) */
+/* OBSOLETE     { */
+/* OBSOLETE       sim_module_uninstall (sd); */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   if (sim_post_argv_init (sd) != SIM_RC_OK) */
+/* OBSOLETE     { */
+/* OBSOLETE       /* Uninstall the modules to avoid memory leaks, */
+/* OBSOLETE 	 file descriptor leaks, etc.  */ */
+/* OBSOLETE       sim_module_uninstall (sd); */
+/* OBSOLETE       return 0; */
+/* OBSOLETE     } */
+/* OBSOLETE  */
+/* OBSOLETE   return sd; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE sim_close (SIM_DESC sd, int quitting) */
+/* OBSOLETE { */
+/* OBSOLETE   /* Uninstall the modules to avoid memory leaks, */
+/* OBSOLETE      file descriptor leaks, etc.  */ */
+/* OBSOLETE   sim_module_uninstall (sd); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE SIM_RC */
+/* OBSOLETE sim_create_inferior (SIM_DESC sd, */
+/* OBSOLETE 		     struct _bfd *abfd, */
+/* OBSOLETE 		     char **argv, */
+/* OBSOLETE 		     char **envp) */
+/* OBSOLETE { */
+/* OBSOLETE   /* clear all registers */ */
+/* OBSOLETE   memset (&STATE_CPU (sd, 0)->regs, 0, sizeof (STATE_CPU (sd, 0)->regs)); */
+/* OBSOLETE   EIT_VB = EIT_VB_DEFAULT; */
+/* OBSOLETE   STATE_CPU (sd, 0)->unit = any_unit; */
+/* OBSOLETE   sim_module_init (sd); */
+/* OBSOLETE   if (abfd != NULL) */
+/* OBSOLETE     PC = bfd_get_start_address (abfd); */
+/* OBSOLETE   else */
+/* OBSOLETE     PC = 0xfffff000; /* reset value */ */
+/* OBSOLETE   return SIM_RC_OK; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE void */
+/* OBSOLETE sim_do_command (SIM_DESC sd, char *cmd) */
+/* OBSOLETE { */
+/* OBSOLETE   if (sim_args_command (sd, cmd) != SIM_RC_OK) */
+/* OBSOLETE     sim_io_printf (sd, "Unknown command `%s'\n", cmd); */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE /* The following register definitions were ripped off from */
+/* OBSOLETE    gdb/config/tm-d30v.h.  If any of those defs changes, this table needs to */
+/* OBSOLETE    be updated.  */ */
+/* OBSOLETE  */
+/* OBSOLETE #define NUM_REGS 86 */
+/* OBSOLETE  */
+/* OBSOLETE #define R0_REGNUM	0 */
+/* OBSOLETE #define FP_REGNUM	11 */
+/* OBSOLETE #define LR_REGNUM 	62 */
+/* OBSOLETE #define SP_REGNUM 	63 */
+/* OBSOLETE #define SPI_REGNUM	64	/* Interrupt stack pointer */ */
+/* OBSOLETE #define SPU_REGNUM	65	/* User stack pointer */ */
+/* OBSOLETE #define CREGS_START	66 */
+/* OBSOLETE  */
+/* OBSOLETE #define PSW_REGNUM 	(CREGS_START + 0) /* psw, bpsw, or dpsw??? */ */
+/* OBSOLETE #define    PSW_SM 0x80000000	/* Stack mode: 0 == interrupt (SPI), */
+/* OBSOLETE 					       1 == user (SPU) */ */
+/* OBSOLETE #define BPSW_REGNUM	(CREGS_START + 1) /* Backup PSW (on interrupt) */ */
+/* OBSOLETE #define PC_REGNUM 	(CREGS_START + 2) /* pc, bpc, or dpc??? */ */
+/* OBSOLETE #define BPC_REGNUM 	(CREGS_START + 3) /* Backup PC (on interrupt) */ */
+/* OBSOLETE #define DPSW_REGNUM	(CREGS_START + 4) /* Backup PSW (on debug trap) */ */
+/* OBSOLETE #define DPC_REGNUM 	(CREGS_START + 5) /* Backup PC (on debug trap) */ */
+/* OBSOLETE #define RPT_C_REGNUM	(CREGS_START + 7) /* Loop count */ */
+/* OBSOLETE #define RPT_S_REGNUM	(CREGS_START + 8) /* Loop start address*/ */
+/* OBSOLETE #define RPT_E_REGNUM	(CREGS_START + 9) /* Loop end address */ */
+/* OBSOLETE #define MOD_S_REGNUM	(CREGS_START + 10) */
+/* OBSOLETE #define MOD_E_REGNUM	(CREGS_START + 11) */
+/* OBSOLETE #define IBA_REGNUM	(CREGS_START + 14) /* Instruction break address */ */
+/* OBSOLETE #define EIT_VB_REGNUM	(CREGS_START + 15) /* Vector base address */ */
+/* OBSOLETE #define INT_S_REGNUM	(CREGS_START + 16) /* Interrupt status */ */
+/* OBSOLETE #define INT_M_REGNUM	(CREGS_START + 17) /* Interrupt mask */ */
+/* OBSOLETE #define A0_REGNUM 	84 */
+/* OBSOLETE #define A1_REGNUM 	85 */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE sim_fetch_register (sd, regno, buf, length) */
+/* OBSOLETE      SIM_DESC sd; */
+/* OBSOLETE      int regno; */
+/* OBSOLETE      unsigned char *buf; */
+/* OBSOLETE      int length; */
+/* OBSOLETE { */
+/* OBSOLETE   if (regno < A0_REGNUM) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned32 reg; */
+/* OBSOLETE  */
+/* OBSOLETE       if (regno <= R0_REGNUM + 63) */
+/* OBSOLETE 	reg = sd->cpu[0].regs.general_purpose[regno]; */
+/* OBSOLETE       else if (regno <= SPU_REGNUM) */
+/* OBSOLETE 	reg = sd->cpu[0].regs.sp[regno - SPI_REGNUM]; */
+/* OBSOLETE       else */
+/* OBSOLETE 	reg = sd->cpu[0].regs.control[regno - CREGS_START]; */
+/* OBSOLETE  */
+/* OBSOLETE       buf[0] = reg >> 24; */
+/* OBSOLETE       buf[1] = reg >> 16; */
+/* OBSOLETE       buf[2] = reg >> 8; */
+/* OBSOLETE       buf[3] = reg; */
+/* OBSOLETE     } */
+/* OBSOLETE   else if (regno < NUM_REGS) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned32 reg; */
+/* OBSOLETE  */
+/* OBSOLETE       reg = sd->cpu[0].regs.accumulator[regno - A0_REGNUM] >> 32; */
+/* OBSOLETE  */
+/* OBSOLETE       buf[0] = reg >> 24; */
+/* OBSOLETE       buf[1] = reg >> 16; */
+/* OBSOLETE       buf[2] = reg >> 8; */
+/* OBSOLETE       buf[3] = reg; */
+/* OBSOLETE  */
+/* OBSOLETE       reg = sd->cpu[0].regs.accumulator[regno - A0_REGNUM]; */
+/* OBSOLETE  */
+/* OBSOLETE       buf[4] = reg >> 24; */
+/* OBSOLETE       buf[5] = reg >> 16; */
+/* OBSOLETE       buf[6] = reg >> 8; */
+/* OBSOLETE       buf[7] = reg; */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     abort (); */
+/* OBSOLETE   return -1; */
+/* OBSOLETE } */
+/* OBSOLETE  */
+/* OBSOLETE int */
+/* OBSOLETE sim_store_register (sd, regno, buf, length) */
+/* OBSOLETE      SIM_DESC sd; */
+/* OBSOLETE      int regno; */
+/* OBSOLETE      unsigned char *buf; */
+/* OBSOLETE      int length; */
+/* OBSOLETE { */
+/* OBSOLETE   if (regno < A0_REGNUM) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned32 reg; */
+/* OBSOLETE  */
+/* OBSOLETE       reg = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; */
+/* OBSOLETE  */
+/* OBSOLETE       if (regno <= R0_REGNUM + 63) */
+/* OBSOLETE 	sd->cpu[0].regs.general_purpose[regno] = reg; */
+/* OBSOLETE       else if (regno <= SPU_REGNUM) */
+/* OBSOLETE 	sd->cpu[0].regs.sp[regno - SPI_REGNUM] = reg; */
+/* OBSOLETE       else */
+/* OBSOLETE 	sd->cpu[0].regs.control[regno - CREGS_START] = reg; */
+/* OBSOLETE     } */
+/* OBSOLETE   else if (regno < NUM_REGS) */
+/* OBSOLETE     { */
+/* OBSOLETE       unsigned32 reg; */
+/* OBSOLETE  */
+/* OBSOLETE       reg = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; */
+/* OBSOLETE  */
+/* OBSOLETE       sd->cpu[0].regs.accumulator[regno - A0_REGNUM] = (unsigned64)reg << 32; */
+/* OBSOLETE  */
+/* OBSOLETE       reg = (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; */
+/* OBSOLETE  */
+/* OBSOLETE       sd->cpu[0].regs.accumulator[regno - A0_REGNUM] |= reg; */
+/* OBSOLETE     } */
+/* OBSOLETE   else */
+/* OBSOLETE     abort (); */
+/* OBSOLETE   return -1; */
+/* OBSOLETE } */
diff --git a/sim/d30v/sim-main.h b/sim/d30v/sim-main.h
index 4db8aa0..d1764da 100644
--- a/sim/d30v/sim-main.h
+++ b/sim/d30v/sim-main.h
@@ -1,82 +1,82 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
-    Copyright (C) 1997, 1998, Free Software Foundation
-
-    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 _SIM_MAIN_H_
-#define _SIM_MAIN_H_
-
-/* This simulator suports watchpoints */
-#define WITH_WATCHPOINTS 1
-
-#include "sim-basics.h"
-#include "sim-signal.h"
-
-/* needed */
-typedef address_word sim_cia;
-#define INVALID_INSTRUCTION_ADDRESS ((address_word) 0 - 1)
-
-/* This simulator doesn't cache anything so no saving of context is
-   needed during either of a halt or restart */
-#define SIM_ENGINE_HALT_HOOK(SD,CPU,CIA) while (0)
-#define SIM_ENGINE_RESTART_HOOK(SD,CPU,CIA) while (0)
-
-#include "sim-base.h"
-
-/* These are generated files.  */
-#include "itable.h"
-#include "s_idecode.h"
-#include "l_idecode.h"
-
-#include "cpu.h"
-#include "alu.h"
-
-
-struct sim_state {
-
-  sim_event *pending_interrupt;
-
-  /* the processors proper */
-  sim_cpu cpu[MAX_NR_PROCESSORS];
-#if (WITH_SMP)
-#define STATE_CPU(sd, n) (&(sd)->cpu[n])
-#else
-#define STATE_CPU(sd, n) (&(sd)->cpu[0])
-#endif
-
-  /* The base class.  */
-  sim_state_base base;
-
-};
-
-
-/* deliver an interrupt */
-sim_event_handler d30v_interrupt_event;
-
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#endif /* _SIM_MAIN_H_ */
+/* OBSOLETE /*  This file is part of the program psim. */
+/* OBSOLETE  */
+/* OBSOLETE     Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au> */
+/* OBSOLETE     Copyright (C) 1997, 1998, Free Software Foundation */
+/* OBSOLETE  */
+/* OBSOLETE     This program is free software; you can redistribute it and/or modify */
+/* OBSOLETE     it under the terms of the GNU General Public License as published by */
+/* OBSOLETE     the Free Software Foundation; either version 2 of the License, or */
+/* OBSOLETE     (at your option) any later version. */
+/* OBSOLETE  */
+/* OBSOLETE     This program is distributed in the hope that it will be useful, */
+/* OBSOLETE     but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* OBSOLETE     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* OBSOLETE     GNU General Public License for more details. */
+/* OBSOLETE   */
+/* OBSOLETE     You should have received a copy of the GNU General Public License */
+/* OBSOLETE     along with this program; if not, write to the Free Software */
+/* OBSOLETE     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* OBSOLETE   */
+/* OBSOLETE     */ */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifndef _SIM_MAIN_H_ */
+/* OBSOLETE #define _SIM_MAIN_H_ */
+/* OBSOLETE  */
+/* OBSOLETE /* This simulator suports watchpoints */ */
+/* OBSOLETE #define WITH_WATCHPOINTS 1 */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-basics.h" */
+/* OBSOLETE #include "sim-signal.h" */
+/* OBSOLETE  */
+/* OBSOLETE /* needed */ */
+/* OBSOLETE typedef address_word sim_cia; */
+/* OBSOLETE #define INVALID_INSTRUCTION_ADDRESS ((address_word) 0 - 1) */
+/* OBSOLETE  */
+/* OBSOLETE /* This simulator doesn't cache anything so no saving of context is */
+/* OBSOLETE    needed during either of a halt or restart */ */
+/* OBSOLETE #define SIM_ENGINE_HALT_HOOK(SD,CPU,CIA) while (0) */
+/* OBSOLETE #define SIM_ENGINE_RESTART_HOOK(SD,CPU,CIA) while (0) */
+/* OBSOLETE  */
+/* OBSOLETE #include "sim-base.h" */
+/* OBSOLETE  */
+/* OBSOLETE /* These are generated files.  */ */
+/* OBSOLETE #include "itable.h" */
+/* OBSOLETE #include "s_idecode.h" */
+/* OBSOLETE #include "l_idecode.h" */
+/* OBSOLETE  */
+/* OBSOLETE #include "cpu.h" */
+/* OBSOLETE #include "alu.h" */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE struct sim_state { */
+/* OBSOLETE  */
+/* OBSOLETE   sim_event *pending_interrupt; */
+/* OBSOLETE  */
+/* OBSOLETE   /* the processors proper */ */
+/* OBSOLETE   sim_cpu cpu[MAX_NR_PROCESSORS]; */
+/* OBSOLETE #if (WITH_SMP) */
+/* OBSOLETE #define STATE_CPU(sd, n) (&(sd)->cpu[n]) */
+/* OBSOLETE #else */
+/* OBSOLETE #define STATE_CPU(sd, n) (&(sd)->cpu[0]) */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE   /* The base class.  */ */
+/* OBSOLETE   sim_state_base base; */
+/* OBSOLETE  */
+/* OBSOLETE }; */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE /* deliver an interrupt */ */
+/* OBSOLETE sim_event_handler d30v_interrupt_event; */
+/* OBSOLETE  */
+/* OBSOLETE  */
+/* OBSOLETE #ifdef HAVE_STRING_H */
+/* OBSOLETE #include <string.h> */
+/* OBSOLETE #else */
+/* OBSOLETE #ifdef HAVE_STRINGS_H */
+/* OBSOLETE #include <strings.h> */
+/* OBSOLETE #endif */
+/* OBSOLETE #endif */
+/* OBSOLETE  */
+/* OBSOLETE #endif /* _SIM_MAIN_H_ */ */
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index f2ff600..92b2950 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,12 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* sis.h: Include "gdb/remote-sim.h" and "gdb/callback.h".
+	* interf.c: Include "gdb/remote-sim.h".
+
 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
 
 	* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index d0a781e..1931886 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -31,7 +31,7 @@
 #include <dis-asm.h>
 #include "sim-config.h"
 
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef fprintf
 extern          fprintf();
diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h
index 2a895c0..5bdd770 100644
--- a/sim/erc32/sis.h
+++ b/sim/erc32/sis.h
@@ -21,8 +21,8 @@
  */
 
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #include "end.h"
 
diff --git a/sim/fr30/ChangeLog b/sim/fr30/ChangeLog
index c52ef62..f8f4c5e 100644
--- a/sim/fr30/ChangeLog
+++ b/sim/fr30/ChangeLog
@@ -1,3 +1,18 @@
+2002-07-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in: Make file obsolete.
+	* cpu.c, arch.h, arch.c, cpu.h, decode.h: Ditto.
+	* decode.c, fr30-sim.h, devices.c, fr30.c: Ditto.
+	* model.c, sem-switch.c, sim-if.c: Ditto.
+	* sim-main.h, traps.c, sem.c: Ditto.
+	* TODO, README: Ditto.
+	* configure.in: Ditto.
+	* configure: Regenerate.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2001-11-14  Dave Brolley  <brolley@redhat.com>
 
 	* arch.c: Regenerate.
diff --git a/sim/fr30/Makefile.in b/sim/fr30/Makefile.in
index 2a0ac83..43d70e2 100644
--- a/sim/fr30/Makefile.in
+++ b/sim/fr30/Makefile.in
@@ -1,107 +1,107 @@
-# Makefile template for Configure for the fr30 simulator
-# Copyright (C) 1998, 2000 Free Software Foundation, Inc.
-# Contributed by Cygnus Support.
-#
-# 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.
-
-## COMMON_PRE_CONFIG_FRAG
-
-FR30_OBJS = fr30.o cpu.o decode.o sem.o model.o arch.o mloop.o
-
-CONFIG_DEVICES = dv-sockser.o
-CONFIG_DEVICES =
-
-SIM_OBJS = \
-	$(SIM_NEW_COMMON_OBJS) \
-	sim-cpu.o \
-	sim-hload.o \
-	sim-hrw.o \
-	sim-model.o \
-	sim-reg.o \
-	cgen-utils.o cgen-trace.o cgen-scache.o \
-	cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
-	sim-if.o \
-	$(FR30_OBJS) \
-	traps.o devices.o \
-	$(CONFIG_DEVICES)
-
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-	$(CGEN_INCLUDE_DEPS) \
-	arch.h cpuall.h fr30-sim.h $(srcdir)/../../opcodes/fr30-desc.h
-
-SIM_EXTRA_CFLAGS =
-
-SIM_RUN_OBJS = nrun.o
-SIM_EXTRA_CLEAN = fr30-clean
-
-# This selects the fr30 newlib/libgloss syscall definitions.
-NL_TARGET = -DNL_TARGET_fr30
-
-## COMMON_POST_CONFIG_FRAG
-
-arch = fr30
-
-sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h
-
-arch.o: arch.c $(SIM_MAIN_DEPS)
-
-devices.o: devices.c $(SIM_MAIN_DEPS)
-
-# FR30 objs
-
-FR30BF_INCLUDE_DEPS = \
-	$(CGEN_MAIN_CPU_DEPS) \
-	cpu.h decode.h eng.h
-
-fr30.o: fr30.c $(FR30BF_INCLUDE_DEPS)
-
-# FIXME: Use of `mono' is wip.
-mloop.c eng.h: stamp-mloop
-stamp-mloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
-	$(SHELL) $(srccom)/genmloop.sh \
-		-mono -fast -pbb -switch sem-switch.c \
-		-cpu fr30bf -infile $(srcdir)/mloop.in
-	$(SHELL) $(srcroot)/move-if-change eng.hin eng.h
-	$(SHELL) $(srcroot)/move-if-change mloop.cin mloop.c
-	touch stamp-mloop
-mloop.o: mloop.c sem-switch.c $(FR30BF_INCLUDE_DEPS)
-
-cpu.o: cpu.c $(FR30BF_INCLUDE_DEPS)
-decode.o: decode.c $(FR30BF_INCLUDE_DEPS)
-sem.o: sem.c $(FR30BF_INCLUDE_DEPS)
-model.o: model.c $(FR30BF_INCLUDE_DEPS)
-
-fr30-clean:
-	rm -f mloop.c eng.h stamp-mloop
-	rm -f tmp-*
-	rm -f stamp-arch stamp-cpu
-
-# cgen support, enable with --enable-cgen-maint
-CGEN_MAINT = ; @true
-# The following line is commented in or out depending upon --enable-cgen-maint.
-@CGEN_MAINT@CGEN_MAINT =
-
-stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/fr30.cpu
-	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
-	  FLAGS="with-scache with-profile=fn"
-	touch stamp-arch
-arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
-
-stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/fr30.cpu
-	$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
-	  cpu=fr30bf mach=fr30 SUFFIX= FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
-	touch stamp-cpu
-cpu.h sem.c sem-switch.c model.c decode.c decode.h: $(CGEN_MAINT) stamp-cpu
+# OBSOLETE # Makefile template for Configure for the fr30 simulator
+# OBSOLETE # Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+# OBSOLETE # Contributed by Cygnus Support.
+# OBSOLETE #
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License along
+# OBSOLETE # with this program; if not, write to the Free Software Foundation, Inc.,
+# OBSOLETE # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE 
+# OBSOLETE ## COMMON_PRE_CONFIG_FRAG
+# OBSOLETE 
+# OBSOLETE FR30_OBJS = fr30.o cpu.o decode.o sem.o model.o arch.o mloop.o
+# OBSOLETE 
+# OBSOLETE CONFIG_DEVICES = dv-sockser.o
+# OBSOLETE CONFIG_DEVICES =
+# OBSOLETE 
+# OBSOLETE SIM_OBJS = \
+# OBSOLETE 	$(SIM_NEW_COMMON_OBJS) \
+# OBSOLETE 	sim-cpu.o \
+# OBSOLETE 	sim-hload.o \
+# OBSOLETE 	sim-hrw.o \
+# OBSOLETE 	sim-model.o \
+# OBSOLETE 	sim-reg.o \
+# OBSOLETE 	cgen-utils.o cgen-trace.o cgen-scache.o \
+# OBSOLETE 	cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
+# OBSOLETE 	sim-if.o \
+# OBSOLETE 	$(FR30_OBJS) \
+# OBSOLETE 	traps.o devices.o \
+# OBSOLETE 	$(CONFIG_DEVICES)
+# OBSOLETE 
+# OBSOLETE # Extra headers included by sim-main.h.
+# OBSOLETE SIM_EXTRA_DEPS = \
+# OBSOLETE 	$(CGEN_INCLUDE_DEPS) \
+# OBSOLETE 	arch.h cpuall.h fr30-sim.h $(srcdir)/../../opcodes/fr30-desc.h
+# OBSOLETE 
+# OBSOLETE SIM_EXTRA_CFLAGS =
+# OBSOLETE 
+# OBSOLETE SIM_RUN_OBJS = nrun.o
+# OBSOLETE SIM_EXTRA_CLEAN = fr30-clean
+# OBSOLETE 
+# OBSOLETE # This selects the fr30 newlib/libgloss syscall definitions.
+# OBSOLETE NL_TARGET = -DNL_TARGET_fr30
+# OBSOLETE 
+# OBSOLETE ## COMMON_POST_CONFIG_FRAG
+# OBSOLETE 
+# OBSOLETE arch = fr30
+# OBSOLETE 
+# OBSOLETE sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h
+# OBSOLETE 
+# OBSOLETE arch.o: arch.c $(SIM_MAIN_DEPS)
+# OBSOLETE 
+# OBSOLETE devices.o: devices.c $(SIM_MAIN_DEPS)
+# OBSOLETE 
+# OBSOLETE # FR30 objs
+# OBSOLETE 
+# OBSOLETE FR30BF_INCLUDE_DEPS = \
+# OBSOLETE 	$(CGEN_MAIN_CPU_DEPS) \
+# OBSOLETE 	cpu.h decode.h eng.h
+# OBSOLETE 
+# OBSOLETE fr30.o: fr30.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE 
+# OBSOLETE # FIXME: Use of `mono' is wip.
+# OBSOLETE mloop.c eng.h: stamp-mloop
+# OBSOLETE stamp-mloop: $(srcdir)/../common/genmloop.sh mloop.in Makefile
+# OBSOLETE 	$(SHELL) $(srccom)/genmloop.sh \
+# OBSOLETE 		-mono -fast -pbb -switch sem-switch.c \
+# OBSOLETE 		-cpu fr30bf -infile $(srcdir)/mloop.in
+# OBSOLETE 	$(SHELL) $(srcroot)/move-if-change eng.hin eng.h
+# OBSOLETE 	$(SHELL) $(srcroot)/move-if-change mloop.cin mloop.c
+# OBSOLETE 	touch stamp-mloop
+# OBSOLETE mloop.o: mloop.c sem-switch.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE 
+# OBSOLETE cpu.o: cpu.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE decode.o: decode.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE sem.o: sem.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE model.o: model.c $(FR30BF_INCLUDE_DEPS)
+# OBSOLETE 
+# OBSOLETE fr30-clean:
+# OBSOLETE 	rm -f mloop.c eng.h stamp-mloop
+# OBSOLETE 	rm -f tmp-*
+# OBSOLETE 	rm -f stamp-arch stamp-cpu
+# OBSOLETE 
+# OBSOLETE # cgen support, enable with --enable-cgen-maint
+# OBSOLETE CGEN_MAINT = ; @true
+# OBSOLETE # The following line is commented in or out depending upon --enable-cgen-maint.
+# OBSOLETE @CGEN_MAINT@CGEN_MAINT =
+# OBSOLETE 
+# OBSOLETE stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/fr30.cpu
+# OBSOLETE 	$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
+# OBSOLETE 	  FLAGS="with-scache with-profile=fn"
+# OBSOLETE 	touch stamp-arch
+# OBSOLETE arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
+# OBSOLETE 
+# OBSOLETE stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/fr30.cpu
+# OBSOLETE 	$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
+# OBSOLETE 	  cpu=fr30bf mach=fr30 SUFFIX= FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
+# OBSOLETE 	touch stamp-cpu
+# OBSOLETE cpu.h sem.c sem-switch.c model.c decode.c decode.h: $(CGEN_MAINT) stamp-cpu
diff --git a/sim/fr30/README b/sim/fr30/README
index 47bf314..da607ec 100644
--- a/sim/fr30/README
+++ b/sim/fr30/README
@@ -1,14 +1,14 @@
-This is the fr30 simulator directory.
-
-It is still work-in-progress.  The current sources are reasonably
-well tested and lots of features are in.  However, there's lots
-more yet to come.
-
-There are lots of machine generated files in the source directory!
-They are only generated if you configure with --enable-cgen-maint,
-similar in behaviour to Makefile.in, configure under automake/autoconf.
-
-For details on the generator, see ../../cgen.
-
-devo/cgen isn't part of the comp-tools module yet.
-You'll need to check it out manually (also akin to automake/autoconf).
+OBSOLETE This is the fr30 simulator directory.
+OBSOLETE 
+OBSOLETE It is still work-in-progress.  The current sources are reasonably
+OBSOLETE well tested and lots of features are in.  However, there's lots
+OBSOLETE more yet to come.
+OBSOLETE 
+OBSOLETE There are lots of machine generated files in the source directory!
+OBSOLETE They are only generated if you configure with --enable-cgen-maint,
+OBSOLETE similar in behaviour to Makefile.in, configure under automake/autoconf.
+OBSOLETE 
+OBSOLETE For details on the generator, see ../../cgen.
+OBSOLETE 
+OBSOLETE devo/cgen isn't part of the comp-tools module yet.
+OBSOLETE You'll need to check it out manually (also akin to automake/autoconf).
diff --git a/sim/fr30/TODO b/sim/fr30/TODO
index ae4c760..da9103b 100644
--- a/sim/fr30/TODO
+++ b/sim/fr30/TODO
@@ -1,14 +1,14 @@
-m32r-inherited stuff?
-----------------------
-- header file dependencies revisit
-- hooks cleanup
-- testsuites
-- FIXME's
-
-
-m32r stuff?
-----------------------
-- memory accesses still test if profiling is on even in fast mode
-- have semantic code use G/SET_H_FOO if not default [incl fun-access]
-- have G/SET_H_FOO macros call function if fun-access
-- --> can always use G/S_H_FOO macros
+OBSOLETE m32r-inherited stuff?
+OBSOLETE ----------------------
+OBSOLETE - header file dependencies revisit
+OBSOLETE - hooks cleanup
+OBSOLETE - testsuites
+OBSOLETE - FIXME's
+OBSOLETE 
+OBSOLETE 
+OBSOLETE m32r stuff?
+OBSOLETE ----------------------
+OBSOLETE - memory accesses still test if profiling is on even in fast mode
+OBSOLETE - have semantic code use G/SET_H_FOO if not default [incl fun-access]
+OBSOLETE - have G/SET_H_FOO macros call function if fun-access
+OBSOLETE - --> can always use G/S_H_FOO macros
diff --git a/sim/fr30/arch.c b/sim/fr30/arch.c
index c0f3c62..4f1be2e 100644
--- a/sim/fr30/arch.c
+++ b/sim/fr30/arch.c
@@ -1,35 +1,34 @@
-/* Simulator support for fr30.
-
-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 simulators.
-
-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 "sim-main.h"
-#include "bfd.h"
-
-const MACH *sim_machs[] =
-{
-#ifdef HAVE_CPU_FR30BF
-  & fr30_mach,
-#endif
-  0
-};
-
+// OBSOLETE /* Simulator support for fr30.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE 
+// OBSOLETE const MACH *sim_machs[] =
+// OBSOLETE {
+// OBSOLETE #ifdef HAVE_CPU_FR30BF
+// OBSOLETE   & fr30_mach,
+// OBSOLETE #endif
+// OBSOLETE   0
+// OBSOLETE };
diff --git a/sim/fr30/arch.h b/sim/fr30/arch.h
index 26de475..047814a 100644
--- a/sim/fr30/arch.h
+++ b/sim/fr30/arch.h
@@ -1,45 +1,45 @@
-/* Simulator header for fr30.
-
-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 simulators.
-
-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 FR30_ARCH_H
-#define FR30_ARCH_H
-
-#define TARGET_BIG_ENDIAN 1
-
-/* Enum declaration for model types.  */
-typedef enum model_type {
-  MODEL_FR30_1, MODEL_MAX
-} MODEL_TYPE;
-
-#define MAX_MODELS ((int) MODEL_MAX)
-
-/* Enum declaration for unit types.  */
-typedef enum unit_type {
-  UNIT_NONE, UNIT_FR30_1_U_STM, UNIT_FR30_1_U_LDM, UNIT_FR30_1_U_STORE
- , UNIT_FR30_1_U_LOAD, UNIT_FR30_1_U_CTI, UNIT_FR30_1_U_EXEC, UNIT_MAX
-} UNIT_TYPE;
-
-#define MAX_UNITS (3)
-
-#endif /* FR30_ARCH_H */
+// OBSOLETE /* Simulator header for fr30.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #ifndef FR30_ARCH_H
+// OBSOLETE #define FR30_ARCH_H
+// OBSOLETE 
+// OBSOLETE #define TARGET_BIG_ENDIAN 1
+// OBSOLETE 
+// OBSOLETE /* Enum declaration for model types.  */
+// OBSOLETE typedef enum model_type {
+// OBSOLETE   MODEL_FR30_1, MODEL_MAX
+// OBSOLETE } MODEL_TYPE;
+// OBSOLETE 
+// OBSOLETE #define MAX_MODELS ((int) MODEL_MAX)
+// OBSOLETE 
+// OBSOLETE /* Enum declaration for unit types.  */
+// OBSOLETE typedef enum unit_type {
+// OBSOLETE   UNIT_NONE, UNIT_FR30_1_U_STM, UNIT_FR30_1_U_LDM, UNIT_FR30_1_U_STORE
+// OBSOLETE  , UNIT_FR30_1_U_LOAD, UNIT_FR30_1_U_CTI, UNIT_FR30_1_U_EXEC, UNIT_MAX
+// OBSOLETE } UNIT_TYPE;
+// OBSOLETE 
+// OBSOLETE #define MAX_UNITS (3)
+// OBSOLETE 
+// OBSOLETE #endif /* FR30_ARCH_H */
diff --git a/sim/fr30/configure b/sim/fr30/configure
index 2c537d3..e69de29 100644
--- a/sim/fr30/configure
+++ b/sim/fr30/configure
@@ -1,4294 +0,0 @@
-#! /bin/sh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-sim_inline="-DDEFAULT_INLINE=0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This file is derived from `gettext.m4'.  The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-
-
-
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-
-
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --disable-nls           do not use Native Language Support"
-ac_help="$ac_help
-  --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
-  --enable-maintainer-mode		Enable developer functionality."
-ac_help="$ac_help
-  --enable-sim-bswap			Use Host specific BSWAP instruction."
-ac_help="$ac_help
-  --enable-sim-cflags=opts		Extra CFLAGS for use in building simulator"
-ac_help="$ac_help
-  --enable-sim-debug=opts		Enable debugging flags"
-ac_help="$ac_help
-  --enable-sim-stdio			Specify whether to use stdio for console input/output."
-ac_help="$ac_help
-  --enable-sim-trace=opts		Enable tracing flags"
-ac_help="$ac_help
-  --enable-sim-profile=opts		Enable profiling flags"
-ac_help="$ac_help
-  --enable-sim-endian=endian		Specify target byte endian orientation."
-ac_help="$ac_help
-  --enable-sim-alignment=align		Specify strict,  nonstrict or forced alignment of memory accesses."
-ac_help="$ac_help
-  --enable-sim-hostendian=end		Specify host byte endian orientation."
-ac_help="$ac_help
-  --enable-sim-scache=size		Specify simulator execution cache size."
-ac_help="$ac_help
-  --enable-sim-default-model=model	Specify default model to simulate."
-ac_help="$ac_help
-  --enable-sim-environment=environment	Specify mixed, user, virtual or operating environment."
-ac_help="$ac_help
-  --enable-cgen-maint[=DIR]    build cgen generated files"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --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
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -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=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
-  fi
-else
-  CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:693: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 708 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:714: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 725 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:731: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:748: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:773: 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
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:800: 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
-  echo "$ac_t""yes" 1>&6
-  ISC=yes # If later tests want to check for ISC.
-  cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
-  if test "$GCC" = yes; then
-    CC="$CC -posix"
-  else
-    CC="$CC -Xp"
-  fi
-else
-  echo "$ac_t""no" 1>&6
-  ISC=
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:821: 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 <<EOF
-#line 826 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:834: \"$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*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 851 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 869 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 890 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:925: 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 <<EOF
-#line 930 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1000: 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 <<EOF
-#line 1007 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_inline=$ac_kw; break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
-  inline | yes) ;;
-  no) cat >> confdefs.h <<\EOF
-#define inline 
-EOF
- ;;
-  *)  cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1040: 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 <<EOF
-#line 1045 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_off_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1073: 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 <<EOF
-#line 1078 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-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:1108: 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 <<EOF
-#line 1113 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1120: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1141: 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 <<EOF
-#line 1146 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1174: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1206: 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 <<EOF
-#line 1211 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1236: 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 <<EOF
-#line 1241 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1264: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
-  break
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1291: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1318: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-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:1343: 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
-#line 1348 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1353: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1382: 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 <<EOF
-#line 1387 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1410: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1435: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-	mmap private not fixed
-	mmap private fixed at somewhere currently unmapped
-	mmap private fixed at somewhere already mapped
-	mmap shared not fixed
-	mmap shared fixed at somewhere currently unmapped
-	mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192	/* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-	char *data, *data2, *data3;
-	int i, pagesize;
-	int fd;
-
-	pagesize = getpagesize();
-
-	/*
-	 * First, make a file with some known garbage in it.
-	 */
-	data = malloc(pagesize);
-	if (!data)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		*(data + i) = rand();
-	umask(0);
-	fd = creat("conftestmmap", 0600);
-	if (fd < 0)
-		exit(1);
-	if (write(fd, data, pagesize) != pagesize)
-		exit(1);
-	close(fd);
-
-	/*
-	 * Next, try to mmap the file at a fixed address which
-	 * already has something else allocated at it.  If we can,
-	 * also make sure that we see the same garbage.
-	 */
-	fd = open("conftestmmap", O_RDWR);
-	if (fd < 0)
-		exit(1);
-	data2 = malloc(2 * pagesize);
-	if (!data2)
-		exit(1);
-	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data2 + i))
-			exit(1);
-
-	/*
-	 * Finally, make sure that changes to the mapped area
-	 * do not percolate back to the file as seen by read().
-	 * (This is a bug on some variants of i386 svr4.0.)
-	 */
-	for (i = 0; i < pagesize; ++i)
-		*(data2 + i) = *(data2 + i) + 1;
-	data3 = malloc(pagesize);
-	if (!data3)
-		exit(1);
-	if (read(fd, data3, pagesize) != pagesize)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data3 + i))
-			exit(1);
-	close(fd);
-	unlink("conftestmmap");
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:1583: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1606: 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 <<EOF
-#line 1611 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1639: 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 <<EOF
-#line 1644 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# autoconf.info says this should be called right after AC_INIT.
-
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1718: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1739: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1757: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-# 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:1801: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-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:1831: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:1882: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1914: 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.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1925 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1930: \"$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
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1956: 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:1961: 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
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$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
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-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:1989: 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
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:2032: 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
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
-  CC_FOR_BUILD='$(CC)'
-else
-  CC_FOR_BUILD=gcc
-fi
-
-
-
-
-AR=${AR-ar}
-
-# 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:2100: 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
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-ALL_LINGUAS=
-                              
-   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-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:2135: 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
-#line 2140 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2145: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: 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 <<EOF
-#line 2180 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2203: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2232: 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 <<EOF
-#line 2237 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2260: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
-   fi
-
-   if test $ac_cv_header_locale_h = yes; then
-    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2294: 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 <<EOF
-#line 2299 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:2306: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
-    fi
-  fi
-   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2327: 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"
-  USE_NLS=$enableval
-else
-  USE_NLS=yes
-fi
-
-    echo "$ac_t""$USE_NLS" 1>&6
-    
-
-    USE_INCLUDED_LIBINTL=no
-
-        if test "$USE_NLS" = "yes"; then
-      cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
-
-      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2347: 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"
-  nls_cv_force_use_gnu_gettext=$withval
-else
-  nls_cv_force_use_gnu_gettext=no
-fi
-
-      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-                        		nls_cv_header_intl=
-	nls_cv_header_libgt=
-	CATOBJEXT=NONE
-
-	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2366: 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
-#line 2371 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2376: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-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:2393: 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 <<EOF
-#line 2398 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2405: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-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:2421: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:2440: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-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:2456: 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 <<EOF
-#line 2461 "configure"
-#include "confdefs.h"
-
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2468: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	   fi
-
-	   if test "$gt_cv_func_gettext_libc" = "yes" \
-	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
-	      cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-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:2496: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-	      if test "$MSGFMT" != "no"; then
-		for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2530: 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 <<EOF
-#line 2535 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2558: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-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:2585: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2621: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int _nl_msg_cat_cntr;
-			       return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  CATOBJEXT=.gmo
-		   DATADIRNAME=share
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CATOBJEXT=.mo
-		   DATADIRNAME=lib
-fi
-rm -f conftest*
-		INSTOBJEXT=.mo
-	      fi
-	    fi
-	
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-	        
-        if test "$CATOBJEXT" = "NONE"; then
-	  	  	  nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" = "yes"; then
-                INTLOBJS="\$(GETTOBJS)"
-        # 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:2693: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2727: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2763: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-        
-	USE_INCLUDED_LIBINTL=yes
-        CATOBJEXT=.gmo
-        INSTOBJEXT=.mo
-        DATADIRNAME=share
-	INTLDEPS='$(top_builddir)/../intl/libintl.a'
-	INTLLIBS=$INTLDEPS
-	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-        nls_cv_header_intl=libintl.h
-        nls_cv_header_libgt=libgettext.h
-      fi
-
-            if test "$XGETTEXT" != ":"; then
-			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
-	  XGETTEXT=":"
-	fi
-      fi
-
-      # We need to process the po/ directory.
-      POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=libintl.h
-      nls_cv_header_libgt=libgettext.h
-    fi
-
-    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-    # because some of the sources are only built for this goal.
-    if test "$PACKAGE" = gettext; then
-      USE_NLS=yes
-      USE_INCLUDED_LIBINTL=yes
-    fi
-
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-        
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2853: checking for catalogs to be installed" >&5
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       echo "$ac_t""$LINGUAS" 1>&6
-     fi
-
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-            if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   
-
-            if test -f $srcdir/po2tbl.sed.in; then
-      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:2881: 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
-#line 2886 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  msgformat=linux
-else
-  echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
-	          	 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
-      fi
-            sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-	 $srcdir/po2tbl.sed.in > po2tbl.sed
-   fi
-
-            if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   
-   
-
-   MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-   
-
-      l=
-   
-
-            if test -d $srcdir/po; then
-      test -d po || mkdir po
-      if test "x$srcdir" != "x."; then
-	 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-	    posrcprefix="$srcdir/"
-	 else
-	    posrcprefix="../$srcdir/"
-	 fi
-      else
-	 posrcprefix="../"
-      fi
-      rm -f po/POTFILES
-      sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	 < $srcdir/po/POTFILES.in > po/POTFILES
-   fi
-  
-
-# Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2960: 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
-#line 2965 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2970: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/time.h sys/resource.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3000: 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
-#line 3005 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3010: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in fcntl.h fpu_control.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3040: 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
-#line 3045 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3050: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in dlfcn.h errno.h sys/stat.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3080: 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
-#line 3085 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3090: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getrusage time sigaction __setfpucw
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3119: 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 <<EOF
-#line 3124 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3147: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-# Check for socket libraries
-echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3174: checking for bind in -lsocket" >&5
-ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bind();
-
-int main() {
-bind()
-; return 0; }
-EOF
-if { (eval echo configure:3193: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lsocket $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3221: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3229 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:3240: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lnsl $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-. ${srcdir}/../../bfd/configure.host
-
-
-
-USE_MAINTAINER_MODE=no
-# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval="$enable_maintainer_mode"
-  case "${enableval}" in
-  yes)	MAINT="" USE_MAINTAINER_MODE=yes ;;
-  no)	MAINT="#" ;;
-  *)	{ echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
-esac
-if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
-  echo "Setting maintainer mode" 6>&1
-fi
-else
-  MAINT="#"
-fi
-
-
-
-# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
-if test "${enable_sim_bswap+set}" = set; then
-  enableval="$enable_sim_bswap"
-  case "${enableval}" in
-  yes)	sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
-  no)	sim_bswap="-DWITH_BSWAP=0";;
-  *)	{ echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
-  echo "Setting bswap flags = $sim_bswap" 6>&1
-fi
-else
-  sim_bswap=""
-fi
-
-
-
-# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
-if test "${enable_sim_cflags+set}" = set; then
-  enableval="$enable_sim_cflags"
-  case "${enableval}" in
-  yes)	 sim_cflags="-O2 -fomit-frame-pointer";;
-  trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
-  no)	 sim_cflags="";;
-  *)	 sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
-  echo "Setting sim cflags = $sim_cflags" 6>&1
-fi
-else
-  sim_cflags=""
-fi
-
-
-
-# Check whether --enable-sim-debug or --disable-sim-debug was given.
-if test "${enable_sim_debug+set}" = set; then
-  enableval="$enable_sim_debug"
-  case "${enableval}" in
-  yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
-  no)  sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
-  *)   sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
-  echo "Setting sim debug = $sim_debug" 6>&1
-fi
-else
-  sim_debug=""
-fi
-
-
-
-# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
-if test "${enable_sim_stdio+set}" = set; then
-  enableval="$enable_sim_stdio"
-  case "${enableval}" in
-  yes)	sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
-  no)	sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
-  *)	{ echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
-  echo "Setting stdio flags = $sim_stdio" 6>&1
-fi
-else
-  sim_stdio=""
-fi
-
-
-
-# Check whether --enable-sim-trace or --disable-sim-trace was given.
-if test "${enable_sim_trace+set}" = set; then
-  enableval="$enable_sim_trace"
-  case "${enableval}" in
-  yes)	sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
-  no)	sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
-  [-0-9]*)
-	sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
-  [a-z]*)
-	sim_trace=""
-	for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-	  if test x"$sim_trace" = x; then
-	    sim_trace="-DWITH_TRACE='(TRACE_$x"
-	  else
-	    sim_trace="${sim_trace}|TRACE_$x"
-	  fi
-	done
-	sim_trace="$sim_trace)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
-  echo "Setting sim trace = $sim_trace" 6>&1
-fi
-else
-  sim_trace=""
-fi
-
-
-
-# Check whether --enable-sim-profile or --disable-sim-profile was given.
-if test "${enable_sim_profile+set}" = set; then
-  enableval="$enable_sim_profile"
-  case "${enableval}" in
-  yes)	sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
-  no)	sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
-  [-0-9]*)
-	sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
-  [a-z]*)
-	sim_profile=""
-	for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-	  if test x"$sim_profile" = x; then
-	    sim_profile="-DWITH_PROFILE='(PROFILE_$x"
-	  else
-	    sim_profile="${sim_profile}|PROFILE_$x"
-	  fi
-	done
-	sim_profile="$sim_profile)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
-  echo "Setting sim profile = $sim_profile" 6>&1
-fi
-else
-  sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
-fi
-
-
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3416: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3421 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_type_signal=void
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3460: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-sim_link_files=
-sim_link_links=
-
-sim_link_links=tconfig.h
-if test -f ${srcdir}/tconfig.in
-then
-  sim_link_files=tconfig.in
-else
-  sim_link_files=../common/tconfig.in
-fi
-
-# targ-vals.def points to the libc macro description file.
-case "${target}" in
-*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
-esac
-sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
-sim_link_links="${sim_link_links} targ-vals.def"
-
-
-
-
-wire_endian="BIG_ENDIAN"
-default_endian=""
-# Check whether --enable-sim-endian or --disable-sim-endian was given.
-if test "${enable_sim_endian+set}" = set; then
-  enableval="$enable_sim_endian"
-  case "${enableval}" in
-  b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
-  l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
-  yes)	 if test x"$wire_endian" != x; then
-	   sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
-	 else
-           if test x"$default_endian" != x; then
-	     sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
-	   else
-	     echo "No hard-wired endian for target $target" 1>&6
-	     sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
-	   fi
-	 fi;;
-  no)	 if test x"$default_endian" != x; then
-	   sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-	 else
-	   if test x"$wire_endian" != x; then
-	     sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
-	   else
-	     echo "No default endian for target $target" 1>&6
-	     sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
-	   fi
-	 fi;;
-  *)	 { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
-  echo "Setting endian flags = $sim_endian" 6>&1
-fi
-else
-  if test x"$default_endian" != x; then
-  sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-else
-  if test x"$wire_endian" != x; then
-    sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
-  else
-    sim_endian=
-  fi
-fi
-fi
-
-wire_alignment="FORCED_ALIGNMENT"
-default_alignment=""
-
-# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
-if test "${enable_sim_alignment+set}" = set; then
-  enableval="$enable_sim_alignment"
-  case "${enableval}" in
-  strict | STRICT)       sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
-  nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
-  forced | FORCED)       sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
-  yes) if test x"$wire_alignment" != x; then
-	 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
-       else
-         if test x"$default_alignment" != x; then
-           sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
-         else
-	   echo "No hard-wired alignment for target $target" 1>&6
-	   sim_alignment="-DWITH_ALIGNMENT=0"
-         fi
-       fi;;
-  no)  if test x"$default_alignment" != x; then
-	 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-       else
-         if test x"$wire_alignment" != x; then
-	   sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
-         else
-           echo "No default alignment for target $target" 1>&6
-           sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
-         fi
-       fi;;
-  *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
-  echo "Setting alignment flags = $sim_alignment" 6>&1
-fi
-else
-  if test x"$default_alignment" != x; then
-  sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-else
-  if test x"$wire_alignment" != x; then
-    sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
-  else
-    sim_alignment=
-  fi
-fi
-fi
-
-
-# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
-if test "${enable_sim_hostendian+set}" = set; then
-  enableval="$enable_sim_hostendian"
-  case "${enableval}" in
-  no)	 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
-  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
-  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
-  *)	 { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
-  echo "Setting hostendian flags = $sim_hostendian" 6>&1
-fi
-else
-  
-if test "x$cross_compiling" = "xno"; then
-  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3621: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3628 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3643 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_bigendian=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_bigendian=no
-fi
-rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3674 "configure"
-#include "confdefs.h"
-main () {
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_bigendian=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
-  if test $ac_cv_c_bigendian = yes; then
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
-  else
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
-  fi
-else
-  sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
-fi
-fi
-
-
-default_sim_scache="16384"
-# Check whether --enable-sim-scache or --disable-sim-scache was given.
-if test "${enable_sim_scache+set}" = set; then
-  enableval="$enable_sim_scache"
-  case "${enableval}" in
-  yes)	sim_scache="-DWITH_SCACHE=${default_sim_scache}";;
-  no)	sim_scache="-DWITH_SCACHE=0" ;;
-  [0-9]*) sim_scache="-DWITH_SCACHE=${enableval}";;
-  *)	{ echo "configure: error: "Bad value $enableval passed to --enable-sim-scache"" 1>&2; exit 1; };
-	sim_scache="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then
-  echo "Setting scache size = $sim_scache" 6>&1
-fi
-else
-  sim_scache="-DWITH_SCACHE=${default_sim_scache}"
-fi
-
-
-
-default_sim_default_model="fr30-1"
-# Check whether --enable-sim-default-model or --disable-sim-default-model was given.
-if test "${enable_sim_default_model+set}" = set; then
-  enableval="$enable_sim_default_model"
-  case "${enableval}" in
-  yes|no) { echo "configure: error: "Missing argument to --enable-sim-default-model"" 1>&2; exit 1; };;
-  *)	sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
-  echo "Setting default model = $sim_default_model" 6>&1
-fi
-else
-  sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
-fi
-
-
-
-# Check whether --enable-sim-environment or --disable-sim-environment was given.
-if test "${enable_sim_environment+set}" = set; then
-  enableval="$enable_sim_environment"
-  case "${enableval}" in
-  all | ALL)             sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
-  user | USER)           sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
-  virtual | VIRTUAL)     sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
-  operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
-  *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-environment"" 1>&2; exit 1; };
-       sim_environment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
-  echo "Setting sim environment = $sim_environment" 6>&1
-fi
-else
-  sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
-fi
-
-
-cgen_maint=no
-cgen=guile
-cgendir='$(srcdir)/../../cgen'
-# Check whether --enable-cgen-maint or --disable-cgen-maint was given.
-if test "${enable_cgen_maint+set}" = set; then
-  enableval="$enable_cgen_maint"
-  case "${enableval}" in
-  yes)	cgen_maint=yes ;;
-  no)	cgen_maint=no ;;
-  *)
-	# argument is cgen install directory (not implemented yet).
-	# Having a `share' directory might be more appropriate for the .scm,
-	# .cpu, etc. files.
-	cgendir=${cgen_maint}/lib/cgen
-	cgen=guile
-	;;
-esac
-fi
-if test x${cgen_maint} != xno ; then
-  CGEN_MAINT=''
-else
-  CGEN_MAINT='#'
-fi
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@sim_environment@%$sim_environment%g
-s%@sim_alignment@%$sim_alignment%g
-s%@sim_assert@%$sim_assert%g
-s%@sim_bitsize@%$sim_bitsize%g
-s%@sim_endian@%$sim_endian%g
-s%@sim_hostendian@%$sim_hostendian%g
-s%@sim_float@%$sim_float%g
-s%@sim_scache@%$sim_scache%g
-s%@sim_default_model@%$sim_default_model%g
-s%@sim_hw_cflags@%$sim_hw_cflags%g
-s%@sim_hw_objs@%$sim_hw_objs%g
-s%@sim_hw@%$sim_hw%g
-s%@sim_inline@%$sim_inline%g
-s%@sim_packages@%$sim_packages%g
-s%@sim_regparm@%$sim_regparm%g
-s%@sim_reserved_bits@%$sim_reserved_bits%g
-s%@sim_smp@%$sim_smp%g
-s%@sim_stdcall@%$sim_stdcall%g
-s%@sim_xor_endian@%$sim_xor_endian%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@MAINT@%$MAINT%g
-s%@sim_bswap@%$sim_bswap%g
-s%@sim_cflags@%$sim_cflags%g
-s%@sim_debug@%$sim_debug%g
-s%@sim_stdio@%$sim_stdio%g
-s%@sim_trace@%$sim_trace%g
-s%@sim_profile@%$sim_profile%g
-s%@EXEEXT@%$EXEEXT%g
-s%@CGEN_MAINT@%$CGEN_MAINT%g
-s%@cgendir@%$cgendir%g
-s%@cgen@%$cgen%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$sim_link_files"
-ac_dests="$sim_link_links"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
-  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-  set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
-  echo "linking $srcdir/$ac_source to $ac_dest"
-
-  if test ! -r $srcdir/$ac_source; then
-    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
-  fi
-  rm -f $ac_dest
-
-  # Make relative symlinks.
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    # The dest file is in a subdirectory.
-    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
-    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dest_dir_suffix.
-    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dest_dir_suffix= ac_dots=
-  fi
-
-  case "$srcdir" in
-  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
-  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
-  esac
-
-  # Make a symlink if possible; otherwise try a hard link.
-  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest; then :
-  else
-    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
-  fi
-done
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-case "x$CONFIG_FILES" in
- xMakefile*)
-   echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
-   rm -f Makesim1.tmp Makesim2.tmp Makefile
-   sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
-   sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
-   sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
-	-e '/^## COMMON_POST_/ r Makesim2.tmp' \
-	<Makefile.sim >Makefile
-   rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
-   ;;
- esac
- case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/sim/fr30/configure.in b/sim/fr30/configure.in
index cb01e13..db5703b 100644
--- a/sim/fr30/configure.in
+++ b/sim/fr30/configure.in
@@ -1,16 +1,16 @@
-dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
-AC_PREREQ(2.5)dnl
-AC_INIT(Makefile.in)
-
-SIM_AC_COMMON
-
-SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
-SIM_AC_OPTION_ALIGNMENT(FORCED_ALIGNMENT)
-SIM_AC_OPTION_HOSTENDIAN
-SIM_AC_OPTION_SCACHE(16384)
-SIM_AC_OPTION_DEFAULT_MODEL(fr30-1)
-SIM_AC_OPTION_ENVIRONMENT
-SIM_AC_OPTION_CGEN_MAINT
-
-SIM_AC_OUTPUT
+dnl OBSOLETE dnl Process this file with autoconf to produce a configure script.
+dnl OBSOLETE sinclude(../common/aclocal.m4)
+dnl OBSOLETE AC_PREREQ(2.5)dnl
+dnl OBSOLETE AC_INIT(Makefile.in)
+dnl OBSOLETE 
+dnl OBSOLETE SIM_AC_COMMON
+dnl OBSOLETE 
+dnl OBSOLETE SIM_AC_OPTION_ENDIAN(BIG_ENDIAN)
+dnl OBSOLETE SIM_AC_OPTION_ALIGNMENT(FORCED_ALIGNMENT)
+dnl OBSOLETE SIM_AC_OPTION_HOSTENDIAN
+dnl OBSOLETE SIM_AC_OPTION_SCACHE(16384)
+dnl OBSOLETE SIM_AC_OPTION_DEFAULT_MODEL(fr30-1)
+dnl OBSOLETE SIM_AC_OPTION_ENVIRONMENT
+dnl OBSOLETE SIM_AC_OPTION_CGEN_MAINT
+dnl OBSOLETE 
+dnl OBSOLETE SIM_AC_OUTPUT
diff --git a/sim/fr30/cpu.c b/sim/fr30/cpu.c
index 938a5b7..22cb809 100644
--- a/sim/fr30/cpu.c
+++ b/sim/fr30/cpu.c
@@ -1,357 +1,357 @@
-/* Misc. support for CPU family fr30bf.
-
-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 simulators.
-
-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.
-
-*/
-
-#define WANT_CPU fr30bf
-#define WANT_CPU_FR30BF
-
-#include "sim-main.h"
-#include "cgen-ops.h"
-
-/* Get the value of h-pc.  */
-
-USI
-fr30bf_h_pc_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_pc);
-}
-
-/* Set a value for h-pc.  */
-
-void
-fr30bf_h_pc_set (SIM_CPU *current_cpu, USI newval)
-{
-  CPU (h_pc) = newval;
-}
-
-/* Get the value of h-gr.  */
-
-SI
-fr30bf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
-{
-  return CPU (h_gr[regno]);
-}
-
-/* Set a value for h-gr.  */
-
-void
-fr30bf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
-{
-  CPU (h_gr[regno]) = newval;
-}
-
-/* Get the value of h-cr.  */
-
-SI
-fr30bf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
-{
-  return CPU (h_cr[regno]);
-}
-
-/* Set a value for h-cr.  */
-
-void
-fr30bf_h_cr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
-{
-  CPU (h_cr[regno]) = newval;
-}
-
-/* Get the value of h-dr.  */
-
-SI
-fr30bf_h_dr_get (SIM_CPU *current_cpu, UINT regno)
-{
-  return GET_H_DR (regno);
-}
-
-/* Set a value for h-dr.  */
-
-void
-fr30bf_h_dr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
-{
-  SET_H_DR (regno, newval);
-}
-
-/* Get the value of h-ps.  */
-
-USI
-fr30bf_h_ps_get (SIM_CPU *current_cpu)
-{
-  return GET_H_PS ();
-}
-
-/* Set a value for h-ps.  */
-
-void
-fr30bf_h_ps_set (SIM_CPU *current_cpu, USI newval)
-{
-  SET_H_PS (newval);
-}
-
-/* Get the value of h-r13.  */
-
-SI
-fr30bf_h_r13_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_r13);
-}
-
-/* Set a value for h-r13.  */
-
-void
-fr30bf_h_r13_set (SIM_CPU *current_cpu, SI newval)
-{
-  CPU (h_r13) = newval;
-}
-
-/* Get the value of h-r14.  */
-
-SI
-fr30bf_h_r14_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_r14);
-}
-
-/* Set a value for h-r14.  */
-
-void
-fr30bf_h_r14_set (SIM_CPU *current_cpu, SI newval)
-{
-  CPU (h_r14) = newval;
-}
-
-/* Get the value of h-r15.  */
-
-SI
-fr30bf_h_r15_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_r15);
-}
-
-/* Set a value for h-r15.  */
-
-void
-fr30bf_h_r15_set (SIM_CPU *current_cpu, SI newval)
-{
-  CPU (h_r15) = newval;
-}
-
-/* Get the value of h-nbit.  */
-
-BI
-fr30bf_h_nbit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_nbit);
-}
-
-/* Set a value for h-nbit.  */
-
-void
-fr30bf_h_nbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_nbit) = newval;
-}
-
-/* Get the value of h-zbit.  */
-
-BI
-fr30bf_h_zbit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_zbit);
-}
-
-/* Set a value for h-zbit.  */
-
-void
-fr30bf_h_zbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_zbit) = newval;
-}
-
-/* Get the value of h-vbit.  */
-
-BI
-fr30bf_h_vbit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_vbit);
-}
-
-/* Set a value for h-vbit.  */
-
-void
-fr30bf_h_vbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_vbit) = newval;
-}
-
-/* Get the value of h-cbit.  */
-
-BI
-fr30bf_h_cbit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_cbit);
-}
-
-/* Set a value for h-cbit.  */
-
-void
-fr30bf_h_cbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_cbit) = newval;
-}
-
-/* Get the value of h-ibit.  */
-
-BI
-fr30bf_h_ibit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_ibit);
-}
-
-/* Set a value for h-ibit.  */
-
-void
-fr30bf_h_ibit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_ibit) = newval;
-}
-
-/* Get the value of h-sbit.  */
-
-BI
-fr30bf_h_sbit_get (SIM_CPU *current_cpu)
-{
-  return GET_H_SBIT ();
-}
-
-/* Set a value for h-sbit.  */
-
-void
-fr30bf_h_sbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  SET_H_SBIT (newval);
-}
-
-/* Get the value of h-tbit.  */
-
-BI
-fr30bf_h_tbit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_tbit);
-}
-
-/* Set a value for h-tbit.  */
-
-void
-fr30bf_h_tbit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_tbit) = newval;
-}
-
-/* Get the value of h-d0bit.  */
-
-BI
-fr30bf_h_d0bit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_d0bit);
-}
-
-/* Set a value for h-d0bit.  */
-
-void
-fr30bf_h_d0bit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_d0bit) = newval;
-}
-
-/* Get the value of h-d1bit.  */
-
-BI
-fr30bf_h_d1bit_get (SIM_CPU *current_cpu)
-{
-  return CPU (h_d1bit);
-}
-
-/* Set a value for h-d1bit.  */
-
-void
-fr30bf_h_d1bit_set (SIM_CPU *current_cpu, BI newval)
-{
-  CPU (h_d1bit) = newval;
-}
-
-/* Get the value of h-ccr.  */
-
-UQI
-fr30bf_h_ccr_get (SIM_CPU *current_cpu)
-{
-  return GET_H_CCR ();
-}
-
-/* Set a value for h-ccr.  */
-
-void
-fr30bf_h_ccr_set (SIM_CPU *current_cpu, UQI newval)
-{
-  SET_H_CCR (newval);
-}
-
-/* Get the value of h-scr.  */
-
-UQI
-fr30bf_h_scr_get (SIM_CPU *current_cpu)
-{
-  return GET_H_SCR ();
-}
-
-/* Set a value for h-scr.  */
-
-void
-fr30bf_h_scr_set (SIM_CPU *current_cpu, UQI newval)
-{
-  SET_H_SCR (newval);
-}
-
-/* Get the value of h-ilm.  */
-
-UQI
-fr30bf_h_ilm_get (SIM_CPU *current_cpu)
-{
-  return GET_H_ILM ();
-}
-
-/* Set a value for h-ilm.  */
-
-void
-fr30bf_h_ilm_set (SIM_CPU *current_cpu, UQI newval)
-{
-  SET_H_ILM (newval);
-}
-
-/* Record trace results for INSN.  */
-
-void
-fr30bf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
-			    int *indices, TRACE_RECORD *tr)
-{
-}
+// OBSOLETE /* Misc. support for CPU family fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #define WANT_CPU fr30bf
+// OBSOLETE #define WANT_CPU_FR30BF
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "cgen-ops.h"
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-pc.  */
+// OBSOLETE 
+// OBSOLETE USI
+// OBSOLETE fr30bf_h_pc_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_pc);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-pc.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_pc_set (SIM_CPU *current_cpu, USI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_pc) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-gr.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_gr_get (SIM_CPU *current_cpu, UINT regno)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_gr[regno]);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-gr.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_gr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_gr[regno]) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-cr.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_cr_get (SIM_CPU *current_cpu, UINT regno)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_cr[regno]);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-cr.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_cr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_cr[regno]) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-dr.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_dr_get (SIM_CPU *current_cpu, UINT regno)
+// OBSOLETE {
+// OBSOLETE   return GET_H_DR (regno);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-dr.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_dr_set (SIM_CPU *current_cpu, UINT regno, SI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_DR (regno, newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-ps.  */
+// OBSOLETE 
+// OBSOLETE USI
+// OBSOLETE fr30bf_h_ps_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return GET_H_PS ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-ps.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ps_set (SIM_CPU *current_cpu, USI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_PS (newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-r13.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_r13_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_r13);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-r13.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_r13_set (SIM_CPU *current_cpu, SI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_r13) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-r14.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_r14_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_r14);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-r14.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_r14_set (SIM_CPU *current_cpu, SI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_r14) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-r15.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_r15_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_r15);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-r15.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_r15_set (SIM_CPU *current_cpu, SI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_r15) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-nbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_nbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_nbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-nbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_nbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_nbit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-zbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_zbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_zbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-zbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_zbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_zbit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-vbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_vbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_vbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-vbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_vbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_vbit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-cbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_cbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_cbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-cbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_cbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_cbit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-ibit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_ibit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_ibit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-ibit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ibit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_ibit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-sbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_sbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return GET_H_SBIT ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-sbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_sbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_SBIT (newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-tbit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_tbit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_tbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-tbit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_tbit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_tbit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-d0bit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_d0bit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_d0bit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-d0bit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_d0bit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_d0bit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-d1bit.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_d1bit_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_d1bit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-d1bit.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_d1bit_set (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   CPU (h_d1bit) = newval;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-ccr.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_ccr_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return GET_H_CCR ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-ccr.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ccr_set (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_CCR (newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-scr.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_scr_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return GET_H_SCR ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-scr.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_scr_set (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_SCR (newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Get the value of h-ilm.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_ilm_get (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return GET_H_ILM ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Set a value for h-ilm.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ilm_set (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   SET_H_ILM (newval);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Record trace results for INSN.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
+// OBSOLETE 			    int *indices, TRACE_RECORD *tr)
+// OBSOLETE {
+// OBSOLETE }
diff --git a/sim/fr30/cpu.h b/sim/fr30/cpu.h
index 3a9e7c6..6505920 100644
--- a/sim/fr30/cpu.h
+++ b/sim/fr30/cpu.h
@@ -1,890 +1,890 @@
-/* CPU family header for fr30bf.
-
-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 simulators.
-
-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 CPU_FR30BF_H
-#define CPU_FR30BF_H
-
-/* Maximum number of instructions that are fetched at a time.
-   This is for LIW type instructions sets (e.g. m32r).  */
-#define MAX_LIW_INSNS 1
-
-/* Maximum number of instructions that can be executed in parallel.  */
-#define MAX_PARALLEL_INSNS 1
-
-/* CPU state information.  */
-typedef struct {
-  /* Hardware elements.  */
-  struct {
-  /* program counter */
-  USI h_pc;
-#define GET_H_PC() CPU (h_pc)
-#define SET_H_PC(x) (CPU (h_pc) = (x))
-  /* general registers */
-  SI h_gr[16];
-#define GET_H_GR(a1) CPU (h_gr)[a1]
-#define SET_H_GR(a1, x) (CPU (h_gr)[a1] = (x))
-  /* coprocessor registers */
-  SI h_cr[16];
-#define GET_H_CR(a1) CPU (h_cr)[a1]
-#define SET_H_CR(a1, x) (CPU (h_cr)[a1] = (x))
-  /* dedicated registers */
-  SI h_dr[6];
-#define GET_H_DR(index) fr30bf_h_dr_get_handler (current_cpu, index)
-#define SET_H_DR(index, x) \
-do { \
-fr30bf_h_dr_set_handler (current_cpu, (index), (x));\
-;} while (0)
-  /* processor status */
-  USI h_ps;
-#define GET_H_PS() fr30bf_h_ps_get_handler (current_cpu)
-#define SET_H_PS(x) \
-do { \
-fr30bf_h_ps_set_handler (current_cpu, (x));\
-;} while (0)
-  /* General Register 13 explicitly required */
-  SI h_r13;
-#define GET_H_R13() CPU (h_r13)
-#define SET_H_R13(x) (CPU (h_r13) = (x))
-  /* General Register 14 explicitly required */
-  SI h_r14;
-#define GET_H_R14() CPU (h_r14)
-#define SET_H_R14(x) (CPU (h_r14) = (x))
-  /* General Register 15 explicitly required */
-  SI h_r15;
-#define GET_H_R15() CPU (h_r15)
-#define SET_H_R15(x) (CPU (h_r15) = (x))
-  /* negative         bit */
-  BI h_nbit;
-#define GET_H_NBIT() CPU (h_nbit)
-#define SET_H_NBIT(x) (CPU (h_nbit) = (x))
-  /* zero             bit */
-  BI h_zbit;
-#define GET_H_ZBIT() CPU (h_zbit)
-#define SET_H_ZBIT(x) (CPU (h_zbit) = (x))
-  /* overflow         bit */
-  BI h_vbit;
-#define GET_H_VBIT() CPU (h_vbit)
-#define SET_H_VBIT(x) (CPU (h_vbit) = (x))
-  /* carry            bit */
-  BI h_cbit;
-#define GET_H_CBIT() CPU (h_cbit)
-#define SET_H_CBIT(x) (CPU (h_cbit) = (x))
-  /* interrupt enable bit */
-  BI h_ibit;
-#define GET_H_IBIT() CPU (h_ibit)
-#define SET_H_IBIT(x) (CPU (h_ibit) = (x))
-  /* stack bit */
-  BI h_sbit;
-#define GET_H_SBIT() fr30bf_h_sbit_get_handler (current_cpu)
-#define SET_H_SBIT(x) \
-do { \
-fr30bf_h_sbit_set_handler (current_cpu, (x));\
-;} while (0)
-  /* trace trap       bit */
-  BI h_tbit;
-#define GET_H_TBIT() CPU (h_tbit)
-#define SET_H_TBIT(x) (CPU (h_tbit) = (x))
-  /* division 0       bit */
-  BI h_d0bit;
-#define GET_H_D0BIT() CPU (h_d0bit)
-#define SET_H_D0BIT(x) (CPU (h_d0bit) = (x))
-  /* division 1       bit */
-  BI h_d1bit;
-#define GET_H_D1BIT() CPU (h_d1bit)
-#define SET_H_D1BIT(x) (CPU (h_d1bit) = (x))
-  /* condition code bits */
-  UQI h_ccr;
-#define GET_H_CCR() fr30bf_h_ccr_get_handler (current_cpu)
-#define SET_H_CCR(x) \
-do { \
-fr30bf_h_ccr_set_handler (current_cpu, (x));\
-;} while (0)
-  /* system condition bits */
-  UQI h_scr;
-#define GET_H_SCR() fr30bf_h_scr_get_handler (current_cpu)
-#define SET_H_SCR(x) \
-do { \
-fr30bf_h_scr_set_handler (current_cpu, (x));\
-;} while (0)
-  /* interrupt level mask */
-  UQI h_ilm;
-#define GET_H_ILM() fr30bf_h_ilm_get_handler (current_cpu)
-#define SET_H_ILM(x) \
-do { \
-fr30bf_h_ilm_set_handler (current_cpu, (x));\
-;} while (0)
-  } hardware;
-#define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware)
-} FR30BF_CPU_DATA;
-
-/* Cover fns for register access.  */
-USI fr30bf_h_pc_get (SIM_CPU *);
-void fr30bf_h_pc_set (SIM_CPU *, USI);
-SI fr30bf_h_gr_get (SIM_CPU *, UINT);
-void fr30bf_h_gr_set (SIM_CPU *, UINT, SI);
-SI fr30bf_h_cr_get (SIM_CPU *, UINT);
-void fr30bf_h_cr_set (SIM_CPU *, UINT, SI);
-SI fr30bf_h_dr_get (SIM_CPU *, UINT);
-void fr30bf_h_dr_set (SIM_CPU *, UINT, SI);
-USI fr30bf_h_ps_get (SIM_CPU *);
-void fr30bf_h_ps_set (SIM_CPU *, USI);
-SI fr30bf_h_r13_get (SIM_CPU *);
-void fr30bf_h_r13_set (SIM_CPU *, SI);
-SI fr30bf_h_r14_get (SIM_CPU *);
-void fr30bf_h_r14_set (SIM_CPU *, SI);
-SI fr30bf_h_r15_get (SIM_CPU *);
-void fr30bf_h_r15_set (SIM_CPU *, SI);
-BI fr30bf_h_nbit_get (SIM_CPU *);
-void fr30bf_h_nbit_set (SIM_CPU *, BI);
-BI fr30bf_h_zbit_get (SIM_CPU *);
-void fr30bf_h_zbit_set (SIM_CPU *, BI);
-BI fr30bf_h_vbit_get (SIM_CPU *);
-void fr30bf_h_vbit_set (SIM_CPU *, BI);
-BI fr30bf_h_cbit_get (SIM_CPU *);
-void fr30bf_h_cbit_set (SIM_CPU *, BI);
-BI fr30bf_h_ibit_get (SIM_CPU *);
-void fr30bf_h_ibit_set (SIM_CPU *, BI);
-BI fr30bf_h_sbit_get (SIM_CPU *);
-void fr30bf_h_sbit_set (SIM_CPU *, BI);
-BI fr30bf_h_tbit_get (SIM_CPU *);
-void fr30bf_h_tbit_set (SIM_CPU *, BI);
-BI fr30bf_h_d0bit_get (SIM_CPU *);
-void fr30bf_h_d0bit_set (SIM_CPU *, BI);
-BI fr30bf_h_d1bit_get (SIM_CPU *);
-void fr30bf_h_d1bit_set (SIM_CPU *, BI);
-UQI fr30bf_h_ccr_get (SIM_CPU *);
-void fr30bf_h_ccr_set (SIM_CPU *, UQI);
-UQI fr30bf_h_scr_get (SIM_CPU *);
-void fr30bf_h_scr_set (SIM_CPU *, UQI);
-UQI fr30bf_h_ilm_get (SIM_CPU *);
-void fr30bf_h_ilm_set (SIM_CPU *, UQI);
-
-/* These must be hand-written.  */
-extern CPUREG_FETCH_FN fr30bf_fetch_register;
-extern CPUREG_STORE_FN fr30bf_store_register;
-
-typedef struct {
-  UINT load_regs;
-  UINT load_regs_pending;
-} MODEL_FR30_1_DATA;
-
-/* Instruction argument buffer.  */
-
-union sem_fields {
-  struct { /* no operands */
-    int empty;
-  } fmt_empty;
-  struct { /*  */
-    IADDR i_label9;
-  } sfmt_brad;
-  struct { /*  */
-    UINT f_u8;
-  } sfmt_int;
-  struct { /*  */
-    IADDR i_label12;
-  } sfmt_call;
-  struct { /*  */
-    SI f_s10;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_addsp;
-  struct { /*  */
-    USI f_dir10;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_dmovr15pi;
-  struct { /*  */
-    UINT f_dir8;
-    unsigned char in_h_gr_SI_13;
-    unsigned char out_h_gr_SI_13;
-  } sfmt_dmovr13pib;
-  struct { /*  */
-    USI f_dir9;
-    unsigned char in_h_gr_SI_13;
-    unsigned char out_h_gr_SI_13;
-  } sfmt_dmovr13pih;
-  struct { /*  */
-    USI f_dir10;
-    unsigned char in_h_gr_SI_13;
-    unsigned char out_h_gr_SI_13;
-  } sfmt_dmovr13pi;
-  struct { /*  */
-    UINT f_Rs2;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_ldr15dr;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_Rs1;
-    unsigned char in_Ri;
-  } sfmt_mov2dr;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_Rs1;
-    unsigned char out_Ri;
-  } sfmt_movdr;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_i32;
-    unsigned char out_Ri;
-  } sfmt_ldi32;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_i20;
-    unsigned char out_Ri;
-  } sfmt_ldi20;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_i8;
-    unsigned char out_Ri;
-  } sfmt_ldi8;
-  struct { /*  */
-    USI f_u10;
-    unsigned char in_h_gr_SI_14;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_14;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_enter;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    unsigned char in_Ri;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_str15gr;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    USI f_udisp6;
-    unsigned char in_Ri;
-    unsigned char in_h_gr_SI_15;
-  } sfmt_str15;
-  struct { /*  */
-    SI* i_Ri;
-    INT f_disp8;
-    UINT f_Ri;
-    unsigned char in_Ri;
-    unsigned char in_h_gr_SI_14;
-  } sfmt_str14b;
-  struct { /*  */
-    SI* i_Ri;
-    SI f_disp9;
-    UINT f_Ri;
-    unsigned char in_Ri;
-    unsigned char in_h_gr_SI_14;
-  } sfmt_str14h;
-  struct { /*  */
-    SI* i_Ri;
-    SI f_disp10;
-    UINT f_Ri;
-    unsigned char in_Ri;
-    unsigned char in_h_gr_SI_14;
-  } sfmt_str14;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_Ri;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_ldr15gr;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    USI f_udisp6;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_Ri;
-  } sfmt_ldr15;
-  struct { /*  */
-    SI* i_Ri;
-    INT f_disp8;
-    UINT f_Ri;
-    unsigned char in_h_gr_SI_14;
-    unsigned char out_Ri;
-  } sfmt_ldr14ub;
-  struct { /*  */
-    SI* i_Ri;
-    SI f_disp9;
-    UINT f_Ri;
-    unsigned char in_h_gr_SI_14;
-    unsigned char out_Ri;
-  } sfmt_ldr14uh;
-  struct { /*  */
-    SI* i_Ri;
-    SI f_disp10;
-    UINT f_Ri;
-    unsigned char in_h_gr_SI_14;
-    unsigned char out_Ri;
-  } sfmt_ldr14;
-  struct { /*  */
-    SI* i_Ri;
-    SI f_m4;
-    UINT f_Ri;
-    unsigned char in_Ri;
-    unsigned char out_Ri;
-  } sfmt_add2;
-  struct { /*  */
-    SI* i_Ri;
-    UINT f_Ri;
-    UINT f_u4;
-    unsigned char in_Ri;
-    unsigned char out_Ri;
-  } sfmt_addi;
-  struct { /*  */
-    SI* i_Ri;
-    SI* i_Rj;
-    UINT f_Ri;
-    UINT f_Rj;
-    unsigned char in_Ri;
-    unsigned char in_Rj;
-    unsigned char in_h_gr_SI_13;
-  } sfmt_str13;
-  struct { /*  */
-    SI* i_Ri;
-    SI* i_Rj;
-    UINT f_Ri;
-    UINT f_Rj;
-    unsigned char in_Rj;
-    unsigned char in_h_gr_SI_13;
-    unsigned char out_Ri;
-  } sfmt_ldr13;
-  struct { /*  */
-    SI* i_Ri;
-    SI* i_Rj;
-    UINT f_Ri;
-    UINT f_Rj;
-    unsigned char in_Ri;
-    unsigned char in_Rj;
-    unsigned char out_Ri;
-  } sfmt_add;
-  struct { /*  */
-    UINT f_reglist_hi_st;
-    unsigned char in_h_gr_SI_10;
-    unsigned char in_h_gr_SI_11;
-    unsigned char in_h_gr_SI_12;
-    unsigned char in_h_gr_SI_13;
-    unsigned char in_h_gr_SI_14;
-    unsigned char in_h_gr_SI_15;
-    unsigned char in_h_gr_SI_8;
-    unsigned char in_h_gr_SI_9;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_stm1;
-  struct { /*  */
-    UINT f_reglist_hi_ld;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_10;
-    unsigned char out_h_gr_SI_11;
-    unsigned char out_h_gr_SI_12;
-    unsigned char out_h_gr_SI_13;
-    unsigned char out_h_gr_SI_14;
-    unsigned char out_h_gr_SI_15;
-    unsigned char out_h_gr_SI_8;
-    unsigned char out_h_gr_SI_9;
-  } sfmt_ldm1;
-  struct { /*  */
-    UINT f_reglist_low_st;
-    unsigned char in_h_gr_SI_0;
-    unsigned char in_h_gr_SI_1;
-    unsigned char in_h_gr_SI_15;
-    unsigned char in_h_gr_SI_2;
-    unsigned char in_h_gr_SI_3;
-    unsigned char in_h_gr_SI_4;
-    unsigned char in_h_gr_SI_5;
-    unsigned char in_h_gr_SI_6;
-    unsigned char in_h_gr_SI_7;
-    unsigned char out_h_gr_SI_15;
-  } sfmt_stm0;
-  struct { /*  */
-    UINT f_reglist_low_ld;
-    unsigned char in_h_gr_SI_15;
-    unsigned char out_h_gr_SI_0;
-    unsigned char out_h_gr_SI_1;
-    unsigned char out_h_gr_SI_15;
-    unsigned char out_h_gr_SI_2;
-    unsigned char out_h_gr_SI_3;
-    unsigned char out_h_gr_SI_4;
-    unsigned char out_h_gr_SI_5;
-    unsigned char out_h_gr_SI_6;
-    unsigned char out_h_gr_SI_7;
-  } sfmt_ldm0;
-#if WITH_SCACHE_PBB
-  /* Writeback handler.  */
-  struct {
-    /* Pointer to argbuf entry for insn whose results need writing back.  */
-    const struct argbuf *abuf;
-  } write;
-  /* x-before handler */
-  struct {
-    /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
-    int first_p;
-  } before;
-  /* x-after handler */
-  struct {
-    int empty;
-  } after;
-  /* This entry is used to terminate each pbb.  */
-  struct {
-    /* Number of insns in pbb.  */
-    int insn_count;
-    /* Next pbb to execute.  */
-    SCACHE *next;
-    SCACHE *branch_target;
-  } chain;
-#endif
-};
-
-/* The ARGBUF struct.  */
-struct argbuf {
-  /* These are the baseclass definitions.  */
-  IADDR addr;
-  const IDESC *idesc;
-  char trace_p;
-  char profile_p;
-  /* ??? Temporary hack for skip insns.  */
-  char skip_count;
-  char unused;
-  /* cpu specific data follows */
-  union sem semantic;
-  int written;
-  union sem_fields fields;
-};
-
-/* A cached insn.
-
-   ??? SCACHE used to contain more than just argbuf.  We could delete the
-   type entirely and always just use ARGBUF, but for future concerns and as
-   a level of abstraction it is left in.  */
-
-struct scache {
-  struct argbuf argbuf;
-};
-
-/* Macros to simplify extraction, reading and semantic code.
-   These define and assign the local vars that contain the insn's fields.  */
-
-#define EXTRACT_IFMT_EMPTY_VARS \
-  unsigned int length;
-#define EXTRACT_IFMT_EMPTY_CODE \
-  length = 0; \
-
-#define EXTRACT_IFMT_ADD_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_Rj; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_ADD_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_ADDI_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_u4; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_ADDI_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_ADD2_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  SI f_m4; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_ADD2_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_DIV0S_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_DIV0S_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_DIV3_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_op4; \
-  unsigned int length;
-#define EXTRACT_IFMT_DIV3_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_op4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDI8_VARS \
-  UINT f_op1; \
-  UINT f_i8; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDI8_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDI20_VARS \
-  UINT f_op1; \
-  UINT f_i20_4; \
-  UINT f_i20_16; \
-  UINT f_i20; \
-  UINT f_op2; \
-  UINT f_Ri; \
-  /* Contents of trailing part of insn.  */ \
-  UINT word_1; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDI20_CODE \
-  length = 4; \
-  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); \
-{\
-  f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));\
-}\
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDI32_VARS \
-  UINT f_op1; \
-  UINT f_i32; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_Ri; \
-  /* Contents of trailing part of insn.  */ \
-  UINT word_1; \
-  UINT word_2; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDI32_CODE \
-  length = 6; \
-  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
-  word_2 = GETIMEMUHI (current_cpu, pc + 4); \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDR14_VARS \
-  UINT f_op1; \
-  SI f_disp10; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDR14_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDR14UH_VARS \
-  UINT f_op1; \
-  SI f_disp9; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDR14UH_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDR14UB_VARS \
-  UINT f_op1; \
-  INT f_disp8; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDR14UB_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDR15_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  USI f_udisp6; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDR15_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_LDR15DR_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_Rs2; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDR15DR_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_MOVDR_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_Rs1; \
-  UINT f_Ri; \
-  unsigned int length;
-#define EXTRACT_IFMT_MOVDR_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-
-#define EXTRACT_IFMT_CALL_VARS \
-  UINT f_op1; \
-  UINT f_op5; \
-  SI f_rel12; \
-  unsigned int length;
-#define EXTRACT_IFMT_CALL_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op5 = EXTRACT_MSB0_UINT (insn, 16, 4, 1); \
-  f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); \
-
-#define EXTRACT_IFMT_INT_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_u8; \
-  unsigned int length;
-#define EXTRACT_IFMT_INT_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_BRAD_VARS \
-  UINT f_op1; \
-  UINT f_cc; \
-  SI f_rel9; \
-  unsigned int length;
-#define EXTRACT_IFMT_BRAD_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_cc = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); \
-
-#define EXTRACT_IFMT_DMOVR13_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  USI f_dir10; \
-  unsigned int length;
-#define EXTRACT_IFMT_DMOVR13_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
-
-#define EXTRACT_IFMT_DMOVR13H_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  USI f_dir9; \
-  unsigned int length;
-#define EXTRACT_IFMT_DMOVR13H_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); \
-
-#define EXTRACT_IFMT_DMOVR13B_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_dir8; \
-  unsigned int length;
-#define EXTRACT_IFMT_DMOVR13B_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_COPOP_VARS \
-  UINT f_op1; \
-  UINT f_ccc; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_CRj; \
-  UINT f_u4c; \
-  UINT f_CRi; \
-  /* Contents of trailing part of insn.  */ \
-  UINT word_1; \
-  unsigned int length;
-#define EXTRACT_IFMT_COPOP_CODE \
-  length = 4; \
-  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
-  f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-  f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
-
-#define EXTRACT_IFMT_COPLD_VARS \
-  UINT f_op1; \
-  UINT f_ccc; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_Rjc; \
-  UINT f_u4c; \
-  UINT f_CRi; \
-  /* Contents of trailing part of insn.  */ \
-  UINT word_1; \
-  unsigned int length;
-#define EXTRACT_IFMT_COPLD_CODE \
-  length = 4; \
-  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_Rjc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
-  f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-  f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
-
-#define EXTRACT_IFMT_COPST_VARS \
-  UINT f_op1; \
-  UINT f_ccc; \
-  UINT f_op2; \
-  UINT f_op3; \
-  UINT f_CRj; \
-  UINT f_u4c; \
-  UINT f_Ric; \
-  /* Contents of trailing part of insn.  */ \
-  UINT word_1; \
-  unsigned int length;
-#define EXTRACT_IFMT_COPST_CODE \
-  length = 4; \
-  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
-  f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
-  f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
-  f_Ric = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
-
-#define EXTRACT_IFMT_ADDSP_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  SI f_s10; \
-  unsigned int length;
-#define EXTRACT_IFMT_ADDSP_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); \
-
-#define EXTRACT_IFMT_LDM0_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_reglist_low_ld; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDM0_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_LDM1_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_reglist_hi_ld; \
-  unsigned int length;
-#define EXTRACT_IFMT_LDM1_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_STM0_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_reglist_low_st; \
-  unsigned int length;
-#define EXTRACT_IFMT_STM0_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_STM1_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  UINT f_reglist_hi_st; \
-  unsigned int length;
-#define EXTRACT_IFMT_STM1_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
-
-#define EXTRACT_IFMT_ENTER_VARS \
-  UINT f_op1; \
-  UINT f_op2; \
-  USI f_u10; \
-  unsigned int length;
-#define EXTRACT_IFMT_ENTER_CODE \
-  length = 2; \
-  f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
-  f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
-  f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
-
-/* Collection of various things for the trace handler to use.  */
-
-typedef struct trace_record {
-  IADDR pc;
-  /* FIXME:wip */
-} TRACE_RECORD;
-
-#endif /* CPU_FR30BF_H */
+// OBSOLETE /* CPU family header for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #ifndef CPU_FR30BF_H
+// OBSOLETE #define CPU_FR30BF_H
+// OBSOLETE 
+// OBSOLETE /* Maximum number of instructions that are fetched at a time.
+// OBSOLETE    This is for LIW type instructions sets (e.g. m32r).  */
+// OBSOLETE #define MAX_LIW_INSNS 1
+// OBSOLETE 
+// OBSOLETE /* Maximum number of instructions that can be executed in parallel.  */
+// OBSOLETE #define MAX_PARALLEL_INSNS 1
+// OBSOLETE 
+// OBSOLETE /* CPU state information.  */
+// OBSOLETE typedef struct {
+// OBSOLETE   /* Hardware elements.  */
+// OBSOLETE   struct {
+// OBSOLETE   /* program counter */
+// OBSOLETE   USI h_pc;
+// OBSOLETE #define GET_H_PC() CPU (h_pc)
+// OBSOLETE #define SET_H_PC(x) (CPU (h_pc) = (x))
+// OBSOLETE   /* general registers */
+// OBSOLETE   SI h_gr[16];
+// OBSOLETE #define GET_H_GR(a1) CPU (h_gr)[a1]
+// OBSOLETE #define SET_H_GR(a1, x) (CPU (h_gr)[a1] = (x))
+// OBSOLETE   /* coprocessor registers */
+// OBSOLETE   SI h_cr[16];
+// OBSOLETE #define GET_H_CR(a1) CPU (h_cr)[a1]
+// OBSOLETE #define SET_H_CR(a1, x) (CPU (h_cr)[a1] = (x))
+// OBSOLETE   /* dedicated registers */
+// OBSOLETE   SI h_dr[6];
+// OBSOLETE #define GET_H_DR(index) fr30bf_h_dr_get_handler (current_cpu, index)
+// OBSOLETE #define SET_H_DR(index, x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_dr_set_handler (current_cpu, (index), (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   /* processor status */
+// OBSOLETE   USI h_ps;
+// OBSOLETE #define GET_H_PS() fr30bf_h_ps_get_handler (current_cpu)
+// OBSOLETE #define SET_H_PS(x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_ps_set_handler (current_cpu, (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   /* General Register 13 explicitly required */
+// OBSOLETE   SI h_r13;
+// OBSOLETE #define GET_H_R13() CPU (h_r13)
+// OBSOLETE #define SET_H_R13(x) (CPU (h_r13) = (x))
+// OBSOLETE   /* General Register 14 explicitly required */
+// OBSOLETE   SI h_r14;
+// OBSOLETE #define GET_H_R14() CPU (h_r14)
+// OBSOLETE #define SET_H_R14(x) (CPU (h_r14) = (x))
+// OBSOLETE   /* General Register 15 explicitly required */
+// OBSOLETE   SI h_r15;
+// OBSOLETE #define GET_H_R15() CPU (h_r15)
+// OBSOLETE #define SET_H_R15(x) (CPU (h_r15) = (x))
+// OBSOLETE   /* negative         bit */
+// OBSOLETE   BI h_nbit;
+// OBSOLETE #define GET_H_NBIT() CPU (h_nbit)
+// OBSOLETE #define SET_H_NBIT(x) (CPU (h_nbit) = (x))
+// OBSOLETE   /* zero             bit */
+// OBSOLETE   BI h_zbit;
+// OBSOLETE #define GET_H_ZBIT() CPU (h_zbit)
+// OBSOLETE #define SET_H_ZBIT(x) (CPU (h_zbit) = (x))
+// OBSOLETE   /* overflow         bit */
+// OBSOLETE   BI h_vbit;
+// OBSOLETE #define GET_H_VBIT() CPU (h_vbit)
+// OBSOLETE #define SET_H_VBIT(x) (CPU (h_vbit) = (x))
+// OBSOLETE   /* carry            bit */
+// OBSOLETE   BI h_cbit;
+// OBSOLETE #define GET_H_CBIT() CPU (h_cbit)
+// OBSOLETE #define SET_H_CBIT(x) (CPU (h_cbit) = (x))
+// OBSOLETE   /* interrupt enable bit */
+// OBSOLETE   BI h_ibit;
+// OBSOLETE #define GET_H_IBIT() CPU (h_ibit)
+// OBSOLETE #define SET_H_IBIT(x) (CPU (h_ibit) = (x))
+// OBSOLETE   /* stack bit */
+// OBSOLETE   BI h_sbit;
+// OBSOLETE #define GET_H_SBIT() fr30bf_h_sbit_get_handler (current_cpu)
+// OBSOLETE #define SET_H_SBIT(x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_sbit_set_handler (current_cpu, (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   /* trace trap       bit */
+// OBSOLETE   BI h_tbit;
+// OBSOLETE #define GET_H_TBIT() CPU (h_tbit)
+// OBSOLETE #define SET_H_TBIT(x) (CPU (h_tbit) = (x))
+// OBSOLETE   /* division 0       bit */
+// OBSOLETE   BI h_d0bit;
+// OBSOLETE #define GET_H_D0BIT() CPU (h_d0bit)
+// OBSOLETE #define SET_H_D0BIT(x) (CPU (h_d0bit) = (x))
+// OBSOLETE   /* division 1       bit */
+// OBSOLETE   BI h_d1bit;
+// OBSOLETE #define GET_H_D1BIT() CPU (h_d1bit)
+// OBSOLETE #define SET_H_D1BIT(x) (CPU (h_d1bit) = (x))
+// OBSOLETE   /* condition code bits */
+// OBSOLETE   UQI h_ccr;
+// OBSOLETE #define GET_H_CCR() fr30bf_h_ccr_get_handler (current_cpu)
+// OBSOLETE #define SET_H_CCR(x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_ccr_set_handler (current_cpu, (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   /* system condition bits */
+// OBSOLETE   UQI h_scr;
+// OBSOLETE #define GET_H_SCR() fr30bf_h_scr_get_handler (current_cpu)
+// OBSOLETE #define SET_H_SCR(x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_scr_set_handler (current_cpu, (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   /* interrupt level mask */
+// OBSOLETE   UQI h_ilm;
+// OBSOLETE #define GET_H_ILM() fr30bf_h_ilm_get_handler (current_cpu)
+// OBSOLETE #define SET_H_ILM(x) \
+// OBSOLETE do { \
+// OBSOLETE fr30bf_h_ilm_set_handler (current_cpu, (x));\
+// OBSOLETE ;} while (0)
+// OBSOLETE   } hardware;
+// OBSOLETE #define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware)
+// OBSOLETE } FR30BF_CPU_DATA;
+// OBSOLETE 
+// OBSOLETE /* Cover fns for register access.  */
+// OBSOLETE USI fr30bf_h_pc_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_pc_set (SIM_CPU *, USI);
+// OBSOLETE SI fr30bf_h_gr_get (SIM_CPU *, UINT);
+// OBSOLETE void fr30bf_h_gr_set (SIM_CPU *, UINT, SI);
+// OBSOLETE SI fr30bf_h_cr_get (SIM_CPU *, UINT);
+// OBSOLETE void fr30bf_h_cr_set (SIM_CPU *, UINT, SI);
+// OBSOLETE SI fr30bf_h_dr_get (SIM_CPU *, UINT);
+// OBSOLETE void fr30bf_h_dr_set (SIM_CPU *, UINT, SI);
+// OBSOLETE USI fr30bf_h_ps_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_ps_set (SIM_CPU *, USI);
+// OBSOLETE SI fr30bf_h_r13_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_r13_set (SIM_CPU *, SI);
+// OBSOLETE SI fr30bf_h_r14_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_r14_set (SIM_CPU *, SI);
+// OBSOLETE SI fr30bf_h_r15_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_r15_set (SIM_CPU *, SI);
+// OBSOLETE BI fr30bf_h_nbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_nbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_zbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_zbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_vbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_vbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_cbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_cbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_ibit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_ibit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_sbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_sbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_tbit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_tbit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_d0bit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_d0bit_set (SIM_CPU *, BI);
+// OBSOLETE BI fr30bf_h_d1bit_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_d1bit_set (SIM_CPU *, BI);
+// OBSOLETE UQI fr30bf_h_ccr_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_ccr_set (SIM_CPU *, UQI);
+// OBSOLETE UQI fr30bf_h_scr_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_scr_set (SIM_CPU *, UQI);
+// OBSOLETE UQI fr30bf_h_ilm_get (SIM_CPU *);
+// OBSOLETE void fr30bf_h_ilm_set (SIM_CPU *, UQI);
+// OBSOLETE 
+// OBSOLETE /* These must be hand-written.  */
+// OBSOLETE extern CPUREG_FETCH_FN fr30bf_fetch_register;
+// OBSOLETE extern CPUREG_STORE_FN fr30bf_store_register;
+// OBSOLETE 
+// OBSOLETE typedef struct {
+// OBSOLETE   UINT load_regs;
+// OBSOLETE   UINT load_regs_pending;
+// OBSOLETE } MODEL_FR30_1_DATA;
+// OBSOLETE 
+// OBSOLETE /* Instruction argument buffer.  */
+// OBSOLETE 
+// OBSOLETE union sem_fields {
+// OBSOLETE   struct { /* no operands */
+// OBSOLETE     int empty;
+// OBSOLETE   } fmt_empty;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     IADDR i_label9;
+// OBSOLETE   } sfmt_brad;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_u8;
+// OBSOLETE   } sfmt_int;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     IADDR i_label12;
+// OBSOLETE   } sfmt_call;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI f_s10;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_addsp;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     USI f_dir10;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_dmovr15pi;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_dir8;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE     unsigned char out_h_gr_SI_13;
+// OBSOLETE   } sfmt_dmovr13pib;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     USI f_dir9;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE     unsigned char out_h_gr_SI_13;
+// OBSOLETE   } sfmt_dmovr13pih;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     USI f_dir10;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE     unsigned char out_h_gr_SI_13;
+// OBSOLETE   } sfmt_dmovr13pi;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_Rs2;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_ldr15dr;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_Rs1;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE   } sfmt_mov2dr;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_Rs1;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_movdr;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_i32;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldi32;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_i20;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldi20;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_i8;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldi8;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     USI f_u10;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_14;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_enter;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_str15gr;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     USI f_udisp6;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE   } sfmt_str15;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     INT f_disp8;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE   } sfmt_str14b;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI f_disp9;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE   } sfmt_str14h;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI f_disp10;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE   } sfmt_str14;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_ldr15gr;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     USI f_udisp6;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldr15;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     INT f_disp8;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldr14ub;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI f_disp9;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldr14uh;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI f_disp10;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldr14;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI f_m4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_add2;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_addi;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI* i_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_Rj;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE   } sfmt_str13;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI* i_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     unsigned char in_Rj;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_ldr13;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     SI* i_Ri;
+// OBSOLETE     SI* i_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     unsigned char in_Ri;
+// OBSOLETE     unsigned char in_Rj;
+// OBSOLETE     unsigned char out_Ri;
+// OBSOLETE   } sfmt_add;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_reglist_hi_st;
+// OBSOLETE     unsigned char in_h_gr_SI_10;
+// OBSOLETE     unsigned char in_h_gr_SI_11;
+// OBSOLETE     unsigned char in_h_gr_SI_12;
+// OBSOLETE     unsigned char in_h_gr_SI_13;
+// OBSOLETE     unsigned char in_h_gr_SI_14;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char in_h_gr_SI_8;
+// OBSOLETE     unsigned char in_h_gr_SI_9;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_stm1;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_reglist_hi_ld;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_10;
+// OBSOLETE     unsigned char out_h_gr_SI_11;
+// OBSOLETE     unsigned char out_h_gr_SI_12;
+// OBSOLETE     unsigned char out_h_gr_SI_13;
+// OBSOLETE     unsigned char out_h_gr_SI_14;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_8;
+// OBSOLETE     unsigned char out_h_gr_SI_9;
+// OBSOLETE   } sfmt_ldm1;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_reglist_low_st;
+// OBSOLETE     unsigned char in_h_gr_SI_0;
+// OBSOLETE     unsigned char in_h_gr_SI_1;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char in_h_gr_SI_2;
+// OBSOLETE     unsigned char in_h_gr_SI_3;
+// OBSOLETE     unsigned char in_h_gr_SI_4;
+// OBSOLETE     unsigned char in_h_gr_SI_5;
+// OBSOLETE     unsigned char in_h_gr_SI_6;
+// OBSOLETE     unsigned char in_h_gr_SI_7;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE   } sfmt_stm0;
+// OBSOLETE   struct { /*  */
+// OBSOLETE     UINT f_reglist_low_ld;
+// OBSOLETE     unsigned char in_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_0;
+// OBSOLETE     unsigned char out_h_gr_SI_1;
+// OBSOLETE     unsigned char out_h_gr_SI_15;
+// OBSOLETE     unsigned char out_h_gr_SI_2;
+// OBSOLETE     unsigned char out_h_gr_SI_3;
+// OBSOLETE     unsigned char out_h_gr_SI_4;
+// OBSOLETE     unsigned char out_h_gr_SI_5;
+// OBSOLETE     unsigned char out_h_gr_SI_6;
+// OBSOLETE     unsigned char out_h_gr_SI_7;
+// OBSOLETE   } sfmt_ldm0;
+// OBSOLETE #if WITH_SCACHE_PBB
+// OBSOLETE   /* Writeback handler.  */
+// OBSOLETE   struct {
+// OBSOLETE     /* Pointer to argbuf entry for insn whose results need writing back.  */
+// OBSOLETE     const struct argbuf *abuf;
+// OBSOLETE   } write;
+// OBSOLETE   /* x-before handler */
+// OBSOLETE   struct {
+// OBSOLETE     /*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
+// OBSOLETE     int first_p;
+// OBSOLETE   } before;
+// OBSOLETE   /* x-after handler */
+// OBSOLETE   struct {
+// OBSOLETE     int empty;
+// OBSOLETE   } after;
+// OBSOLETE   /* This entry is used to terminate each pbb.  */
+// OBSOLETE   struct {
+// OBSOLETE     /* Number of insns in pbb.  */
+// OBSOLETE     int insn_count;
+// OBSOLETE     /* Next pbb to execute.  */
+// OBSOLETE     SCACHE *next;
+// OBSOLETE     SCACHE *branch_target;
+// OBSOLETE   } chain;
+// OBSOLETE #endif
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* The ARGBUF struct.  */
+// OBSOLETE struct argbuf {
+// OBSOLETE   /* These are the baseclass definitions.  */
+// OBSOLETE   IADDR addr;
+// OBSOLETE   const IDESC *idesc;
+// OBSOLETE   char trace_p;
+// OBSOLETE   char profile_p;
+// OBSOLETE   /* ??? Temporary hack for skip insns.  */
+// OBSOLETE   char skip_count;
+// OBSOLETE   char unused;
+// OBSOLETE   /* cpu specific data follows */
+// OBSOLETE   union sem semantic;
+// OBSOLETE   int written;
+// OBSOLETE   union sem_fields fields;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* A cached insn.
+// OBSOLETE 
+// OBSOLETE    ??? SCACHE used to contain more than just argbuf.  We could delete the
+// OBSOLETE    type entirely and always just use ARGBUF, but for future concerns and as
+// OBSOLETE    a level of abstraction it is left in.  */
+// OBSOLETE 
+// OBSOLETE struct scache {
+// OBSOLETE   struct argbuf argbuf;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Macros to simplify extraction, reading and semantic code.
+// OBSOLETE    These define and assign the local vars that contain the insn's fields.  */
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_EMPTY_VARS \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_EMPTY_CODE \
+// OBSOLETE   length = 0; \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_ADD_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_Rj; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_ADD_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_ADDI_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_u4; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_ADDI_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_ADD2_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   SI f_m4; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_ADD2_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_DIV0S_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_DIV0S_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_DIV3_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_op4; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_DIV3_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_op4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDI8_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_i8; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDI8_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDI20_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_i20_4; \
+// OBSOLETE   UINT f_i20_16; \
+// OBSOLETE   UINT f_i20; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   /* Contents of trailing part of insn.  */ \
+// OBSOLETE   UINT word_1; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDI20_CODE \
+// OBSOLETE   length = 4; \
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); \
+// OBSOLETE {\
+// OBSOLETE   f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));\
+// OBSOLETE }\
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDI32_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_i32; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   /* Contents of trailing part of insn.  */ \
+// OBSOLETE   UINT word_1; \
+// OBSOLETE   UINT word_2; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDI32_CODE \
+// OBSOLETE   length = 6; \
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+// OBSOLETE   word_2 = GETIMEMUHI (current_cpu, pc + 4); \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDR14_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   SI f_disp10; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDR14_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDR14UH_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   SI f_disp9; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDR14UH_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDR14UB_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   INT f_disp8; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDR14UB_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDR15_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   USI f_udisp6; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDR15_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDR15DR_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_Rs2; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDR15DR_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_MOVDR_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_Rs1; \
+// OBSOLETE   UINT f_Ri; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_MOVDR_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_CALL_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op5; \
+// OBSOLETE   SI f_rel12; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_CALL_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op5 = EXTRACT_MSB0_UINT (insn, 16, 4, 1); \
+// OBSOLETE   f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_INT_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_u8; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_INT_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_BRAD_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_cc; \
+// OBSOLETE   SI f_rel9; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_BRAD_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_cc = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   USI f_dir10; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13H_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   USI f_dir9; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13H_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13B_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_dir8; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_DMOVR13B_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_COPOP_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_ccc; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_CRj; \
+// OBSOLETE   UINT f_u4c; \
+// OBSOLETE   UINT f_CRi; \
+// OBSOLETE   /* Contents of trailing part of insn.  */ \
+// OBSOLETE   UINT word_1; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_COPOP_CODE \
+// OBSOLETE   length = 4; \
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+// OBSOLETE   f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE   f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_COPLD_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_ccc; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_Rjc; \
+// OBSOLETE   UINT f_u4c; \
+// OBSOLETE   UINT f_CRi; \
+// OBSOLETE   /* Contents of trailing part of insn.  */ \
+// OBSOLETE   UINT word_1; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_COPLD_CODE \
+// OBSOLETE   length = 4; \
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_Rjc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+// OBSOLETE   f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE   f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_COPST_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_ccc; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_op3; \
+// OBSOLETE   UINT f_CRj; \
+// OBSOLETE   UINT f_u4c; \
+// OBSOLETE   UINT f_Ric; \
+// OBSOLETE   /* Contents of trailing part of insn.  */ \
+// OBSOLETE   UINT word_1; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_COPST_CODE \
+// OBSOLETE   length = 4; \
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2); \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+// OBSOLETE   f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+// OBSOLETE   f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+// OBSOLETE   f_Ric = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 4) << 0)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_ADDSP_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   SI f_s10; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_ADDSP_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDM0_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_reglist_low_ld; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDM0_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_LDM1_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_reglist_hi_ld; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_LDM1_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_STM0_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_reglist_low_st; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_STM0_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_STM1_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   UINT f_reglist_hi_st; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_STM1_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
+// OBSOLETE 
+// OBSOLETE #define EXTRACT_IFMT_ENTER_VARS \
+// OBSOLETE   UINT f_op1; \
+// OBSOLETE   UINT f_op2; \
+// OBSOLETE   USI f_u10; \
+// OBSOLETE   unsigned int length;
+// OBSOLETE #define EXTRACT_IFMT_ENTER_CODE \
+// OBSOLETE   length = 2; \
+// OBSOLETE   f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+// OBSOLETE   f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+// OBSOLETE   f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
+// OBSOLETE 
+// OBSOLETE /* Collection of various things for the trace handler to use.  */
+// OBSOLETE 
+// OBSOLETE typedef struct trace_record {
+// OBSOLETE   IADDR pc;
+// OBSOLETE   /* FIXME:wip */
+// OBSOLETE } TRACE_RECORD;
+// OBSOLETE 
+// OBSOLETE #endif /* CPU_FR30BF_H */
diff --git a/sim/fr30/cpuall.h b/sim/fr30/cpuall.h
index 296228d..e0c7c00 100644
--- a/sim/fr30/cpuall.h
+++ b/sim/fr30/cpuall.h
@@ -1,66 +1,66 @@
-/* Simulator CPU header for fr30.
-
-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 simulators.
-
-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 FR30_CPUALL_H
-#define FR30_CPUALL_H
-
-/* Include files for each cpu family.  */
-
-#ifdef WANT_CPU_FR30BF
-#include "eng.h"
-#include "cgen-engine.h"
-#include "cpu.h"
-#include "decode.h"
-#endif
-
-extern const MACH fr30_mach;
-
-#ifndef WANT_CPU
-/* The ARGBUF struct.  */
-struct argbuf {
-  /* These are the baseclass definitions.  */
-  IADDR addr;
-  const IDESC *idesc;
-  char trace_p;
-  char profile_p;
-  /* ??? Temporary hack for skip insns.  */
-  char skip_count;
-  char unused;
-  /* cpu specific data follows */
-};
-#endif
-
-#ifndef WANT_CPU
-/* A cached insn.
-
-   ??? SCACHE used to contain more than just argbuf.  We could delete the
-   type entirely and always just use ARGBUF, but for future concerns and as
-   a level of abstraction it is left in.  */
-
-struct scache {
-  struct argbuf argbuf;
-};
-#endif
-
-#endif /* FR30_CPUALL_H */
+// OBSOLETE /* Simulator CPU header for fr30.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #ifndef FR30_CPUALL_H
+// OBSOLETE #define FR30_CPUALL_H
+// OBSOLETE 
+// OBSOLETE /* Include files for each cpu family.  */
+// OBSOLETE 
+// OBSOLETE #ifdef WANT_CPU_FR30BF
+// OBSOLETE #include "eng.h"
+// OBSOLETE #include "cgen-engine.h"
+// OBSOLETE #include "cpu.h"
+// OBSOLETE #include "decode.h"
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE extern const MACH fr30_mach;
+// OBSOLETE 
+// OBSOLETE #ifndef WANT_CPU
+// OBSOLETE /* The ARGBUF struct.  */
+// OBSOLETE struct argbuf {
+// OBSOLETE   /* These are the baseclass definitions.  */
+// OBSOLETE   IADDR addr;
+// OBSOLETE   const IDESC *idesc;
+// OBSOLETE   char trace_p;
+// OBSOLETE   char profile_p;
+// OBSOLETE   /* ??? Temporary hack for skip insns.  */
+// OBSOLETE   char skip_count;
+// OBSOLETE   char unused;
+// OBSOLETE   /* cpu specific data follows */
+// OBSOLETE };
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #ifndef WANT_CPU
+// OBSOLETE /* A cached insn.
+// OBSOLETE 
+// OBSOLETE    ??? SCACHE used to contain more than just argbuf.  We could delete the
+// OBSOLETE    type entirely and always just use ARGBUF, but for future concerns and as
+// OBSOLETE    a level of abstraction it is left in.  */
+// OBSOLETE 
+// OBSOLETE struct scache {
+// OBSOLETE   struct argbuf argbuf;
+// OBSOLETE };
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #endif /* FR30_CPUALL_H */
diff --git a/sim/fr30/decode.c b/sim/fr30/decode.c
index 445c3ab..dbbcce5 100644
--- a/sim/fr30/decode.c
+++ b/sim/fr30/decode.c
@@ -1,3453 +1,3453 @@
-/* Simulator instruction decoder for fr30bf.
-
-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 simulators.
-
-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.
-
-*/
-
-#define WANT_CPU fr30bf
-#define WANT_CPU_FR30BF
-
-#include "sim-main.h"
-#include "sim-assert.h"
-
-/* The instruction descriptor array.
-   This is computed at runtime.  Space for it is not malloc'd to save a
-   teensy bit of cpu in the decoder.  Moving it to malloc space is trivial
-   but won't be done until necessary (we don't currently support the runtime
-   addition of instructions nor an SMP machine with different cpus).  */
-static IDESC fr30bf_insn_data[FR30BF_INSN_XCHB + 1];
-
-/* Commas between elements are contained in the macros.
-   Some of these are conditionally compiled out.  */
-
-static const struct insn_sem fr30bf_insn_sem[] =
-{
-  { VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY },
-  { VIRTUAL_INSN_X_AFTER, FR30BF_INSN_X_AFTER, FR30BF_SFMT_EMPTY },
-  { VIRTUAL_INSN_X_BEFORE, FR30BF_INSN_X_BEFORE, FR30BF_SFMT_EMPTY },
-  { VIRTUAL_INSN_X_CTI_CHAIN, FR30BF_INSN_X_CTI_CHAIN, FR30BF_SFMT_EMPTY },
-  { VIRTUAL_INSN_X_CHAIN, FR30BF_INSN_X_CHAIN, FR30BF_SFMT_EMPTY },
-  { VIRTUAL_INSN_X_BEGIN, FR30BF_INSN_X_BEGIN, FR30BF_SFMT_EMPTY },
-  { FR30_INSN_ADD, FR30BF_INSN_ADD, FR30BF_SFMT_ADD },
-  { FR30_INSN_ADDI, FR30BF_INSN_ADDI, FR30BF_SFMT_ADDI },
-  { FR30_INSN_ADD2, FR30BF_INSN_ADD2, FR30BF_SFMT_ADD2 },
-  { FR30_INSN_ADDC, FR30BF_INSN_ADDC, FR30BF_SFMT_ADDC },
-  { FR30_INSN_ADDN, FR30BF_INSN_ADDN, FR30BF_SFMT_ADDN },
-  { FR30_INSN_ADDNI, FR30BF_INSN_ADDNI, FR30BF_SFMT_ADDNI },
-  { FR30_INSN_ADDN2, FR30BF_INSN_ADDN2, FR30BF_SFMT_ADDN2 },
-  { FR30_INSN_SUB, FR30BF_INSN_SUB, FR30BF_SFMT_ADD },
-  { FR30_INSN_SUBC, FR30BF_INSN_SUBC, FR30BF_SFMT_ADDC },
-  { FR30_INSN_SUBN, FR30BF_INSN_SUBN, FR30BF_SFMT_ADDN },
-  { FR30_INSN_CMP, FR30BF_INSN_CMP, FR30BF_SFMT_CMP },
-  { FR30_INSN_CMPI, FR30BF_INSN_CMPI, FR30BF_SFMT_CMPI },
-  { FR30_INSN_CMP2, FR30BF_INSN_CMP2, FR30BF_SFMT_CMP2 },
-  { FR30_INSN_AND, FR30BF_INSN_AND, FR30BF_SFMT_AND },
-  { FR30_INSN_OR, FR30BF_INSN_OR, FR30BF_SFMT_AND },
-  { FR30_INSN_EOR, FR30BF_INSN_EOR, FR30BF_SFMT_AND },
-  { FR30_INSN_ANDM, FR30BF_INSN_ANDM, FR30BF_SFMT_ANDM },
-  { FR30_INSN_ANDH, FR30BF_INSN_ANDH, FR30BF_SFMT_ANDH },
-  { FR30_INSN_ANDB, FR30BF_INSN_ANDB, FR30BF_SFMT_ANDB },
-  { FR30_INSN_ORM, FR30BF_INSN_ORM, FR30BF_SFMT_ANDM },
-  { FR30_INSN_ORH, FR30BF_INSN_ORH, FR30BF_SFMT_ANDH },
-  { FR30_INSN_ORB, FR30BF_INSN_ORB, FR30BF_SFMT_ANDB },
-  { FR30_INSN_EORM, FR30BF_INSN_EORM, FR30BF_SFMT_ANDM },
-  { FR30_INSN_EORH, FR30BF_INSN_EORH, FR30BF_SFMT_ANDH },
-  { FR30_INSN_EORB, FR30BF_INSN_EORB, FR30BF_SFMT_ANDB },
-  { FR30_INSN_BANDL, FR30BF_INSN_BANDL, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BORL, FR30BF_INSN_BORL, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BEORL, FR30BF_INSN_BEORL, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BANDH, FR30BF_INSN_BANDH, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BORH, FR30BF_INSN_BORH, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BEORH, FR30BF_INSN_BEORH, FR30BF_SFMT_BANDL },
-  { FR30_INSN_BTSTL, FR30BF_INSN_BTSTL, FR30BF_SFMT_BTSTL },
-  { FR30_INSN_BTSTH, FR30BF_INSN_BTSTH, FR30BF_SFMT_BTSTL },
-  { FR30_INSN_MUL, FR30BF_INSN_MUL, FR30BF_SFMT_MUL },
-  { FR30_INSN_MULU, FR30BF_INSN_MULU, FR30BF_SFMT_MULU },
-  { FR30_INSN_MULH, FR30BF_INSN_MULH, FR30BF_SFMT_MULH },
-  { FR30_INSN_MULUH, FR30BF_INSN_MULUH, FR30BF_SFMT_MULH },
-  { FR30_INSN_DIV0S, FR30BF_INSN_DIV0S, FR30BF_SFMT_DIV0S },
-  { FR30_INSN_DIV0U, FR30BF_INSN_DIV0U, FR30BF_SFMT_DIV0U },
-  { FR30_INSN_DIV1, FR30BF_INSN_DIV1, FR30BF_SFMT_DIV1 },
-  { FR30_INSN_DIV2, FR30BF_INSN_DIV2, FR30BF_SFMT_DIV2 },
-  { FR30_INSN_DIV3, FR30BF_INSN_DIV3, FR30BF_SFMT_DIV3 },
-  { FR30_INSN_DIV4S, FR30BF_INSN_DIV4S, FR30BF_SFMT_DIV4S },
-  { FR30_INSN_LSL, FR30BF_INSN_LSL, FR30BF_SFMT_LSL },
-  { FR30_INSN_LSLI, FR30BF_INSN_LSLI, FR30BF_SFMT_LSLI },
-  { FR30_INSN_LSL2, FR30BF_INSN_LSL2, FR30BF_SFMT_LSLI },
-  { FR30_INSN_LSR, FR30BF_INSN_LSR, FR30BF_SFMT_LSL },
-  { FR30_INSN_LSRI, FR30BF_INSN_LSRI, FR30BF_SFMT_LSLI },
-  { FR30_INSN_LSR2, FR30BF_INSN_LSR2, FR30BF_SFMT_LSLI },
-  { FR30_INSN_ASR, FR30BF_INSN_ASR, FR30BF_SFMT_LSL },
-  { FR30_INSN_ASRI, FR30BF_INSN_ASRI, FR30BF_SFMT_LSLI },
-  { FR30_INSN_ASR2, FR30BF_INSN_ASR2, FR30BF_SFMT_LSLI },
-  { FR30_INSN_LDI8, FR30BF_INSN_LDI8, FR30BF_SFMT_LDI8 },
-  { FR30_INSN_LDI20, FR30BF_INSN_LDI20, FR30BF_SFMT_LDI20 },
-  { FR30_INSN_LDI32, FR30BF_INSN_LDI32, FR30BF_SFMT_LDI32 },
-  { FR30_INSN_LD, FR30BF_INSN_LD, FR30BF_SFMT_LD },
-  { FR30_INSN_LDUH, FR30BF_INSN_LDUH, FR30BF_SFMT_LDUH },
-  { FR30_INSN_LDUB, FR30BF_INSN_LDUB, FR30BF_SFMT_LDUB },
-  { FR30_INSN_LDR13, FR30BF_INSN_LDR13, FR30BF_SFMT_LDR13 },
-  { FR30_INSN_LDR13UH, FR30BF_INSN_LDR13UH, FR30BF_SFMT_LDR13UH },
-  { FR30_INSN_LDR13UB, FR30BF_INSN_LDR13UB, FR30BF_SFMT_LDR13UB },
-  { FR30_INSN_LDR14, FR30BF_INSN_LDR14, FR30BF_SFMT_LDR14 },
-  { FR30_INSN_LDR14UH, FR30BF_INSN_LDR14UH, FR30BF_SFMT_LDR14UH },
-  { FR30_INSN_LDR14UB, FR30BF_INSN_LDR14UB, FR30BF_SFMT_LDR14UB },
-  { FR30_INSN_LDR15, FR30BF_INSN_LDR15, FR30BF_SFMT_LDR15 },
-  { FR30_INSN_LDR15GR, FR30BF_INSN_LDR15GR, FR30BF_SFMT_LDR15GR },
-  { FR30_INSN_LDR15DR, FR30BF_INSN_LDR15DR, FR30BF_SFMT_LDR15DR },
-  { FR30_INSN_LDR15PS, FR30BF_INSN_LDR15PS, FR30BF_SFMT_LDR15PS },
-  { FR30_INSN_ST, FR30BF_INSN_ST, FR30BF_SFMT_ST },
-  { FR30_INSN_STH, FR30BF_INSN_STH, FR30BF_SFMT_STH },
-  { FR30_INSN_STB, FR30BF_INSN_STB, FR30BF_SFMT_STB },
-  { FR30_INSN_STR13, FR30BF_INSN_STR13, FR30BF_SFMT_STR13 },
-  { FR30_INSN_STR13H, FR30BF_INSN_STR13H, FR30BF_SFMT_STR13H },
-  { FR30_INSN_STR13B, FR30BF_INSN_STR13B, FR30BF_SFMT_STR13B },
-  { FR30_INSN_STR14, FR30BF_INSN_STR14, FR30BF_SFMT_STR14 },
-  { FR30_INSN_STR14H, FR30BF_INSN_STR14H, FR30BF_SFMT_STR14H },
-  { FR30_INSN_STR14B, FR30BF_INSN_STR14B, FR30BF_SFMT_STR14B },
-  { FR30_INSN_STR15, FR30BF_INSN_STR15, FR30BF_SFMT_STR15 },
-  { FR30_INSN_STR15GR, FR30BF_INSN_STR15GR, FR30BF_SFMT_STR15GR },
-  { FR30_INSN_STR15DR, FR30BF_INSN_STR15DR, FR30BF_SFMT_STR15DR },
-  { FR30_INSN_STR15PS, FR30BF_INSN_STR15PS, FR30BF_SFMT_STR15PS },
-  { FR30_INSN_MOV, FR30BF_INSN_MOV, FR30BF_SFMT_MOV },
-  { FR30_INSN_MOVDR, FR30BF_INSN_MOVDR, FR30BF_SFMT_MOVDR },
-  { FR30_INSN_MOVPS, FR30BF_INSN_MOVPS, FR30BF_SFMT_MOVPS },
-  { FR30_INSN_MOV2DR, FR30BF_INSN_MOV2DR, FR30BF_SFMT_MOV2DR },
-  { FR30_INSN_MOV2PS, FR30BF_INSN_MOV2PS, FR30BF_SFMT_MOV2PS },
-  { FR30_INSN_JMP, FR30BF_INSN_JMP, FR30BF_SFMT_JMP },
-  { FR30_INSN_JMPD, FR30BF_INSN_JMPD, FR30BF_SFMT_JMP },
-  { FR30_INSN_CALLR, FR30BF_INSN_CALLR, FR30BF_SFMT_CALLR },
-  { FR30_INSN_CALLRD, FR30BF_INSN_CALLRD, FR30BF_SFMT_CALLR },
-  { FR30_INSN_CALL, FR30BF_INSN_CALL, FR30BF_SFMT_CALL },
-  { FR30_INSN_CALLD, FR30BF_INSN_CALLD, FR30BF_SFMT_CALL },
-  { FR30_INSN_RET, FR30BF_INSN_RET, FR30BF_SFMT_RET },
-  { FR30_INSN_RET_D, FR30BF_INSN_RET_D, FR30BF_SFMT_RET },
-  { FR30_INSN_INT, FR30BF_INSN_INT, FR30BF_SFMT_INT },
-  { FR30_INSN_INTE, FR30BF_INSN_INTE, FR30BF_SFMT_INTE },
-  { FR30_INSN_RETI, FR30BF_INSN_RETI, FR30BF_SFMT_RETI },
-  { FR30_INSN_BRAD, FR30BF_INSN_BRAD, FR30BF_SFMT_BRAD },
-  { FR30_INSN_BRA, FR30BF_INSN_BRA, FR30BF_SFMT_BRAD },
-  { FR30_INSN_BNOD, FR30BF_INSN_BNOD, FR30BF_SFMT_BNOD },
-  { FR30_INSN_BNO, FR30BF_INSN_BNO, FR30BF_SFMT_BNOD },
-  { FR30_INSN_BEQD, FR30BF_INSN_BEQD, FR30BF_SFMT_BEQD },
-  { FR30_INSN_BEQ, FR30BF_INSN_BEQ, FR30BF_SFMT_BEQD },
-  { FR30_INSN_BNED, FR30BF_INSN_BNED, FR30BF_SFMT_BEQD },
-  { FR30_INSN_BNE, FR30BF_INSN_BNE, FR30BF_SFMT_BEQD },
-  { FR30_INSN_BCD, FR30BF_INSN_BCD, FR30BF_SFMT_BCD },
-  { FR30_INSN_BC, FR30BF_INSN_BC, FR30BF_SFMT_BCD },
-  { FR30_INSN_BNCD, FR30BF_INSN_BNCD, FR30BF_SFMT_BCD },
-  { FR30_INSN_BNC, FR30BF_INSN_BNC, FR30BF_SFMT_BCD },
-  { FR30_INSN_BND, FR30BF_INSN_BND, FR30BF_SFMT_BND },
-  { FR30_INSN_BN, FR30BF_INSN_BN, FR30BF_SFMT_BND },
-  { FR30_INSN_BPD, FR30BF_INSN_BPD, FR30BF_SFMT_BND },
-  { FR30_INSN_BP, FR30BF_INSN_BP, FR30BF_SFMT_BND },
-  { FR30_INSN_BVD, FR30BF_INSN_BVD, FR30BF_SFMT_BVD },
-  { FR30_INSN_BV, FR30BF_INSN_BV, FR30BF_SFMT_BVD },
-  { FR30_INSN_BNVD, FR30BF_INSN_BNVD, FR30BF_SFMT_BVD },
-  { FR30_INSN_BNV, FR30BF_INSN_BNV, FR30BF_SFMT_BVD },
-  { FR30_INSN_BLTD, FR30BF_INSN_BLTD, FR30BF_SFMT_BLTD },
-  { FR30_INSN_BLT, FR30BF_INSN_BLT, FR30BF_SFMT_BLTD },
-  { FR30_INSN_BGED, FR30BF_INSN_BGED, FR30BF_SFMT_BLTD },
-  { FR30_INSN_BGE, FR30BF_INSN_BGE, FR30BF_SFMT_BLTD },
-  { FR30_INSN_BLED, FR30BF_INSN_BLED, FR30BF_SFMT_BLED },
-  { FR30_INSN_BLE, FR30BF_INSN_BLE, FR30BF_SFMT_BLED },
-  { FR30_INSN_BGTD, FR30BF_INSN_BGTD, FR30BF_SFMT_BLED },
-  { FR30_INSN_BGT, FR30BF_INSN_BGT, FR30BF_SFMT_BLED },
-  { FR30_INSN_BLSD, FR30BF_INSN_BLSD, FR30BF_SFMT_BLSD },
-  { FR30_INSN_BLS, FR30BF_INSN_BLS, FR30BF_SFMT_BLSD },
-  { FR30_INSN_BHID, FR30BF_INSN_BHID, FR30BF_SFMT_BLSD },
-  { FR30_INSN_BHI, FR30BF_INSN_BHI, FR30BF_SFMT_BLSD },
-  { FR30_INSN_DMOVR13, FR30BF_INSN_DMOVR13, FR30BF_SFMT_DMOVR13 },
-  { FR30_INSN_DMOVR13H, FR30BF_INSN_DMOVR13H, FR30BF_SFMT_DMOVR13H },
-  { FR30_INSN_DMOVR13B, FR30BF_INSN_DMOVR13B, FR30BF_SFMT_DMOVR13B },
-  { FR30_INSN_DMOVR13PI, FR30BF_INSN_DMOVR13PI, FR30BF_SFMT_DMOVR13PI },
-  { FR30_INSN_DMOVR13PIH, FR30BF_INSN_DMOVR13PIH, FR30BF_SFMT_DMOVR13PIH },
-  { FR30_INSN_DMOVR13PIB, FR30BF_INSN_DMOVR13PIB, FR30BF_SFMT_DMOVR13PIB },
-  { FR30_INSN_DMOVR15PI, FR30BF_INSN_DMOVR15PI, FR30BF_SFMT_DMOVR15PI },
-  { FR30_INSN_DMOV2R13, FR30BF_INSN_DMOV2R13, FR30BF_SFMT_DMOV2R13 },
-  { FR30_INSN_DMOV2R13H, FR30BF_INSN_DMOV2R13H, FR30BF_SFMT_DMOV2R13H },
-  { FR30_INSN_DMOV2R13B, FR30BF_INSN_DMOV2R13B, FR30BF_SFMT_DMOV2R13B },
-  { FR30_INSN_DMOV2R13PI, FR30BF_INSN_DMOV2R13PI, FR30BF_SFMT_DMOV2R13PI },
-  { FR30_INSN_DMOV2R13PIH, FR30BF_INSN_DMOV2R13PIH, FR30BF_SFMT_DMOV2R13PIH },
-  { FR30_INSN_DMOV2R13PIB, FR30BF_INSN_DMOV2R13PIB, FR30BF_SFMT_DMOV2R13PIB },
-  { FR30_INSN_DMOV2R15PD, FR30BF_INSN_DMOV2R15PD, FR30BF_SFMT_DMOV2R15PD },
-  { FR30_INSN_LDRES, FR30BF_INSN_LDRES, FR30BF_SFMT_LDRES },
-  { FR30_INSN_STRES, FR30BF_INSN_STRES, FR30BF_SFMT_LDRES },
-  { FR30_INSN_COPOP, FR30BF_INSN_COPOP, FR30BF_SFMT_COPOP },
-  { FR30_INSN_COPLD, FR30BF_INSN_COPLD, FR30BF_SFMT_COPOP },
-  { FR30_INSN_COPST, FR30BF_INSN_COPST, FR30BF_SFMT_COPOP },
-  { FR30_INSN_COPSV, FR30BF_INSN_COPSV, FR30BF_SFMT_COPOP },
-  { FR30_INSN_NOP, FR30BF_INSN_NOP, FR30BF_SFMT_BNOD },
-  { FR30_INSN_ANDCCR, FR30BF_INSN_ANDCCR, FR30BF_SFMT_ANDCCR },
-  { FR30_INSN_ORCCR, FR30BF_INSN_ORCCR, FR30BF_SFMT_ANDCCR },
-  { FR30_INSN_STILM, FR30BF_INSN_STILM, FR30BF_SFMT_STILM },
-  { FR30_INSN_ADDSP, FR30BF_INSN_ADDSP, FR30BF_SFMT_ADDSP },
-  { FR30_INSN_EXTSB, FR30BF_INSN_EXTSB, FR30BF_SFMT_EXTSB },
-  { FR30_INSN_EXTUB, FR30BF_INSN_EXTUB, FR30BF_SFMT_EXTUB },
-  { FR30_INSN_EXTSH, FR30BF_INSN_EXTSH, FR30BF_SFMT_EXTSH },
-  { FR30_INSN_EXTUH, FR30BF_INSN_EXTUH, FR30BF_SFMT_EXTUH },
-  { FR30_INSN_LDM0, FR30BF_INSN_LDM0, FR30BF_SFMT_LDM0 },
-  { FR30_INSN_LDM1, FR30BF_INSN_LDM1, FR30BF_SFMT_LDM1 },
-  { FR30_INSN_STM0, FR30BF_INSN_STM0, FR30BF_SFMT_STM0 },
-  { FR30_INSN_STM1, FR30BF_INSN_STM1, FR30BF_SFMT_STM1 },
-  { FR30_INSN_ENTER, FR30BF_INSN_ENTER, FR30BF_SFMT_ENTER },
-  { FR30_INSN_LEAVE, FR30BF_INSN_LEAVE, FR30BF_SFMT_LEAVE },
-  { FR30_INSN_XCHB, FR30BF_INSN_XCHB, FR30BF_SFMT_XCHB },
-};
-
-static const struct insn_sem fr30bf_insn_sem_invalid = {
-  VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY
-};
-
-/* Initialize an IDESC from the compile-time computable parts.  */
-
-static INLINE void
-init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
-{
-  const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
-
-  id->num = t->index;
-  id->sfmt = t->sfmt;
-  if ((int) t->type <= 0)
-    id->idata = & cgen_virtual_insn_table[- (int) t->type];
-  else
-    id->idata = & insn_table[t->type];
-  id->attrs = CGEN_INSN_ATTRS (id->idata);
-  /* Oh my god, a magic number.  */
-  id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
-
-#if WITH_PROFILE_MODEL_P
-  id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
-  {
-    SIM_DESC sd = CPU_STATE (cpu);
-    SIM_ASSERT (t->index == id->timing->num);
-  }
-#endif
-
-  /* Semantic pointers are initialized elsewhere.  */
-}
-
-/* Initialize the instruction descriptor table.  */
-
-void
-fr30bf_init_idesc_table (SIM_CPU *cpu)
-{
-  IDESC *id,*tabend;
-  const struct insn_sem *t,*tend;
-  int tabsize = sizeof (fr30bf_insn_data) / sizeof (IDESC);
-  IDESC *table = fr30bf_insn_data;
-
-  memset (table, 0, tabsize * sizeof (IDESC));
-
-  /* First set all entries to the `invalid insn'.  */
-  t = & fr30bf_insn_sem_invalid;
-  for (id = table, tabend = table + tabsize; id < tabend; ++id)
-    init_idesc (cpu, id, t);
-
-  /* Now fill in the values for the chosen cpu.  */
-  for (t = fr30bf_insn_sem, tend = t + sizeof (fr30bf_insn_sem) / sizeof (*t);
-       t != tend; ++t)
-    {
-      init_idesc (cpu, & table[t->index], t);
-    }
-
-  /* Link the IDESC table into the cpu.  */
-  CPU_IDESC (cpu) = table;
-}
-
-/* Given an instruction, return a pointer to its IDESC entry.  */
-
-const IDESC *
-fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
-              CGEN_INSN_INT base_insn,
-              ARGBUF *abuf)
-{
-  /* Result of decoder.  */
-  FR30BF_INSN_TYPE itype;
-
-  {
-    CGEN_INSN_INT insn = base_insn;
-
-    {
-      unsigned int val = (((insn >> 8) & (255 << 0)));
-      switch (val)
-      {
-      case 0 : itype = FR30BF_INSN_LDR13;goto extract_sfmt_ldr13;
-      case 1 : itype = FR30BF_INSN_LDR13UH;goto extract_sfmt_ldr13uh;
-      case 2 : itype = FR30BF_INSN_LDR13UB;goto extract_sfmt_ldr13ub;
-      case 3 : itype = FR30BF_INSN_LDR15;goto extract_sfmt_ldr15;
-      case 4 : itype = FR30BF_INSN_LD;goto extract_sfmt_ld;
-      case 5 : itype = FR30BF_INSN_LDUH;goto extract_sfmt_lduh;
-      case 6 : itype = FR30BF_INSN_LDUB;goto extract_sfmt_ldub;
-      case 7 :
-        {
-          unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0)));
-          switch (val)
-          {
-          case 0 : itype = FR30BF_INSN_LDR15GR;goto extract_sfmt_ldr15gr;
-          case 1 : itype = FR30BF_INSN_MOV2PS;goto extract_sfmt_mov2ps;
-          case 2 : itype = FR30BF_INSN_LDR15DR;goto extract_sfmt_ldr15dr;
-          case 3 : itype = FR30BF_INSN_LDR15PS;goto extract_sfmt_ldr15ps;
-          default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
-          }
-        }
-      case 8 : itype = FR30BF_INSN_DMOV2R13;goto extract_sfmt_dmov2r13;
-      case 9 : itype = FR30BF_INSN_DMOV2R13H;goto extract_sfmt_dmov2r13h;
-      case 10 : itype = FR30BF_INSN_DMOV2R13B;goto extract_sfmt_dmov2r13b;
-      case 11 : itype = FR30BF_INSN_DMOV2R15PD;goto extract_sfmt_dmov2r15pd;
-      case 12 : itype = FR30BF_INSN_DMOV2R13PI;goto extract_sfmt_dmov2r13pi;
-      case 13 : itype = FR30BF_INSN_DMOV2R13PIH;goto extract_sfmt_dmov2r13pih;
-      case 14 : itype = FR30BF_INSN_DMOV2R13PIB;goto extract_sfmt_dmov2r13pib;
-      case 15 : itype = FR30BF_INSN_ENTER;goto extract_sfmt_enter;
-      case 16 : itype = FR30BF_INSN_STR13;goto extract_sfmt_str13;
-      case 17 : itype = FR30BF_INSN_STR13H;goto extract_sfmt_str13h;
-      case 18 : itype = FR30BF_INSN_STR13B;goto extract_sfmt_str13b;
-      case 19 : itype = FR30BF_INSN_STR15;goto extract_sfmt_str15;
-      case 20 : itype = FR30BF_INSN_ST;goto extract_sfmt_st;
-      case 21 : itype = FR30BF_INSN_STH;goto extract_sfmt_sth;
-      case 22 : itype = FR30BF_INSN_STB;goto extract_sfmt_stb;
-      case 23 :
-        {
-          unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0)));
-          switch (val)
-          {
-          case 0 : itype = FR30BF_INSN_STR15GR;goto extract_sfmt_str15gr;
-          case 1 : itype = FR30BF_INSN_MOVPS;goto extract_sfmt_movps;
-          case 2 : itype = FR30BF_INSN_STR15DR;goto extract_sfmt_str15dr;
-          case 3 : itype = FR30BF_INSN_STR15PS;goto extract_sfmt_str15ps;
-          default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
-          }
-        }
-      case 24 : itype = FR30BF_INSN_DMOVR13;goto extract_sfmt_dmovr13;
-      case 25 : itype = FR30BF_INSN_DMOVR13H;goto extract_sfmt_dmovr13h;
-      case 26 : itype = FR30BF_INSN_DMOVR13B;goto extract_sfmt_dmovr13b;
-      case 27 : itype = FR30BF_INSN_DMOVR15PI;goto extract_sfmt_dmovr15pi;
-      case 28 : itype = FR30BF_INSN_DMOVR13PI;goto extract_sfmt_dmovr13pi;
-      case 29 : itype = FR30BF_INSN_DMOVR13PIH;goto extract_sfmt_dmovr13pih;
-      case 30 : itype = FR30BF_INSN_DMOVR13PIB;goto extract_sfmt_dmovr13pib;
-      case 31 : itype = FR30BF_INSN_INT;goto extract_sfmt_int;
-      case 32 : /* fall through */
-      case 33 : /* fall through */
-      case 34 : /* fall through */
-      case 35 : /* fall through */
-      case 36 : /* fall through */
-      case 37 : /* fall through */
-      case 38 : /* fall through */
-      case 39 : /* fall through */
-      case 40 : /* fall through */
-      case 41 : /* fall through */
-      case 42 : /* fall through */
-      case 43 : /* fall through */
-      case 44 : /* fall through */
-      case 45 : /* fall through */
-      case 46 : /* fall through */
-      case 47 : itype = FR30BF_INSN_LDR14;goto extract_sfmt_ldr14;
-      case 48 : /* fall through */
-      case 49 : /* fall through */
-      case 50 : /* fall through */
-      case 51 : /* fall through */
-      case 52 : /* fall through */
-      case 53 : /* fall through */
-      case 54 : /* fall through */
-      case 55 : /* fall through */
-      case 56 : /* fall through */
-      case 57 : /* fall through */
-      case 58 : /* fall through */
-      case 59 : /* fall through */
-      case 60 : /* fall through */
-      case 61 : /* fall through */
-      case 62 : /* fall through */
-      case 63 : itype = FR30BF_INSN_STR14;goto extract_sfmt_str14;
-      case 64 : /* fall through */
-      case 65 : /* fall through */
-      case 66 : /* fall through */
-      case 67 : /* fall through */
-      case 68 : /* fall through */
-      case 69 : /* fall through */
-      case 70 : /* fall through */
-      case 71 : /* fall through */
-      case 72 : /* fall through */
-      case 73 : /* fall through */
-      case 74 : /* fall through */
-      case 75 : /* fall through */
-      case 76 : /* fall through */
-      case 77 : /* fall through */
-      case 78 : /* fall through */
-      case 79 : itype = FR30BF_INSN_LDR14UH;goto extract_sfmt_ldr14uh;
-      case 80 : /* fall through */
-      case 81 : /* fall through */
-      case 82 : /* fall through */
-      case 83 : /* fall through */
-      case 84 : /* fall through */
-      case 85 : /* fall through */
-      case 86 : /* fall through */
-      case 87 : /* fall through */
-      case 88 : /* fall through */
-      case 89 : /* fall through */
-      case 90 : /* fall through */
-      case 91 : /* fall through */
-      case 92 : /* fall through */
-      case 93 : /* fall through */
-      case 94 : /* fall through */
-      case 95 : itype = FR30BF_INSN_STR14H;goto extract_sfmt_str14h;
-      case 96 : /* fall through */
-      case 97 : /* fall through */
-      case 98 : /* fall through */
-      case 99 : /* fall through */
-      case 100 : /* fall through */
-      case 101 : /* fall through */
-      case 102 : /* fall through */
-      case 103 : /* fall through */
-      case 104 : /* fall through */
-      case 105 : /* fall through */
-      case 106 : /* fall through */
-      case 107 : /* fall through */
-      case 108 : /* fall through */
-      case 109 : /* fall through */
-      case 110 : /* fall through */
-      case 111 : itype = FR30BF_INSN_LDR14UB;goto extract_sfmt_ldr14ub;
-      case 112 : /* fall through */
-      case 113 : /* fall through */
-      case 114 : /* fall through */
-      case 115 : /* fall through */
-      case 116 : /* fall through */
-      case 117 : /* fall through */
-      case 118 : /* fall through */
-      case 119 : /* fall through */
-      case 120 : /* fall through */
-      case 121 : /* fall through */
-      case 122 : /* fall through */
-      case 123 : /* fall through */
-      case 124 : /* fall through */
-      case 125 : /* fall through */
-      case 126 : /* fall through */
-      case 127 : itype = FR30BF_INSN_STR14B;goto extract_sfmt_str14b;
-      case 128 : itype = FR30BF_INSN_BANDL;goto extract_sfmt_bandl;
-      case 129 : itype = FR30BF_INSN_BANDH;goto extract_sfmt_bandl;
-      case 130 : itype = FR30BF_INSN_AND;goto extract_sfmt_and;
-      case 131 : itype = FR30BF_INSN_ANDCCR;goto extract_sfmt_andccr;
-      case 132 : itype = FR30BF_INSN_ANDM;goto extract_sfmt_andm;
-      case 133 : itype = FR30BF_INSN_ANDH;goto extract_sfmt_andh;
-      case 134 : itype = FR30BF_INSN_ANDB;goto extract_sfmt_andb;
-      case 135 : itype = FR30BF_INSN_STILM;goto extract_sfmt_stilm;
-      case 136 : itype = FR30BF_INSN_BTSTL;goto extract_sfmt_btstl;
-      case 137 : itype = FR30BF_INSN_BTSTH;goto extract_sfmt_btstl;
-      case 138 : itype = FR30BF_INSN_XCHB;goto extract_sfmt_xchb;
-      case 139 : itype = FR30BF_INSN_MOV;goto extract_sfmt_mov;
-      case 140 : itype = FR30BF_INSN_LDM0;goto extract_sfmt_ldm0;
-      case 141 : itype = FR30BF_INSN_LDM1;goto extract_sfmt_ldm1;
-      case 142 : itype = FR30BF_INSN_STM0;goto extract_sfmt_stm0;
-      case 143 : itype = FR30BF_INSN_STM1;goto extract_sfmt_stm1;
-      case 144 : itype = FR30BF_INSN_BORL;goto extract_sfmt_bandl;
-      case 145 : itype = FR30BF_INSN_BORH;goto extract_sfmt_bandl;
-      case 146 : itype = FR30BF_INSN_OR;goto extract_sfmt_and;
-      case 147 : itype = FR30BF_INSN_ORCCR;goto extract_sfmt_andccr;
-      case 148 : itype = FR30BF_INSN_ORM;goto extract_sfmt_andm;
-      case 149 : itype = FR30BF_INSN_ORH;goto extract_sfmt_andh;
-      case 150 : itype = FR30BF_INSN_ORB;goto extract_sfmt_andb;
-      case 151 :
-        {
-          unsigned int val = (((insn >> 4) & (15 << 0)));
-          switch (val)
-          {
-          case 0 : itype = FR30BF_INSN_JMP;goto extract_sfmt_jmp;
-          case 1 : itype = FR30BF_INSN_CALLR;goto extract_sfmt_callr;
-          case 2 : itype = FR30BF_INSN_RET;goto extract_sfmt_ret;
-          case 3 : itype = FR30BF_INSN_RETI;goto extract_sfmt_reti;
-          case 4 : itype = FR30BF_INSN_DIV0S;goto extract_sfmt_div0s;
-          case 5 : itype = FR30BF_INSN_DIV0U;goto extract_sfmt_div0u;
-          case 6 : itype = FR30BF_INSN_DIV1;goto extract_sfmt_div1;
-          case 7 : itype = FR30BF_INSN_DIV2;goto extract_sfmt_div2;
-          case 8 : itype = FR30BF_INSN_EXTSB;goto extract_sfmt_extsb;
-          case 9 : itype = FR30BF_INSN_EXTUB;goto extract_sfmt_extub;
-          case 10 : itype = FR30BF_INSN_EXTSH;goto extract_sfmt_extsh;
-          case 11 : itype = FR30BF_INSN_EXTUH;goto extract_sfmt_extuh;
-          default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
-          }
-        }
-      case 152 : itype = FR30BF_INSN_BEORL;goto extract_sfmt_bandl;
-      case 153 : itype = FR30BF_INSN_BEORH;goto extract_sfmt_bandl;
-      case 154 : itype = FR30BF_INSN_EOR;goto extract_sfmt_and;
-      case 155 : itype = FR30BF_INSN_LDI20;goto extract_sfmt_ldi20;
-      case 156 : itype = FR30BF_INSN_EORM;goto extract_sfmt_andm;
-      case 157 : itype = FR30BF_INSN_EORH;goto extract_sfmt_andh;
-      case 158 : itype = FR30BF_INSN_EORB;goto extract_sfmt_andb;
-      case 159 :
-        {
-          unsigned int val = (((insn >> 4) & (15 << 0)));
-          switch (val)
-          {
-          case 0 : itype = FR30BF_INSN_JMPD;goto extract_sfmt_jmp;
-          case 1 : itype = FR30BF_INSN_CALLRD;goto extract_sfmt_callr;
-          case 2 : itype = FR30BF_INSN_RET_D;goto extract_sfmt_ret;
-          case 3 : itype = FR30BF_INSN_INTE;goto extract_sfmt_inte;
-          case 6 : itype = FR30BF_INSN_DIV3;goto extract_sfmt_div3;
-          case 7 : itype = FR30BF_INSN_DIV4S;goto extract_sfmt_div4s;
-          case 8 : itype = FR30BF_INSN_LDI32;goto extract_sfmt_ldi32;
-          case 9 : itype = FR30BF_INSN_LEAVE;goto extract_sfmt_leave;
-          case 10 : itype = FR30BF_INSN_NOP;goto extract_sfmt_bnod;
-          case 12 : itype = FR30BF_INSN_COPOP;goto extract_sfmt_copop;
-          case 13 : itype = FR30BF_INSN_COPLD;goto extract_sfmt_copop;
-          case 14 : itype = FR30BF_INSN_COPST;goto extract_sfmt_copop;
-          case 15 : itype = FR30BF_INSN_COPSV;goto extract_sfmt_copop;
-          default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
-          }
-        }
-      case 160 : itype = FR30BF_INSN_ADDNI;goto extract_sfmt_addni;
-      case 161 : itype = FR30BF_INSN_ADDN2;goto extract_sfmt_addn2;
-      case 162 : itype = FR30BF_INSN_ADDN;goto extract_sfmt_addn;
-      case 163 : itype = FR30BF_INSN_ADDSP;goto extract_sfmt_addsp;
-      case 164 : itype = FR30BF_INSN_ADDI;goto extract_sfmt_addi;
-      case 165 : itype = FR30BF_INSN_ADD2;goto extract_sfmt_add2;
-      case 166 : itype = FR30BF_INSN_ADD;goto extract_sfmt_add;
-      case 167 : itype = FR30BF_INSN_ADDC;goto extract_sfmt_addc;
-      case 168 : itype = FR30BF_INSN_CMPI;goto extract_sfmt_cmpi;
-      case 169 : itype = FR30BF_INSN_CMP2;goto extract_sfmt_cmp2;
-      case 170 : itype = FR30BF_INSN_CMP;goto extract_sfmt_cmp;
-      case 171 : itype = FR30BF_INSN_MULU;goto extract_sfmt_mulu;
-      case 172 : itype = FR30BF_INSN_SUB;goto extract_sfmt_add;
-      case 173 : itype = FR30BF_INSN_SUBC;goto extract_sfmt_addc;
-      case 174 : itype = FR30BF_INSN_SUBN;goto extract_sfmt_addn;
-      case 175 : itype = FR30BF_INSN_MUL;goto extract_sfmt_mul;
-      case 176 : itype = FR30BF_INSN_LSRI;goto extract_sfmt_lsli;
-      case 177 : itype = FR30BF_INSN_LSR2;goto extract_sfmt_lsli;
-      case 178 : itype = FR30BF_INSN_LSR;goto extract_sfmt_lsl;
-      case 179 : itype = FR30BF_INSN_MOV2DR;goto extract_sfmt_mov2dr;
-      case 180 : itype = FR30BF_INSN_LSLI;goto extract_sfmt_lsli;
-      case 181 : itype = FR30BF_INSN_LSL2;goto extract_sfmt_lsli;
-      case 182 : itype = FR30BF_INSN_LSL;goto extract_sfmt_lsl;
-      case 183 : itype = FR30BF_INSN_MOVDR;goto extract_sfmt_movdr;
-      case 184 : itype = FR30BF_INSN_ASRI;goto extract_sfmt_lsli;
-      case 185 : itype = FR30BF_INSN_ASR2;goto extract_sfmt_lsli;
-      case 186 : itype = FR30BF_INSN_ASR;goto extract_sfmt_lsl;
-      case 187 : itype = FR30BF_INSN_MULUH;goto extract_sfmt_mulh;
-      case 188 : itype = FR30BF_INSN_LDRES;goto extract_sfmt_ldres;
-      case 189 : itype = FR30BF_INSN_STRES;goto extract_sfmt_ldres;
-      case 191 : itype = FR30BF_INSN_MULH;goto extract_sfmt_mulh;
-      case 192 : /* fall through */
-      case 193 : /* fall through */
-      case 194 : /* fall through */
-      case 195 : /* fall through */
-      case 196 : /* fall through */
-      case 197 : /* fall through */
-      case 198 : /* fall through */
-      case 199 : /* fall through */
-      case 200 : /* fall through */
-      case 201 : /* fall through */
-      case 202 : /* fall through */
-      case 203 : /* fall through */
-      case 204 : /* fall through */
-      case 205 : /* fall through */
-      case 206 : /* fall through */
-      case 207 : itype = FR30BF_INSN_LDI8;goto extract_sfmt_ldi8;
-      case 208 : /* fall through */
-      case 209 : /* fall through */
-      case 210 : /* fall through */
-      case 211 : /* fall through */
-      case 212 : /* fall through */
-      case 213 : /* fall through */
-      case 214 : /* fall through */
-      case 215 : itype = FR30BF_INSN_CALL;goto extract_sfmt_call;
-      case 216 : /* fall through */
-      case 217 : /* fall through */
-      case 218 : /* fall through */
-      case 219 : /* fall through */
-      case 220 : /* fall through */
-      case 221 : /* fall through */
-      case 222 : /* fall through */
-      case 223 : itype = FR30BF_INSN_CALLD;goto extract_sfmt_call;
-      case 224 : itype = FR30BF_INSN_BRA;goto extract_sfmt_brad;
-      case 225 : itype = FR30BF_INSN_BNO;goto extract_sfmt_bnod;
-      case 226 : itype = FR30BF_INSN_BEQ;goto extract_sfmt_beqd;
-      case 227 : itype = FR30BF_INSN_BNE;goto extract_sfmt_beqd;
-      case 228 : itype = FR30BF_INSN_BC;goto extract_sfmt_bcd;
-      case 229 : itype = FR30BF_INSN_BNC;goto extract_sfmt_bcd;
-      case 230 : itype = FR30BF_INSN_BN;goto extract_sfmt_bnd;
-      case 231 : itype = FR30BF_INSN_BP;goto extract_sfmt_bnd;
-      case 232 : itype = FR30BF_INSN_BV;goto extract_sfmt_bvd;
-      case 233 : itype = FR30BF_INSN_BNV;goto extract_sfmt_bvd;
-      case 234 : itype = FR30BF_INSN_BLT;goto extract_sfmt_bltd;
-      case 235 : itype = FR30BF_INSN_BGE;goto extract_sfmt_bltd;
-      case 236 : itype = FR30BF_INSN_BLE;goto extract_sfmt_bled;
-      case 237 : itype = FR30BF_INSN_BGT;goto extract_sfmt_bled;
-      case 238 : itype = FR30BF_INSN_BLS;goto extract_sfmt_blsd;
-      case 239 : itype = FR30BF_INSN_BHI;goto extract_sfmt_blsd;
-      case 240 : itype = FR30BF_INSN_BRAD;goto extract_sfmt_brad;
-      case 241 : itype = FR30BF_INSN_BNOD;goto extract_sfmt_bnod;
-      case 242 : itype = FR30BF_INSN_BEQD;goto extract_sfmt_beqd;
-      case 243 : itype = FR30BF_INSN_BNED;goto extract_sfmt_beqd;
-      case 244 : itype = FR30BF_INSN_BCD;goto extract_sfmt_bcd;
-      case 245 : itype = FR30BF_INSN_BNCD;goto extract_sfmt_bcd;
-      case 246 : itype = FR30BF_INSN_BND;goto extract_sfmt_bnd;
-      case 247 : itype = FR30BF_INSN_BPD;goto extract_sfmt_bnd;
-      case 248 : itype = FR30BF_INSN_BVD;goto extract_sfmt_bvd;
-      case 249 : itype = FR30BF_INSN_BNVD;goto extract_sfmt_bvd;
-      case 250 : itype = FR30BF_INSN_BLTD;goto extract_sfmt_bltd;
-      case 251 : itype = FR30BF_INSN_BGED;goto extract_sfmt_bltd;
-      case 252 : itype = FR30BF_INSN_BLED;goto extract_sfmt_bled;
-      case 253 : itype = FR30BF_INSN_BGTD;goto extract_sfmt_bled;
-      case 254 : itype = FR30BF_INSN_BLSD;goto extract_sfmt_blsd;
-      case 255 : itype = FR30BF_INSN_BHID;goto extract_sfmt_blsd;
-      default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
-      }
-    }
-  }
-
-  /* The instruction has been decoded, now extract the fields.  */
-
- extract_sfmt_empty:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_add:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addi:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_add2:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    SI f_m4;
-    UINT f_Ri;
-
-    f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_m4) = f_m4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addc:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addn:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addni:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addni", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addn2:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    SI f_m4;
-    UINT f_Ri;
-
-    f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_m4) = f_m4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_cmp:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_cmpi:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_cmp2:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    SI f_m4;
-    UINT f_Ri;
-
-    f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_m4) = f_m4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_and:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_andm:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andm", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_andh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_andb:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bandl:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bandl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_btstl:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mul:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mul", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mulu:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulu", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mulh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div0s:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0s", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div0u:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0u", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div1:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div1", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div2:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div2", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div3:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div3", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_div4s:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div4s", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_lsl:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsl", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_lsli:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addi.f
-    UINT f_u4;
-    UINT f_Ri;
-
-    f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_u4) = f_u4;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsli", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldi8:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldi8.f
-    UINT f_i8;
-    UINT f_Ri;
-
-    f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_i8) = f_i8;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi8", "f_i8 0x%x", 'x', f_i8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldi20:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldi20.f
-    UINT f_i20_16;
-    UINT f_i20_4;
-    UINT f_Ri;
-    UINT f_i20;
-    /* Contents of trailing part of insn.  */
-    UINT word_1;
-
-  word_1 = GETIMEMUHI (current_cpu, pc + 2);
-    f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0));
-    f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-{
-  f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));
-}
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_i20) = f_i20;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi20", "f_i20 0x%x", 'x', f_i20, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldi32:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldi32.f
-    UINT f_i32;
-    UINT f_Ri;
-    /* Contents of trailing part of insn.  */
-    UINT word_1;
-    UINT word_2;
-
-  word_1 = GETIMEMUHI (current_cpu, pc + 2);
-  word_2 = GETIMEMUHI (current_cpu, pc + 4);
-    f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_i32) = f_i32;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi32", "f_i32 0x%x", 'x', f_i32, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ld:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_lduh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lduh", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldub:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldub", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr13:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr13uh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13uh", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr13ub:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13ub", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr14:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr14.f
-    SI f_disp10;
-    UINT f_Ri;
-
-    f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_disp10) = f_disp10;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14", "f_disp10 0x%x", 'x', f_disp10, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr14uh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr14uh.f
-    SI f_disp9;
-    UINT f_Ri;
-
-    f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_disp9) = f_disp9;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14uh", "f_disp9 0x%x", 'x', f_disp9, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr14ub:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr14ub.f
-    INT f_disp8;
-    UINT f_Ri;
-
-    f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_disp8) = f_disp8;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14ub", "f_disp8 0x%x", 'x', f_disp8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr15:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr15.f
-    USI f_udisp6;
-    UINT f_Ri;
-
-    f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_udisp6) = f_udisp6;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15", "f_udisp6 0x%x", 'x', f_udisp6, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr15gr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr15gr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_Ri) = f_Ri;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr15dr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-    UINT f_Rs2;
-
-    f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rs2) = f_Rs2;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldr15ps:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.sfmt_addsp.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15ps", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_st:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_sth:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sth", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_stb:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str13:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str13h:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13h", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str13b:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13b", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str14:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str14.f
-    SI f_disp10;
-    UINT f_Ri;
-
-    f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_disp10) = f_disp10;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14", "f_Ri 0x%x", 'x', f_Ri, "f_disp10 0x%x", 'x', f_disp10, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_h_gr_SI_14) = 14;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str14h:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str14h.f
-    SI f_disp9;
-    UINT f_Ri;
-
-    f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_disp9) = f_disp9;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14h", "f_Ri 0x%x", 'x', f_Ri, "f_disp9 0x%x", 'x', f_disp9, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_h_gr_SI_14) = 14;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str14b:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str14b.f
-    INT f_disp8;
-    UINT f_Ri;
-
-    f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_disp8) = f_disp8;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14b", "f_Ri 0x%x", 'x', f_Ri, "f_disp8 0x%x", 'x', f_disp8, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_h_gr_SI_14) = 14;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str15:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str15.f
-    USI f_udisp6;
-    UINT f_Ri;
-
-    f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_udisp6) = f_udisp6;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15", "f_Ri 0x%x", 'x', f_Ri, "f_udisp6 0x%x", 'x', f_udisp6, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str15gr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_str15gr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str15dr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-    UINT f_Rs2;
-
-    f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rs2) = f_Rs2;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_str15ps:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.sfmt_addsp.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15ps", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mov:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rj) = f_Rj;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_movdr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_movdr.f
-    UINT f_Rs1;
-    UINT f_Ri;
-
-    f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Rs1) = f_Rs1;
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movdr", "f_Rs1 0x%x", 'x', f_Rs1, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_movps:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_movdr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mov2dr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Rs1;
-    UINT f_Ri;
-
-    f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rs1) = f_Rs1;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2dr", "f_Ri 0x%x", 'x', f_Ri, "f_Rs1 0x%x", 'x', f_Rs1, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_mov2ps:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2ps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_jmp:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_callr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_call:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_call.f
-    SI f_rel12;
-
-    f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label12) = f_rel12;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "label12 0x%x", 'x', f_rel12, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ret:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ret", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_int:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_int.f
-    UINT f_u8;
-
-    f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_u8) = f_u8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_int", "f_u8 0x%x", 'x', f_u8, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_inte:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_inte", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_reti:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_reti", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_brad:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brad", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bnod:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnod", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_beqd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bcd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bnd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bvd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bvd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bltd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bltd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_bled:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bled", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_blsd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_brad.f
-    SI f_rel9;
-
-    f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (i_label9) = f_rel9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_blsd", "label9 0x%x", 'x', f_rel9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13h:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-    USI f_dir9;
-
-    f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir9) = f_dir9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13b:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-    UINT f_dir8;
-
-    f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir8) = f_dir8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13pi:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13pih:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-    USI f_dir9;
-
-    f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir9) = f_dir9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr13pib:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-    UINT f_dir8;
-
-    f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir8) = f_dir8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmovr15pi:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr15pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13h:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-    USI f_dir9;
-
-    f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir9) = f_dir9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13b:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-    UINT f_dir8;
-
-    f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir8) = f_dir8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13pi:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13pih:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-    USI f_dir9;
-
-    f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir9) = f_dir9;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r13pib:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-    UINT f_dir8;
-
-    f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir8) = f_dir8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_13) = 13;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_dmov2r15pd:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-    USI f_dir10;
-
-    f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_dir10) = f_dir10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r15pd", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldres:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldres", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_copop:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.fmt_empty.f
-    /* Contents of trailing part of insn.  */
-    UINT word_1;
-
-  word_1 = GETIMEMUHI (current_cpu, pc + 2);
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_copop", (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_andccr:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_int.f
-    UINT f_u8;
-
-    f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_u8) = f_u8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andccr", "f_u8 0x%x", 'x', f_u8, (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_stilm:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_int.f
-    UINT f_u8;
-
-    f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_u8) = f_u8;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stilm", "f_u8 0x%x", 'x', f_u8, (char *) 0));
-
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_addsp:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_addsp.f
-    SI f_s10;
-
-    f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_s10) = f_s10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addsp", "f_s10 0x%x", 'x', f_s10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_extsb:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsb", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_extub:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extub", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_extsh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_extuh:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add2.f
-    UINT f_Ri;
-
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extuh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldm0:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldm0.f
-    UINT f_reglist_low_ld;
-
-    f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_reglist_low_ld) = f_reglist_low_ld;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm0", "f_reglist_low_ld 0x%x", 'x', f_reglist_low_ld, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_0) = 0;
-      FLD (out_h_gr_SI_1) = 1;
-      FLD (out_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_2) = 2;
-      FLD (out_h_gr_SI_3) = 3;
-      FLD (out_h_gr_SI_4) = 4;
-      FLD (out_h_gr_SI_5) = 5;
-      FLD (out_h_gr_SI_6) = 6;
-      FLD (out_h_gr_SI_7) = 7;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_ldm1:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_ldm1.f
-    UINT f_reglist_hi_ld;
-
-    f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_reglist_hi_ld) = f_reglist_hi_ld;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm1", "f_reglist_hi_ld 0x%x", 'x', f_reglist_hi_ld, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_10) = 10;
-      FLD (out_h_gr_SI_11) = 11;
-      FLD (out_h_gr_SI_12) = 12;
-      FLD (out_h_gr_SI_13) = 13;
-      FLD (out_h_gr_SI_14) = 14;
-      FLD (out_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_8) = 8;
-      FLD (out_h_gr_SI_9) = 9;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_stm0:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_stm0.f
-    UINT f_reglist_low_st;
-
-    f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_reglist_low_st) = f_reglist_low_st;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm0", "f_reglist_low_st 0x%x", 'x', f_reglist_low_st, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_0) = 0;
-      FLD (in_h_gr_SI_1) = 1;
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (in_h_gr_SI_2) = 2;
-      FLD (in_h_gr_SI_3) = 3;
-      FLD (in_h_gr_SI_4) = 4;
-      FLD (in_h_gr_SI_5) = 5;
-      FLD (in_h_gr_SI_6) = 6;
-      FLD (in_h_gr_SI_7) = 7;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_stm1:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_stm1.f
-    UINT f_reglist_hi_st;
-
-    f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_reglist_hi_st) = f_reglist_hi_st;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm1", "f_reglist_hi_st 0x%x", 'x', f_reglist_hi_st, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_10) = 10;
-      FLD (in_h_gr_SI_11) = 11;
-      FLD (in_h_gr_SI_12) = 12;
-      FLD (in_h_gr_SI_13) = 13;
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (in_h_gr_SI_8) = 8;
-      FLD (in_h_gr_SI_9) = 9;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_enter:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_enter.f
-    USI f_u10;
-
-    f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_u10) = f_u10;
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_enter", "f_u10 0x%x", 'x', f_u10, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_14) = 14;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_leave:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-#define FLD(f) abuf->fields.sfmt_enter.f
-
-
-  /* Record the fields for the semantic handler.  */
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_leave", (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_h_gr_SI_14) = 14;
-      FLD (in_h_gr_SI_15) = 15;
-      FLD (out_h_gr_SI_14) = 14;
-      FLD (out_h_gr_SI_15) = 15;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
- extract_sfmt_xchb:
-  {
-    const IDESC *idesc = &fr30bf_insn_data[itype];
-    CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.sfmt_add.f
-    UINT f_Rj;
-    UINT f_Ri;
-
-    f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
-    f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
-
-  /* Record the fields for the semantic handler.  */
-  FLD (f_Ri) = f_Ri;
-  FLD (f_Rj) = f_Rj;
-  FLD (i_Ri) = & CPU (h_gr)[f_Ri];
-  FLD (i_Rj) = & CPU (h_gr)[f_Rj];
-  TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xchb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
-  /* Record the fields for profiling.  */
-  if (PROFILE_MODEL_P (current_cpu))
-    {
-      FLD (in_Ri) = f_Ri;
-      FLD (in_Rj) = f_Rj;
-      FLD (out_Ri) = f_Ri;
-    }
-#endif
-#undef FLD
-    return idesc;
-  }
-
-}
+// OBSOLETE /* Simulator instruction decoder for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #define WANT_CPU fr30bf
+// OBSOLETE #define WANT_CPU_FR30BF
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "sim-assert.h"
+// OBSOLETE 
+// OBSOLETE /* The instruction descriptor array.
+// OBSOLETE    This is computed at runtime.  Space for it is not malloc'd to save a
+// OBSOLETE    teensy bit of cpu in the decoder.  Moving it to malloc space is trivial
+// OBSOLETE    but won't be done until necessary (we don't currently support the runtime
+// OBSOLETE    addition of instructions nor an SMP machine with different cpus).  */
+// OBSOLETE static IDESC fr30bf_insn_data[FR30BF_INSN_XCHB + 1];
+// OBSOLETE 
+// OBSOLETE /* Commas between elements are contained in the macros.
+// OBSOLETE    Some of these are conditionally compiled out.  */
+// OBSOLETE 
+// OBSOLETE static const struct insn_sem fr30bf_insn_sem[] =
+// OBSOLETE {
+// OBSOLETE   { VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { VIRTUAL_INSN_X_AFTER, FR30BF_INSN_X_AFTER, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { VIRTUAL_INSN_X_BEFORE, FR30BF_INSN_X_BEFORE, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { VIRTUAL_INSN_X_CTI_CHAIN, FR30BF_INSN_X_CTI_CHAIN, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { VIRTUAL_INSN_X_CHAIN, FR30BF_INSN_X_CHAIN, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { VIRTUAL_INSN_X_BEGIN, FR30BF_INSN_X_BEGIN, FR30BF_SFMT_EMPTY },
+// OBSOLETE   { FR30_INSN_ADD, FR30BF_INSN_ADD, FR30BF_SFMT_ADD },
+// OBSOLETE   { FR30_INSN_ADDI, FR30BF_INSN_ADDI, FR30BF_SFMT_ADDI },
+// OBSOLETE   { FR30_INSN_ADD2, FR30BF_INSN_ADD2, FR30BF_SFMT_ADD2 },
+// OBSOLETE   { FR30_INSN_ADDC, FR30BF_INSN_ADDC, FR30BF_SFMT_ADDC },
+// OBSOLETE   { FR30_INSN_ADDN, FR30BF_INSN_ADDN, FR30BF_SFMT_ADDN },
+// OBSOLETE   { FR30_INSN_ADDNI, FR30BF_INSN_ADDNI, FR30BF_SFMT_ADDNI },
+// OBSOLETE   { FR30_INSN_ADDN2, FR30BF_INSN_ADDN2, FR30BF_SFMT_ADDN2 },
+// OBSOLETE   { FR30_INSN_SUB, FR30BF_INSN_SUB, FR30BF_SFMT_ADD },
+// OBSOLETE   { FR30_INSN_SUBC, FR30BF_INSN_SUBC, FR30BF_SFMT_ADDC },
+// OBSOLETE   { FR30_INSN_SUBN, FR30BF_INSN_SUBN, FR30BF_SFMT_ADDN },
+// OBSOLETE   { FR30_INSN_CMP, FR30BF_INSN_CMP, FR30BF_SFMT_CMP },
+// OBSOLETE   { FR30_INSN_CMPI, FR30BF_INSN_CMPI, FR30BF_SFMT_CMPI },
+// OBSOLETE   { FR30_INSN_CMP2, FR30BF_INSN_CMP2, FR30BF_SFMT_CMP2 },
+// OBSOLETE   { FR30_INSN_AND, FR30BF_INSN_AND, FR30BF_SFMT_AND },
+// OBSOLETE   { FR30_INSN_OR, FR30BF_INSN_OR, FR30BF_SFMT_AND },
+// OBSOLETE   { FR30_INSN_EOR, FR30BF_INSN_EOR, FR30BF_SFMT_AND },
+// OBSOLETE   { FR30_INSN_ANDM, FR30BF_INSN_ANDM, FR30BF_SFMT_ANDM },
+// OBSOLETE   { FR30_INSN_ANDH, FR30BF_INSN_ANDH, FR30BF_SFMT_ANDH },
+// OBSOLETE   { FR30_INSN_ANDB, FR30BF_INSN_ANDB, FR30BF_SFMT_ANDB },
+// OBSOLETE   { FR30_INSN_ORM, FR30BF_INSN_ORM, FR30BF_SFMT_ANDM },
+// OBSOLETE   { FR30_INSN_ORH, FR30BF_INSN_ORH, FR30BF_SFMT_ANDH },
+// OBSOLETE   { FR30_INSN_ORB, FR30BF_INSN_ORB, FR30BF_SFMT_ANDB },
+// OBSOLETE   { FR30_INSN_EORM, FR30BF_INSN_EORM, FR30BF_SFMT_ANDM },
+// OBSOLETE   { FR30_INSN_EORH, FR30BF_INSN_EORH, FR30BF_SFMT_ANDH },
+// OBSOLETE   { FR30_INSN_EORB, FR30BF_INSN_EORB, FR30BF_SFMT_ANDB },
+// OBSOLETE   { FR30_INSN_BANDL, FR30BF_INSN_BANDL, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BORL, FR30BF_INSN_BORL, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BEORL, FR30BF_INSN_BEORL, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BANDH, FR30BF_INSN_BANDH, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BORH, FR30BF_INSN_BORH, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BEORH, FR30BF_INSN_BEORH, FR30BF_SFMT_BANDL },
+// OBSOLETE   { FR30_INSN_BTSTL, FR30BF_INSN_BTSTL, FR30BF_SFMT_BTSTL },
+// OBSOLETE   { FR30_INSN_BTSTH, FR30BF_INSN_BTSTH, FR30BF_SFMT_BTSTL },
+// OBSOLETE   { FR30_INSN_MUL, FR30BF_INSN_MUL, FR30BF_SFMT_MUL },
+// OBSOLETE   { FR30_INSN_MULU, FR30BF_INSN_MULU, FR30BF_SFMT_MULU },
+// OBSOLETE   { FR30_INSN_MULH, FR30BF_INSN_MULH, FR30BF_SFMT_MULH },
+// OBSOLETE   { FR30_INSN_MULUH, FR30BF_INSN_MULUH, FR30BF_SFMT_MULH },
+// OBSOLETE   { FR30_INSN_DIV0S, FR30BF_INSN_DIV0S, FR30BF_SFMT_DIV0S },
+// OBSOLETE   { FR30_INSN_DIV0U, FR30BF_INSN_DIV0U, FR30BF_SFMT_DIV0U },
+// OBSOLETE   { FR30_INSN_DIV1, FR30BF_INSN_DIV1, FR30BF_SFMT_DIV1 },
+// OBSOLETE   { FR30_INSN_DIV2, FR30BF_INSN_DIV2, FR30BF_SFMT_DIV2 },
+// OBSOLETE   { FR30_INSN_DIV3, FR30BF_INSN_DIV3, FR30BF_SFMT_DIV3 },
+// OBSOLETE   { FR30_INSN_DIV4S, FR30BF_INSN_DIV4S, FR30BF_SFMT_DIV4S },
+// OBSOLETE   { FR30_INSN_LSL, FR30BF_INSN_LSL, FR30BF_SFMT_LSL },
+// OBSOLETE   { FR30_INSN_LSLI, FR30BF_INSN_LSLI, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_LSL2, FR30BF_INSN_LSL2, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_LSR, FR30BF_INSN_LSR, FR30BF_SFMT_LSL },
+// OBSOLETE   { FR30_INSN_LSRI, FR30BF_INSN_LSRI, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_LSR2, FR30BF_INSN_LSR2, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_ASR, FR30BF_INSN_ASR, FR30BF_SFMT_LSL },
+// OBSOLETE   { FR30_INSN_ASRI, FR30BF_INSN_ASRI, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_ASR2, FR30BF_INSN_ASR2, FR30BF_SFMT_LSLI },
+// OBSOLETE   { FR30_INSN_LDI8, FR30BF_INSN_LDI8, FR30BF_SFMT_LDI8 },
+// OBSOLETE   { FR30_INSN_LDI20, FR30BF_INSN_LDI20, FR30BF_SFMT_LDI20 },
+// OBSOLETE   { FR30_INSN_LDI32, FR30BF_INSN_LDI32, FR30BF_SFMT_LDI32 },
+// OBSOLETE   { FR30_INSN_LD, FR30BF_INSN_LD, FR30BF_SFMT_LD },
+// OBSOLETE   { FR30_INSN_LDUH, FR30BF_INSN_LDUH, FR30BF_SFMT_LDUH },
+// OBSOLETE   { FR30_INSN_LDUB, FR30BF_INSN_LDUB, FR30BF_SFMT_LDUB },
+// OBSOLETE   { FR30_INSN_LDR13, FR30BF_INSN_LDR13, FR30BF_SFMT_LDR13 },
+// OBSOLETE   { FR30_INSN_LDR13UH, FR30BF_INSN_LDR13UH, FR30BF_SFMT_LDR13UH },
+// OBSOLETE   { FR30_INSN_LDR13UB, FR30BF_INSN_LDR13UB, FR30BF_SFMT_LDR13UB },
+// OBSOLETE   { FR30_INSN_LDR14, FR30BF_INSN_LDR14, FR30BF_SFMT_LDR14 },
+// OBSOLETE   { FR30_INSN_LDR14UH, FR30BF_INSN_LDR14UH, FR30BF_SFMT_LDR14UH },
+// OBSOLETE   { FR30_INSN_LDR14UB, FR30BF_INSN_LDR14UB, FR30BF_SFMT_LDR14UB },
+// OBSOLETE   { FR30_INSN_LDR15, FR30BF_INSN_LDR15, FR30BF_SFMT_LDR15 },
+// OBSOLETE   { FR30_INSN_LDR15GR, FR30BF_INSN_LDR15GR, FR30BF_SFMT_LDR15GR },
+// OBSOLETE   { FR30_INSN_LDR15DR, FR30BF_INSN_LDR15DR, FR30BF_SFMT_LDR15DR },
+// OBSOLETE   { FR30_INSN_LDR15PS, FR30BF_INSN_LDR15PS, FR30BF_SFMT_LDR15PS },
+// OBSOLETE   { FR30_INSN_ST, FR30BF_INSN_ST, FR30BF_SFMT_ST },
+// OBSOLETE   { FR30_INSN_STH, FR30BF_INSN_STH, FR30BF_SFMT_STH },
+// OBSOLETE   { FR30_INSN_STB, FR30BF_INSN_STB, FR30BF_SFMT_STB },
+// OBSOLETE   { FR30_INSN_STR13, FR30BF_INSN_STR13, FR30BF_SFMT_STR13 },
+// OBSOLETE   { FR30_INSN_STR13H, FR30BF_INSN_STR13H, FR30BF_SFMT_STR13H },
+// OBSOLETE   { FR30_INSN_STR13B, FR30BF_INSN_STR13B, FR30BF_SFMT_STR13B },
+// OBSOLETE   { FR30_INSN_STR14, FR30BF_INSN_STR14, FR30BF_SFMT_STR14 },
+// OBSOLETE   { FR30_INSN_STR14H, FR30BF_INSN_STR14H, FR30BF_SFMT_STR14H },
+// OBSOLETE   { FR30_INSN_STR14B, FR30BF_INSN_STR14B, FR30BF_SFMT_STR14B },
+// OBSOLETE   { FR30_INSN_STR15, FR30BF_INSN_STR15, FR30BF_SFMT_STR15 },
+// OBSOLETE   { FR30_INSN_STR15GR, FR30BF_INSN_STR15GR, FR30BF_SFMT_STR15GR },
+// OBSOLETE   { FR30_INSN_STR15DR, FR30BF_INSN_STR15DR, FR30BF_SFMT_STR15DR },
+// OBSOLETE   { FR30_INSN_STR15PS, FR30BF_INSN_STR15PS, FR30BF_SFMT_STR15PS },
+// OBSOLETE   { FR30_INSN_MOV, FR30BF_INSN_MOV, FR30BF_SFMT_MOV },
+// OBSOLETE   { FR30_INSN_MOVDR, FR30BF_INSN_MOVDR, FR30BF_SFMT_MOVDR },
+// OBSOLETE   { FR30_INSN_MOVPS, FR30BF_INSN_MOVPS, FR30BF_SFMT_MOVPS },
+// OBSOLETE   { FR30_INSN_MOV2DR, FR30BF_INSN_MOV2DR, FR30BF_SFMT_MOV2DR },
+// OBSOLETE   { FR30_INSN_MOV2PS, FR30BF_INSN_MOV2PS, FR30BF_SFMT_MOV2PS },
+// OBSOLETE   { FR30_INSN_JMP, FR30BF_INSN_JMP, FR30BF_SFMT_JMP },
+// OBSOLETE   { FR30_INSN_JMPD, FR30BF_INSN_JMPD, FR30BF_SFMT_JMP },
+// OBSOLETE   { FR30_INSN_CALLR, FR30BF_INSN_CALLR, FR30BF_SFMT_CALLR },
+// OBSOLETE   { FR30_INSN_CALLRD, FR30BF_INSN_CALLRD, FR30BF_SFMT_CALLR },
+// OBSOLETE   { FR30_INSN_CALL, FR30BF_INSN_CALL, FR30BF_SFMT_CALL },
+// OBSOLETE   { FR30_INSN_CALLD, FR30BF_INSN_CALLD, FR30BF_SFMT_CALL },
+// OBSOLETE   { FR30_INSN_RET, FR30BF_INSN_RET, FR30BF_SFMT_RET },
+// OBSOLETE   { FR30_INSN_RET_D, FR30BF_INSN_RET_D, FR30BF_SFMT_RET },
+// OBSOLETE   { FR30_INSN_INT, FR30BF_INSN_INT, FR30BF_SFMT_INT },
+// OBSOLETE   { FR30_INSN_INTE, FR30BF_INSN_INTE, FR30BF_SFMT_INTE },
+// OBSOLETE   { FR30_INSN_RETI, FR30BF_INSN_RETI, FR30BF_SFMT_RETI },
+// OBSOLETE   { FR30_INSN_BRAD, FR30BF_INSN_BRAD, FR30BF_SFMT_BRAD },
+// OBSOLETE   { FR30_INSN_BRA, FR30BF_INSN_BRA, FR30BF_SFMT_BRAD },
+// OBSOLETE   { FR30_INSN_BNOD, FR30BF_INSN_BNOD, FR30BF_SFMT_BNOD },
+// OBSOLETE   { FR30_INSN_BNO, FR30BF_INSN_BNO, FR30BF_SFMT_BNOD },
+// OBSOLETE   { FR30_INSN_BEQD, FR30BF_INSN_BEQD, FR30BF_SFMT_BEQD },
+// OBSOLETE   { FR30_INSN_BEQ, FR30BF_INSN_BEQ, FR30BF_SFMT_BEQD },
+// OBSOLETE   { FR30_INSN_BNED, FR30BF_INSN_BNED, FR30BF_SFMT_BEQD },
+// OBSOLETE   { FR30_INSN_BNE, FR30BF_INSN_BNE, FR30BF_SFMT_BEQD },
+// OBSOLETE   { FR30_INSN_BCD, FR30BF_INSN_BCD, FR30BF_SFMT_BCD },
+// OBSOLETE   { FR30_INSN_BC, FR30BF_INSN_BC, FR30BF_SFMT_BCD },
+// OBSOLETE   { FR30_INSN_BNCD, FR30BF_INSN_BNCD, FR30BF_SFMT_BCD },
+// OBSOLETE   { FR30_INSN_BNC, FR30BF_INSN_BNC, FR30BF_SFMT_BCD },
+// OBSOLETE   { FR30_INSN_BND, FR30BF_INSN_BND, FR30BF_SFMT_BND },
+// OBSOLETE   { FR30_INSN_BN, FR30BF_INSN_BN, FR30BF_SFMT_BND },
+// OBSOLETE   { FR30_INSN_BPD, FR30BF_INSN_BPD, FR30BF_SFMT_BND },
+// OBSOLETE   { FR30_INSN_BP, FR30BF_INSN_BP, FR30BF_SFMT_BND },
+// OBSOLETE   { FR30_INSN_BVD, FR30BF_INSN_BVD, FR30BF_SFMT_BVD },
+// OBSOLETE   { FR30_INSN_BV, FR30BF_INSN_BV, FR30BF_SFMT_BVD },
+// OBSOLETE   { FR30_INSN_BNVD, FR30BF_INSN_BNVD, FR30BF_SFMT_BVD },
+// OBSOLETE   { FR30_INSN_BNV, FR30BF_INSN_BNV, FR30BF_SFMT_BVD },
+// OBSOLETE   { FR30_INSN_BLTD, FR30BF_INSN_BLTD, FR30BF_SFMT_BLTD },
+// OBSOLETE   { FR30_INSN_BLT, FR30BF_INSN_BLT, FR30BF_SFMT_BLTD },
+// OBSOLETE   { FR30_INSN_BGED, FR30BF_INSN_BGED, FR30BF_SFMT_BLTD },
+// OBSOLETE   { FR30_INSN_BGE, FR30BF_INSN_BGE, FR30BF_SFMT_BLTD },
+// OBSOLETE   { FR30_INSN_BLED, FR30BF_INSN_BLED, FR30BF_SFMT_BLED },
+// OBSOLETE   { FR30_INSN_BLE, FR30BF_INSN_BLE, FR30BF_SFMT_BLED },
+// OBSOLETE   { FR30_INSN_BGTD, FR30BF_INSN_BGTD, FR30BF_SFMT_BLED },
+// OBSOLETE   { FR30_INSN_BGT, FR30BF_INSN_BGT, FR30BF_SFMT_BLED },
+// OBSOLETE   { FR30_INSN_BLSD, FR30BF_INSN_BLSD, FR30BF_SFMT_BLSD },
+// OBSOLETE   { FR30_INSN_BLS, FR30BF_INSN_BLS, FR30BF_SFMT_BLSD },
+// OBSOLETE   { FR30_INSN_BHID, FR30BF_INSN_BHID, FR30BF_SFMT_BLSD },
+// OBSOLETE   { FR30_INSN_BHI, FR30BF_INSN_BHI, FR30BF_SFMT_BLSD },
+// OBSOLETE   { FR30_INSN_DMOVR13, FR30BF_INSN_DMOVR13, FR30BF_SFMT_DMOVR13 },
+// OBSOLETE   { FR30_INSN_DMOVR13H, FR30BF_INSN_DMOVR13H, FR30BF_SFMT_DMOVR13H },
+// OBSOLETE   { FR30_INSN_DMOVR13B, FR30BF_INSN_DMOVR13B, FR30BF_SFMT_DMOVR13B },
+// OBSOLETE   { FR30_INSN_DMOVR13PI, FR30BF_INSN_DMOVR13PI, FR30BF_SFMT_DMOVR13PI },
+// OBSOLETE   { FR30_INSN_DMOVR13PIH, FR30BF_INSN_DMOVR13PIH, FR30BF_SFMT_DMOVR13PIH },
+// OBSOLETE   { FR30_INSN_DMOVR13PIB, FR30BF_INSN_DMOVR13PIB, FR30BF_SFMT_DMOVR13PIB },
+// OBSOLETE   { FR30_INSN_DMOVR15PI, FR30BF_INSN_DMOVR15PI, FR30BF_SFMT_DMOVR15PI },
+// OBSOLETE   { FR30_INSN_DMOV2R13, FR30BF_INSN_DMOV2R13, FR30BF_SFMT_DMOV2R13 },
+// OBSOLETE   { FR30_INSN_DMOV2R13H, FR30BF_INSN_DMOV2R13H, FR30BF_SFMT_DMOV2R13H },
+// OBSOLETE   { FR30_INSN_DMOV2R13B, FR30BF_INSN_DMOV2R13B, FR30BF_SFMT_DMOV2R13B },
+// OBSOLETE   { FR30_INSN_DMOV2R13PI, FR30BF_INSN_DMOV2R13PI, FR30BF_SFMT_DMOV2R13PI },
+// OBSOLETE   { FR30_INSN_DMOV2R13PIH, FR30BF_INSN_DMOV2R13PIH, FR30BF_SFMT_DMOV2R13PIH },
+// OBSOLETE   { FR30_INSN_DMOV2R13PIB, FR30BF_INSN_DMOV2R13PIB, FR30BF_SFMT_DMOV2R13PIB },
+// OBSOLETE   { FR30_INSN_DMOV2R15PD, FR30BF_INSN_DMOV2R15PD, FR30BF_SFMT_DMOV2R15PD },
+// OBSOLETE   { FR30_INSN_LDRES, FR30BF_INSN_LDRES, FR30BF_SFMT_LDRES },
+// OBSOLETE   { FR30_INSN_STRES, FR30BF_INSN_STRES, FR30BF_SFMT_LDRES },
+// OBSOLETE   { FR30_INSN_COPOP, FR30BF_INSN_COPOP, FR30BF_SFMT_COPOP },
+// OBSOLETE   { FR30_INSN_COPLD, FR30BF_INSN_COPLD, FR30BF_SFMT_COPOP },
+// OBSOLETE   { FR30_INSN_COPST, FR30BF_INSN_COPST, FR30BF_SFMT_COPOP },
+// OBSOLETE   { FR30_INSN_COPSV, FR30BF_INSN_COPSV, FR30BF_SFMT_COPOP },
+// OBSOLETE   { FR30_INSN_NOP, FR30BF_INSN_NOP, FR30BF_SFMT_BNOD },
+// OBSOLETE   { FR30_INSN_ANDCCR, FR30BF_INSN_ANDCCR, FR30BF_SFMT_ANDCCR },
+// OBSOLETE   { FR30_INSN_ORCCR, FR30BF_INSN_ORCCR, FR30BF_SFMT_ANDCCR },
+// OBSOLETE   { FR30_INSN_STILM, FR30BF_INSN_STILM, FR30BF_SFMT_STILM },
+// OBSOLETE   { FR30_INSN_ADDSP, FR30BF_INSN_ADDSP, FR30BF_SFMT_ADDSP },
+// OBSOLETE   { FR30_INSN_EXTSB, FR30BF_INSN_EXTSB, FR30BF_SFMT_EXTSB },
+// OBSOLETE   { FR30_INSN_EXTUB, FR30BF_INSN_EXTUB, FR30BF_SFMT_EXTUB },
+// OBSOLETE   { FR30_INSN_EXTSH, FR30BF_INSN_EXTSH, FR30BF_SFMT_EXTSH },
+// OBSOLETE   { FR30_INSN_EXTUH, FR30BF_INSN_EXTUH, FR30BF_SFMT_EXTUH },
+// OBSOLETE   { FR30_INSN_LDM0, FR30BF_INSN_LDM0, FR30BF_SFMT_LDM0 },
+// OBSOLETE   { FR30_INSN_LDM1, FR30BF_INSN_LDM1, FR30BF_SFMT_LDM1 },
+// OBSOLETE   { FR30_INSN_STM0, FR30BF_INSN_STM0, FR30BF_SFMT_STM0 },
+// OBSOLETE   { FR30_INSN_STM1, FR30BF_INSN_STM1, FR30BF_SFMT_STM1 },
+// OBSOLETE   { FR30_INSN_ENTER, FR30BF_INSN_ENTER, FR30BF_SFMT_ENTER },
+// OBSOLETE   { FR30_INSN_LEAVE, FR30BF_INSN_LEAVE, FR30BF_SFMT_LEAVE },
+// OBSOLETE   { FR30_INSN_XCHB, FR30BF_INSN_XCHB, FR30BF_SFMT_XCHB },
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE static const struct insn_sem fr30bf_insn_sem_invalid = {
+// OBSOLETE   VIRTUAL_INSN_X_INVALID, FR30BF_INSN_X_INVALID, FR30BF_SFMT_EMPTY
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Initialize an IDESC from the compile-time computable parts.  */
+// OBSOLETE 
+// OBSOLETE static INLINE void
+// OBSOLETE init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
+// OBSOLETE {
+// OBSOLETE   const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
+// OBSOLETE 
+// OBSOLETE   id->num = t->index;
+// OBSOLETE   id->sfmt = t->sfmt;
+// OBSOLETE   if ((int) t->type <= 0)
+// OBSOLETE     id->idata = & cgen_virtual_insn_table[- (int) t->type];
+// OBSOLETE   else
+// OBSOLETE     id->idata = & insn_table[t->type];
+// OBSOLETE   id->attrs = CGEN_INSN_ATTRS (id->idata);
+// OBSOLETE   /* Oh my god, a magic number.  */
+// OBSOLETE   id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
+// OBSOLETE   {
+// OBSOLETE     SIM_DESC sd = CPU_STATE (cpu);
+// OBSOLETE     SIM_ASSERT (t->index == id->timing->num);
+// OBSOLETE   }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   /* Semantic pointers are initialized elsewhere.  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Initialize the instruction descriptor table.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_init_idesc_table (SIM_CPU *cpu)
+// OBSOLETE {
+// OBSOLETE   IDESC *id,*tabend;
+// OBSOLETE   const struct insn_sem *t,*tend;
+// OBSOLETE   int tabsize = sizeof (fr30bf_insn_data) / sizeof (IDESC);
+// OBSOLETE   IDESC *table = fr30bf_insn_data;
+// OBSOLETE 
+// OBSOLETE   memset (table, 0, tabsize * sizeof (IDESC));
+// OBSOLETE 
+// OBSOLETE   /* First set all entries to the `invalid insn'.  */
+// OBSOLETE   t = & fr30bf_insn_sem_invalid;
+// OBSOLETE   for (id = table, tabend = table + tabsize; id < tabend; ++id)
+// OBSOLETE     init_idesc (cpu, id, t);
+// OBSOLETE 
+// OBSOLETE   /* Now fill in the values for the chosen cpu.  */
+// OBSOLETE   for (t = fr30bf_insn_sem, tend = t + sizeof (fr30bf_insn_sem) / sizeof (*t);
+// OBSOLETE        t != tend; ++t)
+// OBSOLETE     {
+// OBSOLETE       init_idesc (cpu, & table[t->index], t);
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Link the IDESC table into the cpu.  */
+// OBSOLETE   CPU_IDESC (cpu) = table;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Given an instruction, return a pointer to its IDESC entry.  */
+// OBSOLETE 
+// OBSOLETE const IDESC *
+// OBSOLETE fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
+// OBSOLETE               CGEN_INSN_INT base_insn,
+// OBSOLETE               ARGBUF *abuf)
+// OBSOLETE {
+// OBSOLETE   /* Result of decoder.  */
+// OBSOLETE   FR30BF_INSN_TYPE itype;
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE 
+// OBSOLETE     {
+// OBSOLETE       unsigned int val = (((insn >> 8) & (255 << 0)));
+// OBSOLETE       switch (val)
+// OBSOLETE       {
+// OBSOLETE       case 0 : itype = FR30BF_INSN_LDR13;goto extract_sfmt_ldr13;
+// OBSOLETE       case 1 : itype = FR30BF_INSN_LDR13UH;goto extract_sfmt_ldr13uh;
+// OBSOLETE       case 2 : itype = FR30BF_INSN_LDR13UB;goto extract_sfmt_ldr13ub;
+// OBSOLETE       case 3 : itype = FR30BF_INSN_LDR15;goto extract_sfmt_ldr15;
+// OBSOLETE       case 4 : itype = FR30BF_INSN_LD;goto extract_sfmt_ld;
+// OBSOLETE       case 5 : itype = FR30BF_INSN_LDUH;goto extract_sfmt_lduh;
+// OBSOLETE       case 6 : itype = FR30BF_INSN_LDUB;goto extract_sfmt_ldub;
+// OBSOLETE       case 7 :
+// OBSOLETE         {
+// OBSOLETE           unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0)));
+// OBSOLETE           switch (val)
+// OBSOLETE           {
+// OBSOLETE           case 0 : itype = FR30BF_INSN_LDR15GR;goto extract_sfmt_ldr15gr;
+// OBSOLETE           case 1 : itype = FR30BF_INSN_MOV2PS;goto extract_sfmt_mov2ps;
+// OBSOLETE           case 2 : itype = FR30BF_INSN_LDR15DR;goto extract_sfmt_ldr15dr;
+// OBSOLETE           case 3 : itype = FR30BF_INSN_LDR15PS;goto extract_sfmt_ldr15ps;
+// OBSOLETE           default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
+// OBSOLETE           }
+// OBSOLETE         }
+// OBSOLETE       case 8 : itype = FR30BF_INSN_DMOV2R13;goto extract_sfmt_dmov2r13;
+// OBSOLETE       case 9 : itype = FR30BF_INSN_DMOV2R13H;goto extract_sfmt_dmov2r13h;
+// OBSOLETE       case 10 : itype = FR30BF_INSN_DMOV2R13B;goto extract_sfmt_dmov2r13b;
+// OBSOLETE       case 11 : itype = FR30BF_INSN_DMOV2R15PD;goto extract_sfmt_dmov2r15pd;
+// OBSOLETE       case 12 : itype = FR30BF_INSN_DMOV2R13PI;goto extract_sfmt_dmov2r13pi;
+// OBSOLETE       case 13 : itype = FR30BF_INSN_DMOV2R13PIH;goto extract_sfmt_dmov2r13pih;
+// OBSOLETE       case 14 : itype = FR30BF_INSN_DMOV2R13PIB;goto extract_sfmt_dmov2r13pib;
+// OBSOLETE       case 15 : itype = FR30BF_INSN_ENTER;goto extract_sfmt_enter;
+// OBSOLETE       case 16 : itype = FR30BF_INSN_STR13;goto extract_sfmt_str13;
+// OBSOLETE       case 17 : itype = FR30BF_INSN_STR13H;goto extract_sfmt_str13h;
+// OBSOLETE       case 18 : itype = FR30BF_INSN_STR13B;goto extract_sfmt_str13b;
+// OBSOLETE       case 19 : itype = FR30BF_INSN_STR15;goto extract_sfmt_str15;
+// OBSOLETE       case 20 : itype = FR30BF_INSN_ST;goto extract_sfmt_st;
+// OBSOLETE       case 21 : itype = FR30BF_INSN_STH;goto extract_sfmt_sth;
+// OBSOLETE       case 22 : itype = FR30BF_INSN_STB;goto extract_sfmt_stb;
+// OBSOLETE       case 23 :
+// OBSOLETE         {
+// OBSOLETE           unsigned int val = (((insn >> 6) & (1 << 1)) | ((insn >> 4) & (1 << 0)));
+// OBSOLETE           switch (val)
+// OBSOLETE           {
+// OBSOLETE           case 0 : itype = FR30BF_INSN_STR15GR;goto extract_sfmt_str15gr;
+// OBSOLETE           case 1 : itype = FR30BF_INSN_MOVPS;goto extract_sfmt_movps;
+// OBSOLETE           case 2 : itype = FR30BF_INSN_STR15DR;goto extract_sfmt_str15dr;
+// OBSOLETE           case 3 : itype = FR30BF_INSN_STR15PS;goto extract_sfmt_str15ps;
+// OBSOLETE           default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
+// OBSOLETE           }
+// OBSOLETE         }
+// OBSOLETE       case 24 : itype = FR30BF_INSN_DMOVR13;goto extract_sfmt_dmovr13;
+// OBSOLETE       case 25 : itype = FR30BF_INSN_DMOVR13H;goto extract_sfmt_dmovr13h;
+// OBSOLETE       case 26 : itype = FR30BF_INSN_DMOVR13B;goto extract_sfmt_dmovr13b;
+// OBSOLETE       case 27 : itype = FR30BF_INSN_DMOVR15PI;goto extract_sfmt_dmovr15pi;
+// OBSOLETE       case 28 : itype = FR30BF_INSN_DMOVR13PI;goto extract_sfmt_dmovr13pi;
+// OBSOLETE       case 29 : itype = FR30BF_INSN_DMOVR13PIH;goto extract_sfmt_dmovr13pih;
+// OBSOLETE       case 30 : itype = FR30BF_INSN_DMOVR13PIB;goto extract_sfmt_dmovr13pib;
+// OBSOLETE       case 31 : itype = FR30BF_INSN_INT;goto extract_sfmt_int;
+// OBSOLETE       case 32 : /* fall through */
+// OBSOLETE       case 33 : /* fall through */
+// OBSOLETE       case 34 : /* fall through */
+// OBSOLETE       case 35 : /* fall through */
+// OBSOLETE       case 36 : /* fall through */
+// OBSOLETE       case 37 : /* fall through */
+// OBSOLETE       case 38 : /* fall through */
+// OBSOLETE       case 39 : /* fall through */
+// OBSOLETE       case 40 : /* fall through */
+// OBSOLETE       case 41 : /* fall through */
+// OBSOLETE       case 42 : /* fall through */
+// OBSOLETE       case 43 : /* fall through */
+// OBSOLETE       case 44 : /* fall through */
+// OBSOLETE       case 45 : /* fall through */
+// OBSOLETE       case 46 : /* fall through */
+// OBSOLETE       case 47 : itype = FR30BF_INSN_LDR14;goto extract_sfmt_ldr14;
+// OBSOLETE       case 48 : /* fall through */
+// OBSOLETE       case 49 : /* fall through */
+// OBSOLETE       case 50 : /* fall through */
+// OBSOLETE       case 51 : /* fall through */
+// OBSOLETE       case 52 : /* fall through */
+// OBSOLETE       case 53 : /* fall through */
+// OBSOLETE       case 54 : /* fall through */
+// OBSOLETE       case 55 : /* fall through */
+// OBSOLETE       case 56 : /* fall through */
+// OBSOLETE       case 57 : /* fall through */
+// OBSOLETE       case 58 : /* fall through */
+// OBSOLETE       case 59 : /* fall through */
+// OBSOLETE       case 60 : /* fall through */
+// OBSOLETE       case 61 : /* fall through */
+// OBSOLETE       case 62 : /* fall through */
+// OBSOLETE       case 63 : itype = FR30BF_INSN_STR14;goto extract_sfmt_str14;
+// OBSOLETE       case 64 : /* fall through */
+// OBSOLETE       case 65 : /* fall through */
+// OBSOLETE       case 66 : /* fall through */
+// OBSOLETE       case 67 : /* fall through */
+// OBSOLETE       case 68 : /* fall through */
+// OBSOLETE       case 69 : /* fall through */
+// OBSOLETE       case 70 : /* fall through */
+// OBSOLETE       case 71 : /* fall through */
+// OBSOLETE       case 72 : /* fall through */
+// OBSOLETE       case 73 : /* fall through */
+// OBSOLETE       case 74 : /* fall through */
+// OBSOLETE       case 75 : /* fall through */
+// OBSOLETE       case 76 : /* fall through */
+// OBSOLETE       case 77 : /* fall through */
+// OBSOLETE       case 78 : /* fall through */
+// OBSOLETE       case 79 : itype = FR30BF_INSN_LDR14UH;goto extract_sfmt_ldr14uh;
+// OBSOLETE       case 80 : /* fall through */
+// OBSOLETE       case 81 : /* fall through */
+// OBSOLETE       case 82 : /* fall through */
+// OBSOLETE       case 83 : /* fall through */
+// OBSOLETE       case 84 : /* fall through */
+// OBSOLETE       case 85 : /* fall through */
+// OBSOLETE       case 86 : /* fall through */
+// OBSOLETE       case 87 : /* fall through */
+// OBSOLETE       case 88 : /* fall through */
+// OBSOLETE       case 89 : /* fall through */
+// OBSOLETE       case 90 : /* fall through */
+// OBSOLETE       case 91 : /* fall through */
+// OBSOLETE       case 92 : /* fall through */
+// OBSOLETE       case 93 : /* fall through */
+// OBSOLETE       case 94 : /* fall through */
+// OBSOLETE       case 95 : itype = FR30BF_INSN_STR14H;goto extract_sfmt_str14h;
+// OBSOLETE       case 96 : /* fall through */
+// OBSOLETE       case 97 : /* fall through */
+// OBSOLETE       case 98 : /* fall through */
+// OBSOLETE       case 99 : /* fall through */
+// OBSOLETE       case 100 : /* fall through */
+// OBSOLETE       case 101 : /* fall through */
+// OBSOLETE       case 102 : /* fall through */
+// OBSOLETE       case 103 : /* fall through */
+// OBSOLETE       case 104 : /* fall through */
+// OBSOLETE       case 105 : /* fall through */
+// OBSOLETE       case 106 : /* fall through */
+// OBSOLETE       case 107 : /* fall through */
+// OBSOLETE       case 108 : /* fall through */
+// OBSOLETE       case 109 : /* fall through */
+// OBSOLETE       case 110 : /* fall through */
+// OBSOLETE       case 111 : itype = FR30BF_INSN_LDR14UB;goto extract_sfmt_ldr14ub;
+// OBSOLETE       case 112 : /* fall through */
+// OBSOLETE       case 113 : /* fall through */
+// OBSOLETE       case 114 : /* fall through */
+// OBSOLETE       case 115 : /* fall through */
+// OBSOLETE       case 116 : /* fall through */
+// OBSOLETE       case 117 : /* fall through */
+// OBSOLETE       case 118 : /* fall through */
+// OBSOLETE       case 119 : /* fall through */
+// OBSOLETE       case 120 : /* fall through */
+// OBSOLETE       case 121 : /* fall through */
+// OBSOLETE       case 122 : /* fall through */
+// OBSOLETE       case 123 : /* fall through */
+// OBSOLETE       case 124 : /* fall through */
+// OBSOLETE       case 125 : /* fall through */
+// OBSOLETE       case 126 : /* fall through */
+// OBSOLETE       case 127 : itype = FR30BF_INSN_STR14B;goto extract_sfmt_str14b;
+// OBSOLETE       case 128 : itype = FR30BF_INSN_BANDL;goto extract_sfmt_bandl;
+// OBSOLETE       case 129 : itype = FR30BF_INSN_BANDH;goto extract_sfmt_bandl;
+// OBSOLETE       case 130 : itype = FR30BF_INSN_AND;goto extract_sfmt_and;
+// OBSOLETE       case 131 : itype = FR30BF_INSN_ANDCCR;goto extract_sfmt_andccr;
+// OBSOLETE       case 132 : itype = FR30BF_INSN_ANDM;goto extract_sfmt_andm;
+// OBSOLETE       case 133 : itype = FR30BF_INSN_ANDH;goto extract_sfmt_andh;
+// OBSOLETE       case 134 : itype = FR30BF_INSN_ANDB;goto extract_sfmt_andb;
+// OBSOLETE       case 135 : itype = FR30BF_INSN_STILM;goto extract_sfmt_stilm;
+// OBSOLETE       case 136 : itype = FR30BF_INSN_BTSTL;goto extract_sfmt_btstl;
+// OBSOLETE       case 137 : itype = FR30BF_INSN_BTSTH;goto extract_sfmt_btstl;
+// OBSOLETE       case 138 : itype = FR30BF_INSN_XCHB;goto extract_sfmt_xchb;
+// OBSOLETE       case 139 : itype = FR30BF_INSN_MOV;goto extract_sfmt_mov;
+// OBSOLETE       case 140 : itype = FR30BF_INSN_LDM0;goto extract_sfmt_ldm0;
+// OBSOLETE       case 141 : itype = FR30BF_INSN_LDM1;goto extract_sfmt_ldm1;
+// OBSOLETE       case 142 : itype = FR30BF_INSN_STM0;goto extract_sfmt_stm0;
+// OBSOLETE       case 143 : itype = FR30BF_INSN_STM1;goto extract_sfmt_stm1;
+// OBSOLETE       case 144 : itype = FR30BF_INSN_BORL;goto extract_sfmt_bandl;
+// OBSOLETE       case 145 : itype = FR30BF_INSN_BORH;goto extract_sfmt_bandl;
+// OBSOLETE       case 146 : itype = FR30BF_INSN_OR;goto extract_sfmt_and;
+// OBSOLETE       case 147 : itype = FR30BF_INSN_ORCCR;goto extract_sfmt_andccr;
+// OBSOLETE       case 148 : itype = FR30BF_INSN_ORM;goto extract_sfmt_andm;
+// OBSOLETE       case 149 : itype = FR30BF_INSN_ORH;goto extract_sfmt_andh;
+// OBSOLETE       case 150 : itype = FR30BF_INSN_ORB;goto extract_sfmt_andb;
+// OBSOLETE       case 151 :
+// OBSOLETE         {
+// OBSOLETE           unsigned int val = (((insn >> 4) & (15 << 0)));
+// OBSOLETE           switch (val)
+// OBSOLETE           {
+// OBSOLETE           case 0 : itype = FR30BF_INSN_JMP;goto extract_sfmt_jmp;
+// OBSOLETE           case 1 : itype = FR30BF_INSN_CALLR;goto extract_sfmt_callr;
+// OBSOLETE           case 2 : itype = FR30BF_INSN_RET;goto extract_sfmt_ret;
+// OBSOLETE           case 3 : itype = FR30BF_INSN_RETI;goto extract_sfmt_reti;
+// OBSOLETE           case 4 : itype = FR30BF_INSN_DIV0S;goto extract_sfmt_div0s;
+// OBSOLETE           case 5 : itype = FR30BF_INSN_DIV0U;goto extract_sfmt_div0u;
+// OBSOLETE           case 6 : itype = FR30BF_INSN_DIV1;goto extract_sfmt_div1;
+// OBSOLETE           case 7 : itype = FR30BF_INSN_DIV2;goto extract_sfmt_div2;
+// OBSOLETE           case 8 : itype = FR30BF_INSN_EXTSB;goto extract_sfmt_extsb;
+// OBSOLETE           case 9 : itype = FR30BF_INSN_EXTUB;goto extract_sfmt_extub;
+// OBSOLETE           case 10 : itype = FR30BF_INSN_EXTSH;goto extract_sfmt_extsh;
+// OBSOLETE           case 11 : itype = FR30BF_INSN_EXTUH;goto extract_sfmt_extuh;
+// OBSOLETE           default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
+// OBSOLETE           }
+// OBSOLETE         }
+// OBSOLETE       case 152 : itype = FR30BF_INSN_BEORL;goto extract_sfmt_bandl;
+// OBSOLETE       case 153 : itype = FR30BF_INSN_BEORH;goto extract_sfmt_bandl;
+// OBSOLETE       case 154 : itype = FR30BF_INSN_EOR;goto extract_sfmt_and;
+// OBSOLETE       case 155 : itype = FR30BF_INSN_LDI20;goto extract_sfmt_ldi20;
+// OBSOLETE       case 156 : itype = FR30BF_INSN_EORM;goto extract_sfmt_andm;
+// OBSOLETE       case 157 : itype = FR30BF_INSN_EORH;goto extract_sfmt_andh;
+// OBSOLETE       case 158 : itype = FR30BF_INSN_EORB;goto extract_sfmt_andb;
+// OBSOLETE       case 159 :
+// OBSOLETE         {
+// OBSOLETE           unsigned int val = (((insn >> 4) & (15 << 0)));
+// OBSOLETE           switch (val)
+// OBSOLETE           {
+// OBSOLETE           case 0 : itype = FR30BF_INSN_JMPD;goto extract_sfmt_jmp;
+// OBSOLETE           case 1 : itype = FR30BF_INSN_CALLRD;goto extract_sfmt_callr;
+// OBSOLETE           case 2 : itype = FR30BF_INSN_RET_D;goto extract_sfmt_ret;
+// OBSOLETE           case 3 : itype = FR30BF_INSN_INTE;goto extract_sfmt_inte;
+// OBSOLETE           case 6 : itype = FR30BF_INSN_DIV3;goto extract_sfmt_div3;
+// OBSOLETE           case 7 : itype = FR30BF_INSN_DIV4S;goto extract_sfmt_div4s;
+// OBSOLETE           case 8 : itype = FR30BF_INSN_LDI32;goto extract_sfmt_ldi32;
+// OBSOLETE           case 9 : itype = FR30BF_INSN_LEAVE;goto extract_sfmt_leave;
+// OBSOLETE           case 10 : itype = FR30BF_INSN_NOP;goto extract_sfmt_bnod;
+// OBSOLETE           case 12 : itype = FR30BF_INSN_COPOP;goto extract_sfmt_copop;
+// OBSOLETE           case 13 : itype = FR30BF_INSN_COPLD;goto extract_sfmt_copop;
+// OBSOLETE           case 14 : itype = FR30BF_INSN_COPST;goto extract_sfmt_copop;
+// OBSOLETE           case 15 : itype = FR30BF_INSN_COPSV;goto extract_sfmt_copop;
+// OBSOLETE           default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
+// OBSOLETE           }
+// OBSOLETE         }
+// OBSOLETE       case 160 : itype = FR30BF_INSN_ADDNI;goto extract_sfmt_addni;
+// OBSOLETE       case 161 : itype = FR30BF_INSN_ADDN2;goto extract_sfmt_addn2;
+// OBSOLETE       case 162 : itype = FR30BF_INSN_ADDN;goto extract_sfmt_addn;
+// OBSOLETE       case 163 : itype = FR30BF_INSN_ADDSP;goto extract_sfmt_addsp;
+// OBSOLETE       case 164 : itype = FR30BF_INSN_ADDI;goto extract_sfmt_addi;
+// OBSOLETE       case 165 : itype = FR30BF_INSN_ADD2;goto extract_sfmt_add2;
+// OBSOLETE       case 166 : itype = FR30BF_INSN_ADD;goto extract_sfmt_add;
+// OBSOLETE       case 167 : itype = FR30BF_INSN_ADDC;goto extract_sfmt_addc;
+// OBSOLETE       case 168 : itype = FR30BF_INSN_CMPI;goto extract_sfmt_cmpi;
+// OBSOLETE       case 169 : itype = FR30BF_INSN_CMP2;goto extract_sfmt_cmp2;
+// OBSOLETE       case 170 : itype = FR30BF_INSN_CMP;goto extract_sfmt_cmp;
+// OBSOLETE       case 171 : itype = FR30BF_INSN_MULU;goto extract_sfmt_mulu;
+// OBSOLETE       case 172 : itype = FR30BF_INSN_SUB;goto extract_sfmt_add;
+// OBSOLETE       case 173 : itype = FR30BF_INSN_SUBC;goto extract_sfmt_addc;
+// OBSOLETE       case 174 : itype = FR30BF_INSN_SUBN;goto extract_sfmt_addn;
+// OBSOLETE       case 175 : itype = FR30BF_INSN_MUL;goto extract_sfmt_mul;
+// OBSOLETE       case 176 : itype = FR30BF_INSN_LSRI;goto extract_sfmt_lsli;
+// OBSOLETE       case 177 : itype = FR30BF_INSN_LSR2;goto extract_sfmt_lsli;
+// OBSOLETE       case 178 : itype = FR30BF_INSN_LSR;goto extract_sfmt_lsl;
+// OBSOLETE       case 179 : itype = FR30BF_INSN_MOV2DR;goto extract_sfmt_mov2dr;
+// OBSOLETE       case 180 : itype = FR30BF_INSN_LSLI;goto extract_sfmt_lsli;
+// OBSOLETE       case 181 : itype = FR30BF_INSN_LSL2;goto extract_sfmt_lsli;
+// OBSOLETE       case 182 : itype = FR30BF_INSN_LSL;goto extract_sfmt_lsl;
+// OBSOLETE       case 183 : itype = FR30BF_INSN_MOVDR;goto extract_sfmt_movdr;
+// OBSOLETE       case 184 : itype = FR30BF_INSN_ASRI;goto extract_sfmt_lsli;
+// OBSOLETE       case 185 : itype = FR30BF_INSN_ASR2;goto extract_sfmt_lsli;
+// OBSOLETE       case 186 : itype = FR30BF_INSN_ASR;goto extract_sfmt_lsl;
+// OBSOLETE       case 187 : itype = FR30BF_INSN_MULUH;goto extract_sfmt_mulh;
+// OBSOLETE       case 188 : itype = FR30BF_INSN_LDRES;goto extract_sfmt_ldres;
+// OBSOLETE       case 189 : itype = FR30BF_INSN_STRES;goto extract_sfmt_ldres;
+// OBSOLETE       case 191 : itype = FR30BF_INSN_MULH;goto extract_sfmt_mulh;
+// OBSOLETE       case 192 : /* fall through */
+// OBSOLETE       case 193 : /* fall through */
+// OBSOLETE       case 194 : /* fall through */
+// OBSOLETE       case 195 : /* fall through */
+// OBSOLETE       case 196 : /* fall through */
+// OBSOLETE       case 197 : /* fall through */
+// OBSOLETE       case 198 : /* fall through */
+// OBSOLETE       case 199 : /* fall through */
+// OBSOLETE       case 200 : /* fall through */
+// OBSOLETE       case 201 : /* fall through */
+// OBSOLETE       case 202 : /* fall through */
+// OBSOLETE       case 203 : /* fall through */
+// OBSOLETE       case 204 : /* fall through */
+// OBSOLETE       case 205 : /* fall through */
+// OBSOLETE       case 206 : /* fall through */
+// OBSOLETE       case 207 : itype = FR30BF_INSN_LDI8;goto extract_sfmt_ldi8;
+// OBSOLETE       case 208 : /* fall through */
+// OBSOLETE       case 209 : /* fall through */
+// OBSOLETE       case 210 : /* fall through */
+// OBSOLETE       case 211 : /* fall through */
+// OBSOLETE       case 212 : /* fall through */
+// OBSOLETE       case 213 : /* fall through */
+// OBSOLETE       case 214 : /* fall through */
+// OBSOLETE       case 215 : itype = FR30BF_INSN_CALL;goto extract_sfmt_call;
+// OBSOLETE       case 216 : /* fall through */
+// OBSOLETE       case 217 : /* fall through */
+// OBSOLETE       case 218 : /* fall through */
+// OBSOLETE       case 219 : /* fall through */
+// OBSOLETE       case 220 : /* fall through */
+// OBSOLETE       case 221 : /* fall through */
+// OBSOLETE       case 222 : /* fall through */
+// OBSOLETE       case 223 : itype = FR30BF_INSN_CALLD;goto extract_sfmt_call;
+// OBSOLETE       case 224 : itype = FR30BF_INSN_BRA;goto extract_sfmt_brad;
+// OBSOLETE       case 225 : itype = FR30BF_INSN_BNO;goto extract_sfmt_bnod;
+// OBSOLETE       case 226 : itype = FR30BF_INSN_BEQ;goto extract_sfmt_beqd;
+// OBSOLETE       case 227 : itype = FR30BF_INSN_BNE;goto extract_sfmt_beqd;
+// OBSOLETE       case 228 : itype = FR30BF_INSN_BC;goto extract_sfmt_bcd;
+// OBSOLETE       case 229 : itype = FR30BF_INSN_BNC;goto extract_sfmt_bcd;
+// OBSOLETE       case 230 : itype = FR30BF_INSN_BN;goto extract_sfmt_bnd;
+// OBSOLETE       case 231 : itype = FR30BF_INSN_BP;goto extract_sfmt_bnd;
+// OBSOLETE       case 232 : itype = FR30BF_INSN_BV;goto extract_sfmt_bvd;
+// OBSOLETE       case 233 : itype = FR30BF_INSN_BNV;goto extract_sfmt_bvd;
+// OBSOLETE       case 234 : itype = FR30BF_INSN_BLT;goto extract_sfmt_bltd;
+// OBSOLETE       case 235 : itype = FR30BF_INSN_BGE;goto extract_sfmt_bltd;
+// OBSOLETE       case 236 : itype = FR30BF_INSN_BLE;goto extract_sfmt_bled;
+// OBSOLETE       case 237 : itype = FR30BF_INSN_BGT;goto extract_sfmt_bled;
+// OBSOLETE       case 238 : itype = FR30BF_INSN_BLS;goto extract_sfmt_blsd;
+// OBSOLETE       case 239 : itype = FR30BF_INSN_BHI;goto extract_sfmt_blsd;
+// OBSOLETE       case 240 : itype = FR30BF_INSN_BRAD;goto extract_sfmt_brad;
+// OBSOLETE       case 241 : itype = FR30BF_INSN_BNOD;goto extract_sfmt_bnod;
+// OBSOLETE       case 242 : itype = FR30BF_INSN_BEQD;goto extract_sfmt_beqd;
+// OBSOLETE       case 243 : itype = FR30BF_INSN_BNED;goto extract_sfmt_beqd;
+// OBSOLETE       case 244 : itype = FR30BF_INSN_BCD;goto extract_sfmt_bcd;
+// OBSOLETE       case 245 : itype = FR30BF_INSN_BNCD;goto extract_sfmt_bcd;
+// OBSOLETE       case 246 : itype = FR30BF_INSN_BND;goto extract_sfmt_bnd;
+// OBSOLETE       case 247 : itype = FR30BF_INSN_BPD;goto extract_sfmt_bnd;
+// OBSOLETE       case 248 : itype = FR30BF_INSN_BVD;goto extract_sfmt_bvd;
+// OBSOLETE       case 249 : itype = FR30BF_INSN_BNVD;goto extract_sfmt_bvd;
+// OBSOLETE       case 250 : itype = FR30BF_INSN_BLTD;goto extract_sfmt_bltd;
+// OBSOLETE       case 251 : itype = FR30BF_INSN_BGED;goto extract_sfmt_bltd;
+// OBSOLETE       case 252 : itype = FR30BF_INSN_BLED;goto extract_sfmt_bled;
+// OBSOLETE       case 253 : itype = FR30BF_INSN_BGTD;goto extract_sfmt_bled;
+// OBSOLETE       case 254 : itype = FR30BF_INSN_BLSD;goto extract_sfmt_blsd;
+// OBSOLETE       case 255 : itype = FR30BF_INSN_BHID;goto extract_sfmt_blsd;
+// OBSOLETE       default : itype = FR30BF_INSN_X_INVALID; goto extract_sfmt_empty;
+// OBSOLETE       }
+// OBSOLETE     }
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   /* The instruction has been decoded, now extract the fields.  */
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_empty:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_add:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addi:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_add2:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     SI f_m4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_m4) = f_m4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addc:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addc", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addn:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addni:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addni", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addn2:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     SI f_m4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_m4) = f_m4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addn2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_cmp:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_cmpi:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmpi", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_cmp2:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     SI f_m4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_m4) = f_m4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_cmp2", "f_Ri 0x%x", 'x', f_Ri, "f_m4 0x%x", 'x', f_m4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_and:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_and", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_andm:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andm", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_andh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_andb:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bandl:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bandl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_btstl:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_btstl", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mul:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mul", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mulu:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulu", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mulh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mulh", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div0s:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0s", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div0u:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div0u", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div1:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div1", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div2:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div2", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div3:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div3", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_div4s:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_div4s", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_lsl:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsl", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_lsli:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE     UINT f_u4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_u4) = f_u4;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lsli", "f_Ri 0x%x", 'x', f_Ri, "f_u4 0x%x", 'x', f_u4, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldi8:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi8.f
+// OBSOLETE     UINT f_i8;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_i8) = f_i8;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi8", "f_i8 0x%x", 'x', f_i8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldi20:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi20.f
+// OBSOLETE     UINT f_i20_16;
+// OBSOLETE     UINT f_i20_4;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     UINT f_i20;
+// OBSOLETE     /* Contents of trailing part of insn.  */
+// OBSOLETE     UINT word_1;
+// OBSOLETE 
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2);
+// OBSOLETE     f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0));
+// OBSOLETE     f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE {
+// OBSOLETE   f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_i20) = f_i20;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi20", "f_i20 0x%x", 'x', f_i20, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldi32:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi32.f
+// OBSOLETE     UINT f_i32;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE     /* Contents of trailing part of insn.  */
+// OBSOLETE     UINT word_1;
+// OBSOLETE     UINT word_2;
+// OBSOLETE 
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2);
+// OBSOLETE   word_2 = GETIMEMUHI (current_cpu, pc + 4);
+// OBSOLETE     f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_i32) = f_i32;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldi32", "f_i32 0x%x", 'x', f_i32, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ld:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ld", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_lduh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lduh", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldub:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldub", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr13:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr13uh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13uh", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr13ub:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr13ub", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr14:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14.f
+// OBSOLETE     SI f_disp10;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_disp10) = f_disp10;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14", "f_disp10 0x%x", 'x', f_disp10, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr14uh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14uh.f
+// OBSOLETE     SI f_disp9;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_disp9) = f_disp9;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14uh", "f_disp9 0x%x", 'x', f_disp9, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr14ub:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14ub.f
+// OBSOLETE     INT f_disp8;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_disp8) = f_disp8;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr14ub", "f_disp8 0x%x", 'x', f_disp8, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr15:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15.f
+// OBSOLETE     USI f_udisp6;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_udisp6) = f_udisp6;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15", "f_udisp6 0x%x", 'x', f_udisp6, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr15gr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15gr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr15dr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE     UINT f_Rs2;
+// OBSOLETE 
+// OBSOLETE     f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rs2) = f_Rs2;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldr15ps:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldr15ps", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_st:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_st", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_sth:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sth", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_stb:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str13:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str13h:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13h", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str13b:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str13b", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str14:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14.f
+// OBSOLETE     SI f_disp10;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_disp10) = f_disp10;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14", "f_Ri 0x%x", 'x', f_Ri, "f_disp10 0x%x", 'x', f_disp10, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str14h:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14h.f
+// OBSOLETE     SI f_disp9;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_disp9) = f_disp9;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14h", "f_Ri 0x%x", 'x', f_Ri, "f_disp9 0x%x", 'x', f_disp9, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str14b:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14b.f
+// OBSOLETE     INT f_disp8;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_disp8) = f_disp8;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str14b", "f_Ri 0x%x", 'x', f_Ri, "f_disp8 0x%x", 'x', f_disp8, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str15:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15.f
+// OBSOLETE     USI f_udisp6;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_udisp6) = f_udisp6;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15", "f_Ri 0x%x", 'x', f_Ri, "f_udisp6 0x%x", 'x', f_udisp6, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str15gr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15gr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15gr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str15dr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE     UINT f_Rs2;
+// OBSOLETE 
+// OBSOLETE     f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rs2) = f_Rs2;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15dr", "f_Rs2 0x%x", 'x', f_Rs2, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_str15ps:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_str15ps", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mov:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov", "f_Rj 0x%x", 'x', f_Rj, "f_Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_movdr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE     UINT f_Rs1;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Rs1) = f_Rs1;
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movdr", "f_Rs1 0x%x", 'x', f_Rs1, "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_movps:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_movps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mov2dr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Rs1;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rs1) = f_Rs1;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2dr", "f_Ri 0x%x", 'x', f_Ri, "f_Rs1 0x%x", 'x', f_Rs1, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_mov2ps:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mov2ps", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_jmp:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jmp", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_callr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_callr", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_call:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE     SI f_rel12;
+// OBSOLETE 
+// OBSOLETE     f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label12) = f_rel12;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "label12 0x%x", 'x', f_rel12, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ret:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ret", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_int:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE     UINT f_u8;
+// OBSOLETE 
+// OBSOLETE     f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_u8) = f_u8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_int", "f_u8 0x%x", 'x', f_u8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_inte:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_inte", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_reti:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_reti", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_brad:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_brad", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bnod:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnod", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_beqd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_beqd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bcd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bcd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bnd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bnd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bvd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bvd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bltd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bltd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_bled:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bled", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_blsd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE     SI f_rel9;
+// OBSOLETE 
+// OBSOLETE     f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (i_label9) = f_rel9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_blsd", "label9 0x%x", 'x', f_rel9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13h:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE     USI f_dir9;
+// OBSOLETE 
+// OBSOLETE     f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir9) = f_dir9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13b:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE     UINT f_dir8;
+// OBSOLETE 
+// OBSOLETE     f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir8) = f_dir8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13pi:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13pih:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE     USI f_dir9;
+// OBSOLETE 
+// OBSOLETE     f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir9) = f_dir9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr13pib:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE     UINT f_dir8;
+// OBSOLETE 
+// OBSOLETE     f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir8) = f_dir8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmovr15pi:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmovr15pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13h:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE     USI f_dir9;
+// OBSOLETE 
+// OBSOLETE     f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir9) = f_dir9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13h", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13b:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE     UINT f_dir8;
+// OBSOLETE 
+// OBSOLETE     f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir8) = f_dir8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13b", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13pi:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pi", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13pih:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE     USI f_dir9;
+// OBSOLETE 
+// OBSOLETE     f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir9) = f_dir9;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pih", "f_dir9 0x%x", 'x', f_dir9, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r13pib:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE     UINT f_dir8;
+// OBSOLETE 
+// OBSOLETE     f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir8) = f_dir8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r13pib", "f_dir8 0x%x", 'x', f_dir8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_dmov2r15pd:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE     USI f_dir10;
+// OBSOLETE 
+// OBSOLETE     f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_dir10) = f_dir10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_dmov2r15pd", "f_dir10 0x%x", 'x', f_dir10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldres:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldres", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_copop:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE     /* Contents of trailing part of insn.  */
+// OBSOLETE     UINT word_1;
+// OBSOLETE 
+// OBSOLETE   word_1 = GETIMEMUHI (current_cpu, pc + 2);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_copop", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_andccr:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE     UINT f_u8;
+// OBSOLETE 
+// OBSOLETE     f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_u8) = f_u8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andccr", "f_u8 0x%x", 'x', f_u8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_stilm:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE     UINT f_u8;
+// OBSOLETE 
+// OBSOLETE     f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_u8) = f_u8;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stilm", "f_u8 0x%x", 'x', f_u8, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_addsp:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE     SI f_s10;
+// OBSOLETE 
+// OBSOLETE     f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_s10) = f_s10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addsp", "f_s10 0x%x", 'x', f_s10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_extsb:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsb", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_extub:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extub", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_extsh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extsh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_extuh:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_extuh", "f_Ri 0x%x", 'x', f_Ri, "Ri 0x%x", 'x', f_Ri, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldm0:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm0.f
+// OBSOLETE     UINT f_reglist_low_ld;
+// OBSOLETE 
+// OBSOLETE     f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_reglist_low_ld) = f_reglist_low_ld;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm0", "f_reglist_low_ld 0x%x", 'x', f_reglist_low_ld, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_0) = 0;
+// OBSOLETE       FLD (out_h_gr_SI_1) = 1;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_2) = 2;
+// OBSOLETE       FLD (out_h_gr_SI_3) = 3;
+// OBSOLETE       FLD (out_h_gr_SI_4) = 4;
+// OBSOLETE       FLD (out_h_gr_SI_5) = 5;
+// OBSOLETE       FLD (out_h_gr_SI_6) = 6;
+// OBSOLETE       FLD (out_h_gr_SI_7) = 7;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_ldm1:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm1.f
+// OBSOLETE     UINT f_reglist_hi_ld;
+// OBSOLETE 
+// OBSOLETE     f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_reglist_hi_ld) = f_reglist_hi_ld;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldm1", "f_reglist_hi_ld 0x%x", 'x', f_reglist_hi_ld, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_10) = 10;
+// OBSOLETE       FLD (out_h_gr_SI_11) = 11;
+// OBSOLETE       FLD (out_h_gr_SI_12) = 12;
+// OBSOLETE       FLD (out_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (out_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_8) = 8;
+// OBSOLETE       FLD (out_h_gr_SI_9) = 9;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_stm0:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm0.f
+// OBSOLETE     UINT f_reglist_low_st;
+// OBSOLETE 
+// OBSOLETE     f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_reglist_low_st) = f_reglist_low_st;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm0", "f_reglist_low_st 0x%x", 'x', f_reglist_low_st, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_0) = 0;
+// OBSOLETE       FLD (in_h_gr_SI_1) = 1;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (in_h_gr_SI_2) = 2;
+// OBSOLETE       FLD (in_h_gr_SI_3) = 3;
+// OBSOLETE       FLD (in_h_gr_SI_4) = 4;
+// OBSOLETE       FLD (in_h_gr_SI_5) = 5;
+// OBSOLETE       FLD (in_h_gr_SI_6) = 6;
+// OBSOLETE       FLD (in_h_gr_SI_7) = 7;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_stm1:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm1.f
+// OBSOLETE     UINT f_reglist_hi_st;
+// OBSOLETE 
+// OBSOLETE     f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_reglist_hi_st) = f_reglist_hi_st;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_stm1", "f_reglist_hi_st 0x%x", 'x', f_reglist_hi_st, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_10) = 10;
+// OBSOLETE       FLD (in_h_gr_SI_11) = 11;
+// OBSOLETE       FLD (in_h_gr_SI_12) = 12;
+// OBSOLETE       FLD (in_h_gr_SI_13) = 13;
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (in_h_gr_SI_8) = 8;
+// OBSOLETE       FLD (in_h_gr_SI_9) = 9;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_enter:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE     USI f_u10;
+// OBSOLETE 
+// OBSOLETE     f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_u10) = f_u10;
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_enter", "f_u10 0x%x", 'x', f_u10, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_leave:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_leave", (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (in_h_gr_SI_15) = 15;
+// OBSOLETE       FLD (out_h_gr_SI_14) = 14;
+// OBSOLETE       FLD (out_h_gr_SI_15) = 15;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE  extract_sfmt_xchb:
+// OBSOLETE   {
+// OBSOLETE     const IDESC *idesc = &fr30bf_insn_data[itype];
+// OBSOLETE     CGEN_INSN_INT insn = base_insn;
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE     UINT f_Rj;
+// OBSOLETE     UINT f_Ri;
+// OBSOLETE 
+// OBSOLETE     f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+// OBSOLETE     f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+// OBSOLETE 
+// OBSOLETE   /* Record the fields for the semantic handler.  */
+// OBSOLETE   FLD (f_Ri) = f_Ri;
+// OBSOLETE   FLD (f_Rj) = f_Rj;
+// OBSOLETE   FLD (i_Ri) = & CPU (h_gr)[f_Ri];
+// OBSOLETE   FLD (i_Rj) = & CPU (h_gr)[f_Rj];
+// OBSOLETE   TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_xchb", "f_Ri 0x%x", 'x', f_Ri, "f_Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE   /* Record the fields for profiling.  */
+// OBSOLETE   if (PROFILE_MODEL_P (current_cpu))
+// OBSOLETE     {
+// OBSOLETE       FLD (in_Ri) = f_Ri;
+// OBSOLETE       FLD (in_Rj) = f_Rj;
+// OBSOLETE       FLD (out_Ri) = f_Ri;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE #undef FLD
+// OBSOLETE     return idesc;
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE }
diff --git a/sim/fr30/decode.h b/sim/fr30/decode.h
index 65f6181..452c3f9 100644
--- a/sim/fr30/decode.h
+++ b/sim/fr30/decode.h
@@ -1,127 +1,127 @@
-/* Decode header for fr30bf.
-
-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 simulators.
-
-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 FR30BF_DECODE_H
-#define FR30BF_DECODE_H
-
-extern const IDESC *fr30bf_decode (SIM_CPU *, IADDR,
-                                  CGEN_INSN_INT,
-                                  ARGBUF *);
-extern void fr30bf_init_idesc_table (SIM_CPU *);
-extern void fr30bf_sem_init_idesc_table (SIM_CPU *);
-extern void fr30bf_semf_init_idesc_table (SIM_CPU *);
-
-/* Enum declaration for instructions in cpu family fr30bf.  */
-typedef enum fr30bf_insn_type {
-  FR30BF_INSN_X_INVALID, FR30BF_INSN_X_AFTER, FR30BF_INSN_X_BEFORE, FR30BF_INSN_X_CTI_CHAIN
- , FR30BF_INSN_X_CHAIN, FR30BF_INSN_X_BEGIN, FR30BF_INSN_ADD, FR30BF_INSN_ADDI
- , FR30BF_INSN_ADD2, FR30BF_INSN_ADDC, FR30BF_INSN_ADDN, FR30BF_INSN_ADDNI
- , FR30BF_INSN_ADDN2, FR30BF_INSN_SUB, FR30BF_INSN_SUBC, FR30BF_INSN_SUBN
- , FR30BF_INSN_CMP, FR30BF_INSN_CMPI, FR30BF_INSN_CMP2, FR30BF_INSN_AND
- , FR30BF_INSN_OR, FR30BF_INSN_EOR, FR30BF_INSN_ANDM, FR30BF_INSN_ANDH
- , FR30BF_INSN_ANDB, FR30BF_INSN_ORM, FR30BF_INSN_ORH, FR30BF_INSN_ORB
- , FR30BF_INSN_EORM, FR30BF_INSN_EORH, FR30BF_INSN_EORB, FR30BF_INSN_BANDL
- , FR30BF_INSN_BORL, FR30BF_INSN_BEORL, FR30BF_INSN_BANDH, FR30BF_INSN_BORH
- , FR30BF_INSN_BEORH, FR30BF_INSN_BTSTL, FR30BF_INSN_BTSTH, FR30BF_INSN_MUL
- , FR30BF_INSN_MULU, FR30BF_INSN_MULH, FR30BF_INSN_MULUH, FR30BF_INSN_DIV0S
- , FR30BF_INSN_DIV0U, FR30BF_INSN_DIV1, FR30BF_INSN_DIV2, FR30BF_INSN_DIV3
- , FR30BF_INSN_DIV4S, FR30BF_INSN_LSL, FR30BF_INSN_LSLI, FR30BF_INSN_LSL2
- , FR30BF_INSN_LSR, FR30BF_INSN_LSRI, FR30BF_INSN_LSR2, FR30BF_INSN_ASR
- , FR30BF_INSN_ASRI, FR30BF_INSN_ASR2, FR30BF_INSN_LDI8, FR30BF_INSN_LDI20
- , FR30BF_INSN_LDI32, FR30BF_INSN_LD, FR30BF_INSN_LDUH, FR30BF_INSN_LDUB
- , FR30BF_INSN_LDR13, FR30BF_INSN_LDR13UH, FR30BF_INSN_LDR13UB, FR30BF_INSN_LDR14
- , FR30BF_INSN_LDR14UH, FR30BF_INSN_LDR14UB, FR30BF_INSN_LDR15, FR30BF_INSN_LDR15GR
- , FR30BF_INSN_LDR15DR, FR30BF_INSN_LDR15PS, FR30BF_INSN_ST, FR30BF_INSN_STH
- , FR30BF_INSN_STB, FR30BF_INSN_STR13, FR30BF_INSN_STR13H, FR30BF_INSN_STR13B
- , FR30BF_INSN_STR14, FR30BF_INSN_STR14H, FR30BF_INSN_STR14B, FR30BF_INSN_STR15
- , FR30BF_INSN_STR15GR, FR30BF_INSN_STR15DR, FR30BF_INSN_STR15PS, FR30BF_INSN_MOV
- , FR30BF_INSN_MOVDR, FR30BF_INSN_MOVPS, FR30BF_INSN_MOV2DR, FR30BF_INSN_MOV2PS
- , FR30BF_INSN_JMP, FR30BF_INSN_JMPD, FR30BF_INSN_CALLR, FR30BF_INSN_CALLRD
- , FR30BF_INSN_CALL, FR30BF_INSN_CALLD, FR30BF_INSN_RET, FR30BF_INSN_RET_D
- , FR30BF_INSN_INT, FR30BF_INSN_INTE, FR30BF_INSN_RETI, FR30BF_INSN_BRAD
- , FR30BF_INSN_BRA, FR30BF_INSN_BNOD, FR30BF_INSN_BNO, FR30BF_INSN_BEQD
- , FR30BF_INSN_BEQ, FR30BF_INSN_BNED, FR30BF_INSN_BNE, FR30BF_INSN_BCD
- , FR30BF_INSN_BC, FR30BF_INSN_BNCD, FR30BF_INSN_BNC, FR30BF_INSN_BND
- , FR30BF_INSN_BN, FR30BF_INSN_BPD, FR30BF_INSN_BP, FR30BF_INSN_BVD
- , FR30BF_INSN_BV, FR30BF_INSN_BNVD, FR30BF_INSN_BNV, FR30BF_INSN_BLTD
- , FR30BF_INSN_BLT, FR30BF_INSN_BGED, FR30BF_INSN_BGE, FR30BF_INSN_BLED
- , FR30BF_INSN_BLE, FR30BF_INSN_BGTD, FR30BF_INSN_BGT, FR30BF_INSN_BLSD
- , FR30BF_INSN_BLS, FR30BF_INSN_BHID, FR30BF_INSN_BHI, FR30BF_INSN_DMOVR13
- , FR30BF_INSN_DMOVR13H, FR30BF_INSN_DMOVR13B, FR30BF_INSN_DMOVR13PI, FR30BF_INSN_DMOVR13PIH
- , FR30BF_INSN_DMOVR13PIB, FR30BF_INSN_DMOVR15PI, FR30BF_INSN_DMOV2R13, FR30BF_INSN_DMOV2R13H
- , FR30BF_INSN_DMOV2R13B, FR30BF_INSN_DMOV2R13PI, FR30BF_INSN_DMOV2R13PIH, FR30BF_INSN_DMOV2R13PIB
- , FR30BF_INSN_DMOV2R15PD, FR30BF_INSN_LDRES, FR30BF_INSN_STRES, FR30BF_INSN_COPOP
- , FR30BF_INSN_COPLD, FR30BF_INSN_COPST, FR30BF_INSN_COPSV, FR30BF_INSN_NOP
- , FR30BF_INSN_ANDCCR, FR30BF_INSN_ORCCR, FR30BF_INSN_STILM, FR30BF_INSN_ADDSP
- , FR30BF_INSN_EXTSB, FR30BF_INSN_EXTUB, FR30BF_INSN_EXTSH, FR30BF_INSN_EXTUH
- , FR30BF_INSN_LDM0, FR30BF_INSN_LDM1, FR30BF_INSN_STM0, FR30BF_INSN_STM1
- , FR30BF_INSN_ENTER, FR30BF_INSN_LEAVE, FR30BF_INSN_XCHB, FR30BF_INSN_MAX
-} FR30BF_INSN_TYPE;
-
-/* Enum declaration for semantic formats in cpu family fr30bf.  */
-typedef enum fr30bf_sfmt_type {
-  FR30BF_SFMT_EMPTY, FR30BF_SFMT_ADD, FR30BF_SFMT_ADDI, FR30BF_SFMT_ADD2
- , FR30BF_SFMT_ADDC, FR30BF_SFMT_ADDN, FR30BF_SFMT_ADDNI, FR30BF_SFMT_ADDN2
- , FR30BF_SFMT_CMP, FR30BF_SFMT_CMPI, FR30BF_SFMT_CMP2, FR30BF_SFMT_AND
- , FR30BF_SFMT_ANDM, FR30BF_SFMT_ANDH, FR30BF_SFMT_ANDB, FR30BF_SFMT_BANDL
- , FR30BF_SFMT_BTSTL, FR30BF_SFMT_MUL, FR30BF_SFMT_MULU, FR30BF_SFMT_MULH
- , FR30BF_SFMT_DIV0S, FR30BF_SFMT_DIV0U, FR30BF_SFMT_DIV1, FR30BF_SFMT_DIV2
- , FR30BF_SFMT_DIV3, FR30BF_SFMT_DIV4S, FR30BF_SFMT_LSL, FR30BF_SFMT_LSLI
- , FR30BF_SFMT_LDI8, FR30BF_SFMT_LDI20, FR30BF_SFMT_LDI32, FR30BF_SFMT_LD
- , FR30BF_SFMT_LDUH, FR30BF_SFMT_LDUB, FR30BF_SFMT_LDR13, FR30BF_SFMT_LDR13UH
- , FR30BF_SFMT_LDR13UB, FR30BF_SFMT_LDR14, FR30BF_SFMT_LDR14UH, FR30BF_SFMT_LDR14UB
- , FR30BF_SFMT_LDR15, FR30BF_SFMT_LDR15GR, FR30BF_SFMT_LDR15DR, FR30BF_SFMT_LDR15PS
- , FR30BF_SFMT_ST, FR30BF_SFMT_STH, FR30BF_SFMT_STB, FR30BF_SFMT_STR13
- , FR30BF_SFMT_STR13H, FR30BF_SFMT_STR13B, FR30BF_SFMT_STR14, FR30BF_SFMT_STR14H
- , FR30BF_SFMT_STR14B, FR30BF_SFMT_STR15, FR30BF_SFMT_STR15GR, FR30BF_SFMT_STR15DR
- , FR30BF_SFMT_STR15PS, FR30BF_SFMT_MOV, FR30BF_SFMT_MOVDR, FR30BF_SFMT_MOVPS
- , FR30BF_SFMT_MOV2DR, FR30BF_SFMT_MOV2PS, FR30BF_SFMT_JMP, FR30BF_SFMT_CALLR
- , FR30BF_SFMT_CALL, FR30BF_SFMT_RET, FR30BF_SFMT_INT, FR30BF_SFMT_INTE
- , FR30BF_SFMT_RETI, FR30BF_SFMT_BRAD, FR30BF_SFMT_BNOD, FR30BF_SFMT_BEQD
- , FR30BF_SFMT_BCD, FR30BF_SFMT_BND, FR30BF_SFMT_BVD, FR30BF_SFMT_BLTD
- , FR30BF_SFMT_BLED, FR30BF_SFMT_BLSD, FR30BF_SFMT_DMOVR13, FR30BF_SFMT_DMOVR13H
- , FR30BF_SFMT_DMOVR13B, FR30BF_SFMT_DMOVR13PI, FR30BF_SFMT_DMOVR13PIH, FR30BF_SFMT_DMOVR13PIB
- , FR30BF_SFMT_DMOVR15PI, FR30BF_SFMT_DMOV2R13, FR30BF_SFMT_DMOV2R13H, FR30BF_SFMT_DMOV2R13B
- , FR30BF_SFMT_DMOV2R13PI, FR30BF_SFMT_DMOV2R13PIH, FR30BF_SFMT_DMOV2R13PIB, FR30BF_SFMT_DMOV2R15PD
- , FR30BF_SFMT_LDRES, FR30BF_SFMT_COPOP, FR30BF_SFMT_ANDCCR, FR30BF_SFMT_STILM
- , FR30BF_SFMT_ADDSP, FR30BF_SFMT_EXTSB, FR30BF_SFMT_EXTUB, FR30BF_SFMT_EXTSH
- , FR30BF_SFMT_EXTUH, FR30BF_SFMT_LDM0, FR30BF_SFMT_LDM1, FR30BF_SFMT_STM0
- , FR30BF_SFMT_STM1, FR30BF_SFMT_ENTER, FR30BF_SFMT_LEAVE, FR30BF_SFMT_XCHB
-} FR30BF_SFMT_TYPE;
-
-/* Function unit handlers (user written).  */
-
-extern int fr30bf_model_fr30_1_u_stm (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*reglist*/);
-extern int fr30bf_model_fr30_1_u_ldm (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*reglist*/);
-extern int fr30bf_model_fr30_1_u_store (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/, INT /*Rj*/);
-extern int fr30bf_model_fr30_1_u_load (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Rj*/, INT /*Ri*/);
-extern int fr30bf_model_fr30_1_u_cti (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/);
-extern int fr30bf_model_fr30_1_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/, INT /*Rj*/, INT /*Ri*/);
-
-/* Profiling before/after handlers (user written) */
-
-extern void fr30bf_model_insn_before (SIM_CPU *, int /*first_p*/);
-extern void fr30bf_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
-
-#endif /* FR30BF_DECODE_H */
+// OBSOLETE /* Decode header for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #ifndef FR30BF_DECODE_H
+// OBSOLETE #define FR30BF_DECODE_H
+// OBSOLETE 
+// OBSOLETE extern const IDESC *fr30bf_decode (SIM_CPU *, IADDR,
+// OBSOLETE                                   CGEN_INSN_INT,
+// OBSOLETE                                   ARGBUF *);
+// OBSOLETE extern void fr30bf_init_idesc_table (SIM_CPU *);
+// OBSOLETE extern void fr30bf_sem_init_idesc_table (SIM_CPU *);
+// OBSOLETE extern void fr30bf_semf_init_idesc_table (SIM_CPU *);
+// OBSOLETE 
+// OBSOLETE /* Enum declaration for instructions in cpu family fr30bf.  */
+// OBSOLETE typedef enum fr30bf_insn_type {
+// OBSOLETE   FR30BF_INSN_X_INVALID, FR30BF_INSN_X_AFTER, FR30BF_INSN_X_BEFORE, FR30BF_INSN_X_CTI_CHAIN
+// OBSOLETE  , FR30BF_INSN_X_CHAIN, FR30BF_INSN_X_BEGIN, FR30BF_INSN_ADD, FR30BF_INSN_ADDI
+// OBSOLETE  , FR30BF_INSN_ADD2, FR30BF_INSN_ADDC, FR30BF_INSN_ADDN, FR30BF_INSN_ADDNI
+// OBSOLETE  , FR30BF_INSN_ADDN2, FR30BF_INSN_SUB, FR30BF_INSN_SUBC, FR30BF_INSN_SUBN
+// OBSOLETE  , FR30BF_INSN_CMP, FR30BF_INSN_CMPI, FR30BF_INSN_CMP2, FR30BF_INSN_AND
+// OBSOLETE  , FR30BF_INSN_OR, FR30BF_INSN_EOR, FR30BF_INSN_ANDM, FR30BF_INSN_ANDH
+// OBSOLETE  , FR30BF_INSN_ANDB, FR30BF_INSN_ORM, FR30BF_INSN_ORH, FR30BF_INSN_ORB
+// OBSOLETE  , FR30BF_INSN_EORM, FR30BF_INSN_EORH, FR30BF_INSN_EORB, FR30BF_INSN_BANDL
+// OBSOLETE  , FR30BF_INSN_BORL, FR30BF_INSN_BEORL, FR30BF_INSN_BANDH, FR30BF_INSN_BORH
+// OBSOLETE  , FR30BF_INSN_BEORH, FR30BF_INSN_BTSTL, FR30BF_INSN_BTSTH, FR30BF_INSN_MUL
+// OBSOLETE  , FR30BF_INSN_MULU, FR30BF_INSN_MULH, FR30BF_INSN_MULUH, FR30BF_INSN_DIV0S
+// OBSOLETE  , FR30BF_INSN_DIV0U, FR30BF_INSN_DIV1, FR30BF_INSN_DIV2, FR30BF_INSN_DIV3
+// OBSOLETE  , FR30BF_INSN_DIV4S, FR30BF_INSN_LSL, FR30BF_INSN_LSLI, FR30BF_INSN_LSL2
+// OBSOLETE  , FR30BF_INSN_LSR, FR30BF_INSN_LSRI, FR30BF_INSN_LSR2, FR30BF_INSN_ASR
+// OBSOLETE  , FR30BF_INSN_ASRI, FR30BF_INSN_ASR2, FR30BF_INSN_LDI8, FR30BF_INSN_LDI20
+// OBSOLETE  , FR30BF_INSN_LDI32, FR30BF_INSN_LD, FR30BF_INSN_LDUH, FR30BF_INSN_LDUB
+// OBSOLETE  , FR30BF_INSN_LDR13, FR30BF_INSN_LDR13UH, FR30BF_INSN_LDR13UB, FR30BF_INSN_LDR14
+// OBSOLETE  , FR30BF_INSN_LDR14UH, FR30BF_INSN_LDR14UB, FR30BF_INSN_LDR15, FR30BF_INSN_LDR15GR
+// OBSOLETE  , FR30BF_INSN_LDR15DR, FR30BF_INSN_LDR15PS, FR30BF_INSN_ST, FR30BF_INSN_STH
+// OBSOLETE  , FR30BF_INSN_STB, FR30BF_INSN_STR13, FR30BF_INSN_STR13H, FR30BF_INSN_STR13B
+// OBSOLETE  , FR30BF_INSN_STR14, FR30BF_INSN_STR14H, FR30BF_INSN_STR14B, FR30BF_INSN_STR15
+// OBSOLETE  , FR30BF_INSN_STR15GR, FR30BF_INSN_STR15DR, FR30BF_INSN_STR15PS, FR30BF_INSN_MOV
+// OBSOLETE  , FR30BF_INSN_MOVDR, FR30BF_INSN_MOVPS, FR30BF_INSN_MOV2DR, FR30BF_INSN_MOV2PS
+// OBSOLETE  , FR30BF_INSN_JMP, FR30BF_INSN_JMPD, FR30BF_INSN_CALLR, FR30BF_INSN_CALLRD
+// OBSOLETE  , FR30BF_INSN_CALL, FR30BF_INSN_CALLD, FR30BF_INSN_RET, FR30BF_INSN_RET_D
+// OBSOLETE  , FR30BF_INSN_INT, FR30BF_INSN_INTE, FR30BF_INSN_RETI, FR30BF_INSN_BRAD
+// OBSOLETE  , FR30BF_INSN_BRA, FR30BF_INSN_BNOD, FR30BF_INSN_BNO, FR30BF_INSN_BEQD
+// OBSOLETE  , FR30BF_INSN_BEQ, FR30BF_INSN_BNED, FR30BF_INSN_BNE, FR30BF_INSN_BCD
+// OBSOLETE  , FR30BF_INSN_BC, FR30BF_INSN_BNCD, FR30BF_INSN_BNC, FR30BF_INSN_BND
+// OBSOLETE  , FR30BF_INSN_BN, FR30BF_INSN_BPD, FR30BF_INSN_BP, FR30BF_INSN_BVD
+// OBSOLETE  , FR30BF_INSN_BV, FR30BF_INSN_BNVD, FR30BF_INSN_BNV, FR30BF_INSN_BLTD
+// OBSOLETE  , FR30BF_INSN_BLT, FR30BF_INSN_BGED, FR30BF_INSN_BGE, FR30BF_INSN_BLED
+// OBSOLETE  , FR30BF_INSN_BLE, FR30BF_INSN_BGTD, FR30BF_INSN_BGT, FR30BF_INSN_BLSD
+// OBSOLETE  , FR30BF_INSN_BLS, FR30BF_INSN_BHID, FR30BF_INSN_BHI, FR30BF_INSN_DMOVR13
+// OBSOLETE  , FR30BF_INSN_DMOVR13H, FR30BF_INSN_DMOVR13B, FR30BF_INSN_DMOVR13PI, FR30BF_INSN_DMOVR13PIH
+// OBSOLETE  , FR30BF_INSN_DMOVR13PIB, FR30BF_INSN_DMOVR15PI, FR30BF_INSN_DMOV2R13, FR30BF_INSN_DMOV2R13H
+// OBSOLETE  , FR30BF_INSN_DMOV2R13B, FR30BF_INSN_DMOV2R13PI, FR30BF_INSN_DMOV2R13PIH, FR30BF_INSN_DMOV2R13PIB
+// OBSOLETE  , FR30BF_INSN_DMOV2R15PD, FR30BF_INSN_LDRES, FR30BF_INSN_STRES, FR30BF_INSN_COPOP
+// OBSOLETE  , FR30BF_INSN_COPLD, FR30BF_INSN_COPST, FR30BF_INSN_COPSV, FR30BF_INSN_NOP
+// OBSOLETE  , FR30BF_INSN_ANDCCR, FR30BF_INSN_ORCCR, FR30BF_INSN_STILM, FR30BF_INSN_ADDSP
+// OBSOLETE  , FR30BF_INSN_EXTSB, FR30BF_INSN_EXTUB, FR30BF_INSN_EXTSH, FR30BF_INSN_EXTUH
+// OBSOLETE  , FR30BF_INSN_LDM0, FR30BF_INSN_LDM1, FR30BF_INSN_STM0, FR30BF_INSN_STM1
+// OBSOLETE  , FR30BF_INSN_ENTER, FR30BF_INSN_LEAVE, FR30BF_INSN_XCHB, FR30BF_INSN_MAX
+// OBSOLETE } FR30BF_INSN_TYPE;
+// OBSOLETE 
+// OBSOLETE /* Enum declaration for semantic formats in cpu family fr30bf.  */
+// OBSOLETE typedef enum fr30bf_sfmt_type {
+// OBSOLETE   FR30BF_SFMT_EMPTY, FR30BF_SFMT_ADD, FR30BF_SFMT_ADDI, FR30BF_SFMT_ADD2
+// OBSOLETE  , FR30BF_SFMT_ADDC, FR30BF_SFMT_ADDN, FR30BF_SFMT_ADDNI, FR30BF_SFMT_ADDN2
+// OBSOLETE  , FR30BF_SFMT_CMP, FR30BF_SFMT_CMPI, FR30BF_SFMT_CMP2, FR30BF_SFMT_AND
+// OBSOLETE  , FR30BF_SFMT_ANDM, FR30BF_SFMT_ANDH, FR30BF_SFMT_ANDB, FR30BF_SFMT_BANDL
+// OBSOLETE  , FR30BF_SFMT_BTSTL, FR30BF_SFMT_MUL, FR30BF_SFMT_MULU, FR30BF_SFMT_MULH
+// OBSOLETE  , FR30BF_SFMT_DIV0S, FR30BF_SFMT_DIV0U, FR30BF_SFMT_DIV1, FR30BF_SFMT_DIV2
+// OBSOLETE  , FR30BF_SFMT_DIV3, FR30BF_SFMT_DIV4S, FR30BF_SFMT_LSL, FR30BF_SFMT_LSLI
+// OBSOLETE  , FR30BF_SFMT_LDI8, FR30BF_SFMT_LDI20, FR30BF_SFMT_LDI32, FR30BF_SFMT_LD
+// OBSOLETE  , FR30BF_SFMT_LDUH, FR30BF_SFMT_LDUB, FR30BF_SFMT_LDR13, FR30BF_SFMT_LDR13UH
+// OBSOLETE  , FR30BF_SFMT_LDR13UB, FR30BF_SFMT_LDR14, FR30BF_SFMT_LDR14UH, FR30BF_SFMT_LDR14UB
+// OBSOLETE  , FR30BF_SFMT_LDR15, FR30BF_SFMT_LDR15GR, FR30BF_SFMT_LDR15DR, FR30BF_SFMT_LDR15PS
+// OBSOLETE  , FR30BF_SFMT_ST, FR30BF_SFMT_STH, FR30BF_SFMT_STB, FR30BF_SFMT_STR13
+// OBSOLETE  , FR30BF_SFMT_STR13H, FR30BF_SFMT_STR13B, FR30BF_SFMT_STR14, FR30BF_SFMT_STR14H
+// OBSOLETE  , FR30BF_SFMT_STR14B, FR30BF_SFMT_STR15, FR30BF_SFMT_STR15GR, FR30BF_SFMT_STR15DR
+// OBSOLETE  , FR30BF_SFMT_STR15PS, FR30BF_SFMT_MOV, FR30BF_SFMT_MOVDR, FR30BF_SFMT_MOVPS
+// OBSOLETE  , FR30BF_SFMT_MOV2DR, FR30BF_SFMT_MOV2PS, FR30BF_SFMT_JMP, FR30BF_SFMT_CALLR
+// OBSOLETE  , FR30BF_SFMT_CALL, FR30BF_SFMT_RET, FR30BF_SFMT_INT, FR30BF_SFMT_INTE
+// OBSOLETE  , FR30BF_SFMT_RETI, FR30BF_SFMT_BRAD, FR30BF_SFMT_BNOD, FR30BF_SFMT_BEQD
+// OBSOLETE  , FR30BF_SFMT_BCD, FR30BF_SFMT_BND, FR30BF_SFMT_BVD, FR30BF_SFMT_BLTD
+// OBSOLETE  , FR30BF_SFMT_BLED, FR30BF_SFMT_BLSD, FR30BF_SFMT_DMOVR13, FR30BF_SFMT_DMOVR13H
+// OBSOLETE  , FR30BF_SFMT_DMOVR13B, FR30BF_SFMT_DMOVR13PI, FR30BF_SFMT_DMOVR13PIH, FR30BF_SFMT_DMOVR13PIB
+// OBSOLETE  , FR30BF_SFMT_DMOVR15PI, FR30BF_SFMT_DMOV2R13, FR30BF_SFMT_DMOV2R13H, FR30BF_SFMT_DMOV2R13B
+// OBSOLETE  , FR30BF_SFMT_DMOV2R13PI, FR30BF_SFMT_DMOV2R13PIH, FR30BF_SFMT_DMOV2R13PIB, FR30BF_SFMT_DMOV2R15PD
+// OBSOLETE  , FR30BF_SFMT_LDRES, FR30BF_SFMT_COPOP, FR30BF_SFMT_ANDCCR, FR30BF_SFMT_STILM
+// OBSOLETE  , FR30BF_SFMT_ADDSP, FR30BF_SFMT_EXTSB, FR30BF_SFMT_EXTUB, FR30BF_SFMT_EXTSH
+// OBSOLETE  , FR30BF_SFMT_EXTUH, FR30BF_SFMT_LDM0, FR30BF_SFMT_LDM1, FR30BF_SFMT_STM0
+// OBSOLETE  , FR30BF_SFMT_STM1, FR30BF_SFMT_ENTER, FR30BF_SFMT_LEAVE, FR30BF_SFMT_XCHB
+// OBSOLETE } FR30BF_SFMT_TYPE;
+// OBSOLETE 
+// OBSOLETE /* Function unit handlers (user written).  */
+// OBSOLETE 
+// OBSOLETE extern int fr30bf_model_fr30_1_u_stm (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*reglist*/);
+// OBSOLETE extern int fr30bf_model_fr30_1_u_ldm (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*reglist*/);
+// OBSOLETE extern int fr30bf_model_fr30_1_u_store (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/, INT /*Rj*/);
+// OBSOLETE extern int fr30bf_model_fr30_1_u_load (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Rj*/, INT /*Ri*/);
+// OBSOLETE extern int fr30bf_model_fr30_1_u_cti (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/);
+// OBSOLETE extern int fr30bf_model_fr30_1_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/, INT /*Ri*/, INT /*Rj*/, INT /*Ri*/);
+// OBSOLETE 
+// OBSOLETE /* Profiling before/after handlers (user written) */
+// OBSOLETE 
+// OBSOLETE extern void fr30bf_model_insn_before (SIM_CPU *, int /*first_p*/);
+// OBSOLETE extern void fr30bf_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
+// OBSOLETE 
+// OBSOLETE #endif /* FR30BF_DECODE_H */
diff --git a/sim/fr30/devices.c b/sim/fr30/devices.c
index a3d47cf..f99f35c 100644
--- a/sim/fr30/devices.c
+++ b/sim/fr30/devices.c
@@ -1,98 +1,98 @@
-/* fr30 device support
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of the GNU simulators.
-
-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.  */
-
-/* ??? All of this is just to get something going.  wip!  */
-
-#include "sim-main.h"
-
-#ifdef HAVE_DV_SOCKSER
-#include "dv-sockser.h"
-#endif
-
-device fr30_devices;
-
-int
-device_io_read_buffer (device *me, void *source, int space,
-		       address_word addr, unsigned nr_bytes,
-		       SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
-{
-  if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
-    return nr_bytes;
-
-#ifdef HAVE_DV_SOCKSER
-  if (addr == UART_INCHAR_ADDR)
-    {
-      int c = dv_sockser_read (sd);
-      if (c == -1)
-	return 0;
-      *(char *) source = c;
-      return 1;
-    }
-  if (addr == UART_STATUS_ADDR)
-    {
-      int status = dv_sockser_status (sd);
-      unsigned char *p = source;
-      p[0] = 0;
-      p[1] = (((status & DV_SOCKSER_INPUT_EMPTY)
-#ifdef UART_INPUT_READY0
-	       ? UART_INPUT_READY : 0)
-#else
-	       ? 0 : UART_INPUT_READY)
-#endif
-	      + ((status & DV_SOCKSER_OUTPUT_EMPTY) ? UART_OUTPUT_READY : 0));
-      return 2;
-    }
-#endif
-
-  return nr_bytes;
-}
-
-int
-device_io_write_buffer (device *me, const void *source, int space,
-			address_word addr, unsigned nr_bytes,
-			SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
-{
-#if WITH_SCACHE
-  if (addr == MCCR_ADDR)
-    {
-      if ((*(const char *) source & MCCR_CP) != 0)
-	scache_flush (sd);
-      return nr_bytes;
-    }
-#endif
-
-  if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
-    return nr_bytes;
-
-#if HAVE_DV_SOCKSER
-  if (addr == UART_OUTCHAR_ADDR)
-    {
-      int rc = dv_sockser_write (sd, *(char *) source);
-      return rc == 1;
-    }
-#endif
-
-  return nr_bytes;
-}
-
-void
-device_error (device *me, char *message, ...)
-{
-}
+// OBSOLETE /* fr30 device support
+// OBSOLETE    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Solutions.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE /* ??? All of this is just to get something going.  wip!  */
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE 
+// OBSOLETE #ifdef HAVE_DV_SOCKSER
+// OBSOLETE #include "dv-sockser.h"
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE device fr30_devices;
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE device_io_read_buffer (device *me, void *source, int space,
+// OBSOLETE 		       address_word addr, unsigned nr_bytes,
+// OBSOLETE 		       SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
+// OBSOLETE {
+// OBSOLETE   if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
+// OBSOLETE     return nr_bytes;
+// OBSOLETE 
+// OBSOLETE #ifdef HAVE_DV_SOCKSER
+// OBSOLETE   if (addr == UART_INCHAR_ADDR)
+// OBSOLETE     {
+// OBSOLETE       int c = dv_sockser_read (sd);
+// OBSOLETE       if (c == -1)
+// OBSOLETE 	return 0;
+// OBSOLETE       *(char *) source = c;
+// OBSOLETE       return 1;
+// OBSOLETE     }
+// OBSOLETE   if (addr == UART_STATUS_ADDR)
+// OBSOLETE     {
+// OBSOLETE       int status = dv_sockser_status (sd);
+// OBSOLETE       unsigned char *p = source;
+// OBSOLETE       p[0] = 0;
+// OBSOLETE       p[1] = (((status & DV_SOCKSER_INPUT_EMPTY)
+// OBSOLETE #ifdef UART_INPUT_READY0
+// OBSOLETE 	       ? UART_INPUT_READY : 0)
+// OBSOLETE #else
+// OBSOLETE 	       ? 0 : UART_INPUT_READY)
+// OBSOLETE #endif
+// OBSOLETE 	      + ((status & DV_SOCKSER_OUTPUT_EMPTY) ? UART_OUTPUT_READY : 0));
+// OBSOLETE       return 2;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   return nr_bytes;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE device_io_write_buffer (device *me, const void *source, int space,
+// OBSOLETE 			address_word addr, unsigned nr_bytes,
+// OBSOLETE 			SIM_DESC sd, SIM_CPU *cpu, sim_cia cia)
+// OBSOLETE {
+// OBSOLETE #if WITH_SCACHE
+// OBSOLETE   if (addr == MCCR_ADDR)
+// OBSOLETE     {
+// OBSOLETE       if ((*(const char *) source & MCCR_CP) != 0)
+// OBSOLETE 	scache_flush (sd);
+// OBSOLETE       return nr_bytes;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT)
+// OBSOLETE     return nr_bytes;
+// OBSOLETE 
+// OBSOLETE #if HAVE_DV_SOCKSER
+// OBSOLETE   if (addr == UART_OUTCHAR_ADDR)
+// OBSOLETE     {
+// OBSOLETE       int rc = dv_sockser_write (sd, *(char *) source);
+// OBSOLETE       return rc == 1;
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   return nr_bytes;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE device_error (device *me, char *message, ...)
+// OBSOLETE {
+// OBSOLETE }
diff --git a/sim/fr30/fr30-sim.h b/sim/fr30/fr30-sim.h
index dbb8117..f1d9109 100644
--- a/sim/fr30/fr30-sim.h
+++ b/sim/fr30/fr30-sim.h
@@ -1,96 +1,96 @@
-/* collection of junk waiting time to sort out
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of the GNU Simulators.
-
-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 FR30_SIM_H
-#define FR30_SIM_H
-
-/* gdb register numbers */
-#define PC_REGNUM	16
-#define PS_REGNUM	17
-#define TBR_REGNUM	18
-#define RP_REGNUM	19
-#define SSP_REGNUM	20
-#define USP_REGNUM	21
-#define MDH_REGNUM	22
-#define MDL_REGNUM	23
-
-extern BI fr30bf_h_sbit_get_handler (SIM_CPU *);
-extern void fr30bf_h_sbit_set_handler (SIM_CPU *, BI);
-
-extern UQI fr30bf_h_ccr_get_handler (SIM_CPU *);
-extern void fr30bf_h_ccr_set_handler (SIM_CPU *, UQI);
-
-extern UQI fr30bf_h_scr_get_handler (SIM_CPU *);
-extern void fr30bf_h_scr_set_handler (SIM_CPU *, UQI);
-
-extern UQI fr30bf_h_ilm_get_handler (SIM_CPU *);
-extern void fr30bf_h_ilm_set_handler (SIM_CPU *, UQI);
-
-extern USI fr30bf_h_ps_get_handler (SIM_CPU *);
-extern void fr30bf_h_ps_set_handler (SIM_CPU *, USI);
-
-extern SI fr30bf_h_dr_get_handler (SIM_CPU *, UINT);
-extern void fr30bf_h_dr_set_handler (SIM_CPU *, UINT, SI);
-
-#define GETTWI GETTSI
-#define SETTWI SETTSI
-
-/* Hardware/device support.
-   ??? Will eventually want to move device stuff to config files.  */
-
-/* Special purpose traps.  */
-#define TRAP_SYSCALL	10
-#define TRAP_BREAKPOINT	9
-
-/* Support for the MCCR register (Cache Control Register) is needed in order
-   for overlays to work correctly with the scache: cached instructions need
-   to be flushed when the instruction space is changed at runtime.  */
-
-/* Cache Control Register */
-#define MCCR_ADDR 0xffffffff
-#define MCCR_CP 0x80
-/* not supported */
-#define MCCR_CM0 2
-#define MCCR_CM1 1
-
-/* Serial device addresses.  */
-/* These are the values for the MSA2000 board.
-   ??? Will eventually need to move this to a config file.  */
-#define UART_INCHAR_ADDR	0xff004009
-#define UART_OUTCHAR_ADDR	0xff004007
-#define UART_STATUS_ADDR	0xff004002
-
-#define UART_INPUT_READY	0x4
-#define UART_OUTPUT_READY	0x1
-
-/* Start address and length of all device support.  */
-#define FR30_DEVICE_ADDR	0xff000000
-#define FR30_DEVICE_LEN		0x00ffffff
-
-/* sim_core_attach device argument.  */
-extern device fr30_devices;
-
-/* FIXME: Temporary, until device support ready.  */
-struct _device { int foo; };
-
-/* Handle the trap insn.  */
-USI fr30_int (SIM_CPU *, PCADDR, int);
-
-#endif /* FR30_SIM_H */
+// OBSOLETE /* collection of junk waiting time to sort out
+// OBSOLETE    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Solutions.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU Simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #ifndef FR30_SIM_H
+// OBSOLETE #define FR30_SIM_H
+// OBSOLETE 
+// OBSOLETE /* gdb register numbers */
+// OBSOLETE #define PC_REGNUM	16
+// OBSOLETE #define PS_REGNUM	17
+// OBSOLETE #define TBR_REGNUM	18
+// OBSOLETE #define RP_REGNUM	19
+// OBSOLETE #define SSP_REGNUM	20
+// OBSOLETE #define USP_REGNUM	21
+// OBSOLETE #define MDH_REGNUM	22
+// OBSOLETE #define MDL_REGNUM	23
+// OBSOLETE 
+// OBSOLETE extern BI fr30bf_h_sbit_get_handler (SIM_CPU *);
+// OBSOLETE extern void fr30bf_h_sbit_set_handler (SIM_CPU *, BI);
+// OBSOLETE 
+// OBSOLETE extern UQI fr30bf_h_ccr_get_handler (SIM_CPU *);
+// OBSOLETE extern void fr30bf_h_ccr_set_handler (SIM_CPU *, UQI);
+// OBSOLETE 
+// OBSOLETE extern UQI fr30bf_h_scr_get_handler (SIM_CPU *);
+// OBSOLETE extern void fr30bf_h_scr_set_handler (SIM_CPU *, UQI);
+// OBSOLETE 
+// OBSOLETE extern UQI fr30bf_h_ilm_get_handler (SIM_CPU *);
+// OBSOLETE extern void fr30bf_h_ilm_set_handler (SIM_CPU *, UQI);
+// OBSOLETE 
+// OBSOLETE extern USI fr30bf_h_ps_get_handler (SIM_CPU *);
+// OBSOLETE extern void fr30bf_h_ps_set_handler (SIM_CPU *, USI);
+// OBSOLETE 
+// OBSOLETE extern SI fr30bf_h_dr_get_handler (SIM_CPU *, UINT);
+// OBSOLETE extern void fr30bf_h_dr_set_handler (SIM_CPU *, UINT, SI);
+// OBSOLETE 
+// OBSOLETE #define GETTWI GETTSI
+// OBSOLETE #define SETTWI SETTSI
+// OBSOLETE 
+// OBSOLETE /* Hardware/device support.
+// OBSOLETE    ??? Will eventually want to move device stuff to config files.  */
+// OBSOLETE 
+// OBSOLETE /* Special purpose traps.  */
+// OBSOLETE #define TRAP_SYSCALL	10
+// OBSOLETE #define TRAP_BREAKPOINT	9
+// OBSOLETE 
+// OBSOLETE /* Support for the MCCR register (Cache Control Register) is needed in order
+// OBSOLETE    for overlays to work correctly with the scache: cached instructions need
+// OBSOLETE    to be flushed when the instruction space is changed at runtime.  */
+// OBSOLETE 
+// OBSOLETE /* Cache Control Register */
+// OBSOLETE #define MCCR_ADDR 0xffffffff
+// OBSOLETE #define MCCR_CP 0x80
+// OBSOLETE /* not supported */
+// OBSOLETE #define MCCR_CM0 2
+// OBSOLETE #define MCCR_CM1 1
+// OBSOLETE 
+// OBSOLETE /* Serial device addresses.  */
+// OBSOLETE /* These are the values for the MSA2000 board.
+// OBSOLETE    ??? Will eventually need to move this to a config file.  */
+// OBSOLETE #define UART_INCHAR_ADDR	0xff004009
+// OBSOLETE #define UART_OUTCHAR_ADDR	0xff004007
+// OBSOLETE #define UART_STATUS_ADDR	0xff004002
+// OBSOLETE 
+// OBSOLETE #define UART_INPUT_READY	0x4
+// OBSOLETE #define UART_OUTPUT_READY	0x1
+// OBSOLETE 
+// OBSOLETE /* Start address and length of all device support.  */
+// OBSOLETE #define FR30_DEVICE_ADDR	0xff000000
+// OBSOLETE #define FR30_DEVICE_LEN		0x00ffffff
+// OBSOLETE 
+// OBSOLETE /* sim_core_attach device argument.  */
+// OBSOLETE extern device fr30_devices;
+// OBSOLETE 
+// OBSOLETE /* FIXME: Temporary, until device support ready.  */
+// OBSOLETE struct _device { int foo; };
+// OBSOLETE 
+// OBSOLETE /* Handle the trap insn.  */
+// OBSOLETE USI fr30_int (SIM_CPU *, PCADDR, int);
+// OBSOLETE 
+// OBSOLETE #endif /* FR30_SIM_H */
diff --git a/sim/fr30/fr30.c b/sim/fr30/fr30.c
index 5133654..835ca9a 100644
--- a/sim/fr30/fr30.c
+++ b/sim/fr30/fr30.c
@@ -1,423 +1,423 @@
-/* fr30 simulator support code
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of the GNU simulators.
-
-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.  */
-
-#define WANT_CPU
-#define WANT_CPU_FR30BF
-
-#include "sim-main.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-
-/* Convert gdb dedicated register number to actual dr reg number.  */
-
-static int
-decode_gdb_dr_regnum (int gdb_regnum)
-{
-  switch (gdb_regnum)
-    {
-    case TBR_REGNUM : return H_DR_TBR;
-    case RP_REGNUM : return H_DR_RP;
-    case SSP_REGNUM : return H_DR_SSP;
-    case USP_REGNUM : return H_DR_USP;
-    case MDH_REGNUM : return H_DR_MDH;
-    case MDL_REGNUM : return H_DR_MDL;
-    }
-  abort ();
-}
-
-/* The contents of BUF are in target byte order.  */
-
-int
-fr30bf_fetch_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
-{
-  if (rn < 16)
-    SETTWI (buf, fr30bf_h_gr_get (current_cpu, rn));
-  else
-    switch (rn)
-      {
-      case PC_REGNUM :
-	SETTWI (buf, fr30bf_h_pc_get (current_cpu));
-	break;
-      case PS_REGNUM :
-	SETTWI (buf, fr30bf_h_ps_get (current_cpu));
-	break;
-      case TBR_REGNUM :
-      case RP_REGNUM :
-      case SSP_REGNUM :
-      case USP_REGNUM :
-      case MDH_REGNUM :
-      case MDL_REGNUM :
-	SETTWI (buf, fr30bf_h_dr_get (current_cpu,
-				      decode_gdb_dr_regnum (rn)));
-	break;
-      default :
-	return 0;
-      }
-
-  return -1; /*FIXME*/
-}
-
-/* The contents of BUF are in target byte order.  */
-
-int
-fr30bf_store_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
-{
-  if (rn < 16)
-    fr30bf_h_gr_set (current_cpu, rn, GETTWI (buf));
-  else
-    switch (rn)
-      {
-      case PC_REGNUM :
-	fr30bf_h_pc_set (current_cpu, GETTWI (buf));
-	break;
-      case PS_REGNUM :
-	fr30bf_h_ps_set (current_cpu, GETTWI (buf));
-	break;
-      case TBR_REGNUM :
-      case RP_REGNUM :
-      case SSP_REGNUM :
-      case USP_REGNUM :
-      case MDH_REGNUM :
-      case MDL_REGNUM :
-	fr30bf_h_dr_set (current_cpu,
-			 decode_gdb_dr_regnum (rn),
-			 GETTWI (buf));
-	break;
-      default :
-	return 0;
-      }
-
-  return -1; /*FIXME*/
-}
-
-/* Cover fns to access the ccr bits.  */
-
-BI
-fr30bf_h_sbit_get_handler (SIM_CPU *current_cpu)
-{
-  return CPU (h_sbit);
-}
-
-void
-fr30bf_h_sbit_set_handler (SIM_CPU *current_cpu, BI newval)
-{
-  int old_sbit = CPU (h_sbit);
-  int new_sbit = (newval != 0);
-
-  CPU (h_sbit) = new_sbit;
-
-  /* When switching stack modes, update the registers.  */
-  if (old_sbit != new_sbit)
-    {
-      if (old_sbit)
-	{
-	  /* Switching user -> system.  */
-	  CPU (h_dr[H_DR_USP]) = CPU (h_gr[H_GR_SP]);
-	  CPU (h_gr[H_GR_SP]) = CPU (h_dr[H_DR_SSP]);
-	}
-      else
-	{
-	  /* Switching system -> user.  */
-	  CPU (h_dr[H_DR_SSP]) = CPU (h_gr[H_GR_SP]);
-	  CPU (h_gr[H_GR_SP]) = CPU (h_dr[H_DR_USP]);
-	}
-    }
-
-  /* TODO: r15 interlock */
-}
-
-/* Cover fns to access the ccr bits.  */
-
-UQI
-fr30bf_h_ccr_get_handler (SIM_CPU *current_cpu)
-{
-  int ccr = (  (GET_H_CBIT () << 0)
-	     | (GET_H_VBIT () << 1)
-	     | (GET_H_ZBIT () << 2)
-	     | (GET_H_NBIT () << 3)
-	     | (GET_H_IBIT () << 4)
-	     | (GET_H_SBIT () << 5));
-
-  return ccr;
-}
-
-void
-fr30bf_h_ccr_set_handler (SIM_CPU *current_cpu, UQI newval)
-{
-  int ccr = newval & 0x3f;
-
-  SET_H_CBIT ((ccr & 1) != 0);
-  SET_H_VBIT ((ccr & 2) != 0);
-  SET_H_ZBIT ((ccr & 4) != 0);
-  SET_H_NBIT ((ccr & 8) != 0);
-  SET_H_IBIT ((ccr & 0x10) != 0);
-  SET_H_SBIT ((ccr & 0x20) != 0);
-}
-
-/* Cover fns to access the scr bits.  */
-
-UQI
-fr30bf_h_scr_get_handler (SIM_CPU *current_cpu)
-{
-  int scr = (  (GET_H_TBIT () << 0)
-	     | (GET_H_D0BIT () << 1)
-	     | (GET_H_D1BIT () << 2));
-  return scr;
-}
-
-void
-fr30bf_h_scr_set_handler (SIM_CPU *current_cpu, UQI newval)
-{
-  int scr = newval & 7;
-
-  SET_H_TBIT  ((scr & 1) != 0);
-  SET_H_D0BIT ((scr & 2) != 0);
-  SET_H_D1BIT ((scr & 4) != 0);
-}
-
-/* Cover fns to access the ilm bits.  */
-
-UQI
-fr30bf_h_ilm_get_handler (SIM_CPU *current_cpu)
-{
-  return CPU (h_ilm);
-}
-
-void
-fr30bf_h_ilm_set_handler (SIM_CPU *current_cpu, UQI newval)
-{
-  int ilm = newval & 0x1f;
-  int current_ilm = CPU (h_ilm);
-
-  /* We can only set new ilm values < 16 if the current ilm is < 16.  Otherwise
-     we add 16 to the value we are given.  */
-  if (current_ilm >= 16 && ilm < 16)
-    ilm += 16;
-
-  CPU (h_ilm) = ilm;
-}
-
-/* Cover fns to access the ps register.  */
-
-USI
-fr30bf_h_ps_get_handler (SIM_CPU *current_cpu)
-{
-  int ccr = GET_H_CCR ();
-  int scr = GET_H_SCR ();
-  int ilm = GET_H_ILM ();
-
-  return ccr | (scr << 8) | (ilm << 16);
-}
-
-void
-fr30bf_h_ps_set_handler (SIM_CPU *current_cpu, USI newval)
-{
-  int ccr = newval & 0xff;
-  int scr = (newval >> 8) & 7;
-  int ilm = (newval >> 16) & 0x1f;
-
-  SET_H_CCR (ccr);
-  SET_H_SCR (scr);
-  SET_H_ILM (ilm);
-}
-
-/* Cover fns to access the dedicated registers.  */
-
-SI
-fr30bf_h_dr_get_handler (SIM_CPU *current_cpu, UINT dr)
-{
-  switch (dr)
-    {
-    case H_DR_SSP :
-      if (! GET_H_SBIT ())
-	return GET_H_GR (H_GR_SP);
-      else
-	return CPU (h_dr[H_DR_SSP]);
-    case H_DR_USP :
-      if (GET_H_SBIT ())
-	return GET_H_GR (H_GR_SP);
-      else
-	return CPU (h_dr[H_DR_USP]);
-    case H_DR_TBR :
-    case H_DR_RP :
-    case H_DR_MDH :
-    case H_DR_MDL :
-      return CPU (h_dr[dr]);
-    }
-  return 0;
-}
-
-void
-fr30bf_h_dr_set_handler (SIM_CPU *current_cpu, UINT dr, SI newval)
-{
-  switch (dr)
-    {
-    case H_DR_SSP :
-      if (! GET_H_SBIT ())
-	SET_H_GR (H_GR_SP, newval);
-      else
-	CPU (h_dr[H_DR_SSP]) = newval;
-      break;
-    case H_DR_USP :
-      if (GET_H_SBIT ())
-	SET_H_GR (H_GR_SP, newval);
-      else
-	CPU (h_dr[H_DR_USP]) = newval;
-      break;
-    case H_DR_TBR :
-    case H_DR_RP :
-    case H_DR_MDH :
-    case H_DR_MDL :
-      CPU (h_dr[dr]) = newval;
-      break;
-    }
-}
-
-#if WITH_PROFILE_MODEL_P
-
-/* FIXME: Some of these should be inline or macros.  Later.  */
-
-/* Initialize cycle counting for an insn.
-   FIRST_P is non-zero if this is the first insn in a set of parallel
-   insns.  */
-
-void
-fr30bf_model_insn_before (SIM_CPU *cpu, int first_p)
-{
-  MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
-  d->load_regs_pending = 0;
-}
-
-/* Record the cycles computed for an insn.
-   LAST_P is non-zero if this is the last insn in a set of parallel insns,
-   and we update the total cycle count.
-   CYCLES is the cycle count of the insn.  */
-
-void
-fr30bf_model_insn_after (SIM_CPU *cpu, int last_p, int cycles)
-{
-  PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
-  MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
-
-  PROFILE_MODEL_TOTAL_CYCLES (p) += cycles;
-  PROFILE_MODEL_CUR_INSN_CYCLES (p) = cycles;
-  d->load_regs = d->load_regs_pending;
-}
-
-static INLINE int
-check_load_stall (SIM_CPU *cpu, int regno)
-{
-  const MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
-  UINT load_regs = d->load_regs;
-
-  if (regno != -1
-      && (load_regs & (1 << regno)) != 0)
-    {
-      PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
-      ++ PROFILE_MODEL_LOAD_STALL_CYCLES (p);
-      if (TRACE_INSN_P (cpu))
-	cgen_trace_printf (cpu, " ; Load stall.");
-      return 1;
-    }
-  else
-    return 0;
-}
-
-int
-fr30bf_model_fr30_1_u_exec (SIM_CPU *cpu, const IDESC *idesc,
-			    int unit_num, int referenced,
-			    INT in_Ri, INT in_Rj, INT out_Ri)
-{
-  int cycles = idesc->timing->units[unit_num].done;
-  cycles += check_load_stall (cpu, in_Ri);
-  cycles += check_load_stall (cpu, in_Rj);
-  return cycles;
-}
-
-int
-fr30bf_model_fr30_1_u_cti (SIM_CPU *cpu, const IDESC *idesc,
-			   int unit_num, int referenced,
-			   INT in_Ri)
-{
-  PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
-  /* (1 << 1): The pc is the 2nd element in inputs, outputs.
-     ??? can be cleaned up */
-  int taken_p = (referenced & (1 << 1)) != 0;
-  int cycles = idesc->timing->units[unit_num].done;
-  int delay_slot_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT);
-
-  cycles += check_load_stall (cpu, in_Ri);
-  if (taken_p)
-    {
-      /* ??? Handling cti's without delay slots this way will run afoul of
-	 accurate system simulation.  Later.  */
-      if (! delay_slot_p)
-	{
-	  ++cycles;
-	  ++PROFILE_MODEL_CTI_STALL_CYCLES (p);
-	}
-      ++PROFILE_MODEL_TAKEN_COUNT (p);
-    }
-  else
-    ++PROFILE_MODEL_UNTAKEN_COUNT (p);
-
-  return cycles;
-}
-
-int
-fr30bf_model_fr30_1_u_load (SIM_CPU *cpu, const IDESC *idesc,
-			    int unit_num, int referenced,
-			    INT in_Rj, INT out_Ri)
-{
-  MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
-  int cycles = idesc->timing->units[unit_num].done;
-  d->load_regs_pending |= 1 << out_Ri;
-  cycles += check_load_stall (cpu, in_Rj);
-  return cycles;
-}
-
-int
-fr30bf_model_fr30_1_u_store (SIM_CPU *cpu, const IDESC *idesc,
-			     int unit_num, int referenced,
-			     INT in_Ri, INT in_Rj)
-{
-  int cycles = idesc->timing->units[unit_num].done;
-  cycles += check_load_stall (cpu, in_Ri);
-  cycles += check_load_stall (cpu, in_Rj);
-  return cycles;
-}
-
-int
-fr30bf_model_fr30_1_u_ldm (SIM_CPU *cpu, const IDESC *idesc,
-			   int unit_num, int referenced,
-			   INT reglist)
-{
-  return idesc->timing->units[unit_num].done;
-}
-
-int
-fr30bf_model_fr30_1_u_stm (SIM_CPU *cpu, const IDESC *idesc,
-			   int unit_num, int referenced,
-			   INT reglist)
-{
-  return idesc->timing->units[unit_num].done;
-}
-
-#endif /* WITH_PROFILE_MODEL_P */
+// OBSOLETE /* fr30 simulator support code
+// OBSOLETE    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Solutions.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #define WANT_CPU
+// OBSOLETE #define WANT_CPU_FR30BF
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "cgen-mem.h"
+// OBSOLETE #include "cgen-ops.h"
+// OBSOLETE 
+// OBSOLETE /* Convert gdb dedicated register number to actual dr reg number.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE decode_gdb_dr_regnum (int gdb_regnum)
+// OBSOLETE {
+// OBSOLETE   switch (gdb_regnum)
+// OBSOLETE     {
+// OBSOLETE     case TBR_REGNUM : return H_DR_TBR;
+// OBSOLETE     case RP_REGNUM : return H_DR_RP;
+// OBSOLETE     case SSP_REGNUM : return H_DR_SSP;
+// OBSOLETE     case USP_REGNUM : return H_DR_USP;
+// OBSOLETE     case MDH_REGNUM : return H_DR_MDH;
+// OBSOLETE     case MDL_REGNUM : return H_DR_MDL;
+// OBSOLETE     }
+// OBSOLETE   abort ();
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* The contents of BUF are in target byte order.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_fetch_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
+// OBSOLETE {
+// OBSOLETE   if (rn < 16)
+// OBSOLETE     SETTWI (buf, fr30bf_h_gr_get (current_cpu, rn));
+// OBSOLETE   else
+// OBSOLETE     switch (rn)
+// OBSOLETE       {
+// OBSOLETE       case PC_REGNUM :
+// OBSOLETE 	SETTWI (buf, fr30bf_h_pc_get (current_cpu));
+// OBSOLETE 	break;
+// OBSOLETE       case PS_REGNUM :
+// OBSOLETE 	SETTWI (buf, fr30bf_h_ps_get (current_cpu));
+// OBSOLETE 	break;
+// OBSOLETE       case TBR_REGNUM :
+// OBSOLETE       case RP_REGNUM :
+// OBSOLETE       case SSP_REGNUM :
+// OBSOLETE       case USP_REGNUM :
+// OBSOLETE       case MDH_REGNUM :
+// OBSOLETE       case MDL_REGNUM :
+// OBSOLETE 	SETTWI (buf, fr30bf_h_dr_get (current_cpu,
+// OBSOLETE 				      decode_gdb_dr_regnum (rn)));
+// OBSOLETE 	break;
+// OBSOLETE       default :
+// OBSOLETE 	return 0;
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE   return -1; /*FIXME*/
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* The contents of BUF are in target byte order.  */
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_store_register (SIM_CPU *current_cpu, int rn, unsigned char *buf, int len)
+// OBSOLETE {
+// OBSOLETE   if (rn < 16)
+// OBSOLETE     fr30bf_h_gr_set (current_cpu, rn, GETTWI (buf));
+// OBSOLETE   else
+// OBSOLETE     switch (rn)
+// OBSOLETE       {
+// OBSOLETE       case PC_REGNUM :
+// OBSOLETE 	fr30bf_h_pc_set (current_cpu, GETTWI (buf));
+// OBSOLETE 	break;
+// OBSOLETE       case PS_REGNUM :
+// OBSOLETE 	fr30bf_h_ps_set (current_cpu, GETTWI (buf));
+// OBSOLETE 	break;
+// OBSOLETE       case TBR_REGNUM :
+// OBSOLETE       case RP_REGNUM :
+// OBSOLETE       case SSP_REGNUM :
+// OBSOLETE       case USP_REGNUM :
+// OBSOLETE       case MDH_REGNUM :
+// OBSOLETE       case MDL_REGNUM :
+// OBSOLETE 	fr30bf_h_dr_set (current_cpu,
+// OBSOLETE 			 decode_gdb_dr_regnum (rn),
+// OBSOLETE 			 GETTWI (buf));
+// OBSOLETE 	break;
+// OBSOLETE       default :
+// OBSOLETE 	return 0;
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE   return -1; /*FIXME*/
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the ccr bits.  */
+// OBSOLETE 
+// OBSOLETE BI
+// OBSOLETE fr30bf_h_sbit_get_handler (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_sbit);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_sbit_set_handler (SIM_CPU *current_cpu, BI newval)
+// OBSOLETE {
+// OBSOLETE   int old_sbit = CPU (h_sbit);
+// OBSOLETE   int new_sbit = (newval != 0);
+// OBSOLETE 
+// OBSOLETE   CPU (h_sbit) = new_sbit;
+// OBSOLETE 
+// OBSOLETE   /* When switching stack modes, update the registers.  */
+// OBSOLETE   if (old_sbit != new_sbit)
+// OBSOLETE     {
+// OBSOLETE       if (old_sbit)
+// OBSOLETE 	{
+// OBSOLETE 	  /* Switching user -> system.  */
+// OBSOLETE 	  CPU (h_dr[H_DR_USP]) = CPU (h_gr[H_GR_SP]);
+// OBSOLETE 	  CPU (h_gr[H_GR_SP]) = CPU (h_dr[H_DR_SSP]);
+// OBSOLETE 	}
+// OBSOLETE       else
+// OBSOLETE 	{
+// OBSOLETE 	  /* Switching system -> user.  */
+// OBSOLETE 	  CPU (h_dr[H_DR_SSP]) = CPU (h_gr[H_GR_SP]);
+// OBSOLETE 	  CPU (h_gr[H_GR_SP]) = CPU (h_dr[H_DR_USP]);
+// OBSOLETE 	}
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* TODO: r15 interlock */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the ccr bits.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_ccr_get_handler (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   int ccr = (  (GET_H_CBIT () << 0)
+// OBSOLETE 	     | (GET_H_VBIT () << 1)
+// OBSOLETE 	     | (GET_H_ZBIT () << 2)
+// OBSOLETE 	     | (GET_H_NBIT () << 3)
+// OBSOLETE 	     | (GET_H_IBIT () << 4)
+// OBSOLETE 	     | (GET_H_SBIT () << 5));
+// OBSOLETE 
+// OBSOLETE   return ccr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ccr_set_handler (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   int ccr = newval & 0x3f;
+// OBSOLETE 
+// OBSOLETE   SET_H_CBIT ((ccr & 1) != 0);
+// OBSOLETE   SET_H_VBIT ((ccr & 2) != 0);
+// OBSOLETE   SET_H_ZBIT ((ccr & 4) != 0);
+// OBSOLETE   SET_H_NBIT ((ccr & 8) != 0);
+// OBSOLETE   SET_H_IBIT ((ccr & 0x10) != 0);
+// OBSOLETE   SET_H_SBIT ((ccr & 0x20) != 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the scr bits.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_scr_get_handler (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   int scr = (  (GET_H_TBIT () << 0)
+// OBSOLETE 	     | (GET_H_D0BIT () << 1)
+// OBSOLETE 	     | (GET_H_D1BIT () << 2));
+// OBSOLETE   return scr;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_scr_set_handler (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   int scr = newval & 7;
+// OBSOLETE 
+// OBSOLETE   SET_H_TBIT  ((scr & 1) != 0);
+// OBSOLETE   SET_H_D0BIT ((scr & 2) != 0);
+// OBSOLETE   SET_H_D1BIT ((scr & 4) != 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the ilm bits.  */
+// OBSOLETE 
+// OBSOLETE UQI
+// OBSOLETE fr30bf_h_ilm_get_handler (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   return CPU (h_ilm);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ilm_set_handler (SIM_CPU *current_cpu, UQI newval)
+// OBSOLETE {
+// OBSOLETE   int ilm = newval & 0x1f;
+// OBSOLETE   int current_ilm = CPU (h_ilm);
+// OBSOLETE 
+// OBSOLETE   /* We can only set new ilm values < 16 if the current ilm is < 16.  Otherwise
+// OBSOLETE      we add 16 to the value we are given.  */
+// OBSOLETE   if (current_ilm >= 16 && ilm < 16)
+// OBSOLETE     ilm += 16;
+// OBSOLETE 
+// OBSOLETE   CPU (h_ilm) = ilm;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the ps register.  */
+// OBSOLETE 
+// OBSOLETE USI
+// OBSOLETE fr30bf_h_ps_get_handler (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   int ccr = GET_H_CCR ();
+// OBSOLETE   int scr = GET_H_SCR ();
+// OBSOLETE   int ilm = GET_H_ILM ();
+// OBSOLETE 
+// OBSOLETE   return ccr | (scr << 8) | (ilm << 16);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_ps_set_handler (SIM_CPU *current_cpu, USI newval)
+// OBSOLETE {
+// OBSOLETE   int ccr = newval & 0xff;
+// OBSOLETE   int scr = (newval >> 8) & 7;
+// OBSOLETE   int ilm = (newval >> 16) & 0x1f;
+// OBSOLETE 
+// OBSOLETE   SET_H_CCR (ccr);
+// OBSOLETE   SET_H_SCR (scr);
+// OBSOLETE   SET_H_ILM (ilm);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Cover fns to access the dedicated registers.  */
+// OBSOLETE 
+// OBSOLETE SI
+// OBSOLETE fr30bf_h_dr_get_handler (SIM_CPU *current_cpu, UINT dr)
+// OBSOLETE {
+// OBSOLETE   switch (dr)
+// OBSOLETE     {
+// OBSOLETE     case H_DR_SSP :
+// OBSOLETE       if (! GET_H_SBIT ())
+// OBSOLETE 	return GET_H_GR (H_GR_SP);
+// OBSOLETE       else
+// OBSOLETE 	return CPU (h_dr[H_DR_SSP]);
+// OBSOLETE     case H_DR_USP :
+// OBSOLETE       if (GET_H_SBIT ())
+// OBSOLETE 	return GET_H_GR (H_GR_SP);
+// OBSOLETE       else
+// OBSOLETE 	return CPU (h_dr[H_DR_USP]);
+// OBSOLETE     case H_DR_TBR :
+// OBSOLETE     case H_DR_RP :
+// OBSOLETE     case H_DR_MDH :
+// OBSOLETE     case H_DR_MDL :
+// OBSOLETE       return CPU (h_dr[dr]);
+// OBSOLETE     }
+// OBSOLETE   return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_h_dr_set_handler (SIM_CPU *current_cpu, UINT dr, SI newval)
+// OBSOLETE {
+// OBSOLETE   switch (dr)
+// OBSOLETE     {
+// OBSOLETE     case H_DR_SSP :
+// OBSOLETE       if (! GET_H_SBIT ())
+// OBSOLETE 	SET_H_GR (H_GR_SP, newval);
+// OBSOLETE       else
+// OBSOLETE 	CPU (h_dr[H_DR_SSP]) = newval;
+// OBSOLETE       break;
+// OBSOLETE     case H_DR_USP :
+// OBSOLETE       if (GET_H_SBIT ())
+// OBSOLETE 	SET_H_GR (H_GR_SP, newval);
+// OBSOLETE       else
+// OBSOLETE 	CPU (h_dr[H_DR_USP]) = newval;
+// OBSOLETE       break;
+// OBSOLETE     case H_DR_TBR :
+// OBSOLETE     case H_DR_RP :
+// OBSOLETE     case H_DR_MDH :
+// OBSOLETE     case H_DR_MDL :
+// OBSOLETE       CPU (h_dr[dr]) = newval;
+// OBSOLETE       break;
+// OBSOLETE     }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE 
+// OBSOLETE /* FIXME: Some of these should be inline or macros.  Later.  */
+// OBSOLETE 
+// OBSOLETE /* Initialize cycle counting for an insn.
+// OBSOLETE    FIRST_P is non-zero if this is the first insn in a set of parallel
+// OBSOLETE    insns.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_model_insn_before (SIM_CPU *cpu, int first_p)
+// OBSOLETE {
+// OBSOLETE   MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
+// OBSOLETE   d->load_regs_pending = 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Record the cycles computed for an insn.
+// OBSOLETE    LAST_P is non-zero if this is the last insn in a set of parallel insns,
+// OBSOLETE    and we update the total cycle count.
+// OBSOLETE    CYCLES is the cycle count of the insn.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30bf_model_insn_after (SIM_CPU *cpu, int last_p, int cycles)
+// OBSOLETE {
+// OBSOLETE   PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
+// OBSOLETE   MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
+// OBSOLETE 
+// OBSOLETE   PROFILE_MODEL_TOTAL_CYCLES (p) += cycles;
+// OBSOLETE   PROFILE_MODEL_CUR_INSN_CYCLES (p) = cycles;
+// OBSOLETE   d->load_regs = d->load_regs_pending;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static INLINE int
+// OBSOLETE check_load_stall (SIM_CPU *cpu, int regno)
+// OBSOLETE {
+// OBSOLETE   const MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
+// OBSOLETE   UINT load_regs = d->load_regs;
+// OBSOLETE 
+// OBSOLETE   if (regno != -1
+// OBSOLETE       && (load_regs & (1 << regno)) != 0)
+// OBSOLETE     {
+// OBSOLETE       PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
+// OBSOLETE       ++ PROFILE_MODEL_LOAD_STALL_CYCLES (p);
+// OBSOLETE       if (TRACE_INSN_P (cpu))
+// OBSOLETE 	cgen_trace_printf (cpu, " ; Load stall.");
+// OBSOLETE       return 1;
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     return 0;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_exec (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			    int unit_num, int referenced,
+// OBSOLETE 			    INT in_Ri, INT in_Rj, INT out_Ri)
+// OBSOLETE {
+// OBSOLETE   int cycles = idesc->timing->units[unit_num].done;
+// OBSOLETE   cycles += check_load_stall (cpu, in_Ri);
+// OBSOLETE   cycles += check_load_stall (cpu, in_Rj);
+// OBSOLETE   return cycles;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_cti (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			   int unit_num, int referenced,
+// OBSOLETE 			   INT in_Ri)
+// OBSOLETE {
+// OBSOLETE   PROFILE_DATA *p = CPU_PROFILE_DATA (cpu);
+// OBSOLETE   /* (1 << 1): The pc is the 2nd element in inputs, outputs.
+// OBSOLETE      ??? can be cleaned up */
+// OBSOLETE   int taken_p = (referenced & (1 << 1)) != 0;
+// OBSOLETE   int cycles = idesc->timing->units[unit_num].done;
+// OBSOLETE   int delay_slot_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT);
+// OBSOLETE 
+// OBSOLETE   cycles += check_load_stall (cpu, in_Ri);
+// OBSOLETE   if (taken_p)
+// OBSOLETE     {
+// OBSOLETE       /* ??? Handling cti's without delay slots this way will run afoul of
+// OBSOLETE 	 accurate system simulation.  Later.  */
+// OBSOLETE       if (! delay_slot_p)
+// OBSOLETE 	{
+// OBSOLETE 	  ++cycles;
+// OBSOLETE 	  ++PROFILE_MODEL_CTI_STALL_CYCLES (p);
+// OBSOLETE 	}
+// OBSOLETE       ++PROFILE_MODEL_TAKEN_COUNT (p);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE     ++PROFILE_MODEL_UNTAKEN_COUNT (p);
+// OBSOLETE 
+// OBSOLETE   return cycles;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_load (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			    int unit_num, int referenced,
+// OBSOLETE 			    INT in_Rj, INT out_Ri)
+// OBSOLETE {
+// OBSOLETE   MODEL_FR30_1_DATA *d = CPU_MODEL_DATA (cpu);
+// OBSOLETE   int cycles = idesc->timing->units[unit_num].done;
+// OBSOLETE   d->load_regs_pending |= 1 << out_Ri;
+// OBSOLETE   cycles += check_load_stall (cpu, in_Rj);
+// OBSOLETE   return cycles;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_store (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			     int unit_num, int referenced,
+// OBSOLETE 			     INT in_Ri, INT in_Rj)
+// OBSOLETE {
+// OBSOLETE   int cycles = idesc->timing->units[unit_num].done;
+// OBSOLETE   cycles += check_load_stall (cpu, in_Ri);
+// OBSOLETE   cycles += check_load_stall (cpu, in_Rj);
+// OBSOLETE   return cycles;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_ldm (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			   int unit_num, int referenced,
+// OBSOLETE 			   INT reglist)
+// OBSOLETE {
+// OBSOLETE   return idesc->timing->units[unit_num].done;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE int
+// OBSOLETE fr30bf_model_fr30_1_u_stm (SIM_CPU *cpu, const IDESC *idesc,
+// OBSOLETE 			   int unit_num, int referenced,
+// OBSOLETE 			   INT reglist)
+// OBSOLETE {
+// OBSOLETE   return idesc->timing->units[unit_num].done;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #endif /* WITH_PROFILE_MODEL_P */
diff --git a/sim/fr30/mloop.in b/sim/fr30/mloop.in
index 1a82d83..f161bb1 100644
--- a/sim/fr30/mloop.in
+++ b/sim/fr30/mloop.in
@@ -1,236 +1,236 @@
-# Simulator main loop for fr30. -*- C -*-
-# Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-# Contributed by Cygnus Solutions.
-#
-# This file is part of the GNU Simulators.
-#
-# 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.
-
-# Syntax:
-# /bin/sh mainloop.in command
-#
-# Command is one of:
-#
-# init
-# support
-# extract-{simple,scache,pbb}
-# {full,fast}-exec-{simple,scache,pbb}
-#
-# A target need only provide a "full" version of one of simple,scache,pbb.
-# If the target wants it can also provide a fast version of same.
-# It can't provide more than this, however for illustration's sake the FR30
-# port provides examples of all.
-
-# ??? After a few more ports are done, revisit.
-# Will eventually need to machine generate a lot of this.
-
-case "x$1" in
-
-xsupport)
-
-cat <<EOF
-
-static INLINE const IDESC *
-extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
-         int fast_p)
-{
-  const IDESC *id = @cpu@_decode (current_cpu, pc, insn, abuf);
-  @cpu@_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
-  if (! fast_p)
-    {
-      int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
-      int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
-      @cpu@_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
-    }
-  return id;
-}
-
-static INLINE SEM_PC
-execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
-{
-  SEM_PC vpc;
-
-  if (fast_p)
-    {
-#if ! WITH_SEM_SWITCH_FAST
-#if WITH_SCACHE
-      vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
-#else
-      vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
-#endif
-#else
-      abort ();
-#endif /* WITH_SEM_SWITCH_FAST */
-    }
-  else
-    {
-#if ! WITH_SEM_SWITCH_FULL
-      ARGBUF *abuf = &sc->argbuf;
-      const IDESC *idesc = abuf->idesc;
-#if WITH_SCACHE_PBB
-      int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
-#else
-      int virtual_p = 0;
-#endif
-
-      if (! virtual_p)
-	{
-	  /* FIXME: call x-before */
-	  if (ARGBUF_PROFILE_P (abuf))
-	    PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
-	  /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}.  */
-	  if (PROFILE_MODEL_P (current_cpu)
-	      && ARGBUF_PROFILE_P (abuf))
-	    @cpu@_model_insn_before (current_cpu, 1 /*first_p*/);
-	  TRACE_INSN_INIT (current_cpu, abuf, 1);
-	  TRACE_INSN (current_cpu, idesc->idata,
-		      (const struct argbuf *) abuf, abuf->addr);
-	}
-#if WITH_SCACHE
-      vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
-#else
-      vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
-#endif
-      if (! virtual_p)
-	{
-	  /* FIXME: call x-after */
-	  if (PROFILE_MODEL_P (current_cpu)
-	      && ARGBUF_PROFILE_P (abuf))
-	    {
-	      int cycles;
-
-	      cycles = (*idesc->timing->model_fn) (current_cpu, sc);
-	      @cpu@_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
-	    }
-	  TRACE_INSN_FINI (current_cpu, abuf, 1);
-	}
-#else
-      abort ();
-#endif /* WITH_SEM_SWITCH_FULL */
-    }
-
-  return vpc;
-}
-
-EOF
-
-;;
-
-xinit)
-
-cat <<EOF
-/*xxxinit*/
-EOF
-
-;;
-
-xextract-simple | xextract-scache)
-
-# Inputs:  current_cpu, vpc, sc, FAST_P
-# Outputs: sc filled in
-
-cat <<EOF
-{
-  CGEN_INSN_INT insn = GETIMEMUHI (current_cpu, vpc);
-  extract (current_cpu, vpc, insn, SEM_ARGBUF (sc), FAST_P);
-}
-EOF
-
-;;
-
-xextract-pbb)
-
-# Inputs:  current_cpu, pc, sc, max_insns, FAST_P
-# Outputs: sc, pc
-# sc must be left pointing past the last created entry.
-# pc must be left pointing past the last created entry.
-# If the pbb is terminated by a cti insn, SET_CTI_VPC(sc) must be called
-# to record the vpc of the cti insn.
-# SET_INSN_COUNT(n) must be called to record number of real insns.
-
-cat <<EOF
-{
-  const IDESC *idesc;
-  int icount = 0;
-
-  while (max_insns > 0)
-    {
-      UHI insn = GETIMEMUHI (current_cpu, pc);
-      idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
-      ++sc;
-      --max_insns;
-      ++icount;
-      pc += idesc->length;
-      if (IDESC_CTI_P (idesc))
-	{
-	  SET_CTI_VPC (sc - 1);
-
-	  /* Delay slot? */
-	  /* ??? breakpoints in delay slots */
-	  if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
-	    {
-	      UHI insn = GETIMEMUHI (current_cpu, pc);
-	      idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
-	      if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_NOT_IN_DELAY_SLOT))
-		{
-		  /* malformed program */
-		  sim_io_eprintf (CPU_STATE (current_cpu),
-				  "malformed program, \`%s' insn in delay slot\n",
-				  CGEN_INSN_NAME (idesc->idata));
-		}
-	      else
-		{
-		  ++sc;
-		  --max_insns;
-		  ++icount;
-		  pc += idesc->length;
-		}
-	    }
-	  break;
-	}
-    }
-
- Finish:
-  SET_INSN_COUNT (icount);
-}
-EOF
-
-;;
-
-xfull-exec-* | xfast-exec-*)
-
-# Inputs: current_cpu, sc, FAST_P
-# Outputs: vpc
-# vpc contains the address of the next insn to execute
-
-cat <<EOF
-{
-#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
-#define DEFINE_SWITCH
-#include "sem-switch.c"
-#else
-  vpc = execute (current_cpu, vpc, FAST_P);
-#endif
-}
-EOF
-
-;;
-
-*)
-  echo "Invalid argument to mainloop.in: $1" >&2
-  exit 1
-  ;;
-
-esac
+# OBSOLETE # Simulator main loop for fr30. -*- C -*-
+# OBSOLETE # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+# OBSOLETE # Contributed by Cygnus Solutions.
+# OBSOLETE #
+# OBSOLETE # This file is part of the GNU Simulators.
+# OBSOLETE #
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2, or (at your option)
+# OBSOLETE # any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License along
+# OBSOLETE # with this program; if not, write to the Free Software Foundation, Inc.,
+# OBSOLETE # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE 
+# OBSOLETE # Syntax:
+# OBSOLETE # /bin/sh mainloop.in command
+# OBSOLETE #
+# OBSOLETE # Command is one of:
+# OBSOLETE #
+# OBSOLETE # init
+# OBSOLETE # support
+# OBSOLETE # extract-{simple,scache,pbb}
+# OBSOLETE # {full,fast}-exec-{simple,scache,pbb}
+# OBSOLETE #
+# OBSOLETE # A target need only provide a "full" version of one of simple,scache,pbb.
+# OBSOLETE # If the target wants it can also provide a fast version of same.
+# OBSOLETE # It can't provide more than this, however for illustration's sake the FR30
+# OBSOLETE # port provides examples of all.
+# OBSOLETE 
+# OBSOLETE # ??? After a few more ports are done, revisit.
+# OBSOLETE # Will eventually need to machine generate a lot of this.
+# OBSOLETE 
+# OBSOLETE case "x$1" in
+# OBSOLETE 
+# OBSOLETE xsupport)
+# OBSOLETE 
+# OBSOLETE cat <<EOF
+# OBSOLETE 
+# OBSOLETE static INLINE const IDESC *
+# OBSOLETE extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
+# OBSOLETE          int fast_p)
+# OBSOLETE {
+# OBSOLETE   const IDESC *id = @cpu@_decode (current_cpu, pc, insn, abuf);
+# OBSOLETE   @cpu@_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
+# OBSOLETE   if (! fast_p)
+# OBSOLETE     {
+# OBSOLETE       int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
+# OBSOLETE       int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
+# OBSOLETE       @cpu@_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
+# OBSOLETE     }
+# OBSOLETE   return id;
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE static INLINE SEM_PC
+# OBSOLETE execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
+# OBSOLETE {
+# OBSOLETE   SEM_PC vpc;
+# OBSOLETE 
+# OBSOLETE   if (fast_p)
+# OBSOLETE     {
+# OBSOLETE #if ! WITH_SEM_SWITCH_FAST
+# OBSOLETE #if WITH_SCACHE
+# OBSOLETE       vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
+# OBSOLETE #else
+# OBSOLETE       vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
+# OBSOLETE #endif
+# OBSOLETE #else
+# OBSOLETE       abort ();
+# OBSOLETE #endif /* WITH_SEM_SWITCH_FAST */
+# OBSOLETE     }
+# OBSOLETE   else
+# OBSOLETE     {
+# OBSOLETE #if ! WITH_SEM_SWITCH_FULL
+# OBSOLETE       ARGBUF *abuf = &sc->argbuf;
+# OBSOLETE       const IDESC *idesc = abuf->idesc;
+# OBSOLETE #if WITH_SCACHE_PBB
+# OBSOLETE       int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
+# OBSOLETE #else
+# OBSOLETE       int virtual_p = 0;
+# OBSOLETE #endif
+# OBSOLETE 
+# OBSOLETE       if (! virtual_p)
+# OBSOLETE 	{
+# OBSOLETE 	  /* FIXME: call x-before */
+# OBSOLETE 	  if (ARGBUF_PROFILE_P (abuf))
+# OBSOLETE 	    PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
+# OBSOLETE 	  /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}.  */
+# OBSOLETE 	  if (PROFILE_MODEL_P (current_cpu)
+# OBSOLETE 	      && ARGBUF_PROFILE_P (abuf))
+# OBSOLETE 	    @cpu@_model_insn_before (current_cpu, 1 /*first_p*/);
+# OBSOLETE 	  TRACE_INSN_INIT (current_cpu, abuf, 1);
+# OBSOLETE 	  TRACE_INSN (current_cpu, idesc->idata,
+# OBSOLETE 		      (const struct argbuf *) abuf, abuf->addr);
+# OBSOLETE 	}
+# OBSOLETE #if WITH_SCACHE
+# OBSOLETE       vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
+# OBSOLETE #else
+# OBSOLETE       vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
+# OBSOLETE #endif
+# OBSOLETE       if (! virtual_p)
+# OBSOLETE 	{
+# OBSOLETE 	  /* FIXME: call x-after */
+# OBSOLETE 	  if (PROFILE_MODEL_P (current_cpu)
+# OBSOLETE 	      && ARGBUF_PROFILE_P (abuf))
+# OBSOLETE 	    {
+# OBSOLETE 	      int cycles;
+# OBSOLETE 
+# OBSOLETE 	      cycles = (*idesc->timing->model_fn) (current_cpu, sc);
+# OBSOLETE 	      @cpu@_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
+# OBSOLETE 	    }
+# OBSOLETE 	  TRACE_INSN_FINI (current_cpu, abuf, 1);
+# OBSOLETE 	}
+# OBSOLETE #else
+# OBSOLETE       abort ();
+# OBSOLETE #endif /* WITH_SEM_SWITCH_FULL */
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE   return vpc;
+# OBSOLETE }
+# OBSOLETE 
+# OBSOLETE EOF
+# OBSOLETE 
+# OBSOLETE ;;
+# OBSOLETE 
+# OBSOLETE xinit)
+# OBSOLETE 
+# OBSOLETE cat <<EOF
+# OBSOLETE /*xxxinit*/
+# OBSOLETE EOF
+# OBSOLETE 
+# OBSOLETE ;;
+# OBSOLETE 
+# OBSOLETE xextract-simple | xextract-scache)
+# OBSOLETE 
+# OBSOLETE # Inputs:  current_cpu, vpc, sc, FAST_P
+# OBSOLETE # Outputs: sc filled in
+# OBSOLETE 
+# OBSOLETE cat <<EOF
+# OBSOLETE {
+# OBSOLETE   CGEN_INSN_INT insn = GETIMEMUHI (current_cpu, vpc);
+# OBSOLETE   extract (current_cpu, vpc, insn, SEM_ARGBUF (sc), FAST_P);
+# OBSOLETE }
+# OBSOLETE EOF
+# OBSOLETE 
+# OBSOLETE ;;
+# OBSOLETE 
+# OBSOLETE xextract-pbb)
+# OBSOLETE 
+# OBSOLETE # Inputs:  current_cpu, pc, sc, max_insns, FAST_P
+# OBSOLETE # Outputs: sc, pc
+# OBSOLETE # sc must be left pointing past the last created entry.
+# OBSOLETE # pc must be left pointing past the last created entry.
+# OBSOLETE # If the pbb is terminated by a cti insn, SET_CTI_VPC(sc) must be called
+# OBSOLETE # to record the vpc of the cti insn.
+# OBSOLETE # SET_INSN_COUNT(n) must be called to record number of real insns.
+# OBSOLETE 
+# OBSOLETE cat <<EOF
+# OBSOLETE {
+# OBSOLETE   const IDESC *idesc;
+# OBSOLETE   int icount = 0;
+# OBSOLETE 
+# OBSOLETE   while (max_insns > 0)
+# OBSOLETE     {
+# OBSOLETE       UHI insn = GETIMEMUHI (current_cpu, pc);
+# OBSOLETE       idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
+# OBSOLETE       ++sc;
+# OBSOLETE       --max_insns;
+# OBSOLETE       ++icount;
+# OBSOLETE       pc += idesc->length;
+# OBSOLETE       if (IDESC_CTI_P (idesc))
+# OBSOLETE 	{
+# OBSOLETE 	  SET_CTI_VPC (sc - 1);
+# OBSOLETE 
+# OBSOLETE 	  /* Delay slot? */
+# OBSOLETE 	  /* ??? breakpoints in delay slots */
+# OBSOLETE 	  if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
+# OBSOLETE 	    {
+# OBSOLETE 	      UHI insn = GETIMEMUHI (current_cpu, pc);
+# OBSOLETE 	      idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
+# OBSOLETE 	      if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_NOT_IN_DELAY_SLOT))
+# OBSOLETE 		{
+# OBSOLETE 		  /* malformed program */
+# OBSOLETE 		  sim_io_eprintf (CPU_STATE (current_cpu),
+# OBSOLETE 				  "malformed program, \`%s' insn in delay slot\n",
+# OBSOLETE 				  CGEN_INSN_NAME (idesc->idata));
+# OBSOLETE 		}
+# OBSOLETE 	      else
+# OBSOLETE 		{
+# OBSOLETE 		  ++sc;
+# OBSOLETE 		  --max_insns;
+# OBSOLETE 		  ++icount;
+# OBSOLETE 		  pc += idesc->length;
+# OBSOLETE 		}
+# OBSOLETE 	    }
+# OBSOLETE 	  break;
+# OBSOLETE 	}
+# OBSOLETE     }
+# OBSOLETE 
+# OBSOLETE  Finish:
+# OBSOLETE   SET_INSN_COUNT (icount);
+# OBSOLETE }
+# OBSOLETE EOF
+# OBSOLETE 
+# OBSOLETE ;;
+# OBSOLETE 
+# OBSOLETE xfull-exec-* | xfast-exec-*)
+# OBSOLETE 
+# OBSOLETE # Inputs: current_cpu, sc, FAST_P
+# OBSOLETE # Outputs: vpc
+# OBSOLETE # vpc contains the address of the next insn to execute
+# OBSOLETE 
+# OBSOLETE cat <<EOF
+# OBSOLETE {
+# OBSOLETE #if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
+# OBSOLETE #define DEFINE_SWITCH
+# OBSOLETE #include "sem-switch.c"
+# OBSOLETE #else
+# OBSOLETE   vpc = execute (current_cpu, vpc, FAST_P);
+# OBSOLETE #endif
+# OBSOLETE }
+# OBSOLETE EOF
+# OBSOLETE 
+# OBSOLETE ;;
+# OBSOLETE 
+# OBSOLETE *)
+# OBSOLETE   echo "Invalid argument to mainloop.in: $1" >&2
+# OBSOLETE   exit 1
+# OBSOLETE   ;;
+# OBSOLETE 
+# OBSOLETE esac
diff --git a/sim/fr30/model.c b/sim/fr30/model.c
index a90f340..15a1ecc 100644
--- a/sim/fr30/model.c
+++ b/sim/fr30/model.c
@@ -1,4004 +1,4003 @@
-/* Simulator model support for fr30bf.
-
-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 simulators.
-
-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.
-
-*/
-
-#define WANT_CPU fr30bf
-#define WANT_CPU_FR30BF
-
-#include "sim-main.h"
-
-/* The profiling data is recorded here, but is accessed via the profiling
-   mechanism.  After all, this is information for profiling.  */
-
-#if WITH_PROFILE_MODEL_P
-
-/* Model handlers for each insn.  */
-
-static int
-model_fr30_1_add (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_add2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addc (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addn (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addni (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addn2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_sub (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_subc (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_subn (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_cmp (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_cmpi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_cmp2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_and (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_or (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_eor (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_andm (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_andh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_andb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_orm (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_orh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_orb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_eorm (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_eorh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_eorb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bandl (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_borl (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_beorl (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bandh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_borh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_beorh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_btstl (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 1, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_btsth (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 1, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mul (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mulu (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mulh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_muluh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div0s (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div0u (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div1 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div3 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_div4s (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsl (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsli (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsl2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsri (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lsr2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_asr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_asri (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_asr2 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldi8 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi8.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldi20 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi20.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldi32 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi32.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ld (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_lduh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldub (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr13 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr13uh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr13ub (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr14 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr14uh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14uh.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr14ub (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14ub.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr15 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr15gr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15gr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr15dr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldr15ps (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_st (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_sth (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_stb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str13 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str13h (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str13b (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str14 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str14h (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14h.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str14b (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14b.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str15 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str15.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str15gr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str15gr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str15dr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_str15ps (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mov (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 1;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_movdr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_movps (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mov2dr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_mov2ps (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_jmp (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_jmpd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_callr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_callrd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_call (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_call.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_calld (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_call.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ret (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ret_d (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_int (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_inte (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_reti (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_brad (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bra (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bnod (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bno (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_beqd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_beq (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bned (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bne (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bcd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bc (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bncd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bnc (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bnd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bn (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bpd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bp (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bvd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bv (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bnvd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bnv (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bltd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_blt (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bged (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bge (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bled (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ble (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bgtd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bgt (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_blsd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bls (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bhid (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_bhi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13h (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13b (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13pi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13pih (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr13pib (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmovr15pi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13h (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13b (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13pi (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13pih (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r13pib (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_dmov2r15pd (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldres (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_stres (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_copop (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_copld (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_copst (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_copsv (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_nop (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_andccr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_orccr (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_stilm (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_addsp (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_extsb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_extub (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_extsh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_extuh (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Ri = FLD (in_Ri);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 2;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldm0 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldm0.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_reglist = 0;
-    cycles += fr30bf_model_fr30_1_u_ldm (current_cpu, idesc, 0, referenced, in_reglist);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_ldm1 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldm1.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_reglist = 0;
-    cycles += fr30bf_model_fr30_1_u_ldm (current_cpu, idesc, 0, referenced, in_reglist);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_stm0 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_stm0.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_reglist = 0;
-    cycles += fr30bf_model_fr30_1_u_stm (current_cpu, idesc, 0, referenced, in_reglist);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_stm1 (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_stm1.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_reglist = 0;
-    cycles += fr30bf_model_fr30_1_u_stm (current_cpu, idesc, 0, referenced, in_reglist);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_enter (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_enter.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_leave (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_enter.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
-  }
-  return cycles;
-#undef FLD
-}
-
-static int
-model_fr30_1_xchb (SIM_CPU *current_cpu, void *sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
-  const IDESC * UNUSED idesc = abuf->idesc;
-  int cycles = 0;
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Rj = -1;
-    INT out_Ri = -1;
-    in_Rj = FLD (in_Rj);
-    out_Ri = FLD (out_Ri);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
-  }
-  {
-    int referenced = 0;
-    int UNUSED insn_referenced = abuf->written;
-    INT in_Ri = -1;
-    INT in_Rj = -1;
-    in_Ri = FLD (in_Ri);
-    in_Rj = FLD (in_Rj);
-    referenced |= 1 << 0;
-    referenced |= 1 << 1;
-    cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
-  }
-  return cycles;
-#undef FLD
-}
-
-/* We assume UNIT_NONE == 0 because the tables don't always terminate
-   entries with it.  */
-
-/* Model timing data for `fr30-1'.  */
-
-static const INSN_TIMING fr30_1_timing[] = {
-  { FR30BF_INSN_X_INVALID, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_X_AFTER, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_X_BEFORE, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_X_CTI_CHAIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_X_CHAIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_X_BEGIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADD, model_fr30_1_add, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDI, model_fr30_1_addi, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADD2, model_fr30_1_add2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDC, model_fr30_1_addc, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDN, model_fr30_1_addn, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDNI, model_fr30_1_addni, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDN2, model_fr30_1_addn2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_SUB, model_fr30_1_sub, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_SUBC, model_fr30_1_subc, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_SUBN, model_fr30_1_subn, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_CMP, model_fr30_1_cmp, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_CMPI, model_fr30_1_cmpi, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_CMP2, model_fr30_1_cmp2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_AND, model_fr30_1_and, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_OR, model_fr30_1_or, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_EOR, model_fr30_1_eor, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ANDM, model_fr30_1_andm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_ANDH, model_fr30_1_andh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_ANDB, model_fr30_1_andb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_ORM, model_fr30_1_orm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_ORH, model_fr30_1_orh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_ORB, model_fr30_1_orb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_EORM, model_fr30_1_eorm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_EORH, model_fr30_1_eorh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_EORB, model_fr30_1_eorb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BANDL, model_fr30_1_bandl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BORL, model_fr30_1_borl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BEORL, model_fr30_1_beorl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BANDH, model_fr30_1_bandh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BORH, model_fr30_1_borh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BEORH, model_fr30_1_beorh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_BTSTL, model_fr30_1_btstl, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
-  { FR30BF_INSN_BTSTH, model_fr30_1_btsth, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
-  { FR30BF_INSN_MUL, model_fr30_1_mul, { { (int) UNIT_FR30_1_U_EXEC, 1, 5 } } },
-  { FR30BF_INSN_MULU, model_fr30_1_mulu, { { (int) UNIT_FR30_1_U_EXEC, 1, 5 } } },
-  { FR30BF_INSN_MULH, model_fr30_1_mulh, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
-  { FR30BF_INSN_MULUH, model_fr30_1_muluh, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
-  { FR30BF_INSN_DIV0S, model_fr30_1_div0s, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_DIV0U, model_fr30_1_div0u, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_DIV1, model_fr30_1_div1, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_DIV2, model_fr30_1_div2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_DIV3, model_fr30_1_div3, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_DIV4S, model_fr30_1_div4s, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSL, model_fr30_1_lsl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSLI, model_fr30_1_lsli, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSL2, model_fr30_1_lsl2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSR, model_fr30_1_lsr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSRI, model_fr30_1_lsri, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LSR2, model_fr30_1_lsr2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ASR, model_fr30_1_asr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ASRI, model_fr30_1_asri, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ASR2, model_fr30_1_asr2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LDI8, model_fr30_1_ldi8, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LDI20, model_fr30_1_ldi20, { { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
-  { FR30BF_INSN_LDI32, model_fr30_1_ldi32, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
-  { FR30BF_INSN_LD, model_fr30_1_ld, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDUH, model_fr30_1_lduh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDUB, model_fr30_1_ldub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR13, model_fr30_1_ldr13, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR13UH, model_fr30_1_ldr13uh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR13UB, model_fr30_1_ldr13ub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR14, model_fr30_1_ldr14, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR14UH, model_fr30_1_ldr14uh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR14UB, model_fr30_1_ldr14ub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR15, model_fr30_1_ldr15, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR15GR, model_fr30_1_ldr15gr, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR15DR, model_fr30_1_ldr15dr, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_LDR15PS, model_fr30_1_ldr15ps, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_ST, model_fr30_1_st, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STH, model_fr30_1_sth, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STB, model_fr30_1_stb, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR13, model_fr30_1_str13, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR13H, model_fr30_1_str13h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR13B, model_fr30_1_str13b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR14, model_fr30_1_str14, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR14H, model_fr30_1_str14h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR14B, model_fr30_1_str14b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR15, model_fr30_1_str15, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR15GR, model_fr30_1_str15gr, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR15DR, model_fr30_1_str15dr, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_STR15PS, model_fr30_1_str15ps, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_MOV, model_fr30_1_mov, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_MOVDR, model_fr30_1_movdr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_MOVPS, model_fr30_1_movps, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_MOV2DR, model_fr30_1_mov2dr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_MOV2PS, model_fr30_1_mov2ps, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_JMP, model_fr30_1_jmp, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_JMPD, model_fr30_1_jmpd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_CALLR, model_fr30_1_callr, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_CALLRD, model_fr30_1_callrd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_CALL, model_fr30_1_call, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_CALLD, model_fr30_1_calld, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_RET, model_fr30_1_ret, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_RET_D, model_fr30_1_ret_d, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_INT, model_fr30_1_int, { { (int) UNIT_FR30_1_U_EXEC, 1, 6 } } },
-  { FR30BF_INSN_INTE, model_fr30_1_inte, { { (int) UNIT_FR30_1_U_EXEC, 1, 6 } } },
-  { FR30BF_INSN_RETI, model_fr30_1_reti, { { (int) UNIT_FR30_1_U_EXEC, 1, 4 } } },
-  { FR30BF_INSN_BRAD, model_fr30_1_brad, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BRA, model_fr30_1_bra, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNOD, model_fr30_1_bnod, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNO, model_fr30_1_bno, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BEQD, model_fr30_1_beqd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BEQ, model_fr30_1_beq, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNED, model_fr30_1_bned, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNE, model_fr30_1_bne, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BCD, model_fr30_1_bcd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BC, model_fr30_1_bc, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNCD, model_fr30_1_bncd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNC, model_fr30_1_bnc, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BND, model_fr30_1_bnd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BN, model_fr30_1_bn, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BPD, model_fr30_1_bpd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BP, model_fr30_1_bp, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BVD, model_fr30_1_bvd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BV, model_fr30_1_bv, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNVD, model_fr30_1_bnvd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BNV, model_fr30_1_bnv, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLTD, model_fr30_1_bltd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLT, model_fr30_1_blt, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BGED, model_fr30_1_bged, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BGE, model_fr30_1_bge, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLED, model_fr30_1_bled, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLE, model_fr30_1_ble, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BGTD, model_fr30_1_bgtd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BGT, model_fr30_1_bgt, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLSD, model_fr30_1_blsd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BLS, model_fr30_1_bls, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BHID, model_fr30_1_bhid, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_BHI, model_fr30_1_bhi, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13, model_fr30_1_dmovr13, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13H, model_fr30_1_dmovr13h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13B, model_fr30_1_dmovr13b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13PI, model_fr30_1_dmovr13pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13PIH, model_fr30_1_dmovr13pih, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR13PIB, model_fr30_1_dmovr13pib, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOVR15PI, model_fr30_1_dmovr15pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13, model_fr30_1_dmov2r13, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13H, model_fr30_1_dmov2r13h, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13B, model_fr30_1_dmov2r13b, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13PI, model_fr30_1_dmov2r13pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13PIH, model_fr30_1_dmov2r13pih, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R13PIB, model_fr30_1_dmov2r13pib, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_DMOV2R15PD, model_fr30_1_dmov2r15pd, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-  { FR30BF_INSN_LDRES, model_fr30_1_ldres, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_STRES, model_fr30_1_stres, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_COPOP, model_fr30_1_copop, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_COPLD, model_fr30_1_copld, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_COPST, model_fr30_1_copst, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_COPSV, model_fr30_1_copsv, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_NOP, model_fr30_1_nop, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ANDCCR, model_fr30_1_andccr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ORCCR, model_fr30_1_orccr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_STILM, model_fr30_1_stilm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_ADDSP, model_fr30_1_addsp, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_EXTSB, model_fr30_1_extsb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_EXTUB, model_fr30_1_extub, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_EXTSH, model_fr30_1_extsh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_EXTUH, model_fr30_1_extuh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_LDM0, model_fr30_1_ldm0, { { (int) UNIT_FR30_1_U_LDM, 1, 1 } } },
-  { FR30BF_INSN_LDM1, model_fr30_1_ldm1, { { (int) UNIT_FR30_1_U_LDM, 1, 1 } } },
-  { FR30BF_INSN_STM0, model_fr30_1_stm0, { { (int) UNIT_FR30_1_U_STM, 1, 1 } } },
-  { FR30BF_INSN_STM1, model_fr30_1_stm1, { { (int) UNIT_FR30_1_U_STM, 1, 1 } } },
-  { FR30BF_INSN_ENTER, model_fr30_1_enter, { { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
-  { FR30BF_INSN_LEAVE, model_fr30_1_leave, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
-  { FR30BF_INSN_XCHB, model_fr30_1_xchb, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
-};
-
-#endif /* WITH_PROFILE_MODEL_P */
-
-static void
-fr30_1_model_init (SIM_CPU *cpu)
-{
-  CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_FR30_1_DATA));
-}
-
-#if WITH_PROFILE_MODEL_P
-#define TIMING_DATA(td) td
-#else
-#define TIMING_DATA(td) 0
-#endif
-
-static const MODEL fr30_models[] =
-{
-  { "fr30-1", & fr30_mach, MODEL_FR30_1, TIMING_DATA (& fr30_1_timing[0]), fr30_1_model_init },
-  { 0 }
-};
-
-/* The properties of this cpu's implementation.  */
-
-static const MACH_IMP_PROPERTIES fr30bf_imp_properties =
-{
-  sizeof (SIM_CPU),
-#if WITH_SCACHE
-  sizeof (SCACHE)
-#else
-  0
-#endif
-};
-
-
-static void
-fr30bf_prepare_run (SIM_CPU *cpu)
-{
-  if (CPU_IDESC (cpu) == NULL)
-    fr30bf_init_idesc_table (cpu);
-}
-
-static const CGEN_INSN *
-fr30bf_get_idata (SIM_CPU *cpu, int inum)
-{
-  return CPU_IDESC (cpu) [inum].idata;
-}
-
-static void
-fr30_init_cpu (SIM_CPU *cpu)
-{
-  CPU_REG_FETCH (cpu) = fr30bf_fetch_register;
-  CPU_REG_STORE (cpu) = fr30bf_store_register;
-  CPU_PC_FETCH (cpu) = fr30bf_h_pc_get;
-  CPU_PC_STORE (cpu) = fr30bf_h_pc_set;
-  CPU_GET_IDATA (cpu) = fr30bf_get_idata;
-  CPU_MAX_INSNS (cpu) = FR30BF_INSN_XCHB + 1;
-  CPU_INSN_NAME (cpu) = cgen_insn_name;
-  CPU_FULL_ENGINE_FN (cpu) = fr30bf_engine_run_full;
-#if WITH_FAST
-  CPU_FAST_ENGINE_FN (cpu) = fr30bf_engine_run_fast;
-#else
-  CPU_FAST_ENGINE_FN (cpu) = fr30bf_engine_run_full;
-#endif
-}
-
-const MACH fr30_mach =
-{
-  "fr30", "fr30", MACH_FR30,
-  32, 32, & fr30_models[0], & fr30bf_imp_properties,
-  fr30_init_cpu,
-  fr30bf_prepare_run
-};
-
+// OBSOLETE /* Simulator model support for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #define WANT_CPU fr30bf
+// OBSOLETE #define WANT_CPU_FR30BF
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE 
+// OBSOLETE /* The profiling data is recorded here, but is accessed via the profiling
+// OBSOLETE    mechanism.  After all, this is information for profiling.  */
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE 
+// OBSOLETE /* Model handlers for each insn.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_add (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_add2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addc (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addn (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addni (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addn2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_sub (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_subc (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_subn (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_cmp (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_cmpi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_cmp2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_and (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_or (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_eor (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_andm (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_andh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_andb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_orm (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_orh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_orb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_eorm (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_eorh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_eorb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bandl (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_borl (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_beorl (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bandh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_borh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_beorh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 1, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 2, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_btstl (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 1, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_btsth (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 1, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mul (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mulu (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mulh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_muluh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div0s (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div0u (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div1 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div3 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_div4s (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsl (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsli (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsl2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsri (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lsr2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_asr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_asri (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_asr2 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     if (insn_referenced & (1 << 0)) referenced |= 1 << 0;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldi8 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi8.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldi20 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi20.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldi32 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi32.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ld (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_lduh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldub (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr13 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr13uh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr13ub (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr14 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr14uh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14uh.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr14ub (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14ub.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr15 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr15gr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15gr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr15dr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldr15ps (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_st (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_sth (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_stb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str13 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str13h (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str13b (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str14 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str14h (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14h.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str14b (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14b.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str15 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str15gr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15gr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str15dr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_str15ps (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mov (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_movdr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_movps (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mov2dr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_mov2ps (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_jmp (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_jmpd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_callr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_callrd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_call (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_calld (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ret (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ret_d (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_int (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_inte (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_reti (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_brad (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bra (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bnod (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bno (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_beqd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_beq (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bned (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bne (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bcd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bc (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bncd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bnc (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bnd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bn (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bpd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bp (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bvd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bv (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bnvd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bnv (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 2)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bltd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_blt (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bged (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bge (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bled (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ble (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bgtd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bgt (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 4)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_blsd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bls (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bhid (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_bhi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     if (insn_referenced & (1 << 3)) referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_cti (current_cpu, idesc, 0, referenced, in_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13h (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13b (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 0, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13pi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13pih (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr13pib (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmovr15pi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13h (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13b (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13pi (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13pih (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r13pib (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_dmov2r15pd (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldres (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_stres (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_copop (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_copld (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_copst (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_copsv (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_nop (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_andccr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_orccr (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_stilm (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_addsp (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_extsb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_extub (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_extsh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_extuh (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 2;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldm0 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm0.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_reglist = 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_ldm (current_cpu, idesc, 0, referenced, in_reglist);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_ldm1 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm1.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_reglist = 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_ldm (current_cpu, idesc, 0, referenced, in_reglist);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_stm0 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm0.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_reglist = 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_stm (current_cpu, idesc, 0, referenced, in_reglist);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_stm1 (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm1.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_reglist = 0;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_stm (current_cpu, idesc, 0, referenced, in_reglist);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_enter (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_leave (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_exec (current_cpu, idesc, 0, referenced, in_Ri, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE model_fr30_1_xchb (SIM_CPU *current_cpu, void *sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
+// OBSOLETE   const IDESC * UNUSED idesc = abuf->idesc;
+// OBSOLETE   int cycles = 0;
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     INT out_Ri = -1;
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     out_Ri = FLD (out_Ri);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_load (current_cpu, idesc, 0, referenced, in_Rj, out_Ri);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     int referenced = 0;
+// OBSOLETE     int UNUSED insn_referenced = abuf->written;
+// OBSOLETE     INT in_Ri = -1;
+// OBSOLETE     INT in_Rj = -1;
+// OBSOLETE     in_Ri = FLD (in_Ri);
+// OBSOLETE     in_Rj = FLD (in_Rj);
+// OBSOLETE     referenced |= 1 << 0;
+// OBSOLETE     referenced |= 1 << 1;
+// OBSOLETE     cycles += fr30bf_model_fr30_1_u_store (current_cpu, idesc, 1, referenced, in_Ri, in_Rj);
+// OBSOLETE   }
+// OBSOLETE   return cycles;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* We assume UNIT_NONE == 0 because the tables don't always terminate
+// OBSOLETE    entries with it.  */
+// OBSOLETE 
+// OBSOLETE /* Model timing data for `fr30-1'.  */
+// OBSOLETE 
+// OBSOLETE static const INSN_TIMING fr30_1_timing[] = {
+// OBSOLETE   { FR30BF_INSN_X_INVALID, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_X_AFTER, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_X_BEFORE, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_X_CTI_CHAIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_X_CHAIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_X_BEGIN, 0, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADD, model_fr30_1_add, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDI, model_fr30_1_addi, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADD2, model_fr30_1_add2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDC, model_fr30_1_addc, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDN, model_fr30_1_addn, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDNI, model_fr30_1_addni, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDN2, model_fr30_1_addn2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_SUB, model_fr30_1_sub, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_SUBC, model_fr30_1_subc, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_SUBN, model_fr30_1_subn, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CMP, model_fr30_1_cmp, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CMPI, model_fr30_1_cmpi, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CMP2, model_fr30_1_cmp2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_AND, model_fr30_1_and, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_OR, model_fr30_1_or, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EOR, model_fr30_1_eor, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ANDM, model_fr30_1_andm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ANDH, model_fr30_1_andh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ANDB, model_fr30_1_andb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ORM, model_fr30_1_orm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ORH, model_fr30_1_orh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ORB, model_fr30_1_orb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EORM, model_fr30_1_eorm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EORH, model_fr30_1_eorh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EORB, model_fr30_1_eorb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BANDL, model_fr30_1_bandl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BORL, model_fr30_1_borl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BEORL, model_fr30_1_beorl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BANDH, model_fr30_1_bandh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BORH, model_fr30_1_borh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BEORH, model_fr30_1_beorh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 }, { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BTSTL, model_fr30_1_btstl, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
+// OBSOLETE   { FR30BF_INSN_BTSTH, model_fr30_1_btsth, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
+// OBSOLETE   { FR30BF_INSN_MUL, model_fr30_1_mul, { { (int) UNIT_FR30_1_U_EXEC, 1, 5 } } },
+// OBSOLETE   { FR30BF_INSN_MULU, model_fr30_1_mulu, { { (int) UNIT_FR30_1_U_EXEC, 1, 5 } } },
+// OBSOLETE   { FR30BF_INSN_MULH, model_fr30_1_mulh, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
+// OBSOLETE   { FR30BF_INSN_MULUH, model_fr30_1_muluh, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
+// OBSOLETE   { FR30BF_INSN_DIV0S, model_fr30_1_div0s, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DIV0U, model_fr30_1_div0u, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DIV1, model_fr30_1_div1, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DIV2, model_fr30_1_div2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DIV3, model_fr30_1_div3, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DIV4S, model_fr30_1_div4s, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSL, model_fr30_1_lsl, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSLI, model_fr30_1_lsli, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSL2, model_fr30_1_lsl2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSR, model_fr30_1_lsr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSRI, model_fr30_1_lsri, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LSR2, model_fr30_1_lsr2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ASR, model_fr30_1_asr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ASRI, model_fr30_1_asri, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ASR2, model_fr30_1_asr2, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDI8, model_fr30_1_ldi8, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDI20, model_fr30_1_ldi20, { { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
+// OBSOLETE   { FR30BF_INSN_LDI32, model_fr30_1_ldi32, { { (int) UNIT_FR30_1_U_EXEC, 1, 3 } } },
+// OBSOLETE   { FR30BF_INSN_LD, model_fr30_1_ld, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDUH, model_fr30_1_lduh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDUB, model_fr30_1_ldub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR13, model_fr30_1_ldr13, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR13UH, model_fr30_1_ldr13uh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR13UB, model_fr30_1_ldr13ub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR14, model_fr30_1_ldr14, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR14UH, model_fr30_1_ldr14uh, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR14UB, model_fr30_1_ldr14ub, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR15, model_fr30_1_ldr15, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR15GR, model_fr30_1_ldr15gr, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR15DR, model_fr30_1_ldr15dr, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDR15PS, model_fr30_1_ldr15ps, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ST, model_fr30_1_st, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STH, model_fr30_1_sth, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STB, model_fr30_1_stb, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR13, model_fr30_1_str13, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR13H, model_fr30_1_str13h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR13B, model_fr30_1_str13b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR14, model_fr30_1_str14, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR14H, model_fr30_1_str14h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR14B, model_fr30_1_str14b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR15, model_fr30_1_str15, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR15GR, model_fr30_1_str15gr, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR15DR, model_fr30_1_str15dr, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STR15PS, model_fr30_1_str15ps, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_MOV, model_fr30_1_mov, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_MOVDR, model_fr30_1_movdr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_MOVPS, model_fr30_1_movps, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_MOV2DR, model_fr30_1_mov2dr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_MOV2PS, model_fr30_1_mov2ps, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_JMP, model_fr30_1_jmp, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_JMPD, model_fr30_1_jmpd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CALLR, model_fr30_1_callr, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CALLRD, model_fr30_1_callrd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CALL, model_fr30_1_call, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_CALLD, model_fr30_1_calld, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_RET, model_fr30_1_ret, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_RET_D, model_fr30_1_ret_d, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_INT, model_fr30_1_int, { { (int) UNIT_FR30_1_U_EXEC, 1, 6 } } },
+// OBSOLETE   { FR30BF_INSN_INTE, model_fr30_1_inte, { { (int) UNIT_FR30_1_U_EXEC, 1, 6 } } },
+// OBSOLETE   { FR30BF_INSN_RETI, model_fr30_1_reti, { { (int) UNIT_FR30_1_U_EXEC, 1, 4 } } },
+// OBSOLETE   { FR30BF_INSN_BRAD, model_fr30_1_brad, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BRA, model_fr30_1_bra, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNOD, model_fr30_1_bnod, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNO, model_fr30_1_bno, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BEQD, model_fr30_1_beqd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BEQ, model_fr30_1_beq, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNED, model_fr30_1_bned, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNE, model_fr30_1_bne, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BCD, model_fr30_1_bcd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BC, model_fr30_1_bc, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNCD, model_fr30_1_bncd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNC, model_fr30_1_bnc, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BND, model_fr30_1_bnd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BN, model_fr30_1_bn, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BPD, model_fr30_1_bpd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BP, model_fr30_1_bp, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BVD, model_fr30_1_bvd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BV, model_fr30_1_bv, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNVD, model_fr30_1_bnvd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BNV, model_fr30_1_bnv, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLTD, model_fr30_1_bltd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLT, model_fr30_1_blt, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BGED, model_fr30_1_bged, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BGE, model_fr30_1_bge, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLED, model_fr30_1_bled, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLE, model_fr30_1_ble, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BGTD, model_fr30_1_bgtd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BGT, model_fr30_1_bgt, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLSD, model_fr30_1_blsd, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BLS, model_fr30_1_bls, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BHID, model_fr30_1_bhid, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_BHI, model_fr30_1_bhi, { { (int) UNIT_FR30_1_U_CTI, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13, model_fr30_1_dmovr13, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13H, model_fr30_1_dmovr13h, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13B, model_fr30_1_dmovr13b, { { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PI, model_fr30_1_dmovr13pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PIH, model_fr30_1_dmovr13pih, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PIB, model_fr30_1_dmovr13pib, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOVR15PI, model_fr30_1_dmovr15pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13, model_fr30_1_dmov2r13, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13H, model_fr30_1_dmov2r13h, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13B, model_fr30_1_dmov2r13b, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PI, model_fr30_1_dmov2r13pi, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PIH, model_fr30_1_dmov2r13pih, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PIB, model_fr30_1_dmov2r13pib, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_DMOV2R15PD, model_fr30_1_dmov2r15pd, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDRES, model_fr30_1_ldres, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STRES, model_fr30_1_stres, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_COPOP, model_fr30_1_copop, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_COPLD, model_fr30_1_copld, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_COPST, model_fr30_1_copst, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_COPSV, model_fr30_1_copsv, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_NOP, model_fr30_1_nop, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ANDCCR, model_fr30_1_andccr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ORCCR, model_fr30_1_orccr, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STILM, model_fr30_1_stilm, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ADDSP, model_fr30_1_addsp, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EXTSB, model_fr30_1_extsb, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EXTUB, model_fr30_1_extub, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EXTSH, model_fr30_1_extsh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_EXTUH, model_fr30_1_extuh, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDM0, model_fr30_1_ldm0, { { (int) UNIT_FR30_1_U_LDM, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_LDM1, model_fr30_1_ldm1, { { (int) UNIT_FR30_1_U_LDM, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STM0, model_fr30_1_stm0, { { (int) UNIT_FR30_1_U_STM, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_STM1, model_fr30_1_stm1, { { (int) UNIT_FR30_1_U_STM, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_ENTER, model_fr30_1_enter, { { (int) UNIT_FR30_1_U_EXEC, 1, 2 } } },
+// OBSOLETE   { FR30BF_INSN_LEAVE, model_fr30_1_leave, { { (int) UNIT_FR30_1_U_EXEC, 1, 1 } } },
+// OBSOLETE   { FR30BF_INSN_XCHB, model_fr30_1_xchb, { { (int) UNIT_FR30_1_U_LOAD, 1, 1 }, { (int) UNIT_FR30_1_U_STORE, 1, 1 } } },
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE #endif /* WITH_PROFILE_MODEL_P */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fr30_1_model_init (SIM_CPU *cpu)
+// OBSOLETE {
+// OBSOLETE   CPU_MODEL_DATA (cpu) = (void *) zalloc (sizeof (MODEL_FR30_1_DATA));
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #if WITH_PROFILE_MODEL_P
+// OBSOLETE #define TIMING_DATA(td) td
+// OBSOLETE #else
+// OBSOLETE #define TIMING_DATA(td) 0
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE static const MODEL fr30_models[] =
+// OBSOLETE {
+// OBSOLETE   { "fr30-1", & fr30_mach, MODEL_FR30_1, TIMING_DATA (& fr30_1_timing[0]), fr30_1_model_init },
+// OBSOLETE   { 0 }
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* The properties of this cpu's implementation.  */
+// OBSOLETE 
+// OBSOLETE static const MACH_IMP_PROPERTIES fr30bf_imp_properties =
+// OBSOLETE {
+// OBSOLETE   sizeof (SIM_CPU),
+// OBSOLETE #if WITH_SCACHE
+// OBSOLETE   sizeof (SCACHE)
+// OBSOLETE #else
+// OBSOLETE   0
+// OBSOLETE #endif
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fr30bf_prepare_run (SIM_CPU *cpu)
+// OBSOLETE {
+// OBSOLETE   if (CPU_IDESC (cpu) == NULL)
+// OBSOLETE     fr30bf_init_idesc_table (cpu);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static const CGEN_INSN *
+// OBSOLETE fr30bf_get_idata (SIM_CPU *cpu, int inum)
+// OBSOLETE {
+// OBSOLETE   return CPU_IDESC (cpu) [inum].idata;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE fr30_init_cpu (SIM_CPU *cpu)
+// OBSOLETE {
+// OBSOLETE   CPU_REG_FETCH (cpu) = fr30bf_fetch_register;
+// OBSOLETE   CPU_REG_STORE (cpu) = fr30bf_store_register;
+// OBSOLETE   CPU_PC_FETCH (cpu) = fr30bf_h_pc_get;
+// OBSOLETE   CPU_PC_STORE (cpu) = fr30bf_h_pc_set;
+// OBSOLETE   CPU_GET_IDATA (cpu) = fr30bf_get_idata;
+// OBSOLETE   CPU_MAX_INSNS (cpu) = FR30BF_INSN_XCHB + 1;
+// OBSOLETE   CPU_INSN_NAME (cpu) = cgen_insn_name;
+// OBSOLETE   CPU_FULL_ENGINE_FN (cpu) = fr30bf_engine_run_full;
+// OBSOLETE #if WITH_FAST
+// OBSOLETE   CPU_FAST_ENGINE_FN (cpu) = fr30bf_engine_run_fast;
+// OBSOLETE #else
+// OBSOLETE   CPU_FAST_ENGINE_FN (cpu) = fr30bf_engine_run_full;
+// OBSOLETE #endif
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE const MACH fr30_mach =
+// OBSOLETE {
+// OBSOLETE   "fr30", "fr30", MACH_FR30,
+// OBSOLETE   32, 32, & fr30_models[0], & fr30bf_imp_properties,
+// OBSOLETE   fr30_init_cpu,
+// OBSOLETE   fr30bf_prepare_run
+// OBSOLETE };
diff --git a/sim/fr30/sem-switch.c b/sim/fr30/sem-switch.c
index 837e29f..15f3c22 100644
--- a/sim/fr30/sem-switch.c
+++ b/sim/fr30/sem-switch.c
@@ -1,5409 +1,5409 @@
-/* Simulator instruction semantics for fr30bf.
-
-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 simulators.
-
-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.
-
-*/
-
-#ifdef DEFINE_LABELS
-
-  /* The labels have the case they have because the enum of insn types
-     is all uppercase and in the non-stdc case the insn symbol is built
-     into the enum name.  */
-
-  static struct {
-    int index;
-    void *label;
-  } labels[] = {
-    { FR30BF_INSN_X_INVALID, && case_sem_INSN_X_INVALID },
-    { FR30BF_INSN_X_AFTER, && case_sem_INSN_X_AFTER },
-    { FR30BF_INSN_X_BEFORE, && case_sem_INSN_X_BEFORE },
-    { FR30BF_INSN_X_CTI_CHAIN, && case_sem_INSN_X_CTI_CHAIN },
-    { FR30BF_INSN_X_CHAIN, && case_sem_INSN_X_CHAIN },
-    { FR30BF_INSN_X_BEGIN, && case_sem_INSN_X_BEGIN },
-    { FR30BF_INSN_ADD, && case_sem_INSN_ADD },
-    { FR30BF_INSN_ADDI, && case_sem_INSN_ADDI },
-    { FR30BF_INSN_ADD2, && case_sem_INSN_ADD2 },
-    { FR30BF_INSN_ADDC, && case_sem_INSN_ADDC },
-    { FR30BF_INSN_ADDN, && case_sem_INSN_ADDN },
-    { FR30BF_INSN_ADDNI, && case_sem_INSN_ADDNI },
-    { FR30BF_INSN_ADDN2, && case_sem_INSN_ADDN2 },
-    { FR30BF_INSN_SUB, && case_sem_INSN_SUB },
-    { FR30BF_INSN_SUBC, && case_sem_INSN_SUBC },
-    { FR30BF_INSN_SUBN, && case_sem_INSN_SUBN },
-    { FR30BF_INSN_CMP, && case_sem_INSN_CMP },
-    { FR30BF_INSN_CMPI, && case_sem_INSN_CMPI },
-    { FR30BF_INSN_CMP2, && case_sem_INSN_CMP2 },
-    { FR30BF_INSN_AND, && case_sem_INSN_AND },
-    { FR30BF_INSN_OR, && case_sem_INSN_OR },
-    { FR30BF_INSN_EOR, && case_sem_INSN_EOR },
-    { FR30BF_INSN_ANDM, && case_sem_INSN_ANDM },
-    { FR30BF_INSN_ANDH, && case_sem_INSN_ANDH },
-    { FR30BF_INSN_ANDB, && case_sem_INSN_ANDB },
-    { FR30BF_INSN_ORM, && case_sem_INSN_ORM },
-    { FR30BF_INSN_ORH, && case_sem_INSN_ORH },
-    { FR30BF_INSN_ORB, && case_sem_INSN_ORB },
-    { FR30BF_INSN_EORM, && case_sem_INSN_EORM },
-    { FR30BF_INSN_EORH, && case_sem_INSN_EORH },
-    { FR30BF_INSN_EORB, && case_sem_INSN_EORB },
-    { FR30BF_INSN_BANDL, && case_sem_INSN_BANDL },
-    { FR30BF_INSN_BORL, && case_sem_INSN_BORL },
-    { FR30BF_INSN_BEORL, && case_sem_INSN_BEORL },
-    { FR30BF_INSN_BANDH, && case_sem_INSN_BANDH },
-    { FR30BF_INSN_BORH, && case_sem_INSN_BORH },
-    { FR30BF_INSN_BEORH, && case_sem_INSN_BEORH },
-    { FR30BF_INSN_BTSTL, && case_sem_INSN_BTSTL },
-    { FR30BF_INSN_BTSTH, && case_sem_INSN_BTSTH },
-    { FR30BF_INSN_MUL, && case_sem_INSN_MUL },
-    { FR30BF_INSN_MULU, && case_sem_INSN_MULU },
-    { FR30BF_INSN_MULH, && case_sem_INSN_MULH },
-    { FR30BF_INSN_MULUH, && case_sem_INSN_MULUH },
-    { FR30BF_INSN_DIV0S, && case_sem_INSN_DIV0S },
-    { FR30BF_INSN_DIV0U, && case_sem_INSN_DIV0U },
-    { FR30BF_INSN_DIV1, && case_sem_INSN_DIV1 },
-    { FR30BF_INSN_DIV2, && case_sem_INSN_DIV2 },
-    { FR30BF_INSN_DIV3, && case_sem_INSN_DIV3 },
-    { FR30BF_INSN_DIV4S, && case_sem_INSN_DIV4S },
-    { FR30BF_INSN_LSL, && case_sem_INSN_LSL },
-    { FR30BF_INSN_LSLI, && case_sem_INSN_LSLI },
-    { FR30BF_INSN_LSL2, && case_sem_INSN_LSL2 },
-    { FR30BF_INSN_LSR, && case_sem_INSN_LSR },
-    { FR30BF_INSN_LSRI, && case_sem_INSN_LSRI },
-    { FR30BF_INSN_LSR2, && case_sem_INSN_LSR2 },
-    { FR30BF_INSN_ASR, && case_sem_INSN_ASR },
-    { FR30BF_INSN_ASRI, && case_sem_INSN_ASRI },
-    { FR30BF_INSN_ASR2, && case_sem_INSN_ASR2 },
-    { FR30BF_INSN_LDI8, && case_sem_INSN_LDI8 },
-    { FR30BF_INSN_LDI20, && case_sem_INSN_LDI20 },
-    { FR30BF_INSN_LDI32, && case_sem_INSN_LDI32 },
-    { FR30BF_INSN_LD, && case_sem_INSN_LD },
-    { FR30BF_INSN_LDUH, && case_sem_INSN_LDUH },
-    { FR30BF_INSN_LDUB, && case_sem_INSN_LDUB },
-    { FR30BF_INSN_LDR13, && case_sem_INSN_LDR13 },
-    { FR30BF_INSN_LDR13UH, && case_sem_INSN_LDR13UH },
-    { FR30BF_INSN_LDR13UB, && case_sem_INSN_LDR13UB },
-    { FR30BF_INSN_LDR14, && case_sem_INSN_LDR14 },
-    { FR30BF_INSN_LDR14UH, && case_sem_INSN_LDR14UH },
-    { FR30BF_INSN_LDR14UB, && case_sem_INSN_LDR14UB },
-    { FR30BF_INSN_LDR15, && case_sem_INSN_LDR15 },
-    { FR30BF_INSN_LDR15GR, && case_sem_INSN_LDR15GR },
-    { FR30BF_INSN_LDR15DR, && case_sem_INSN_LDR15DR },
-    { FR30BF_INSN_LDR15PS, && case_sem_INSN_LDR15PS },
-    { FR30BF_INSN_ST, && case_sem_INSN_ST },
-    { FR30BF_INSN_STH, && case_sem_INSN_STH },
-    { FR30BF_INSN_STB, && case_sem_INSN_STB },
-    { FR30BF_INSN_STR13, && case_sem_INSN_STR13 },
-    { FR30BF_INSN_STR13H, && case_sem_INSN_STR13H },
-    { FR30BF_INSN_STR13B, && case_sem_INSN_STR13B },
-    { FR30BF_INSN_STR14, && case_sem_INSN_STR14 },
-    { FR30BF_INSN_STR14H, && case_sem_INSN_STR14H },
-    { FR30BF_INSN_STR14B, && case_sem_INSN_STR14B },
-    { FR30BF_INSN_STR15, && case_sem_INSN_STR15 },
-    { FR30BF_INSN_STR15GR, && case_sem_INSN_STR15GR },
-    { FR30BF_INSN_STR15DR, && case_sem_INSN_STR15DR },
-    { FR30BF_INSN_STR15PS, && case_sem_INSN_STR15PS },
-    { FR30BF_INSN_MOV, && case_sem_INSN_MOV },
-    { FR30BF_INSN_MOVDR, && case_sem_INSN_MOVDR },
-    { FR30BF_INSN_MOVPS, && case_sem_INSN_MOVPS },
-    { FR30BF_INSN_MOV2DR, && case_sem_INSN_MOV2DR },
-    { FR30BF_INSN_MOV2PS, && case_sem_INSN_MOV2PS },
-    { FR30BF_INSN_JMP, && case_sem_INSN_JMP },
-    { FR30BF_INSN_JMPD, && case_sem_INSN_JMPD },
-    { FR30BF_INSN_CALLR, && case_sem_INSN_CALLR },
-    { FR30BF_INSN_CALLRD, && case_sem_INSN_CALLRD },
-    { FR30BF_INSN_CALL, && case_sem_INSN_CALL },
-    { FR30BF_INSN_CALLD, && case_sem_INSN_CALLD },
-    { FR30BF_INSN_RET, && case_sem_INSN_RET },
-    { FR30BF_INSN_RET_D, && case_sem_INSN_RET_D },
-    { FR30BF_INSN_INT, && case_sem_INSN_INT },
-    { FR30BF_INSN_INTE, && case_sem_INSN_INTE },
-    { FR30BF_INSN_RETI, && case_sem_INSN_RETI },
-    { FR30BF_INSN_BRAD, && case_sem_INSN_BRAD },
-    { FR30BF_INSN_BRA, && case_sem_INSN_BRA },
-    { FR30BF_INSN_BNOD, && case_sem_INSN_BNOD },
-    { FR30BF_INSN_BNO, && case_sem_INSN_BNO },
-    { FR30BF_INSN_BEQD, && case_sem_INSN_BEQD },
-    { FR30BF_INSN_BEQ, && case_sem_INSN_BEQ },
-    { FR30BF_INSN_BNED, && case_sem_INSN_BNED },
-    { FR30BF_INSN_BNE, && case_sem_INSN_BNE },
-    { FR30BF_INSN_BCD, && case_sem_INSN_BCD },
-    { FR30BF_INSN_BC, && case_sem_INSN_BC },
-    { FR30BF_INSN_BNCD, && case_sem_INSN_BNCD },
-    { FR30BF_INSN_BNC, && case_sem_INSN_BNC },
-    { FR30BF_INSN_BND, && case_sem_INSN_BND },
-    { FR30BF_INSN_BN, && case_sem_INSN_BN },
-    { FR30BF_INSN_BPD, && case_sem_INSN_BPD },
-    { FR30BF_INSN_BP, && case_sem_INSN_BP },
-    { FR30BF_INSN_BVD, && case_sem_INSN_BVD },
-    { FR30BF_INSN_BV, && case_sem_INSN_BV },
-    { FR30BF_INSN_BNVD, && case_sem_INSN_BNVD },
-    { FR30BF_INSN_BNV, && case_sem_INSN_BNV },
-    { FR30BF_INSN_BLTD, && case_sem_INSN_BLTD },
-    { FR30BF_INSN_BLT, && case_sem_INSN_BLT },
-    { FR30BF_INSN_BGED, && case_sem_INSN_BGED },
-    { FR30BF_INSN_BGE, && case_sem_INSN_BGE },
-    { FR30BF_INSN_BLED, && case_sem_INSN_BLED },
-    { FR30BF_INSN_BLE, && case_sem_INSN_BLE },
-    { FR30BF_INSN_BGTD, && case_sem_INSN_BGTD },
-    { FR30BF_INSN_BGT, && case_sem_INSN_BGT },
-    { FR30BF_INSN_BLSD, && case_sem_INSN_BLSD },
-    { FR30BF_INSN_BLS, && case_sem_INSN_BLS },
-    { FR30BF_INSN_BHID, && case_sem_INSN_BHID },
-    { FR30BF_INSN_BHI, && case_sem_INSN_BHI },
-    { FR30BF_INSN_DMOVR13, && case_sem_INSN_DMOVR13 },
-    { FR30BF_INSN_DMOVR13H, && case_sem_INSN_DMOVR13H },
-    { FR30BF_INSN_DMOVR13B, && case_sem_INSN_DMOVR13B },
-    { FR30BF_INSN_DMOVR13PI, && case_sem_INSN_DMOVR13PI },
-    { FR30BF_INSN_DMOVR13PIH, && case_sem_INSN_DMOVR13PIH },
-    { FR30BF_INSN_DMOVR13PIB, && case_sem_INSN_DMOVR13PIB },
-    { FR30BF_INSN_DMOVR15PI, && case_sem_INSN_DMOVR15PI },
-    { FR30BF_INSN_DMOV2R13, && case_sem_INSN_DMOV2R13 },
-    { FR30BF_INSN_DMOV2R13H, && case_sem_INSN_DMOV2R13H },
-    { FR30BF_INSN_DMOV2R13B, && case_sem_INSN_DMOV2R13B },
-    { FR30BF_INSN_DMOV2R13PI, && case_sem_INSN_DMOV2R13PI },
-    { FR30BF_INSN_DMOV2R13PIH, && case_sem_INSN_DMOV2R13PIH },
-    { FR30BF_INSN_DMOV2R13PIB, && case_sem_INSN_DMOV2R13PIB },
-    { FR30BF_INSN_DMOV2R15PD, && case_sem_INSN_DMOV2R15PD },
-    { FR30BF_INSN_LDRES, && case_sem_INSN_LDRES },
-    { FR30BF_INSN_STRES, && case_sem_INSN_STRES },
-    { FR30BF_INSN_COPOP, && case_sem_INSN_COPOP },
-    { FR30BF_INSN_COPLD, && case_sem_INSN_COPLD },
-    { FR30BF_INSN_COPST, && case_sem_INSN_COPST },
-    { FR30BF_INSN_COPSV, && case_sem_INSN_COPSV },
-    { FR30BF_INSN_NOP, && case_sem_INSN_NOP },
-    { FR30BF_INSN_ANDCCR, && case_sem_INSN_ANDCCR },
-    { FR30BF_INSN_ORCCR, && case_sem_INSN_ORCCR },
-    { FR30BF_INSN_STILM, && case_sem_INSN_STILM },
-    { FR30BF_INSN_ADDSP, && case_sem_INSN_ADDSP },
-    { FR30BF_INSN_EXTSB, && case_sem_INSN_EXTSB },
-    { FR30BF_INSN_EXTUB, && case_sem_INSN_EXTUB },
-    { FR30BF_INSN_EXTSH, && case_sem_INSN_EXTSH },
-    { FR30BF_INSN_EXTUH, && case_sem_INSN_EXTUH },
-    { FR30BF_INSN_LDM0, && case_sem_INSN_LDM0 },
-    { FR30BF_INSN_LDM1, && case_sem_INSN_LDM1 },
-    { FR30BF_INSN_STM0, && case_sem_INSN_STM0 },
-    { FR30BF_INSN_STM1, && case_sem_INSN_STM1 },
-    { FR30BF_INSN_ENTER, && case_sem_INSN_ENTER },
-    { FR30BF_INSN_LEAVE, && case_sem_INSN_LEAVE },
-    { FR30BF_INSN_XCHB, && case_sem_INSN_XCHB },
-    { 0, 0 }
-  };
-  int i;
-
-  for (i = 0; labels[i].label != 0; ++i)
-    {
-#if FAST_P
-      CPU_IDESC (current_cpu) [labels[i].index].sem_fast_lab = labels[i].label;
-#else
-      CPU_IDESC (current_cpu) [labels[i].index].sem_full_lab = labels[i].label;
-#endif
-    }
-
-#undef DEFINE_LABELS
-#endif /* DEFINE_LABELS */
-
-#ifdef DEFINE_SWITCH
-
-/* If hyper-fast [well not unnecessarily slow] execution is selected, turn
-   off frills like tracing and profiling.  */
-/* FIXME: A better way would be to have TRACE_RESULT check for something
-   that can cause it to be optimized out.  Another way would be to emit
-   special handlers into the instruction "stream".  */
-
-#if FAST_P
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#endif
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-{
-
-#if WITH_SCACHE_PBB
-
-/* Branch to next handler without going around main loop.  */
-#define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
-SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
-
-#else /* ! WITH_SCACHE_PBB */
-
-#define NEXT(vpc) BREAK (sem)
-#ifdef __GNUC__
-#if FAST_P
-  SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_fast_lab)
-#else
-  SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_full_lab)
-#endif
-#else
-  SWITCH (sem, SEM_ARGBUF (sc) -> idesc->num)
-#endif
-
-#endif /* ! WITH_SCACHE_PBB */
-
-    {
-
-  CASE (sem, INSN_X_INVALID) : /* --invalid-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-    /* Update the recorded pc in the cpu state struct.
-       Only necessary for WITH_SCACHE case, but to avoid the
-       conditional compilation ....  */
-    SET_H_PC (pc);
-    /* Virtual insns have zero size.  Overwrite vpc with address of next insn
-       using the default-insn-bitsize spec.  When executing insns in parallel
-       we may want to queue the fault and continue execution.  */
-    vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-    vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_X_AFTER) : /* --after-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    fr30bf_pbb_after (current_cpu, sem_arg);
-#endif
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_X_BEFORE) : /* --before-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    fr30bf_pbb_before (current_cpu, sem_arg);
-#endif
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_X_CTI_CHAIN) : /* --cti-chain-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-#ifdef DEFINE_SWITCH
-    vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
-			       pbb_br_type, pbb_br_npc);
-    BREAK (sem);
-#else
-    /* FIXME: Allow provision of explicit ifmt spec in insn spec.  */
-    vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
-			       CPU_PBB_BR_TYPE (current_cpu),
-			       CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_X_CHAIN) : /* --chain-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    vpc = fr30bf_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
-    BREAK (sem);
-#endif
-#endif
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_X_BEGIN) : /* --begin-- */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-#if defined DEFINE_SWITCH || defined FAST_P
-    /* In the switch case FAST_P is a constant, allowing several optimizations
-       in any called inline functions.  */
-    vpc = fr30bf_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet.  */
-    vpc = fr30bf_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
-    vpc = fr30bf_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADD) : /* add $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDI) : /* add $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADD2) : /* add2 $m4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDC) : /* addc $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ADDCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDN) : /* addn $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDNI) : /* addn $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDN2) : /* addn2 $m4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_SUB) : /* sub $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_SUBC) : /* subc $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = SUBCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_SUBN) : /* subn $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CMP) : /* cmp $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CMPI) : /* cmp $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_u4));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CMP2) : /* cmp2 $m4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_m4));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_AND) : /* and $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ANDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_OR) : /* or $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ORSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EOR) : /* eor $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = XORSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ANDM) : /* and $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ANDSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ANDH) : /* andh $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = ANDHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ANDB) : /* andb $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ORM) : /* or $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ORH) : /* orh $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = ORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ORB) : /* orb $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EORM) : /* eor $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = XORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EORH) : /* eorh $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = XORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EORB) : /* eorb $Rj,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = XORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BANDL) : /* bandl $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ANDQI (ORQI (FLD (f_u4), 240), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BORL) : /* borl $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BEORL) : /* beorl $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = XORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BANDH) : /* bandh $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ANDQI (ORQI (SLLQI (FLD (f_u4), 4), 15), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BORH) : /* borh $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BEORH) : /* beorh $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = XORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BTSTL) : /* btstl $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = 0;
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BTSTH) : /* btsth $u4,@$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MUL) : /* mul $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  DI tmp_tmp;
-  tmp_tmp = MULDI (EXTSIDI (* FLD (i_Rj)), EXTSIDI (* FLD (i_Ri)));
-  {
-    SI opval = TRUNCDISI (tmp_tmp);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQDI (tmp_tmp, MAKEDI (0, 0));
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = ORIF (GTDI (tmp_tmp, MAKEDI (0, 2147483647)), LTDI (tmp_tmp, NEGDI (MAKEDI (0, 0x80000000))));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MULU) : /* mulu $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  DI tmp_tmp;
-  tmp_tmp = MULDI (ZEXTSIDI (* FLD (i_Rj)), ZEXTSIDI (* FLD (i_Ri)));
-  {
-    SI opval = TRUNCDISI (tmp_tmp);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = NESI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MULH) : /* mulh $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = MULHI (TRUNCSIHI (* FLD (i_Rj)), TRUNCSIHI (* FLD (i_Ri)));
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MULUH) : /* muluh $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = MULSI (ANDSI (* FLD (i_Rj), 65535), ANDSI (* FLD (i_Ri), 65535));
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV0S) : /* div0s $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_d0bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
-  }
-  {
-    BI opval = XORBI (CPU (h_d0bit), LTSI (* FLD (i_Ri), 0));
-    CPU (h_d1bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
-  }
-if (NEBI (CPU (h_d0bit), 0)) {
-  {
-    SI opval = 0xffffffff;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-} else {
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV0U) : /* div0u $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = 0;
-    CPU (h_d0bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
-  }
-  {
-    BI opval = 0;
-    CPU (h_d1bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
-  }
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV1) : /* div1 $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  {
-    SI opval = SLLSI (GET_H_DR (((UINT) 4)), 1);
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-if (LTSI (GET_H_DR (((UINT) 5)), 0)) {
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 4)), 1);
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-  {
-    SI opval = SLLSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-if (EQBI (CPU (h_d1bit), 1)) {
-{
-  tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-} else {
-{
-  tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-}
-if (NOTBI (XORBI (XORBI (CPU (h_d0bit), CPU (h_d1bit)), CPU (h_cbit)))) {
-{
-  {
-    SI opval = tmp_tmp;
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = ORSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-  {
-    BI opval = EQSI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV2) : /* div2 $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-if (EQBI (CPU (h_d1bit), 1)) {
-{
-  tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-} else {
-{
-  tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-}
-if (EQSI (tmp_tmp, 0)) {
-{
-  {
-    BI opval = 1;
-    CPU (h_zbit) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_zbit) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV3) : /* div3 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (CPU (h_zbit), 1)) {
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DIV4S) : /* div4s */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (CPU (h_d1bit), 1)) {
-  {
-    SI opval = NEGSI (GET_H_DR (((UINT) 5)));
-    SET_H_DR (((UINT) 5), opval);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSL) : /* lsl $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSLI) : /* lsl $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSL2) : /* lsl2 $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSR) : /* lsr $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSRI) : /* lsr $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LSR2) : /* lsr2 $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ASR) : /* asr $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ASRI) : /* asr $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ASR2) : /* asr2 $u4,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDI8) : /* ldi:8 $i8,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldi8.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = FLD (f_i8);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDI20) : /* ldi:20 $i20,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldi20.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-  {
-    SI opval = FLD (f_i20);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDI32) : /* ldi:32 $i32,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldi32.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
-
-  {
-    SI opval = FLD (f_i32);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LD) : /* ld @$Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDUH) : /* lduh @$Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDUB) : /* ldub @$Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR13) : /* ld @($R13,$Rj),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR13UH) : /* lduh @($R13,$Rj),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR13UB) : /* ldub @($R13,$Rj),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR14) : /* ld @($R14,$disp10),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr14.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR14UH) : /* lduh @($R14,$disp9),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr14uh.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR14UB) : /* ldub @($R14,$disp8),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr14ub.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR15) : /* ld @($R15,$udisp6),$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr15.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_udisp6), CPU (h_gr[((UINT) 15)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR15GR) : /* ld @$R15+,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr15gr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-if (NESI (FLD (f_Ri), 15)) {
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR15DR) : /* ld @$R15+,$Rs2 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SET_H_DR (FLD (f_Rs2), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDR15PS) : /* ld @$R15+,$ps */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    SET_H_PS (opval);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ST) : /* st $Ri,@$Rj */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STH) : /* sth $Ri,@$Rj */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STB) : /* stb $Ri,@$Rj */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR13) : /* st $Ri,@($R13,$Rj) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR13H) : /* sth $Ri,@($R13,$Rj) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR13B) : /* stb $Ri,@($R13,$Rj) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR14) : /* st $Ri,@($R14,$disp10) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str14.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR14H) : /* sth $Ri,@($R14,$disp9) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str14h.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR14B) : /* stb $Ri,@($R14,$disp8) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str14b.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR15) : /* st $Ri,@($R15,$udisp6) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str15.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_udisp6)), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR15GR) : /* st $Ri,@-$R15 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_str15gr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = * FLD (i_Ri);
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR15DR) : /* st $Rs2,@-$R15 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = GET_H_DR (FLD (f_Rs2));
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STR15PS) : /* st $ps,@-$R15 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GET_H_PS ();
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MOV) : /* mov $Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Rj);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MOVDR) : /* mov $Rs1,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GET_H_DR (FLD (f_Rs1));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MOVPS) : /* mov $ps,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GET_H_PS ();
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MOV2DR) : /* mov $Ri,$Rs1 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SET_H_DR (FLD (f_Rs1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_MOV2PS) : /* mov $Ri,$ps */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = * FLD (i_Ri);
-    SET_H_PS (opval);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_JMP) : /* jmp @$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_JMPD) : /* jmp:d @$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CALLR) : /* call @$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (pc, 2);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CALLRD) : /* call:d @$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
-  {
-    SI opval = ADDSI (pc, 4);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CALL) : /* call $label12 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_call.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (pc, 2);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = FLD (i_label12);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_CALLD) : /* call:d $label12 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_call.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
-  {
-    SI opval = ADDSI (pc, 4);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = FLD (i_label12);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_RET) : /* ret */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = GET_H_DR (((UINT) 1));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_RET_D) : /* ret:d */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = GET_H_DR (((UINT) 1));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_INT) : /* int $u8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_int.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-; /*clobber*/
-; /*clobber*/
-; /*clobber*/
-  {
-    SI opval = fr30_int (current_cpu, pc, FLD (f_u8));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_INTE) : /* inte */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-; /*clobber*/
-; /*clobber*/
-; /*clobber*/
-  {
-    SI opval = fr30_inte (current_cpu, pc);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_RETI) : /* reti */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (GET_H_SBIT (), 0)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
-    SET_H_DR (((UINT) 2), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
-    SET_H_PS (opval);
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
-    SET_H_DR (((UINT) 2), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-} else {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
-    SET_H_DR (((UINT) 3), opval);
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
-    SET_H_PS (opval);
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
-    SET_H_DR (((UINT) 3), opval);
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BRAD) : /* bra:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BRA) : /* bra $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNOD) : /* bno:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-((void) 0); /*nop*/
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNO) : /* bno $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BEQD) : /* beq:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_zbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BEQ) : /* beq $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_zbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNED) : /* bne:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNE) : /* bne $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BCD) : /* bc:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_cbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BC) : /* bc $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_cbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNCD) : /* bnc:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_cbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNC) : /* bnc $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_cbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BND) : /* bn:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_nbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BN) : /* bn $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_nbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BPD) : /* bp:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BP) : /* bp $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BVD) : /* bv:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_vbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BV) : /* bv $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_vbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNVD) : /* bnv:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_vbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BNV) : /* bnv $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_vbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLTD) : /* blt:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLT) : /* blt $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BGED) : /* bge:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BGE) : /* bge $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLED) : /* ble:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLE) : /* ble $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BGTD) : /* bgt:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BGT) : /* bgt $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLSD) : /* bls:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BLS) : /* bls $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BHID) : /* bhi:d $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_BHI) : /* bhi $label9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_brad.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13) : /* dmov $R13,@$dir10 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13H) : /* dmovh $R13,@$dir9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13B) : /* dmovb $R13,@$dir8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13PI) : /* dmov @$R13+,@$dir10 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13PIH) : /* dmovh @$R13+,@$dir9 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    HI opval = GETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR13PIB) : /* dmovb @$R13+,@$dir8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    QI opval = GETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOVR15PI) : /* dmov @$R15+,@$dir10 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13) : /* dmov @$dir10,$R13 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13H) : /* dmovh @$dir9,$R13 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13B) : /* dmovb @$dir8,$R13 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13PI) : /* dmov @$dir10,@$R13+ */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13PIH) : /* dmovh @$dir9,@$R13+ */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    HI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
-    SETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R13PIB) : /* dmovb @$dir8,@$R13+ */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    QI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
-    SETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_DMOV2R15PD) : /* dmov @$dir10,@-$R15 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDRES) : /* ldres @$Ri+,$u4 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), 4);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STRES) : /* stres $u4,@$Ri+ */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), 4);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_COPOP) : /* copop $u4c,$ccc,$CRj,$CRi */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_COPLD) : /* copld $u4c,$ccc,$Rjc,$CRi */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_COPST) : /* copst $u4c,$ccc,$CRj,$Ric */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_COPSV) : /* copsv $u4c,$ccc,$CRj,$Ric */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_NOP) : /* nop */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_empty.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ANDCCR) : /* andccr $u8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_int.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ANDQI (GET_H_CCR (), FLD (f_u8));
-    SET_H_CCR (opval);
-    TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ORCCR) : /* orccr $u8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_int.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ORQI (GET_H_CCR (), FLD (f_u8));
-    SET_H_CCR (opval);
-    TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STILM) : /* stilm $u8 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_int.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ANDSI (FLD (f_u8), 31);
-    SET_H_ILM (opval);
-    TRACE_RESULT (current_cpu, abuf, "ilm", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ADDSP) : /* addsp $s10 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_s10));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EXTSB) : /* extsb $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = EXTQISI (ANDQI (* FLD (i_Ri), 255));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EXTUB) : /* extub $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ZEXTQISI (ANDQI (* FLD (i_Ri), 255));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EXTSH) : /* extsh $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = EXTHISI (ANDHI (* FLD (i_Ri), 65535));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_EXTUH) : /* extuh $Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add2.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ZEXTHISI (ANDHI (* FLD (i_Ri), 65535));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDM0) : /* ldm0 ($reglist_low_ld) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldm0.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_low_ld), 1)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 0)]) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 2)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 1)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 4)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 2)]) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 8)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 3)]) = opval;
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 16)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 4)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 32)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 5)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 64)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 6)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 128)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 7)]) = opval;
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LDM1) : /* ldm1 ($reglist_hi_ld) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_ldm1.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_hi_ld), 1)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 8)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 2)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 9)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 4)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 10)]) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 8)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 11)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 16)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 12)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 32)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 64)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 14)]) = opval;
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 128)) {
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STM0) : /* stm0 ($reglist_low_st) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_stm0.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_low_st), 1)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 7)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 2)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 6)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 4)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 5)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 8)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 4)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 16)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 3)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 32)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 2)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 64)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 1)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 128)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 0)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_STM1) : /* stm1 ($reglist_hi_st) */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_stm1.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_hi_st), 1)) {
-{
-  SI tmp_save_r15;
-  tmp_save_r15 = CPU (h_gr[((UINT) 15)]);
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_save_r15;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 2)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 14)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 4)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 8)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 12)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 16)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 11)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 32)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 10)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 64)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 9)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 128)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 8)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_ENTER) : /* enter $u10 */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_enter.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-  {
-    SI opval = CPU (h_gr[((UINT) 14)]);
-    SETMEMSI (current_cpu, pc, tmp_tmp, opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    CPU (h_gr[((UINT) 14)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), FLD (f_u10));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_LEAVE) : /* leave */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_enter.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 14)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, SUBSI (CPU (h_gr[((UINT) 15)]), 4));
-    CPU (h_gr[((UINT) 14)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-  CASE (sem, INSN_XCHB) : /* xchb @$Rj,$Ri */
-{
-  SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.sfmt_add.f
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = * FLD (i_Ri);
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    UQI opval = tmp_tmp;
-    SETMEMUQI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-#undef FLD
-}
-  NEXT (vpc);
-
-
-    }
-  ENDSWITCH (sem) /* End of semantic switch.  */
-
-  /* At this point `vpc' contains the next insn to execute.  */
-}
-
-#undef DEFINE_SWITCH
-#endif /* DEFINE_SWITCH */
+// OBSOLETE /* Simulator instruction semantics for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #ifdef DEFINE_LABELS
+// OBSOLETE 
+// OBSOLETE   /* The labels have the case they have because the enum of insn types
+// OBSOLETE      is all uppercase and in the non-stdc case the insn symbol is built
+// OBSOLETE      into the enum name.  */
+// OBSOLETE 
+// OBSOLETE   static struct {
+// OBSOLETE     int index;
+// OBSOLETE     void *label;
+// OBSOLETE   } labels[] = {
+// OBSOLETE     { FR30BF_INSN_X_INVALID, && case_sem_INSN_X_INVALID },
+// OBSOLETE     { FR30BF_INSN_X_AFTER, && case_sem_INSN_X_AFTER },
+// OBSOLETE     { FR30BF_INSN_X_BEFORE, && case_sem_INSN_X_BEFORE },
+// OBSOLETE     { FR30BF_INSN_X_CTI_CHAIN, && case_sem_INSN_X_CTI_CHAIN },
+// OBSOLETE     { FR30BF_INSN_X_CHAIN, && case_sem_INSN_X_CHAIN },
+// OBSOLETE     { FR30BF_INSN_X_BEGIN, && case_sem_INSN_X_BEGIN },
+// OBSOLETE     { FR30BF_INSN_ADD, && case_sem_INSN_ADD },
+// OBSOLETE     { FR30BF_INSN_ADDI, && case_sem_INSN_ADDI },
+// OBSOLETE     { FR30BF_INSN_ADD2, && case_sem_INSN_ADD2 },
+// OBSOLETE     { FR30BF_INSN_ADDC, && case_sem_INSN_ADDC },
+// OBSOLETE     { FR30BF_INSN_ADDN, && case_sem_INSN_ADDN },
+// OBSOLETE     { FR30BF_INSN_ADDNI, && case_sem_INSN_ADDNI },
+// OBSOLETE     { FR30BF_INSN_ADDN2, && case_sem_INSN_ADDN2 },
+// OBSOLETE     { FR30BF_INSN_SUB, && case_sem_INSN_SUB },
+// OBSOLETE     { FR30BF_INSN_SUBC, && case_sem_INSN_SUBC },
+// OBSOLETE     { FR30BF_INSN_SUBN, && case_sem_INSN_SUBN },
+// OBSOLETE     { FR30BF_INSN_CMP, && case_sem_INSN_CMP },
+// OBSOLETE     { FR30BF_INSN_CMPI, && case_sem_INSN_CMPI },
+// OBSOLETE     { FR30BF_INSN_CMP2, && case_sem_INSN_CMP2 },
+// OBSOLETE     { FR30BF_INSN_AND, && case_sem_INSN_AND },
+// OBSOLETE     { FR30BF_INSN_OR, && case_sem_INSN_OR },
+// OBSOLETE     { FR30BF_INSN_EOR, && case_sem_INSN_EOR },
+// OBSOLETE     { FR30BF_INSN_ANDM, && case_sem_INSN_ANDM },
+// OBSOLETE     { FR30BF_INSN_ANDH, && case_sem_INSN_ANDH },
+// OBSOLETE     { FR30BF_INSN_ANDB, && case_sem_INSN_ANDB },
+// OBSOLETE     { FR30BF_INSN_ORM, && case_sem_INSN_ORM },
+// OBSOLETE     { FR30BF_INSN_ORH, && case_sem_INSN_ORH },
+// OBSOLETE     { FR30BF_INSN_ORB, && case_sem_INSN_ORB },
+// OBSOLETE     { FR30BF_INSN_EORM, && case_sem_INSN_EORM },
+// OBSOLETE     { FR30BF_INSN_EORH, && case_sem_INSN_EORH },
+// OBSOLETE     { FR30BF_INSN_EORB, && case_sem_INSN_EORB },
+// OBSOLETE     { FR30BF_INSN_BANDL, && case_sem_INSN_BANDL },
+// OBSOLETE     { FR30BF_INSN_BORL, && case_sem_INSN_BORL },
+// OBSOLETE     { FR30BF_INSN_BEORL, && case_sem_INSN_BEORL },
+// OBSOLETE     { FR30BF_INSN_BANDH, && case_sem_INSN_BANDH },
+// OBSOLETE     { FR30BF_INSN_BORH, && case_sem_INSN_BORH },
+// OBSOLETE     { FR30BF_INSN_BEORH, && case_sem_INSN_BEORH },
+// OBSOLETE     { FR30BF_INSN_BTSTL, && case_sem_INSN_BTSTL },
+// OBSOLETE     { FR30BF_INSN_BTSTH, && case_sem_INSN_BTSTH },
+// OBSOLETE     { FR30BF_INSN_MUL, && case_sem_INSN_MUL },
+// OBSOLETE     { FR30BF_INSN_MULU, && case_sem_INSN_MULU },
+// OBSOLETE     { FR30BF_INSN_MULH, && case_sem_INSN_MULH },
+// OBSOLETE     { FR30BF_INSN_MULUH, && case_sem_INSN_MULUH },
+// OBSOLETE     { FR30BF_INSN_DIV0S, && case_sem_INSN_DIV0S },
+// OBSOLETE     { FR30BF_INSN_DIV0U, && case_sem_INSN_DIV0U },
+// OBSOLETE     { FR30BF_INSN_DIV1, && case_sem_INSN_DIV1 },
+// OBSOLETE     { FR30BF_INSN_DIV2, && case_sem_INSN_DIV2 },
+// OBSOLETE     { FR30BF_INSN_DIV3, && case_sem_INSN_DIV3 },
+// OBSOLETE     { FR30BF_INSN_DIV4S, && case_sem_INSN_DIV4S },
+// OBSOLETE     { FR30BF_INSN_LSL, && case_sem_INSN_LSL },
+// OBSOLETE     { FR30BF_INSN_LSLI, && case_sem_INSN_LSLI },
+// OBSOLETE     { FR30BF_INSN_LSL2, && case_sem_INSN_LSL2 },
+// OBSOLETE     { FR30BF_INSN_LSR, && case_sem_INSN_LSR },
+// OBSOLETE     { FR30BF_INSN_LSRI, && case_sem_INSN_LSRI },
+// OBSOLETE     { FR30BF_INSN_LSR2, && case_sem_INSN_LSR2 },
+// OBSOLETE     { FR30BF_INSN_ASR, && case_sem_INSN_ASR },
+// OBSOLETE     { FR30BF_INSN_ASRI, && case_sem_INSN_ASRI },
+// OBSOLETE     { FR30BF_INSN_ASR2, && case_sem_INSN_ASR2 },
+// OBSOLETE     { FR30BF_INSN_LDI8, && case_sem_INSN_LDI8 },
+// OBSOLETE     { FR30BF_INSN_LDI20, && case_sem_INSN_LDI20 },
+// OBSOLETE     { FR30BF_INSN_LDI32, && case_sem_INSN_LDI32 },
+// OBSOLETE     { FR30BF_INSN_LD, && case_sem_INSN_LD },
+// OBSOLETE     { FR30BF_INSN_LDUH, && case_sem_INSN_LDUH },
+// OBSOLETE     { FR30BF_INSN_LDUB, && case_sem_INSN_LDUB },
+// OBSOLETE     { FR30BF_INSN_LDR13, && case_sem_INSN_LDR13 },
+// OBSOLETE     { FR30BF_INSN_LDR13UH, && case_sem_INSN_LDR13UH },
+// OBSOLETE     { FR30BF_INSN_LDR13UB, && case_sem_INSN_LDR13UB },
+// OBSOLETE     { FR30BF_INSN_LDR14, && case_sem_INSN_LDR14 },
+// OBSOLETE     { FR30BF_INSN_LDR14UH, && case_sem_INSN_LDR14UH },
+// OBSOLETE     { FR30BF_INSN_LDR14UB, && case_sem_INSN_LDR14UB },
+// OBSOLETE     { FR30BF_INSN_LDR15, && case_sem_INSN_LDR15 },
+// OBSOLETE     { FR30BF_INSN_LDR15GR, && case_sem_INSN_LDR15GR },
+// OBSOLETE     { FR30BF_INSN_LDR15DR, && case_sem_INSN_LDR15DR },
+// OBSOLETE     { FR30BF_INSN_LDR15PS, && case_sem_INSN_LDR15PS },
+// OBSOLETE     { FR30BF_INSN_ST, && case_sem_INSN_ST },
+// OBSOLETE     { FR30BF_INSN_STH, && case_sem_INSN_STH },
+// OBSOLETE     { FR30BF_INSN_STB, && case_sem_INSN_STB },
+// OBSOLETE     { FR30BF_INSN_STR13, && case_sem_INSN_STR13 },
+// OBSOLETE     { FR30BF_INSN_STR13H, && case_sem_INSN_STR13H },
+// OBSOLETE     { FR30BF_INSN_STR13B, && case_sem_INSN_STR13B },
+// OBSOLETE     { FR30BF_INSN_STR14, && case_sem_INSN_STR14 },
+// OBSOLETE     { FR30BF_INSN_STR14H, && case_sem_INSN_STR14H },
+// OBSOLETE     { FR30BF_INSN_STR14B, && case_sem_INSN_STR14B },
+// OBSOLETE     { FR30BF_INSN_STR15, && case_sem_INSN_STR15 },
+// OBSOLETE     { FR30BF_INSN_STR15GR, && case_sem_INSN_STR15GR },
+// OBSOLETE     { FR30BF_INSN_STR15DR, && case_sem_INSN_STR15DR },
+// OBSOLETE     { FR30BF_INSN_STR15PS, && case_sem_INSN_STR15PS },
+// OBSOLETE     { FR30BF_INSN_MOV, && case_sem_INSN_MOV },
+// OBSOLETE     { FR30BF_INSN_MOVDR, && case_sem_INSN_MOVDR },
+// OBSOLETE     { FR30BF_INSN_MOVPS, && case_sem_INSN_MOVPS },
+// OBSOLETE     { FR30BF_INSN_MOV2DR, && case_sem_INSN_MOV2DR },
+// OBSOLETE     { FR30BF_INSN_MOV2PS, && case_sem_INSN_MOV2PS },
+// OBSOLETE     { FR30BF_INSN_JMP, && case_sem_INSN_JMP },
+// OBSOLETE     { FR30BF_INSN_JMPD, && case_sem_INSN_JMPD },
+// OBSOLETE     { FR30BF_INSN_CALLR, && case_sem_INSN_CALLR },
+// OBSOLETE     { FR30BF_INSN_CALLRD, && case_sem_INSN_CALLRD },
+// OBSOLETE     { FR30BF_INSN_CALL, && case_sem_INSN_CALL },
+// OBSOLETE     { FR30BF_INSN_CALLD, && case_sem_INSN_CALLD },
+// OBSOLETE     { FR30BF_INSN_RET, && case_sem_INSN_RET },
+// OBSOLETE     { FR30BF_INSN_RET_D, && case_sem_INSN_RET_D },
+// OBSOLETE     { FR30BF_INSN_INT, && case_sem_INSN_INT },
+// OBSOLETE     { FR30BF_INSN_INTE, && case_sem_INSN_INTE },
+// OBSOLETE     { FR30BF_INSN_RETI, && case_sem_INSN_RETI },
+// OBSOLETE     { FR30BF_INSN_BRAD, && case_sem_INSN_BRAD },
+// OBSOLETE     { FR30BF_INSN_BRA, && case_sem_INSN_BRA },
+// OBSOLETE     { FR30BF_INSN_BNOD, && case_sem_INSN_BNOD },
+// OBSOLETE     { FR30BF_INSN_BNO, && case_sem_INSN_BNO },
+// OBSOLETE     { FR30BF_INSN_BEQD, && case_sem_INSN_BEQD },
+// OBSOLETE     { FR30BF_INSN_BEQ, && case_sem_INSN_BEQ },
+// OBSOLETE     { FR30BF_INSN_BNED, && case_sem_INSN_BNED },
+// OBSOLETE     { FR30BF_INSN_BNE, && case_sem_INSN_BNE },
+// OBSOLETE     { FR30BF_INSN_BCD, && case_sem_INSN_BCD },
+// OBSOLETE     { FR30BF_INSN_BC, && case_sem_INSN_BC },
+// OBSOLETE     { FR30BF_INSN_BNCD, && case_sem_INSN_BNCD },
+// OBSOLETE     { FR30BF_INSN_BNC, && case_sem_INSN_BNC },
+// OBSOLETE     { FR30BF_INSN_BND, && case_sem_INSN_BND },
+// OBSOLETE     { FR30BF_INSN_BN, && case_sem_INSN_BN },
+// OBSOLETE     { FR30BF_INSN_BPD, && case_sem_INSN_BPD },
+// OBSOLETE     { FR30BF_INSN_BP, && case_sem_INSN_BP },
+// OBSOLETE     { FR30BF_INSN_BVD, && case_sem_INSN_BVD },
+// OBSOLETE     { FR30BF_INSN_BV, && case_sem_INSN_BV },
+// OBSOLETE     { FR30BF_INSN_BNVD, && case_sem_INSN_BNVD },
+// OBSOLETE     { FR30BF_INSN_BNV, && case_sem_INSN_BNV },
+// OBSOLETE     { FR30BF_INSN_BLTD, && case_sem_INSN_BLTD },
+// OBSOLETE     { FR30BF_INSN_BLT, && case_sem_INSN_BLT },
+// OBSOLETE     { FR30BF_INSN_BGED, && case_sem_INSN_BGED },
+// OBSOLETE     { FR30BF_INSN_BGE, && case_sem_INSN_BGE },
+// OBSOLETE     { FR30BF_INSN_BLED, && case_sem_INSN_BLED },
+// OBSOLETE     { FR30BF_INSN_BLE, && case_sem_INSN_BLE },
+// OBSOLETE     { FR30BF_INSN_BGTD, && case_sem_INSN_BGTD },
+// OBSOLETE     { FR30BF_INSN_BGT, && case_sem_INSN_BGT },
+// OBSOLETE     { FR30BF_INSN_BLSD, && case_sem_INSN_BLSD },
+// OBSOLETE     { FR30BF_INSN_BLS, && case_sem_INSN_BLS },
+// OBSOLETE     { FR30BF_INSN_BHID, && case_sem_INSN_BHID },
+// OBSOLETE     { FR30BF_INSN_BHI, && case_sem_INSN_BHI },
+// OBSOLETE     { FR30BF_INSN_DMOVR13, && case_sem_INSN_DMOVR13 },
+// OBSOLETE     { FR30BF_INSN_DMOVR13H, && case_sem_INSN_DMOVR13H },
+// OBSOLETE     { FR30BF_INSN_DMOVR13B, && case_sem_INSN_DMOVR13B },
+// OBSOLETE     { FR30BF_INSN_DMOVR13PI, && case_sem_INSN_DMOVR13PI },
+// OBSOLETE     { FR30BF_INSN_DMOVR13PIH, && case_sem_INSN_DMOVR13PIH },
+// OBSOLETE     { FR30BF_INSN_DMOVR13PIB, && case_sem_INSN_DMOVR13PIB },
+// OBSOLETE     { FR30BF_INSN_DMOVR15PI, && case_sem_INSN_DMOVR15PI },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13, && case_sem_INSN_DMOV2R13 },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13H, && case_sem_INSN_DMOV2R13H },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13B, && case_sem_INSN_DMOV2R13B },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13PI, && case_sem_INSN_DMOV2R13PI },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13PIH, && case_sem_INSN_DMOV2R13PIH },
+// OBSOLETE     { FR30BF_INSN_DMOV2R13PIB, && case_sem_INSN_DMOV2R13PIB },
+// OBSOLETE     { FR30BF_INSN_DMOV2R15PD, && case_sem_INSN_DMOV2R15PD },
+// OBSOLETE     { FR30BF_INSN_LDRES, && case_sem_INSN_LDRES },
+// OBSOLETE     { FR30BF_INSN_STRES, && case_sem_INSN_STRES },
+// OBSOLETE     { FR30BF_INSN_COPOP, && case_sem_INSN_COPOP },
+// OBSOLETE     { FR30BF_INSN_COPLD, && case_sem_INSN_COPLD },
+// OBSOLETE     { FR30BF_INSN_COPST, && case_sem_INSN_COPST },
+// OBSOLETE     { FR30BF_INSN_COPSV, && case_sem_INSN_COPSV },
+// OBSOLETE     { FR30BF_INSN_NOP, && case_sem_INSN_NOP },
+// OBSOLETE     { FR30BF_INSN_ANDCCR, && case_sem_INSN_ANDCCR },
+// OBSOLETE     { FR30BF_INSN_ORCCR, && case_sem_INSN_ORCCR },
+// OBSOLETE     { FR30BF_INSN_STILM, && case_sem_INSN_STILM },
+// OBSOLETE     { FR30BF_INSN_ADDSP, && case_sem_INSN_ADDSP },
+// OBSOLETE     { FR30BF_INSN_EXTSB, && case_sem_INSN_EXTSB },
+// OBSOLETE     { FR30BF_INSN_EXTUB, && case_sem_INSN_EXTUB },
+// OBSOLETE     { FR30BF_INSN_EXTSH, && case_sem_INSN_EXTSH },
+// OBSOLETE     { FR30BF_INSN_EXTUH, && case_sem_INSN_EXTUH },
+// OBSOLETE     { FR30BF_INSN_LDM0, && case_sem_INSN_LDM0 },
+// OBSOLETE     { FR30BF_INSN_LDM1, && case_sem_INSN_LDM1 },
+// OBSOLETE     { FR30BF_INSN_STM0, && case_sem_INSN_STM0 },
+// OBSOLETE     { FR30BF_INSN_STM1, && case_sem_INSN_STM1 },
+// OBSOLETE     { FR30BF_INSN_ENTER, && case_sem_INSN_ENTER },
+// OBSOLETE     { FR30BF_INSN_LEAVE, && case_sem_INSN_LEAVE },
+// OBSOLETE     { FR30BF_INSN_XCHB, && case_sem_INSN_XCHB },
+// OBSOLETE     { 0, 0 }
+// OBSOLETE   };
+// OBSOLETE   int i;
+// OBSOLETE 
+// OBSOLETE   for (i = 0; labels[i].label != 0; ++i)
+// OBSOLETE     {
+// OBSOLETE #if FAST_P
+// OBSOLETE       CPU_IDESC (current_cpu) [labels[i].index].sem_fast_lab = labels[i].label;
+// OBSOLETE #else
+// OBSOLETE       CPU_IDESC (current_cpu) [labels[i].index].sem_full_lab = labels[i].label;
+// OBSOLETE #endif
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE #undef DEFINE_LABELS
+// OBSOLETE #endif /* DEFINE_LABELS */
+// OBSOLETE 
+// OBSOLETE #ifdef DEFINE_SWITCH
+// OBSOLETE 
+// OBSOLETE /* If hyper-fast [well not unnecessarily slow] execution is selected, turn
+// OBSOLETE    off frills like tracing and profiling.  */
+// OBSOLETE /* FIXME: A better way would be to have TRACE_RESULT check for something
+// OBSOLETE    that can cause it to be optimized out.  Another way would be to emit
+// OBSOLETE    special handlers into the instruction "stream".  */
+// OBSOLETE 
+// OBSOLETE #if FAST_P
+// OBSOLETE #undef TRACE_RESULT
+// OBSOLETE #define TRACE_RESULT(cpu, abuf, name, type, val)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #undef GET_ATTR
+// OBSOLETE #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+// OBSOLETE #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
+// OBSOLETE #else
+// OBSOLETE #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE 
+// OBSOLETE #if WITH_SCACHE_PBB
+// OBSOLETE 
+// OBSOLETE /* Branch to next handler without going around main loop.  */
+// OBSOLETE #define NEXT(vpc) goto * SEM_ARGBUF (vpc) -> semantic.sem_case
+// OBSOLETE SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case)
+// OBSOLETE 
+// OBSOLETE #else /* ! WITH_SCACHE_PBB */
+// OBSOLETE 
+// OBSOLETE #define NEXT(vpc) BREAK (sem)
+// OBSOLETE #ifdef __GNUC__
+// OBSOLETE #if FAST_P
+// OBSOLETE   SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_fast_lab)
+// OBSOLETE #else
+// OBSOLETE   SWITCH (sem, SEM_ARGBUF (sc) -> idesc->sem_full_lab)
+// OBSOLETE #endif
+// OBSOLETE #else
+// OBSOLETE   SWITCH (sem, SEM_ARGBUF (sc) -> idesc->num)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE #endif /* ! WITH_SCACHE_PBB */
+// OBSOLETE 
+// OBSOLETE     {
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_INVALID) : /* --invalid-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     /* Update the recorded pc in the cpu state struct.
+// OBSOLETE        Only necessary for WITH_SCACHE case, but to avoid the
+// OBSOLETE        conditional compilation ....  */
+// OBSOLETE     SET_H_PC (pc);
+// OBSOLETE     /* Virtual insns have zero size.  Overwrite vpc with address of next insn
+// OBSOLETE        using the default-insn-bitsize spec.  When executing insns in parallel
+// OBSOLETE        we may want to queue the fault and continue execution.  */
+// OBSOLETE     vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE     vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_AFTER) : /* --after-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     fr30bf_pbb_after (current_cpu, sem_arg);
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_BEFORE) : /* --before-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     fr30bf_pbb_before (current_cpu, sem_arg);
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_CTI_CHAIN) : /* --cti-chain-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE #ifdef DEFINE_SWITCH
+// OBSOLETE     vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
+// OBSOLETE 			       pbb_br_type, pbb_br_npc);
+// OBSOLETE     BREAK (sem);
+// OBSOLETE #else
+// OBSOLETE     /* FIXME: Allow provision of explicit ifmt spec in insn spec.  */
+// OBSOLETE     vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
+// OBSOLETE 			       CPU_PBB_BR_TYPE (current_cpu),
+// OBSOLETE 			       CPU_PBB_BR_NPC (current_cpu));
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_CHAIN) : /* --chain-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     vpc = fr30bf_pbb_chain (current_cpu, sem_arg);
+// OBSOLETE #ifdef DEFINE_SWITCH
+// OBSOLETE     BREAK (sem);
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_X_BEGIN) : /* --begin-- */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE #if defined DEFINE_SWITCH || defined FAST_P
+// OBSOLETE     /* In the switch case FAST_P is a constant, allowing several optimizations
+// OBSOLETE        in any called inline functions.  */
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, FAST_P);
+// OBSOLETE #else
+// OBSOLETE #if 0 /* cgen engine can't handle dynamic fast/full switching yet.  */
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
+// OBSOLETE #else
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, 0);
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADD) : /* add $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDI) : /* add $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADD2) : /* add2 $m4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDC) : /* addc $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ADDCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDN) : /* addn $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDNI) : /* addn $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDN2) : /* addn2 $m4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_SUB) : /* sub $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_SUBC) : /* subc $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = SUBCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_SUBN) : /* subn $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CMP) : /* cmp $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CMPI) : /* cmp $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CMP2) : /* cmp2 $m4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_AND) : /* and $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ANDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_OR) : /* or $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ORSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EOR) : /* eor $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = XORSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ANDM) : /* and $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ANDH) : /* andh $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ANDB) : /* andb $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ORM) : /* or $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ORH) : /* orh $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ORB) : /* orb $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EORM) : /* eor $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EORH) : /* eorh $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EORB) : /* eorb $Rj,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BANDL) : /* bandl $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ANDQI (ORQI (FLD (f_u4), 240), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BORL) : /* borl $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BEORL) : /* beorl $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = XORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BANDH) : /* bandh $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ANDQI (ORQI (SLLQI (FLD (f_u4), 4), 15), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BORH) : /* borh $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BEORH) : /* beorh $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = XORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BTSTL) : /* btstl $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BTSTH) : /* btsth $u4,@$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MUL) : /* mul $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   DI tmp_tmp;
+// OBSOLETE   tmp_tmp = MULDI (EXTSIDI (* FLD (i_Rj)), EXTSIDI (* FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (tmp_tmp);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQDI (tmp_tmp, MAKEDI (0, 0));
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ORIF (GTDI (tmp_tmp, MAKEDI (0, 2147483647)), LTDI (tmp_tmp, NEGDI (MAKEDI (0, 0x80000000))));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MULU) : /* mulu $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   DI tmp_tmp;
+// OBSOLETE   tmp_tmp = MULDI (ZEXTSIDI (* FLD (i_Rj)), ZEXTSIDI (* FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (tmp_tmp);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MULH) : /* mulh $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = MULHI (TRUNCSIHI (* FLD (i_Rj)), TRUNCSIHI (* FLD (i_Ri)));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MULUH) : /* muluh $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = MULSI (ANDSI (* FLD (i_Rj), 65535), ANDSI (* FLD (i_Ri), 65535));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV0S) : /* div0s $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_d0bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = XORBI (CPU (h_d0bit), LTSI (* FLD (i_Ri), 0));
+// OBSOLETE     CPU (h_d1bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (NEBI (CPU (h_d0bit), 0)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0xffffffff;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV0U) : /* div0u $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_d0bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_d1bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV1) : /* div1 $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (GET_H_DR (((UINT) 4)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (LTSI (GET_H_DR (((UINT) 5)), 0)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 4)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (NOTBI (XORBI (XORBI (CPU (h_d0bit), CPU (h_d1bit)), CPU (h_cbit)))) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ORSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV2) : /* div2 $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (EQSI (tmp_tmp, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 1;
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV3) : /* div3 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (CPU (h_zbit), 1)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DIV4S) : /* div4s */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = NEGSI (GET_H_DR (((UINT) 5)));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSL) : /* lsl $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSLI) : /* lsl $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSL2) : /* lsl2 $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSR) : /* lsr $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSRI) : /* lsr $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LSR2) : /* lsr2 $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ASR) : /* asr $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ASRI) : /* asr $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ASR2) : /* asr2 $u4,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDI8) : /* ldi:8 $i8,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi8.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i8);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDI20) : /* ldi:20 $i20,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi20.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i20);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDI32) : /* ldi:32 $i32,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi32.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i32);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LD) : /* ld @$Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDUH) : /* lduh @$Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDUB) : /* ldub @$Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR13) : /* ld @($R13,$Rj),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR13UH) : /* lduh @($R13,$Rj),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR13UB) : /* ldub @($R13,$Rj),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR14) : /* ld @($R14,$disp10),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR14UH) : /* lduh @($R14,$disp9),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14uh.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR14UB) : /* ldub @($R14,$disp8),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14ub.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR15) : /* ld @($R15,$udisp6),$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_udisp6), CPU (h_gr[((UINT) 15)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR15GR) : /* ld @$R15+,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15gr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (NESI (FLD (f_Ri), 15)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR15DR) : /* ld @$R15+,$Rs2 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SET_H_DR (FLD (f_Rs2), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDR15PS) : /* ld @$R15+,$ps */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ST) : /* st $Ri,@$Rj */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STH) : /* sth $Ri,@$Rj */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STB) : /* stb $Ri,@$Rj */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR13) : /* st $Ri,@($R13,$Rj) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR13H) : /* sth $Ri,@($R13,$Rj) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR13B) : /* stb $Ri,@($R13,$Rj) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR14) : /* st $Ri,@($R14,$disp10) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR14H) : /* sth $Ri,@($R14,$disp9) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14h.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR14B) : /* stb $Ri,@($R14,$disp8) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14b.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR15) : /* st $Ri,@($R15,$udisp6) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_udisp6)), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR15GR) : /* st $Ri,@-$R15 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15gr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = * FLD (i_Ri);
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR15DR) : /* st $Rs2,@-$R15 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = GET_H_DR (FLD (f_Rs2));
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STR15PS) : /* st $ps,@-$R15 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_PS ();
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MOV) : /* mov $Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Rj);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MOVDR) : /* mov $Rs1,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_DR (FLD (f_Rs1));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MOVPS) : /* mov $ps,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_PS ();
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MOV2DR) : /* mov $Ri,$Rs1 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SET_H_DR (FLD (f_Rs1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_MOV2PS) : /* mov $Ri,$ps */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_JMP) : /* jmp @$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_JMPD) : /* jmp:d @$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CALLR) : /* call @$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 2);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CALLRD) : /* call:d @$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 4);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CALL) : /* call $label12 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 2);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label12);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_CALLD) : /* call:d $label12 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 4);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label12);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_RET) : /* ret */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = GET_H_DR (((UINT) 1));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_RET_D) : /* ret:d */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = GET_H_DR (((UINT) 1));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_INT) : /* int $u8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE   {
+// OBSOLETE     SI opval = fr30_int (current_cpu, pc, FLD (f_u8));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_INTE) : /* inte */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE   {
+// OBSOLETE     SI opval = fr30_inte (current_cpu, pc);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_RETI) : /* reti */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (GET_H_SBIT (), 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 2), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 2), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 3), opval);
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 3), opval);
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BRAD) : /* bra:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BRA) : /* bra $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNOD) : /* bno:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNO) : /* bno $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BEQD) : /* beq:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_zbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BEQ) : /* beq $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_zbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNED) : /* bne:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNE) : /* bne $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BCD) : /* bc:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_cbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BC) : /* bc $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_cbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNCD) : /* bnc:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_cbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNC) : /* bnc $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_cbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BND) : /* bn:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_nbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BN) : /* bn $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_nbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BPD) : /* bp:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BP) : /* bp $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BVD) : /* bv:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_vbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BV) : /* bv $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_vbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNVD) : /* bnv:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_vbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BNV) : /* bnv $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_vbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLTD) : /* blt:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLT) : /* blt $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BGED) : /* bge:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BGE) : /* bge $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLED) : /* ble:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLE) : /* ble $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BGTD) : /* bgt:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BGT) : /* bgt $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLSD) : /* bls:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BLS) : /* bls $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BHID) : /* bhi:d $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_BHI) : /* bhi $label9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13) : /* dmov $R13,@$dir10 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13H) : /* dmovh $R13,@$dir9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13B) : /* dmovb $R13,@$dir8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13PI) : /* dmov @$R13+,@$dir10 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13PIH) : /* dmovh @$R13+,@$dir9 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     HI opval = GETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR13PIB) : /* dmovb @$R13+,@$dir8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     QI opval = GETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOVR15PI) : /* dmov @$R15+,@$dir10 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13) : /* dmov @$dir10,$R13 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13H) : /* dmovh @$dir9,$R13 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13B) : /* dmovb @$dir8,$R13 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13PI) : /* dmov @$dir10,@$R13+ */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13PIH) : /* dmovh @$dir9,@$R13+ */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     HI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
+// OBSOLETE     SETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R13PIB) : /* dmovb @$dir8,@$R13+ */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     QI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
+// OBSOLETE     SETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_DMOV2R15PD) : /* dmov @$dir10,@-$R15 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDRES) : /* ldres @$Ri+,$u4 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), 4);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STRES) : /* stres $u4,@$Ri+ */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), 4);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_COPOP) : /* copop $u4c,$ccc,$CRj,$CRi */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_COPLD) : /* copld $u4c,$ccc,$Rjc,$CRi */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_COPST) : /* copst $u4c,$ccc,$CRj,$Ric */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_COPSV) : /* copsv $u4c,$ccc,$CRj,$Ric */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_NOP) : /* nop */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ANDCCR) : /* andccr $u8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ANDQI (GET_H_CCR (), FLD (f_u8));
+// OBSOLETE     SET_H_CCR (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ORCCR) : /* orccr $u8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ORQI (GET_H_CCR (), FLD (f_u8));
+// OBSOLETE     SET_H_CCR (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STILM) : /* stilm $u8 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ANDSI (FLD (f_u8), 31);
+// OBSOLETE     SET_H_ILM (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ilm", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ADDSP) : /* addsp $s10 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_s10));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EXTSB) : /* extsb $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = EXTQISI (ANDQI (* FLD (i_Ri), 255));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EXTUB) : /* extub $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ZEXTQISI (ANDQI (* FLD (i_Ri), 255));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EXTSH) : /* extsh $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = EXTHISI (ANDHI (* FLD (i_Ri), 65535));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_EXTUH) : /* extuh $Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ZEXTHISI (ANDHI (* FLD (i_Ri), 65535));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDM0) : /* ldm0 ($reglist_low_ld) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm0.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 0)]) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 1)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 2)]) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 3)]) = opval;
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 4)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 5)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 6)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 7)]) = opval;
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LDM1) : /* ldm1 ($reglist_hi_ld) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm1.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 8)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 9)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 10)]) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 11)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 12)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 128)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STM0) : /* stm0 ($reglist_low_st) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm0.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 7)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 6)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 5)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 4)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 3)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 2)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 1)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 0)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_STM1) : /* stm1 ($reglist_hi_st) */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm1.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 1)) {
+// OBSOLETE {
+// OBSOLETE   SI tmp_save_r15;
+// OBSOLETE   tmp_save_r15 = CPU (h_gr[((UINT) 15)]);
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_save_r15;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 14)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 12)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 11)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 10)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 9)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 8)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_ENTER) : /* enter $u10 */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 14)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, tmp_tmp, opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), FLD (f_u10));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_LEAVE) : /* leave */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 14)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, SUBSI (CPU (h_gr[((UINT) 15)]), 4));
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE   CASE (sem, INSN_XCHB) : /* xchb @$Rj,$Ri */
+// OBSOLETE {
+// OBSOLETE   SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = * FLD (i_Ri);
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     UQI opval = tmp_tmp;
+// OBSOLETE     SETMEMUQI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE   NEXT (vpc);
+// OBSOLETE 
+// OBSOLETE 
+// OBSOLETE     }
+// OBSOLETE   ENDSWITCH (sem) /* End of semantic switch.  */
+// OBSOLETE 
+// OBSOLETE   /* At this point `vpc' contains the next insn to execute.  */
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE #undef DEFINE_SWITCH
+// OBSOLETE #endif /* DEFINE_SWITCH */
diff --git a/sim/fr30/sem.c b/sim/fr30/sem.c
index fb90a55..de61ba6 100644
--- a/sim/fr30/sem.c
+++ b/sim/fr30/sem.c
@@ -1,5730 +1,5729 @@
-/* Simulator instruction semantics for fr30bf.
-
-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 simulators.
-
-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.
-
-*/
-
-#define WANT_CPU fr30bf
-#define WANT_CPU_FR30BF
-
-#include "sim-main.h"
-#include "cgen-mem.h"
-#include "cgen-ops.h"
-
-#undef GET_ATTR
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
-#else
-#define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
-#endif
-
-/* This is used so that we can compile two copies of the semantic code,
-   one with full feature support and one without that runs fast(er).
-   FAST_P, when desired, is defined on the command line, -DFAST_P=1.  */
-#if FAST_P
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
-#undef TRACE_RESULT
-#define TRACE_RESULT(cpu, abuf, name, type, val)
-#else
-#define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
-#endif
-
-/* x-invalid: --invalid-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-    /* Update the recorded pc in the cpu state struct.
-       Only necessary for WITH_SCACHE case, but to avoid the
-       conditional compilation ....  */
-    SET_H_PC (pc);
-    /* Virtual insns have zero size.  Overwrite vpc with address of next insn
-       using the default-insn-bitsize spec.  When executing insns in parallel
-       we may want to queue the fault and continue execution.  */
-    vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-    vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* x-after: --after-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    fr30bf_pbb_after (current_cpu, sem_arg);
-#endif
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* x-before: --before-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    fr30bf_pbb_before (current_cpu, sem_arg);
-#endif
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* x-cti-chain: --cti-chain-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-#ifdef DEFINE_SWITCH
-    vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
-			       pbb_br_type, pbb_br_npc);
-    BREAK (sem);
-#else
-    /* FIXME: Allow provision of explicit ifmt spec in insn spec.  */
-    vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
-			       CPU_PBB_BR_TYPE (current_cpu),
-			       CPU_PBB_BR_NPC (current_cpu));
-#endif
-#endif
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* x-chain: --chain-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-    vpc = fr30bf_pbb_chain (current_cpu, sem_arg);
-#ifdef DEFINE_SWITCH
-    BREAK (sem);
-#endif
-#endif
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* x-begin: --begin-- */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
-
-  {
-#if WITH_SCACHE_PBB_FR30BF
-#if defined DEFINE_SWITCH || defined FAST_P
-    /* In the switch case FAST_P is a constant, allowing several optimizations
-       in any called inline functions.  */
-    vpc = fr30bf_pbb_begin (current_cpu, FAST_P);
-#else
-#if 0 /* cgen engine can't handle dynamic fast/full switching yet.  */
-    vpc = fr30bf_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
-#else
-    vpc = fr30bf_pbb_begin (current_cpu, 0);
-#endif
-#endif
-#endif
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* add: add $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* addi: add $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* add2: add2 $m4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,add2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* addc: addc $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ADDCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-  {
-    BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* addn: addn $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* addni: addn $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addni) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* addn2: addn2 $m4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addn2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* sub: sub $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* subc: subc $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,subc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = SUBCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* subn: subn $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,subn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* cmp: cmp $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* cmpi: cmp $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_u4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_u4));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* cmp2: cmp2 $m4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,cmp2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp1;
-  {
-    BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-  {
-    BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_m4), 0);
-    CPU (h_cbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_m4));
-{
-  {
-    BI opval = EQSI (tmp_tmp1, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp1, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* and: and $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ANDSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* or: or $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ORSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* eor: eor $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,eor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = XORSI (* FLD (i_Ri), * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-{
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* andm: and $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,andm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ANDSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* andh: andh $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,andh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = ANDHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* andb: andb $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,andb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* orm: or $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,orm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = ORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* orh: orh $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,orh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = ORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* orb: orb $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,orb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* eorm: eor $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,eorm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = XORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQSI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTSI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* eorh: eorh $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,eorh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  HI tmp_tmp;
-  tmp_tmp = XORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQHI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTHI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    HI opval = tmp_tmp;
-    SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* eorb: eorb $Rj,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,eorb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = XORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
-{
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-  {
-    QI opval = tmp_tmp;
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* bandl: bandl $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bandl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ANDQI (ORQI (FLD (f_u4), 240), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* borl: borl $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,borl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* beorl: beorl $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,beorl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = XORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* bandh: bandh $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bandh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ANDQI (ORQI (SLLQI (FLD (f_u4), 4), 15), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* borh: borh $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,borh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = ORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* beorh: beorh $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,beorh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = XORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-    SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* btstl: btstl $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,btstl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = 0;
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* btsth: btsth $u4,@$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,btsth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  QI tmp_tmp;
-  tmp_tmp = ANDQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
-  {
-    BI opval = EQQI (tmp_tmp, 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = LTQI (tmp_tmp, 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* mul: mul $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  DI tmp_tmp;
-  tmp_tmp = MULDI (EXTSIDI (* FLD (i_Rj)), EXTSIDI (* FLD (i_Ri)));
-  {
-    SI opval = TRUNCDISI (tmp_tmp);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQDI (tmp_tmp, MAKEDI (0, 0));
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = ORIF (GTDI (tmp_tmp, MAKEDI (0, 2147483647)), LTDI (tmp_tmp, NEGDI (MAKEDI (0, 0x80000000))));
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* mulu: mulu $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mulu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  DI tmp_tmp;
-  tmp_tmp = MULDI (ZEXTSIDI (* FLD (i_Rj)), ZEXTSIDI (* FLD (i_Ri)));
-  {
-    SI opval = TRUNCDISI (tmp_tmp);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    BI opval = NESI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_vbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* mulh: mulh $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mulh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = MULHI (TRUNCSIHI (* FLD (i_Rj)), TRUNCSIHI (* FLD (i_Ri)));
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* muluh: muluh $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,muluh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = MULSI (ANDSI (* FLD (i_Rj), 65535), ANDSI (* FLD (i_Ri), 65535));
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* div0s: div0s $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div0s) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
-    CPU (h_d0bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
-  }
-  {
-    BI opval = XORBI (CPU (h_d0bit), LTSI (* FLD (i_Ri), 0));
-    CPU (h_d1bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
-  }
-if (NEBI (CPU (h_d0bit), 0)) {
-  {
-    SI opval = 0xffffffff;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-} else {
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* div0u: div0u $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div0u) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    BI opval = 0;
-    CPU (h_d0bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
-  }
-  {
-    BI opval = 0;
-    CPU (h_d1bit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
-  }
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* div1: div1 $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  {
-    SI opval = SLLSI (GET_H_DR (((UINT) 4)), 1);
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-if (LTSI (GET_H_DR (((UINT) 5)), 0)) {
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 4)), 1);
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-  {
-    SI opval = SLLSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-if (EQBI (CPU (h_d1bit), 1)) {
-{
-  tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-} else {
-{
-  tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-}
-if (NOTBI (XORBI (XORBI (CPU (h_d0bit), CPU (h_d1bit)), CPU (h_cbit)))) {
-{
-  {
-    SI opval = tmp_tmp;
-    SET_H_DR (((UINT) 4), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = ORSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-  {
-    BI opval = EQSI (GET_H_DR (((UINT) 4)), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* div2: div2 $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-if (EQBI (CPU (h_d1bit), 1)) {
-{
-  tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-} else {
-{
-  tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
-  {
-    BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-}
-if (EQSI (tmp_tmp, 0)) {
-{
-  {
-    BI opval = 1;
-    CPU (h_zbit) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-  {
-    SI opval = 0;
-    SET_H_DR (((UINT) 4), opval);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_zbit) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* div3: div3 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (CPU (h_zbit), 1)) {
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 5)), 1);
-    SET_H_DR (((UINT) 5), opval);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* div4s: div4s */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,div4s) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (CPU (h_d1bit), 1)) {
-  {
-    SI opval = NEGSI (GET_H_DR (((UINT) 5)));
-    SET_H_DR (((UINT) 5), opval);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsl: lsl $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsli: lsl $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsl2: lsl2 $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsl2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsr: lsr $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsri: lsr $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* lsr2: lsr2 $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lsr2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* asr: asr $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,asr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ANDSI (* FLD (i_Rj), 31);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* asri: asr $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,asri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = FLD (f_u4);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* asr2: asr2 $u4,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,asr2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_shift;
-  tmp_shift = ADDSI (FLD (f_u4), 16);
-if (NESI (tmp_shift, 0)) {
-{
-  {
-    BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-  {
-    SI opval = SRASI (* FLD (i_Ri), tmp_shift);
-    * FLD (i_Ri) = opval;
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-} else {
-  {
-    BI opval = 0;
-    CPU (h_cbit) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
-  }
-}
-  {
-    BI opval = LTSI (* FLD (i_Ri), 0);
-    CPU (h_nbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
-  }
-  {
-    BI opval = EQSI (* FLD (i_Ri), 0);
-    CPU (h_zbit) = opval;
-    TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* ldi8: ldi:8 $i8,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi8.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = FLD (f_i8);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldi20: ldi:20 $i20,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldi20) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi20.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-  {
-    SI opval = FLD (f_i20);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldi32: ldi:32 $i32,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldi32) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldi32.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
-
-  {
-    SI opval = FLD (f_i32);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ld: ld @$Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* lduh: lduh @$Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldub: ldub @$Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr13: ld @($R13,$Rj),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr13uh: lduh @($R13,$Rj),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr13uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr13ub: ldub @($R13,$Rj),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr13ub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr14: ld @($R14,$disp10),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr14) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr14uh: lduh @($R14,$disp9),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr14uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14uh.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr14ub: ldub @($R14,$disp8),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr14ub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr14ub.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr15: ld @($R15,$udisp6),$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr15) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_udisp6), CPU (h_gr[((UINT) 15)])));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr15gr: ld @$R15+,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr15gr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15gr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-if (NESI (FLD (f_Ri), 15)) {
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* ldr15dr: ld @$R15+,$Rs2 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr15dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SET_H_DR (FLD (f_Rs2), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* ldr15ps: ld @$R15+,$ps */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldr15ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    SET_H_PS (opval);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* st: st $Ri,@$Rj */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* sth: sth $Ri,@$Rj */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* stb: stb $Ri,@$Rj */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str13: st $Ri,@($R13,$Rj) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str13h: sth $Ri,@($R13,$Rj) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str13b: stb $Ri,@($R13,$Rj) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str14: st $Ri,@($R14,$disp10) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str14) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str14h: sth $Ri,@($R14,$disp9) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str14h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14h.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = * FLD (i_Ri);
-    SETMEMHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str14b: stb $Ri,@($R14,$disp8) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str14b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str14b.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = * FLD (i_Ri);
-    SETMEMQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str15: st $Ri,@($R15,$udisp6) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str15) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str15.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_udisp6)), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* str15gr: st $Ri,@-$R15 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str15gr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_str15gr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = * FLD (i_Ri);
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* str15dr: st $Rs2,@-$R15 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str15dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr15dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = GET_H_DR (FLD (f_Rs2));
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* str15ps: st $ps,@-$R15 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,str15ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GET_H_PS ();
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* mov: mov $Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mov) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldr13.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Rj);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* movdr: mov $Rs1,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,movdr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GET_H_DR (FLD (f_Rs1));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* movps: mov $ps,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,movps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_movdr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GET_H_PS ();
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* mov2dr: mov $Ri,$Rs1 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mov2dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = * FLD (i_Ri);
-    SET_H_DR (FLD (f_Rs1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* mov2ps: mov $Ri,$ps */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,mov2ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = * FLD (i_Ri);
-    SET_H_PS (opval);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* jmp: jmp @$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* jmpd: jmp:d @$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,jmpd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* callr: call @$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,callr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (pc, 2);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* callrd: call:d @$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,callrd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_mov2dr.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
-  {
-    SI opval = ADDSI (pc, 4);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = * FLD (i_Ri);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* call: call $label12 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,call) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_call.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (pc, 2);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = FLD (i_label12);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* calld: call:d $label12 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,calld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_call.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-{
-  {
-    SI opval = ADDSI (pc, 4);
-    SET_H_DR (((UINT) 1), opval);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    USI opval = FLD (i_label12);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* ret: ret */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ret) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = GET_H_DR (((UINT) 1));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* ret:d: ret:d */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ret_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = GET_H_DR (((UINT) 1));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* int: int $u8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,int) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-; /*clobber*/
-; /*clobber*/
-; /*clobber*/
-  {
-    SI opval = fr30_int (current_cpu, pc, FLD (f_u8));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* inte: inte */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,inte) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-; /*clobber*/
-; /*clobber*/
-; /*clobber*/
-  {
-    SI opval = fr30_inte (current_cpu, pc);
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* reti: reti */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,reti) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (EQBI (GET_H_SBIT (), 0)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
-    SET_H_DR (((UINT) 2), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
-    SET_H_PS (opval);
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
-    SET_H_DR (((UINT) 2), opval);
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-} else {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
-    SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
-    SET_H_DR (((UINT) 3), opval);
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
-    SET_H_PS (opval);
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
-    SET_H_DR (((UINT) 3), opval);
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* brad: bra:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,brad) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bra: bra $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bra) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bnod: bno:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bnod) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-((void) 0); /*nop*/
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* bno: bno $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bno) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* beqd: beq:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,beqd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_zbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* beq: beq $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_zbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bned: bne:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bned) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bne: bne $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bcd: bc:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bcd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_cbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bc: bc $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_cbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bncd: bnc:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bncd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_cbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bnc: bnc $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bnc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_cbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bnd: bn:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bnd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_nbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bn: bn $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_nbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bpd: bp:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bpd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bp: bp $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bvd: bv:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bvd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (CPU (h_vbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bv: bv $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (CPU (h_vbit)) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bnvd: bnv:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bnvd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (CPU (h_vbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bnv: bnv $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bnv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (CPU (h_vbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 2);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bltd: blt:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bltd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* blt: blt $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,blt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bged: bge:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bged) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bge: bge $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bge) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bled: ble:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bled) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* ble: ble $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ble) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bgtd: bgt:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bgtd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bgt: bgt $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bgt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* blsd: bls:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,blsd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bls: bls $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bhid: bhi:d $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bhid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* bhi: bhi $label9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,bhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_brad.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_BRANCH_INIT
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
-  {
-    USI opval = FLD (i_label9);
-    SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
-  }
-}
-
-  abuf->written = written;
-  SEM_BRANCH_FINI (vpc);
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13: dmov $R13,@$dir10 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13h: dmovh $R13,@$dir9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    HI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13b: dmovb $R13,@$dir8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    QI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13pi: dmov @$R13+,@$dir10 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13pih: dmovh @$R13+,@$dir9 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13pih) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    HI opval = GETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr13pib: dmovb @$R13+,@$dir8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr13pib) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    QI opval = GETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
-    SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmovr15pi: dmov @$R15+,@$dir10 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmovr15pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13: dmov @$dir10,$R13 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13h: dmovh @$dir9,$R13 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13b: dmovb @$dir8,$R13 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13pi: dmov @$dir10,@$R13+ */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13pih: dmovh @$dir9,@$R13+ */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13pih) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pih.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    HI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
-    SETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r13pib: dmovb @$dir8,@$R13+ */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r13pib) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr13pib.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    QI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
-    SETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
-    CPU (h_gr[((UINT) 13)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* dmov2r15pd: dmov @$dir10,@-$R15 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,dmov2r15pd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_dmovr15pi.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* ldres: ldres @$Ri+,$u4 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldres) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), 4);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* stres: stres $u4,@$Ri+ */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,stres) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (* FLD (i_Ri), 4);
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* copop: copop $u4c,$ccc,$CRj,$CRi */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,copop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* copld: copld $u4c,$ccc,$Rjc,$CRi */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,copld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* copst: copst $u4c,$ccc,$CRj,$Ric */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,copst) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* copsv: copsv $u4c,$ccc,$CRj,$Ric */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,copsv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* nop: nop */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.fmt_empty.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-((void) 0); /*nop*/
-
-  return vpc;
-#undef FLD
-}
-
-/* andccr: andccr $u8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,andccr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ANDQI (GET_H_CCR (), FLD (f_u8));
-    SET_H_CCR (opval);
-    TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* orccr: orccr $u8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,orccr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ORQI (GET_H_CCR (), FLD (f_u8));
-    SET_H_CCR (opval);
-    TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* stilm: stilm $u8 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,stilm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_int.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    UQI opval = ANDSI (FLD (f_u8), 31);
-    SET_H_ILM (opval);
-    TRACE_RESULT (current_cpu, abuf, "ilm", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* addsp: addsp $s10 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,addsp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_addsp.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_s10));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* extsb: extsb $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,extsb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = EXTQISI (ANDQI (* FLD (i_Ri), 255));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* extub: extub $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,extub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ZEXTQISI (ANDQI (* FLD (i_Ri), 255));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* extsh: extsh $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,extsh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = EXTHISI (ANDHI (* FLD (i_Ri), 65535));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* extuh: extuh $Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,extuh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add2.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-  {
-    SI opval = ZEXTHISI (ANDHI (* FLD (i_Ri), 65535));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-
-  return vpc;
-#undef FLD
-}
-
-/* ldm0: ldm0 ($reglist_low_ld) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldm0) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldm0.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_low_ld), 1)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 0)]) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 2)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 1)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 4)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 2)]) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 8)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 3)]) = opval;
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 16)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 4)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 32)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 5)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 64)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 6)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_ld), 128)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 7)]) = opval;
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* ldm1: ldm1 ($reglist_hi_ld) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,ldm1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_ldm1.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_hi_ld), 1)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 8)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 2)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 9)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 4)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 10)]) = opval;
-    written |= (1 << 3);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 8)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 11)]) = opval;
-    written |= (1 << 4);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 16)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 12)]) = opval;
-    written |= (1 << 5);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 32)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 13)]) = opval;
-    written |= (1 << 6);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 64)) {
-{
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 14)]) = opval;
-    written |= (1 << 7);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_ld), 128)) {
-  {
-    SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 8);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* stm0: stm0 ($reglist_low_st) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,stm0) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_stm0.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_low_st), 1)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 7)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 2)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 6)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 4)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 5)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 8)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 4)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 16)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 3)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 32)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 2)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 64)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 1)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_low_st), 128)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 0)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 11);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* stm1: stm1 ($reglist_hi_st) */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,stm1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_stm1.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-if (ANDSI (FLD (f_reglist_hi_st), 1)) {
-{
-  SI tmp_save_r15;
-  tmp_save_r15 = CPU (h_gr[((UINT) 15)]);
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = tmp_save_r15;
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 2)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 14)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 4)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 13)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 8)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 12)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 16)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 11)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 32)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 10)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 64)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 9)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-if (ANDSI (FLD (f_reglist_hi_st), 128)) {
-{
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    written |= (1 << 9);
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = CPU (h_gr[((UINT) 8)]);
-    SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
-    written |= (1 << 10);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-}
-}
-
-  abuf->written = written;
-  return vpc;
-#undef FLD
-}
-
-/* enter: enter $u10 */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,enter) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_enter.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
-  {
-    SI opval = CPU (h_gr[((UINT) 14)]);
-    SETMEMSI (current_cpu, pc, tmp_tmp, opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-  {
-    SI opval = tmp_tmp;
-    CPU (h_gr[((UINT) 14)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), FLD (f_u10));
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* leave: leave */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,leave) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_enter.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  {
-    SI opval = ADDSI (CPU (h_gr[((UINT) 14)]), 4);
-    CPU (h_gr[((UINT) 15)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    SI opval = GETMEMSI (current_cpu, pc, SUBSI (CPU (h_gr[((UINT) 15)]), 4));
-    CPU (h_gr[((UINT) 14)]) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* xchb: xchb @$Rj,$Ri */
-
-static SEM_PC
-SEM_FN_NAME (fr30bf,xchb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
-{
-#define FLD(f) abuf->fields.sfmt_add.f
-  ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-  int UNUSED written = 0;
-  IADDR UNUSED pc = abuf->addr;
-  SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
-
-{
-  SI tmp_tmp;
-  tmp_tmp = * FLD (i_Ri);
-  {
-    SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
-    * FLD (i_Ri) = opval;
-    TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
-  }
-  {
-    UQI opval = tmp_tmp;
-    SETMEMUQI (current_cpu, pc, * FLD (i_Rj), opval);
-    TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
-  }
-}
-
-  return vpc;
-#undef FLD
-}
-
-/* Table of all semantic fns.  */
-
-static const struct sem_fn_desc sem_fns[] = {
-  { FR30BF_INSN_X_INVALID, SEM_FN_NAME (fr30bf,x_invalid) },
-  { FR30BF_INSN_X_AFTER, SEM_FN_NAME (fr30bf,x_after) },
-  { FR30BF_INSN_X_BEFORE, SEM_FN_NAME (fr30bf,x_before) },
-  { FR30BF_INSN_X_CTI_CHAIN, SEM_FN_NAME (fr30bf,x_cti_chain) },
-  { FR30BF_INSN_X_CHAIN, SEM_FN_NAME (fr30bf,x_chain) },
-  { FR30BF_INSN_X_BEGIN, SEM_FN_NAME (fr30bf,x_begin) },
-  { FR30BF_INSN_ADD, SEM_FN_NAME (fr30bf,add) },
-  { FR30BF_INSN_ADDI, SEM_FN_NAME (fr30bf,addi) },
-  { FR30BF_INSN_ADD2, SEM_FN_NAME (fr30bf,add2) },
-  { FR30BF_INSN_ADDC, SEM_FN_NAME (fr30bf,addc) },
-  { FR30BF_INSN_ADDN, SEM_FN_NAME (fr30bf,addn) },
-  { FR30BF_INSN_ADDNI, SEM_FN_NAME (fr30bf,addni) },
-  { FR30BF_INSN_ADDN2, SEM_FN_NAME (fr30bf,addn2) },
-  { FR30BF_INSN_SUB, SEM_FN_NAME (fr30bf,sub) },
-  { FR30BF_INSN_SUBC, SEM_FN_NAME (fr30bf,subc) },
-  { FR30BF_INSN_SUBN, SEM_FN_NAME (fr30bf,subn) },
-  { FR30BF_INSN_CMP, SEM_FN_NAME (fr30bf,cmp) },
-  { FR30BF_INSN_CMPI, SEM_FN_NAME (fr30bf,cmpi) },
-  { FR30BF_INSN_CMP2, SEM_FN_NAME (fr30bf,cmp2) },
-  { FR30BF_INSN_AND, SEM_FN_NAME (fr30bf,and) },
-  { FR30BF_INSN_OR, SEM_FN_NAME (fr30bf,or) },
-  { FR30BF_INSN_EOR, SEM_FN_NAME (fr30bf,eor) },
-  { FR30BF_INSN_ANDM, SEM_FN_NAME (fr30bf,andm) },
-  { FR30BF_INSN_ANDH, SEM_FN_NAME (fr30bf,andh) },
-  { FR30BF_INSN_ANDB, SEM_FN_NAME (fr30bf,andb) },
-  { FR30BF_INSN_ORM, SEM_FN_NAME (fr30bf,orm) },
-  { FR30BF_INSN_ORH, SEM_FN_NAME (fr30bf,orh) },
-  { FR30BF_INSN_ORB, SEM_FN_NAME (fr30bf,orb) },
-  { FR30BF_INSN_EORM, SEM_FN_NAME (fr30bf,eorm) },
-  { FR30BF_INSN_EORH, SEM_FN_NAME (fr30bf,eorh) },
-  { FR30BF_INSN_EORB, SEM_FN_NAME (fr30bf,eorb) },
-  { FR30BF_INSN_BANDL, SEM_FN_NAME (fr30bf,bandl) },
-  { FR30BF_INSN_BORL, SEM_FN_NAME (fr30bf,borl) },
-  { FR30BF_INSN_BEORL, SEM_FN_NAME (fr30bf,beorl) },
-  { FR30BF_INSN_BANDH, SEM_FN_NAME (fr30bf,bandh) },
-  { FR30BF_INSN_BORH, SEM_FN_NAME (fr30bf,borh) },
-  { FR30BF_INSN_BEORH, SEM_FN_NAME (fr30bf,beorh) },
-  { FR30BF_INSN_BTSTL, SEM_FN_NAME (fr30bf,btstl) },
-  { FR30BF_INSN_BTSTH, SEM_FN_NAME (fr30bf,btsth) },
-  { FR30BF_INSN_MUL, SEM_FN_NAME (fr30bf,mul) },
-  { FR30BF_INSN_MULU, SEM_FN_NAME (fr30bf,mulu) },
-  { FR30BF_INSN_MULH, SEM_FN_NAME (fr30bf,mulh) },
-  { FR30BF_INSN_MULUH, SEM_FN_NAME (fr30bf,muluh) },
-  { FR30BF_INSN_DIV0S, SEM_FN_NAME (fr30bf,div0s) },
-  { FR30BF_INSN_DIV0U, SEM_FN_NAME (fr30bf,div0u) },
-  { FR30BF_INSN_DIV1, SEM_FN_NAME (fr30bf,div1) },
-  { FR30BF_INSN_DIV2, SEM_FN_NAME (fr30bf,div2) },
-  { FR30BF_INSN_DIV3, SEM_FN_NAME (fr30bf,div3) },
-  { FR30BF_INSN_DIV4S, SEM_FN_NAME (fr30bf,div4s) },
-  { FR30BF_INSN_LSL, SEM_FN_NAME (fr30bf,lsl) },
-  { FR30BF_INSN_LSLI, SEM_FN_NAME (fr30bf,lsli) },
-  { FR30BF_INSN_LSL2, SEM_FN_NAME (fr30bf,lsl2) },
-  { FR30BF_INSN_LSR, SEM_FN_NAME (fr30bf,lsr) },
-  { FR30BF_INSN_LSRI, SEM_FN_NAME (fr30bf,lsri) },
-  { FR30BF_INSN_LSR2, SEM_FN_NAME (fr30bf,lsr2) },
-  { FR30BF_INSN_ASR, SEM_FN_NAME (fr30bf,asr) },
-  { FR30BF_INSN_ASRI, SEM_FN_NAME (fr30bf,asri) },
-  { FR30BF_INSN_ASR2, SEM_FN_NAME (fr30bf,asr2) },
-  { FR30BF_INSN_LDI8, SEM_FN_NAME (fr30bf,ldi8) },
-  { FR30BF_INSN_LDI20, SEM_FN_NAME (fr30bf,ldi20) },
-  { FR30BF_INSN_LDI32, SEM_FN_NAME (fr30bf,ldi32) },
-  { FR30BF_INSN_LD, SEM_FN_NAME (fr30bf,ld) },
-  { FR30BF_INSN_LDUH, SEM_FN_NAME (fr30bf,lduh) },
-  { FR30BF_INSN_LDUB, SEM_FN_NAME (fr30bf,ldub) },
-  { FR30BF_INSN_LDR13, SEM_FN_NAME (fr30bf,ldr13) },
-  { FR30BF_INSN_LDR13UH, SEM_FN_NAME (fr30bf,ldr13uh) },
-  { FR30BF_INSN_LDR13UB, SEM_FN_NAME (fr30bf,ldr13ub) },
-  { FR30BF_INSN_LDR14, SEM_FN_NAME (fr30bf,ldr14) },
-  { FR30BF_INSN_LDR14UH, SEM_FN_NAME (fr30bf,ldr14uh) },
-  { FR30BF_INSN_LDR14UB, SEM_FN_NAME (fr30bf,ldr14ub) },
-  { FR30BF_INSN_LDR15, SEM_FN_NAME (fr30bf,ldr15) },
-  { FR30BF_INSN_LDR15GR, SEM_FN_NAME (fr30bf,ldr15gr) },
-  { FR30BF_INSN_LDR15DR, SEM_FN_NAME (fr30bf,ldr15dr) },
-  { FR30BF_INSN_LDR15PS, SEM_FN_NAME (fr30bf,ldr15ps) },
-  { FR30BF_INSN_ST, SEM_FN_NAME (fr30bf,st) },
-  { FR30BF_INSN_STH, SEM_FN_NAME (fr30bf,sth) },
-  { FR30BF_INSN_STB, SEM_FN_NAME (fr30bf,stb) },
-  { FR30BF_INSN_STR13, SEM_FN_NAME (fr30bf,str13) },
-  { FR30BF_INSN_STR13H, SEM_FN_NAME (fr30bf,str13h) },
-  { FR30BF_INSN_STR13B, SEM_FN_NAME (fr30bf,str13b) },
-  { FR30BF_INSN_STR14, SEM_FN_NAME (fr30bf,str14) },
-  { FR30BF_INSN_STR14H, SEM_FN_NAME (fr30bf,str14h) },
-  { FR30BF_INSN_STR14B, SEM_FN_NAME (fr30bf,str14b) },
-  { FR30BF_INSN_STR15, SEM_FN_NAME (fr30bf,str15) },
-  { FR30BF_INSN_STR15GR, SEM_FN_NAME (fr30bf,str15gr) },
-  { FR30BF_INSN_STR15DR, SEM_FN_NAME (fr30bf,str15dr) },
-  { FR30BF_INSN_STR15PS, SEM_FN_NAME (fr30bf,str15ps) },
-  { FR30BF_INSN_MOV, SEM_FN_NAME (fr30bf,mov) },
-  { FR30BF_INSN_MOVDR, SEM_FN_NAME (fr30bf,movdr) },
-  { FR30BF_INSN_MOVPS, SEM_FN_NAME (fr30bf,movps) },
-  { FR30BF_INSN_MOV2DR, SEM_FN_NAME (fr30bf,mov2dr) },
-  { FR30BF_INSN_MOV2PS, SEM_FN_NAME (fr30bf,mov2ps) },
-  { FR30BF_INSN_JMP, SEM_FN_NAME (fr30bf,jmp) },
-  { FR30BF_INSN_JMPD, SEM_FN_NAME (fr30bf,jmpd) },
-  { FR30BF_INSN_CALLR, SEM_FN_NAME (fr30bf,callr) },
-  { FR30BF_INSN_CALLRD, SEM_FN_NAME (fr30bf,callrd) },
-  { FR30BF_INSN_CALL, SEM_FN_NAME (fr30bf,call) },
-  { FR30BF_INSN_CALLD, SEM_FN_NAME (fr30bf,calld) },
-  { FR30BF_INSN_RET, SEM_FN_NAME (fr30bf,ret) },
-  { FR30BF_INSN_RET_D, SEM_FN_NAME (fr30bf,ret_d) },
-  { FR30BF_INSN_INT, SEM_FN_NAME (fr30bf,int) },
-  { FR30BF_INSN_INTE, SEM_FN_NAME (fr30bf,inte) },
-  { FR30BF_INSN_RETI, SEM_FN_NAME (fr30bf,reti) },
-  { FR30BF_INSN_BRAD, SEM_FN_NAME (fr30bf,brad) },
-  { FR30BF_INSN_BRA, SEM_FN_NAME (fr30bf,bra) },
-  { FR30BF_INSN_BNOD, SEM_FN_NAME (fr30bf,bnod) },
-  { FR30BF_INSN_BNO, SEM_FN_NAME (fr30bf,bno) },
-  { FR30BF_INSN_BEQD, SEM_FN_NAME (fr30bf,beqd) },
-  { FR30BF_INSN_BEQ, SEM_FN_NAME (fr30bf,beq) },
-  { FR30BF_INSN_BNED, SEM_FN_NAME (fr30bf,bned) },
-  { FR30BF_INSN_BNE, SEM_FN_NAME (fr30bf,bne) },
-  { FR30BF_INSN_BCD, SEM_FN_NAME (fr30bf,bcd) },
-  { FR30BF_INSN_BC, SEM_FN_NAME (fr30bf,bc) },
-  { FR30BF_INSN_BNCD, SEM_FN_NAME (fr30bf,bncd) },
-  { FR30BF_INSN_BNC, SEM_FN_NAME (fr30bf,bnc) },
-  { FR30BF_INSN_BND, SEM_FN_NAME (fr30bf,bnd) },
-  { FR30BF_INSN_BN, SEM_FN_NAME (fr30bf,bn) },
-  { FR30BF_INSN_BPD, SEM_FN_NAME (fr30bf,bpd) },
-  { FR30BF_INSN_BP, SEM_FN_NAME (fr30bf,bp) },
-  { FR30BF_INSN_BVD, SEM_FN_NAME (fr30bf,bvd) },
-  { FR30BF_INSN_BV, SEM_FN_NAME (fr30bf,bv) },
-  { FR30BF_INSN_BNVD, SEM_FN_NAME (fr30bf,bnvd) },
-  { FR30BF_INSN_BNV, SEM_FN_NAME (fr30bf,bnv) },
-  { FR30BF_INSN_BLTD, SEM_FN_NAME (fr30bf,bltd) },
-  { FR30BF_INSN_BLT, SEM_FN_NAME (fr30bf,blt) },
-  { FR30BF_INSN_BGED, SEM_FN_NAME (fr30bf,bged) },
-  { FR30BF_INSN_BGE, SEM_FN_NAME (fr30bf,bge) },
-  { FR30BF_INSN_BLED, SEM_FN_NAME (fr30bf,bled) },
-  { FR30BF_INSN_BLE, SEM_FN_NAME (fr30bf,ble) },
-  { FR30BF_INSN_BGTD, SEM_FN_NAME (fr30bf,bgtd) },
-  { FR30BF_INSN_BGT, SEM_FN_NAME (fr30bf,bgt) },
-  { FR30BF_INSN_BLSD, SEM_FN_NAME (fr30bf,blsd) },
-  { FR30BF_INSN_BLS, SEM_FN_NAME (fr30bf,bls) },
-  { FR30BF_INSN_BHID, SEM_FN_NAME (fr30bf,bhid) },
-  { FR30BF_INSN_BHI, SEM_FN_NAME (fr30bf,bhi) },
-  { FR30BF_INSN_DMOVR13, SEM_FN_NAME (fr30bf,dmovr13) },
-  { FR30BF_INSN_DMOVR13H, SEM_FN_NAME (fr30bf,dmovr13h) },
-  { FR30BF_INSN_DMOVR13B, SEM_FN_NAME (fr30bf,dmovr13b) },
-  { FR30BF_INSN_DMOVR13PI, SEM_FN_NAME (fr30bf,dmovr13pi) },
-  { FR30BF_INSN_DMOVR13PIH, SEM_FN_NAME (fr30bf,dmovr13pih) },
-  { FR30BF_INSN_DMOVR13PIB, SEM_FN_NAME (fr30bf,dmovr13pib) },
-  { FR30BF_INSN_DMOVR15PI, SEM_FN_NAME (fr30bf,dmovr15pi) },
-  { FR30BF_INSN_DMOV2R13, SEM_FN_NAME (fr30bf,dmov2r13) },
-  { FR30BF_INSN_DMOV2R13H, SEM_FN_NAME (fr30bf,dmov2r13h) },
-  { FR30BF_INSN_DMOV2R13B, SEM_FN_NAME (fr30bf,dmov2r13b) },
-  { FR30BF_INSN_DMOV2R13PI, SEM_FN_NAME (fr30bf,dmov2r13pi) },
-  { FR30BF_INSN_DMOV2R13PIH, SEM_FN_NAME (fr30bf,dmov2r13pih) },
-  { FR30BF_INSN_DMOV2R13PIB, SEM_FN_NAME (fr30bf,dmov2r13pib) },
-  { FR30BF_INSN_DMOV2R15PD, SEM_FN_NAME (fr30bf,dmov2r15pd) },
-  { FR30BF_INSN_LDRES, SEM_FN_NAME (fr30bf,ldres) },
-  { FR30BF_INSN_STRES, SEM_FN_NAME (fr30bf,stres) },
-  { FR30BF_INSN_COPOP, SEM_FN_NAME (fr30bf,copop) },
-  { FR30BF_INSN_COPLD, SEM_FN_NAME (fr30bf,copld) },
-  { FR30BF_INSN_COPST, SEM_FN_NAME (fr30bf,copst) },
-  { FR30BF_INSN_COPSV, SEM_FN_NAME (fr30bf,copsv) },
-  { FR30BF_INSN_NOP, SEM_FN_NAME (fr30bf,nop) },
-  { FR30BF_INSN_ANDCCR, SEM_FN_NAME (fr30bf,andccr) },
-  { FR30BF_INSN_ORCCR, SEM_FN_NAME (fr30bf,orccr) },
-  { FR30BF_INSN_STILM, SEM_FN_NAME (fr30bf,stilm) },
-  { FR30BF_INSN_ADDSP, SEM_FN_NAME (fr30bf,addsp) },
-  { FR30BF_INSN_EXTSB, SEM_FN_NAME (fr30bf,extsb) },
-  { FR30BF_INSN_EXTUB, SEM_FN_NAME (fr30bf,extub) },
-  { FR30BF_INSN_EXTSH, SEM_FN_NAME (fr30bf,extsh) },
-  { FR30BF_INSN_EXTUH, SEM_FN_NAME (fr30bf,extuh) },
-  { FR30BF_INSN_LDM0, SEM_FN_NAME (fr30bf,ldm0) },
-  { FR30BF_INSN_LDM1, SEM_FN_NAME (fr30bf,ldm1) },
-  { FR30BF_INSN_STM0, SEM_FN_NAME (fr30bf,stm0) },
-  { FR30BF_INSN_STM1, SEM_FN_NAME (fr30bf,stm1) },
-  { FR30BF_INSN_ENTER, SEM_FN_NAME (fr30bf,enter) },
-  { FR30BF_INSN_LEAVE, SEM_FN_NAME (fr30bf,leave) },
-  { FR30BF_INSN_XCHB, SEM_FN_NAME (fr30bf,xchb) },
-  { 0, 0 }
-};
-
-/* Add the semantic fns to IDESC_TABLE.  */
-
-void
-SEM_FN_NAME (fr30bf,init_idesc_table) (SIM_CPU *current_cpu)
-{
-  IDESC *idesc_table = CPU_IDESC (current_cpu);
-  const struct sem_fn_desc *sf;
-  int mach_num = MACH_NUM (CPU_MACH (current_cpu));
-
-  for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
-    {
-      const CGEN_INSN *insn = idesc_table[sf->index].idata;
-      int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
-		     || CGEN_INSN_MACH_HAS_P (insn, mach_num));
-#if FAST_P
-      if (valid_p)
-	idesc_table[sf->index].sem_fast = sf->fn;
-      else
-	idesc_table[sf->index].sem_fast = SEM_FN_NAME (fr30bf,x_invalid);
-#else
-      if (valid_p)
-	idesc_table[sf->index].sem_full = sf->fn;
-      else
-	idesc_table[sf->index].sem_full = SEM_FN_NAME (fr30bf,x_invalid);
-#endif
-    }
-}
-
+// OBSOLETE /* Simulator instruction semantics for fr30bf.
+// OBSOLETE 
+// OBSOLETE THIS FILE IS MACHINE GENERATED WITH CGEN.
+// OBSOLETE 
+// OBSOLETE Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// OBSOLETE 
+// OBSOLETE */
+// OBSOLETE 
+// OBSOLETE #define WANT_CPU fr30bf
+// OBSOLETE #define WANT_CPU_FR30BF
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "cgen-mem.h"
+// OBSOLETE #include "cgen-ops.h"
+// OBSOLETE 
+// OBSOLETE #undef GET_ATTR
+// OBSOLETE #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+// OBSOLETE #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
+// OBSOLETE #else
+// OBSOLETE #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_/**/attr)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* This is used so that we can compile two copies of the semantic code,
+// OBSOLETE    one with full feature support and one without that runs fast(er).
+// OBSOLETE    FAST_P, when desired, is defined on the command line, -DFAST_P=1.  */
+// OBSOLETE #if FAST_P
+// OBSOLETE #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
+// OBSOLETE #undef TRACE_RESULT
+// OBSOLETE #define TRACE_RESULT(cpu, abuf, name, type, val)
+// OBSOLETE #else
+// OBSOLETE #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE /* x-invalid: --invalid-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     /* Update the recorded pc in the cpu state struct.
+// OBSOLETE        Only necessary for WITH_SCACHE case, but to avoid the
+// OBSOLETE        conditional compilation ....  */
+// OBSOLETE     SET_H_PC (pc);
+// OBSOLETE     /* Virtual insns have zero size.  Overwrite vpc with address of next insn
+// OBSOLETE        using the default-insn-bitsize spec.  When executing insns in parallel
+// OBSOLETE        we may want to queue the fault and continue execution.  */
+// OBSOLETE     vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE     vpc = sim_engine_invalid_insn (current_cpu, pc, vpc);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* x-after: --after-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     fr30bf_pbb_after (current_cpu, sem_arg);
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* x-before: --before-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     fr30bf_pbb_before (current_cpu, sem_arg);
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* x-cti-chain: --cti-chain-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE #ifdef DEFINE_SWITCH
+// OBSOLETE     vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
+// OBSOLETE 			       pbb_br_type, pbb_br_npc);
+// OBSOLETE     BREAK (sem);
+// OBSOLETE #else
+// OBSOLETE     /* FIXME: Allow provision of explicit ifmt spec in insn spec.  */
+// OBSOLETE     vpc = fr30bf_pbb_cti_chain (current_cpu, sem_arg,
+// OBSOLETE 			       CPU_PBB_BR_TYPE (current_cpu),
+// OBSOLETE 			       CPU_PBB_BR_NPC (current_cpu));
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* x-chain: --chain-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE     vpc = fr30bf_pbb_chain (current_cpu, sem_arg);
+// OBSOLETE #ifdef DEFINE_SWITCH
+// OBSOLETE     BREAK (sem);
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* x-begin: --begin-- */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE #if WITH_SCACHE_PBB_FR30BF
+// OBSOLETE #if defined DEFINE_SWITCH || defined FAST_P
+// OBSOLETE     /* In the switch case FAST_P is a constant, allowing several optimizations
+// OBSOLETE        in any called inline functions.  */
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, FAST_P);
+// OBSOLETE #else
+// OBSOLETE #if 0 /* cgen engine can't handle dynamic fast/full switching yet.  */
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
+// OBSOLETE #else
+// OBSOLETE     vpc = fr30bf_pbb_begin (current_cpu, 0);
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE #endif
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* add: add $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addi: add $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* add2: add2 $m4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,add2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addc: addc $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ADDCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addn: addn $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addni: addn $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addni) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addn2: addn2 $m4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addn2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* sub: sub $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* subc: subc $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,subc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = SUBCSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), CPU (h_cbit));
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* subn: subn $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,subn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* cmp: cmp $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,cmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), * FLD (i_Rj), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* cmpi: cmp $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_u4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_u4));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* cmp2: cmp2 $m4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,cmp2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp1;
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBOFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (* FLD (i_Ri), FLD (f_m4), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   tmp_tmp1 = SUBSI (* FLD (i_Ri), FLD (f_m4));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp1, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* and: and $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ANDSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* or: or $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ORSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* eor: eor $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,eor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = XORSI (* FLD (i_Ri), * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* andm: and $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,andm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* andh: andh $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,andh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* andb: andb $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,andb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* orm: or $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,orm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* orh: orh $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,orh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* orb: orb $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,orb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* eorm: eor $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,eorm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORSI (GETMEMSI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* eorh: eorh $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,eorh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   HI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORHI (GETMEMHI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTHI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     HI opval = tmp_tmp;
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* eorb: eorb $Rj,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,eorb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = XORQI (GETMEMQI (current_cpu, pc, * FLD (i_Ri)), * FLD (i_Rj));
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     QI opval = tmp_tmp;
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bandl: bandl $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bandl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ANDQI (ORQI (FLD (f_u4), 240), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* borl: borl $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,borl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* beorl: beorl $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,beorl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = XORQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bandh: bandh $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bandh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ANDQI (ORQI (SLLQI (FLD (f_u4), 4), 15), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* borh: borh $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,borh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = ORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* beorh: beorh $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,beorh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = XORQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Ri), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* btstl: btstl $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,btstl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (FLD (f_u4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* btsth: btsth $u4,@$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,btsth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   QI tmp_tmp;
+// OBSOLETE   tmp_tmp = ANDQI (SLLQI (FLD (f_u4), 4), GETMEMQI (current_cpu, pc, * FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTQI (tmp_tmp, 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mul: mul $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   DI tmp_tmp;
+// OBSOLETE   tmp_tmp = MULDI (EXTSIDI (* FLD (i_Rj)), EXTSIDI (* FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (tmp_tmp);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQDI (tmp_tmp, MAKEDI (0, 0));
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = ORIF (GTDI (tmp_tmp, MAKEDI (0, 2147483647)), LTDI (tmp_tmp, NEGDI (MAKEDI (0, 0x80000000))));
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mulu: mulu $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mulu) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   DI tmp_tmp;
+// OBSOLETE   tmp_tmp = MULDI (ZEXTSIDI (* FLD (i_Rj)), ZEXTSIDI (* FLD (i_Ri)));
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (tmp_tmp);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = TRUNCDISI (SRLDI (tmp_tmp, 32));
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_vbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "vbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mulh: mulh $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mulh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = MULHI (TRUNCSIHI (* FLD (i_Rj)), TRUNCSIHI (* FLD (i_Ri)));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* muluh: muluh $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,muluh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = MULSI (ANDSI (* FLD (i_Rj), 65535), ANDSI (* FLD (i_Ri), 65535));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = GESI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div0s: div0s $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div0s) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (GET_H_DR (((UINT) 5)), 0);
+// OBSOLETE     CPU (h_d0bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = XORBI (CPU (h_d0bit), LTSI (* FLD (i_Ri), 0));
+// OBSOLETE     CPU (h_d1bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (NEBI (CPU (h_d0bit), 0)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0xffffffff;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div0u: div0u $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div0u) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_d0bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d0bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_d1bit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "d1bit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div1: div1 $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (GET_H_DR (((UINT) 4)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (LTSI (GET_H_DR (((UINT) 5)), 0)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 4)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (NOTBI (XORBI (XORBI (CPU (h_d0bit), CPU (h_d1bit)), CPU (h_cbit)))) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ORSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (GET_H_DR (((UINT) 4)), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div2: div2 $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = ADDSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = ADDCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   tmp_tmp = SUBSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri));
+// OBSOLETE   {
+// OBSOLETE     BI opval = SUBCFSI (GET_H_DR (((UINT) 4)), * FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (EQSI (tmp_tmp, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 1;
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = 0;
+// OBSOLETE     SET_H_DR (((UINT) 4), opval);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div3: div3 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (CPU (h_zbit), 1)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 5)), 1);
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* div4s: div4s */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,div4s) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (CPU (h_d1bit), 1)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = NEGSI (GET_H_DR (((UINT) 5)));
+// OBSOLETE     SET_H_DR (((UINT) 5), opval);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsl: lsl $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsli: lsl $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsl2: lsl2 $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsl2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (32, tmp_shift))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SLLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsr: lsr $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsri: lsr $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lsr2: lsr2 $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lsr2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRLSI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* asr: asr $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,asr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ANDSI (* FLD (i_Rj), 31);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* asri: asr $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,asri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = FLD (f_u4);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* asr2: asr2 $u4,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,asr2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_shift;
+// OBSOLETE   tmp_shift = ADDSI (FLD (f_u4), 16);
+// OBSOLETE if (NESI (tmp_shift, 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     BI opval = NESI (ANDSI (* FLD (i_Ri), SLLSI (1, SUBSI (tmp_shift, 1))), 0);
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SRASI (* FLD (i_Ri), tmp_shift);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE   {
+// OBSOLETE     BI opval = 0;
+// OBSOLETE     CPU (h_cbit) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "cbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE   {
+// OBSOLETE     BI opval = LTSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_nbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "nbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     BI opval = EQSI (* FLD (i_Ri), 0);
+// OBSOLETE     CPU (h_zbit) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "zbit", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldi8: ldi:8 $i8,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldi8) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi8.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i8);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldi20: ldi:20 $i20,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldi20) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi20.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i20);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldi32: ldi:32 $i32,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldi32) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldi32.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 6);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = FLD (f_i32);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ld: ld @$Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* lduh: lduh @$Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldub: ldub @$Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr13: ld @($R13,$Rj),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr13uh: lduh @($R13,$Rj),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr13uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr13ub: ldub @($R13,$Rj),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr13ub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr14: ld @($R14,$disp10),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr14) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr14uh: lduh @($R14,$disp9),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr14uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14uh.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr14ub: ldub @($R14,$disp8),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr14ub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr14ub.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr15: ld @($R15,$udisp6),$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr15) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_udisp6), CPU (h_gr[((UINT) 15)])));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr15gr: ld @$R15+,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr15gr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15gr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE if (NESI (FLD (f_Ri), 15)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr15dr: ld @$R15+,$Rs2 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr15dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SET_H_DR (FLD (f_Rs2), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldr15ps: ld @$R15+,$ps */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldr15ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* st: st $Ri,@$Rj */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* sth: sth $Ri,@$Rj */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* stb: stb $Ri,@$Rj */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str13: st $Ri,@($R13,$Rj) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str13h: sth $Ri,@($R13,$Rj) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str13b: stb $Ri,@($R13,$Rj) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, ADDSI (* FLD (i_Rj), CPU (h_gr[((UINT) 13)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str14: st $Ri,@($R14,$disp10) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str14) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (FLD (f_disp10), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str14h: sth $Ri,@($R14,$disp9) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str14h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14h.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMHI (current_cpu, pc, ADDSI (FLD (f_disp9), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str14b: stb $Ri,@($R14,$disp8) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str14b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str14b.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMQI (current_cpu, pc, ADDSI (FLD (f_disp8), CPU (h_gr[((UINT) 14)])), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str15: st $Ri,@($R15,$udisp6) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str15) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_udisp6)), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str15gr: st $Ri,@-$R15 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str15gr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_str15gr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = * FLD (i_Ri);
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str15dr: st $Rs2,@-$R15 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str15dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr15dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = GET_H_DR (FLD (f_Rs2));
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* str15ps: st $ps,@-$R15 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,str15ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_PS ();
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mov: mov $Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mov) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldr13.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Rj);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* movdr: mov $Rs1,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,movdr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_DR (FLD (f_Rs1));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* movps: mov $ps,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,movps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_movdr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GET_H_PS ();
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mov2dr: mov $Ri,$Rs1 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mov2dr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = * FLD (i_Ri);
+// OBSOLETE     SET_H_DR (FLD (f_Rs1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* mov2ps: mov $Ri,$ps */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,mov2ps) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* jmp: jmp @$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,jmp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* jmpd: jmp:d @$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,jmpd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* callr: call @$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,callr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 2);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* callrd: call:d @$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,callrd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_mov2dr.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 4);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = * FLD (i_Ri);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* call: call $label12 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,call) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 2);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label12);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* calld: call:d $label12 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,calld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_call.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (pc, 4);
+// OBSOLETE     SET_H_DR (((UINT) 1), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label12);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ret: ret */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ret) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = GET_H_DR (((UINT) 1));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ret:d: ret:d */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ret_d) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = GET_H_DR (((UINT) 1));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* int: int $u8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,int) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE   {
+// OBSOLETE     SI opval = fr30_int (current_cpu, pc, FLD (f_u8));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* inte: inte */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,inte) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE ; /*clobber*/
+// OBSOLETE   {
+// OBSOLETE     SI opval = fr30_inte (current_cpu, pc);
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* reti: reti */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,reti) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (EQBI (GET_H_SBIT (), 0)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 2), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 2)));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 2)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 2), opval);
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE } else {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
+// OBSOLETE     SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 3), opval);
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, GET_H_DR (((UINT) 3)));
+// OBSOLETE     SET_H_PS (opval);
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ps", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (GET_H_DR (((UINT) 3)), 4);
+// OBSOLETE     SET_H_DR (((UINT) 3), opval);
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "dr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* brad: bra:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,brad) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bra: bra $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bra) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bnod: bno:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bnod) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bno: bno $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bno) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* beqd: beq:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,beqd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_zbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* beq: beq $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,beq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_zbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bned: bne:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bned) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bne: bne $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bcd: bc:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bcd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_cbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bc: bc $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_cbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bncd: bnc:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bncd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_cbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bnc: bnc $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bnc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_cbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bnd: bn:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bnd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_nbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bn: bn $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bn) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_nbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bpd: bp:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bpd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bp: bp $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bvd: bv:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bvd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (CPU (h_vbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bv: bv $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (CPU (h_vbit)) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bnvd: bnv:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bnvd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (CPU (h_vbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bnv: bnv $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bnv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (CPU (h_vbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 2);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bltd: blt:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bltd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* blt: blt $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,blt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (XORBI (CPU (h_vbit), CPU (h_nbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bged: bge:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bged) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bge: bge $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bge) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (XORBI (CPU (h_vbit), CPU (h_nbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bled: ble:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bled) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ble: ble $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ble) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bgtd: bgt:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bgtd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bgt: bgt $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bgt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (ORBI (XORBI (CPU (h_vbit), CPU (h_nbit)), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* blsd: bls:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,blsd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bls: bls $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (ORBI (CPU (h_cbit), CPU (h_zbit))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bhid: bhi:d $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bhid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* bhi: bhi $label9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,bhi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_brad.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_BRANCH_INIT
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE if (NOTBI (ORBI (CPU (h_cbit), CPU (h_zbit)))) {
+// OBSOLETE   {
+// OBSOLETE     USI opval = FLD (i_label9);
+// OBSOLETE     SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   SEM_BRANCH_FINI (vpc);
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13: dmov $R13,@$dir10 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13h: dmovh $R13,@$dir9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     HI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13b: dmovb $R13,@$dir8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     QI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13pi: dmov @$R13+,@$dir10 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13pih: dmovh @$R13+,@$dir9 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13pih) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     HI opval = GETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMHI (current_cpu, pc, FLD (f_dir9), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr13pib: dmovb @$R13+,@$dir8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr13pib) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     QI opval = GETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]));
+// OBSOLETE     SETMEMQI (current_cpu, pc, FLD (f_dir8), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmovr15pi: dmov @$R15+,@$dir10 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmovr15pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     SETMEMSI (current_cpu, pc, FLD (f_dir10), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13: dmov @$dir10,$R13 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13h: dmovh @$dir9,$R13 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13b: dmovb @$dir8,$R13 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13pi: dmov @$dir10,@$R13+ */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13pi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13pih: dmovh @$dir9,@$R13+ */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13pih) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pih.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     HI opval = GETMEMHI (current_cpu, pc, FLD (f_dir9));
+// OBSOLETE     SETMEMHI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 2);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r13pib: dmovb @$dir8,@$R13+ */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r13pib) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr13pib.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     QI opval = GETMEMQI (current_cpu, pc, FLD (f_dir8));
+// OBSOLETE     SETMEMQI (current_cpu, pc, CPU (h_gr[((UINT) 13)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 13)]), 1);
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* dmov2r15pd: dmov @$dir10,@-$R15 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,dmov2r15pd) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_dmovr15pi.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, FLD (f_dir10));
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldres: ldres @$Ri+,$u4 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldres) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), 4);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* stres: stres $u4,@$Ri+ */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,stres) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (* FLD (i_Ri), 4);
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* copop: copop $u4c,$ccc,$CRj,$CRi */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,copop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* copld: copld $u4c,$ccc,$Rjc,$CRi */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,copld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* copst: copst $u4c,$ccc,$CRj,$Ric */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,copst) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* copsv: copsv $u4c,$ccc,$CRj,$Ric */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,copsv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* nop: nop */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.fmt_empty.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE ((void) 0); /*nop*/
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* andccr: andccr $u8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,andccr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ANDQI (GET_H_CCR (), FLD (f_u8));
+// OBSOLETE     SET_H_CCR (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* orccr: orccr $u8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,orccr) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ORQI (GET_H_CCR (), FLD (f_u8));
+// OBSOLETE     SET_H_CCR (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ccr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* stilm: stilm $u8 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,stilm) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_int.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     UQI opval = ANDSI (FLD (f_u8), 31);
+// OBSOLETE     SET_H_ILM (opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "ilm", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* addsp: addsp $s10 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,addsp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_addsp.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), FLD (f_s10));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* extsb: extsb $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,extsb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = EXTQISI (ANDQI (* FLD (i_Ri), 255));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* extub: extub $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,extub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ZEXTQISI (ANDQI (* FLD (i_Ri), 255));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* extsh: extsh $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,extsh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = EXTHISI (ANDHI (* FLD (i_Ri), 65535));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* extuh: extuh $Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,extuh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add2.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE   {
+// OBSOLETE     SI opval = ZEXTHISI (ANDHI (* FLD (i_Ri), 65535));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldm0: ldm0 ($reglist_low_ld) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldm0) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm0.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 0)]) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 1)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 2)]) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 3)]) = opval;
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 4)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 5)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 6)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_ld), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 7)]) = opval;
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* ldm1: ldm1 ($reglist_hi_ld) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,ldm1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_ldm1.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 8)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 9)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 10)]) = opval;
+// OBSOLETE     written |= (1 << 3);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 11)]) = opval;
+// OBSOLETE     written |= (1 << 4);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 12)]) = opval;
+// OBSOLETE     written |= (1 << 5);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 13)]) = opval;
+// OBSOLETE     written |= (1 << 6);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     written |= (1 << 7);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_ld), 128)) {
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 8);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* stm0: stm0 ($reglist_low_st) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,stm0) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm0.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 1)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 7)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 6)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 5)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 4)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 3)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 2)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 1)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_low_st), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 0)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 11);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* stm1: stm1 ($reglist_hi_st) */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,stm1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_stm1.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 1)) {
+// OBSOLETE {
+// OBSOLETE   SI tmp_save_r15;
+// OBSOLETE   tmp_save_r15 = CPU (h_gr[((UINT) 15)]);
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_save_r15;
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 2)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 14)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 4)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 13)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 8)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 12)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 16)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 11)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 32)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 10)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 64)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 9)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (ANDSI (FLD (f_reglist_hi_st), 128)) {
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     written |= (1 << 9);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 8)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, CPU (h_gr[((UINT) 15)]), opval);
+// OBSOLETE     written |= (1 << 10);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   abuf->written = written;
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* enter: enter $u10 */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,enter) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = SUBSI (CPU (h_gr[((UINT) 15)]), 4);
+// OBSOLETE   {
+// OBSOLETE     SI opval = CPU (h_gr[((UINT) 14)]);
+// OBSOLETE     SETMEMSI (current_cpu, pc, tmp_tmp, opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = tmp_tmp;
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = SUBSI (CPU (h_gr[((UINT) 15)]), FLD (f_u10));
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* leave: leave */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,leave) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_enter.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   {
+// OBSOLETE     SI opval = ADDSI (CPU (h_gr[((UINT) 14)]), 4);
+// OBSOLETE     CPU (h_gr[((UINT) 15)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMSI (current_cpu, pc, SUBSI (CPU (h_gr[((UINT) 15)]), 4));
+// OBSOLETE     CPU (h_gr[((UINT) 14)]) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* xchb: xchb @$Rj,$Ri */
+// OBSOLETE 
+// OBSOLETE static SEM_PC
+// OBSOLETE SEM_FN_NAME (fr30bf,xchb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
+// OBSOLETE {
+// OBSOLETE #define FLD(f) abuf->fields.sfmt_add.f
+// OBSOLETE   ARGBUF *abuf = SEM_ARGBUF (sem_arg);
+// OBSOLETE   int UNUSED written = 0;
+// OBSOLETE   IADDR UNUSED pc = abuf->addr;
+// OBSOLETE   SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
+// OBSOLETE 
+// OBSOLETE {
+// OBSOLETE   SI tmp_tmp;
+// OBSOLETE   tmp_tmp = * FLD (i_Ri);
+// OBSOLETE   {
+// OBSOLETE     SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_Rj));
+// OBSOLETE     * FLD (i_Ri) = opval;
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE   {
+// OBSOLETE     UQI opval = tmp_tmp;
+// OBSOLETE     SETMEMUQI (current_cpu, pc, * FLD (i_Rj), opval);
+// OBSOLETE     TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
+// OBSOLETE   }
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE   return vpc;
+// OBSOLETE #undef FLD
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Table of all semantic fns.  */
+// OBSOLETE 
+// OBSOLETE static const struct sem_fn_desc sem_fns[] = {
+// OBSOLETE   { FR30BF_INSN_X_INVALID, SEM_FN_NAME (fr30bf,x_invalid) },
+// OBSOLETE   { FR30BF_INSN_X_AFTER, SEM_FN_NAME (fr30bf,x_after) },
+// OBSOLETE   { FR30BF_INSN_X_BEFORE, SEM_FN_NAME (fr30bf,x_before) },
+// OBSOLETE   { FR30BF_INSN_X_CTI_CHAIN, SEM_FN_NAME (fr30bf,x_cti_chain) },
+// OBSOLETE   { FR30BF_INSN_X_CHAIN, SEM_FN_NAME (fr30bf,x_chain) },
+// OBSOLETE   { FR30BF_INSN_X_BEGIN, SEM_FN_NAME (fr30bf,x_begin) },
+// OBSOLETE   { FR30BF_INSN_ADD, SEM_FN_NAME (fr30bf,add) },
+// OBSOLETE   { FR30BF_INSN_ADDI, SEM_FN_NAME (fr30bf,addi) },
+// OBSOLETE   { FR30BF_INSN_ADD2, SEM_FN_NAME (fr30bf,add2) },
+// OBSOLETE   { FR30BF_INSN_ADDC, SEM_FN_NAME (fr30bf,addc) },
+// OBSOLETE   { FR30BF_INSN_ADDN, SEM_FN_NAME (fr30bf,addn) },
+// OBSOLETE   { FR30BF_INSN_ADDNI, SEM_FN_NAME (fr30bf,addni) },
+// OBSOLETE   { FR30BF_INSN_ADDN2, SEM_FN_NAME (fr30bf,addn2) },
+// OBSOLETE   { FR30BF_INSN_SUB, SEM_FN_NAME (fr30bf,sub) },
+// OBSOLETE   { FR30BF_INSN_SUBC, SEM_FN_NAME (fr30bf,subc) },
+// OBSOLETE   { FR30BF_INSN_SUBN, SEM_FN_NAME (fr30bf,subn) },
+// OBSOLETE   { FR30BF_INSN_CMP, SEM_FN_NAME (fr30bf,cmp) },
+// OBSOLETE   { FR30BF_INSN_CMPI, SEM_FN_NAME (fr30bf,cmpi) },
+// OBSOLETE   { FR30BF_INSN_CMP2, SEM_FN_NAME (fr30bf,cmp2) },
+// OBSOLETE   { FR30BF_INSN_AND, SEM_FN_NAME (fr30bf,and) },
+// OBSOLETE   { FR30BF_INSN_OR, SEM_FN_NAME (fr30bf,or) },
+// OBSOLETE   { FR30BF_INSN_EOR, SEM_FN_NAME (fr30bf,eor) },
+// OBSOLETE   { FR30BF_INSN_ANDM, SEM_FN_NAME (fr30bf,andm) },
+// OBSOLETE   { FR30BF_INSN_ANDH, SEM_FN_NAME (fr30bf,andh) },
+// OBSOLETE   { FR30BF_INSN_ANDB, SEM_FN_NAME (fr30bf,andb) },
+// OBSOLETE   { FR30BF_INSN_ORM, SEM_FN_NAME (fr30bf,orm) },
+// OBSOLETE   { FR30BF_INSN_ORH, SEM_FN_NAME (fr30bf,orh) },
+// OBSOLETE   { FR30BF_INSN_ORB, SEM_FN_NAME (fr30bf,orb) },
+// OBSOLETE   { FR30BF_INSN_EORM, SEM_FN_NAME (fr30bf,eorm) },
+// OBSOLETE   { FR30BF_INSN_EORH, SEM_FN_NAME (fr30bf,eorh) },
+// OBSOLETE   { FR30BF_INSN_EORB, SEM_FN_NAME (fr30bf,eorb) },
+// OBSOLETE   { FR30BF_INSN_BANDL, SEM_FN_NAME (fr30bf,bandl) },
+// OBSOLETE   { FR30BF_INSN_BORL, SEM_FN_NAME (fr30bf,borl) },
+// OBSOLETE   { FR30BF_INSN_BEORL, SEM_FN_NAME (fr30bf,beorl) },
+// OBSOLETE   { FR30BF_INSN_BANDH, SEM_FN_NAME (fr30bf,bandh) },
+// OBSOLETE   { FR30BF_INSN_BORH, SEM_FN_NAME (fr30bf,borh) },
+// OBSOLETE   { FR30BF_INSN_BEORH, SEM_FN_NAME (fr30bf,beorh) },
+// OBSOLETE   { FR30BF_INSN_BTSTL, SEM_FN_NAME (fr30bf,btstl) },
+// OBSOLETE   { FR30BF_INSN_BTSTH, SEM_FN_NAME (fr30bf,btsth) },
+// OBSOLETE   { FR30BF_INSN_MUL, SEM_FN_NAME (fr30bf,mul) },
+// OBSOLETE   { FR30BF_INSN_MULU, SEM_FN_NAME (fr30bf,mulu) },
+// OBSOLETE   { FR30BF_INSN_MULH, SEM_FN_NAME (fr30bf,mulh) },
+// OBSOLETE   { FR30BF_INSN_MULUH, SEM_FN_NAME (fr30bf,muluh) },
+// OBSOLETE   { FR30BF_INSN_DIV0S, SEM_FN_NAME (fr30bf,div0s) },
+// OBSOLETE   { FR30BF_INSN_DIV0U, SEM_FN_NAME (fr30bf,div0u) },
+// OBSOLETE   { FR30BF_INSN_DIV1, SEM_FN_NAME (fr30bf,div1) },
+// OBSOLETE   { FR30BF_INSN_DIV2, SEM_FN_NAME (fr30bf,div2) },
+// OBSOLETE   { FR30BF_INSN_DIV3, SEM_FN_NAME (fr30bf,div3) },
+// OBSOLETE   { FR30BF_INSN_DIV4S, SEM_FN_NAME (fr30bf,div4s) },
+// OBSOLETE   { FR30BF_INSN_LSL, SEM_FN_NAME (fr30bf,lsl) },
+// OBSOLETE   { FR30BF_INSN_LSLI, SEM_FN_NAME (fr30bf,lsli) },
+// OBSOLETE   { FR30BF_INSN_LSL2, SEM_FN_NAME (fr30bf,lsl2) },
+// OBSOLETE   { FR30BF_INSN_LSR, SEM_FN_NAME (fr30bf,lsr) },
+// OBSOLETE   { FR30BF_INSN_LSRI, SEM_FN_NAME (fr30bf,lsri) },
+// OBSOLETE   { FR30BF_INSN_LSR2, SEM_FN_NAME (fr30bf,lsr2) },
+// OBSOLETE   { FR30BF_INSN_ASR, SEM_FN_NAME (fr30bf,asr) },
+// OBSOLETE   { FR30BF_INSN_ASRI, SEM_FN_NAME (fr30bf,asri) },
+// OBSOLETE   { FR30BF_INSN_ASR2, SEM_FN_NAME (fr30bf,asr2) },
+// OBSOLETE   { FR30BF_INSN_LDI8, SEM_FN_NAME (fr30bf,ldi8) },
+// OBSOLETE   { FR30BF_INSN_LDI20, SEM_FN_NAME (fr30bf,ldi20) },
+// OBSOLETE   { FR30BF_INSN_LDI32, SEM_FN_NAME (fr30bf,ldi32) },
+// OBSOLETE   { FR30BF_INSN_LD, SEM_FN_NAME (fr30bf,ld) },
+// OBSOLETE   { FR30BF_INSN_LDUH, SEM_FN_NAME (fr30bf,lduh) },
+// OBSOLETE   { FR30BF_INSN_LDUB, SEM_FN_NAME (fr30bf,ldub) },
+// OBSOLETE   { FR30BF_INSN_LDR13, SEM_FN_NAME (fr30bf,ldr13) },
+// OBSOLETE   { FR30BF_INSN_LDR13UH, SEM_FN_NAME (fr30bf,ldr13uh) },
+// OBSOLETE   { FR30BF_INSN_LDR13UB, SEM_FN_NAME (fr30bf,ldr13ub) },
+// OBSOLETE   { FR30BF_INSN_LDR14, SEM_FN_NAME (fr30bf,ldr14) },
+// OBSOLETE   { FR30BF_INSN_LDR14UH, SEM_FN_NAME (fr30bf,ldr14uh) },
+// OBSOLETE   { FR30BF_INSN_LDR14UB, SEM_FN_NAME (fr30bf,ldr14ub) },
+// OBSOLETE   { FR30BF_INSN_LDR15, SEM_FN_NAME (fr30bf,ldr15) },
+// OBSOLETE   { FR30BF_INSN_LDR15GR, SEM_FN_NAME (fr30bf,ldr15gr) },
+// OBSOLETE   { FR30BF_INSN_LDR15DR, SEM_FN_NAME (fr30bf,ldr15dr) },
+// OBSOLETE   { FR30BF_INSN_LDR15PS, SEM_FN_NAME (fr30bf,ldr15ps) },
+// OBSOLETE   { FR30BF_INSN_ST, SEM_FN_NAME (fr30bf,st) },
+// OBSOLETE   { FR30BF_INSN_STH, SEM_FN_NAME (fr30bf,sth) },
+// OBSOLETE   { FR30BF_INSN_STB, SEM_FN_NAME (fr30bf,stb) },
+// OBSOLETE   { FR30BF_INSN_STR13, SEM_FN_NAME (fr30bf,str13) },
+// OBSOLETE   { FR30BF_INSN_STR13H, SEM_FN_NAME (fr30bf,str13h) },
+// OBSOLETE   { FR30BF_INSN_STR13B, SEM_FN_NAME (fr30bf,str13b) },
+// OBSOLETE   { FR30BF_INSN_STR14, SEM_FN_NAME (fr30bf,str14) },
+// OBSOLETE   { FR30BF_INSN_STR14H, SEM_FN_NAME (fr30bf,str14h) },
+// OBSOLETE   { FR30BF_INSN_STR14B, SEM_FN_NAME (fr30bf,str14b) },
+// OBSOLETE   { FR30BF_INSN_STR15, SEM_FN_NAME (fr30bf,str15) },
+// OBSOLETE   { FR30BF_INSN_STR15GR, SEM_FN_NAME (fr30bf,str15gr) },
+// OBSOLETE   { FR30BF_INSN_STR15DR, SEM_FN_NAME (fr30bf,str15dr) },
+// OBSOLETE   { FR30BF_INSN_STR15PS, SEM_FN_NAME (fr30bf,str15ps) },
+// OBSOLETE   { FR30BF_INSN_MOV, SEM_FN_NAME (fr30bf,mov) },
+// OBSOLETE   { FR30BF_INSN_MOVDR, SEM_FN_NAME (fr30bf,movdr) },
+// OBSOLETE   { FR30BF_INSN_MOVPS, SEM_FN_NAME (fr30bf,movps) },
+// OBSOLETE   { FR30BF_INSN_MOV2DR, SEM_FN_NAME (fr30bf,mov2dr) },
+// OBSOLETE   { FR30BF_INSN_MOV2PS, SEM_FN_NAME (fr30bf,mov2ps) },
+// OBSOLETE   { FR30BF_INSN_JMP, SEM_FN_NAME (fr30bf,jmp) },
+// OBSOLETE   { FR30BF_INSN_JMPD, SEM_FN_NAME (fr30bf,jmpd) },
+// OBSOLETE   { FR30BF_INSN_CALLR, SEM_FN_NAME (fr30bf,callr) },
+// OBSOLETE   { FR30BF_INSN_CALLRD, SEM_FN_NAME (fr30bf,callrd) },
+// OBSOLETE   { FR30BF_INSN_CALL, SEM_FN_NAME (fr30bf,call) },
+// OBSOLETE   { FR30BF_INSN_CALLD, SEM_FN_NAME (fr30bf,calld) },
+// OBSOLETE   { FR30BF_INSN_RET, SEM_FN_NAME (fr30bf,ret) },
+// OBSOLETE   { FR30BF_INSN_RET_D, SEM_FN_NAME (fr30bf,ret_d) },
+// OBSOLETE   { FR30BF_INSN_INT, SEM_FN_NAME (fr30bf,int) },
+// OBSOLETE   { FR30BF_INSN_INTE, SEM_FN_NAME (fr30bf,inte) },
+// OBSOLETE   { FR30BF_INSN_RETI, SEM_FN_NAME (fr30bf,reti) },
+// OBSOLETE   { FR30BF_INSN_BRAD, SEM_FN_NAME (fr30bf,brad) },
+// OBSOLETE   { FR30BF_INSN_BRA, SEM_FN_NAME (fr30bf,bra) },
+// OBSOLETE   { FR30BF_INSN_BNOD, SEM_FN_NAME (fr30bf,bnod) },
+// OBSOLETE   { FR30BF_INSN_BNO, SEM_FN_NAME (fr30bf,bno) },
+// OBSOLETE   { FR30BF_INSN_BEQD, SEM_FN_NAME (fr30bf,beqd) },
+// OBSOLETE   { FR30BF_INSN_BEQ, SEM_FN_NAME (fr30bf,beq) },
+// OBSOLETE   { FR30BF_INSN_BNED, SEM_FN_NAME (fr30bf,bned) },
+// OBSOLETE   { FR30BF_INSN_BNE, SEM_FN_NAME (fr30bf,bne) },
+// OBSOLETE   { FR30BF_INSN_BCD, SEM_FN_NAME (fr30bf,bcd) },
+// OBSOLETE   { FR30BF_INSN_BC, SEM_FN_NAME (fr30bf,bc) },
+// OBSOLETE   { FR30BF_INSN_BNCD, SEM_FN_NAME (fr30bf,bncd) },
+// OBSOLETE   { FR30BF_INSN_BNC, SEM_FN_NAME (fr30bf,bnc) },
+// OBSOLETE   { FR30BF_INSN_BND, SEM_FN_NAME (fr30bf,bnd) },
+// OBSOLETE   { FR30BF_INSN_BN, SEM_FN_NAME (fr30bf,bn) },
+// OBSOLETE   { FR30BF_INSN_BPD, SEM_FN_NAME (fr30bf,bpd) },
+// OBSOLETE   { FR30BF_INSN_BP, SEM_FN_NAME (fr30bf,bp) },
+// OBSOLETE   { FR30BF_INSN_BVD, SEM_FN_NAME (fr30bf,bvd) },
+// OBSOLETE   { FR30BF_INSN_BV, SEM_FN_NAME (fr30bf,bv) },
+// OBSOLETE   { FR30BF_INSN_BNVD, SEM_FN_NAME (fr30bf,bnvd) },
+// OBSOLETE   { FR30BF_INSN_BNV, SEM_FN_NAME (fr30bf,bnv) },
+// OBSOLETE   { FR30BF_INSN_BLTD, SEM_FN_NAME (fr30bf,bltd) },
+// OBSOLETE   { FR30BF_INSN_BLT, SEM_FN_NAME (fr30bf,blt) },
+// OBSOLETE   { FR30BF_INSN_BGED, SEM_FN_NAME (fr30bf,bged) },
+// OBSOLETE   { FR30BF_INSN_BGE, SEM_FN_NAME (fr30bf,bge) },
+// OBSOLETE   { FR30BF_INSN_BLED, SEM_FN_NAME (fr30bf,bled) },
+// OBSOLETE   { FR30BF_INSN_BLE, SEM_FN_NAME (fr30bf,ble) },
+// OBSOLETE   { FR30BF_INSN_BGTD, SEM_FN_NAME (fr30bf,bgtd) },
+// OBSOLETE   { FR30BF_INSN_BGT, SEM_FN_NAME (fr30bf,bgt) },
+// OBSOLETE   { FR30BF_INSN_BLSD, SEM_FN_NAME (fr30bf,blsd) },
+// OBSOLETE   { FR30BF_INSN_BLS, SEM_FN_NAME (fr30bf,bls) },
+// OBSOLETE   { FR30BF_INSN_BHID, SEM_FN_NAME (fr30bf,bhid) },
+// OBSOLETE   { FR30BF_INSN_BHI, SEM_FN_NAME (fr30bf,bhi) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13, SEM_FN_NAME (fr30bf,dmovr13) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13H, SEM_FN_NAME (fr30bf,dmovr13h) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13B, SEM_FN_NAME (fr30bf,dmovr13b) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PI, SEM_FN_NAME (fr30bf,dmovr13pi) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PIH, SEM_FN_NAME (fr30bf,dmovr13pih) },
+// OBSOLETE   { FR30BF_INSN_DMOVR13PIB, SEM_FN_NAME (fr30bf,dmovr13pib) },
+// OBSOLETE   { FR30BF_INSN_DMOVR15PI, SEM_FN_NAME (fr30bf,dmovr15pi) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13, SEM_FN_NAME (fr30bf,dmov2r13) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13H, SEM_FN_NAME (fr30bf,dmov2r13h) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13B, SEM_FN_NAME (fr30bf,dmov2r13b) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PI, SEM_FN_NAME (fr30bf,dmov2r13pi) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PIH, SEM_FN_NAME (fr30bf,dmov2r13pih) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R13PIB, SEM_FN_NAME (fr30bf,dmov2r13pib) },
+// OBSOLETE   { FR30BF_INSN_DMOV2R15PD, SEM_FN_NAME (fr30bf,dmov2r15pd) },
+// OBSOLETE   { FR30BF_INSN_LDRES, SEM_FN_NAME (fr30bf,ldres) },
+// OBSOLETE   { FR30BF_INSN_STRES, SEM_FN_NAME (fr30bf,stres) },
+// OBSOLETE   { FR30BF_INSN_COPOP, SEM_FN_NAME (fr30bf,copop) },
+// OBSOLETE   { FR30BF_INSN_COPLD, SEM_FN_NAME (fr30bf,copld) },
+// OBSOLETE   { FR30BF_INSN_COPST, SEM_FN_NAME (fr30bf,copst) },
+// OBSOLETE   { FR30BF_INSN_COPSV, SEM_FN_NAME (fr30bf,copsv) },
+// OBSOLETE   { FR30BF_INSN_NOP, SEM_FN_NAME (fr30bf,nop) },
+// OBSOLETE   { FR30BF_INSN_ANDCCR, SEM_FN_NAME (fr30bf,andccr) },
+// OBSOLETE   { FR30BF_INSN_ORCCR, SEM_FN_NAME (fr30bf,orccr) },
+// OBSOLETE   { FR30BF_INSN_STILM, SEM_FN_NAME (fr30bf,stilm) },
+// OBSOLETE   { FR30BF_INSN_ADDSP, SEM_FN_NAME (fr30bf,addsp) },
+// OBSOLETE   { FR30BF_INSN_EXTSB, SEM_FN_NAME (fr30bf,extsb) },
+// OBSOLETE   { FR30BF_INSN_EXTUB, SEM_FN_NAME (fr30bf,extub) },
+// OBSOLETE   { FR30BF_INSN_EXTSH, SEM_FN_NAME (fr30bf,extsh) },
+// OBSOLETE   { FR30BF_INSN_EXTUH, SEM_FN_NAME (fr30bf,extuh) },
+// OBSOLETE   { FR30BF_INSN_LDM0, SEM_FN_NAME (fr30bf,ldm0) },
+// OBSOLETE   { FR30BF_INSN_LDM1, SEM_FN_NAME (fr30bf,ldm1) },
+// OBSOLETE   { FR30BF_INSN_STM0, SEM_FN_NAME (fr30bf,stm0) },
+// OBSOLETE   { FR30BF_INSN_STM1, SEM_FN_NAME (fr30bf,stm1) },
+// OBSOLETE   { FR30BF_INSN_ENTER, SEM_FN_NAME (fr30bf,enter) },
+// OBSOLETE   { FR30BF_INSN_LEAVE, SEM_FN_NAME (fr30bf,leave) },
+// OBSOLETE   { FR30BF_INSN_XCHB, SEM_FN_NAME (fr30bf,xchb) },
+// OBSOLETE   { 0, 0 }
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Add the semantic fns to IDESC_TABLE.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE SEM_FN_NAME (fr30bf,init_idesc_table) (SIM_CPU *current_cpu)
+// OBSOLETE {
+// OBSOLETE   IDESC *idesc_table = CPU_IDESC (current_cpu);
+// OBSOLETE   const struct sem_fn_desc *sf;
+// OBSOLETE   int mach_num = MACH_NUM (CPU_MACH (current_cpu));
+// OBSOLETE 
+// OBSOLETE   for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
+// OBSOLETE     {
+// OBSOLETE       const CGEN_INSN *insn = idesc_table[sf->index].idata;
+// OBSOLETE       int valid_p = (CGEN_INSN_VIRTUAL_P (insn)
+// OBSOLETE 		     || CGEN_INSN_MACH_HAS_P (insn, mach_num));
+// OBSOLETE #if FAST_P
+// OBSOLETE       if (valid_p)
+// OBSOLETE 	idesc_table[sf->index].sem_fast = sf->fn;
+// OBSOLETE       else
+// OBSOLETE 	idesc_table[sf->index].sem_fast = SEM_FN_NAME (fr30bf,x_invalid);
+// OBSOLETE #else
+// OBSOLETE       if (valid_p)
+// OBSOLETE 	idesc_table[sf->index].sem_full = sf->fn;
+// OBSOLETE       else
+// OBSOLETE 	idesc_table[sf->index].sem_full = SEM_FN_NAME (fr30bf,x_invalid);
+// OBSOLETE #endif
+// OBSOLETE     }
+// OBSOLETE }
diff --git a/sim/fr30/sim-if.c b/sim/fr30/sim-if.c
index 28b344d..e5c5c57 100644
--- a/sim/fr30/sim-if.c
+++ b/sim/fr30/sim-if.c
@@ -1,208 +1,208 @@
-/* Main simulator entry points specific to the FR30.
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of the GNU simulators.
-
-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 "sim-main.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include "sim-options.h"
-#include "libiberty.h"
-#include "bfd.h"
-
-static void free_state (SIM_DESC);
-static void print_fr30_misc_cpu (SIM_CPU *cpu, int verbose);
-
-/* Records simulator descriptor so utilities like fr30_dump_regs can be
-   called from gdb.  */
-SIM_DESC current_state;
-
-/* Cover function of sim_state_free to free the cpu buffers as well.  */
-
-static void
-free_state (SIM_DESC sd)
-{
-  if (STATE_MODULES (sd) != NULL)
-    sim_module_uninstall (sd);
-  sim_cpu_free_all (sd);
-  sim_state_free (sd);
-}
-
-/* Create an instance of the simulator.  */
-
-SIM_DESC
-sim_open (kind, callback, abfd, argv)
-     SIM_OPEN_KIND kind;
-     host_callback *callback;
-     struct _bfd *abfd;
-     char **argv;
-{
-  char c;
-  int i;
-  SIM_DESC sd = sim_state_alloc (kind, callback);
-
-  /* The cpu data is kept in a separately allocated chunk of memory.  */
-  if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-#if 0 /* FIXME: pc is in mach-specific struct */
-  /* FIXME: watchpoints code shouldn't need this */
-  {
-    SIM_CPU *current_cpu = STATE_CPU (sd, 0);
-    STATE_WATCHPOINTS (sd)->pc = &(PC);
-    STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
-  }
-#endif
-
-  if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-#if 0 /* FIXME: 'twould be nice if we could do this */
-  /* These options override any module options.
-     Obviously ambiguity should be avoided, however the caller may wish to
-     augment the meaning of an option.  */
-  if (extra_options != NULL)
-    sim_add_option_table (sd, extra_options);
-#endif
-
-  /* getopt will print the error message so we just have to exit if this fails.
-     FIXME: Hmmm...  in the case of gdb we need getopt to call
-     print_filtered.  */
-  if (sim_parse_args (sd, argv) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-#if 0
-  /* Allocate a handler for the control registers and other devices
-     if no memory for that range has been allocated by the user.
-     All are allocated in one chunk to keep things from being
-     unnecessarily complicated.  */
-  if (sim_core_read_buffer (sd, NULL, read_map, &c, FR30_DEVICE_ADDR, 1) == 0)
-    sim_core_attach (sd, NULL,
-		     0 /*level*/,
-		     access_read_write,
-		     0 /*space ???*/,
-		     FR30_DEVICE_ADDR, FR30_DEVICE_LEN /*nr_bytes*/,
-		     0 /*modulo*/,
-		     &fr30_devices,
-		     NULL /*buffer*/);
-#endif
-
-  /* Allocate core managed memory if none specified by user.
-     Use address 4 here in case the user wanted address 0 unmapped.  */
-  if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
-    sim_do_commandf (sd, "memory region 0,0x%lx", FR30_DEFAULT_MEM_SIZE);
-
-  /* check for/establish the reference program image */
-  if (sim_analyze_program (sd,
-			   (STATE_PROG_ARGV (sd) != NULL
-			    ? *STATE_PROG_ARGV (sd)
-			    : NULL),
-			   abfd) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-  /* Establish any remaining configuration options.  */
-  if (sim_config (sd) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-  if (sim_post_argv_init (sd) != SIM_RC_OK)
-    {
-      free_state (sd);
-      return 0;
-    }
-
-  /* Open a copy of the cpu descriptor table.  */
-  {
-    CGEN_CPU_DESC cd = fr30_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
-					     CGEN_ENDIAN_BIG);
-    for (i = 0; i < MAX_NR_PROCESSORS; ++i)
-      {
-	SIM_CPU *cpu = STATE_CPU (sd, i);
-	CPU_CPU_DESC (cpu) = cd;
-	CPU_DISASSEMBLER (cpu) = sim_cgen_disassemble_insn;
-      }
-    fr30_cgen_init_dis (cd);
-  }
-
-  /* Initialize various cgen things not done by common framework.
-     Must be done after fr30_cgen_cpu_open.  */
-  cgen_init (sd);
-
-  /* Store in a global so things like sparc32_dump_regs can be invoked
-     from the gdb command line.  */
-  current_state = sd;
-
-  return sd;
-}
-
-void
-sim_close (sd, quitting)
-     SIM_DESC sd;
-     int quitting;
-{
-  fr30_cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
-  sim_module_uninstall (sd);
-}
-
-SIM_RC
-sim_create_inferior (sd, abfd, argv, envp)
-     SIM_DESC sd;
-     struct _bfd *abfd;
-     char **argv;
-     char **envp;
-{
-  SIM_CPU *current_cpu = STATE_CPU (sd, 0);
-  SIM_ADDR addr;
-
-  if (abfd != NULL)
-    addr = bfd_get_start_address (abfd);
-  else
-    addr = 0;
-  sim_pc_set (current_cpu, addr);
-
-#if 0
-  STATE_ARGV (sd) = sim_copy_argv (argv);
-  STATE_ENVP (sd) = sim_copy_argv (envp);
-#endif
-
-  return SIM_RC_OK;
-}
-
-void
-sim_do_command (sd, cmd)
-     SIM_DESC sd;
-     char *cmd;
-{ 
-  if (sim_args_command (sd, cmd) != SIM_RC_OK)
-    sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
-}
+// OBSOLETE /* Main simulator entry points specific to the FR30.
+// OBSOLETE    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Solutions.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #ifdef HAVE_STDLIB_H
+// OBSOLETE #include <stdlib.h>
+// OBSOLETE #endif
+// OBSOLETE #include "sim-options.h"
+// OBSOLETE #include "libiberty.h"
+// OBSOLETE #include "bfd.h"
+// OBSOLETE 
+// OBSOLETE static void free_state (SIM_DESC);
+// OBSOLETE static void print_fr30_misc_cpu (SIM_CPU *cpu, int verbose);
+// OBSOLETE 
+// OBSOLETE /* Records simulator descriptor so utilities like fr30_dump_regs can be
+// OBSOLETE    called from gdb.  */
+// OBSOLETE SIM_DESC current_state;
+// OBSOLETE 
+// OBSOLETE /* Cover function of sim_state_free to free the cpu buffers as well.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE free_state (SIM_DESC sd)
+// OBSOLETE {
+// OBSOLETE   if (STATE_MODULES (sd) != NULL)
+// OBSOLETE     sim_module_uninstall (sd);
+// OBSOLETE   sim_cpu_free_all (sd);
+// OBSOLETE   sim_state_free (sd);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Create an instance of the simulator.  */
+// OBSOLETE 
+// OBSOLETE SIM_DESC
+// OBSOLETE sim_open (kind, callback, abfd, argv)
+// OBSOLETE      SIM_OPEN_KIND kind;
+// OBSOLETE      host_callback *callback;
+// OBSOLETE      struct _bfd *abfd;
+// OBSOLETE      char **argv;
+// OBSOLETE {
+// OBSOLETE   char c;
+// OBSOLETE   int i;
+// OBSOLETE   SIM_DESC sd = sim_state_alloc (kind, callback);
+// OBSOLETE 
+// OBSOLETE   /* The cpu data is kept in a separately allocated chunk of memory.  */
+// OBSOLETE   if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE #if 0 /* FIXME: pc is in mach-specific struct */
+// OBSOLETE   /* FIXME: watchpoints code shouldn't need this */
+// OBSOLETE   {
+// OBSOLETE     SIM_CPU *current_cpu = STATE_CPU (sd, 0);
+// OBSOLETE     STATE_WATCHPOINTS (sd)->pc = &(PC);
+// OBSOLETE     STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
+// OBSOLETE   }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE #if 0 /* FIXME: 'twould be nice if we could do this */
+// OBSOLETE   /* These options override any module options.
+// OBSOLETE      Obviously ambiguity should be avoided, however the caller may wish to
+// OBSOLETE      augment the meaning of an option.  */
+// OBSOLETE   if (extra_options != NULL)
+// OBSOLETE     sim_add_option_table (sd, extra_options);
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   /* getopt will print the error message so we just have to exit if this fails.
+// OBSOLETE      FIXME: Hmmm...  in the case of gdb we need getopt to call
+// OBSOLETE      print_filtered.  */
+// OBSOLETE   if (sim_parse_args (sd, argv) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   /* Allocate a handler for the control registers and other devices
+// OBSOLETE      if no memory for that range has been allocated by the user.
+// OBSOLETE      All are allocated in one chunk to keep things from being
+// OBSOLETE      unnecessarily complicated.  */
+// OBSOLETE   if (sim_core_read_buffer (sd, NULL, read_map, &c, FR30_DEVICE_ADDR, 1) == 0)
+// OBSOLETE     sim_core_attach (sd, NULL,
+// OBSOLETE 		     0 /*level*/,
+// OBSOLETE 		     access_read_write,
+// OBSOLETE 		     0 /*space ???*/,
+// OBSOLETE 		     FR30_DEVICE_ADDR, FR30_DEVICE_LEN /*nr_bytes*/,
+// OBSOLETE 		     0 /*modulo*/,
+// OBSOLETE 		     &fr30_devices,
+// OBSOLETE 		     NULL /*buffer*/);
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   /* Allocate core managed memory if none specified by user.
+// OBSOLETE      Use address 4 here in case the user wanted address 0 unmapped.  */
+// OBSOLETE   if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
+// OBSOLETE     sim_do_commandf (sd, "memory region 0,0x%lx", FR30_DEFAULT_MEM_SIZE);
+// OBSOLETE 
+// OBSOLETE   /* check for/establish the reference program image */
+// OBSOLETE   if (sim_analyze_program (sd,
+// OBSOLETE 			   (STATE_PROG_ARGV (sd) != NULL
+// OBSOLETE 			    ? *STATE_PROG_ARGV (sd)
+// OBSOLETE 			    : NULL),
+// OBSOLETE 			   abfd) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Establish any remaining configuration options.  */
+// OBSOLETE   if (sim_config (sd) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   if (sim_post_argv_init (sd) != SIM_RC_OK)
+// OBSOLETE     {
+// OBSOLETE       free_state (sd);
+// OBSOLETE       return 0;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Open a copy of the cpu descriptor table.  */
+// OBSOLETE   {
+// OBSOLETE     CGEN_CPU_DESC cd = fr30_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
+// OBSOLETE 					     CGEN_ENDIAN_BIG);
+// OBSOLETE     for (i = 0; i < MAX_NR_PROCESSORS; ++i)
+// OBSOLETE       {
+// OBSOLETE 	SIM_CPU *cpu = STATE_CPU (sd, i);
+// OBSOLETE 	CPU_CPU_DESC (cpu) = cd;
+// OBSOLETE 	CPU_DISASSEMBLER (cpu) = sim_cgen_disassemble_insn;
+// OBSOLETE       }
+// OBSOLETE     fr30_cgen_init_dis (cd);
+// OBSOLETE   }
+// OBSOLETE 
+// OBSOLETE   /* Initialize various cgen things not done by common framework.
+// OBSOLETE      Must be done after fr30_cgen_cpu_open.  */
+// OBSOLETE   cgen_init (sd);
+// OBSOLETE 
+// OBSOLETE   /* Store in a global so things like sparc32_dump_regs can be invoked
+// OBSOLETE      from the gdb command line.  */
+// OBSOLETE   current_state = sd;
+// OBSOLETE 
+// OBSOLETE   return sd;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE sim_close (sd, quitting)
+// OBSOLETE      SIM_DESC sd;
+// OBSOLETE      int quitting;
+// OBSOLETE {
+// OBSOLETE   fr30_cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
+// OBSOLETE   sim_module_uninstall (sd);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE SIM_RC
+// OBSOLETE sim_create_inferior (sd, abfd, argv, envp)
+// OBSOLETE      SIM_DESC sd;
+// OBSOLETE      struct _bfd *abfd;
+// OBSOLETE      char **argv;
+// OBSOLETE      char **envp;
+// OBSOLETE {
+// OBSOLETE   SIM_CPU *current_cpu = STATE_CPU (sd, 0);
+// OBSOLETE   SIM_ADDR addr;
+// OBSOLETE 
+// OBSOLETE   if (abfd != NULL)
+// OBSOLETE     addr = bfd_get_start_address (abfd);
+// OBSOLETE   else
+// OBSOLETE     addr = 0;
+// OBSOLETE   sim_pc_set (current_cpu, addr);
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   STATE_ARGV (sd) = sim_copy_argv (argv);
+// OBSOLETE   STATE_ENVP (sd) = sim_copy_argv (envp);
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   return SIM_RC_OK;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE sim_do_command (sd, cmd)
+// OBSOLETE      SIM_DESC sd;
+// OBSOLETE      char *cmd;
+// OBSOLETE { 
+// OBSOLETE   if (sim_args_command (sd, cmd) != SIM_RC_OK)
+// OBSOLETE     sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
+// OBSOLETE }
diff --git a/sim/fr30/sim-main.h b/sim/fr30/sim-main.h
index 8cbf085..91700fb 100644
--- a/sim/fr30/sim-main.h
+++ b/sim/fr30/sim-main.h
@@ -1,70 +1,70 @@
-/* Main header for the fr30.  */
-
-#define USING_SIM_BASE_H /* FIXME: quick hack */
-
-struct _sim_cpu; /* FIXME: should be in sim-basics.h */
-typedef struct _sim_cpu SIM_CPU;
-
-/* sim-basics.h includes config.h but cgen-types.h must be included before
-   sim-basics.h and cgen-types.h needs config.h.  */
-#include "config.h"
-
-#include "symcat.h"
-#include "sim-basics.h"
-#include "cgen-types.h"
-#include "fr30-desc.h"
-#include "fr30-opc.h"
-#include "arch.h"
-
-/* These must be defined before sim-base.h.  */
-typedef USI sim_cia;
-
-#define CIA_GET(cpu)     CPU_PC_GET (cpu)
-#define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val))
-
-#include "sim-base.h"
-#include "cgen-sim.h"
-#include "fr30-sim.h"
-
-/* The _sim_cpu struct.  */
-
-struct _sim_cpu {
-  /* sim/common cpu base.  */
-  sim_cpu_base base;
-
-  /* Static parts of cgen.  */
-  CGEN_CPU cgen_cpu;
-
-  /* CPU specific parts go here.
-     Note that in files that don't need to access these pieces WANT_CPU_FOO
-     won't be defined and thus these parts won't appear.  This is ok in the
-     sense that things work.  It is a source of bugs though.
-     One has to of course be careful to not take the size of this
-     struct and no structure members accessed in non-cpu specific files can
-     go after here.  Oh for a better language.  */
-#if defined (WANT_CPU_FR30BF)
-  FR30BF_CPU_DATA cpu_data;
-#endif
-};
-
-/* The sim_state struct.  */
-
-struct sim_state {
-  sim_cpu *cpu;
-#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
-
-  CGEN_STATE cgen_state;
-
-  sim_state_base base;
-};
-
-/* Misc.  */
-
-/* Catch address exceptions.  */
-extern SIM_CORE_SIGNAL_FN fr30_core_signal;
-#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
-fr30_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
-		  (TRANSFER), (ERROR))
-
-/* Default memory size.  */
-#define FR30_DEFAULT_MEM_SIZE 0x800000 /* 8M */
+// OBSOLETE /* Main header for the fr30.  */
+// OBSOLETE 
+// OBSOLETE #define USING_SIM_BASE_H /* FIXME: quick hack */
+// OBSOLETE 
+// OBSOLETE struct _sim_cpu; /* FIXME: should be in sim-basics.h */
+// OBSOLETE typedef struct _sim_cpu SIM_CPU;
+// OBSOLETE 
+// OBSOLETE /* sim-basics.h includes config.h but cgen-types.h must be included before
+// OBSOLETE    sim-basics.h and cgen-types.h needs config.h.  */
+// OBSOLETE #include "config.h"
+// OBSOLETE 
+// OBSOLETE #include "symcat.h"
+// OBSOLETE #include "sim-basics.h"
+// OBSOLETE #include "cgen-types.h"
+// OBSOLETE #include "fr30-desc.h"
+// OBSOLETE #include "fr30-opc.h"
+// OBSOLETE #include "arch.h"
+// OBSOLETE 
+// OBSOLETE /* These must be defined before sim-base.h.  */
+// OBSOLETE typedef USI sim_cia;
+// OBSOLETE 
+// OBSOLETE #define CIA_GET(cpu)     CPU_PC_GET (cpu)
+// OBSOLETE #define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val))
+// OBSOLETE 
+// OBSOLETE #include "sim-base.h"
+// OBSOLETE #include "cgen-sim.h"
+// OBSOLETE #include "fr30-sim.h"
+// OBSOLETE 
+// OBSOLETE /* The _sim_cpu struct.  */
+// OBSOLETE 
+// OBSOLETE struct _sim_cpu {
+// OBSOLETE   /* sim/common cpu base.  */
+// OBSOLETE   sim_cpu_base base;
+// OBSOLETE 
+// OBSOLETE   /* Static parts of cgen.  */
+// OBSOLETE   CGEN_CPU cgen_cpu;
+// OBSOLETE 
+// OBSOLETE   /* CPU specific parts go here.
+// OBSOLETE      Note that in files that don't need to access these pieces WANT_CPU_FOO
+// OBSOLETE      won't be defined and thus these parts won't appear.  This is ok in the
+// OBSOLETE      sense that things work.  It is a source of bugs though.
+// OBSOLETE      One has to of course be careful to not take the size of this
+// OBSOLETE      struct and no structure members accessed in non-cpu specific files can
+// OBSOLETE      go after here.  Oh for a better language.  */
+// OBSOLETE #if defined (WANT_CPU_FR30BF)
+// OBSOLETE   FR30BF_CPU_DATA cpu_data;
+// OBSOLETE #endif
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* The sim_state struct.  */
+// OBSOLETE 
+// OBSOLETE struct sim_state {
+// OBSOLETE   sim_cpu *cpu;
+// OBSOLETE #define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
+// OBSOLETE 
+// OBSOLETE   CGEN_STATE cgen_state;
+// OBSOLETE 
+// OBSOLETE   sim_state_base base;
+// OBSOLETE };
+// OBSOLETE 
+// OBSOLETE /* Misc.  */
+// OBSOLETE 
+// OBSOLETE /* Catch address exceptions.  */
+// OBSOLETE extern SIM_CORE_SIGNAL_FN fr30_core_signal;
+// OBSOLETE #define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
+// OBSOLETE fr30_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
+// OBSOLETE 		  (TRANSFER), (ERROR))
+// OBSOLETE 
+// OBSOLETE /* Default memory size.  */
+// OBSOLETE #define FR30_DEFAULT_MEM_SIZE 0x800000 /* 8M */
diff --git a/sim/fr30/traps.c b/sim/fr30/traps.c
index 25cd7b9..6852359 100644
--- a/sim/fr30/traps.c
+++ b/sim/fr30/traps.c
@@ -1,218 +1,218 @@
-/* fr30 exception, interrupt, and trap (EIT) support
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-   Contributed by Cygnus Solutions.
-
-This file is part of the GNU simulators.
-
-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 "sim-main.h"
-#include "targ-vals.h"
-#include "cgen-engine.h"
-
-/* The semantic code invokes this for invalid (unrecognized) instructions.  */
-
-SEM_PC
-sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
-{
-  SIM_DESC sd = CPU_STATE (current_cpu);
-
-#if 0
-  if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
-    {
-      h_bsm_set (current_cpu, h_sm_get (current_cpu));
-      h_bie_set (current_cpu, h_ie_get (current_cpu));
-      h_bcond_set (current_cpu, h_cond_get (current_cpu));
-      /* sm not changed */
-      h_ie_set (current_cpu, 0);
-      h_cond_set (current_cpu, 0);
-
-      h_bpc_set (current_cpu, cia);
-
-      sim_engine_restart (CPU_STATE (current_cpu), current_cpu, NULL,
-			  EIT_RSVD_INSN_ADDR);
-    }
-  else
-#endif
-    sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
-  return vpc;
-}
-
-/* Process an address exception.  */
-
-void
-fr30_core_signal (SIM_DESC sd, SIM_CPU *current_cpu, sim_cia cia,
-		  unsigned int map, int nr_bytes, address_word addr,
-		  transfer_type transfer, sim_core_signals sig)
-{
-#if 0
-  if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
-    {
-      h_bsm_set (current_cpu, h_sm_get (current_cpu));
-      h_bie_set (current_cpu, h_ie_get (current_cpu));
-      h_bcond_set (current_cpu, h_cond_get (current_cpu));
-      /* sm not changed */
-      h_ie_set (current_cpu, 0);
-      h_cond_set (current_cpu, 0);
-
-      h_bpc_set (current_cpu, cia);
-
-      sim_engine_restart (CPU_STATE (current_cpu), current_cpu, NULL,
-			  EIT_ADDR_EXCP_ADDR);
-    }
-  else
-#endif
-    sim_core_signal (sd, current_cpu, cia, map, nr_bytes, addr,
-		     transfer, sig);
-}
-
-/* Read/write functions for system call interface.  */
-
-static int
-syscall_read_mem (host_callback *cb, struct cb_syscall *sc,
-		  unsigned long taddr, char *buf, int bytes)
-{
-  SIM_DESC sd = (SIM_DESC) sc->p1;
-  SIM_CPU *cpu = (SIM_CPU *) sc->p2;
-
-  return sim_core_read_buffer (sd, cpu, read_map, buf, taddr, bytes);
-}
-
-static int
-syscall_write_mem (host_callback *cb, struct cb_syscall *sc,
-		   unsigned long taddr, const char *buf, int bytes)
-{
-  SIM_DESC sd = (SIM_DESC) sc->p1;
-  SIM_CPU *cpu = (SIM_CPU *) sc->p2;
-
-  return sim_core_write_buffer (sd, cpu, write_map, buf, taddr, bytes);
-}
-
-/* Subroutine of fr30_int to save the PS and PC and setup for INT and INTE.  */
-
-static void
-setup_int (SIM_CPU *current_cpu, PCADDR pc)
-{
-  USI ssp = fr30bf_h_dr_get (current_cpu, H_DR_SSP);
-  USI ps = fr30bf_h_ps_get (current_cpu);
-
-  ssp -= 4;
-  SETMEMSI (current_cpu, pc, ssp, ps);
-  ssp -= 4;
-  SETMEMSI (current_cpu, pc, ssp, pc + 2);
-  fr30bf_h_dr_set (current_cpu, H_DR_SSP, ssp);
-  fr30bf_h_sbit_set (current_cpu, 0);
-}
-
-/* Trap support.
-   The result is the pc address to continue at.
-   Preprocessing like saving the various registers has already been done.  */
-
-USI
-fr30_int (SIM_CPU *current_cpu, PCADDR pc, int num)
-{
-  SIM_DESC sd = CPU_STATE (current_cpu);
-  host_callback *cb = STATE_CALLBACK (sd);
-
-#ifdef SIM_HAVE_BREAKPOINTS
-  /* Check for breakpoints "owned" by the simulator first, regardless
-     of --environment.  */
-  if (num == TRAP_BREAKPOINT)
-    {
-      /* First try sim-break.c.  If it's a breakpoint the simulator "owns"
-	 it doesn't return.  Otherwise it returns and let's us try.  */
-      sim_handle_breakpoint (sd, current_cpu, pc);
-      /* Fall through.  */
-    }
-#endif
-
-  if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
-    {
-      /* The new pc is the trap vector entry.
-	 We assume there's a branch there to some handler.  */
-      USI new_pc;
-      setup_int (current_cpu, pc);
-      fr30bf_h_ibit_set (current_cpu, 0);
-      new_pc = GETMEMSI (current_cpu, pc,
-			 fr30bf_h_dr_get (current_cpu, H_DR_TBR)
-			 + 1024 - ((num + 1) * 4));
-      return new_pc;
-    }
-
-  switch (num)
-    {
-    case TRAP_SYSCALL :
-      {
-	/* TODO: find out what the ABI for this is */
-	CB_SYSCALL s;
-
-	CB_SYSCALL_INIT (&s);
-	s.func = fr30bf_h_gr_get (current_cpu, 0);
-	s.arg1 = fr30bf_h_gr_get (current_cpu, 4);
-	s.arg2 = fr30bf_h_gr_get (current_cpu, 5);
-	s.arg3 = fr30bf_h_gr_get (current_cpu, 6);
-
-	if (s.func == TARGET_SYS_exit)
-	  {
-	    sim_engine_halt (sd, current_cpu, NULL, pc, sim_exited, s.arg1);
-	  }
-
-	s.p1 = (PTR) sd;
-	s.p2 = (PTR) current_cpu;
-	s.read_mem = syscall_read_mem;
-	s.write_mem = syscall_write_mem;
-	cb_syscall (cb, &s);
-	fr30bf_h_gr_set (current_cpu, 2, s.errcode); /* TODO: check this one */
-	fr30bf_h_gr_set (current_cpu, 4, s.result);
-	fr30bf_h_gr_set (current_cpu, 1, s.result2); /* TODO: check this one */
-	break;
-      }
-
-    case TRAP_BREAKPOINT:
-      sim_engine_halt (sd, current_cpu, NULL, pc,
-		       sim_stopped, SIM_SIGTRAP);
-      break;
-
-    default :
-      {
-	USI new_pc;
-	setup_int (current_cpu, pc);
-	fr30bf_h_ibit_set (current_cpu, 0);
-	new_pc = GETMEMSI (current_cpu, pc,
-			   fr30bf_h_dr_get (current_cpu, H_DR_TBR)
-			   + 1024 - ((num + 1) * 4));
-	return new_pc;
-      }
-    }
-
-  /* Fake an "reti" insn.
-     Since we didn't push anything to stack, all we need to do is
-     update pc.  */
-  return pc + 2;
-}
-
-USI
-fr30_inte (SIM_CPU *current_cpu, PCADDR pc, int num)
-{
-  /* The new pc is the trap #9 vector entry.
-     We assume there's a branch there to some handler.  */
-  USI new_pc;
-  setup_int (current_cpu, pc);
-  fr30bf_h_ilm_set (current_cpu, 4);
-  new_pc = GETMEMSI (current_cpu, pc,
-		     fr30bf_h_dr_get (current_cpu, H_DR_TBR)
-		     + 1024 - ((9 + 1) * 4));
-  return new_pc;
-}
+// OBSOLETE /* fr30 exception, interrupt, and trap (EIT) support
+// OBSOLETE    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+// OBSOLETE    Contributed by Cygnus Solutions.
+// OBSOLETE 
+// OBSOLETE This file is part of the GNU simulators.
+// OBSOLETE 
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2, or (at your option)
+// OBSOLETE any later version.
+// OBSOLETE 
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE 
+// OBSOLETE You should have received a copy of the GNU General Public License along
+// OBSOLETE with this program; if not, write to the Free Software Foundation, Inc.,
+// OBSOLETE 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+// OBSOLETE 
+// OBSOLETE #include "sim-main.h"
+// OBSOLETE #include "targ-vals.h"
+// OBSOLETE #include "cgen-engine.h"
+// OBSOLETE 
+// OBSOLETE /* The semantic code invokes this for invalid (unrecognized) instructions.  */
+// OBSOLETE 
+// OBSOLETE SEM_PC
+// OBSOLETE sim_engine_invalid_insn (SIM_CPU *current_cpu, IADDR cia, SEM_PC vpc)
+// OBSOLETE {
+// OBSOLETE   SIM_DESC sd = CPU_STATE (current_cpu);
+// OBSOLETE 
+// OBSOLETE #if 0
+// OBSOLETE   if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
+// OBSOLETE     {
+// OBSOLETE       h_bsm_set (current_cpu, h_sm_get (current_cpu));
+// OBSOLETE       h_bie_set (current_cpu, h_ie_get (current_cpu));
+// OBSOLETE       h_bcond_set (current_cpu, h_cond_get (current_cpu));
+// OBSOLETE       /* sm not changed */
+// OBSOLETE       h_ie_set (current_cpu, 0);
+// OBSOLETE       h_cond_set (current_cpu, 0);
+// OBSOLETE 
+// OBSOLETE       h_bpc_set (current_cpu, cia);
+// OBSOLETE 
+// OBSOLETE       sim_engine_restart (CPU_STATE (current_cpu), current_cpu, NULL,
+// OBSOLETE 			  EIT_RSVD_INSN_ADDR);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE #endif
+// OBSOLETE     sim_engine_halt (sd, current_cpu, NULL, cia, sim_stopped, SIM_SIGILL);
+// OBSOLETE   return vpc;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Process an address exception.  */
+// OBSOLETE 
+// OBSOLETE void
+// OBSOLETE fr30_core_signal (SIM_DESC sd, SIM_CPU *current_cpu, sim_cia cia,
+// OBSOLETE 		  unsigned int map, int nr_bytes, address_word addr,
+// OBSOLETE 		  transfer_type transfer, sim_core_signals sig)
+// OBSOLETE {
+// OBSOLETE #if 0
+// OBSOLETE   if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
+// OBSOLETE     {
+// OBSOLETE       h_bsm_set (current_cpu, h_sm_get (current_cpu));
+// OBSOLETE       h_bie_set (current_cpu, h_ie_get (current_cpu));
+// OBSOLETE       h_bcond_set (current_cpu, h_cond_get (current_cpu));
+// OBSOLETE       /* sm not changed */
+// OBSOLETE       h_ie_set (current_cpu, 0);
+// OBSOLETE       h_cond_set (current_cpu, 0);
+// OBSOLETE 
+// OBSOLETE       h_bpc_set (current_cpu, cia);
+// OBSOLETE 
+// OBSOLETE       sim_engine_restart (CPU_STATE (current_cpu), current_cpu, NULL,
+// OBSOLETE 			  EIT_ADDR_EXCP_ADDR);
+// OBSOLETE     }
+// OBSOLETE   else
+// OBSOLETE #endif
+// OBSOLETE     sim_core_signal (sd, current_cpu, cia, map, nr_bytes, addr,
+// OBSOLETE 		     transfer, sig);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Read/write functions for system call interface.  */
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE syscall_read_mem (host_callback *cb, struct cb_syscall *sc,
+// OBSOLETE 		  unsigned long taddr, char *buf, int bytes)
+// OBSOLETE {
+// OBSOLETE   SIM_DESC sd = (SIM_DESC) sc->p1;
+// OBSOLETE   SIM_CPU *cpu = (SIM_CPU *) sc->p2;
+// OBSOLETE 
+// OBSOLETE   return sim_core_read_buffer (sd, cpu, read_map, buf, taddr, bytes);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE static int
+// OBSOLETE syscall_write_mem (host_callback *cb, struct cb_syscall *sc,
+// OBSOLETE 		   unsigned long taddr, const char *buf, int bytes)
+// OBSOLETE {
+// OBSOLETE   SIM_DESC sd = (SIM_DESC) sc->p1;
+// OBSOLETE   SIM_CPU *cpu = (SIM_CPU *) sc->p2;
+// OBSOLETE 
+// OBSOLETE   return sim_core_write_buffer (sd, cpu, write_map, buf, taddr, bytes);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Subroutine of fr30_int to save the PS and PC and setup for INT and INTE.  */
+// OBSOLETE 
+// OBSOLETE static void
+// OBSOLETE setup_int (SIM_CPU *current_cpu, PCADDR pc)
+// OBSOLETE {
+// OBSOLETE   USI ssp = fr30bf_h_dr_get (current_cpu, H_DR_SSP);
+// OBSOLETE   USI ps = fr30bf_h_ps_get (current_cpu);
+// OBSOLETE 
+// OBSOLETE   ssp -= 4;
+// OBSOLETE   SETMEMSI (current_cpu, pc, ssp, ps);
+// OBSOLETE   ssp -= 4;
+// OBSOLETE   SETMEMSI (current_cpu, pc, ssp, pc + 2);
+// OBSOLETE   fr30bf_h_dr_set (current_cpu, H_DR_SSP, ssp);
+// OBSOLETE   fr30bf_h_sbit_set (current_cpu, 0);
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE /* Trap support.
+// OBSOLETE    The result is the pc address to continue at.
+// OBSOLETE    Preprocessing like saving the various registers has already been done.  */
+// OBSOLETE 
+// OBSOLETE USI
+// OBSOLETE fr30_int (SIM_CPU *current_cpu, PCADDR pc, int num)
+// OBSOLETE {
+// OBSOLETE   SIM_DESC sd = CPU_STATE (current_cpu);
+// OBSOLETE   host_callback *cb = STATE_CALLBACK (sd);
+// OBSOLETE 
+// OBSOLETE #ifdef SIM_HAVE_BREAKPOINTS
+// OBSOLETE   /* Check for breakpoints "owned" by the simulator first, regardless
+// OBSOLETE      of --environment.  */
+// OBSOLETE   if (num == TRAP_BREAKPOINT)
+// OBSOLETE     {
+// OBSOLETE       /* First try sim-break.c.  If it's a breakpoint the simulator "owns"
+// OBSOLETE 	 it doesn't return.  Otherwise it returns and let's us try.  */
+// OBSOLETE       sim_handle_breakpoint (sd, current_cpu, pc);
+// OBSOLETE       /* Fall through.  */
+// OBSOLETE     }
+// OBSOLETE #endif
+// OBSOLETE 
+// OBSOLETE   if (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)
+// OBSOLETE     {
+// OBSOLETE       /* The new pc is the trap vector entry.
+// OBSOLETE 	 We assume there's a branch there to some handler.  */
+// OBSOLETE       USI new_pc;
+// OBSOLETE       setup_int (current_cpu, pc);
+// OBSOLETE       fr30bf_h_ibit_set (current_cpu, 0);
+// OBSOLETE       new_pc = GETMEMSI (current_cpu, pc,
+// OBSOLETE 			 fr30bf_h_dr_get (current_cpu, H_DR_TBR)
+// OBSOLETE 			 + 1024 - ((num + 1) * 4));
+// OBSOLETE       return new_pc;
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   switch (num)
+// OBSOLETE     {
+// OBSOLETE     case TRAP_SYSCALL :
+// OBSOLETE       {
+// OBSOLETE 	/* TODO: find out what the ABI for this is */
+// OBSOLETE 	CB_SYSCALL s;
+// OBSOLETE 
+// OBSOLETE 	CB_SYSCALL_INIT (&s);
+// OBSOLETE 	s.func = fr30bf_h_gr_get (current_cpu, 0);
+// OBSOLETE 	s.arg1 = fr30bf_h_gr_get (current_cpu, 4);
+// OBSOLETE 	s.arg2 = fr30bf_h_gr_get (current_cpu, 5);
+// OBSOLETE 	s.arg3 = fr30bf_h_gr_get (current_cpu, 6);
+// OBSOLETE 
+// OBSOLETE 	if (s.func == TARGET_SYS_exit)
+// OBSOLETE 	  {
+// OBSOLETE 	    sim_engine_halt (sd, current_cpu, NULL, pc, sim_exited, s.arg1);
+// OBSOLETE 	  }
+// OBSOLETE 
+// OBSOLETE 	s.p1 = (PTR) sd;
+// OBSOLETE 	s.p2 = (PTR) current_cpu;
+// OBSOLETE 	s.read_mem = syscall_read_mem;
+// OBSOLETE 	s.write_mem = syscall_write_mem;
+// OBSOLETE 	cb_syscall (cb, &s);
+// OBSOLETE 	fr30bf_h_gr_set (current_cpu, 2, s.errcode); /* TODO: check this one */
+// OBSOLETE 	fr30bf_h_gr_set (current_cpu, 4, s.result);
+// OBSOLETE 	fr30bf_h_gr_set (current_cpu, 1, s.result2); /* TODO: check this one */
+// OBSOLETE 	break;
+// OBSOLETE       }
+// OBSOLETE 
+// OBSOLETE     case TRAP_BREAKPOINT:
+// OBSOLETE       sim_engine_halt (sd, current_cpu, NULL, pc,
+// OBSOLETE 		       sim_stopped, SIM_SIGTRAP);
+// OBSOLETE       break;
+// OBSOLETE 
+// OBSOLETE     default :
+// OBSOLETE       {
+// OBSOLETE 	USI new_pc;
+// OBSOLETE 	setup_int (current_cpu, pc);
+// OBSOLETE 	fr30bf_h_ibit_set (current_cpu, 0);
+// OBSOLETE 	new_pc = GETMEMSI (current_cpu, pc,
+// OBSOLETE 			   fr30bf_h_dr_get (current_cpu, H_DR_TBR)
+// OBSOLETE 			   + 1024 - ((num + 1) * 4));
+// OBSOLETE 	return new_pc;
+// OBSOLETE       }
+// OBSOLETE     }
+// OBSOLETE 
+// OBSOLETE   /* Fake an "reti" insn.
+// OBSOLETE      Since we didn't push anything to stack, all we need to do is
+// OBSOLETE      update pc.  */
+// OBSOLETE   return pc + 2;
+// OBSOLETE }
+// OBSOLETE 
+// OBSOLETE USI
+// OBSOLETE fr30_inte (SIM_CPU *current_cpu, PCADDR pc, int num)
+// OBSOLETE {
+// OBSOLETE   /* The new pc is the trap #9 vector entry.
+// OBSOLETE      We assume there's a branch there to some handler.  */
+// OBSOLETE   USI new_pc;
+// OBSOLETE   setup_int (current_cpu, pc);
+// OBSOLETE   fr30bf_h_ilm_set (current_cpu, 4);
+// OBSOLETE   new_pc = GETMEMSI (current_cpu, pc,
+// OBSOLETE 		     fr30bf_h_dr_get (current_cpu, H_DR_TBR)
+// OBSOLETE 		     + 1024 - ((9 + 1) * 4));
+// OBSOLETE   return new_pc;
+// OBSOLETE }
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 09aa6fb..657a69f 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,17 @@
+2002-07-29  Andrey Volkov  <avolkov@transas.com>
+
+ 	* compile.c: Include "gdb/sim-h8300.h"
+ 	* Makefile.in: Add dependences on "inst.h",
+ 	"gdb/callback.h", "gdb/remote-sim.h" and "gdb/sim-h8300.h".
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 2002-05-19  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* compile.c: Fix formatting.
diff --git a/sim/h8300/Makefile.in b/sim/h8300/Makefile.in
index 867e2e6..55dc3db 100644
--- a/sim/h8300/Makefile.in
+++ b/sim/h8300/Makefile.in
@@ -19,7 +19,9 @@
 ## COMMON_PRE_CONFIG_FRAG
 
 SIM_OBJS = compile.o sim-load.o
-
 ## COMMON_POST_CONFIG_FRAG
 
-compile.o: compile.c config.h
+compile.o: compile.c inst.h config.h \
+	    $(srcdir)/../../include/gdb/sim-h8300.h \
+	    $(srcdir)/../../include/gdb/remote-sim.h \
+	    $(srcdir)/../../include/gdb/callback.h
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 27530db..8e4b55d 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -32,8 +32,9 @@
 #endif
 #include "ansidecl.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
+#include "gdb/sim-h8300.h"
 
 #ifndef SIGTRAP
 # define SIGTRAP 5
diff --git a/sim/h8500/ChangeLog b/sim/h8500/ChangeLog
index af4f784..d42834c 100644
--- a/sim/h8500/ChangeLog
+++ b/sim/h8500/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* compile.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
 
 	* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/h8500/compile.c b/sim/h8500/compile.c
index 1aad644..aec8ce9 100644
--- a/sim/h8500/compile.c
+++ b/sim/h8500/compile.c
@@ -31,8 +31,8 @@
 #include <setjmp.h>
 #include "ansidecl.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #define O_RECOMPILE 85
 #define DEFINE_TABLE
diff --git a/sim/i960/ChangeLog b/sim/i960/ChangeLog
index 8cd8512..6a727fe 100644
--- a/sim/i960/ChangeLog
+++ b/sim/i960/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2001-07-05  Ben Elliston  <bje@redhat.com>
 
 	* Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index d5ba8ab..436ba3b 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -1,3 +1,27 @@
+2002-08-22  Chris Demetriou  <cgd@broadcom.com>
+
+	* compare_igen_models: New script.
+
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* gen.c (gen_entry_expand_opcode): Initialize ``value'' to -1 and
+	``t'' to NULL.
+	* igen.c (main): Add default case to switch.
+	* gen-icache.c (print_icache_extraction): Ditto.
+
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (BUILD_CFLAGS): Remove -O0.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-03  Richard Henderson  <rth@redhat.com>
+
+	* gen-engine.c (print_run_body): Avoid multi-line strings.
+	* lf.c (lf_print__gnu_copyleft): Likewise.
+
 2002-05-01  Chris Demetriou  <cgd@broadcom.com>
 
 	* igen.c: Use 'deprecated' rather than 'depreciated.'
diff --git a/sim/igen/Makefile.in b/sim/igen/Makefile.in
index 9fff4a0..2c14aa5 100644
--- a/sim/igen/Makefile.in
+++ b/sim/igen/Makefile.in
@@ -85,7 +85,7 @@
 	$(CFLAGS_FOR_BUILD) \
 	$(IGEN_WARN_CFLAGS) \
 	$(IGEN_WERROR_CFLAGS) \
-	$(INCLUDES) -O0
+	$(INCLUDES)
 BUILD_LDFLAGS = 
 
 all:	igen
diff --git a/sim/igen/compare_igen_models b/sim/igen/compare_igen_models
new file mode 100755
index 0000000..3c3e46a
--- /dev/null
+++ b/sim/igen/compare_igen_models
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Script to compare functions and instructions used by different igen models.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Contributed by Broadcom Corporation (SiByte).
+#
+# This file is part of 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.
+
+# This is a simple-minded script to compare the functions and instructions
+# listed for two different models in one or more .igen files.
+#
+# It was intended to be useful to help factor models into common subsets.
+#
+# Things to note:
+#
+#    * igen include directives are not processed!
+#
+#    * functions and instructions with multiple definitions (e.g., based
+#      on model names) are treated as being different.  In other words,
+#      if two models have different functions named 'foo', this
+#      script will say that one has one of the function definitions, and
+#      the other has the other.
+
+if [ "$#" -lt 2 ]; then
+	echo "usage: $0 model1 model2 [file ...]" 1>&2
+	exit 1
+fi
+model1="$1"
+model2="$2"
+shift; shift
+
+gawk -v model1="$model1" -v model2="$model2" -F: -- '
+BEGIN {
+	thang_count = 0
+}
+function thang_has_model(t, m) {
+#	printf("thang_has_model(%s, %s) (@ %s:%d)\n", t, m,
+#	       thangs[t,"file"], thangs[t,"line"]);
+	if (thangs[t,"nmodels"] == 0) return 1;
+
+	for (j = 0; j < thangs[t,"nmodels"]; j++) {
+#		printf("\tmodel \"%s\"\n", thangs[t,"models",j]);
+		if (thangs[t,"models",j] == m) return 1;
+	}
+#	printf("\t-> 0\n");
+	return 0
+}
+function compare_models(m1, m2) {
+#	printf("compare_models(%s, %s)\n", m1, m2);
+	seen_any=0
+	for (i = 0; i < thang_count; i++) {
+		if (thang_has_model(i, m1) && !thang_has_model(i, m2)) {
+			if (!seen_any) {
+				printf("Things in %s but not in %s:\n", m1, m2);
+				seen_any = 1
+			}
+			printf("%s:%d: %s\n", thangs[i,"file"],
+			       thangs[i,"line"], thangs[i,"contents"]);
+		}
+	}
+}
+$0 ~ /^:/ && $2 == "model" {
+	# ignore.
+	# print "model " $0
+}
+($0 ~ /^:/ && $2 == "function") || \
+($0 ~ /^:/ && $2 == "internal") || \
+($0 ~ /^[0-9]/) {
+	# a function, internal, or instruction.
+
+	current_thang = thang_count
+	thang_count++
+
+	thangs[current_thang,"file"] = FILENAME
+	thangs[current_thang,"line"] = NR
+	thangs[current_thang,"contents"] = $0
+	thangs[current_thang,"nmodels"] = 0
+
+	if ($0 ~ /^:/) {
+		thangs[current_thang,"type"] = $2
+	} else {
+		thangs[current_thang,"type"] = "instruction"
+	}
+}
+$0 ~ /^\*/ {
+	split(substr($1, 2), tmp_models, /,/)
+	for (key in tmp_models) {
+		current_model = thangs[current_thang,"nmodels"]
+		thangs[current_thang,"nmodels"]++
+		thangs[current_thang,"models",current_model] = tmp_models[key]
+	}
+}
+END {
+	compare_models(model1, model2)
+	if (seen_any) printf("\n");
+	compare_models(model2, model1)
+}' "$@"
+
+exit "$?"
diff --git a/sim/igen/configure b/sim/igen/configure
index 9d6009c..913c46f 100755
--- a/sim/igen/configure
+++ b/sim/igen/configure
@@ -135,7 +135,9 @@
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -689,7 +691,7 @@
 # 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:693: checking for a BSD compatible install" >&5
+echo "configure:695: 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
@@ -744,7 +746,7 @@
 # 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:748: checking for $ac_word" >&5
+echo "configure:750: 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
@@ -774,7 +776,7 @@
   # 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:778: checking for $ac_word" >&5
+echo "configure:780: 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
@@ -825,7 +827,7 @@
       # 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:829: checking for $ac_word" >&5
+echo "configure:831: 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
@@ -857,7 +859,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:861: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:863: 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.
@@ -868,12 +870,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 872 "configure"
+#line 874 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:879: \"$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
@@ -899,12 +901,12 @@
   { 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:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:905: 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:908: checking whether we are using GNU C" >&5
+echo "configure:910: 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
@@ -913,7 +915,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:917: \"$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:919: \"$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
@@ -932,7 +934,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:936: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:938: 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
@@ -965,37 +967,84 @@
 
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:1020: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 1030 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -1064,7 +1113,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1068: checking host system type" >&5
+echo "configure:1117: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1085,7 +1134,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1089: checking target system type" >&5
+echo "configure:1138: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1103,7 +1152,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1107: checking build system type" >&5
+echo "configure:1156: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1150,7 +1199,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1154: checking how to run the C preprocessor" >&5
+echo "configure:1203: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1165,13 +1214,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1169 "configure"
+#line 1218 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1224: \"$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
   :
@@ -1182,13 +1231,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1186 "configure"
+#line 1235 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1241: \"$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
   :
@@ -1199,13 +1248,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+#line 1252 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1258: \"$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
   :
@@ -1233,17 +1282,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1237: checking for $ac_hdr" >&5
+echo "configure:1286: 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
-#line 1242 "configure"
+#line 1291 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1296: \"$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*
@@ -1274,12 +1323,12 @@
 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:1278: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1327: 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 <<EOF
-#line 1283 "configure"
+#line 1332 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -1287,7 +1336,7 @@
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -1312,7 +1361,7 @@
 # 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:1316: checking for opendir in -ldir" >&5
+echo "configure:1365: 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
@@ -1320,7 +1369,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1324 "configure"
+#line 1373 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1331,7 +1380,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1384: \"$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
@@ -1353,7 +1402,7 @@
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1357: checking for opendir in -lx" >&5
+echo "configure:1406: 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
@@ -1361,7 +1410,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
+#line 1414 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1372,7 +1421,7 @@
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1425: \"$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
@@ -1407,7 +1456,7 @@
 # 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:1411: checking for $ac_word" >&5
+echo "configure:1460: 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
diff --git a/sim/igen/gen-engine.c b/sim/igen/gen-engine.c
index 4b6861e..ee27e68 100644
--- a/sim/igen/gen-engine.c
+++ b/sim/igen/gen-engine.c
@@ -98,21 +98,21 @@
   if (!options.gen.smp)
     {
       
-      lf_putstr (file, "
-/* CASE 1: NO SMP (with or with out instruction cache).
-
-In this case, we can take advantage of the fact that the current
-instruction address (CIA) does not need to be read from / written to
-the CPU object after the execution of an instruction.
-
-Instead, CIA is only saved when the main loop exits.  This occures
-when either sim_engine_halt or sim_engine_restart is called.  Both of
-these functions save the current instruction address before halting /
-restarting the simulator.
-
-As a variation, there may also be support for an instruction cracking
-cache. */
-
+      lf_putstr (file, "\
+/* CASE 1: NO SMP (with or with out instruction cache).\n\
+\n\
+In this case, we can take advantage of the fact that the current\n\
+instruction address (CIA) does not need to be read from / written to\n\
+the CPU object after the execution of an instruction.\n\
+\n\
+Instead, CIA is only saved when the main loop exits.  This occures\n\
+when either sim_engine_halt or sim_engine_restart is called.  Both of\n\
+these functions save the current instruction address before halting /\n\
+restarting the simulator.\n\
+\n\
+As a variation, there may also be support for an instruction cracking\n\
+cache. */\n\
+\n\
 ");
 
       lf_putstr (file, "\n");
@@ -215,14 +215,14 @@
   if (options.gen.smp)
     {
       
-      lf_putstr (file, "
-/* CASE 2: SMP (With or without ICACHE)
-
-The complexity here comes from needing to correctly halt the simulator
-when it is aborted.  For instance, if cpu0 requests a restart then
-cpu1 will normally be the next cpu that is run.  Cpu0 being restarted
-after all the other CPU's and the event queue have been processed */
-
+      lf_putstr (file, "\
+/* CASE 2: SMP (With or without ICACHE)\n\
+\n\
+The complexity here comes from needing to correctly halt the simulator\n\
+when it is aborted.  For instance, if cpu0 requests a restart then\n\
+cpu1 will normally be the next cpu that is run.  Cpu0 being restarted\n\
+after all the other CPU's and the event queue have been processed */\n\
+\n\
 ");
       
       lf_putstr (file, "\n");
diff --git a/sim/igen/gen-icache.c b/sim/igen/gen-icache.c
index 88d5d41..5ec1e73 100644
--- a/sim/igen/gen-icache.c
+++ b/sim/igen/gen-icache.c
@@ -132,6 +132,8 @@
       else
 	return;
       break;
+    default:
+      abort (); /* Bad switch.  */
     }
   
   /* For the type, default to a simple unsigned */
diff --git a/sim/igen/gen.c b/sim/igen/gen.c
index 7c24b46..156c929 100644
--- a/sim/igen/gen.c
+++ b/sim/igen/gen.c
@@ -1025,9 +1025,9 @@
 			    }
 			  case insn_field_cond_field:
 			    {
-			      int value;
+			      int value = -1;
 			      opcode_bits *bit;
-			      gen_entry *t;
+			      gen_entry *t = NULL;
 			      /* Try to find a value for the
                                  conditional by looking back through
                                  the previously defined bits for one
diff --git a/sim/igen/igen.c b/sim/igen/igen.c
index 1399d30..717c0c6 100644
--- a/sim/igen/igen.c
+++ b/sim/igen/igen.c
@@ -1277,6 +1277,8 @@
 	      case 'S':
 		name = &names->suffix;
 		break;
+	      default:
+		abort (); /* Bad switch.  */
 	      }
 	    name->u = strdup (chp);
 	    name->l = strdup (chp);
diff --git a/sim/igen/lf.c b/sim/igen/lf.c
index 1b4a5f1..d209858 100644
--- a/sim/igen/lf.c
+++ b/sim/igen/lf.c
@@ -259,27 +259,27 @@
   case lf_is_c:
   case lf_is_h:
     nr += lf_printf(file, "\
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- 
-    --
-
-    This file was generated by the program %s */
+/*  This file is part of the program psim.\n\
+\n\
+    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>\n\
+\n\
+    This program is free software; you can redistribute it and/or modify\n\
+    it under the terms of the GNU General Public License as published by\n\
+    the Free Software Foundation; either version 2 of the License, or\n\
+    (at your option) any later version.\n\
+\n\
+    This program is distributed in the hope that it will be useful,\n\
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
+    GNU General Public License for more details.\n\
+ \n\
+    You should have received a copy of the GNU General Public License\n\
+    along with this program; if not, write to the Free Software\n\
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
+\n\
+    --\n\
+\n\
+    This file was generated by the program %s */\n\
 ", filter_filename(file->program));
     break;
   default:
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 7762c7b..6ee9d85 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2001-11-14  Dave Brolley  <brolley@redhat.com>
 
 	* arch.c: Regenerate.
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 1273414..abe5f55 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,65 @@
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
+
+2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
+
+	* interp.c (sim_prepare_for_program): Look up the image for the 
+	reset vector and set cpu_use_elf_start to 1 if not found.
+	(sim_open): Do not set cpu_use_elf_start.
+
+2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
+
+	* interp.c (sim_hw_configure): Return 1 for success.
+	(sim_prepare_for_program): Use the sim_hw_configure exit code to
+	return SIM_RC_FAIL.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
+	bank window to some virtual address to read from extended memory.
+	(m68hc11cpu_io_write_buffer): Likewise for writing.
+	(attach_m68hc11_regs): When use_bank property is defined, attach
+	to the 68HC12 16K memory bank window.
+	* interp.c (sim_hw_configure): Create memory region for banked
+	memory.
+
+2002-08-13  Stephane Carrez  <Stephane.Carrez@nerim.fr>
+
+	* interp.c (sim_hw_configure): Connect port-X to cpu-write-port.
+	* dv-m68hc11.c (m68hc11cpu_ports): Add cpu-write-port input.
+	(m68hc11cpu_port_event): Handle CPU_WRITE_PORT event.
+
+2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
+
+	* dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
+	when IO mapping changed, not when internal RAM mapping is changed.
+
+2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
+
+	* m68hc11_sim.c (cpu_special): Handle call and rtc instructions.
+	* sim-main.h (M6812_CALL_INDIRECT): Add to enum.
+	(m6811_regs): Add page register.
+	(cpu_set_page, cpu_get_page): New macros.
+	(phys_to_virt): New function.
+	(cpu_get_indexed_operand_addr, cpu_return): Declare.
+	* gencode.c: Identify indirect addressing mode for call and fix daa.
+	(gen_function_entry): New param to tell if src8/dst8 locals are 
+	necessary.
+	(gen_interpreter): Use it to avoid generation of unused variables.
+	* interp.c (sim_fetch_register): Allow to read page register; page
+	register, A, B and CCR are only 1 byte wide.
+	(sim_store_register): Likewise for writing.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (INCLUDE): Update path to callback.h.
+	* sim-main.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 2002-03-07  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
 
 	* m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
diff --git a/sim/m68hc11/Makefile.in b/sim/m68hc11/Makefile.in
index 51e873b..a054a32 100644
--- a/sim/m68hc11/Makefile.in
+++ b/sim/m68hc11/Makefile.in
@@ -42,7 +42,7 @@
 
 SIM_EXTRA_OBJS = @m68hc11_extra_objs@
 
-INCLUDE = $(srcdir)/../../include/callback.h \
+INCLUDE = $(srcdir)/../../include/gdb/callback.h \
 	  interrupts.h sim-main.h
 
 
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index e636611..54e81f5 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -159,7 +159,9 @@
 ac_help="$ac_help
   --enable-sim-hostendian=end		Specify host byte endian orientation."
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --enable-sim-hardware=LIST		Specify the hardware to be included in the build."
 
@@ -685,7 +687,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:689: checking how to run the C preprocessor" >&5
+echo "configure:691: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -700,13 +702,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 704 "configure"
+#line 706 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:712: \"$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
   :
@@ -717,13 +719,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 721 "configure"
+#line 723 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:729: \"$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
   :
@@ -734,13 +736,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
+#line 740 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:746: \"$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
   :
@@ -765,7 +767,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:769: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:771: 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
@@ -792,7 +794,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:796: checking for POSIXized ISC" >&5
+echo "configure:798: 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
@@ -813,12 +815,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:817: checking for ANSI C header files" >&5
+echo "configure:819: 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 <<EOF
-#line 822 "configure"
+#line 824 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -826,7 +828,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:832: \"$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*
@@ -843,7 +845,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 847 "configure"
+#line 849 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -861,7 +863,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 865 "configure"
+#line 867 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -882,7 +884,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 886 "configure"
+#line 888 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -893,7 +895,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -917,12 +919,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:921: checking for working const" >&5
+echo "configure:923: 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 <<EOF
-#line 926 "configure"
+#line 928 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -971,7 +973,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -992,21 +994,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:996: checking for inline" >&5
+echo "configure:998: 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 <<EOF
-#line 1003 "configure"
+#line 1005 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1032,12 +1034,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1036: checking for off_t" >&5
+echo "configure:1038: 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 <<EOF
-#line 1041 "configure"
+#line 1043 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1065,12 +1067,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1069: checking for size_t" >&5
+echo "configure:1071: 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 <<EOF
-#line 1074 "configure"
+#line 1076 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1100,19 +1102,19 @@
 # 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:1104: checking for working alloca.h" >&5
+echo "configure:1106: 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 <<EOF
-#line 1109 "configure"
+#line 1111 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1118: \"$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
@@ -1133,12 +1135,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1137: checking for alloca" >&5
+echo "configure:1139: 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 <<EOF
-#line 1142 "configure"
+#line 1144 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1166,7 +1168,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1172: \"$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
@@ -1198,12 +1200,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1202: checking whether alloca needs Cray hooks" >&5
+echo "configure:1204: 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 <<EOF
-#line 1207 "configure"
+#line 1209 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1228,12 +1230,12 @@
 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:1232: checking for $ac_func" >&5
+echo "configure:1234: 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 <<EOF
-#line 1237 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1256,7 +1258,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1262: \"$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
@@ -1283,7 +1285,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1287: checking stack direction for C alloca" >&5
+echo "configure:1289: 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
@@ -1291,7 +1293,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1295 "configure"
+#line 1297 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1310,7 +1312,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1316: \"$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
@@ -1335,17 +1337,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1339: checking for $ac_hdr" >&5
+echo "configure:1341: 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
-#line 1344 "configure"
+#line 1346 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1351: \"$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*
@@ -1374,12 +1376,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1378: checking for $ac_func" >&5
+echo "configure:1380: 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 <<EOF
-#line 1383 "configure"
+#line 1385 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1402,7 +1404,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1408: \"$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
@@ -1427,7 +1429,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1431: checking for working mmap" >&5
+echo "configure:1433: 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
@@ -1435,7 +1437,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1439 "configure"
+#line 1441 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1575,7 +1577,7 @@
 }
 
 EOF
-if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1581: \"$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
@@ -1598,12 +1600,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1602: checking for Cygwin environment" >&5
+echo "configure:1604: 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 <<EOF
-#line 1607 "configure"
+#line 1609 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1614,7 +1616,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1618: \"$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
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1631,19 +1633,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1635: checking for mingw32 environment" >&5
+echo "configure:1637: 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 <<EOF
-#line 1640 "configure"
+#line 1642 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1710,7 +1712,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1714: checking host system type" >&5
+echo "configure:1716: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1731,7 +1733,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1735: checking target system type" >&5
+echo "configure:1737: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1749,7 +1751,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1753: checking build system type" >&5
+echo "configure:1755: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1793,7 +1795,7 @@
 # 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:1797: checking for $ac_word" >&5
+echo "configure:1799: 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
@@ -1823,7 +1825,7 @@
   # 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:1827: checking for $ac_word" >&5
+echo "configure:1829: 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
@@ -1874,7 +1876,7 @@
       # 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:1878: checking for $ac_word" >&5
+echo "configure:1880: 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
@@ -1906,7 +1908,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1910: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1912: 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.
@@ -1917,12 +1919,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1921 "configure"
+#line 1923 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1928: \"$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
@@ -1948,12 +1950,12 @@
   { 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:1952: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1954: 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:1957: checking whether we are using GNU C" >&5
+echo "configure:1959: 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
@@ -1962,7 +1964,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1966: \"$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:1968: \"$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
@@ -1981,7 +1983,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1985: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1987: 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
@@ -2024,7 +2026,7 @@
 # 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:2028: checking for a BSD compatible install" >&5
+echo "configure:2030: 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
@@ -2092,7 +2094,7 @@
 # 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:2096: checking for $ac_word" >&5
+echo "configure:2098: 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
@@ -2127,17 +2129,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2131: checking for $ac_hdr" >&5
+echo "configure:2133: 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
-#line 2136 "configure"
+#line 2138 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2143: \"$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*
@@ -2167,12 +2169,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2171: checking for $ac_func" >&5
+echo "configure:2173: 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 <<EOF
-#line 2176 "configure"
+#line 2178 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2195,7 +2197,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2201: \"$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
@@ -2224,12 +2226,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2228: checking for $ac_func" >&5
+echo "configure:2230: 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 <<EOF
-#line 2233 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2252,7 +2254,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2258: \"$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
@@ -2286,19 +2288,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2290: checking for LC_MESSAGES" >&5
+echo "configure:2292: 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 <<EOF
-#line 2295 "configure"
+#line 2297 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2304: \"$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
@@ -2319,7 +2321,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2323: checking whether NLS is requested" >&5
+echo "configure:2325: 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"
@@ -2339,7 +2341,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2343: checking whether included gettext is requested" >&5
+echo "configure:2345: 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"
@@ -2358,17 +2360,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2362: checking for libintl.h" >&5
+echo "configure:2364: 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
-#line 2367 "configure"
+#line 2369 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2374: \"$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*
@@ -2385,19 +2387,19 @@
 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:2389: checking for gettext in libc" >&5
+echo "configure:2391: 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 <<EOF
-#line 2394 "configure"
+#line 2396 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2403: \"$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
@@ -2413,7 +2415,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2417: checking for bindtextdomain in -lintl" >&5
+echo "configure:2419: 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
@@ -2421,7 +2423,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2427 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2432,7 +2434,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2438: \"$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
@@ -2448,19 +2450,19 @@
 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:2452: checking for gettext in libintl" >&5
+echo "configure:2454: 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 <<EOF
-#line 2457 "configure"
+#line 2459 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2466: \"$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
@@ -2488,7 +2490,7 @@
 	      # 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:2492: checking for $ac_word" >&5
+echo "configure:2494: 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
@@ -2522,12 +2524,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2526: checking for $ac_func" >&5
+echo "configure:2528: 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 <<EOF
-#line 2531 "configure"
+#line 2533 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2550,7 +2552,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2556: \"$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
@@ -2577,7 +2579,7 @@
 		# 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:2581: checking for $ac_word" >&5
+echo "configure:2583: 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
@@ -2613,7 +2615,7 @@
 		# 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:2617: checking for $ac_word" >&5
+echo "configure:2619: 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
@@ -2645,7 +2647,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2649 "configure"
+#line 2651 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2653,7 +2655,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2685,7 +2687,7 @@
         # 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:2689: checking for $ac_word" >&5
+echo "configure:2691: 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
@@ -2719,7 +2721,7 @@
         # 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:2723: checking for $ac_word" >&5
+echo "configure:2725: 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
@@ -2755,7 +2757,7 @@
         # 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:2759: checking for $ac_word" >&5
+echo "configure:2761: 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
@@ -2845,7 +2847,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2849: checking for catalogs to be installed" >&5
+echo "configure:2851: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2873,17 +2875,17 @@
       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:2877: checking for linux/version.h" >&5
+echo "configure:2879: 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
-#line 2882 "configure"
+#line 2884 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2889: \"$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*
@@ -2952,17 +2954,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2956: checking for $ac_hdr" >&5
+echo "configure:2958: 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
-#line 2961 "configure"
+#line 2963 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2968: \"$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*
@@ -2992,17 +2994,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2996: checking for $ac_hdr" >&5
+echo "configure:2998: 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
-#line 3001 "configure"
+#line 3003 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3008: \"$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*
@@ -3032,17 +3034,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3036: checking for $ac_hdr" >&5
+echo "configure:3038: 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
-#line 3041 "configure"
+#line 3043 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3048: \"$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*
@@ -3072,17 +3074,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3076: checking for $ac_hdr" >&5
+echo "configure:3078: 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
-#line 3081 "configure"
+#line 3083 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3088: \"$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*
@@ -3111,12 +3113,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3115: checking for $ac_func" >&5
+echo "configure:3117: 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 <<EOF
-#line 3120 "configure"
+#line 3122 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3139,7 +3141,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3145: \"$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
@@ -3166,7 +3168,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3170: checking for bind in -lsocket" >&5
+echo "configure:3172: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3174,7 +3176,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3178 "configure"
+#line 3180 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3185,7 +3187,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3191: \"$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
@@ -3213,7 +3215,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3217: checking for gethostbyname in -lnsl" >&5
+echo "configure:3219: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3221,7 +3223,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3225 "configure"
+#line 3227 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3232,7 +3234,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3238: \"$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
@@ -3408,12 +3410,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3412: checking return type of signal handlers" >&5
+echo "configure:3414: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
+#line 3419 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3430,7 +3432,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3452,7 +3454,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3456: checking for executable suffix" >&5
+echo "configure:3458: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3462,7 +3464,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3612,14 +3614,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3616: checking whether byte ordering is bigendian" >&5
+echo "configure:3618: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3623 "configure"
+#line 3625 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3630,11 +3632,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3638 "configure"
+#line 3640 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3645,7 +3647,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3665,7 +3667,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3669 "configure"
+#line 3671 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3678,7 +3680,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3712,37 +3714,84 @@
 fi
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3767: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3777 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -3823,17 +3872,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3827: checking for $ac_hdr" >&5
+echo "configure:3876: 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
-#line 3832 "configure"
+#line 3881 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3886: \"$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*
diff --git a/sim/m68hc11/dv-m68hc11.c b/sim/m68hc11/dv-m68hc11.c
index 25449cd..669a045 100644
--- a/sim/m68hc11/dv-m68hc11.c
+++ b/sim/m68hc11/dv-m68hc11.c
@@ -1,6 +1,6 @@
 /*  dv-m68hc11.c -- CPU 68HC11&68HC12 as a device.
     Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-    Written by Stephane Carrez (stcarrez@worldnet.fr)
+    Written by Stephane Carrez (stcarrez@nerim.fr)
     (From a driver model Contributed by Cygnus Solutions.)
     
     This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
 #include "sim-hw.h"
 #include "hw-main.h"
 #include "sim-options.h"
+#include "hw-base.h"
 #include <limits.h>
 
 /* DEVICE
@@ -159,6 +160,7 @@
   SET_PORT_A,
   SET_PORT_C,
   SET_PORT_D,
+  CPU_WRITE_PORT,
   PORT_A,
   PORT_B,
   PORT_C,
@@ -178,6 +180,8 @@
   { "set-port-c", SET_PORT_C,    0, input_port, },
   { "set-port-d", SET_PORT_D,    0, input_port, },
 
+  { "cpu-write-port", CPU_WRITE_PORT,    0, input_port, },
+
   /* Events generated for connection to other devices.  */
   { "cpu-reset", CPU_RESET_PORT, 0, output_port, },
 
@@ -317,6 +321,13 @@
       cpu->cpu_frequency = 8*1000*1000;
     }
 
+  if (hw_find_property (me, "use_bank") != NULL)
+    hw_attach_address (hw_parent (me), 0,
+                       exec_map,
+                       0x08000,
+                       0x04000,
+                       me);
+
   cpu_mode = "expanded";
   if (hw_find_property (me, "mode") != NULL)
     cpu_mode = hw_find_string_property (me, "mode");
@@ -532,6 +543,9 @@
       m68hc11cpu_set_port (me, cpu, M6811_PORTD, level);
       break;
 
+    case CPU_WRITE_PORT:
+      break;
+
     default:
       hw_abort (me, "bad switch");
       break;
@@ -829,6 +843,14 @@
   sd  = hw_system (me);
   cpu = STATE_CPU (sd, 0);
 
+  if (base >= 0x8000 && base < 0xc000)
+    {
+      address_word virt_addr = phys_to_virt (cpu, base);
+      if (virt_addr != base)
+        return sim_core_read_buffer (sd, cpu, space, dest,
+                                     virt_addr, nr_bytes);
+    }
+
   /* Handle reads for the sub-devices.  */
   base -= controller->attach_address;
   result = sim_core_read_buffer (sd, cpu,
@@ -1002,7 +1024,7 @@
 
 	/* Update IO mapping.  Detach from the old address
 	   and attach to the new one.  */
-	if ((old_bank & 0xF0) != (val & 0xF0))
+	if ((old_bank & 0x0F) != (val & 0x0F))
 	  {
             struct m68hc11cpu *controller = hw_data (me);
 
@@ -1018,7 +1040,7 @@
                                controller->attach_size,
                                me);
 	  }
-	if ((old_bank & 0x0F) != (val & 0x0F))
+	if ((old_bank & 0xF0) != (val & 0xF0))
 	  {
 	    ;
 	  }
@@ -1068,6 +1090,14 @@
 
   sd = hw_system (me); 
   cpu = STATE_CPU (sd, 0);  
+
+  if (base >= 0x8000 && base < 0xc000)
+    {
+      address_word virt_addr = phys_to_virt (cpu, base);
+      if (virt_addr != base)
+        return sim_core_write_buffer (sd, cpu, space, source,
+                                      virt_addr, nr_bytes);
+    }
   base -= controller->attach_address;
   result = sim_core_write_buffer (sd, cpu,
 				  io_map, source, base, nr_bytes);
diff --git a/sim/m68hc11/dv-m68hc11eepr.c b/sim/m68hc11/dv-m68hc11eepr.c
index fb99068..a06eb44 100644
--- a/sim/m68hc11/dv-m68hc11eepr.c
+++ b/sim/m68hc11/dv-m68hc11eepr.c
@@ -1,6 +1,6 @@
 /*  dv-m68hc11eepr.c -- Simulation of the 68HC11 Internal EEPROM.
-    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
-    Written by Stephane Carrez (stcarrez@worldnet.fr)
+    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+    Written by Stephane Carrez (stcarrez@nerim.fr)
     (From a driver model Contributed by Cygnus Solutions.)
     
     This program is free software; you can redistribute it and/or modify
@@ -119,7 +119,7 @@
   /* Minimum time in CPU cycles for programming the EEPROM.  */
   unsigned long         eeprom_min_cycles;
 
-  char* file_name;
+  const char*           file_name;
 };
 
 
diff --git a/sim/m68hc11/gencode.c b/sim/m68hc11/gencode.c
index 8c32e3e..c602656 100644
--- a/sim/m68hc11/gencode.c
+++ b/sim/m68hc11/gencode.c
@@ -1,6 +1,6 @@
 /* gencode.c -- Motorola 68HC11 & 68HC12 Emulator Generator
-   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -284,6 +284,7 @@
   /* 68HC12 special instructions.  */
   { "bgnd",  "cpu_special (proc, M6812_BGND)" },
   { "call8", "cpu_special (proc, M6812_CALL)" },
+  { "call_ind", "cpu_special (proc, M6812_CALL_INDIRECT)" },
   { "dbcc8", "cpu_dbcc (proc)" },
   { "ediv",  "cpu_special (proc, M6812_EDIV)" },
   { "emul",  "{ uint32 src1 = (uint32) cpu_get_d (proc);\
@@ -384,7 +385,7 @@
   { "page3", 0,		"page3",     1, 0x1a,  0,  0, CHG_NONE },
 
   /* After 'daa', the Z flag is undefined.  Mark it as changed.	 */
-  { "daa",  "a->a",	"daa8",	     1, 0x19,  2,  2, CHG_NZVC },
+  { "daa",  "",	        "daa8",	     1, 0x19,  2,  2, CHG_NZVC },
   { "aba",  "b,a->a",	"add8",	     1, 0x1b,  2,  2, CHG_HNZVC},
   { "bset", "(x),#->(x)","or8",	     3, 0x1c,  7,  7, CLR_V_CHG_NZ },
   { "bclr", "(x),#->(x)","bclr8",    3, 0x1d,  7,  7, CLR_V_CHG_NZ },
@@ -821,8 +822,8 @@
   { "bvc",   "r",         0,         2, 0x28,  1,  3, CHG_NONE },
   { "bvs",   "r",         0,         2, 0x29,  1,  3, CHG_NONE },
 
-  { "call",  "()",        "call8",   4, 0x4a,  8,  8,  CHG_NONE },
-  { "call",  "[]",        "call8",   2, 0x4b,  8,  8,  CHG_NONE },
+  { "call",  "",          "call8",   4, 0x4a,  8,  8,  CHG_NONE },
+  { "call",  "",          "call_ind",2, 0x4b,  8,  8,  CHG_NONE },
 
   { "clr",   "->()",      "clr8",    3, 0x79,  3,  3,  SET_Z_CLR_NVC },
   { "clr",   "->[]",      "clr8",    2, 0x69,  2,  2,  SET_Z_CLR_NVC },
@@ -1977,8 +1978,11 @@
   print (fp, 0, "};\n\n");
 }
 
+#define USE_SRC8 1
+#define USE_DST8 2
+
 void
-gen_function_entry (FILE *fp, const char *name)
+gen_function_entry (FILE *fp, const char *name, int locals)
 {
   /* Generate interpretor entry point.	*/
   print (fp, 0, "%s (proc)\n", name);
@@ -1988,7 +1992,10 @@
   /* Interpretor local variables.  */
   print (fp, indent_level, "unsigned char op;");
   print (fp, indent_level, "uint16 addr, src16, dst16;");
-  print (fp, indent_level, "uint8 src8, dst8;\n");
+  if (locals & USE_SRC8)
+    print (fp, indent_level, "uint8 src8;\n");
+  if (locals & USE_DST8)
+    print (fp, indent_level, "uint8 dst8;\n");
 }
 
 void
@@ -2050,14 +2057,14 @@
       gen_cycle_table (fp, "cycles_page4", m6811_page4_opcodes,
 		       TABLE_SIZE (m6811_page4_opcodes));
 
-      gen_function_entry (fp, "static void\ncpu_page3_interp");
+      gen_function_entry (fp, "static void\ncpu_page3_interp", 0);
       gen_interpreter_for_table (fp, indent_level,
 				 m6811_page3_opcodes,
 				 TABLE_SIZE(m6811_page3_opcodes),
 				 "cycles_page3");
       gen_function_close (fp);
   
-      gen_function_entry (fp, "static void\ncpu_page4_interp");
+      gen_function_entry (fp, "static void\ncpu_page4_interp", 0);
       gen_interpreter_for_table (fp, indent_level,
 				 m6811_page4_opcodes,
 				 TABLE_SIZE(m6811_page4_opcodes),
@@ -2065,7 +2072,8 @@
       gen_function_close (fp);
 
       /* Generate the page 2, 3 and 4 handlers.  */
-      gen_function_entry (fp, "static void\ncpu_page2_interp");
+      gen_function_entry (fp, "static void\ncpu_page2_interp",
+                          USE_SRC8 | USE_DST8);
       gen_interpreter_for_table (fp, indent_level,
 				 m6811_page2_opcodes,
 				 TABLE_SIZE(m6811_page2_opcodes),
@@ -2073,7 +2081,8 @@
       gen_function_close (fp);
 
       /* Generate the interpretor entry point.  */
-      gen_function_entry (fp, "void\ncpu_interp_m6811");
+      gen_function_entry (fp, "void\ncpu_interp_m6811",
+                          USE_SRC8 | USE_DST8);
 
       gen_interpreter_for_table (fp, indent_level, m6811_page1_opcodes,
 				 TABLE_SIZE(m6811_page1_opcodes),
@@ -2087,7 +2096,8 @@
       gen_cycle_table (fp, "cycles_page2", m6812_page2_opcodes,
 		       TABLE_SIZE (m6812_page2_opcodes));
 
-      gen_function_entry (fp, "static void\ncpu_page2_interp");
+      gen_function_entry (fp, "static void\ncpu_page2_interp",
+                          USE_SRC8 | USE_DST8);
       gen_interpreter_for_table (fp, indent_level,
 				 m6812_page2_opcodes,
 				 TABLE_SIZE(m6812_page2_opcodes),
@@ -2095,7 +2105,8 @@
       gen_function_close (fp);
 
       /* Generate the interpretor entry point.  */
-      gen_function_entry (fp, "void\ncpu_interp_m6812");
+      gen_function_entry (fp, "void\ncpu_interp_m6812",
+                          USE_SRC8 | USE_DST8);
 
       gen_interpreter_for_table (fp, indent_level, m6812_page1_opcodes,
 				 TABLE_SIZE(m6812_page1_opcodes),
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index ee2acef..74674ce 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -1,6 +1,6 @@
 /* interp.c -- Simulator for Motorola 68HC11/68HC12
    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, the GNU debugger.
 
@@ -166,7 +166,7 @@
   cpu_restart (cpu);
 }
 
-int
+static int
 sim_hw_configure (SIM_DESC sd)
 {
   const struct bfd_arch_info *arch;
@@ -229,6 +229,10 @@
 	  sim_hw_parse (sd, "/m68hc11/m68hc11eepr/reg 0xb000 512");
 	  sim_hw_parse (sd, "/m68hc11 > cpu-reset reset /m68hc11/m68hc11eepr");
 	}
+      sim_hw_parse (sd, "/m68hc11 > port-a cpu-write-port /m68hc11");
+      sim_hw_parse (sd, "/m68hc11 > port-b cpu-write-port /m68hc11");
+      sim_hw_parse (sd, "/m68hc11 > port-c cpu-write-port /m68hc11");
+      sim_hw_parse (sd, "/m68hc11 > port-d cpu-write-port /m68hc11");
       cpu->hw_cpu = sim_hw_parse (sd, "/m68hc11");
     }
   else
@@ -238,11 +242,14 @@
 	{
 	  /* Allocate core external memory.  */
 	  sim_do_commandf (sd, "memory region 0x%lx@%d,0x%lx",
-			   0x8000, M6811_RAM_LEVEL, 0x8000);
+			   0xC000, M6811_RAM_LEVEL, 0x4000);
 	  sim_do_commandf (sd, "memory region 0x000@%d,0x8000",
 			   M6811_RAM_LEVEL);
+	  sim_do_commandf (sd, "memory region 0x01000000@%d,0x100000",
+			   M6811_RAM_LEVEL);
 
 	  sim_hw_parse (sd, "/m68hc12/reg 0x0 0x3FF");
+	  sim_hw_parse (sd, "/m68hc12/use_bank 1");
 	}
 
       if (!hw_tree_find_property (device_tree, "/m68hc12/m68hc12sio@1/reg"))
@@ -256,6 +263,7 @@
 	  /* M68hc11 Timer configuration. */
 	  sim_hw_parse (sd, "/m68hc12/m68hc12tim/reg 0x1b 0x5");
 	  sim_hw_parse (sd, "/m68hc12 > cpu-reset reset /m68hc12/m68hc12tim");
+          sim_hw_parse (sd, "/m68hc12 > capture capture /m68hc12/m68hc12tim");
 	}
 
       /* Create the SPI device.  */
@@ -277,9 +285,13 @@
 	  sim_hw_parse (sd, "/m68hc12 > cpu-reset reset /m68hc12/m68hc12eepr");
 	}
 
+      sim_hw_parse (sd, "/m68hc12 > port-a cpu-write-port /m68hc12");
+      sim_hw_parse (sd, "/m68hc12 > port-b cpu-write-port /m68hc12");
+      sim_hw_parse (sd, "/m68hc12 > port-c cpu-write-port /m68hc12");
+      sim_hw_parse (sd, "/m68hc12 > port-d cpu-write-port /m68hc12");
       cpu->hw_cpu = sim_hw_parse (sd, "/m68hc12");
     }
-  return 0;
+  return 1;
 }
 
 static int
@@ -289,10 +301,36 @@
 
   cpu = STATE_CPU (sd, 0);
 
-  sim_hw_configure (sd);
+  if (!sim_hw_configure (sd))
+    return SIM_RC_FAIL;
+
   if (abfd != NULL)
     {
+      asection *s;
       cpu->cpu_elf_start = bfd_get_start_address (abfd);
+      /* See if any section sets the reset address */
+      cpu->cpu_use_elf_start = 1;
+      for (s = abfd->sections; s && cpu->cpu_use_elf_start; s = s->next) 
+        {
+          if (s->flags & SEC_LOAD)
+            {
+              bfd_size_type size;
+
+              size = bfd_get_section_size_before_reloc (s);
+              if (size > 0)
+                {
+                  bfd_vma lma;
+
+                  if (STATE_LOAD_AT_LMA_P (sd))
+                    lma = bfd_section_lma (abfd, s);
+                  else
+                    lma = bfd_section_vma (abfd, s);
+
+                  if (lma <= 0xFFFE && lma+size >= 0x10000)
+                    cpu->cpu_use_elf_start = 0;
+                }
+            }
+        }
     }
 
   /* reset all state information */
@@ -319,7 +357,6 @@
 
   cpu_initialize (sd, cpu);
 
-  cpu->cpu_use_elf_start = 1;
   if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
     {
       free_state (sd);
@@ -468,16 +505,19 @@
 {
   sim_cpu *cpu;
   uint16 val;
+  int size = 2;
 
   cpu = STATE_CPU (sd, 0);
   switch (rn)
     {
     case A_REGNUM:
       val = cpu_get_a (cpu);
+      size = 1;
       break;
 
     case B_REGNUM:
       val = cpu_get_b (cpu);
+      size = 1;
       break;
 
     case D_REGNUM:
@@ -502,6 +542,12 @@
 
     case PSW_REGNUM:
       val = cpu_get_ccr (cpu);
+      size = 1;
+      break;
+
+    case PAGE_REGNUM:
+      val = cpu_get_page (cpu);
+      size = 1;
       break;
 
     default:
@@ -510,7 +556,7 @@
     }
   memory[0] = val >> 8;
   memory[1] = val & 0x0FF;
-  return 2;
+  return size;
 }
 
 int
@@ -533,11 +579,11 @@
 
     case A_REGNUM:
       cpu_set_a (cpu, val);
-      break;
+      return 1;
 
     case B_REGNUM:
       cpu_set_b (cpu, val);
-      break;
+      return 1;
 
     case X_REGNUM:
       cpu_set_x (cpu, val);
@@ -557,7 +603,11 @@
 
     case PSW_REGNUM:
       cpu_set_ccr (cpu, val);
-      break;
+      return 1;
+
+    case PAGE_REGNUM:
+      cpu_set_page (cpu, val);
+      return 1;
 
     default:
       break;
diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
index d9fb807..fe5985f 100644
--- a/sim/m68hc11/m68hc11_sim.c
+++ b/sim/m68hc11/m68hc11_sim.c
@@ -1,6 +1,6 @@
 /* m6811_cpu.c -- 68HC11&68HC12 CPU Emulation
    Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -907,6 +907,60 @@
       }
       break;
 
+    case M6812_CALL:
+      {
+        uint8 page;
+        uint16 addr;
+
+        addr = cpu_fetch16 (cpu);
+        page = cpu_fetch8 (cpu);
+
+        cpu_m68hc12_push_uint16 (cpu, cpu_get_pc (cpu));
+        cpu_m68hc12_push_uint8 (cpu, cpu_get_page (cpu));
+
+        cpu_set_page (cpu, page);
+        cpu_set_pc (cpu, addr);
+      }
+      break;
+
+    case M6812_CALL_INDIRECT:
+      {
+        uint8 code;
+        uint16 addr;
+        uint8 page;
+
+        code = memory_read8 (cpu, cpu_get_pc (cpu));
+        /* Indirect addressing call has the page specified in the
+           memory location pointed to by the address.  */
+        if ((code & 0xE3) == 0xE3)
+          {
+            addr = cpu_get_indexed_operand_addr (cpu, 0);
+            page = memory_read8 (cpu, addr + 2);
+            addr = memory_read16 (cpu, addr);
+          }
+        else
+          {
+            /* Otherwise, page is in the opcode.  */
+            addr = cpu_get_indexed_operand16 (cpu, 0);
+            page = cpu_fetch8 (cpu);
+          }
+        cpu_m68hc12_push_uint16 (cpu, cpu_get_pc (cpu));
+        cpu_m68hc12_push_uint8 (cpu, cpu_get_page (cpu));
+        cpu_set_page (cpu, page);
+        cpu_set_pc (cpu, addr);
+      }
+      break;
+
+    case M6812_RTC:
+      {
+        uint8 page = cpu_m68hc12_pop_uint8 (cpu);
+        uint16 addr = cpu_m68hc12_pop_uint16 (cpu);
+
+        cpu_set_page (cpu, page);
+        cpu_set_pc (cpu, addr);
+      }
+      break;
+      
     case M6812_ETBL:
     default:
       sim_engine_halt (CPU_STATE (cpu), cpu, NULL,
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index a47e7aa..c8933a0 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -1,6 +1,6 @@
 /* sim-main.h -- Simulator for Motorola 68HC11 & 68HC12
    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-   Written by Stephane Carrez (stcarrez@worldnet.fr)
+   Written by Stephane Carrez (stcarrez@nerim.fr)
 
 This file is part of GDB, the GNU debugger.
 
@@ -36,8 +36,8 @@
 
 #include "opcode/m68hc11.h"
 
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "opcode/m68hc11.h"
 #include "sim-types.h"
 
@@ -80,6 +80,7 @@
 #define B_REGNUM        6
 #define PSW_REGNUM 	7
 #define Z_REGNUM        8
+#define PAGE_REGNUM     9
 
 typedef struct m6811_regs {
     unsigned short      d;
@@ -88,6 +89,7 @@
     unsigned short      sp;
     unsigned short      pc;
     unsigned char       ccr;
+  unsigned short      page;
 } m6811_regs;
 
 
@@ -126,6 +128,7 @@
   /* 68HC12 instructions.  */
   M6812_BGND,
   M6812_CALL,
+  M6812_CALL_INDIRECT,
   M6812_IDIVS,
   M6812_EDIV,
   M6812_EDIVS,
@@ -232,6 +235,7 @@
 #define cpu_get_sp(PROC)           ((PROC)->cpu_regs.sp)
 #define cpu_get_a(PROC)            ((PROC->cpu_regs.d >> 8) & 0x0FF)
 #define cpu_get_b(PROC)            ((PROC->cpu_regs.d) & 0x0FF)
+#define cpu_get_page(PROC)         (PROC->cpu_regs.page)
 
 /* 68HC12 specific and Motorola internal registers.  */
 #define cpu_get_tmp3(PROC)         (0)
@@ -240,10 +244,11 @@
 #define cpu_set_d(PROC,VAL)        (((PROC)->cpu_regs.d) = (VAL))
 #define cpu_set_x(PROC,VAL)        (((PROC)->cpu_regs.ix) = (VAL))
 #define cpu_set_y(PROC,VAL)        (((PROC)->cpu_regs.iy) = (VAL))
+#define cpu_set_page(PROC,VAL)     ((PROC->cpu_regs.page) = (VAL))
 
 /* 68HC12 specific and Motorola internal registers.  */
 #define cpu_set_tmp3(PROC,VAL)     (0)
-#define cpu_set_tmp2(PROC,VAL)     (0)
+#define cpu_set_tmp2(PROC,VAL)     (void) (0)
 
 #if 0
 /* This is a function in m68hc11_sim.c to keep track of the frame.  */
@@ -287,11 +292,21 @@
                                   uint16 addr,
                                   const char *message);
 
+inline address_word
+phys_to_virt (sim_cpu *cpu, address_word addr)
+{
+  if (addr >= 0x8000 && addr < 0xc000)
+    return ((address_word) (addr) - 0x8000)
+      + (((address_word) cpu->cpu_regs.page) << 14) + 0x01000000;
+  else
+    return (address_word) (addr);
+}
+
 inline uint8
 memory_read8 (sim_cpu *cpu, uint16 addr)
 {
   uint8 val;
-  
+
   if (sim_core_read_buffer (CPU_STATE (cpu), cpu, 0, &val, addr, 1) != 1)
     {
       cpu_memory_exception (cpu, SIM_SIGSEGV, addr,
@@ -314,7 +329,7 @@
 memory_read16 (sim_cpu *cpu, uint16 addr)
 {
   uint8 b[2];
-  
+
   if (sim_core_read_buffer (CPU_STATE (cpu), cpu, 0, b, addr, 2) != 2)
     {
       cpu_memory_exception (cpu, SIM_SIGSEGV, addr,
@@ -523,6 +538,11 @@
 
 extern int cpu_initialize (SIM_DESC sd, sim_cpu *cpu);
 
+/* Returns the address of a 68HC12 indexed operand.
+   Pre and post modifications are handled on the source register.  */
+extern uint16 cpu_get_indexed_operand_addr (sim_cpu* cpu, int restrict);
+
+extern void cpu_return (sim_cpu *cpu);
 extern void cpu_set_sp (sim_cpu *cpu, uint16 val);
 extern int cpu_reset (sim_cpu *cpu);
 extern int cpu_restart (sim_cpu *cpu);
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index a5e5ef9..afa841f 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
 
 	* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 456e481..79c7d2e 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -24,9 +24,9 @@
 #include <sys/param.h>
 #include <netinet/in.h>	/* for byte ordering macros */
 #include "bfd.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "libiberty.h"
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef NUM_ELEM
 #define NUM_ELEM(A) (sizeof (A) / sizeof (A)[0])
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 3887539..e211d7b 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,268 @@
+2002-07-30  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.igen (do_load_double, do_store_double): New functions.
+	(LDC1, SDC1): Rename to...
+	(LDC1b, SDC1b): respectively.
+	(LDC1a, SDC1a): New instructions for MIPS II and MIPS32 support.
+
+2002-07-29  Michael Snyder  <msnyder@redhat.com>
+
+	* cp1.c (fp_recip2): Modify initialization expression so that
+	GCC will recognize it as constant.
+
+2002-06-18  Chris Demetriou  <cgd@broadcom.com>
+
+	* mdmx.c (SD_): Delete.
+	(Unpredictable): Re-define, for now, to directly invoke
+	unpredictable_action().
+	(mdmx_acc_op): Fix error in .ob immediate handling.
+
+2002-06-18  Andrew Cagney  <cagney@redhat.com>
+
+	* interp.c (sim_firmware_command): Initialize `address'.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-14  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* mips3d.igen: New file which contains MIPS-3D ASE instructions.
+	* Makefile.in (IGEN_INCLUDE): Add mips3d.igen.
+	* mips.igen: Include mips3d.igen.
+	(mips3d): New model name for MIPS-3D ASE instructions.
+	(CVT.W.fmt): Don't use this instruction for word (source) format
+	instructions. 
+	* cp1.c (fp_binary_r, fp_add_r, fp_mul_r, fpu_inv1, fpu_inv1_32)
+	(fpu_inv1_64, fp_recip1, fp_recip2, fpu_inv_sqrt1, fpu_inv_sqrt1_32)
+	(fpu_inv_sqrt1_64, fp_rsqrt1, fp_rsqrt2): New functions.
+	(NR_FRAC_GUARD, IMPLICIT_1): New macros.
+	* sim-main.h (fmt_pw, CompareAbs, AddR, MultiplyR, Recip1, Recip2)
+	(RSquareRoot1, RSquareRoot2): New macros.
+	(fp_add_r, fp_mul_r, fp_recip1, fp_recip2, fp_rsqrt1)
+	(fp_rsqrt2): New functions.
+	* configure.in: Add MIPS-3D support to mipsisa64 simulator.
+	* configure: Regenerate.
+
+2002-06-13  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* cp1.c (FP_PS_upper, FP_PS_lower, FP_PS_cat, FPQNaN_PS): New macros.
+	(value_fpr, store_fpr, fp_cmp, fp_unary, fp_binary, fp_mac)
+	(fp_inv_sqrt, fpu_format_name): Add paired-single support.
+	(convert): Note that this function is not used for paired-single
+	format conversions.
+	(ps_lower, ps_upper, pack_ps, convert_ps): New functions.
+	* mips.igen (FMT, MOVtf.fmt): Add paired-single support.
+	(check_fmt_p): Enable paired-single support.
+	(ALNV.PS, CVT.PS.S, CVT.S.PL, CVT.S.PU, PLL.PS, PLU.PS, PUL.PS)
+	(PUU.PS): New instructions.
+	(CVT.S.fmt): Don't use this instruction for paired-single format
+	destinations.
+	* sim-main.h (FP_formats): New value 'fmt_ps.'
+	(ps_lower, ps_upper, pack_ps, convert_ps): New prototypes.
+	(PSLower, PSUpper, PackPS, ConvertPS): New macros.
+
+2002-06-12  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.igen: Fix formatting of function calls in
+	many FP operations.
+
+2002-06-12  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.igen (MOVN, MOVZ): Trace result.
+	(TNEI): Print "tnei" as the opcode name in traces.
+	(CEIL.W): Add disassembly string for traces.
+	(RSQRT.fmt): Make location of disassembly string consistent
+	with other instructions.
+
+2002-06-12  Chris Demetriou  <cgd@broadcom.com>
+
+	* mips.igen (X): Delete unused function.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
+2002-06-07  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* cp1.c (inner_mac, fp_mac, inner_rsqrt, fp_inv_sqrt)
+	(fp_rsqrt, fp_madd, fp_msub, fp_nmadd, fp_nmsub): New functions.
+	* sim-main.h (fp_rsqrt, fp_madd, fp_msub, fp_nmadd)
+	(fp_nmsub): New prototypes.
+	(RSquareRoot, MultiplyAdd, MultiplySub, NegMultiplyAdd)
+	(NegMultiplySub): New defines.
+	* mips.igen (RSQRT.fmt): Use RSquareRoot().
+	(MADD.D, MADD.S): Replace with...
+	(MADD.fmt): New instruction.
+	(MSUB.D, MSUB.S): Replace with...
+	(MSUB.fmt): New instruction.
+	(NMADD.D, NMADD.S): Replace with...
+	(NMADD.fmt): New instruction.
+	(NMSUB.D, MSUB.S): Replace with...
+	(NMSUB.fmt): New instruction.
+
+2002-06-07  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* cp1.c: Fix more comment spelling and formatting.
+	(value_fcr, store_fcr): Use fenr_FS rather than hard-coding value.
+	(denorm_mode): New function.
+	(fpu_unary, fpu_binary): Round results after operation, collect
+	status from rounding operations, and update the FCSR.
+	(convert): Collect status from integer conversions and rounding
+	operations, and update the FCSR.  Adjust NaN values that result
+	from conversions.  Convert to use sim_io_eprintf rather than
+	fprintf, and remove some debugging code.
+	* cp1.h (fenr_FS): New define.
+
+2002-06-07  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c (convert): Remove unusable debugging code, and move MIPS
+	rounding mode to sim FP rounding mode flag conversion code into...
+	(rounding_mode): New function.
+
+2002-06-07  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c: Clean up formatting of a few comments.
+	(value_fpr): Reformat switch statement.
+
+2002-06-06  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* cp1.h: New file.
+	* sim-main.h: Include cp1.h.
+	(SETFCC, GETFCC, IR, UF, OF, DX, IO, UO, FP_FLAGS, FP_ENABLE)
+	(FP_CAUSE, GETFS, FP_RM_NEAREST, FP_RM_TOZERO, FP_RM_TOPINF)
+	(FP_RM_TOMINF, GETRM): Remove.  Moved to cp1.h.
+	(FP_FS, FP_MASK_RM, FP_SH_RM, Nan, Less, Equal): Remove.
+	(value_fcr, store_fcr, test_fcsr, fp_cmp): New prototypes.
+	(ValueFCR, StoreFCR, TestFCSR, Compare): New macros.
+	* cp1.c: Don't include sim-fpu.h; already included by
+	sim-main.h.  Clean up formatting of some comments.
+	(NaN, Equal, Less): Remove.
+	(test_fcsr, value_fcr, store_fcr, update_fcsr, fp_test)
+	(fp_cmp): New functions.
+	* mips.igen (do_c_cond_fmt): Remove.
+	(C.cond.fmta, C.cond.fmtb): Replace uses of do_c_cond_fmt_a with
+	Compare.  Add result tracing.
+	(CxC1): Remove, replace with...
+	(CFC1a, CFC1b, CFC1c, CTC1a, CTC1b, CTC1c): New instructions.
+	(DMxC1): Remove, replace with...
+	(DMFC1a, DMFC1b, DMTC1a, DMTC1b): New instructions.
+	(MxC1): Remove, replace with... 
+	(MFC1a, MFC1b, MTC1a, MTC1b): New instructions.  
+
+2002-06-04  Chris Demetriou  <cgd@broadcom.com>
+
+	* sim-main.h (FGRIDX): Remove, replace all uses with...
+	(FGR_BASE): New macro.
+	(FP0_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): New macros.
+	(_sim_cpu): Move 'fgr' member to be right before 'fpr_state' member.
+	(NR_FGR, FGR): Likewise.
+	* interp.c: Replace all uses of FGRIDX with FGR_BASE.
+	* mips.igen: Likewise.
+
+2002-06-04  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c: Add an FSF Copyright notice to this file.
+
+2002-06-04  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* cp1.c (Infinity): Remove.
+	* sim-main.h (Infinity): Likewise.
+
+	* cp1.c (fp_unary, fp_binary): New functions.
+	(fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div, fp_recip)
+	(fp_sqrt): New functions, implemented in terms of the above.
+	(AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
+	(Recip, SquareRoot): Remove (replaced by functions above).
+	* sim-main.h (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div)
+	(fp_recip, fp_sqrt): New prototypes.
+	(AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
+	(Recip, SquareRoot): Replace prototypes with #defines which
+	invoke the functions above.
+	
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+
+	* sim-main.h (Nan, Infinity, Less, Equal, AbsoluteValue, Negate)
+	(Add, Sub, Multiply, Divide, Recip, SquareRoot): Move lower in
+	file, remove PARAMS from prototypes.
+	(value_fpr, store_fpr, convert): Likewise.  Use SIM_STATE to provide
+	simulator state arguments.
+	(ValueFPR, StoreFPR, Convert): Move lower in file.  Use SIM_ARGS to
+	pass simulator state arguments.
+	* cp1.c (SD): Redefine as CPU_STATE(cpu).
+	(store_fpr, convert): Remove 'sd' argument.
+	(value_fpr): Likewise.  Convert to use 'SD' instead.
+
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c (Min, Max): Remove #if 0'd functions.
+	* sim-main.h (Min, Max): Remove.
+
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c: fix formatting of switch case and default labels.
+	* interp.c: Likewise.
+	* sim-main.c: Likewise.
+
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+
+	* cp1.c: Clean up comments which describe FP formats.
+	 (FPQNaN_DOUBLE, FPQNaN_LONG): Generate using UNSIGNED64.
+
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* configure.in (mipsisa64sb1*-*-*): New target for supporting
+	Broadcom SiByte SB-1 processor configurations.
+	* configure: Regenerate.
+	* sb1.igen: New file.
+	* mips.igen: Include sb1.igen.
+	(sb1): New model.
+	* Makefile.in (IGEN_INCLUDE): Add sb1.igen.
+	* mdmx.igen: Add "sb1" model to all appropriate functions and
+	instructions.
+	* mdmx.c (AbsDiffOB, AvgOB, AccAbsDiffOB): New functions.
+	(ob_func, ob_acc): Reference the above.
+	(qh_acc): Adjust to keep the same size as ob_acc.
+	* sim-main.h (status_SBX, MX_VECT_ABSD, MX_VECT_AVG, MX_AbsDiff)
+	(MX_Avg, MX_VECT_ABSDA, MX_AbsDiffC): New macros.
+
+2002-06-03  Chris Demetriou  <cgd@broadcom.com>
+
+	* Makefile.in (IGEN_INCLUDE): Add mdmx.igen.
+
+2002-06-02  Chris Demetriou  <cgd@broadcom.com>
+            Ed Satterthwaite  <ehs@broadcom.com>
+
+	* mips.igen (mdmx): New (pseudo-)model.
+	* mdmx.c, mdmx.igen: New files.
+	* Makefile.in (SIM_OBJS): Add mdmx.o.
+	* sim-main.h (MDMX_accumulator, MX_fmtsel, signed24, signed48):
+	New typedefs.
+	(ACC, MX_Add, MX_AddA, MX_AddL, MX_And, MX_C_EQ, MX_C_LT, MX_Comp)
+	(MX_FMT_OB, MX_FMT_QH, MX_Max, MX_Min, MX_Msgn, MX_Mul, MX_MulA)
+	(MX_MulL, MX_MulS, MX_MulSL, MX_Nor, MX_Or, MX_Pick, MX_RAC)
+	(MX_RAC_H, MX_RAC_L, MX_RAC_M, MX_RNAS, MX_RNAU, MX_RND_AS)
+	(MX_RND_AU, MX_RND_ES, MX_RND_EU, MX_RND_ZS, MX_RND_ZU, MX_RNES)
+	(MX_RNEU, MX_RZS, MX_RZU, MX_SHFL, MX_ShiftLeftLogical)
+	(MX_ShiftRightArith, MX_ShiftRightLogical, MX_Sub, MX_SubA, MX_SubL)
+	(MX_VECT_ADD, MX_VECT_ADDA, MX_VECT_ADDL, MX_VECT_AND)
+	(MX_VECT_MAX, MX_VECT_MIN, MX_VECT_MSGN, MX_VECT_MUL, MX_VECT_MULA)
+	(MX_VECT_MULL, MX_VECT_MULS, MX_VECT_MULSL, MX_VECT_NOR)
+	(MX_VECT_OR, MX_VECT_SLL, MX_VECT_SRA, MX_VECT_SRL, MX_VECT_SUB)
+	(MX_VECT_SUBA, MX_VECT_SUBL, MX_VECT_XOR, MX_WACH, MX_WACL, MX_Xor)
+	(SIM_ARGS, SIM_STATE, UnpredictableResult, fmt_mdmx, ob_fmtsel)
+	(qh_fmtsel): New macros.
+	(_sim_cpu): New member "acc".
+	(mdmx_acc_op, mdmx_cc_op, mdmx_cpr_op, mdmx_pick_op, mdmx_rac_op)
+	(mdmx_round_op, mdmx_shuffle, mdmx_wach, mdmx_wacl): New functions.
+
 2002-05-01  Chris Demetriou  <cgd@broadcom.com>
 
 	* interp.c: Use 'deprecated' rather than 'depreciated.'
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 5d0a336..e0e9faf 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -43,6 +43,7 @@
 	$(MIPS_EXTRA_OBJS) \
 	cp1.o \
 	interp.o \
+	mdmx.o \
 	sim-main.o \
 	sim-hload.o \
 	sim-engine.o \
@@ -71,6 +72,7 @@
 interp.o: $(srcdir)/interp.c config.h sim-main.h itable.h
 cp1.o: $(srcdir)/cp1.c config.h sim-main.h
 
+mdmx.o: $(srcdir)/mdmx.c $(srcdir)/sim-main.h
 
 ../igen/igen:
 	cd ../igen && $(MAKE)
@@ -81,6 +83,9 @@
 M16_DC=$(srcdir)/m16.dc
 IGEN_INCLUDE=\
 	$(srcdir)/m16.igen \
+	$(srcdir)/mdmx.igen \
+	$(srcdir)/mips3d.igen \
+	$(srcdir)/sb1.igen \
 	$(srcdir)/tx.igen \
 	$(srcdir)/vr.igen \
 
diff --git a/sim/mips/configure b/sim/mips/configure
index e5f427e..92ea0b5 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -159,7 +159,9 @@
 ac_help="$ac_help
   --enable-sim-hostendian=end		Specify host byte endian orientation."
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --enable-sim-endian=endian		Specify target byte endian orientation."
 ac_help="$ac_help
@@ -695,7 +697,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:699: checking how to run the C preprocessor" >&5
+echo "configure:701: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -710,13 +712,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 714 "configure"
+#line 716 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:722: \"$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
   :
@@ -727,13 +729,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 731 "configure"
+#line 733 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:739: \"$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
   :
@@ -744,13 +746,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 748 "configure"
+#line 750 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:756: \"$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
   :
@@ -775,7 +777,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:781: 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
@@ -802,7 +804,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:806: checking for POSIXized ISC" >&5
+echo "configure:808: 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
@@ -823,12 +825,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:827: checking for ANSI C header files" >&5
+echo "configure:829: 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 <<EOF
-#line 832 "configure"
+#line 834 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -836,7 +838,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:842: \"$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*
@@ -853,7 +855,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 857 "configure"
+#line 859 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -871,7 +873,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 875 "configure"
+#line 877 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -892,7 +894,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 896 "configure"
+#line 898 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -903,7 +905,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -927,12 +929,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:931: checking for working const" >&5
+echo "configure:933: 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 <<EOF
-#line 936 "configure"
+#line 938 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -981,7 +983,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1002,21 +1004,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1006: checking for inline" >&5
+echo "configure:1008: 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 <<EOF
-#line 1013 "configure"
+#line 1015 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1042,12 +1044,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1046: checking for off_t" >&5
+echo "configure:1048: 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 <<EOF
-#line 1051 "configure"
+#line 1053 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1075,12 +1077,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1079: checking for size_t" >&5
+echo "configure:1081: 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 <<EOF
-#line 1084 "configure"
+#line 1086 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1110,19 +1112,19 @@
 # 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:1114: checking for working alloca.h" >&5
+echo "configure:1116: 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 <<EOF
-#line 1119 "configure"
+#line 1121 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1128: \"$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
@@ -1143,12 +1145,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1147: checking for alloca" >&5
+echo "configure:1149: 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 <<EOF
-#line 1152 "configure"
+#line 1154 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1176,7 +1178,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1182: \"$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
@@ -1208,12 +1210,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1212: checking whether alloca needs Cray hooks" >&5
+echo "configure:1214: 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 <<EOF
-#line 1217 "configure"
+#line 1219 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1238,12 +1240,12 @@
 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:1242: checking for $ac_func" >&5
+echo "configure:1244: 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 <<EOF
-#line 1247 "configure"
+#line 1249 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1266,7 +1268,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1272: \"$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
@@ -1293,7 +1295,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1297: checking stack direction for C alloca" >&5
+echo "configure:1299: 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
@@ -1301,7 +1303,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1305 "configure"
+#line 1307 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1320,7 +1322,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1326: \"$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
@@ -1345,17 +1347,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1349: checking for $ac_hdr" >&5
+echo "configure:1351: 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
-#line 1354 "configure"
+#line 1356 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1361: \"$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*
@@ -1384,12 +1386,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1388: checking for $ac_func" >&5
+echo "configure:1390: 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 <<EOF
-#line 1393 "configure"
+#line 1395 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1412,7 +1414,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1418: \"$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
@@ -1437,7 +1439,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1441: checking for working mmap" >&5
+echo "configure:1443: 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
@@ -1445,7 +1447,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1449 "configure"
+#line 1451 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1585,7 +1587,7 @@
 }
 
 EOF
-if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1591: \"$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
@@ -1608,12 +1610,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1612: checking for Cygwin environment" >&5
+echo "configure:1614: 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 <<EOF
-#line 1617 "configure"
+#line 1619 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1624,7 +1626,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1641,19 +1643,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1645: checking for mingw32 environment" >&5
+echo "configure:1647: 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 <<EOF
-#line 1650 "configure"
+#line 1652 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1720,7 +1722,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1724: checking host system type" >&5
+echo "configure:1726: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1741,7 +1743,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1745: checking target system type" >&5
+echo "configure:1747: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1759,7 +1761,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1763: checking build system type" >&5
+echo "configure:1765: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1803,7 +1805,7 @@
 # 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:1807: checking for $ac_word" >&5
+echo "configure:1809: 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
@@ -1833,7 +1835,7 @@
   # 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:1837: checking for $ac_word" >&5
+echo "configure:1839: 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
@@ -1884,7 +1886,7 @@
       # 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:1888: checking for $ac_word" >&5
+echo "configure:1890: 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
@@ -1916,7 +1918,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1920: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1922: 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.
@@ -1927,12 +1929,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1931 "configure"
+#line 1933 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1938: \"$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
@@ -1958,12 +1960,12 @@
   { 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:1962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1964: 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:1967: checking whether we are using GNU C" >&5
+echo "configure:1969: 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
@@ -1972,7 +1974,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1976: \"$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:1978: \"$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
@@ -1991,7 +1993,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1995: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1997: 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
@@ -2034,7 +2036,7 @@
 # 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:2038: checking for a BSD compatible install" >&5
+echo "configure:2040: 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
@@ -2102,7 +2104,7 @@
 # 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:2106: checking for $ac_word" >&5
+echo "configure:2108: 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
@@ -2137,17 +2139,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2141: checking for $ac_hdr" >&5
+echo "configure:2143: 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
-#line 2146 "configure"
+#line 2148 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2153: \"$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*
@@ -2177,12 +2179,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2181: checking for $ac_func" >&5
+echo "configure:2183: 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 <<EOF
-#line 2186 "configure"
+#line 2188 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2205,7 +2207,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2211: \"$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
@@ -2234,12 +2236,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2238: checking for $ac_func" >&5
+echo "configure:2240: 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 <<EOF
-#line 2243 "configure"
+#line 2245 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2262,7 +2264,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2268: \"$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
@@ -2296,19 +2298,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2300: checking for LC_MESSAGES" >&5
+echo "configure:2302: 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 <<EOF
-#line 2305 "configure"
+#line 2307 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2314: \"$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
@@ -2329,7 +2331,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2333: checking whether NLS is requested" >&5
+echo "configure:2335: 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"
@@ -2349,7 +2351,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2353: checking whether included gettext is requested" >&5
+echo "configure:2355: 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"
@@ -2368,17 +2370,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2372: checking for libintl.h" >&5
+echo "configure:2374: 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
-#line 2377 "configure"
+#line 2379 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2384: \"$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*
@@ -2395,19 +2397,19 @@
 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:2399: checking for gettext in libc" >&5
+echo "configure:2401: 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 <<EOF
-#line 2404 "configure"
+#line 2406 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2413: \"$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
@@ -2423,7 +2425,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2427: checking for bindtextdomain in -lintl" >&5
+echo "configure:2429: 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
@@ -2431,7 +2433,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2435 "configure"
+#line 2437 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2442,7 +2444,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2448: \"$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
@@ -2458,19 +2460,19 @@
 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:2462: checking for gettext in libintl" >&5
+echo "configure:2464: 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 <<EOF
-#line 2467 "configure"
+#line 2469 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2476: \"$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
@@ -2498,7 +2500,7 @@
 	      # 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:2502: checking for $ac_word" >&5
+echo "configure:2504: 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
@@ -2532,12 +2534,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2536: checking for $ac_func" >&5
+echo "configure:2538: 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 <<EOF
-#line 2541 "configure"
+#line 2543 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2560,7 +2562,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2566: \"$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
@@ -2587,7 +2589,7 @@
 		# 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:2591: checking for $ac_word" >&5
+echo "configure:2593: 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
@@ -2623,7 +2625,7 @@
 		# 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:2627: checking for $ac_word" >&5
+echo "configure:2629: 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
@@ -2655,7 +2657,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2659 "configure"
+#line 2661 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2663,7 +2665,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2695,7 +2697,7 @@
         # 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:2699: checking for $ac_word" >&5
+echo "configure:2701: 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
@@ -2729,7 +2731,7 @@
         # 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:2733: checking for $ac_word" >&5
+echo "configure:2735: 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
@@ -2765,7 +2767,7 @@
         # 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:2769: checking for $ac_word" >&5
+echo "configure:2771: 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
@@ -2855,7 +2857,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2859: checking for catalogs to be installed" >&5
+echo "configure:2861: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2883,17 +2885,17 @@
       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:2887: checking for linux/version.h" >&5
+echo "configure:2889: 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
-#line 2892 "configure"
+#line 2894 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2899: \"$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*
@@ -2962,17 +2964,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2966: checking for $ac_hdr" >&5
+echo "configure:2968: 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
-#line 2971 "configure"
+#line 2973 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2978: \"$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*
@@ -3002,17 +3004,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3006: checking for $ac_hdr" >&5
+echo "configure:3008: 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
-#line 3011 "configure"
+#line 3013 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3018: \"$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*
@@ -3042,17 +3044,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3046: checking for $ac_hdr" >&5
+echo "configure:3048: 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
-#line 3051 "configure"
+#line 3053 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3058: \"$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*
@@ -3082,17 +3084,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3086: checking for $ac_hdr" >&5
+echo "configure:3088: 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
-#line 3091 "configure"
+#line 3093 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3121,12 +3123,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3125: 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 <<EOF
-#line 3130 "configure"
+#line 3132 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3149,7 +3151,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3153: \"$ac_link\") 1>&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
@@ -3176,7 +3178,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3180: checking for bind in -lsocket" >&5
+echo "configure:3182: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3184,7 +3186,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3188 "configure"
+#line 3190 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3195,7 +3197,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3201: \"$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
@@ -3223,7 +3225,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3227: checking for gethostbyname in -lnsl" >&5
+echo "configure:3229: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3231,7 +3233,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3235 "configure"
+#line 3237 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3242,7 +3244,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3418,12 +3420,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3422: checking return type of signal handlers" >&5
+echo "configure:3424: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3427 "configure"
+#line 3429 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3440,7 +3442,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3462,7 +3464,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3466: checking for executable suffix" >&5
+echo "configure:3468: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3472,7 +3474,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3622,14 +3624,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3626: checking whether byte ordering is bigendian" >&5
+echo "configure:3628: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3633 "configure"
+#line 3635 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3640,11 +3642,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3648 "configure"
+#line 3650 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3655,7 +3657,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3675,7 +3677,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3681 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3688,7 +3690,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3722,37 +3724,84 @@
 fi
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3777: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3787 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -4023,8 +4072,12 @@
 		        sim_igen_machine="-M mips32"
 			sim_igen_filter="32,f"
 			;;
+  mipsisa64sb1*-*-*)	sim_gen=IGEN
+		        sim_igen_machine="-M mips64,sb1"
+			sim_igen_filter="32,64,f"
+			;;
   mipsisa64*-*-*)	sim_gen=IGEN
-		        sim_igen_machine="-M mips64"
+		        sim_igen_machine="-M mips64,mips3d"
 			sim_igen_filter="32,64,f"
 			;;
   mips*lsi*)	        sim_gen=M16
@@ -4132,7 +4185,7 @@
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4136: checking for X" >&5
+echo "configure:4189: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4194,12 +4247,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4198 "configure"
+#line 4251 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4256: \"$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*
@@ -4268,14 +4321,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4272 "configure"
+#line 4325 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -4368,17 +4421,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4372: checking for $ac_hdr" >&5
+echo "configure:4425: 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
-#line 4377 "configure"
+#line 4430 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4435: \"$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*
@@ -4405,7 +4458,7 @@
 done
 
 echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:4409: checking for fabs in -lm" >&5
+echo "configure:4462: checking for fabs in -lm" >&5
 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4413,7 +4466,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4417 "configure"
+#line 4470 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4424,7 +4477,7 @@
 fabs()
 ; return 0; }
 EOF
-if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4481: \"$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
@@ -4454,12 +4507,12 @@
 for ac_func in aint anint sqrt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4458: checking for $ac_func" >&5
+echo "configure:4511: 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 <<EOF
-#line 4463 "configure"
+#line 4516 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -4482,7 +4535,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4539: \"$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/sim/mips/configure.in b/sim/mips/configure.in
index d8c4023..3672b66 100644
--- a/sim/mips/configure.in
+++ b/sim/mips/configure.in
@@ -128,8 +128,12 @@
 		        sim_igen_machine="-M mips32"
 			sim_igen_filter="32,f"
 			;;
+  mipsisa64sb1*-*-*)	sim_gen=IGEN
+		        sim_igen_machine="-M mips64,sb1"
+			sim_igen_filter="32,64,f"
+			;;
   mipsisa64*-*-*)	sim_gen=IGEN
-		        sim_igen_machine="-M mips64"
+		        sim_igen_machine="-M mips64,mips3d"
 			sim_igen_filter="32,64,f"
 			;;
   mips*lsi*)	        sim_gen=M16
diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c
index 063c241..ea0f599 100644
--- a/sim/mips/cp1.c
+++ b/sim/mips/cp1.c
@@ -1,9 +1,33 @@
 /*> cp1.c <*/
+/* MIPS Simulator FPU (CoProcessor 1) support.
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   Originally created by Cygnus Solutions, modified substially
+   by Broadcom Corporation (SiByte).  Paired-single operation support
+   and MIPS-3D support contributed by Broadcom Corporation (SiByte).
+
+This file is part of 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.  */
+
+/* XXX: The following notice should be removed as soon as is practical:  */
 /* Floating Point Support for gdb MIPS simulators
 
    This file is part of the MIPS sim
 
 		THIS SOFTWARE IS NOT COPYRIGHTED
+   (by Cygnus.)
 
    Cygnus offers the following for use in the public domain.  Cygnus
    makes no warranty with regard to the software or it's performance
@@ -17,44 +41,59 @@
 */
 
 #include "sim-main.h"
-#include "sim-fpu.h"
 
 /* Within cp1.c we refer to sim_cpu directly.  */
 #define CPU cpu
-#define SD sd
+#define SD CPU_STATE(cpu)
 
 /*-- FPU support routines ---------------------------------------------------*/
 
 /* Numbers are held in normalized form. The SINGLE and DOUBLE binary
-   formats conform to ANSI/IEEE Std 754-1985.  */
-/* SINGLE precision floating:
- *    seeeeeeeefffffffffffffffffffffff
- *      s =  1bit  = sign
- *      e =  8bits = exponent
- *      f = 23bits = fraction
- */
-/* SINGLE precision fixed:
- *    siiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- *      s =  1bit  = sign
- *      i = 31bits = integer
- */
-/* DOUBLE precision floating:
- *    seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff
- *      s =  1bit  = sign
- *      e = 11bits = exponent
- *      f = 52bits = fraction
- */
-/* DOUBLE precision fixed:
- *    siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- *      s =  1bit  = sign
- *      i = 63bits = integer
+   formats conform to ANSI/IEEE Std 754-1985.
+
+   SINGLE precision floating:
+      seeeeeeeefffffffffffffffffffffff
+        s =  1bit  = sign
+        e =  8bits = exponent
+        f = 23bits = fraction
+
+   SINGLE precision fixed:
+      siiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+        s =  1bit  = sign
+        i = 31bits = integer
+
+   DOUBLE precision floating:
+      seeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffff
+        s =  1bit  = sign
+        e = 11bits = exponent
+        f = 52bits = fraction
+
+   DOUBLE precision fixed:
+      siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+        s =  1bit  = sign
+        i = 63bits = integer
+
+   PAIRED SINGLE precision floating:
+      seeeeeeeefffffffffffffffffffffffseeeeeeeefffffffffffffffffffffff
+      |         upper                ||         lower                |
+        s =  1bit  = sign
+        e =  8bits = exponent
+        f = 23bits = fraction
+    Note: upper = [63..32], lower = [31..0]
  */
 
-/* Explicit QNaN values used when value required:  */
+/* Extract packed single values:  */
+#define FP_PS_upper(v) (((v) >> 32) & (unsigned)0xFFFFFFFF)
+#define FP_PS_lower(v) ((v) & (unsigned)0xFFFFFFFF)
+#define FP_PS_cat(u,l) (((unsigned64)((u) & (unsigned)0xFFFFFFFF) << 32) \
+                        | (unsigned64)((l) & 0xFFFFFFFF))
+
+/* Explicit QNaN values.  */
 #define FPQNaN_SINGLE   (0x7FBFFFFF)
 #define FPQNaN_WORD     (0x7FFFFFFF)
-#define FPQNaN_DOUBLE   ((((uword64) 0x7FF7FFFF) << 32) | 0xFFFFFFFF)
-#define FPQNaN_LONG     ((((uword64) 0x7FFFFFFF) << 32) | 0xFFFFFFFF)
+#define FPQNaN_DOUBLE   (UNSIGNED64 (0x7FF7FFFFFFFFFFFF))
+#define FPQNaN_LONG     (UNSIGNED64 (0x7FFFFFFFFFFFFFFF))
+#define FPQNaN_PS       (FP_PS_cat (FPQNaN_SINGLE, FPQNaN_SINGLE))
 
 static const char *fpu_format_name (FP_formats fmt);
 #ifdef DEBUG
@@ -62,8 +101,7 @@
 #endif
 
 uword64
-value_fpr (SIM_DESC sd,
-	   sim_cpu *cpu,
+value_fpr (sim_cpu *cpu,
 	   address_word cia,
 	   int fpr,
 	   FP_formats fmt)
@@ -71,7 +109,7 @@
   uword64 value = 0;
   int err = 0;
 
-  /* Treat unused register values, as fixed-point 64bit values:  */
+  /* Treat unused register values, as fixed-point 64bit values.  */
   if ((fmt == fmt_uninterpreted) || (fmt == fmt_unknown))
     {
 #if 1
@@ -83,7 +121,7 @@
 #endif
     }
 
-  /* For values not yet accessed, set to the desired format:  */
+  /* For values not yet accessed, set to the desired format.  */
   if (FPR_STATE[fpr] == fmt_uninterpreted)
     {
       FPR_STATE[fpr] = fmt;
@@ -94,7 +132,7 @@
     }
   if (fmt != FPR_STATE[fpr])
     {
-      sim_io_eprintf (sd, "FPR %d (format %s) being accessed with format %s - setting to unknown (PC = 0x%s)\n",
+      sim_io_eprintf (SD, "FPR %d (format %s) being accessed with format %s - setting to unknown (PC = 0x%s)\n",
 		      fpr, fpu_format_name (FPR_STATE[fpr]),
 		      fpu_format_name (fmt), pr_addr (cia));
       FPR_STATE[fpr] = fmt_unknown;
@@ -105,25 +143,12 @@
       /* Set QNaN value:  */
       switch (fmt)
 	{
-	case fmt_single:
-	  value = FPQNaN_SINGLE;
-	  break;
-
-	case fmt_double:
-	  value = FPQNaN_DOUBLE;
-	  break;
-
-	case fmt_word:
-	  value = FPQNaN_WORD;
-	  break;
-
-	case fmt_long:
-	  value = FPQNaN_LONG;
-	  break;
-
-	default:
-	  err = -1;
-	  break;
+	case fmt_single:  value = FPQNaN_SINGLE;  break;
+	case fmt_double:  value = FPQNaN_DOUBLE;  break;
+	case fmt_word:    value = FPQNaN_WORD;    break;
+	case fmt_long:    value = FPQNaN_LONG;    break;
+	case fmt_ps:      value = FPQNaN_PS;      break;
+	default:          err = -1;               break;
 	}
     }
   else if (SizeFGR () == 64)
@@ -138,6 +163,7 @@
 	case fmt_uninterpreted:
 	case fmt_double:
 	case fmt_long:
+	case fmt_ps:
 	  value = FGR[fpr];
 	  break;
 
@@ -160,7 +186,7 @@
 	case fmt_long:
 	  if ((fpr & 1) == 0)
 	    {
-	      /* even registers only */
+	      /* Even register numbers only.  */
 #ifdef DEBUG
 	      printf ("DBG: ValueFPR: FGR[%d] = %s, FGR[%d] = %s\n",
 		      fpr + 1, pr_uword64 ((uword64) FGR[fpr+1]),
@@ -175,7 +201,11 @@
 	    }
 	  break;
 
-	default :
+	case fmt_ps:
+	  SignalException (ReservedInstruction, 0);
+	  break;
+
+	default:
 	  err = -1;
 	  break;
 	}
@@ -194,8 +224,7 @@
 }
 
 void
-store_fpr (SIM_DESC sd,
-	   sim_cpu *cpu,
+store_fpr (sim_cpu *cpu,
 	   address_word cia,
 	   int fpr,
 	   FP_formats fmt,
@@ -215,8 +244,8 @@
 	{
 	case fmt_uninterpreted_32:
 	  fmt = fmt_uninterpreted;
-	case fmt_single :
-	case fmt_word :
+	case fmt_single:
+	case fmt_word:
 	  if (STATE_VERBOSE_P (SD))
 	    sim_io_eprintf (SD,
 			    "Warning: PC 0x%s: interp.c store_fpr DEADCODE\n",
@@ -228,13 +257,14 @@
 	case fmt_uninterpreted_64:
 	  fmt = fmt_uninterpreted;
 	case fmt_uninterpreted:
-	case fmt_double :
-	case fmt_long :
+	case fmt_double:
+	case fmt_long:
+	case fmt_ps:
 	  FGR[fpr] = value;
 	  FPR_STATE[fpr] = fmt;
 	  break;
 
-	default :
+	default:
 	  FPR_STATE[fpr] = fmt_unknown;
 	  err = -1;
 	  break;
@@ -246,8 +276,8 @@
 	{
 	case fmt_uninterpreted_32:
 	  fmt = fmt_uninterpreted;
-	case fmt_single :
-	case fmt_word :
+	case fmt_single:
+	case fmt_word:
 	  FGR[fpr] = (value & 0xFFFFFFFF);
 	  FPR_STATE[fpr] = fmt;
 	  break;
@@ -255,11 +285,11 @@
 	case fmt_uninterpreted_64:
 	  fmt = fmt_uninterpreted;
 	case fmt_uninterpreted:
-	case fmt_double :
-	case fmt_long :
+	case fmt_double:
+	case fmt_long:
 	  if ((fpr & 1) == 0)
 	    {
-	      /* even register number only */
+	      /* Even register numbers only.  */
 	      FGR[fpr+1] = (value >> 32);
 	      FGR[fpr] = (value & 0xFFFFFFFF);
 	      FPR_STATE[fpr + 1] = fmt;
@@ -273,7 +303,12 @@
 	    }
 	  break;
 
-	default :
+	case fmt_ps:
+	  FPR_STATE[fpr] = fmt_unknown;
+	  SignalException (ReservedInstruction, 0);
+	  break;
+
+	default:
 	  FPR_STATE[fpr] = fmt_unknown;
 	  err = -1;
 	  break;
@@ -291,772 +326,138 @@
   return;
 }
 
-int
-NaN (op, fmt)
-     uword64 op;
-     FP_formats fmt;
+
+/* CP1 control/status register access functions.  */
+
+void
+test_fcsr (sim_cpu *cpu,
+	   address_word cia)
 {
-  int boolean = 0;
-  switch (fmt)
+  unsigned int cause;
+
+  cause = (FCSR & fcsr_CAUSE_mask) >> fcsr_CAUSE_shift;
+  if ((cause & ((FCSR & fcsr_ENABLES_mask) >> fcsr_ENABLES_shift)) != 0
+      || (cause & (1 << UO)))
     {
-    case fmt_single:
-    case fmt_word:
-      {
-	sim_fpu wop;
-	sim_fpu_32to (&wop, op);
-	boolean = sim_fpu_is_nan (&wop);
-	break;
-      }
-    case fmt_double:
-    case fmt_long:
-      {
-	sim_fpu wop;
-	sim_fpu_64to (&wop, op);
-	boolean = sim_fpu_is_nan (&wop);
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
+      SignalExceptionFPE();
     }
-
-#ifdef DEBUG
-  printf ("DBG: NaN: returning %d for 0x%s (format = %s)\n",
-	  boolean, pr_addr (op), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (boolean);
 }
 
-int
-Infinity (op, fmt)
-     uword64 op;
-     FP_formats fmt;
+unsigned_word
+value_fcr(sim_cpu *cpu,
+	  address_word cia,
+	  int fcr)
 {
-  int boolean = 0;
+  unsigned32 value = 0;
 
-#ifdef DEBUG
-  printf ("DBG: Infinity: format %s 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
-  switch (fmt)
+  switch (fcr)
     {
-    case fmt_single:
-      {
-	sim_fpu wop;
-	sim_fpu_32to (&wop, op);
-	boolean = sim_fpu_is_infinity (&wop);
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop;
-	sim_fpu_64to (&wop, op);
-	boolean = sim_fpu_is_infinity (&wop);
-	break;
-      }
-    default:
-      printf ("DBG: TODO: unrecognised format (%s) for Infinity check\n",
-	      fpu_format_name (fmt));
+    case 0:  /* FP Implementation and Revision Register.  */
+      value = FCR0;
+      break;
+    case 25:  /* FP Condition Codes Register (derived from FCSR).  */
+      value = (FCR31 & fcsr_FCC_mask) >> fcsr_FCC_shift;
+      value = (value & 0x1) | (value >> 1);   /* Close FCC gap.  */
+      break;
+    case 26:  /* FP Exceptions Register (derived from FCSR).  */
+      value = FCR31 & (fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+      break;
+    case 28:  /* FP Enables Register (derived from FCSR).  */
+      value = FCR31 & (fcsr_ENABLES_mask | fcsr_RM_mask);
+      if ((FCR31 & fcsr_FS) != 0)
+	value |= fenr_FS;
+      break;
+    case 31:  /* FP Control/Status Register (FCSR).  */
+      value = FCR31 & ~fcsr_ZERO_mask;
       break;
     }
 
-#ifdef DEBUG
-  printf ("DBG: Infinity: returning %d for 0x%s (format = %s)\n",
-	  boolean, pr_addr (op), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (boolean);
+  return (EXTEND32 (value));
 }
 
-int
-Less (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
+void
+store_fcr(sim_cpu *cpu,
+	  address_word cia,
+	  int fcr,
+	  unsigned_word value)
 {
-  int boolean = 0;
+  unsigned32 v;
 
-  /* Argument checking already performed by the FPCOMPARE code */
-
-#ifdef DEBUG
-  printf ("DBG: Less: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
+  v = VL4_8(value);
+  switch (fcr)
     {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	boolean = sim_fpu_is_lt (&wop1, &wop2);
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	boolean = sim_fpu_is_lt (&wop1, &wop2);
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Less: returning %d (format = %s)\n",
-	  boolean, fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (boolean);
-}
-
-int
-Equal (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
-{
-  int boolean = 0;
-
-  /* Argument checking already performed by the FPCOMPARE code */
-
-#ifdef DEBUG
-  printf ("DBG: Equal: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	boolean = sim_fpu_is_eq (&wop1, &wop2);
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	boolean = sim_fpu_is_eq (&wop1, &wop2);
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Equal: returning %d (format = %s)\n",
-	  boolean, fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (boolean);
-}
-
-uword64
-AbsoluteValue (op, fmt)
-     uword64 op;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: AbsoluteValue: %s: op = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop;
-	unsigned32 ans;
-	sim_fpu_32to (&wop, op);
-	sim_fpu_abs (&wop, &wop);
-	sim_fpu_to32 (&ans, &wop);
-	result = ans;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop;
-	unsigned64 ans;
-	sim_fpu_64to (&wop, op);
-	sim_fpu_abs (&wop, &wop);
-	sim_fpu_to64 (&ans, &wop);
-	result = ans;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-  return (result);
-}
-
-uword64
-Negate (op, fmt)
-     uword64 op;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: Negate: %s: op = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop;
-	unsigned32 ans;
-	sim_fpu_32to (&wop, op);
-	sim_fpu_neg (&wop, &wop);
-	sim_fpu_to32 (&ans, &wop);
-	result = ans;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop;
-	unsigned64 ans;
-	sim_fpu_64to (&wop, op);
-	sim_fpu_neg (&wop, &wop);
-	sim_fpu_to64 (&ans, &wop);
-	result = ans;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-  return (result);
-}
-
-uword64
-Add (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: Add: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-  
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	sim_fpu_add (&ans, &wop1, &wop2);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	sim_fpu_add (&ans, &wop1, &wop2);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Add: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
-
-uword64
-Sub (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: Sub: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	sim_fpu_sub (&ans, &wop1, &wop2);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-      }
+    case 25:  /* FP Condition Codes Register (stored into FCSR).  */
+      v = (v << 1) | (v & 0x1);             /* Adjust for FCC gap.  */
+      FCR31 &= ~fcsr_FCC_mask;
+      FCR31 |= ((v << fcsr_FCC_shift) & fcsr_FCC_mask);
       break;
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	sim_fpu_sub (&ans, &wop1, &wop2);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-      }
+    case 26:  /* FP Exceptions Register (stored into FCSR).  */
+      FCR31 &= ~(fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+      FCR31 |= (v & (fcsr_CAUSE_mask | fcsr_FLAGS_mask));
+      test_fcsr(cpu, cia);
       break;
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
+    case 28:  /* FP Enables Register (stored into FCSR).  */
+      if ((v & fenr_FS) != 0)
+	v |= fcsr_FS;
+      else
+	v &= ~fcsr_FS;
+      FCR31 &= (fcsr_FCC_mask | fcsr_CAUSE_mask | fcsr_FLAGS_mask);
+      FCR31 |= (v & (fcsr_FS | fcsr_ENABLES_mask | fcsr_RM_mask));
+      test_fcsr(cpu, cia);
+      break;
+    case 31:  /* FP Control/Status Register (FCSR).  */
+      FCR31 = v & ~fcsr_ZERO_mask;
+      test_fcsr(cpu, cia);
+      break;
     }
-
-#ifdef DEBUG
-  printf ("DBG: Sub: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
 }
 
-uword64
-Multiply (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
+void
+update_fcsr (sim_cpu *cpu,
+	     address_word cia,
+	     sim_fpu_status status)
 {
-  uword64 result = 0;
+  FCSR &= ~fcsr_CAUSE_mask;
 
-#ifdef DEBUG
-  printf ("DBG: Multiply: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
+  if (status != 0)
     {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	sim_fpu_mul (&ans, &wop1, &wop2);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	sim_fpu_mul (&ans, &wop1, &wop2);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
+      unsigned int cause = 0;
 
-#ifdef DEBUG
-  printf ("DBG: Multiply: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
-
-uword64
-Divide (op1, op2, fmt)
-     uword64 op1;
-     uword64 op2;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: Divide: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	sim_fpu_div (&ans, &wop1, &wop2);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	sim_fpu_div (&ans, &wop1, &wop2);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Divide: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
-
-uword64 UNUSED
-Recip (op, fmt)
-     uword64 op;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: Recip: %s: op = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop, op);
-	sim_fpu_inv (&ans, &wop);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop, op);
-	sim_fpu_inv (&ans, &wop);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Recip: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
-
-uword64
-SquareRoot (op, fmt)
-     uword64 op;
-     FP_formats fmt;
-{
-  uword64 result = 0;
-
-#ifdef DEBUG
-  printf ("DBG: SquareRoot: %s: op = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop;
-	sim_fpu ans;
-	unsigned32 res;
-	sim_fpu_32to (&wop, op);
-	sim_fpu_sqrt (&ans, &wop);
-	sim_fpu_to32 (&res, &ans);
-	result = res;
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop;
-	sim_fpu ans;
-	unsigned64 res;
-	sim_fpu_64to (&wop, op);
-	sim_fpu_sqrt (&ans, &wop);
-	sim_fpu_to64 (&res, &ans);
-	result = res;
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: SquareRoot: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
-
-#if 0
-uword64
-Max (uword64 op1,
-     uword64 op2,
-     FP_formats fmt)
-{
-  int cmp;
-  unsigned64 result;
-
-#ifdef DEBUG
-  printf ("DBG: Max: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	cmp = sim_fpu_cmp (&wop1, &wop2);
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	cmp = sim_fpu_cmp (&wop1, &wop2);
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-  switch (cmp)
-    {
-    case SIM_FPU_IS_SNAN:
-    case SIM_FPU_IS_QNAN:
-      result = op1;
-    case SIM_FPU_IS_NINF:
-    case SIM_FPU_IS_NNUMBER:
-    case SIM_FPU_IS_NDENORM:
-    case SIM_FPU_IS_NZERO:
-      result = op2; /* op1 - op2 < 0 */
-    case SIM_FPU_IS_PINF:
-    case SIM_FPU_IS_PNUMBER:
-    case SIM_FPU_IS_PDENORM:
-    case SIM_FPU_IS_PZERO:
-      result = op1; /* op1 - op2 > 0 */
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Max: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
-}
+      /* map between sim_fpu codes and MIPS FCSR */
+      if (status & (sim_fpu_status_invalid_snan
+		    | sim_fpu_status_invalid_isi
+		    | sim_fpu_status_invalid_idi
+		    | sim_fpu_status_invalid_zdz
+		    | sim_fpu_status_invalid_imz
+		    | sim_fpu_status_invalid_cmp
+		    | sim_fpu_status_invalid_sqrt
+		    | sim_fpu_status_invalid_cvi))
+	cause |= (1 << IO);
+      if (status & sim_fpu_status_invalid_div0)
+	cause |= (1 << DZ);
+      if (status & sim_fpu_status_overflow)
+	cause |= (1 << OF);
+      if (status & sim_fpu_status_underflow)
+	cause |= (1 << UF);
+      if (status & sim_fpu_status_inexact)
+	cause |= (1 << IR);
+#if 0 /* Not yet.  */
+      /* Implicit clearing of other bits by unimplemented done by callers.  */
+      if (status & sim_fpu_status_unimplemented)
+	cause |= (1 << UO);
 #endif
 
-#if 0
-uword64
-Min (uword64 op1,
-     uword64 op2,
-     FP_formats fmt)
-{
-  int cmp;
-  unsigned64 result;
-
-#ifdef DEBUG
-  printf ("DBG: Min: %s: op1 = 0x%s : op2 = 0x%s\n",
-	  fpu_format_name (fmt), pr_addr (op1), pr_addr (op2));
-#endif /* DEBUG */
-
-  /* The registers must specify FPRs valid for operands of type
-     "fmt". If they are not valid, the result is undefined.  */
-
-  /* The format type should already have been checked:  */
-  switch (fmt)
-    {
-    case fmt_single:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_32to (&wop1, op1);
-	sim_fpu_32to (&wop2, op2);
-	cmp = sim_fpu_cmp (&wop1, &wop2);
-	break;
-      }
-    case fmt_double:
-      {
-	sim_fpu wop1;
-	sim_fpu wop2;
-	sim_fpu_64to (&wop1, op1);
-	sim_fpu_64to (&wop2, op2);
-	cmp = sim_fpu_cmp (&wop1, &wop2);
-	break;
-      }
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
+      FCSR |= (cause << fcsr_CAUSE_shift);
+      test_fcsr (cpu, cia);
+      FCSR |= ((cause & ~(1 << UO)) << fcsr_FLAGS_shift);
     }
-
-  switch (cmp)
-    {
-    case SIM_FPU_IS_SNAN:
-    case SIM_FPU_IS_QNAN:
-      result = op1;
-    case SIM_FPU_IS_NINF:
-    case SIM_FPU_IS_NNUMBER:
-    case SIM_FPU_IS_NDENORM:
-    case SIM_FPU_IS_NZERO:
-      result = op1; /* op1 - op2 < 0 */
-    case SIM_FPU_IS_PINF:
-    case SIM_FPU_IS_PNUMBER:
-    case SIM_FPU_IS_PDENORM:
-    case SIM_FPU_IS_PZERO:
-      result = op2; /* op1 - op2 > 0 */
-    default:
-      fprintf (stderr, "Bad switch\n");
-      abort ();
-    }
-
-#ifdef DEBUG
-  printf ("DBG: Min: returning 0x%s (format = %s)\n",
-	  pr_addr (result), fpu_format_name (fmt));
-#endif /* DEBUG */
-
-  return (result);
+  return;
 }
-#endif
 
-uword64
-convert (SIM_DESC sd,
-	 sim_cpu *cpu,
-	 address_word cia,
-	 int rm,
-	 uword64 op,
-	 FP_formats from,
-	 FP_formats to)
+static sim_fpu_round
+rounding_mode(int rm)
 {
-  sim_fpu wop;
   sim_fpu_round round;
-  unsigned32 result32;
-  unsigned64 result64;
-
-#ifdef DEBUG
-#if 0 /* FIXME: doesn't compile */
-  printf ("DBG: Convert: mode %s : op 0x%s : from %s : to %s : (PC = 0x%s)\n",
-	  fpu_rounding_mode_name (rm), pr_addr (op), fpu_format_name (from),
-	  fpu_format_name (to), pr_addr (IPC));
-#endif
-#endif /* DEBUG */
 
   switch (rm)
     {
@@ -1076,7 +477,6 @@
 	 the result.  */
       round = sim_fpu_round_up;
       break;
-
     case FP_RM_TOMINF:
       /* Round result to the value closest to, and not greater than,
 	 the result.  */
@@ -1087,6 +487,884 @@
       fprintf (stderr, "Bad switch\n");
       abort ();
     }
+  return round;
+}
+
+/* When the FS bit is set, MIPS processors return zero for
+   denormalized results and optionally replace denormalized inputs
+   with zero.  When FS is clear, some implementation trap on input
+   and/or output, while other perform the operation in hardware.  */
+static sim_fpu_denorm
+denorm_mode(sim_cpu *cpu)
+{
+  sim_fpu_denorm denorm;
+
+  /* XXX: FIXME: Eventually should be CPU model dependent.  */
+  if (GETFS())
+    denorm = sim_fpu_denorm_zero;
+  else
+    denorm = 0;
+  return denorm;
+}
+
+
+/* Comparison operations.  */
+
+static sim_fpu_status
+fp_test(unsigned64 op1,
+	unsigned64 op2,
+	FP_formats fmt,
+	int abs,
+	int cond,
+	int *condition)
+{
+  sim_fpu wop1;
+  sim_fpu wop2;
+  sim_fpu_status status = 0;
+  int  less, equal, unordered;
+
+  /* The format type has already been checked:  */
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	sim_fpu_32to (&wop1, op1);
+	sim_fpu_32to (&wop2, op2);
+	break;
+      }
+    case fmt_double:
+      {
+	sim_fpu_64to (&wop1, op1);
+	sim_fpu_64to (&wop2, op2);
+	break;
+      }
+    default:
+      fprintf (stderr, "Bad switch\n");
+      abort ();
+    }
+
+  if (sim_fpu_is_nan (&wop1) || sim_fpu_is_nan (&wop2))
+    {
+      if ((cond & (1 << 3)) ||
+	  sim_fpu_is_snan (&wop1) || sim_fpu_is_snan (&wop2))
+	status = sim_fpu_status_invalid_snan;
+      less = 0;
+      equal = 0;
+      unordered = 1;
+    }
+  else
+    {
+      if (abs)
+	{
+	  status |= sim_fpu_abs (&wop1, &wop1);
+	  status |= sim_fpu_abs (&wop2, &wop2);
+	}
+      equal = sim_fpu_is_eq (&wop1, &wop2);
+      less = !equal && sim_fpu_is_lt (&wop1, &wop2);
+      unordered = 0;
+    }
+  *condition = (((cond & (1 << 2)) && less)
+		|| ((cond & (1 << 1)) && equal)
+		|| ((cond & (1 << 0)) && unordered));
+  return status;
+}
+
+void
+fp_cmp(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op1,
+       unsigned64 op2,
+       FP_formats fmt,
+       int abs,
+       int cond,
+       int cc)
+{
+  sim_fpu_status status = 0;
+
+  /* The format type should already have been checked.  The FCSR is
+     updated before the condition codes so that any exceptions will
+     be signalled before the condition codes are changed.  */
+  switch (fmt)
+    {
+    case fmt_single:
+    case fmt_double:
+      {
+	int result;
+	status = fp_test(op1, op2, fmt, abs, cond, &result);
+	update_fcsr (cpu, cia, status);
+	SETFCC (cc, result);
+	break;
+      }
+    case fmt_ps:
+      {
+	int result0, result1;
+	status  = fp_test(FP_PS_lower (op1), FP_PS_lower (op2), fmt_single,
+			  abs, cond, &result0);
+	status |= fp_test(FP_PS_upper (op1), FP_PS_upper (op2), fmt_single,
+			  abs, cond, &result1);
+	update_fcsr (cpu, cia, status);
+	SETFCC (cc, result0);
+	SETFCC (cc+1, result1);
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+}
+
+
+/* Basic arithmetic operations.  */
+
+static unsigned64
+fp_unary(sim_cpu *cpu,
+	 address_word cia,
+	 int (*sim_fpu_op)(sim_fpu *, const sim_fpu *),
+	 unsigned64 op,
+	 FP_formats fmt)
+{
+  sim_fpu wop;
+  sim_fpu ans;
+  sim_fpu_round round = rounding_mode (GETRM());
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  sim_fpu_status status = 0;
+  unsigned64 result = 0;
+
+  /* The format type has already been checked: */
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	unsigned32 res;
+	sim_fpu_32to (&wop, op);
+	status |= (*sim_fpu_op) (&ans, &wop);
+	status |= sim_fpu_round_32 (&ans, round, denorm);
+	sim_fpu_to32 (&res, &ans);
+	result = res;
+	break;
+      }
+    case fmt_double:
+      {
+	unsigned64 res;
+	sim_fpu_64to (&wop, op);
+	status |= (*sim_fpu_op) (&ans, &wop);
+	status |= sim_fpu_round_64 (&ans, round, denorm);
+	sim_fpu_to64 (&res, &ans);
+	result = res;
+	break;
+      }
+    case fmt_ps:
+      {
+	int status_u = 0, status_l = 0;
+	unsigned32 res_u, res_l;
+	sim_fpu_32to (&wop, FP_PS_upper(op));
+	status_u |= (*sim_fpu_op) (&ans, &wop);
+	sim_fpu_to32 (&res_u, &ans);
+	sim_fpu_32to (&wop, FP_PS_lower(op));
+	status_l |= (*sim_fpu_op) (&ans, &wop);
+	sim_fpu_to32 (&res_l, &ans);
+	result = FP_PS_cat(res_u, res_l);
+	status = status_u | status_l;
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  update_fcsr (cpu, cia, status);
+  return result;
+}
+
+static unsigned64
+fp_binary(sim_cpu *cpu,
+	  address_word cia,
+	  int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+	  unsigned64 op1,
+	  unsigned64 op2,
+	  FP_formats fmt)
+{
+  sim_fpu wop1;
+  sim_fpu wop2;
+  sim_fpu ans;
+  sim_fpu_round round = rounding_mode (GETRM());
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  sim_fpu_status status = 0;
+  unsigned64 result = 0;
+
+  /* The format type has already been checked: */
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	unsigned32 res;
+	sim_fpu_32to (&wop1, op1);
+	sim_fpu_32to (&wop2, op2);
+	status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	status |= sim_fpu_round_32 (&ans, round, denorm);
+	sim_fpu_to32 (&res, &ans);
+	result = res;
+	break;
+      }
+    case fmt_double:
+      {
+	unsigned64 res;
+	sim_fpu_64to (&wop1, op1);
+	sim_fpu_64to (&wop2, op2);
+	status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	status |= sim_fpu_round_64 (&ans, round, denorm);
+	sim_fpu_to64 (&res, &ans);
+	result = res;
+	break;
+      }
+    case fmt_ps:
+      {
+	int status_u = 0, status_l = 0;
+	unsigned32 res_u, res_l;
+	sim_fpu_32to (&wop1, FP_PS_upper(op1));
+	sim_fpu_32to (&wop2, FP_PS_upper(op2));
+	status_u |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	sim_fpu_to32 (&res_u, &ans);
+	sim_fpu_32to (&wop1, FP_PS_lower(op1));
+	sim_fpu_32to (&wop2, FP_PS_lower(op2));
+	status_l |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	sim_fpu_to32 (&res_l, &ans);
+	result = FP_PS_cat(res_u, res_l);
+	status = status_u | status_l;
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  update_fcsr (cpu, cia, status);
+  return result;
+}
+
+/* Common MAC code for single operands (.s or .d), defers setting FCSR.  */
+static sim_fpu_status
+inner_mac(int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+	  unsigned64 op1,
+	  unsigned64 op2,
+	  unsigned64 op3,
+	  int scale,
+	  int negate,
+	  FP_formats fmt,
+	  sim_fpu_round round,
+	  sim_fpu_denorm denorm,
+	  unsigned64 *result)
+{
+  sim_fpu wop1;
+  sim_fpu wop2;
+  sim_fpu ans;
+  sim_fpu_status status = 0;
+  sim_fpu_status op_status;
+  unsigned64 temp = 0;
+
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	unsigned32 res;
+	sim_fpu_32to (&wop1, op1);
+	sim_fpu_32to (&wop2, op2);
+	status |= sim_fpu_mul (&ans, &wop1, &wop2);
+	if (scale != 0 && sim_fpu_is_number (&ans))  /* number or denorm */
+	  ans.normal_exp += scale;
+	status |= sim_fpu_round_32 (&ans, round, denorm);
+	wop1 = ans;
+        op_status = 0;
+	sim_fpu_32to (&wop2, op3);
+	op_status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	op_status |= sim_fpu_round_32 (&ans, round, denorm);
+	status |= op_status;
+	if (negate)
+	  {
+	    wop1 = ans;
+	    op_status = sim_fpu_neg (&ans, &wop1);
+	    op_status |= sim_fpu_round_32 (&ans, round, denorm);
+	    status |= op_status;
+	  }
+	sim_fpu_to32 (&res, &ans);
+	temp = res;
+	break;
+      }
+    case fmt_double:
+      {
+	unsigned64 res;
+	sim_fpu_64to (&wop1, op1);
+	sim_fpu_64to (&wop2, op2);
+	status |= sim_fpu_mul (&ans, &wop1, &wop2);
+	if (scale != 0 && sim_fpu_is_number (&ans))  /* number or denorm */
+	  ans.normal_exp += scale;
+	status |= sim_fpu_round_64 (&ans, round, denorm);
+	wop1 = ans;
+        op_status = 0;
+	sim_fpu_64to (&wop2, op3);
+	op_status |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+	op_status |= sim_fpu_round_64 (&ans, round, denorm);
+	status |= op_status;
+	if (negate)
+	  {
+	    wop1 = ans;
+	    op_status = sim_fpu_neg (&ans, &wop1);
+	    op_status |= sim_fpu_round_64 (&ans, round, denorm);
+	    status |= op_status;
+	  }
+	sim_fpu_to64 (&res, &ans);
+	temp = res;
+	break;
+      }
+    default:
+      fprintf (stderr, "Bad switch\n");
+      abort ();
+    }
+  *result = temp;
+  return status;
+}
+
+/* Common implementation of madd, nmadd, msub, nmsub that does
+   intermediate rounding per spec.  Also used for recip2 and rsqrt2,
+   which are transformed into equivalent nmsub operations.  The scale
+   argument is an adjustment to the exponent of the intermediate
+   product op1*op2.  It is currently non-zero for rsqrt2 (-1), which
+   requires an effective division by 2. */
+static unsigned64
+fp_mac(sim_cpu *cpu,
+       address_word cia,
+       int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+       unsigned64 op1,
+       unsigned64 op2,
+       unsigned64 op3,
+       int scale,
+       int negate,
+       FP_formats fmt)
+{
+  sim_fpu_round round = rounding_mode (GETRM());
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  sim_fpu_status status = 0;
+  unsigned64 result = 0;
+
+  /* The format type has already been checked: */
+  switch (fmt)
+    {
+    case fmt_single:
+    case fmt_double:
+      status = inner_mac(sim_fpu_op, op1, op2, op3, scale,
+			 negate, fmt, round, denorm, &result);
+      break;
+    case fmt_ps:
+      {
+	int status_u, status_l;
+	unsigned64 result_u, result_l;
+	status_u = inner_mac(sim_fpu_op, FP_PS_upper(op1), FP_PS_upper(op2),
+			     FP_PS_upper(op3), scale, negate, fmt_single,
+			     round, denorm, &result_u);
+	status_l = inner_mac(sim_fpu_op, FP_PS_lower(op1), FP_PS_lower(op2),
+			     FP_PS_lower(op3), scale, negate, fmt_single,
+			     round, denorm, &result_l);
+	result = FP_PS_cat(result_u, result_l);
+	status = status_u | status_l;
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  update_fcsr (cpu, cia, status);
+  return result;
+}
+
+/* Common rsqrt code for single operands (.s or .d), intermediate rounding.  */
+static sim_fpu_status
+inner_rsqrt(unsigned64 op1,
+	    FP_formats fmt,
+	    sim_fpu_round round,
+	    sim_fpu_denorm denorm,
+	    unsigned64 *result)
+{
+  sim_fpu wop1;
+  sim_fpu ans;
+  sim_fpu_status status = 0;
+  sim_fpu_status op_status;
+  unsigned64 temp = 0;
+
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	unsigned32 res;
+	sim_fpu_32to (&wop1, op1);
+	status |= sim_fpu_sqrt (&ans, &wop1);
+	status |= sim_fpu_round_32 (&ans, status, round);
+	wop1 = ans;
+	op_status = sim_fpu_inv (&ans, &wop1);
+	op_status |= sim_fpu_round_32 (&ans, round, denorm);
+	sim_fpu_to32 (&res, &ans);
+	temp = res;
+	status |= op_status;
+	break;
+      }
+    case fmt_double:
+      {
+	unsigned64 res;
+	sim_fpu_64to (&wop1, op1);
+	status |= sim_fpu_sqrt (&ans, &wop1);
+	status |= sim_fpu_round_64 (&ans, round, denorm);
+	wop1 = ans;
+	op_status = sim_fpu_inv (&ans, &wop1);
+	op_status |= sim_fpu_round_64 (&ans, round, denorm);
+	sim_fpu_to64 (&res, &ans);
+	temp = res;
+	status |= op_status;
+	break;
+      }
+    default:
+      fprintf (stderr, "Bad switch\n");
+      abort ();
+    }
+  *result = temp;
+  return status;
+}
+
+static unsigned64
+fp_inv_sqrt(sim_cpu *cpu,
+	    address_word cia,
+	    unsigned64 op1,
+	    FP_formats fmt)
+{
+  sim_fpu_round round = rounding_mode (GETRM());
+  sim_fpu_round denorm = denorm_mode (cpu);
+  sim_fpu_status status = 0;
+  unsigned64 result = 0;
+
+  /* The format type has already been checked: */
+  switch (fmt)
+    {
+    case fmt_single:
+    case fmt_double:
+      status = inner_rsqrt (op1, fmt, round, denorm, &result);
+      break;
+    case fmt_ps:
+      {
+	int status_u, status_l;
+	unsigned64 result_u, result_l;
+	status_u = inner_rsqrt (FP_PS_upper(op1), fmt_single, round, denorm,
+				&result_u);
+	status_l = inner_rsqrt (FP_PS_lower(op1), fmt_single, round, denorm,
+				&result_l);
+	result = FP_PS_cat(result_u, result_l);
+	status = status_u | status_l;
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  update_fcsr (cpu, cia, status);
+  return result;
+}
+
+
+unsigned64
+fp_abs(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op,
+       FP_formats fmt)
+{
+  return fp_unary(cpu, cia, &sim_fpu_abs, op, fmt);
+}
+
+unsigned64
+fp_neg(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op,
+       FP_formats fmt)
+{
+  return fp_unary(cpu, cia, &sim_fpu_neg, op, fmt);
+}
+
+unsigned64
+fp_add(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op1,
+       unsigned64 op2,
+       FP_formats fmt)
+{
+  return fp_binary(cpu, cia, &sim_fpu_add, op1, op2, fmt);
+}
+
+unsigned64
+fp_sub(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op1,
+       unsigned64 op2,
+       FP_formats fmt)
+{
+  return fp_binary(cpu, cia, &sim_fpu_sub, op1, op2, fmt);
+}
+
+unsigned64
+fp_mul(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op1,
+       unsigned64 op2,
+       FP_formats fmt)
+{
+  return fp_binary(cpu, cia, &sim_fpu_mul, op1, op2, fmt);
+}
+
+unsigned64
+fp_div(sim_cpu *cpu,
+       address_word cia,
+       unsigned64 op1,
+       unsigned64 op2,
+       FP_formats fmt)
+{
+  return fp_binary(cpu, cia, &sim_fpu_div, op1, op2, fmt);
+}
+
+unsigned64
+fp_recip(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op,
+         FP_formats fmt)
+{
+  return fp_unary(cpu, cia, &sim_fpu_inv, op, fmt);
+}
+
+unsigned64
+fp_sqrt(sim_cpu *cpu,
+        address_word cia,
+        unsigned64 op,
+        FP_formats fmt)
+{
+  return fp_unary(cpu, cia, &sim_fpu_sqrt, op, fmt);
+}
+
+unsigned64
+fp_rsqrt(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op,
+         FP_formats fmt)
+{
+  return fp_inv_sqrt(cpu, cia, op, fmt);
+}
+
+unsigned64
+fp_madd(sim_cpu *cpu,
+        address_word cia,
+        unsigned64 op1,
+        unsigned64 op2,
+        unsigned64 op3,
+        FP_formats fmt)
+{
+  return fp_mac(cpu, cia, &sim_fpu_add, op1, op2, op3, 0, 0, fmt);
+}
+
+unsigned64
+fp_msub(sim_cpu *cpu,
+        address_word cia,
+        unsigned64 op1,
+        unsigned64 op2,
+        unsigned64 op3,
+        FP_formats fmt)
+{
+  return fp_mac(cpu, cia, &sim_fpu_sub, op1, op2, op3, 0, 0, fmt);
+}
+
+unsigned64
+fp_nmadd(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op1,
+         unsigned64 op2,
+         unsigned64 op3,
+         FP_formats fmt)
+{
+  return fp_mac(cpu, cia, &sim_fpu_add, op1, op2, op3, 0, 1, fmt);
+}
+
+unsigned64
+fp_nmsub(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op1,
+         unsigned64 op2,
+         unsigned64 op3,
+         FP_formats fmt)
+{
+  return fp_mac(cpu, cia, &sim_fpu_sub, op1, op2, op3, 0, 1, fmt);
+}
+
+
+/* MIPS-3D ASE operations.  */
+
+/* Variant of fp_binary for *r.ps MIPS-3D operations. */
+static unsigned64
+fp_binary_r(sim_cpu *cpu,
+	    address_word cia,
+	    int (*sim_fpu_op)(sim_fpu *, const sim_fpu *, const sim_fpu *),
+	    unsigned64 op1,
+	    unsigned64 op2) 
+{
+  sim_fpu wop1;
+  sim_fpu wop2;
+  sim_fpu ans;
+  sim_fpu_round round = rounding_mode (GETRM ());
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  sim_fpu_status status_u, status_l;
+  unsigned64 result;
+  unsigned32 res_u, res_l;
+
+  /* The format must be fmt_ps.  */
+  status_u = 0;
+  sim_fpu_32to (&wop1, FP_PS_upper (op1));
+  sim_fpu_32to (&wop2, FP_PS_lower (op1));
+  status_u |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+  status_u |= sim_fpu_round_32 (&ans, round, denorm);
+  sim_fpu_to32 (&res_u, &ans);
+  status_l = 0;
+  sim_fpu_32to (&wop1, FP_PS_upper (op2));
+  sim_fpu_32to (&wop2, FP_PS_lower (op2));
+  status_l |= (*sim_fpu_op) (&ans, &wop1, &wop2);
+  status_l |= sim_fpu_round_32 (&ans, round, denorm);
+  sim_fpu_to32 (&res_l, &ans);
+  result = FP_PS_cat (res_u, res_l);
+
+  update_fcsr (cpu, cia, status_u | status_l);
+  return result;
+}
+
+unsigned64
+fp_add_r(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op1,
+         unsigned64 op2,
+         FP_formats fmt)
+{
+  return fp_binary_r (cpu, cia, &sim_fpu_add, op1, op2);
+}
+
+unsigned64
+fp_mul_r(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op1,
+         unsigned64 op2,
+         FP_formats fmt)
+{
+  return fp_binary_r (cpu, cia, &sim_fpu_mul, op1, op2);
+}
+
+#define NR_FRAC_GUARD   (60)
+#define IMPLICIT_1 LSBIT64 (NR_FRAC_GUARD)
+
+static int
+fpu_inv1(sim_fpu *f, const sim_fpu *l)
+{
+  static const sim_fpu sim_fpu_one = {
+    sim_fpu_class_number, 0, IMPLICIT_1, 0
+  };
+  int  status = 0;
+  sim_fpu t;
+
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_maxfp;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  if (sim_fpu_is_infinity (l))
+    {
+      *f = sim_fpu_zero;
+      f->sign = l->sign;
+      return status;
+    }
+  status |= sim_fpu_div (f, &sim_fpu_one, l);
+  return status;
+}
+
+static int
+fpu_inv1_32(sim_fpu *f, const sim_fpu *l)
+{
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_max32;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  return fpu_inv1 (f, l);
+}
+
+static int
+fpu_inv1_64(sim_fpu *f, const sim_fpu *l)
+{
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_max64;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  return fpu_inv1 (f, l);
+}
+
+unsigned64
+fp_recip1(sim_cpu *cpu,
+          address_word cia,
+          unsigned64 op,
+          FP_formats fmt)
+{
+  switch (fmt)
+    {
+    case fmt_single:
+    case fmt_ps:
+      return fp_unary (cpu, cia, &fpu_inv1_32, op, fmt);
+    case fmt_double:
+      return fp_unary (cpu, cia, &fpu_inv1_64, op, fmt);
+    }
+  return 0;
+}
+
+unsigned64
+fp_recip2(sim_cpu *cpu,
+          address_word cia,
+          unsigned64 op1,
+          unsigned64 op2,
+          FP_formats fmt)
+{
+  static const unsigned64 one_single = UNSIGNED64 (0x3F800000);
+  static const unsigned64 one_double = UNSIGNED64 (0x3FF0000000000000);
+  static const unsigned64 one_ps = (UNSIGNED64 (0x3F800000) << 32 | UNSIGNED64 (0x3F800000));
+  unsigned64 one;
+
+  /* Implemented as nmsub fd, 1, fs, ft.  */
+  switch (fmt)
+    {
+    case fmt_single:  one = one_single;  break;
+    case fmt_double:  one = one_double;  break;
+    case fmt_ps:      one = one_ps;      break;
+    default:          one = 0;           abort ();
+    }
+  return fp_mac (cpu, cia, &sim_fpu_sub, op1, op2, one, 0, 1, fmt);
+}
+
+static int
+fpu_inv_sqrt1(sim_fpu *f, const sim_fpu *l)
+{
+  static const sim_fpu sim_fpu_one = {
+    sim_fpu_class_number, 0, IMPLICIT_1, 0
+  };
+  int  status = 0;
+  sim_fpu t;
+
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_maxfp;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  if (sim_fpu_is_infinity (l))
+    {
+      if (!l->sign)
+	{
+	  f->class = sim_fpu_class_zero;
+	  f->sign = 0;
+	}
+      else
+	{
+	  *f = sim_fpu_qnan;
+	  status = sim_fpu_status_invalid_sqrt;
+	}
+      return status;
+    }
+  status |= sim_fpu_sqrt (&t, l);
+  status |= sim_fpu_div (f, &sim_fpu_one, &t);
+  return status;
+}
+
+static int
+fpu_inv_sqrt1_32(sim_fpu *f, const sim_fpu *l)
+{
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_max32;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  return fpu_inv_sqrt1 (f, l);
+}
+
+static int
+fpu_inv_sqrt1_64(sim_fpu *f, const sim_fpu *l)
+{
+  if (sim_fpu_is_zero (l))
+    {
+      *f = sim_fpu_max64;
+      f->sign = l->sign;
+      return sim_fpu_status_invalid_div0;
+    }
+  return fpu_inv_sqrt1 (f, l);
+}
+
+unsigned64
+fp_rsqrt1(sim_cpu *cpu,
+          address_word cia,
+          unsigned64 op,
+          FP_formats fmt)
+{
+  switch (fmt)
+    {
+    case fmt_single:
+    case fmt_ps:
+      return fp_unary (cpu, cia, &fpu_inv_sqrt1_32, op, fmt);
+    case fmt_double:
+      return fp_unary (cpu, cia, &fpu_inv_sqrt1_64, op, fmt);
+    }
+  return 0;
+}
+
+unsigned64
+fp_rsqrt2(sim_cpu *cpu,
+          address_word cia,
+          unsigned64 op1,
+          unsigned64 op2,
+          FP_formats fmt)
+{
+  static const unsigned64 half_single = UNSIGNED64 (0x3F000000);
+  static const unsigned64 half_double = UNSIGNED64 (0x3FE0000000000000);
+  static const unsigned64 half_ps = (UNSIGNED64 (0x3F000000) << 32 | UNSIGNED64 (0x3F000000));
+  unsigned64 half;
+
+  /* Implemented as (nmsub fd, 0.5, fs, ft)/2, where the divide is
+     done by scaling the exponent during multiply.  */
+  switch (fmt)
+    {
+    case fmt_single:  half = half_single;  break;
+    case fmt_double:  half = half_double;  break;
+    case fmt_ps:      half = half_ps;      break;
+    default:          half = 0;            abort ();
+    }
+  return fp_mac (cpu, cia, &sim_fpu_sub, op1, op2, half, -1, 1, fmt);
+}
+
+
+/* Conversion operations.  */
+
+uword64
+convert (sim_cpu *cpu,
+	 address_word cia,
+	 int rm,
+	 uword64 op,
+	 FP_formats from,
+	 FP_formats to)
+{
+  sim_fpu wop;
+  sim_fpu_round round = rounding_mode (rm);
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  unsigned32 result32;
+  unsigned64 result64;
+  sim_fpu_status status = 0;
 
   /* Convert the input to sim_fpu internal format */
   switch (from)
@@ -1098,13 +1376,13 @@
       sim_fpu_32to (&wop, op);
       break;
     case fmt_word:
-      sim_fpu_i32to (&wop, op, round);
+      status = sim_fpu_i32to (&wop, op, round);
       break;
     case fmt_long:
-      sim_fpu_i64to (&wop, op, round);
+      status = sim_fpu_i64to (&wop, op, round);
       break;
     default:
-      fprintf (stderr, "Bad switch\n");
+      sim_io_eprintf (SD, "Bad switch\n");
       abort ();
     }
 
@@ -1112,38 +1390,148 @@
   /* The value WOP is converted to the destination format, rounding
      using mode RM. When the destination is a fixed-point format, then
      a source value of Infinity, NaN or one which would round to an
-     integer outside the fixed point range then an IEEE Invalid
-     Operation condition is raised.  */
+     integer outside the fixed point range then an IEEE Invalid Operation
+     condition is raised.  Not used if destination format is PS.  */
   switch (to)
     {
     case fmt_single:
-      sim_fpu_round_32 (&wop, round, 0);
+      status |= sim_fpu_round_32 (&wop, round, denorm);
+      /* For a NaN, normalize mantissa bits (cvt.s.d can't preserve them) */
+      if (sim_fpu_is_qnan (&wop))
+	wop = sim_fpu_qnan;
       sim_fpu_to32 (&result32, &wop);
       result64 = result32;
       break;
     case fmt_double:
-      sim_fpu_round_64 (&wop, round, 0);
+      status |= sim_fpu_round_64 (&wop, round, denorm);
+      /* For a NaN, normalize mantissa bits (make cvt.d.s consistent) */
+      if (sim_fpu_is_qnan (&wop))
+	wop = sim_fpu_qnan;
       sim_fpu_to64 (&result64, &wop);
       break;
     case fmt_word:
-      sim_fpu_to32i (&result32, &wop, round);
+      status |= sim_fpu_to32i (&result32, &wop, round);
       result64 = result32;
       break;
     case fmt_long:
-      sim_fpu_to64i (&result64, &wop, round);
+      status |= sim_fpu_to64i (&result64, &wop, round);
       break;
     default:
       result64 = 0;
-      fprintf (stderr, "Bad switch\n");
+      sim_io_eprintf (SD, "Bad switch\n");
       abort ();
     }
 
-#ifdef DEBUG
-  printf ("DBG: Convert: returning 0x%s (to format = %s)\n",
-	  pr_addr (result64), fpu_format_name (to));
-#endif /* DEBUG */
+  update_fcsr (cpu, cia, status);
+  return result64;
+}
 
-  return (result64);
+unsigned64
+ps_lower(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op)
+{
+  return FP_PS_lower (op);
+}
+
+unsigned64
+ps_upper(sim_cpu *cpu,
+         address_word cia,
+         unsigned64 op)
+{
+  return FP_PS_upper(op);
+}
+
+unsigned64
+pack_ps(sim_cpu *cpu,
+        address_word cia,
+        unsigned64 op1,
+        unsigned64 op2,
+        FP_formats fmt)
+{
+  unsigned64 result = 0;
+
+  /* The registers must specify FPRs valid for operands of type
+     "fmt". If they are not valid, the result is undefined. */
+
+  /* The format type should already have been checked: */
+  switch (fmt)
+    {
+    case fmt_single:
+      {
+	sim_fpu wop;
+	unsigned32 res_u, res_l;
+	sim_fpu_32to (&wop, op1);
+	sim_fpu_to32 (&res_u, &wop);
+	sim_fpu_32to (&wop, op2);
+	sim_fpu_to32 (&res_l, &wop);
+	result = FP_PS_cat(res_u, res_l);
+	break;
+      }
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  return result;
+}
+
+unsigned64
+convert_ps (sim_cpu *cpu,
+            address_word cia,
+            int rm,
+            unsigned64 op,
+            FP_formats from,
+            FP_formats to)
+{
+  sim_fpu wop_u, wop_l;
+  sim_fpu_round round = rounding_mode (rm);
+  sim_fpu_denorm denorm = denorm_mode (cpu);
+  unsigned32 res_u, res_l;
+  unsigned64 result;
+  sim_fpu_status status_u = 0, status_l = 0;
+
+  /* As convert, but used only for paired values (formats PS, PW) */
+
+  /* Convert the input to sim_fpu internal format */
+  switch (from)
+    {
+    case fmt_word:   /* fmt_pw */
+      sim_fpu_i32to (&wop_u, (op >> 32) & (unsigned)0xFFFFFFFF, round);
+      sim_fpu_i32to (&wop_l, op & (unsigned)0xFFFFFFFF, round);
+      break;
+    case fmt_ps:
+      sim_fpu_32to (&wop_u, FP_PS_upper(op));
+      sim_fpu_32to (&wop_l, FP_PS_lower(op));
+      break;
+    default:
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  /* Convert sim_fpu format into the output */
+  switch (to)
+    {
+    case fmt_word:   /* fmt_pw */
+      status_u |= sim_fpu_to32i (&res_u, &wop_u, round);
+      status_l |= sim_fpu_to32i (&res_l, &wop_l, round);
+      result = (((unsigned64)res_u) << 32) | (unsigned64)res_l;
+      break;
+    case fmt_ps:
+      status_u |= sim_fpu_round_32 (&wop_u, 0, round);
+      status_l |= sim_fpu_round_32 (&wop_l, 0, round);
+      sim_fpu_to32 (&res_u, &wop_u);
+      sim_fpu_to32 (&res_l, &wop_l);
+      result = FP_PS_cat(res_u, res_l);
+      break;
+    default:
+      result = 0;
+      sim_io_eprintf (SD, "Bad switch\n");
+      abort ();
+    }
+
+  update_fcsr (cpu, cia, status_u | status_l);
+  return result;
 }
 
 static const char *
@@ -1159,6 +1547,8 @@
       return "word";
     case fmt_long:
       return "long";
+    case fmt_ps:
+      return "ps";
     case fmt_unknown:
       return "<unknown>";
     case fmt_uninterpreted:
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 805f72a..b2828e0 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -61,8 +61,8 @@
 #include "getopt.h"
 #include "libiberty.h"
 #include "bfd.h"
-#include "callback.h"   /* GDB simulator callback interface */
-#include "remote-sim.h" /* GDB simulator interface */
+#include "gdb/callback.h"   /* GDB simulator callback interface */
+#include "gdb/remote-sim.h" /* GDB simulator interface */
 
 #include "sysdep.h"
 
@@ -575,7 +575,7 @@
       {
 	if (rn < 32)
 	  cpu->register_widths[rn] = WITH_TARGET_WORD_BITSIZE;
-	else if ((rn >= FGRIDX) && (rn < (FGRIDX + NR_FGR)))
+	else if ((rn >= FGR_BASE) && (rn < (FGR_BASE + NR_FGR)))
 	  cpu->register_widths[rn] = WITH_TARGET_FLOATING_POINT_BITSIZE;
 	else if ((rn >= 33) && (rn <= 37))
 	  cpu->register_widths[rn] = WITH_TARGET_WORD_BITSIZE;
@@ -849,26 +849,26 @@
 
 
 
-  if (rn >= FGRIDX && rn < FGRIDX + NR_FGR)
+  if (rn >= FGR_BASE && rn < FGR_BASE + NR_FGR)
     {
-      cpu->fpr_state[rn - FGRIDX] = fmt_uninterpreted;
+      cpu->fpr_state[rn - FGR_BASE] = fmt_uninterpreted;
       if (cpu->register_widths[rn] == 32)
 	{
 	  if (length == 8)
 	    {
-	      cpu->fgr[rn - FGRIDX] = 
+	      cpu->fgr[rn - FGR_BASE] = 
 		(unsigned32) T2H_8 (*(unsigned64*)memory);
 	      return 8;
 	    }
 	  else
 	    {
-	      cpu->fgr[rn - FGRIDX] = T2H_4 (*(unsigned32*)memory);
+	      cpu->fgr[rn - FGR_BASE] = T2H_4 (*(unsigned32*)memory);
 	      return 4;
 	    }
 	}
       else
 	{
-	  cpu->fgr[rn - FGRIDX] = T2H_8 (*(unsigned64*)memory);
+	  cpu->fgr[rn - FGR_BASE] = T2H_8 (*(unsigned64*)memory);
 	  return 8;
 	}
     }
@@ -921,25 +921,25 @@
 
 
   /* Any floating point register */
-  if (rn >= FGRIDX && rn < FGRIDX + NR_FGR)
+  if (rn >= FGR_BASE && rn < FGR_BASE + NR_FGR)
     {
       if (cpu->register_widths[rn] == 32)
 	{
 	  if (length == 8)
 	    {
 	      *(unsigned64*)memory =
-		H2T_8 ((unsigned32) (cpu->fgr[rn - FGRIDX]));
+		H2T_8 ((unsigned32) (cpu->fgr[rn - FGR_BASE]));
 	      return 8;
 	    }
 	  else
 	    {
-	      *(unsigned32*)memory = H2T_4 (cpu->fgr[rn - FGRIDX]);
+	      *(unsigned32*)memory = H2T_4 (cpu->fgr[rn - FGR_BASE]);
 	      return 4;
 	    }
 	}
       else
 	{
-	  *(unsigned64*)memory = H2T_8 (cpu->fgr[rn - FGRIDX]);
+	  *(unsigned64*)memory = H2T_8 (cpu->fgr[rn - FGR_BASE]);
 	  return 8;
 	}
     }
@@ -1077,7 +1077,10 @@
 	  }
       }
     else
-      address_present = 0;
+      {
+	address_present = 0;
+	address = -1; /* Dummy value.  */
+      }
   }
 
   if (! strncmp (arg, "idt", 3))
@@ -1223,7 +1226,7 @@
 	break;
       }
 
-    case 28 : /* PMON flush_cache */
+    case 28: /* PMON flush_cache */
       break;
 
     case 55: /* void get_mem_info(unsigned int *ptr) */
@@ -1242,7 +1245,7 @@
 	break;
       }
     
-    case 158 : /* PMON printf */
+    case 158: /* PMON printf */
       /* in:  A0 = pointer to format string */
       /*      A1 = optional argument 1 */
       /*      A2 = optional argument 2 */
@@ -1671,7 +1674,7 @@
 
   switch (exception) {
 
-    case DebugBreakPoint :
+    case DebugBreakPoint:
       if (! (Debug & Debug_DM))
         {
           if (INDELAYSLOT())
@@ -1694,7 +1697,7 @@
         }
       break;
 
-    case ReservedInstruction :
+    case ReservedInstruction:
      {
        va_list ap;
        unsigned int instruction;
@@ -1845,7 +1848,7 @@
 	 sim_engine_halt (SD, CPU, NULL, PC,
 			  sim_stopped, SIM_SIGTRAP);
 
-       default : /* Unknown internal exception */
+       default: /* Unknown internal exception */
 	 PC = EPC;
 	 sim_engine_halt (SD, CPU, NULL, PC,
 			  sim_stopped, SIM_SIGABRT);
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index cd96766..39267a0 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -61,7 +61,16 @@
 //  MIPS Application Specific Extensions (ASEs)
 //
 //  Instructions for the ASEs are in separate .igen files.
+//  ASEs add instructions on to a base ISA.
 :model:::mips16:mips16:			// m16.igen (and m16.dc)
+:model:::mips3d:mips3d:			// mips3d.igen
+:model:::mdmx:mdmx:			// mdmx.igen
+
+//  Vendor Extensions
+//
+//  Instructions specific to these extensions are in separate .igen files.
+//  Extensions add instructions on to a base ISA.
+:model:::sb1:sb1:			// sb1.igen
 
 
 // Pseudo instructions known by IGEN
@@ -2274,7 +2283,10 @@
 *vr5000:
 {
   if (GPR[RT] != 0)
-    GPR[RD] = GPR[RS];
+    {
+      GPR[RD] = GPR[RS];
+      TRACE_ALU_RESULT (GPR[RD]);
+    }
 }
 
 
@@ -2288,7 +2300,10 @@
 *vr5000:
 {
   if (GPR[RT] == 0)
-    GPR[RD] = GPR[RS];
+    {
+      GPR[RD] = GPR[RS];
+      TRACE_ALU_RESULT (GPR[RD]);
+    }
 }
 
 
@@ -3430,7 +3445,7 @@
 
 
 000001,5.RS,01110,16.IMMEDIATE:REGIMM:32::TNEI
-"tne r<RS>, <IMMEDIATE>"
+"tnei r<RS>, <IMMEDIATE>"
 *mipsII:
 *mipsIII:
 *mipsIV:
@@ -3508,16 +3523,7 @@
     case fmt_double: return "d";
     case fmt_word: return "w";
     case fmt_long: return "l";
-    default: return "?";
-    }
-}
-
-:%s::::X:int x
-{
-  switch (x)
-    {
-    case 0: return "f";
-    case 1: return "t";
+    case fmt_ps: return "ps";
     default: return "?";
     }
 }
@@ -3606,13 +3612,9 @@
 *mipsV:
 *mips64:
 {
-#if 0 /* XXX FIXME: FP code doesn't yet support paired single ops.  */
   if ((fmt != fmt_single) && (fmt != fmt_double)
       && (fmt != fmt_ps || (UserMode && (SR & (status_UX|status_PX)) == 0)))
     SignalException (ReservedInstruction, insn);
-#else
-  check_fmt (SD_, fmt, insn);
-#endif
 }
 
 
@@ -3639,6 +3641,77 @@
 }
 
 
+// Helper:
+//
+// Load a double word FP value using 2 32-bit memory cycles a la MIPS II
+// or MIPS32.  do_load cannot be used instead because it returns an
+// unsigned_word, which is limited to the size of the machine's registers.
+//
+
+:function:::unsigned64:do_load_double:address_word base, address_word offset
+*mipsII:
+*mips32:
+{
+  int bigendian = (BigEndianCPU ? ! ReverseEndian : ReverseEndian);
+  address_word vaddr;
+  address_word paddr;
+  int uncached;
+  unsigned64 memval;
+  unsigned64 v;
+
+  vaddr = loadstore_ea (SD_, base, offset);
+  if ((vaddr & AccessLength_DOUBLEWORD) != 0)
+    {
+      SIM_CORE_SIGNAL (SD, STATE_CPU (SD, 0), cia, read_map,
+		       AccessLength_DOUBLEWORD + 1, vaddr, read_transfer,
+		       sim_core_unaligned_signal);
+    }
+  AddressTranslation (vaddr, isDATA, isLOAD, &paddr, &uncached, isTARGET,
+		      isREAL);
+  LoadMemory (&memval, NULL, uncached, AccessLength_WORD, paddr, vaddr,
+	      isDATA, isREAL);
+  v = (unsigned64)memval;
+  LoadMemory (&memval, NULL, uncached, AccessLength_WORD, paddr + 4, vaddr + 4,
+	      isDATA, isREAL);
+  return (bigendian ? ((v << 32) | memval) : (v | (memval << 32)));
+}
+
+
+// Helper:
+//
+// Store a double word FP value using 2 32-bit memory cycles a la MIPS II
+// or MIPS32.  do_load cannot be used instead because it returns an
+// unsigned_word, which is limited to the size of the machine's registers.
+//
+
+:function:::void:do_store_double:address_word base, address_word offset, unsigned64 v
+*mipsII:
+*mips32:
+{
+  int bigendian = (BigEndianCPU ? ! ReverseEndian : ReverseEndian);
+  address_word vaddr;
+  address_word paddr;
+  int uncached;
+  unsigned64 memval;
+
+  vaddr = loadstore_ea (SD_, base, offset);
+  if ((vaddr & AccessLength_DOUBLEWORD) != 0)
+    {
+      SIM_CORE_SIGNAL (SD, STATE_CPU(SD, 0), cia, read_map,
+		       AccessLength_DOUBLEWORD + 1, vaddr, write_transfer,
+		       sim_core_unaligned_signal);
+    }
+  AddressTranslation (vaddr, isDATA, isSTORE, &paddr, &uncached, isTARGET,
+		      isREAL);
+  memval = (bigendian ? (v >> 32) : (v & 0xFFFFFFFF));
+  StoreMemory (uncached, AccessLength_WORD, memval, 0, paddr, vaddr,
+	       isREAL);
+  memval = (bigendian ? (v & 0xFFFFFFFF) : (v >> 32));
+  StoreMemory (uncached, AccessLength_WORD, memval, 0, paddr + 4, vaddr + 4,
+	       isREAL);
+}
+
+
 010001,10,3.FMT,00000,5.FS,5.FD,000101:COP1:32,f::ABS.fmt
 "abs.%s<FMT> f<FD>, f<FS>"
 *mipsI:
@@ -3655,7 +3728,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,AbsoluteValue(ValueFPR(FS,fmt),fmt));
+  StoreFPR (FD, fmt, AbsoluteValue (ValueFPR (FS, fmt), fmt));
 }
 
 
@@ -3676,10 +3749,36 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Add(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+  StoreFPR (FD, fmt, Add (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
 }
 
 
+010011,5.RS,5.FT,5.FS,5.FD,011,110:COP1X:64,f::ALNV.PS
+"alnv.ps f<FD>, f<FS>, f<FT>, r<RS>"
+*mipsV:
+*mips64:
+{
+  unsigned64 fs;
+  unsigned64 ft;
+  unsigned64 fd;
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  fs = ValueFPR (FS, fmt_ps);
+  if ((GPR[RS] & 0x3) != 0)
+    Unpredictable ();
+  if ((GPR[RS] & 0x4) == 0)
+    fd = fs;
+  else
+    {
+      ft = ValueFPR (FT, fmt_ps);
+      if (BigEndianCPU)
+	fd = PackPS (PSLower (fs), PSUpper (ft));
+      else
+	fd = PackPS (PSLower (ft), PSUpper (fs));
+    }
+  StoreFPR (FD, fmt_ps, fd);
+}
+
 
 // BC1F
 // BC1FL
@@ -3739,45 +3838,6 @@
 }
 
 
-
-
-
-
-// C.EQ.S
-// C.EQ.D
-// ...
-
-:function:::void:do_c_cond_fmt:int fmt, int ft, int fs, int cc, int cond, instruction_word insn
-{
-  int less;
-  int equal;
-  int unordered;
-  int condition;
-  unsigned64 ofs = ValueFPR (fs, fmt);
-  unsigned64 oft = ValueFPR (ft, fmt);
-  if (NaN (ofs, fmt) || NaN (oft, fmt))
-    {
-      if (FCSR & FP_ENABLE (IO))
-	{
-	  FCSR |= FP_CAUSE (IO);
-	  SignalExceptionFPE ();
-	}
-      less = 0;
-      equal = 0;
-      unordered = 1;
-    }
-  else
-    {
-      less = Less (ofs, oft, fmt);
-      equal = Equal (ofs, oft, fmt);
-      unordered = 0;
-    }
-  condition = (((cond & (1 << 2)) && less)
-	       || ((cond & (1 << 1)) && equal)
-	       || ((cond & (1 << 0)) && unordered));
-  SETFCC (cc, condition);
-}
-
 010001,10,3.FMT,5.FT,5.FS,3.0,00,11,4.COND:COP1:32,f::C.cond.fmta
 "c.%s<COND>.%s<FMT> f<FS>, f<FT>"
 *mipsI:
@@ -3787,7 +3847,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  do_c_cond_fmt (SD_, fmt, FT, FS, 0, COND, instruction_0);
+  Compare (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt, COND, 0);
+  TRACE_ALU_RESULT (ValueFCR (31));
 }
 
 010001,10,3.FMT,5.FT,5.FS,3.CC,00,11,4.COND:COP1:32,f::C.cond.fmtb
@@ -3804,7 +3865,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  do_c_cond_fmt (SD_, fmt, FT, FS, CC, COND, instruction_0);
+  Compare (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt, COND, CC);
+  TRACE_ALU_RESULT (ValueFCR (31));
 }
 
 
@@ -3821,11 +3883,13 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_long,Convert(FP_RM_TOPINF,ValueFPR(FS,fmt),fmt,fmt_long));
+  StoreFPR (FD, fmt_long, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
+	    fmt_long));
 }
 
 
 010001,10,3.FMT,00000,5.FS,5.FD,001110:COP1:32,f::CEIL.W
+"ceil.w.%s<FMT> f<FD>, f<FS>"
 *mipsII:
 *mipsIII:
 *mipsIV:
@@ -3839,84 +3903,97 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_word,Convert(FP_RM_TOPINF,ValueFPR(FS,fmt),fmt,fmt_word));
+  StoreFPR (FD, fmt_word, Convert (FP_RM_TOPINF, ValueFPR (FS, fmt), fmt,
+	    fmt_word));
 }
 
 
-// CFC1
-// CTC1
-010001,00,X,10,5.RT,5.FS,00000000000:COP1Sa:32,f::CxC1
-"c%s<X>c1 r<RT>, f<FS>"
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1a
+"cfc1 r<RT>, f<FS>"
 *mipsI:
 *mipsII:
 *mipsIII:
 {
   check_fpu (SD_);
-  if (X)
-    {
-      if (FS == 0)
-	PENDING_FILL(FCR0IDX,VL4_8(GPR[RT]));
-      else if (FS == 31)
-	PENDING_FILL(FCR31IDX,VL4_8(GPR[RT]));
-      /* else NOP */
-      PENDING_SCHED(FCSR, FCR31 & (1<<23), 1, 23);
-    }
-  else
-    { /* control from */
-      if (FS == 0)
- 	PENDING_FILL(RT, EXTEND32 (FCR0));
-      else if (FS == 31)
- 	PENDING_FILL(RT, EXTEND32 (FCR31));
-      /* else NOP */
-    }
+  if (FS == 0)
+    PENDING_FILL (RT, EXTEND32 (FCR0));
+  else if (FS == 31)
+    PENDING_FILL (RT, EXTEND32 (FCR31));
+  /* else NOP */
 }
-010001,00,X,10,5.RT,5.FS,00000000000:COP1Sb:32,f::CxC1
-"c%s<X>c1 r<RT>, f<FS>"
+
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1b
+"cfc1 r<RT>, f<FS>"
 *mipsIV:
-*mipsV:
-*mips32:
-*mips64:
 *vr4100:
 *vr5000:
 *r3900:
 {
   check_fpu (SD_);
-  if (X)
+  if (FS == 0 || FS == 31)
     {
-      /* control to */
-      TRACE_ALU_INPUT1 (GPR[RT]);
-      if (FS == 0)
-	{
-	  FCR0 = VL4_8(GPR[RT]);
-	  TRACE_ALU_RESULT (FCR0);
-	}
-      else if (FS == 31)
-	{
-	  FCR31 = VL4_8(GPR[RT]);
-	  SETFCC(0,((FCR31 & (1 << 23)) ? 1 : 0));
-	  TRACE_ALU_RESULT (FCR31);
-	}
-      else
-	{
-	  TRACE_ALU_RESULT0 ();
-	}
-      /* else NOP */
+      unsigned_word  fcr = ValueFCR (FS);
+      TRACE_ALU_INPUT1 (fcr);
+      GPR[RT] = fcr;
     }
-  else
-    { /* control from */
-      if (FS == 0)
-	{
-	  TRACE_ALU_INPUT1 (FCR0);
-	  GPR[RT] = EXTEND32 (FCR0);
-	}
-      else if (FS == 31)
-	{
-	  TRACE_ALU_INPUT1 (FCR31);
-	  GPR[RT] = EXTEND32 (FCR31);
-	}
-      TRACE_ALU_RESULT (GPR[RT]);
-      /* else NOP */
+  /* else NOP */
+  TRACE_ALU_RESULT (GPR[RT]);
+}
+
+010001,00010,5.RT,5.FS,00000000000:COP1:32,f::CFC1c
+"cfc1 r<RT>, f<FS>"
+*mipsV:
+*mips32:
+*mips64:
+{
+  check_fpu (SD_);
+  if (FS == 0 || FS == 25 || FS == 26 || FS == 28 || FS == 31)
+    {
+      unsigned_word  fcr = ValueFCR (FS);
+      TRACE_ALU_INPUT1 (fcr);
+      GPR[RT] = fcr;
     }
+  /* else NOP */
+  TRACE_ALU_RESULT (GPR[RT]);
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1a
+"ctc1 r<RT>, f<FS>"
+*mipsI:
+*mipsII:
+*mipsIII:
+{
+  check_fpu (SD_);
+  if (FS == 31)
+    PENDING_FILL (FCRCS_REGNUM, VL4_8 (GPR[RT]));
+  /* else NOP */
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1b
+"ctc1 r<RT>, f<FS>"
+*mipsIV:
+*vr4100:
+*vr5000:
+*r3900:
+{
+  check_fpu (SD_);
+  TRACE_ALU_INPUT1 (GPR[RT]);
+  if (FS == 31)
+    StoreFCR (FS, GPR[RT]);
+  /* else NOP */
+}
+
+010001,00110,5.RT,5.FS,00000000000:COP1:32,f::CTC1c
+"ctc1 r<RT>, f<FS>"
+*mipsV:
+*mips32:
+*mips64:
+{
+  check_fpu (SD_);
+  TRACE_ALU_INPUT1 (GPR[RT]);
+  if (FS == 25 || FS == 26 || FS == 28 || FS == 31)
+      StoreFCR (FS, GPR[RT]);
+  /* else NOP */
 }
 
 
@@ -3938,12 +4015,10 @@
 {
   int fmt = FMT;
   check_fpu (SD_);
-  {
-    if ((fmt == fmt_double) | 0)
-      SignalException (ReservedInstruction, instruction_0);
-    else
-      StoreFPR(FD,fmt_double,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_double));
-  }
+  if ((fmt == fmt_double) | 0)
+    SignalException (ReservedInstruction, instruction_0);
+  StoreFPR (FD, fmt_double, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+	    fmt_double));
 }
 
 
@@ -3959,19 +4034,29 @@
 {
   int fmt = FMT;
   check_fpu (SD_);
-  {
-    if ((fmt == fmt_long) | ((fmt == fmt_long) || (fmt == fmt_word)))
-      SignalException (ReservedInstruction, instruction_0);
-    else
-      StoreFPR(FD,fmt_long,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_long));
-  }
+  if ((fmt == fmt_long) | ((fmt == fmt_long) || (fmt == fmt_word)))
+    SignalException (ReservedInstruction, instruction_0);
+  StoreFPR (FD, fmt_long, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+	    fmt_long));
+}
+
+
+010001,10,000,5.FT,5.FS,5.FD,100110:COP1:64,f::CVT.PS.S
+"cvt.ps.s f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_ps, PackPS (ValueFPR (FS, fmt_single),
+				ValueFPR (FT, fmt_single)));
 }
 
 
 //
 // FIXME: Does not correctly differentiate between mips*
 //
-010001,10,3.FMT,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
+010001,10,3.FMT!6,00000,5.FS,5.FD,100000:COP1:32,f::CVT.S.fmt
 "cvt.s.%s<FMT> f<FD>, f<FS>"
 *mipsI:
 *mipsII:
@@ -3986,16 +4071,36 @@
 {
   int fmt = FMT;
   check_fpu (SD_);
-  {
-    if ((fmt == fmt_single) | 0)
-      SignalException (ReservedInstruction, instruction_0);
-    else
-      StoreFPR(FD,fmt_single,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_single));
-  }
+  if ((fmt == fmt_single) | 0)
+    SignalException (ReservedInstruction, instruction_0);
+  StoreFPR (FD, fmt_single, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+	    fmt_single));
 }
 
 
-010001,10,3.FMT,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
+010001,10,110,00000,5.FS,5.FD,101000:COP1:64,f::CVT.S.PL
+"cvt.s.pl f<FD>, f<FS>"
+*mipsV:
+*mips64:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_single, PSLower (ValueFPR (FS, fmt_ps)));
+}
+
+
+010001,10,110,00000,5.FS,5.FD,100000:COP1:64,f::CVT.S.PU
+"cvt.s.pu f<FD>, f<FS>"
+*mipsV:
+*mips64:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_single, PSUpper (ValueFPR (FS, fmt_ps)));
+}
+
+
+010001,10,3.FMT!6,00000,5.FS,5.FD,100100:COP1:32,f::CVT.W.fmt
 "cvt.w.%s<FMT> f<FD>, f<FS>"
 *mipsI:
 *mipsII:
@@ -4010,12 +4115,10 @@
 {
   int fmt = FMT;
   check_fpu (SD_);
-  {
-    if ((fmt == fmt_word) | ((fmt == fmt_long) || (fmt == fmt_word)))
-      SignalException (ReservedInstruction, instruction_0);
-    else
-      StoreFPR(FD,fmt_word,Convert(GETRM(),ValueFPR(FS,fmt),fmt,fmt_word));
-  }
+  if ((fmt == fmt_word) | ((fmt == fmt_long) || (fmt == fmt_word)))
+    SignalException (ReservedInstruction, instruction_0);
+  StoreFPR (FD, fmt_word, Convert (GETRM (), ValueFPR (FS, fmt), fmt,
+	    fmt_word));
 }
 
 
@@ -4035,46 +4138,29 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Divide(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+  StoreFPR (FD, fmt, Divide (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
 }
 
 
-// DMFC1
-// DMTC1
-010001,00,X,01,5.RT,5.FS,00000000000:COP1Sa:64,f::DMxC1
-"dm%s<X>c1 r<RT>, f<FS>"
+010001,00001,5.RT,5.FS,00000000000:COP1:64,f::DMFC1a
+"dmfc1 r<RT>, f<FS>"
 *mipsIII:
 {
+  unsigned64 v;
   check_fpu (SD_);
   check_u64 (SD_, instruction_0);
-  if (X)
-    {
-      if (SizeFGR() == 64)
-	PENDING_FILL((FS + FGRIDX),GPR[RT]);
-      else if ((FS & 0x1) == 0)
-	{
-	  PENDING_FILL(((FS + 1) + FGRIDX),VH4_8(GPR[RT]));
-	  PENDING_FILL((FS + FGRIDX),VL4_8(GPR[RT]));
-	}
-    }
+  if (SizeFGR () == 64)
+    v = FGR[FS];
+  else if ((FS & 0x1) == 0)
+    v = SET64HI (FGR[FS+1]) | FGR[FS];
   else
-    {
-      if (SizeFGR() == 64)
-	PENDING_FILL(RT,FGR[FS]);
-      else if ((FS & 0x1) == 0)
-	PENDING_FILL(RT,(SET64HI(FGR[FS+1]) | FGR[FS]));
-      else
-	{
-	  if (STATE_VERBOSE_P(SD))
-	    sim_io_eprintf (SD,
-	      "Warning: PC 0x%lx: semantic_DMxC1_COP1Sa 32-bit use of odd FPR number\n",
-	      (long) CIA);
-	  PENDING_FILL(RT,SET64HI(0xDEADC0DE) | 0xBAD0BAD0);
-	}
-    }
+    v = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
+  PENDING_FILL (RT, v);
+  TRACE_ALU_RESULT (v);
 }
-010001,00,X,01,5.RT,5.FS,00000000000:COP1Sb:64,f::DMxC1
-"dm%s<X>c1 r<RT>, f<FS>"
+
+010001,00001,5.RT,5.FS,00000000000:COP1:64,f::DMFC1b
+"dmfc1 r<RT>, f<FS>"
 *mipsIV:
 *mipsV:
 *mips64:
@@ -4084,28 +4170,52 @@
 {
   check_fpu (SD_);
   check_u64 (SD_, instruction_0);
-  if (X)
+  if (SizeFGR () == 64)
+    GPR[RT] = FGR[FS];
+  else if ((FS & 0x1) == 0)
+    GPR[RT] = SET64HI (FGR[FS+1]) | FGR[FS];
+  else
+    GPR[RT] = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
+  TRACE_ALU_RESULT (GPR[RT]);
+}
+
+
+010001,00101,5.RT,5.FS,00000000000:COP1:64,f::DMTC1a
+"dmtc1 r<RT>, f<FS>"
+*mipsIII:
+{
+  unsigned64 v;
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  if (SizeFGR () == 64)
+    PENDING_FILL ((FS + FGR_BASE), GPR[RT]);
+  else if ((FS & 0x1) == 0)
     {
-      if (SizeFGR() == 64)
-	StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
-      else if ((FS & 0x1) == 0)
-	StoreFPR (FS, fmt_uninterpreted_64, SET64HI (FGR[FS+1]) | FGR[FS]);
+      PENDING_FILL (((FS + 1) + FGR_BASE), VH4_8 (GPR[RT]));
+      PENDING_FILL ((FS + FGR_BASE), VL4_8 (GPR[RT]));
     }
   else
-    {
-      if (SizeFGR() == 64)
-	GPR[RT] = FGR[FS];
-      else if ((FS & 0x1) == 0)
-	GPR[RT] = SET64HI (FGR[FS+1]) | FGR[FS];
-      else
-	{
-	  if (STATE_VERBOSE_P(SD))
-	    sim_io_eprintf (SD,
-	      "Warning: PC 0x%lx: DMxC1 32-bit use of odd FPR number\n",
-			    (long) CIA);
-	  GPR[RT] = SET64HI (0xDEADC0DE) | 0xBAD0BAD0;
-	}
-    }
+    Unpredictable ();
+  TRACE_FP_RESULT (GPR[RT]);
+}
+
+010001,00101,5.RT,5.FS,00000000000:COP1:64,f::DMTC1b
+"dmtc1 r<RT>, f<FS>"
+*mipsIV:
+*mipsV:
+*mips64:
+*vr4100:
+*vr5000:
+*r3900:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  if (SizeFGR () == 64)
+    StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
+  else if ((FS & 0x1) == 0)
+    StoreFPR (FS, fmt_uninterpreted_64, GPR[RT]);
+  else
+    Unpredictable ();
 }
 
 
@@ -4122,7 +4232,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_long,Convert(FP_RM_TOMINF,ValueFPR(FS,fmt),fmt,fmt_long));
+  StoreFPR (FD, fmt_long, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
+	    fmt_long));
 }
 
 
@@ -4141,17 +4252,26 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_word,Convert(FP_RM_TOMINF,ValueFPR(FS,fmt),fmt,fmt_word));
+  StoreFPR (FD, fmt_word, Convert (FP_RM_TOMINF, ValueFPR (FS, fmt), fmt,
+	    fmt_word));
 }
 
 
-110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1
+110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1a
 "ldc1 f<FT>, <OFFSET>(r<BASE>)"
 *mipsII:
+*mips32:
+{
+  check_fpu (SD_);
+  COP_LD (1, FT, do_load_double (SD_, GPR[BASE], EXTEND16 (OFFSET)));
+}
+
+
+110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1b
+"ldc1 f<FT>, <OFFSET>(r<BASE>)"
 *mipsIII:
 *mipsIV:
 *mipsV:
-*mips32:
 *mips64:
 *vr4100:
 *vr5000:
@@ -4208,64 +4328,37 @@
 
 
 
-//
-// FIXME: Not correct for mips*
-//
-010011,5.FR,5.FT,5.FS,5.FD,100,001:COP1X:32,f::MADD.D
-"madd.d f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,100,3.FMT:COP1X:64,f::MADD.fmt
+"madd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
 *mipsIV:
 *mipsV:
 *mips64:
 *vr5000:
 {
+  int fmt = FMT;
   check_fpu (SD_);
-  {
-    StoreFPR(FD,fmt_double,Add(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double));
-  }
+  check_u64 (SD_, instruction_0);
+  check_fmt_p (SD_, fmt, instruction_0); 
+  StoreFPR (FD, fmt, MultiplyAdd (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+				  ValueFPR (FR, fmt), fmt));
 }
 
 
-010011,5.FR,5.FT,5.FS,5.FD,100,000:COP1X:32,f::MADD.S
-"madd.s f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
-*mipsV:
-*mips64:
-*vr5000:
-{
-  check_fpu (SD_);
-  {
-    StoreFPR(FD,fmt_single,Add(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single));
-  }
-}
-
-
-// MFC1
-// MTC1
-010001,00,X,00,5.RT,5.FS,00000000000:COP1Sa:32,f::MxC1
-"m%s<X>c1 r<RT>, f<FS>"
+010001,00000,5.RT,5.FS,00000000000:COP1:32,f::MFC1a
+"mfc1 r<RT>, f<FS>"
 *mipsI:
 *mipsII:
 *mipsIII:
 {
+  unsigned64 v;
   check_fpu (SD_);
-  if (X)
-    { /*MTC1*/
-      if (SizeFGR() == 64)
-	{
-	  if (STATE_VERBOSE_P(SD))
-	    sim_io_eprintf (SD,
-			    "Warning:  PC 0x%lx: MTC1 not DMTC1 with 64 bit regs\n",
-			    (long) CIA);
-	  PENDING_FILL ((FS + FGRIDX), (SET64HI(0xDEADC0DE) | VL4_8(GPR[RT])));
-	}
-      else
-	PENDING_FILL ((FS + FGRIDX), VL4_8(GPR[RT]));
-    }
-  else /*MFC1*/
-    PENDING_FILL (RT, EXTEND32 (FGR[FS]));
+  v = EXTEND32 (FGR[FS]);
+  PENDING_FILL (RT, v);
+  TRACE_ALU_RESULT (v);
 }
-010001,00,X,00,5.RT,5.FS,00000000000:COP1Sb:32,f::MxC1
-"m%s<X>c1 r<RT>, f<FS>"
+  
+010001,00000,5.RT,5.FS,00000000000:COP1:32,f::MFC1b
+"mfc1 r<RT>, f<FS>"
 *mipsIV:
 *mipsV:
 *mips32:
@@ -4273,14 +4366,10 @@
 *vr4100:
 *vr5000:
 *r3900:
-{
-  int fs = FS;
+{ 
   check_fpu (SD_);
-  if (X)
-    /*MTC1*/
-    StoreFPR (FS, fmt_uninterpreted_32, VL4_8 (GPR[RT]));
-  else /*MFC1*/
-    GPR[RT] = EXTEND32 (FGR[FS]);
+  GPR[RT] = EXTEND32 (FGR[FS]);
+  TRACE_ALU_RESULT (GPR[RT]);
 }
 
 
@@ -4300,7 +4389,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,ValueFPR(FS,fmt));
+  StoreFPR (FD, fmt, ValueFPR (FS, fmt));
 }
 
 
@@ -4332,12 +4421,22 @@
 {
   int fmt = FMT;
   check_fpu (SD_);
-  {
-   if (GETFCC(CC) == TF)
-     StoreFPR (FD, fmt, ValueFPR (FS, fmt));
-   else
-     StoreFPR (FD, fmt, ValueFPR (FD, fmt));
-  }
+  if (fmt != fmt_ps)
+    {
+      if (GETFCC(CC) == TF)
+	StoreFPR (FD, fmt, ValueFPR (FS, fmt));
+      else
+	StoreFPR (FD, fmt, ValueFPR (FD, fmt));   /* set fmt */
+    }
+  else
+    {
+      unsigned64 fd;
+      fd = PackPS (PSUpper (ValueFPR ((GETFCC (CC+1) == TF) ? FS : FD,
+				      fmt_ps)),
+		   PSLower (ValueFPR ((GETFCC (CC+0) == TF) ? FS : FD,
+				      fmt_ps)));
+      StoreFPR (FD, fmt_ps, fd);
+    }
 }
 
 
@@ -4380,35 +4479,51 @@
 }
 
 
-// MSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,101,001:COP1X:32,f::MSUB.D
-"msub.d f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,101,3.FMT:COP1X:64,f::MSUB.fmt
+"msub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
 *mipsIV:
 *mipsV:
 *mips64:
 *vr5000:
 {
+  int fmt = FMT;
   check_fpu (SD_);
-  StoreFPR(FD,fmt_double,Sub(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double));
+  check_u64 (SD_, instruction_0);
+  check_fmt_p (SD_, fmt, instruction_0);
+  StoreFPR (FD, fmt, MultiplySub (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+				  ValueFPR (FR, fmt), fmt));
 }
 
 
-// MSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,101000:COP1X:32,f::MSUB.S
-"msub.s f<FD>, f<FR>, f<FS>, f<FT>"
+010001,00100,5.RT,5.FS,00000000000:COP1:32,f::MTC1a
+"mtc1 r<RT>, f<FS>"
+*mipsI:
+*mipsII:
+*mipsIII:
+{ 
+  check_fpu (SD_);
+  if (SizeFGR () == 64)
+    PENDING_FILL ((FS + FGR_BASE), (SET64HI (0xDEADC0DE) | VL4_8 (GPR[RT])));
+  else
+    PENDING_FILL ((FS + FGR_BASE), VL4_8 (GPR[RT]));
+  TRACE_FP_RESULT (GPR[RT]);
+} 
+
+010001,00100,5.RT,5.FS,00000000000:COP1:32,f::MTC1b
+"mtc1 r<RT>, f<FS>"
 *mipsIV:
 *mipsV:
+*mips32:
 *mips64:
+*vr4100:
 *vr5000:
+*r3900:
 {
-  check_fpu (SD_);
-  StoreFPR(FD,fmt_single,Sub(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single));
+  check_fpu (SD_); 
+  StoreFPR (FS, fmt_uninterpreted_32, VL4_8 (GPR[RT]));
 }
 
 
-// MTC1 see MxC1
-
-
 010001,10,3.FMT,5.FT,5.FS,5.FD,000010:COP1:32,f::MUL.fmt
 "mul.%s<FMT> f<FD>, f<FS>, f<FT>"
 *mipsI:
@@ -4425,7 +4540,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Multiply(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+  StoreFPR (FD, fmt, Multiply (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
 }
 
 
@@ -4445,59 +4560,63 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Negate(ValueFPR(FS,fmt),fmt));
+  StoreFPR (FD, fmt, Negate (ValueFPR (FS, fmt), fmt));
 }
 
 
-// NMADD.fmt
-010011,5.FR,5.FT,5.FS,5.FD,110001:COP1X:32,f::NMADD.D
-"nmadd.d f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,110,3.FMT:COP1X:64,f::NMADD.fmt
+"nmadd.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
 *mipsIV:
 *mipsV:
 *mips64:
 *vr5000:
 {
+  int fmt = FMT;
   check_fpu (SD_);
-  StoreFPR(FD,fmt_double,Negate(Add(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double),fmt_double));
+  check_u64 (SD_, instruction_0);
+  check_fmt_p (SD_, fmt, instruction_0);
+  StoreFPR (FD, fmt, NegMultiplyAdd (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+				     ValueFPR (FR, fmt), fmt));
 }
 
 
-// NMADD.fmt
-010011,5.FR,5.FT,5.FS,5.FD,110000:COP1X:32,f::NMADD.S
-"nmadd.s f<FD>, f<FR>, f<FS>, f<FT>"
+010011,5.FR,5.FT,5.FS,5.FD,111,3.FMT:COP1X:64,f::NMSUB.fmt
+"nmsub.%s<FMT> f<FD>, f<FR>, f<FS>, f<FT>"
 *mipsIV:
 *mipsV:
 *mips64:
 *vr5000:
 {
+  int fmt = FMT;
   check_fpu (SD_);
-  StoreFPR(FD,fmt_single,Negate(Add(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single),fmt_single));
+  check_u64 (SD_, instruction_0);
+  check_fmt_p (SD_, fmt, instruction_0);
+  StoreFPR (FD, fmt, NegMultiplySub (ValueFPR (FS, fmt), ValueFPR (FT, fmt),
+				     ValueFPR (FR, fmt), fmt));
 }
 
 
-// NMSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,111001:COP1X:32,f::NMSUB.D
-"nmsub.d f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
+010001,10,110,5.FT,5.FS,5.FD,101100:COP1:64,f::PLL.PS
+"pll.ps f<FD>, f<FS>, f<FT>"
 *mipsV:
 *mips64:
-*vr5000:
 {
   check_fpu (SD_);
-  StoreFPR(FD,fmt_double,Negate(Sub(Multiply(ValueFPR(FS,fmt_double),ValueFPR(FT,fmt_double),fmt_double),ValueFPR(FR,fmt_double),fmt_double),fmt_double));
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_ps, PackPS (PSLower (ValueFPR (FS, fmt_ps)),
+				PSLower (ValueFPR (FT, fmt_ps))));
 }
 
 
-// NMSUB.fmt
-010011,5.FR,5.FT,5.FS,5.FD,111000:COP1X:32,f::NMSUB.S
-"nmsub.s f<FD>, f<FR>, f<FS>, f<FT>"
-*mipsIV:
+010001,10,110,5.FT,5.FS,5.FD,101101:COP1:64,f::PLU.PS
+"plu.ps f<FD>, f<FS>, f<FT>"
 *mipsV:
 *mips64:
-*vr5000:
 {
   check_fpu (SD_);
-  StoreFPR(FD,fmt_single,Negate(Sub(Multiply(ValueFPR(FS,fmt_single),ValueFPR(FT,fmt_single),fmt_single),ValueFPR(FR,fmt_single),fmt_single),fmt_single));
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_ps, PackPS (PSLower (ValueFPR (FS, fmt_ps)),
+				PSUpper (ValueFPR (FT, fmt_ps))));
 }
 
 
@@ -4519,6 +4638,31 @@
   }
 }
 
+
+010001,10,110,5.FT,5.FS,5.FD,101110:COP1:64,f::PUL.PS
+"pul.ps f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_ps, PackPS (PSUpper (ValueFPR (FS, fmt_ps)),
+				PSLower (ValueFPR (FT, fmt_ps))));
+}
+
+
+010001,10,110,5.FT,5.FS,5.FD,101111:COP1:64,f::PUU.PS
+"puu.ps f<FD>, f<FS>, f<FT>"
+*mipsV:
+*mips64:
+{
+  check_fpu (SD_);
+  check_u64 (SD_, instruction_0);
+  StoreFPR (FD, fmt_ps, PackPS (PSUpper (ValueFPR (FS, fmt_ps)),
+				PSUpper (ValueFPR (FT, fmt_ps))));
+}
+
+
 010001,10,3.FMT,00000,5.FS,5.FD,010101:COP1:32,f::RECIP.fmt
 "recip.%s<FMT> f<FD>, f<FS>"
 *mipsIV:
@@ -4529,7 +4673,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Recip(ValueFPR(FS,fmt),fmt));
+  StoreFPR (FD, fmt, Recip (ValueFPR (FS, fmt), fmt));
 }
 
 
@@ -4546,7 +4690,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_long,Convert(FP_RM_NEAREST,ValueFPR(FS,fmt),fmt,fmt_long));
+  StoreFPR (FD, fmt_long, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
+	    fmt_long));
 }
 
 
@@ -4565,31 +4710,40 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_word,Convert(FP_RM_NEAREST,ValueFPR(FS,fmt),fmt,fmt_word));
+  StoreFPR (FD, fmt_word, Convert (FP_RM_NEAREST, ValueFPR (FS, fmt), fmt,
+	    fmt_word));
 }
 
 
 010001,10,3.FMT,00000,5.FS,5.FD,010110:COP1:32,f::RSQRT.fmt
+"rsqrt.%s<FMT> f<FD>, f<FS>"
 *mipsIV:
 *mipsV:
 *mips64:
-"rsqrt.%s<FMT> f<FD>, f<FS>"
 *vr5000:
 {
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Recip(SquareRoot(ValueFPR(FS,fmt),fmt),fmt));
+  StoreFPR (FD, fmt, RSquareRoot (ValueFPR (FS, fmt), fmt));
 }
 
 
-111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1
+111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1a
 "sdc1 f<FT>, <OFFSET>(r<BASE>)"
 *mipsII:
+*mips32:
+{
+  check_fpu (SD_);
+  do_store_double (SD_, GPR[BASE], EXTEND16 (OFFSET), COP_SD (1, FT));
+}
+
+
+111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1b
+"sdc1 f<FT>, <OFFSET>(r<BASE>)"
 *mipsIII:
 *mipsIV:
 *mipsV:
-*mips32:
 *mips64:
 *vr4100:
 *vr5000:
@@ -4628,7 +4782,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,(SquareRoot(ValueFPR(FS,fmt),fmt)));
+  StoreFPR (FD, fmt,  (SquareRoot (ValueFPR (FS, fmt), fmt)));
 }
 
 
@@ -4648,7 +4802,7 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt_p (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt,Sub(ValueFPR(FS,fmt),ValueFPR(FT,fmt),fmt));
+  StoreFPR (FD, fmt, Sub (ValueFPR (FS, fmt), ValueFPR (FT, fmt), fmt));
 }
 
 
@@ -4750,7 +4904,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_long,Convert(FP_RM_TOZERO,ValueFPR(FS,fmt),fmt,fmt_long));
+  StoreFPR (FD, fmt_long, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
+	    fmt_long));
 }
 
 
@@ -4769,7 +4924,8 @@
   int fmt = FMT;
   check_fpu (SD_);
   check_fmt (SD_, fmt, instruction_0);
-  StoreFPR(FD,fmt_word,Convert(FP_RM_TOZERO,ValueFPR(FS,fmt),fmt,fmt_word));
+  StoreFPR (FD, fmt_word, Convert (FP_RM_TOZERO, ValueFPR (FS, fmt), fmt,
+	    fmt_word));
 }
 
 
@@ -5054,6 +5210,9 @@
 
 
 :include:::m16.igen
+:include:::mdmx.igen
+:include:::mips3d.igen
+:include:::sb1.igen
 :include:::tx.igen
 :include:::vr.igen
 
diff --git a/sim/mips/sim-main.c b/sim/mips/sim-main.c
index 7b3e6c6..edee498 100644
--- a/sim/mips/sim-main.c
+++ b/sim/mips/sim-main.c
@@ -163,35 +163,35 @@
 
   switch (AccessLength)
     {
-    case AccessLength_QUADWORD :
+    case AccessLength_QUADWORD:
       {
 	unsigned_16 val = sim_core_read_aligned_16 (CPU, cia, read_map, pAddr);
 	value1 = VH8_16 (val);
 	value = VL8_16 (val);
 	break;
       }
-    case AccessLength_DOUBLEWORD :
+    case AccessLength_DOUBLEWORD:
       value = sim_core_read_aligned_8 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_SEPTIBYTE :
+    case AccessLength_SEPTIBYTE:
       value = sim_core_read_misaligned_7 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_SEXTIBYTE :
+    case AccessLength_SEXTIBYTE:
       value = sim_core_read_misaligned_6 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_QUINTIBYTE :
+    case AccessLength_QUINTIBYTE:
       value = sim_core_read_misaligned_5 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_WORD :
+    case AccessLength_WORD:
       value = sim_core_read_aligned_4 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_TRIPLEBYTE :
+    case AccessLength_TRIPLEBYTE:
       value = sim_core_read_misaligned_3 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_HALFWORD :
+    case AccessLength_HALFWORD:
       value = sim_core_read_aligned_2 (CPU, cia, read_map, pAddr);
       break;
-    case AccessLength_BYTE :
+    case AccessLength_BYTE:
       value = sim_core_read_aligned_1 (CPU, cia, read_map, pAddr);
       break;
     default:
@@ -292,34 +292,34 @@
   
   switch (AccessLength)
     {
-    case AccessLength_QUADWORD :
+    case AccessLength_QUADWORD:
       {
 	unsigned_16 val = U16_8 (MemElem1, MemElem);
 	sim_core_write_aligned_16 (CPU, cia, write_map, pAddr, val);
 	break;
       }
-    case AccessLength_DOUBLEWORD :
+    case AccessLength_DOUBLEWORD:
       sim_core_write_aligned_8 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_SEPTIBYTE :
+    case AccessLength_SEPTIBYTE:
       sim_core_write_misaligned_7 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_SEXTIBYTE :
+    case AccessLength_SEXTIBYTE:
       sim_core_write_misaligned_6 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_QUINTIBYTE :
+    case AccessLength_QUINTIBYTE:
       sim_core_write_misaligned_5 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_WORD :
+    case AccessLength_WORD:
       sim_core_write_aligned_4 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_TRIPLEBYTE :
+    case AccessLength_TRIPLEBYTE:
       sim_core_write_misaligned_3 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_HALFWORD :
+    case AccessLength_HALFWORD:
       sim_core_write_aligned_2 (CPU, cia, write_map, pAddr, MemElem);
       break;
-    case AccessLength_BYTE :
+    case AccessLength_BYTE:
       sim_core_write_aligned_1 (CPU, cia, write_map, pAddr, MemElem);
       break;
     default:
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index bcdcd80..fed625e 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -64,6 +64,7 @@
 /* Floating-point operations: */
 
 #include "sim-fpu.h"
+#include "cp1.h"
 
 /* FPU registers must be one of the following types. All other values
    are reserved (and undefined). */
@@ -72,6 +73,7 @@
  fmt_double  = 1,
  fmt_word    = 4,
  fmt_long    = 5,
+ fmt_ps      = 6,
  /* The following are well outside the normal acceptable format
     range, and are used in the register status vector. */
  fmt_unknown       = 0x10000000,
@@ -80,40 +82,9 @@
  fmt_uninterpreted_64 = 0x80000000U,
 } FP_formats;
 
-unsigned64 value_fpr PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int fpr, FP_formats));
-#define ValueFPR(FPR,FMT) value_fpr (SD, CPU, cia, (FPR), (FMT))
-
-void store_fpr PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int fpr, FP_formats fmt, unsigned64 value));
-#define StoreFPR(FPR,FMT,VALUE) store_fpr (SD, CPU, cia, (FPR), (FMT), (VALUE))
-
-int NaN PARAMS ((unsigned64 op, FP_formats fmt));
-int Infinity PARAMS ((unsigned64 op, FP_formats fmt));
-int Less PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-int Equal PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 AbsoluteValue PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Negate PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Add PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Sub PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Multiply PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Divide PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Recip PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 SquareRoot PARAMS ((unsigned64 op, FP_formats fmt));
-unsigned64 Max PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 Min PARAMS ((unsigned64 op1, unsigned64 op2, FP_formats fmt));
-unsigned64 convert PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int rm, unsigned64 op, FP_formats from, FP_formats to));
-#define Convert(rm,op,from,to) \
-convert (SD, CPU, cia, rm, op, from, to)
-
-/* Macro to update FPSR condition-code field. This is complicated by
-   the fact that there is a hole in the index range of the bits within
-   the FCSR register. Also, the number of bits visible depends on the
-   MIPS ISA version being supported. */
-
-#define SETFCC(cc,v) {\
-  int bit = ((cc == 0) ? 23 : (24 + (cc)));\
-  FCSR = ((FCSR & ~(1 << bit)) | ((v) << bit));\
-}
-#define GETFCC(cc) (((((cc) == 0) ? (FCSR & (1 << 23)) : (FCSR & (1 << (24 + (cc))))) != 0) ? 1U : 0)
+/* For paired word (pw) operations, the opcode representation is fmt_word,
+   but register transfers (StoreFPR, ValueFPR, etc.) are done as fmt_long.  */
+#define fmt_pw fmt_long
 
 /* This should be the COC1 value at the start of the preceding
    instruction: */
@@ -128,36 +99,6 @@
 #define SizeFGR() (WITH_TARGET_FLOATING_POINT_BITSIZE)
 #endif
 
-/* Standard FCRS bits: */
-#define IR (0) /* Inexact Result */
-#define UF (1) /* UnderFlow */
-#define OF (2) /* OverFlow */
-#define DZ (3) /* Division by Zero */
-#define IO (4) /* Invalid Operation */
-#define UO (5) /* Unimplemented Operation */
-
-/* Get masks for individual flags: */
-#if 1 /* SAFE version */
-#define FP_FLAGS(b)  (((unsigned)(b) < 5) ? (1 << ((b) + 2)) : 0)
-#define FP_ENABLE(b) (((unsigned)(b) < 5) ? (1 << ((b) + 7)) : 0)
-#define FP_CAUSE(b)  (((unsigned)(b) < 6) ? (1 << ((b) + 12)) : 0)
-#else
-#define FP_FLAGS(b)  (1 << ((b) + 2))
-#define FP_ENABLE(b) (1 << ((b) + 7))
-#define FP_CAUSE(b)  (1 << ((b) + 12))
-#endif
-
-#define FP_FS         (1 << 24) /* MIPS III onwards : Flush to Zero */
-
-#define FP_MASK_RM    (0x3)
-#define FP_SH_RM      (0)
-#define FP_RM_NEAREST (0) /* Round to nearest        (Round) */
-#define FP_RM_TOZERO  (1) /* Round to zero           (Trunc) */
-#define FP_RM_TOPINF  (2) /* Round to Plus infinity  (Ceil) */
-#define FP_RM_TOMINF  (3) /* Round to Minus infinity (Floor) */
-#define GETRM()       (int)((FCSR >> FP_SH_RM) & FP_MASK_RM)
-
-
 
 
 
@@ -278,10 +219,10 @@
 /* For backward compatibility */
 #define PENDING_FILL(R,VAL) 						\
 do {									\
-  if ((R) >= FGRIDX && (R) < FGRIDX + NR_FGR)				\
+  if ((R) >= FGR_BASE && (R) < FGR_BASE + NR_FGR)			\
     {									\
-      PENDING_SCHED(FGR[(R) - FGRIDX], VAL, 1, -1);			\
-      PENDING_SCHED(FPR_STATE[(R) - FGRIDX], fmt_uninterpreted, 1, -1);	\
+      PENDING_SCHED(FGR[(R) - FGR_BASE], VAL, 1, -1);			\
+      PENDING_SCHED(FPR_STATE[(R) - FGR_BASE], fmt_uninterpreted, 1, -1); \
     }									\
   else									\
     PENDING_SCHED(GPR[(R)], VAL, 1, -1);				\
@@ -296,6 +237,24 @@
   };
 
 
+/* The internal representation of an MDMX accumulator. 
+   Note that 24 and 48 bit accumulator elements are represented in
+   32 or 64 bits.  Since the accumulators are 2's complement with
+   overflow suppressed, high-order bits can be ignored in most contexts.  */
+
+typedef signed32 signed24;
+typedef signed64 signed48;
+
+typedef union { 
+  signed24  ob[8];
+  signed48  qh[4]; 
+} MDMX_accumulator;
+
+
+/* Conventional system arguments.  */ 
+#define SIM_STATE  sim_cpu *cpu, address_word cia
+#define SIM_ARGS   CPU, cia
+
 struct _sim_cpu {
 
 
@@ -356,7 +315,9 @@
 #define LAST_EMBED_REGNUM (89)
 #define NUM_REGS (LAST_EMBED_REGNUM + 1)
 
-
+#define FP0_REGNUM 38           /* Floating point register 0 (single float) */
+#define FCRCS_REGNUM 70         /* FP control/status */
+#define FCRIR_REGNUM 71         /* FP implementation/revision */
 #endif
 
 
@@ -372,15 +333,6 @@
 #define GPR     (&REGISTERS[0])
 #define GPR_SET(N,VAL) (REGISTERS[(N)] = (VAL))
 
-  /* While space is allocated for the floating point registers in the
-     main registers array, they are stored separatly.  This is because
-     their size may not necessarily match the size of either the
-     general-purpose or system specific registers */
-#define NR_FGR  (32)
-#define FGRIDX  (38)
-  fp_word fgr[NR_FGR];
-#define FGR     ((CPU)->fgr)
-
 #define LO      (REGISTERS[33])
 #define HI      (REGISTERS[34])
 #define PCIDX	37
@@ -433,12 +385,25 @@
 #define COP0_GPR	((CPU)->cop0_gpr)
 #define COP0_BADVADDR ((unsigned32)(COP0_GPR[8]))
 
+  /* While space is allocated for the floating point registers in the
+     main registers array, they are stored separatly.  This is because
+     their size may not necessarily match the size of either the
+     general-purpose or system specific registers.  */
+#define NR_FGR    (32)
+#define FGR_BASE  FP0_REGNUM
+  fp_word fgr[NR_FGR];
+#define FGR       ((CPU)->fgr)
+
   /* Keep the current format state for each register: */
   FP_formats fpr_state[32];
 #define FPR_STATE ((CPU)->fpr_state)
 
   pending_write_queue pending;
 
+  /* The MDMX accumulator (used only for MDMX ASE).  */
+  MDMX_accumulator acc; 
+#define ACC             ((CPU)->acc)
+
   /* LLBIT = Load-Linked bit. A bit of "virtual" state used by atomic
      read-write instructions. It is set when a linked load occurs. It
      is tested and cleared by the conditional store. It is cleared
@@ -545,6 +510,8 @@
 #define status_CU1       (1 << 29)      /* Coprocessor 1 usable */
 #define status_CU2       (1 << 30)      /* Coprocessor 2 usable */
 #define status_CU3       (1 << 31)      /* Coprocessor 3 usable */
+/* Bits reserved for implementations:  */
+#define status_SBX       (1 << 16)      /* Enable SiByte SB-1 extensions.  */
 
 #define cause_BD ((unsigned)1 << 31)    /* L1 Exception in branch delay slot */
 #define cause_BD2         (1 << 30)     /* L2 Exception in branch delay slot */
@@ -707,6 +674,191 @@
 int sim_monitor (SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int arg);
   
 
+/* FPR access.  */
+unsigned64 value_fpr (SIM_STATE, int fpr, FP_formats);
+#define ValueFPR(FPR,FMT) value_fpr (SIM_ARGS, (FPR), (FMT))
+void store_fpr (SIM_STATE, int fpr, FP_formats fmt, unsigned64 value);
+#define StoreFPR(FPR,FMT,VALUE) store_fpr (SIM_ARGS, (FPR), (FMT), (VALUE))
+unsigned64 ps_lower (SIM_STATE, unsigned64 op);
+#define PSLower(op) ps_lower (SIM_ARGS, op)
+unsigned64 ps_upper (SIM_STATE, unsigned64 op);
+#define PSUpper(op) ps_upper (SIM_ARGS, op)
+unsigned64 pack_ps (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats from);
+#define PackPS(op1,op2) pack_ps (SIM_ARGS, op1, op2, fmt_single)
+
+
+/* FCR access.  */
+unsigned_word value_fcr (SIM_STATE, int fcr);
+#define ValueFCR(FCR) value_fcr (SIM_ARGS, (FCR))
+void store_fcr (SIM_STATE, int fcr, unsigned_word value);
+#define StoreFCR(FCR,VALUE) store_fcr (SIM_ARGS, (FCR), (VALUE))
+void test_fcsr (SIM_STATE);
+#define TestFCSR() test_fcsr (SIM_ARGS)
+
+
+/* FPU operations.  */
+void fp_cmp (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt, int abs, int cond, int cc);
+#define Compare(op1,op2,fmt,cond,cc) fp_cmp(SIM_ARGS, op1, op2, fmt, 0, cond, cc)
+unsigned64 fp_abs (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define AbsoluteValue(op,fmt) fp_abs(SIM_ARGS, op, fmt)
+unsigned64 fp_neg (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Negate(op,fmt) fp_neg(SIM_ARGS, op, fmt)
+unsigned64 fp_add (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Add(op1,op2,fmt) fp_add(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_sub (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Sub(op1,op2,fmt) fp_sub(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_mul (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Multiply(op1,op2,fmt) fp_mul(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_div (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Divide(op1,op2,fmt) fp_div(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_recip (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Recip(op,fmt) fp_recip(SIM_ARGS, op, fmt)
+unsigned64 fp_sqrt (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define SquareRoot(op,fmt) fp_sqrt(SIM_ARGS, op, fmt)
+unsigned64 fp_rsqrt (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define RSquareRoot(op,fmt) fp_rsqrt(SIM_ARGS, op, fmt)
+unsigned64 fp_madd (SIM_STATE, unsigned64 op1, unsigned64 op2,
+		    unsigned64 op3, FP_formats fmt);
+#define MultiplyAdd(op1,op2,op3,fmt) fp_madd(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_msub (SIM_STATE, unsigned64 op1, unsigned64 op2,
+		    unsigned64 op3, FP_formats fmt);
+#define MultiplySub(op1,op2,op3,fmt) fp_msub(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_nmadd (SIM_STATE, unsigned64 op1, unsigned64 op2,
+		     unsigned64 op3, FP_formats fmt);
+#define NegMultiplyAdd(op1,op2,op3,fmt) fp_nmadd(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 fp_nmsub (SIM_STATE, unsigned64 op1, unsigned64 op2,
+		     unsigned64 op3, FP_formats fmt);
+#define NegMultiplySub(op1,op2,op3,fmt) fp_nmsub(SIM_ARGS, op1, op2, op3, fmt)
+unsigned64 convert (SIM_STATE, int rm, unsigned64 op, FP_formats from, FP_formats to);
+#define Convert(rm,op,from,to) convert (SIM_ARGS, rm, op, from, to)
+unsigned64 convert_ps (SIM_STATE, int rm, unsigned64 op, FP_formats from,
+		       FP_formats to);
+#define ConvertPS(rm,op,from,to) convert_ps (SIM_ARGS, rm, op, from, to)
+
+
+/* MIPS-3D ASE operations.  */
+#define CompareAbs(op1,op2,fmt,cond,cc) \
+fp_cmp(SIM_ARGS, op1, op2, fmt, 1, cond, cc)
+unsigned64 fp_add_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define AddR(op1,op2,fmt) fp_add_r(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_mul_r (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define MultiplyR(op1,op2,fmt) fp_mul_r(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_recip1 (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define Recip1(op,fmt) fp_recip1(SIM_ARGS, op, fmt)
+unsigned64 fp_recip2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define Recip2(op1,op2,fmt) fp_recip2(SIM_ARGS, op1, op2, fmt)
+unsigned64 fp_rsqrt1 (SIM_STATE, unsigned64 op, FP_formats fmt);
+#define RSquareRoot1(op,fmt) fp_rsqrt1(SIM_ARGS, op, fmt)
+unsigned64 fp_rsqrt2 (SIM_STATE, unsigned64 op1, unsigned64 op2, FP_formats fmt);
+#define RSquareRoot2(op1,op2,fmt) fp_rsqrt2(SIM_ARGS, op1, op2, fmt)
+
+
+/* MDMX access.  */
+
+typedef unsigned int MX_fmtsel;   /* MDMX format select field (5 bits).  */
+#define ob_fmtsel(sel) (((sel)<<1)|0x0)
+#define qh_fmtsel(sel) (((sel)<<2)|0x1)
+
+#define fmt_mdmx fmt_uninterpreted
+
+#define MX_VECT_AND  (0)
+#define MX_VECT_NOR  (1)
+#define MX_VECT_OR   (2)
+#define MX_VECT_XOR  (3)
+#define MX_VECT_SLL  (4)
+#define MX_VECT_SRL  (5)
+#define MX_VECT_ADD  (6)
+#define MX_VECT_SUB  (7)
+#define MX_VECT_MIN  (8)
+#define MX_VECT_MAX  (9)
+#define MX_VECT_MUL  (10)
+#define MX_VECT_MSGN (11)
+#define MX_VECT_SRA  (12)
+#define MX_VECT_ABSD (13)		/* SB-1 only.  */
+#define MX_VECT_AVG  (14)		/* SB-1 only.  */
+
+unsigned64 mdmx_cpr_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Add(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ADD, op1, vt, fmtsel)
+#define MX_And(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AND, op1, vt, fmtsel)
+#define MX_Max(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MAX, op1, vt, fmtsel)
+#define MX_Min(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MIN, op1, vt, fmtsel)
+#define MX_Msgn(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MSGN, op1, vt, fmtsel)
+#define MX_Mul(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_MUL, op1, vt, fmtsel)
+#define MX_Nor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_NOR, op1, vt, fmtsel)
+#define MX_Or(op1,vt,fmtsel)  mdmx_cpr_op(SIM_ARGS, MX_VECT_OR,  op1, vt, fmtsel)
+#define MX_ShiftLeftLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SLL, op1, vt, fmtsel)
+#define MX_ShiftRightArith(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRA, op1, vt, fmtsel)
+#define MX_ShiftRightLogical(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SRL, op1, vt, fmtsel)
+#define MX_Sub(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_SUB, op1, vt, fmtsel)
+#define MX_Xor(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_XOR, op1, vt, fmtsel)
+#define MX_AbsDiff(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_ABSD, op1, vt, fmtsel)
+#define MX_Avg(op1,vt,fmtsel) mdmx_cpr_op(SIM_ARGS, MX_VECT_AVG, op1, vt, fmtsel)
+
+#define MX_C_EQ  0x1
+#define MX_C_LT  0x4
+
+void mdmx_cc_op (SIM_STATE, int cond, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Comp(op1,cond,vt,fmtsel) mdmx_cc_op(SIM_ARGS, cond, op1, vt, fmtsel)
+
+unsigned64 mdmx_pick_op (SIM_STATE, int tf, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_Pick(tf,op1,vt,fmtsel) mdmx_pick_op(SIM_ARGS, tf, op1, vt, fmtsel)
+
+#define MX_VECT_ADDA  (0)
+#define MX_VECT_ADDL  (1)
+#define MX_VECT_MULA  (2)
+#define MX_VECT_MULL  (3)
+#define MX_VECT_MULS  (4)
+#define MX_VECT_MULSL (5)
+#define MX_VECT_SUBA  (6)
+#define MX_VECT_SUBL  (7)
+#define MX_VECT_ABSDA (8)		/* SB-1 only.  */
+
+void mdmx_acc_op (SIM_STATE, int op, unsigned64 op1, int vt, MX_fmtsel fmtsel);
+#define MX_AddA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDA, op1, vt, fmtsel)
+#define MX_AddL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ADDL, op1, vt, fmtsel)
+#define MX_MulA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULA, op1, vt, fmtsel)
+#define MX_MulL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULL, op1, vt, fmtsel)
+#define MX_MulS(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULS, op1, vt, fmtsel)
+#define MX_MulSL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_MULSL, op1, vt, fmtsel)
+#define MX_SubA(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBA, op1, vt, fmtsel)
+#define MX_SubL(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_SUBL, op1, vt, fmtsel)
+#define MX_AbsDiffC(op1,vt,fmtsel) mdmx_acc_op(SIM_ARGS, MX_VECT_ABSDA, op1, vt, fmtsel)
+
+#define MX_FMT_OB   (0)
+#define MX_FMT_QH   (1)
+
+/* The following codes chosen to indicate the units of shift.  */
+#define MX_RAC_L    (0)
+#define MX_RAC_M    (1)
+#define MX_RAC_H    (2)
+
+unsigned64 mdmx_rac_op (SIM_STATE, int, int);
+#define MX_RAC(op,fmt) mdmx_rac_op(SIM_ARGS, op, fmt)
+
+void mdmx_wacl (SIM_STATE, int, unsigned64, unsigned64);
+#define MX_WACL(fmt,vs,vt) mdmx_wacl(SIM_ARGS, fmt, vs, vt)
+void mdmx_wach (SIM_STATE, int, unsigned64);
+#define MX_WACH(fmt,vs) mdmx_wach(SIM_ARGS, fmt, vs)
+
+#define MX_RND_AS   (0)
+#define MX_RND_AU   (1)
+#define MX_RND_ES   (2)
+#define MX_RND_EU   (3)
+#define MX_RND_ZS   (4)
+#define MX_RND_ZU   (5)
+
+unsigned64 mdmx_round_op (SIM_STATE, int, int, MX_fmtsel);
+#define MX_RNAS(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AS, vt, fmt)
+#define MX_RNAU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_AU, vt, fmt)
+#define MX_RNES(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_ES, vt, fmt)
+#define MX_RNEU(vt,fmt) mdmx_round_op(SIM_ARGS, MX_RND_EU, vt, fmt)
+#define MX_RZS(vt,fmt)  mdmx_round_op(SIM_ARGS, MX_RND_ZS, vt, fmt)
+#define MX_RZU(vt,fmt)  mdmx_round_op(SIM_ARGS, MX_RND_ZU, vt, fmt)
+
+unsigned64 mdmx_shuffle (SIM_STATE, int, unsigned64, unsigned64);
+#define MX_SHFL(shop,op1,op2) mdmx_shuffle(SIM_ARGS, shop, op1, op2)
+
+
 
 /* Memory accesses */
 
@@ -774,6 +926,7 @@
 void unpredictable_action (sim_cpu *cpu, address_word cia);
 #define NotWordValue(val)	not_word_value (SD_, (val))
 #define Unpredictable()		unpredictable (SD_)
+#define UnpredictableResult()	/* For now, do nothing.  */
 
 INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr));
 #define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA))
diff --git a/sim/mn10200/ChangeLog b/sim/mn10200/ChangeLog
index 6e99724..8a539c5 100644
--- a/sim/mn10200/ChangeLog
+++ b/sim/mn10200/ChangeLog
@@ -1,3 +1,12 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (INCLUDE): Update path to callback.h.
+	* mn10200_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 2001-04-15  J.T. Conklin  <jtc@redback.com>
 
 	* Makefile.in (simops.o): Add simops.h to dependency list.
diff --git a/sim/mn10200/Makefile.in b/sim/mn10200/Makefile.in
index bcc15c8..563a4ed 100644
--- a/sim/mn10200/Makefile.in
+++ b/sim/mn10200/Makefile.in
@@ -25,7 +25,7 @@
 # Select mn10200 support in nltvals.def.
 NL_TARGET = -DNL_TARGET_mn10200
 
-INCLUDE = mn10200_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10200_sim.h $(srcdir)/../../include/gdb/callback.h
 
 ## COMMON_POST_CONFIG_FRAG
 
diff --git a/sim/mn10200/mn10200_sim.h b/sim/mn10200/mn10200_sim.h
index a7b7c4d..2f85aa0 100644
--- a/sim/mn10200/mn10200_sim.h
+++ b/sim/mn10200/mn10200_sim.h
@@ -1,10 +1,10 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/mn10200.h"
 #include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 
 #ifndef INLINE
 #ifdef __GNUC__
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 59f4515..d4bec0b 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,13 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* Makefile.in (INCLUDE): Update path to callback.h.
+	* mn10300_sim.h: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* tconfig.in: Ditto.
+
 2001-05-06  Jim Blandy  <jimb@redhat.com>
 
 	* mn10300.igen: Doc fixes.
diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in
index f3a52ed..1f493ec 100644
--- a/sim/mn10300/Makefile.in
+++ b/sim/mn10300/Makefile.in
@@ -48,7 +48,7 @@
 # Select mn10300 support in nltvals.def.
 NL_TARGET = -DNL_TARGET_mn10300
 
-INCLUDE = mn10300_sim.h $(srcdir)/../../include/callback.h
+INCLUDE = mn10300_sim.h $(srcdir)/../../include/gdb/callback.h
 
 # List of extra flags to always pass to $(CC).
 SIM_EXTRA_CFLAGS = @sim_gen@ -DPOLL_QUIT_INTERVAL=0x20
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index 93c6de4..002cfa8 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -159,7 +159,9 @@
 ac_help="$ac_help
   --enable-sim-hostendian=end		Specify host byte endian orientation."
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --enable-sim-reserved-bits		Specify whether to check reserved bits in instruction."
 ac_help="$ac_help
@@ -693,7 +695,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:697: checking how to run the C preprocessor" >&5
+echo "configure:699: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -708,13 +710,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 712 "configure"
+#line 714 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:720: \"$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
   :
@@ -725,13 +727,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 729 "configure"
+#line 731 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:737: \"$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
   :
@@ -742,13 +744,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 746 "configure"
+#line 748 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:754: \"$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
   :
@@ -773,7 +775,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:777: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:779: 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
@@ -800,7 +802,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:804: checking for POSIXized ISC" >&5
+echo "configure:806: 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
@@ -821,12 +823,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:825: checking for ANSI C header files" >&5
+echo "configure:827: 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 <<EOF
-#line 830 "configure"
+#line 832 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -834,7 +836,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:840: \"$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*
@@ -851,7 +853,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 855 "configure"
+#line 857 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -869,7 +871,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 873 "configure"
+#line 875 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -890,7 +892,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 894 "configure"
+#line 896 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -901,7 +903,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -925,12 +927,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:929: checking for working const" >&5
+echo "configure:931: 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 <<EOF
-#line 934 "configure"
+#line 936 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -979,7 +981,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1000,21 +1002,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1004: checking for inline" >&5
+echo "configure:1006: 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 <<EOF
-#line 1011 "configure"
+#line 1013 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1040,12 +1042,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1044: checking for off_t" >&5
+echo "configure:1046: 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 <<EOF
-#line 1049 "configure"
+#line 1051 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1073,12 +1075,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1077: checking for size_t" >&5
+echo "configure:1079: 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 <<EOF
-#line 1082 "configure"
+#line 1084 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1108,19 +1110,19 @@
 # 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:1112: checking for working alloca.h" >&5
+echo "configure:1114: 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 <<EOF
-#line 1117 "configure"
+#line 1119 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1126: \"$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
@@ -1141,12 +1143,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1145: checking for alloca" >&5
+echo "configure:1147: 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 <<EOF
-#line 1150 "configure"
+#line 1152 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1174,7 +1176,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1180: \"$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
@@ -1206,12 +1208,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1210: checking whether alloca needs Cray hooks" >&5
+echo "configure:1212: 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 <<EOF
-#line 1215 "configure"
+#line 1217 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1236,12 +1238,12 @@
 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:1240: checking for $ac_func" >&5
+echo "configure:1242: 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 <<EOF
-#line 1245 "configure"
+#line 1247 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1264,7 +1266,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1270: \"$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
@@ -1291,7 +1293,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1295: checking stack direction for C alloca" >&5
+echo "configure:1297: 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
@@ -1299,7 +1301,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1303 "configure"
+#line 1305 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1318,7 +1320,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1324: \"$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
@@ -1343,17 +1345,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1347: checking for $ac_hdr" >&5
+echo "configure:1349: 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
-#line 1352 "configure"
+#line 1354 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1359: \"$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*
@@ -1382,12 +1384,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1386: checking for $ac_func" >&5
+echo "configure:1388: 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 <<EOF
-#line 1391 "configure"
+#line 1393 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1410,7 +1412,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1416: \"$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
@@ -1435,7 +1437,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1439: checking for working mmap" >&5
+echo "configure:1441: 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
@@ -1443,7 +1445,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1447 "configure"
+#line 1449 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1583,7 +1585,7 @@
 }
 
 EOF
-if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1589: \"$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
@@ -1606,12 +1608,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1610: checking for Cygwin environment" >&5
+echo "configure:1612: 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 <<EOF
-#line 1615 "configure"
+#line 1617 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1622,7 +1624,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1639,19 +1641,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1643: checking for mingw32 environment" >&5
+echo "configure:1645: 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 <<EOF
-#line 1648 "configure"
+#line 1650 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1718,7 +1720,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1722: checking host system type" >&5
+echo "configure:1724: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1739,7 +1741,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1743: checking target system type" >&5
+echo "configure:1745: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1757,7 +1759,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1761: checking build system type" >&5
+echo "configure:1763: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1801,7 +1803,7 @@
 # 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:1805: checking for $ac_word" >&5
+echo "configure:1807: 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
@@ -1831,7 +1833,7 @@
   # 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:1835: checking for $ac_word" >&5
+echo "configure:1837: 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
@@ -1882,7 +1884,7 @@
       # 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:1886: checking for $ac_word" >&5
+echo "configure:1888: 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
@@ -1914,7 +1916,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1918: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1920: 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.
@@ -1925,12 +1927,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1929 "configure"
+#line 1931 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1936: \"$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
@@ -1956,12 +1958,12 @@
   { 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:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1962: 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:1965: checking whether we are using GNU C" >&5
+echo "configure:1967: 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
@@ -1970,7 +1972,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1974: \"$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:1976: \"$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
@@ -1989,7 +1991,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1993: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1995: 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
@@ -2032,7 +2034,7 @@
 # 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:2036: checking for a BSD compatible install" >&5
+echo "configure:2038: 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
@@ -2100,7 +2102,7 @@
 # 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:2104: checking for $ac_word" >&5
+echo "configure:2106: 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
@@ -2135,17 +2137,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2139: checking for $ac_hdr" >&5
+echo "configure:2141: 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
-#line 2144 "configure"
+#line 2146 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2151: \"$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*
@@ -2175,12 +2177,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2179: checking for $ac_func" >&5
+echo "configure:2181: 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 <<EOF
-#line 2184 "configure"
+#line 2186 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2203,7 +2205,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2209: \"$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
@@ -2232,12 +2234,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2236: checking for $ac_func" >&5
+echo "configure:2238: 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 <<EOF
-#line 2241 "configure"
+#line 2243 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2260,7 +2262,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2266: \"$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
@@ -2294,19 +2296,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2298: checking for LC_MESSAGES" >&5
+echo "configure:2300: 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 <<EOF
-#line 2303 "configure"
+#line 2305 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2312: \"$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
@@ -2327,7 +2329,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2331: checking whether NLS is requested" >&5
+echo "configure:2333: 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"
@@ -2347,7 +2349,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2351: checking whether included gettext is requested" >&5
+echo "configure:2353: 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"
@@ -2366,17 +2368,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2370: checking for libintl.h" >&5
+echo "configure:2372: 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
-#line 2375 "configure"
+#line 2377 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2382: \"$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*
@@ -2393,19 +2395,19 @@
 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:2397: checking for gettext in libc" >&5
+echo "configure:2399: 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 <<EOF
-#line 2402 "configure"
+#line 2404 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2411: \"$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
@@ -2421,7 +2423,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2425: checking for bindtextdomain in -lintl" >&5
+echo "configure:2427: 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
@@ -2429,7 +2431,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2433 "configure"
+#line 2435 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2440,7 +2442,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2446: \"$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
@@ -2456,19 +2458,19 @@
 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:2460: checking for gettext in libintl" >&5
+echo "configure:2462: 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 <<EOF
-#line 2465 "configure"
+#line 2467 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2474: \"$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
@@ -2496,7 +2498,7 @@
 	      # 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:2500: checking for $ac_word" >&5
+echo "configure:2502: 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
@@ -2530,12 +2532,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2534: checking for $ac_func" >&5
+echo "configure:2536: 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 <<EOF
-#line 2539 "configure"
+#line 2541 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2558,7 +2560,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2564: \"$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
@@ -2585,7 +2587,7 @@
 		# 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:2589: checking for $ac_word" >&5
+echo "configure:2591: 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
@@ -2621,7 +2623,7 @@
 		# 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:2625: checking for $ac_word" >&5
+echo "configure:2627: 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
@@ -2653,7 +2655,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2657 "configure"
+#line 2659 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2661,7 +2663,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2693,7 +2695,7 @@
         # 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:2697: checking for $ac_word" >&5
+echo "configure:2699: 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
@@ -2727,7 +2729,7 @@
         # 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:2731: checking for $ac_word" >&5
+echo "configure:2733: 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
@@ -2763,7 +2765,7 @@
         # 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:2767: checking for $ac_word" >&5
+echo "configure:2769: 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
@@ -2853,7 +2855,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2857: checking for catalogs to be installed" >&5
+echo "configure:2859: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2881,17 +2883,17 @@
       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:2885: checking for linux/version.h" >&5
+echo "configure:2887: 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
-#line 2890 "configure"
+#line 2892 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2897: \"$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*
@@ -2960,17 +2962,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2964: checking for $ac_hdr" >&5
+echo "configure:2966: 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
-#line 2969 "configure"
+#line 2971 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2976: \"$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*
@@ -3000,17 +3002,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3004: checking for $ac_hdr" >&5
+echo "configure:3006: 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
-#line 3009 "configure"
+#line 3011 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3040,17 +3042,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3044: checking for $ac_hdr" >&5
+echo "configure:3046: 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
-#line 3049 "configure"
+#line 3051 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3056: \"$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*
@@ -3080,17 +3082,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3084: checking for $ac_hdr" >&5
+echo "configure:3086: 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
-#line 3089 "configure"
+#line 3091 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3096: \"$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*
@@ -3119,12 +3121,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3123: checking for $ac_func" >&5
+echo "configure:3125: 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 <<EOF
-#line 3128 "configure"
+#line 3130 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3147,7 +3149,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3153: \"$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
@@ -3174,7 +3176,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3178: checking for bind in -lsocket" >&5
+echo "configure:3180: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3182,7 +3184,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3186 "configure"
+#line 3188 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3193,7 +3195,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3199: \"$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
@@ -3221,7 +3223,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3225: checking for gethostbyname in -lnsl" >&5
+echo "configure:3227: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3229,7 +3231,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3233 "configure"
+#line 3235 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3240,7 +3242,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3246: \"$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
@@ -3416,12 +3418,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3420: checking return type of signal handlers" >&5
+echo "configure:3422: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3425 "configure"
+#line 3427 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3438,7 +3440,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3460,7 +3462,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3464: checking for executable suffix" >&5
+echo "configure:3466: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3470,7 +3472,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3621,14 +3623,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3625: checking whether byte ordering is bigendian" >&5
+echo "configure:3627: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+#line 3634 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3639,11 +3641,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3647 "configure"
+#line 3649 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3654,7 +3656,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3674,7 +3676,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3678 "configure"
+#line 3680 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3687,7 +3689,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3721,37 +3723,84 @@
 fi
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3776: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3786 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -3937,12 +3986,12 @@
 for ac_func in time chmod utime fork execve execv chown
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3941: checking for $ac_func" >&5
+echo "configure:3990: 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 <<EOF
-#line 3946 "configure"
+#line 3995 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3965,7 +4014,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4018: \"$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
@@ -3993,17 +4042,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3997: checking for $ac_hdr" >&5
+echo "configure:4046: 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
-#line 4002 "configure"
+#line 4051 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4056: \"$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*
diff --git a/sim/mn10300/mn10300_sim.h b/sim/mn10300/mn10300_sim.h
index da6c259..6a2c571 100644
--- a/sim/mn10300/mn10300_sim.h
+++ b/sim/mn10300/mn10300_sim.h
@@ -1,10 +1,10 @@
 #include <stdio.h>
 #include <ctype.h>
 #include "ansidecl.h"
-#include "callback.h"
+#include "gdb/callback.h"
 #include "opcode/mn10300.h"
 #include <limits.h>
-#include "remote-sim.h"
+#include "gdb/remote-sim.h"
 #include "bfd.h"
 
 #ifndef INLINE
diff --git a/sim/mn10300/tconfig.in b/sim/mn10300/tconfig.in
index 521b6e7..14ca8e7 100644
--- a/sim/mn10300/tconfig.in
+++ b/sim/mn10300/tconfig.in
@@ -2,8 +2,8 @@
 
 /* FIXME: This is unnecessarily necessary: */
 #include "ansidecl.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "sim-module.h"
 
 MODULE_INSTALL_FN dv_sockser_install;
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index d8198e1..4c2dfef 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,31 @@
+2002-06-22  Andrew Cagney  <ac131313@redhat.com>
+
+	* Makefile.in (INTL_SRC): Define.
+	(INTL_CFLAGS): Define.
+	(INTL_DIR): Define.
+	(STD_CFLAGS): Add INTL_CFLAGS.
+
+2002-06-17  Elena Zannoni  <ezannoni@redhat.com>
+
+	* psim.c (psim_options): Don't choke when gdb invokes us with
+	the --architecture option, just ignore it.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* main.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* sim_calls.c: Ditto.
+
+2002-05-30  DJ Delorie  <dj@redhat.com>
+
+	* lf.c (lf_print__gnu_copyleft): Convert multiline strings to
+	compatible format.
+	* gen-idecode.c (print_run_until_stop_body): Likewise.
+	* gen-model.c (gen_model_c): Likewise.
+
 2002-04-15  Elena Zannoni  <ezannoni@redhat.com>
 
         * sim_calls.c (sim_fetch_register, sim_store_register): Return -1 for
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 6776992..d69b5c3 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -113,7 +113,7 @@
   $(TERMIO_CFLAGS) \
   $(DEVZERO_CFLAGS)
 
-STD_CFLAGS	= $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
+STD_CFLAGS	= $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS)
 NOWARN_CFLAGS	= $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
 BUILD_CFLAGS	= -g -O $(INCLUDES) $(WARNING_CFLAGS)
 
@@ -154,6 +154,10 @@
 
 INTLLIBS = @INTLLIBS@
 INTLDEPS = @INTLDEPS@
+INTL_DIR = ../../intl
+INTL_SRC = $(srcdir)/$(INTL_DIR)
+INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC)
+
 
 TARGETLIB	= libsim.a
 
diff --git a/sim/ppc/gen-idecode.c b/sim/ppc/gen-idecode.c
index 87d76a0..3b88866 100644
--- a/sim/ppc/gen-idecode.c
+++ b/sim/ppc/gen-idecode.c
@@ -757,21 +757,21 @@
 
   if (!generate_smp) {
 
-    lf_putstr(file, "
-/* CASE 1: NO SMP (with or with out instruction cache).
-
-   In this case, we can take advantage of the fact that the current
-   instruction address does not need to be returned to the cpu object
-   after every execution of an instruction.  Instead it only needs to
-   be saved when either A. the main loop exits or B. A cpu-halt or
-   cpu-restart call forces the loop to be re-enered.  The later
-   functions always save the current cpu instruction address.
-
-   Two subcases also exist that with and that without an instruction
-   cache.
-
-   An additional complexity is the need to ensure that a 1:1 ratio
-   is maintained between the execution of an instruction and the
+    lf_putstr(file, "\n\
+/* CASE 1: NO SMP (with or with out instruction cache).\n\
+\n\
+   In this case, we can take advantage of the fact that the current\n\
+   instruction address does not need to be returned to the cpu object\n\
+   after every execution of an instruction.  Instead it only needs to\n\
+   be saved when either A. the main loop exits or B. A cpu-halt or\n\
+   cpu-restart call forces the loop to be re-enered.  The later\n\
+   functions always save the current cpu instruction address.\n\
+\n\
+   Two subcases also exist that with and that without an instruction\n\
+   cache.\n\
+\n\
+   An additional complexity is the need to ensure that a 1:1 ratio\n\
+   is maintained between the execution of an instruction and the\n\
    incrementing of the simulation clock */");
 
     lf_putstr(file, "\n");
@@ -867,12 +867,12 @@
     
   if (generate_smp) {
 
-    lf_putstr(file, "
-/* CASE 2: SMP (With or without ICACHE)
-
-   The complexity here comes from needing to correctly restart the
-   system when it is aborted.  In particular if cpu0 requests a
-   restart, the next cpu is still cpu1.  Cpu0 being restarted after
+    lf_putstr(file, "\n\
+/* CASE 2: SMP (With or without ICACHE)\n\
+\n\
+   The complexity here comes from needing to correctly restart the\n\
+   system when it is aborted.  In particular if cpu0 requests a\n\
+   restart, the next cpu is still cpu1.  Cpu0 being restarted after\n\
    all the other CPU's and the event queue have been processed */");
 
     lf_putstr(file, "\n");
diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c
index 4ec1677..34c1b90 100644
--- a/sim/ppc/gen-model.c
+++ b/sim/ppc/gen-model.c
@@ -377,7 +377,7 @@
     lf_printf(file, "    }\n");
     lf_printf(file, "  }\n");
     lf_printf(file, "\n");
-    lf_printf(file, "  error(\"Unknown model '%%s', Models which are known are:%%s\n\",\n");
+    lf_printf(file, "  error(\"Unknown model '%%s', Models which are known are:%%s\\n\",\n");
     lf_printf(file, "        name,\n");
     lf_printf(file, "        \"");
     for(model_ptr = models; model_ptr; model_ptr = model_ptr->next) {
diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c
index 2a42015..fc2a3c1 100644
--- a/sim/ppc/lf.c
+++ b/sim/ppc/lf.c
@@ -273,28 +273,28 @@
   switch (file->type) {
   case lf_is_c:
   case lf_is_h:
-    nr += lf_printf(file, "\
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- 
-    --
-
-    This file was generated by the program %s */
+    nr += lf_printf(file, "\n\
+/*  This file is part of the program psim.\n\
+\n\
+    Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>\n\
+\n\
+    This program is free software; you can redistribute it and/or modify\n\
+    it under the terms of the GNU General Public License as published by\n\
+    the Free Software Foundation; either version 2 of the License, or\n\
+    (at your option) any later version.\n\
+\n\
+    This program is distributed in the hope that it will be useful,\n\
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n\
+    GNU General Public License for more details.\n\
+ \n\
+    You should have received a copy of the GNU General Public License\n\
+    along with this program; if not, write to the Free Software\n\
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\
+ \n\
+    --\n\
+\n\
+    This file was generated by the program %s */\n\
 ", filter_filename(file->program));
     break;
   default:
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index f6ac87f..4df78ab 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -31,8 +31,8 @@
 #include "events.h" /* FIXME: psim should provide the interface */
 
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 20d843b..76bb452 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -341,6 +341,19 @@
 	else
 	  tree_parse(root, "/openprom/trace/%s 1", param);
 	break;
+      case '-':
+	/* it's a long option of the form --optionname=optionvalue.
+	   Such options can be passed through if we are invoked by
+	   gdb.  */
+	if (strstr(argv[argp], "architecture") != NULL) {
+          /* we must consume the argument here, so that we get out
+             of the loop.  */
+	  p = argv[argp] + strlen(argv[argp]) - 1;
+	  printf_filtered("Warning - architecture parameter ignored\n");
+        }
+	else
+	  error("Unrecognized option");
+	break;
       }
       p += 1;
     }
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 47af5b1..f2c2d19 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -42,8 +42,8 @@
 
 #include "defs.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 /* Define the rate at which the simulator should poll the host
    for a quit. */
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 541ed1f..ec58759 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,22 @@
+Wed Jul 17 19:36:38 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* Makefile.in (interp.o): Depend on $(srcroot)/include/gdb/sim-sh.h.
+	* interp.c: Include "gdb/sim-sh.h".
+	(sim_store_register, sim_fetch_register): Use constants defined there.
+
+Tue Jun 18 16:53:11 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* interp.c (sim_resume): Fix setting of bus error for
+	instruction fetch.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-08  Andrew Cagney  <cagney@redhat.com>
+
+	* interp.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+
 2001-01-30  Ben Elliston  <bje@redhat.com>
 
 	* interp.c (sim_create_inferior): Record program arguments for
diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in
index 62aaeaf..784c39a 100644
--- a/sim/sh/Makefile.in
+++ b/sim/sh/Makefile.in
@@ -24,7 +24,7 @@
 
 ## COMMON_POST_CONFIG_FRAG
 
-interp.o: interp.c code.c table.c ppi.c
+interp.o: interp.c code.c table.c ppi.c $(srcroot)/include/gdb/sim-sh.h
 
 code.c: gencode
 	./gencode -x >code.c
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 99f51d1..2f5d1d3 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -27,8 +27,9 @@
 
 #include "sysdep.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
+#include "gdb/sim-sh.h"
 
 /* This file is local - if newlib changes, then so should this.  */
 #include "syscall.h"
@@ -1717,7 +1718,7 @@
     }
   /* Check for SIGBUS due to insn fetch.  */
   else if (! saved_state.asregs.exception)
-    saved_state.asregs.exception == SIGBUS;
+    saved_state.asregs.exception = SIGBUS;
 
   saved_state.asregs.ticks += get_now () - tick_start;
   saved_state.asregs.cycles += cycles;
@@ -1790,98 +1791,122 @@
   val = swap (* (int *)memory);
   switch (rn)
     {
-    case  0: case  1: case  2: case  3: case  4: case  5: case  6: case  7:
-    case  8: case  9: case 10: case 11: case 12: case 13: case 14: case 15:
+    case SIM_SH_R0_REGNUM: case SIM_SH_R1_REGNUM: case SIM_SH_R2_REGNUM:
+    case SIM_SH_R3_REGNUM: case SIM_SH_R4_REGNUM: case SIM_SH_R5_REGNUM:
+    case SIM_SH_R6_REGNUM: case SIM_SH_R7_REGNUM: case SIM_SH_R8_REGNUM:
+    case SIM_SH_R9_REGNUM: case SIM_SH_R10_REGNUM: case SIM_SH_R11_REGNUM:
+    case SIM_SH_R12_REGNUM: case SIM_SH_R13_REGNUM: case SIM_SH_R14_REGNUM:
+    case SIM_SH_R15_REGNUM:
       saved_state.asregs.regs[rn] = val;
       break;
-    case 16:
+    case SIM_SH_PC_REGNUM:
       saved_state.asregs.pc = val;
       break;
-    case 17:
+    case SIM_SH_PR_REGNUM:
       PR = val;
       break;
-    case 18:
+    case SIM_SH_GBR_REGNUM:
       GBR = val;
       break;
-    case 19:
+    case SIM_SH_VBR_REGNUM:
       VBR = val;
       break;
-    case 20:
+    case SIM_SH_MACH_REGNUM:
       MACH = val;
       break;
-    case 21:
+    case SIM_SH_MACL_REGNUM:
       MACL = val;
       break;
-    case 22:
+    case SIM_SH_SR_REGNUM:
       SET_SR (val);
       break;
-    case 23:
+    case SIM_SH_FPUL_REGNUM:
       FPUL = val;
       break;
-    case 24:
+    case SIM_SH_FPSCR_REGNUM:
       SET_FPSCR (val);
       break;
-    case 25:
-      if (target_dsp)
-	A0G = val;
-    else case 26:
-      if (target_dsp)
-	A0 = val;
-    else case 27:
-      if (target_dsp)
-	A1G = val;
-    else case 28:
-      if (target_dsp)
-	A1 = val;
-    else case 29:
-      if (target_dsp)
-	M0 = val;
-    else case 30:
-      if (target_dsp)
-	M1 = val;
-    else case 31:
-      if (target_dsp)
-	X0 = val;
-    else case 32:
-      if (target_dsp)
-	X1 = val;
-    else case 33:
-      if (target_dsp)
-	Y0 = val;
-    else case 34:
-      if (target_dsp)
-	Y1 = val;
-    else case 40:
-      if (target_dsp)
-	SET_MOD (val);
-    else case 35: case 36: case 37: case 38: case 39:
-	SET_FI (rn - 25, val);
+    case SIM_SH_FR0_REGNUM: case SIM_SH_FR1_REGNUM: case SIM_SH_FR2_REGNUM:
+    case SIM_SH_FR3_REGNUM: case SIM_SH_FR4_REGNUM: case SIM_SH_FR5_REGNUM:
+    case SIM_SH_FR6_REGNUM: case SIM_SH_FR7_REGNUM: case SIM_SH_FR8_REGNUM:
+    case SIM_SH_FR9_REGNUM: case SIM_SH_FR10_REGNUM: case SIM_SH_FR11_REGNUM:
+    case SIM_SH_FR12_REGNUM: case SIM_SH_FR13_REGNUM: case SIM_SH_FR14_REGNUM:
+    case SIM_SH_FR15_REGNUM:
+      SET_FI (rn - SIM_SH_FR0_REGNUM, val);
       break;
-    case 41:
+    case SIM_SH_DSR_REGNUM:
+      DSR = val;
+      break;
+    case SIM_SH_A0G_REGNUM:
+      A0G = val;
+      break;
+    case SIM_SH_A0_REGNUM:
+      A0 = val;
+      break;
+    case SIM_SH_A1G_REGNUM:
+      A1G = val;
+      break;
+    case SIM_SH_A1_REGNUM:
+      A1 = val;
+      break;
+    case SIM_SH_M0_REGNUM:
+      M0 = val;
+      break;
+    case SIM_SH_M1_REGNUM:
+      M1 = val;
+      break;
+    case SIM_SH_X0_REGNUM:
+      X0 = val;
+      break;
+    case SIM_SH_X1_REGNUM:
+      X1 = val;
+      break;
+    case SIM_SH_Y0_REGNUM:
+      Y0 = val;
+      break;
+    case SIM_SH_Y1_REGNUM:
+      Y1 = val;
+      break;
+    case SIM_SH_MOD_REGNUM:
+      SET_MOD (val);
+      break;
+    case SIM_SH_RS_REGNUM:
+      RS = val;
+      break;
+    case SIM_SH_RE_REGNUM:
+      RE = val;
+      break;
+    case SIM_SH_SSR_REGNUM:
       SSR = val;
       break;
-    case 42:
+    case SIM_SH_SPC_REGNUM:
       SPC = val;
       break;
     /* The rn_bank idiosyncracies are not due to hardware differences, but to
        a weird aliasing naming scheme for sh3 / sh3e / sh4.  */
-    case 43:
-      if (target_dsp)
-	RS = val;
-    else case 44:
-      if (target_dsp)
-	RE = val;
-    else case 45: case 46: case 47: case 48: case 49: case 50:
+    case SIM_SH_R0_BANK0_REGNUM: case SIM_SH_R1_BANK0_REGNUM:
+    case SIM_SH_R2_BANK0_REGNUM: case SIM_SH_R3_BANK0_REGNUM:
+    case SIM_SH_R4_BANK0_REGNUM: case SIM_SH_R5_BANK0_REGNUM:
+    case SIM_SH_R6_BANK0_REGNUM: case SIM_SH_R7_BANK0_REGNUM:
       if (SR_MD && SR_RB)
-	Rn_BANK (rn - 43) = val;
+	Rn_BANK (rn - SIM_SH_R0_BANK0_REGNUM) = val;
       else
-	saved_state.asregs.regs[rn - 43] = val;
+	saved_state.asregs.regs[rn - SIM_SH_R0_BANK0_REGNUM] = val;
       break;
-    case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58:
-      if (target_dsp || ! SR_MD || ! SR_RB)
-	SET_Rn_BANK (rn - 51, val);
+    case SIM_SH_R0_BANK1_REGNUM: case SIM_SH_R1_BANK1_REGNUM:
+    case SIM_SH_R2_BANK1_REGNUM: case SIM_SH_R3_BANK1_REGNUM:
+    case SIM_SH_R4_BANK1_REGNUM: case SIM_SH_R5_BANK1_REGNUM:
+    case SIM_SH_R6_BANK1_REGNUM: case SIM_SH_R7_BANK1_REGNUM:
+      if (SR_MD && SR_RB)
+	saved_state.asregs.regs[rn - SIM_SH_R0_BANK1_REGNUM] = val;
       else
-	saved_state.asregs.regs[rn - 51] = val;
+	Rn_BANK (rn - SIM_SH_R0_BANK1_REGNUM) = val;
+      break;
+    case SIM_SH_R0_BANK_REGNUM: case SIM_SH_R1_BANK_REGNUM:
+    case SIM_SH_R2_BANK_REGNUM: case SIM_SH_R3_BANK_REGNUM:
+    case SIM_SH_R4_BANK_REGNUM: case SIM_SH_R5_BANK_REGNUM:
+    case SIM_SH_R6_BANK_REGNUM: case SIM_SH_R7_BANK_REGNUM:
+      SET_Rn_BANK (rn - SIM_SH_R0_BANK_REGNUM, val);
       break;
     default:
       return 0;
@@ -1901,96 +1926,120 @@
   init_pointers ();
   switch (rn)
     {
-    case  0: case  1: case  2: case  3: case  4: case  5: case  6: case  7:
-    case  8: case  9: case 10: case 11: case 12: case 13: case 14: case 15:
+    case SIM_SH_R0_REGNUM: case SIM_SH_R1_REGNUM: case SIM_SH_R2_REGNUM:
+    case SIM_SH_R3_REGNUM: case SIM_SH_R4_REGNUM: case SIM_SH_R5_REGNUM:
+    case SIM_SH_R6_REGNUM: case SIM_SH_R7_REGNUM: case SIM_SH_R8_REGNUM:
+    case SIM_SH_R9_REGNUM: case SIM_SH_R10_REGNUM: case SIM_SH_R11_REGNUM:
+    case SIM_SH_R12_REGNUM: case SIM_SH_R13_REGNUM: case SIM_SH_R14_REGNUM:
+    case SIM_SH_R15_REGNUM:
       val = saved_state.asregs.regs[rn];
       break;
-    case 16:
+    case SIM_SH_PC_REGNUM:
       val = saved_state.asregs.pc;
       break;
-    case 17:
+    case SIM_SH_PR_REGNUM:
       val = PR;
       break;
-    case 18:
+    case SIM_SH_GBR_REGNUM:
       val = GBR;
       break;
-    case 19:
+    case SIM_SH_VBR_REGNUM:
       val = VBR;
       break;
-    case 20:
+    case SIM_SH_MACH_REGNUM:
       val = MACH;
       break;
-    case 21:
+    case SIM_SH_MACL_REGNUM:
       val = MACL;
       break;
-    case 22:
+    case SIM_SH_SR_REGNUM:
       val = GET_SR ();
       break;
-    case 23:
+    case SIM_SH_FPUL_REGNUM:
       val = FPUL;
       break;
-    case 24:
+    case SIM_SH_FPSCR_REGNUM:
       val = GET_FPSCR ();
       break;
-    case 25:
-      val = target_dsp ? SEXT (A0G) : FI (0);
+    case SIM_SH_FR0_REGNUM: case SIM_SH_FR1_REGNUM: case SIM_SH_FR2_REGNUM:
+    case SIM_SH_FR3_REGNUM: case SIM_SH_FR4_REGNUM: case SIM_SH_FR5_REGNUM:
+    case SIM_SH_FR6_REGNUM: case SIM_SH_FR7_REGNUM: case SIM_SH_FR8_REGNUM:
+    case SIM_SH_FR9_REGNUM: case SIM_SH_FR10_REGNUM: case SIM_SH_FR11_REGNUM:
+    case SIM_SH_FR12_REGNUM: case SIM_SH_FR13_REGNUM: case SIM_SH_FR14_REGNUM:
+    case SIM_SH_FR15_REGNUM:
+      val = FI (rn - SIM_SH_FR0_REGNUM);
       break;
-    case 26:
-      val = target_dsp ? A0 : FI (1);
+    case SIM_SH_DSR_REGNUM:
+      val = DSR;
       break;
-    case 27:
-      val = target_dsp ? SEXT (A1G) : FI (2);
+    case SIM_SH_A0G_REGNUM:
+      val = SEXT (A0G);
       break;
-    case 28:
-      val = target_dsp ? A1 : FI (3);
+    case SIM_SH_A0_REGNUM:
+      val = A0;
       break;
-    case 29:
-      val = target_dsp ? M0 : FI (4);
+    case SIM_SH_A1G_REGNUM:
+      val = SEXT (A1G);
       break;
-    case 30:
-      val = target_dsp ? M1 : FI (5);
+    case SIM_SH_A1_REGNUM:
+      val = A1;
       break;
-    case 31:
-      val = target_dsp ? X0 : FI (6);
+    case SIM_SH_M0_REGNUM:
+      val = M0;
       break;
-    case 32:
-      val = target_dsp ? X1 : FI (7);
+    case SIM_SH_M1_REGNUM:
+      val = M1;
       break;
-    case 33:
-      val = target_dsp ? Y0 : FI (8);
+    case SIM_SH_X0_REGNUM:
+      val = X0;
       break;
-    case 34:
-      val = target_dsp ? Y1 : FI (9);
+    case SIM_SH_X1_REGNUM:
+      val = X1;
       break;
-    case 35: case 36: case 37: case 38: case 39:
-      val = FI (rn - 25);
+    case SIM_SH_Y0_REGNUM:
+      val = Y0;
       break;
-    case 40:
-      val = target_dsp ? MOD : FI (15);
+    case SIM_SH_Y1_REGNUM:
+      val = Y1;
       break;
-    case 41:
+    case SIM_SH_MOD_REGNUM:
+      val = MOD;
+      break;
+    case SIM_SH_RS_REGNUM:
+      val = RS;
+      break;
+    case SIM_SH_RE_REGNUM:
+      val = RE;
+      break;
+    case SIM_SH_SSR_REGNUM:
       val = SSR;
       break;
-    case 42:
+    case SIM_SH_SPC_REGNUM:
       val = SPC;
       break;
     /* The rn_bank idiosyncracies are not due to hardware differences, but to
        a weird aliasing naming scheme for sh3 / sh3e / sh4.  */
-    case 43:
-      if (target_dsp)
-	val = RS;
-    else case 44:
-      if (target_dsp)
-	val = RE;
-    else case 45: case 46: case 47: case 48: case 49: case 50:
-	val = (SR_MD && SR_RB
-	       ? Rn_BANK (rn - 43)
-	       : saved_state.asregs.regs[rn - 43]);
+    case SIM_SH_R0_BANK0_REGNUM: case SIM_SH_R1_BANK0_REGNUM:
+    case SIM_SH_R2_BANK0_REGNUM: case SIM_SH_R3_BANK0_REGNUM:
+    case SIM_SH_R4_BANK0_REGNUM: case SIM_SH_R5_BANK0_REGNUM:
+    case SIM_SH_R6_BANK0_REGNUM: case SIM_SH_R7_BANK0_REGNUM:
+      val = (SR_MD && SR_RB
+	     ? Rn_BANK (rn - SIM_SH_R0_BANK0_REGNUM)
+	     : saved_state.asregs.regs[rn - SIM_SH_R0_BANK0_REGNUM]);
       break;
-    case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58:
-      val = (target_dsp || ! SR_MD || ! SR_RB
-	     ? Rn_BANK (rn - 51)
-	     : saved_state.asregs.regs[rn - 51]);
+    case SIM_SH_R0_BANK1_REGNUM: case SIM_SH_R1_BANK1_REGNUM:
+    case SIM_SH_R2_BANK1_REGNUM: case SIM_SH_R3_BANK1_REGNUM:
+    case SIM_SH_R4_BANK1_REGNUM: case SIM_SH_R5_BANK1_REGNUM:
+    case SIM_SH_R6_BANK1_REGNUM: case SIM_SH_R7_BANK1_REGNUM:
+      val = (! SR_MD || ! SR_RB
+	     ? Rn_BANK (rn - SIM_SH_R0_BANK1_REGNUM)
+	     : saved_state.asregs.regs[rn - SIM_SH_R0_BANK1_REGNUM]);
+      break;
+    case SIM_SH_R0_BANK_REGNUM: case SIM_SH_R1_BANK_REGNUM:
+    case SIM_SH_R2_BANK_REGNUM: case SIM_SH_R3_BANK_REGNUM:
+    case SIM_SH_R4_BANK_REGNUM: case SIM_SH_R5_BANK_REGNUM:
+    case SIM_SH_R6_BANK_REGNUM: case SIM_SH_R7_BANK_REGNUM:
+      val = Rn_BANK (rn - SIM_SH_R0_BANK_REGNUM);
       break;
     default:
       return 0;
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index fc75944..9699c98 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2001-07-31  Ben Elliston  <bje@redhat.com>
 
 	* lib/sim-defs.exp (run_sim_test): Include a description such as
diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog
deleted file mode 100644
index a98b57d..0000000
--- a/sim/tic80/ChangeLog
+++ /dev/null
@@ -1,662 +0,0 @@
-Tue Jul  4 13:58:43 2000  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* tic80.igen: Rename insns.  Re-format.
-	* tic80.dc: rename dc.
-	* tic80.ic: rename ic. Replace ``compute'' with ``cache''.
-
-Wed May 24 14:40:34 2000  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-2000-04-12  Frank Ch. Eigler  <fche@redhat.com>
-
-	* cpu.h (GPR_CLEAR): New macro.
-	(GPR_SET): Removed macro.
-
-Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-1999-05-08  Felix Lee  <flee@cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	
-Fri May  1 14:41:11 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns: Pass correct arguments to sim_engine_abort.
-
-Tue Apr 28 18:33:31 1998  Geoffrey Noer  <noer@cygnus.com>
-
-        * configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Sun Apr 26 15:19:45 1998  Tom Tromey  <tromey@cygnus.com>
-
-	* acconfig.h: New file.
-	* configure.in: Reverted change of Apr 24; use sinclude again.
-
-Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Fri Apr 24 11:18:28 1998  Tom Tromey  <tromey@cygnus.com>
-
-	* configure.in: Don't call sinclude.
-
-Fri Apr 24 19:43:30 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* ic (rBase, rLink): Make the type a pointer.
-
-Sat Apr  4 20:36:25 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Mar 27 16:15:52 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 25 12:35:29 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 18 12:38:12 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Mar 11 14:12:56 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (IMEM32_IMMED, IMEM32, STORE, MEM): Replace sim_core_*_map
- 	with read_map, write_map, exec_map resp.
-
-Thu Feb 26 19:08:37 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_info): Delete.
-
-Tue Feb 17 14:35:05 1998  Michael Meissner  <meissner@cygnus.com>
-
-	* misc.c (tic80_trace_cond_br): Take size/code arguments, and
-	decode bcond conditions and bbo/bbz comparison bits.
-
-	* cpu.h (tic80_trace_cond_br): Update prototype.
-	(TRACE_COND_PR): Take size/code additional arguments.
-
-	* insns: (bbo/bbz/bcnd): Update call to TRACE_COND_PR.
-
-Tue Feb 17 12:50:27 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_store_register, sim_fetch_register): Pass in
- 	length parameter.  Return -1.
-
-Fri Feb 13 17:11:22 1998  Michael Meissner  <meissner@cygnus.com>
-
-	* insns ({get,set}_fp_reg): Tic80 floating point is little endian,
-	not big endian.
-
-	* misc.c (tic80_trace_fpu*): Pass address of sim_fpu structure,
-	not the structure itself.  Use %g consistantly to print floating
-	point.
-
-	* cpu.h: (tic80_trace_fpu*): Update prototypes.
-
-Tue Feb  3 16:25:47 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (IMEM32, IMEM32_IMMED): Rename IMEM and IMEM_IMMED so that
- 	in sync with recent igen change.
-
-Sun Feb  1 16:47:51 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Sat Jan 31 18:15:41 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Jan 30 11:47:50 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* cpu.h (CPU_CIA): Delete macro, replace with...
- 	(CIA_SET, CIA_GET): Define.
-
-Wed Jan 28 18:44:33 1998  Michael Meissner  <meissner@cygnus.com>
-
-	* misc.c (tic80_trace_cmp_internal): New function to return
-	compare bits as a string.
-	(tic80_trace_{,fpu2}cmp): New functions for tracing cmp and fcmp.
-
-	* cpu.h (tic80_trace_{,fpu2}cmp): Add declaration.
-	(TRACE_{,FPU2}CMP): New macros for tracing compares.
-
-	* insns (do_{,f}cmp): Use compare specific tracing functions to
-	print out the flag bits.
-
-Mon Jan 19 22:26:29 1998  Doug Evans  <devans@seba>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Dec 15 23:17:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Thu Dec  4 09:21:05 1997  Doug Evans  <devans@canuck.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Nov 24 14:57:58 1997  Doug Evans  <devans@seba.cygnus.com>
-
-	* cpu.h (TRACE_COND_BR): Use TRACE_BRANCH_P, not TRACE_ALU_P.
-
-Sat Nov 22 21:42:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* interp.c (engine_step): Replace SIGTRAP with SIM_SIGTRAP.
-	(engine_run_until_stop): Replace SIGINT with SIM_SIGINT.
-
-	* sim-main.h: Include sim-signal.h.
-	(SIGTRAP): Delete definition.
-
-	* interp.c, sim-calls.c: Do not include signal.h.
-
-	* insns (illegal): SIGILL -> SIM_SIGILL.
- 	(fp_unavailable): SIGFPE -> SIM_SIGFPE.
-	(do_trap): SIGTRAP -> SIM_SIGTRAP.
-	
-Tue Nov 18 15:33:48 1997  Doug Evans  <devans@canuck.cygnus.com>
-
-	* sim-main.h (CIA_ADDR): Define.
-
-	* Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
-
-Fri Oct 17 17:26:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (ALU32_END): Use ALU32_RESULT.
-
-Mon Sep 29 12:49:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (get_fp_reg, set_fp_reg): Update to use changed sim_fpu
- 	interface.
-	(do_fadd, do_fcmp, do_fdiv, do_fmpy, do_frnd, do_fsub): Ditto.
-
-	* misc.c (tic80_trace_fpu3, tic80_trace_fpu2, tic80_trace_fpu1,
- 	tic80_trace_fpu2i) Update to use changed sim_fpu interface.
-	
-Fri Oct  3 09:28:00 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure.in (SIM_AC_OPTIONS_BITSIZE): Define.
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Wed Sep 24 17:38:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 23 11:04:38 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 23 10:19:51 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* Makefile.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN,
- 	SIM_HOSTENDIAN, SIM_INLINE, SIM_RESERVED_BITS): Delete, moved to
- 	common.
-	(SIM_EXTRA_CFLAGS): Update.
-	
-Mon Sep 22 11:46:20 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Fri Sep 19 17:45:25 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Tue Sep 16 23:10:03 1997  Felix Lee  <flee@cygnus.com>
-
-	* sim-main.h (kill): macro was missing args.
-	(SIGTRAP): define for MSVC.
-
-Mon Sep 15 17:36:15 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Mon Sep  8 20:10:43 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* cpu.h (CPU_CIA): Define.
-
-	* sim-main.h (struct sim_state): Delete halt_ok, path_to_halt,
- 	restart_ok, path_to_restart members.
-	(struct sim_state): Delete reason, siggnal members.
-	
-Thu Sep  4 17:21:23 1997  Doug Evans  <dje@seba>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Thu Sep  4 17:45:14 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_open): Add memory before parsing arguments.
-	(sim_read): Delete, replace with sim-hrw.
-	(sim_write): Delete, replace with sim-hrw.
-
-Thu Sep  4 10:48:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_open): Use sim_do_command to add memory, only
- 	add memory if none already present.
-	(sim_open): Move init of registers from here.
-	(sim_create_inferior): To here. Init modules.
-
-	* Makefile.in (SIM_OBJS): Add sim-memopt.o module.
-
-	* sim-calls.c (sim_open): Add zero modulo arg to sim_core_attach.
-
-Mon Sep  1 11:06:30 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_open): Use sim_state_alloc
-	(simulation): Delete.
-
-Sat Aug 30 09:40:47 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (do_trap): Unsigned `i' for unsigned iterator.
-	(do_trap): Ditto for comparison with getpid.
-
-Wed Aug 27 18:13:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Wed Aug 27 13:41:24 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (do_st): Use U8_4 instead of V4_L8.
-
-	* sim-calls.c (sim_open): Add call to sim_analyze_program, update
- 	call to sim_config.
-
-	* sim-calls.c (sim_kill): Delete.
-	(sim_create_inferior): Add ABFD argument.  Initialize PC from ABFD
- 	and not SD.
-	(sim_load): Delete, use sim-hload.c.
-
-	* Makefile.in (SIM_OBJS): Add sim-hload.o module.
-
-Mon Aug 25 17:50:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Mon Aug 25 16:33:29 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_open): Add ABFD argument.
-	(sim_open): Move sim_config call to just after argument
- 	parsing. Check return status.
-
-Fri Aug  8 21:52:27 1997  Mark Alexander  <marka@cygnus.com>
-
-	* sim-calls.c (sim_store_register): Allow accumulators
-	other than A0 to be modified.  Correct error message.
-
-Thu May 29 14:02:40 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* misc.c (tic80_trace_fpu3, tic80_trace_fpu2, tic80_trace_fpu1,
- 	tic80_trace_fpu2i): Pass in function prefix.
-	(tic80_trace_ldst): Rewrite so it calls print_one_insn directly.
-	
-	* Makefile.in (SIM_OBJS): Include sim-watch.o module.
-
-	* sim-main.h (WITH_WATCHPOINTS): Enable watchpoints.
-
-	* ic (bitnum): Compute bitnum from BITNUM.
-	* insn (bbo, bbz): Use.
-	
-	* insn: Convert long immediate instructions to igen long immediate
- 	form.
-	* insn: Add disasembler information.
-	
-Thu May 29 12:09:13 1997  Andrew Cagney  <cagney@b2.cygnus.com>
-
-	* alu.h (IMEM_IMMED): New macro, fetch 32bit immediate operand N.
-
-	* insns (subu i): Immediate is signed not unsigned.
-
-Tue May 27 13:22:13 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_read): Pass NULL cpu to sim_core_read_buffer.
-	(sim_write): Ditto for write.
-
-Tue May 20 09:33:31 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_load): Set STATE_LOADED_P.
-
-	* sim-main.h: Include <unistd.h>.
-
-	* sim-calls.c (sim_set_callback): Delete.
-	(sim_open): Add/install callback argument.
-	(sim_size): Delete.
-	
-Mon May 19 18:59:33 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* configure.in: Check for getpid, kill functions.
-	* config{.in,ure}: Regenerate.
-
-	* insns (do_trap): Add support for kill, getpid system calls.
-
-	* sim-main.h (errno.h): Include.
-	(getpid,kill): Define as NOPs if the host doesn't have them.
-
-Mon May 19 14:58:47 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_open): Set the simulator base magic number.
-	(sim_load): Delete prototype of sim_load_file.
-	(sim_open): Define sd to be &simulation.
-
-Fri May 16 14:35:30 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (illegal, fp_unavailable): Halt instead of abort the
- 	simulator.
-
-	* insns: Replace calls to engine_error with sim_engine_abort.
-  	Ditto for engine_halt V sim_engine_halt.
-	
-Tue May 13 15:24:12 1997  Andrew Cagney  <cagney@b2.cygnus.com>
-
-	* interp.c (engine_run_until_stop): Delete. Moved to common.
-	(engine_step): Ditto.
-	(engine_step): Ditto.
-	(engine_halt): Ditto.
-	(engine_restart): Ditto.
-	(engine_halt): Ditto.
-	(engine_error): Ditto.
-
-	* sim-calls.c (sim_stop): Delete. Moved to common.
-	(sim_stop_reason): Ditto.
-	(sim_resume): Ditto.
-
-	* Makefile.in (SIM_OBJS): Link in generic sim-engine, sim-run,
- 	sim-resume, sim-reason, sim-stop modules.
-
-Fri May 16 11:57:49 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* ic (compute): Drop check for REG == 0, now always forced to
- 	zero.
-
-	* cpu.h (GPR_SET): New macro update the gpr.
-	* insns (do_add): Use GPR_SET to update the GPR register.
-
-	* sim-calls.c (sim_fetch_register): Pretend that r0 is zero.
-
-	* Makefile.in (tmp-igen): Specify zero-r0 so that every
- 	instruction clears r0.
-
-	* interp.c (engine_run_until_stop): Igen now generates code to
- 	clear r0.
-	(engine_step): Ditto.
-
-Thu May 15 11:45:37 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (do_shift): When rot==0 and zero/sign merge treat it as
- 	32.
-	(set_fp_reg): For interger conversion, use sim-fpu fpu2i
- 	functions.
-	(do_fmpy): Perform iii and uuu using integer arithmetic.
-	
-	* Makefile.in (ENGINE_H): Assume everything depends on the fpu.
-
-	* insns (get_fp_reg): Use sim_fpu_u32to to perform unsigned
- 	conversion.
-	(do_fcmp): Update to use new fp compare functions. Make reg nr arg
- 	instead of reg.  Stops fp overflow.
-	(get_fp_reg): Assume val is valid when reg == 0.
-	(set_fp_reg): Fix double conversion.
-
-	* misc.c (tic80_trace_fpu1): New function, trace simple fp op.
-	
-	* insns (do_frnd): Add tracing.
-
-	* cpu.h (TRACE_FPU1): Ditto.
-
-	* insns (do_trap): Printf formatting.
-
-Wed May 14 18:05:50 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* misc.c (tic80_trace_fpu{3,2,2i}): Align columns with other
-	insns.  Use %g to print floating point instead of %f in case the
-	numbers are real large.
-
-Tue May 13 18:00:10 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* insns (do_trap): For system calls that are defined, but not
-	provided return EINVAL. Temporarily add traps 74-79 to just print
-	the register state.
-
-	* interp.c (engine_{run_until_stop,step}): Before executing
-	instructions, make sure r0 == 0.
-
-Tue May 13 16:39:37 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (IMEM): Take full cia not just IP as argument.
-
-	* interp.c (engine_run_until_stop): Delete handling of annuled
- 	instructions.
-	(engine_step): Ditto.
-
-	* insn (do_branch): New function.
-	(do_bbo, do_bbz, do_bcnd, do_bsr, do_jsr): Use do_branch to handle
- 	annuled branches.
-
-Mon May 12 17:15:52 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* insns (do_{ld,st}): Fix tracing for ld/st.
-
-Mon May 12 11:12:24 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_stop_reason): Restore keep_running after a
- 	CNTRL-C, don't re-clear it.
-
-	* interp.c (engine_error): stop rather than signal with SIGABRT
- 	when an error.
-
-	* insns (do_ld): For 64bit loads, always store LSW in rDest, MSW in
- 	rDest + 1. Also done by Michael Meissner  <meissner@cygnus.com>
-	(do_st): Converse for store.
-
-	* misc.c (tic80_trace_fpu2i): Correct printf format for int type.
-
-Sun May 11 11:02:57 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_stop_reason): Return a SIGINT if keep_running
- 	was cleared.
-
-	* interp.c (engine_step): New function.  Single step the simulator
- 	taking care of cntrl-c during a step.
-
-	* sim-calls.c (sim_resume): Differentiate between stepping and
- 	running so that a cntrl-c during a step is reported.
-
-Sun May 11 10:54:31 1997  Mark Alexander    <marka@cygnus.com>
-
-	* sim-calls.c (sim_fetch_register): Use correct reg base.
-	(sim_store_register): Ditto.
-
-Sun May 11 10:25:14 1997  Michael Meissner  <meissner@cygnus.com>
-
-	* cpu.h (tic80_trace_shift): Add declaration.
-	(TRACE_SHIFT): New macro to trace shift instructions.
-
-	* misc.c (tic80_trace_alu2): Align spacing.
-	(tic80_trace_shift): New function to trace shifts.
-
-	* insns (lmo): Add missing 0b prefix to bits.
-	(do_shift): Use ~ (unsigned32)0, instead of -1.  Use TRACE_SHIFT
-	instead of TRACE_ALU2.
-	(sl r): Use EndMask as is, instead of using Source+1 register.
-	(subu): Operands are unsigned, not signed.
-	(do_{ld,st}): Fix endian problems with ld.d/st.d.
-
-Sat May 10 12:35:47 1997  Michael Meissner  <meissner@cygnus.com>
-
-	* insns (and{.tt,.tf,.ft,.ff}): Immediate values are unsigned, not
-	signed.
-
-Fri May  9 15:47:36 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* insns (cmp_vals,do_cmp): Produce the correct bits as specified
-	by the architecture.
-	(xor): Fix xor immediate patterns to use the correct bits.
-
-Fri May  9 09:55:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (long_immediate): Adjust the CIA delay-pointer as well as
- 	the NIA when a 64bit insn.
-
-Thu May  8 11:57:47 1997  Michael Meissner  <meissner@cygnus.com>
-
-	* insns (jsr,bsr): For non-allulled calls, set r31 so that the
-	return address does not reexecute the instruction in the delay
-	slot.
-	(bbo,bbz): Complement bit number to reverse the one's complement
-	that the assembler is required to do.
-
-	* misc.c (tic80_trace_*): Change format slightly to accomidate
-	real large decimal values.
-
-Thu May  8 14:07:16 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c (sim_do_command): Implement.
-	(sim_store_register): Fix typo T2H v H2T.
-
-Wed May  7 11:48:55 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* cpu.h (TRACE_FPU2, TRACE_FPU3, TRACE_FPU2I): Add.
-	* insn: Clean up fpu tracing.
-
-	* sim-calls.c (sim_create_inferior): Start out with interrupts
- 	enabled.
-
-	* cpu.h (TRACE_SINK3), misc.c (tic80_trace_sink3): Three argument
- 	sink
-
-	* insns (rdcr, swcr, wrcr, brcr, rmo, lmo): Implement.
-
-	* insns (do_*): Remove MY_INDEX/indx argument from support functions,
- 	igen now handles this.
-	
-	* cpu.h (CR): New macro - access TIc80 control registers.
-	
-	* misc.c: New file.
-	(tic80_cr2index): New function, map control register opcode index
- 	into the internal CR enum.
-
-	* interp.c
- 	(tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): Move from
- 	here
-	* misc.c: to here.
-	
-	* Makefile.in (SIM_OBJS): Add misc.o.
-
-Tue May  6 15:22:58 1997  Mike Meissner  <meissner@cygnus.com>
-
-	* cpu.h ({,v}{S,D}P_FPR): Delete unused macros that won't work on
-	big endian hosts.
-	(tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): Declare
-	new functions.
-	(TRACE_{ALU{2,3},NOP,SINK{1,2},{,U}COND_BR,LD,ST}): New macros to
-	trace various instruction types.
-
-	* insns: Modify all instructions to support semantic tracing.
-
-	* interp.c (toplevel): Include itable.h.
-	(tic80_trace_{alu{2,3},nop,sink{1,2},{,u}cond_br,ldst}): New
-	functions to provide semantic level tracing information.
-
-Mon May  5 11:50:43 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h: Update usage of core object to reflect recent changes in
- 	../common/sim-*core.
-	* sim-calls.c (sim_open): Ditto.
-
-Mon May  5 14:10:17 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insn (cmnd): No-op cache flushes.
-	
-	* insns (do_trap): Allow writes to STDERR.
-
-	* Makefile.in (SIM_OBJS): Link in sim-fpu.o.
-	(SIM_EXTRA_LIBS): Link in the math library.
-
-	* alu.h: Add support for floating point unit using sim-alu.
-	
-	* insns (fadd, fsub, fmpy, fdiv, fcmp, frnd*): Implement.
-
-Fri May  2 14:57:14 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-calls.c: Include sim-utils.h and sim-options.h.
-
-	* sim-main.h (sim_state): Drop sim_events and sim_core members,
- 	moved to simulator base type.
-
-	* alu.h (IMEM, MEM, STORE): Update track changes in common
- 	directory.
-
-	* insns: Drop cia argument from functions, igen now handles this.
-
-	* interp.c (engine_init): Include string.h/strings.h to define
- 	memset et.al.
-
-	* sim-main.h (sim_cia): Delcare, tracking common dir changes.
-
-	* cpu.h (sim_cpu): Update instruction_address with sim_cia.
-
-Wed Apr 30 11:26:56 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* sim-main.h (signal.h): Include so that SIG* available to all
- 	callers of sig_halt.
-
-	* insns (do_shift): New function, implement shift operations.
-	(do_trap): Add handler for trap 73 - SIGTRAP.
-	
-Tue Apr 29 10:58:48 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* alu.h (MEM, STORE): Force addresses to be correctly aligned.
-
-	* insns (do_jsr): Fix.
-	(do_st, do_ld): Handle 64bit transfers.
-	(do_trap): Match libgloss.
-	(rdcr): Implement nop - Dest == r0 - variant.
-
-	* sim-calls.c (sim_create_inferior): Initialize SP.
-
-	* Makefile.in (ENGINE_H): Everything now depends on sim-options.h.
-	(support.o): Depends on ENGINE_H.
-
-	* cpu.h: Four accumulators.
-
-	* Makefile.in (tmp-igen): Include line number information in
- 	generated files.
-
-	* insns (dld, dst): Fill in.
-
-Mon Apr 28 13:02:26 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (vld): Fix instruction format wrong.
-
-Thu Apr 24 16:43:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* dc: Add additional rules so that minor opcode files are
- 	detected.
-	* insns: Enable more instructions.
-	
-	* sim-calls.c (sim_fetch_register,sim_store_register, sim_write):
- 	Implement.
-
-Thu Apr 24 00:39:51 1997  Doug Evans  <dje@canuck.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* Makefile.in (SIM_OBJS): Add sim-module.o, sim-profile.o.
-	* sim-calls.c (sim_open): Call sim_module_uninstall if argument
-	parsing fails.  Call sim_post_argv_init.
-	(sim_close): Call sim_module_uninstall.
-
-Wed Apr 23 20:05:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* insns (and, bbo, bcnd, bsr, dcache, jsr, or, xor, nor): Enable.
-  	* ic: Add fields for enabled instructions.
-
diff --git a/sim/tic80/Makefile.in b/sim/tic80/Makefile.in
deleted file mode 100644
index 7111a61..0000000
--- a/sim/tic80/Makefile.in
+++ /dev/null
@@ -1,140 +0,0 @@
-# Makefile for blah ...
-# Copyright blah ...
-
-
-
-## COMMON_PRE_CONFIG_FRAG
-
-# These variables are given default values in COMMON_PRE_CONFIG_FRAG.
-# We override the ones we need to here.
-# Not all of these need to be mentioned, only the necessary ones.
-
-# List of object files, less common parts.
-SIM_OBJS = \
-	$(SIM_NEW_COMMON_OBJS) \
-	support.o idecode.o semantics.o itable.o misc.o \
-	sim-engine.o \
-	sim-calls.o \
-	sim-hload.o \
-	sim-hrw.o \
-	sim-reason.o \
-	sim-resume.o \
-	sim-run.o \
-	sim-stop.o \
-
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = itable.h idecode.h cpu.h alu.h
-
-# List of extra libraries to link with
-SIM_EXTRA_LIBS = -lm
-
-# List of generators
-SIM_GEN=tmp-igen
-
-# List of flags to always pass to $(CC).
-
-SIM_EXTRA_CFLAGS = \
-	-DWITH_TARGET_WORD_MSB=31
-
-# List of main object files for `run'.
-SIM_RUN_OBJS = nrun.o
-
-# Dependency of `clean' to clean any extra files.
-SIM_EXTRA_CLEAN = clean-igen
-
-
-## COMMON_POST_CONFIG_FRAG
-
-# Rules need to build $(SIM_OBJS), plus whatever else the target wants.
-
-# ... target specific rules ...
-
-BUILT_SRC_FROM_IGEN = \
-	icache.h \
-	icache.c \
-	idecode.h \
-	idecode.c \
-	semantics.h \
-	semantics.c \
-	model.h \
-	model.c \
-	support.h \
-	support.c \
-	itable.h itable.c
-$(BUILT_SRC_FROM_IGEN): tmp-igen
-#
-
-.PHONY: clean-igen
-clean-igen:
-	rm -f $(BUILT_SRC_FROM_IGEN)
-	rm -f tmp-igen tmp-insns
-
-../igen/igen:
-	cd ../igen && $(MAKE)
-
-tmp-igen: $(srcdir)/tic80.dc $(srcdir)/tic80.igen $(srcdir)/tic80.ic ../igen/igen
-	cd ../igen && $(MAKE)
-	../igen/igen \
-		-F f \
-		-G direct-access \
-		-G delayed-branch \
-		-G zero-r0 \
-		-F short,emul \
-		-B 32 -H 31 \
-		-o $(srcdir)/tic80.dc \
-		-k $(srcdir)/tic80.ic \
-		-i $(srcdir)/tic80.igen \
-		-n icache.h    -hc tmp-icache.h \
-		-n icache.c    -c  tmp-icache.c \
-		-n semantics.h -hs tmp-semantics.h \
-		-n semantics.c -s  tmp-semantics.c \
-		-n idecode.h   -hd tmp-idecode.h \
-		-n idecode.c   -d  tmp-idecode.c \
-		-n model.h     -hm tmp-model.h \
-		-n model.c     -m  tmp-model.c \
-		-n support.h   -hf tmp-support.h \
-		-n support.c   -f  tmp-support.c \
-		-n itable.h    -ht tmp-itable.h \
-		-n itable.c    -t  tmp-itable.c
-	$(srcdir)/../../move-if-change tmp-icache.h icache.h
-	$(srcdir)/../../move-if-change tmp-icache.c icache.c
-	$(srcdir)/../../move-if-change tmp-idecode.h idecode.h
-	$(srcdir)/../../move-if-change tmp-idecode.c idecode.c
-	$(srcdir)/../../move-if-change tmp-semantics.h semantics.h
-	$(srcdir)/../../move-if-change tmp-semantics.c semantics.c
-	$(srcdir)/../../move-if-change tmp-model.h model.h
-	$(srcdir)/../../move-if-change tmp-model.c model.c
-	$(srcdir)/../../move-if-change tmp-support.h support.h
-	$(srcdir)/../../move-if-change tmp-support.c support.c
-	$(srcdir)/../../move-if-change tmp-itable.h itable.h
-	$(srcdir)/../../move-if-change tmp-itable.c itable.c
-	touch tmp-igen
-
-ENGINE_H = \
-	sim-main.h \
-	$(srcdir)/../common/sim-basics.h \
-	config.h \
-	$(srcdir)/../common/sim-config.h \
-	$(srcdir)/../common/sim-inline.h \
-	$(srcdir)/../common/sim-types.h \
-	$(srcdir)/../common/sim-bits.h \
-	$(srcdir)/../common/sim-endian.h \
-	$(srcdir)/../common/sim-options.h \
-	itable.h \
-	idecode.h \
-	cpu.h \
-	alu.h \
-	$(srcdir)/../common/sim-alu.h \
-	$(srcdir)/../common/sim-core.h \
-	$(srcdir)/../common/sim-events.h \
-	$(srcdir)/../common/sim-fpu.h \
-	$(srcdir)/../common/sim-engine.h \
-
-idecode.o: $(ENGINE_H)
-semantics.o: $(ENGINE_H)
-support.o: $(ENGINE_H)
-interp.o: interp.c $(ENGINE_H)
-sim-calls.o: sim-calls.c $(ENGINE_H)
-cpu.o: cpu.c $(ENGINE_H)
-misc.o: $(ENGINE_H)
\ No newline at end of file
diff --git a/sim/tic80/acconfig.h b/sim/tic80/acconfig.h
deleted file mode 100644
index f9b87a1..0000000
--- a/sim/tic80/acconfig.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-/* Define to 1 if NLS is requested.  */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have catgets and don't want to use GNU gettext.  */
-#undef HAVE_CATGETS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES.  */
-#undef HAVE_LC_MESSAGES
diff --git a/sim/tic80/alu.h b/sim/tic80/alu.h
deleted file mode 100644
index b5bc7c1..0000000
--- a/sim/tic80/alu.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Texas Instruments TMS320C80 (MVP) Simulator.
-   Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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 _TIC80_ALU_H_
-#define _TIC80_ALU_H_
-
-#define ALU_CARRY 0 /* FIXME */
-
-#define ALU32_END(TARG) \
-{ \
-  (TARG) = ALU32_RESULT; /* FIXME */ \
-}
-
-#define ALU_END(TARG) ALU32_END(TARG)
-
-#include "sim-alu.h"
-
-
-
-/* Bring data in from the cold */
-
-#define IMEM32(CIA) \
-(sim_core_read_aligned_4(STATE_CPU (sd, 0), CIA, exec_map, (CIA).ip))
-
-#define IMEM32_IMMED(CIA, N) \
-(sim_core_read_aligned_4 (STATE_CPU (sd, 0), CIA, exec_map, (CIA).ip + 4 * (N)))
-
-#define MEM(SIGN, EA, NR_BYTES) \
-((SIGN##_##NR_BYTES) sim_core_read_unaligned_##NR_BYTES (STATE_CPU (sd, 0), cia, \
-                                                         read_map, \
-                                                         (EA)))
-
-#define STORE(EA, NR_BYTES, VAL) \
-do { \
-  sim_core_write_unaligned_##NR_BYTES (STATE_CPU (sd, 0), cia, \
-                                       write_map, \
-                                       (EA), (VAL)); \
-} while (0)
-
-
-#define long_immediate(VARIABLE) \
-     unsigned_word VARIABLE = MEM (unsigned, nia.ip, 4); \
-     cia.dp += sizeof (instruction_word); \
-     nia.ip += sizeof (instruction_word); \
-     nia.dp += sizeof (instruction_word);
-
-
-
-/* Floating point support */
-
-#define IS_FP_AVAILABLE ((CPU)->cr[IE_CR] & IE_CR_IE)
-
-#include "sim-fpu.h"
-
-
-#endif
diff --git a/sim/tic80/config.in b/sim/tic80/config.in
deleted file mode 100644
index fffbc59..0000000
--- a/sim/tic80/config.in
+++ /dev/null
@@ -1,168 +0,0 @@
-/* config.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if using alloca.c.  */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-   This function is required for alloca.c support on those systems.  */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro.  */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call.  */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it.  */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work.  */
-#undef _POSIX_SOURCE
-
-/* Define as the return type of signal handlers (int or void).  */
-#undef RETSIGTYPE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
-/* Define to 1 if NLS is requested.  */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES.  */
-#undef HAVE_LC_MESSAGES
-
-/* Define if you have the __argz_count function.  */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function.  */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function.  */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the __setfpucw function.  */
-#undef HAVE___SETFPUCW
-
-/* Define if you have the dcgettext function.  */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function.  */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function.  */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the getpid function.  */
-#undef HAVE_GETPID
-
-/* Define if you have the getrusage function.  */
-#undef HAVE_GETRUSAGE
-
-/* Define if you have the kill function.  */
-#undef HAVE_KILL
-
-/* Define if you have the munmap function.  */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function.  */
-#undef HAVE_PUTENV
-
-/* Define if you have the setenv function.  */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function.  */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the sigaction function.  */
-#undef HAVE_SIGACTION
-
-/* Define if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function.  */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function.  */
-#undef HAVE_STRCHR
-
-/* Define if you have the time function.  */
-#undef HAVE_TIME
-
-/* Define if you have the <argz.h> header file.  */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <fcntl.h> header file.  */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <fpu_control.h> header file.  */
-#undef HAVE_FPU_CONTROL_H
-
-/* Define if you have the <limits.h> header file.  */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file.  */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file.  */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file.  */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file.  */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file.  */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/resource.h> header file.  */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <time.h> header file.  */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <values.h> header file.  */
-#undef HAVE_VALUES_H
diff --git a/sim/tic80/configure b/sim/tic80/configure
deleted file mode 100755
index b681188..0000000
--- a/sim/tic80/configure
+++ /dev/null
@@ -1,4459 +0,0 @@
-#! /bin/sh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-sim_inline="-DDEFAULT_INLINE=0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This file is derived from `gettext.m4'.  The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-
-
-
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-
-
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --disable-nls           do not use Native Language Support"
-ac_help="$ac_help
-  --with-included-gettext use the GNU gettext library included here"
-ac_help="$ac_help
-  --enable-maintainer-mode		Enable developer functionality."
-ac_help="$ac_help
-  --enable-sim-bswap			Use Host specific BSWAP instruction."
-ac_help="$ac_help
-  --enable-sim-cflags=opts		Extra CFLAGS for use in building simulator"
-ac_help="$ac_help
-  --enable-sim-debug=opts		Enable debugging flags"
-ac_help="$ac_help
-  --enable-sim-stdio			Specify whether to use stdio for console input/output."
-ac_help="$ac_help
-  --enable-sim-trace=opts		Enable tracing flags"
-ac_help="$ac_help
-  --enable-sim-profile=opts		Enable profiling flags"
-ac_help="$ac_help
-  --enable-sim-inline=inlines		Specify which functions should be inlined."
-ac_help="$ac_help
-  --enable-sim-endian=endian		Specify target byte endian orientation."
-ac_help="$ac_help
-  --enable-sim-alignment=align		Specify strict,  nonstrict or forced alignment of memory accesses."
-ac_help="$ac_help
-  --enable-sim-hostendian=end		Specify host byte endian orientation."
-ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
-ac_help="$ac_help
-  --enable-sim-reserved-bits		Specify whether to check reserved bits in instruction."
-ac_help="$ac_help
-  --enable-sim-bitsize=N		Specify target bitsize (32 or 64)."
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --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
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -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=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
-  fi
-else
-  CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:693: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 708 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:714: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 725 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:731: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 742 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:748: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:773: 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
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:800: 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
-  echo "$ac_t""yes" 1>&6
-  ISC=yes # If later tests want to check for ISC.
-  cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
-  if test "$GCC" = yes; then
-    CC="$CC -posix"
-  else
-    CC="$CC -Xp"
-  fi
-else
-  echo "$ac_t""no" 1>&6
-  ISC=
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:821: 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 <<EOF
-#line 826 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:834: \"$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*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 851 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 869 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 890 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:925: 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 <<EOF
-#line 930 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1000: 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 <<EOF
-#line 1007 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_inline=$ac_kw; break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
-  inline | yes) ;;
-  no) cat >> confdefs.h <<\EOF
-#define inline 
-EOF
- ;;
-  *)  cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1040: 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 <<EOF
-#line 1045 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_off_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1073: 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 <<EOF
-#line 1078 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-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:1108: 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 <<EOF
-#line 1113 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1120: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1141: 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 <<EOF
-#line 1146 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1174: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1206: 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 <<EOF
-#line 1211 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1236: 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 <<EOF
-#line 1241 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1264: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
-  break
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1291: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1318: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-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:1343: 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
-#line 1348 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1353: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1382: 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 <<EOF
-#line 1387 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1410: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1435: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-	mmap private not fixed
-	mmap private fixed at somewhere currently unmapped
-	mmap private fixed at somewhere already mapped
-	mmap shared not fixed
-	mmap shared fixed at somewhere currently unmapped
-	mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192	/* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-	char *data, *data2, *data3;
-	int i, pagesize;
-	int fd;
-
-	pagesize = getpagesize();
-
-	/*
-	 * First, make a file with some known garbage in it.
-	 */
-	data = malloc(pagesize);
-	if (!data)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		*(data + i) = rand();
-	umask(0);
-	fd = creat("conftestmmap", 0600);
-	if (fd < 0)
-		exit(1);
-	if (write(fd, data, pagesize) != pagesize)
-		exit(1);
-	close(fd);
-
-	/*
-	 * Next, try to mmap the file at a fixed address which
-	 * already has something else allocated at it.  If we can,
-	 * also make sure that we see the same garbage.
-	 */
-	fd = open("conftestmmap", O_RDWR);
-	if (fd < 0)
-		exit(1);
-	data2 = malloc(2 * pagesize);
-	if (!data2)
-		exit(1);
-	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data2 + i))
-			exit(1);
-
-	/*
-	 * Finally, make sure that changes to the mapped area
-	 * do not percolate back to the file as seen by read().
-	 * (This is a bug on some variants of i386 svr4.0.)
-	 */
-	for (i = 0; i < pagesize; ++i)
-		*(data2 + i) = *(data2 + i) + 1;
-	data3 = malloc(pagesize);
-	if (!data3)
-		exit(1);
-	if (read(fd, data3, pagesize) != pagesize)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data3 + i))
-			exit(1);
-	close(fd);
-	unlink("conftestmmap");
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:1583: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1606: 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 <<EOF
-#line 1611 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_cygwin=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1639: 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 <<EOF
-#line 1644 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mingw32=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# autoconf.info says this should be called right after AC_INIT.
-
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1718: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1739: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1757: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-# 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:1801: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-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:1831: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:1882: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1914: 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.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1925 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1930: \"$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
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1956: 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:1961: 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
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$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
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-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:1989: 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
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:2032: 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
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
-  CC_FOR_BUILD='$(CC)'
-else
-  CC_FOR_BUILD=gcc
-fi
-
-
-
-
-AR=${AR-ar}
-
-# 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:2100: 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
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-ALL_LINGUAS=
-                              
-   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-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:2135: 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
-#line 2140 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2145: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2175: 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 <<EOF
-#line 2180 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2203: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2232: 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 <<EOF
-#line 2237 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2260: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
-   fi
-
-   if test $ac_cv_header_locale_h = yes; then
-    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2294: 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 <<EOF
-#line 2299 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:2306: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
-    fi
-  fi
-   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2327: 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"
-  USE_NLS=$enableval
-else
-  USE_NLS=yes
-fi
-
-    echo "$ac_t""$USE_NLS" 1>&6
-    
-
-    USE_INCLUDED_LIBINTL=no
-
-        if test "$USE_NLS" = "yes"; then
-      cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
-
-      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2347: 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"
-  nls_cv_force_use_gnu_gettext=$withval
-else
-  nls_cv_force_use_gnu_gettext=no
-fi
-
-      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-                        		nls_cv_header_intl=
-	nls_cv_header_libgt=
-	CATOBJEXT=NONE
-
-	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2366: 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
-#line 2371 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2376: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-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:2393: 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 <<EOF
-#line 2398 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2405: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-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:2421: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2429 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:2440: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-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:2456: 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 <<EOF
-#line 2461 "configure"
-#include "confdefs.h"
-
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2468: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	   fi
-
-	   if test "$gt_cv_func_gettext_libc" = "yes" \
-	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
-	      cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-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:2496: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-	      if test "$MSGFMT" != "no"; then
-		for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2530: 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 <<EOF
-#line 2535 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2558: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-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:2585: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2621: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		cat > conftest.$ac_ext <<EOF
-#line 2653 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int _nl_msg_cat_cntr;
-			       return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  CATOBJEXT=.gmo
-		   DATADIRNAME=share
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CATOBJEXT=.mo
-		   DATADIRNAME=lib
-fi
-rm -f conftest*
-		INSTOBJEXT=.mo
-	      fi
-	    fi
-	
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-	        
-        if test "$CATOBJEXT" = "NONE"; then
-	  	  	  nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" = "yes"; then
-                INTLOBJS="\$(GETTOBJS)"
-        # 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:2693: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2727: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2763: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-        
-	USE_INCLUDED_LIBINTL=yes
-        CATOBJEXT=.gmo
-        INSTOBJEXT=.mo
-        DATADIRNAME=share
-	INTLDEPS='$(top_builddir)/../intl/libintl.a'
-	INTLLIBS=$INTLDEPS
-	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-        nls_cv_header_intl=libintl.h
-        nls_cv_header_libgt=libgettext.h
-      fi
-
-            if test "$XGETTEXT" != ":"; then
-			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
-	  XGETTEXT=":"
-	fi
-      fi
-
-      # We need to process the po/ directory.
-      POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=libintl.h
-      nls_cv_header_libgt=libgettext.h
-    fi
-
-    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-    # because some of the sources are only built for this goal.
-    if test "$PACKAGE" = gettext; then
-      USE_NLS=yes
-      USE_INCLUDED_LIBINTL=yes
-    fi
-
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-        
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2853: checking for catalogs to be installed" >&5
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       echo "$ac_t""$LINGUAS" 1>&6
-     fi
-
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-            if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   
-
-            if test -f $srcdir/po2tbl.sed.in; then
-      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:2881: 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
-#line 2886 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2891: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  msgformat=linux
-else
-  echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
-	          	 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
-      fi
-            sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-	 $srcdir/po2tbl.sed.in > po2tbl.sed
-   fi
-
-            if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   
-   
-
-   MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-   
-
-      l=
-   
-
-            if test -d $srcdir/po; then
-      test -d po || mkdir po
-      if test "x$srcdir" != "x."; then
-	 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-	    posrcprefix="$srcdir/"
-	 else
-	    posrcprefix="../$srcdir/"
-	 fi
-      else
-	 posrcprefix="../"
-      fi
-      rm -f po/POTFILES
-      sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	 < $srcdir/po/POTFILES.in > po/POTFILES
-   fi
-  
-
-# Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2960: 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
-#line 2965 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2970: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in sys/time.h sys/resource.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3000: 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
-#line 3005 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3010: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in fcntl.h fpu_control.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3040: 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
-#line 3045 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3050: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_hdr in dlfcn.h errno.h sys/stat.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3080: 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
-#line 3085 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3090: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getrusage time sigaction __setfpucw
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3119: 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 <<EOF
-#line 3124 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3147: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-# Check for socket libraries
-echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3174: checking for bind in -lsocket" >&5
-ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3182 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bind();
-
-int main() {
-bind()
-; return 0; }
-EOF
-if { (eval echo configure:3193: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lsocket $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3221: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3229 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:3240: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lnsl $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-. ${srcdir}/../../bfd/configure.host
-
-
-
-USE_MAINTAINER_MODE=no
-# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
-  enableval="$enable_maintainer_mode"
-  case "${enableval}" in
-  yes)	MAINT="" USE_MAINTAINER_MODE=yes ;;
-  no)	MAINT="#" ;;
-  *)	{ echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
-esac
-if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
-  echo "Setting maintainer mode" 6>&1
-fi
-else
-  MAINT="#"
-fi
-
-
-
-# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
-if test "${enable_sim_bswap+set}" = set; then
-  enableval="$enable_sim_bswap"
-  case "${enableval}" in
-  yes)	sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
-  no)	sim_bswap="-DWITH_BSWAP=0";;
-  *)	{ echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
-  echo "Setting bswap flags = $sim_bswap" 6>&1
-fi
-else
-  sim_bswap=""
-fi
-
-
-
-# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
-if test "${enable_sim_cflags+set}" = set; then
-  enableval="$enable_sim_cflags"
-  case "${enableval}" in
-  yes)	 sim_cflags="-O2 -fomit-frame-pointer";;
-  trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
-  no)	 sim_cflags="";;
-  *)	 sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
-  echo "Setting sim cflags = $sim_cflags" 6>&1
-fi
-else
-  sim_cflags=""
-fi
-
-
-
-# Check whether --enable-sim-debug or --disable-sim-debug was given.
-if test "${enable_sim_debug+set}" = set; then
-  enableval="$enable_sim_debug"
-  case "${enableval}" in
-  yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
-  no)  sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
-  *)   sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
-  echo "Setting sim debug = $sim_debug" 6>&1
-fi
-else
-  sim_debug=""
-fi
-
-
-
-# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
-if test "${enable_sim_stdio+set}" = set; then
-  enableval="$enable_sim_stdio"
-  case "${enableval}" in
-  yes)	sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
-  no)	sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
-  *)	{ echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
-  echo "Setting stdio flags = $sim_stdio" 6>&1
-fi
-else
-  sim_stdio=""
-fi
-
-
-
-# Check whether --enable-sim-trace or --disable-sim-trace was given.
-if test "${enable_sim_trace+set}" = set; then
-  enableval="$enable_sim_trace"
-  case "${enableval}" in
-  yes)	sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
-  no)	sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
-  [-0-9]*)
-	sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
-  [a-z]*)
-	sim_trace=""
-	for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-	  if test x"$sim_trace" = x; then
-	    sim_trace="-DWITH_TRACE='(TRACE_$x"
-	  else
-	    sim_trace="${sim_trace}|TRACE_$x"
-	  fi
-	done
-	sim_trace="$sim_trace)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
-  echo "Setting sim trace = $sim_trace" 6>&1
-fi
-else
-  sim_trace=""
-fi
-
-
-
-# Check whether --enable-sim-profile or --disable-sim-profile was given.
-if test "${enable_sim_profile+set}" = set; then
-  enableval="$enable_sim_profile"
-  case "${enableval}" in
-  yes)	sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
-  no)	sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
-  [-0-9]*)
-	sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
-  [a-z]*)
-	sim_profile=""
-	for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-	  if test x"$sim_profile" = x; then
-	    sim_profile="-DWITH_PROFILE='(PROFILE_$x"
-	  else
-	    sim_profile="${sim_profile}|PROFILE_$x"
-	  fi
-	done
-	sim_profile="$sim_profile)'" ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
-  echo "Setting sim profile = $sim_profile" 6>&1
-fi
-else
-  sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"
-fi
-
-
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3416: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3421 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int main() {
-int i;
-; return 0; }
-EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_type_signal=void
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_signal=int
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-
-
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3460: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
-  ac_cv_exeext=.exe
-else
-  rm -f conftest*
-  echo 'int main () { return 0; }' > conftest.$ac_ext
-  ac_cv_exeext=
-  if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
-    for file in conftest.*; do
-      case $file in
-      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
-      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
-      esac
-    done
-  else
-    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
-  fi
-  rm -f conftest*
-  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-
-sim_link_files=
-sim_link_links=
-
-sim_link_links=tconfig.h
-if test -f ${srcdir}/tconfig.in
-then
-  sim_link_files=tconfig.in
-else
-  sim_link_files=../common/tconfig.in
-fi
-
-# targ-vals.def points to the libc macro description file.
-case "${target}" in
-*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
-esac
-sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
-sim_link_links="${sim_link_links} targ-vals.def"
-
-
-
-
-default_sim_inline="-DDEFAULT_INLINE=0"
-# Check whether --enable-sim-inline or --disable-sim-inline was given.
-if test "${enable_sim_inline+set}" = set; then
-  enableval="$enable_sim_inline"
-  sim_inline=""
-case "$enableval" in
-  no)		sim_inline="-DDEFAULT_INLINE=0";;
-  0)		sim_inline="-DDEFAULT_INLINE=0";;
-  yes | 2)	sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
-  1)		sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
-  *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
-       new_flag=""
-       case "$x" in
-	 *_INLINE=*)	new_flag="-D$x";;
-	 *=*)		new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
-	 *_INLINE)	new_flag="-D$x=ALL_C_INLINE";;
-	 *)		new_flag="-D$x""_INLINE=ALL_C_INLINE";;
-       esac
-       if test x"$sim_inline" = x""; then
-	 sim_inline="$new_flag"
-       else
-	 sim_inline="$sim_inline $new_flag"
-       fi
-     done;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
-  echo "Setting inline flags = $sim_inline" 6>&1
-fi
-else
-  
-if test "x$cross_compiling" = "xno"; then
-  if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
-    sim_inline="${default_sim_inline}"
-    if test x"$silent" != x"yes"; then
-      echo "Setting inline flags = $sim_inline" 6>&1
-    fi
-  else
-    sim_inline=""
-  fi
-else
-  sim_inline="-DDEFAULT_INLINE=0"
-fi
-fi
-
-
-wire_endian="LITTLE_ENDIAN"
-default_endian=""
-# Check whether --enable-sim-endian or --disable-sim-endian was given.
-if test "${enable_sim_endian+set}" = set; then
-  enableval="$enable_sim_endian"
-  case "${enableval}" in
-  b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
-  l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
-  yes)	 if test x"$wire_endian" != x; then
-	   sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
-	 else
-           if test x"$default_endian" != x; then
-	     sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
-	   else
-	     echo "No hard-wired endian for target $target" 1>&6
-	     sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
-	   fi
-	 fi;;
-  no)	 if test x"$default_endian" != x; then
-	   sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-	 else
-	   if test x"$wire_endian" != x; then
-	     sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
-	   else
-	     echo "No default endian for target $target" 1>&6
-	     sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
-	   fi
-	 fi;;
-  *)	 { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
-  echo "Setting endian flags = $sim_endian" 6>&1
-fi
-else
-  if test x"$default_endian" != x; then
-  sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
-else
-  if test x"$wire_endian" != x; then
-    sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
-  else
-    sim_endian=
-  fi
-fi
-fi
-
-wire_alignment="FORCED_ALIGNMENT"
-default_alignment=""
-
-# Check whether --enable-sim-alignment or --disable-sim-alignment was given.
-if test "${enable_sim_alignment+set}" = set; then
-  enableval="$enable_sim_alignment"
-  case "${enableval}" in
-  strict | STRICT)       sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
-  nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
-  forced | FORCED)       sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
-  yes) if test x"$wire_alignment" != x; then
-	 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
-       else
-         if test x"$default_alignment" != x; then
-           sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
-         else
-	   echo "No hard-wired alignment for target $target" 1>&6
-	   sim_alignment="-DWITH_ALIGNMENT=0"
-         fi
-       fi;;
-  no)  if test x"$default_alignment" != x; then
-	 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-       else
-         if test x"$wire_alignment" != x; then
-	   sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
-         else
-           echo "No default alignment for target $target" 1>&6
-           sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
-         fi
-       fi;;
-  *)   { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
-  echo "Setting alignment flags = $sim_alignment" 6>&1
-fi
-else
-  if test x"$default_alignment" != x; then
-  sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
-else
-  if test x"$wire_alignment" != x; then
-    sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
-  else
-    sim_alignment=
-  fi
-fi
-fi
-
-
-# Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
-if test "${enable_sim_hostendian+set}" = set; then
-  enableval="$enable_sim_hostendian"
-  case "${enableval}" in
-  no)	 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
-  b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
-  l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
-  *)	 { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
-  echo "Setting hostendian flags = $sim_hostendian" 6>&1
-fi
-else
-  
-if test "x$cross_compiling" = "xno"; then
-  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3666: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 3673 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 3688 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:3699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_bigendian=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_bigendian=no
-fi
-rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3719 "configure"
-#include "confdefs.h"
-main () {
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_bigendian=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
-  if test $ac_cv_c_bigendian = yes; then
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
-  else
-    sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
-  fi
-else
-  sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
-fi
-fi
-
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
-  enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
-  yes)	;;
-  no)	build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
-fi
-WARN_CFLAGS=""
-WERROR_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
-else
-  build_warnings=""
-fi
-
-
-default_sim_reserved_bits="1"
-# Check whether --enable-sim-reserved-bits or --disable-sim-reserved-bits was given.
-if test "${enable_sim_reserved_bits+set}" = set; then
-  enableval="$enable_sim_reserved_bits"
-  case "${enableval}" in
-  yes)	sim_reserved_bits="-DWITH_RESERVED_BITS=1";;
-  no)	sim_reserved_bits="-DWITH_RESERVED_BITS=0";;
-  *)	{ echo "configure: error: "--enable-sim-reserved-bits does not take a value"" 1>&2; exit 1; }; sim_reserved_bits="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_reserved_bits" != x""; then
-  echo "Setting reserved flags = $sim_reserved_bits" 6>&1
-fi
-else
-  sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"
-fi
-
-wire_word_bitsize="32"
-wire_word_msb="31"
-wire_address_bitsize=""
-wire_cell_bitsize=""
-# Check whether --enable-sim-bitsize or --disable-sim-bitsize was given.
-if test "${enable_sim_bitsize+set}" = set; then
-  enableval="$enable_sim_bitsize"
-  sim_bitsize=
-case "${enableval}" in
-  64,63 | 64,63,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63";;
-  32,31 | 32,31,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31";;
-  64,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
-  32,0 | 64,0,* ) sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0";;
-  32) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
-        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31"
-      else
-        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=0"
-      fi ;;
-  64) if test x"$wire_word_msb" != x -a x"$wire_word_msb" != x0; then
-        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=63"
-      else
-        sim_bitsize="-DWITH_TARGET_WORD_BITSIZE=64 -DWITH_TARGET_WORD_MSB=0"
-      fi ;;
-  *)  { echo "configure: error: "--enable-sim-bitsize was given $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-# address bitsize
-tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9]*,*//"`
-case x"${tmp}" in
-  x ) ;;
-  x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=32" ;;
-  x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_ADDRESS_BITSIZE=64" ;;
-  * ) { echo "configure: error: "--enable-sim-bitsize was given address size $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-# cell bitsize
-tmp=`echo "${enableval}" | sed -e "s/^[0-9]*,*[0-9*]*,*[0-9]*,*//"`
-case x"${tmp}" in
-  x ) ;;
-  x32 | x32,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=32" ;;
-  x64 | x64,* ) sim_bitsize="${sim_bitsize} -DWITH_TARGET_CELL_BITSIZE=64" ;;
-  * ) { echo "configure: error: "--enable-sim-bitsize was given cell size $enableval.  Expected 32 or 64"" 1>&2; exit 1; } ;;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
-  echo "Setting bitsize flags = $sim_bitsize" 6>&1
-fi
-else
-  sim_bitsize=""
-if test x"$wire_word_bitsize" != x; then
-  sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_BITSIZE=$wire_word_bitsize"
-fi
-if test x"$wire_word_msb" != x; then
-  sim_bitsize="$sim_bitsize -DWITH_TARGET_WORD_MSB=$wire_word_msb"
-fi
-if test x"$wire_address_bitsize" != x; then
-  sim_bitsize="$sim_bitsize -DWITH_TARGET_ADDRESS_BITSIZE=$wire_address_bitsize"
-fi
-if test x"$wire_cell_bitsize" != x; then
-  sim_bitsize="$sim_bitsize -DWITH_TARGET_CELL_BITSIZE=$wire_cell_bitsize"
-fi
-fi
-
-
-for ac_hdr in stdlib.h unistd.h string.h strings.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3881: 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
-#line 3886 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3891: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpid kill
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3920: 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 <<EOF
-#line 3925 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3948: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@sim_environment@%$sim_environment%g
-s%@sim_alignment@%$sim_alignment%g
-s%@sim_assert@%$sim_assert%g
-s%@sim_bitsize@%$sim_bitsize%g
-s%@sim_endian@%$sim_endian%g
-s%@sim_hostendian@%$sim_hostendian%g
-s%@sim_float@%$sim_float%g
-s%@sim_scache@%$sim_scache%g
-s%@sim_default_model@%$sim_default_model%g
-s%@sim_hw_cflags@%$sim_hw_cflags%g
-s%@sim_hw_objs@%$sim_hw_objs%g
-s%@sim_hw@%$sim_hw%g
-s%@sim_inline@%$sim_inline%g
-s%@sim_packages@%$sim_packages%g
-s%@sim_regparm@%$sim_regparm%g
-s%@sim_reserved_bits@%$sim_reserved_bits%g
-s%@sim_smp@%$sim_smp%g
-s%@sim_stdcall@%$sim_stdcall%g
-s%@sim_xor_endian@%$sim_xor_endian%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-s%@MAINT@%$MAINT%g
-s%@sim_bswap@%$sim_bswap%g
-s%@sim_cflags@%$sim_cflags%g
-s%@sim_debug@%$sim_debug%g
-s%@sim_stdio@%$sim_stdio%g
-s%@sim_trace@%$sim_trace%g
-s%@sim_profile@%$sim_profile%g
-s%@EXEEXT@%$EXEEXT%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-ac_sources="$sim_link_files"
-ac_dests="$sim_link_links"
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-srcdir=$ac_given_srcdir
-while test -n "$ac_sources"; do
-  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
-  set $ac_sources; ac_source=$1; shift; ac_sources=$*
-
-  echo "linking $srcdir/$ac_source to $ac_dest"
-
-  if test ! -r $srcdir/$ac_source; then
-    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
-  fi
-  rm -f $ac_dest
-
-  # Make relative symlinks.
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    # The dest file is in a subdirectory.
-    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
-    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dest_dir_suffix.
-    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dest_dir_suffix= ac_dots=
-  fi
-
-  case "$srcdir" in
-  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
-  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
-  esac
-
-  # Make a symlink if possible; otherwise try a hard link.
-  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
-    ln $srcdir/$ac_source $ac_dest; then :
-  else
-    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
-  fi
-done
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-case "x$CONFIG_FILES" in
- xMakefile*)
-   echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
-   rm -f Makesim1.tmp Makesim2.tmp Makefile
-   sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
-   sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
-   sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
-	-e '/^## COMMON_POST_/ r Makesim2.tmp' \
-	<Makefile.sim >Makefile
-   rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
-   ;;
- esac
- case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/sim/tic80/configure.in b/sim/tic80/configure.in
deleted file mode 100644
index 730b62e..0000000
--- a/sim/tic80/configure.in
+++ /dev/null
@@ -1,21 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
-AC_PREREQ(2.5)dnl
-AC_INIT(Makefile.in)
-
-SIM_AC_COMMON
-
-dnl Options available in this module
-SIM_AC_OPTION_INLINE(0)
-SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN)
-SIM_AC_OPTION_ALIGNMENT(FORCED_ALIGNMENT)
-SIM_AC_OPTION_HOSTENDIAN
-SIM_AC_OPTION_WARNINGS
-SIM_AC_OPTION_RESERVED_BITS(1)
-SIM_AC_OPTION_BITSIZE(32,31)
-
-dnl For UNIX emulation
-AC_CHECK_HEADERS(stdlib.h unistd.h string.h strings.h)
-AC_CHECK_FUNCS(getpid kill)
-
-SIM_AC_OUTPUT
diff --git a/sim/tic80/cpu.h b/sim/tic80/cpu.h
deleted file mode 100644
index 642c181..0000000
--- a/sim/tic80/cpu.h
+++ /dev/null
@@ -1,345 +0,0 @@
-/* TIc80 Simulator.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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.  */
-
-
-
-/* TI C80 control registers */
-
-typedef enum {
-  EPC_CR,
-  EIP_CR,
-  CONFIG_CR,
-  INTPEN_CR,
-  IE_CR,
-  FPST_CR,
-  PPERROR_CR,
-  PKTREQ_CR,
-  TCOUNT_CR,
-  TSCALE_CR,
-  FLTOP_CR,
-  FLTADR_CR,
-  FLTTAG_CR,
-  FLTDLT_CR,
-  FLTDTH_CR,
-  FLT005_CR,
-  FLT006_CR,
-  FLT007_CR,
-  FLT008_CR,
-  FLT009_CR,
-  FLT010_CR,
-  FLT011_CR,
-  FLT012_CR,
-  FLT013_CR,
-  FLT014_CR,
-  FLT015_CR,
-  SYSSTK_CR,
-  SYSTMP_CR,
-  MPC_CR,
-  MIP_CR,
-  ECOMCNTL_CR,
-  ANASTAT_CR,
-  BRK1_CR,
-  BRK2_CR,
-  ITAG0_CR,
-  ITAG1_CR,
-  ITAG2_CR,
-  ITAG3_CR,
-  ITAG4_CR,
-  ITAG5_CR,
-  ITAG6_CR,
-  ITAG7_CR,
-  ITAG8_CR,
-  ITAG9_CR,
-  ITAG10_CR,
-  ITAG11_CR,
-  ITAG12_CR,
-  ITAG13_CR,
-  ITAG14_CR,
-  ITAG15_CR,
-  ILRU_CR,
-  DTAG0_CR,
-  DTAG1_CR,
-  DTAG2_CR,
-  DTAG3_CR,
-  DTAG4_CR,
-  DTAG5_CR,
-  DTAG6_CR,
-  DTAG7_CR,
-  DTAG8_CR,
-  DTAG9_CR,
-  DTAG10_CR,
-  DTAG11_CR,
-  DTAG12_CR,
-  DTAG13_CR,
-  DTAG14_CR,
-  DTAG15_CR,
-  DLRU_CR,
-  IN0P_CR,
-  IN1P_CR,
-  OUTP_CR,
-  SCRATCH_CR,
-  nr_tic80_control_regs,
-} tic80_control_regs;
-
-/* extern int tic80_cr2index (tic80_control_regs reg); */
-
-/* Map an instruction CR index onto the corresponding internal cr enum
-   or SCRATCH_CR if the index is invalid */
-
-extern tic80_control_regs tic80_index2cr (int index);
-
-
-/* TIc80 interrupt register bits */
-
-enum {
-  IE_CR_PE = BIT32(31),
-  IE_CR_X4 = BIT32(30),
-  IE_CR_X3 = BIT32(29),
-  IE_CR_BP = BIT32(28),
-  IE_CR_PB = BIT32(27),
-  IE_CR_PC = BIT32(26),
-  IE_CR_MI = BIT32(25),
-  /**/
-  IE_CR_P3 = BIT32(19),
-  IE_CR_P2 = BIT32(18),
-  IE_CR_P1 = BIT32(17),
-  IE_CR_P0 = BIT32(16),
-  IE_CR_IO = BIT32(15),
-  IE_CR_MF = BIT32(14),
-  /**/
-  IE_CR_X2 = BIT32(12),
-  IE_CR_X1 = BIT32(11),
-  IE_CR_TI = BIT32(10),
-  IE_CR_F1 = BIT32(9),
-  IE_CR_F0 = BIT32(8),
-  IE_CR_FX = BIT32(7),
-  IE_CR_FU = BIT32(6),
-  IE_CR_FO = BIT32(5),
-  /**/
-  IE_CR_FZ = BIT32(3),
-  IE_CR_FI = BIT32(2),
-  /**/
-  IE_CR_IE = BIT32(0),
-};
-
-
-
-
-struct _sim_cpu {
-  unsigned32 reg[32];
-  unsigned64 acc[4];
-  unsigned32 cr[nr_tic80_control_regs];
-  int is_user_mode; /* hidden mode latch */
-  sim_cia cia;
-  sim_cpu_base base;
-};
-
-#define CIA_GET(CPU) ((CPU)->cia)
-#define CIA_SET(CPU,VAL) ((CPU)->cia = (VAL))
-
-#define GPR(N) ((CPU)->reg[N])
-#define GPR_CLEAR(N) (GPR((N)) = 0)
-#define ACC(N) ((CPU)->acc[N])
-#define CR(N) ((CPU)->cr[tic80_index2cr ((N))])
-
-
-
-#if defined(WITH_TRACE)
-extern char *tic80_trace_alu3	  PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_cmp	  PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_alu2	  PARAMS ((int, unsigned32, unsigned32));
-extern char *tic80_trace_shift	  PARAMS ((int, unsigned32, unsigned32, int, int, int, int, int));
-extern void tic80_trace_fpu3	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu2	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu1	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, sim_fpu *));
-extern void tic80_trace_fpu2i	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
-extern void tic80_trace_fpu2cmp	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, unsigned32, sim_fpu *, sim_fpu *));
-extern char *tic80_trace_nop	  PARAMS ((int));
-extern char *tic80_trace_sink1	  PARAMS ((int, unsigned32));
-extern char *tic80_trace_sink2	  PARAMS ((int, unsigned32, unsigned32));
-extern char *tic80_trace_sink3	  PARAMS ((int, unsigned32, unsigned32, unsigned32));
-extern char *tic80_trace_cond_br  PARAMS ((int, int, unsigned32, unsigned32, int, int));
-extern char *tic80_trace_ucond_br PARAMS ((int, unsigned32));
-extern void tic80_trace_ldst	  PARAMS ((SIM_DESC, sim_cpu *, sim_cia, int, int, int, int, unsigned32, unsigned32, unsigned32));
-
-#define TRACE_ALU3(indx, result, input1, input2)			\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "alu",			\
-		    tic80_trace_alu3 (indx, result, input1, input2));	\
-  }									\
-} while (0)
-
-#define TRACE_CMP(indx, result, input1, input2)				\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "alu",			\
-		    tic80_trace_cmp (indx, result, input1, input2));	\
-  }									\
-} while (0)
-
-#define TRACE_ALU2(indx, result, input)					\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "alu",			\
-		    tic80_trace_alu2 (indx, result, input));		\
-  }									\
-} while (0)
-
-#define TRACE_SHIFT(indx, result, input, i, n, merge, endmask, rotate)	\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "shift",			\
-		    tic80_trace_shift (indx, result, input, i, n,	\
-				       merge, endmask, rotate));	\
-  }									\
-} while (0)
-
-#define TRACE_FPU3(result, input1, input2)				\
-do {									\
-  if (TRACE_FPU_P (CPU)) {						\
-    tic80_trace_fpu3 (SD, CPU, cia, MY_INDEX, 				\
-		      &result, &input1, &input2);			\
-  }									\
-} while (0)
-
-#define TRACE_FPU2(result, input)					\
-do {									\
-  if (TRACE_FPU_P (CPU)) {						\
-    tic80_trace_fpu2 (SD, CPU, cia, MY_INDEX, 				\
-		      &result, &input);					\
-  }									\
-} while (0)
-
-#define TRACE_FPU1(result)						\
-do {									\
-  if (TRACE_FPU_P (CPU)) {						\
-    tic80_trace_fpu1 (SD, CPU, cia, MY_INDEX, 				\
-		      &result);						\
-  }									\
-} while (0)
-
-#define TRACE_FPU2I(result, input1, input2)				\
-do {									\
-  if (TRACE_FPU_P (CPU)) {						\
-    tic80_trace_fpu2i (SD, CPU, cia, MY_INDEX, 				\
-		       result, &input1, &input2);			\
-  }									\
-} while (0)
-
-#define TRACE_FPU2CMP(result, input1, input2)				\
-do {									\
-  if (TRACE_FPU_P (CPU)) {						\
-    tic80_trace_fpu2cmp (SD, CPU, cia, MY_INDEX,			\
-			 result, &input1, &input2);			\
-  }									\
-} while (0)
-
-#define TRACE_NOP(indx)							\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "nop",			\
-		    tic80_trace_nop (indx));				\
-  }									\
-} while (0)
-
-#define TRACE_SINK1(indx, input)					\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "nop",			\
-		    tic80_trace_sink1 (indx, input));			\
-  }									\
-} while (0)
-
-#define TRACE_SINK2(indx, input1, input2)				\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "nop",			\
-		    tic80_trace_sink2 (indx, input1, input2));		\
-  }									\
-} while (0)
-
-#define TRACE_SINK3(indx, input1, input2, input3)			\
-do {									\
-  if (TRACE_ALU_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "nop",			\
-		    tic80_trace_sink3 (indx, input1, input2, input3));	\
-  }									\
-} while (0)
-
-#define TRACE_COND_BR(indx, jump_p, cond, target, size, code)		\
-do {									\
-  if (TRACE_BRANCH_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "branch",			\
-		    tic80_trace_cond_br (indx, jump_p, cond, target,	\
-					 size, code));			\
-  }									\
-} while (0)
-
-#define TRACE_UCOND_BR(indx, target)					\
-do {									\
-  if (TRACE_BRANCH_P (CPU)) {						\
-    trace_one_insn (SD, CPU, cia.ip, 1, itable[indx].file,		\
-		    itable[indx].line_nr, "branch",			\
-		    tic80_trace_ucond_br (indx, target));		\
-  }									\
-} while (0)
-
-#define TRACE_LD(result, m, s, addr1, addr2)				\
-do {									\
-  if (TRACE_MEMORY_P (CPU)) {						\
-    tic80_trace_ldst (SD, CPU, cia, MY_INDEX, 				\
- 		      0, m, s, result, addr1, addr2);			\
-  }									\
-} while (0)
-
-#define TRACE_ST(value, m, s, addr1, addr2)				\
-do {									\
-  if (TRACE_MEMORY_P (CPU)) {						\
-    tic80_trace_ldst (SD, CPU, cia, MY_INDEX, 				\
-		      1, m, s, value, addr1, addr2);			\
-  }									\
-} while (0)
-
-#else
-#define TRACE_ALU3(indx, result, input1, input2)
-#define TRACE_ALU2(indx, result, input)
-#define TRACE_FPU3(result, input1, input2)
-#define TRACE_FPU2(result, input)
-#define TRACE_FPU1(result)
-#define TRACE_FPU2I(result, input1, input2)
-#define TRACE_NOP(indx)
-#define TRACE_SINK1(indx, input)
-#define TRACE_SINK2(indx, input1, input2)
-#define TRACE_SINK3(indx, input1, input2, input3)
-#define TRACE_COND_BR(indx, jump_p, cond, target, size, code)
-#define TRACE_UCOND_BR(indx, target)
-#define TRACE_LD(m, s, result, addr1, addr2)
-#define TRACE_ST(m, s, value, addr1, addr2)
-#endif
diff --git a/sim/tic80/interp.c b/sim/tic80/interp.c
deleted file mode 100644
index 17f06d4..0000000
--- a/sim/tic80/interp.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*  This file is part of the GDB simulators.
-
-    Copyright (C) 1997, Free Software Foundation
-    Condtributed by Cyngnus Solutions.
-
-    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 "sim-main.h"
-
-#include "idecode.h"
-#include "itable.h"
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-#if 0
-
-void
-engine_error (SIM_DESC sd,
-	      sim_cpu *cpu,
-	      instruction_address cia,
-	      const char *fmt,
-	      ...)
-{
-  va_list ap;
-  va_start (ap, fmt);
-  sim_io_evprintf (sd, fmt, ap);
-  va_end (ap);
-
-  sim_halt (sd, cpu, NULL, cia, sim_stopped, SIGABRT);
-}
-
-void
-engine_halt (SIM_DESC sd,
-	     sim_cpu *cpu,
-	     instruction_address cia,
-	     enum sim_stop reason,
-	     int siggnal)
-{
-  if (!sd->halt_ok)
-    sim_io_error (sd, "engine_halt - bad longjmp");
-  sd->reason = reason;
-  sd->siggnal = siggnal;
-  sd->halt_ok = 0;
-  sd->restart_ok = 0;
-  if (cpu != NULL)
-    cpu->cia = cia;
-  longjmp (sd->path_to_halt, 1);
-}
-
-void
-engine_restart (SIM_DESC sd,
-		sim_cpu *cpu,
-		instruction_address cia)
-{
-  if (!sd->restart_ok)
-    sim_io_error (sd, "engine_restart - bad longjmp");
-  sd->restart_ok = 0;
-  cpu->cia = cia;
-  longjmp(sd->path_to_restart, 1);
-}
-
-
-void
-engine_run_until_stop (SIM_DESC sd,
-		       volatile int *keep_running)
-{
-  if (!setjmp (sd->path_to_halt))
-    {
-      instruction_address cia;
-      sim_cpu *cpu = STATE_CPU (sd, 0);
-      sd->halt_ok = 1;
-      setjmp (sd->path_to_restart);
-      sd->restart_ok = 1;
-      cia = cpu->cia;
-      do
-	{
-	  instruction_word insn = IMEM (cia);
-	  cia = idecode_issue (sd, insn, cia);
-	}
-      while (*keep_running);
-      engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGINT);
-    }
-}
-
-
-void
-engine_step (SIM_DESC sd)
-{
-  if (!setjmp (sd->path_to_halt))
-    {
-      instruction_address cia;
-      instruction_word insn;
-      sim_cpu *cpu = STATE_CPU (sd, 0);
-      sd->halt_ok = 1;
-      setjmp (sd->path_to_restart);
-      sd->restart_ok = 1;
-      cia = cpu->cia;
-      insn = IMEM (cia);
-      cia = idecode_issue (sd, insn, cia);
-      engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGTRAP);
-    }
-}
-
-#endif
diff --git a/sim/tic80/misc.c b/sim/tic80/misc.c
deleted file mode 100644
index fc7fbec..0000000
--- a/sim/tic80/misc.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* TIc80 Simulator.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of 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 "sim-main.h"
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-tic80_control_regs
-tic80_index2cr (int index)
-{
-  switch (index)
-    {
-    case 0x0000: return EPC_CR;
-    case 0x0001: return EIP_CR;
-    case 0x0002: return CONFIG_CR;
-    case 0x0004: return INTPEN_CR;
-    case 0x0006: return IE_CR;
-    case 0x0008: return FPST_CR;
-    case 0x000A: return PPERROR_CR;
-    case 0x000D: return PKTREQ_CR;
-    case 0x000E: return TCOUNT_CR;
-    case 0x000F: return TSCALE_CR;
-    case 0x0010: return FLTOP_CR;
-    case 0x0011: return FLTADR_CR;
-    case 0x0012: return FLTTAG_CR;
-    case 0x0013: return FLTDLT_CR;
-    case 0x0014: return FLTDTH_CR;
-    case 0x0015: return FLT005_CR;
-    case 0x0016: return FLT006_CR;
-    case 0x0017: return FLT007_CR;
-    case 0x0018: return FLT008_CR;
-    case 0x0019: return FLT009_CR;
-    case 0x001a: return FLT010_CR;
-    case 0x001b: return FLT011_CR;
-    case 0x001c: return FLT012_CR;
-    case 0x001d: return FLT013_CR;
-    case 0x001e: return FLT014_CR;
-    case 0x001f: return FLT015_CR;
-    case 0x0020: return SYSSTK_CR;
-    case 0x0021: return SYSTMP_CR;
-    case 0x0030: return MPC_CR;
-    case 0x0031: return MIP_CR;
-    case 0x0033: return ECOMCNTL_CR;
-    case 0x0034: return ANASTAT_CR;
-    case 0x0039: return BRK1_CR;
-    case 0x003A: return BRK2_CR;
-    case 0x0200: return ITAG0_CR;
-    case 0x0201: return ITAG1_CR;
-    case 0x0202: return ITAG2_CR;
-    case 0x0203: return ITAG3_CR;
-    case 0x0204: return ITAG4_CR;
-    case 0x0205: return ITAG5_CR;
-    case 0x0206: return ITAG6_CR;
-    case 0x0207: return ITAG7_CR;
-    case 0x0208: return ITAG8_CR;
-    case 0x0209: return ITAG9_CR;
-    case 0x020a: return ITAG10_CR;
-    case 0x020b: return ITAG11_CR;
-    case 0x020c: return ITAG12_CR;
-    case 0x020d: return ITAG13_CR;
-    case 0x020e: return ITAG14_CR;
-    case 0x020f: return ITAG15_CR;
-    case 0x0300: return ILRU_CR;
-    case 0x0400: return DTAG0_CR;
-    case 0x0401: return DTAG1_CR;
-    case 0x0402: return DTAG2_CR;
-    case 0x0403: return DTAG3_CR;
-    case 0x0404: return DTAG4_CR;
-    case 0x0405: return DTAG5_CR;
-    case 0x0406: return DTAG6_CR;
-    case 0x0407: return DTAG7_CR;
-    case 0x0408: return DTAG8_CR;
-    case 0x0409: return DTAG9_CR;
-    case 0x040a: return DTAG10_CR;
-    case 0x040b: return DTAG11_CR;
-    case 0x040c: return DTAG12_CR;
-    case 0x040d: return DTAG13_CR;
-    case 0x040e: return DTAG14_CR;
-    case 0x040f: return DTAG15_CR;
-    case 0x0500: return DLRU_CR;
-    case 0x4000: return IN0P_CR;
-    case 0x4001: return IN1P_CR;
-    case 0x4002: return OUTP_CR;
-    default: return SCRATCH_CR;
-    }
-}
-
-
-
-#if defined(WITH_TRACE)
-/* Tracing support routines */
-
-static char tic80_trace_buffer[1024];
-static int  tic80_size_name;
-
-#define SIZE_HEX	8
-#define SIZE_DECIMAL	11
-
-/* Initialize tracing by calculating the maximum name size */
-static void
-tic80_init_trace (void)
-{
-  int i;
-  int len, max_len = 0;
-
-  for (i = 0; i < (int)nr_itable_entries; i++) {
-    len = strlen (itable[i].name);
-    if (len > max_len)
-      max_len = len;
-  }
-
-  tic80_size_name = max_len + sizeof(":m") - 1 + sizeof (":s") - 1;
-}
-
-/* Given an integer which is the result of a comparison, return a string
-   giving which bits are set.  */
-
-static char *
-tic80_trace_cmp_internal (unsigned32 flag)
-{
-  struct cmp_bits { unsigned32 bit; char *string; };
-  static char buffer[32*8];
-  static struct cmp_bits bits[] =
-  {
-    { BIT32(29), "hs" },
-    { BIT32(28), "lo" },
-    { BIT32(27), "ls" },
-    { BIT32(26), "hi" },
-    { BIT32(25), "ge" },
-    { BIT32(24), "lt" },
-    { BIT32(23), "le" },
-    { BIT32(22), "gt" },
-    { BIT32(21), "ne" },
-    { BIT32(20), "eq" },
-
-    { BIT32(19), "hs.h" },
-    { BIT32(18), "lo.h" },
-    { BIT32(17), "ls.h" },
-    { BIT32(16), "hi.h" },
-    { BIT32(15), "ge.h" },
-    { BIT32(14), "lt.h" },
-    { BIT32(13), "le.h" },
-    { BIT32(12), "gt.h" },
-    { BIT32(11), "ne.h" },
-    { BIT32(10), "eq.h" },
-
-    { BIT32( 9), "hs.b" },
-    { BIT32( 8), "lo.b" },
-    { BIT32( 7), "ls.b" },
-    { BIT32( 6), "hi.b" },
-    { BIT32( 5), "ge.b" },
-    { BIT32( 4), "lt.b" },
-    { BIT32( 3), "le.b" },
-    { BIT32( 2), "gt.b" },
-    { BIT32( 1), "ne.b" },
-    { BIT32( 0), "eq.b" },
-    { 0,	 (char *)0 },
-  };
-
-  int i;
-  char *p = buffer;
-
-  for (i = 0; bits[i].bit != 0; i++)
-    {
-      if ((flag & bits[i].bit) != 0)
-	{
-	  if (p != buffer)
-	    *p++ = ' ';
-
-	  strcpy (p, bits[i].string);
-	  p += strlen (p);
-	}
-    }
-
-  *p = '\0';
-  return buffer;
-}
-
-/* Trace the result of an ALU operation with 2 integer inputs and an integer output */
-char *
-tic80_trace_alu3 (int indx,
-		  unsigned32 result,
-		  unsigned32 input1,
-		  unsigned32 input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld => 0x%.*lx/%*ld",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
-	   SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
-	   SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of an ALU operation with 2 integer inputs and an integer output
-   that sets the bits from a compare instruction.  */
-char *
-tic80_trace_cmp (int indx,
-		 unsigned32 result,
-		 unsigned32 input1,
-		 unsigned32 input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld => 0x%.*lx %s",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
-	   SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
-	   SIZE_HEX, result, tic80_trace_cmp_internal (result));
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of an ALU operation with 1 integer input and an integer output */
-char *
-tic80_trace_alu2 (int indx,
-		  unsigned32 result,
-		  unsigned32 input)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld %*s => 0x%.*lx/%*ld",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input,
-	   SIZE_HEX + SIZE_DECIMAL + 3, "",
-	   SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a shift instruction */
-char *
-tic80_trace_shift (int indx,
-		   unsigned32 result,
-		   unsigned32 input,
-		   int i,
-		   int n,
-		   int merge,
-		   int endmask,
-		   int rotate)
-{
-  const char *merge_name;
-  char name[40];
-  char *p;
-
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  switch (merge)
-    {
-    default:	merge_name = ".??"; break;
-    case 0:	merge_name = ".dz"; break;
-    case 1:	merge_name = ".dm"; break;
-    case 2:	merge_name = ".ds"; break;
-    case 3:	merge_name = ".ez"; break;
-    case 4:	merge_name = ".em"; break;
-    case 5:	merge_name = ".es"; break;
-    case 6:	merge_name = ".iz"; break;
-    case 7:	merge_name = ".im"; break;
-    }
-
-  /* Don't use itable[indx].name, which is just sl {r,i}.  Instead reconstruct
-     the name, using the i and n fields.  */
-  p = strchr (itable[indx].name, ' ');
-  sprintf (name, "s%s%s%s%s",
-	   (n) ? "r" : "l",
-	   (i) ? "i" : "",
-	   merge_name,
-	   (p) ? p : "");
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld %*s%2d,%2d => 0x%.*lx/%*ld",
-	   tic80_size_name, name,
-	   SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input,
-	   SIZE_HEX + SIZE_DECIMAL - 2, "",
-	   rotate, endmask,
-	   SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and a floating point output */
-void
-tic80_trace_fpu3 (SIM_DESC sd,
-		  sim_cpu *cpu,
-		  sim_cia cia,
-		  int indx,
-		  sim_fpu *result,
-		  sim_fpu *input1,
-		  sim_fpu *input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "fpu",
-		  "%-*s %*g %*g => %*g",
-		  tic80_size_name, itable[indx].name,
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
-void
-tic80_trace_fpu2 (SIM_DESC sd,
-		  sim_cpu *cpu,
-		  sim_cia cia,
-		  int indx,
-		  sim_fpu *result,
-		  sim_fpu *input)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "fpu",
-		  "%-*s %*g %-*s => %*g",
-		  tic80_size_name, itable[indx].name,
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input),
-		  SIZE_HEX + SIZE_DECIMAL + 3, "",
-		  SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 1 floating point input and a floating point output */
-void
-tic80_trace_fpu1 (SIM_DESC sd,
-		  sim_cpu *cpu,
-		  sim_cia cia,
-		  int indx,
-		  sim_fpu *result)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "fpu",
-		  "%-*s %-*s %-*s => %*g",
-		  tic80_size_name, itable[indx].name,
-		  SIZE_HEX + SIZE_DECIMAL + 3, "",
-		  SIZE_HEX + SIZE_DECIMAL + 3, "",
-		  SIZE_HEX + SIZE_DECIMAL, sim_fpu_2d (result));
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and an integer output */
-void
-tic80_trace_fpu2i (SIM_DESC sd,
-		   sim_cpu *cpu,
-		   sim_cia cia,
-		   int indx,
-		   unsigned32 result,
-		   sim_fpu *input1,
-		   sim_fpu *input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "fpu",
-		  "%-*s %*g %*g => 0x%.*lx %-*ld",
-		  tic80_size_name, itable[indx].name,
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
-		  SIZE_HEX, result, SIZE_DECIMAL, (long)(signed32)result);
-}
-
-/* Trace the result of an FPU operation with 2 floating point inputs and an integer output
-   that is the result of a comparison.  */
-void
-tic80_trace_fpu2cmp (SIM_DESC sd,
-		     sim_cpu *cpu,
-		     sim_cia cia,
-		     int indx,
-		     unsigned32 result,
-		     sim_fpu *input1,
-		     sim_fpu *input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "fpu",
-		  "%-*s %*g %*g => 0x%.*lx %s",
-		  tic80_size_name, itable[indx].name,
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input1),
-		  SIZE_HEX + SIZE_DECIMAL + 3, sim_fpu_2d (input2),
-		  SIZE_HEX, result, tic80_trace_cmp_internal (result));
-}
-
-/* Trace the result of a NOP operation */
-char *
-tic80_trace_nop (int indx)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%s", itable[indx].name);
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with one input */
-char *
-tic80_trace_sink1 (int indx, unsigned32 input)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input, SIZE_DECIMAL, (long)(signed32)input);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with two inputs */
-char *
-tic80_trace_sink2 (int indx, unsigned32 input1, unsigned32 input2)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
-	   SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a data sink with three inputs */
-char *
-tic80_trace_sink3 (int indx, unsigned32 input1, unsigned32 input2, unsigned32 input3)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer, "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld    0x%.*lx/%*ld",
-	   tic80_size_name, itable[indx].name,
-	   SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
-	   SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
-	   SIZE_HEX, input3, SIZE_DECIMAL, (long)(signed32)input3);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a conditional branch operation */
-char *
-tic80_trace_cond_br (int indx,
-		     int jump_p,
-		     unsigned32 cond,
-		     unsigned32 target,
-		     int size,
-		     int code)
-{
-  char *suffix1, *suffix2;
-
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  if (size >= 0 && code >= 0)
-    {				/* BCND */
-      switch (code)
-	{
-	default: suffix1 = "???"; break;
-	case 0:  suffix1 = "nev"; break;
-	case 1:  suffix1 = "gt0"; break;
-	case 2:  suffix1 = "eq0"; break;
-	case 3:  suffix1 = "ge0"; break;
-	case 4:  suffix1 = "lt0"; break;
-	case 5:  suffix1 = "ne0"; break;
-	case 6:  suffix1 = "le0"; break;
-	case 7:  suffix1 = "alw"; break;
-	}
-
-      switch (size)
-	{
-	default: suffix2 = ".?"; break;
-	case 0:  suffix2 = ".b"; break;
-	case 1:  suffix2 = ".h"; break;
-	case 2:  suffix2 = ".w"; break;
-	}
-
-    } else {			/* BBO/BBZ */
-
-      suffix2 = "";
-      switch (cond)
-	{
-	default: suffix1 = "??.?"; break;
-	case 29: suffix1 = "hs.w"; break;
-	case 28: suffix1 = "lo.w"; break;
-	case 27: suffix1 = "ls.w"; break;
-	case 26: suffix1 = "hi.w"; break;
-	case 25: suffix1 = "ge.w"; break;
-	case 24: suffix1 = "lt.w"; break;
-	case 23: suffix1 = "le.w"; break;
-	case 22: suffix1 = "gt.w"; break;
-	case 21: suffix1 = "ne.w"; break;
-	case 20: suffix1 = "eq.w"; break;
-	case 19: suffix1 = "hs.h"; break;
-	case 18: suffix1 = "lo.h"; break;
-	case 17: suffix1 = "ls.h"; break;
-	case 16: suffix1 = "hi.h"; break;
-	case 15: suffix1 = "ge.h"; break;
-	case 14: suffix1 = "lt.h"; break;
-	case 13: suffix1 = "le.h"; break;
-	case 12: suffix1 = "gt.h"; break;
-	case 11: suffix1 = "ne.h"; break;
-	case 10: suffix1 = "eq.h"; break;
-	case  9: suffix1 = "hs.b"; break;
-	case  8: suffix1 = "lo.b"; break;
-	case  7: suffix1 = "ls.b"; break;
-	case  6: suffix1 = "hi.b"; break;
-	case  5: suffix1 = "ge.b"; break;
-	case  4: suffix1 = "lt.b"; break;
-	case  3: suffix1 = "le.b"; break;
-	case  2: suffix1 = "gt.b"; break;
-	case  1: suffix1 = "ne.b"; break;
-	case  0: suffix1 = "eq.b"; break;
-	}
-    }
-
-  if (jump_p)
-    sprintf (tic80_trace_buffer,
-	     "%-*s 0x%.*lx %*s 0x%.*lx/%*ld => 0x%.*lx %s%s",
-	     tic80_size_name, itable[indx].name,
-	     SIZE_HEX, target, SIZE_DECIMAL, "",
-	     SIZE_HEX, cond, SIZE_DECIMAL, (long)(signed32)cond,
-	     SIZE_HEX, target,
-	     suffix1, suffix2);
-  else
-    sprintf (tic80_trace_buffer,
-	     "%-*s 0x%.*lx %*s 0x%.*lx/%*ld => %-*s %s%s",
-	     tic80_size_name, itable[indx].name,
-	     SIZE_HEX, target, SIZE_DECIMAL, "",
-	     SIZE_HEX, cond, SIZE_DECIMAL, (long)(signed32)cond,
-	     SIZE_HEX + 2, "[no jump]",
-	     suffix1, suffix2);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a unconditional branch operation */
-char *
-tic80_trace_ucond_br (int indx,
-		      unsigned32 target)
-{
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  sprintf (tic80_trace_buffer,
-	     "%-*s 0x%.*lx %*s => 0x%.*lx",
-	     tic80_size_name, itable[indx].name,
-	     SIZE_HEX, target, (SIZE_DECIMAL*2) + SIZE_HEX + 4, "",
-	     SIZE_HEX, target);
-
-  return tic80_trace_buffer;
-}
-
-/* Trace the result of a load or store operation with 2 integer addresses
-   and an integer output or input */
-void
-tic80_trace_ldst (SIM_DESC sd,
-		  sim_cpu *cpu,
-		  sim_cia cia,
-		  int indx,
-		  int st_p,
-		  int m_p,
-		  int s_p,
-		  unsigned32 value,
-		  unsigned32 input1,
-		  unsigned32 input2)
-{
-  char name[40];
-
-  if (!tic80_size_name)
-    tic80_init_trace ();
-
-  strcpy (name, itable[indx].name);
-  if (m_p)
-    strcat (name, ":m");
-
-  if (s_p)
-    strcat (name, ":s");
-
-  trace_one_insn (sd, cpu, cia.ip, 1,
-		  itable[indx].file, itable[indx].line_nr, "memory",
-		  "%-*s 0x%.*lx/%*ld 0x%.*lx/%*ld %s 0x%.*lx/%*ld",
-		  tic80_size_name, name,
-		  SIZE_HEX, input1, SIZE_DECIMAL, (long)(signed32)input1,
-		  SIZE_HEX, input2, SIZE_DECIMAL, (long)(signed32)input2,
-		  (!st_p) ? "=>" : "<=",
-		  SIZE_HEX, value, SIZE_DECIMAL, (long)(signed32)value);
-}
-
-#endif /* WITH_TRACE */
diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c
deleted file mode 100644
index c60bd9b..0000000
--- a/sim/tic80/sim-calls.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
-    Copyright (C) 1997, Free Software Foundation
-
-    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 <stdarg.h>
-#include <ctype.h>
-
-#include "bfd.h"
-#include "sim-main.h"
-#include "sim-utils.h"
-#include "sim-options.h"
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-
-#define SIM_ADDR unsigned
-
-SIM_DESC
-sim_open (SIM_OPEN_KIND kind,
-	  host_callback *callback,
-	  struct _bfd *abfd,
-	  char **argv)
-{
-  char *buf;
-  SIM_DESC sd = sim_state_alloc (kind, callback);
-
-  if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
-    return 0;
-
-#define TIC80_MEM_START 0x2000000
-#define TIC80_MEM_SIZE 0x100000
-
-  /* main memory */
-  asprintf (&buf, "memory region 0x%lx,0x%lx",
-	    TIC80_MEM_START, TIC80_MEM_SIZE);
-  sim_do_command (sd, buf);
-  free (buf);
-  /* interrupt memory */
-  sim_do_command (sd, "memory region 0x1010000,0x1000");
-  /* some memory at zero */
-  sim_do_command (sd, "memory region 0,0x100000");
-  
-  /* getopt will print the error message so we just have to exit if this fails.
-     FIXME: Hmmm...  in the case of gdb we need getopt to call
-     print_filtered.  */
-  if (sim_parse_args (sd, argv) != SIM_RC_OK)
-    {
-      /* Uninstall the modules to avoid memory leaks,
-	 file descriptor leaks, etc.  */
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  /* check for/establish the a reference program image */
-  if (sim_analyze_program (sd,
-			   (STATE_PROG_ARGV (sd) != NULL
-			    ? *STATE_PROG_ARGV (sd)
-			    : NULL),
-			   abfd) != SIM_RC_OK)
-    {
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  /* establish any remaining configuration options */
-  if (sim_config (sd) != SIM_RC_OK)
-    {
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
-  if (sim_post_argv_init (sd) != SIM_RC_OK)
-    {
-      /* Uninstall the modules to avoid memory leaks,
-	 file descriptor leaks, etc.  */
-      sim_module_uninstall (sd);
-      return 0;
-    }
-
- /* FIXME: for now */
-  return sd;
-}
-
-
-void
-sim_close (SIM_DESC sd, int quitting)
-{
-  /* Uninstall the modules to avoid memory leaks,
-     file descriptor leaks, etc.  */
-  sim_module_uninstall (sd);
-}
-
-
-/* FIXME - these magic numbers need to be moved elsewhere */
-
-#define SP_REGNUM 1		/* Contains address of top of stack */
-#define FP_REGNUM 31		/* Contains address of executing stack frame */
-#define PC_REGNUM 32		/* Contains program counter (FIXME?) */
-#define NPC_REGNUM 33		/* Contains the next program counter (FIXME?) */
-#define A0_REGNUM 34		/* Accumulator register 0 */
-#define A3_REGNUM 37		/* Accumulator register 1 */
-
-#define R0_REGNUM 0             /* General Purpose Register 0 - for sim */
-#define Rn_REGNUM 31            /* Last General Purpose Register - for sim */
-#define An_REGNUM A3_REGNUM     /* Last Accumulator register - for sim */
-
-int
-sim_fetch_register (SIM_DESC sd, int regnr, unsigned char *buf, int length)
-{
-  if (regnr == R0_REGNUM)
-    memset (buf, 0, sizeof (unsigned32));
-  else if (regnr > R0_REGNUM && regnr <= Rn_REGNUM)
-    *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->reg[regnr - R0_REGNUM]);
-  else if (regnr == PC_REGNUM)
-    *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->cia.ip);
-  else if (regnr == NPC_REGNUM)
-    *(unsigned32*)buf = H2T_4 (STATE_CPU (sd, 0)->cia.dp);
-  else if (regnr >= A0_REGNUM && regnr <= An_REGNUM)
-    *(unsigned64*)buf = H2T_8 (STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM]);
-  else
-    sim_io_error (sd, "sim_fetch_register - unknown register nr %d", regnr);
-  return -1;
-}
-
-
-int
-sim_store_register (SIM_DESC sd, int regnr, unsigned char *buf, int length)
-{
-  if (regnr >= R0_REGNUM && regnr <= Rn_REGNUM)
-    STATE_CPU (sd, 0)->reg[regnr - R0_REGNUM] = T2H_4 (*(unsigned32*)buf);
-  else if (regnr == PC_REGNUM)
-    STATE_CPU (sd, 0)->cia.ip = T2H_4 (*(unsigned32*)buf);
-  else if (regnr == NPC_REGNUM)
-    STATE_CPU (sd, 0)->cia.dp = T2H_4 (*(unsigned32*)buf);
-  else if (regnr >= A0_REGNUM && regnr <= An_REGNUM)
-    STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM] = T2H_8 (*(unsigned64*)buf);
-  else
-    sim_io_error (sd, "sim_store_register - unknown register nr %d", regnr);
-  return -1;
-}
-
-
-SIM_RC
-sim_create_inferior (SIM_DESC sd,
-		     struct _bfd *abfd,
-		     char **argv,
-		     char **envp)
-{
-  /* clear all registers */
-  memset (&STATE_CPU (sd, 0)->reg, 0, sizeof (STATE_CPU (sd, 0)->reg));
-  memset (&STATE_CPU (sd, 0)->acc, 0, sizeof (STATE_CPU (sd, 0)->acc));
-  memset (&STATE_CPU (sd, 0)->cr, 0, sizeof (STATE_CPU (sd, 0)->cr));
-  STATE_CPU (sd, 0)->is_user_mode = 0;
-  memset (&STATE_CPU (sd, 0)->cia, 0, sizeof (STATE_CPU (sd, 0)->cia));
-  /* initialize any modules */
-  sim_module_init (sd);
-  /* set the stack-pointer/program counter */
-  if (abfd != NULL)
-    STATE_CPU (sd, 0)->cia.ip = bfd_get_start_address (abfd);
-  else
-    STATE_CPU (sd, 0)->cia.ip = 0;
-  STATE_CPU (sd, 0)->cia.dp = (STATE_CPU (sd, 0)->cia.ip
-			       + sizeof (instruction_word));
-  STATE_CPU (sd, 0)->cr[IE_CR] |= IE_CR_IE;
-  STATE_CPU (sd, 0)->reg[1] = TIC80_MEM_START + TIC80_MEM_SIZE - 16;
-  return SIM_RC_OK;
-}
-
-
-void
-sim_do_command (SIM_DESC sd, char *cmd)
-{
-  if (sim_args_command (sd, cmd) != SIM_RC_OK)
-    sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
-}
diff --git a/sim/tic80/sim-main.h b/sim/tic80/sim-main.h
deleted file mode 100644
index 67db353..0000000
--- a/sim/tic80/sim-main.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*  This file is part of the program psim.
-
-    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
-    Copyright (C) 1997, Free Software Foundation
-
-    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 _SIM_MAIN_H_
-#define _SIM_MAIN_H_
-
-
-#include "sim-basics.h"
-#include "sim-signal.h"
-
-#include <signal.h> /* For kill() in insns:do_trap */
-
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* These are generated files.  */
-#include "itable.h"
-#include "idecode.h"
-#include "idecode.h"
-
-typedef instruction_address sim_cia;
-static const sim_cia null_cia = {0}; /* Dummy */
-#define NULL_CIA null_cia
-/* FIXME: Perhaps igen should generate access macros for
-   `instruction_address' that we could use.  */
-#define CIA_ADDR(cia) ((cia).ip)
-
-#define WITH_WATCHPOINTS 1
-
-#include "sim-base.h"
-
-#include "alu.h"
-#include "cpu.h"
-
-
-struct sim_state {
-
-  /* the processors proper */
-  sim_cpu cpu;
-#define STATE_CPU(sd, n) (&(sd)->cpu)
-
-  /* The base class.  */
-  sim_state_base base;
-
-};
-
-/* (re) initialize the simulator */
-
-extern void engine_init
-(SIM_DESC sd);
-
-
-#ifndef HAVE_GETPID
-#define getpid() 42
-#endif
-
-#ifndef HAVE_KILL
-#define kill(sig, pid) (errno = EINVAL, -1)
-#endif
-#endif
diff --git a/sim/tic80/tic80.dc b/sim/tic80/tic80.dc
deleted file mode 100644
index 4199826..0000000
--- a/sim/tic80/tic80.dc
+++ /dev/null
@@ -1,6 +0,0 @@
-# most instructions
-switch: 21: 12: 21: 12
-switch: 11:  7:  6: 12
-#switch: 21: 13: 21: 13
-#switch: 12:  7:  6: 13
-switch: 27: 27: 27: 27
diff --git a/sim/tic80/tic80.ic b/sim/tic80/tic80.ic
deleted file mode 100644
index de81d14..0000000
--- a/sim/tic80/tic80.ic
+++ /dev/null
@@ -1,52 +0,0 @@
-cache:Dest:Dest:
-cache:Dest:rDest:signed_word *:(&(CPU)->reg[Dest])
-#
-cache:Source1:Source1:
-cache:Source1:vSource1:signed_word:(GPR (Source1) + 0)
-#cache:Source1:vSource1:signed_word:(Source1 == 0 ? 0 : (CPU)->reg[Source1])
-#
-cache:Source2:Source2:
-cache:Source2:vSource2:signed_word:(GPR (Source2) + 0)
-#cache:Source2:vSource2:signed_word:(Source2 == 0 ? 0 : (CPU)->reg[Source2])
-#
-cache:Source:Source:
-cache:Source:vSource:signed_word:(GPR (Source) + 0)
-#cache:Source:vSource:signed_word:(Source == 0 ? 0 : (CPU)->reg[Source])
-#
-cache:IndOff:IndOff:
-cache:IndOff:rIndOff:signed_word:(GPR (IndOff) + 0)
-#cache:IndOff:rIndOff:signed_word:(IndOff == 0 ? 0 : (CPU)->reg[IndOff])
-#
-cache:Base:Base:
-cache:Base:vBase:signed_word:(GPR (Base) + 0)
-cache:Base:rBase:signed_word*:(&GPR (Base))
-#cache:Base:vBase:signed_word:(Base == 0 ? 0 : (CPU)->reg[Base])
-#
-cache:Link:Link:
-cache:Link:rLink:signed_word*:(&(CPU)->reg[Link])
-#
-# Trap Number
-cache:UTN:UTN:
-cache:INDTR:INDTR:
-cache:INDTR:UTN:unsigned_word:(INDTR == 0 ? 0 : (CPU)->reg[INDTR])
-#
-cache:A:A:
-#
-cache:SignedImmediate:SignedImmediate:
-cache:SignedImmediate:vSource1:signed_word:SEXT (SignedImmediate, 14)
-#
-cache:UnsignedImmediate:UnsignedImmediate:
-cache:UnsignedImmediate:vSource1:signed_word:UnsignedImmediate
-#
-cache:BITNUM:BITNUM:
-cache:Code:Code:
-cache:BITNUM:bitnum:int:(~BITNUM) & 0x1f
-
-#
-cache:SignedOffset:SignedOffset:
-cache:SignedOffset:vSignedOffset:signed_word:SEXT (SignedOffset, 14)
-#
-cache:UCRN:UCRN:
-cache:INDCR:INDCR:
-cache:INDCR:UCRN:unsigned32:(GPR (INDCR) + 0)
-#cache:INDCR:UCRN:unsigned32:(INDCR == 0 ? 0 : (CPU)->reg[INDCR])
diff --git a/sim/tic80/tic80.igen b/sim/tic80/tic80.igen
deleted file mode 100644
index 1595693f..0000000
--- a/sim/tic80/tic80.igen
+++ /dev/null
@@ -1,1615 +0,0 @@
-// Texas Instruments TMS320C80 (MVP) Simulator.
-
-
-// The following is called when ever an illegal instruction is encountered.
-:internal::::illegal:
-{
-  sim_io_eprintf (SD, "0x%lx: illegal instruction\n", (unsigned long) cia.ip);
-  sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGILL);
-}
-
-// The following is called when ever an FP op is attempted with FPU disabled.
-:internal::::fp_unavailable:
-{
-  sim_io_eprintf (SD, "0x%lx: floating-point unavailable\n", (unsigned long) cia.ip);
-  sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, SIM_SIGFPE);
-}
-
-// Handle a branch instruction
-:function:::instruction_address:do_branch:int annul, address_word target, int rLink_p, unsigned32 *rLink
-{
-  instruction_address nia;
-  if (annul)
-    {
-      if (rLink_p)
-        *rLink = cia.dp;
-      nia.ip = target;
-      nia.dp = target + 4;
-    }
-  else
-    {
-      if (rLink_p)
-        *rLink = cia.dp + sizeof (instruction_word);
-      nia.ip = cia.dp;
-      nia.dp = target;
-    }
-  return nia;
-}
-
-// Signed Integer Add - add source1, source2, dest
-:function:::void:do_add:unsigned32 *rDest, signed32 source1, signed32 source2
-{
-  unsigned32 result;
-  ALU_BEGIN (source1);
-  ALU_ADD (source2);
-  ALU_END (result);
-  *rDest = result;
-  TRACE_ALU3 (MY_INDEX, result, source1, source2);
-  /* FIXME - a signed add may cause an exception */
-}
-31.Dest,26.Source2,21.0b101100,15.0,14.SignedImmediate::::add i
-"add <SignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_add (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.0,12.0,11./,4.Source1::::add r
-"add r<Source1>, r<Source2>, r<Dest>"
-{
-  do_add (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.0,12.1,11./+LongSignedImmediate::::add l
-"add 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_add (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-
-// Unsigned Integer Add - addu source1, source2, dest
-:function:::void:do_addu:unsigned32 *rDest, unsigned32 source1, unsigned32 source2
-{
-  unsigned32 result = source1 + source2;
-  TRACE_ALU3 (MY_INDEX, result, source1, source2);
-  *rDest = result;
-}
-
-31.Dest,26.Source2,21.0b101100,15.1,14.SignedImmediate::::addu i
-"addu <SignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_addu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.1,12.0,11./,4.Source1::::addu r
-"addu r<Source1>, r<Source2>, r<Dest>"
-{
-  do_addu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101100,13.1,12.1,11./+LongSignedImmediate::::addu l
-"addu 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_addu (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-
-:function:::void:do_and:signed32 *rDest, signed32 source1, signed32 source2
-{
-  unsigned32 result = source1 & source2;
-  TRACE_ALU3 (MY_INDEX, result, source1, source2);
-  *rDest = result;
-}
-
-
-// and, and.tt
-31.Dest,26.Source2,21.0b0010001,14.UnsignedImmediate::::and.tt i
-"and.tt <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010001,12.0,11./,4.Source1::::and.tt r
-"and.tt r<Source1>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010001,12.1,11./+LongSignedImmediate::::and.tt l
-"and.tt 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, LongSignedImmediate, vSource2);
-
-}
-
-// and.ff
-31.Dest,26.Source2,21.0b0011000,14.UnsignedImmediate::::and.ff i
-"and.ff <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011000,12.0,11./,4.Source1::::and.ff r
-"and.ff r<Source1>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011000,12.1,11./+LongSignedImmediate::::and.ff l
-"and.ff 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~LongSignedImmediate, ~vSource2);
-}
-
-// and.ft
-31.Dest,26.Source2,21.0b0010100,14.UnsignedImmediate::::and.ft i
-"and.ft <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010100,12.0,11./,4.Source1::::and.ft r
-"and.ft r<Source1>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010100,12.1,11./+LongSignedImmediate::::and.ft l
-"and.ft 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, ~LongSignedImmediate, vSource2);
-}
-
-// and.tf
-31.Dest,26.Source2,21.0b0010010,14.UnsignedImmediate::::and.tf i
-"and.tf <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110010010,12.0,11./,4.Source1::::and.tf r
-"and.tf r<Source1>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110010010,12.1,11./+LongSignedImmediate::::and.tf l
-"and.tf 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_and (_SD, rDest, LongSignedImmediate, ~vSource2);
-}
-
-// bbo[.a]
-:function:::instruction_address:do_bbo:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset
-{
-  int jump_p;
-  address_word target = cia.ip + 4 * offset;
-  if (MASKED32 (source, bitnum, bitnum))
-    {
-      nia = do_branch (_SD, annul, target, 0, NULL);
-      jump_p = 1;
-    }
-  else
-    jump_p = 0;
-  TRACE_COND_BR(MY_INDEX, jump_p, bitnum, target, -1, -1);
-  return nia;
-}
-:%s::::A:int A
-{
-  if (A)
-    return ".a";
-  else
-    return "";
-}
-31.BITNUM,26.Source,21.0b100101,15.A,14.SignedOffset::::bbo i
-"bbo%s<A> <SignedOffset>, r<Source>, <bitnum>"
-{
-  nia = do_bbo (_SD, nia, bitnum, vSource, A, vSignedOffset);
-}
-31.BITNUM,26.Source,21.0b11100101,13.A,12.0,11./,4.IndOff::::bbo r
-"bbo%s<A> r<IndOff>, r<Source>, <bitnum>"
-{
-  nia = do_bbo (_SD, nia, bitnum, vSource, A, rIndOff);
-}
-31.BITNUM,26.Source,21.0b11100101,13.A,12.1,11./+LongSignedImmediate::::bbo l
-"bbo%s<A> <LongSignedImmediate>, r<Source>, <bitnum>"
-{
-  nia = do_bbo (_SD, nia, bitnum, vSource, A, LongSignedImmediate);
-}
-
-// bbz[.a]
-:function:::instruction_address:do_bbz:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset
-{
-  int jump_p;
-  address_word target = cia.ip + 4 * offset;
-  if (!MASKED32 (source, bitnum, bitnum))
-    {
-      nia = do_branch (_SD, annul, target, 0, NULL);
-      jump_p = 1;
-    }
-  else
-    jump_p = 0;
-  TRACE_COND_BR(MY_INDEX, jump_p, bitnum, target, -1, -1);
-  return nia;
-}
-31.BITNUM,26.Source,21.0b100100,15.A,14.SignedOffset::::bbz i
-"bbz%s<A> <SignedOffset>, r<Source>, <bitnum>"
-{
-  nia = do_bbz (_SD, nia, bitnum, vSource, A, vSignedOffset);
-}
-31.BITNUM,26.Source,21.0b11100100,13.A,12.0,11./,4.IndOff::::bbz r
-"bbz%s<A> r<IndOff>, r<Source>, <bitnum>"
-{
-  nia = do_bbz (_SD, nia, bitnum, vSource, A, rIndOff);
-}
-31.BITNUM,26.Source,21.0b11100100,13.A,12.1,11./+LongSignedImmediate::::bbz l
-"bbz%s<A> <LongSignedImmediate>, r<Source>, <bitnum>"
-{
-  nia = do_bbz (_SD, nia, bitnum, vSource, A, LongSignedImmediate);
-}
-
-// bcnd[.a]
-:function:::instruction_address:do_bcnd:instruction_address nia, int Cond, unsigned32 source, int annul, unsigned32 offset
-{
-  int condition;
-  int size = EXTRACTED32 (Cond, 31 - 27, 30 - 27);
-  int code = EXTRACTED32 (Cond, 29 - 27, 27 - 27);
-  signed32 val = 0;
-  address_word target = cia.ip + 4 * offset;
-  switch (size)
-    {
-    case 0: val = SEXT32 (source, 7); break;
-    case 1: val = SEXT32 (source, 15); break;
-    case 2: val = source; break;
-    default: sim_engine_abort (SD, CPU, cia, "bcnd - reserved size");
-    }
-  switch (code)
-    {
-    case 0: condition = 0; break;
-    case 1: condition = val > 0; break;
-    case 2: condition = val == 0; break;
-    case 3: condition = val >= 0; break;
-    case 4: condition = val < 0; break;
-    case 5: condition = val != 0; break;
-    case 6: condition = val <= 0; break;
-    default: condition = 1; break;
-    }
-  if (condition)
-    {
-      nia = do_branch (_SD, annul, target, 0, NULL);
-    }
-  TRACE_COND_BR(MY_INDEX, condition, val, target, size, code);
-  return nia;
-}
-31.Code,26.Source,21.0b100110,15.A,14.SignedOffset::::bcnd i
-"bcnd%s<A> <SignedOffset>, r<Source>, <Code>"
-{
-  nia = do_bcnd (_SD, nia, Code, vSource, A, vSignedOffset);
-}
-31.Code,26.Source,21.0b11100110,13.A,12.0,11./,4.IndOff::::bcnd r
-"bcnd%s<A> r<IndOff>, r<Source>, <Code>"
-{
-  nia = do_bcnd (_SD, nia, Code, vSource, A, rIndOff);
-}
-31.Code,26.Source,21.0b11100110,13.A,12.1,11./+LongSignedImmediate::::bcnd l
-"bcnd%s<A> <LongSignedImmediate>, r<Source>, <Code>"
-{
-  nia = do_bcnd (_SD, nia, Code, vSource, A, LongSignedImmediate);
-}
-
-// br[.a] - see bbz[.a]
-
-
-// brcr
-:function:::sim_cia:do_brcr:instruction_address nia, int cr
-{
-  if (cr >= 0x4000 || !(CPU)->is_user_mode)
-    {
-      unsigned32 control = CR (cr);
-      unsigned32 ie = control & 0x00000001;
-      unsigned32 pc = control & 0xfffffffc;
-      unsigned32 is_user_mode = control & 0x00000002;
-      (CPU)->is_user_mode = is_user_mode;
-      nia.dp = pc;
-      if (ie)
-        (CPU)->cr[IE_CR] |= IE_CR_IE;
-      else
-        (CPU)->cr[IE_CR] &= ~IE_CR_IE;
-    }
-  TRACE_UCOND_BR (MY_INDEX, nia.dp);
-  return nia;
-}
-31.//,27.0,26.//,21.0b0000110,14.UCRN::::brcr i
-"brcr CR[<UCRN>]"
-{
-  nia = do_brcr (_SD, nia, UCRN);
-}
-31.//,27.0,26.//,21.0b110000110,12.0,11./,4.INDCR::::brcr r
-"brcr CR[r<INDCR>]"
-{
-  nia = do_brcr (_SD, nia, UCRN);
-}
-31.//,27.0,26.//,21.0b110000110,12.1,11./+UnsignedControlRegisterNumber::::brcr l
-"brcr CR[<UnsignedControlRegisterNumber>]"
-{
-  nia = do_brcr (_SD, nia, UnsignedControlRegisterNumber);
-}
-
-// bsr[.a]
-:function:::instruction_address:do_bsr:instruction_address nia, signed32 *rLink, int annul, unsigned32 offset
-{
-  address_word target = cia.ip + 4 * offset;
-  nia = do_branch (_SD, annul, target, 1, rLink);
-  TRACE_UCOND_BR (MY_INDEX, target);
-  return nia;
-}
-31.Link,26./,21.0b100000,15.A,14.SignedOffset::::bsr i
-"bsr%s<A> <SignedOffset>, r<Link>"
-{
-  nia = do_bsr (_SD, nia, rLink, A, vSignedOffset);
-}
-31.Link,26./,21.0b11100000,13.A,12.0,11./,4.IndOff::::bsr r
-"bsr%s<A> r<IndOff>, r<Link>"
-{
-  nia = do_bsr (_SD, nia, rLink, A, rIndOff);
-}
-31.Link,26./,21.0b11100000,13.A,12.1,11./+LongSignedImmediate::::bsr l
-"bsr%s<A> <LongSignedImmediate>, r<Link>"
-{
-  nia = do_bsr (_SD, nia, rLink, A, LongSignedImmediate);
-}
-
-// cmnd
-:function:::void:do_cmnd:signed32 source
-{
-  int Reset = EXTRACTED32 (source, 31, 31);
-  int Halt = EXTRACTED32 (source, 30, 30);
-  int Unhalt = EXTRACTED32 (source, 29, 29);
-  /* int ICR = EXTRACTED32 (source, 28, 28); */
-  /* int DCR = EXTRACTED32 (source, 27, 27); */
-  int Task = EXTRACTED32 (source, 14, 14);
-  int Msg = EXTRACTED32 (source, 13, 13);
-  int VC = EXTRACTED32 (source, 10, 10);
-  int TC = EXTRACTED32 (source, 9, 9);
-  int MP = EXTRACTED32 (source, 8, 8);
-  int PP = EXTRACTED32 (source, 3, 0);
-  /* what is implemented? */
-  if (PP != 0)
-    sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - PPs not supported",
-                      (unsigned long) cia.ip);
-  if (VC != 0)
-    sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - VC not supported",
-                      (unsigned long) cia.ip);
-  if (TC != 0)
-    sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - TC not supported",
-                      (unsigned long) cia.ip);
-  if (MP)
-    {
-      if (Reset || Halt)
-        sim_engine_halt (SD, CPU, NULL, cia, sim_exited, 0);
-      if (Unhalt)
-        sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Can not unhalt the MP",
-                          (unsigned long) cia.ip);
-      /* if (ICR || DCR); */
-      if (Task)
-        sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Can not Task the MP",
-                          (unsigned long) cia.ip);
-      if (Msg)
-        sim_engine_abort (SD, CPU, cia, "0x%lx: cmnd - Msg to MP not suported",
-                          (unsigned long) cia.ip);
-    }
-  TRACE_SINK1 (MY_INDEX, source);
-}
-31./,21.0b0000010,14.UI::::cmnd i
-"cmnd <UI>"
-{
-  do_cmnd (_SD, UI);
-}
-31./,21.0b110000010,12.0,11./,4.Source::::cmnd r
-"cmnd r<Source>"
-{
-  do_cmnd (_SD, vSource);
-}
-31./,21.0b110000010,12.1,11./+LongUnsignedImmediate::::cmnd l
-"cmnd <LongUnsignedImmediate>"
-{
-  do_cmnd (_SD, LongUnsignedImmediate);
-}
-
-// cmp
-:function:::unsigned32:cmp_vals:signed32 s1, unsigned32 u1, signed32 s2, unsigned32 u2
-{
-  unsigned32 field = 0;
-  if (s1 == s2) field |= 0x001;
-  if (s1 != s2) field |= 0x002;
-  if (s1 >  s2) field |= 0x004;
-  if (s1 <= s2) field |= 0x008;
-  if (s1 <  s2) field |= 0x010;
-  if (s1 >= s2) field |= 0x020;
-  if (u1 >  u2) field |= 0x040;
-  if (u1 <= u2) field |= 0x080;
-  if (u1 <  u2) field |= 0x100;
-  if (u1 >= u2) field |= 0x200;
-  return field;
-}
-:function:::void:do_cmp:unsigned32 *rDest, unsigned32 source1, unsigned32 source2
-{
-  unsigned32 field = 0;
-  field |= cmp_vals (_SD, source1, source1, source2, source2) << 20;
-  field |= cmp_vals (_SD, (signed16)source1, (unsigned16)source1,
-         (signed16)source2, (unsigned16)source2) << 10;
-  field |= cmp_vals (_SD, (signed8)source1, (unsigned8)source1,
-          (signed8)source2, (unsigned8)source2);
-  TRACE_CMP (MY_INDEX, field, source1, source2);
-  *rDest = field;
-}
-31.Dest,26.Source2,21.0b1010000,14.SignedImmediate::::cmp i
-"cmp <SignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_cmp (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b111010000,12.0,11./,4.Source1::::cmp r
-"cmp r<Source1>, r<Source2>, r<Dest>"
-{
-  do_cmp (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b111010000,12.1,11./+LongSignedImmediate::::cmp l
-"cmp 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_cmp (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// dcache
-:%s::::F:int F
-{
-  if (F)
-    return "f";
-  else
-    return "c";
-}
-31./,27.F,26.Source2,21.0b0111,17.m,16.0b00,14.SignedOffset::::dcache i
-"dcache%s<F> <SignedOffset> (r<Source2>%s<m>)"
-{
-  TRACE_NOP (MY_INDEX);
-  /* NOP */
-}
-31./,27.F,26.Source2,21.0b110111,15.m,14.0b00,12.0,11./,4.Source1::::dcache r
-"dcache%s<F> r<Source1> (r<Source2>%s<m>)"
-{
-  TRACE_NOP (MY_INDEX);
-  /* NOP */
-}
-31./,27.F,26.Source2,21.0b110111,15.m,14.0b00,12.1,11./+LongSignedImmediate::::dcache l
-"dcache%s<F> <LongSignedImmediate> (r<Source2>%s<m>)"
-{
-  TRACE_NOP (MY_INDEX);
-  /* NOP */
-}
-
-// dld[{.b|.h|.d}]
-void::function::do_dld:int Dest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  do_ld (_SD, Dest, base, rBase, m, sz, S, offset);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dld r
-"dld%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_dld (_SD, Dest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dld l
-"dld%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_dld (_SD, Dest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// dld.u[{.b|.h|.d}]
-void::function::do_dld_u:unsigned32 *rDest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  do_ld_u (_SD, rDest, base, rBase, m, sz, S, offset);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dld.u r
-"dld.u%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_dld_u (_SD, rDest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dld.u l
-"dld.u%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_dld_u (_SD, rDest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// dst[{.b|.h|.d}]
-void::function::do_dst:int Source, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  do_st (_SD, Source, base, rBase, m, sz, S, offset);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.0,11.S,10.1,9./,4.IndOff::::dst r
-"dst%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Source>"
-{
-  do_dst (_SD, Source, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.1,11.S,10.1,9./+LongSignedImmediateOffset::::dst l
-"dst%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Source>"
-{
-  do_dst (_SD, Source, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// estop
-31./,21.0b1111111,14.1,13.0,12.0,11./::::estop
-
-// etrap
-31./,27.1,26./,21.0b0000001,14.UTN::::etrap i
-31./,27.1,26./,21.0b110000001,12.0,11./,4.iUTN::::etrap r
-31./,27.1,26./,21.0b110000001,12.1,11./::::etrap l
-
-
-// exts - see shift.ds
-
-
-// extu - see shift.dz
-
-
-sim_fpu::function::get_fp_reg:int reg, unsigned32 val, int precision
-{
-  sim_fpu ans;
-  switch (precision)
-    {
-    case 0: /* single */
-      sim_fpu_32to (&ans, val);
-      break;
-    case 1: /* double */
-      if (reg < 0)
-        sim_engine_abort (SD, CPU, cia, "DP immediate invalid");
-      if (reg & 1)
-        sim_engine_abort (SD, CPU, cia, "DP FP register must be even");
-      if (reg <= 1)
-        sim_engine_abort (SD, CPU, cia, "DP FP register must be >= 2");
-      sim_fpu_232to (&ans, GPR (reg + 1), GPR (reg));
-      break;
-    case 2: /* 32 bit signed integer */
-      sim_fpu_i32to (&ans, val, 0);
-      break;
-    case 3: /* 32 bit unsigned integer */
-      sim_fpu_u32to (&ans, val, 0);
-      break;
-    default:
-      sim_engine_abort (SD, CPU, cia, "Unsupported FP precision");
-    }
-  return ans;
-}
-void::function::set_fp_reg:int Dest, sim_fpu val, int PD
-{
-  switch (PD)
-    {
-    case 0: /* single */
-      {
-        sim_fpu_to32 (&GPR (Dest), &val);
-        break;
-      }
-    case 1: /* double */
-      {
-        if (Dest & 1)
-          sim_engine_abort (SD, CPU, cia, "DP FP Dest register must be even");
-        if (Dest <= 1)
-          sim_engine_abort (SD, CPU, cia, "DP FP Dest register must be >= 2");
-        sim_fpu_to232 (&GPR (Dest + 1), &GPR (Dest + 0), &val);
-        break;
-      }
-    case 2: /* signed */
-      {
-        sim_fpu_to32i (&GPR (Dest), &val, 0);
-        break;
-      }
-    case 3: /* unsigned */
-      {
-        sim_fpu_to32u (&GPR (Dest), &val, 0);
-        break;
-      }
-    default:
-      sim_engine_abort (SD, CPU, cia, "Unsupported FP precision");
-    }
-
-}
-// fadd.{s|d}{s|d}{s|d}
-void::function::do_fadd:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
-  sim_fpu ans;
-  sim_fpu_add (&ans, &s1, &s2);
-  TRACE_FPU3 (ans, s1, s2);
-  set_fp_reg (_SD, Dest, ans, PD);
-}
-const char *::function::str_PX:int PX
-{
-  switch (PX)
-    {
-    case 0: return "s";
-    case 1: return "d";
-    case 2: return "i";
-    case 3: return "u";
-    default: return "?";
-    }
-}
-31.Dest,26.Source2,21.0b111110000,12.0,11.r,10.PD,8.P2,6.P1,4.Source1::f::fadd r
-"fadd.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
-  do_fadd (_SD, Dest, PD,
-           get_fp_reg (_SD, Source1, vSource1, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110000,12.1,11.r,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fadd l
-"fadd.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
-  do_fadd (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-
-}
-
-// fcmp.{s|d}{s|d}{s|d}
-void::function::do_fcmp:unsigned32 *rDest, sim_fpu s1, sim_fpu s2
-{
-  unsigned32 result = 0;
-  if (sim_fpu_is_nan (&s1) || sim_fpu_is_nan (&s2))
-    result |= BIT32 (30);
-  else
-    {
-      result |= BIT32 (31);
-      if (sim_fpu_is_eq (&s1, &s2)) result |= BIT32(20);
-      if (sim_fpu_is_ne (&s1, &s2)) result |= BIT32(21);
-      if (sim_fpu_is_gt (&s1, &s2)) result |= BIT32(22);
-      if (sim_fpu_is_le (&s1, &s2)) result |= BIT32(23);
-      if (sim_fpu_is_lt (&s1, &s2)) result |= BIT32(24);
-      if (sim_fpu_is_ge (&s1, &s2)) result |= BIT32(25);
-      if (sim_fpu_is_lt (&s1, &sim_fpu_zero)
-          || sim_fpu_is_gt (&s1, &s2)) result |= BIT32(26);
-      if (sim_fpu_is_lt (&sim_fpu_zero, &s1)
-          && sim_fpu_is_lt (&s1, &s2)) result |= BIT32(27);
-      if (sim_fpu_is_le (&sim_fpu_zero, &s1)
-          && sim_fpu_is_le (&s1, &s2)) result |= BIT32(28);
-      if (sim_fpu_is_le (&s1, &sim_fpu_zero)
-          || sim_fpu_is_ge (&s1, &s2)) result |= BIT32(29);
-    }
-  *rDest = result;
-  TRACE_FPU2CMP (result, s1, s2);
-}
-31.Dest,26.Source2,21.0b111110101,12.0,11./,10.0,8.P2,6.P1,4.Source1::f::fcmp r
-"fcmp.%s<PX#P1>%s<PX#P2> r<Source1>, r<Source2>, r<Dest>"
-{
-  do_fcmp (_SD, rDest,
-           get_fp_reg (_SD, Source1, vSource1, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110101,12.1,11./,10.0,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fcmp l
-"fcmp.%s<PX#P1>%s<PX#P2> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
-  do_fcmp (_SD, rDest,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-
-// fdiv.{s|d}{s|d}{s|d}
-void::function::do_fdiv:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
-  sim_fpu ans;
-  sim_fpu_div (&ans, &s1, &s2);
-  TRACE_FPU3 (ans, s1, s2);
-  set_fp_reg (_SD, Dest, ans, PD);
-}
-31.Dest,26.Source2,21.0b111110011,12.0,11./,10.PD,8.P2,6.P1,4.Source1::f::fdiv r
-"fdiv.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
-  do_fdiv (_SD, Dest, PD,
-           get_fp_reg (_SD, Source1, vSource1, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110011,12.1,11./,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fdiv l
-"fdiv.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
-  do_fdiv (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// fmpy.{s|d|i|u}{s|d|i|u}{s|d|i|u}
-void::function::do_fmpy:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
-  switch (PD)
-    {
-    case 2: /* signed */
-      {
-        signed64 i1;
-        signed64 i2;
-        sim_fpu_to64i (&i1, &s1, 0);
-        sim_fpu_to64i (&i2, &s2, 0);
-        GPR (Dest) = i1 * i2;
-        TRACE_FPU2I (GPR (Dest), s1, s2);
-        break;
-      }
-    case 3: /* unsigned */
-      {
-        unsigned64 u1;
-        unsigned64 u2;
-        sim_fpu_to64u (&u1, &s1, 0);
-        sim_fpu_to64u (&u2, &s2, 0);
-        GPR (Dest) = u1 * u2;
-        TRACE_FPU2I (GPR (Dest), s1, s2);
-        break;
-      }
-    default:
-      {
-        sim_fpu ans;
-        sim_fpu_mul (&ans, &s1, &s2);
-        set_fp_reg (_SD, Dest, ans, PD);
-        TRACE_FPU3 (ans, s1, s2);
-      }
-    }
-}
-31.Dest,26.Source2,21.0b111110010,12.0,11./,10.PD,8.P2,6.P1,4.Source1::f::fmpy r
-"fmpy.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
-  do_fmpy (_SD, Dest, PD,
-           get_fp_reg (_SD, Source1, vSource1, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110010,12.1,11./,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fmpy l
-"fmpy.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
-  do_fmpy (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// frndm.{s|d|i|u}{s|d|i|u}
-void::function::do_frnd:int Dest, int PD, sim_fpu s1
-{
-  set_fp_reg (_SD, Dest, s1, PD);
-  TRACE_FPU1 (s1);
-}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b11,6.P1,4.Source::f::frndm r
-"frndm.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b11,6.P1,4./+SinglePrecisionFloatingPoint::f::frndm l
-"frndm.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndn.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b00,6.P1,4.Source::f::frndn r
-"frndn.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b00,6.P1,4./+SinglePrecisionFloatingPoint::f::frndn l
-"frndn.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndp.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b10,6.P1,4.Source::f::frndp r
-"frndp.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b10,6.P1,4./+SinglePrecisionFloatingPoint::f::frndp l
-"frndp.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// frndz.{s|d|i|u}{s|d|i|u}
-31.Dest,26./,21.0b111110100,12.0,11.r,10.PD,8.0b01,6.P1,4.Source::f::frndz r
-"frndz.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, Source, vSource, P1));
-}
-31.Dest,26./,21.0b111110100,12.1,11.r,10.PD,8.0b01,6.P1,4./+SinglePrecisionFloatingPoint::f::frndz l
-"frndz.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-{
-  do_frnd (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1));
-}
-
-// fsqrt.{s|d}{s|d}{s|d}
-#void::function::do_fsqrt:unsigned32 *rDest, unsigned32 Source, unsigned32 Source2
-#  sim_io_error ("fsqrt");
-31.Dest,26./,21.0b111110111,12.0,11./,10.PD,8.//,6.P1,4.Source::f::fsqrt r
-"fsqrt.%s<PX#P1>%s<PX#PD> r<Source>, r<Dest>"
-#  do_fsqrt (_SD, rDest, vSource);
-31.Dest,26./,21.0b111110111,12.1,11./,10.PD,8.//,6.P1,4./+SinglePrecisionFloatingPoint::f::fsqrt l
-"fsqrt.%s<PX#P1>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Dest>"
-#  do_fsqrt (_SD, rDest, SinglePrecisionFloatingPoint);
-
-
-// fsub.{s|d}{s|d}{s|d}
-void::function::do_fsub:int Dest, int PD, sim_fpu s1, sim_fpu s2
-{
-  sim_fpu ans;
-  sim_fpu_sub (&ans, &s1, &s2);
-  TRACE_FPU3 (ans, s1, s2);
-  set_fp_reg (_SD, Dest, ans, PD);
-}
-31.Dest,26.Source2,21.0b111110001,12.0,11.r,10.PD,8.P2,6.P1,4.Source1::f::fsub r
-"fsub.%s<PX#P1>%s<PX#P2>%s<PX#PD> r<Source1>, r<Source2>, r<Dest>"
-{
-  do_fsub (_SD, Dest, PD,
-           get_fp_reg (_SD, Source1, vSource1, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-31.Dest,26.Source2,21.0b111110001,12.1,11.r,10.PD,8.P2,6.P1,4./+SinglePrecisionFloatingPoint::f::fsub l
-"fsub.%s<PX#P1>%s<PX#P2>%s<PX#PD> 0x%08lx<SinglePrecisionFloatingPoint>, r<Source2>, r<Dest>"
-{
-  do_fsub (_SD, Dest, PD,
-           get_fp_reg (_SD, -1, SinglePrecisionFloatingPoint, P1),
-           get_fp_reg (_SD, Source2, vSource2, P2));
-}
-
-// illop
-31./,21.0b0000000,14./::::illop
-"illop"
-31./,21.0b111111111,12./::::illop l
-"illop"
-
-
-// ins - see sl.im
-
-
-// jsr[.a]
-instruction_address::function::do_jsr:instruction_address nia, signed32 *rLink, int annul, unsigned32 offset, unsigned32 base
-{
-  address_word target = offset + base;
-  TRACE_UCOND_BR (MY_INDEX, target);
-  nia = do_branch (_SD, annul, target, 1, rLink);
-  if (nia.dp & 0x3)
-    sim_engine_abort (SD, CPU, cia,
-                      "0x%lx: destination address 0x%lx misaligned",
-                      (unsigned long) cia.ip,
-                      (unsigned long) nia.dp);
-  return nia;
-}
-31.Link,26.Base,21.0b100010,15.A,14.SignedOffset::::jsr i
-"jsr%s<A> <SignedOffset>, r<Link>"
-{
-  nia = do_jsr (_SD, nia, rLink, A, vSignedOffset, vBase);
-}
-31.Link,26.Base,21.0b11100010,13.A,12.0,11./,4.IndOff::::jsr r
-"jsr%s<A> r<IndOff>, r<Link>"
-{
-  nia = do_jsr (_SD, nia, rLink, A, rIndOff, vBase);
-}
-31.Link,26.Base,21.0b11100010,13.A,12.1,11./+LongSignedImmediate::::jsr l
-"jsr%s<A> <LongSignedImmediate>, r<Link>"
-{
-  nia = do_jsr (_SD, nia, rLink, A, LongSignedImmediate, vBase);
-}
-
-// ld[{.b.h.d}]
-void::function::do_ld:int Dest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  unsigned32 addr;
-  switch (sz)
-    {
-    case 0:
-      addr = base + (S ? (offset << 0) : offset);
-      if (m)
-        *rBase = addr;
-      GPR(Dest) = MEM (signed, addr, 1);
-      break;
-    case 1:
-      addr = base + (S ? (offset << 1) : offset);
-      if (m)
-        *rBase = addr;
-      GPR(Dest) = MEM (signed, addr, 2);
-      break;
-    case 2:
-      addr = base + (S ? (offset << 2) : offset);
-      if (m)
-        *rBase = addr;
-      GPR(Dest) = MEM (signed, addr, 4);
-      break;
-    case 3:
-      {
-        signed64 val;
-        if (Dest & 0x1)
-          sim_engine_abort (SD, CPU, cia, "0x%lx: ld.d to odd register %d",
-                            cia.ip, Dest);
-        addr = base + (S ? (offset << 3) : offset);
-        if (m)
-          *rBase = addr;
-        val = MEM (signed, addr, 8);
-        GPR(Dest + 1) = VH4_8 (val);
-        GPR(Dest + 0) = VL4_8 (val);
-      }
-      break;
-    default:
-      addr = -1;
-      sim_engine_abort (SD, CPU, cia, "ld - invalid sz %d", sz);
-    }
-  TRACE_LD (GPR(Dest), m, S, base, offset);
-}
-const char *::function::str_sz:int sz
-{
-  switch (sz)
-    {
-    case 0: return ".b";
-    case 1: return ".h";
-    case 2: return "";
-    case 3: return ".d";
-    default: return "?";
-    }
-}
-const char *::function::str_m:int m
-{
-  if (m)
-    return ":m";
-  else
-    return "";
-}
-const char *::function::str_S:int S
-{
-  if (S)
-    return ":s";
-  else
-    return "";
-}
-31.Dest,26.Base,21.0b0100,17.m,16.sz,14.SignedOffset::::ld i
-"ld%s<sz> <SignedOffset> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld (_SD, Dest, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::ld r
-"ld%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld (_SD, Dest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110100,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::ld l
-"ld%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld (_SD, Dest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// ld.u[{.b.h.d}]
-void::function::do_ld_u:unsigned32 *rDest, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  unsigned32 addr;
-  switch (sz)
-    {
-    case 0:
-      addr = base + (S ? (offset << 0) : offset);
-      *rDest = MEM (unsigned, addr, 1);
-      break;
-    case 1:
-      addr = base + (S ? (offset << 1) : offset);
-      *rDest = MEM (unsigned, addr, 2);
-      break;
-    default:
-      addr = -1;
-      sim_engine_abort (SD, CPU, cia, "ld.u - invalid sz %d", sz);
-    }
-  if (m)
-    *rBase = addr;
-  TRACE_LD (m, S, *rDest, base, offset);
-}
-31.Dest,26.Base,21.0b0101,17.m,16.sz,14.SignedOffset::::ld.u i
-"ld.u%s<sz> <SignedOffset> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld_u (_SD, rDest, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::ld.u r
-"ld.u%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld_u (_SD, rDest, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Dest,26.Base,21.0b110101,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::ld.u l
-"ld.u%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Dest>"
-{
-  do_ld_u (_SD, rDest, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// lmo
-31.Dest,26.Source,21.0b111111000,12.0,11./::::lmo
-"lmo r<Source>, r<Dest>"
-{
-  int b;
-  for (b = 0; b < 32; b++)
-    if (vSource & BIT32 (31 - b))
-      break;
-  TRACE_ALU2 (MY_INDEX, b, vSource);
-  *rDest = b;
-}
-
-
-// nop - see rdcr 0, r0
-
-
-void::function::do_or:unsigned32 *rDest, unsigned32 Source1, unsigned32 Source2
-{
-  unsigned32 result = Source1 | Source2;
-  TRACE_ALU3 (MY_INDEX, result, Source1, Source2);
-  *rDest = result;
-}
-
-// or, or.tt
-31.Dest,26.Source2,21.0b0010111,14.UnsignedImmediate::::or.tt i
-"or.tt <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010111,12.0,11./,4.Source1::::or.tt r
-"or.tt r<Source1>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010111,12.1,11./+LongUnsignedImmediate::::or.tt l
-"or.tt 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
-
-// or.ff
-31.Dest,26.Source2,21.0b0011110,14.UnsignedImmediate::::or.ff i
-"or.ff <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011110,12.0,11./,4.Source1::::or.ff r
-"or.ff r<Source1>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011110,12.1,11./+LongUnsignedImmediate::::or.ff l
-"or.ff 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~LongUnsignedImmediate, ~vSource2);
-}
-
-// or.ft
-31.Dest,26.Source2,21.0b0011101,14.UnsignedImmediate::::or.ft i
-"or.ft <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011101,12.0,11./,4.Source1::::or.ft r
-"or.ft r<Source1>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011101,12.1,11./+LongUnsignedImmediate::::or.ft l
-"or.ft 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, ~LongUnsignedImmediate, vSource2);
-}
-
-// or.tf
-31.Dest,26.Source2,21.0b0011011,14.UnsignedImmediate::::or.tf i
-"or.tf <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011011,12.0,11./,4.Source1::::or.tf r
-"or.tf r<Source1>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, vSource1, ~vSource2);
-}
-31.Dest,26.Source2,21.0b110011011,12.1,11./+LongUnsignedImmediate::::or.tf l
-"or.tf 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_or (_SD, rDest, LongUnsignedImmediate, ~vSource2);
-}
-
-// rdcr
-void::function::do_rdcr:unsigned32 Dest, int cr
-{
-  TRACE_SINK2 (MY_INDEX, Dest, cr);
-  GPR (Dest) = CR (cr);
-}
-31.Dest,26.0,21.0b0000100,14.UCRN::::rdcr i
-"rdcr CR[<UCRN>], r<Dest>"
-{
-  do_rdcr (_SD, Dest, UCRN);
-}
-31.Dest,26.0,21.0b110000100,12.0,11./,4.INDCR::::rdcr r
-"rdcr CR[r<INDCR>], r<Dest>"
-{
-  do_rdcr (_SD, Dest, UCRN);
-}
-31.Dest,26.0,21.0b110000100,12.1,11./+UnsignedControlRegisterNumber::::rdcr l
-"rdcr CR[<UnsignedControlRegisterNumber>], r<Dest>"
-{
-  do_rdcr (_SD, Dest, UnsignedControlRegisterNumber);
-}
-
-// rmo
-31.Dest,26.Source,21.0b111111001,12.0,11./::::rmo
-"rmo r<Source>, r<Dest>"
-{
-  int b;
-  for (b = 0; b < 32; b++)
-    if (vSource & BIT32 (b))
-      break;
-  if (b < 32)
-    b = 31 - b;
-  TRACE_ALU2 (MY_INDEX, b, vSource);
-  *rDest = b;
-}
-
-// rotl - see sl.dz
-
-
-// rotr - see sl.dz
-
-
-// shl - see sl.iz
-
-
-// sl.{d|e|i}{m|s|z}
-void::function::do_shift:int Dest, unsigned32 source, int Merge, int i, int n, int EndMask, int Rotate
-{
-  /* see 10-30 for a reasonable description */
-  unsigned32 input = source;
-  unsigned32 rotated;
-  unsigned32 endmask;
-  unsigned32 shiftmask;
-  unsigned32 cm;
-  int nRotate;
-  /* rotate the source */
-  if (n)
-    {
-      rotated = ROTR32 (source, Rotate);
-      nRotate = (- Rotate) & 31;
-    }
-  else
-    {
-      rotated = ROTL32 (source, Rotate);
-      nRotate = Rotate;
-    }
-  /* form the end mask */
-  if (EndMask == 0)
-    endmask = ~ (unsigned32)0;
-  else
-    endmask = (1 << EndMask) - 1;
-  if (i)
-    endmask = ~endmask;
-  /* form the shiftmask */
-  switch (Merge)
-    {
-    case 0: case 1: case 2:
-      shiftmask = ~ (unsigned32)0;  /* disabled */
-      break;
-    case 3: case 5:      /* enabled - 0 -> 32 */
-      if (nRotate == 0)
-        shiftmask = ~ (unsigned32)0;
-      else
-        shiftmask = ((1 << nRotate) - 1);  /* enabled - 0 -> 0 */
-      break;
-    case 4:
-      shiftmask = ((1 << nRotate) - 1);  /* enabled - 0 -> 0 */
-      break;
-    case 6: case 7:
-      shiftmask = ~((1 << nRotate) - 1);  /* inverted */
-      break;
-    default:
-      sim_engine_abort (SD, CPU, cia,
-                        "0x%lx: Invalid merge (%d) for shift",
-                        (long) cia.ip, (int) source);
-      shiftmask = 0;
-    }
-  /* and the composite mask */
-  cm = shiftmask & endmask;
-  /* and merge */
-  switch (Merge)
-    {
-    case 0: case 3: case 6:    /* zero */
-      GPR (Dest) = rotated & cm;
-      break;
-    case 1: case 4: case 7:    /* merge */
-      GPR (Dest) = (rotated & cm) | (GPR (Dest) & ~cm);
-      break;
-    case 2: case 5:      /* sign */
-      {
-        int b;
-        GPR (Dest) = rotated & cm;
-        for (b = 1; b <= 31; b++)
-          if (!MASKED32 (cm, b, b))
-            GPR (Dest) |= INSERTED32 (EXTRACTED32 (GPR (Dest), b - 1, b - 1),
-                                      b, b);
-      }
-      break;
-    default:
-      sim_engine_abort (SD, CPU, cia,
-                        "0x%lx: Invalid merge (%d)",
-                        (long) cia.ip, (int) source);
-    }
-  TRACE_SHIFT (MY_INDEX, GPR (Dest), input, i, n, Merge, EndMask, Rotate);
-}
-const char *::function::str_Merge:int Merge
-{
-  switch (Merge)
-    {
-    case 0: return "dz";
-    case 1: return "dm";
-    case 2: return "ds";
-    case 3: return "ez";
-    case 4: return "em";
-    case 5: return "es";
-    case 6: return "iz";
-    case 7: return "im";
-    default: return "?";
-    }
-}
-31.Dest,26.Source,21.0b0001,17.Merge,14./,11.i,10.n,9.EndMask,4.Rotate::::sl i
-"sl.%s<Merge> <Rotate>, <EndMask>, r<Source>, r<Dest>"
-{
-  do_shift (_SD, Dest, vSource, Merge, i, n, EndMask, Rotate);
-}
-31.Dest,26.Source,21.0b110001,15.Merge,12.0,11.i,10.n,9.EndMask,4.RotReg::::sl r
-"sl.%s<Merge> r<RotReg>, <EndMask>, r<Source>, r<Dest>"
-{
-  do_shift (_SD, Dest, vSource, Merge, i, n, EndMask, GPR (RotReg) & 31);
-}
-
-// sli.{d|e|i}{m|s|z} - see shift
-
-
-// sr.{d|e|i}{m|s|z} - see shift
-
-
-// sra - see sr.es - see shift
-
-
-// sri.{d|e|i}{m|s|z} - see shift
-
-
-// srl - see sr.ez
-
-
-// st[{.b|.h|.d}]
-void::function::do_st:int Source, unsigned32 base, unsigned32 *rBase, int m , int sz, int S, unsigned32 offset
-{
-  unsigned32 addr;
-  switch (sz)
-    {
-    case 0:
-      addr = base + (S ? (offset << 0) : offset);
-      STORE (addr, 1, GPR(Source));
-      break;
-    case 1:
-      addr = base + (S ? (offset << 1) : offset);
-      STORE (addr, 2, GPR(Source));
-      break;
-    case 2:
-      addr = base + (S ? (offset << 2) : offset);
-      STORE (addr, 4, GPR(Source));
-      break;
-    case 3:
-      {
-        signed64 val;
-        if (Source & 0x1)
-          sim_engine_abort (SD, CPU, cia,
-                            "0x%lx: st.d with odd source register %d",
-                            cia.ip, Source);
-        addr = base + (S ? (offset << 3) : offset);
-        val = U8_4 (GPR(Source + 1), GPR(Source));
-        STORE (addr, 8, val);
-      }
-      break;
-    default:
-      addr = -1;
-      sim_engine_abort (SD, CPU, cia, "st - invalid sz %d", sz);
-    }
-  if (m)
-    *rBase = addr;
-  TRACE_ST (Source, m, S, base, offset);
-}
-31.Source,26.Base,21.0b0110,17.m,16.sz,14.SignedOffset::::st i
-"st%s<sz> <SignedOffset> (r<Base>%s<m>), r<Source>"
-{
-  do_st (_SD, Source, vBase, rBase, m, sz, 0, vSignedOffset);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.0,11.S,10.0,9./,4.IndOff::::st r
-"st%s<sz> r<IndOff>%s<S> (r<Base>%s<m>), r<Source>"
-{
-  do_st (_SD, Source, vBase, rBase, m, sz, S, rIndOff);
-}
-31.Source,26.Base,21.0b110110,15.m,14.sz,12.1,11.S,10.0,9./+LongSignedImmediateOffset::::st l
-"st%s<sz> 0x%08lx<LongSignedImmediateOffset>%s<S> (r<Base>%s<m>), r<Source>"
-{
-  do_st (_SD, Source, vBase, rBase, m, sz, S, LongSignedImmediateOffset);
-}
-
-// sub
-void::function::do_sub:signed32 *rDest, signed32 Source1, signed32 Source2
-{
-  ALU_BEGIN (Source1);
-  ALU_SUB (Source2);
-  ALU_END (*rDest);
-  TRACE_ALU3 (MY_INDEX, *rDest, Source1, Source2);
-}
-31.Dest,26.Source2,21.0b101101,15.0,14.SignedImmediate::::sub i
-"sub <SignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_sub (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.0,12.0,11./,4.Source1::::sub r
-"sub r<Source1>, r<Source2>, r<Dest>"
-{
-  do_sub (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.0,12.1,11./+LongSignedImmediate::::sub l
-"sub 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_sub (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// subu
-void::function::do_subu:unsigned32 *rDest, unsigned32 Source1, signed32 Source2
-{
-  unsigned32 result = Source1 - Source2;
-  TRACE_ALU3 (MY_INDEX, result, Source1, Source2);
-  *rDest = result;
-}
-// NOTE - the book has 15.1 which conflicts with subu.
-31.Dest,26.Source2,21.0b101101,15.1,14.SignedImmediate::::subu i
-"subu <SignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_subu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.1,12.0,11./,4.Source1::::subu r
-"subu r<Source1>, r<Source2>, r<Dest>"
-{
-  do_subu (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b11101101,13.1,12.1,11./+LongSignedImmediate::::subu l
-"subu 0x%08lx<LongSignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_subu (_SD, rDest, LongSignedImmediate, vSource2);
-}
-
-// swcr
-void::function::do_swcr:int Dest, signed32 source, signed32 cr
-{
-  tic80_control_regs reg = tic80_index2cr (cr);
-  /* cache the old CR value */
-  unsigned32 old_cr = CR (cr);
-  /* Handle the write if allowed */
-  if (cr >= 0x4000 || !(CPU)->is_user_mode)
-    switch (reg)
-      {
-      case INTPEN_CR:
-        CR (cr) &= ~source;
-        break;
-      default:
-        CR (cr) = source;
-        break;
-      }
-  /* Finish off the read */
-  GPR (Dest) = old_cr;
-  TRACE_SINK3 (MY_INDEX, source, cr, Dest);
-}
-31.Dest,26.Source,21.0b000010,15.1,14.UCRN::::swcr i
-"swcr CR[<UCRN>], r<Dest>"
-{
-  do_swcr (_SD, Dest, vSource, UCRN);
-}
-31.Dest,26.Source,21.0b11000010,13.1,12.0,11./,4.INDCR::::swcr r
-"swcr CR[r<INDCR>], r<Dest>"
-{
-  do_swcr (_SD, Dest, vSource, UCRN);
-}
-31.Dest,26.Source,21.0b11000010,13.1,12.1,11./+LongUnsignedControlRegisterNumber::::swcr l
-"swcr CR[<LongUnsignedControlRegisterNumber>], r<Dest>"
-{
-  do_swcr (_SD, Dest, vSource, LongUnsignedControlRegisterNumber);
-}
-
-// trap
-void::function::do_trap:unsigned32 trap_number
-{
-  int i;
-  TRACE_SINK1 (MY_INDEX, trap_number);
-  switch (trap_number)
-    {
-    case 72:
-      switch (GPR(15))
-        {
-        case 1: /* EXIT */
-          {
-            sim_engine_halt (SD, CPU, NULL, cia, sim_exited, GPR(2));
-            break;
-          }
-        case 4: /* WRITE */
-          {
-            unsigned i;
-            if (GPR(2) == 1)
-        for (i = 0; i < GPR(6); i++)
-                {
-            char c;
-            c = MEM (unsigned, GPR(4) + i, 1);
-                  sim_io_write_stdout (SD, &c, 1);
-                }
-            else if (GPR(2) == 2)
-        for (i = 0; i < GPR(6); i++)
-                {
-            char c;
-            c = MEM (unsigned, GPR(4) + i, 1);
-                  sim_io_write_stderr (SD, &c, 1);
-                }
-            else
-              sim_engine_abort (SD, CPU, cia,
-                                "0x%lx: write to invalid fid %d",
-                                (long) cia.ip, (int) GPR(2));
-            GPR(2) = GPR(6);
-            break;
-          }
-        case 20: /* GETPID */
-    {
-      GPR(2) = getpid ();
-      break;
-    }
-        case 37: /* KILL */
-    if ( GPR (2) != (unsigned) getpid ())
-      {
-        int ret = kill (GPR(2), GPR(4));
-        if (ret < 0)
-          ret = -errno;
-        GPR (2) = ret;
-        break;
-      }
-    else
-      {
-        sim_engine_halt (SD, CPU, NULL, cia, sim_signalled, GPR(4));
-        break;
-      }
-        default:
-    /* For system calls which are defined, just return EINVAL instead of trapping */
-    if (GPR(15) <= 204)
-      {
-        GPR(2) = -22;    /* -EINVAL */
-        break;
-      }
-          sim_engine_abort (SD, CPU, cia,
-                            "0x%lx: unknown syscall %d",
-                            (long) cia.ip, (int) GPR(15));
-        }
-      break;
-    case 73:
-      sim_engine_halt (SD, CPU, NULL, cia, sim_stopped, SIM_SIGTRAP);
-
-    /* Add a few traps for now to print the register state */
-    case 74:
-    case 75:
-    case 76:
-    case 77:
-    case 78:
-    case 79:
-      if (!TRACE_ALU_P (CPU))
-        trace_one_insn (SD, CPU, cia.ip, 1, itable[MY_INDEX].file,
-            itable[MY_INDEX].line_nr, "trap",
-            "Trap %ld", (long) trap_number);
-
-      for (i = 0; i < 32; i++)
-        sim_io_eprintf (SD, "%s0x%.8lx%s", ((i % 8) == 0) ? "\t" : " ", (long)GPR(i),
-            (((i+1) % 8) == 0) ? "\n" : "");
-      sim_io_write_stderr (SD, "\n", 1);
-      break;
-
-    default:
-      sim_engine_abort (SD, CPU, cia,
-                        "0x%lx: unsupported trap %d",
-                        (long) cia.ip, (int) trap_number);
-    }
-}
-31./,27.0,26./,21.0b0000001,14.UTN::::trap i
-"trap <UTN>"
-{
-  do_trap (_SD, UTN);
-}
-31./,27.0,26./,21.0b110000001,12.0,11./,4.INDTR::::trap r
-"trap r<INDTR>"
-{
-  do_trap (_SD, UTN);
-}
-31./,27.0,26./,21.0b110000001,12.1,11./+UTN::::trap l
-"trap 0x%08lx<UTN>"
-{
-  do_trap (_SD, UTN);
-}
-
-// vadd.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b000,12.0,11./,10.*,9.*,7.PD,6.*,5.P1,4.Source::f::vadd r
-31.*,26.Dest,21.0b11110,16./,15.0b000,12.1,11./,10.*,9.*,7.PD,6.*,5.P1,4.Source::f::vadd l
-
-
-// vld{0|1}.{s|d} - see above - same instruction
-#31.Dest,26.*,21.0b11110,16.*,10.1,9.S,8.*,6.p,7.******::f::vld
-
-
-// vmac.ss{s|d}
-#31.*,   26.Source2,21.0b11110,16.a0,15.0b110,12.0,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4.Source1::f::vmac.ss ra
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b110,12.0,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4.Source1::f::vmac.ss rr
-#31.*,   26.Source2,21.0b11110,16.a0,15.0b110,12.1,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4./::f::vmac.ss ia
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b110,12.1,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4./::f::vmac.ss ir
-
-
-// vmpy.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b010,12.0,11./,10.*,8.*,7.PD,6.*,5.P1,4.Source::f::vmpy r
-31.*,26.Dest,21.0b11110,16./,15.0b010,12.1,11./,10.*,8.*,7.PD,6.*,5.P1,4./::f::vmpy l
-
-
-// vmsc.ss{s|d}
-#31.*,   26.Source2,21.0b11110,16.a0,15.0b111,12.0,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4.Source1::f::vmsc.ss ra
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b111,12.0,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4.Source1::f::vmsc.ss rr
-#31.*,   26.Source2,21.0b11110,16.a0,15.0b111,12.1,11.a1,10.*,9.*, 8.Z,7./,6.*,5./,4./::f::vmsc.ss ia
-31.Dest,26.Source2,21.0b11110,16.a0,15.0b111,12.1,11.a1,10.0,9.PD,8.Z,7./,6.0,5./,4./::f::vmsc.ss ir
-
-
-// vmsub.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16.a0,15.0b011,12.0,11.a1,10.*,8.Z,7.PD,6.*,5./,4.Source::f::vmsub r
-31.*,26.Dest,21.0b11110,16.a0,15.0b011,12.1,11.a1,10.*,8.Z,7.PD,6.*,5./,4./::f::vmsub l
-
-
-// vrnd.{s|d}{s|d}
-31.*,26.Dest,21.0b11110,16.a0,15.0b100,12.0,11.a1,10.*,8.PD,6.*,5.P1,4.Source::f::vrnd f r
-31.*,26.Dest,21.0b11110,16.a0,15.0b100,12.1,11.a1,10.*,8.PD,6.*,5.P1,4./::f::vrnd f l
-
-
-// vrnd.{i|u}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b101,12.0,11./,10.*,8./,7.PD,6.*,5.P1,4.Source::f::vrnd i r
-31.*,26.Dest,21.0b11110,16./,15.0b101,12.1,11./,10.*,8./,7.PD,6.*,5.P1,4./::f::vrnd i l
-
-
-// vst.{s|d} - see above - same instruction
-#31.Source,26.*,21.0b11110,16.*,10.0,9.S,8.*,6.1,5.*::f::vst
-
-
-// vsub.{i|u}{s|d}
-31.*,26.Dest,21.0b11110,16./,15.0b001,12.0,11./,10.*,8./,7.PD,6.*,5.P1,4.Source::f::vsub r
-31.*,26.Dest,21.0b11110,16./,15.0b001,12.1,11./,10.*,8./,7.PD,6.*,5.P1,4./::f::vsub l
-
-
-// wrcr - see swcr, creg, source, r0
-
-
-// xnor
-void::function::do_xnor:signed32 *rDest, signed32 source1, signed32 source2
-{
-  unsigned32 result = ~ (source1 ^ source2);
-  TRACE_ALU3 (MY_INDEX, result, source1, source2);
-  *rDest = result;
-}
-31.Dest,26.Source2,21.0b0011001,14.UnsignedImmediate::::xnor i
-"xnor <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_xnor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011001,12.0,11./,4.Source1::::xnor r
-"xnor r<Source1>, r<Source2>, r<Dest>"
-{
-  do_xnor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110011001,12.1,11./+LongUnsignedImmediate::::xnor l
-"xnor 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_xnor (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
-
-// xor
-void::function::do_xor:signed32 *rDest, signed32 source1, signed32 source2
-{
-  unsigned32 result = source1 ^ source2;
-  TRACE_ALU3 (MY_INDEX, result, source1, source2);
-  *rDest = result;
-}
-31.Dest,26.Source2,21.0b0010110,14.UnsignedImmediate::::xor i
-"xor <UnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_xor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010110,12.0,11./,4.Source1::::xor r
-"xor r<Source1>, r<Source2>, r<Dest>"
-{
-  do_xor (_SD, rDest, vSource1, vSource2);
-}
-31.Dest,26.Source2,21.0b110010110,12.1,11./+LongUnsignedImmediate::::xor l
-"xor 0x%08lx<LongUnsignedImmediate>, r<Source2>, r<Dest>"
-{
-  do_xor (_SD, rDest, LongUnsignedImmediate, vSource2);
-}
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 477f711..cb20ad5 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-17  Andrew Cagney  <cagney@redhat.com>
+
+	* simops.c (trace_result): Fix printf formatting.
+
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
 2001-12-02  Andrew Cagney  <ac131313@redhat.com>
 
 	* Makefile.in (simops.h, table.c): Delete targets.
diff --git a/sim/v850/configure b/sim/v850/configure
index 900d46b..15c4011 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -159,7 +159,9 @@
 ac_help="$ac_help
   --enable-sim-hostendian=end		Specify host byte endian orientation."
 ac_help="$ac_help
-  --enable-build-warnings[=LIST]		Enable build-time compiler warnings"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
+ac_help="$ac_help
+  --enable-gdb-build-warnings Enable SIM specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --enable-sim-reserved-bits		Specify whether to check reserved bits in instruction."
 ac_help="$ac_help
@@ -687,7 +689,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:691: checking how to run the C preprocessor" >&5
+echo "configure:693: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -702,13 +704,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 706 "configure"
+#line 708 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:714: \"$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
   :
@@ -719,13 +721,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 723 "configure"
+#line 725 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:731: \"$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
   :
@@ -736,13 +738,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 740 "configure"
+#line 742 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:748: \"$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
   :
@@ -767,7 +769,7 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:771: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:773: 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
@@ -794,7 +796,7 @@
 fi
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:798: checking for POSIXized ISC" >&5
+echo "configure:800: 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
@@ -815,12 +817,12 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:819: checking for ANSI C header files" >&5
+echo "configure:821: 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 <<EOF
-#line 824 "configure"
+#line 826 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -828,7 +830,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:834: \"$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*
@@ -845,7 +847,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 849 "configure"
+#line 851 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -863,7 +865,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
+#line 869 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -884,7 +886,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 888 "configure"
+#line 890 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -895,7 +897,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -919,12 +921,12 @@
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:923: checking for working const" >&5
+echo "configure:925: 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 <<EOF
-#line 928 "configure"
+#line 930 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -973,7 +975,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -994,21 +996,21 @@
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:998: checking for inline" >&5
+echo "configure:1000: 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 <<EOF
-#line 1005 "configure"
+#line 1007 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1034,12 +1036,12 @@
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1038: checking for off_t" >&5
+echo "configure:1040: 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 <<EOF
-#line 1043 "configure"
+#line 1045 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1067,12 +1069,12 @@
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1071: checking for size_t" >&5
+echo "configure:1073: 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 <<EOF
-#line 1076 "configure"
+#line 1078 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1102,19 +1104,19 @@
 # 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:1106: checking for working alloca.h" >&5
+echo "configure:1108: 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 <<EOF
-#line 1111 "configure"
+#line 1113 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1120: \"$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
@@ -1135,12 +1137,12 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1139: checking for alloca" >&5
+echo "configure:1141: 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 <<EOF
-#line 1144 "configure"
+#line 1146 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1168,7 +1170,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1174: \"$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
@@ -1200,12 +1202,12 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1204: checking whether alloca needs Cray hooks" >&5
+echo "configure:1206: 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 <<EOF
-#line 1209 "configure"
+#line 1211 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1230,12 +1232,12 @@
 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:1234: checking for $ac_func" >&5
+echo "configure:1236: 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 <<EOF
-#line 1239 "configure"
+#line 1241 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1258,7 +1260,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1264: \"$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
@@ -1285,7 +1287,7 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1289: checking stack direction for C alloca" >&5
+echo "configure:1291: 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
@@ -1293,7 +1295,7 @@
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1297 "configure"
+#line 1299 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1312,7 +1314,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1318: \"$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
@@ -1337,17 +1339,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1341: checking for $ac_hdr" >&5
+echo "configure:1343: 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
-#line 1346 "configure"
+#line 1348 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1353: \"$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*
@@ -1376,12 +1378,12 @@
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1380: checking for $ac_func" >&5
+echo "configure:1382: 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 <<EOF
-#line 1385 "configure"
+#line 1387 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1404,7 +1406,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1410: \"$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
@@ -1429,7 +1431,7 @@
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1433: checking for working mmap" >&5
+echo "configure:1435: 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
@@ -1437,7 +1439,7 @@
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1441 "configure"
+#line 1443 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1577,7 +1579,7 @@
 }
 
 EOF
-if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1583: \"$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
@@ -1600,12 +1602,12 @@
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1604: checking for Cygwin environment" >&5
+echo "configure:1606: 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 <<EOF
-#line 1609 "configure"
+#line 1611 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1616,7 +1618,7 @@
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1633,19 +1635,19 @@
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1637: checking for mingw32 environment" >&5
+echo "configure:1639: 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 <<EOF
-#line 1642 "configure"
+#line 1644 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1712,7 +1714,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1716: checking host system type" >&5
+echo "configure:1718: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1733,7 +1735,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1737: checking target system type" >&5
+echo "configure:1739: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1751,7 +1753,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1755: checking build system type" >&5
+echo "configure:1757: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1795,7 +1797,7 @@
 # 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:1799: checking for $ac_word" >&5
+echo "configure:1801: 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
@@ -1825,7 +1827,7 @@
   # 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:1829: checking for $ac_word" >&5
+echo "configure:1831: 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
@@ -1876,7 +1878,7 @@
       # 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:1880: checking for $ac_word" >&5
+echo "configure:1882: 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
@@ -1908,7 +1910,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1912: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1914: 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.
@@ -1919,12 +1921,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1923 "configure"
+#line 1925 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1930: \"$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
@@ -1950,12 +1952,12 @@
   { 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:1954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1956: 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:1959: checking whether we are using GNU C" >&5
+echo "configure:1961: 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
@@ -1964,7 +1966,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1968: \"$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:1970: \"$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
@@ -1983,7 +1985,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1987: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1989: 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
@@ -2026,7 +2028,7 @@
 # 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:2030: checking for a BSD compatible install" >&5
+echo "configure:2032: 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
@@ -2094,7 +2096,7 @@
 # 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:2098: checking for $ac_word" >&5
+echo "configure:2100: 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
@@ -2129,17 +2131,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2133: checking for $ac_hdr" >&5
+echo "configure:2135: 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
-#line 2138 "configure"
+#line 2140 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2145: \"$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*
@@ -2169,12 +2171,12 @@
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2173: checking for $ac_func" >&5
+echo "configure:2175: 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 <<EOF
-#line 2178 "configure"
+#line 2180 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2197,7 +2199,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2203: \"$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
@@ -2226,12 +2228,12 @@
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2230: checking for $ac_func" >&5
+echo "configure:2232: 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 <<EOF
-#line 2235 "configure"
+#line 2237 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2254,7 +2256,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2260: \"$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
@@ -2288,19 +2290,19 @@
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2292: checking for LC_MESSAGES" >&5
+echo "configure:2294: 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 <<EOF
-#line 2297 "configure"
+#line 2299 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2306: \"$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
@@ -2321,7 +2323,7 @@
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2325: checking whether NLS is requested" >&5
+echo "configure:2327: 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"
@@ -2341,7 +2343,7 @@
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2345: checking whether included gettext is requested" >&5
+echo "configure:2347: 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"
@@ -2360,17 +2362,17 @@
 
 	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2364: checking for libintl.h" >&5
+echo "configure:2366: 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
-#line 2369 "configure"
+#line 2371 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2376: \"$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*
@@ -2387,19 +2389,19 @@
 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:2391: checking for gettext in libc" >&5
+echo "configure:2393: 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 <<EOF
-#line 2396 "configure"
+#line 2398 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2405: \"$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
@@ -2415,7 +2417,7 @@
 
 	   if test "$gt_cv_func_gettext_libc" != "yes"; then
 	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2419: checking for bindtextdomain in -lintl" >&5
+echo "configure:2421: 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
@@ -2423,7 +2425,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2427 "configure"
+#line 2429 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2434,7 +2436,7 @@
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2440: \"$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
@@ -2450,19 +2452,19 @@
 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:2454: checking for gettext in libintl" >&5
+echo "configure:2456: 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 <<EOF
-#line 2459 "configure"
+#line 2461 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2468: \"$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
@@ -2490,7 +2492,7 @@
 	      # 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:2494: checking for $ac_word" >&5
+echo "configure:2496: 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
@@ -2524,12 +2526,12 @@
 		for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2528: checking for $ac_func" >&5
+echo "configure:2530: 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 <<EOF
-#line 2533 "configure"
+#line 2535 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2552,7 +2554,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2558: \"$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
@@ -2579,7 +2581,7 @@
 		# 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:2583: checking for $ac_word" >&5
+echo "configure:2585: 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
@@ -2615,7 +2617,7 @@
 		# 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:2619: checking for $ac_word" >&5
+echo "configure:2621: 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
@@ -2647,7 +2649,7 @@
 fi
 
 		cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
+#line 2653 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2655,7 +2657,7 @@
 			       return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
 		   DATADIRNAME=share
@@ -2687,7 +2689,7 @@
         # 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:2691: checking for $ac_word" >&5
+echo "configure:2693: 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
@@ -2721,7 +2723,7 @@
         # 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:2725: checking for $ac_word" >&5
+echo "configure:2727: 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
@@ -2757,7 +2759,7 @@
         # 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:2761: checking for $ac_word" >&5
+echo "configure:2763: 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
@@ -2847,7 +2849,7 @@
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2851: checking for catalogs to be installed" >&5
+echo "configure:2853: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2875,17 +2877,17 @@
       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:2879: checking for linux/version.h" >&5
+echo "configure:2881: 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
-#line 2884 "configure"
+#line 2886 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2891: \"$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*
@@ -2954,17 +2956,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2958: checking for $ac_hdr" >&5
+echo "configure:2960: 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
-#line 2963 "configure"
+#line 2965 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2970: \"$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*
@@ -2994,17 +2996,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2998: checking for $ac_hdr" >&5
+echo "configure:3000: 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
-#line 3003 "configure"
+#line 3005 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3010: \"$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*
@@ -3034,17 +3036,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3038: checking for $ac_hdr" >&5
+echo "configure:3040: 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
-#line 3043 "configure"
+#line 3045 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3050: \"$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*
@@ -3074,17 +3076,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3078: checking for $ac_hdr" >&5
+echo "configure:3080: 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
-#line 3083 "configure"
+#line 3085 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3090: \"$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*
@@ -3113,12 +3115,12 @@
 for ac_func in getrusage time sigaction __setfpucw
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_func" >&5
+echo "configure:3119: 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 <<EOF
-#line 3122 "configure"
+#line 3124 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3141,7 +3143,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3147: \"$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
@@ -3168,7 +3170,7 @@
 
 # Check for socket libraries
 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3172: checking for bind in -lsocket" >&5
+echo "configure:3174: checking for bind in -lsocket" >&5
 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3176,7 +3178,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3180 "configure"
+#line 3182 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3187,7 +3189,7 @@
 bind()
 ; return 0; }
 EOF
-if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3193: \"$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
@@ -3215,7 +3217,7 @@
 fi
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3219: checking for gethostbyname in -lnsl" >&5
+echo "configure:3221: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3223,7 +3225,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3227 "configure"
+#line 3229 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3234,7 +3236,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3240: \"$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
@@ -3410,12 +3412,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3414: checking return type of signal handlers" >&5
+echo "configure:3416: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3419 "configure"
+#line 3421 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3432,7 +3434,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3454,7 +3456,7 @@
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3458: checking for executable suffix" >&5
+echo "configure:3460: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3464,7 +3466,7 @@
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -3615,14 +3617,14 @@
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3619: checking whether byte ordering is bigendian" >&5
+echo "configure:3621: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3626 "configure"
+#line 3628 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3633,11 +3635,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3641 "configure"
+#line 3643 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3648,7 +3650,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3668,7 +3670,7 @@
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3672 "configure"
+#line 3674 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3681,7 +3683,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3715,37 +3717,84 @@
 fi
 
 
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# NOTE: If you add to this list, remember to update
+# gdb/doc/gdbint.texinfo.
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
 # Check whether --enable-build-warnings or --disable-build-warnings was given.
 if test "${enable_build_warnings+set}" = set; then
   enableval="$enable_build_warnings"
-  build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
-case "${enableval}" in
+  case "${enableval}" in
   yes)	;;
   no)	build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${build_warnings} ${t}";;
+        build_warnings="${build_warnings} ${t}";;
   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-	build_warnings="${t} ${build_warnings}";;
-  *)	build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting warning flags = $build_warnings" 6>&1
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-sim-build-warnings or --disable-sim-build-warnings was given.
+if test "${enable_sim_build_warnings+set}" = set; then
+  enableval="$enable_sim_build_warnings"
+  case "${enableval}" in
+  yes)	;;
+  no)	build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
 fi
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
 then
-  # Separate out the -Werror flag as some files just cannot be
-  # compiled with it enabled.
-  for w in ${build_warnings}; do
-    case $w in
-    -Werr*) WERROR_CFLAGS=-Werror ;;
-    *) WARN_CFLAGS="${WARN_CFLAGS} $w"
-    esac
-  done
-fi
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:3770: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+	case $w in
+	-Werr*) WERROR_CFLAGS=-Werror ;;
+	*) # Check that GCC accepts it
+	    saved_CFLAGS="$CFLAGS"
+	    CFLAGS="$CFLAGS $w"
+	    cat > conftest.$ac_ext <<EOF
+#line 3780 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
-  build_warnings=""
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+	    CFLAGS="$saved_CFLAGS"
+	esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
 
@@ -3829,12 +3878,12 @@
 for ac_func in time chmod utime fork execve execv chown
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3833: checking for $ac_func" >&5
+echo "configure:3882: 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 <<EOF
-#line 3838 "configure"
+#line 3887 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3857,7 +3906,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3885,17 +3934,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3889: checking for $ac_hdr" >&5
+echo "configure:3938: 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
-#line 3894 "configure"
+#line 3943 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3948: \"$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*
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index f6f43ee..9a83d07 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -211,7 +211,8 @@
     int i;
     for (i = 0; i < trace_num_values; i++)
       {
-	sprintf (chp, "%*s0x%.8lx", SIZE_VALUES - 10, "", trace_values[i]);
+	sprintf (chp, "%*s0x%.8lx", SIZE_VALUES - 10, "",
+		 (long) trace_values[i]);
 	chp = strchr (chp, '\0');
       }
     while (i++ < 3)
diff --git a/sim/w65/ChangeLog b/sim/w65/ChangeLog
deleted file mode 100644
index 088f8b2..0000000
--- a/sim/w65/ChangeLog
+++ /dev/null
@@ -1,148 +0,0 @@
-Tue May 23 21:39:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-Thu Sep  2 18:15:53 1999  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-
-1999-05-08  Felix Lee  <flee@cygnus.com>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	
-Sun Apr 26 15:31:55 1998  Tom Tromey  <tromey@creche>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Sun Apr 26 15:19:08 1998  Tom Tromey  <tromey@cygnus.com>
-
-	* acconfig.h: New file.
-	* configure.in: Reverted change of Apr 24; use sinclude again.
-	Don't call AC_C_CROSS.
-
-Fri Apr 24 14:16:40 1998  Tom Tromey  <tromey@creche>
-
-	* configure: Regenerated to track ../common/aclocal.m4 changes.
-	* config.in: Ditto.
-
-Fri Apr 24 11:17:46 1998  Tom Tromey  <tromey@cygnus.com>
-
-	* acconfig.h: Removed.
-	* configure.in: Call CY_GNU_GETTEXT.
-	* Makefile.in (INTLLIBS): New macro.
-	(INTLDEPS): Likewise.
-	($(RUN_PROG)): Depend on INTLDEPS; link against INTLLIBS.
-	(top_builddir): New macro.
-
-Wed Apr 22 14:29:50 1998  Michael Meissner  <meissner@cygnus.com>
-
-	* configure: Regenerate with autoconf 2.12.1.
-
-Tue Feb 17 12:52:24 1998  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* run.c (main): Pass length into sim_fetch_register.
-
-	* interp.c (sim_store_register, sim_fetch_register): Pass in
- 	length parameter. Return -1.
-
-Tue Aug 26 10:43:11 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* interp.c (sim_kill): Delete.
-	(sim_create_inferior): Add ABFD argument.  Set PC from same.
-
-Mon Aug 25 16:34:33 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* interp.c (sim_open): Add ABFD argument. Change ARGV to PARGV.
-
-Tue May 20 10:24:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
-
-	* interp.c (sim_open): Add callback argument.
-
-Tue Apr 15 14:55:10 1997  Ian Lance Taylor  <ian@cygnus.com>
-
-	* Makefile.in (INSTALL): Set to @INSTALL@.
-	(INSTALL_XFORM, INSTALL_XFORM1): Remove.
-	(install): Depend upon installdirs.  Use $(program_transform_name)
-	directly, rather than using $(INSTALL_XFORM) and
-	$(INSTALL_XFORM1).
-	(installdirs): New target.
-
-Mon Apr 14 16:30:02 1997  Ian Lance Taylor  <ian@cygnus.com>
-
-	* Makefile.in (INSTALL): Change install.sh to install-sh.
-
-Wed Apr  2 15:40:30 1997  Doug Evans  <dje@canuck.cygnus.com>
-
-	* interp.c (sim_open): New arg `kind'.  `name is now `argv'.
-
-Thu Oct  3 16:17:59 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
-
-	* Makefile.in (mostlyclean): Move config.log to distclean.
-
-Wed Jun 26 12:30:45 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
-
-        * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
-        INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
-        (docdir): Removed.
-        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
-        (AC_PROG_INSTALL): Added.
-        * configure: Rebuilt.
-
-Wed Feb 21 12:17:04 1996  Ian Lance Taylor  <ian@cygnus.com>
-
-	* configure: Regenerate with autoconf 2.7.
-
-Thu Oct 19 21:44:14 1995  Fred Fish  <fnf@cygnus.com>
-
-	* Makefile.in:  Remove tabs from otherwise empty line.
-	Confuses many older non-GNU versions of "make".
-
-Tue Oct 10 11:13:01 1995  Fred Fish  <fnf@cygnus.com>
-
-	* Makefile.in (BISONFLAGS): Remove macro.
-
-Wed Sep 20 13:35:43 1995  Ian Lance Taylor  <ian@cygnus.com>
-
-	* Makefile.in (maintainer-clean): New synonym for realclean.
-
-Fri Sep  8 14:03:32 1995  Ian Lance Taylor  <ian@cygnus.com>
-
-	* configure.in: Convert to use autoconf.
-	* configure: New file, built by autoconf.
-	* acconfig.h: New file.
-	* config.in: New file, built by autoheader.
-	* Makefile.in: Various changes for new configure script.  Also:
-	(INSTALL): Go up two levels, not one.
-	(ALLOCA, MALLOC, OPCODES): Remove.
-	(gencode): Use $(CC_FOR_BUILD).
-	(case.o): Remove.
-	(run.o, interp.o): Depend upon config.h.
-	* interp.c: Include "config.h".  Don't include "sysdep.h".
-	Include <stdlib.h>, <time.h>, and <unistd.h> if they exist.
-	* run.c: Include "config.h".  Don't include "sysdep.h".  Include
-	<stdlib.h> if it exists.  Include "getopt.h".  Declare printf if
-	necessary.
-
-Thu Aug  3 10:45:37 1995  Fred Fish  <fnf@cygnus.com>
-
-	* Update all FSF addresses except those in COPYING* files.
-
-Wed Jul  5 16:12:53 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
-
-	* w65.mt: Removed.
-
-Wed May 24 16:31:38 1995  Jim Wilson  <wilson@chestnut.cygnus.com>
-
-	* configure.in: Fix typo in last change.
-
-Mon Mar 27 10:32:34 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
-
-	* run.c: parse arguments with getopt().
-
-Tue Feb 28 17:31:36 1995  Ian Lance Taylor  <ian@cygnus.com>
-
-	* configure.in: Use ../../bfd/hosts/std-host.h if specific
-	host unavailable.
-
-	* Started ChangeLog.
diff --git a/sim/w65/Makefile.in b/sim/w65/Makefile.in
deleted file mode 100644
index 8943bd5..0000000
--- a/sim/w65/Makefile.in
+++ /dev/null
@@ -1,247 +0,0 @@
-# Makefile for GNU binary-file utilities
-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
-
-# This file is part of GNU binutils.
-
-# 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.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-host_alias = @host_alias@
-target_alias = @target_alias@
-program_transform_name = @program_transform_name@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-
-datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-infodir = @infodir@
-includedir = @includedir@
-
-# This can be referenced by the gettext configuration code.
-top_builddir = ..
-
-SHELL = /bin/sh
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-
-AR = @AR@
-AR_FLAGS = qv
-CC = @CC@
-CFLAGS = @CFLAGS@
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-RANLIB = @RANLIB@
-TEXI2ROFF=texi2roff
-MAKEOVERRIDES=
-CC_FOR_BUILD = @CC_FOR_BUILD@
-
-HDEFINES = @HDEFINES@
-TDEFINES =
-
-# Comment these out if using lex.
-# Distribution version
-
-# Distribution name
-
-# Where to find texinfo.tex to format docn with TeX
-TEXIDIR = $(srcdir)/../texinfo
-
-# These should all be the same program too.
-RUN_PROG=run
-SIM_LIB=libsim.a
-ADDL_LIBS=
-
-PROGS = $(RUN_PROG)
-LIBS= $(SIM_LIB)
-
-DISTSTUFF = $(PROGS) $(LIBS)
-
-BASEDIR = $(srcdir)/../..
-BFDDIR = $(BASEDIR)/bfd
-INCDIR	= $(BASEDIR)/include
-GDBDIR = $(BASEDIR)/gdb
-INCLUDES = -I. -I$(srcdir) -I../../bfd -I$(BFDDIR) -I$(INCDIR) -I$(GDBDIR)
-
-#### host and target dependant Makefile fragments come in here.
-###
-
-ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
-
-.c.o:
-	$(CC) -c $(ALL_CFLAGS) $<
-
-LIBIBERTY = ../../libiberty/libiberty.a
-
-BFD = ../../bfd/libbfd.a
-
-INTLLIBS = @INTLLIBS@
-INTLDEPS = @INTLDEPS@
-
-RUNTEST = runtest
-RUNTESTFLAGS = 
-FLAGS_TO_PASS = \
-	"CC=$(CC)" \
-	"CFLAGS=$(CFLAGS)" \
-	"RUNTEST=$(RUNTEST)" \
-	"RUNTESTFLAGS=$(RUNTESTFLAGS)"
-
-#
-## The rules
-
-all: $(LIBS) $(PROGS)
-
-
-$(RUN_PROG): $(LIBS) run.o $(BFD) $(INTLDEPS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $(RUN_PROG) run.o $(SIM_LIB) $(BFD) $(INTLLIBS) $(LIBIBERTY)
-
-$(SIM_LIB): case.o interp.o
-	rm -f $(SIM_LIB)
-	$(AR) $(AR_FLAGS) $(SIM_LIB) case.o interp.o
-	$(RANLIB) $(SIM_LIB)
-
-case.c: gencode
-	./gencode -c >case.c                     ; \
-	if [ -x /usr/latest/bin/indent ] ; then    \
-		/usr/latest/bin/indent case.c    ; \
-	fi
-
-optable:gencode
-	./gencode >optable
-	./gencode -a >$(srcdir)/../../opcodes/w65-opc.h
-
-gencode:gencode.c
-	$(CC_FOR_BUILD) -o gencode $<
-
-run.o:run.c config.h
-interp.o:interp.c config.h
-
-
-######################################################################
-
-mostlyclean:
-	-rm -f *.o *~ \#* core binutils.?? binutils.??? case.c
-
-clean: mostlyclean
-	-rm -f $(PROGS) *.o *.a
-
-distclean:
-	-rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
-		binutils.?? binutils.??s binutils.aux binutils.log \
-		binutils.toc gencode run config.log
-	-rm -f $(PROGS) config.h stamp-h
-
-maintainer-clean realclean: clean distclean
-	-rm -f $(DISTSTUFF) TAGS
-
-etags tags: TAGS
-
-TAGS: force
-	etags $(INCDIR)/*.h $(srcdir)/*.[hc] 
-
-install: all installdirs
-	for i in $(PROGS) ; do \
-	  n=`echo $$i | sed -e 's/.new//' | sed '$(program_transform_name)'`; \
-	  $(INSTALL_PROGRAM) $$i $(bindir)/$$n; \
-	done
-
-installdirs:
-	$(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
-
-install-info:
-
-clean-info:
-	-rm -rf *.info*
-
-# Making a dist:
-# cvs rtag binutils-x-yy ld+utils
-# cvs co -r binutils-x-yy ld+utils
-# cd {HERE}; make dist [-f Makefile.in]
-
-dist: $(DIST_NAME).tar.z
-
-diststuff: $(DISTSTUFF)
-
-$(DIST_NAME).tar.z:
-	cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
-	make diststuff -f Makefile.in
-	cd ../ld; make diststuff -f Makefile.in
-	cd ../gprof; make diststuff -f Makefile.in
-	cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
-	# Take out texinfo from configurable dirs
-	mv ../configure.in tmp; \
-	  sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
-	cd ..; chmod og=u `find . -print`
-	cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
-	rm -rf ../../$(DIST_NAME)
-
-
-# Dummy target to force execution of dependent targets.
-#
-force:
-
-# Target to uncomment host-specific lines in this makefile.  Such lines must
-# have the following string beginning in column 1: #__<hostname>__#
-# Original Makefile is backed up as 'Makefile.old'.
-#
-# Invoke with:  make make HOST=xxx
-#
-make:
-	-@if test $(HOST)x = x ; then \
-		echo 'Specify "make make HOST=???"'; \
-		exit 1; \
-	fi ; \
-	grep -s "^#The next line was generated by 'make make'" Makefile; \
-	if test $$? = 0 ; then	\
-		echo "Makefile has already been processed with 'make make'";\
-		exit 1; \
-	fi ; \
-	mv -f Makefile Makefile.old; \
-	echo "#The next line was generated by 'make make'"	 >Makefile ; \
-	echo "HOST=$(HOST)"					>>Makefile ; \
-	echo							>>Makefile ; \
-	sed "s/^#__$(HOST)__#//" < Makefile.old			>>Makefile
-
-Makefile: Makefile.in config.status
-	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
-
-config.h: stamp-h ; @true
-stamp-h: config.in config.status
-	CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
-
-config.status: configure
-	$(SHELL) ./config.status --recheck
-
-### Local Variables: ***
-### mode:fundamental ***
-### page-delimiter: "^#" ***
-### End: ***
-### end of file
diff --git a/sim/w65/acconfig.h b/sim/w65/acconfig.h
deleted file mode 100644
index b61140c..0000000
--- a/sim/w65/acconfig.h
+++ /dev/null
@@ -1,18 +0,0 @@
-
-/* Define to 1 if NLS is requested.  */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have catgets and don't want to use GNU gettext.  */
-#undef HAVE_CATGETS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES.  */
-#undef HAVE_LC_MESSAGES
-
-/* Whether printf must be declared even if <stdio.h> is included.  */
-#undef NEED_DECLARATION_PRINTF
diff --git a/sim/w65/config.in b/sim/w65/config.in
deleted file mode 100644
index 68d2bf7..0000000
--- a/sim/w65/config.in
+++ /dev/null
@@ -1,131 +0,0 @@
-/* config.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if using alloca.c.  */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-   This function is required for alloca.c support on those systems.  */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro.  */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have a working `mmap' system call.  */
-#undef HAVE_MMAP
-
-/* Define as __inline if that's what the C compiler calls it.  */
-#undef inline
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define if you need to in order for stat and other things to work.  */
-#undef _POSIX_SOURCE
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define to 1 if NLS is requested.  */
-#undef ENABLE_NLS
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext.  */
-#undef HAVE_GETTEXT
-
-/* Define as 1 if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if your locale.h file contains LC_MESSAGES.  */
-#undef HAVE_LC_MESSAGES
-
-/* Whether printf must be declared even if <stdio.h> is included.  */
-#undef NEED_DECLARATION_PRINTF
-
-/* Define if you have the __argz_count function.  */
-#undef HAVE___ARGZ_COUNT
-
-/* Define if you have the __argz_next function.  */
-#undef HAVE___ARGZ_NEXT
-
-/* Define if you have the __argz_stringify function.  */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define if you have the dcgettext function.  */
-#undef HAVE_DCGETTEXT
-
-/* Define if you have the getcwd function.  */
-#undef HAVE_GETCWD
-
-/* Define if you have the getpagesize function.  */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the munmap function.  */
-#undef HAVE_MUNMAP
-
-/* Define if you have the putenv function.  */
-#undef HAVE_PUTENV
-
-/* Define if you have the setenv function.  */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function.  */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the stpcpy function.  */
-#undef HAVE_STPCPY
-
-/* Define if you have the strcasecmp function.  */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strchr function.  */
-#undef HAVE_STRCHR
-
-/* Define if you have the <argz.h> header file.  */
-#undef HAVE_ARGZ_H
-
-/* Define if you have the <limits.h> header file.  */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <locale.h> header file.  */
-#undef HAVE_LOCALE_H
-
-/* Define if you have the <malloc.h> header file.  */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <nl_types.h> header file.  */
-#undef HAVE_NL_TYPES_H
-
-/* Define if you have the <stdlib.h> header file.  */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
-
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <time.h> header file.  */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <values.h> header file.  */
-#undef HAVE_VALUES_H
diff --git a/sim/w65/configure b/sim/w65/configure
deleted file mode 100755
index 8b2b9ec..0000000
--- a/sim/w65/configure
+++ /dev/null
@@ -1,3354 +0,0 @@
-#! /bin/sh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-sim_inline="-DDEFAULT_INLINE=0"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This file is derived from `gettext.m4'.  The difference is that the
-# included macros assume Cygnus-style source and build trees.
-
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 3
-
-
-
-
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-
-
-
-
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --disable-nls           do not use Native Language Support"
-ac_help="$ac_help
-  --with-included-gettext use the GNU gettext library included here"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-sitefile=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --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
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -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=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.13"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=Makefile.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
-  fi
-else
-  CONFIG_SITE="$sitefile"
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:713: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:734: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
-  esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:752: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
-  case $nonopt in
-  NONE) build_alias=$host_alias ;;
-  *) build_alias=$nonopt ;;
-  esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-# 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:796: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-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:826: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_prog_rejected=no
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test -z "$CC"; then
-    case "`uname -s`" in
-    *win32* | *WIN32*)
-      # 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:877: 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
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="cl"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
- ;;
-    esac
-  fi
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:909: 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.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 920 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:925: \"$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
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:951: 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:956: 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
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:965: \"$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
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-
-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:984: 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
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:1027: 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
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-. ${srcdir}/../../bfd/configure.host
-
-
-
-AR=${AR-ar}
-
-# 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:1089: 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
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
-  CC_FOR_BUILD='$(CC)'
-else
-  CC_FOR_BUILD=gcc
-fi
-
-
-ALL_LINGUAS=
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1127: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1142 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1148: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1159 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1165: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -nologo -E"
-  cat > conftest.$ac_ext <<EOF
-#line 1176 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1182: \"$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
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1207: 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
-else
-  cat > conftestmake <<\EOF
-all:
-	@echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1234: 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
-  echo "$ac_t""yes" 1>&6
-  ISC=yes # If later tests want to check for ISC.
-  cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
-  if test "$GCC" = yes; then
-    CC="$CC -posix"
-  else
-    CC="$CC -Xp"
-  fi
-else
-  echo "$ac_t""no" 1>&6
-  ISC=
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1255: 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 <<EOF
-#line 1260 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1268: \"$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*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1285 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1303 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1324 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1359: 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 <<EOF
-#line 1364 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1434: 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 <<EOF
-#line 1441 "configure"
-#include "confdefs.h"
-
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_inline=$ac_kw; break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-
-fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
-  inline | yes) ;;
-  no) cat >> confdefs.h <<\EOF
-#define inline 
-EOF
- ;;
-  *)  cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
-EOF
- ;;
-esac
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1474: 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 <<EOF
-#line 1479 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_off_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
-#define off_t long
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1507: 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 <<EOF
-#line 1512 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned
-EOF
-
-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:1542: 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 <<EOF
-#line 1547 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1554: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1575: 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 <<EOF
-#line 1580 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#    endif
-#   endif
-#  endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1608: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1640: 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 <<EOF
-#line 1645 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1670: 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 <<EOF
-#line 1675 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1698: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
-  break
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1725: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1733 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1752: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-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:1777: 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
-#line 1782 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1787: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in getpagesize
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1816: 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 <<EOF
-#line 1821 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1844: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1869: 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
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1877 "configure"
-#include "confdefs.h"
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-	mmap private not fixed
-	mmap private fixed at somewhere currently unmapped
-	mmap private fixed at somewhere already mapped
-	mmap shared not fixed
-	mmap shared fixed at somewhere currently unmapped
-	mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192	/* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
-int
-main()
-{
-	char *data, *data2, *data3;
-	int i, pagesize;
-	int fd;
-
-	pagesize = getpagesize();
-
-	/*
-	 * First, make a file with some known garbage in it.
-	 */
-	data = malloc(pagesize);
-	if (!data)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		*(data + i) = rand();
-	umask(0);
-	fd = creat("conftestmmap", 0600);
-	if (fd < 0)
-		exit(1);
-	if (write(fd, data, pagesize) != pagesize)
-		exit(1);
-	close(fd);
-
-	/*
-	 * Next, try to mmap the file at a fixed address which
-	 * already has something else allocated at it.  If we can,
-	 * also make sure that we see the same garbage.
-	 */
-	fd = open("conftestmmap", O_RDWR);
-	if (fd < 0)
-		exit(1);
-	data2 = malloc(2 * pagesize);
-	if (!data2)
-		exit(1);
-	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data2 + i))
-			exit(1);
-
-	/*
-	 * Finally, make sure that changes to the mapped area
-	 * do not percolate back to the file as seen by read().
-	 * (This is a bug on some variants of i386 svr4.0.)
-	 */
-	for (i = 0; i < pagesize; ++i)
-		*(data2 + i) = *(data2 + i) + 1;
-	data3 = malloc(pagesize);
-	if (!data3)
-		exit(1);
-	if (read(fd, data3, pagesize) != pagesize)
-		exit(1);
-	for (i = 0; i < pagesize; ++i)
-		if (*(data + i) != *(data3 + i))
-			exit(1);
-	close(fd);
-	unlink("conftestmmap");
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:2017: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
-EOF
-
-fi
-
-                              
-   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-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:2045: 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
-#line 2050 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2055: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2085: 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 <<EOF
-#line 2090 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2113: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     for ac_func in stpcpy
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2142: 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 <<EOF
-#line 2147 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2170: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     cat >> confdefs.h <<\EOF
-#define HAVE_STPCPY 1
-EOF
-
-   fi
-
-   if test $ac_cv_header_locale_h = yes; then
-    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2204: 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 <<EOF
-#line 2209 "configure"
-#include "confdefs.h"
-#include <locale.h>
-int main() {
-return LC_MESSAGES
-; return 0; }
-EOF
-if { (eval echo configure:2216: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
-    if test $am_cv_val_LC_MESSAGES = yes; then
-      cat >> confdefs.h <<\EOF
-#define HAVE_LC_MESSAGES 1
-EOF
-
-    fi
-  fi
-   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2237: 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"
-  USE_NLS=$enableval
-else
-  USE_NLS=yes
-fi
-
-    echo "$ac_t""$USE_NLS" 1>&6
-    
-
-    USE_INCLUDED_LIBINTL=no
-
-        if test "$USE_NLS" = "yes"; then
-      cat >> confdefs.h <<\EOF
-#define ENABLE_NLS 1
-EOF
-
-      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2257: 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"
-  nls_cv_force_use_gnu_gettext=$withval
-else
-  nls_cv_force_use_gnu_gettext=no
-fi
-
-      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-                        		nls_cv_header_intl=
-	nls_cv_header_libgt=
-	CATOBJEXT=NONE
-
-	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2276: 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
-#line 2281 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2286: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-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:2303: 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 <<EOF
-#line 2308 "configure"
-#include "confdefs.h"
-#include <libintl.h>
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2315: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libc=no
-fi
-rm -f conftest*
-fi
-
-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:2331: 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
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2339 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char bindtextdomain();
-
-int main() {
-bindtextdomain()
-; return 0; }
-EOF
-if { (eval echo configure:2350: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-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:2366: 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 <<EOF
-#line 2371 "configure"
-#include "confdefs.h"
-
-int main() {
-return (int) gettext ("")
-; return 0; }
-EOF
-if { (eval echo configure:2378: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-	   fi
-
-	   if test "$gt_cv_func_gettext_libc" = "yes" \
-	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
-	      cat >> confdefs.h <<\EOF
-#define HAVE_GETTEXT 1
-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:2406: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-	      if test "$MSGFMT" != "no"; then
-		for ac_func in dcgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2440: 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 <<EOF
-#line 2445 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:2468: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-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:2495: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2531: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		cat > conftest.$ac_ext <<EOF
-#line 2563 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int _nl_msg_cat_cntr;
-			       return _nl_msg_cat_cntr
-; return 0; }
-EOF
-if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  CATOBJEXT=.gmo
-		   DATADIRNAME=share
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CATOBJEXT=.mo
-		   DATADIRNAME=lib
-fi
-rm -f conftest*
-		INSTOBJEXT=.mo
-	      fi
-	    fi
-	
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-	        
-        if test "$CATOBJEXT" = "NONE"; then
-	  	  	  nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" = "yes"; then
-                INTLOBJS="\$(GETTOBJS)"
-        # 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:2603: 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
-  case "$MSGFMT" in
-  /*)
-  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
-	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
-  ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
-  echo "$ac_t""$MSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2637: 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
-  case "$GMSGFMT" in
-  /*)
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
-  ;;
-  ?:/*)			 
-  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
-  ;;
-esac
-fi
-GMSGFMT="$ac_cv_path_GMSGFMT"
-if test -n "$GMSGFMT"; then
-  echo "$ac_t""$GMSGFMT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-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:2673: 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
-  case "$XGETTEXT" in
-  /*)
-  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
-	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
-	break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
-  ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
-  echo "$ac_t""$XGETTEXT" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-        
-	USE_INCLUDED_LIBINTL=yes
-        CATOBJEXT=.gmo
-        INSTOBJEXT=.mo
-        DATADIRNAME=share
-	INTLDEPS='$(top_builddir)/../intl/libintl.a'
-	INTLLIBS=$INTLDEPS
-	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-        nls_cv_header_intl=libintl.h
-        nls_cv_header_libgt=libgettext.h
-      fi
-
-            if test "$XGETTEXT" != ":"; then
-			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
-	  XGETTEXT=":"
-	fi
-      fi
-
-      # We need to process the po/ directory.
-      POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=libintl.h
-      nls_cv_header_libgt=libgettext.h
-    fi
-
-    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-    # because some of the sources are only built for this goal.
-    if test "$PACKAGE" = gettext; then
-      USE_NLS=yes
-      USE_INCLUDED_LIBINTL=yes
-    fi
-
-                for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-        
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-  
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2763: checking for catalogs to be installed" >&5
-       NEW_LINGUAS=
-       for lang in ${LINGUAS=$ALL_LINGUAS}; do
-         case "$ALL_LINGUAS" in
-          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       echo "$ac_t""$LINGUAS" 1>&6
-     fi
-
-          if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-            if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   
-
-            if test -f $srcdir/po2tbl.sed.in; then
-      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:2791: 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
-#line 2796 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2801: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  msgformat=linux
-else
-  echo "$ac_t""no" 1>&6
-msgformat=xopen
-fi
-
-
-	          	 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
-      fi
-            sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-	 $srcdir/po2tbl.sed.in > po2tbl.sed
-   fi
-
-            if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   
-   
-
-   MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-   
-
-      l=
-   
-
-            if test -d $srcdir/po; then
-      test -d po || mkdir po
-      if test "x$srcdir" != "x."; then
-	 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-	    posrcprefix="$srcdir/"
-	 else
-	    posrcprefix="../$srcdir/"
-	 fi
-      else
-	 posrcprefix="../"
-      fi
-      rm -f po/POTFILES
-      sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	 < $srcdir/po/POTFILES.in > po/POTFILES
-   fi
-  
-
-for ac_hdr in 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:2867: 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
-#line 2872 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2877: \"$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*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking whether printf must be declared""... $ac_c" 1>&6
-echo "configure:2905: checking whether printf must be declared" >&5
-if eval "test \"`echo '$''{'sim_cv_decl_needed_printf'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2910 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-int main() {
-int (*pfn) = (int (*)) printf
-; return 0; }
-EOF
-if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  sim_cv_decl_needed_printf=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  sim_cv_decl_needed_printf=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$sim_cv_decl_needed_printf" 1>&6
-if test $sim_cv_decl_needed_printf = yes; then
-  cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_PRINTF 1
-EOF
-
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set | grep ac_space) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.13"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@sim_environment@%$sim_environment%g
-s%@sim_alignment@%$sim_alignment%g
-s%@sim_assert@%$sim_assert%g
-s%@sim_bitsize@%$sim_bitsize%g
-s%@sim_endian@%$sim_endian%g
-s%@sim_hostendian@%$sim_hostendian%g
-s%@sim_float@%$sim_float%g
-s%@sim_scache@%$sim_scache%g
-s%@sim_default_model@%$sim_default_model%g
-s%@sim_hw_cflags@%$sim_hw_cflags%g
-s%@sim_hw_objs@%$sim_hw_objs%g
-s%@sim_hw@%$sim_hw%g
-s%@sim_inline@%$sim_inline%g
-s%@sim_packages@%$sim_packages%g
-s%@sim_regparm@%$sim_regparm%g
-s%@sim_reserved_bits@%$sim_reserved_bits%g
-s%@sim_smp@%$sim_smp%g
-s%@sim_stdcall@%$sim_stdcall%g
-s%@sim_xor_endian@%$sim_xor_endian%g
-s%@WARN_CFLAGS@%$WARN_CFLAGS%g
-s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@HDEFINES@%$HDEFINES%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@USE_NLS@%$USE_NLS%g
-s%@MSGFMT@%$MSGFMT%g
-s%@GMSGFMT@%$GMSGFMT%g
-s%@XGETTEXT@%$XGETTEXT%g
-s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
-s%@CATALOGS@%$CATALOGS%g
-s%@CATOBJEXT@%$CATOBJEXT%g
-s%@DATADIRNAME@%$DATADIRNAME%g
-s%@GMOFILES@%$GMOFILES%g
-s%@INSTOBJEXT@%$INSTOBJEXT%g
-s%@INTLDEPS@%$INTLDEPS%g
-s%@INTLLIBS@%$INTLLIBS%g
-s%@INTLOBJS@%$INTLOBJS%g
-s%@POFILES@%$POFILES%g
-s%@POSUB@%$POSUB%g
-s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
-s%@GT_NO@%$GT_NO%g
-s%@GT_YES@%$GT_YES%g
-s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
-s%@l@%$l%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/sim/w65/configure.in b/sim/w65/configure.in
deleted file mode 100644
index e2da7db..0000000
--- a/sim/w65/configure.in
+++ /dev/null
@@ -1,48 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-sinclude(../common/aclocal.m4)
-AC_PREREQ(2.5)dnl
-AC_INIT(Makefile.in)
-
-AC_CONFIG_HEADER(config.h:config.in)
-
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..)
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AC_PROG_CC
-AC_PROG_INSTALL
-
-. ${srcdir}/../../bfd/configure.host
-
-AC_SUBST(CFLAGS)
-AC_SUBST(HDEFINES)
-AR=${AR-ar}
-AC_SUBST(AR)
-AC_PROG_RANLIB
-
-# Put a plausible default for CC_FOR_BUILD in Makefile.
-if test "x$cross_compiling" = "xno"; then
-  CC_FOR_BUILD='$(CC)'
-else
-  CC_FOR_BUILD=gcc
-fi
-AC_SUBST(CC_FOR_BUILD)
-
-dnl We don't use gettext, but bfd does.  So we do the appropriate checks
-dnl to see if there are intl libraries we should link against.
-ALL_LINGUAS=
-CY_GNU_GETTEXT
-
-AC_CHECK_HEADERS(stdlib.h time.h unistd.h)
-
-AC_MSG_CHECKING([whether printf must be declared])
-AC_CACHE_VAL(sim_cv_decl_needed_printf,
-[AC_TRY_COMPILE([#include <stdio.h>],
-[int (*pfn) = (int (*)) printf],
-sim_cv_decl_needed_printf=no, sim_cv_decl_needed_printf=yes)])
-AC_MSG_RESULT($sim_cv_decl_needed_printf)
-if test $sim_cv_decl_needed_printf = yes; then
-  AC_DEFINE(NEED_DECLARATION_PRINTF)
-fi
-
-AC_OUTPUT(Makefile,
-[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
diff --git a/sim/w65/gencode.c b/sim/w65/gencode.c
deleted file mode 100644
index cbbeb5b..0000000
--- a/sim/w65/gencode.c
+++ /dev/null
@@ -1,991 +0,0 @@
-/* Program to write out opcode tables for the W65816 and friends
-   Copyright (C) 1995 Free Software Foundation, Inc.
-   Written by Steve Chamberlain sac@cygnus.com
-
-
-GDB 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.
-
-GDB 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 <stdio.h>
-
-
-struct opinfo
-  {
-    int code;
-    char *opcode;
-    char *mode;
-    int clocks;
-    int cpu;
-    struct ainfo *ai;
-    struct oinfo *oi;
-  };
-
-#define W16_ONLY 1
-#define C02_ONLY 2
-
-struct ainfo
-  {
-    char *name;
-    char *enumname;
-    char *disasmstring;
-    char *sizer;
-    char *reloc0;
-    char *howlval;
-
-    /* If addr val could be reg addr  - used for disasssmbly of 
-       args into reg names - you want lda <0x10 to turn into lda <r0
-       but you don't want lda #0x10 to do the same. */
-    char regflag; 
-  };
-
-#define GET_M 	1
-#define SPECIAL_CASE 	2
-#define COP_GET 	3
-#define G2_GET 		4
-#define BRANCH		5
-#define GET_X 6
-#define STANDARD_PC_GET 	7
-#define PUSH_16 8
-#define PUSH_8 9
-#define PUSH_X 10
-#define PUSH_M 11
-#define POP_16 12
-#define POP_8 13
-#define POP_X 14
-#define POP_M 15
-#define STORE_M  16
-#define STORE_X  17
-struct oinfo
-  {
-    char *name;
-    int howsrc;
-    char *howto;
-  };
-struct oinfo olist[] =
-{
-  {"adc", GET_M, "{ int old_acc = GET_A; int old_src =src; src = old_src + old_acc + GET_CBIT; SET_NBIT_M(src); SET_VBIT_M(old_src, old_acc, src); SET_CBIT_M(src); SET_ZBIT_M(src); SET_A(src);}"},
-  {"and", GET_M, "src = GET_A & src; SET_NBIT_M(src); SET_ZBIT_M(src);SET_A(src);"},
-  {"asl", G2_GET, " src <<=1; SET_CBIT_M(src); SET_ZBIT_M(src);SET_NBIT_M(src);"},
-  {"bcc", BRANCH, "GET_CBIT==0"},
-  {"bcs", BRANCH, "GET_CBIT==1"},
-  {"beq", BRANCH, "GET_ZBIT==1"},
-  {"bit", GET_M, "SET_NBIT_M(src); SET_VBIT((src >> (GET_MBIT ? 6:14 ) &1)); SET_ZBIT_M (GET_A & src);"},
-  {"bmi", BRANCH, "GET_NBIT==1"},
-  {"bne", BRANCH, "GET_ZBIT==0"},
-  {"bpl", BRANCH, "GET_NBIT==0"},
-  {"bra", BRANCH, "1"},
-  {"brk", SPECIAL_CASE,
-   "\
-{\
-   if (GET_E == 1) \
-     { PUSH16(GET_PC + 1); PUSH8 (GET_P | BFLAG); SET_P (GET_P | IFLAG); SET_ONLY_PC(fetch16 (0xfffe));}\
-   else \
-     { PUSH8 (GET_PBR_LOW); PUSH16 (GET_PC); PUSH8(GET_P); SET_P(GET_P |IFLAG); SET_PBRPC(fetch16 (0xffe6));};\
-     }"},
-  {"brl", BRANCH, "1"},
-  {"bvc", BRANCH, "GET_VBIT==0"},
-  {"bvs", BRANCH, "GET_VBIT==1"},
-  {"clc", SPECIAL_CASE, "SET_CBIT(0);"},
-  {"cld", SPECIAL_CASE, "SET_DBIT(0);"},
-  {"cli", SPECIAL_CASE, "SET_IBIT(0);"},
-  {"clv", SPECIAL_CASE, "SET_VBIT(0);"},
-  {"cmp", GET_M, "src = GET_A - src; SET_ZBIT_M(src); SET_CBIT_M(~src); SET_NBIT_M(src);"},
-  {"cop", COP_GET,
-   "\
-{\
-   if (GET_E == 1) \
-     { PUSH16(GET_PC + 1); PUSH8 (GET_P | BFLAG); SET_P ((GET_P | IFLAG) & ~DFLAG); SET_ONLY_PC(fetch16 (0xfff4));}\
-   else \
-     { PUSH8 (GET_PBR_LOW); PUSH16 (GET_PC); PUSH8(GET_P); SET_P((GET_P |IFLAG) & ~DFLAG); SET_PBRPC(fetch16 (0xffe4));};\
-     }"},
-  {"cpx", GET_X, "src = GET_X - src; SET_NBIT_X(src); SET_ZBIT_X(src); SET_CBIT_X(~src);"},
-  {"cpy", GET_X, "src = GET_Y - src; SET_NBIT_X(src); SET_ZBIT_X(src); SET_CBIT_X(~src);"},
-  {"dec", G2_GET, "src --; SET_NBIT_M(src); SET_ZBIT_M(src); "},
-  {"dex", SPECIAL_CASE, "SET_X(GET_X -1); SET_NBIT_X(GET_X); SET_ZBIT_X(GET_X);"},
-  {"dey", SPECIAL_CASE, "SET_Y(GET_Y -1); SET_NBIT_X(GET_Y); SET_ZBIT_X(GET_Y);"},
-  {"eor", GET_M, "src = GET_A ^ src;  SET_NBIT_M(src); SET_ZBIT_M(src);SET_A(src); "},
-  {"inc", G2_GET, "src ++; SET_NBIT_M(src); SET_ZBIT_M(src); "},
-  {"inx", SPECIAL_CASE, "SET_X(GET_X +1); SET_NBIT_X(GET_X); SET_ZBIT_X(GET_X);"},
-  {"iny", SPECIAL_CASE, "SET_Y(GET_Y +1); SET_NBIT_X(GET_Y); SET_ZBIT_X(GET_Y);"},
-  {"jmp", STANDARD_PC_GET, "SET_ONLY_PC(lval);"},
-  {"jsr", STANDARD_PC_GET, "if (l) { PUSH8(GET_PBR_LOW);} PUSH16(GET_PC); SET_ONLY_PC(lval);\n"},
-  {"lda", GET_M, "SET_A(src); SET_NBIT_M(GET_A); SET_ZBIT_M(GET_A);"},
-  {"ldx", GET_X, "SET_X(src);SET_NBIT_X(GET_X); SET_ZBIT_X(GET_X);"},
-  {"ldy", GET_X, "SET_Y(src);SET_NBIT_X(GET_Y); SET_ZBIT_X(GET_Y);"},
-  {"lsr", G2_GET, 
-       "SET_CBIT(src & 1); \
-        SET_NBIT(0);       \
-         src = src >> 1;   \
-         SET_ZBIT_M(src);"},
-  {"mvn", SPECIAL_CASE,
-   "{ int dst_bank; int src_bank; dst_bank = fetch8 ( GET_PC)<<16; INC_PC(1); src_bank = fetch8 (GET_PC)<<16; INC_PC(1);\
-       do {  store8 ( dst_bank + GET_X, fetch8 (src_bank +  GET_Y)); SET_X(GET_X+1); SET_Y(GET_Y+1); SET_A((GET_A-1) & 0xffff); } while (GET_A != 0xffff);}"},
-  {"mvp", SPECIAL_CASE,
-   "{ int dst_bank; int src_bank; dst_bank = fetch8 ( GET_PBRPC)<<16; INC_PC(1); src_bank = fetch8 (GET_PBRPC)<<16; INC_PC(1);\
-       do {  store8 ( dst_bank + GET_X, fetch8 (src_bank + GET_Y)); SET_X(GET_X-1); SET_Y(GET_Y-1); SET_A((GET_A-1) & 0xffff); } while (GET_A != 0xffff);}"},
-
-  {"nop", SPECIAL_CASE, ""},
-{"ora", GET_M, "SET_A(GET_A | src); SET_NBIT_M(GET_A); SET_ZBIT_M(GET_A);"},
-  {"pea", PUSH_16, "src = fetch16(GET_PBRPC); INC_PC(2);"},
-  {"pei", PUSH_16, "src = fetch16(fetch8(GET_PBRPC) + GET_D); INC_PC(1);"},
-  {"per", PUSH_16, "src = fetch16(GET_PBRPC) + GET_PC+2; INC_PC(2);"},
-  {"pha", PUSH_M, "src = GET_A;"},
-  {"phb", PUSH_8, "src = GET_DBR_LOW;"},
-  {"phd", PUSH_16, "src = GET_DPR;"},
-  {"phk", PUSH_8, "src = GET_PBR_LOW;"},
-  {"php", PUSH_8, "src = GET_P;"},
-  {"phx", PUSH_X, "src = GET_X;"},
-  {"phy", PUSH_X, "src = GET_Y;"},
-  {"pla", POP_M, "SET_A( src); SET_NBIT_M(GET_A);SET_ZBIT_M(GET_A);"},
-  {"plb", POP_8, "SET_DBR_LOW(src);SET_NBIT_8(src); SET_ZBIT_8(src);"},
-  {"pld", POP_16, "SET_DPR(src);SET_NBIT_16(src); SET_ZBIT_16(src);"},
-  {"plp", POP_8, "SET_P(src); RETHINK;"},
-  {"plx", POP_X, "SET_X(src);SET_NBIT_X(src);SET_ZBIT_X(src);"},
-  {"ply", POP_X, "SET_Y(src);SET_NBIT_X(src);SET_ZBIT_X(src);"},
-  {"rep", COP_GET, "SET_P(GET_P & ~src); RETHINK;"},
-  {"rol", G2_GET, "src = (src << 1) | GET_CBIT; SET_CBIT((src >> (GET_MBIT ? 7 : 15)) &1); SET_ZBIT_M(src);"},
-  {"ror", G2_GET, "{ int t = src; src  = (src>>1) | (GET_CBIT<<((GET_MBIT ? 8:16)-1));SET_NBIT_M(src);SET_ZBIT_M(src); SET_CBIT(t&1);}"},
-  {"rti", SPECIAL_CASE, "{ int t; POP16(t); SET_ONLY_PC(t); if (GET_E==0) { POP8(t); SET_PBR(t);}  POP8(t);SET_P(t);}"},
-  {"rtl", SPECIAL_CASE, "{ int t; POP24(t); SET_PBRPC(t);}"},
-  {"rts", SPECIAL_CASE, "{ int t; POP16(t); SET_ONLY_PC(t);}"},
-  {"sbc", GET_M,
-   "{ int old_acc = GET_A & AMASK; int old_src = src & AMASK;  src = old_acc - old_src - !GET_CBIT; SET_A(src);\
-    SET_CBIT(!(src>>(GET_MBIT?8:16) &1)); SET_VBIT_M(old_src,old_acc, src); SET_ZBIT_M(src); SET_NBIT_M(src);}"},
-  {"sec", SPECIAL_CASE, "SET_CBIT(1);"},
-  {"sed", SPECIAL_CASE, "SET_DBIT(1);"},
-  {"sei", SPECIAL_CASE, "SET_IBIT(1);"},
-  {"sep", COP_GET, "SET_P(GET_P | src);RETHINK;"},
-  {"sta", STORE_M, "src = GET_A;"},
-  {"stp", SPECIAL_CASE, "abort();"},
-  {"stx", STORE_X, "src = GET_X;"},
-  {"sty", STORE_X, "src = GET_Y;"},
-  {"stz", STORE_M, "src = 0;"},
-{"tax", SPECIAL_CASE, "SET_X(GET_A); SET_NBIT_X(GET_A);SET_ZBIT_X(GET_A);"},
-{"tay", SPECIAL_CASE, "SET_Y(GET_A); SET_NBIT_X(GET_A);SET_ZBIT_X(GET_A);"},
-  {"tcd", SPECIAL_CASE, "SET_DPR(GET_A); SET_NBIT_X(GET_A); SET_ZBIT_X(GET_A);"},
-  {"tcs", SPECIAL_CASE, "SET_S(GET_A);"},
-  {"tdc", SPECIAL_CASE, "SET_A(GET_DPR); SET_NBIT_M(GET_A); SET_ZBIT_M(GET_A);"},
-  {"trb", G2_GET, "SET_ZBIT_M(src & GET_A); src = src & ~GET_A; "},
-  {"tsb", G2_GET, "SET_ZBIT_M(src & GET_A); src = src | GET_A;"},
-{"tsc", SPECIAL_CASE, "SET_A(GET_S); SET_NBIT_16(GET_A); SET_ZBIT_16(GET_A);"},
-{"tsx", SPECIAL_CASE, "SET_X(GET_S); SET_NBIT_X(GET_X); SET_ZBIT_X(GET_X);"},
-{"txa", SPECIAL_CASE, "SET_A(GET_X); SET_NBIT_M(GET_A); SET_ZBIT_M(GET_A);"},
-  {"txs", SPECIAL_CASE, "SET_S(GET_X);"},
-{"txy", SPECIAL_CASE, "SET_Y(GET_X); SET_NBIT_X(GET_Y); SET_ZBIT_X(GET_Y);"},
-{"tya", SPECIAL_CASE, "SET_A(GET_Y); SET_NBIT_M(GET_A); SET_ZBIT_M(GET_A);"},
-{"tyx", SPECIAL_CASE, "SET_X(GET_Y); SET_NBIT_X(GET_X); SET_ZBIT_X(GET_X);"},
-  {"wai", SPECIAL_CASE, "wai();INC_PC(-1);"},
-  {"wdm", SPECIAL_CASE, "SET_A(wdm(GET_A, GET_X));"},
-  {"xba", SPECIAL_CASE,
-   "if (GET_XBIT==0) { SET_A(((GET_A >> 8) & 0xff) | ((GET_A & 0xff)<<8));} else { int t = GET_A; SET_A(GET_B); SET_B(t);}; SET_NBIT_8(GET_A); SET_ZBIT_8(GET_A);"},
-  {"xce", SPECIAL_CASE, "{ int t = GET_E; SET_E(GET_CBIT); SET_CBIT(GET_E);if (GET_E) { SET_MBIT(1); SET_XBIT(1);}}; goto top;"},
-  0};
-
-struct ainfo alist[] =
-{
-  {"#a", "IMMTOA", "#$0", "M==0 ? 2:1", "M==0 ? %sR_W65_ABS16 : %sR_W65_ABS8",   "lval = GET_PBRPC; INC_PC(GET_MBIT ? 1:2); ", 0},
-  {"#c", "IMMCOP", "#$0", "1", "%sR_W65_ABS8",   "lval = GET_PBRPC; INC_PC(1); ", 0},
-  {"#i", "IMMTOI", "#$0", "X==0 ? 2:1", "X==0 ? %sR_W65_ABS16 : %sR_W65_ABS8",   "lval = GET_PBRPC; INC_PC(GET_XBIT ? 1:2);", 0},
-  {"A", "ACC", "a", "0", 0, "*FAIL**", 0},
-  {"r", "PC_REL", "$0", "1", "%sR_W65_PCR8",   "lval = GET_PBR_HIGH + (0xffff &(fetch8sext(GET_PBRPC) + GET_PC + 1)); INC_PC(1);", 0},
-  {"rl", "PC_REL_LONG", "$0", "2", "%sR_W65_PCR16",   "lval = GET_PBR_HIGH + (0xffff & (fetch16 (GET_PBRPC) + GET_PC + 2)); INC_PC(2);", 0},
-  {"i", "IMPLIED", "", "0", "", 0},
-  {"s", "STACK", "", "0", "", 0},
-  {"d", "DIR", "<$0", "1", "%sR_W65_ABS8",   "lval = fetch8(GET_PBRPC) + GET_D; INC_PC(1);", 1},
-  {"d,x", "DIR_IDX_X", "<$0,x", "1", "%sR_W65_ABS8",   "lval = fetch8(GET_PBRPC) + GET_X+ GET_D; INC_PC(1);", 1},
-  {"d,y", "DIR_IDX_Y", "<$0,y", "1", "%sR_W65_ABS8",   "lval = fetch8(GET_PBRPC) + GET_Y + GET_D; INC_PC(1);", 1},
-  {"(d)", "DIR_IND", "(<$0)", "1", "%sR_W65_ABS8",   "lval = GET_DBR_HIGH + (0xffff & fetch16(fetch8(GET_PBRPC) + GET_D));INC_PC(1);",1},
-  {"(d,x)", "DIR_IDX_IND_X", "(<$0,x)", "1", "%sR_W65_ABS8",   "lval = GET_DBR_HIGH + (0xffff & (fetch8 (GET_PBRPC) + GET_D + GET_X)) ; INC_PC(1);",1},
-  {"(d),y", "DIR_IND_IDX_Y", "(<$0),y", "1", "%sR_W65_ABS8",   "lval = fetch16(fetch8(GET_PBRPC) + GET_D) + GET_Y  + GET_DBR_HIGH;INC_PC(1);",1},
-  {"[d]", "DIR_IND_LONG", "[$0]", "1", "%sR_W65_ABS8",   "lval = fetch24(GET_D + fetch8(GET_PBRPC));INC_PC(1);",1},
-
-  {"[d],y", "DIR_IND_IDX_Y_LONG", "[$0],y", "1", "%sR_W65_ABS8",   "lval = fetch24(fetch8(GET_PBRPC) + GET_D) + GET_Y;INC_PC(1);",1},
-
-  {"a", "ABS", "!$0", "2", "%sR_W65_ABS16",   "lval = fetch16(GET_PBRPC) + GET_DBR_HIGH; INC_PC(2) ; ",1},
-  {"a,x", "ABS_IDX_X", "!$0,x", "2", "%sR_W65_ABS16",   "lval = fetch16(GET_PBRPC) + GET_DBR_HIGH + GET_X; INC_PC(2); ",1},
-  {"a,y", "ABS_IDX_Y", "!$0,y", "2", "%sR_W65_ABS16",   "lval = fetch16(GET_PBRPC) + GET_DBR_HIGH + GET_Y; INC_PC(2); ", 1},
-  {"al", "ABS_LONG", ">$0", "3", "%sR_W65_ABS24",   "lval = fetch24(GET_PBRPC); INC_PC(3);\nl=1;\n", 1},
-  {"[a]", "ABS_IND_LONG", "[>$0]", "2", "%sR_W65_ABS16",   "lval = fetch24(fetch16(GET_PBRPC)); INC_PC(2);", 1},
-  {"al,x", "ABS_LONG_IDX_X", ">$0,x", "3", "%sR_W65_ABS24",   "lval = fetch24(GET_PBRPC) + GET_X; INC_PC(3);", 1},
-  {"d,s", "STACK_REL", "$0,s", "1", "%sR_W65_ABS8",   "lval = fetch8(GET_PBRPC) + GET_S; INC_PC(1);", 0},
-  {"(d,s),y", "STACK_REL_INDX_IDX", "($0,s),y", "1", "%sR_W65_ABS8",   "lval = fetch16(fetch8(GET_PBRPC) + GET_S) + GET_DBR_HIGH + GET_Y;INC_PC(1);",0},
-  {"(a)", "ABS_IND", "($0)", "2", "%sR_W65_ABS16",   "lval = fetch16(GET_PBRPC) + GET_DBR_HIGH; INC_PC(2);", 1},
-  {"(a,x)", "ABS_IND_IDX", "($0,x)", "2", "%sR_W65_ABS16",
-     "lval = fetch16((0xffff & (fetch16(GET_PBRPC) + GET_X )) + GET_PBR_HIGH) + GET_PBR_HIGH;INC_PC(2);",1},
-  {"xyz", "BLOCK_MOVE", "", "2", "", 0},	
-  0};
-
-
-struct opinfo optable[257] =
-{
-  {0x00, "brk", "s"},
-  {0x01, "ora", "(d,x)"},
-  {0x02, "cop", "#c"},
-  {0x03, "ora", "d,s"},
-  {0x04, "tsb", "d"},
-  {0x05, "ora", "d"},
-  {0x06, "asl", "d"},
-  {0x07, "ora", "[d]"},
-  {0x08, "php", "s"},
-  {0x09, "ora", "#a"},
-  {0x0a, "asl", "A"},
-  {0x0b, "phd", "s"},
-  {0x0c, "tsb", "a"},
-  {0x0d, "ora", "a"},
-  {0x0e, "asl", "a"},
-  {0x0f, "ora", "al"},
-  {0x10, "bpl", "r"},
-  {0x11, "ora", "(d),y"},
-  {0x12, "ora", "(d)"},
-  {0x13, "ora", "(d,s),y"},
-  {0x14, "trb", "d"},
-  {0x15, "ora", "d,x"},
-  {0x16, "asl", "d,x"},
-  {0x17, "ora", "[d],y"},
-  {0x18, "clc", "i"},
-  {0x19, "ora", "a,y"},
-  {0x1a, "inc", "A"},
-  {0x1b, "tcs", "i"},
-  {0x1c, "trb", "a"},
-  {0x1d, "ora", "a,x"},
-  {0x1e, "asl", "a,x"},
-  {0x1f, "ora", "al,x"},
-  {0x20, "jsr", "a"},
-  {0x21, "and", "(d,x)"},
-  {0x22, "jsr", "al"},
-  {0x23, "and", "d,s"},
-  {0x24, "bit", "(d)"},
-  {0x25, "and", "d"},
-  {0x26, "rol", "d"},
-  {0x27, "and", "[d]"},
-  {0x28, "plp", "s"},
-  {0x29, "and", "#a"},
-  {0x2a, "rol", "A"},
-  {0x2b, "pld", "s"},
-  {0x2c, "bit", "a"},
-  {0x2d, "and", "a"},
-  {0x2e, "rol", "a"},
-  {0x2f, "and", "al"},
-  {0x30, "bmi", "r"},
-  {0x31, "and", "(d),y"},
-  {0x32, "and", "(d)"},
-  {0x33, "and", "(d,s),y"},
-  {0x34, "bit", "(d,x)"},
-  {0x35, "and", "d,x"},
-  {0x36, "rol", "d,x"},
-  {0x37, "and", "[d],y"},
-  {0x38, "sec", "i"},
-  {0x39, "and", "a,y"},
-  {0x3a, "dec", "A"},
-  {0x3b, "tsc", "i"},
-  {0x3c, "bit", "a,x"},
-  {0x3d, "and", "a,x"},
-  {0x3e, "rol", "a,x"},
-  {0x3f, "and", "al,x"},
-  {0x40, "rti", "s"},
-  {0x41, "eor", "(d,x)"},
-  {0x42, "wdm", "i"},
-  {0x43, "eor", "d,s"},
-  {0x44, "mvp", "xyz"},
-  {0x45, "eor", "d"},
-  {0x46, "lsr", "d"},
-  {0x47, "eor", "[d]"},
-  {0x48, "pha", "s"},
-  {0x49, "eor", "#a"},
-  {0x4a, "lsr", "A"},
-  {0x4b, "phk", "s"},
-  {0x4c, "jmp", "a"},
-  {0x4d, "eor", "a"},
-  {0x4e, "lsr", "a"},
-  {0x4f, "eor", "al"},
-  {0x50, "bvc", "r"},
-  {0x51, "eor", "(d),y"},
-  {0x52, "eor", "(d)"},
-  {0x53, "eor", "(d,s),y"},
-  {0x54, "mvn", "xyz"},
-  {0x55, "eor", "d,x"},
-  {0x56, "lsr", "d,x"},
-  {0x57, "eor", "[d],y"},
-  {0x58, "cli", "i"},
-  {0x59, "eor", "a,y"},
-  {0x5a, "phy", "s"},
-  {0x5b, "tcd", "i"},
-  {0x5c, "jmp", "al"},
-  {0x5d, "eor", "a,x"},
-  {0x5e, "lsr", "a,x"},
-  {0x5f, "eor", "al,x"},
-  {0x60, "rts", "s"},
-  {0x61, "adc", "(d,x)"},
-  {0x62, "per", "rl"},
-  {0x63, "adc", "d,s"},
-  {0x64, "stz", "d"},
-  {0x65, "adc", "d"},
-  {0x66, "ror", "d"},
-  {0x67, "adc", "[d]"},
-  {0x68, "pla", "s"},
-  {0x69, "adc", "#a"},
-  {0x6a, "ror", "A"},
-  {0x6b, "rtl", "s"},
-  {0x6c, "jmp", "(a)"},
-  {0x6d, "adc", "a"},
-  {0x6e, "ror", "a"},
-  {0x6f, "adc", "al"},
-  {0x70, "bvs", "r"},
-  {0x71, "adc", "(d),y"},
-  {0x72, "adc", "(d)"},
-  {0x73, "adc", "(d,s),y"},
-  {0x74, "stz", "d,x"},
-  {0x75, "adc", "d,x"},
-  {0x76, "ror", "d,x"},
-  {0x77, "adc", "[d],y"},
-  {0x78, "sei", "i"},
-  {0x79, "adc", "a,y"},
-  {0x7a, "ply", "s"},
-  {0x7b, "tdc", "i"},
-  {0x7c, "jmp", "(a,x)"},
-  {0x7d, "adc", "a,x"},
-  {0x7e, "ror", "a,x"},
-  {0x7f, "adc", "al,x"},
-  {0x80, "bra", "r"},
-  {0x81, "sta", "(d,x)"},
-  {0x82, "brl", "rl"},
-  {0x83, "sta", "d,s"},
-  {0x84, "sty", "d"},
-  {0x85, "sta", "d"},
-  {0x86, "stx", "d"},
-  {0x87, "sta", "[d]"},
-  {0x88, "dey", "i"},
-  {0x89, "bit", "#a"},
-  {0x8a, "txa", "i"},
-  {0x8b, "phb", "s"},
-  {0x8c, "sty", "a"},
-  {0x8d, "sta", "a"},
-  {0x8e, "stx", "a"},
-  {0x8f, "sta", "al"},
-  {0x90, "bcc", "r"},
-  {0x91, "sta", "(d),y"},
-  {0x92, "sta", "(d)"},
-  {0x93, "sta", "(d,s),y"},
-  {0x94, "sty", "d,x"},
-  {0x95, "sta", "d,x"},
-  {0x96, "stx", "d,x"},
-  {0x97, "sta", "[d],y"},
-  {0x98, "tya", "i"},
-  {0x99, "sta", "a,y"},
-  {0x9a, "txs", "i"},
-  {0x9b, "txy", "i"},
-  {0x9c, "stz", "a"},
-  {0x9d, "sta", "a,x"},
-  {0x9e, "stz", "a,x"},
-  {0x9f, "sta", "al,x"},
-  {0xa0, "ldy", "#i"},
-  {0xa1, "lda", "(d,x)"},
-  {0xa2, "ldx", "#i"},
-  {0xa3, "lda", "d,s"},
-  {0xa4, "ldy", "d"},
-  {0xa5, "lda", "d"},
-  {0xa6, "ldx", "d"},
-  {0xa7, "lda", "[d]"},
-  {0xa8, "tay", "i"},
-  {0xa9, "lda", "#a"},
-  {0xaa, "tax", "i"},
-  {0xab, "plb", "s"},
-  {0xac, "ldy", "a"},
-  {0xad, "lda", "a"},
-  {0xae, "ldx", "a"},
-  {0xaf, "lda", "al"},
-  {0xb0, "bcs", "r"},
-  {0xb1, "lda", "(d),y"},
-  {0xb2, "lda", "(d)"},
-  {0xb3, "lda", "(d,s),y"},
-  {0xb4, "ldy", "d,x"},
-  {0xb5, "lda", "d,x"},
-  {0xb6, "ldx", "d,y"},
-  {0xb7, "lda", "[d],y"},
-  {0xb8, "clv", "i"},
-  {0xb9, "lda", "a,y"},
-  {0xba, "tsx", "i"},
-  {0xbb, "tyx", "i"},
-  {0xbc, "ldy", "a,x"},
-  {0xbd, "lda", "a,x"},
-  {0xbe, "ldx", "a,y"},
-  {0xbf, "lda", "al,x"},
-  {0xc0, "cpy", "#i"},
-  {0xc1, "cmp", "(d,x)"},
-  {0xc2, "rep", "#c"},
-  {0xc3, "cmp", "d,s"},
-  {0xc4, "cpy", "d"},
-  {0xc5, "cmp", "d"},
-  {0xc6, "dec", "d"},
-  {0xc7, "cmp", "[d]"},
-  {0xc8, "iny", "i"},
-  {0xc9, "cmp", "#a"},
-  {0xca, "dex", "i"},
-  {0xcb, "wai", "i"},
-  {0xcc, "cpy", "a"},
-  {0xcd, "cmp", "a"},
-  {0xce, "dec", "a"},
-  {0xcf, "cmp", "al"},
-  {0xd0, "bne", "r"},
-  {0xd1, "cmp", "(d),y"},
-  {0xd2, "cmp", "(d)"},
-  {0xd3, "cmp", "(d,s),y"},
-  {0xd4, "pei", "d"},
-  {0xd5, "cmp", "d,x"},
-  {0xd6, "dec", "d,x"},
-  {0xd7, "cmp", "[d],y"},
-  {0xd8, "cld", "i"},
-  {0xd9, "cmp", "a,y"},
-  {0xda, "phx", "s"},
-  {0xdb, "stp", "i"},
-  {0xdc, "jmp", "[a]"},
-  {0xdd, "cmp", "a,x"},
-  {0xde, "dec", "a,x"},
-  {0xdf, "cmp", "al,x"},
-  {0xe0, "cpx", "#i"},
-  {0xe1, "sbc", "(d,x)"},
-  {0xe2, "sep", "#c"},
-  {0xe3, "sbc", "d,s"},
-  {0xe4, "cpx", "d"},
-  {0xe5, "sbc", "d"},
-  {0xe6, "inc", "d"},
-  {0xe7, "sbc", "[d]"},
-  {0xe8, "inx", "i"},
-  {0xe9, "sbc", "#a"},
-  {0xea, "nop", "i"},
-  {0xeb, "xba", "i"},
-  {0xec, "cpx", "a"},
-  {0xed, "sbc", "a"},
-  {0xee, "inc", "a"},
-  {0xef, "sbc", "al"},
-  {0xf0, "beq", "r"},
-  {0xf1, "sbc", "(d),y"},
-  {0xf2, "sbc", "(d)"},
-  {0xf3, "sbc", "(d,s),y"},
-  {0xf4, "pea", "a"},
-  {0xf5, "sbc", "d,x"},
-  {0xf6, "inc", "d,x"},
-  {0xf7, "sbc", "[d],y"},
-  {0xf8, "sed", "i"},
-  {0xf9, "sbc", "a,y"},
-  {0xfa, "plx", "s"},
-  {0xfb, "xce", "i"},
-  {0xfc, "jsr", "(a,x)"},
-  {0xfd, "sbc", "a,x"},
-  {0xfe, "inc", "a,x"},
-  {0xff, "sbc", "al,x"},
-  0};
-
-
-int pfunc(a,b)
-struct opinfo *a;
-struct opinfo *b;
-{
-return strcmp(a->mode, b->mode);
-
-}
-static void
-dump_table ()
-{
-  int x;
-  int y;
-  printf ("  |");
-  for (x = 0; x < 16; x++)
-    {
-      printf ("   %x   |", x);
-    }
-  printf ("\n");
-  printf ("  |");
-  for (x = 0; x < 16; x++)
-    {
-      printf ("-------|");
-    }
-  printf ("\n");
-
-  for (y = 0; y < 16; y++)
-    {
-      printf ("%x |", y);
-      for (x = 0; x < 16; x++)
-	{
-	  struct opinfo *p = &optable[y * 16 + x];
-	  if (p->opcode)
-	    {
-	      printf ("%-7s", p->opcode);
-	    }
-	  else
-	    {
-	      printf ("*******");
-	    }
-	  printf ("|");
-	}
-      printf ("\n");
-      printf ("  |");
-
-      for (x = 0; x < 16; x++)
-	{
-	  struct opinfo *p = &optable[y * 16 + x];
-	  if (p->mode)
-	    {
-	      printf ("%-7s", p->mode);
-	    }
-	  else
-	    {
-	      printf ("*******");
-	    }
-	  printf ("|");
-	}
-      printf ("\n");
-      printf ("  |");
-      for (x = 0; x < 16; x++)
-	{
-	  printf ("-------|");
-	}
-
-
-      printf ("\n");
-    }
-}
-
-dt ()
-{
-#if 0
-  int i;
-  for (i = 0; i < 256; i++)
-    {
-      struct opinfo *p = &optable[i];
-      printf ("/* %02x */ ", i);
-      if (p->opcode)
-	printf ("{\"%s\",\"%s\",%d,%d},", p->opcode->name, p->addr->name);
-
-      printf ("\n");
-    }
-#endif
-
-}
-static
-void
-init_table ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    {
-      struct opinfo *p = optable + i;
-      struct ainfo *a;
-      struct oinfo *o;
-      for (a = alist; a->name; a++)
-	{
-	  if (strcmp (a->name, p->mode) == 0)
-	    {
-	      p->ai = a;
-	      goto done;
-	    }
-	}
-      printf ("bad %x\n", i);
-    done:;
-      for (o = olist; o->name; o++)
-	{
-	  if (strcmp (o->name, p->opcode) == 0)
-	    {
-	      p->oi = o;
-	      goto doneo;
-	    }
-	}
-      printf ("bad %x\n", i);
-    doneo:;
-
-    }
-}
-
-/* Dump the opcodes sorted by name */
-static
-void
-assembler_table (as)
-{
-  int i;
-  struct oinfo *o;
-  struct ainfo *a;
-  int n = 0;
-  /* Step through the sorted list of opnames */
-  printf ("			/* WDC 65816 Assembler opcode table */\n");
-  printf ("			/*   (generated by the program sim/w65/gencode -a) */\n");
-
-  for (a = alist; a->name; a++)
-    {
-      printf ("#define ADDR_%-20s%d\t /* %-7s */\n", a->enumname, ++n, a->name);
-    }
-
-  printf ("struct opinfo {\n\tint val;\n\tint code;\n\tchar *name;\n\tint amode;\n};\n");
-
-  printf ("struct opinfo optable[257]={\n");
-  if (as)
-    {
-      i = 1;
-      for (o = olist; o->name; o++)
-	{
-	  printf ("#define O_%s %d\n", o->name, i++);
-	}
-      
-      qsort (optable, 256, sizeof (struct opinfo), pfunc);
-
-      printf ("#ifdef DEFINE_TABLE\n");
-      for (o = olist; o->name; o++)
-	{
-
-	  for (i = 0; i < 256; i++)
-	    {
-	      struct opinfo *p = optable + i;
-
-	      if (p->oi == o)
-		{
-		  /* This opcode is of the right name */
-		  printf ("\t{0x%02X,\tO_%s,\t\"%s\",\tADDR_%s},\n", p->code, p->oi->name, p->oi->name, p->ai->enumname);
-		}
-	    }
-	}
-    }
-  else
-    {
-      for (i = 0; i < 256; i++)
-	{
-	  struct opinfo *p = optable + i;
-	  printf ("\t{0x%02X,\t\"%s\",\tADDR_%s},\n", i, p->oi->name, p->ai->enumname);
-	}
-    }
-
-  printf ("0};\n");
-  printf ("#endif\n");
-
-
-  /* Generate the operand disassembly case list */
-
-  printf ("#define DISASM()\\\n");
-  {
-    struct ainfo *a;
-    for (a = alist; a->name; a++)
-      {
-	printf ("  case ADDR_%s:\\\n\t", a->enumname);
-	if (strcmp (a->enumname, "BLOCK_MOVE") == 0)
-	  {
-	    printf ("args[0] = (asR_W65_ABS16 >>8) &0xff;\\\n");
-	    printf ("\targs[1] = ( asR_W65_ABS16 & 0xff);\\\n");
-	    printf ("\tprint_operand (0,\"\t$0,$1\",args);\\\n");
-	  }
-	else if (a->reloc0 == 0) 
-	  {
-	    printf ("print_operand (0, \"\t%s\", 0);\\\n", a->disasmstring );
-	  }
-	else if (strlen (a->reloc0))
-	  {
-	    printf ("args[0] = ");
-	    printf (a->reloc0, "as","as");
-	    printf (";\\\n");
-	    printf ("\tprint_operand (%d, \"\t%s\", args);\\\n",
-		    a->regflag,
-		    a->disasmstring);
-	  }
-	
-	printf ("\tsize += %s;\\\n\tbreak;\\\n", a->sizer);
-      }
-  }
-
-  printf ("\n");
-
-  /* Generate the operand size and type case list */
-
-  printf ("#define GETINFO(size,type,pcrel)\\\n");
-  {
-    struct ainfo *a;
-    for (a = alist; a->name; a++)
-      {
-	printf ("\tcase ADDR_%s: ", a->enumname);
-	printf ("size = %s;type=", a->sizer);
-	if (a->reloc0 && strlen (a->reloc0))
-	  {
-	    printf (a->reloc0, "", "");
-	  }
-	else
-	  printf ("-1");
-	printf (";pcrel=%d;", a->name[0] == 'P');
-	printf ("break;\\\n");
-      }
-  }
-  printf ("\n");
-}
-
-
-/* Write out examples of each opcode */
-static
-void
-test_table ()
-{
-  struct opinfo *o;
-  for (o = optable; o->opcode; o++)
-    {
-      printf ("\t%s\t", o->opcode);
-      printf (o->ai->disasmstring, 0x6543210, 0x6543210);
-      printf ("\n");
-    }
-
-}
-
-static void
-op_table ()
-{
-  struct opinfo *o;
-  int i = 0;
-  /* Write four optables, M=0,1 X=0,1 */
-
-  for (o = optable; o->opcode; o++)
-    {
-      printf ("{0x%02x, \"%s\", \"%s\"\t},\n",
-	      i++,
-	      o->opcode,
-	      o->mode);
-    }
-}
-
-int worked_out_lval;
-static void
-genfetch (amode, size)
-     struct ainfo *amode;
-     int size;
-{
-  if (amode->howlval)
-    {
-      if (strcmp (amode->name, "A") == 0)
-	{
-	  /* Can't get the lval for the accumulator */
-	  printf ("src = GET_A;\n");
-	}
-      else
-	{
-	  printf ("%s\n", amode->howlval);
-worked_out_lval = 1;
-	  if (size == 0)
-	    {
-	      printf ("src = fetch16 (lval);\n");
-	    }
-	  else
-	    {
-	      printf ("src = fetch8 (lval);\n");
-	    }
-	}
-    }
-
-}
-
-static void
-genstore (amode, size)
-     struct ainfo *amode;
-     int size;
-{
-  if (amode->howlval)
-    {
-      if (strcmp (amode->name, "A") == 0)
-	{
-	  /* Can't get the lval for the accumulator */
-	  printf ("SET_A (src);\n");
-	}
-      else
-	{
-	  if (!worked_out_lval)
-	    printf ("%s\n", amode->howlval);
-	  if (size == 0)
-	    {
-	      printf ("store16(lval, src);\n");
-	    }
-	  else
-	    {
-	      printf ("store8(lval, src);\n");
-	    }
-	}
-    }
-}
-/* Generate the code to simulate the instructions */
-static void
-code_table ()
-{
-  struct opinfo *o;
-  int x, m;
-  printf("#include \"interp.h\"\n");
-
-  for (x = 0; x < 2; x++) {
-    for (m = 0; m < 2; m++) {
-      printf("ifunc_X%d_M%d() {\n",x,m);
-      printf("#undef GET_MBIT\n");
-      printf("#undef GET_XBIT\n");
-      printf("#define GET_XBIT %d\n", x);
-      printf("#define GET_MBIT %d\n", m);
-      printf("STARTFUNC();\n");
-      printf("do { register opcode = fetch8(GET_PBRPC); insts++; INC_PC(1);\n");
-      printf ("switch (opcode) {\n");
-      for (o = optable; o->opcode; o++)
-	{
-	  printf ("		/* %s %s */\n", o->opcode, o->ai->name);
-	  printf ("case 0x%02x:\n", o->code);
-	  printf ("{\n");
-	  printf ("int l ;\n");
-	  printf ("register int src;\n");
-	  printf ("register int lval;\n");
-worked_out_lval = 0;
-	  switch (o->oi->howsrc)
-	    {
-	    case POP_M:
-	      if (m == 0)
-		printf ("POP16 (src);");
-	      else
-		printf ("POP8(src);");
-	      break;
-	    case POP_X:
-	      if (x == 0)
-		printf ("POP16 (src);");
-	      else
-		printf ("POP8 (src);");
-	      break;
-	    case POP_8:
-	      printf ("POP8 (src);");
-	      break;
-	    case POP_16:
-	      printf ("POP16 (src);");
-	      break;
-
-	    case STANDARD_PC_GET:
-	      printf ("%s\n", o->ai->howlval);
-	      break;
-
-	    case GET_M:
-	      genfetch (o->ai, m);
-	      break;
-	    case G2_GET:
-	      genfetch (o->ai, m);
-	      break;
-	    case GET_X:
-	      genfetch (o->ai, x);
-	      break;
-	    case BRANCH:
-	      printf ("%s", o->ai->howlval);
-	      break;
-	    case COP_GET:
-	      genfetch(o->ai,1);
-	      break;
-	    case STORE_X:
-	    case STORE_M:
-	      ;
-	    }
-
-	  switch (o->oi->howsrc)
-	    {
-	    case BRANCH:
-	      printf ("if (%s) { SET_ONLY_PC(lval);} ", o->oi->howto);
-	      break;
-	    case SPECIAL_CASE:
-	    case GET_M:
-	    case GET_X:
-	    case STORE_X:
-	    case STANDARD_PC_GET:
-	    case G2_GET:
-	    case PUSH_16:
-	    case PUSH_8:
-	    case PUSH_M:
-	    case PUSH_X:
-	    case POP_16:
-	    case POP_8:
-	    case POP_M:
-	    case POP_X:
-	    case COP_GET:
-	    case STORE_M:
-	      printf ("%s", o->oi->howto);
-	      break;
-	    }
-
-	  switch (o->oi->howsrc)
-	    {
-	    case STORE_M:
-	      genstore (o->ai, m);
-	      break;
-	    case STORE_X:
-	      genstore (o->ai, x);
-	      break;
-	    case PUSH_M:
-	      if (m == 0)
-		printf ("PUSH16 (src);");
-	      else
-		printf ("PUSH8(src);");
-	      break;
-	    case PUSH_X:
-	      if (x == 0)
-		printf ("PUSH16 (src);");
-	      else
-		printf ("PUSH8 (src);");
-	      break;
-	    case PUSH_8:
-	      printf ("PUSH8 (src);");
-	      break;
-	    case PUSH_16:
-	      printf ("PUSH16 (src);");
-	      break;
-	    case G2_GET:
-	      genstore (o->ai, x, m);
-	      break;
-	    }
-	  printf ("}\n");
-
-	  printf ("break;\n");
-	}
-      printf ("}\n}\n");
-      printf("while (!saved_state.exception);\n");
-      printf("#undef GET_MBIT\n");
-      printf("#undef GET_XBIT\n");
-      printf("#define GET_MBIT (the_mbit)\n");
-      printf("#define GET_XBIT (the_xbit)\n");
-      
-      printf("ENDFUNC();\n");
-      printf("}");
-    }
-  }
-}
-
-int
-main (ac, av)
-     char **av;
-{
-  init_table ();
-
-  if (ac > 1)
-    {
-      if (av[1][1] == 'a')
-	{
-	  assembler_table (1);
-	}
-      if (av[1][1] == 't')
-	{
-	  test_table ();
-	}
-      if (av[1][1] == 'o')
-	{
-	  op_table ();
-	}
-      if (av[1][1] == 'c')
-	{
-	  code_table ();
-	}
-    }
-  else
-    dump_table ();
-
-  dt ();
-
-  return 0;
-}
diff --git a/sim/w65/interp.c b/sim/w65/interp.c
deleted file mode 100644
index 36c4e32..0000000
--- a/sim/w65/interp.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/* Simulator for the WDC 65816 architecture.
-
-   Written by Steve Chamberlain of Cygnus Support.
-   sac@cygnus.com
-
-   This file is part of W65 sim
-
-
-		THIS SOFTWARE IS NOT COPYRIGHTED
-
-   Cygnus offers the following for use in the public domain.  Cygnus
-   makes no warranty with regard to the software or it's performance
-   and the user accepts the software "AS IS" with all faults.
-
-   CYGNUS DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO
-   THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "config.h"
-
-#include <stdio.h>
-#include <signal.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/param.h>
-#include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
-#include "../../newlib/libc/sys/w65/sys/syscall.h"
-
-#include "interp.h"
-
-saved_state_type saved_state;
-
-int
-get_now ()
-{
-  return time ((long *) 0);
-}
-void
-control_c (sig, code, scp, addr)
-     int sig;
-     int code;
-     char *scp;
-     char *addr;
-{
-  saved_state.exception = SIGINT;
-}
-
-wai ()
-{
-  saved_state.exception = SIGTRAP;
-}
-
-
-
-wdm (acc, x)
-     int acc;
-     int x;
-
-{
-int cycles;
-  /* The x points to where the registers live, acc has code */
-
-#define R(arg)  (x +  arg * 2)
-unsigned  R0 = R(0);
-unsigned  R4 = R(4);
-unsigned  R5 = R(5);
-unsigned  R6 = R(6);
-unsigned  R7 = R(7);
-unsigned  R8 = R(8);
-unsigned char *memory = saved_state.memory;
-  int a1 = fetch16 (R (4));
-  switch (a1)
-    {
-    case SYS_write:
-      {
-	int file = fetch16 (R5);
-	unsigned char *buf = fetch24 (R6) + memory;
-	int len = fetch16 (R8);
-	int res = write (file, buf, len);
-	store16 (R0, res);
-	break;
-      }
-    case 0:
-      printf ("%c", acc);
-      fflush (stdout);
-      break;
-    case 1:
-      saved_state.exception = SIGTRAP;
-      break;
-    default:
-      saved_state.exception = SIGILL;
-      break;
-    }
-}
-
-
-void
-sim_resume (step, insignal)
-     int step;
-     int insignal;
-{
-  void (*prev) ();
-  register unsigned char *memory;
-  if (step)
-    {
-      saved_state.exception = SIGTRAP;
-    }
-  else
-    {
-      saved_state.exception = 0;
-    }
-
-
-  prev = signal (SIGINT, control_c);
-  do
-    {
-      int x = (saved_state.p >> 4) & 1;
-      int m = (saved_state.p >> 5) & 1;
-      if (x == 0 && m == 0)
-	{
-	  ifunc_X0_M0 ();
-	}
-      else if (x == 0 && m == 1)
-	{
-	  ifunc_X0_M1 ();
-	}
-      else if (x == 1 && m == 0)
-	{
-	  ifunc_X1_M0 ();
-	}
-      else if (x == 1 && m == 1)
-	{
-	  ifunc_X1_M1 ();
-	}
-    }
-  while (saved_state.exception == 0);
-
-  signal (SIGINT, prev);
-}
-
-
-
-
-init_pointers ()
-{
-  if (!saved_state.memory)
-    {
-      saved_state.memory = calloc (64 * 1024, NUMSEGS);
-    }
-}
-
-int
-sim_write (addr, buffer, size)
-     SIM_ADDR addr;
-     unsigned char *buffer;
-     int size;
-{
-  int i;
-  init_pointers ();
-
-  for (i = 0; i < size; i++)
-    {
-      saved_state.memory[(addr + i) & MMASK] = buffer[i];
-    }
-  return size;
-}
-
-int
-sim_read (addr, buffer, size)
-     SIM_ADDR addr;
-     unsigned char *buffer;
-     int size;
-{
-  int i;
-
-  init_pointers ();
-
-  for (i = 0; i < size; i++)
-    {
-      buffer[i] = saved_state.memory[(addr + i) & MMASK];
-    }
-  return size;
-}
-
-
-
-struct
-{
-  unsigned int *ptr;
-  int size;
-}
-rinfo[] =
-
-{
-  &saved_state.r[0], 2,
-  &saved_state.r[1], 2,
-  &saved_state.r[2], 2,
-  &saved_state.r[3], 2,
-  &saved_state.r[4], 2,
-  &saved_state.r[5], 2,
-  &saved_state.r[6], 2,
-  &saved_state.r[7], 2,
-  &saved_state.r[8], 2,
-  &saved_state.r[9], 2,
-  &saved_state.r[10], 2,
-  &saved_state.r[11], 2,
-  &saved_state.r[12], 2,
-  &saved_state.r[13], 2,
-  &saved_state.r[14], 2,
-  &saved_state.r[15], 4,
-  &saved_state.pc, 4,
-  &saved_state.a, 4,
-  &saved_state.x, 4,
-  &saved_state.y, 4,
-  &saved_state.dbr, 4,
-  &saved_state.d, 4,
-  &saved_state.s, 4,
-  &saved_state.p, 4,
-  &saved_state.ticks, 4,
-  &saved_state.cycles, 4,
-  &saved_state.insts, 4,
-  0
-};
-
-int
-sim_store_register (rn, value, length)
-     int rn;
-     unsigned char *value;
-     int length;
-{
-  unsigned int val;
-  int i;
-  val = 0;
-  for (i = 0; i < rinfo[rn].size; i++)
-    {
-      val |= (*value++) << (i * 8);
-    }
-
-  *(rinfo[rn].ptr) = val;
-  return -1;
-}
-
-int
-sim_fetch_register (rn, buf, length)
-     int rn;
-     unsigned char *buf;
-     int length;
-{
-  unsigned int val = *(rinfo[rn].ptr);
-  int i;
-
-  for (i = 0; i < rinfo[rn].size; i++)
-    {
-      *buf++ = val;
-      val = val >> 8;
-    }
-  return -1;
-}
-
-
-sim_reg_size (n)
-{
-  return rinfo[n].size;
-}
-int
-sim_trace ()
-{
-  return 0;
-}
-
-void
-sim_stop_reason (reason, sigrc)
-     enum sim_stop *reason;
-     int *sigrc;
-{
-  *reason = sim_stopped;
-  *sigrc = saved_state.exception;
-}
-
-int
-sim_set_pc (x)
-     SIM_ADDR x;
-{
-  saved_state.pc = x;
-  return 0;
-}
-
-
-void
-sim_info (verbose)
-     int verbose;
-{
-  double timetaken = (double) saved_state.ticks;
-  double virttime = saved_state.cycles / 2.0e6;
-
-  printf ("\n\n# instructions executed  %10d\n", saved_state.insts);
-  printf ("# cycles                 %10d\n", saved_state.cycles);
-  printf ("# real time taken        %10.4f\n", timetaken);
-  printf ("# virtual time taken     %10.4f\n", virttime);
-
-  if (timetaken != 0)
-    {
-      printf ("# cycles/second          %10d\n", (int) (saved_state.cycles / timetaken));
-      printf ("# simulation ratio       %10.4f\n", virttime / timetaken);
-    }
-
-}
-
-
-
-void
-sim_open (kind, cb, abfd, argv)
-     SIM_OPEN_KIND kind;
-     host_callback *cb;
-     struct _bfd *abfd;
-     char **argv;
-{
-}
-
-
-
-#undef fetch8
-fetch8func (x)
-{
-  if (x & ~MMASK)
-    {
-      saved_state.exception = SIGBUS;
-      return 0;
-    }
-  return saved_state.memory[x];
-}
-
-fetch8 (x)
-{
-return fetch8func(x);
-}
-
-void
-sim_close (quitting)
-     int quitting;
-{
-  /* nothing to do */
-}
-
-int
-sim_load (prog, from_tty)
-     char *prog;
-     int from_tty;
-{
-  /* Return nonzero so gdb will handle it.  */
-  return 1;
-}
-
-
-void
-sim_create_inferior (abfd, argv, env)
-     struct _bfd *abfd;
-     char **argv;
-     char **env;
-{
-  SIM_ADDR start_address;
-  int pc;
-  if (abfd != NULL)
-    start_address = bfd_get_start_address (abfd);
-  else
-    start_address = 0; /*??*/
-  /* ??? We assume this is a 4 byte quantity.  */
-  pc = start_address;
-  sim_store_register (16, (unsigned char *) &pc);
-}
-
-void
-sim_set_callbacks (ptr)
-struct host_callback_struct *ptr;
-{
-
-}
diff --git a/sim/w65/interp.h b/sim/w65/interp.h
deleted file mode 100644
index 2fd5d22..0000000
--- a/sim/w65/interp.h
+++ /dev/null
@@ -1,194 +0,0 @@
-#define fetch8(x) fetch8func((cycles++,(x)))
-#define NFAKES 16
-typedef struct
-  {
-    unsigned  a;
-    unsigned  x;
-    unsigned  y;
-    unsigned  pc;		/* Keep pbr in there too */
-    unsigned  dbr;
-    unsigned  d;
-    unsigned  s;
-    unsigned  p;
-    unsigned  e;
-    unsigned  char *memory;
-    unsigned  int exception;
-    unsigned  int ticks;
-    unsigned  int cycles;
-    unsigned  int insts;
-    unsigned  int r[NFAKES];
-  }
-saved_state_type;
-
-
-
-#define GET_P      \
-  ((GET_NBIT << 7) \
- | (GET_VBIT << 6) \
- | (GET_MBIT << 5) \
- | (GET_XBIT << 4) \
- | (GET_DBIT << 3) \
- | (GET_IBIT << 2) \
- | (GET_ZBIT << 1) \
- | (GET_CBIT << 0))
-
-#define SET_P(_bits)   \
-{ int bits = _bits;    \
-SET_NBIT((bits>>7)&1); \
-SET_VBIT((bits>>6)&1); \
-SET_MBIT((bits>>5)&1); \
-SET_XBIT((bits>>4)&1); \
-SET_DBIT((bits>>3)&1); \
-SET_IBIT((bits>>2)&1); \
-SET_ZBIT((bits>>1)&1); \
-SET_CBIT((bits>>0)&1);  }
-
-#define BFLAG		(1<<4)
-#define DFLAG 		(1<<3)
-
-#define GET_A 		(the_a)
-#define GET_E		(the_e)
-#define GET_B 		(the_b)
-#define GET_CBIT 	(the_cbit)
-#define GET_D		(the_d)
-#define GET_DBIT 	(the_dbit)
-#define GET_DBR_HIGH 	(the_dbr)
-#define GET_DBR_LOW 	(the_dbr >> 16)
-#define GET_DPR 	(the_dpr)
-#define GET_IBIT	(the_ibit)
-#define GET_MBIT	(the_mbit)
-#define SET_XBIT(x)     { the_xbit = x; }       
-#define GET_NBIT 	(the_nbit)
-#define GET_PBRPC 	(the_pc)
-#define GET_PBR_HIGH 	(the_pc & 0xff0000)
-#define GET_PBR_LOW 	(the_pc >> 16)
-#define GET_PC 		(the_pc & 0xffff)
-#define GET_S 		(the_s)
-#define GET_VBIT 	(the_vbit)
-#define GET_X 		(the_x)
-#define GET_XBIT 	(the_xbit)
-#define GET_Y 		(the_y)
-#define GET_ZBIT 	(the_zbit)
-#define IFLAG 		(1<<2)
-#define INC_PC(x) 	{the_pc += x;}
-#define POP16(x)        { int _xx; POP8(x); POP8(_xx); x+= _xx<<8;}
-#define POP24(x)  	{ int _xx; POP8(x); POP8(_xx); x += _xx << 8; POP8(_xx); x += _xx << 16; }
-#define POP8(x)   	{ SET_S(GET_S +1); x =  fetch8(GET_S);}
-#define PUSH16(x) 	{ int _xx = x;PUSH8(_xx >> 8); PUSH8(_xx);}
-#define PUSH8(x)  	{ store8(GET_S, x); SET_S(GET_S-1);}
-#define SET_A(x)  	{ the_a = x & AMASK; }
-#define SET_B(x)  	{ the_b = x;}
-#define SET_CBIT(x)  	{ the_cbit = x;}
-#define SET_CBIT_M(x) 	{ the_cbit = (x & (GET_MBIT ? 0x100: 0x10000)) != 0;}
-#define SET_CBIT_X(x) 	{ the_cbit = (x & (GET_XBIT ? 0x100: 0x10000)) != 0;}
-#define SET_D(x)	{the_d = x;}
-#define SET_DBIT(x) 	{ the_dbit= x;}
-#define SET_DBR_LOW(x) 	{the_dbr = (x<<16);}
-#define SET_DPR(x) 	{ the_dpr = x;}
-#define SET_E(x) 	{ the_e = x;}
-#define SET_IBIT(x) 	{ the_ibit = x;}
-#define SET_MBIT(x) 	{ the_mbit = x; }
-#define SET_NBIT(x)     { the_nbit = x;}
-#define SET_NBIT_16(x)  { the_nbit= ( ((x) & (0x8000)) != 0);}
-#define SET_NBIT_8(x)  { the_nbit= ( ((x) & (0x80)) != 0);}
-#define SET_NBIT_M(x)   { if (GET_MBIT) { SET_NBIT_8(x); } else { SET_NBIT_16(x);}}
-#define SET_NBIT_X(x)   { if (GET_XBIT) { SET_NBIT_8(x); } else { SET_NBIT_16(x);}}
-#define SET_PBR(x)      { the_pc = (the_pc & 0xffff) + ((x)<<16);}
-#define SET_PBRPC(x)    { the_pc = x;}
-#define SET_ONLY_PC(x)  { the_pc = (the_pc & 0xff0000) + ((x ) & 0xffff);}
-#define SET_S(x)	{the_s = x; }
-#define SET_VBIT_16(x)  {the_vbit = ((((int)x) < -0x8000) || (((int)x) > 0x7fff));}
-#define SET_VBIT_8(x)   {the_vbit = ((((int)x) < -0x80) || (((int)x) > 0x7f));}
-/*#define SET_VBIT_M(x)   { if(GET_MBIT) {SET_VBIT_8(x);}else {SET_VBIT_16(x);}}*/
-#define SET_ZBIT_16(x)  { the_zbit = ((x & 0xffff) == 0);}
-#define SET_ZBIT_8(x)   { the_zbit = ((x & 0xff) == 0);}
-#define SET_ZBIT_M(x)   { if(GET_MBIT) {SET_ZBIT_8(x);}else {SET_ZBIT_16(x);}}
-#define SET_ZBIT_X(x)   { if(GET_XBIT) {SET_ZBIT_8(x);}else {SET_ZBIT_16(x);}}
-#define SET_VBIT(x)     { the_vbit = x; }
-#define SET_ZBIT(x)     { the_zbit = x; }
-#define SET_X(x)        { the_x = (x) & (GET_XBIT ? 0xff : 0xffff);}
-#define SET_Y(x)        { the_y = (x) & (GET_XBIT ? 0xff : 0xffff);}
-
-#define AMASK            ( GET_MBIT ? 0xff : 0xffff)
-#define SMASK             ( GET_MBIT ? 0x80 : 0x8000)
-#define SET_VBIT_M(s1,acc,d) ( the_vbit = ((s1 ^ acc) & (acc ^ d) & SMASK )!=0)
-
-/*#define fetch8(x) (memory[x&MMASK])*/
-#define fetch16(x) (fetch8(x) + (fetch8((x)+1)<<8))
-#define fetch24(x) (fetch8(x) + (fetch8((x)+1)<<8) + (fetch8((x)+2)<<16))
-#define fetch8sext(x) ((char)fetch8(x))
-#define fetch16sext(x) ((short)fetch16(x))
-#define store8(x,y) {memory[x&MMASK]=y;}
-#define store16(x,y) { store8(x,y); store8(x+1,y>>8);}
-#define SEXTM(x)  (GET_MBIT ? ((char)x): ((short)x))
-
-
-#define STARTFUNC() 	\
-  register unsigned char *memory;\
-  int the_s;		\
-  int the_b;		\
-  int the_x;		\
-  int the_d;		\
-  int the_y;		\
-  int the_dbr;		\
-  int the_pc;		\
-  int the_nbit;		\
-  int the_vbit;		\
-  int the_z;		\
-  int the_mbit;		\
-  int the_ibit;		\
-  int the_xbit;		\
-  int the_zbit;		\
-  int the_cbit;		\
-  int the_dbit;		\
-  int the_dpr;		\
-  int the_e;            \
-  int the_a;		\
-  int tick_start = get_now ();\
-  int cycles = 0;	      \
-  int insts = 0;	      \
-				    \
-  SET_E (saved_state.e);	    \
-  SET_P (saved_state.p);	    \
-  SET_A (saved_state.a);	    \
-  SET_X (saved_state.x);	    \
-  SET_Y (saved_state.y);	    \
-  SET_ONLY_PC (saved_state.pc);	    \
-  SET_PBR (saved_state.pc >> 16);   \
-  SET_DBR_LOW (saved_state.dbr);    \
-  SET_D (saved_state.d);	    \
-  SET_S (saved_state.s);	    \
-  memory = saved_state.memory ;     \
-{ int k; for (k = 0; k < NFAKES; k++) 	   \
- store16(0x10 + k * 2, saved_state.r[k]); }\
-				    \
-    top:			      \
-
-
-
-#define ENDFUNC() \
- rethink:          \
-  saved_state.ticks += get_now () - tick_start;\
-  saved_state.cycles += cycles;   \
-  saved_state.insts += insts;  	  \
-{ int k; for (k = 0; k < NFAKES; k++) 	   \
-saved_state.r[k] = fetch16(0x10 + k * 2); }\
-			       	  \
-  saved_state.e = GET_E;	  \
-  saved_state.p = GET_P;	  \
-  saved_state.a = GET_A;	  \
-  saved_state.x = GET_X;	  \
-  saved_state.y = GET_Y;	  \
-  saved_state.pc = GET_PBRPC;	  \
-  saved_state.dbr = GET_DBR_LOW;  \
-  saved_state.d = GET_D;	  \
-  saved_state.s = GET_S;	  \
-				  \
-  return 0;			  \
-
-
-extern saved_state_type saved_state;
-
-#define MMASK 0xfffff
-#define NUMSEGS 16
-#define RETHINK goto rethink;
diff --git a/sim/w65/run.c b/sim/w65/run.c
deleted file mode 100644
index 2d966ee..0000000
--- a/sim/w65/run.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* run front end support for W65
-   Copyright (C) 1995 Free Software Foundation, Inc.
-
-This file is part of W65 SIM
-
-GNU CC 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.
-
-GNU CC 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.  */
-
-
-/* Steve Chamberlain
-   sac@cygnus.com */
-
-#include "config.h"
-
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#include "getopt.h"
-#include "bfd.h"
-
-#ifdef NEED_DECLARATION_PRINTF
-extern int printf ();
-#endif
-
-void usage();
-extern int optind;
-
-int
-main (ac, av)
-     int ac;
-     char **av;
-{
-  bfd *abfd;
-  bfd_vma start_address;
-  asection *s;
-  int i;
-  int verbose = 0;
-  int trace = 0;
-  char *name = "";
-
-  while ((i = getopt (ac, av, "tv")) != EOF)
-    switch (i)
-      {
-      case 't':
-	trace = 1;
-	break;
-      case 'v':
-	verbose = 1;
-	break;
-      default:
-	usage();
-      }
-  ac -= optind;
-  av += optind;
-
-  if (ac != 1) 
-    usage();
-
-  name = *av;
-
-  if (verbose)
-    {
-      printf ("run %s\n", name);
-    }
-  abfd = bfd_openr (name, "coff-w65");
-  if (abfd)
-    {
-
-      if (bfd_check_format (abfd, bfd_object))
-	{
-
-	  for (s = abfd->sections; s; s = s->next)
-	    {
-	      unsigned char *buffer = malloc (bfd_section_size (abfd, s));
-	      bfd_get_section_contents (abfd,
-					s,
-					buffer,
-					0,
-					bfd_section_size (abfd, s));
-	      sim_write (s->vma, buffer, bfd_section_size (abfd, s));
-	      free (buffer);
-	    }
-
-	  start_address = bfd_get_start_address (abfd);
-	  sim_set_pc (start_address);
-	  if (trace)
-	    {
-	      int done = 0;
-	      while (!done)
-		{
-		  done = sim_trace ();
-		}
-	    }
-	  else
-	    {
-	      sim_resume (0, 0);
-	    }
-	  if (verbose)
-	    sim_info (printf, 0);
-
-	  /* Find out what was in r0 and return that */
-	  {
-	    unsigned char b[4];
-	    sim_fetch_register(0, b, 4);
-	    return b[3];
-	  }
-	  
-	}
-    }
-
-  return 1;
-}
-
-void
-usage()
-{
-  fprintf (stderr, "usage: run [-tv] program\n");
-  exit (1);
-}
diff --git a/sim/z8k/ChangeLog b/sim/z8k/ChangeLog
index 8036fe3..11e2a45 100644
--- a/sim/z8k/ChangeLog
+++ b/sim/z8k/ChangeLog
@@ -1,3 +1,24 @@
+2002-06-16  Andrew Cagney  <ac131313@redhat.com>
+
+	* configure: Regenerated to track ../common/aclocal.m4 changes.
+
+2002-06-09  Andrew Cagney  <cagney@redhat.com>
+
+	* iface.c: Include "gdb/callback.h" and "gdb/remote-sim.h".
+	* support.c: Ditto.
+
+2002-06-06  Andrew Cagney  <ac131313@redhat.com>
+
+	* writecode.c (lookup_inst): Generate inverse table on-the-fly.
+	(z8k_inv_list): Delete global.
+	(DIRTY_HACK): Delete macro.
+	(makelist): Delete global.
+	(main): Delete code making a list.  Delete dirty hack code.  Use
+	lookup_inst instead of z8k_inv_list.
+	* list.c: Delete file.
+	* Makefile.in (writecode): Do not link in list.o.
+	(list.o): Delete target.
+
 2002-04-29  Nick Clifton  <nickc@cambridge.redhat.com>
 
 	* writecode.c (lookup_inst): Ignore CLASS_IGNORE.
diff --git a/sim/z8k/Makefile.in b/sim/z8k/Makefile.in
index f6432d4..db3f931 100644
--- a/sim/z8k/Makefile.in
+++ b/sim/z8k/Makefile.in
@@ -49,15 +49,12 @@
 tc-genb3.h:writecode
 	./writecode  -b3 >tc-genb3.h
 
-writecode: writecode.o list.o bquick.o
-	$(CC_FOR_BUILD) -o writecode writecode.o list.o bquick.o
+writecode: writecode.o bquick.o
+	$(CC_FOR_BUILD) -o writecode writecode.o bquick.o
 
 writecode.o: writecode.c $(CONFIG_H)
 	$(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/writecode.c
 
-list.o: list.c
-	$(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/list.c
-
 # Two copies of quick.o are created.  One for $build and one for $host.
 bquick.o: quick.c
 	$(CC_FOR_BUILD) -c $(CFLAGS) $(HDEFINES) $(CSEARCH) $(CSWITCHES) $(srcdir)/quick.c -o bquick.o
diff --git a/sim/z8k/iface.c b/sim/z8k/iface.c
index 1b3883e..c76d63f 100644
--- a/sim/z8k/iface.c
+++ b/sim/z8k/iface.c
@@ -22,8 +22,8 @@
 #include "tm.h"
 #include "signal.h"
 #include "bfd.h"
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 
 #ifndef NULL
 #define NULL 0
diff --git a/sim/z8k/list.c b/sim/z8k/list.c
deleted file mode 100644
index 40de760..0000000
--- a/sim/z8k/list.c
+++ /dev/null
@@ -1,11266 +0,0 @@
-short int z8k_inv_list[] = {
-
-10
-#ifdef __GNUC__
-};
-short int int_list0[] = {
-#else
-,
-#endif
-10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list64[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list128[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7
-#ifdef __GNUC__
-};
-short int int_list192[] = {
-#else
-,
-#endif
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-5
-#ifdef __GNUC__
-};
-short int int_list256[] = {
-#else
-,
-#endif
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list320[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list384[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2
-#ifdef __GNUC__
-};
-short int int_list448[] = {
-#else
-,
-#endif
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-370
-#ifdef __GNUC__
-};
-short int int_list512[] = {
-#else
-,
-#endif
-370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list576[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list640[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367
-#ifdef __GNUC__
-};
-short int int_list704[] = {
-#else
-,
-#endif
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,
-365
-#ifdef __GNUC__
-};
-short int int_list768[] = {
-#else
-,
-#endif
-365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list832[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list896[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362
-#ifdef __GNUC__
-};
-short int int_list960[] = {
-#else
-,
-#endif
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-260
-#ifdef __GNUC__
-};
-short int int_list1024[] = {
-#else
-,
-#endif
-260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1088[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1152[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257
-#ifdef __GNUC__
-};
-short int int_list1216[] = {
-#else
-,
-#endif
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,257,
-255
-#ifdef __GNUC__
-};
-short int int_list1280[] = {
-#else
-,
-#endif
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1344[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1408[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252
-#ifdef __GNUC__
-};
-short int int_list1472[] = {
-#else
-,
-#endif
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,252,
-25
-#ifdef __GNUC__
-};
-short int int_list1536[] = {
-#else
-,
-#endif
-25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1600[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1664[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22
-#ifdef __GNUC__
-};
-short int int_list1728[] = {
-#else
-,
-#endif
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-20
-#ifdef __GNUC__
-};
-short int int_list1792[] = {
-#else
-,
-#endif
-20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1856[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1920[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17
-#ifdef __GNUC__
-};
-short int int_list1984[] = {
-#else
-,
-#endif
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-415
-#ifdef __GNUC__
-};
-short int int_list2048[] = {
-#else
-,
-#endif
-415,415,415,415,415,415,415,415,415,415,415,415,415,415,415,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2112[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2176[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412
-#ifdef __GNUC__
-};
-short int int_list2240[] = {
-#else
-,
-#endif
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,412,
-410
-#ifdef __GNUC__
-};
-short int int_list2304[] = {
-#else
-,
-#endif
-410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2368[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2432[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407
-#ifdef __GNUC__
-};
-short int int_list2496[] = {
-#else
-,
-#endif
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,
-73
-#ifdef __GNUC__
-};
-short int int_list2560[] = {
-#else
-,
-#endif
-73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2624[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2688[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70
-#ifdef __GNUC__
-};
-short int int_list2752[] = {
-#else
-,
-#endif
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,
-65
-#ifdef __GNUC__
-};
-short int int_list2816[] = {
-#else
-,
-#endif
-65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list2880[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list2944[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62
-#ifdef __GNUC__
-};
-short int int_list3008[] = {
-#else
-,
-#endif
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
-62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,
--1
-#ifdef __GNUC__
-};
-short int int_list3072[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3136[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3200[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54
-#ifdef __GNUC__
-};
-short int int_list3264[] = {
-#else
-,
-#endif
-67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
-54,67,247,-1,383,176,403,-1,46,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list3328[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3392[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3456[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50
-#ifdef __GNUC__
-};
-short int int_list3520[] = {
-#else
-,
-#endif
-59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-50,59,243,-1,379,156,399,-1,42,282,-1,-1,-1,-1,-1,-1,
-127
-#ifdef __GNUC__
-};
-short int int_list3584[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3648[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3712[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127
-#ifdef __GNUC__
-};
-short int int_list3776[] = {
-#else
-,
-#endif
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,
-128
-#ifdef __GNUC__
-};
-short int int_list3840[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list3904[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list3968[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128
-#ifdef __GNUC__
-};
-short int int_list4032[] = {
-#else
-,
-#endif
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-86
-#ifdef __GNUC__
-};
-short int int_list4096[] = {
-#else
-,
-#endif
-86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4160[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4224[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83
-#ifdef __GNUC__
-};
-short int int_list4288[] = {
-#else
-,
-#endif
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
-83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,
--1
-#ifdef __GNUC__
-};
-short int int_list4352[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4416[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4480[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1
-#ifdef __GNUC__
-};
-short int int_list4544[] = {
-#else
-,
-#endif
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
--1,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-375
-#ifdef __GNUC__
-};
-short int int_list4608[] = {
-#else
-,
-#endif
-375,375,375,375,375,375,375,375,375,375,375,375,375,375,375,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4672[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4736[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372
-#ifdef __GNUC__
-};
-short int int_list4800[] = {
-#else
-,
-#endif
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
-372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,
--1
-#ifdef __GNUC__
-};
-short int int_list4864[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list4928[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list4992[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1
-#ifdef __GNUC__
-};
-short int int_list5056[] = {
-#else
-,
-#endif
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
--1,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
-210
-#ifdef __GNUC__
-};
-short int int_list5120[] = {
-#else
-,
-#endif
-210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5184[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5248[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207
-#ifdef __GNUC__
-};
-short int int_list5312[] = {
-#else
-,
-#endif
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
-207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
--1
-#ifdef __GNUC__
-};
-short int int_list5376[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5440[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5504[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1
-#ifdef __GNUC__
-};
-short int int_list5568[] = {
-#else
-,
-#endif
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
--1,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
-15
-#ifdef __GNUC__
-};
-short int int_list5632[] = {
-#else
-,
-#endif
-15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5696[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5760[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12
-#ifdef __GNUC__
-};
-short int int_list5824[] = {
-#else
-,
-#endif
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
--1
-#ifdef __GNUC__
-};
-short int int_list5888[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list5952[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list6016[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1
-#ifdef __GNUC__
-};
-short int int_list6080[] = {
-#else
-,
-#endif
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
--1,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-241
-#ifdef __GNUC__
-};
-short int int_list6144[] = {
-#else
-,
-#endif
-241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6208[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6272[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238
-#ifdef __GNUC__
-};
-short int int_list6336[] = {
-#else
-,
-#endif
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,
-236
-#ifdef __GNUC__
-};
-short int int_list6400[] = {
-#else
-,
-#endif
-236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6464[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6528[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233
-#ifdef __GNUC__
-};
-short int int_list6592[] = {
-#else
-,
-#endif
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,233,
-115
-#ifdef __GNUC__
-};
-short int int_list6656[] = {
-#else
-,
-#endif
-115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6720[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6784[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112
-#ifdef __GNUC__
-};
-short int int_list6848[] = {
-#else
-,
-#endif
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,
-110
-#ifdef __GNUC__
-};
-short int int_list6912[] = {
-#else
-,
-#endif
-110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list6976[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list7040[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107
-#ifdef __GNUC__
-};
-short int int_list7104[] = {
-#else
-,
-#endif
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
-107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
--1
-#ifdef __GNUC__
-};
-short int int_list7168[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7232[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7296[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7360[] = {
-#else
-,
-#endif
-217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1,217,-1,-1,-1,-1,-1,-1,387,214,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list7424[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7488[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7552[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202
-#ifdef __GNUC__
-};
-short int int_list7616[] = {
-#else
-,
-#endif
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,202,
--1
-#ifdef __GNUC__
-};
-short int int_list7680[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7744[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7808[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152
-#ifdef __GNUC__
-};
-short int int_list7872[] = {
-#else
-,
-#endif
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
-152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,
--1
-#ifdef __GNUC__
-};
-short int int_list7936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8000[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8064[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38
-#ifdef __GNUC__
-};
-short int int_list8128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-38,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list8192[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8256[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8320[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182
-#ifdef __GNUC__
-};
-short int int_list8384[] = {
-#else
-,
-#endif
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
-167
-#ifdef __GNUC__
-};
-short int int_list8448[] = {
-#else
-,
-#endif
-167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8512[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8576[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164
-#ifdef __GNUC__
-};
-short int int_list8640[] = {
-#else
-,
-#endif
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-297
-#ifdef __GNUC__
-};
-short int int_list8704[] = {
-#else
-,
-#endif
-297,297,297,297,297,297,297,297,297,297,297,297,297,297,297,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8768[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8832[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293
-#ifdef __GNUC__
-};
-short int int_list8896[] = {
-#else
-,
-#endif
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,
-292
-#ifdef __GNUC__
-};
-short int int_list8960[] = {
-#else
-,
-#endif
-292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9024[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9088[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288
-#ifdef __GNUC__
-};
-short int int_list9152[] = {
-#else
-,
-#endif
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,
-336
-#ifdef __GNUC__
-};
-short int int_list9216[] = {
-#else
-,
-#endif
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9280[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9344[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332
-#ifdef __GNUC__
-};
-short int int_list9408[] = {
-#else
-,
-#endif
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,332,
-331
-#ifdef __GNUC__
-};
-short int int_list9472[] = {
-#else
-,
-#endif
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9536[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9600[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327
-#ifdef __GNUC__
-};
-short int int_list9664[] = {
-#else
-,
-#endif
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-36
-#ifdef __GNUC__
-};
-short int int_list9728[] = {
-#else
-,
-#endif
-36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9792[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9856[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32
-#ifdef __GNUC__
-};
-short int int_list9920[] = {
-#else
-,
-#endif
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
-31
-#ifdef __GNUC__
-};
-short int int_list9984[] = {
-#else
-,
-#endif
-31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10048[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10112[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27
-#ifdef __GNUC__
-};
-short int int_list10176[] = {
-#else
-,
-#endif
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
--1
-#ifdef __GNUC__
-};
-short int int_list10240[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10304[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10368[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143
-#ifdef __GNUC__
-};
-short int int_list10432[] = {
-#else
-,
-#endif
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
-143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
--1
-#ifdef __GNUC__
-};
-short int int_list10496[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10560[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10624[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139
-#ifdef __GNUC__
-};
-short int int_list10688[] = {
-#else
-,
-#endif
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
--1
-#ifdef __GNUC__
-};
-short int int_list10752[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10816[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10880[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102
-#ifdef __GNUC__
-};
-short int int_list10944[] = {
-#else
-,
-#endif
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
-102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
--1
-#ifdef __GNUC__
-};
-short int int_list11008[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11072[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11136[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98
-#ifdef __GNUC__
-};
-short int int_list11200[] = {
-#else
-,
-#endif
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
-98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,
--1
-#ifdef __GNUC__
-};
-short int int_list11264[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11328[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11392[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123
-#ifdef __GNUC__
-};
-short int int_list11456[] = {
-#else
-,
-#endif
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,
--1
-#ifdef __GNUC__
-};
-short int int_list11520[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11584[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11648[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119
-#ifdef __GNUC__
-};
-short int int_list11712[] = {
-#else
-,
-#endif
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
-119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,
--1
-#ifdef __GNUC__
-};
-short int int_list11776[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11840[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11904[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177
-#ifdef __GNUC__
-};
-short int int_list11968[] = {
-#else
-,
-#endif
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
--1
-#ifdef __GNUC__
-};
-short int int_list12032[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12096[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12160[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157
-#ifdef __GNUC__
-};
-short int int_list12224[] = {
-#else
-,
-#endif
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
-226
-#ifdef __GNUC__
-};
-short int int_list12288[] = {
-#else
-,
-#endif
-226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12352[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12416[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187
-#ifdef __GNUC__
-};
-short int int_list12480[] = {
-#else
-,
-#endif
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
-224
-#ifdef __GNUC__
-};
-short int int_list12544[] = {
-#else
-,
-#endif
-224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12608[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12672[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169
-#ifdef __GNUC__
-};
-short int int_list12736[] = {
-#else
-,
-#endif
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
-225
-#ifdef __GNUC__
-};
-short int int_list12800[] = {
-#else
-,
-#endif
-225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12864[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12928[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189
-#ifdef __GNUC__
-};
-short int int_list12992[] = {
-#else
-,
-#endif
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-223
-#ifdef __GNUC__
-};
-short int int_list13056[] = {
-#else
-,
-#endif
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13120[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13184[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162
-#ifdef __GNUC__
-};
-short int int_list13248[] = {
-#else
-,
-#endif
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
-175
-#ifdef __GNUC__
-};
-short int int_list13312[] = {
-#else
-,
-#endif
-175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13376[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13440[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173
-#ifdef __GNUC__
-};
-short int int_list13504[] = {
-#else
-,
-#endif
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-228
-#ifdef __GNUC__
-};
-short int int_list13568[] = {
-#else
-,
-#endif
-228,228,228,228,228,228,228,228,228,228,228,228,228,228,228,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13632[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13696[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212
-#ifdef __GNUC__
-};
-short int int_list13760[] = {
-#else
-,
-#endif
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,212,
-37
-#ifdef __GNUC__
-};
-short int int_list13824[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list13888[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list13952[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310
-#ifdef __GNUC__
-};
-short int int_list14016[] = {
-#else
-,
-#endif
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,
-227
-#ifdef __GNUC__
-};
-short int int_list14080[] = {
-#else
-,
-#endif
-227,227,227,227,227,227,227,227,227,227,227,227,227,227,227,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14144[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14208[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205
-#ifdef __GNUC__
-};
-short int int_list14272[] = {
-#else
-,
-#endif
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-311
-#ifdef __GNUC__
-};
-short int int_list14336[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14400[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14464[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311
-#ifdef __GNUC__
-};
-short int int_list14528[] = {
-#else
-,
-#endif
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
--1
-#ifdef __GNUC__
-};
-short int int_list14592[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14656[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14720[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220
-#ifdef __GNUC__
-};
-short int int_list14784[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-220,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list14848[] = {
-#else
-,
-#endif
--1,-1,-1,138,338,265,351,-1,-1,-1,-1,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list14912[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list14976[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149
-#ifdef __GNUC__
-};
-short int int_list15040[] = {
-#else
-,
-#endif
-342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
-149,342,269,354,138,338,265,351,148,-1,267,353,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,339,263,350,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15168[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15232[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15296[] = {
-#else
-,
-#endif
--1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1,-1,268,-1,-1,339,263,350,147,-1,266,352,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list15360[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15424[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15488[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137
-#ifdef __GNUC__
-};
-short int int_list15552[] = {
-#else
-,
-#endif
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
-137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
--1
-#ifdef __GNUC__
-};
-short int int_list15616[] = {
-#else
-,
-#endif
--1,-1,-1,136,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15680[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15744[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135
-#ifdef __GNUC__
-};
-short int int_list15808[] = {
-#else
-,
-#endif
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
-135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
--1
-#ifdef __GNUC__
-};
-short int int_list15872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list15936[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list16000[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264
-#ifdef __GNUC__
-};
-short int int_list16064[] = {
-#else
-,
-#endif
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
--1
-#ifdef __GNUC__
-};
-short int int_list16128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16192[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16256[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262
-#ifdef __GNUC__
-};
-short int int_list16320[] = {
-#else
-,
-#endif
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-8
-#ifdef __GNUC__
-};
-short int int_list16384[] = {
-#else
-,
-#endif
-8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16448[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16512[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9
-#ifdef __GNUC__
-};
-short int int_list16576[] = {
-#else
-,
-#endif
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
-3
-#ifdef __GNUC__
-};
-short int int_list16640[] = {
-#else
-,
-#endif
-3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16704[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16768[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4
-#ifdef __GNUC__
-};
-short int int_list16832[] = {
-#else
-,
-#endif
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-368
-#ifdef __GNUC__
-};
-short int int_list16896[] = {
-#else
-,
-#endif
-368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list16960[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list17024[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369
-#ifdef __GNUC__
-};
-short int int_list17088[] = {
-#else
-,
-#endif
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-363
-#ifdef __GNUC__
-};
-short int int_list17152[] = {
-#else
-,
-#endif
-363,363,363,363,363,363,363,363,363,363,363,363,363,363,363,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17216[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17280[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364
-#ifdef __GNUC__
-};
-short int int_list17344[] = {
-#else
-,
-#endif
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-258
-#ifdef __GNUC__
-};
-short int int_list17408[] = {
-#else
-,
-#endif
-258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17472[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17536[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259
-#ifdef __GNUC__
-};
-short int int_list17600[] = {
-#else
-,
-#endif
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-253
-#ifdef __GNUC__
-};
-short int int_list17664[] = {
-#else
-,
-#endif
-253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17728[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17792[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254
-#ifdef __GNUC__
-};
-short int int_list17856[] = {
-#else
-,
-#endif
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,
-23
-#ifdef __GNUC__
-};
-short int int_list17920[] = {
-#else
-,
-#endif
-23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list17984[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list18048[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24
-#ifdef __GNUC__
-};
-short int int_list18112[] = {
-#else
-,
-#endif
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,
-18
-#ifdef __GNUC__
-};
-short int int_list18176[] = {
-#else
-,
-#endif
-18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18240[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18304[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19
-#ifdef __GNUC__
-};
-short int int_list18368[] = {
-#else
-,
-#endif
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
-413
-#ifdef __GNUC__
-};
-short int int_list18432[] = {
-#else
-,
-#endif
-413,413,413,413,413,413,413,413,413,413,413,413,413,413,413,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18496[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18560[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414
-#ifdef __GNUC__
-};
-short int int_list18624[] = {
-#else
-,
-#endif
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,
-408
-#ifdef __GNUC__
-};
-short int int_list18688[] = {
-#else
-,
-#endif
-408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18752[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18816[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409
-#ifdef __GNUC__
-};
-short int int_list18880[] = {
-#else
-,
-#endif
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,409,
-71
-#ifdef __GNUC__
-};
-short int int_list18944[] = {
-#else
-,
-#endif
-71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19008[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19072[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72
-#ifdef __GNUC__
-};
-short int int_list19136[] = {
-#else
-,
-#endif
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,
-63
-#ifdef __GNUC__
-};
-short int int_list19200[] = {
-#else
-,
-#endif
-63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19264[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19328[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64
-#ifdef __GNUC__
-};
-short int int_list19392[] = {
-#else
-,
-#endif
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,
-55
-#ifdef __GNUC__
-};
-short int int_list19456[] = {
-#else
-,
-#endif
-69,248,-1,384,180,404,-1,47,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19520[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19584[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56
-#ifdef __GNUC__
-};
-short int int_list19648[] = {
-#else
-,
-#endif
-68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-56,68,249,-1,385,178,405,-1,48,-1,-1,-1,-1,-1,-1,-1,
-51
-#ifdef __GNUC__
-};
-short int int_list19712[] = {
-#else
-,
-#endif
-61,244,-1,380,160,400,-1,43,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19776[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19840[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52
-#ifdef __GNUC__
-};
-short int int_list19904[] = {
-#else
-,
-#endif
-60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
-52,60,245,-1,381,158,401,-1,44,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list19968[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20032[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20096[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20160[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20224[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20288[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20352[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list20416[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-84
-#ifdef __GNUC__
-};
-short int int_list20480[] = {
-#else
-,
-#endif
-84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20544[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20608[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85
-#ifdef __GNUC__
-};
-short int int_list20672[] = {
-#else
-,
-#endif
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
-85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,
--1
-#ifdef __GNUC__
-};
-short int int_list20736[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20800[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20864[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285
-#ifdef __GNUC__
-};
-short int int_list20928[] = {
-#else
-,
-#endif
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-285,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-373
-#ifdef __GNUC__
-};
-short int int_list20992[] = {
-#else
-,
-#endif
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21056[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21120[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374
-#ifdef __GNUC__
-};
-short int int_list21184[] = {
-#else
-,
-#endif
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
-374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
--1
-#ifdef __GNUC__
-};
-short int int_list21248[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21312[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21376[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280
-#ifdef __GNUC__
-};
-short int int_list21440[] = {
-#else
-,
-#endif
-281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-280,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-208
-#ifdef __GNUC__
-};
-short int int_list21504[] = {
-#else
-,
-#endif
-208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21568[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21632[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209
-#ifdef __GNUC__
-};
-short int int_list21696[] = {
-#else
-,
-#endif
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
--1
-#ifdef __GNUC__
-};
-short int int_list21760[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21824[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21888[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277
-#ifdef __GNUC__
-};
-short int int_list21952[] = {
-#else
-,
-#endif
-276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-277,276,276,276,276,276,276,276,276,276,276,276,276,276,276,276,
-13
-#ifdef __GNUC__
-};
-short int int_list22016[] = {
-#else
-,
-#endif
-13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22080[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22144[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14
-#ifdef __GNUC__
-};
-short int int_list22208[] = {
-#else
-,
-#endif
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
--1
-#ifdef __GNUC__
-};
-short int int_list22272[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22336[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22400[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273
-#ifdef __GNUC__
-};
-short int int_list22464[] = {
-#else
-,
-#endif
-272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-273,272,272,272,272,272,272,272,272,272,272,272,272,272,272,272,
-239
-#ifdef __GNUC__
-};
-short int int_list22528[] = {
-#else
-,
-#endif
-239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22592[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22656[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240
-#ifdef __GNUC__
-};
-short int int_list22720[] = {
-#else
-,
-#endif
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,
-234
-#ifdef __GNUC__
-};
-short int int_list22784[] = {
-#else
-,
-#endif
-234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22848[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22912[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235
-#ifdef __GNUC__
-};
-short int int_list22976[] = {
-#else
-,
-#endif
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,235,
-113
-#ifdef __GNUC__
-};
-short int int_list23040[] = {
-#else
-,
-#endif
-113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23104[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23168[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114
-#ifdef __GNUC__
-};
-short int int_list23232[] = {
-#else
-,
-#endif
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-108
-#ifdef __GNUC__
-};
-short int int_list23296[] = {
-#else
-,
-#endif
-108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23360[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23424[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109
-#ifdef __GNUC__
-};
-short int int_list23488[] = {
-#else
-,
-#endif
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
--1
-#ifdef __GNUC__
-};
-short int int_list23552[] = {
-#else
-,
-#endif
-219,-1,-1,-1,-1,-1,-1,388,216,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23616[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23680[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list23744[] = {
-#else
-,
-#endif
-218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
--1,218,-1,-1,-1,-1,-1,-1,389,215,-1,-1,-1,-1,-1,-1,
-204
-#ifdef __GNUC__
-};
-short int int_list23808[] = {
-#else
-,
-#endif
-204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list23872[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list23936[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203
-#ifdef __GNUC__
-};
-short int int_list24000[] = {
-#else
-,
-#endif
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,203,
-153
-#ifdef __GNUC__
-};
-short int int_list24064[] = {
-#else
-,
-#endif
-153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24128[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24192[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154
-#ifdef __GNUC__
-};
-short int int_list24256[] = {
-#else
-,
-#endif
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,
-39
-#ifdef __GNUC__
-};
-short int int_list24320[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24384[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24448[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40
-#ifdef __GNUC__
-};
-short int int_list24512[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-40,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-183
-#ifdef __GNUC__
-};
-short int int_list24576[] = {
-#else
-,
-#endif
-183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24640[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24704[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184
-#ifdef __GNUC__
-};
-short int int_list24768[] = {
-#else
-,
-#endif
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-165
-#ifdef __GNUC__
-};
-short int int_list24832[] = {
-#else
-,
-#endif
-165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list24896[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list24960[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166
-#ifdef __GNUC__
-};
-short int int_list25024[] = {
-#else
-,
-#endif
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-295
-#ifdef __GNUC__
-};
-short int int_list25088[] = {
-#else
-,
-#endif
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25152[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25216[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294
-#ifdef __GNUC__
-};
-short int int_list25280[] = {
-#else
-,
-#endif
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
-290
-#ifdef __GNUC__
-};
-short int int_list25344[] = {
-#else
-,
-#endif
-290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25408[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25472[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289
-#ifdef __GNUC__
-};
-short int int_list25536[] = {
-#else
-,
-#endif
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-334
-#ifdef __GNUC__
-};
-short int int_list25600[] = {
-#else
-,
-#endif
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25664[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25728[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333
-#ifdef __GNUC__
-};
-short int int_list25792[] = {
-#else
-,
-#endif
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
-329
-#ifdef __GNUC__
-};
-short int int_list25856[] = {
-#else
-,
-#endif
-329,329,329,329,329,329,329,329,329,329,329,329,329,329,329,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list25920[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list25984[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328
-#ifdef __GNUC__
-};
-short int int_list26048[] = {
-#else
-,
-#endif
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,328,
-34
-#ifdef __GNUC__
-};
-short int int_list26112[] = {
-#else
-,
-#endif
-34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26176[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26240[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33
-#ifdef __GNUC__
-};
-short int int_list26304[] = {
-#else
-,
-#endif
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
-29
-#ifdef __GNUC__
-};
-short int int_list26368[] = {
-#else
-,
-#endif
-29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26432[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26496[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28
-#ifdef __GNUC__
-};
-short int int_list26560[] = {
-#else
-,
-#endif
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-145
-#ifdef __GNUC__
-};
-short int int_list26624[] = {
-#else
-,
-#endif
-145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26688[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26752[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144
-#ifdef __GNUC__
-};
-short int int_list26816[] = {
-#else
-,
-#endif
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,
-141
-#ifdef __GNUC__
-};
-short int int_list26880[] = {
-#else
-,
-#endif
-141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list26944[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list27008[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140
-#ifdef __GNUC__
-};
-short int int_list27072[] = {
-#else
-,
-#endif
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
-104
-#ifdef __GNUC__
-};
-short int int_list27136[] = {
-#else
-,
-#endif
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27200[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27264[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103
-#ifdef __GNUC__
-};
-short int int_list27328[] = {
-#else
-,
-#endif
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,
-100
-#ifdef __GNUC__
-};
-short int int_list27392[] = {
-#else
-,
-#endif
-100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27456[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27520[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99
-#ifdef __GNUC__
-};
-short int int_list27584[] = {
-#else
-,
-#endif
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,
-124
-#ifdef __GNUC__
-};
-short int int_list27648[] = {
-#else
-,
-#endif
-124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27712[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27776[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125
-#ifdef __GNUC__
-};
-short int int_list27840[] = {
-#else
-,
-#endif
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,
-120
-#ifdef __GNUC__
-};
-short int int_list27904[] = {
-#else
-,
-#endif
-120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list27968[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list28032[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121
-#ifdef __GNUC__
-};
-short int int_list28096[] = {
-#else
-,
-#endif
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,
-181
-#ifdef __GNUC__
-};
-short int int_list28160[] = {
-#else
-,
-#endif
-181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28224[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28288[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179
-#ifdef __GNUC__
-};
-short int int_list28352[] = {
-#else
-,
-#endif
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
-161
-#ifdef __GNUC__
-};
-short int int_list28416[] = {
-#else
-,
-#endif
-161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28480[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28544[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159
-#ifdef __GNUC__
-};
-short int int_list28608[] = {
-#else
-,
-#endif
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
-159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,
--1
-#ifdef __GNUC__
-};
-short int int_list28672[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28736[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28800[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188
-#ifdef __GNUC__
-};
-short int int_list28864[] = {
-#else
-,
-#endif
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
-188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
--1
-#ifdef __GNUC__
-};
-short int int_list28928[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list28992[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list29056[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170
-#ifdef __GNUC__
-};
-short int int_list29120[] = {
-#else
-,
-#endif
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
--1
-#ifdef __GNUC__
-};
-short int int_list29184[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29248[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29312[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190
-#ifdef __GNUC__
-};
-short int int_list29376[] = {
-#else
-,
-#endif
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
--1
-#ifdef __GNUC__
-};
-short int int_list29440[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29504[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29568[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163
-#ifdef __GNUC__
-};
-short int int_list29632[] = {
-#else
-,
-#endif
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
--1
-#ifdef __GNUC__
-};
-short int int_list29696[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29760[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29824[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174
-#ifdef __GNUC__
-};
-short int int_list29888[] = {
-#else
-,
-#endif
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
--1
-#ifdef __GNUC__
-};
-short int int_list29952[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30016[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30080[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213
-#ifdef __GNUC__
-};
-short int int_list30144[] = {
-#else
-,
-#endif
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-171
-#ifdef __GNUC__
-};
-short int int_list30208[] = {
-#else
-,
-#endif
-171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30272[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30336[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172
-#ifdef __GNUC__
-};
-short int int_list30400[] = {
-#else
-,
-#endif
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
-172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
--1
-#ifdef __GNUC__
-};
-short int int_list30464[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30528[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30592[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206
-#ifdef __GNUC__
-};
-short int int_list30656[] = {
-#else
-,
-#endif
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-312
-#ifdef __GNUC__
-};
-short int int_list30720[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30784[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30848[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312
-#ifdef __GNUC__
-};
-short int int_list30912[] = {
-#else
-,
-#endif
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-221
-#ifdef __GNUC__
-};
-short int int_list30976[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31040[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222
-#ifdef __GNUC__
-};
-short int int_list31168[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-222,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-134
-#ifdef __GNUC__
-};
-short int int_list31232[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31296[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31360[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31424[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-151
-#ifdef __GNUC__
-};
-short int int_list31488[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,232,231,229,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31552[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31616[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31680[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,230,-1,-1,
-106
-#ifdef __GNUC__
-};
-short int int_list31744[] = {
-#else
-,
-#endif
-106,106,106,118,118,118,118,106,106,106,106,118,118,118,118,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31808[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list31936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-192
-#ifdef __GNUC__
-};
-short int int_list32000[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32064[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32128[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192
-#ifdef __GNUC__
-};
-short int int_list32192[] = {
-#else
-,
-#endif
-192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-192,192,192,192,192,192,192,192,191,191,191,191,191,191,191,191,
-313
-#ifdef __GNUC__
-};
-short int int_list32256[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32320[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32384[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313
-#ifdef __GNUC__
-};
-short int int_list32448[] = {
-#else
-,
-#endif
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-320
-#ifdef __GNUC__
-};
-short int int_list32512[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32576[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32640[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320
-#ifdef __GNUC__
-};
-short int int_list32704[] = {
-#else
-,
-#endif
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,320,
-11
-#ifdef __GNUC__
-};
-short int int_list32768[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32832[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32896[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11
-#ifdef __GNUC__
-};
-short int int_list32960[] = {
-#else
-,
-#endif
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
-6
-#ifdef __GNUC__
-};
-short int int_list33024[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33088[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33152[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6
-#ifdef __GNUC__
-};
-short int int_list33216[] = {
-#else
-,
-#endif
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-371
-#ifdef __GNUC__
-};
-short int int_list33280[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33344[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33408[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371
-#ifdef __GNUC__
-};
-short int int_list33472[] = {
-#else
-,
-#endif
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
-366
-#ifdef __GNUC__
-};
-short int int_list33536[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33600[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33664[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366
-#ifdef __GNUC__
-};
-short int int_list33728[] = {
-#else
-,
-#endif
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,
-261
-#ifdef __GNUC__
-};
-short int int_list33792[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33856[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33920[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261
-#ifdef __GNUC__
-};
-short int int_list33984[] = {
-#else
-,
-#endif
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,
-256
-#ifdef __GNUC__
-};
-short int int_list34048[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34112[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34176[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256
-#ifdef __GNUC__
-};
-short int int_list34240[] = {
-#else
-,
-#endif
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
-26
-#ifdef __GNUC__
-};
-short int int_list34304[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34368[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34432[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26
-#ifdef __GNUC__
-};
-short int int_list34496[] = {
-#else
-,
-#endif
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,
-21
-#ifdef __GNUC__
-};
-short int int_list34560[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34624[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34688[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21
-#ifdef __GNUC__
-};
-short int int_list34752[] = {
-#else
-,
-#endif
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
-416
-#ifdef __GNUC__
-};
-short int int_list34816[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list34880[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list34944[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416
-#ifdef __GNUC__
-};
-short int int_list35008[] = {
-#else
-,
-#endif
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,
-411
-#ifdef __GNUC__
-};
-short int int_list35072[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35136[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35200[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411
-#ifdef __GNUC__
-};
-short int int_list35264[] = {
-#else
-,
-#endif
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,411,
-74
-#ifdef __GNUC__
-};
-short int int_list35328[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35392[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35456[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74
-#ifdef __GNUC__
-};
-short int int_list35520[] = {
-#else
-,
-#endif
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
-66
-#ifdef __GNUC__
-};
-short int int_list35584[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35648[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35712[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66
-#ifdef __GNUC__
-};
-short int int_list35776[] = {
-#else
-,
-#endif
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,
-57
-#ifdef __GNUC__
-};
-short int int_list35840[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list35904[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list35968[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57
-#ifdef __GNUC__
-};
-short int int_list36032[] = {
-#else
-,
-#endif
--1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-57,-1,250,-1,386,-1,406,-1,49,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36096[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,251,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36160[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36224[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53
-#ifdef __GNUC__
-};
-short int int_list36288[] = {
-#else
-,
-#endif
-337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-53,337,246,298,382,58,402,-1,45,-1,-1,-1,-1,-1,-1,-1,
-129
-#ifdef __GNUC__
-};
-short int int_list36352[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36416[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36480[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129
-#ifdef __GNUC__
-};
-short int int_list36544[] = {
-#else
-,
-#endif
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
-130
-#ifdef __GNUC__
-};
-short int int_list36608[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36672[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36736[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130
-#ifdef __GNUC__
-};
-short int int_list36800[] = {
-#else
-,
-#endif
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
-87
-#ifdef __GNUC__
-};
-short int int_list36864[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list36928[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list36992[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87
-#ifdef __GNUC__
-};
-short int int_list37056[] = {
-#else
-,
-#endif
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
-87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,
--1
-#ifdef __GNUC__
-};
-short int int_list37120[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37184[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37248[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287
-#ifdef __GNUC__
-};
-short int int_list37312[] = {
-#else
-,
-#endif
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,
-376
-#ifdef __GNUC__
-};
-short int int_list37376[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37440[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37504[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376
-#ifdef __GNUC__
-};
-short int int_list37568[] = {
-#else
-,
-#endif
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
-376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,
--1
-#ifdef __GNUC__
-};
-short int int_list37632[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37696[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37760[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283
-#ifdef __GNUC__
-};
-short int int_list37824[] = {
-#else
-,
-#endif
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-211
-#ifdef __GNUC__
-};
-short int int_list37888[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list37952[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list38016[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211
-#ifdef __GNUC__
-};
-short int int_list38080[] = {
-#else
-,
-#endif
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
-211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,
--1
-#ifdef __GNUC__
-};
-short int int_list38144[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38208[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38272[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278
-#ifdef __GNUC__
-};
-short int int_list38336[] = {
-#else
-,
-#endif
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-16
-#ifdef __GNUC__
-};
-short int int_list38400[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38464[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38528[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16
-#ifdef __GNUC__
-};
-short int int_list38592[] = {
-#else
-,
-#endif
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
--1
-#ifdef __GNUC__
-};
-short int int_list38656[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38720[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38784[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274
-#ifdef __GNUC__
-};
-short int int_list38848[] = {
-#else
-,
-#endif
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
-242
-#ifdef __GNUC__
-};
-short int int_list38912[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list38976[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list39040[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242
-#ifdef __GNUC__
-};
-short int int_list39104[] = {
-#else
-,
-#endif
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,
-237
-#ifdef __GNUC__
-};
-short int int_list39168[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39232[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39296[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237
-#ifdef __GNUC__
-};
-short int int_list39360[] = {
-#else
-,
-#endif
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,237,
-116
-#ifdef __GNUC__
-};
-short int int_list39424[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39488[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39552[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116
-#ifdef __GNUC__
-};
-short int int_list39616[] = {
-#else
-,
-#endif
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,
-111
-#ifdef __GNUC__
-};
-short int int_list39680[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39744[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39808[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111
-#ifdef __GNUC__
-};
-short int int_list39872[] = {
-#else
-,
-#endif
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
-111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
--1
-#ifdef __GNUC__
-};
-short int int_list39936[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40000[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40064[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40128[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,390,-1,-1,-1,-1,-1,-1,-1,
-314
-#ifdef __GNUC__
-};
-short int int_list40192[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40256[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40320[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314
-#ifdef __GNUC__
-};
-short int int_list40384[] = {
-#else
-,
-#endif
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-299
-#ifdef __GNUC__
-};
-short int int_list40448[] = {
-#else
-,
-#endif
-299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40512[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40576[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list40640[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-315
-#ifdef __GNUC__
-};
-short int int_list40704[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40768[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40832[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315
-#ifdef __GNUC__
-};
-short int int_list40896[] = {
-#else
-,
-#endif
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-186
-#ifdef __GNUC__
-};
-short int int_list40960[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41024[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41088[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186
-#ifdef __GNUC__
-};
-short int int_list41152[] = {
-#else
-,
-#endif
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
-168
-#ifdef __GNUC__
-};
-short int int_list41216[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41280[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41344[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168
-#ifdef __GNUC__
-};
-short int int_list41408[] = {
-#else
-,
-#endif
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
-296
-#ifdef __GNUC__
-};
-short int int_list41472[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41536[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41600[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296
-#ifdef __GNUC__
-};
-short int int_list41664[] = {
-#else
-,
-#endif
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
-291
-#ifdef __GNUC__
-};
-short int int_list41728[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41792[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41856[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291
-#ifdef __GNUC__
-};
-short int int_list41920[] = {
-#else
-,
-#endif
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,
-335
-#ifdef __GNUC__
-};
-short int int_list41984[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42048[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42112[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335
-#ifdef __GNUC__
-};
-short int int_list42176[] = {
-#else
-,
-#endif
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,335,
-330
-#ifdef __GNUC__
-};
-short int int_list42240[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42304[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42368[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330
-#ifdef __GNUC__
-};
-short int int_list42432[] = {
-#else
-,
-#endif
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-35
-#ifdef __GNUC__
-};
-short int int_list42496[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42560[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42624[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35
-#ifdef __GNUC__
-};
-short int int_list42688[] = {
-#else
-,
-#endif
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
-30
-#ifdef __GNUC__
-};
-short int int_list42752[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42816[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42880[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30
-#ifdef __GNUC__
-};
-short int int_list42944[] = {
-#else
-,
-#endif
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,
-146
-#ifdef __GNUC__
-};
-short int int_list43008[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43072[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43136[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146
-#ifdef __GNUC__
-};
-short int int_list43200[] = {
-#else
-,
-#endif
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,
-142
-#ifdef __GNUC__
-};
-short int int_list43264[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43328[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43392[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142
-#ifdef __GNUC__
-};
-short int int_list43456[] = {
-#else
-,
-#endif
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
-105
-#ifdef __GNUC__
-};
-short int int_list43520[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43584[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43648[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105
-#ifdef __GNUC__
-};
-short int int_list43712[] = {
-#else
-,
-#endif
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,
-101
-#ifdef __GNUC__
-};
-short int int_list43776[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43840[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43904[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101
-#ifdef __GNUC__
-};
-short int int_list43968[] = {
-#else
-,
-#endif
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-126
-#ifdef __GNUC__
-};
-short int int_list44032[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44096[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44160[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126
-#ifdef __GNUC__
-};
-short int int_list44224[] = {
-#else
-,
-#endif
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,
-122
-#ifdef __GNUC__
-};
-short int int_list44288[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44352[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44416[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122
-#ifdef __GNUC__
-};
-short int int_list44480[] = {
-#else
-,
-#endif
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,
-378
-#ifdef __GNUC__
-};
-short int int_list44544[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44608[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44672[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378
-#ifdef __GNUC__
-};
-short int int_list44736[] = {
-#else
-,
-#endif
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,378,
-377
-#ifdef __GNUC__
-};
-short int int_list44800[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44864[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44928[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377
-#ifdef __GNUC__
-};
-short int int_list44992[] = {
-#else
-,
-#endif
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,
-96
-#ifdef __GNUC__
-};
-short int int_list45056[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45120[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45184[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96
-#ifdef __GNUC__
-};
-short int int_list45248[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-96,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45312[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45376[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45440[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132
-#ifdef __GNUC__
-};
-short int int_list45504[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-132,-1,-1,-1,-1,-1,-1,133,-1,-1,131,-1,-1,-1,-1,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45568[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45632[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45696[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301
-#ifdef __GNUC__
-};
-short int int_list45760[] = {
-#else
-,
-#endif
-348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-301,348,301,325,306,-1,306,-1,303,345,303,322,308,-1,308,-1,
-300
-#ifdef __GNUC__
-};
-short int int_list45824[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list45888[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list45952[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300
-#ifdef __GNUC__
-};
-short int int_list46016[] = {
-#else
-,
-#endif
-347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-300,347,300,324,305,349,305,326,302,344,302,321,307,346,307,323,
-1
-#ifdef __GNUC__
-};
-short int int_list46080[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46144[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46208[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1
-#ifdef __GNUC__
-};
-short int int_list46272[] = {
-#else
-,
-#endif
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-0
-#ifdef __GNUC__
-};
-short int int_list46336[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46400[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46464[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0
-#ifdef __GNUC__
-};
-short int int_list46528[] = {
-#else
-,
-#endif
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-319
-#ifdef __GNUC__
-};
-short int int_list46592[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46656[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46720[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319
-#ifdef __GNUC__
-};
-short int int_list46784[] = {
-#else
-,
-#endif
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,
-318
-#ifdef __GNUC__
-};
-short int int_list46848[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list46912[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list46976[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318
-#ifdef __GNUC__
-};
-short int int_list47040[] = {
-#else
-,
-#endif
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
--1
-#ifdef __GNUC__
-};
-short int int_list47104[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47168[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47232[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393
-#ifdef __GNUC__
-};
-short int int_list47296[] = {
-#else
-,
-#endif
--1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-393,-1,397,-1,394,-1,398,-1,391,-1,395,-1,392,-1,396,-1,
-316
-#ifdef __GNUC__
-};
-short int int_list47360[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47424[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47488[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316
-#ifdef __GNUC__
-};
-short int int_list47552[] = {
-#else
-,
-#endif
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
--1
-#ifdef __GNUC__
-};
-short int int_list47616[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47680[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47744[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80
-#ifdef __GNUC__
-};
-short int int_list47808[] = {
-#else
-,
-#endif
-198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
-80,198,93,-1,82,-1,95,-1,76,194,89,-1,78,-1,91,-1,
--1
-#ifdef __GNUC__
-};
-short int int_list47872[] = {
-#else
-,
-#endif
--1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list47936[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list48000[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79
-#ifdef __GNUC__
-};
-short int int_list48064[] = {
-#else
-,
-#endif
-197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-79,197,92,-1,81,-1,94,-1,75,193,88,-1,77,-1,90,-1,
-309
-#ifdef __GNUC__
-};
-short int int_list48128[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48192[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48256[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309
-#ifdef __GNUC__
-};
-short int int_list48320[] = {
-#else
-,
-#endif
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,309,
-201
-#ifdef __GNUC__
-};
-short int int_list48384[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48448[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48512[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201
-#ifdef __GNUC__
-};
-short int int_list48576[] = {
-#else
-,
-#endif
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-304
-#ifdef __GNUC__
-};
-short int int_list48640[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48704[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48768[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304
-#ifdef __GNUC__
-};
-short int int_list48832[] = {
-#else
-,
-#endif
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-317
-#ifdef __GNUC__
-};
-short int int_list48896[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list48960[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list49024[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317
-#ifdef __GNUC__
-};
-short int int_list49088[] = {
-#else
-,
-#endif
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-185
-#ifdef __GNUC__
-};
-short int int_list49152[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49216[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49280[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49344[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49408[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49472[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49536[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49600[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49664[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49728[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49792[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49856[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49920[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list49984[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50048[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50112[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50176[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50240[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50304[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50368[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50432[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50496[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50560[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50624[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50688[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50752[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50816[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50880[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list50944[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51008[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51072[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51136[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51200[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51264[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51328[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51392[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51456[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51520[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51584[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51648[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51712[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51776[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51840[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51904[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list51968[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52032[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52096[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52160[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52224[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52288[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52352[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52416[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52480[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52544[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52608[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52672[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52736[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52800[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52864[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52928[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list52992[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53056[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53120[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185
-#ifdef __GNUC__
-};
-short int int_list53184[] = {
-#else
-,
-#endif
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
-41
-#ifdef __GNUC__
-};
-short int int_list53248[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53312[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53376[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53440[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53504[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53568[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53632[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53696[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53760[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53824[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53888[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list53952[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54016[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54080[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54144[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54208[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54272[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54336[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54400[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54464[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54528[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54592[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54656[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54720[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54784[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54848[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54912[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list54976[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55040[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55104[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55168[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55232[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55296[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55360[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55424[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55488[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55552[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55616[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55680[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55744[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55808[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55872[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list55936[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56000[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56064[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56128[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56192[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56256[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56320[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56384[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56448[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56512[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56576[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56640[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56704[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56768[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56832[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56896[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list56960[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57024[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57088[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57152[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57216[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41
-#ifdef __GNUC__
-};
-short int int_list57280[] = {
-#else
-,
-#endif
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
-155
-#ifdef __GNUC__
-};
-short int int_list57344[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57408[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57472[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57536[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57600[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57664[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57728[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57792[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57856[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57920[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list57984[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58048[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58112[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58176[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58240[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58304[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58368[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58432[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58496[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58560[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58624[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58688[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58752[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58816[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58880[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list58944[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59008[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59072[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59136[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59200[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59264[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59328[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59392[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59456[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59520[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59584[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59648[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59712[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59776[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59840[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59904[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list59968[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60032[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60096[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60160[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60224[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60288[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60352[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60416[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60480[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60544[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60608[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60672[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60736[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60800[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60864[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60928[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list60992[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61056[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61120[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61184[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61248[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61312[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155
-#ifdef __GNUC__
-};
-short int int_list61376[] = {
-#else
-,
-#endif
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,
-97
-#ifdef __GNUC__
-};
-short int int_list61440[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list61504[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list61568[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list61632[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list61696[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list61760[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list61824[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list61888[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list61952[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62016[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62080[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62144[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62208[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62272[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62336[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62400[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62464[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62528[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62592[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62656[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62720[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list62784[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list62848[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list62912[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list62976[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63040[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63104[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63168[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63232[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63296[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63360[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63424[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63488[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63552[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63616[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63680[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list63744[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list63808[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list63872[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list63936[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64000[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64064[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64128[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64192[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64256[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64320[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64384[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64448[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64512[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64576[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64640[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64704[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list64768[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list64832[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list64896[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list64960[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list65024[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list65088[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list65152[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list65216[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-97
-#ifdef __GNUC__
-};
-short int int_list65280[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97
-#ifdef __GNUC__
-};
-short int int_list65344[] = {
-#else
-,
-#endif
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,
-117
-#ifdef __GNUC__
-};
-short int int_list65408[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117
-#ifdef __GNUC__
-};
-short int int_list65472[] = {
-#else
-,
-#endif
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,
-117,117,117,117,117,117,117,117,117,117,117,117,117,117,117,117};
diff --git a/sim/z8k/support.c b/sim/z8k/support.c
index 7392364..e3cdc73 100644
--- a/sim/z8k/support.c
+++ b/sim/z8k/support.c
@@ -36,8 +36,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/param.h>
-#include "callback.h"
-#include "remote-sim.h"
+#include "gdb/callback.h"
+#include "gdb/remote-sim.h"
 #include "syscall.h"
 
 static int get_now PARAMS ((void));
diff --git a/sim/z8k/writecode.c b/sim/z8k/writecode.c
index b398545..acff7c4 100644
--- a/sim/z8k/writecode.c
+++ b/sim/z8k/writecode.c
@@ -1,6 +1,6 @@
-
 /* generate instructions for Z8KSIM
-   Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+
+   Copyright 1992, 1993, 2002 Free Software Foundation, Inc.
 
 This file is part of Z8KSIM
 
@@ -35,9 +35,6 @@
 
    -b3   tc-genb3.h same as -3 but for long pointers
 
-   -m  regenerates list.c, which is an inverted list of opcodes to
-       pointers into the z8k dissassemble opcode table, it's just there
-       to makes things faster.
    */
 
 /* steve chamberlain
@@ -65,8 +62,6 @@
 
 #define NOPS 500
 
-#define DIRTY_HACK 0 /* Enable if your gcc can't cope with huge tables */
-extern short z8k_inv_list[];
 struct opcode_value
 {
   int n;
@@ -84,7 +79,6 @@
 #define SIZE_ADDRESS (BIG ? 8 : 4)	/* number of nibbles in a ptr*/
 
 static int file;
-static int makelist;
 
 static int nibs = 0;
 
@@ -103,7 +97,16 @@
 lookup_inst (what)
      int what;
 {
-  if (makelist)
+  static short *z8k_inv_list = NULL;
+  const nr_z8k_inv_list_elements = 1 << 16;
+  if (z8k_inv_list == NULL)
+    {
+      /* Initialize the list to 0xff == -1 */
+      z8k_inv_list = calloc (nr_z8k_inv_list_elements, sizeof (short));
+      memset (z8k_inv_list, 0xff, nr_z8k_inv_list_elements * sizeof (short));
+    }
+  /* Entry empty? Fill it in.  */
+  if (z8k_inv_list[what] == -1)
     {
 
       int nibl_index;
@@ -121,6 +124,9 @@
       instr_nibbles[1] = (what >> 8) & 0xf;
       instr_nibbles[0] = (what >> 12) & 0xf;
 
+      /* Assume it won't be found.  */
+      z8k_inv_list[what] = -2;
+
       while (ptr->name)
 	{
 	  nibl_matched = 1;
@@ -181,19 +187,15 @@
 	    }
 	  if (nibl_matched)
 	    {
-	      return ptr;
+	      z8k_inv_list[what] = ptr->idx;
+	      break; /* while */
 	    }
 	  ptr++;
 	}
-      return 0;
     }
-  else
-    {
-
-      if (z8k_inv_list[what] < 0)
-	return 0;
-      return z8k_table + z8k_inv_list[what];
-    }
+  if (z8k_inv_list[what] >= 0)
+    return z8k_table + z8k_inv_list[what];
+  return 0;
 }
 
 static char *
@@ -1677,12 +1679,8 @@
   int i;
   int needcomma = 0;
 
-  makelist = 0;
-
   for (i = 1; i < ac; i++)
     {
-      if (strcmp (av[i], "-m") == 0)
-	makelist = 1;
       if (strcmp (av[i], "-1") == 0)
 	file = 1;
       if (strcmp (av[i], "-2") == 0)
@@ -1696,52 +1694,6 @@
 	}
 
     }
-  if (makelist)
-    {
-
-      int i;
-      needcomma = 0;
-      printf ("short int z8k_inv_list[] = {\n");
-
-      for (i = 0; i < 1 << 16; i++)
-	{
-	  opcode_entry_type *p = lookup_inst (i);
-
-	  if(needcomma)
-	    printf(",");
-	  if ((i & 0xf) == 0)
-	    printf ("\n");
-
-#if 0
-	  printf ("\n		/*%04x %s */", i, p ? p->nicename : "");
-#endif
-
-	  if (!p)
-	    {
-	      printf ("-1");
-	    }
-	  else
-	    {
-	      printf ("%d", p->idx);
-	    }
-
-	  if ((i & 0x3f) == 0 && DIRTY_HACK)
-	    {
-	      printf ("\n#ifdef __GNUC__\n");
-	      printf ("};\n");
-	      printf("short int int_list%d[] = {\n", i);
-	      printf ("#else\n");
-	      printf (",\n");
-	      printf ("#endif\n");
-	      needcomma = 0;
-	    }
-	  else
-	    needcomma = 1;
-
-	}
-      printf ("};\n");
-      return 1;
-    }
 
   /* First work out which opcodes use which bit patterns,
      build a list of all matching bit pattens */
@@ -1776,9 +1728,7 @@
 	{
 	  int t = quick[i];
 
-	  mangle (z8k_table + z8k_inv_list[t],
-		  1,
-		  t);
+	  mangle (lookup_inst (t), 1, t);
 	}
     }
   if (file == 3)
@@ -1809,16 +1759,6 @@
 	    printf (",");
 	  emit ("<fop>_%d\n", i);
 	  needcomma = 1;
-	  if ((i & 0x3f) == 0 && DIRTY_HACK)
-	    {
-	      printf ("#ifdef __GNUC__\n");
-	      printf ("};\n");
-	      emit ("int (*(<fop>_table%d[]))() = {\n", i);
-	      printf ("#else\n");
-	      printf (",\n");
-	      printf ("#endif\n");
-	      needcomma = 0;
-	    }
 	}
       emit ("};\n");
     }
@@ -1854,8 +1794,7 @@
       printf ("struct op_info op_info_table[] = {\n");
       for (i = 0; i < 1 << 16; i++)
 	{
-	  int inv = z8k_inv_list[i];
-	  opcode_entry_type *p = z8k_table + inv;
+	  opcode_entry_type *p = lookup_inst (i);
 
 	  if (needcomma)
 	    printf (",");
@@ -1866,13 +1805,13 @@
 	    }
 	  else
 #endif
-	  if (inv >= 0)
+	  if (p != NULL)
 	    {
-	      printf ("%d", inv);
+	      printf ("%d", p->idx);
 	    }
 	  else
 	    printf ("400");
-	  if (inv >= 0)
+	  if (p != NULL)
 	    {
 	      printf ("		/* %04x %s */\n", i, p->nicename);
 	    }
@@ -1881,17 +1820,6 @@
 	      printf ("\n");
 	    }
 	  needcomma = 1;
-	  if ((i & 0x3f) == 0 && DIRTY_HACK)
-	    {
-	      printf ("#ifdef __GNUC__\n");
-	      printf ("}; \n");
-	      printf ("struct op_info op_info_table%d[] = {\n", i);
-	      printf ("#else\n");
-	      printf (",\n");
-
-	      printf ("#endif\n");
-	      needcomma = 0;
-	    }
 	}
       printf ("};\n");
 
diff --git a/texinfo/texinfo.tex b/texinfo/texinfo.tex
index 9994f1d..b0a1cfc 100644
--- a/texinfo/texinfo.tex
+++ b/texinfo/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2002-02-14.08}
+\def\texinfoversion{2002-06-04.06}
 %
 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
 %               2000, 01, 02 Free Software Foundation, Inc.
@@ -53,7 +53,7 @@
 %   texindex foo.??
 %   tex foo.texi
 %   tex foo.texi
-%   dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
+%   dvips foo.dvi -o  # or whatever; this makes foo.ps.
 % The extra TeX runs get the cross-reference information correct.
 % Sometimes one run after texindex suffices, and sometimes you need more
 % than two; texi2dvi does it as many times as necessary.
@@ -846,8 +846,7 @@
 % @math gets a chance to work.  This could perhaps be fixed, but for now
 % at least we can have real math in the main text, where it's needed most.
 %
-% 
-\let\implicitmath = $
+\let\implicitmath = $%$ font-lock fix
 %
 % One complication: _ usually means subscripts, but it could also mean
 % an actual _ character, as in @math{@var{some_variable} + 1}.  So make
@@ -857,10 +856,22 @@
 {\catcode95 = \active  % 95 = _
 \gdef\mathunderscore{%
   \catcode95=\active
-  \def_{\ifnum\fam=\slfam\_\else\sb\fi}%
+  \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
 }}
 %
-\def\math{\tex\mathcode`\_="8000\mathunderscore \implicitmath\finishmath}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care.  Texinfo does not
+% otherwise define @\.
+% 
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+  \tex
+  \mathcode`\_="8000 \mathunderscore
+  \let\\ = \mathbackslash
+  \implicitmath\finishmath}
 \def\finishmath#1{#1\implicitmath\Etex}
 
 % @bullet and @minus need the same treatment as @math, just above.
@@ -987,11 +998,11 @@
       \let\appendixentry = \chapentry
       \def\unnumbchapentry ##1##2{}
       \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
-      \def\unnumbsecentry ##1##2{}
+      \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
       \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
-      \def\unnumbsubsecentry ##1##2{}
+      \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
       \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
-      \def\unnumbsubsubsecentry ##1##2{}
+      \def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
       \input \jobname.toc
       \def\chapentry ##1##2##3{%
         \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
@@ -1000,16 +1011,16 @@
         \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
       \def\secentry ##1##2##3##4{%
         \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
-      \def\unnumbsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsecentry ##1##2##3{%
+        \pdfoutline goto name{\pdfmkpgn{##3}}{##1}}
       \def\subsecentry ##1##2##3##4##5{%
         \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
-      \def\unnumbsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsubsecentry ##1##2##3##4{%
+        \pdfoutline goto name{\pdfmkpgn{##4}}{##1}}
       \def\subsubsecentry ##1##2##3##4##5##6{%
         \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
-      \def\unnumbsubsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsubsubsecentry ##1##2##3##4##5{%
+        \pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
       \input \jobname.toc
     \endgroup\fi
   }}
@@ -1431,11 +1442,19 @@
 
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
+\def\codeunder{%
+  % this is all so @math{@code{var_name}+1} can work.  In math mode, _
+  % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+  % will therefore expand the active definition of _, which is us
+  % (inside @code that is), therefore an endless loop.
+  \ifusingtt{\ifmmode
+               \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+             \else\normalunderscore \fi
+             \discretionary{}{}{}}%
+            {\_}%
+}
 \def\codex #1{\tclose{#1}\endgroup}
 
-%\let\exp=\tclose  %Was temporary
-
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
 
@@ -1637,8 +1656,6 @@
      \global\let\contents = \relax
      \global\let\shortcontents = \relax
    \fi
-   %
-   \ifpdf \pdfmakepagedesttrue \fi
 }
 
 \def\finishtitlepage{%
@@ -2396,20 +2413,19 @@
   \let\item = \relax
 }
 
-% Ignore @ignore ... @end ignore.
+% Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu,
+% @direntry, and @documentdescription.
 %
 \def\ignore{\doignore{ignore}}
-
-% Also ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu,
-% @documentdescription, and @direntry text.
-%
-\def\ifinfo{\doignore{ifinfo}}
 \def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifplaintext{\doignore{ifplaintext}}
 \def\ifnottex{\doignore{ifnottex}}
 \def\html{\doignore{html}}
 \def\menu{\doignore{menu}}
-\def\documentdescription{\doignore{documentdescription}}
 \def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\documentdescriptionword{documentdescription}
 
 % @dircategory CATEGORY  -- specify a category of the dir file
 % which this file should belong to.  Ignore this in TeX.
@@ -2436,14 +2452,21 @@
   % We must not have @c interpreted as a control sequence.
   \catcode`\@ = 12
   %
-  % Make the letter c a comment character so that the rest of the line
-  % will be ignored. This way, the document can have (for example)
-  %   @c @end ifinfo
-  % and the @end ifinfo will be properly ignored.
-  % (We've just changed @ to catcode 12.)
-  \catcode`\c = 14
+  \def\ignoreword{#1}%
+  \ifx\ignoreword\documentdescriptionword
+    % The c kludge breaks documentdescription, since
+    % `documentdescription' contains a `c'.  Means not everything will
+    % be ignored inside @documentdescription, but oh well...
+  \else
+    % Make the letter c a comment character so that the rest of the line
+    % will be ignored. This way, the document can have (for example)
+    %   @c @end ifinfo
+    % and the @end ifinfo will be properly ignored.
+    % (We've just changed @ to catcode 12.)
+    \catcode`\c = 14
+  \fi
   %
-  % And now expand that command.
+  % And now expand the command defined above.
   \doignoretext
 }
 
@@ -2634,19 +2657,21 @@
 \def\ifclearfail{\nestedignore{ifclear}}
 \defineunmatchedend{ifclear}
 
-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
-% following, through the first @end iftex (etc.).  Make `@end iftex'
-% (etc.) valid only after an @iftex.
+% @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we
+% read the text following, through the first @end iftex (etc.).  Make
+% `@end iftex' (etc.) valid only after an @iftex.
 %
 \def\iftex{\conditionalsucceed{iftex}}
 \def\ifnothtml{\conditionalsucceed{ifnothtml}}
 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
+\def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}}
 \defineunmatchedend{iftex}
 \defineunmatchedend{ifnothtml}
 \defineunmatchedend{ifnotinfo}
+\defineunmatchedend{ifnotplaintext}
 
-% We can't just want to start a group at @iftex (for example) and end it
-% at @end iftex, since then @set commands inside the conditional have no
+% We can't just want to start a group at @iftex (etc.) and end it at
+% @end iftex, since then @set commands inside the conditional have no
 % effect (they'd get reverted at the end of the group).  So we must
 % define \Eiftex to redefine itself to be its previous value.  (We can't
 % just define it to fail again with an ``unmatched end'' error, since
@@ -2861,7 +2886,7 @@
 
 % If an index command is used in an @example environment, any spaces
 % therein should become regular spaces in the raw index file, not the
-% expansion of \tie (\\leavevmode \penalty \@M \ ).
+% expansion of \tie (\leavevmode \penalty \@M \ ).
 {\obeyspaces
  \gdef\unsepspaces{\obeyspaces\let =\space}}
 
@@ -3613,7 +3638,8 @@
 \def\unnumberedseczzz #1{%
 \plainsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
+\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
+  {\the\toks0}{\the\chapno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3652,7 +3678,7 @@
 \plainsubsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
-                                    {\the\toks0}}}%
+  {\the\toks0}{\the\chapno}{\the\secno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3693,7 +3719,7 @@
 \plainsubsubsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
-                                    {\the\toks0}}}%
+  {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3905,7 +3931,7 @@
 % argument, which will end up as the last argument to the \...entry macro.
 %
 % We open the .toc file here instead of at @setfilename or any other
-% given time so that @contents can be put in the document anywhere.
+% fixed time so that @contents can be put in the document anywhere.
 %
 \newif\iftocfileopened
 \def\writetocentry#1{%
@@ -3914,6 +3940,14 @@
     \global\tocfileopenedtrue
   \fi
   \iflinks \write\tocfile{#1{\folio}}\fi
+  %
+  % Tell \shipout to create a page destination if we're doing pdf, which
+  % will be the target of the links in the table of contents.  We can't
+  % just do it on every page because the title pages are numbered 1 and
+  % 2 (the page numbers aren't printed), and so are the first two pages
+  % of the document.  Thus, we'd have two destinations named `1', and
+  % two named `2'.
+  \ifpdf \pdfmakepagedesttrue \fi
 }
 
 \newskip\contentsrightmargin \contentsrightmargin=1in
@@ -3978,11 +4012,11 @@
       \hyphenpenalty = 10000
       \advance\baselineskip by 1pt % Open it up a little.
       \def\secentry ##1##2##3##4{}
-      \def\unnumbsecentry ##1##2{}
+      \def\unnumbsecentry ##1##2##3{}
       \def\subsecentry ##1##2##3##4##5{}
-      \def\unnumbsubsecentry ##1##2{}
+      \def\unnumbsubsecentry ##1##2##3##4{}
       \def\subsubsecentry ##1##2##3##4##5##6{}
-      \def\unnumbsubsubsecentry ##1##2{}
+      \def\unnumbsubsubsecentry ##1##2##3##4##5{}
       \openin 1 \jobname.toc
       \ifeof 1 \else
         \closein 1
@@ -4044,16 +4078,16 @@
 
 % Sections.
 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
-\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
+\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
 
 % Subsections.
 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
-\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
+\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
 
 % And subsubsections.
 \def\subsubsecentry#1#2#3#4#5#6{%
   \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
-\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
+\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
 
 % This parameter controls the indentation of the various levels.
 \newdimen\tocindent \tocindent = 3pc
@@ -4114,36 +4148,27 @@
 \message{environments,}
 % @foo ... @end foo.
 
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+% 
 % Since these characters are used in examples, it should be an even number of
 % \tt widths. Each \tt character is 1en, so two makes it 1em.
-% Furthermore, these definitions must come after we define our fonts.
-\newbox\dblarrowbox    \newbox\longdblarrowbox
-\newbox\pushcharbox    \newbox\bullbox
-\newbox\equivbox       \newbox\errorbox
-
-%{\tentt
-%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
-%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
-%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
-%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
-% Adapted from the manmac format (p.420 of TeXbook)
-%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
-%                                      depth .1ex\hfil}
-%}
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
 \def\point{$\star$}
 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
 \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
 
+% The @error{} command.
 % Adapted from the TeXbook's \boxit.
+% 
+\newbox\errorbox
+%
 {\tentt \global\dimen0 = 3em}% Width of the box.
 \dimen2 = .55pt % Thickness of rules
 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
-
+%
 \global\setbox\errorbox=\hbox to \dimen0{\hfil
    \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
    \advance\hsize by -2\dimen2 % Rules.
@@ -4154,8 +4179,7 @@
          \kern3pt\vrule width\dimen2}% Space to right.
       \hrule height\dimen2}
     \hfil}
-
-% The @error{} command.
+%
 \def\error{\leavevmode\lower.7ex\copy\errorbox}
 
 % @tex ... @end tex    escapes into raw Tex temporarily.
@@ -4195,9 +4219,9 @@
   \def\@{@}%
 \let\Etex=\endgroup}
 
-% Define @lisp ... @endlisp.
+% Define @lisp ... @end lisp.
 % @lisp does a \begingroup so it can rebind things,
-% including the definition of @endlisp (which normally is erroneous).
+% including the definition of @end lisp (which normally is erroneous).
 
 % Amount to narrow the margins by for @lisp.
 \newskip\lispnarrowing \lispnarrowing=0.4in
@@ -4595,6 +4619,21 @@
   \endgroup\nonfillfinish\endgroup
 }
 
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+% 
+\newbox\copyingbox
+%
+\def\copying{\begingroup
+  \parindent = 0pt  % looks wrong on title page
+  \def\Ecopying{\egroup\endgroup}%
+  \global\setbox\copyingbox = \vbox\bgroup
+}
+
+% @insertcopying.
+% 
+\def\insertcopying{\unvcopy\copyingbox}
+
 
 \message{defuns,}
 % @defun etc.
@@ -4691,56 +4730,60 @@
 {\df #1}\enskip        % Generate function name
 }
 
-% Actually process the body of a definition
-% #1 should be the terminating control sequence, such as \Edefun.
-% #2 should be the "another name" control sequence, such as \defunx.
-% #3 should be the control sequence that actually processes the header,
-%    such as \defunheader.
-
-\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active % 61 is `='
-\obeylines\activeparens\spacesplit#3}
-
+% Common pieces to start any @def...
 % #1 is the \E... control sequence to end the definition (which we define).
-% #2 is the \...x control sequence for consecutive fns (which we define).
-% #3 is the control sequence to call to resume processing.
-% #4, delimited by the space, is the class name.
-%
-\def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
-
-% Used for @deftypemethod and @deftypeivar.
-% #1 is the \E... control sequence to end the definition (which we define).
-% #2 is the \...x control sequence for consecutive fns (which we define).
-% #3 is the control sequence to call to resume processing.
-% #4, delimited by a space, is the class name.
-% #5 is the method's return type.
-%
-\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV
+% #2 is the \...x control sequence (which our caller defines).
+% #3 is the control sequence to process the header, such as \defunheader.
+% 
+\def\parsebodycommon#1#2#3{%
+  \begingroup\inENV
+  % If there are two @def commands in a row, we'll have a \nobreak,
+  % which is there to keep the function description together with its
+  % header.  But if there's nothing but headers, we want to allow a
+  % break after all.
+  \ifnum\lastpenalty = 10000 \penalty0 \fi
   \medbreak
+  %
+  % Define the \E... end token that this defining construct specifies
+  % so that it will exit this group.
   \def#1{\endgraf\endgroup\medbreak}%
-  \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
+  %
   \parindent=0in
   \advance\leftskip by \defbodyindent
   \exdentamount=\defbodyindent
-  \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
+}
+
+% Process body of @defun, @deffn, @defmac, etc.
+%
+\def\defparsebody#1#2#3{%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+  \catcode61=\active % 61 is `='
+  \begingroup\obeylines\activeparens
+  \spacesplit#3%
+}
+
+% #1, #2, #3 are the common arguments (see \defparsebody).
+% #4, delimited by the space, is the class name.
+%
+\def\defmethparsebody#1#2#3#4 {%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+  \begingroup\obeylines\activeparens
+  \spacesplit{#3{#4}}%
+}
+
+% Used for @deftypemethod and @deftypeivar.
+% #1, #2, #3 are the common arguments (see \defparsebody).
+% #4, delimited by a space, is the class name.
+% #5 is the method's return type.
+%
+\def\deftypemethparsebody#1#2#3#4 #5 {%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
+  \begingroup\obeylines\activeparens
+  \spacesplit{#3{#4}{#5}}%
+}
 
 % Used for @deftypeop.  The change from \deftypemethparsebody is an
 % extra argument at the beginning which is the `category', instead of it
@@ -4749,64 +4792,49 @@
 % input at hand.  Thus also need a control sequence (passed as #5) for
 % the \E... definition to assign the category name to.
 % 
-\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV
-  \medbreak
-  \def#1{\endgraf\endgroup\medbreak}%
+\def\deftypeopparsebody#1#2#3#4#5 #6 {%
+  \parsebodycommon{#1}{#2}{#3}%
   \def#2##1 ##2 ##3 {%
     \def#4{##1}%
     \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
-  \parindent=0in
-  \advance\leftskip by \defbodyindent
-  \exdentamount=\defbodyindent
-  \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}}
+  \begingroup\obeylines\activeparens
+  \spacesplit{#3{#5}{#6}}%
+}
 
-\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
+% For @defop.
+\def\defopparsebody #1#2#3#4#5 {%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 ##2 {\def#4{##1}%
+    \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
+  \begingroup\obeylines\activeparens
+  \spacesplit{#3{#5}}%
+}
 
 % These parsing functions are similar to the preceding ones
 % except that they do not make parens into active characters.
 % These are used for "variables" since they have no arguments.
-
-\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active %
-\obeylines\spacesplit#3}
-
-% This is used for \def{tp,vr}parsebody.  It could probably be used for
-% some of the others, too, with some judicious conditionals.
 %
-\def\parsebodycommon#1#2#3{%
-  \begingroup\inENV %
-  \medbreak %
-  % Define the end token that this defining construct specifies
-  % so that it will exit this group.
-  \def#1{\endgraf\endgroup\medbreak}%
-  \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
-  \parindent=0in
-  \advance\leftskip by \defbodyindent
-  \exdentamount=\defbodyindent
+\def\defvarparsebody #1#2#3{%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2{\begingroup\obeylines\spacesplit#3}%
+  \catcode61=\active %
   \begingroup\obeylines
+  \spacesplit#3%
+}
+
+% @defopvar.
+\def\defopvarparsebody #1#2#3#4#5 {%
+  \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 ##2 {\def#4{##1}%
+    \begingroup\obeylines\spacesplit{#3{##2}}}%
+  \begingroup\obeylines
+  \spacesplit{#3{#5}}%
 }
 
 \def\defvrparsebody#1#2#3#4 {%
   \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+  \begingroup\obeylines
   \spacesplit{#3{#4}}%
 }
 
@@ -4821,6 +4849,8 @@
 %
 \def\deftpparsebody #1#2#3#4 {%
   \parsebodycommon{#1}{#2}{#3}%
+  \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+  \begingroup\obeylines
   \spacesplit{\parsetpheaderline{#3{#4}}}\empty
 }
 
@@ -4837,33 +4867,19 @@
   #1{\removeemptybraces#2\relax}{#3}%
 }%
 
-\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\spacesplit{#3{#5}}}
-
 % Split up #2 at the first space token.
 % call #1 with two arguments:
 %  the first is all of #2 before the space token,
 %  the second is all of #2 after that space token.
 % If #2 contains no space token, all of it is passed as the first arg
 % and the second is passed as empty.
-
+%
 {\obeylines
 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
 \ifx\relax #3%
 #1{#2}{}\else #1{#2}{#3#4}\fi}}
 
-% So much for the things common to all kinds of definitions.
-
 % Define @defun.
 
 % First, define the processing that is wanted for arguments of \defun
@@ -5273,7 +5289,7 @@
      \message{Warning: redefining \the\macname}%
   \else
      \expandafter\ifx\csname \the\macname\endcsname \relax
-     \else \errmessage{The name \the\macname\space is reserved}\fi
+     \else \errmessage{Macro name \the\macname\space already defined}\fi
      \global\cslet{macsave.\the\macname}{\the\macname}%
      \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
      % Add the macroname to \macrolist
@@ -6173,7 +6189,7 @@
 \def\normalless{<}
 \def\normalgreater{>}
 \def\normalplus{+}
-\def\normaldollar{$}
+\def\normaldollar{$}%$ font-lock fix
 
 % This macro is used to make a character print one way in ttfont
 % where it can probably just be output, and another way in other fonts,
@@ -6222,7 +6238,7 @@
 \catcode`\+=\active
 \def+{{\tt \char 43}}
 \catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
 %\catcode 27=\active
 %\def^^[{$\diamondsuit$}
 
@@ -6267,7 +6283,7 @@
 @let<=@normalless
 @let>=@normalgreater
 @let+=@normalplus
-@let$=@normaldollar}
+@let$=@normaldollar}%$ font-lock fix
 
 @def@normalturnoffactive{@let"=@normaldoublequote
 @let\=@normalbackslash
@@ -6278,7 +6294,7 @@
 @let<=@normalless
 @let>=@normalgreater
 @let+=@normalplus
-@let$=@normaldollar}
+@let$=@normaldollar}%$ font-lock fix
 
 % Make _ and + \other characters, temporarily.
 % This is canceled by @fixbackslash.